@muziehdesign/forms 18.2.0-beta.866 → 18.2.0-beta.882

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.
@@ -1,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, Input, forwardRef, Directive, Optional, SkipSelf, ContentChild, HostListener, NgModule } from '@angular/core';
2
+ import { Injectable, Input, Component, forwardRef, Directive, Optional, SkipSelf, ContentChild, HostListener, NgModule } from '@angular/core';
3
3
  import * as Yup from 'yup';
4
4
  import { object } from 'yup';
5
5
  import 'reflect-metadata';
6
6
  import * as i1$1 from '@angular/forms';
7
- import { FormGroup, FormArray, NG_VALUE_ACCESSOR, FormsModule as FormsModule$1, ControlContainer, NgModelGroup, NgForm, NgModel } from '@angular/forms';
7
+ import { FormGroup, FormArray, NG_VALUE_ACCESSOR, FormsModule as FormsModule$1, NgModel, NgModelGroup, NgForm, ControlContainer } from '@angular/forms';
8
8
  import { BehaviorSubject, switchMap, from } from 'rxjs';
9
9
  import * as i1 from '@angular/common';
10
10
  import { CommonModule } from '@angular/common';
@@ -273,10 +273,10 @@ class ModelSchemaFactory {
273
273
  }
274
274
  return schema;
275
275
  }
276
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModelSchemaFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
277
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModelSchemaFactory, providedIn: 'root' }); }
276
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ModelSchemaFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
277
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ModelSchemaFactory, providedIn: 'root' }); }
278
278
  }
279
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ModelSchemaFactory, decorators: [{
279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ModelSchemaFactory, decorators: [{
280
280
  type: Injectable,
281
281
  args: [{
282
282
  providedIn: 'root',
@@ -501,10 +501,10 @@ class NgFormModelStateFactory {
501
501
  const modelState = new NgFormModelState(form, this.factory.build(model), options);
502
502
  return modelState;
503
503
  }
504
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NgFormModelStateFactory, deps: [{ token: ModelSchemaFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
505
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NgFormModelStateFactory, providedIn: 'root' }); }
504
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgFormModelStateFactory, deps: [{ token: ModelSchemaFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
505
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgFormModelStateFactory, providedIn: 'root' }); }
506
506
  }
507
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NgFormModelStateFactory, decorators: [{
507
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgFormModelStateFactory, decorators: [{
508
508
  type: Injectable,
509
509
  args: [{
510
510
  providedIn: 'root',
@@ -516,12 +516,12 @@ class FieldErrorsComponent {
516
516
  const errorKeys = Object.keys(this.field?.errors || {});
517
517
  return errorKeys.length > 0 ? (this.field?.errors)[errorKeys[0]] : '';
518
518
  }
519
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FieldErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
520
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FieldErrorsComponent, selector: "mz-field-errors", inputs: { field: "field" }, ngImport: i0, template: "<div class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
519
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: FieldErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
520
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.8", type: FieldErrorsComponent, isStandalone: false, selector: "mz-field-errors", inputs: { field: "field" }, ngImport: i0, template: "<div class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
521
521
  }
522
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FieldErrorsComponent, decorators: [{
522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: FieldErrorsComponent, decorators: [{
523
523
  type: Component,
524
- args: [{ selector: 'mz-field-errors', template: "<div class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\n" }]
524
+ args: [{ selector: 'mz-field-errors', standalone: false, template: "<div class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\n" }]
525
525
  }], propDecorators: { field: [{
526
526
  type: Input
527
527
  }] } });
@@ -618,8 +618,8 @@ class DateValueAccessor {
618
618
  newDate.setHours(0, 0, 0);
619
619
  return newDate;
620
620
  }
621
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DateValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
622
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: DateValueAccessor, isStandalone: true, selector: "[mzDate]", host: { listeners: { "input": "onChange($event.target.value)", "blur": "onTouched()" } }, providers: [
621
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DateValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
622
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: DateValueAccessor, isStandalone: true, selector: "[mzDate]", host: { listeners: { "input": "onChange($event.target.value)", "blur": "onTouched()" } }, providers: [
623
623
  {
624
624
  provide: NG_VALUE_ACCESSOR,
625
625
  useExisting: forwardRef(() => DateValueAccessor),
@@ -627,7 +627,7 @@ class DateValueAccessor {
627
627
  },
628
628
  ], ngImport: i0 }); }
629
629
  }
630
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DateValueAccessor, decorators: [{
630
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: DateValueAccessor, decorators: [{
631
631
  type: Directive,
632
632
  args: [{
633
633
  selector: '[mzDate]',
@@ -681,8 +681,8 @@ class MzCheckboxGroup {
681
681
  this.onChange(this.selections);
682
682
  this.onTouched();
683
683
  }
684
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MzCheckboxGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
685
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MzCheckboxGroup, isStandalone: true, selector: "mz-checkbox-group", inputs: { options: "options", disabled: "disabled" }, providers: [
684
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MzCheckboxGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
685
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: MzCheckboxGroup, isStandalone: true, selector: "mz-checkbox-group", inputs: { options: "options", disabled: "disabled" }, providers: [
686
686
  {
687
687
  provide: NG_VALUE_ACCESSOR,
688
688
  useExisting: forwardRef(() => MzCheckboxGroup),
@@ -690,9 +690,9 @@ class MzCheckboxGroup {
690
690
  },
691
691
  ], ngImport: i0, template: "@for(option of options; track $index) {\n <label class=\"field-option\">\n <input type=\"checkbox\" class=\"form-checkbox\" [disabled]=\"disabled\" [value]=\"option.value\" [checked]=\"isChecked(option)\" (change)=\"onCheckboxChange($event, option)\" />\n <span class=\"checkbox-label\">{{option.label}}</span>\n </label>\n}\n", dependencies: [{ kind: "ngmodule", type: FormsModule$1 }] }); }
692
692
  }
693
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MzCheckboxGroup, decorators: [{
693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MzCheckboxGroup, decorators: [{
694
694
  type: Component,
695
- args: [{ selector: 'mz-checkbox-group', standalone: true, imports: [FormsModule$1], providers: [
695
+ args: [{ selector: 'mz-checkbox-group', imports: [FormsModule$1], providers: [
696
696
  {
697
697
  provide: NG_VALUE_ACCESSOR,
698
698
  useExisting: forwardRef(() => MzCheckboxGroup),
@@ -712,11 +712,9 @@ function getControlContainer(group, form) {
712
712
  return group ?? form;
713
713
  }
714
714
  class MzField {
715
- constructor(elementRef, container) {
715
+ constructor(elementRef) {
716
716
  this.elementRef = elementRef;
717
- this.container = container;
718
717
  this.controlType = 'other';
719
- console.log('container in field', container);
720
718
  }
721
719
  ngAfterContentInit() {
722
720
  //this.fieldMetadata = this.form.schema.getMetadata(this.ngModel?.path || []);
@@ -730,8 +728,8 @@ class MzField {
730
728
  return undefined;
731
729
  }
732
730
  }
733
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MzField, deps: [{ token: i0.ElementRef }, { token: i1$1.ControlContainer }], target: i0.ɵɵFactoryTarget.Component }); }
734
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MzField, isStandalone: true, selector: "mz-field", inputs: { label: "label", controlType: "controlType", schema: "schema" }, providers: [
731
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MzField, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
732
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: MzField, isStandalone: true, selector: "mz-field", inputs: { label: "label", controlType: "controlType", schema: "schema" }, providers: [
735
733
  {
736
734
  provide: ControlContainer,
737
735
  useFactory: getControlContainer,
@@ -739,16 +737,16 @@ class MzField {
739
737
  }
740
738
  ], queries: [{ propertyName: "ngModel", first: true, predicate: NgModel, descendants: true }], ngImport: i0, template: "<label class=\"field\">\n @if(label && controlType !== 'checkbox') {\n <span class=\"field-label\">\n {{ label }} \n </span>\n }\n <ng-content></ng-content>\n\n @if(controlType === 'checkbox' && label) {\n <span class=\"checkbox-label\">{{ label }}</span>\n } \n @if(ngModel?.touched && ngModel?.invalid) {\n <div class=\"field-error\">\n {{ getErrorMessage() }}\n </div>\n }\n</label>\n" }); }
741
739
  }
742
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MzField, decorators: [{
740
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MzField, decorators: [{
743
741
  type: Component,
744
- args: [{ selector: 'mz-field', standalone: true, imports: [], providers: [
742
+ args: [{ selector: 'mz-field', imports: [], providers: [
745
743
  {
746
744
  provide: ControlContainer,
747
745
  useFactory: getControlContainer,
748
746
  deps: [[new Optional(), new SkipSelf(), NgModelGroup], [new Optional(), new SkipSelf(), NgForm]]
749
747
  }
750
748
  ], template: "<label class=\"field\">\n @if(label && controlType !== 'checkbox') {\n <span class=\"field-label\">\n {{ label }} \n </span>\n }\n <ng-content></ng-content>\n\n @if(controlType === 'checkbox' && label) {\n <span class=\"checkbox-label\">{{ label }}</span>\n } \n @if(ngModel?.touched && ngModel?.invalid) {\n <div class=\"field-error\">\n {{ getErrorMessage() }}\n </div>\n }\n</label>\n" }]
751
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.ControlContainer }], propDecorators: { label: [{
749
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { label: [{
752
750
  type: Input
753
751
  }], controlType: [{
754
752
  type: Input
@@ -773,10 +771,10 @@ class MzForm {
773
771
  event.stopImmediatePropagation();
774
772
  }
775
773
  }
776
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MzForm, deps: [{ token: i1$1.NgForm }], target: i0.ɵɵFactoryTarget.Directive }); }
777
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MzForm, isStandalone: true, selector: "[mzForm]", inputs: { schema: "schema" }, host: { listeners: { "submit": "onSubmit($event)" } }, ngImport: i0 }); }
774
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MzForm, deps: [{ token: i1$1.NgForm }], target: i0.ɵɵFactoryTarget.Directive }); }
775
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: MzForm, isStandalone: true, selector: "[mzForm]", inputs: { schema: "schema" }, host: { listeners: { "submit": "onSubmit($event)" } }, ngImport: i0 }); }
778
776
  }
779
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MzForm, decorators: [{
777
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MzForm, decorators: [{
780
778
  type: Directive,
781
779
  args: [{
782
780
  selector: '[mzForm]',
@@ -794,13 +792,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
794
792
  * @deprecated
795
793
  */
796
794
  class FormsModule {
797
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
798
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: FormsModule, declarations: [FieldErrorsComponent], imports: [CommonModule // TODO: can remove once done with temp error displaying
795
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: FormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
796
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: FormsModule, declarations: [FieldErrorsComponent], imports: [CommonModule // TODO: can remove once done with temp error displaying
799
797
  ], exports: [FieldErrorsComponent] }); }
800
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormsModule, imports: [CommonModule // TODO: can remove once done with temp error displaying
798
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: FormsModule, imports: [CommonModule // TODO: can remove once done with temp error displaying
801
799
  ] }); }
802
800
  }
803
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormsModule, decorators: [{
801
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: FormsModule, decorators: [{
804
802
  type: NgModule,
805
803
  args: [{
806
804
  providers: [],
@@ -816,17 +814,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
816
814
  }]
817
815
  }] });
818
816
  class MzFormsModule {
819
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MzFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
820
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MzFormsModule, imports: [MzField,
817
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MzFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
818
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: MzFormsModule, imports: [MzField,
821
819
  MzForm,
822
820
  DateValueAccessor,
823
821
  MzCheckboxGroup], exports: [MzField,
824
822
  MzForm,
825
823
  DateValueAccessor,
826
824
  MzCheckboxGroup] }); }
827
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MzFormsModule, imports: [MzCheckboxGroup] }); }
825
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MzFormsModule, imports: [MzCheckboxGroup] }); }
828
826
  }
829
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MzFormsModule, decorators: [{
827
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: MzFormsModule, decorators: [{
830
828
  type: NgModule,
831
829
  args: [{
832
830
  providers: [],
@@ -1 +1 @@
1
- {"version":3,"file":"muziehdesign-forms.mjs","sources":["../../../../projects/muziehdesign/forms/src/lib/model-schema.ts","../../../../projects/muziehdesign/forms/src/lib/constants.ts","../../../../projects/muziehdesign/forms/src/lib/field-schema.ts","../../../../projects/muziehdesign/forms/src/lib/model-schema.factory.ts","../../../../projects/muziehdesign/forms/src/lib/type-annotations.ts","../../../../projects/muziehdesign/forms/src/lib/ngform-model-state.ts","../../../../projects/muziehdesign/forms/src/lib/ng-form-model-state.service.ts","../../../../projects/muziehdesign/forms/src/lib/field-errors/field-errors.component.ts","../../../../projects/muziehdesign/forms/src/lib/field-errors/field-errors.component.html","../../../../projects/muziehdesign/forms/src/lib/masks.ts","../../../../projects/muziehdesign/forms/src/lib/date-value-accessor.directive.ts","../../../../projects/muziehdesign/forms/src/lib/checkbox-group/checkbox-group.component.ts","../../../../projects/muziehdesign/forms/src/lib/checkbox-group/checkbox-group.component.html","../../../../projects/muziehdesign/forms/src/lib/field/field.component.ts","../../../../projects/muziehdesign/forms/src/lib/field/field.component.html","../../../../projects/muziehdesign/forms/src/lib/form/form.directive.ts","../../../../projects/muziehdesign/forms/src/lib/forms.module.ts","../../../../projects/muziehdesign/forms/src/public-api.ts","../../../../projects/muziehdesign/forms/src/muziehdesign-forms.ts"],"sourcesContent":["import { AnyObjectSchema, SchemaOf, ValidationError } from 'yup';\nimport { FieldError } from './field-error';\nimport { FieldSchema } from './field-schema';\nexport class ModelSchema<T> {\n // TODO: need to keep track of internal and external\n //private definitions?: {[K in keyof T]: FieldSchema<any>};\n constructor(private metadata: FieldSchema<any>[], private schema: AnyObjectSchema) {\n\n }\n \n getMetadata(paths: string[]) {\n //console.log('fetching metadata for path: ', paths);\n //console.log(this.schema.describe());\n for(var i = 0; i < paths.length; i++) {\n const field = this.metadata.find(f=>f.name === paths[i]);\n if(!field?.constraints.required || field.constraints.required.required === false) {\n return { required: false } satisfies FieldMetadata;\n }\n }\n return { required: true } satisfies FieldMetadata;\n\n }\n\n validate<T>(model: T): Promise<FieldError[]> {\n return this.schema\n .validate(model, { abortEarly: false })\n .then(() => {\n return [];\n })\n .catch((e: ValidationError) => {\n return e.inner.map((error) => <FieldError>{ path: error.path, type: error.type, message: error.message });\n });\n }\n\n cast(value: any) {\n return this.schema.cast(value);\n }\n}\n\nexport type SchemaDefinition<T> = {\n //[K in keyof Required<T>]: T[K] extends object ? SchemaDefinition<T[K]>: FieldSchema<any>;\n [K in keyof Required<T>]: FieldSchema<any>\n}\n\nexport interface FieldMetadata {\n required: boolean;\n}","export const SCHEMA_METADATA_NAMESPACE = 'custom:muziehdesign:annotations';\n","import { ArrayTypeAnnotations, BooleanTypeAnnotations, ConstraintAnnotations, DateTypeAnnotations, FileTypeAnnotations, NumberTypeAnnotations, ObjectTypeAnnotations, StringTypeAnnotations } from './type-annotations';\n\nexport enum FieldSchemaType {\n string = 'string',\n boolean = 'boolean',\n date = 'date',\n object = 'object',\n number = 'number',\n array = 'array',\n file = 'file',\n}\n\nexport interface FieldSchema<T extends ConstraintAnnotations> {\n name: string;\n type: FieldSchemaType;\n label?: string;\n constraints: T;\n}\n\nexport interface StringSchema extends FieldSchema<StringTypeAnnotations> {\n type: FieldSchemaType.string;\n}\n\nexport interface NumberSchema extends FieldSchema<NumberTypeAnnotations> {\n type: FieldSchemaType.number;\n}\n\nexport interface BooleanSchema extends FieldSchema<BooleanTypeAnnotations> {\n type: FieldSchemaType.boolean;\n}\n\nexport interface DateSchema extends FieldSchema<DateTypeAnnotations> {\n type: FieldSchemaType.date;\n}\n\nexport interface ArraySchema extends FieldSchema<ArrayTypeAnnotations> {\n type: FieldSchemaType.array;\n}\n\nexport interface FileSchema extends FieldSchema<FileTypeAnnotations> {\n type: FieldSchemaType.file;\n}\n\nexport interface ObjectSchema extends FieldSchema<ObjectTypeAnnotations> {\n type: FieldSchemaType.object;\n}\n\nexport const buildStringSchema = (path: string, constraints: StringTypeAnnotations, label?: string) => {\n return {\n name: path,\n label: label,\n type: FieldSchemaType.string,\n constraints: { ...constraints },\n } satisfies StringSchema;\n};\n\nexport const buildBooleanSchema = (path: string, constraints: BooleanTypeAnnotations, label?: string) => {\n return {\n name: path,\n label: label,\n type: FieldSchemaType.boolean,\n constraints: { ...constraints },\n } satisfies BooleanSchema;\n};\n\nexport const buildNumberSchema = (path: string, constraints: NumberTypeAnnotations, label?: string) => {\n return {\n name: path,\n label: label,\n type: FieldSchemaType.number,\n constraints: { ...constraints },\n } satisfies NumberSchema;\n};\n\nexport const buildDateSchema = (path: string, constraints: DateTypeAnnotations, label?: string) => {\n return {\n name: path,\n label: label,\n type: FieldSchemaType.date,\n constraints: { ...constraints },\n } satisfies DateSchema;\n};\n\nexport const buildArraySchema = (path: string, constraints: ArrayTypeAnnotations, label?: string) => {\n return {\n name: path,\n label: label,\n type: FieldSchemaType.array,\n constraints: { ...constraints },\n } satisfies ArraySchema;\n};\n","import { Injectable } from '@angular/core';\nimport { object, SchemaOf } from 'yup';\nimport { ModelSchema } from './model-schema';\nimport { SCHEMA_METADATA_NAMESPACE } from './constants';\nimport { ObjectShape } from 'yup/lib/object';\nimport * as Yup from 'yup';\nimport { ArraySchema, BooleanSchema, DateSchema, FieldSchema, FieldSchemaType, FileSchema, NumberSchema, ObjectSchema, StringSchema } from './field-schema';\n\n/*\nSchema rules need to be built in the order they need to be evaluated in.\nFor example,\n ```\n schema.required().max(...).matches(...);\n ```\nevaluates the 3 rules in this order\n - required\n - max\n - matches\n*/\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ModelSchemaFactory {\n constructor() {}\n\n build<T extends object>(model: T): ModelSchema<T> {\n const metadata: Map<string, FieldSchema<any>> = Reflect.getMetadata(SCHEMA_METADATA_NAMESPACE, model);\n const schemaData = [...metadata.values()];\n const schema = this.buildYupSchema(schemaData);\n return new ModelSchema(schemaData, schema);\n }\n\n buildUntyped(raw: FieldSchema<any>[]) : ModelSchema<{[key: string]: string}> {\n const schema = this.buildYupSchema(raw);\n return new ModelSchema(raw, schema);\n }\n\n private buildYupSchema(fields: FieldSchema<any>[]) : Yup.AnyObjectSchema {\n let shape: ObjectShape = {};\n fields.forEach((value) => {\n if (value.type == FieldSchemaType.string) {\n shape[value.name] = this.buildStringSchema(value as StringSchema);\n } else if (value.type == FieldSchemaType.boolean) {\n shape[value.name] = this.buildBooleanSchema(value as BooleanSchema);\n } else if (value.type == FieldSchemaType.date) {\n shape[value.name] = this.buildDateSchema(value as DateSchema);\n } else if (value.type == FieldSchemaType.object) {\n shape[value.name] = this.buildNestedObjectSchema(value as ObjectSchema);\n } else if (value.type == FieldSchemaType.number) {\n shape[value.name] = this.buildNumberSchema(value as NumberSchema);\n } else if (value.type == FieldSchemaType.array) {\n shape[value.name] = this.buildArraySchema(value as ArraySchema);\n } else if (value.type == FieldSchemaType.file) {\n shape[value.name] = this.buildFileSchema(value as FileSchema);\n } else {\n throw new Error('Unrecognized field schema');\n }\n });\n\n return object(shape);\n }\n\n private buildStringSchema(original: StringSchema) {\n let schema = Yup.string();\n if(original.label) {\n schema.label(original.label);\n }\n\n const options = original.constraints; \n\n if (options.required) {\n schema = schema.required(options.required.message);\n }\n if (options.length) {\n schema = schema.length(options.length.length, options.length.message);\n }\n\n if (options.maxLength) {\n schema = schema.max(options.maxLength.maxLength, options.maxLength.message);\n }\n\n if (options.minLength) {\n schema = schema.min(options.minLength.minLength, options.minLength.message);\n }\n\n if (options.pattern) {\n schema = schema.matches(options.pattern.pattern, { message: options.pattern.message, excludeEmptyString: true });\n }\n\n return schema;\n }\n\n private buildBooleanSchema(original: BooleanSchema) {\n let schema = Yup.boolean();\n if(original.label) {\n schema.label(original.label);\n }\n\n const options = original.constraints; \n if (options.required) {\n schema = schema.required(options.required.message);\n }\n if (options.equals) {\n if (options.equals.equals) {\n schema = schema.isTrue(options.equals.message);\n } else {\n schema = schema.isFalse(options.equals.message);\n }\n }\n\n return schema;\n }\n\n private buildDateSchema(original: DateSchema) {\n let schema = Yup.date();\n if(original.label) {\n schema.label(original.label);\n }\n\n const options = original.constraints; \n if (options.required) {\n schema = schema.required(options.required.message);\n }\n if (options.min) {\n schema = schema.min(options.min.min, options.min.message);\n }\n if (options.max) {\n schema = schema.max(options.max.max, options.max.message);\n }\n if (options.test) {\n schema = schema.test({\n name: options.test.name,\n message: options.test.message,\n test: (d?: Date, context?: any) => {\n return options.test!.test(d!);\n },\n });\n }\n\n return schema;\n }\n\n private buildNumberSchema(original: NumberSchema) {\n let schema = Yup.number();\n if(original.label) {\n schema.label(original.label);\n }\n\n const options = original.constraints; \n if (options.required) {\n schema = schema.required(options.required.message);\n }\n if (options.min) {\n schema = schema.min(options.min.min, options.min.message);\n }\n if (options.max) {\n schema = schema.max(options.max.max, options.max.message);\n }\n\n return schema;\n }\n\n private buildArraySchema(original: ArraySchema) {\n let schema = Yup.array();\n if(original.label) {\n schema.label(original.label);\n }\n\n const options = original.constraints; \n\n if (options.min) {\n schema = schema.min(options.min.min, options.min.message);\n }\n if (options.max) {\n schema = schema.max(options.max.max, options.max.message);\n }\n\n return schema;\n }\n\n private buildNestedObjectSchema(original: ObjectSchema) {\n const metadata: Map<string, FieldSchema<any>> = Reflect.getMetadata(SCHEMA_METADATA_NAMESPACE, original.constraints.getInstance());\n\n let nestedSchema = this.buildYupSchema([...metadata.values()]);\n if(original.label) {\n nestedSchema.label(original.label);\n }\n\n const options = original.constraints; \n if (options.required) {\n nestedSchema = nestedSchema.required();\n } else {\n nestedSchema = nestedSchema.notRequired().default(undefined);\n }\n\n return nestedSchema;\n }\n\n private buildFileSchema(original: FileSchema) {\n let schema = Yup.mixed().nullable().optional();\n if(original.label) {\n schema.label(original.label);\n }\n\n const options = original.constraints; \n if (options.required) {\n schema = schema.required(options.required.message);\n }\n\n return schema;\n }\n}\n","import 'reflect-metadata';\nimport { ArraySchema, BooleanSchema, DateSchema, FieldSchema, FieldSchemaType, FileSchema, NumberSchema, ObjectSchema, StringSchema } from './field-schema';\n\nconst METADATA_KEY = 'custom:muziehdesign:annotations';\n\nexport interface ConstraintAnnotations {\n\n}\n\nexport interface StringTypeConstraints {\n required?: true;\n requiredMessage?: string;\n\n pattern?: RegExp;\n patternMessage?: string;\n\n length?: number;\n lengthMessage?: string;\n}\n\nexport interface StringTypeAnnotations extends ConstraintAnnotations {\n required?: RequiredAnnotation;\n length?: LengthAnnotation;\n pattern?: PatternAnnotation;\n maxLength?: MaxLengthAnnotation;\n minLength?: MinLengthAnnotation;\n}\n\nexport interface BooleanTypeAnnotations extends ConstraintAnnotations {\n required?: RequiredAnnotation;\n equals?: EqualsAnnotation<boolean>;\n}\n\nexport interface DateTypeAnnotations extends ConstraintAnnotations {\n required?: RequiredAnnotation;\n min?: MinimumAnnotation<Date>;\n max?: MaximumAnnotation<Date>;\n test?: TestAnnotation<Date>;\n}\n\nexport interface ObjectTypeAnnotations extends ConstraintAnnotations {\n required?: RequiredAnnotation;\n getInstance: () => any;\n}\n\nexport interface NumberTypeAnnotations extends ConstraintAnnotations {\n required?: RequiredAnnotation;\n min?: MinimumAnnotation<number>;\n max?: MaximumAnnotation<number>;\n}\n\nexport interface ArrayTypeAnnotations extends ConstraintAnnotations {\n min?: MinimumAnnotation<number>;\n max?: MaximumAnnotation<number>;\n}\n\nexport interface FileTypeAnnotations extends ConstraintAnnotations {\n required?: RequiredAnnotation;\n}\n\nexport interface ValidationAnnotation {\n message?: string;\n}\n\nexport interface RequiredAnnotation extends ValidationAnnotation {\n required: boolean;\n}\n\nexport interface LengthAnnotation extends ValidationAnnotation {\n length: number;\n}\n\nexport interface PatternAnnotation extends ValidationAnnotation {\n pattern: RegExp;\n}\n\nexport interface OfValuesAnnotation extends ValidationAnnotation {\n values: [];\n}\n\nexport interface EqualsAnnotation<T> extends ValidationAnnotation {\n equals: T;\n}\n\nexport interface MinimumAnnotation<T> extends ValidationAnnotation {\n min: T;\n}\n\nexport interface MaximumAnnotation<T> extends ValidationAnnotation {\n max: T;\n}\n\nexport interface TestAnnotation<T> extends ValidationAnnotation {\n test: (d: T) => boolean;\n name: string;\n}\n\nexport interface MaxLengthAnnotation extends ValidationAnnotation {\n maxLength: number;\n}\n\nexport interface MinLengthAnnotation extends ValidationAnnotation {\n minLength: number;\n}\n\nconst registerMetadata = (target: Object, propertyKey: string, schema: FieldSchema<any>) => {\n const metadata: Map<string, FieldSchema<any>> = Reflect.getMetadata(METADATA_KEY, target) || new Map<string, FieldSchema<any>>();\n metadata.set(propertyKey, schema);\n Reflect.defineMetadata(METADATA_KEY, metadata, target);\n};\n\nexport function StringType(...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.string,\n constraints: Object.assign({}, ...annotations) as StringTypeAnnotations\n } satisfies StringSchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function BooleanType(...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.boolean,\n constraints: Object.assign({}, ...annotations) as BooleanTypeAnnotations\n } satisfies BooleanSchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function DateType(...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.date,\n constraints: Object.assign({}, ...annotations) as DateTypeAnnotations\n } satisfies DateSchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function NumberType(...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.number,\n constraints: Object.assign({}, ...annotations) as NumberTypeAnnotations\n } satisfies NumberSchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function ObjectType<T>(type: { new (): T }, ...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.object,\n constraints: Object.assign({}, ...annotations, { getInstance: () => new type() } as Partial<ObjectTypeAnnotations>) as ObjectTypeAnnotations\n } satisfies ObjectSchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function ArrayType(...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.array,\n constraints: Object.assign({}, ...annotations) as ArrayTypeAnnotations\n } satisfies ArraySchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function FileType<T>(...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.file,\n constraints: Object.assign({}, ...annotations) as FileTypeAnnotations\n } satisfies FileSchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function required(message?: string): { [key: string]: RequiredAnnotation } {\n return { required: { required: true, message: message } };\n}\n\nexport function pattern(regex: RegExp, message?: string): { [key: string]: PatternAnnotation } {\n return { pattern: { pattern: regex, message: message } };\n}\n\nexport function length(length: number, message?: string): { [key: string]: LengthAnnotation } {\n return { length: { length: length, message: message } };\n}\n\nexport function maxLength(maxLength: number, message?: string): { [key: string]: MaxLengthAnnotation } {\n return { maxLength: { maxLength: maxLength, message: message } };\n}\n\nexport function minLength(minLength: number, message?: string): { [key: string]: MinLengthAnnotation } {\n return { minLength: { minLength: minLength, message: message } };\n}\n\nexport function ofValues(values: [], message?: string): { [key: string]: OfValuesAnnotation } {\n return { ofValues: { values: values, message: message } };\n}\n\nexport function equals<T>(value: T, message?: string): { [key: string]: EqualsAnnotation<T> } {\n return { equals: { equals: value, message: message } };\n}\n\nexport function min<T>(value: T, message?: string): { [key: string]: MinimumAnnotation<T> } {\n return { min: { min: value, message: message } };\n}\n\nexport function max<T>(value: T, message?: string): { [key: string]: MaximumAnnotation<T> } {\n return { max: { max: value, message: message } };\n}\n\nexport function test<T>(name: string, test: (d: T) => boolean, message?: string): { [key: string]: TestAnnotation<T> } {\n return { test: { name: name, test: test, message: message } };\n}\n","import { AbstractControl, FormArray, FormGroup, NgForm, ValidationErrors } from '@angular/forms';\nimport { BehaviorSubject, from, switchMap } from 'rxjs';\nimport { FieldError } from './field-error';\nimport { ModelStateOptions } from './model-state-options';\nimport { ModelStateResult } from './model-state-result';\nimport { ModelSchema } from './model-schema';\n\nexport class NgFormModelState<T> {\n private changesSubject = new BehaviorSubject<ModelStateResult<T> | undefined>(undefined);\n public readonly changes = this.changesSubject.asObservable();\n\n constructor(private form: NgForm, private modelValidator: ModelSchema<T>, private options?: ModelStateOptions) {\n this.form.form.valueChanges\n .pipe(\n switchMap(async (x) => {\n return from(this.validate());\n })\n )\n .subscribe();\n }\n\n getCurrent(): ModelStateResult<T> | undefined {\n return this.changesSubject.value;\n }\n\n setState(model: T, errors: FieldError[]) {\n const state = {\n model: model,\n errors: errors,\n valid: errors.length === 0,\n } as ModelStateResult<T>;\n this.setStateInternal(state);\n }\n\n setErrors(errors: FieldError[]) {\n //this.errors.next(errors);\n throw new Error('needs implementation');\n }\n\n appendErrors(errors: FieldError[], skipEmit?: boolean) {\n const allErrors = [...(this.changesSubject.value?.errors || []), ...errors];\n const state = { ...this.changesSubject.value } as ModelStateResult<T>;\n state.errors = allErrors;\n this.setStateInternal(state);\n }\n\n async validate(): Promise<ModelStateResult<T>> {\n const model = this.form.value;\n const state = await this.runValidations(model, this.options?.onValidate);\n this.setStateInternal(state);\n return state;\n }\n\n\n private setStateInternal(state: ModelStateResult<T>) {\n this.deleteFormErrors();\n\n const grouped = state.errors.reduce((grouped, v) => grouped.set(v.path, [...(grouped.get(v.path) || []), v]), new Map<string, FieldError[]>());\n grouped.forEach((value, path) => {\n let validationErrors = <ValidationErrors>{};\n value.forEach((v) => (validationErrors[v.type] = v.message));\n\n const control = this.form.form.get(path);\n if (!control) {\n // TODO: use actual logging service\n } else {\n control.setErrors(validationErrors);\n }\n });\n\n this.changesSubject.next(state);\n }\n\n private deleteFormErrors() {\n this.deleteErrors(this.form.form);\n }\n\n private deleteErrors(rootFormGroup: FormGroup) {\n Object.keys(rootFormGroup.controls).forEach((key) => {\n const control = rootFormGroup.controls[key];\n\n if (!this.isParentControl(control)) {\n this.deleteErrorsFromControl(key, control);\n } else if (control instanceof FormGroup) {\n this.deleteErrors(control as FormGroup);\n } else if (control instanceof FormArray) {\n this.loopFormArray(control as FormArray);\n }\n });\n }\n\n private deleteErrorsFromControl(key: string | number, control: AbstractControl) {\n control.setErrors(null);\n }\n\n private isParentControl(control: AbstractControl) {\n return control instanceof FormGroup || control instanceof FormArray;\n }\n\n private loopFormArray(formArray: FormArray) {\n formArray.controls.forEach((control, index) => {\n if (!this.isParentControl(control)) {\n this.deleteErrorsFromControl(index, control);\n } else if (control instanceof FormGroup) {\n this.deleteErrors(control as FormGroup);\n } else if (control instanceof FormArray) {\n this.loopFormArray(control as FormArray);\n }\n });\n }\n\n private async runValidations<T>(model: T, callback?: (list: FieldError[]) => Promise<FieldError[]>): Promise<ModelStateResult<T>> {\n const list = await this.modelValidator.validate(model);\n const final = callback ? (await callback?.(list)) : list;\n return {\n valid: final.length === 0,\n errors: final,\n model: model,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { NgForm } from '@angular/forms';\nimport { ModelSchemaFactory } from './model-schema.factory';\nimport { ModelStateOptions } from './model-state-options';\nimport { NgFormModelState } from './ngform-model-state';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NgFormModelStateFactory {\n constructor(private factory: ModelSchemaFactory) {}\n\n create<T extends object>(form: NgForm, model: T, options?: ModelStateOptions) {\n const modelState = new NgFormModelState<T>(form, this.factory.build(model), options);\n return modelState;\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { NgControl, ValidationErrors } from '@angular/forms';\n\n@Component({\n selector: 'mz-field-errors',\n templateUrl: './field-errors.component.html',\n styleUrls: ['./field-errors.component.css'],\n})\nexport class FieldErrorsComponent {\n @Input() field?: NgControl;\n\n get errorMessage(): string {\n const errorKeys = Object.keys(this.field?.errors || {});\n return errorKeys.length > 0 ? (this.field?.errors as ValidationErrors)[errorKeys[0]] : '';\n }\n}\n","<div class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\n","import { format, isValid, parse } from 'date-fns';\nimport * as IMask from 'imask';\n\nexport const phoneNumberOptions = {\n mask: '(000) 000-0000',\n};\n\nexport const ssnOptions = {\n mask: '000-00-0000',\n};\n\nexport const currencyOptions = {\n mask: Number,\n scale: 2,\n thousandsSeparator: ',',\n padFractionalZeros: true,\n radix: '.',\n mapToRadix: ['.'],\n};\n\nexport const integerOptions = {\n mask: Number,\n scale: 0,\n thousandsSeparator: ',',\n padFractionalZeros: true,\n radix: '.',\n mapToRadix: ['.'],\n};\n\n","import { formatDate } from '@angular/common';\nimport { Directive, ElementRef, Renderer2, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Directive({\n selector: '[mzDate]',\n standalone: true,\n host: { '(input)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateValueAccessor),\n multi: true,\n },\n ],\n})\nexport class DateValueAccessor implements ControlValueAccessor {\n onChange = (_: any) => {};\n onTouched = () => {};\n\n constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n writeValue(obj?: Date): void {\n let normalizedValue = '';\n if (!obj) {\n normalizedValue = '';\n } else if (this._elementRef.nativeElement.type === 'date') {\n normalizedValue = obj.toISOString().split('T')[0];\n } else {\n normalizedValue = obj.toLocaleDateString('en-US', { month: '2-digit', day: '2-digit', year: 'numeric' }); // TODO: support other date formats\n }\n this.setProperty('value', normalizedValue);\n }\n\n registerOnChange(fn: any): void {\n this.onChange = (value) => {\n const parsed = this.parseDate(value);\n fn(parsed);\n };\n }\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n setDisabledState?(isDisabled: boolean): void {\n this.setProperty('disabled', isDisabled);\n }\n protected setProperty(key: string, value: any): void {\n this._renderer.setProperty(this._elementRef.nativeElement, key, value);\n }\n\n private parseDate(value: string): Date | undefined {\n const validFormat = this._elementRef.nativeElement.type === 'date' ? /^(\\d{4}-\\d{2}-\\d{2})$/.test(value) : /^(\\d{1,2}\\/\\d{1,2}\\/\\d{4})$/.test(value);\n if (!validFormat) {\n return undefined;\n }\n\n const entry = new Date(value).toISOString().split('T')[0];\n\n /* For ISO Strings without time the day, month and year must be extracted from the ISO String\n before Date creation to avoid time offset and errors in the new Date.\n If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n date, some browsers (e.g. IE 9) will throw an invalid Date error.\n If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n is applied.\n Note: ISO months are 0 for January, 1 for February, ... */\n const [y, m = 1, d = 1] = entry.split('-').map((val: string) => +val);\n return this.createDate(y, m - 1, d);\n }\n\n private createDate(year: number, month: number, date: number): Date {\n // The `newDate` is set to midnight (UTC) on January 1st 1970.\n // - In PST this will be December 31st 1969 at 4pm.\n // - In GMT this will be January 1st 1970 at 1am.\n // Note that they even have different years, dates and months!\n const newDate = new Date(0);\n\n // `setFullYear()` allows years like 0001 to be set correctly. This function does not\n // change the internal time of the date.\n // Consider calling `setFullYear(2019, 8, 20)` (September 20, 2019).\n // - In PST this will now be September 20, 2019 at 4pm\n // - In GMT this will now be September 20, 2019 at 1am\n\n newDate.setFullYear(year, month, date);\n // We want the final date to be at local midnight, so we reset the time.\n // - In PST this will now be September 20, 2019 at 12am\n // - In GMT this will now be September 20, 2019 at 12am\n newDate.setHours(0, 0, 0);\n\n return newDate;\n }\n}\n","import { Component, Input, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport type FieldOption = {\n label: string;\n value: any;\n};\n\n@Component({\n selector: 'mz-checkbox-group',\n standalone: true,\n imports: [FormsModule],\n templateUrl: './checkbox-group.component.html',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MzCheckboxGroup),\n multi: true,\n },\n ],\n})\nexport class MzCheckboxGroup implements ControlValueAccessor {\n @Input({ required: true }) options!: FieldOption[];\n @Input({ required: false }) disabled = false;\n\n selections: any[] = [];\n\n onChange: (value: string[]) => void = () => {};\n onTouched: () => void = () => {};\n\n // Writes the selected values from the form model\n writeValue(values: any[]): void {\n this.selections = values || [];\n }\n\n // Registers the onChange function to propagate changes\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n // Registers the onTouched function\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n // Checks if a checkbox is selected\n isChecked(option: FieldOption): boolean {\n return this.selections.includes(option.value);\n }\n\n // Handles changes when checkboxes are clicked\n onCheckboxChange(event: Event, option: FieldOption): void {\n const checked = (event.target as HTMLInputElement).checked;\n\n if (checked) {\n this.selections = [...this.selections, option.value];\n } else {\n this.selections = this.selections.filter((val) => val !== option.value);\n }\n\n this.onChange(this.selections);\n this.onTouched();\n }\n}\n","@for(option of options; track $index) {\n <label class=\"field-option\">\n <input type=\"checkbox\" class=\"form-checkbox\" [disabled]=\"disabled\" [value]=\"option.value\" [checked]=\"isChecked(option)\" (change)=\"onCheckboxChange($event, option)\" />\n <span class=\"checkbox-label\">{{option.label}}</span>\n </label>\n}\n","import { AfterContentInit, Component, ContentChild, ElementRef, Input, Optional, SkipSelf } from '@angular/core';\nimport { ControlContainer, NgForm, NgModel, NgModelGroup } from '@angular/forms';\nimport { FieldSchema } from '../field-schema';\nimport { FieldMetadata } from '../model-schema';\n\nfunction getControlContainer(\n group: NgModelGroup | null,\n form: NgForm | null\n ): ControlContainer {\n console.log('getControlContainer', group, form);\n return group ?? form!;\n }\n\n@Component({\n selector: 'mz-field',\n standalone: true,\n imports: [],\n templateUrl: './field.component.html',\n providers: [\n {\n provide: ControlContainer,\n useFactory: getControlContainer,\n deps: [[new Optional(), new SkipSelf(), NgModelGroup], [new Optional(), new SkipSelf(), NgForm]]\n }\n ]\n})\nexport class MzField implements AfterContentInit {\n @Input() label?: string;\n @Input() controlType: 'checkbox' | 'checkboxgroup' | 'other' = 'other';\n @Input() schema?: FieldSchema<any>;\n @ContentChild(NgModel) ngModel?: NgModel;\n\n fieldMetadata?: FieldMetadata;\n constructor(private elementRef: ElementRef, private container: ControlContainer) {\n console.log('container in field', container);\n }\n\n ngAfterContentInit(): void {\n //this.fieldMetadata = this.form.schema.getMetadata(this.ngModel?.path || []);\n }\n\n getErrorMessage(): string | undefined {\n try {\n const list = Object.values(this.ngModel!.errors!);\n return list[0];\n } catch {\n return undefined;\n }\n }\n}\n","<label class=\"field\">\n @if(label && controlType !== 'checkbox') {\n <span class=\"field-label\">\n {{ label }} \n </span>\n }\n <ng-content></ng-content>\n\n @if(controlType === 'checkbox' && label) {\n <span class=\"checkbox-label\">{{ label }}</span>\n } \n @if(ngModel?.touched && ngModel?.invalid) {\n <div class=\"field-error\">\n {{ getErrorMessage() }}\n </div>\n }\n</label>\n","import { AfterViewInit, Directive, HostListener, Input, OnInit } from '@angular/core';\nimport { NgForm } from '@angular/forms';\nimport { ModelSchema } from '../model-schema';\nimport { NgFormModelState } from '../ngform-model-state';\n\n@Directive({\n selector: '[mzForm]',\n standalone: true,\n})\nexport class MzForm implements AfterViewInit {\n @Input({ required: true }) schema!: ModelSchema<unknown>;\n\n private modelState!: NgFormModelState<unknown>;\n\n constructor(private ngForm: NgForm) {\n\n }\n \n ngAfterViewInit(): void {\n this.modelState = new NgFormModelState(this.ngForm, this.schema);\n }\n\n @HostListener('submit', ['$event'])\n onSubmit(event: Event) {\n this.ngForm.form.markAllAsTouched();\n if(this.ngForm.invalid) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FieldErrorsComponent } from './field-errors/field-errors.component';\nimport { MzField } from './field/field.component';\nimport { MzForm } from './form/form.directive';\nimport { DateValueAccessor } from './date-value-accessor.directive';\nimport { MzCheckboxGroup } from './checkbox-group/checkbox-group.component';\n\n\n/**\n * @deprecated\n */\n@NgModule({\n providers: [],\n declarations: [\n FieldErrorsComponent\n ],\n exports: [\n FieldErrorsComponent\n ],\n imports: [\n CommonModule // TODO: can remove once done with temp error displaying\n ]\n})\nexport class FormsModule { }\n\n\n@NgModule({\n providers: [],\n exports: [\n MzField,\n MzForm,\n DateValueAccessor,\n MzCheckboxGroup\n ],\n imports: [\n MzField,\n MzForm,\n DateValueAccessor,\n MzCheckboxGroup\n ]\n})\nexport class MzFormsModule { }\n","/*\n * Public API Surface of forms\n */\nexport * from './lib/field-error';\nexport * from './lib/model-state-result';\nexport * from './lib/model-schema.factory';\nexport { ModelSchema, SchemaDefinition } from './lib/model-schema';\nexport * from './lib/type-annotations';\nexport * from './lib/ng-form-model-state.service';\nexport * from './lib/ngform-model-state';\nexport * from './lib/field-errors/field-errors.component';\nexport * from './lib/masks';\n\nexport { DateValueAccessor } from './lib/date-value-accessor.directive';\nexport { FieldSchema, FieldSchemaType, StringSchema, NumberSchema, DateSchema, BooleanSchema, FileSchema, ObjectSchema, buildStringSchema, buildNumberSchema, buildDateSchema, buildBooleanSchema, buildArraySchema } from './lib/field-schema';\nexport { MzCheckboxGroup, FieldOption } from './lib/checkbox-group/checkbox-group.component';\n\nexport { FormsModule, MzFormsModule } from './lib/forms.module';\nexport { MzForm } from './lib/form/form.directive';\nexport { MzField } from './lib/field/field.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ModelSchemaFactory","FormsModule","i1"],"mappings":";;;;;;;;;;;MAGa,WAAW,CAAA;;;IAGpB,WAAoB,CAAA,QAA4B,EAAU,MAAuB,EAAA;QAA7D,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAoB;QAAU,IAAM,CAAA,MAAA,GAAN,MAAM,CAAiB;KAEhF;AAED,IAAA,WAAW,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A,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAHtB,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGN,aAAa,EAAA,UAAA,EAAA,CAAA;kBAfzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE,EAAE;AACb,oBAAA,OAAO,EAAE;wBACP,OAAO;wBACP,MAAM;wBACN,iBAAiB;wBACjB,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,OAAO;wBACP,MAAM;wBACN,iBAAiB;wBACjB,eAAe;AAChB,qBAAA;AACF,iBAAA,CAAA;;;ACzCD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"muziehdesign-forms.mjs","sources":["../../../../projects/muziehdesign/forms/src/lib/model-schema.ts","../../../../projects/muziehdesign/forms/src/lib/constants.ts","../../../../projects/muziehdesign/forms/src/lib/field-schema.ts","../../../../projects/muziehdesign/forms/src/lib/model-schema.factory.ts","../../../../projects/muziehdesign/forms/src/lib/type-annotations.ts","../../../../projects/muziehdesign/forms/src/lib/ngform-model-state.ts","../../../../projects/muziehdesign/forms/src/lib/ng-form-model-state.service.ts","../../../../projects/muziehdesign/forms/src/lib/field-errors/field-errors.component.ts","../../../../projects/muziehdesign/forms/src/lib/field-errors/field-errors.component.html","../../../../projects/muziehdesign/forms/src/lib/masks.ts","../../../../projects/muziehdesign/forms/src/lib/date-value-accessor.directive.ts","../../../../projects/muziehdesign/forms/src/lib/checkbox-group/checkbox-group.component.ts","../../../../projects/muziehdesign/forms/src/lib/checkbox-group/checkbox-group.component.html","../../../../projects/muziehdesign/forms/src/lib/field/field.component.ts","../../../../projects/muziehdesign/forms/src/lib/field/field.component.html","../../../../projects/muziehdesign/forms/src/lib/form/form.directive.ts","../../../../projects/muziehdesign/forms/src/lib/forms.module.ts","../../../../projects/muziehdesign/forms/src/public-api.ts","../../../../projects/muziehdesign/forms/src/muziehdesign-forms.ts"],"sourcesContent":["import { AnyObjectSchema, SchemaOf, ValidationError } from 'yup';\nimport { FieldError } from './field-error';\nimport { FieldSchema } from './field-schema';\nexport class ModelSchema<T> {\n // TODO: need to keep track of internal and external\n //private definitions?: {[K in keyof T]: FieldSchema<any>};\n constructor(private metadata: FieldSchema<any>[], private schema: AnyObjectSchema) {\n\n }\n \n getMetadata(paths: string[]) {\n //console.log('fetching metadata for path: ', paths);\n //console.log(this.schema.describe());\n for(var i = 0; i < paths.length; i++) {\n const field = this.metadata.find(f=>f.name === paths[i]);\n if(!field?.constraints.required || field.constraints.required.required === false) {\n return { required: false } satisfies FieldMetadata;\n }\n }\n return { required: true } satisfies FieldMetadata;\n\n }\n\n validate<T>(model: T): Promise<FieldError[]> {\n return this.schema\n .validate(model, { abortEarly: false })\n .then(() => {\n return [];\n })\n .catch((e: ValidationError) => {\n return e.inner.map((error) => <FieldError>{ path: error.path, type: error.type, message: error.message });\n });\n }\n\n cast(value: any) {\n return this.schema.cast(value);\n }\n}\n\nexport type SchemaDefinition<T> = {\n //[K in keyof Required<T>]: T[K] extends object ? SchemaDefinition<T[K]>: FieldSchema<any>;\n [K in keyof Required<T>]: FieldSchema<any>\n}\n\nexport interface FieldMetadata {\n required: boolean;\n}","export const SCHEMA_METADATA_NAMESPACE = 'custom:muziehdesign:annotations';\n","import { ArrayTypeAnnotations, BooleanTypeAnnotations, ConstraintAnnotations, DateTypeAnnotations, FileTypeAnnotations, NumberTypeAnnotations, ObjectTypeAnnotations, StringTypeAnnotations } from './type-annotations';\n\nexport enum FieldSchemaType {\n string = 'string',\n boolean = 'boolean',\n date = 'date',\n object = 'object',\n number = 'number',\n array = 'array',\n file = 'file',\n}\n\nexport interface FieldSchema<T extends ConstraintAnnotations> {\n name: string;\n type: FieldSchemaType;\n label?: string;\n constraints: T;\n}\n\nexport interface StringSchema extends FieldSchema<StringTypeAnnotations> {\n type: FieldSchemaType.string;\n}\n\nexport interface NumberSchema extends FieldSchema<NumberTypeAnnotations> {\n type: FieldSchemaType.number;\n}\n\nexport interface BooleanSchema extends FieldSchema<BooleanTypeAnnotations> {\n type: FieldSchemaType.boolean;\n}\n\nexport interface DateSchema extends FieldSchema<DateTypeAnnotations> {\n type: FieldSchemaType.date;\n}\n\nexport interface ArraySchema extends FieldSchema<ArrayTypeAnnotations> {\n type: FieldSchemaType.array;\n}\n\nexport interface FileSchema extends FieldSchema<FileTypeAnnotations> {\n type: FieldSchemaType.file;\n}\n\nexport interface ObjectSchema extends FieldSchema<ObjectTypeAnnotations> {\n type: FieldSchemaType.object;\n}\n\nexport const buildStringSchema = (path: string, constraints: StringTypeAnnotations, label?: string) => {\n return {\n name: path,\n label: label,\n type: FieldSchemaType.string,\n constraints: { ...constraints },\n } satisfies StringSchema;\n};\n\nexport const buildBooleanSchema = (path: string, constraints: BooleanTypeAnnotations, label?: string) => {\n return {\n name: path,\n label: label,\n type: FieldSchemaType.boolean,\n constraints: { ...constraints },\n } satisfies BooleanSchema;\n};\n\nexport const buildNumberSchema = (path: string, constraints: NumberTypeAnnotations, label?: string) => {\n return {\n name: path,\n label: label,\n type: FieldSchemaType.number,\n constraints: { ...constraints },\n } satisfies NumberSchema;\n};\n\nexport const buildDateSchema = (path: string, constraints: DateTypeAnnotations, label?: string) => {\n return {\n name: path,\n label: label,\n type: FieldSchemaType.date,\n constraints: { ...constraints },\n } satisfies DateSchema;\n};\n\nexport const buildArraySchema = (path: string, constraints: ArrayTypeAnnotations, label?: string) => {\n return {\n name: path,\n label: label,\n type: FieldSchemaType.array,\n constraints: { ...constraints },\n } satisfies ArraySchema;\n};\n","import { Injectable } from '@angular/core';\nimport { object, SchemaOf } from 'yup';\nimport { ModelSchema } from './model-schema';\nimport { SCHEMA_METADATA_NAMESPACE } from './constants';\nimport { ObjectShape } from 'yup/lib/object';\nimport * as Yup from 'yup';\nimport { ArraySchema, BooleanSchema, DateSchema, FieldSchema, FieldSchemaType, FileSchema, NumberSchema, ObjectSchema, StringSchema } from './field-schema';\n\n/*\nSchema rules need to be built in the order they need to be evaluated in.\nFor example,\n ```\n schema.required().max(...).matches(...);\n ```\nevaluates the 3 rules in this order\n - required\n - max\n - matches\n*/\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ModelSchemaFactory {\n constructor() {}\n\n build<T extends object>(model: T): ModelSchema<T> {\n const metadata: Map<string, FieldSchema<any>> = Reflect.getMetadata(SCHEMA_METADATA_NAMESPACE, model);\n const schemaData = [...metadata.values()];\n const schema = this.buildYupSchema(schemaData);\n return new ModelSchema(schemaData, schema);\n }\n\n buildUntyped(raw: FieldSchema<any>[]) : ModelSchema<{[key: string]: string}> {\n const schema = this.buildYupSchema(raw);\n return new ModelSchema(raw, schema);\n }\n\n private buildYupSchema(fields: FieldSchema<any>[]) : Yup.AnyObjectSchema {\n let shape: ObjectShape = {};\n fields.forEach((value) => {\n if (value.type == FieldSchemaType.string) {\n shape[value.name] = this.buildStringSchema(value as StringSchema);\n } else if (value.type == FieldSchemaType.boolean) {\n shape[value.name] = this.buildBooleanSchema(value as BooleanSchema);\n } else if (value.type == FieldSchemaType.date) {\n shape[value.name] = this.buildDateSchema(value as DateSchema);\n } else if (value.type == FieldSchemaType.object) {\n shape[value.name] = this.buildNestedObjectSchema(value as ObjectSchema);\n } else if (value.type == FieldSchemaType.number) {\n shape[value.name] = this.buildNumberSchema(value as NumberSchema);\n } else if (value.type == FieldSchemaType.array) {\n shape[value.name] = this.buildArraySchema(value as ArraySchema);\n } else if (value.type == FieldSchemaType.file) {\n shape[value.name] = this.buildFileSchema(value as FileSchema);\n } else {\n throw new Error('Unrecognized field schema');\n }\n });\n\n return object(shape);\n }\n\n private buildStringSchema(original: StringSchema) {\n let schema = Yup.string();\n if(original.label) {\n schema.label(original.label);\n }\n\n const options = original.constraints; \n\n if (options.required) {\n schema = schema.required(options.required.message);\n }\n if (options.length) {\n schema = schema.length(options.length.length, options.length.message);\n }\n\n if (options.maxLength) {\n schema = schema.max(options.maxLength.maxLength, options.maxLength.message);\n }\n\n if (options.minLength) {\n schema = schema.min(options.minLength.minLength, options.minLength.message);\n }\n\n if (options.pattern) {\n schema = schema.matches(options.pattern.pattern, { message: options.pattern.message, excludeEmptyString: true });\n }\n\n return schema;\n }\n\n private buildBooleanSchema(original: BooleanSchema) {\n let schema = Yup.boolean();\n if(original.label) {\n schema.label(original.label);\n }\n\n const options = original.constraints; \n if (options.required) {\n schema = schema.required(options.required.message);\n }\n if (options.equals) {\n if (options.equals.equals) {\n schema = schema.isTrue(options.equals.message);\n } else {\n schema = schema.isFalse(options.equals.message);\n }\n }\n\n return schema;\n }\n\n private buildDateSchema(original: DateSchema) {\n let schema = Yup.date();\n if(original.label) {\n schema.label(original.label);\n }\n\n const options = original.constraints; \n if (options.required) {\n schema = schema.required(options.required.message);\n }\n if (options.min) {\n schema = schema.min(options.min.min, options.min.message);\n }\n if (options.max) {\n schema = schema.max(options.max.max, options.max.message);\n }\n if (options.test) {\n schema = schema.test({\n name: options.test.name,\n message: options.test.message,\n test: (d?: Date, context?: any) => {\n return options.test!.test(d!);\n },\n });\n }\n\n return schema;\n }\n\n private buildNumberSchema(original: NumberSchema) {\n let schema = Yup.number();\n if(original.label) {\n schema.label(original.label);\n }\n\n const options = original.constraints; \n if (options.required) {\n schema = schema.required(options.required.message);\n }\n if (options.min) {\n schema = schema.min(options.min.min, options.min.message);\n }\n if (options.max) {\n schema = schema.max(options.max.max, options.max.message);\n }\n\n return schema;\n }\n\n private buildArraySchema(original: ArraySchema) {\n let schema = Yup.array();\n if(original.label) {\n schema.label(original.label);\n }\n\n const options = original.constraints; \n\n if (options.min) {\n schema = schema.min(options.min.min, options.min.message);\n }\n if (options.max) {\n schema = schema.max(options.max.max, options.max.message);\n }\n\n return schema;\n }\n\n private buildNestedObjectSchema(original: ObjectSchema) {\n const metadata: Map<string, FieldSchema<any>> = Reflect.getMetadata(SCHEMA_METADATA_NAMESPACE, original.constraints.getInstance());\n\n let nestedSchema = this.buildYupSchema([...metadata.values()]);\n if(original.label) {\n nestedSchema.label(original.label);\n }\n\n const options = original.constraints; \n if (options.required) {\n nestedSchema = nestedSchema.required();\n } else {\n nestedSchema = nestedSchema.notRequired().default(undefined);\n }\n\n return nestedSchema;\n }\n\n private buildFileSchema(original: FileSchema) {\n let schema = Yup.mixed().nullable().optional();\n if(original.label) {\n schema.label(original.label);\n }\n\n const options = original.constraints; \n if (options.required) {\n schema = schema.required(options.required.message);\n }\n\n return schema;\n }\n}\n","import 'reflect-metadata';\nimport { ArraySchema, BooleanSchema, DateSchema, FieldSchema, FieldSchemaType, FileSchema, NumberSchema, ObjectSchema, StringSchema } from './field-schema';\n\nconst METADATA_KEY = 'custom:muziehdesign:annotations';\n\nexport interface ConstraintAnnotations {\n\n}\n\nexport interface StringTypeConstraints {\n required?: true;\n requiredMessage?: string;\n\n pattern?: RegExp;\n patternMessage?: string;\n\n length?: number;\n lengthMessage?: string;\n}\n\nexport interface StringTypeAnnotations extends ConstraintAnnotations {\n required?: RequiredAnnotation;\n length?: LengthAnnotation;\n pattern?: PatternAnnotation;\n maxLength?: MaxLengthAnnotation;\n minLength?: MinLengthAnnotation;\n}\n\nexport interface BooleanTypeAnnotations extends ConstraintAnnotations {\n required?: RequiredAnnotation;\n equals?: EqualsAnnotation<boolean>;\n}\n\nexport interface DateTypeAnnotations extends ConstraintAnnotations {\n required?: RequiredAnnotation;\n min?: MinimumAnnotation<Date>;\n max?: MaximumAnnotation<Date>;\n test?: TestAnnotation<Date>;\n}\n\nexport interface ObjectTypeAnnotations extends ConstraintAnnotations {\n required?: RequiredAnnotation;\n getInstance: () => any;\n}\n\nexport interface NumberTypeAnnotations extends ConstraintAnnotations {\n required?: RequiredAnnotation;\n min?: MinimumAnnotation<number>;\n max?: MaximumAnnotation<number>;\n}\n\nexport interface ArrayTypeAnnotations extends ConstraintAnnotations {\n min?: MinimumAnnotation<number>;\n max?: MaximumAnnotation<number>;\n}\n\nexport interface FileTypeAnnotations extends ConstraintAnnotations {\n required?: RequiredAnnotation;\n}\n\nexport interface ValidationAnnotation {\n message?: string;\n}\n\nexport interface RequiredAnnotation extends ValidationAnnotation {\n required: boolean;\n}\n\nexport interface LengthAnnotation extends ValidationAnnotation {\n length: number;\n}\n\nexport interface PatternAnnotation extends ValidationAnnotation {\n pattern: RegExp;\n}\n\nexport interface OfValuesAnnotation extends ValidationAnnotation {\n values: [];\n}\n\nexport interface EqualsAnnotation<T> extends ValidationAnnotation {\n equals: T;\n}\n\nexport interface MinimumAnnotation<T> extends ValidationAnnotation {\n min: T;\n}\n\nexport interface MaximumAnnotation<T> extends ValidationAnnotation {\n max: T;\n}\n\nexport interface TestAnnotation<T> extends ValidationAnnotation {\n test: (d: T) => boolean;\n name: string;\n}\n\nexport interface MaxLengthAnnotation extends ValidationAnnotation {\n maxLength: number;\n}\n\nexport interface MinLengthAnnotation extends ValidationAnnotation {\n minLength: number;\n}\n\nconst registerMetadata = (target: Object, propertyKey: string, schema: FieldSchema<any>) => {\n const metadata: Map<string, FieldSchema<any>> = Reflect.getMetadata(METADATA_KEY, target) || new Map<string, FieldSchema<any>>();\n metadata.set(propertyKey, schema);\n Reflect.defineMetadata(METADATA_KEY, metadata, target);\n};\n\nexport function StringType(...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.string,\n constraints: Object.assign({}, ...annotations) as StringTypeAnnotations\n } satisfies StringSchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function BooleanType(...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.boolean,\n constraints: Object.assign({}, ...annotations) as BooleanTypeAnnotations\n } satisfies BooleanSchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function DateType(...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.date,\n constraints: Object.assign({}, ...annotations) as DateTypeAnnotations\n } satisfies DateSchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function NumberType(...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.number,\n constraints: Object.assign({}, ...annotations) as NumberTypeAnnotations\n } satisfies NumberSchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function ObjectType<T>(type: { new (): T }, ...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.object,\n constraints: Object.assign({}, ...annotations, { getInstance: () => new type() } as Partial<ObjectTypeAnnotations>) as ObjectTypeAnnotations\n } satisfies ObjectSchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function ArrayType(...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.array,\n constraints: Object.assign({}, ...annotations) as ArrayTypeAnnotations\n } satisfies ArraySchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function FileType<T>(...annotations: { [key: string]: ValidationAnnotation }[]) {\n return function (target: Object, propertyKey: string) {\n const schema = {\n name: propertyKey,\n type: FieldSchemaType.file,\n constraints: Object.assign({}, ...annotations) as FileTypeAnnotations\n } satisfies FileSchema;\n\n registerMetadata(target, propertyKey, schema);\n };\n}\n\nexport function required(message?: string): { [key: string]: RequiredAnnotation } {\n return { required: { required: true, message: message } };\n}\n\nexport function pattern(regex: RegExp, message?: string): { [key: string]: PatternAnnotation } {\n return { pattern: { pattern: regex, message: message } };\n}\n\nexport function length(length: number, message?: string): { [key: string]: LengthAnnotation } {\n return { length: { length: length, message: message } };\n}\n\nexport function maxLength(maxLength: number, message?: string): { [key: string]: MaxLengthAnnotation } {\n return { maxLength: { maxLength: maxLength, message: message } };\n}\n\nexport function minLength(minLength: number, message?: string): { [key: string]: MinLengthAnnotation } {\n return { minLength: { minLength: minLength, message: message } };\n}\n\nexport function ofValues(values: [], message?: string): { [key: string]: OfValuesAnnotation } {\n return { ofValues: { values: values, message: message } };\n}\n\nexport function equals<T>(value: T, message?: string): { [key: string]: EqualsAnnotation<T> } {\n return { equals: { equals: value, message: message } };\n}\n\nexport function min<T>(value: T, message?: string): { [key: string]: MinimumAnnotation<T> } {\n return { min: { min: value, message: message } };\n}\n\nexport function max<T>(value: T, message?: string): { [key: string]: MaximumAnnotation<T> } {\n return { max: { max: value, message: message } };\n}\n\nexport function test<T>(name: string, test: (d: T) => boolean, message?: string): { [key: string]: TestAnnotation<T> } {\n return { test: { name: name, test: test, message: message } };\n}\n","import { AbstractControl, FormArray, FormGroup, NgForm, ValidationErrors } from '@angular/forms';\nimport { BehaviorSubject, from, switchMap } from 'rxjs';\nimport { FieldError } from './field-error';\nimport { ModelStateOptions } from './model-state-options';\nimport { ModelStateResult } from './model-state-result';\nimport { ModelSchema } from './model-schema';\n\nexport class NgFormModelState<T> {\n private changesSubject = new BehaviorSubject<ModelStateResult<T> | undefined>(undefined);\n public readonly changes = this.changesSubject.asObservable();\n\n constructor(private form: NgForm, private modelValidator: ModelSchema<T>, private options?: ModelStateOptions) {\n this.form.form.valueChanges\n .pipe(\n switchMap(async (x) => {\n return from(this.validate());\n })\n )\n .subscribe();\n }\n\n getCurrent(): ModelStateResult<T> | undefined {\n return this.changesSubject.value;\n }\n\n setState(model: T, errors: FieldError[]) {\n const state = {\n model: model,\n errors: errors,\n valid: errors.length === 0,\n } as ModelStateResult<T>;\n this.setStateInternal(state);\n }\n\n setErrors(errors: FieldError[]) {\n //this.errors.next(errors);\n throw new Error('needs implementation');\n }\n\n appendErrors(errors: FieldError[], skipEmit?: boolean) {\n const allErrors = [...(this.changesSubject.value?.errors || []), ...errors];\n const state = { ...this.changesSubject.value } as ModelStateResult<T>;\n state.errors = allErrors;\n this.setStateInternal(state);\n }\n\n async validate(): Promise<ModelStateResult<T>> {\n const model = this.form.value;\n const state = await this.runValidations(model, this.options?.onValidate);\n this.setStateInternal(state);\n return state;\n }\n\n\n private setStateInternal(state: ModelStateResult<T>) {\n this.deleteFormErrors();\n\n const grouped = state.errors.reduce((grouped, v) => grouped.set(v.path, [...(grouped.get(v.path) || []), v]), new Map<string, FieldError[]>());\n grouped.forEach((value, path) => {\n let validationErrors = <ValidationErrors>{};\n value.forEach((v) => (validationErrors[v.type] = v.message));\n\n const control = this.form.form.get(path);\n if (!control) {\n // TODO: use actual logging service\n } else {\n control.setErrors(validationErrors);\n }\n });\n\n this.changesSubject.next(state);\n }\n\n private deleteFormErrors() {\n this.deleteErrors(this.form.form);\n }\n\n private deleteErrors(rootFormGroup: FormGroup) {\n Object.keys(rootFormGroup.controls).forEach((key) => {\n const control = rootFormGroup.controls[key];\n\n if (!this.isParentControl(control)) {\n this.deleteErrorsFromControl(key, control);\n } else if (control instanceof FormGroup) {\n this.deleteErrors(control as FormGroup);\n } else if (control instanceof FormArray) {\n this.loopFormArray(control as FormArray);\n }\n });\n }\n\n private deleteErrorsFromControl(key: string | number, control: AbstractControl) {\n control.setErrors(null);\n }\n\n private isParentControl(control: AbstractControl) {\n return control instanceof FormGroup || control instanceof FormArray;\n }\n\n private loopFormArray(formArray: FormArray) {\n formArray.controls.forEach((control, index) => {\n if (!this.isParentControl(control)) {\n this.deleteErrorsFromControl(index, control);\n } else if (control instanceof FormGroup) {\n this.deleteErrors(control as FormGroup);\n } else if (control instanceof FormArray) {\n this.loopFormArray(control as FormArray);\n }\n });\n }\n\n private async runValidations<T>(model: T, callback?: (list: FieldError[]) => Promise<FieldError[]>): Promise<ModelStateResult<T>> {\n const list = await this.modelValidator.validate(model);\n const final = callback ? (await callback?.(list)) : list;\n return {\n valid: final.length === 0,\n errors: final,\n model: model,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { NgForm } from '@angular/forms';\nimport { ModelSchemaFactory } from './model-schema.factory';\nimport { ModelStateOptions } from './model-state-options';\nimport { NgFormModelState } from './ngform-model-state';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NgFormModelStateFactory {\n constructor(private factory: ModelSchemaFactory) {}\n\n create<T extends object>(form: NgForm, model: T, options?: ModelStateOptions) {\n const modelState = new NgFormModelState<T>(form, this.factory.build(model), options);\n return modelState;\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { NgControl, ValidationErrors } from '@angular/forms';\n\n@Component({\n selector: 'mz-field-errors',\n templateUrl: './field-errors.component.html',\n styleUrls: ['./field-errors.component.css'],\n standalone: false\n})\nexport class FieldErrorsComponent {\n @Input() field?: NgControl;\n\n get errorMessage(): string {\n const errorKeys = Object.keys(this.field?.errors || {});\n return errorKeys.length > 0 ? (this.field?.errors as ValidationErrors)[errorKeys[0]] : '';\n }\n}\n","<div class=\"field-error\" *ngIf=\"errorMessage\">{{ errorMessage }}</div>\n","import { format, isValid, parse } from 'date-fns';\nimport * as IMask from 'imask';\n\nexport const phoneNumberOptions = {\n mask: '(000) 000-0000',\n};\n\nexport const ssnOptions = {\n mask: '000-00-0000',\n};\n\nexport const currencyOptions = {\n mask: Number,\n scale: 2,\n thousandsSeparator: ',',\n padFractionalZeros: true,\n radix: '.',\n mapToRadix: ['.'],\n};\n\nexport const integerOptions = {\n mask: Number,\n scale: 0,\n thousandsSeparator: ',',\n padFractionalZeros: true,\n radix: '.',\n mapToRadix: ['.'],\n};\n\n","import { formatDate } from '@angular/common';\nimport { Directive, ElementRef, Renderer2, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Directive({\n selector: '[mzDate]',\n standalone: true,\n host: { '(input)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateValueAccessor),\n multi: true,\n },\n ],\n})\nexport class DateValueAccessor implements ControlValueAccessor {\n onChange = (_: any) => {};\n onTouched = () => {};\n\n constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n writeValue(obj?: Date): void {\n let normalizedValue = '';\n if (!obj) {\n normalizedValue = '';\n } else if (this._elementRef.nativeElement.type === 'date') {\n normalizedValue = obj.toISOString().split('T')[0];\n } else {\n normalizedValue = obj.toLocaleDateString('en-US', { month: '2-digit', day: '2-digit', year: 'numeric' }); // TODO: support other date formats\n }\n this.setProperty('value', normalizedValue);\n }\n\n registerOnChange(fn: any): void {\n this.onChange = (value) => {\n const parsed = this.parseDate(value);\n fn(parsed);\n };\n }\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n setDisabledState?(isDisabled: boolean): void {\n this.setProperty('disabled', isDisabled);\n }\n protected setProperty(key: string, value: any): void {\n this._renderer.setProperty(this._elementRef.nativeElement, key, value);\n }\n\n private parseDate(value: string): Date | undefined {\n const validFormat = this._elementRef.nativeElement.type === 'date' ? /^(\\d{4}-\\d{2}-\\d{2})$/.test(value) : /^(\\d{1,2}\\/\\d{1,2}\\/\\d{4})$/.test(value);\n if (!validFormat) {\n return undefined;\n }\n\n const entry = new Date(value).toISOString().split('T')[0];\n\n /* For ISO Strings without time the day, month and year must be extracted from the ISO String\n before Date creation to avoid time offset and errors in the new Date.\n If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n date, some browsers (e.g. IE 9) will throw an invalid Date error.\n If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n is applied.\n Note: ISO months are 0 for January, 1 for February, ... */\n const [y, m = 1, d = 1] = entry.split('-').map((val: string) => +val);\n return this.createDate(y, m - 1, d);\n }\n\n private createDate(year: number, month: number, date: number): Date {\n // The `newDate` is set to midnight (UTC) on January 1st 1970.\n // - In PST this will be December 31st 1969 at 4pm.\n // - In GMT this will be January 1st 1970 at 1am.\n // Note that they even have different years, dates and months!\n const newDate = new Date(0);\n\n // `setFullYear()` allows years like 0001 to be set correctly. This function does not\n // change the internal time of the date.\n // Consider calling `setFullYear(2019, 8, 20)` (September 20, 2019).\n // - In PST this will now be September 20, 2019 at 4pm\n // - In GMT this will now be September 20, 2019 at 1am\n\n newDate.setFullYear(year, month, date);\n // We want the final date to be at local midnight, so we reset the time.\n // - In PST this will now be September 20, 2019 at 12am\n // - In GMT this will now be September 20, 2019 at 12am\n newDate.setHours(0, 0, 0);\n\n return newDate;\n }\n}\n","import { Component, Input, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport type FieldOption = {\n label: string;\n value: any;\n};\n\n@Component({\n selector: 'mz-checkbox-group',\n imports: [FormsModule],\n templateUrl: './checkbox-group.component.html',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MzCheckboxGroup),\n multi: true,\n },\n ]\n})\nexport class MzCheckboxGroup implements ControlValueAccessor {\n @Input({ required: true }) options!: FieldOption[];\n @Input({ required: false }) disabled = false;\n\n selections: any[] = [];\n\n onChange: (value: string[]) => void = () => {};\n onTouched: () => void = () => {};\n\n // Writes the selected values from the form model\n writeValue(values: any[]): void {\n this.selections = values || [];\n }\n\n // Registers the onChange function to propagate changes\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n // Registers the onTouched function\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n // Checks if a checkbox is selected\n isChecked(option: FieldOption): boolean {\n return this.selections.includes(option.value);\n }\n\n // Handles changes when checkboxes are clicked\n onCheckboxChange(event: Event, option: FieldOption): void {\n const checked = (event.target as HTMLInputElement).checked;\n\n if (checked) {\n this.selections = [...this.selections, option.value];\n } else {\n this.selections = this.selections.filter((val) => val !== option.value);\n }\n\n this.onChange(this.selections);\n this.onTouched();\n }\n}\n","@for(option of options; track $index) {\n <label class=\"field-option\">\n <input type=\"checkbox\" class=\"form-checkbox\" [disabled]=\"disabled\" [value]=\"option.value\" [checked]=\"isChecked(option)\" (change)=\"onCheckboxChange($event, option)\" />\n <span class=\"checkbox-label\">{{option.label}}</span>\n </label>\n}\n","import { AfterContentInit, Component, ContentChild, ElementRef, Input, Optional, SkipSelf } from '@angular/core';\nimport { ControlContainer, NgForm, NgModel, NgModelGroup } from '@angular/forms';\nimport { FieldSchema } from '../field-schema';\nimport { FieldMetadata } from '../model-schema';\n\nfunction getControlContainer(\n group: NgModelGroup | null,\n form: NgForm | null\n ): ControlContainer {\n console.log('getControlContainer', group, form);\n return group ?? form!;\n }\n\n@Component({\n selector: 'mz-field',\n imports: [],\n templateUrl: './field.component.html',\n providers: [\n {\n provide: ControlContainer,\n useFactory: getControlContainer,\n deps: [[new Optional(), new SkipSelf(), NgModelGroup], [new Optional(), new SkipSelf(), NgForm]]\n }\n ]\n})\nexport class MzField implements AfterContentInit {\n @Input() label?: string;\n @Input() controlType: 'checkbox' | 'checkboxgroup' | 'other' = 'other';\n @Input() schema?: FieldSchema<any>;\n @ContentChild(NgModel) ngModel?: NgModel;\n\n fieldMetadata?: FieldMetadata;\n constructor(private elementRef: ElementRef) {\n }\n\n ngAfterContentInit(): void {\n //this.fieldMetadata = this.form.schema.getMetadata(this.ngModel?.path || []);\n }\n\n getErrorMessage(): string | undefined {\n try {\n const list = Object.values(this.ngModel!.errors!);\n return list[0];\n } catch {\n return undefined;\n }\n }\n}\n","<label class=\"field\">\n @if(label && controlType !== 'checkbox') {\n <span class=\"field-label\">\n {{ label }} \n </span>\n }\n <ng-content></ng-content>\n\n @if(controlType === 'checkbox' && label) {\n <span class=\"checkbox-label\">{{ label }}</span>\n } \n @if(ngModel?.touched && ngModel?.invalid) {\n <div class=\"field-error\">\n {{ getErrorMessage() }}\n </div>\n }\n</label>\n","import { AfterViewInit, Directive, HostListener, Input, OnInit } from '@angular/core';\nimport { NgForm } from '@angular/forms';\nimport { ModelSchema } from '../model-schema';\nimport { NgFormModelState } from '../ngform-model-state';\n\n@Directive({\n selector: '[mzForm]',\n standalone: true,\n})\nexport class MzForm implements AfterViewInit {\n @Input({ required: true }) schema!: ModelSchema<unknown>;\n\n private modelState!: NgFormModelState<unknown>;\n\n constructor(private ngForm: NgForm) {\n\n }\n \n ngAfterViewInit(): void {\n this.modelState = new NgFormModelState(this.ngForm, this.schema);\n }\n\n @HostListener('submit', ['$event'])\n onSubmit(event: Event) {\n this.ngForm.form.markAllAsTouched();\n if(this.ngForm.invalid) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FieldErrorsComponent } from './field-errors/field-errors.component';\nimport { MzField } from './field/field.component';\nimport { MzForm } from './form/form.directive';\nimport { DateValueAccessor } from './date-value-accessor.directive';\nimport { MzCheckboxGroup } from './checkbox-group/checkbox-group.component';\n\n\n/**\n * @deprecated\n */\n@NgModule({\n providers: [],\n declarations: [\n FieldErrorsComponent\n ],\n exports: [\n FieldErrorsComponent\n ],\n imports: [\n CommonModule // TODO: can remove once done with temp error displaying\n ]\n})\nexport class FormsModule { }\n\n\n@NgModule({\n providers: [],\n exports: [\n MzField,\n MzForm,\n DateValueAccessor,\n MzCheckboxGroup\n ],\n imports: [\n MzField,\n MzForm,\n DateValueAccessor,\n MzCheckboxGroup\n ]\n})\nexport class MzFormsModule { }\n","/*\n * Public API Surface of forms\n */\nexport * from './lib/field-error';\nexport * from './lib/model-state-result';\nexport * from './lib/model-schema.factory';\nexport { ModelSchema, SchemaDefinition } from './lib/model-schema';\nexport * from './lib/type-annotations';\nexport * from './lib/ng-form-model-state.service';\nexport * from './lib/ngform-model-state';\nexport * from './lib/field-errors/field-errors.component';\nexport * from './lib/masks';\n\nexport { DateValueAccessor } from './lib/date-value-accessor.directive';\nexport { FieldSchema, FieldSchemaType, StringSchema, NumberSchema, DateSchema, BooleanSchema, FileSchema, ObjectSchema, buildStringSchema, buildNumberSchema, buildDateSchema, buildBooleanSchema, buildArraySchema } from './lib/field-schema';\nexport { MzCheckboxGroup, FieldOption } from './lib/checkbox-group/checkbox-group.component';\n\nexport { FormsModule, MzFormsModule } from './lib/forms.module';\nexport { MzForm } from './lib/form/form.directive';\nexport { MzField } from './lib/field/field.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ModelSchemaFactory","FormsModule","i1"],"mappings":";;;;;;;;;;;MAGa,WAAW,CAAA;;;IAGpB,WAAoB,CAAA,QAA4B,EAAU,MAAuB,EAAA;QAA7D,IAAQ,CAAA,QAAA,GAAR,QAAQ;QAA8B,IAAM,CAAA,MAAA,GAAN,MAAM;;AAIhE,IAAA,WAAW,CAAC,KAAe,EAAA;;;AAGvB,QAAA,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAClC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAE,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC;AACxD,YAAA,IAAG,CAAC,KAAK,EAAE,WAAW,CAAC,QAAQ,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,KAAK,KAAK,EAAE;AAC9E,gBAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAA0B;;;AAG1D,QAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAA0B;;AAIrD,IAAA,QAAQ,CAAI,KAAQ,EAAA;QAChB,OAAO,IAAI,CAAC;aACP,QAAQ,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;aACrC,IAAI,CAAC,MAAK;AACP,YAAA,OAAO,EAAE;AACb,SAAC;AACA,aAAA,KAAK,CAAC,CAAC,CAAkB,KAAI;AAC1B,YAAA,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,MAAiB,EAAE,IAAI,E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AA,OAAO,EAAE;wBACP;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,YAAY;AACb;AACF,iBAAA;;MAmBY,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YANtB,OAAO;YACP,MAAM;YACN,iBAAiB;AACjB,YAAA,eAAe,aATf,OAAO;YACP,MAAM;YACN,iBAAiB;YACjB,eAAe,CAAA,EAAA,CAAA,CAAA;AASN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAHtB,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAGN,aAAa,EAAA,UAAA,EAAA,CAAA;kBAfzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE,EAAE;AACb,oBAAA,OAAO,EAAE;wBACP,OAAO;wBACP,MAAM;wBACN,iBAAiB;wBACjB;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,OAAO;wBACP,MAAM;wBACN,iBAAiB;wBACjB;AACD;AACF,iBAAA;;;ACzCD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1,17 +1,16 @@
1
1
  import { AfterContentInit, ElementRef } from '@angular/core';
2
- import { ControlContainer, NgModel } from '@angular/forms';
2
+ import { NgModel } from '@angular/forms';
3
3
  import { FieldSchema } from '../field-schema';
4
4
  import { FieldMetadata } from '../model-schema';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class MzField implements AfterContentInit {
7
7
  private elementRef;
8
- private container;
9
8
  label?: string;
10
9
  controlType: 'checkbox' | 'checkboxgroup' | 'other';
11
10
  schema?: FieldSchema<any>;
12
11
  ngModel?: NgModel;
13
12
  fieldMetadata?: FieldMetadata;
14
- constructor(elementRef: ElementRef, container: ControlContainer);
13
+ constructor(elementRef: ElementRef);
15
14
  ngAfterContentInit(): void;
16
15
  getErrorMessage(): string | undefined;
17
16
  static ɵfac: i0.ɵɵFactoryDeclaration<MzField, never>;