@rxap/form-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 (63) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/compodoc/changelog.html +43 -0
  3. package/compodoc/dependencies.html +8 -8
  4. package/compodoc/directives/CloseWindowAfterSubmitDirective.html +4 -75
  5. package/compodoc/directives/FormWindowFooterDirective.html +7 -104
  6. package/compodoc/directives/OpenFormDirective.html +366 -447
  7. package/compodoc/directives/OpenFormWindowMethodDirective.html +236 -419
  8. package/compodoc/injectables/FormWindowService.html +6 -77
  9. package/compodoc/injectables/OpenFormWindowMethod.html +9 -121
  10. package/compodoc/interfaces/FormWindowFooterTemplateContext.html +5 -18
  11. package/compodoc/interfaces/FormWindowOptions.html +4 -15
  12. package/compodoc/js/search/search_index.js +2 -2
  13. package/compodoc/properties.html +1 -1
  14. package/docs/documentation.json +1223 -1653
  15. package/docs/html/assets/search.js +1 -1
  16. package/docs/html/classes/CloseWindowAfterSubmitDirective.html +4 -4
  17. package/docs/html/classes/FormWindowFooterDirective.html +4 -4
  18. package/docs/html/classes/FormWindowRef.html +3 -3
  19. package/docs/html/classes/FormWindowService.html +2 -2
  20. package/docs/html/classes/OpenFormDirective.html +14 -14
  21. package/docs/html/classes/OpenFormWindowMethod.html +2 -2
  22. package/docs/html/classes/OpenFormWindowMethodDirective.html +8 -8
  23. package/docs/html/index.html +2 -2
  24. package/docs/html/interfaces/FormWindowFooterTemplateContext.html +2 -2
  25. package/docs/html/interfaces/FormWindowOptions.html +3 -3
  26. package/docs/html/modules.html +1 -1
  27. package/docs/html/variables/RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT.html +1 -1
  28. package/docs/html/variables/RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS.html +1 -1
  29. package/docs/html/variables/RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR.html +1 -1
  30. package/docs/html/variables/RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR.html +1 -1
  31. package/docs/markdown/README.md +1 -1
  32. package/docs/markdown/classes/CloseWindowAfterSubmitDirective.md +5 -17
  33. package/docs/markdown/classes/FormWindowFooterDirective.md +5 -25
  34. package/docs/markdown/classes/FormWindowRef.md +8 -8
  35. package/docs/markdown/classes/FormWindowService.md +4 -16
  36. package/docs/markdown/classes/OpenFormDirective.md +53 -103
  37. package/docs/markdown/classes/OpenFormWindowMethod.md +4 -28
  38. package/docs/markdown/classes/OpenFormWindowMethodDirective.md +32 -52
  39. package/docs/markdown/globals.md +2 -2
  40. package/docs/markdown/interfaces/FormWindowFooterTemplateContext.md +5 -5
  41. package/docs/markdown/interfaces/FormWindowOptions.md +32 -32
  42. package/docs/markdown/variables/RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT.md +2 -2
  43. package/docs/markdown/variables/RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS.md +2 -2
  44. package/docs/markdown/variables/RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR.md +2 -2
  45. package/docs/markdown/variables/RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR.md +2 -2
  46. package/docs/wiki/Class.CloseWindowAfterSubmitDirective.md +4 -16
  47. package/docs/wiki/Class.FormWindowFooterDirective.md +4 -24
  48. package/docs/wiki/Class.FormWindowRef.md +7 -7
  49. package/docs/wiki/Class.FormWindowService.md +3 -15
  50. package/docs/wiki/Class.OpenFormDirective.md +52 -102
  51. package/docs/wiki/Class.OpenFormWindowMethod.md +3 -27
  52. package/docs/wiki/Class.OpenFormWindowMethodDirective.md +31 -51
  53. package/docs/wiki/Interface.FormWindowFooterTemplateContext.md +4 -4
  54. package/docs/wiki/Interface.FormWindowOptions.md +31 -31
  55. package/docs/wiki/Variable.RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT.md +1 -1
  56. package/docs/wiki/Variable.RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS.md +1 -1
  57. package/docs/wiki/Variable.RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR.md +1 -1
  58. package/docs/wiki/Variable.RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR.md +1 -1
  59. package/docs/wiki/globals.md +1 -1
  60. package/fesm2022/rxap-form-window-system.mjs +80 -189
  61. package/fesm2022/rxap-form-window-system.mjs.map +1 -1
  62. package/package.json +30 -30
  63. package/types/rxap-form-window-system.d.ts +37 -44
@@ -1,8 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Inject, Directive, TemplateRef, ViewContainerRef, INJECTOR, Optional, Injector, Injectable, EventEmitter, HostListener, Input, Output, InjectionToken, isDevMode, HostBinding } from '@angular/core';
3
- import * as i1 from '@rxap/forms';
2
+ import { inject, Directive, TemplateRef, ViewContainerRef, Inject, INJECTOR, Optional, Injector, Injectable, input, output, InjectionToken, computed, isDevMode } from '@angular/core';
4
3
  import { FormSubmitDirective, FormDirective, RxapFormBuilder, RXAP_FORM_DEFINITION_BUILDER, RXAP_FORM_INITIAL_STATE, RXAP_FORM_DEFINITION, RXAP_FORM_SUBMIT_METHOD, RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD, RXAP_FORM_LOAD_METHOD, RXAP_FORM_CONTEXT, ToFormMethod } from '@rxap/forms';
5
- import * as i2 from '@rxap/window-system';
6
4
  import { RXAP_WINDOW_REF, WindowRef, WindowService } from '@rxap/window-system';
7
5
  import { TemplatePortal } from '@angular/cdk/portal';
8
6
  import { __decorate, __param, __metadata } from 'tslib';
@@ -13,9 +11,9 @@ import { CounterSubject } from '@rxap/rxjs';
13
11
  import { ConfirmClick } from '@rxap/directives';
14
12
 
15
13
  class CloseWindowAfterSubmitDirective {
16
- constructor(formSubmit, windowRef) {
17
- this.formSubmit = formSubmit;
18
- this.windowRef = windowRef;
14
+ constructor() {
15
+ this.formSubmit = inject(FormSubmitDirective);
16
+ this.windowRef = inject(RXAP_WINDOW_REF);
19
17
  }
20
18
  ngOnInit() {
21
19
  this._subscription = this.formSubmit.afterSubmit.subscribe(() => this.windowRef.complete());
@@ -23,7 +21,7 @@ class CloseWindowAfterSubmitDirective {
23
21
  ngOnDestroy() {
24
22
  this._subscription?.unsubscribe();
25
23
  }
26
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CloseWindowAfterSubmitDirective, deps: [{ token: FormSubmitDirective }, { token: RXAP_WINDOW_REF }], target: i0.ɵɵFactoryTarget.Directive }); }
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CloseWindowAfterSubmitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
27
25
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: CloseWindowAfterSubmitDirective, isStandalone: true, selector: "[rxapFormSubmit][rxapCloseWindowAfterSubmit]", ngImport: i0 }); }
28
26
  }
29
27
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CloseWindowAfterSubmitDirective, decorators: [{
@@ -32,20 +30,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
32
30
  selector: '[rxapFormSubmit][rxapCloseWindowAfterSubmit]',
33
31
  standalone: true,
34
32
  }]
35
- }], ctorParameters: () => [{ type: i1.FormSubmitDirective, decorators: [{
36
- type: Inject,
37
- args: [FormSubmitDirective]
38
- }] }, { type: undefined, decorators: [{
39
- type: Inject,
40
- args: [RXAP_WINDOW_REF]
41
- }] }] });
33
+ }] });
42
34
 
43
35
  class FormWindowFooterDirective {
44
- constructor(formDirective, windowRef, template, viewContainerRef) {
45
- this.formDirective = formDirective;
46
- this.windowRef = windowRef;
47
- this.template = template;
48
- this.viewContainerRef = viewContainerRef;
36
+ constructor() {
37
+ this.formDirective = inject(FormDirective);
38
+ this.windowRef = inject(RXAP_WINDOW_REF);
39
+ this.template = inject(TemplateRef);
40
+ this.viewContainerRef = inject(ViewContainerRef);
49
41
  }
50
42
  /**
51
43
  * Asserts the correct type of the context for the template that `NgForOf` will render.
@@ -63,7 +55,7 @@ class FormWindowFooterDirective {
63
55
  formDirective: this.formDirective,
64
56
  }));
65
57
  }
66
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormWindowFooterDirective, deps: [{ token: FormDirective }, { token: RXAP_WINDOW_REF }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormWindowFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
67
59
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: FormWindowFooterDirective, isStandalone: true, selector: "[rxapFormWindowFooter]", ngImport: i0 }); }
68
60
  }
69
61
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormWindowFooterDirective, decorators: [{
@@ -72,19 +64,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
72
64
  selector: '[rxapFormWindowFooter]',
73
65
  standalone: true,
74
66
  }]
75
- }], ctorParameters: () => [{ type: i1.FormDirective, decorators: [{
76
- type: Inject,
77
- args: [FormDirective]
78
- }] }, { type: i2.WindowRef, decorators: [{
79
- type: Inject,
80
- args: [RXAP_WINDOW_REF]
81
- }] }, { type: i0.TemplateRef, decorators: [{
82
- type: Inject,
83
- args: [TemplateRef]
84
- }] }, { type: i0.ViewContainerRef, decorators: [{
85
- type: Inject,
86
- args: [ViewContainerRef]
87
- }] }] });
67
+ }] });
88
68
 
89
69
  /**
90
70
  * @deprecated removed
@@ -110,9 +90,9 @@ FormWindowRef = __decorate([
110
90
  ], FormWindowRef);
111
91
 
112
92
  class FormWindowService {
113
- constructor(windowService, injector) {
114
- this.windowService = windowService;
115
- this.injector = injector;
93
+ constructor() {
94
+ this.windowService = inject(WindowService);
95
+ this.injector = inject(INJECTOR);
116
96
  }
117
97
  open(formDefinitionConstructor, options) {
118
98
  function FormDefinitionFactory(formBuilder, initial) {
@@ -203,7 +183,7 @@ class FormWindowService {
203
183
  }
204
184
  return component;
205
185
  }
206
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormWindowService, deps: [{ token: WindowService }, { token: INJECTOR }], target: i0.ɵɵFactoryTarget.Injectable }); }
186
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormWindowService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
207
187
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormWindowService, providedIn: 'root' }); }
208
188
  }
209
189
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormWindowService, decorators: [{
@@ -211,27 +191,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
211
191
  args: [{
212
192
  providedIn: 'root',
213
193
  }]
214
- }], ctorParameters: () => [{ type: i2.WindowService, decorators: [{
215
- type: Inject,
216
- args: [WindowService]
217
- }] }, { type: i0.Injector, decorators: [{
218
- type: Inject,
219
- args: [INJECTOR]
220
- }] }] });
194
+ }] });
221
195
 
222
196
  class OpenFormWindowMethodDirective {
223
- constructor(injector = null) {
224
- this.injector = injector;
197
+ constructor() {
198
+ this.injector = inject(INJECTOR, { optional: true }) ?? null;
199
+ this.method = input.required({ ...(ngDevMode ? { debugName: "method" } : /* istanbul ignore next */ {}), alias: "rxapOpenFormWindowMethod" });
200
+ this.initial = input(...(ngDevMode ? [undefined, { debugName: "initial" }] : /* istanbul ignore next */ []));
225
201
  // eslint-disable-next-line @angular-eslint/no-output-rename
226
- this.failure$ = new EventEmitter();
202
+ this.failure$ = output({ alias: 'failure' });
227
203
  // eslint-disable-next-line @angular-eslint/no-output-rename
228
- this.completed$ = new EventEmitter();
204
+ this.completed$ = output({ alias: 'completed' });
229
205
  // eslint-disable-next-line @angular-eslint/no-output-rename
230
- this.submitted$ = new EventEmitter();
206
+ this.submitted$ = output({ alias: 'submitted' });
231
207
  /**
232
208
  * true - a remote method call is in progress
233
209
  */
234
210
  this.executing$ = new CounterSubject(0);
211
+ this.providers = input(...(ngDevMode ? [undefined, { debugName: "providers" }] : /* istanbul ignore next */ []));
235
212
  /**
236
213
  * Set of all active window ref instances.
237
214
  *
@@ -240,11 +217,7 @@ class OpenFormWindowMethodDirective {
240
217
  * @protected
241
218
  */
242
219
  this._windowRefInstance = new Set();
243
- this._hasConfirmDirective = false;
244
- }
245
- // eslint-disable-next-line @angular-eslint/no-input-rename
246
- set hasConfirmDirective(value) {
247
- this._hasConfirmDirective = coerceBoolean(value);
220
+ this.hasConfirmDirective = input(false, { ...(ngDevMode ? { debugName: "hasConfirmDirective" } : /* istanbul ignore next */ {}), alias: 'rxapConfirm', transform: coerceBoolean });
248
221
  }
249
222
  ngOnDestroy() {
250
223
  this._windowRefInstance.forEach(windowRef => windowRef.complete());
@@ -253,7 +226,7 @@ class OpenFormWindowMethodDirective {
253
226
  this.execute();
254
227
  }
255
228
  onClick() {
256
- if (!this._hasConfirmDirective) {
229
+ if (!this.hasConfirmDirective()) {
257
230
  this.execute();
258
231
  }
259
232
  else {
@@ -262,8 +235,8 @@ class OpenFormWindowMethodDirective {
262
235
  }
263
236
  execute() {
264
237
  this.executing$.increase();
265
- const windowRef = this.method.call(this.initial, {
266
- providers: this.providers,
238
+ const windowRef = this.method().call(this.initial(), {
239
+ providers: this.providers(),
267
240
  injector: this.injector,
268
241
  });
269
242
  windowRef.subscribe((value) => this.submitted(value), (error) => this.failure(error), () => {
@@ -281,57 +254,31 @@ class OpenFormWindowMethodDirective {
281
254
  completed() {
282
255
  this.completed$.emit();
283
256
  }
284
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormWindowMethodDirective, deps: [{ token: INJECTOR, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
285
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: OpenFormWindowMethodDirective, isStandalone: true, selector: "[rxapOpenFormWindowMethod]", inputs: { method: ["rxapOpenFormWindowMethod", "method"], initial: "initial", providers: "providers", hasConfirmDirective: ["rxapConfirm", "hasConfirmDirective"] }, outputs: { failure$: "failure", completed$: "completed", submitted$: "submitted" }, host: { listeners: { "confirmed": "onConfirmed()", "click": "onClick()" } }, ngImport: i0 }); }
257
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormWindowMethodDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
258
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: OpenFormWindowMethodDirective, isStandalone: true, selector: "[rxapOpenFormWindowMethod]", inputs: { method: { classPropertyName: "method", publicName: "rxapOpenFormWindowMethod", isSignal: true, isRequired: true, transformFunction: null }, initial: { classPropertyName: "initial", publicName: "initial", isSignal: true, isRequired: false, transformFunction: null }, providers: { classPropertyName: "providers", publicName: "providers", isSignal: true, isRequired: false, transformFunction: null }, hasConfirmDirective: { classPropertyName: "hasConfirmDirective", publicName: "rxapConfirm", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { failure$: "failure", completed$: "completed", submitted$: "submitted" }, host: { listeners: { "confirmed": "onConfirmed()", "click": "onClick()" } }, ngImport: i0 }); }
286
259
  }
287
260
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormWindowMethodDirective, decorators: [{
288
261
  type: Directive,
289
262
  args: [{
290
263
  selector: '[rxapOpenFormWindowMethod]',
264
+ host: {
265
+ '(confirmed)': 'onConfirmed()',
266
+ '(click)': 'onClick()',
267
+ },
291
268
  standalone: true,
292
269
  }]
293
- }], ctorParameters: () => [{ type: i0.Injector, decorators: [{
294
- type: Optional
295
- }, {
296
- type: Inject,
297
- args: [INJECTOR]
298
- }] }], propDecorators: { method: [{
299
- type: Input,
300
- args: ['rxapOpenFormWindowMethod']
301
- }], initial: [{
302
- type: Input
303
- }], failure$: [{
304
- type: Output,
305
- args: ['failure']
306
- }], completed$: [{
307
- type: Output,
308
- args: ['completed']
309
- }], submitted$: [{
310
- type: Output,
311
- args: ['submitted']
312
- }], providers: [{
313
- type: Input
314
- }], hasConfirmDirective: [{
315
- type: Input,
316
- args: ['rxapConfirm']
317
- }], onConfirmed: [{
318
- type: HostListener,
319
- args: ['confirmed']
320
- }], onClick: [{
321
- type: HostListener,
322
- args: ['click']
323
- }] } });
270
+ }], propDecorators: { method: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapOpenFormWindowMethod", required: true }] }], initial: [{ type: i0.Input, args: [{ isSignal: true, alias: "initial", required: false }] }], failure$: [{ type: i0.Output, args: ["failure"] }], completed$: [{ type: i0.Output, args: ["completed"] }], submitted$: [{ type: i0.Output, args: ["submitted"] }], providers: [{ type: i0.Input, args: [{ isSignal: true, alias: "providers", required: false }] }], hasConfirmDirective: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapConfirm", required: false }] }] } });
324
271
 
325
272
  const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR = new InjectionToken('rxap/form-window-system/open-form/definition-constructor');
326
273
  const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS = new InjectionToken('rxap/form-window-system/open-form/default-options');
327
274
  const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT = new InjectionToken('rxap/form-window-system/open-form/component');
328
275
  class OpenFormWindowMethod {
329
- constructor(formWindowService, formDefinitionConstructor, injector, formComponent = null, defaultOptions = null) {
330
- this.formWindowService = formWindowService;
331
- this.formDefinitionConstructor = formDefinitionConstructor;
332
- this.injector = injector;
333
- this.formComponent = formComponent;
334
- this.defaultOptions = defaultOptions;
276
+ constructor() {
277
+ this.formWindowService = inject(FormWindowService);
278
+ this.formDefinitionConstructor = inject(RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR);
279
+ this.injector = inject(INJECTOR);
280
+ this.formComponent = inject(RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT, { optional: true }) ?? null;
281
+ this.defaultOptions = inject(RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS, { optional: true }) ?? null;
335
282
  }
336
283
  call(initial, options) {
337
284
  return this.formWindowService.open(this.formDefinitionConstructor, {
@@ -342,31 +289,12 @@ class OpenFormWindowMethod {
342
289
  component: this.formComponent ?? this.defaultOptions?.component ?? undefined,
343
290
  });
344
291
  }
345
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormWindowMethod, deps: [{ token: FormWindowService }, { token: RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR }, { token: INJECTOR }, { token: RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT, optional: true }, { token: RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
292
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormWindowMethod, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
346
293
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormWindowMethod }); }
347
294
  }
348
295
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormWindowMethod, decorators: [{
349
296
  type: Injectable
350
- }], ctorParameters: () => [{ type: FormWindowService, decorators: [{
351
- type: Inject,
352
- args: [FormWindowService]
353
- }] }, { type: undefined, decorators: [{
354
- type: Inject,
355
- args: [RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR]
356
- }] }, { type: i0.Injector, decorators: [{
357
- type: Inject,
358
- args: [INJECTOR]
359
- }] }, { type: undefined, decorators: [{
360
- type: Optional
361
- }, {
362
- type: Inject,
363
- args: [RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT]
364
- }] }, { type: undefined, decorators: [{
365
- type: Optional
366
- }, {
367
- type: Inject,
368
- args: [RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS]
369
- }] }] });
297
+ }] });
370
298
 
371
299
  /**
372
300
  * @deprecated
@@ -376,26 +304,29 @@ const RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR = new InjectionToken('rxap/w
376
304
  * @deprecated
377
305
  */
378
306
  class OpenFormDirective extends ConfirmClick {
379
- constructor(formDefinitionConstructor, formWindowService, injector) {
380
- super();
381
- this.formWindowService = formWindowService;
382
- this.injector = injector;
383
- this.type = 'button';
384
- this.submitted = new EventEmitter();
385
- if (formDefinitionConstructor) {
386
- this._formDefinitionConstructor = formDefinitionConstructor;
387
- }
388
- }
389
- set formDefinitionConstructor(value) {
390
- if (value) {
391
- this._formDefinitionConstructor = value;
392
- }
393
- }
394
- onSubmit(value) {
395
- if (isDevMode()) {
396
- console.warn('[rxapOpenForm] No "onSubmit" method is provided!');
397
- }
398
- return value;
307
+ constructor() {
308
+ super(...arguments);
309
+ this.formWindowService = inject(FormWindowService);
310
+ this.injector = inject(INJECTOR);
311
+ this.type = input('button', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
312
+ this.submitted = output();
313
+ this.initial = input(...(ngDevMode ? [undefined, { debugName: "initial" }] : /* istanbul ignore next */ []));
314
+ this.title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
315
+ this.icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
316
+ this.width = input(...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
317
+ this.height = input(...(ngDevMode ? [undefined, { debugName: "height" }] : /* istanbul ignore next */ []));
318
+ this.resizeable = input(...(ngDevMode ? [undefined, { debugName: "resizeable" }] : /* istanbul ignore next */ []));
319
+ this.draggable = input(...(ngDevMode ? [undefined, { debugName: "draggable" }] : /* istanbul ignore next */ []));
320
+ this.panelClass = input(...(ngDevMode ? [undefined, { debugName: "panelClass" }] : /* istanbul ignore next */ []));
321
+ this.defaultFormDefinitionConstructor = inject(RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR, { optional: true });
322
+ this.formDefinitionConstructorInput = input('', { ...(ngDevMode ? { debugName: "formDefinitionConstructorInput" } : /* istanbul ignore next */ {}), alias: 'rxapOpenForm' });
323
+ this.formDefinitionConstructor = computed(() => this.formDefinitionConstructorInput() || this.defaultFormDefinitionConstructor, ...(ngDevMode ? [{ debugName: "formDefinitionConstructor" }] : /* istanbul ignore next */ []));
324
+ this.onSubmit = input((value) => {
325
+ if (isDevMode()) {
326
+ console.warn('[rxapOpenForm] No "onSubmit" method is provided!');
327
+ }
328
+ return value;
329
+ }, ...(ngDevMode ? [{ debugName: "onSubmit" }] : /* istanbul ignore next */ []));
399
330
  }
400
331
  onSubmitSuccessful(result) {
401
332
  this.submitted.emit(result);
@@ -405,72 +336,32 @@ class OpenFormDirective extends ConfirmClick {
405
336
  this._formWindowRef?.close();
406
337
  }
407
338
  execute() {
408
- this._formWindowRef = this.formWindowService.open(this._formDefinitionConstructor, {
339
+ this._formWindowRef = this.formWindowService.open(this.formDefinitionConstructor(), {
409
340
  injector: this.injector,
410
341
  submitSuccessfulMethod: ToFormMethod(this.onSubmitSuccessful.bind(this)),
411
- initial: this.initial,
342
+ initial: this.initial(),
412
343
  injectorName: 'OpenFormDirective',
413
- title: this.title,
414
- icon: this.icon,
415
- width: this.width,
416
- resizeable: this.resizeable,
417
- draggable: this.draggable,
418
- panelClass: this.panelClass,
344
+ title: this.title(),
345
+ icon: this.icon(),
346
+ width: this.width(),
347
+ resizeable: this.resizeable(),
348
+ draggable: this.draggable(),
349
+ panelClass: this.panelClass(),
419
350
  });
420
351
  }
421
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormDirective, deps: [{ token: RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR, optional: true }, { token: FormWindowService }, { token: INJECTOR }], target: i0.ɵɵFactoryTarget.Directive }); }
422
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: OpenFormDirective, isStandalone: true, selector: "[rxapOpenForm]", inputs: { type: "type", initial: "initial", title: "title", icon: "icon", width: "width", height: "height", resizeable: "resizeable", draggable: "draggable", panelClass: "panelClass", formDefinitionConstructor: ["rxapOpenForm", "formDefinitionConstructor"], onSubmit: "onSubmit" }, outputs: { submitted: "submitted" }, host: { listeners: { "click": "onClick()", "confirmed": "onConfirm()" }, properties: { "attr.type": "this.type" } }, usesInheritance: true, ngImport: i0 }); }
352
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
353
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: OpenFormDirective, isStandalone: true, selector: "[rxapOpenForm]", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, initial: { classPropertyName: "initial", publicName: "initial", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, resizeable: { classPropertyName: "resizeable", publicName: "resizeable", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, formDefinitionConstructorInput: { classPropertyName: "formDefinitionConstructorInput", publicName: "rxapOpenForm", isSignal: true, isRequired: false, transformFunction: null }, onSubmit: { classPropertyName: "onSubmit", publicName: "onSubmit", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitted: "submitted" }, host: { properties: { "attr.type": "type()" } }, usesInheritance: true, ngImport: i0 }); }
423
354
  }
424
355
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormDirective, decorators: [{
425
356
  type: Directive,
426
357
  args: [{
427
358
  selector: '[rxapOpenForm]',
428
359
  host: {
429
- '(click)': 'onClick()',
430
- '(confirmed)': 'onConfirm()',
360
+ '[attr.type]': 'type()',
431
361
  },
432
362
  standalone: true,
433
363
  }]
434
- }], ctorParameters: () => [{ type: undefined, decorators: [{
435
- type: Optional
436
- }, {
437
- type: Inject,
438
- args: [RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR]
439
- }] }, { type: FormWindowService, decorators: [{
440
- type: Inject,
441
- args: [FormWindowService]
442
- }] }, { type: i0.Injector, decorators: [{
443
- type: Inject,
444
- args: [INJECTOR]
445
- }] }], propDecorators: { type: [{
446
- type: HostBinding,
447
- args: ['attr.type']
448
- }, {
449
- type: Input
450
- }], submitted: [{
451
- type: Output
452
- }], initial: [{
453
- type: Input
454
- }], title: [{
455
- type: Input
456
- }], icon: [{
457
- type: Input
458
- }], width: [{
459
- type: Input
460
- }], height: [{
461
- type: Input
462
- }], resizeable: [{
463
- type: Input
464
- }], draggable: [{
465
- type: Input
466
- }], panelClass: [{
467
- type: Input
468
- }], formDefinitionConstructor: [{
469
- type: Input,
470
- args: ['rxapOpenForm']
471
- }], onSubmit: [{
472
- type: Input
473
- }] } });
364
+ }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], submitted: [{ type: i0.Output, args: ["submitted"] }], initial: [{ type: i0.Input, args: [{ isSignal: true, alias: "initial", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], resizeable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeable", required: false }] }], draggable: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], formDefinitionConstructorInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapOpenForm", required: false }] }], onSubmit: [{ type: i0.Input, args: [{ isSignal: true, alias: "onSubmit", required: false }] }] } });
474
365
 
475
366
  // region
476
367
  // endregion
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-form-window-system.mjs","sources":["../../../../../packages/angular/form-window-system/src/lib/close-window-after-submit.directive.ts","../../../../../packages/angular/form-window-system/src/lib/form-window-footer.directive.ts","../../../../../packages/angular/form-window-system/src/lib/form-window-ref.ts","../../../../../packages/angular/form-window-system/src/lib/form-window.service.ts","../../../../../packages/angular/form-window-system/src/lib/open-form-window-method.directive.ts","../../../../../packages/angular/form-window-system/src/lib/open-form-window.method.ts","../../../../../packages/angular/form-window-system/src/lib/open-form.directive.ts","../../../../../packages/angular/form-window-system/src/index.ts","../../../../../packages/angular/form-window-system/src/rxap-form-window-system.ts"],"sourcesContent":["import {\n Directive,\n Inject,\n OnDestroy,\n OnInit,\n OutputRefSubscription,\n} from '@angular/core';\nimport { FormSubmitDirective } from '@rxap/forms';\nimport type { WindowRef } from '@rxap/window-system';\nimport { RXAP_WINDOW_REF } from '@rxap/window-system';\n\n@Directive({\n selector: '[rxapFormSubmit][rxapCloseWindowAfterSubmit]',\n standalone: true,\n})\nexport class CloseWindowAfterSubmitDirective implements OnInit, OnDestroy {\n private _subscription?: OutputRefSubscription;\n\n constructor(\n @Inject(FormSubmitDirective)\n private readonly formSubmit: FormSubmitDirective,\n @Inject(RXAP_WINDOW_REF)\n private readonly windowRef: WindowRef,\n ) {\n }\n\n public ngOnInit() {\n this._subscription = this.formSubmit.afterSubmit.subscribe(() => this.windowRef.complete());\n }\n\n public ngOnDestroy() {\n this._subscription?.unsubscribe();\n }\n}\n\n\n","import {\n Directive,\n Inject,\n OnInit,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n RXAP_WINDOW_REF,\n WindowRef,\n} from '@rxap/window-system';\nimport {\n FormDefinition,\n FormDirective,\n} from '@rxap/forms';\nimport { TemplatePortal } from '@angular/cdk/portal';\n\nexport interface FormWindowFooterTemplateContext<Data = any> {\n $implicit: WindowRef;\n formDirective: FormDirective<Data>;\n formDefinition: FormDefinition<Data>;\n}\n\n@Directive({\n selector: '[rxapFormWindowFooter]',\n standalone: true,\n})\nexport class FormWindowFooterDirective<Data> implements OnInit {\n\n constructor(\n @Inject(FormDirective)\n private readonly formDirective: FormDirective<Data>,\n @Inject(RXAP_WINDOW_REF)\n private readonly windowRef: WindowRef<Data>,\n @Inject(TemplateRef)\n private readonly template: TemplateRef<FormWindowFooterTemplateContext<Data>>,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n ) {\n }\n\n /**\n * Asserts the correct type of the context for the template that `NgForOf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgForOf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard<T>(dir: FormWindowFooterDirective<T>, ctx: any):\n ctx is FormWindowFooterTemplateContext<T> {\n return true;\n }\n\n public ngOnInit() {\n this.windowRef.setFooterPortal(new TemplatePortal<FormWindowFooterTemplateContext<Data>>(\n this.template,\n this.viewContainerRef,\n {\n $implicit: this.windowRef,\n formDefinition: this.formDirective.formDefinition,\n formDirective: this.formDirective,\n },\n ));\n }\n\n}\n\n\n","import { FormDefinition } from '@rxap/forms';\nimport { WindowRef } from '@rxap/window-system';\nimport { Inject } from '@angular/core';\n\n/**\n * @deprecated removed\n */\nexport class FormWindowRef<Data = any> {\n constructor(\n public readonly formDefinition: FormDefinition,\n @Inject(WindowRef)\n public readonly windowRef: WindowRef,\n ) {\n }\n\n public submit() {\n throw new Error('Not yet implemented!');\n }\n\n public reset() {\n throw new Error('Not yet implemented!');\n }\n\n public close(result?: any) {\n this.windowRef.close(result);\n }\n}\n","import {\n Inject,\n Injectable,\n INJECTOR,\n Injector,\n Optional,\n StaticProvider\n} from '@angular/core';\nimport { FormSystemMetadataKeys } from '@rxap/form-system';\nimport {\n FormDefinition,\n FormLoadMethod,\n FormSubmitMethod,\n FormSubmitSuccessfulMethod,\n FormType,\n RXAP_FORM_CONTEXT,\n RXAP_FORM_DEFINITION,\n RXAP_FORM_DEFINITION_BUILDER,\n RXAP_FORM_INITIAL_STATE,\n RXAP_FORM_LOAD_METHOD,\n RXAP_FORM_SUBMIT_METHOD,\n RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,\n RxapFormBuilder,\n} from '@rxap/forms';\nimport { getMetadata } from '@rxap/reflect-metadata';\nimport {\n Constructor,\n DeleteUndefinedProperties,\n} from '@rxap/utilities';\nimport {\n WindowConfig,\n WindowRef,\n WindowService,\n} from '@rxap/window-system';\n\nexport interface FormWindowOptions<FormData, D = any, T = any>\n extends WindowConfig<D, T> {\n initial?: Partial<FormData>;\n submitMethod?: FormSubmitMethod<FormData>;\n submitSuccessfulMethod?: FormSubmitSuccessfulMethod;\n providers?: StaticProvider[];\n resetLoad?: boolean;\n resetSubmit?: boolean;\n loadMethod?: FormLoadMethod<FormData>;\n /**\n * Stores the context of the form window.\n * Can be used to transfer the id or uuid of the\n * document the is currently edited\n */\n context?: any;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormWindowService {\n constructor(\n @Inject(WindowService)\n private readonly windowService: WindowService,\n @Inject(INJECTOR)\n private readonly injector: Injector,\n ) {\n }\n\n public open<FormData>(\n formDefinitionConstructor: Constructor<FormType<any>>,\n options?: FormWindowOptions<FormData>,\n ): WindowRef<FormDefinition, FormData> {\n function FormDefinitionFactory(\n formBuilder: RxapFormBuilder,\n initial?: any,\n ): FormDefinition {\n return formBuilder.build(initial);\n }\n\n function FormDefinitionBuilderFactory(\n _injector: Injector,\n ): RxapFormBuilder {\n return new RxapFormBuilder(formDefinitionConstructor, _injector);\n }\n\n const providers: StaticProvider[] = options?.providers ?? [];\n\n if ((options?.injector ?? this.injector).get(formDefinitionConstructor, null, { optional: true })) {\n providers.push(\n {\n provide: RXAP_FORM_DEFINITION_BUILDER,\n useFactory: FormDefinitionBuilderFactory,\n deps: [ INJECTOR ],\n },\n {\n provide: RXAP_FORM_DEFINITION,\n useFactory: FormDefinitionFactory,\n deps: [\n RXAP_FORM_DEFINITION_BUILDER,\n [ new Optional(), RXAP_FORM_INITIAL_STATE ],\n ],\n },\n );\n }\n\n if (options) {\n if (options.initial) {\n providers.push({\n provide: RXAP_FORM_INITIAL_STATE,\n useValue: options.initial,\n });\n }\n if (options.submitMethod) {\n providers.push({\n provide: RXAP_FORM_SUBMIT_METHOD,\n useValue: options.submitMethod,\n });\n }\n if (options.submitSuccessfulMethod) {\n providers.push({\n provide: RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,\n useValue: options.submitSuccessfulMethod,\n });\n }\n if (options.resetSubmit) {\n providers.push({\n provide: RXAP_FORM_SUBMIT_METHOD,\n useValue: null,\n });\n }\n if (options.resetLoad && !options.loadMethod) {\n providers.push({\n provide: RXAP_FORM_LOAD_METHOD,\n useValue: null,\n });\n }\n if (options.loadMethod) {\n providers.push({\n provide: RXAP_FORM_LOAD_METHOD,\n useValue: options.loadMethod,\n });\n }\n if (options.context) {\n providers.push({\n provide: RXAP_FORM_CONTEXT,\n useValue: options.context,\n });\n }\n }\n\n const injector = Injector.create({\n parent: options?.injector ?? this.injector,\n providers,\n name: options?.injectorName ?? 'FormWindowService',\n });\n\n const component =\n options?.component ??\n this.extractFormComponent(formDefinitionConstructor);\n\n let windowConfig: WindowConfig<any, any> = {\n component,\n injector,\n };\n\n if (options) {\n windowConfig = Object.assign(\n DeleteUndefinedProperties(options),\n windowConfig,\n );\n }\n\n return this.windowService.open(windowConfig);\n }\n\n private extractFormComponent(\n formDefinitionConstructor: Constructor<FormType<any>>,\n ): Constructor {\n const component =\n getMetadata<Constructor>(\n FormSystemMetadataKeys.FORM_COMPONENT,\n formDefinitionConstructor,\n ) ?? null;\n\n if (!component) {\n throw new Error('Could not extract form component constructor');\n }\n\n return component;\n }\n}\n","import {\n Directive,\n EventEmitter,\n HostListener,\n Inject,\n Injector,\n INJECTOR,\n Input,\n OnDestroy,\n Optional,\n Output,\n StaticProvider,\n} from '@angular/core';\nimport { coerceBoolean } from '@rxap/utilities';\nimport { WindowRef } from '@rxap/window-system';\nimport { FormDefinition } from '@rxap/forms';\nimport { CounterSubject } from '@rxap/rxjs';\nimport { Method } from '@rxap/pattern';\n\n@Directive({\n selector: '[rxapOpenFormWindowMethod]',\n standalone: true,\n})\nexport class OpenFormWindowMethodDirective<\n FormData extends Record<string, any> = Record<string, any>,\n Initial extends Partial<Record<string, any>> = Partial<Record<string, any>>>\n implements OnDestroy {\n\n @Input('rxapOpenFormWindowMethod')\n public method!: Method<WindowRef<FormDefinition, FormData>, Initial>;\n\n @Input()\n public initial?: Initial;\n\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('failure')\n public failure$ = new EventEmitter<Error>();\n\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('completed')\n public completed$ = new EventEmitter();\n\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('submitted')\n public submitted$ = new EventEmitter<FormData>();\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new CounterSubject(0);\n @Input()\n public providers?: StaticProvider[];\n /**\n * Set of all active window ref instances.\n *\n * Used to distory all windows of the directive is\n * destroyed\n * @protected\n */\n protected _windowRefInstance = new Set<WindowRef<FormDefinition, FormData>>();\n\n constructor(\n @Optional()\n @Inject(INJECTOR)\n private readonly injector: Injector | null = null,\n ) {\n }\n\n private _hasConfirmDirective = false;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('rxapConfirm')\n public set hasConfirmDirective(value: any) {\n this._hasConfirmDirective = coerceBoolean(value);\n }\n\n public ngOnDestroy() {\n this._windowRefInstance.forEach(windowRef => windowRef.complete());\n }\n\n @HostListener('confirmed')\n public onConfirmed() {\n this.execute();\n }\n\n @HostListener('click')\n public onClick() {\n if (!this._hasConfirmDirective) {\n this.execute();\n } else {\n console.debug('skip remote method call. Wait for confirmation.');\n }\n }\n\n public execute(): void {\n this.executing$.increase();\n\n const windowRef = this.method.call(this.initial, {\n providers: this.providers,\n injector: this.injector,\n }) as WindowRef<FormDefinition, FormData>;\n\n windowRef.subscribe(\n (value) => this.submitted(value),\n (error) => this.failure(error),\n () => {\n this.completed();\n this.executing$.decrease();\n this._windowRefInstance.delete(windowRef);\n },\n );\n }\n\n protected submitted(value: FormData) {\n this.submitted$.emit(value);\n }\n\n protected failure(error: Error): void {\n this.failure$.emit(error);\n }\n\n protected completed(): void {\n this.completed$.emit();\n }\n\n}\n\n\n","import { ComponentType } from '@angular/cdk/portal';\nimport {\n Inject,\n Injectable,\n InjectionToken,\n Injector,\n INJECTOR,\n Optional,\n} from '@angular/core';\nimport {\n FormDefinition,\n FormType,\n} from '@rxap/forms';\nimport { Method } from '@rxap/pattern';\nimport { Constructor } from '@rxap/utilities';\nimport { WindowRef } from '@rxap/window-system';\nimport {\n FormWindowOptions,\n FormWindowService,\n} from './form-window.service';\n\nexport const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR =\n new InjectionToken(\n 'rxap/form-window-system/open-form/definition-constructor',\n );\nexport const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS =\n new InjectionToken('rxap/form-window-system/open-form/default-options');\nexport const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT = new InjectionToken(\n 'rxap/form-window-system/open-form/component',\n);\n\n@Injectable()\nexport class OpenFormWindowMethod<\n FormData extends Record<string, any> = Record<string, any>\n> implements Method<WindowRef<FormDefinition, FormData>, Partial<FormData>> {\n constructor(\n @Inject(FormWindowService)\n private readonly formWindowService: FormWindowService,\n @Inject(RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR)\n private readonly formDefinitionConstructor: Constructor<FormType<FormData>>,\n @Inject(INJECTOR)\n private readonly injector: Injector,\n @Optional()\n @Inject(RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT)\n private readonly formComponent: ComponentType<any> | null = null,\n @Optional()\n @Inject(RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS)\n private readonly defaultOptions: FormWindowOptions<FormData> | null = null,\n ) {\n }\n\n public call(\n initial?: Partial<FormData>,\n options?: Partial<FormWindowOptions<FormData>>,\n ): WindowRef<FormDefinition, FormData> {\n return this.formWindowService.open<FormData>(\n this.formDefinitionConstructor,\n {\n ...(this.defaultOptions ?? {}),\n injector: this.injector,\n ...(options ?? {}),\n initial: initial ?? this.defaultOptions?.initial,\n component:\n this.formComponent ?? this.defaultOptions?.component ?? undefined,\n },\n );\n }\n}\n","import {\n Directive,\n EventEmitter,\n HostBinding,\n Inject,\n InjectionToken,\n Injector,\n INJECTOR,\n Input,\n isDevMode,\n OnDestroy,\n Optional,\n Output,\n} from '@angular/core';\nimport { ConfirmClick } from '@rxap/directives';\nimport {\n FormType,\n ToFormMethod,\n} from '@rxap/forms';\nimport {\n Constructor,\n IconConfig,\n} from '@rxap/utilities';\nimport { WindowRef } from '@rxap/window-system';\nimport { FormWindowService } from './form-window.service';\n\n/**\n * @deprecated\n */\nexport const RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR = new InjectionToken(\n 'rxap/window-form-system/open-form-constructor',\n);\n\n/**\n * @deprecated\n */\n@Directive({\n selector: '[rxapOpenForm]',\n\n host: {\n '(click)': 'onClick()',\n '(confirmed)': 'onConfirm()',\n },\n standalone: true,\n})\nexport class OpenFormDirective<Data, Result = Data>\n extends ConfirmClick\n implements OnDestroy {\n @HostBinding('attr.type')\n @Input()\n public type = 'button';\n\n @Output()\n public submitted = new EventEmitter<Result>();\n @Input()\n public initial?: Partial<Data>;\n @Input()\n public title?: string;\n @Input()\n public icon?: IconConfig;\n @Input()\n public width?: string;\n @Input()\n public height?: string;\n @Input()\n public resizeable?: boolean;\n @Input()\n public draggable?: boolean;\n @Input()\n public panelClass?: string;\n private _formWindowRef?: WindowRef;\n\n constructor(\n @Optional()\n @Inject(RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR)\n formDefinitionConstructor: Constructor<FormType<any>> | null,\n @Inject(FormWindowService)\n private readonly formWindowService: FormWindowService,\n @Inject(INJECTOR)\n private readonly injector: Injector,\n ) {\n super();\n if (formDefinitionConstructor) {\n this._formDefinitionConstructor = formDefinitionConstructor;\n }\n }\n\n private _formDefinitionConstructor!: Constructor<FormType<any>>;\n\n @Input('rxapOpenForm')\n public set formDefinitionConstructor(value: Constructor<FormType<any>> | '') {\n if (value) {\n this._formDefinitionConstructor = value;\n }\n }\n\n @Input()\n public onSubmit(value: Data): any | Promise<any> {\n if (isDevMode()) {\n console.warn('[rxapOpenForm] No \"onSubmit\" method is provided!');\n }\n return value;\n }\n\n public onSubmitSuccessful(result: Result): void {\n this.submitted.emit(result);\n this._formWindowRef?.close();\n }\n\n public ngOnDestroy() {\n this._formWindowRef?.close();\n }\n\n protected execute() {\n this._formWindowRef = this.formWindowService.open(\n this._formDefinitionConstructor,\n {\n injector: this.injector,\n submitSuccessfulMethod: ToFormMethod(\n this.onSubmitSuccessful.bind(this),\n ),\n initial: this.initial,\n injectorName: 'OpenFormDirective',\n title: this.title,\n icon: this.icon,\n width: this.width,\n resizeable: this.resizeable,\n draggable: this.draggable,\n panelClass: this.panelClass,\n },\n );\n }\n}\n\n/**\n * @deprecated\n */\n\n","// region \nexport * from './lib/close-window-after-submit.directive';\nexport * from './lib/form-window-footer.directive';\nexport * from './lib/form-window-ref';\nexport * from './lib/form-window.service';\nexport * from './lib/open-form-window-method.directive';\nexport * from './lib/open-form-window.method';\nexport * from './lib/open-form.directive';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAea,+BAA+B,CAAA;IAG1C,WAAA,CAEmB,UAA+B,EAE/B,SAAoB,EAAA;QAFpB,IAAA,CAAA,UAAU,GAAV,UAAU;QAEV,IAAA,CAAA,SAAS,GAAT,SAAS;IAE5B;IAEO,QAAQ,GAAA;QACb,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IAC7F;IAEO,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,aAAa,EAAE,WAAW,EAAE;IACnC;8GAjBW,+BAA+B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,E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,KAAK;uBAAC,cAAc;;sBAOpB;;;AChGH;AAQA;;ACRA;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-form-window-system.mjs","sources":["../../../../../packages/angular/form-window-system/src/lib/close-window-after-submit.directive.ts","../../../../../packages/angular/form-window-system/src/lib/form-window-footer.directive.ts","../../../../../packages/angular/form-window-system/src/lib/form-window-ref.ts","../../../../../packages/angular/form-window-system/src/lib/form-window.service.ts","../../../../../packages/angular/form-window-system/src/lib/open-form-window-method.directive.ts","../../../../../packages/angular/form-window-system/src/lib/open-form-window.method.ts","../../../../../packages/angular/form-window-system/src/lib/open-form.directive.ts","../../../../../packages/angular/form-window-system/src/index.ts","../../../../../packages/angular/form-window-system/src/rxap-form-window-system.ts"],"sourcesContent":["import { Directive, OnDestroy, OnInit, OutputRefSubscription, inject } from '@angular/core';\nimport { FormSubmitDirective } from '@rxap/forms';\nimport type { WindowRef } from '@rxap/window-system';\nimport { RXAP_WINDOW_REF } from '@rxap/window-system';\n\n@Directive({\n selector: '[rxapFormSubmit][rxapCloseWindowAfterSubmit]',\n standalone: true,\n})\nexport class CloseWindowAfterSubmitDirective implements OnInit, OnDestroy {\n private readonly formSubmit = inject<FormSubmitDirective>(FormSubmitDirective);\n private readonly windowRef = inject<WindowRef>(RXAP_WINDOW_REF);\n\n private _subscription?: OutputRefSubscription;\n\n public ngOnInit() {\n this._subscription = this.formSubmit.afterSubmit.subscribe(() => this.windowRef.complete());\n }\n\n public ngOnDestroy() {\n this._subscription?.unsubscribe();\n }\n}\n\n\n","import { Directive, OnInit, TemplateRef, ViewContainerRef, inject } from '@angular/core';\nimport {\n RXAP_WINDOW_REF,\n WindowRef,\n} from '@rxap/window-system';\nimport {\n FormDefinition,\n FormDirective,\n} from '@rxap/forms';\nimport { TemplatePortal } from '@angular/cdk/portal';\n\nexport interface FormWindowFooterTemplateContext<Data = any> {\n $implicit: WindowRef;\n formDirective: FormDirective<Data>;\n formDefinition: FormDefinition<Data>;\n}\n\n@Directive({\n selector: '[rxapFormWindowFooter]',\n standalone: true,\n})\nexport class FormWindowFooterDirective<Data> implements OnInit {\n private readonly formDirective = inject<FormDirective<Data>>(FormDirective);\n private readonly windowRef = inject<WindowRef<Data>>(RXAP_WINDOW_REF);\n private readonly template = inject<TemplateRef<FormWindowFooterTemplateContext<Data>>>(TemplateRef);\n private readonly viewContainerRef = inject<ViewContainerRef>(ViewContainerRef);\n\n\n /**\n * Asserts the correct type of the context for the template that `NgForOf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgForOf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard<T>(dir: FormWindowFooterDirective<T>, ctx: any):\n ctx is FormWindowFooterTemplateContext<T> {\n return true;\n }\n\n public ngOnInit() {\n this.windowRef.setFooterPortal(new TemplatePortal<FormWindowFooterTemplateContext<Data>>(\n this.template,\n this.viewContainerRef,\n {\n $implicit: this.windowRef,\n formDefinition: this.formDirective.formDefinition,\n formDirective: this.formDirective,\n },\n ));\n }\n\n}\n\n\n","import { FormDefinition } from '@rxap/forms';\nimport { WindowRef } from '@rxap/window-system';\nimport { Inject } from '@angular/core';\n\n/**\n * @deprecated removed\n */\nexport class FormWindowRef<Data = any> {\n constructor(\n public readonly formDefinition: FormDefinition,\n @Inject(WindowRef)\n public readonly windowRef: WindowRef,\n ) {\n }\n\n public submit() {\n throw new Error('Not yet implemented!');\n }\n\n public reset() {\n throw new Error('Not yet implemented!');\n }\n\n public close(result?: any) {\n this.windowRef.close(result);\n }\n}\n","import { Injectable, INJECTOR, Injector, Optional, StaticProvider, inject } from '@angular/core';\nimport { FormSystemMetadataKeys } from '@rxap/form-system';\nimport {\n FormDefinition,\n FormLoadMethod,\n FormSubmitMethod,\n FormSubmitSuccessfulMethod,\n FormType,\n RXAP_FORM_CONTEXT,\n RXAP_FORM_DEFINITION,\n RXAP_FORM_DEFINITION_BUILDER,\n RXAP_FORM_INITIAL_STATE,\n RXAP_FORM_LOAD_METHOD,\n RXAP_FORM_SUBMIT_METHOD,\n RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,\n RxapFormBuilder,\n} from '@rxap/forms';\nimport { getMetadata } from '@rxap/reflect-metadata';\nimport {\n Constructor,\n DeleteUndefinedProperties,\n} from '@rxap/utilities';\nimport {\n WindowConfig,\n WindowRef,\n WindowService,\n} from '@rxap/window-system';\n\nexport interface FormWindowOptions<FormData, D = any, T = any>\n extends WindowConfig<D, T> {\n initial?: Partial<FormData>;\n submitMethod?: FormSubmitMethod<FormData>;\n submitSuccessfulMethod?: FormSubmitSuccessfulMethod;\n providers?: StaticProvider[];\n resetLoad?: boolean;\n resetSubmit?: boolean;\n loadMethod?: FormLoadMethod<FormData>;\n /**\n * Stores the context of the form window.\n * Can be used to transfer the id or uuid of the\n * document the is currently edited\n */\n context?: any;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormWindowService {\n private readonly windowService = inject<WindowService>(WindowService);\n private readonly injector = inject<Injector>(INJECTOR);\n\n\n public open<FormData>(\n formDefinitionConstructor: Constructor<FormType<any>>,\n options?: FormWindowOptions<FormData>,\n ): WindowRef<FormDefinition, FormData> {\n function FormDefinitionFactory(\n formBuilder: RxapFormBuilder,\n initial?: any,\n ): FormDefinition {\n return formBuilder.build(initial);\n }\n\n function FormDefinitionBuilderFactory(\n _injector: Injector,\n ): RxapFormBuilder {\n return new RxapFormBuilder(formDefinitionConstructor, _injector);\n }\n\n const providers: StaticProvider[] = options?.providers ?? [];\n\n if ((options?.injector ?? this.injector).get(formDefinitionConstructor, null, { optional: true })) {\n providers.push(\n {\n provide: RXAP_FORM_DEFINITION_BUILDER,\n useFactory: FormDefinitionBuilderFactory,\n deps: [ INJECTOR ],\n },\n {\n provide: RXAP_FORM_DEFINITION,\n useFactory: FormDefinitionFactory,\n deps: [\n RXAP_FORM_DEFINITION_BUILDER,\n [ new Optional(), RXAP_FORM_INITIAL_STATE ],\n ],\n },\n );\n }\n\n if (options) {\n if (options.initial) {\n providers.push({\n provide: RXAP_FORM_INITIAL_STATE,\n useValue: options.initial,\n });\n }\n if (options.submitMethod) {\n providers.push({\n provide: RXAP_FORM_SUBMIT_METHOD,\n useValue: options.submitMethod,\n });\n }\n if (options.submitSuccessfulMethod) {\n providers.push({\n provide: RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,\n useValue: options.submitSuccessfulMethod,\n });\n }\n if (options.resetSubmit) {\n providers.push({\n provide: RXAP_FORM_SUBMIT_METHOD,\n useValue: null,\n });\n }\n if (options.resetLoad && !options.loadMethod) {\n providers.push({\n provide: RXAP_FORM_LOAD_METHOD,\n useValue: null,\n });\n }\n if (options.loadMethod) {\n providers.push({\n provide: RXAP_FORM_LOAD_METHOD,\n useValue: options.loadMethod,\n });\n }\n if (options.context) {\n providers.push({\n provide: RXAP_FORM_CONTEXT,\n useValue: options.context,\n });\n }\n }\n\n const injector = Injector.create({\n parent: options?.injector ?? this.injector,\n providers,\n name: options?.injectorName ?? 'FormWindowService',\n });\n\n const component =\n options?.component ??\n this.extractFormComponent(formDefinitionConstructor);\n\n let windowConfig: WindowConfig<any, any> = {\n component,\n injector,\n };\n\n if (options) {\n windowConfig = Object.assign(\n DeleteUndefinedProperties(options),\n windowConfig,\n );\n }\n\n return this.windowService.open(windowConfig);\n }\n\n private extractFormComponent(\n formDefinitionConstructor: Constructor<FormType<any>>,\n ): Constructor {\n const component =\n getMetadata<Constructor>(\n FormSystemMetadataKeys.FORM_COMPONENT,\n formDefinitionConstructor,\n ) ?? null;\n\n if (!component) {\n throw new Error('Could not extract form component constructor');\n }\n\n return component;\n }\n}\n","import { Directive, Injector, INJECTOR, OnDestroy, StaticProvider, input, output, inject } from '@angular/core';\nimport { coerceBoolean } from '@rxap/utilities';\nimport { WindowRef } from '@rxap/window-system';\nimport { FormDefinition } from '@rxap/forms';\nimport { CounterSubject } from '@rxap/rxjs';\nimport { Method } from '@rxap/pattern';\n\n@Directive({\n selector: '[rxapOpenFormWindowMethod]',\n host: {\n '(confirmed)': 'onConfirmed()',\n '(click)': 'onClick()',\n },\n standalone: true,\n})\nexport class OpenFormWindowMethodDirective<\n FormData extends Record<string, any> = Record<string, any>,\n Initial extends Partial<Record<string, any>> = Partial<Record<string, any>>>\n implements OnDestroy {\n private readonly injector = inject<Injector | null>(INJECTOR, { optional: true }) ?? null;\n\n\n public readonly method = input.required<Method<WindowRef<FormDefinition, FormData>, Initial>>({ alias: \"rxapOpenFormWindowMethod\" });\n\n public readonly initial = input<Initial>();\n\n // eslint-disable-next-line @angular-eslint/no-output-rename\n public readonly failure$ = output<Error>({ alias: 'failure' });\n\n // eslint-disable-next-line @angular-eslint/no-output-rename\n public readonly completed$ = output({ alias: 'completed' });\n\n // eslint-disable-next-line @angular-eslint/no-output-rename\n public readonly submitted$ = output<FormData>({ alias: 'submitted' });\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new CounterSubject(0);\n public readonly providers = input<StaticProvider[]>();\n /**\n * Set of all active window ref instances.\n *\n * Used to distory all windows of the directive is\n * destroyed\n * @protected\n */\n protected _windowRefInstance = new Set<WindowRef<FormDefinition, FormData>>();\n\n public readonly hasConfirmDirective = input(false, { alias: 'rxapConfirm', transform: coerceBoolean });\n\n public ngOnDestroy() {\n this._windowRefInstance.forEach(windowRef => windowRef.complete());\n }\n\n public onConfirmed() {\n this.execute();\n }\n\n public onClick() {\n if (!this.hasConfirmDirective()) {\n this.execute();\n } else {\n console.debug('skip remote method call. Wait for confirmation.');\n }\n }\n\n public execute(): void {\n this.executing$.increase();\n\n const windowRef = this.method().call(this.initial(), {\n providers: this.providers(),\n injector: this.injector,\n }) as WindowRef<FormDefinition, FormData>;\n\n windowRef.subscribe(\n (value) => this.submitted(value),\n (error) => this.failure(error),\n () => {\n this.completed();\n this.executing$.decrease();\n this._windowRefInstance.delete(windowRef);\n },\n );\n }\n\n protected submitted(value: FormData) {\n this.submitted$.emit(value);\n }\n\n protected failure(error: Error): void {\n this.failure$.emit(error);\n }\n\n protected completed(): void {\n this.completed$.emit();\n }\n\n}\n\n\n","import { ComponentType } from '@angular/cdk/portal';\nimport { Injectable, InjectionToken, Injector, INJECTOR, inject } from '@angular/core';\nimport {\n FormDefinition,\n FormType,\n} from '@rxap/forms';\nimport { Method } from '@rxap/pattern';\nimport { Constructor } from '@rxap/utilities';\nimport { WindowRef } from '@rxap/window-system';\nimport {\n FormWindowOptions,\n FormWindowService,\n} from './form-window.service';\n\nexport const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR =\n new InjectionToken(\n 'rxap/form-window-system/open-form/definition-constructor',\n );\nexport const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS =\n new InjectionToken('rxap/form-window-system/open-form/default-options');\nexport const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT = new InjectionToken(\n 'rxap/form-window-system/open-form/component',\n);\n\n@Injectable()\nexport class OpenFormWindowMethod<\n FormData extends Record<string, any> = Record<string, any>\n> implements Method<WindowRef<FormDefinition, FormData>, Partial<FormData>> {\n private readonly formWindowService = inject<FormWindowService>(FormWindowService);\n private readonly formDefinitionConstructor = inject<Constructor<FormType<FormData>>>(RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR);\n private readonly injector = inject<Injector>(INJECTOR);\n private readonly formComponent = inject<ComponentType<any> | null>(RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT, { optional: true }) ?? null;\n private readonly defaultOptions = inject<FormWindowOptions<FormData> | null>(RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS, { optional: true }) ?? null;\n\n\n public call(\n initial?: Partial<FormData>,\n options?: Partial<FormWindowOptions<FormData>>,\n ): WindowRef<FormDefinition, FormData> {\n return this.formWindowService.open<FormData>(\n this.formDefinitionConstructor,\n {\n ...(this.defaultOptions ?? {}),\n injector: this.injector,\n ...(options ?? {}),\n initial: initial ?? this.defaultOptions?.initial,\n component:\n this.formComponent ?? this.defaultOptions?.component ?? undefined,\n },\n );\n }\n}\n","import { computed, Directive, InjectionToken, Injector, INJECTOR, isDevMode, OnDestroy, input, output, inject } from '@angular/core';\nimport { ConfirmClick } from '@rxap/directives';\nimport {\n FormType,\n ToFormMethod,\n} from '@rxap/forms';\nimport {\n Constructor,\n IconConfig,\n} from '@rxap/utilities';\nimport { WindowRef } from '@rxap/window-system';\nimport { FormWindowService } from './form-window.service';\n\n/**\n * @deprecated\n */\nexport const RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR = new InjectionToken(\n 'rxap/window-form-system/open-form-constructor',\n);\n\n/**\n * @deprecated\n */\n@Directive({\n selector: '[rxapOpenForm]',\n host: {\n '[attr.type]': 'type()',\n },\n standalone: true,\n})\nexport class OpenFormDirective<Data, Result = Data>\n extends ConfirmClick\n implements OnDestroy {\n private readonly formWindowService = inject<FormWindowService>(FormWindowService);\n private readonly injector = inject<Injector>(INJECTOR);\n\n public readonly type = input('button');\n\n public readonly submitted = output<Result>();\n public readonly initial = input<Partial<Data>>();\n public readonly title = input<string>();\n public readonly icon = input<IconConfig>();\n public readonly width = input<string>();\n public readonly height = input<string>();\n public readonly resizeable = input<boolean>();\n public readonly draggable = input<boolean>();\n public readonly panelClass = input<string>();\n private _formWindowRef?: WindowRef;\n\n private readonly defaultFormDefinitionConstructor = inject<Constructor<FormType<any>> | null>(RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR, { optional: true });\n\n public readonly formDefinitionConstructorInput = input<Constructor<FormType<any>> | ''>('', { alias: 'rxapOpenForm' });\n\n private readonly formDefinitionConstructor = computed(\n () => this.formDefinitionConstructorInput() || this.defaultFormDefinitionConstructor,\n );\n\n public readonly onSubmit = input<(value: Data) => any | Promise<any>>((value: Data) => {\n if (isDevMode()) {\n console.warn('[rxapOpenForm] No \"onSubmit\" method is provided!');\n }\n return value;\n });\n\n public onSubmitSuccessful(result: Result): void {\n this.submitted.emit(result);\n this._formWindowRef?.close();\n }\n\n public ngOnDestroy() {\n this._formWindowRef?.close();\n }\n\n protected execute() {\n this._formWindowRef = this.formWindowService.open(\n this.formDefinitionConstructor()!,\n {\n injector: this.injector,\n submitSuccessfulMethod: ToFormMethod(\n this.onSubmitSuccessful.bind(this),\n ),\n initial: this.initial(),\n injectorName: 'OpenFormDirective',\n title: this.title(),\n icon: this.icon(),\n width: this.width(),\n resizeable: this.resizeable(),\n draggable: this.draggable(),\n panelClass: this.panelClass(),\n },\n );\n }\n}\n\n/**\n * @deprecated\n */\n\n","// region \nexport * from './lib/close-window-after-submit.directive';\nexport * from './lib/form-window-footer.directive';\nexport * from './lib/form-window-ref';\nexport * from './lib/form-window.service';\nexport * from './lib/open-form-window-method.directive';\nexport * from './lib/open-form-window.method';\nexport * from './lib/open-form.directive';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MASa,+BAA+B,CAAA;AAJ5C,IAAA,WAAA,GAAA;AAKmB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAsB,mBAAmB,CAAC;AAC7D,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAY,eAAe,CAAC;AAWhE,IAAA;IAPQ,QAAQ,GAAA;QACb,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IAC7F;IAEO,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,aAAa,EAAE,WAAW,EAAE;IACnC;8GAZW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA/B,+BAA+B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA/B,+BAA+B,EAAA,UAAA,EAAA,CAAA;k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