formly-form-viewer 0.0.1 → 0.0.3

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,4 +1,4 @@
1
- import { OnInit } from '@angular/core';
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
3
  import { FormlyFieldConfig, FormlyFormOptions } from '@ngx-formly/core';
4
4
  import * as i0 from "@angular/core";
@@ -7,9 +7,10 @@ export declare class FormlyViewerComponent implements OnInit {
7
7
  fields: FormlyFieldConfig[];
8
8
  model: any;
9
9
  options: FormlyFormOptions;
10
- customFieldClass: string;
10
+ customFieldClass?: string;
11
+ submitForm: EventEmitter<any>;
11
12
  ngOnInit(): void;
12
13
  onSubmit(): void;
13
14
  static ɵfac: i0.ɵɵFactoryDeclaration<FormlyViewerComponent, never>;
14
- static ɵcmp: i0.ɵɵComponentDeclaration<FormlyViewerComponent, "formly-form-viewer", never, { "form": { "alias": "form"; "required": false; }; "fields": { "alias": "fields"; "required": false; }; "model": { "alias": "model"; "required": false; }; "options": { "alias": "options"; "required": false; }; "customFieldClass": { "alias": "customFieldClass"; "required": false; }; }, {}, never, never, true, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormlyViewerComponent, "formly-form-viewer", never, { "form": { "alias": "form"; "required": false; }; "fields": { "alias": "fields"; "required": false; }; "model": { "alias": "model"; "required": false; }; "options": { "alias": "options"; "required": false; }; "customFieldClass": { "alias": "customFieldClass"; "required": false; }; }, { "submitForm": "submitForm"; }, never, never, true, never>;
15
16
  }
@@ -1,12 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input } from '@angular/core';
2
+ import { EventEmitter, Output, Input, Component } from '@angular/core';
3
3
  import * as i2 from '@angular/forms';
4
4
  import { FormGroup, ReactiveFormsModule } from '@angular/forms';
5
- import * as i3 from '@ngx-formly/core';
6
- import { FormlyModule } from '@ngx-formly/core';
7
- import { FormlyIonicModule } from '@ngx-formly/ionic';
8
- import * as i4 from '@ionic/angular';
9
- import { IonicModule } from '@ionic/angular';
5
+ import { FormlyForm } from '@ngx-formly/core';
6
+ import * as i3 from '@angular/material/button';
7
+ import { MatButtonModule } from '@angular/material/button';
10
8
  import * as i1 from '@angular/common';
11
9
  import { CommonModule } from '@angular/common';
12
10
 
@@ -15,39 +13,39 @@ class FormlyViewerComponent {
15
13
  fields = [];
16
14
  model = {};
17
15
  options = {};
18
- customFieldClass = 'default-formly-field';
16
+ customFieldClass;
17
+ submitForm = new EventEmitter();
19
18
  ngOnInit() { }
20
19
  onSubmit() {
21
20
  if (this.form.valid) {
22
- console.log(this.model);
21
+ this.submitForm.emit(this.model);
23
22
  }
24
23
  }
25
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FormlyViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
26
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: FormlyViewerComponent, isStandalone: true, selector: "formly-form-viewer", inputs: { form: "form", fields: "fields", model: "model", options: "options", customFieldClass: "customFieldClass" }, ngImport: i0, template: `
27
- <form [formGroup]="form" (ngSubmit)="onSubmit()">
28
- <formly-form [form]="form" [fields]="fields" [model]="model" [options]="options"
29
- [ngClass]="customFieldClass">
30
- </formly-form>
31
- <ion-button type="submit">Submit</ion-button>
32
- </form>
33
- `, isInline: true, styles: [".default-formly-field{margin-bottom:15px;padding:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i3.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: FormlyIonicModule }, { kind: "ngmodule", type: IonicModule }, { kind: "component", type: i4.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }] });
24
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: FormlyViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
25
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: FormlyViewerComponent, isStandalone: true, selector: "formly-form-viewer", inputs: { form: "form", fields: "fields", model: "model", options: "options", customFieldClass: "customFieldClass" }, outputs: { submitForm: "submitForm" }, ngImport: i0, template: `
26
+ <form [formGroup]="form" (ngSubmit)="onSubmit()">
27
+ <formly-form [form]="form" [fields]="fields" [model]="model" [options]="options"
28
+ [ngClass]="customFieldClass">
29
+ </formly-form>
30
+ <button mat-raised-button color="primary" type="submit">Enviar</button>
31
+ </form>
32
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] });
34
33
  }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FormlyViewerComponent, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: FormlyViewerComponent, decorators: [{
36
35
  type: Component,
37
- args: [{ selector: 'formly-form-viewer', standalone: true, template: `
38
- <form [formGroup]="form" (ngSubmit)="onSubmit()">
39
- <formly-form [form]="form" [fields]="fields" [model]="model" [options]="options"
40
- [ngClass]="customFieldClass">
41
- </formly-form>
42
- <ion-button type="submit">Submit</ion-button>
43
- </form>
36
+ args: [{ selector: 'formly-form-viewer', standalone: true, template: `
37
+ <form [formGroup]="form" (ngSubmit)="onSubmit()">
38
+ <formly-form [form]="form" [fields]="fields" [model]="model" [options]="options"
39
+ [ngClass]="customFieldClass">
40
+ </formly-form>
41
+ <button mat-raised-button color="primary" type="submit">Enviar</button>
42
+ </form>
44
43
  `, imports: [
45
44
  CommonModule,
46
45
  ReactiveFormsModule,
47
- FormlyModule,
48
- FormlyIonicModule,
49
- IonicModule
50
- ], styles: [".default-formly-field{margin-bottom:15px;padding:10px}\n"] }]
46
+ FormlyForm,
47
+ MatButtonModule
48
+ ] }]
51
49
  }], propDecorators: { form: [{
52
50
  type: Input
53
51
  }], fields: [{
@@ -58,6 +56,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
58
56
  type: Input
59
57
  }], customFieldClass: [{
60
58
  type: Input
59
+ }], submitForm: [{
60
+ type: Output
61
61
  }] } });
62
62
 
63
63
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"formly-form-viewer.mjs","sources":["../../../src/app/formly-form-viewer/formly-form-viewer.component.ts","../../../src/formly-form-viewer.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { FormlyFieldConfig, FormlyFormOptions, FormlyModule } from '@ngx-formly/core';\r\nimport { FormlyIonicModule } from '@ngx-formly/ionic';\r\nimport { IonicModule } from '@ionic/angular';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'formly-form-viewer',\r\n standalone: true,\r\n template: `\r\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\r\n <formly-form [form]=\"form\" [fields]=\"fields\" [model]=\"model\" [options]=\"options\"\r\n [ngClass]=\"customFieldClass\">\r\n </formly-form>\r\n <ion-button type=\"submit\">Submit</ion-button>\r\n </form>\r\n `,\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormlyModule,\r\n FormlyIonicModule,\r\n IonicModule\r\n ],\r\n styles: [`\r\n .default-formly-field {\r\n margin-bottom: 15px;\r\n padding: 10px;\r\n }\r\n `]\r\n})\r\nexport class FormlyViewerComponent implements OnInit {\r\n @Input() form: FormGroup = new FormGroup({});\r\n @Input() fields: FormlyFieldConfig[] = [];\r\n @Input() model: any = {};\r\n @Input() options: FormlyFormOptions = {};\r\n @Input() customFieldClass: string = 'default-formly-field';\r\n\r\n ngOnInit() {}\r\n\r\n onSubmit() {\r\n if (this.form.valid) {\r\n console.log(this.model);\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAgCa,qBAAqB,CAAA;AACvB,IAAA,IAAI,GAAc,IAAI,SAAS,CAAC,EAAE,CAAC,CAAC;IACpC,MAAM,GAAwB,EAAE,CAAC;IACjC,KAAK,GAAQ,EAAE,CAAC;IAChB,OAAO,GAAsB,EAAE,CAAC;IAChC,gBAAgB,GAAW,sBAAsB,CAAC;AAE3D,IAAA,QAAQ,MAAK;I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../../src/formly-form-viewer.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { FormlyFieldConfig, FormlyForm, FormlyFormOptions } from '@ngx-formly/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'formly-form-viewer',\n standalone: true,\n template: `\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <formly-form [form]=\"form\" [fields]=\"fields\" [model]=\"model\" [options]=\"options\"\n [ngClass]=\"customFieldClass\">\n </formly-form>\n <button mat-raised-button color=\"primary\" type=\"submit\">Enviar</button>\n </form>\n `,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyForm,\n MatButtonModule\n ],\n styles: []\n})\nexport class FormlyViewerComponent implements OnInit {\n @Input() form: FormGroup = new FormGroup({});\n @Input() fields: FormlyFieldConfig[] = [];\n @Input() model: any = {};\n @Input() options: FormlyFormOptions = {};\n @Input() customFieldClass?: string;\n @Output() submitForm = new EventEmitter<any>();\n\n ngOnInit() {}\n\n onSubmit() {\n if (this.form.valid) {\n this.submitForm.emit(this.model);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAyBa,qBAAqB,CAAA;AACvB,IAAA,IAAI,GAAc,IAAI,SAAS,CAAC,EAAE,CAAC;IACnC,MAAM,GAAwB,EAAE;IAChC,KAAK,GAAQ,EAAE;IACf,OAAO,GAAsB,EAAE;AAC/B,IAAA,gBAAgB;AACf,IAAA,UAAU,GAAG,IAAI,YAAY,EAAO;AAE9C,IAAA,QAAQ;IAER,QAAQ,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACnB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;;;wGAZzB,qBAAqB,EAAA,IAAA,EAAA,EAAA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A,EAAA,WAAA,EAAA,IAAA,EAAA,UAAU,iIACV,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,6GAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAIN,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAnBjC,SAAS;+BACE,oBAAoB,EAAA,UAAA,EAClB,IAAI,EACN,QAAA,EAAA;;;;;;;GAOT,EACQ,OAAA,EAAA;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,UAAU;wBACV;AACD,qBAAA,EAAA;8BAIQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,MAAM,EAAA,CAAA;sBAAd;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,OAAO,EAAA,CAAA;sBAAf;gBACQ,gBAAgB,EAAA,CAAA;sBAAxB;gBACS,UAAU,EAAA,CAAA;sBAAnB;;;AC/BH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,29 +1,32 @@
1
1
  {
2
2
  "name": "formly-form-viewer",
3
- "version": "0.0.1",
4
- "author": "Ionic Framework",
5
- "homepage": "https://ionicframework.com/",
3
+ "version": "0.0.3",
4
+ "author": "Juan Jose Arroyo Rivera",
5
+ "description": "Standalone component to render a customizable FormlyForm",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/JJKid/formly-form-viewer.git"
9
9
  },
10
10
  "peerDependencies": {
11
- "@angular/animations": "^18.0.0",
12
- "@angular/common": "^18.0.0",
13
- "@angular/compiler": "^18.0.0",
14
- "@angular/core": "^18.0.0",
15
- "@angular/forms": "^18.2.3",
16
- "@angular/platform-browser": "^18.0.0",
17
- "@angular/platform-browser-dynamic": "^18.0.0",
18
- "@angular/router": "^18.0.0",
19
- "@ionic/angular": "^7.0.0",
20
- "@ngx-formly/core": "^6.3.6",
21
- "@ngx-formly/ionic": "^6.3.6",
22
- "ionicons": "^7.0.0",
11
+ "@angular/animations": "^19.2.18",
12
+ "@angular/cdk": "^19.2.18",
13
+ "@angular/common": "^19.2.18",
14
+ "@angular/compiler": "^19.2.18",
15
+ "@angular/core": "^19.2.18",
16
+ "@angular/forms": "^19.2.18",
17
+ "@angular/material": "^19.2.18",
18
+ "@angular/platform-browser": "^19.2.18",
19
+ "@angular/platform-browser-dynamic": "^19.2.18",
20
+ "@angular/router": "^19.2.18",
21
+ "@ngx-formly/core": "^7.0.1",
22
+ "@ngx-formly/material": "^7.0.1",
23
23
  "rxjs": "~7.8.0",
24
- "zone.js": "~0.14.2"
24
+ "zone.js": "~0.15.0"
25
25
  },
26
- "description": "An Ionic project",
26
+ "dependencies": {
27
+ "tslib": "^2.3.0"
28
+ },
29
+ "homepage": "https://github.com/JJKid/formly-form-viewer",
27
30
  "module": "fesm2022/formly-form-viewer.mjs",
28
31
  "typings": "index.d.ts",
29
32
  "exports": {
@@ -32,13 +35,8 @@
32
35
  },
33
36
  ".": {
34
37
  "types": "./index.d.ts",
35
- "esm2022": "./esm2022/formly-form-viewer.mjs",
36
- "esm": "./esm2022/formly-form-viewer.mjs",
37
38
  "default": "./fesm2022/formly-form-viewer.mjs"
38
39
  }
39
40
  },
40
- "sideEffects": false,
41
- "dependencies": {
42
- "tslib": "^2.3.0"
43
- }
41
+ "sideEffects": false
44
42
  }
@@ -1,61 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import { FormGroup, ReactiveFormsModule } from '@angular/forms';
3
- import { FormlyModule } from '@ngx-formly/core';
4
- import { FormlyIonicModule } from '@ngx-formly/ionic';
5
- import { IonicModule } from '@ionic/angular';
6
- import { CommonModule } from '@angular/common';
7
- import * as i0 from "@angular/core";
8
- import * as i1 from "@angular/common";
9
- import * as i2 from "@angular/forms";
10
- import * as i3 from "@ngx-formly/core";
11
- import * as i4 from "@ionic/angular";
12
- export class FormlyViewerComponent {
13
- form = new FormGroup({});
14
- fields = [];
15
- model = {};
16
- options = {};
17
- customFieldClass = 'default-formly-field';
18
- ngOnInit() { }
19
- onSubmit() {
20
- if (this.form.valid) {
21
- console.log(this.model);
22
- }
23
- }
24
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FormlyViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
25
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: FormlyViewerComponent, isStandalone: true, selector: "formly-form-viewer", inputs: { form: "form", fields: "fields", model: "model", options: "options", customFieldClass: "customFieldClass" }, ngImport: i0, template: `
26
- <form [formGroup]="form" (ngSubmit)="onSubmit()">
27
- <formly-form [form]="form" [fields]="fields" [model]="model" [options]="options"
28
- [ngClass]="customFieldClass">
29
- </formly-form>
30
- <ion-button type="submit">Submit</ion-button>
31
- </form>
32
- `, isInline: true, styles: [".default-formly-field{margin-bottom:15px;padding:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i3.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: FormlyIonicModule }, { kind: "ngmodule", type: IonicModule }, { kind: "component", type: i4.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }] });
33
- }
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FormlyViewerComponent, decorators: [{
35
- type: Component,
36
- args: [{ selector: 'formly-form-viewer', standalone: true, template: `
37
- <form [formGroup]="form" (ngSubmit)="onSubmit()">
38
- <formly-form [form]="form" [fields]="fields" [model]="model" [options]="options"
39
- [ngClass]="customFieldClass">
40
- </formly-form>
41
- <ion-button type="submit">Submit</ion-button>
42
- </form>
43
- `, imports: [
44
- CommonModule,
45
- ReactiveFormsModule,
46
- FormlyModule,
47
- FormlyIonicModule,
48
- IonicModule
49
- ], styles: [".default-formly-field{margin-bottom:15px;padding:10px}\n"] }]
50
- }], propDecorators: { form: [{
51
- type: Input
52
- }], fields: [{
53
- type: Input
54
- }], model: [{
55
- type: Input
56
- }], options: [{
57
- type: Input
58
- }], customFieldClass: [{
59
- type: Input
60
- }] } });
61
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWx5LWZvcm0tdmlld2VyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvZm9ybWx5LWZvcm0tdmlld2VyL2Zvcm1seS1mb3JtLXZpZXdlci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFDekQsT0FBTyxFQUFFLFNBQVMsRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ2hFLE9BQU8sRUFBd0MsWUFBWSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDdEYsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDdEQsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0F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ybXNNb2R1bGUsXHJcbiAgICBGb3JtbHlNb2R1bGUsXHJcbiAgICBGb3JtbHlJb25pY01vZHVsZSxcclxuICAgIElvbmljTW9kdWxlXHJcbiAgXSxcclxuICBzdHlsZXM6IFtgXHJcbiAgICAuZGVmYXVsdC1mb3JtbHktZmllbGQge1xyXG4gICAgICBtYXJnaW4tYm90dG9tOiAxNXB4O1xyXG4gICAgICBwYWRkaW5nOiAxMHB4O1xyXG4gICAgfVxyXG4gIGBdXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBGb3JtbHlWaWV3ZXJDb21wb25lbnQgaW1wbGVtZW50cyBPbkluaXQge1xyXG4gIEBJbnB1dCgpIGZvcm06IEZvcm1Hcm91cCA9IG5ldyBGb3JtR3JvdXAoe30pO1xyXG4gIEBJbnB1dCgpIGZpZWxkczogRm9ybWx5RmllbGRDb25maWdbXSA9IFtdO1xyXG4gIEBJbnB1dCgpIG1vZGVsOiBhbnkgPSB7fTtcclxuICBASW5wdXQoKSBvcHRpb25zOiBGb3JtbHlGb3JtT3B0aW9ucyA9IHt9O1xyXG4gIEBJbnB1dCgpIGN1c3RvbUZpZWxkQ2xhc3M6IHN0cmluZyA9ICdkZWZhdWx0LWZvcm1seS1maWVsZCc7XHJcblxyXG4gIG5nT25Jbml0KCkge31cclxuXHJcbiAgb25TdWJtaXQoKSB7XHJcbiAgICBpZiAodGhpcy5mb3JtLnZhbGlkKSB7XHJcbiAgICAgIGNvbnNvbGUubG9nKHRoaXMubW9kZWwpO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public-api';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWx5LWZvcm0tdmlld2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2Zvcm1seS1mb3JtLXZpZXdlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
@@ -1,2 +0,0 @@
1
- export * from './app/formly-form-viewer/formly-form-viewer.component';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsdURBQXVELENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2FwcC9mb3JtbHktZm9ybS12aWV3ZXIvZm9ybWx5LWZvcm0tdmlld2VyLmNvbXBvbmVudCc7XHJcbiJdfQ==