@firestitch/form 12.1.2 → 12.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/components/form-dialog-actions/form-dialog-actions.component.d.ts +1 -1
- package/app/directives/validators/no-fs-validators.directive.d.ts +13 -0
- package/app/fs-form.module.d.ts +6 -5
- package/bundles/firestitch-form.umd.js +56 -3
- package/bundles/firestitch-form.umd.js.map +1 -1
- package/esm2015/app/components/form-dialog-actions/form-dialog-actions.component.js +2 -2
- package/esm2015/app/directives/validators/no-fs-validators.directive.js +47 -0
- package/esm2015/app/fs-form.module.js +8 -3
- package/esm2015/public_api.js +2 -1
- package/fesm2015/firestitch-form.js +51 -4
- package/fesm2015/firestitch-form.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
|
@@ -18,5 +18,5 @@ export declare class FsFormDialogActionsComponent implements OnInit, OnDestroy {
|
|
|
18
18
|
closeClick(): void;
|
|
19
19
|
ngOnDestroy(): void;
|
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsFormDialogActionsComponent, [{ optional: true; }, { optional: true; }, null]>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FsFormDialogActionsComponent, "fs-form-dialog-actions", never, { "save": "save"; "create": "create"; "close": "close"; "closeData": "closeData"; "name": "name"; }, {}, never, ["*"]>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsFormDialogActionsComponent, "fs-form-dialog-actions", never, { "save": "save"; "create": "create"; "close": "close"; "closeData": "closeData"; "name": "name"; }, {}, never, ["*", "*"]>;
|
|
22
22
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OnChanges } from '@angular/core';
|
|
2
|
+
import { FsControlDirective } from './control.directive';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* This directive required for cases when we have custom Control like <fs-phone-field> but without any of our validators applied
|
|
6
|
+
*
|
|
7
|
+
* This directive required for automatic validation messages
|
|
8
|
+
*/
|
|
9
|
+
export declare class FsFormNoFsValidatorsDirective extends FsControlDirective implements OnChanges {
|
|
10
|
+
ngOnChanges(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsFormNoFsValidatorsDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FsFormNoFsValidatorsDirective, "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])", never, {}, {}, never>;
|
|
13
|
+
}
|
package/app/fs-form.module.d.ts
CHANGED
|
@@ -23,13 +23,14 @@ import * as i20 from "./directives/form-dialog-close.directive";
|
|
|
23
23
|
import * as i21 from "./directives/submit-button.directive";
|
|
24
24
|
import * as i22 from "./directives/validators/validate.directive";
|
|
25
25
|
import * as i23 from "./components/form-dialog-actions/form-dialog-actions.component";
|
|
26
|
-
import * as i24 from "
|
|
27
|
-
import * as i25 from "@angular/
|
|
28
|
-
import * as i26 from "@angular/
|
|
29
|
-
import * as i27 from "@angular/material/
|
|
26
|
+
import * as i24 from "./directives/validators/no-fs-validators.directive";
|
|
27
|
+
import * as i25 from "@angular/common";
|
|
28
|
+
import * as i26 from "@angular/forms";
|
|
29
|
+
import * as i27 from "@angular/material/button";
|
|
30
|
+
import * as i28 from "@angular/material/dialog";
|
|
30
31
|
export declare class FsFormModule {
|
|
31
32
|
static forRoot(): ModuleWithProviders<FsFormModule>;
|
|
32
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsFormModule, never>;
|
|
33
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FsFormModule, [typeof i1.FsFormDirective, typeof i2.FsControlDirective, typeof i3.FsFormRequiredDirective, typeof i4.FsFormMinDirective, typeof i5.FsFormMaxDirective, typeof i6.FsFormMinLengthDirective, typeof i7.FsFormMaxLengthDirective, typeof i8.FsFormEmailDirective, typeof i9.FsFormEmailsDirective, typeof i10.FsFormPhoneDirective, typeof i11.FsFormCompareDirective, typeof i12.FsFormIntegerDirective, typeof i13.FsFormNumericDirective, typeof i14.FsFormPatternDirective, typeof i15.FsFormFunctionDirective, typeof i16.FsFormDateRangeDirective, typeof i17.FsFormGreaterDirective, typeof i18.FsFormLesserDirective, typeof i19.FsFormUrlDirective, typeof i20.FsFormDialogCloseDirective, typeof i21.FsSubmitButtonDirective, typeof i22.FsFormValidateDirective, typeof i23.FsFormDialogActionsComponent], [typeof
|
|
34
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FsFormModule, [typeof i1.FsFormDirective, typeof i2.FsControlDirective, typeof i3.FsFormRequiredDirective, typeof i4.FsFormMinDirective, typeof i5.FsFormMaxDirective, typeof i6.FsFormMinLengthDirective, typeof i7.FsFormMaxLengthDirective, typeof i8.FsFormEmailDirective, typeof i9.FsFormEmailsDirective, typeof i10.FsFormPhoneDirective, typeof i11.FsFormCompareDirective, typeof i12.FsFormIntegerDirective, typeof i13.FsFormNumericDirective, typeof i14.FsFormPatternDirective, typeof i15.FsFormFunctionDirective, typeof i16.FsFormDateRangeDirective, typeof i17.FsFormGreaterDirective, typeof i18.FsFormLesserDirective, typeof i19.FsFormUrlDirective, typeof i20.FsFormDialogCloseDirective, typeof i21.FsSubmitButtonDirective, typeof i22.FsFormValidateDirective, typeof i23.FsFormDialogActionsComponent, typeof i24.FsFormNoFsValidatorsDirective], [typeof i25.CommonModule, typeof i26.FormsModule, typeof i27.MatButtonModule, typeof i28.MatDialogModule], [typeof i1.FsFormDirective, typeof i2.FsControlDirective, typeof i3.FsFormRequiredDirective, typeof i4.FsFormMinDirective, typeof i5.FsFormMaxDirective, typeof i6.FsFormMinLengthDirective, typeof i7.FsFormMaxLengthDirective, typeof i8.FsFormEmailDirective, typeof i9.FsFormEmailsDirective, typeof i10.FsFormPhoneDirective, typeof i11.FsFormCompareDirective, typeof i12.FsFormIntegerDirective, typeof i13.FsFormNumericDirective, typeof i14.FsFormPatternDirective, typeof i15.FsFormFunctionDirective, typeof i16.FsFormDateRangeDirective, typeof i17.FsFormGreaterDirective, typeof i18.FsFormLesserDirective, typeof i19.FsFormUrlDirective, typeof i20.FsFormDialogCloseDirective, typeof i21.FsSubmitButtonDirective, typeof i22.FsFormValidateDirective, typeof i23.FsFormDialogActionsComponent, typeof i24.FsFormNoFsValidatorsDirective]>;
|
|
34
35
|
static ɵinj: i0.ɵɵInjectorDeclaration<FsFormModule>;
|
|
35
36
|
}
|
|
@@ -2524,7 +2524,7 @@
|
|
|
2524
2524
|
return FsFormDialogActionsComponent;
|
|
2525
2525
|
}());
|
|
2526
2526
|
FsFormDialogActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDialogActionsComponent, deps: [{ token: FsFormDirective, optional: true }, { token: i2__namespace$1.MatDialogRef, optional: true }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2527
|
-
FsFormDialogActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: { save: "save", create: "create", close: "close", closeData: "closeData", name: "name" }, ngImport: i0__namespace, template: "<div class=\"buttons\">\r\n <ng-container *ngIf=\"save\">\r\n <button \r\n mat-button \r\n type=\"submit\"\r\n color=\"primary\" \r\n [name]=\"name\">\r\n {{create ? 'Create' : 'Save'}}\r\n </button>\r\n <button \r\n mat-button \r\n type=\"button\"\r\n [disabled]=\"close && !dirty && !create\"\r\n [matDialogClose]=\"null\">\r\n Cancel\r\n </button>\r\n </ng-container>\r\n\r\n <ng-content></ng-content>\r\n <div class=\"close\" *ngIf=\"close\">\r\n <button \r\n mat-button \r\n type=\"button\"\r\n [color]=\"dirty ? 'basic' : 'primary'\"\r\n (click)=\"closeClick()\">\r\n Close\r\n </button>\r\n </div>\r\n</div>", styles: [".buttons{display:flex;flex-grow:1;align-items:center}.buttons .close{display:flex;flex-grow:1;justify-content:flex-end}:host{display:flex;flex-grow:1}@media only screen and (max-width: 599px){.buttons{flex-direction:column}}\n"], components: [{ type: i1__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i2__namespace$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2527
|
+
FsFormDialogActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: { save: "save", create: "create", close: "close", closeData: "closeData", name: "name" }, ngImport: i0__namespace, template: "<div class=\"buttons\" [ngClass]=\"{ 'save-create': save || create }\">\r\n <ng-container *ngIf=\"save\">\r\n <button \r\n mat-button \r\n type=\"submit\"\r\n color=\"primary\" \r\n [name]=\"name\">\r\n {{create ? 'Create' : 'Save'}}\r\n </button>\r\n <button \r\n mat-button \r\n type=\"button\"\r\n [disabled]=\"close && !dirty && !create\"\r\n [matDialogClose]=\"null\">\r\n Cancel\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"save || create\">\r\n <ng-content></ng-content>\r\n </ng-container>\r\n\r\n <div class=\"close\" *ngIf=\"close\">\r\n <button \r\n mat-button \r\n type=\"button\"\r\n [color]=\"dirty ? 'basic' : 'primary'\"\r\n (click)=\"closeClick()\">\r\n Close\r\n </button>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!(save || create)\">\r\n <ng-content></ng-content>\r\n </ng-container>\r\n</div>", styles: [".buttons{display:flex;flex-grow:1;align-items:center}.buttons.save-create .close{display:flex;flex-grow:1;justify-content:flex-end}:host{display:flex;flex-grow:1}@media only screen and (max-width: 599px){.buttons{flex-direction:column}}\n"], components: [{ type: i1__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i2__namespace$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2528
2528
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormDialogActionsComponent, decorators: [{
|
|
2529
2529
|
type: i0.Component,
|
|
2530
2530
|
args: [{
|
|
@@ -2551,6 +2551,54 @@
|
|
|
2551
2551
|
type: i0.Input
|
|
2552
2552
|
}] } });
|
|
2553
2553
|
|
|
2554
|
+
/**
|
|
2555
|
+
* This directive required for cases when we have custom Control like <fs-phone-field> but without any of our validators applied
|
|
2556
|
+
*
|
|
2557
|
+
* This directive required for automatic validation messages
|
|
2558
|
+
*/
|
|
2559
|
+
var FsFormNoFsValidatorsDirective = /** @class */ (function (_super) {
|
|
2560
|
+
__extends(FsFormNoFsValidatorsDirective, _super);
|
|
2561
|
+
function FsFormNoFsValidatorsDirective() {
|
|
2562
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2563
|
+
}
|
|
2564
|
+
FsFormNoFsValidatorsDirective.prototype.ngOnChanges = function () {
|
|
2565
|
+
this._control.updateValueAndValidity();
|
|
2566
|
+
};
|
|
2567
|
+
return FsFormNoFsValidatorsDirective;
|
|
2568
|
+
}(FsControlDirective));
|
|
2569
|
+
FsFormNoFsValidatorsDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormNoFsValidatorsDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
2570
|
+
FsFormNoFsValidatorsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])", providers: [
|
|
2571
|
+
VALIDATE_MESSAGE_PROVIDER
|
|
2572
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
|
|
2573
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormNoFsValidatorsDirective, decorators: [{
|
|
2574
|
+
type: i0.Directive,
|
|
2575
|
+
args: [{
|
|
2576
|
+
selector: '[ngModel]' +
|
|
2577
|
+
':not([required])' +
|
|
2578
|
+
':not([fsFormRequired])' +
|
|
2579
|
+
':not([fsFormCompare])' +
|
|
2580
|
+
':not([fsFormDateRange])' +
|
|
2581
|
+
':not([fsFormEmail])' +
|
|
2582
|
+
':not([fsFormEmails])' +
|
|
2583
|
+
':not([fsFormFunction])' +
|
|
2584
|
+
':not([fsFormGreater])' +
|
|
2585
|
+
':not([fsFormInteger])' +
|
|
2586
|
+
':not([fsFormLesser])' +
|
|
2587
|
+
':not([fsFormMax])' +
|
|
2588
|
+
':not([fsFormMaxLength])' +
|
|
2589
|
+
':not([fsFormMin])' +
|
|
2590
|
+
':not([fsFormMinLength])' +
|
|
2591
|
+
':not([fsFormNumeric])' +
|
|
2592
|
+
':not([fsFormPattern])' +
|
|
2593
|
+
':not([fsFormPhone])' +
|
|
2594
|
+
':not([fsFormUrl])' +
|
|
2595
|
+
':not([validate])',
|
|
2596
|
+
providers: [
|
|
2597
|
+
VALIDATE_MESSAGE_PROVIDER
|
|
2598
|
+
],
|
|
2599
|
+
}]
|
|
2600
|
+
}] });
|
|
2601
|
+
|
|
2554
2602
|
var FsFormModule = /** @class */ (function () {
|
|
2555
2603
|
function FsFormModule() {
|
|
2556
2604
|
}
|
|
@@ -2590,7 +2638,8 @@
|
|
|
2590
2638
|
FsFormDialogCloseDirective,
|
|
2591
2639
|
FsSubmitButtonDirective,
|
|
2592
2640
|
FsFormValidateDirective,
|
|
2593
|
-
FsFormDialogActionsComponent
|
|
2641
|
+
FsFormDialogActionsComponent,
|
|
2642
|
+
FsFormNoFsValidatorsDirective], imports: [i4.CommonModule,
|
|
2594
2643
|
i1.FormsModule,
|
|
2595
2644
|
i1$1.MatButtonModule,
|
|
2596
2645
|
i2$1.MatDialogModule], exports: [FsFormDirective,
|
|
@@ -2615,7 +2664,8 @@
|
|
|
2615
2664
|
FsFormDialogCloseDirective,
|
|
2616
2665
|
FsSubmitButtonDirective,
|
|
2617
2666
|
FsFormValidateDirective,
|
|
2618
|
-
FsFormDialogActionsComponent
|
|
2667
|
+
FsFormDialogActionsComponent,
|
|
2668
|
+
FsFormNoFsValidatorsDirective] });
|
|
2619
2669
|
FsFormModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFormModule, providers: [
|
|
2620
2670
|
{
|
|
2621
2671
|
provide: core.ErrorStateMatcher,
|
|
@@ -2660,6 +2710,7 @@
|
|
|
2660
2710
|
FsSubmitButtonDirective,
|
|
2661
2711
|
FsFormValidateDirective,
|
|
2662
2712
|
FsFormDialogActionsComponent,
|
|
2713
|
+
FsFormNoFsValidatorsDirective
|
|
2663
2714
|
],
|
|
2664
2715
|
exports: [
|
|
2665
2716
|
FsFormDirective,
|
|
@@ -2685,6 +2736,7 @@
|
|
|
2685
2736
|
FsSubmitButtonDirective,
|
|
2686
2737
|
FsFormValidateDirective,
|
|
2687
2738
|
FsFormDialogActionsComponent,
|
|
2739
|
+
FsFormNoFsValidatorsDirective,
|
|
2688
2740
|
],
|
|
2689
2741
|
providers: [
|
|
2690
2742
|
{
|
|
@@ -2752,6 +2804,7 @@
|
|
|
2752
2804
|
exports.FsFormMinDirective = FsFormMinDirective;
|
|
2753
2805
|
exports.FsFormMinLengthDirective = FsFormMinLengthDirective;
|
|
2754
2806
|
exports.FsFormModule = FsFormModule;
|
|
2807
|
+
exports.FsFormNoFsValidatorsDirective = FsFormNoFsValidatorsDirective;
|
|
2755
2808
|
exports.FsFormNumericDirective = FsFormNumericDirective;
|
|
2756
2809
|
exports.FsFormPatternDirective = FsFormPatternDirective;
|
|
2757
2810
|
exports.FsFormPhoneDirective = FsFormPhoneDirective;
|