@firestitch/form 18.0.11 → 18.0.13
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/app/components/index.d.ts +0 -2
- package/app/directives/form-template-outlet.directive.d.ts +11 -0
- package/app/directives/form-template.directive.d.ts +5 -5
- package/app/fs-form.module.d.ts +9 -10
- package/esm2022/app/components/index.mjs +1 -3
- package/esm2022/app/directives/form/form.directive.mjs +3 -3
- package/esm2022/app/directives/form-template-outlet.directive.mjs +26 -0
- package/esm2022/app/directives/form-template.directive.mjs +12 -9
- package/esm2022/app/fs-form.module.mjs +11 -10
- package/esm2022/public_api.mjs +3 -2
- package/fesm2022/firestitch-form.mjs +46 -77
- package/fesm2022/firestitch-form.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +2 -1
- package/app/components/form-template/form-template.component.d.ts +0 -13
- package/app/components/form-template/index.d.ts +0 -1
- package/app/components/form-template-outlet/form-template-outlet.component.d.ts +0 -13
- package/app/components/form-template-outlet/index.d.ts +0 -1
- package/esm2022/app/components/form-template/form-template.component.mjs +0 -34
- package/esm2022/app/components/form-template/index.mjs +0 -2
- package/esm2022/app/components/form-template-outlet/form-template-outlet.component.mjs +0 -32
- package/esm2022/app/components/form-template-outlet/index.mjs +0 -2
package/esm2022/public_api.mjs
CHANGED
|
@@ -28,11 +28,12 @@ export { FsFormPhoneDirective } from './app/directives/validators/phone.directiv
|
|
|
28
28
|
export { FsFormRequiredDirective } from './app/directives/validators/required.directive';
|
|
29
29
|
export { FsFormUrlDirective } from './app/directives/validators/url.directive';
|
|
30
30
|
export { FsFormValidateDirective } from './app/directives/validators/validate.directive';
|
|
31
|
+
export { FsFormTemplateOutletDirective } from './app/directives/form-template-outlet.directive';
|
|
31
32
|
// Components
|
|
32
|
-
export { FsFormDialogActionsComponent
|
|
33
|
+
export { FsFormDialogActionsComponent } from './app/components';
|
|
33
34
|
export { FsValidators } from './app/validators/validators';
|
|
34
35
|
export { FormDeactivateGuard } from './app/guards/form-deactivate.guard';
|
|
35
36
|
// Enums
|
|
36
37
|
export { ConfirmResult } from './app/enums/confirm-result';
|
|
37
38
|
export { FormStatus } from './app/enums/form-status';
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFVBQVU7QUFDVixPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFFcEQsV0FBVztBQUNYLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUV2RCxhQUFhO0FBQ2IsT0FBTyxFQUFFLHNCQUFzQixFQUFFLDJCQUEyQixFQUFFLDBCQUEwQixFQUFFLHVCQUF1QixFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDNUksT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFDdEUsT0FBTyxFQUFFLDBCQUEwQixFQUFFLE1BQU0sOENBQThDLENBQUM7QUFDMUYsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sa0RBQWtELENBQUM7QUFDeEYsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBQ3ZFLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDBDQUEwQyxDQUFDO0FBQ25GLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLCtDQUErQyxDQUFDO0FBQ3ZGLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLCtDQUErQyxDQUFDO0FBQ25GLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLGlEQUF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HAvaW50ZXJmYWNlcy9zdWJtaXQtZXZlbnQnO1xuZXhwb3J0IHsgU3VibWl0dGVkRXZlbnQgfSBmcm9tICcuL2FwcC9pbnRlcmZhY2VzL3N1Ym1pdHRlZC1ldmVudCc7XG5cbi8vIEVudW1zXG5leHBvcnQgeyBDb25maXJtUmVzdWx0IH0gZnJvbSAnLi9hcHAvZW51bXMvY29uZmlybS1yZXN1bHQnO1xuZXhwb3J0IHsgRm9ybVN0YXR1cyB9IGZyb20gJy4vYXBwL2VudW1zL2Zvcm0tc3RhdHVzJztcblxuXG4iXX0=
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i2$3 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, ChangeDetectionStrategy, Inject, inject, Injectable, QueryList, Directive, Input, ContentChildren, EventEmitter, Optional, Output, HostBinding, HostListener, ElementRef, ChangeDetectorRef,
|
|
4
|
+
import { Component, ChangeDetectionStrategy, Inject, inject, Injectable, QueryList, Directive, Input, ContentChildren, EventEmitter, Optional, Output, HostBinding, HostListener, ElementRef, ChangeDetectorRef, InjectionToken, Self, ViewContainerRef, Injector, NgModule } from '@angular/core';
|
|
5
5
|
import * as i1$1 from '@angular/forms';
|
|
6
|
-
import { UntypedFormGroup, NgForm,
|
|
6
|
+
import { UntypedFormGroup, NgForm, Validators, NgModel, FormsModule } from '@angular/forms';
|
|
7
7
|
import * as i3 from '@angular/material/button';
|
|
8
8
|
import { MatButton, MatButtonModule } from '@angular/material/button';
|
|
9
9
|
import { ErrorStateMatcher, ShowOnDirtyErrorStateMatcher } from '@angular/material/core';
|
|
@@ -463,7 +463,7 @@ class FsFormDirective extends FsFormBaseDirective {
|
|
|
463
463
|
return this._getFormGroup().activeSubmitButton?.name;
|
|
464
464
|
}
|
|
465
465
|
ngOnInit() {
|
|
466
|
-
this._formGroup?.
|
|
466
|
+
this._formGroup?.registerForm(this);
|
|
467
467
|
if (this.deactivationGuard) {
|
|
468
468
|
this._registerCanDeactivateGuard();
|
|
469
469
|
}
|
|
@@ -503,7 +503,7 @@ class FsFormDirective extends FsFormBaseDirective {
|
|
|
503
503
|
this._registerDirtySubmitButton();
|
|
504
504
|
}
|
|
505
505
|
ngOnDestroy() {
|
|
506
|
-
this._formGroup?.
|
|
506
|
+
this._formGroup?.deregisterForm();
|
|
507
507
|
super.ngOnDestroy();
|
|
508
508
|
this._cleanupCanDeactivate();
|
|
509
509
|
}
|
|
@@ -1227,64 +1227,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
1227
1227
|
type: Input
|
|
1228
1228
|
}] } });
|
|
1229
1229
|
|
|
1230
|
-
class FsFormTemplateComponent {
|
|
1231
|
-
templateRef;
|
|
1232
|
-
formTemplate;
|
|
1233
|
-
models;
|
|
1234
|
-
ngAfterContentInit() {
|
|
1235
|
-
debugger;
|
|
1236
|
-
const x = this.models;
|
|
1237
|
-
this.models.changes.subscribe((x) => {
|
|
1238
|
-
debugger;
|
|
1239
|
-
});
|
|
1240
|
-
}
|
|
1241
|
-
ngOnInit() {
|
|
1242
|
-
debugger;
|
|
1243
|
-
}
|
|
1244
|
-
constructor() { }
|
|
1245
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFormTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1246
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsFormTemplateComponent, selector: "fs-form-template", inputs: { formTemplate: "formTemplate" }, queries: [{ propertyName: "models", predicate: NgModel, descendants: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef1"], descendants: true }], ngImport: i0, template: "<ng-template #templateRef1>\n <ng-content></ng-content>\n</ng-template>", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1247
|
-
}
|
|
1248
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFormTemplateComponent, decorators: [{
|
|
1249
|
-
type: Component,
|
|
1250
|
-
args: [{ selector: 'fs-form-template', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #templateRef1>\n <ng-content></ng-content>\n</ng-template>" }]
|
|
1251
|
-
}], ctorParameters: () => [], propDecorators: { templateRef: [{
|
|
1252
|
-
type: ViewChild,
|
|
1253
|
-
args: ['templateRef1']
|
|
1254
|
-
}], formTemplate: [{
|
|
1255
|
-
type: Input
|
|
1256
|
-
}], models: [{
|
|
1257
|
-
type: ContentChildren,
|
|
1258
|
-
args: [NgModel, { descendants: true }]
|
|
1259
|
-
}] } });
|
|
1260
|
-
|
|
1261
|
-
class FsFormTemplateOutletComponent {
|
|
1262
|
-
formTemplate;
|
|
1263
|
-
models;
|
|
1264
|
-
ngOnChanges(changes) {
|
|
1265
|
-
if (changes.formTemplate?.currentValue) {
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
ngAfterContentInit() {
|
|
1269
|
-
// const x = this.models;
|
|
1270
|
-
// this.models.changes.subscribe((x) => {
|
|
1271
|
-
// debugger;
|
|
1272
|
-
// });
|
|
1273
|
-
}
|
|
1274
|
-
constructor() { }
|
|
1275
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFormTemplateOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1276
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsFormTemplateOutletComponent, selector: "fs-form-template-outlet", inputs: { formTemplate: "formTemplate" }, queries: [{ propertyName: "models", predicate: NgModel, descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n{{formTemplate.templateRef|json}}\n\n<ng-container *ngIf=\"formTemplate\">\n <ng-container [ngTemplateOutlet]=\"formTemplate.templateRef\"></ng-container> \n</ng-container>", dependencies: [{ kind: "directive", type: i2$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2$3.JsonPipe, name: "json" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1277
|
-
}
|
|
1278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFormTemplateOutletComponent, decorators: [{
|
|
1279
|
-
type: Component,
|
|
1280
|
-
args: [{ selector: 'fs-form-template-outlet', changeDetection: ChangeDetectionStrategy.OnPush, template: "\n{{formTemplate.templateRef|json}}\n\n<ng-container *ngIf=\"formTemplate\">\n <ng-container [ngTemplateOutlet]=\"formTemplate.templateRef\"></ng-container> \n</ng-container>" }]
|
|
1281
|
-
}], ctorParameters: () => [], propDecorators: { formTemplate: [{
|
|
1282
|
-
type: Input
|
|
1283
|
-
}], models: [{
|
|
1284
|
-
type: ContentChildren,
|
|
1285
|
-
args: [NgModel, { descendants: true }]
|
|
1286
|
-
}] } });
|
|
1287
|
-
|
|
1288
1230
|
const ERROR_MESSAGES = {
|
|
1289
1231
|
required: 'This field is required',
|
|
1290
1232
|
email: 'This is not a valid email address',
|
|
@@ -2443,20 +2385,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
2443
2385
|
}] } });
|
|
2444
2386
|
|
|
2445
2387
|
class FsFormTemplateDirective {
|
|
2446
|
-
|
|
2447
|
-
|
|
2388
|
+
_projectedControls;
|
|
2389
|
+
_ngForm = inject(NgForm);
|
|
2448
2390
|
ngAfterContentInit() {
|
|
2391
|
+
this._projectedControls.forEach((control) => {
|
|
2392
|
+
this._ngForm.addControl(control);
|
|
2393
|
+
});
|
|
2449
2394
|
}
|
|
2450
2395
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFormTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2451
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: FsFormTemplateDirective, selector: "[fsFormTemplate]",
|
|
2396
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: FsFormTemplateDirective, selector: "[fsFormTemplate],fs-form-template", queries: [{ propertyName: "_projectedControls", predicate: NgModel }], ngImport: i0 });
|
|
2452
2397
|
}
|
|
2453
2398
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFormTemplateDirective, decorators: [{
|
|
2454
2399
|
type: Directive,
|
|
2455
2400
|
args: [{
|
|
2456
|
-
selector: '[fsFormTemplate]',
|
|
2401
|
+
selector: '[fsFormTemplate],fs-form-template',
|
|
2457
2402
|
}]
|
|
2458
|
-
}],
|
|
2459
|
-
type:
|
|
2403
|
+
}], propDecorators: { _projectedControls: [{
|
|
2404
|
+
type: ContentChildren,
|
|
2460
2405
|
args: [NgModel]
|
|
2461
2406
|
}] } });
|
|
2462
2407
|
|
|
@@ -2471,6 +2416,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
2471
2416
|
}]
|
|
2472
2417
|
}] });
|
|
2473
2418
|
|
|
2419
|
+
class FsFormTemplateOutletDirective {
|
|
2420
|
+
template;
|
|
2421
|
+
context = {};
|
|
2422
|
+
_viewContainerRef = inject(ViewContainerRef);
|
|
2423
|
+
_injector = inject(Injector);
|
|
2424
|
+
ngOnInit() {
|
|
2425
|
+
this._viewContainerRef.createEmbeddedView(this.template, this.context, {
|
|
2426
|
+
injector: this._injector,
|
|
2427
|
+
});
|
|
2428
|
+
}
|
|
2429
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFormTemplateOutletDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2430
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: FsFormTemplateOutletDirective, selector: "[fsFormTemplateOutlet]", inputs: { template: "template", context: "context" }, ngImport: i0 });
|
|
2431
|
+
}
|
|
2432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFormTemplateOutletDirective, decorators: [{
|
|
2433
|
+
type: Directive,
|
|
2434
|
+
args: [{
|
|
2435
|
+
selector: '[fsFormTemplateOutlet]',
|
|
2436
|
+
}]
|
|
2437
|
+
}], propDecorators: { template: [{
|
|
2438
|
+
type: Input
|
|
2439
|
+
}], context: [{
|
|
2440
|
+
type: Input
|
|
2441
|
+
}] } });
|
|
2442
|
+
|
|
2474
2443
|
class FsFormModule {
|
|
2475
2444
|
static forRoot() {
|
|
2476
2445
|
/**
|
|
@@ -2512,9 +2481,9 @@ class FsFormModule {
|
|
|
2512
2481
|
FsFormNoFsValidatorsDirective,
|
|
2513
2482
|
FsButtonDirective,
|
|
2514
2483
|
FsSubmitButtonDirective,
|
|
2515
|
-
FsFormTemplateComponent,
|
|
2516
2484
|
FsFormTemplateDirective,
|
|
2517
|
-
|
|
2485
|
+
FsFormTemplateDirective,
|
|
2486
|
+
FsFormTemplateOutletDirective,
|
|
2518
2487
|
FsFormGroupDirective], imports: [CommonModule,
|
|
2519
2488
|
FormsModule,
|
|
2520
2489
|
MatButtonModule,
|
|
@@ -2547,9 +2516,9 @@ class FsFormModule {
|
|
|
2547
2516
|
FsFormNoFsValidatorsDirective,
|
|
2548
2517
|
FsButtonDirective,
|
|
2549
2518
|
FsSubmitButtonDirective,
|
|
2550
|
-
FsFormTemplateComponent,
|
|
2551
2519
|
FsFormTemplateDirective,
|
|
2552
|
-
|
|
2520
|
+
FsFormTemplateDirective,
|
|
2521
|
+
FsFormTemplateOutletDirective,
|
|
2553
2522
|
FsFormGroupDirective] });
|
|
2554
2523
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsFormModule, providers: [
|
|
2555
2524
|
{
|
|
@@ -2602,9 +2571,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
2602
2571
|
FsFormNoFsValidatorsDirective,
|
|
2603
2572
|
FsButtonDirective,
|
|
2604
2573
|
FsSubmitButtonDirective,
|
|
2605
|
-
FsFormTemplateComponent,
|
|
2606
2574
|
FsFormTemplateDirective,
|
|
2607
|
-
|
|
2575
|
+
FsFormTemplateDirective,
|
|
2576
|
+
FsFormTemplateOutletDirective,
|
|
2608
2577
|
FsFormGroupDirective,
|
|
2609
2578
|
],
|
|
2610
2579
|
exports: [
|
|
@@ -2635,9 +2604,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
2635
2604
|
FsFormNoFsValidatorsDirective,
|
|
2636
2605
|
FsButtonDirective,
|
|
2637
2606
|
FsSubmitButtonDirective,
|
|
2638
|
-
FsFormTemplateComponent,
|
|
2639
2607
|
FsFormTemplateDirective,
|
|
2640
|
-
|
|
2608
|
+
FsFormTemplateDirective,
|
|
2609
|
+
FsFormTemplateOutletDirective,
|
|
2641
2610
|
FsFormGroupDirective,
|
|
2642
2611
|
],
|
|
2643
2612
|
providers: [
|
|
@@ -2655,5 +2624,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
2655
2624
|
* Generated bundle index. Do not edit.
|
|
2656
2625
|
*/
|
|
2657
2626
|
|
|
2658
|
-
export { ConfirmResult, FormDeactivateGuard, FormStatus, FsButtonDirective, FsControlDirective, FsForm, FsFormCompareDirective, FsFormDateRangeDirective, FsFormDialogActionsComponent, FsFormDialogCloseDirective, FsFormDirective, FsFormEmailDirective, FsFormEmailsDirective, FsFormFunctionDirective, FsFormGreaterDirective, FsFormGreaterEqualDirective, FsFormGroupDirective, FsFormIntegerDirective, FsFormLesserDirective, FsFormLesserEqualDirective, FsFormMaxDirective, FsFormMaxLengthDirective, FsFormMinDirective, FsFormMinLengthDirective, FsFormModule, FsFormNoFsValidatorsDirective, FsFormNumericDirective, FsFormPatternDirective, FsFormPhoneDirective, FsFormRequiredDirective,
|
|
2627
|
+
export { ConfirmResult, FormDeactivateGuard, FormStatus, FsButtonDirective, FsControlDirective, FsForm, FsFormCompareDirective, FsFormDateRangeDirective, FsFormDialogActionsComponent, FsFormDialogCloseDirective, FsFormDirective, FsFormEmailDirective, FsFormEmailsDirective, FsFormFunctionDirective, FsFormGreaterDirective, FsFormGreaterEqualDirective, FsFormGroupDirective, FsFormIntegerDirective, FsFormLesserDirective, FsFormLesserEqualDirective, FsFormMaxDirective, FsFormMaxLengthDirective, FsFormMinDirective, FsFormMinLengthDirective, FsFormModule, FsFormNoFsValidatorsDirective, FsFormNumericDirective, FsFormPatternDirective, FsFormPhoneDirective, FsFormRequiredDirective, FsFormTemplateDirective, FsFormTemplateOutletDirective, FsFormUrlDirective, FsFormValidateDirective, FsSubmitButtonDirective, FsValidators };
|
|
2659
2628
|
//# sourceMappingURL=firestitch-form.mjs.map
|