@rxap/form-window-system 21.0.1-dev.1 → 22.0.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/compodoc/changelog.html +30 -0
  3. package/compodoc/dependencies.html +11 -11
  4. package/compodoc/js/search/search_index.js +2 -2
  5. package/compodoc/properties.html +1 -1
  6. package/docs/documentation.json +423 -469
  7. package/docs/html/assets/search.js +1 -1
  8. package/docs/html/classes/CloseWindowAfterSubmitDirective.html +3 -3
  9. package/docs/html/classes/FormWindowFooterDirective.html +3 -3
  10. package/docs/html/classes/FormWindowRef.html +3 -3
  11. package/docs/html/classes/FormWindowService.html +2 -2
  12. package/docs/html/classes/OpenFormDirective.html +3 -3
  13. package/docs/html/classes/OpenFormWindowMethod.html +2 -2
  14. package/docs/html/classes/OpenFormWindowMethodDirective.html +4 -4
  15. package/docs/html/index.html +2 -2
  16. package/docs/html/interfaces/FormWindowFooterTemplateContext.html +2 -2
  17. package/docs/html/interfaces/FormWindowOptions.html +3 -4
  18. package/docs/html/modules.html +1 -1
  19. package/docs/html/variables/RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT.html +1 -1
  20. package/docs/html/variables/RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS.html +1 -1
  21. package/docs/html/variables/RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR.html +1 -1
  22. package/docs/html/variables/RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR.html +1 -1
  23. package/docs/markdown/README.md +1 -1
  24. package/docs/markdown/classes/CloseWindowAfterSubmitDirective.md +4 -4
  25. package/docs/markdown/classes/FormWindowFooterDirective.md +4 -4
  26. package/docs/markdown/classes/FormWindowRef.md +8 -8
  27. package/docs/markdown/classes/FormWindowService.md +3 -3
  28. package/docs/markdown/classes/OpenFormDirective.md +20 -20
  29. package/docs/markdown/classes/OpenFormWindowMethod.md +3 -3
  30. package/docs/markdown/classes/OpenFormWindowMethodDirective.md +18 -18
  31. package/docs/markdown/globals.md +2 -2
  32. package/docs/markdown/interfaces/FormWindowFooterTemplateContext.md +5 -5
  33. package/docs/markdown/interfaces/FormWindowOptions.md +31 -43
  34. package/docs/markdown/variables/RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT.md +2 -2
  35. package/docs/markdown/variables/RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS.md +2 -2
  36. package/docs/markdown/variables/RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR.md +2 -2
  37. package/docs/markdown/variables/RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR.md +2 -2
  38. package/docs/wiki/Class.CloseWindowAfterSubmitDirective.md +3 -3
  39. package/docs/wiki/Class.FormWindowFooterDirective.md +3 -3
  40. package/docs/wiki/Class.FormWindowRef.md +7 -7
  41. package/docs/wiki/Class.FormWindowService.md +2 -2
  42. package/docs/wiki/Class.OpenFormDirective.md +19 -19
  43. package/docs/wiki/Class.OpenFormWindowMethod.md +2 -2
  44. package/docs/wiki/Class.OpenFormWindowMethodDirective.md +17 -17
  45. package/docs/wiki/Interface.FormWindowFooterTemplateContext.md +4 -4
  46. package/docs/wiki/Interface.FormWindowOptions.md +30 -42
  47. package/docs/wiki/Variable.RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT.md +1 -1
  48. package/docs/wiki/Variable.RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS.md +1 -1
  49. package/docs/wiki/Variable.RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR.md +1 -1
  50. package/docs/wiki/Variable.RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR.md +1 -1
  51. package/docs/wiki/globals.md +1 -1
  52. package/fesm2022/rxap-form-window-system.mjs +701 -371
  53. package/fesm2022/rxap-form-window-system.mjs.map +1 -1
  54. package/package.json +40 -40
  55. package/types/rxap-form-window-system.d.ts +216 -140
@@ -1,374 +1,704 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, Directive, TemplateRef, ViewContainerRef, Inject, INJECTOR, Optional, Injector, Injectable, input, output, InjectionToken, computed, isDevMode } from '@angular/core';
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';
4
- import { RXAP_WINDOW_REF, WindowRef, WindowService } from '@rxap/window-system';
5
- import { TemplatePortal } from '@angular/cdk/portal';
6
- import { __decorate, __param, __metadata } from 'tslib';
7
- import { FormSystemMetadataKeys } from '@rxap/form-system';
8
- import { getMetadata } from '@rxap/reflect-metadata';
9
- import { DeleteUndefinedProperties, coerceBoolean } from '@rxap/utilities';
10
- import { CounterSubject } from '@rxap/rxjs';
11
- import { ConfirmClick } from '@rxap/directives';
12
-
13
- class CloseWindowAfterSubmitDirective {
14
- constructor() {
15
- this.formSubmit = inject(FormSubmitDirective);
16
- this.windowRef = inject(RXAP_WINDOW_REF);
17
- }
18
- ngOnInit() {
19
- this._subscription = this.formSubmit.afterSubmit.subscribe(() => this.windowRef.complete());
20
- }
21
- ngOnDestroy() {
22
- this._subscription?.unsubscribe();
23
- }
24
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CloseWindowAfterSubmitDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
25
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: CloseWindowAfterSubmitDirective, isStandalone: true, selector: "[rxapFormSubmit][rxapCloseWindowAfterSubmit]", ngImport: i0 }); }
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CloseWindowAfterSubmitDirective, decorators: [{
28
- type: Directive,
29
- args: [{
30
- selector: '[rxapFormSubmit][rxapCloseWindowAfterSubmit]',
31
- standalone: true,
32
- }]
33
- }] });
34
-
35
- class FormWindowFooterDirective {
36
- constructor() {
37
- this.formDirective = inject(FormDirective);
38
- this.windowRef = inject(RXAP_WINDOW_REF);
39
- this.template = inject(TemplateRef);
40
- this.viewContainerRef = inject(ViewContainerRef);
41
- }
42
- /**
43
- * Asserts the correct type of the context for the template that `NgForOf` will render.
44
- *
45
- * The presence of this method is a signal to the Ivy template type-check compiler that the
46
- * `NgForOf` structural directive renders its template with a specific context type.
47
- */
48
- static ngTemplateContextGuard(dir, ctx) {
49
- return true;
50
- }
51
- ngOnInit() {
52
- this.windowRef.setFooterPortal(new TemplatePortal(this.template, this.viewContainerRef, {
53
- $implicit: this.windowRef,
54
- formDefinition: this.formDirective.formDefinition,
55
- formDirective: this.formDirective,
56
- }));
57
- }
58
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormWindowFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
59
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: FormWindowFooterDirective, isStandalone: true, selector: "[rxapFormWindowFooter]", ngImport: i0 }); }
60
- }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormWindowFooterDirective, decorators: [{
62
- type: Directive,
63
- args: [{
64
- selector: '[rxapFormWindowFooter]',
65
- standalone: true,
66
- }]
67
- }] });
68
-
69
- /**
70
- * @deprecated removed
71
- */
1
+ import * as i0 from "@angular/core";
2
+ import { Directive, INJECTOR, Inject, Injectable, InjectionToken, Injector, Optional, TemplateRef, ViewContainerRef, computed, inject, input, isDevMode, output } from "@angular/core";
3
+ import { FormDirective, FormSubmitDirective, RXAP_FORM_CONTEXT, RXAP_FORM_DEFINITION, RXAP_FORM_DEFINITION_BUILDER, RXAP_FORM_INITIAL_STATE, RXAP_FORM_LOAD_METHOD, RXAP_FORM_SUBMIT_METHOD, RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD, RxapFormBuilder, ToFormMethod } from "@rxap/forms";
4
+ import { RXAP_WINDOW_REF, WindowRef, WindowService } from "@rxap/window-system";
5
+ import { TemplatePortal } from "@angular/cdk/portal";
6
+ import { __decorate, __metadata, __param } from "tslib";
7
+ import { FormSystemMetadataKeys } from "@rxap/form-system";
8
+ import { getMetadata } from "@rxap/reflect-metadata";
9
+ import { DeleteUndefinedProperties, coerceBoolean } from "@rxap/utilities";
10
+ import { CounterSubject } from "@rxap/rxjs";
11
+ import { ConfirmClick } from "@rxap/directives";
12
+ var CloseWindowAfterSubmitDirective = class CloseWindowAfterSubmitDirective {
13
+ constructor() {
14
+ this.formSubmit = inject(FormSubmitDirective);
15
+ this.windowRef = inject(RXAP_WINDOW_REF);
16
+ }
17
+ ngOnInit() {
18
+ this._subscription = this.formSubmit.afterSubmit.subscribe(() => this.windowRef.complete());
19
+ }
20
+ ngOnDestroy() {
21
+ this._subscription?.unsubscribe();
22
+ }
23
+ static {
24
+ this.ɵfac = i0.ɵɵngDeclareFactory({
25
+ minVersion: "12.0.0",
26
+ version: "22.3.0",
27
+ ngImport: i0,
28
+ type: CloseWindowAfterSubmitDirective,
29
+ deps: [],
30
+ target: i0.ɵɵFactoryTarget.Directive
31
+ });
32
+ }
33
+ static {
34
+ this.ɵdir = i0.ɵɵngDeclareDirective({
35
+ minVersion: "14.0.0",
36
+ version: "22.3.0",
37
+ type: CloseWindowAfterSubmitDirective,
38
+ isStandalone: true,
39
+ selector: "[rxapFormSubmit][rxapCloseWindowAfterSubmit]",
40
+ ngImport: i0
41
+ });
42
+ }
43
+ };
44
+ i0.ɵɵngDeclareClassMetadata({
45
+ minVersion: "12.0.0",
46
+ version: "22.3.0",
47
+ ngImport: i0,
48
+ type: CloseWindowAfterSubmitDirective,
49
+ decorators: [{
50
+ type: Directive,
51
+ args: [{
52
+ selector: "[rxapFormSubmit][rxapCloseWindowAfterSubmit]",
53
+ standalone: true
54
+ }]
55
+ }]
56
+ });
57
+ var FormWindowFooterDirective = class FormWindowFooterDirective {
58
+ constructor() {
59
+ this.formDirective = inject(FormDirective);
60
+ this.windowRef = inject(RXAP_WINDOW_REF);
61
+ this.template = inject(TemplateRef);
62
+ this.viewContainerRef = inject(ViewContainerRef);
63
+ }
64
+ static ngTemplateContextGuard(dir, ctx) {
65
+ return true;
66
+ }
67
+ ngOnInit() {
68
+ this.windowRef.setFooterPortal(new TemplatePortal(this.template, this.viewContainerRef, {
69
+ $implicit: this.windowRef,
70
+ formDefinition: this.formDirective.formDefinition,
71
+ formDirective: this.formDirective
72
+ }));
73
+ }
74
+ static {
75
+ this.ɵfac = i0.ɵɵngDeclareFactory({
76
+ minVersion: "12.0.0",
77
+ version: "22.3.0",
78
+ ngImport: i0,
79
+ type: FormWindowFooterDirective,
80
+ deps: [],
81
+ target: i0.ɵɵFactoryTarget.Directive
82
+ });
83
+ }
84
+ static {
85
+ this.ɵdir = i0.ɵɵngDeclareDirective({
86
+ minVersion: "14.0.0",
87
+ version: "22.3.0",
88
+ type: FormWindowFooterDirective,
89
+ isStandalone: true,
90
+ selector: "[rxapFormWindowFooter]",
91
+ ngImport: i0
92
+ });
93
+ }
94
+ };
95
+ i0.ɵɵngDeclareClassMetadata({
96
+ minVersion: "12.0.0",
97
+ version: "22.3.0",
98
+ ngImport: i0,
99
+ type: FormWindowFooterDirective,
100
+ decorators: [{
101
+ type: Directive,
102
+ args: [{
103
+ selector: "[rxapFormWindowFooter]",
104
+ standalone: true
105
+ }]
106
+ }]
107
+ });
72
108
  let FormWindowRef = class FormWindowRef {
73
- constructor(formDefinition, windowRef) {
74
- this.formDefinition = formDefinition;
75
- this.windowRef = windowRef;
76
- }
77
- submit() {
78
- throw new Error('Not yet implemented!');
79
- }
80
- reset() {
81
- throw new Error('Not yet implemented!');
82
- }
83
- close(result) {
84
- this.windowRef.close(result);
85
- }
109
+ constructor(formDefinition, windowRef) {
110
+ this.formDefinition = formDefinition;
111
+ this.windowRef = windowRef;
112
+ }
113
+ submit() {
114
+ throw new Error("Not yet implemented!");
115
+ }
116
+ reset() {
117
+ throw new Error("Not yet implemented!");
118
+ }
119
+ close(result) {
120
+ this.windowRef.close(result);
121
+ }
86
122
  };
87
- FormWindowRef = __decorate([
88
- __param(1, Inject(WindowRef)),
89
- __metadata("design:paramtypes", [Object, WindowRef])
90
- ], FormWindowRef);
91
-
92
- class FormWindowService {
93
- constructor() {
94
- this.windowService = inject(WindowService);
95
- this.injector = inject(INJECTOR);
96
- }
97
- open(formDefinitionConstructor, options) {
98
- function FormDefinitionFactory(formBuilder, initial) {
99
- return formBuilder.build(initial);
100
- }
101
- function FormDefinitionBuilderFactory(_injector) {
102
- return new RxapFormBuilder(formDefinitionConstructor, _injector);
103
- }
104
- const providers = options?.providers ?? [];
105
- if ((options?.injector ?? this.injector).get(formDefinitionConstructor, null, { optional: true })) {
106
- providers.push({
107
- provide: RXAP_FORM_DEFINITION_BUILDER,
108
- useFactory: FormDefinitionBuilderFactory,
109
- deps: [INJECTOR],
110
- }, {
111
- provide: RXAP_FORM_DEFINITION,
112
- useFactory: FormDefinitionFactory,
113
- deps: [
114
- RXAP_FORM_DEFINITION_BUILDER,
115
- [new Optional(), RXAP_FORM_INITIAL_STATE],
116
- ],
117
- });
118
- }
119
- if (options) {
120
- if (options.initial) {
121
- providers.push({
122
- provide: RXAP_FORM_INITIAL_STATE,
123
- useValue: options.initial,
124
- });
125
- }
126
- if (options.submitMethod) {
127
- providers.push({
128
- provide: RXAP_FORM_SUBMIT_METHOD,
129
- useValue: options.submitMethod,
130
- });
131
- }
132
- if (options.submitSuccessfulMethod) {
133
- providers.push({
134
- provide: RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,
135
- useValue: options.submitSuccessfulMethod,
136
- });
137
- }
138
- if (options.resetSubmit) {
139
- providers.push({
140
- provide: RXAP_FORM_SUBMIT_METHOD,
141
- useValue: null,
142
- });
143
- }
144
- if (options.resetLoad && !options.loadMethod) {
145
- providers.push({
146
- provide: RXAP_FORM_LOAD_METHOD,
147
- useValue: null,
148
- });
149
- }
150
- if (options.loadMethod) {
151
- providers.push({
152
- provide: RXAP_FORM_LOAD_METHOD,
153
- useValue: options.loadMethod,
154
- });
155
- }
156
- if (options.context) {
157
- providers.push({
158
- provide: RXAP_FORM_CONTEXT,
159
- useValue: options.context,
160
- });
161
- }
162
- }
163
- const injector = Injector.create({
164
- parent: options?.injector ?? this.injector,
165
- providers,
166
- name: options?.injectorName ?? 'FormWindowService',
167
- });
168
- const component = options?.component ??
169
- this.extractFormComponent(formDefinitionConstructor);
170
- let windowConfig = {
171
- component,
172
- injector,
173
- };
174
- if (options) {
175
- windowConfig = Object.assign(DeleteUndefinedProperties(options), windowConfig);
176
- }
177
- return this.windowService.open(windowConfig);
178
- }
179
- extractFormComponent(formDefinitionConstructor) {
180
- const component = getMetadata(FormSystemMetadataKeys.FORM_COMPONENT, formDefinitionConstructor) ?? null;
181
- if (!component) {
182
- throw new Error('Could not extract form component constructor');
183
- }
184
- return component;
185
- }
186
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormWindowService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
187
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormWindowService, providedIn: 'root' }); }
188
- }
189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormWindowService, decorators: [{
190
- type: Injectable,
191
- args: [{
192
- providedIn: 'root',
193
- }]
194
- }] });
195
-
196
- class OpenFormWindowMethodDirective {
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 */ []));
201
- // eslint-disable-next-line @angular-eslint/no-output-rename
202
- this.failure$ = output({ alias: 'failure' });
203
- // eslint-disable-next-line @angular-eslint/no-output-rename
204
- this.completed$ = output({ alias: 'completed' });
205
- // eslint-disable-next-line @angular-eslint/no-output-rename
206
- this.submitted$ = output({ alias: 'submitted' });
207
- /**
208
- * true - a remote method call is in progress
209
- */
210
- this.executing$ = new CounterSubject(0);
211
- this.providers = input(...(ngDevMode ? [undefined, { debugName: "providers" }] : /* istanbul ignore next */ []));
212
- /**
213
- * Set of all active window ref instances.
214
- *
215
- * Used to distory all windows of the directive is
216
- * destroyed
217
- * @protected
218
- */
219
- this._windowRefInstance = new Set();
220
- this.hasConfirmDirective = input(false, { ...(ngDevMode ? { debugName: "hasConfirmDirective" } : /* istanbul ignore next */ {}), alias: 'rxapConfirm', transform: coerceBoolean });
221
- }
222
- ngOnDestroy() {
223
- this._windowRefInstance.forEach(windowRef => windowRef.complete());
224
- }
225
- onConfirmed() {
226
- this.execute();
227
- }
228
- onClick() {
229
- if (!this.hasConfirmDirective()) {
230
- this.execute();
231
- }
232
- else {
233
- console.debug('skip remote method call. Wait for confirmation.');
234
- }
235
- }
236
- execute() {
237
- this.executing$.increase();
238
- const windowRef = this.method().call(this.initial(), {
239
- providers: this.providers(),
240
- injector: this.injector,
241
- });
242
- windowRef.subscribe((value) => this.submitted(value), (error) => this.failure(error), () => {
243
- this.completed();
244
- this.executing$.decrease();
245
- this._windowRefInstance.delete(windowRef);
246
- });
247
- }
248
- submitted(value) {
249
- this.submitted$.emit(value);
250
- }
251
- failure(error) {
252
- this.failure$.emit(error);
253
- }
254
- completed() {
255
- this.completed$.emit();
256
- }
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 }); }
259
- }
260
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormWindowMethodDirective, decorators: [{
261
- type: Directive,
262
- args: [{
263
- selector: '[rxapOpenFormWindowMethod]',
264
- host: {
265
- '(confirmed)': 'onConfirmed()',
266
- '(click)': 'onClick()',
267
- },
268
- standalone: true,
269
- }]
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 }] }] } });
271
-
272
- const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR = new InjectionToken('rxap/form-window-system/open-form/definition-constructor');
273
- const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS = new InjectionToken('rxap/form-window-system/open-form/default-options');
274
- const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT = new InjectionToken('rxap/form-window-system/open-form/component');
275
- class OpenFormWindowMethod {
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;
282
- }
283
- call(initial, options) {
284
- return this.formWindowService.open(this.formDefinitionConstructor, {
285
- ...(this.defaultOptions ?? {}),
286
- injector: this.injector,
287
- ...(options ?? {}),
288
- initial: initial ?? this.defaultOptions?.initial,
289
- component: this.formComponent ?? this.defaultOptions?.component ?? undefined,
290
- });
291
- }
292
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormWindowMethod, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
293
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormWindowMethod }); }
294
- }
295
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormWindowMethod, decorators: [{
296
- type: Injectable
297
- }] });
298
-
299
- /**
300
- * @deprecated
301
- */
302
- const RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR = new InjectionToken('rxap/window-form-system/open-form-constructor');
303
- /**
304
- * @deprecated
305
- */
306
- class OpenFormDirective extends ConfirmClick {
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 */ []));
330
- }
331
- onSubmitSuccessful(result) {
332
- this.submitted.emit(result);
333
- this._formWindowRef?.close();
334
- }
335
- ngOnDestroy() {
336
- this._formWindowRef?.close();
337
- }
338
- execute() {
339
- this._formWindowRef = this.formWindowService.open(this.formDefinitionConstructor(), {
340
- injector: this.injector,
341
- submitSuccessfulMethod: ToFormMethod(this.onSubmitSuccessful.bind(this)),
342
- initial: this.initial(),
343
- injectorName: 'OpenFormDirective',
344
- title: this.title(),
345
- icon: this.icon(),
346
- width: this.width(),
347
- resizeable: this.resizeable(),
348
- draggable: this.draggable(),
349
- panelClass: this.panelClass(),
350
- });
351
- }
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 }); }
354
- }
355
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OpenFormDirective, decorators: [{
356
- type: Directive,
357
- args: [{
358
- selector: '[rxapOpenForm]',
359
- host: {
360
- '[attr.type]': 'type()',
361
- },
362
- standalone: true,
363
- }]
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 }] }] } });
365
-
366
- // region
367
- // endregion
368
-
369
- /**
370
- * Generated bundle index. Do not edit.
371
- */
372
-
123
+ FormWindowRef = __decorate([__param(1, Inject(WindowRef)), __metadata("design:paramtypes", [Object, WindowRef])], FormWindowRef);
124
+ var FormWindowService = class FormWindowService {
125
+ constructor() {
126
+ this.windowService = inject(WindowService);
127
+ this.injector = inject(INJECTOR);
128
+ }
129
+ open(formDefinitionConstructor, options) {
130
+ function FormDefinitionFactory(formBuilder, initial) {
131
+ return formBuilder.build(initial);
132
+ }
133
+ function FormDefinitionBuilderFactory(_injector) {
134
+ return new RxapFormBuilder(formDefinitionConstructor, _injector);
135
+ }
136
+ const providers = options?.providers ?? [];
137
+ if ((options?.injector ?? this.injector).get(formDefinitionConstructor, null, { optional: true })) providers.push({
138
+ provide: RXAP_FORM_DEFINITION_BUILDER,
139
+ useFactory: FormDefinitionBuilderFactory,
140
+ deps: [INJECTOR]
141
+ }, {
142
+ provide: RXAP_FORM_DEFINITION,
143
+ useFactory: FormDefinitionFactory,
144
+ deps: [RXAP_FORM_DEFINITION_BUILDER, [new Optional(), RXAP_FORM_INITIAL_STATE]]
145
+ });
146
+ if (options) {
147
+ if (options.initial) providers.push({
148
+ provide: RXAP_FORM_INITIAL_STATE,
149
+ useValue: options.initial
150
+ });
151
+ if (options.submitMethod) providers.push({
152
+ provide: RXAP_FORM_SUBMIT_METHOD,
153
+ useValue: options.submitMethod
154
+ });
155
+ if (options.submitSuccessfulMethod) providers.push({
156
+ provide: RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,
157
+ useValue: options.submitSuccessfulMethod
158
+ });
159
+ if (options.resetSubmit) providers.push({
160
+ provide: RXAP_FORM_SUBMIT_METHOD,
161
+ useValue: null
162
+ });
163
+ if (options.resetLoad && !options.loadMethod) providers.push({
164
+ provide: RXAP_FORM_LOAD_METHOD,
165
+ useValue: null
166
+ });
167
+ if (options.loadMethod) providers.push({
168
+ provide: RXAP_FORM_LOAD_METHOD,
169
+ useValue: options.loadMethod
170
+ });
171
+ if (options.context) providers.push({
172
+ provide: RXAP_FORM_CONTEXT,
173
+ useValue: options.context
174
+ });
175
+ }
176
+ const injector = Injector.create({
177
+ parent: options?.injector ?? this.injector,
178
+ providers,
179
+ name: options?.injectorName ?? "FormWindowService"
180
+ });
181
+ let windowConfig = {
182
+ component: options?.component ?? this.extractFormComponent(formDefinitionConstructor),
183
+ injector
184
+ };
185
+ if (options) windowConfig = Object.assign(DeleteUndefinedProperties(options), windowConfig);
186
+ return this.windowService.open(windowConfig);
187
+ }
188
+ extractFormComponent(formDefinitionConstructor) {
189
+ const component = getMetadata(FormSystemMetadataKeys.FORM_COMPONENT, formDefinitionConstructor) ?? null;
190
+ if (!component) throw new Error("Could not extract form component constructor");
191
+ return component;
192
+ }
193
+ static {
194
+ this.ɵfac = i0.ɵɵngDeclareFactory({
195
+ minVersion: "12.0.0",
196
+ version: "22.3.0",
197
+ ngImport: i0,
198
+ type: FormWindowService,
199
+ deps: [],
200
+ target: i0.ɵɵFactoryTarget.Injectable
201
+ });
202
+ }
203
+ static {
204
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
205
+ minVersion: "12.0.0",
206
+ version: "22.3.0",
207
+ ngImport: i0,
208
+ type: FormWindowService,
209
+ providedIn: "root"
210
+ });
211
+ }
212
+ };
213
+ i0.ɵɵngDeclareClassMetadata({
214
+ minVersion: "12.0.0",
215
+ version: "22.3.0",
216
+ ngImport: i0,
217
+ type: FormWindowService,
218
+ decorators: [{
219
+ type: Injectable,
220
+ args: [{ providedIn: "root" }]
221
+ }]
222
+ });
223
+ var OpenFormWindowMethodDirective = class OpenFormWindowMethodDirective {
224
+ constructor() {
225
+ this.injector = inject(INJECTOR, { optional: true }) ?? null;
226
+ this.method = input.required({
227
+ ...ngDevMode ? { debugName: "method" } : /* istanbul ignore next */ {},
228
+ alias: "rxapOpenFormWindowMethod"
229
+ });
230
+ this.initial = input(...ngDevMode ? [void 0, { debugName: "initial" }] : /* istanbul ignore next */ []);
231
+ this.failure$ = output({ alias: "failure" });
232
+ this.completed$ = output({ alias: "completed" });
233
+ this.submitted$ = output({ alias: "submitted" });
234
+ this.executing$ = new CounterSubject(0);
235
+ this.providers = input(...ngDevMode ? [void 0, { debugName: "providers" }] : /* istanbul ignore next */ []);
236
+ this._windowRefInstance = /* @__PURE__ */ new Set();
237
+ this.hasConfirmDirective = input(false, {
238
+ ...ngDevMode ? { debugName: "hasConfirmDirective" } : /* istanbul ignore next */ {},
239
+ alias: "rxapConfirm",
240
+ transform: coerceBoolean
241
+ });
242
+ }
243
+ ngOnDestroy() {
244
+ this._windowRefInstance.forEach((windowRef) => windowRef.complete());
245
+ }
246
+ onConfirmed() {
247
+ this.execute();
248
+ }
249
+ onClick() {
250
+ if (!this.hasConfirmDirective()) this.execute();
251
+ else console.debug("skip remote method call. Wait for confirmation.");
252
+ }
253
+ execute() {
254
+ this.executing$.increase();
255
+ const windowRef = this.method().call(this.initial(), {
256
+ providers: this.providers(),
257
+ injector: this.injector
258
+ });
259
+ windowRef.subscribe((value) => this.submitted(value), (error) => this.failure(error), () => {
260
+ this.completed();
261
+ this.executing$.decrease();
262
+ this._windowRefInstance.delete(windowRef);
263
+ });
264
+ }
265
+ submitted(value) {
266
+ this.submitted$.emit(value);
267
+ }
268
+ failure(error) {
269
+ this.failure$.emit(error);
270
+ }
271
+ completed() {
272
+ this.completed$.emit();
273
+ }
274
+ static {
275
+ this.ɵfac = i0.ɵɵngDeclareFactory({
276
+ minVersion: "12.0.0",
277
+ version: "22.3.0",
278
+ ngImport: i0,
279
+ type: OpenFormWindowMethodDirective,
280
+ deps: [],
281
+ target: i0.ɵɵFactoryTarget.Directive
282
+ });
283
+ }
284
+ static {
285
+ this.ɵdir = i0.ɵɵngDeclareDirective({
286
+ minVersion: "17.1.0",
287
+ version: "22.3.0",
288
+ type: OpenFormWindowMethodDirective,
289
+ isStandalone: true,
290
+ selector: "[rxapOpenFormWindowMethod]",
291
+ inputs: {
292
+ method: {
293
+ classPropertyName: "method",
294
+ publicName: "rxapOpenFormWindowMethod",
295
+ isSignal: true,
296
+ isRequired: true,
297
+ transformFunction: null
298
+ },
299
+ initial: {
300
+ classPropertyName: "initial",
301
+ publicName: "initial",
302
+ isSignal: true,
303
+ isRequired: false,
304
+ transformFunction: null
305
+ },
306
+ providers: {
307
+ classPropertyName: "providers",
308
+ publicName: "providers",
309
+ isSignal: true,
310
+ isRequired: false,
311
+ transformFunction: null
312
+ },
313
+ hasConfirmDirective: {
314
+ classPropertyName: "hasConfirmDirective",
315
+ publicName: "rxapConfirm",
316
+ isSignal: true,
317
+ isRequired: false,
318
+ transformFunction: null
319
+ }
320
+ },
321
+ outputs: {
322
+ failure$: "failure",
323
+ completed$: "completed",
324
+ submitted$: "submitted"
325
+ },
326
+ host: { listeners: {
327
+ "confirmed": "onConfirmed()",
328
+ "click": "onClick()"
329
+ } },
330
+ ngImport: i0
331
+ });
332
+ }
333
+ };
334
+ i0.ɵɵngDeclareClassMetadata({
335
+ minVersion: "12.0.0",
336
+ version: "22.3.0",
337
+ ngImport: i0,
338
+ type: OpenFormWindowMethodDirective,
339
+ decorators: [{
340
+ type: Directive,
341
+ args: [{
342
+ selector: "[rxapOpenFormWindowMethod]",
343
+ host: {
344
+ "(confirmed)": "onConfirmed()",
345
+ "(click)": "onClick()"
346
+ },
347
+ standalone: true
348
+ }]
349
+ }],
350
+ propDecorators: {
351
+ method: [{
352
+ type: i0.Input,
353
+ args: [{
354
+ isSignal: true,
355
+ alias: "rxapOpenFormWindowMethod",
356
+ required: true
357
+ }]
358
+ }],
359
+ initial: [{
360
+ type: i0.Input,
361
+ args: [{
362
+ isSignal: true,
363
+ alias: "initial",
364
+ required: false
365
+ }]
366
+ }],
367
+ failure$: [{
368
+ type: i0.Output,
369
+ args: ["failure"]
370
+ }],
371
+ completed$: [{
372
+ type: i0.Output,
373
+ args: ["completed"]
374
+ }],
375
+ submitted$: [{
376
+ type: i0.Output,
377
+ args: ["submitted"]
378
+ }],
379
+ providers: [{
380
+ type: i0.Input,
381
+ args: [{
382
+ isSignal: true,
383
+ alias: "providers",
384
+ required: false
385
+ }]
386
+ }],
387
+ hasConfirmDirective: [{
388
+ type: i0.Input,
389
+ args: [{
390
+ isSignal: true,
391
+ alias: "rxapConfirm",
392
+ required: false
393
+ }]
394
+ }]
395
+ }
396
+ });
397
+ const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR = new InjectionToken("rxap/form-window-system/open-form/definition-constructor");
398
+ const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS = new InjectionToken("rxap/form-window-system/open-form/default-options");
399
+ const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT = new InjectionToken("rxap/form-window-system/open-form/component");
400
+ var OpenFormWindowMethod = class OpenFormWindowMethod {
401
+ constructor() {
402
+ this.formWindowService = inject(FormWindowService);
403
+ this.formDefinitionConstructor = inject(RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR);
404
+ this.injector = inject(INJECTOR);
405
+ this.formComponent = inject(RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT, { optional: true }) ?? null;
406
+ this.defaultOptions = inject(RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS, { optional: true }) ?? null;
407
+ }
408
+ call(initial, options) {
409
+ return this.formWindowService.open(this.formDefinitionConstructor, {
410
+ ...this.defaultOptions ?? {},
411
+ injector: this.injector,
412
+ ...options ?? {},
413
+ initial: initial ?? this.defaultOptions?.initial,
414
+ component: this.formComponent ?? this.defaultOptions?.component ?? void 0
415
+ });
416
+ }
417
+ static {
418
+ this.ɵfac = i0.ɵɵngDeclareFactory({
419
+ minVersion: "12.0.0",
420
+ version: "22.3.0",
421
+ ngImport: i0,
422
+ type: OpenFormWindowMethod,
423
+ deps: [],
424
+ target: i0.ɵɵFactoryTarget.Injectable
425
+ });
426
+ }
427
+ static {
428
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
429
+ minVersion: "12.0.0",
430
+ version: "22.3.0",
431
+ ngImport: i0,
432
+ type: OpenFormWindowMethod
433
+ });
434
+ }
435
+ };
436
+ i0.ɵɵngDeclareClassMetadata({
437
+ minVersion: "12.0.0",
438
+ version: "22.3.0",
439
+ ngImport: i0,
440
+ type: OpenFormWindowMethod,
441
+ decorators: [{ type: Injectable }]
442
+ });
443
+ const RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR = new InjectionToken("rxap/window-form-system/open-form-constructor");
444
+ var OpenFormDirective = class OpenFormDirective extends ConfirmClick {
445
+ constructor() {
446
+ super(...arguments);
447
+ this.formWindowService = inject(FormWindowService);
448
+ this.injector = inject(INJECTOR);
449
+ this.type = input("button", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
450
+ this.submitted = output();
451
+ this.initial = input(...ngDevMode ? [void 0, { debugName: "initial" }] : /* istanbul ignore next */ []);
452
+ this.title = input(...ngDevMode ? [void 0, { debugName: "title" }] : /* istanbul ignore next */ []);
453
+ this.icon = input(...ngDevMode ? [void 0, { debugName: "icon" }] : /* istanbul ignore next */ []);
454
+ this.width = input(...ngDevMode ? [void 0, { debugName: "width" }] : /* istanbul ignore next */ []);
455
+ this.height = input(...ngDevMode ? [void 0, { debugName: "height" }] : /* istanbul ignore next */ []);
456
+ this.resizeable = input(...ngDevMode ? [void 0, { debugName: "resizeable" }] : /* istanbul ignore next */ []);
457
+ this.draggable = input(...ngDevMode ? [void 0, { debugName: "draggable" }] : /* istanbul ignore next */ []);
458
+ this.panelClass = input(...ngDevMode ? [void 0, { debugName: "panelClass" }] : /* istanbul ignore next */ []);
459
+ this.defaultFormDefinitionConstructor = inject(RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR, { optional: true });
460
+ this.formDefinitionConstructorInput = input("", {
461
+ ...ngDevMode ? { debugName: "formDefinitionConstructorInput" } : /* istanbul ignore next */ {},
462
+ alias: "rxapOpenForm"
463
+ });
464
+ this.formDefinitionConstructor = computed(() => this.formDefinitionConstructorInput() || this.defaultFormDefinitionConstructor, ...ngDevMode ? [{ debugName: "formDefinitionConstructor" }] : /* istanbul ignore next */ []);
465
+ this.onSubmit = input((value) => {
466
+ if (isDevMode()) console.warn("[rxapOpenForm] No \"onSubmit\" method is provided!");
467
+ return value;
468
+ }, ...ngDevMode ? [{ debugName: "onSubmit" }] : /* istanbul ignore next */ []);
469
+ }
470
+ onSubmitSuccessful(result) {
471
+ this.submitted.emit(result);
472
+ this._formWindowRef?.close();
473
+ }
474
+ ngOnDestroy() {
475
+ this._formWindowRef?.close();
476
+ }
477
+ execute() {
478
+ this._formWindowRef = this.formWindowService.open(this.formDefinitionConstructor(), {
479
+ injector: this.injector,
480
+ submitSuccessfulMethod: ToFormMethod(this.onSubmitSuccessful.bind(this)),
481
+ initial: this.initial(),
482
+ injectorName: "OpenFormDirective",
483
+ title: this.title(),
484
+ icon: this.icon(),
485
+ width: this.width(),
486
+ resizeable: this.resizeable(),
487
+ draggable: this.draggable(),
488
+ panelClass: this.panelClass()
489
+ });
490
+ }
491
+ static {
492
+ this.ɵfac = i0.ɵɵngDeclareFactory({
493
+ minVersion: "12.0.0",
494
+ version: "22.3.0",
495
+ ngImport: i0,
496
+ type: OpenFormDirective,
497
+ deps: null,
498
+ target: i0.ɵɵFactoryTarget.Directive
499
+ });
500
+ }
501
+ static {
502
+ this.ɵdir = i0.ɵɵngDeclareDirective({
503
+ minVersion: "17.1.0",
504
+ version: "22.3.0",
505
+ type: OpenFormDirective,
506
+ isStandalone: true,
507
+ selector: "[rxapOpenForm]",
508
+ inputs: {
509
+ type: {
510
+ classPropertyName: "type",
511
+ publicName: "type",
512
+ isSignal: true,
513
+ isRequired: false,
514
+ transformFunction: null
515
+ },
516
+ initial: {
517
+ classPropertyName: "initial",
518
+ publicName: "initial",
519
+ isSignal: true,
520
+ isRequired: false,
521
+ transformFunction: null
522
+ },
523
+ title: {
524
+ classPropertyName: "title",
525
+ publicName: "title",
526
+ isSignal: true,
527
+ isRequired: false,
528
+ transformFunction: null
529
+ },
530
+ icon: {
531
+ classPropertyName: "icon",
532
+ publicName: "icon",
533
+ isSignal: true,
534
+ isRequired: false,
535
+ transformFunction: null
536
+ },
537
+ width: {
538
+ classPropertyName: "width",
539
+ publicName: "width",
540
+ isSignal: true,
541
+ isRequired: false,
542
+ transformFunction: null
543
+ },
544
+ height: {
545
+ classPropertyName: "height",
546
+ publicName: "height",
547
+ isSignal: true,
548
+ isRequired: false,
549
+ transformFunction: null
550
+ },
551
+ resizeable: {
552
+ classPropertyName: "resizeable",
553
+ publicName: "resizeable",
554
+ isSignal: true,
555
+ isRequired: false,
556
+ transformFunction: null
557
+ },
558
+ draggable: {
559
+ classPropertyName: "draggable",
560
+ publicName: "draggable",
561
+ isSignal: true,
562
+ isRequired: false,
563
+ transformFunction: null
564
+ },
565
+ panelClass: {
566
+ classPropertyName: "panelClass",
567
+ publicName: "panelClass",
568
+ isSignal: true,
569
+ isRequired: false,
570
+ transformFunction: null
571
+ },
572
+ formDefinitionConstructorInput: {
573
+ classPropertyName: "formDefinitionConstructorInput",
574
+ publicName: "rxapOpenForm",
575
+ isSignal: true,
576
+ isRequired: false,
577
+ transformFunction: null
578
+ },
579
+ onSubmit: {
580
+ classPropertyName: "onSubmit",
581
+ publicName: "onSubmit",
582
+ isSignal: true,
583
+ isRequired: false,
584
+ transformFunction: null
585
+ }
586
+ },
587
+ outputs: { submitted: "submitted" },
588
+ host: { properties: { "attr.type": "type()" } },
589
+ usesInheritance: true,
590
+ ngImport: i0
591
+ });
592
+ }
593
+ };
594
+ i0.ɵɵngDeclareClassMetadata({
595
+ minVersion: "12.0.0",
596
+ version: "22.3.0",
597
+ ngImport: i0,
598
+ type: OpenFormDirective,
599
+ decorators: [{
600
+ type: Directive,
601
+ args: [{
602
+ selector: "[rxapOpenForm]",
603
+ host: { "[attr.type]": "type()" },
604
+ standalone: true
605
+ }]
606
+ }],
607
+ propDecorators: {
608
+ type: [{
609
+ type: i0.Input,
610
+ args: [{
611
+ isSignal: true,
612
+ alias: "type",
613
+ required: false
614
+ }]
615
+ }],
616
+ submitted: [{
617
+ type: i0.Output,
618
+ args: ["submitted"]
619
+ }],
620
+ initial: [{
621
+ type: i0.Input,
622
+ args: [{
623
+ isSignal: true,
624
+ alias: "initial",
625
+ required: false
626
+ }]
627
+ }],
628
+ title: [{
629
+ type: i0.Input,
630
+ args: [{
631
+ isSignal: true,
632
+ alias: "title",
633
+ required: false
634
+ }]
635
+ }],
636
+ icon: [{
637
+ type: i0.Input,
638
+ args: [{
639
+ isSignal: true,
640
+ alias: "icon",
641
+ required: false
642
+ }]
643
+ }],
644
+ width: [{
645
+ type: i0.Input,
646
+ args: [{
647
+ isSignal: true,
648
+ alias: "width",
649
+ required: false
650
+ }]
651
+ }],
652
+ height: [{
653
+ type: i0.Input,
654
+ args: [{
655
+ isSignal: true,
656
+ alias: "height",
657
+ required: false
658
+ }]
659
+ }],
660
+ resizeable: [{
661
+ type: i0.Input,
662
+ args: [{
663
+ isSignal: true,
664
+ alias: "resizeable",
665
+ required: false
666
+ }]
667
+ }],
668
+ draggable: [{
669
+ type: i0.Input,
670
+ args: [{
671
+ isSignal: true,
672
+ alias: "draggable",
673
+ required: false
674
+ }]
675
+ }],
676
+ panelClass: [{
677
+ type: i0.Input,
678
+ args: [{
679
+ isSignal: true,
680
+ alias: "panelClass",
681
+ required: false
682
+ }]
683
+ }],
684
+ formDefinitionConstructorInput: [{
685
+ type: i0.Input,
686
+ args: [{
687
+ isSignal: true,
688
+ alias: "rxapOpenForm",
689
+ required: false
690
+ }]
691
+ }],
692
+ onSubmit: [{
693
+ type: i0.Input,
694
+ args: [{
695
+ isSignal: true,
696
+ alias: "onSubmit",
697
+ required: false
698
+ }]
699
+ }]
700
+ }
701
+ });
373
702
  export { CloseWindowAfterSubmitDirective, FormWindowFooterDirective, FormWindowRef, FormWindowService, OpenFormDirective, OpenFormWindowMethod, OpenFormWindowMethodDirective, RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_COMPONENT, RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS, RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR, RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR };
374
- //# sourceMappingURL=rxap-form-window-system.mjs.map
703
+
704
+ //# sourceMappingURL=rxap-form-window-system.mjs.map