@rxap/material-form-system 12.1.0 → 13.0.0-next.2
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/esm2020/index.mjs +12 -0
- package/esm2020/lib/chip-input-adapter.directive.mjs +50 -0
- package/esm2020/lib/chip-list-iterator.directive.mjs +107 -0
- package/esm2020/lib/compare-with.directive.mjs +65 -0
- package/esm2020/lib/control-error.directive.mjs +89 -0
- package/esm2020/lib/control-errors.directive.mjs +79 -0
- package/esm2020/lib/form-controls/form-controls.component.mjs +123 -0
- package/esm2020/lib/form-controls/form-controls.component.module.mjs +42 -0
- package/esm2020/lib/form-field-hide-show.directive.mjs +151 -0
- package/esm2020/lib/input-clear-button.directive.mjs +61 -0
- package/esm2020/lib/material-form-system.module.mjs +33 -0
- package/esm2020/lib/required.directive.mjs +45 -0
- package/esm2020/rxap-material-form-system.mjs +5 -0
- package/fesm2015/rxap-material-form-system.mjs +831 -0
- package/fesm2015/rxap-material-form-system.mjs.map +1 -0
- package/{fesm2015/rxap-material-form-system.js → fesm2020/rxap-material-form-system.mjs} +93 -117
- package/fesm2020/rxap-material-form-system.mjs.map +1 -0
- package/package.json +41 -27
- package/src/schematics/ng-add/index.js +1 -1
- package/src/schematics/ng-add/index.js.map +1 -1
- package/bundles/rxap-material-form-system.umd.js +0 -1253
- package/bundles/rxap-material-form-system.umd.js.map +0 -1
- package/esm2015/index.js +0 -12
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/chip-input-adapter.directive.js +0 -52
- package/esm2015/lib/chip-input-adapter.directive.js.map +0 -1
- package/esm2015/lib/chip-list-iterator.directive.js +0 -108
- package/esm2015/lib/chip-list-iterator.directive.js.map +0 -1
- package/esm2015/lib/compare-with.directive.js +0 -65
- package/esm2015/lib/compare-with.directive.js.map +0 -1
- package/esm2015/lib/control-error.directive.js +0 -91
- package/esm2015/lib/control-error.directive.js.map +0 -1
- package/esm2015/lib/control-errors.directive.js +0 -81
- package/esm2015/lib/control-errors.directive.js.map +0 -1
- package/esm2015/lib/form-controls/form-controls.component.js +0 -129
- package/esm2015/lib/form-controls/form-controls.component.js.map +0 -1
- package/esm2015/lib/form-controls/form-controls.component.module.js +0 -42
- package/esm2015/lib/form-controls/form-controls.component.module.js.map +0 -1
- package/esm2015/lib/form-field-hide-show.directive.js +0 -161
- package/esm2015/lib/form-field-hide-show.directive.js.map +0 -1
- package/esm2015/lib/input-clear-button.directive.js +0 -61
- package/esm2015/lib/input-clear-button.directive.js.map +0 -1
- package/esm2015/lib/material-form-system.module.js +0 -33
- package/esm2015/lib/material-form-system.module.js.map +0 -1
- package/esm2015/lib/required.directive.js +0 -46
- package/esm2015/lib/required.directive.js.map +0 -1
- package/esm2015/rxap-material-form-system.js +0 -5
- package/esm2015/rxap-material-form-system.js.map +0 -1
- package/fesm2015/rxap-material-form-system.js.map +0 -1
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { Directive, Inject, TemplateRef, ViewContainerRef, NgModule, ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { MAT_FORM_FIELD, MatFormField } from '@angular/material/form-field';
|
|
3
|
-
import { controlErrorChanges$ } from '@rxap/forms';
|
|
4
|
-
import { tap } from 'rxjs/operators';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "@angular/material/form-field";
|
|
7
|
-
export class ControlErrorsDirective {
|
|
8
|
-
constructor(formField, template, viewContainerRef, cdr) {
|
|
9
|
-
this.formField = formField;
|
|
10
|
-
this.template = template;
|
|
11
|
-
this.viewContainerRef = viewContainerRef;
|
|
12
|
-
this.cdr = cdr;
|
|
13
|
-
}
|
|
14
|
-
static ngTemplateContextGuard(dir, ctx) {
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
17
|
-
ngAfterContentInit() {
|
|
18
|
-
var _a;
|
|
19
|
-
const control = (_a = this.formField._control.ngControl) === null || _a === void 0 ? void 0 : _a.control;
|
|
20
|
-
if (control) {
|
|
21
|
-
this._control = control;
|
|
22
|
-
this._subscription = controlErrorChanges$(control)
|
|
23
|
-
.pipe(tap((errors) => this.render(errors)))
|
|
24
|
-
.subscribe();
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
throw new Error('The form field has not a control associated!');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
render(errors) {
|
|
31
|
-
this.viewContainerRef.clear();
|
|
32
|
-
if (errors) {
|
|
33
|
-
if (!this._control) {
|
|
34
|
-
throw new Error('The control is not defined!');
|
|
35
|
-
}
|
|
36
|
-
this.viewContainerRef.createEmbeddedView(this.template, {
|
|
37
|
-
$implicit: errors,
|
|
38
|
-
control: this._control,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
this.cdr.detectChanges();
|
|
42
|
-
}
|
|
43
|
-
ngOnDestroy() {
|
|
44
|
-
var _a;
|
|
45
|
-
(_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
ControlErrorsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ControlErrorsDirective, deps: [{ token: MAT_FORM_FIELD }, { token: TemplateRef }, { token: ViewContainerRef }, { token: ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
49
|
-
ControlErrorsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: ControlErrorsDirective, selector: "[rxapControlErrors]", ngImport: i0 });
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ControlErrorsDirective, decorators: [{
|
|
51
|
-
type: Directive,
|
|
52
|
-
args: [{
|
|
53
|
-
// tslint:disable-next-line:directive-selector
|
|
54
|
-
selector: '[rxapControlErrors]',
|
|
55
|
-
}]
|
|
56
|
-
}], ctorParameters: function () { return [{ type: i1.MatFormField, decorators: [{
|
|
57
|
-
type: Inject,
|
|
58
|
-
args: [MAT_FORM_FIELD]
|
|
59
|
-
}] }, { type: i0.TemplateRef, decorators: [{
|
|
60
|
-
type: Inject,
|
|
61
|
-
args: [TemplateRef]
|
|
62
|
-
}] }, { type: i0.ViewContainerRef, decorators: [{
|
|
63
|
-
type: Inject,
|
|
64
|
-
args: [ViewContainerRef]
|
|
65
|
-
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
66
|
-
type: Inject,
|
|
67
|
-
args: [ChangeDetectorRef]
|
|
68
|
-
}] }]; } });
|
|
69
|
-
export class ControlErrorsDirectiveModule {
|
|
70
|
-
}
|
|
71
|
-
ControlErrorsDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ControlErrorsDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
72
|
-
ControlErrorsDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ControlErrorsDirectiveModule, declarations: [ControlErrorsDirective], exports: [ControlErrorsDirective] });
|
|
73
|
-
ControlErrorsDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ControlErrorsDirectiveModule });
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ControlErrorsDirectiveModule, decorators: [{
|
|
75
|
-
type: NgModule,
|
|
76
|
-
args: [{
|
|
77
|
-
declarations: [ControlErrorsDirective],
|
|
78
|
-
exports: [ControlErrorsDirective],
|
|
79
|
-
}]
|
|
80
|
-
}] });
|
|
81
|
-
//# sourceMappingURL=control-errors.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control-errors.directive.js","sourceRoot":"","sources":["../../../../../../libs/material/form-system/src/lib/control-errors.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM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C,gBAAgB,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACtD,SAAS,EAAE,MAAM;gBACjB,OAAO,EAAE,IAAI,CAAC,QAAQ;aACvB,CAAC,CAAC;SACJ;QACD,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAC3B,CAAC;IAEM,WAAW;;QAChB,MAAA,IAAI,CAAC,aAAa,0CAAE,WAAW,EAAE,CAAC;IACpC,CAAC;;mHAnDU,sBAAsB,kBAavB,cAAc,aAEd,WAAW,aAEX,gBAAgB,aAEhB,iBAAiB;uGAnBhB,sBAAsB;2FAAtB,sBAAsB;kBAJlC,SAAS;mBAAC;oBACT,8CAA8C;oBAC9C,QAAQ,EAAE,qBAAqB;iBAChC;;0BAcI,MAAM;2BAAC,cAAc;;0BAErB,MAAM;2BAAC,WAAW;;0BAElB,MAAM;2BAAC,gBAAgB;;0BAEvB,MAAM;2BAAC,iBAAiB;;AAuC7B,MAAM,OAAO,4BAA4B;;yHAA5B,4BAA4B;0HAA5B,4BAA4B,iBA1D5B,sBAAsB,aAAtB,sBAAsB;0HA0DtB,4BAA4B;2FAA5B,4BAA4B;kBAJxC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBAClC","sourcesContent":["import {\n Directive,\n Inject,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n NgModule,\n ChangeDetectorRef,\n AfterContentInit\n} from '@angular/core';\nimport {\n MAT_FORM_FIELD,\n MatFormField\n} from '@angular/material/form-field';\nimport { controlErrorChanges$ } from '@rxap/forms';\nimport { Subscription } from 'rxjs';\nimport {\n ValidationErrors,\n AbstractControl\n} from '@angular/forms';\nimport { tap } from 'rxjs/operators';\n\nexport interface ControlErrorsDirectiveContext {\n $implicit: ValidationErrors;\n control: AbstractControl;\n}\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: '[rxapControlErrors]',\n})\nexport class ControlErrorsDirective implements AfterContentInit, OnDestroy {\n static ngTemplateContextGuard<T>(\n dir: ControlErrorsDirective,\n ctx: any\n ): ctx is ControlErrorsDirectiveContext {\n return true;\n }\n\n private _subscription?: Subscription;\n\n private _control?: AbstractControl;\n\n constructor(\n @Inject(MAT_FORM_FIELD)\n private readonly formField: MatFormField,\n @Inject(TemplateRef)\n protected readonly template: TemplateRef<ControlErrorsDirectiveContext>,\n @Inject(ViewContainerRef)\n protected readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef\n ) {}\n\n public ngAfterContentInit() {\n const control = this.formField._control.ngControl?.control;\n if (control) {\n this._control = control;\n this._subscription = controlErrorChanges$<ValidationErrors>(control)\n .pipe(tap((errors: ValidationErrors | null) => this.render(errors)))\n .subscribe();\n } else {\n throw new Error('The form field has not a control associated!');\n }\n }\n\n protected render(errors: ValidationErrors | null) {\n this.viewContainerRef.clear();\n if (errors) {\n if (!this._control) {\n throw new Error('The control is not defined!');\n }\n this.viewContainerRef.createEmbeddedView(this.template, {\n $implicit: errors,\n control: this._control,\n });\n }\n this.cdr.detectChanges();\n }\n\n public ngOnDestroy() {\n this._subscription?.unsubscribe();\n }\n}\n\n@NgModule({\n declarations: [ControlErrorsDirective],\n exports: [ControlErrorsDirective],\n})\nexport class ControlErrorsDirectiveModule {}\n"]}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Inject, Input, Output, ChangeDetectorRef, isDevMode, Optional, } from '@angular/core';
|
|
2
|
-
import { FormDirective } from '@rxap/forms';
|
|
3
|
-
import { coerceBoolean, clone } from '@rxap/utilities';
|
|
4
|
-
import { take, tap } from 'rxjs/operators';
|
|
5
|
-
import { Router } from '@angular/router';
|
|
6
|
-
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
7
|
-
import '@angular/localize/init';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "@angular/material/button";
|
|
10
|
-
import * as i2 from "@angular/material/progress-spinner";
|
|
11
|
-
import * as i3 from "@angular/flex-layout/flex";
|
|
12
|
-
import * as i4 from "@angular/flex-layout/extended";
|
|
13
|
-
import * as i5 from "@angular/common";
|
|
14
|
-
import * as i6 from "@rxap/forms";
|
|
15
|
-
import * as i7 from "@angular/material/snack-bar";
|
|
16
|
-
import * as i8 from "@angular/router";
|
|
17
|
-
export class FormControlsComponent {
|
|
18
|
-
constructor(formDirective, cdr, snackBar, router) {
|
|
19
|
-
this.formDirective = formDirective;
|
|
20
|
-
this.cdr = cdr;
|
|
21
|
-
this.snackBar = snackBar;
|
|
22
|
-
this.router = router;
|
|
23
|
-
this._allowResubmit = false;
|
|
24
|
-
this.invalid = false;
|
|
25
|
-
this.close = new EventEmitter();
|
|
26
|
-
this.submitted = new EventEmitter();
|
|
27
|
-
this.isDevMode = isDevMode();
|
|
28
|
-
/**
|
|
29
|
-
* Collection of successful submitted values
|
|
30
|
-
* @private
|
|
31
|
-
*/
|
|
32
|
-
this._submitted = [];
|
|
33
|
-
}
|
|
34
|
-
set allowResubmit(value) {
|
|
35
|
-
this._allowResubmit = coerceBoolean(value);
|
|
36
|
-
}
|
|
37
|
-
get allowResubmit() {
|
|
38
|
-
return this._allowResubmit;
|
|
39
|
-
}
|
|
40
|
-
ngOnInit() {
|
|
41
|
-
this.submitting$ = this.formDirective.submitting$;
|
|
42
|
-
this.close
|
|
43
|
-
.pipe(take(1), tap(() => {
|
|
44
|
-
if (this.navigateAfterSubmit) {
|
|
45
|
-
if (this.router) {
|
|
46
|
-
return this.router.navigate(this.navigateAfterSubmit);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
console.warn('The Router is not available. Ensure that tha RouterModule is imported');
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return Promise.resolve();
|
|
53
|
-
}))
|
|
54
|
-
.subscribe();
|
|
55
|
-
}
|
|
56
|
-
reset() {
|
|
57
|
-
this.invalid = false;
|
|
58
|
-
this.formDirective.reset();
|
|
59
|
-
}
|
|
60
|
-
cancel() {
|
|
61
|
-
this.close.emit();
|
|
62
|
-
}
|
|
63
|
-
submit(closeAfterSubmit) {
|
|
64
|
-
this.formDirective.form.markAllAsDirty();
|
|
65
|
-
this.formDirective.form.markAllAsTouched();
|
|
66
|
-
this.formDirective.cdr.markForCheck();
|
|
67
|
-
let submitSubscription;
|
|
68
|
-
const invalidSubmitSubscription = this.formDirective.invalidSubmit
|
|
69
|
-
.pipe(take(1), tap(() => submitSubscription === null || submitSubscription === void 0 ? void 0 : submitSubscription.unsubscribe()), tap(() => (this.invalid = true)), tap(() => this.cdr.detectChanges()), tap(() => this.snackBar.open($localize `:@@rxap-material.form-system.form-controls.form-is-invalid:Form is not valid`, 'ok', { duration: 5000 })))
|
|
70
|
-
.subscribe();
|
|
71
|
-
submitSubscription = this.formDirective.rxapSubmit
|
|
72
|
-
.pipe(take(1), tap((value) => {
|
|
73
|
-
const clonedValue = clone(value);
|
|
74
|
-
this._submitted.push(clonedValue);
|
|
75
|
-
this.submitted.emit(clonedValue);
|
|
76
|
-
if (closeAfterSubmit) {
|
|
77
|
-
this.close.emit(this._submitted.length > 1 ? this._submitted : this._submitted[0]);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
if (typeof this.formDirective.formDefinition.rxapReuse === 'function') {
|
|
81
|
-
this.formDirective.formDefinition.rxapReuse();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
invalidSubmitSubscription.unsubscribe();
|
|
85
|
-
this.invalid = false;
|
|
86
|
-
this.cdr.detectChanges();
|
|
87
|
-
}))
|
|
88
|
-
.subscribe();
|
|
89
|
-
this.formDirective.onSubmit(new Event('submit'));
|
|
90
|
-
}
|
|
91
|
-
logCurrentFormState() {
|
|
92
|
-
console.log(clone(this.formDirective.form.value));
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
FormControlsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormControlsComponent, deps: [{ token: FormDirective }, { token: ChangeDetectorRef }, { token: MatSnackBar }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
96
|
-
FormControlsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: FormControlsComponent, selector: "rxap-form-controls", inputs: { allowResubmit: "allowResubmit", navigateAfterSubmit: "navigateAfterSubmit" }, outputs: { close: "close", submitted: "submitted" }, host: { classAttribute: "mfd-form-controls" }, ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutAlign=\"space-between center\" fxLayoutGap=\"32px\">\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"end center\" fxLayoutGap=\"32px\" style=\"width: 100%\">\n <button (click)=\"reset()\"\n [disabled]=\"submitting$ | async\"\n type=\"button\"\n fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.reset\"\n mat-stroked-button>\n Reset\n </button>\n <button (click)=\"cancel()\"\n [disabled]=\"submitting$ | async\"\n type=\"button\"\n color=\"warn\" fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.cancel\"\n mat-stroked-button>\n Cancel\n </button>\n <button (click)=\"submit(!allowResubmit)\"\n [disabled]=\"submitting$ | async\"\n type=\"button\"\n color=\"primary\"\n fxFlex=\"nogrow\"\n [ngClass]=\"{ invalid: invalid }\"\n mat-raised-button>\n <span fxLayout=\"row\" fxLayoutGap=\"4px\" fxLayoutAlign=\"start center\">\n <span fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.submit\">Submit</span>\n <mat-spinner [fxShow]=\"submitting$ | async\" fxFlex=\"nogrow\" mode=\"indeterminate\" [diameter]=\"15\" color=\"accent\"></mat-spinner>\n </span>\n </button>\n <button *ngIf=\"allowResubmit\" (click)=\"submit(true)\"\n type=\"button\"\n color=\"primary\"\n fxFlex=\"nogrow\"\n [ngClass]=\"{ invalid: invalid }\"\n [disabled]=\"submitting$ | async\"\n mat-raised-button>\n <span fxLayout=\"row\" fxLayoutGap=\"4px\" fxLayoutAlign=\"start center\">\n <span fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.submit-and-close\">\n Submit and Close\n </span>\n <mat-spinner [fxShow]=\"submitting$ | async\" fxFlex=\"nogrow\" mode=\"indeterminate\" [diameter]=\"15\" color=\"accent\"></mat-spinner>\n </span>\n </button>\n <button *ngIf=\"isDevMode\" type=\"button\" mat-button fxFlex=\"nogrow\" (click)=\"logCurrentFormState()\">Current Form State</button>\n </div>\n</div>\n", styles: ["button{overflow:hidden}button.invalid{border:6px solid #8b0000}"], components: [{ type: i1.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"] }, { type: i2.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormControlsComponent, decorators: [{
|
|
98
|
-
type: Component,
|
|
99
|
-
args: [{
|
|
100
|
-
selector: 'rxap-form-controls',
|
|
101
|
-
templateUrl: './form-controls.component.html',
|
|
102
|
-
styleUrls: ['./form-controls.component.scss'],
|
|
103
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
104
|
-
host: { class: 'mfd-form-controls' },
|
|
105
|
-
}]
|
|
106
|
-
}], ctorParameters: function () { return [{ type: i6.FormDirective, decorators: [{
|
|
107
|
-
type: Inject,
|
|
108
|
-
args: [FormDirective]
|
|
109
|
-
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
110
|
-
type: Inject,
|
|
111
|
-
args: [ChangeDetectorRef]
|
|
112
|
-
}] }, { type: i7.MatSnackBar, decorators: [{
|
|
113
|
-
type: Inject,
|
|
114
|
-
args: [MatSnackBar]
|
|
115
|
-
}] }, { type: i8.Router, decorators: [{
|
|
116
|
-
type: Optional
|
|
117
|
-
}, {
|
|
118
|
-
type: Inject,
|
|
119
|
-
args: [Router]
|
|
120
|
-
}] }]; }, propDecorators: { allowResubmit: [{
|
|
121
|
-
type: Input
|
|
122
|
-
}], navigateAfterSubmit: [{
|
|
123
|
-
type: Input
|
|
124
|
-
}], close: [{
|
|
125
|
-
type: Output
|
|
126
|
-
}], submitted: [{
|
|
127
|
-
type: Output
|
|
128
|
-
}] } });
|
|
129
|
-
//# sourceMappingURL=form-controls.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-controls.component.js","sourceRoot":"","sources":["../../../../../../../libs/material/form-system/src/lib/form-controls/form-controls.component.ts","../../../../../../../libs/material/form-system/src/lib/form-controls/form-controls.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,YAAY,EACZ,MAAM,EACN,KAAK,EAEL,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,wBAAwB,CAAC;;;;;;;;;;AAShC,MAAM,OAAO,qBAAqB;IAiChC,YAEmB,aAA4B,EAE5B,GAAsB,EAEtB,QAAqB,EAGrB,MAAqB;QAPrB,kBAAa,GAAb,aAAa,CAAe;QAE5B,QAAG,GAAH,GAAG,CAAmB;QAEtB,aAAQ,GAAR,QAAQ,CAAa;QAGrB,WAAM,GAAN,MAAM,CAAe;QAhCjC,mBAAc,GAAY,KAAK,CAAC;QAIhC,YAAO,GAAY,KAAK,CAAC;QAMzB,UAAK,GAAG,IAAI,YAAY,EAAgC,CAAC;QAGzD,cAAS,GAAG,IAAI,YAAY,EAAY,CAAC;QAEzC,cAAS,GAAG,SAAS,EAAE,CAAC;QAE/B;;;WAGG;QACK,eAAU,GAAe,EAAE,CAAC;IAYjC,CAAC;IA1CJ,IACW,aAAa,CAAC,KAAmB;QAC1C,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAqCM,QAAQ;QACb,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,CA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CAAC,CAAC,CAAC;IACpD,CAAC;;kHAlIU,qBAAqB,kBAkCtB,aAAa,aAEb,iBAAiB,aAEjB,WAAW,aAGX,MAAM;sGAzCL,qBAAqB,sPC3BlC,wwEAiDA;2FDtBa,qBAAqB;kBAPjC,SAAS;mBAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,WAAW,EAAE,gCAAgC;oBAC7C,SAAS,EAAE,CAAC,gCAAgC,CAAC;oBAC7C,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,IAAI,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE;iBACrC;;0BAmCI,MAAM;2BAAC,aAAa;;0BAEpB,MAAM;2BAAC,iBAAiB;;0BAExB,MAAM;2BAAC,WAAW;;0BAElB,QAAQ;;0BACR,MAAM;2BAAC,MAAM;4CAvCL,aAAa;sBADvB,KAAK;gBAgBC,mBAAmB;sBADzB,KAAK;gBAIC,KAAK;sBADX,MAAM;gBAIA,SAAS;sBADf,MAAM","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnInit,\n Output,\n ChangeDetectorRef,\n isDevMode,\n Optional,\n} from '@angular/core';\nimport { FormDirective } from '@rxap/forms';\nimport { Observable, Subscription } from 'rxjs';\nimport { coerceBoolean, clone } from '@rxap/utilities';\nimport { take, tap } from 'rxjs/operators';\nimport { Router } from '@angular/router';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport '@angular/localize/init';\n\n@Component({\n selector: 'rxap-form-controls',\n templateUrl: './form-controls.component.html',\n styleUrls: ['./form-controls.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'mfd-form-controls' },\n})\nexport class FormControlsComponent<FormData> implements OnInit {\n @Input()\n public set allowResubmit(value: boolean | '') {\n this._allowResubmit = coerceBoolean(value);\n }\n\n public get allowResubmit(): boolean | '' {\n return this._allowResubmit;\n }\n\n public _allowResubmit: boolean = false;\n\n public submitting$!: Observable<boolean>;\n\n public invalid: boolean = false;\n\n @Input()\n public navigateAfterSubmit?: string[];\n\n @Output()\n public close = new EventEmitter<FormData | FormData[] | void>();\n\n @Output()\n public submitted = new EventEmitter<FormData>();\n\n public isDevMode = isDevMode();\n\n /**\n * Collection of successful submitted values\n * @private\n */\n private _submitted: FormData[] = [];\n\n constructor(\n @Inject(FormDirective)\n private readonly formDirective: FormDirective,\n @Inject(ChangeDetectorRef)\n private readonly cdr: ChangeDetectorRef,\n @Inject(MatSnackBar)\n private readonly snackBar: MatSnackBar,\n @Optional()\n @Inject(Router)\n private readonly router: Router | null\n ) {}\n\n public ngOnInit() {\n this.submitting$ = this.formDirective.submitting$;\n this.close\n .pipe(\n take(1),\n tap(() => {\n if (this.navigateAfterSubmit) {\n if (this.router) {\n return this.router.navigate(this.navigateAfterSubmit);\n } else {\n console.warn(\n 'The Router is not available. Ensure that tha RouterModule is imported'\n );\n }\n }\n return Promise.resolve();\n })\n )\n .subscribe();\n }\n\n public reset() {\n this.invalid = false;\n this.formDirective.reset();\n }\n\n public cancel() {\n this.close.emit();\n }\n\n public submit(closeAfterSubmit?: boolean) {\n this.formDirective.form.markAllAsDirty();\n this.formDirective.form.markAllAsTouched();\n this.formDirective.cdr.markForCheck();\n let submitSubscription: Subscription;\n\n const invalidSubmitSubscription: Subscription =\n this.formDirective.invalidSubmit\n .pipe(\n take(1),\n tap(() => submitSubscription?.unsubscribe()),\n tap(() => (this.invalid = true)),\n tap(() => this.cdr.detectChanges()),\n tap(() =>\n this.snackBar.open(\n $localize`:@@rxap-material.form-system.form-controls.form-is-invalid:Form is not valid`,\n 'ok',\n { duration: 5000 }\n )\n )\n )\n .subscribe();\n\n submitSubscription = this.formDirective.rxapSubmit\n .pipe(\n take(1),\n tap((value) => {\n const clonedValue = clone(value);\n this._submitted.push(clonedValue);\n this.submitted.emit(clonedValue);\n\n if (closeAfterSubmit) {\n this.close.emit(\n this._submitted.length > 1 ? this._submitted : this._submitted[0]\n );\n } else {\n if (\n typeof this.formDirective.formDefinition.rxapReuse === 'function'\n ) {\n this.formDirective.formDefinition.rxapReuse();\n }\n }\n\n invalidSubmitSubscription.unsubscribe();\n this.invalid = false;\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n\n this.formDirective.onSubmit(new Event('submit'));\n }\n\n public logCurrentFormState() {\n console.log(clone(this.formDirective.form.value));\n }\n}\n","<div fxLayout=\"row\" fxLayoutAlign=\"space-between center\" fxLayoutGap=\"32px\">\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"end center\" fxLayoutGap=\"32px\" style=\"width: 100%\">\n <button (click)=\"reset()\"\n [disabled]=\"submitting$ | async\"\n type=\"button\"\n fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.reset\"\n mat-stroked-button>\n Reset\n </button>\n <button (click)=\"cancel()\"\n [disabled]=\"submitting$ | async\"\n type=\"button\"\n color=\"warn\" fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.cancel\"\n mat-stroked-button>\n Cancel\n </button>\n <button (click)=\"submit(!allowResubmit)\"\n [disabled]=\"submitting$ | async\"\n type=\"button\"\n color=\"primary\"\n fxFlex=\"nogrow\"\n [ngClass]=\"{ invalid: invalid }\"\n mat-raised-button>\n <span fxLayout=\"row\" fxLayoutGap=\"4px\" fxLayoutAlign=\"start center\">\n <span fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.submit\">Submit</span>\n <mat-spinner [fxShow]=\"submitting$ | async\" fxFlex=\"nogrow\" mode=\"indeterminate\" [diameter]=\"15\" color=\"accent\"></mat-spinner>\n </span>\n </button>\n <button *ngIf=\"allowResubmit\" (click)=\"submit(true)\"\n type=\"button\"\n color=\"primary\"\n fxFlex=\"nogrow\"\n [ngClass]=\"{ invalid: invalid }\"\n [disabled]=\"submitting$ | async\"\n mat-raised-button>\n <span fxLayout=\"row\" fxLayoutGap=\"4px\" fxLayoutAlign=\"start center\">\n <span fxFlex=\"nogrow\"\n i18n=\"@@rxap-material.form-system.components.form-controls.submit-and-close\">\n Submit and Close\n </span>\n <mat-spinner [fxShow]=\"submitting$ | async\" fxFlex=\"nogrow\" mode=\"indeterminate\" [diameter]=\"15\" color=\"accent\"></mat-spinner>\n </span>\n </button>\n <button *ngIf=\"isDevMode\" type=\"button\" mat-button fxFlex=\"nogrow\" (click)=\"logCurrentFormState()\">Current Form State</button>\n </div>\n</div>\n"]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { FormControlsComponent } from './form-controls.component';
|
|
3
|
-
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
4
|
-
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
5
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
6
|
-
import { CommonModule } from '@angular/common';
|
|
7
|
-
import { RxapFormsModule } from '@rxap/forms';
|
|
8
|
-
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
export class FormControlsComponentModule {
|
|
11
|
-
}
|
|
12
|
-
FormControlsComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormControlsComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
13
|
-
FormControlsComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormControlsComponentModule, declarations: [FormControlsComponent], imports: [MatProgressSpinnerModule,
|
|
14
|
-
FlexLayoutModule,
|
|
15
|
-
MatButtonModule,
|
|
16
|
-
CommonModule,
|
|
17
|
-
RxapFormsModule,
|
|
18
|
-
MatSnackBarModule], exports: [FormControlsComponent] });
|
|
19
|
-
FormControlsComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormControlsComponentModule, imports: [[
|
|
20
|
-
MatProgressSpinnerModule,
|
|
21
|
-
FlexLayoutModule,
|
|
22
|
-
MatButtonModule,
|
|
23
|
-
CommonModule,
|
|
24
|
-
RxapFormsModule,
|
|
25
|
-
MatSnackBarModule,
|
|
26
|
-
]] });
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormControlsComponentModule, decorators: [{
|
|
28
|
-
type: NgModule,
|
|
29
|
-
args: [{
|
|
30
|
-
declarations: [FormControlsComponent],
|
|
31
|
-
imports: [
|
|
32
|
-
MatProgressSpinnerModule,
|
|
33
|
-
FlexLayoutModule,
|
|
34
|
-
MatButtonModule,
|
|
35
|
-
CommonModule,
|
|
36
|
-
RxapFormsModule,
|
|
37
|
-
MatSnackBarModule,
|
|
38
|
-
],
|
|
39
|
-
exports: [FormControlsComponent]
|
|
40
|
-
}]
|
|
41
|
-
}] });
|
|
42
|
-
//# sourceMappingURL=form-controls.component.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-controls.component.module.js","sourceRoot":"","sources":["../../../../../../../libs/material/form-system/src/lib/form-controls/form-controls.component.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;;AAehE,MAAM,OAAO,2BAA2B;;wHAA3B,2BAA2B;yHAA3B,2BAA2B,iBAXtB,qBAAqB,aAEnC,wBAAwB;QACxB,gBAAgB;QAChB,eAAe;QACf,YAAY;QACZ,eAAe;QACf,iBAAiB,aAEH,qBAAqB;yHAE1B,2BAA2B,YAVxB;YACZ,wBAAwB;YACxB,gBAAgB;YAChB,eAAe;YACf,YAAY;YACZ,eAAe;YACf,iBAAiB;SAClB;2FAGU,2BAA2B;kBAZvC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,qBAAqB,CAAE;oBACvC,OAAO,EAAO;wBACZ,wBAAwB;wBACxB,gBAAgB;wBAChB,eAAe;wBACf,YAAY;wBACZ,eAAe;wBACf,iBAAiB;qBAClB;oBACD,OAAO,EAAO,CAAE,qBAAqB,CAAE;iBACxC","sourcesContent":["import { NgModule } from '@angular/core';\nimport { FormControlsComponent } from './form-controls.component';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatButtonModule } from '@angular/material/button';\nimport { CommonModule } from '@angular/common';\nimport { RxapFormsModule } from '@rxap/forms';\nimport { RouterModule } from '@angular/router';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\n\n\n@NgModule({\n declarations: [ FormControlsComponent ],\n imports: [\n MatProgressSpinnerModule,\n FlexLayoutModule,\n MatButtonModule,\n CommonModule,\n RxapFormsModule,\n MatSnackBarModule,\n ],\n exports: [ FormControlsComponent ]\n})\nexport class FormControlsComponentModule {}\n"]}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { Directive, ElementRef, Inject, NgModule, Renderer2 } from '@angular/core';
|
|
3
|
-
import { MAT_FORM_FIELD, MatFormField } from '@angular/material/form-field';
|
|
4
|
-
import { of, Subscription } from 'rxjs';
|
|
5
|
-
import { RxapFormControl } from '@rxap/forms';
|
|
6
|
-
import { ExtractFormDefinitionMixin, RXAP_FORM_SYSTEM_HIDE_METADATA, RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, RXAP_FORM_SYSTEM_SHOW_METADATA } from '@rxap/form-system';
|
|
7
|
-
import { Mixin } from '@rxap/mixin';
|
|
8
|
-
import { catchError, startWith, tap } from 'rxjs/operators';
|
|
9
|
-
import { getMetadata } from '@rxap/utilities/reflect-metadata';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
import * as i1 from "@angular/material/form-field";
|
|
12
|
-
export class ExtractHideShowMixin {
|
|
13
|
-
extractOptions(formDefinition, controlId) {
|
|
14
|
-
var _a, _b, _c;
|
|
15
|
-
if (formDefinition === void 0) { formDefinition = this.formDefinition; }
|
|
16
|
-
if (controlId === void 0) { controlId = (_b = (_a = this.control) === null || _a === void 0 ? void 0 : _a.controlId) !== null && _b !== void 0 ? _b : this.controlId; }
|
|
17
|
-
const map = (_c = getMetadata(RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, Object.getPrototypeOf(formDefinition))) !== null && _c !== void 0 ? _c : null;
|
|
18
|
-
if (!map || !map.has(controlId)) {
|
|
19
|
-
return {};
|
|
20
|
-
}
|
|
21
|
-
return map.get(controlId);
|
|
22
|
-
}
|
|
23
|
-
extractHideFunction(formDefinition, controlId) {
|
|
24
|
-
var _a, _b, _c;
|
|
25
|
-
if (formDefinition === void 0) { formDefinition = this.formDefinition; }
|
|
26
|
-
if (controlId === void 0) { controlId = (_b = (_a = this.control) === null || _a === void 0 ? void 0 : _a.controlId) !== null && _b !== void 0 ? _b : this.controlId; }
|
|
27
|
-
const map = (_c = getMetadata(RXAP_FORM_SYSTEM_HIDE_METADATA, Object.getPrototypeOf(formDefinition))) !== null && _c !== void 0 ? _c : null;
|
|
28
|
-
if (!map || !map.has(controlId)) {
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
return map.get(controlId);
|
|
32
|
-
}
|
|
33
|
-
extractShowFunction(formDefinition, controlId) {
|
|
34
|
-
var _a, _b, _c;
|
|
35
|
-
if (formDefinition === void 0) { formDefinition = this.formDefinition; }
|
|
36
|
-
if (controlId === void 0) { controlId = (_b = (_a = this.control) === null || _a === void 0 ? void 0 : _a.controlId) !== null && _b !== void 0 ? _b : this.controlId; }
|
|
37
|
-
const map = (_c = getMetadata(RXAP_FORM_SYSTEM_SHOW_METADATA, Object.getPrototypeOf(formDefinition))) !== null && _c !== void 0 ? _c : null;
|
|
38
|
-
if (!map || !map.has(controlId)) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
return map.get(controlId);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
// TODO : create mixin for hide and show logic (this class and ControlHideShowDirective in @rxap/form-system)
|
|
45
|
-
let FormFieldHideShowDirective = class FormFieldHideShowDirective {
|
|
46
|
-
constructor(formField, renderer, elementRef) {
|
|
47
|
-
this.formField = formField;
|
|
48
|
-
this.renderer = renderer;
|
|
49
|
-
this.elementRef = elementRef;
|
|
50
|
-
this.subscription = new Subscription();
|
|
51
|
-
}
|
|
52
|
-
ngAfterContentInit() {
|
|
53
|
-
var _a;
|
|
54
|
-
const control = (_a = this.formField._control.ngControl) === null || _a === void 0 ? void 0 : _a.control;
|
|
55
|
-
if (!control) {
|
|
56
|
-
throw new Error('The form field has not a control associated!');
|
|
57
|
-
}
|
|
58
|
-
if (!(control instanceof RxapFormControl)) {
|
|
59
|
-
throw new Error('The associated control is not a RxapFormControl');
|
|
60
|
-
}
|
|
61
|
-
this.control = control;
|
|
62
|
-
this.formDefinition = this.extractFormDefinition(control);
|
|
63
|
-
const hideFunction = this.extractHideFunction(this.formDefinition);
|
|
64
|
-
const showFunction = this.extractShowFunction(this.formDefinition);
|
|
65
|
-
const options = this.extractOptions(this.formDefinition);
|
|
66
|
-
let changeTrigger = this.formDefinition.rxapFormGroup.valueChanges;
|
|
67
|
-
if (options.rootChange) {
|
|
68
|
-
changeTrigger = this.formDefinition.rxapFormGroup.root.valueChanges;
|
|
69
|
-
}
|
|
70
|
-
changeTrigger = changeTrigger.pipe(startWith(null));
|
|
71
|
-
if (showFunction) {
|
|
72
|
-
this.subscription.add(changeTrigger.pipe(tap(() => {
|
|
73
|
-
// TODO : resubscribe if the showFunction throws an error
|
|
74
|
-
const show = showFunction.call(this.formDefinition, control);
|
|
75
|
-
switch (show) {
|
|
76
|
-
case true:
|
|
77
|
-
this.show();
|
|
78
|
-
break;
|
|
79
|
-
case false:
|
|
80
|
-
this.hide();
|
|
81
|
-
break;
|
|
82
|
-
case null:
|
|
83
|
-
this.reset();
|
|
84
|
-
break;
|
|
85
|
-
}
|
|
86
|
-
}), catchError(err => {
|
|
87
|
-
console.error(err);
|
|
88
|
-
return of(null);
|
|
89
|
-
})).subscribe());
|
|
90
|
-
}
|
|
91
|
-
if (hideFunction) {
|
|
92
|
-
this.subscription.add(changeTrigger.pipe(tap(() => {
|
|
93
|
-
// TODO : resubscribe if the hideFunction throws an error
|
|
94
|
-
const hide = hideFunction.call(this.formDefinition, control);
|
|
95
|
-
switch (hide) {
|
|
96
|
-
case true:
|
|
97
|
-
this.hide();
|
|
98
|
-
break;
|
|
99
|
-
case false:
|
|
100
|
-
this.show();
|
|
101
|
-
break;
|
|
102
|
-
case null:
|
|
103
|
-
this.reset();
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
}), catchError(err => {
|
|
107
|
-
console.error(err);
|
|
108
|
-
return of(null);
|
|
109
|
-
})).subscribe());
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
ngOnDestroy() {
|
|
113
|
-
this.subscription.unsubscribe();
|
|
114
|
-
}
|
|
115
|
-
hide() {
|
|
116
|
-
this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'none');
|
|
117
|
-
}
|
|
118
|
-
show() {
|
|
119
|
-
this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'block');
|
|
120
|
-
}
|
|
121
|
-
reset() {
|
|
122
|
-
this.renderer.removeStyle(this.elementRef.nativeElement, 'display');
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
FormFieldHideShowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormFieldHideShowDirective, deps: [{ token: MAT_FORM_FIELD }, { token: Renderer2 }, { token: ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
126
|
-
FormFieldHideShowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: FormFieldHideShowDirective, selector: "mat-form-field[rxapHideShow]", ngImport: i0 });
|
|
127
|
-
FormFieldHideShowDirective = __decorate([
|
|
128
|
-
Mixin(ExtractHideShowMixin, ExtractFormDefinitionMixin),
|
|
129
|
-
__metadata("design:paramtypes", [MatFormField,
|
|
130
|
-
Renderer2,
|
|
131
|
-
ElementRef])
|
|
132
|
-
], FormFieldHideShowDirective);
|
|
133
|
-
export { FormFieldHideShowDirective };
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormFieldHideShowDirective, decorators: [{
|
|
135
|
-
type: Directive,
|
|
136
|
-
args: [{
|
|
137
|
-
selector: 'mat-form-field[rxapHideShow]'
|
|
138
|
-
}]
|
|
139
|
-
}], ctorParameters: function () { return [{ type: i1.MatFormField, decorators: [{
|
|
140
|
-
type: Inject,
|
|
141
|
-
args: [MAT_FORM_FIELD]
|
|
142
|
-
}] }, { type: i0.Renderer2, decorators: [{
|
|
143
|
-
type: Inject,
|
|
144
|
-
args: [Renderer2]
|
|
145
|
-
}] }, { type: i0.ElementRef, decorators: [{
|
|
146
|
-
type: Inject,
|
|
147
|
-
args: [ElementRef]
|
|
148
|
-
}] }]; } });
|
|
149
|
-
export class FormFieldHideShowDirectiveModule {
|
|
150
|
-
}
|
|
151
|
-
FormFieldHideShowDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormFieldHideShowDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
152
|
-
FormFieldHideShowDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormFieldHideShowDirectiveModule, declarations: [FormFieldHideShowDirective], exports: [FormFieldHideShowDirective] });
|
|
153
|
-
FormFieldHideShowDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormFieldHideShowDirectiveModule });
|
|
154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: FormFieldHideShowDirectiveModule, decorators: [{
|
|
155
|
-
type: NgModule,
|
|
156
|
-
args: [{
|
|
157
|
-
declarations: [FormFieldHideShowDirective],
|
|
158
|
-
exports: [FormFieldHideShowDirective]
|
|
159
|
-
}]
|
|
160
|
-
}] });
|
|
161
|
-
//# sourceMappingURL=form-field-hide-show.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-field-hide-show.directive.js","sourceRoot":"","sources":["../../../../../../libs/material/form-system/src/lib/form-field-hide-show.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,SAAS,EACT,UAAU,EACV,MAAM,EACN,QAAQ,EAGR,SAAS,EACV,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,cAAc,EACd,YAAY,EACb,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,EAAE,EACF,YAAY,EACb,MAAM,MAAM,CAAC;AACd,OAAO,EAEL,eAAe,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EAGL,0BAA0B,EAC1B,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC/B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EACL,UAAU,EACV,SAAS,EACT,GAAG,EACJ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;;;AAE/D,MAAM,OAAO,oBAAoB;IAMxB,cAAc,CACnB,cAAoD,EAC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O,EAAO,CAAE,0BAA0B,CAAE;iBAC7C","sourcesContent":["import {\n AfterContentInit,\n Directive,\n ElementRef,\n Inject,\n NgModule,\n OnDestroy,\n OnInit,\n Renderer2\n} from '@angular/core';\nimport {\n MAT_FORM_FIELD,\n MatFormField\n} from '@angular/material/form-field';\nimport {\n of,\n Subscription\n} from 'rxjs';\nimport {\n FormDefinition,\n RxapFormControl\n} from '@rxap/forms';\nimport {\n ControlHideShowFunction,\n ControlHideShowOptions,\n ExtractFormDefinitionMixin,\n RXAP_FORM_SYSTEM_HIDE_METADATA,\n RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS,\n RXAP_FORM_SYSTEM_SHOW_METADATA\n} from '@rxap/form-system';\nimport { Mixin } from '@rxap/mixin';\nimport {\n catchError,\n startWith,\n tap\n} from 'rxjs/operators';\nimport { getMetadata } from '@rxap/utilities/reflect-metadata';\n\nexport class ExtractHideShowMixin {\n\n public controlId!: string;\n public control?: RxapFormControl;\n public formDefinition!: FormDefinition;\n\n public extractOptions(\n formDefinition: FormDefinition = this.formDefinition,\n controlId: string = this.control?.controlId ?? this.controlId\n ): ControlHideShowOptions {\n const map = getMetadata<Map<string, ControlHideShowOptions>>(RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(controlId)) {\n return {};\n }\n\n return map.get(controlId)!;\n\n }\n\n public extractHideFunction(\n formDefinition: FormDefinition = this.formDefinition,\n controlId: string = this.control?.controlId ?? this.controlId\n ): ControlHideShowFunction | null {\n const map = getMetadata<Map<string, ControlHideShowFunction>>(RXAP_FORM_SYSTEM_HIDE_METADATA, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(controlId)) {\n return null;\n }\n\n return map.get(controlId)!;\n\n }\n\n public extractShowFunction(\n formDefinition: FormDefinition = this.formDefinition,\n controlId: string = this.control?.controlId ?? this.controlId\n ): ControlHideShowFunction | null {\n const map = getMetadata<Map<string, ControlHideShowFunction>>(RXAP_FORM_SYSTEM_SHOW_METADATA, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(controlId)) {\n return null;\n }\n\n return map.get(controlId)!;\n\n }\n\n}\n\nexport interface FormFieldHideShowDirective extends ExtractHideShowMixin, ExtractFormDefinitionMixin, OnInit, OnDestroy {\n}\n\n// TODO : create mixin for hide and show logic (this class and ControlHideShowDirective in @rxap/form-system)\n\n@Mixin(ExtractHideShowMixin, ExtractFormDefinitionMixin)\n@Directive({\n selector: 'mat-form-field[rxapHideShow]'\n})\nexport class FormFieldHideShowDirective implements AfterContentInit, OnDestroy {\n\n private subscription = new Subscription();\n public controlId!: string;\n public formDefinition!: FormDefinition;\n public control!: RxapFormControl;\n\n constructor(\n @Inject(MAT_FORM_FIELD)\n private readonly formField: MatFormField,\n @Inject(Renderer2)\n private readonly renderer: Renderer2,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef\n ) {\n }\n\n public ngAfterContentInit() {\n const control = this.formField._control.ngControl?.control;\n if (!control) {\n throw new Error('The form field has not a control associated!');\n }\n if (!(control instanceof RxapFormControl)) {\n throw new Error('The associated control is not a RxapFormControl');\n }\n this.control = control;\n this.formDefinition = this.extractFormDefinition(control);\n const hideFunction = this.extractHideFunction(this.formDefinition);\n const showFunction = this.extractShowFunction(this.formDefinition);\n const options = this.extractOptions(this.formDefinition);\n let changeTrigger = this.formDefinition.rxapFormGroup.valueChanges;\n\n if (options.rootChange) {\n changeTrigger = this.formDefinition.rxapFormGroup.root.valueChanges;\n }\n\n changeTrigger = changeTrigger.pipe(startWith(null));\n if (showFunction) {\n this.subscription.add(\n changeTrigger.pipe(\n tap(() => {\n // TODO : resubscribe if the showFunction throws an error\n const show = showFunction.call(this.formDefinition, control);\n\n switch (show) {\n\n case true:\n this.show();\n break;\n\n case false:\n this.hide();\n break;\n\n case null:\n this.reset();\n break;\n\n }\n\n }),\n catchError(err => {\n console.error(err);\n return of(null);\n })\n ).subscribe()\n );\n }\n\n if (hideFunction) {\n this.subscription.add(\n changeTrigger.pipe(\n tap(() => {\n // TODO : resubscribe if the hideFunction throws an error\n const hide = hideFunction.call(this.formDefinition, control);\n\n switch (hide) {\n\n case true:\n this.hide();\n break;\n\n case false:\n this.show();\n break;\n\n case null:\n this.reset();\n break;\n\n }\n\n }),\n catchError(err => {\n console.error(err);\n return of(null);\n })\n ).subscribe()\n );\n }\n }\n\n public ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n private hide() {\n this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'none');\n }\n\n private show() {\n this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'block');\n }\n\n private reset() {\n this.renderer.removeStyle(this.elementRef.nativeElement, 'display');\n }\n\n}\n\n@NgModule({\n declarations: [ FormFieldHideShowDirective ],\n exports: [ FormFieldHideShowDirective ]\n})\nexport class FormFieldHideShowDirectiveModule {\n}\n"]}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { NgModule, Directive, Inject, HostListener, HostBinding } from '@angular/core';
|
|
2
|
-
import { MatFormField, MAT_FORM_FIELD } from '@angular/material/form-field';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/material/form-field";
|
|
5
|
-
export class InputClearButtonDirective {
|
|
6
|
-
constructor(formField) {
|
|
7
|
-
this.formField = formField;
|
|
8
|
-
this.type = 'button';
|
|
9
|
-
this.tabIndex = '-1';
|
|
10
|
-
}
|
|
11
|
-
get control() {
|
|
12
|
-
return this.formField._control;
|
|
13
|
-
}
|
|
14
|
-
get isDisabled() {
|
|
15
|
-
return this.control.disabled;
|
|
16
|
-
}
|
|
17
|
-
onClick() {
|
|
18
|
-
if (this.control.ngControl) {
|
|
19
|
-
this.control.ngControl.reset();
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
this.control.value = null;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
InputClearButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: InputClearButtonDirective, deps: [{ token: MAT_FORM_FIELD }], target: i0.ɵɵFactoryTarget.Directive });
|
|
27
|
-
InputClearButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: InputClearButtonDirective, selector: "[rxapInputClearButton]", host: { listeners: { "click": "onClick()" }, properties: { "attr.type": "this.type", "attr.tabindex": "this.tabIndex", "disabled": "this.isDisabled" } }, ngImport: i0 });
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: InputClearButtonDirective, decorators: [{
|
|
29
|
-
type: Directive,
|
|
30
|
-
args: [{
|
|
31
|
-
selector: '[rxapInputClearButton]'
|
|
32
|
-
}]
|
|
33
|
-
}], ctorParameters: function () { return [{ type: i1.MatFormField, decorators: [{
|
|
34
|
-
type: Inject,
|
|
35
|
-
args: [MAT_FORM_FIELD]
|
|
36
|
-
}] }]; }, propDecorators: { type: [{
|
|
37
|
-
type: HostBinding,
|
|
38
|
-
args: ['attr.type']
|
|
39
|
-
}], tabIndex: [{
|
|
40
|
-
type: HostBinding,
|
|
41
|
-
args: ['attr.tabindex']
|
|
42
|
-
}], isDisabled: [{
|
|
43
|
-
type: HostBinding,
|
|
44
|
-
args: ['disabled']
|
|
45
|
-
}], onClick: [{
|
|
46
|
-
type: HostListener,
|
|
47
|
-
args: ['click']
|
|
48
|
-
}] } });
|
|
49
|
-
export class InputClearButtonDirectiveModule {
|
|
50
|
-
}
|
|
51
|
-
InputClearButtonDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: InputClearButtonDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
52
|
-
InputClearButtonDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: InputClearButtonDirectiveModule, declarations: [InputClearButtonDirective], exports: [InputClearButtonDirective] });
|
|
53
|
-
InputClearButtonDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: InputClearButtonDirectiveModule });
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: InputClearButtonDirectiveModule, decorators: [{
|
|
55
|
-
type: NgModule,
|
|
56
|
-
args: [{
|
|
57
|
-
declarations: [InputClearButtonDirective],
|
|
58
|
-
exports: [InputClearButtonDirective]
|
|
59
|
-
}]
|
|
60
|
-
}] });
|
|
61
|
-
//# sourceMappingURL=input-clear-button.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-clear-button.directive.js","sourceRoot":"","sources":["../../../../../../libs/material/form-system/src/lib/input-clear-button.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,MAAM,EACN,YAAY,EACZ,WAAW,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EACZ,cAAc,EACf,MAAM,8BAA8B,CAAC;;;AAKtC,MAAM,OAAO,yBAAyB;IAiBpC,YAEU,SAAuB;QAAvB,cAAS,GAAT,SAAS,CAAc;QAhB1B,SAAI,GAAG,QAAQ,CAAC;QAGhB,aAAQ,GAAG,IAAI,CAAC;IAcpB,CAAC;IAZJ,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;IACjC,CAAC;IAED,IACW,UAAU;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC/B,CAAC;IAQM,OAAO;QACZ,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE;YAC1B,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;SAChC;aAAM;YACL,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;SAC3B;IACH,CAAC;;sHA7BU,yBAAyB,kBAkB1B,cAAc;0GAlBb,yBAAyB;2FAAzB,yBAAyB;kBAHrC,SAAS;mBAAC;oBACT,QAAQ,EAAE,wBAAwB;iBACnC;;0BAmBI,MAAM;2BAAC,cAAc;4CAfjB,IAAI;sBADV,WAAW;uBAAC,WAAW;gBAIjB,QAAQ;sBADd,WAAW;uBAAC,eAAe;gBAQjB,UAAU;sBADpB,WAAW;uBAAC,UAAU;gBAWhB,OAAO;sBADb,YAAY;uBAAC,OAAO;;AAgBvB,MAAM,OAAO,+BAA+B;;4HAA/B,+BAA+B;6HAA/B,+BAA+B,iBAtC/B,yBAAyB,aAAzB,yBAAyB;6HAsCzB,+BAA+B;2FAA/B,+BAA+B;kBAJ3C,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,yBAAyB,CAAE;oBAC3C,OAAO,EAAO,CAAE,yBAAyB,CAAE;iBAC5C","sourcesContent":["import {\n NgModule,\n Directive,\n Inject,\n HostListener,\n HostBinding\n} from '@angular/core';\nimport {\n MatFormField,\n MAT_FORM_FIELD\n} from '@angular/material/form-field';\n\n@Directive({\n selector: '[rxapInputClearButton]'\n})\nexport class InputClearButtonDirective {\n\n @HostBinding('attr.type')\n public type = 'button';\n\n @HostBinding('attr.tabindex')\n public tabIndex = '-1';\n\n public get control() {\n return this.formField._control;\n }\n\n @HostBinding('disabled')\n public get isDisabled() {\n return this.control.disabled;\n }\n\n constructor(\n @Inject(MAT_FORM_FIELD)\n private formField: MatFormField\n ) {}\n\n @HostListener('click')\n public onClick() {\n if (this.control.ngControl) {\n this.control.ngControl.reset();\n } else {\n this.control.value = null;\n }\n }\n\n\n}\n\n@NgModule({\n declarations: [ InputClearButtonDirective ],\n exports: [ InputClearButtonDirective ]\n})\nexport class InputClearButtonDirectiveModule {}\n"]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { ControlErrorDirectiveModule } from './control-error.directive';
|
|
3
|
-
import { ControlErrorsDirectiveModule } from './control-errors.directive';
|
|
4
|
-
import { InputClearButtonDirectiveModule } from './input-clear-button.directive';
|
|
5
|
-
import { RequiredDirectiveModule } from './required.directive';
|
|
6
|
-
import { FormFieldHideShowDirectiveModule } from './form-field-hide-show.directive';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export class MaterialFormSystemModule {
|
|
9
|
-
}
|
|
10
|
-
MaterialFormSystemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MaterialFormSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
11
|
-
MaterialFormSystemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MaterialFormSystemModule, exports: [ControlErrorDirectiveModule,
|
|
12
|
-
ControlErrorsDirectiveModule,
|
|
13
|
-
InputClearButtonDirectiveModule,
|
|
14
|
-
RequiredDirectiveModule,
|
|
15
|
-
FormFieldHideShowDirectiveModule] });
|
|
16
|
-
MaterialFormSystemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MaterialFormSystemModule, imports: [ControlErrorDirectiveModule,
|
|
17
|
-
ControlErrorsDirectiveModule,
|
|
18
|
-
InputClearButtonDirectiveModule,
|
|
19
|
-
RequiredDirectiveModule,
|
|
20
|
-
FormFieldHideShowDirectiveModule] });
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: MaterialFormSystemModule, decorators: [{
|
|
22
|
-
type: NgModule,
|
|
23
|
-
args: [{
|
|
24
|
-
exports: [
|
|
25
|
-
ControlErrorDirectiveModule,
|
|
26
|
-
ControlErrorsDirectiveModule,
|
|
27
|
-
InputClearButtonDirectiveModule,
|
|
28
|
-
RequiredDirectiveModule,
|
|
29
|
-
FormFieldHideShowDirectiveModule
|
|
30
|
-
]
|
|
31
|
-
}]
|
|
32
|
-
}] });
|
|
33
|
-
//# sourceMappingURL=material-form-system.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"material-form-system.module.js","sourceRoot":"","sources":["../../../../../../libs/material/form-system/src/lib/material-form-system.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;;AAWpF,MAAM,OAAO,wBAAwB;;qHAAxB,wBAAwB;sHAAxB,wBAAwB,YAPjC,2BAA2B;QAC3B,4BAA4B;QAC5B,+BAA+B;QAC/B,uBAAuB;QACvB,gCAAgC;sHAGvB,wBAAwB,YAPjC,2BAA2B;QAC3B,4BAA4B;QAC5B,+BAA+B;QAC/B,uBAAuB;QACvB,gCAAgC;2FAGvB,wBAAwB;kBATpC,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,2BAA2B;wBAC3B,4BAA4B;wBAC5B,+BAA+B;wBAC/B,uBAAuB;wBACvB,gCAAgC;qBACjC;iBACF","sourcesContent":["import { NgModule } from '@angular/core';\nimport { ControlErrorDirectiveModule } from './control-error.directive';\nimport { ControlErrorsDirectiveModule } from './control-errors.directive';\nimport { InputClearButtonDirectiveModule } from './input-clear-button.directive';\nimport { RequiredDirectiveModule } from './required.directive';\nimport { FormFieldHideShowDirectiveModule } from './form-field-hide-show.directive';\n\n@NgModule({\n exports: [\n ControlErrorDirectiveModule,\n ControlErrorsDirectiveModule,\n InputClearButtonDirectiveModule,\n RequiredDirectiveModule,\n FormFieldHideShowDirectiveModule\n ]\n})\nexport class MaterialFormSystemModule {}\n"]}
|