@rxap/form-window-system 16.0.0-dev.1 → 16.0.0-dev.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +319 -0
- package/LICENSE +621 -27
- package/LICENSE.md +621 -0
- package/README.md +8 -22
- package/esm2022/index.mjs +1 -1
- package/esm2022/lib/form-window-footer.directive.mjs +16 -29
- package/esm2022/lib/form-window-ref.mjs +4 -5
- package/esm2022/lib/form-window.service.mjs +14 -15
- package/esm2022/lib/open-form-window-method.directive.mjs +20 -29
- package/esm2022/lib/open-form-window.method.mjs +7 -8
- package/esm2022/lib/open-form.directive.mjs +25 -46
- package/esm2022/rxap-form-window-system.mjs +1 -1
- package/fesm2022/rxap-form-window-system.mjs +63 -98
- package/fesm2022/rxap-form-window-system.mjs.map +1 -1
- package/lib/form-window-footer.directive.d.ts +3 -8
- package/lib/form-window-ref.d.ts +2 -2
- package/lib/form-window.service.d.ts +2 -2
- package/lib/open-form-window-method.directive.d.ts +7 -11
- package/lib/open-form-window.method.d.ts +2 -2
- package/lib/open-form.directive.d.ts +6 -14
- package/package.json +75 -68
- package/theme.css +1 -0
- package/collection.json +0 -10
- package/migration.json +0 -4
- package/src/schematics/ng-add/index.d.ts +0 -2
- package/src/schematics/ng-add/index.js +0 -8
- package/src/schematics/ng-add/index.js.map +0 -1
- package/src/schematics/ng-add/schema.json +0 -7
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectFlags, INJECTOR, Optional, Injector, Injectable, Inject, InjectionToken, EventEmitter, isDevMode, Directive, HostBinding, Input, Output,
|
|
2
|
+
import { InjectFlags, INJECTOR, Optional, Injector, Injectable, Inject, InjectionToken, EventEmitter, isDevMode, Directive, HostBinding, Input, Output, TemplateRef, ViewContainerRef, HostListener } from '@angular/core';
|
|
3
3
|
import * as i1 from '@rxap/window-system';
|
|
4
4
|
import { WindowService, WindowRef, RXAP_WINDOW_REF } from '@rxap/window-system';
|
|
5
5
|
import * as i1$1 from '@rxap/forms';
|
|
6
6
|
import { RxapFormBuilder, RXAP_FORM_DEFINITION_BUILDER, RXAP_FORM_DEFINITION, RXAP_FORM_INITIAL_STATE, RXAP_FORM_SUBMIT_METHOD, RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD, RXAP_FORM_LOAD_METHOD, RXAP_FORM_CONTEXT, ToFormMethod, FormDirective } from '@rxap/forms';
|
|
7
|
-
import { DeleteUndefinedProperties,
|
|
7
|
+
import { DeleteUndefinedProperties, coerceBoolean } from '@rxap/utilities';
|
|
8
8
|
import { FormSystemMetadataKeys } from '@rxap/form-system';
|
|
9
|
-
import { getMetadata } from '@rxap/
|
|
9
|
+
import { getMetadata } from '@rxap/reflect-metadata';
|
|
10
10
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
11
11
|
import { ConfirmClick } from '@rxap/directives';
|
|
12
12
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
13
|
-
import { CounterSubject } from '@rxap/
|
|
13
|
+
import { CounterSubject } from '@rxap/rxjs';
|
|
14
14
|
|
|
15
15
|
class FormWindowService {
|
|
16
16
|
constructor(windowService, injector) {
|
|
@@ -29,21 +29,21 @@ class FormWindowService {
|
|
|
29
29
|
providers.push({
|
|
30
30
|
provide: RXAP_FORM_DEFINITION_BUILDER,
|
|
31
31
|
useFactory: FormDefinitionBuilderFactory,
|
|
32
|
-
deps: [INJECTOR]
|
|
32
|
+
deps: [INJECTOR],
|
|
33
33
|
}, {
|
|
34
34
|
provide: RXAP_FORM_DEFINITION,
|
|
35
35
|
useFactory: FormDefinitionFactory,
|
|
36
36
|
deps: [
|
|
37
37
|
RXAP_FORM_DEFINITION_BUILDER,
|
|
38
|
-
[new Optional(), RXAP_FORM_INITIAL_STATE]
|
|
39
|
-
]
|
|
38
|
+
[new Optional(), RXAP_FORM_INITIAL_STATE],
|
|
39
|
+
],
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
if (options) {
|
|
43
43
|
if (options.initial) {
|
|
44
44
|
providers.push({
|
|
45
45
|
provide: RXAP_FORM_INITIAL_STATE,
|
|
46
|
-
useValue: options.initial
|
|
46
|
+
useValue: options.initial,
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
if (options.submitMethod) {
|
|
@@ -106,10 +106,10 @@ class FormWindowService {
|
|
|
106
106
|
}
|
|
107
107
|
return component;
|
|
108
108
|
}
|
|
109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
110
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: FormWindowService, deps: [{ token: WindowService }, { token: INJECTOR }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
110
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: FormWindowService, providedIn: 'root' }); }
|
|
111
111
|
}
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: FormWindowService, decorators: [{
|
|
113
113
|
type: Injectable,
|
|
114
114
|
args: [{
|
|
115
115
|
providedIn: 'root',
|
|
@@ -153,11 +153,6 @@ const RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR = new InjectionToken('rxap/w
|
|
|
153
153
|
* @deprecated
|
|
154
154
|
*/
|
|
155
155
|
class OpenFormDirective extends ConfirmClick {
|
|
156
|
-
set formDefinitionConstructor(value) {
|
|
157
|
-
if (value) {
|
|
158
|
-
this._formDefinitionConstructor = value;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
156
|
constructor(formDefinitionConstructor, formWindowService, injector) {
|
|
162
157
|
super();
|
|
163
158
|
this.formWindowService = formWindowService;
|
|
@@ -168,12 +163,24 @@ class OpenFormDirective extends ConfirmClick {
|
|
|
168
163
|
this._formDefinitionConstructor = formDefinitionConstructor;
|
|
169
164
|
}
|
|
170
165
|
}
|
|
166
|
+
set formDefinitionConstructor(value) {
|
|
167
|
+
if (value) {
|
|
168
|
+
this._formDefinitionConstructor = value;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
171
|
onSubmit(value) {
|
|
172
172
|
if (isDevMode()) {
|
|
173
173
|
console.warn('[rxapOpenForm] No "onSubmit" method is provided!');
|
|
174
174
|
}
|
|
175
175
|
return value;
|
|
176
176
|
}
|
|
177
|
+
onSubmitSuccessful(result) {
|
|
178
|
+
this.submitted.emit(result);
|
|
179
|
+
this._formWindowRef?.close();
|
|
180
|
+
}
|
|
181
|
+
ngOnDestroy() {
|
|
182
|
+
this._formWindowRef?.close();
|
|
183
|
+
}
|
|
177
184
|
execute() {
|
|
178
185
|
this._formWindowRef = this.formWindowService.open(this._formDefinitionConstructor, {
|
|
179
186
|
injector: this.injector,
|
|
@@ -188,28 +195,19 @@ class OpenFormDirective extends ConfirmClick {
|
|
|
188
195
|
panelClass: this.panelClass,
|
|
189
196
|
});
|
|
190
197
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
this._formWindowRef?.close();
|
|
194
|
-
}
|
|
195
|
-
ngOnDestroy() {
|
|
196
|
-
this._formWindowRef?.close();
|
|
197
|
-
}
|
|
198
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpenFormDirective, deps: [{ token: RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR, optional: true }, { token: FormWindowService }, { token: INJECTOR }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
199
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: OpenFormDirective, selector: "[rxapOpenForm]", inputs: { type: "type", formDefinitionConstructor: ["rxapOpenForm", "formDefinitionConstructor"], initial: "initial", title: "title", icon: "icon", width: "width", height: "height", resizeable: "resizeable", draggable: "draggable", panelClass: "panelClass", onSubmit: "onSubmit" }, outputs: { submitted: "submitted" }, host: { listeners: { "click": "onClick()", "confirmed": "onConfirm()" }, properties: { "attr.type": "this.type" } }, usesInheritance: true, ngImport: i0 }); }
|
|
198
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OpenFormDirective, deps: [{ token: RXAP_WINDOW_FORM_SYSTEM_OPEN_FORM_CONSTRUCTOR, optional: true }, { token: FormWindowService }, { token: INJECTOR }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
199
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", 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 }); }
|
|
200
200
|
}
|
|
201
|
-
|
|
202
|
-
Required,
|
|
203
|
-
__metadata("design:type", Object)
|
|
204
|
-
], OpenFormDirective.prototype, "_formDefinitionConstructor", void 0);
|
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpenFormDirective, decorators: [{
|
|
201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OpenFormDirective, decorators: [{
|
|
206
202
|
type: Directive,
|
|
207
203
|
args: [{
|
|
208
204
|
selector: '[rxapOpenForm]',
|
|
205
|
+
// eslint-disable-next-line @angular-eslint/no-host-metadata-property
|
|
209
206
|
host: {
|
|
210
207
|
'(click)': 'onClick()',
|
|
211
208
|
'(confirmed)': 'onConfirm()',
|
|
212
209
|
},
|
|
210
|
+
standalone: true,
|
|
213
211
|
}]
|
|
214
212
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
215
213
|
type: Optional
|
|
@@ -229,12 +227,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
|
229
227
|
type: Input
|
|
230
228
|
}], submitted: [{
|
|
231
229
|
type: Output
|
|
232
|
-
}], formDefinitionConstructor: [{
|
|
233
|
-
type: Input,
|
|
234
|
-
args: ['rxapOpenForm']
|
|
235
230
|
}], initial: [{
|
|
236
231
|
type: Input
|
|
237
|
-
}],
|
|
232
|
+
}], title: [{
|
|
238
233
|
type: Input
|
|
239
234
|
}], icon: [{
|
|
240
235
|
type: Input
|
|
@@ -248,26 +243,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
|
248
243
|
type: Input
|
|
249
244
|
}], panelClass: [{
|
|
250
245
|
type: Input
|
|
246
|
+
}], formDefinitionConstructor: [{
|
|
247
|
+
type: Input,
|
|
248
|
+
args: ['rxapOpenForm']
|
|
251
249
|
}], onSubmit: [{
|
|
252
250
|
type: Input
|
|
253
251
|
}] } });
|
|
254
|
-
/**
|
|
255
|
-
* @deprecated
|
|
256
|
-
*/
|
|
257
|
-
class OpenFormDirectiveModule {
|
|
258
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpenFormDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
259
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: OpenFormDirectiveModule, declarations: [OpenFormDirective], exports: [OpenFormDirective] }); }
|
|
260
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpenFormDirectiveModule }); }
|
|
261
|
-
}
|
|
262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpenFormDirectiveModule, decorators: [{
|
|
263
|
-
type: NgModule,
|
|
264
|
-
args: [{
|
|
265
|
-
exports: [OpenFormDirective],
|
|
266
|
-
declarations: [OpenFormDirective],
|
|
267
|
-
}]
|
|
268
|
-
}] });
|
|
269
252
|
|
|
270
253
|
class FormWindowFooterDirective {
|
|
254
|
+
constructor(formDirective, windowRef, template, viewContainerRef) {
|
|
255
|
+
this.formDirective = formDirective;
|
|
256
|
+
this.windowRef = windowRef;
|
|
257
|
+
this.template = template;
|
|
258
|
+
this.viewContainerRef = viewContainerRef;
|
|
259
|
+
}
|
|
271
260
|
/**
|
|
272
261
|
* Asserts the correct type of the context for the template that `NgForOf` will render.
|
|
273
262
|
*
|
|
@@ -277,12 +266,6 @@ class FormWindowFooterDirective {
|
|
|
277
266
|
static ngTemplateContextGuard(dir, ctx) {
|
|
278
267
|
return true;
|
|
279
268
|
}
|
|
280
|
-
constructor(formDirective, windowRef, template, viewContainerRef) {
|
|
281
|
-
this.formDirective = formDirective;
|
|
282
|
-
this.windowRef = windowRef;
|
|
283
|
-
this.template = template;
|
|
284
|
-
this.viewContainerRef = viewContainerRef;
|
|
285
|
-
}
|
|
286
269
|
ngOnInit() {
|
|
287
270
|
this.windowRef.setFooterPortal(new TemplatePortal(this.template, this.viewContainerRef, {
|
|
288
271
|
$implicit: this.windowRef,
|
|
@@ -290,13 +273,14 @@ class FormWindowFooterDirective {
|
|
|
290
273
|
formDirective: this.formDirective,
|
|
291
274
|
}));
|
|
292
275
|
}
|
|
293
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
294
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
276
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: FormWindowFooterDirective, deps: [{ token: FormDirective }, { token: RXAP_WINDOW_REF }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
277
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: FormWindowFooterDirective, isStandalone: true, selector: "[rxapFormWindowFooter]", ngImport: i0 }); }
|
|
295
278
|
}
|
|
296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: FormWindowFooterDirective, decorators: [{
|
|
297
280
|
type: Directive,
|
|
298
281
|
args: [{
|
|
299
|
-
selector: '[rxapFormWindowFooter]'
|
|
282
|
+
selector: '[rxapFormWindowFooter]',
|
|
283
|
+
standalone: true,
|
|
300
284
|
}]
|
|
301
285
|
}], ctorParameters: function () { return [{ type: i1$1.FormDirective, decorators: [{
|
|
302
286
|
type: Inject,
|
|
@@ -311,18 +295,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
|
311
295
|
type: Inject,
|
|
312
296
|
args: [ViewContainerRef]
|
|
313
297
|
}] }]; } });
|
|
314
|
-
class FormWindowFooterDirectiveModule {
|
|
315
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormWindowFooterDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
316
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: FormWindowFooterDirectiveModule, declarations: [FormWindowFooterDirective], exports: [FormWindowFooterDirective] }); }
|
|
317
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormWindowFooterDirectiveModule }); }
|
|
318
|
-
}
|
|
319
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FormWindowFooterDirectiveModule, decorators: [{
|
|
320
|
-
type: NgModule,
|
|
321
|
-
args: [{
|
|
322
|
-
exports: [FormWindowFooterDirective],
|
|
323
|
-
declarations: [FormWindowFooterDirective]
|
|
324
|
-
}]
|
|
325
|
-
}] });
|
|
326
298
|
|
|
327
299
|
const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR = new InjectionToken('rxap/form-window-system/open-form/definition-constructor');
|
|
328
300
|
const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS = new InjectionToken('rxap/form-window-system/open-form/default-options');
|
|
@@ -344,10 +316,10 @@ class OpenFormWindowMethod {
|
|
|
344
316
|
component: this.formComponent ?? this.defaultOptions?.component ?? undefined,
|
|
345
317
|
});
|
|
346
318
|
}
|
|
347
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
348
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
319
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", 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 }); }
|
|
320
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OpenFormWindowMethod }); }
|
|
349
321
|
}
|
|
350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OpenFormWindowMethod, decorators: [{
|
|
351
323
|
type: Injectable
|
|
352
324
|
}], ctorParameters: function () { return [{ type: FormWindowService, decorators: [{
|
|
353
325
|
type: Inject,
|
|
@@ -371,19 +343,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
|
371
343
|
}] }]; } });
|
|
372
344
|
|
|
373
345
|
class OpenFormWindowMethodDirective {
|
|
374
|
-
set hasConfirmDirective(value) {
|
|
375
|
-
this._hasConfirmDirective = coerceBoolean(value);
|
|
376
|
-
}
|
|
377
346
|
constructor(injector = null) {
|
|
378
347
|
this.injector = injector;
|
|
348
|
+
// eslint-disable-next-line @angular-eslint/no-output-rename
|
|
379
349
|
this.failure$ = new EventEmitter();
|
|
350
|
+
// eslint-disable-next-line @angular-eslint/no-output-rename
|
|
380
351
|
this.completed$ = new EventEmitter();
|
|
352
|
+
// eslint-disable-next-line @angular-eslint/no-output-rename
|
|
381
353
|
this.submitted$ = new EventEmitter();
|
|
382
354
|
/**
|
|
383
355
|
* true - a remote method call is in progress
|
|
384
356
|
*/
|
|
385
357
|
this.executing$ = new CounterSubject(0);
|
|
386
|
-
this._hasConfirmDirective = false;
|
|
387
358
|
/**
|
|
388
359
|
* Set of all active window ref instances.
|
|
389
360
|
*
|
|
@@ -392,6 +363,11 @@ class OpenFormWindowMethodDirective {
|
|
|
392
363
|
* @protected
|
|
393
364
|
*/
|
|
394
365
|
this._windowRefInstance = new Set();
|
|
366
|
+
this._hasConfirmDirective = false;
|
|
367
|
+
}
|
|
368
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
369
|
+
set hasConfirmDirective(value) {
|
|
370
|
+
this._hasConfirmDirective = coerceBoolean(value);
|
|
395
371
|
}
|
|
396
372
|
ngOnDestroy() {
|
|
397
373
|
this._windowRefInstance.forEach(windowRef => windowRef.complete());
|
|
@@ -411,7 +387,7 @@ class OpenFormWindowMethodDirective {
|
|
|
411
387
|
this.executing$.increase();
|
|
412
388
|
const windowRef = this.method.call(this.initial, {
|
|
413
389
|
providers: this.providers,
|
|
414
|
-
injector: this.injector
|
|
390
|
+
injector: this.injector,
|
|
415
391
|
});
|
|
416
392
|
windowRef.subscribe((value) => this.submitted(value), (error) => this.failure(error), () => {
|
|
417
393
|
this.completed();
|
|
@@ -428,13 +404,14 @@ class OpenFormWindowMethodDirective {
|
|
|
428
404
|
completed() {
|
|
429
405
|
this.completed$.emit();
|
|
430
406
|
}
|
|
431
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
432
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
407
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OpenFormWindowMethodDirective, deps: [{ token: INJECTOR, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
408
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", 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 }); }
|
|
433
409
|
}
|
|
434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
410
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OpenFormWindowMethodDirective, decorators: [{
|
|
435
411
|
type: Directive,
|
|
436
412
|
args: [{
|
|
437
|
-
selector: '[rxapOpenFormWindowMethod]'
|
|
413
|
+
selector: '[rxapOpenFormWindowMethod]',
|
|
414
|
+
standalone: true,
|
|
438
415
|
}]
|
|
439
416
|
}], ctorParameters: function () { return [{ type: i0.Injector, decorators: [{
|
|
440
417
|
type: Optional
|
|
@@ -455,11 +432,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
|
455
432
|
}], submitted$: [{
|
|
456
433
|
type: Output,
|
|
457
434
|
args: ['submitted']
|
|
435
|
+
}], providers: [{
|
|
436
|
+
type: Input
|
|
458
437
|
}], hasConfirmDirective: [{
|
|
459
438
|
type: Input,
|
|
460
439
|
args: ['rxapConfirm']
|
|
461
|
-
}], providers: [{
|
|
462
|
-
type: Input
|
|
463
440
|
}], onConfirmed: [{
|
|
464
441
|
type: HostListener,
|
|
465
442
|
args: ['confirmed']
|
|
@@ -467,22 +444,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
|
467
444
|
type: HostListener,
|
|
468
445
|
args: ['click']
|
|
469
446
|
}] } });
|
|
470
|
-
class OpenFormWindowMethodDirectiveModule {
|
|
471
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpenFormWindowMethodDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
472
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: OpenFormWindowMethodDirectiveModule, declarations: [OpenFormWindowMethodDirective], exports: [OpenFormWindowMethodDirective] }); }
|
|
473
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpenFormWindowMethodDirectiveModule }); }
|
|
474
|
-
}
|
|
475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OpenFormWindowMethodDirectiveModule, decorators: [{
|
|
476
|
-
type: NgModule,
|
|
477
|
-
args: [{
|
|
478
|
-
exports: [OpenFormWindowMethodDirective],
|
|
479
|
-
declarations: [OpenFormWindowMethodDirective]
|
|
480
|
-
}]
|
|
481
|
-
}] });
|
|
482
447
|
|
|
483
448
|
/**
|
|
484
449
|
* Generated bundle index. Do not edit.
|
|
485
450
|
*/
|
|
486
451
|
|
|
487
|
-
export { FormWindowFooterDirective,
|
|
452
|
+
export { 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 };
|
|
488
453
|
//# sourceMappingURL=rxap-form-window-system.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-form-window-system.mjs","sources":["../../../../libs/form-window-system/src/lib/form-window.service.ts","../../../../libs/form-window-system/src/lib/form-window-ref.ts","../../../../libs/form-window-system/src/lib/open-form.directive.ts","../../../../libs/form-window-system/src/lib/form-window-footer.directive.ts","../../../../libs/form-window-system/src/lib/open-form-window.method.ts","../../../../libs/form-window-system/src/lib/open-form-window-method.directive.ts","../../../../libs/form-window-system/src/rxap-form-window-system.ts"],"sourcesContent":["import {\n Injectable,\n Injector,\n Optional,\n StaticProvider,\n Inject,\n INJECTOR,\n InjectFlags\n} from '@angular/core';\nimport {\n WindowService,\n WindowConfig,\n WindowRef\n} from '@rxap/window-system';\nimport {\n RxapFormBuilder,\n FormDefinition,\n RXAP_FORM_DEFINITION_BUILDER,\n RXAP_FORM_DEFINITION,\n RXAP_FORM_INITIAL_STATE,\n FormSubmitMethod,\n RXAP_FORM_SUBMIT_METHOD,\n RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,\n FormSubmitSuccessfulMethod,\n RXAP_FORM_LOAD_METHOD,\n FormLoadMethod,\n RXAP_FORM_CONTEXT,\n FormType\n} from '@rxap/forms';\nimport {\n Constructor,\n DeleteUndefinedProperties\n} from '@rxap/utilities';\nimport { FormSystemMetadataKeys } from '@rxap/form-system';\nimport { getMetadata } from '@rxap/utilities/reflect-metadata';\n\nexport interface FormWindowOptions<FormData, D = any, T = any>\n extends WindowConfig<D, T> {\n initial?: 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 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, InjectFlags.Optional)) {\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 { 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 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 Directive,\n Inject,\n InjectionToken,\n Output,\n EventEmitter,\n HostBinding,\n Input,\n Injector,\n INJECTOR,\n OnDestroy,\n NgModule,\n Optional,\n isDevMode,\n} from '@angular/core';\nimport { Constructor, Required, IconConfig } from '@rxap/utilities';\nimport { FormDefinition, ToFormMethod, FormType } from '@rxap/forms';\nimport { FormWindowService } from './form-window.service';\nimport { WindowRef } from '@rxap/window-system';\nimport { ConfirmClick } from '@rxap/directives';\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 '(click)': 'onClick()',\n '(confirmed)': 'onConfirm()',\n },\n})\nexport class OpenFormDirective<Data, Result = Data>\n extends ConfirmClick\n implements OnDestroy\n{\n @HostBinding('attr.type')\n @Input()\n public type = 'button';\n\n @Output()\n public submitted = new EventEmitter<Result>();\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 initial?: Data;\n\n private _formWindowRef?: WindowRef;\n\n @Required\n private _formDefinitionConstructor!: Constructor<FormType<any>>;\n\n @Input()\n public title?: string;\n\n @Input()\n public icon?: IconConfig;\n\n @Input()\n public width?: string;\n\n @Input()\n public height?: string;\n\n @Input()\n public resizeable?: boolean;\n\n @Input()\n public draggable?: boolean;\n\n @Input()\n public panelClass?: string;\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 @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 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 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\n/**\n * @deprecated\n */\n@NgModule({\n exports: [OpenFormDirective],\n declarations: [OpenFormDirective],\n})\nexport class OpenFormDirectiveModule {}\n","import {\n Directive,\n NgModule,\n OnInit,\n Inject,\n TemplateRef,\n ViewContainerRef\n} from '@angular/core';\nimport {\n WindowRef,\n RXAP_WINDOW_REF\n} from '@rxap/window-system';\nimport {\n FormDirective,\n FormDefinition\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})\nexport class FormWindowFooterDirective<Data> implements OnInit {\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 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 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@NgModule({\n exports: [ FormWindowFooterDirective ],\n declarations: [ FormWindowFooterDirective ]\n})\nexport class FormWindowFooterDirectiveModule {}\n","import { Constructor } from '@rxap/utilities';\nimport {\n Injectable,\n InjectionToken,\n Inject,\n Optional,\n Injector,\n INJECTOR\n} from '@angular/core';\nimport {\n FormDefinition,\n FormType\n} from '@rxap/forms';\nimport { ComponentType } from '@angular/cdk/portal';\nimport {\n FormWindowService,\n FormWindowOptions\n} from './form-window.service';\nimport { WindowRef } from '@rxap/window-system';\nimport { Method } from '@rxap/utilities/rxjs';\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{\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 public call(\n initial?: 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 HostListener,\n Input,\n NgModule,\n EventEmitter,\n Output,\n OnDestroy,\n StaticProvider,\n Injector,\n Inject,\n INJECTOR,\n Optional\n} from '@angular/core';\nimport { coerceBoolean } from '@rxap/utilities';\nimport { WindowRef } from '@rxap/window-system';\nimport { FormDefinition } from '@rxap/forms';\nimport {\n CounterSubject,\n Method\n} from '@rxap/utilities/rxjs';\n\n@Directive({\n selector: '[rxapOpenFormWindowMethod]'\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 @Output('failure')\n public failure$ = new EventEmitter<Error>();\n\n @Output('completed')\n public completed$ = new EventEmitter();\n\n @Output('submitted')\n public submitted$ = new EventEmitter<FormData>();\n\n @Input('rxapConfirm')\n public set hasConfirmDirective(value: any) {\n this._hasConfirmDirective = coerceBoolean(value);\n }\n\n /**\n * true - a remote method call is in progress\n */\n public executing$ = new CounterSubject(0);\n\n private _hasConfirmDirective = false;\n\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 @Input()\n public providers?: StaticProvider[];\n\n constructor(\n @Optional()\n @Inject(INJECTOR)\n private readonly injector: Injector | null = null\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@NgModule({\n exports: [OpenFormWindowMethodDirective],\n declarations: [OpenFormWindowMethodDirective]\n})\nexport class OpenFormWindowMethodDirectiveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAqDA,MAGa,iBAAiB,CAAA;IAC5B,WAEmB,CAAA,aAA4B,EAE5B,QAAkB,EAAA;QAFlB,IAAa,CAAA,aAAA,GAAb,aAAa,CAAe;QAE5B,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;KACjC;IAEG,IAAI,CACT,yBAAqD,EACrD,OAAqC,EAAA;AAErC,QAAA,SA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CX,MAAM,EAAA,CAAA;sBADZ,KAAK;uBAAC,0BAA0B,CAAA;gBAI1B,OAAO,EAAA,CAAA;sBADb,KAAK;gBAIC,QAAQ,EAAA,CAAA;sBADd,MAAM;uBAAC,SAAS,CAAA;gBAIV,UAAU,EAAA,CAAA;sBADhB,MAAM;uBAAC,WAAW,CAAA;gBAIZ,UAAU,EAAA,CAAA;sBADhB,MAAM;uBAAC,WAAW,CAAA;gBAIR,mBAAmB,EAAA,CAAA;sBAD7B,KAAK;uBAAC,aAAa,CAAA;gBAsBb,SAAS,EAAA,CAAA;sBADf,KAAK;gBAcC,WAAW,EAAA,CAAA;sBADjB,YAAY;uBAAC,WAAW,CAAA;gBAMlB,OAAO,EAAA,CAAA;sBADb,YAAY;uBAAC,OAAO,CAAA;;AA0CvB,MAIa,mCAAmC,CAAA;8GAAnC,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAnC,mCAAmC,EAAA,YAAA,EAAA,CAzGnC,6BAA6B,CAAA,EAAA,OAAA,EAAA,CAA7B,6BAA6B,CAAA,EAAA,CAAA,CAAA,EAAA;+GAyG7B,mCAAmC,EAAA,CAAA,CAAA,EAAA;;2FAAnC,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAJ/C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,6BAA6B,CAAC;oBACxC,YAAY,EAAE,CAAC,6BAA6B,CAAC;AAC9C,iBAAA,CAAA;;;ACjID;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"rxap-form-window-system.mjs","sources":["../../../../../packages/angular/form-window-system/src/lib/form-window.service.ts","../../../../../packages/angular/form-window-system/src/lib/form-window-ref.ts","../../../../../packages/angular/form-window-system/src/lib/open-form.directive.ts","../../../../../packages/angular/form-window-system/src/lib/form-window-footer.directive.ts","../../../../../packages/angular/form-window-system/src/lib/open-form-window.method.ts","../../../../../packages/angular/form-window-system/src/lib/open-form-window-method.directive.ts","../../../../../packages/angular/form-window-system/src/rxap-form-window-system.ts"],"sourcesContent":["import {\n Inject,\n Injectable,\n InjectFlags,\n INJECTOR,\n Injector,\n Optional,\n StaticProvider,\n} from '@angular/core';\nimport {\n WindowConfig,\n WindowRef,\n WindowService,\n} from '@rxap/window-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 {\n Constructor,\n DeleteUndefinedProperties,\n} from '@rxap/utilities';\nimport { FormSystemMetadataKeys } from '@rxap/form-system';\nimport { getMetadata } from '@rxap/reflect-metadata';\n\nexport interface FormWindowOptions<FormData, D = any, T = any>\n extends WindowConfig<D, T> {\n initial?: 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, InjectFlags.Optional)) {\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 { 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 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 {\n Constructor,\n IconConfig,\n Required,\n} from '@rxap/utilities';\nimport {\n FormType,\n ToFormMethod,\n} from '@rxap/forms';\nimport { FormWindowService } from './form-window.service';\nimport { WindowRef } from '@rxap/window-system';\nimport { ConfirmClick } from '@rxap/directives';\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 // eslint-disable-next-line @angular-eslint/no-host-metadata-property\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?: 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","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 { Constructor } from '@rxap/utilities';\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 { ComponentType } from '@angular/cdk/portal';\nimport {\n FormWindowOptions,\n FormWindowService,\n} from './form-window.service';\nimport { WindowRef } from '@rxap/window-system';\nimport { Method } from '@rxap/pattern';\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?: 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 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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;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A,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,SAAA,EAAA,UAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,WAAA,EAAA,eAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAJzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;;0BAuCI,QAAQ;;0BACR,MAAM;2BAAC,QAAQ,CAAA;4CAjCX,MAAM,EAAA,CAAA;sBADZ,KAAK;uBAAC,0BAA0B,CAAA;gBAI1B,OAAO,EAAA,CAAA;sBADb,KAAK;gBAKC,QAAQ,EAAA,CAAA;sBADd,MAAM;uBAAC,SAAS,CAAA;gBAKV,UAAU,EAAA,CAAA;sBADhB,MAAM;uBAAC,WAAW,CAAA;gBAKZ,UAAU,EAAA,CAAA;sBADhB,MAAM;uBAAC,WAAW,CAAA;gBAOZ,SAAS,EAAA,CAAA;sBADf,KAAK;gBAsBK,mBAAmB,EAAA,CAAA;sBAD7B,KAAK;uBAAC,aAAa,CAAA;gBAUb,WAAW,EAAA,CAAA;sBADjB,YAAY;uBAAC,WAAW,CAAA;gBAMlB,OAAO,EAAA,CAAA;sBADb,YAAY;uBAAC,OAAO,CAAA;;;ACpFvB;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { WindowRef } from '@rxap/window-system';
|
|
3
|
-
import {
|
|
3
|
+
import { FormDefinition, FormDirective } from '@rxap/forms';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export interface FormWindowFooterTemplateContext<Data = any> {
|
|
6
6
|
$implicit: WindowRef;
|
|
@@ -12,6 +12,7 @@ export declare class FormWindowFooterDirective<Data> implements OnInit {
|
|
|
12
12
|
private readonly windowRef;
|
|
13
13
|
private readonly template;
|
|
14
14
|
private readonly viewContainerRef;
|
|
15
|
+
constructor(formDirective: FormDirective<Data>, windowRef: WindowRef<Data>, template: TemplateRef<FormWindowFooterTemplateContext<Data>>, viewContainerRef: ViewContainerRef);
|
|
15
16
|
/**
|
|
16
17
|
* Asserts the correct type of the context for the template that `NgForOf` will render.
|
|
17
18
|
*
|
|
@@ -19,13 +20,7 @@ export declare class FormWindowFooterDirective<Data> implements OnInit {
|
|
|
19
20
|
* `NgForOf` structural directive renders its template with a specific context type.
|
|
20
21
|
*/
|
|
21
22
|
static ngTemplateContextGuard<T>(dir: FormWindowFooterDirective<T>, ctx: any): ctx is FormWindowFooterTemplateContext<T>;
|
|
22
|
-
constructor(formDirective: FormDirective<Data>, windowRef: WindowRef<Data>, template: TemplateRef<FormWindowFooterTemplateContext<Data>>, viewContainerRef: ViewContainerRef);
|
|
23
23
|
ngOnInit(): void;
|
|
24
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormWindowFooterDirective<any>, never>;
|
|
25
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FormWindowFooterDirective<any>, "[rxapFormWindowFooter]", never, {}, {}, never, never,
|
|
26
|
-
}
|
|
27
|
-
export declare class FormWindowFooterDirectiveModule {
|
|
28
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormWindowFooterDirectiveModule, never>;
|
|
29
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormWindowFooterDirectiveModule, [typeof FormWindowFooterDirective], never, [typeof FormWindowFooterDirective]>;
|
|
30
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<FormWindowFooterDirectiveModule>;
|
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FormWindowFooterDirective<any>, "[rxapFormWindowFooter]", never, {}, {}, never, never, true, never>;
|
|
31
26
|
}
|
package/lib/form-window-ref.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Injector, StaticProvider } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { FormDefinition, FormSubmitMethod, FormSubmitSuccessfulMethod,
|
|
2
|
+
import { WindowConfig, WindowRef, WindowService } from '@rxap/window-system';
|
|
3
|
+
import { FormDefinition, FormLoadMethod, FormSubmitMethod, FormSubmitSuccessfulMethod, FormType } from '@rxap/forms';
|
|
4
4
|
import { Constructor } from '@rxap/utilities';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export interface FormWindowOptions<FormData, D = any, T = any> extends WindowConfig<D, T> {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { EventEmitter, OnDestroy, StaticProvider
|
|
1
|
+
import { EventEmitter, Injector, OnDestroy, StaticProvider } from '@angular/core';
|
|
2
2
|
import { WindowRef } from '@rxap/window-system';
|
|
3
3
|
import { FormDefinition } from '@rxap/forms';
|
|
4
|
-
import { CounterSubject
|
|
4
|
+
import { CounterSubject } from '@rxap/rxjs';
|
|
5
|
+
import { Method } from '@rxap/pattern';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class OpenFormWindowMethodDirective<FormData extends Record<string, any> = Record<string, any>, Initial extends Partial<Record<string, any>> = Partial<Record<string, any>>> implements OnDestroy {
|
|
7
8
|
private readonly injector;
|
|
@@ -10,12 +11,11 @@ export declare class OpenFormWindowMethodDirective<FormData extends Record<strin
|
|
|
10
11
|
failure$: EventEmitter<Error>;
|
|
11
12
|
completed$: EventEmitter<any>;
|
|
12
13
|
submitted$: EventEmitter<FormData>;
|
|
13
|
-
set hasConfirmDirective(value: any);
|
|
14
14
|
/**
|
|
15
15
|
* true - a remote method call is in progress
|
|
16
16
|
*/
|
|
17
17
|
executing$: CounterSubject;
|
|
18
|
-
|
|
18
|
+
providers?: StaticProvider[];
|
|
19
19
|
/**
|
|
20
20
|
* Set of all active window ref instances.
|
|
21
21
|
*
|
|
@@ -24,8 +24,9 @@ export declare class OpenFormWindowMethodDirective<FormData extends Record<strin
|
|
|
24
24
|
* @protected
|
|
25
25
|
*/
|
|
26
26
|
protected _windowRefInstance: Set<WindowRef<FormDefinition<any, any, any>, FormData>>;
|
|
27
|
-
providers?: StaticProvider[];
|
|
28
27
|
constructor(injector?: Injector | null);
|
|
28
|
+
private _hasConfirmDirective;
|
|
29
|
+
set hasConfirmDirective(value: any);
|
|
29
30
|
ngOnDestroy(): void;
|
|
30
31
|
onConfirmed(): void;
|
|
31
32
|
onClick(): void;
|
|
@@ -34,10 +35,5 @@ export declare class OpenFormWindowMethodDirective<FormData extends Record<strin
|
|
|
34
35
|
protected failure(error: Error): void;
|
|
35
36
|
protected completed(): void;
|
|
36
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<OpenFormWindowMethodDirective<any, any>, [{ optional: true; }]>;
|
|
37
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<OpenFormWindowMethodDirective<any, any>, "[rxapOpenFormWindowMethod]", never, { "method": { "alias": "rxapOpenFormWindowMethod"; "required": false; }; "initial": { "alias": "initial"; "required": false; }; "
|
|
38
|
-
}
|
|
39
|
-
export declare class OpenFormWindowMethodDirectiveModule {
|
|
40
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OpenFormWindowMethodDirectiveModule, never>;
|
|
41
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<OpenFormWindowMethodDirectiveModule, [typeof OpenFormWindowMethodDirective], never, [typeof OpenFormWindowMethodDirective]>;
|
|
42
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<OpenFormWindowMethodDirectiveModule>;
|
|
38
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<OpenFormWindowMethodDirective<any, any>, "[rxapOpenFormWindowMethod]", never, { "method": { "alias": "rxapOpenFormWindowMethod"; "required": false; }; "initial": { "alias": "initial"; "required": false; }; "providers": { "alias": "providers"; "required": false; }; "hasConfirmDirective": { "alias": "rxapConfirm"; "required": false; }; }, { "failure$": "failure"; "completed$": "completed"; "submitted$": "submitted"; }, never, never, true, never>;
|
|
43
39
|
}
|
|
@@ -2,9 +2,9 @@ import { Constructor } from '@rxap/utilities';
|
|
|
2
2
|
import { InjectionToken, Injector } from '@angular/core';
|
|
3
3
|
import { FormDefinition, FormType } from '@rxap/forms';
|
|
4
4
|
import { ComponentType } from '@angular/cdk/portal';
|
|
5
|
-
import {
|
|
5
|
+
import { FormWindowOptions, FormWindowService } from './form-window.service';
|
|
6
6
|
import { WindowRef } from '@rxap/window-system';
|
|
7
|
-
import { Method } from '@rxap/
|
|
7
|
+
import { Method } from '@rxap/pattern';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFINITION_CONSTRUCTOR: InjectionToken<unknown>;
|
|
10
10
|
export declare const RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS: InjectionToken<unknown>;
|