formly-form-viewer 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/formly-form-viewer/formly-form-viewer.component.d.ts +15 -0
- package/esm2022/app/formly-form-viewer/formly-form-viewer.component.mjs +61 -0
- package/esm2022/formly-form-viewer.mjs +5 -0
- package/esm2022/public-api.mjs +2 -0
- package/fesm2022/formly-form-viewer.mjs +68 -0
- package/fesm2022/formly-form-viewer.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/package.json +44 -0
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import { FormlyFieldConfig, FormlyFormOptions } from '@ngx-formly/core';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FormlyViewerComponent implements OnInit {
|
|
6
|
+
form: FormGroup;
|
|
7
|
+
fields: FormlyFieldConfig[];
|
|
8
|
+
model: any;
|
|
9
|
+
options: FormlyFormOptions;
|
|
10
|
+
customFieldClass: string;
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
onSubmit(): void;
|
|
13
|
+
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
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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
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9ybWx5RmllbGRDb25maWdbXSA9IFtdO1xyXG4gIEBJbnB1dCgpIG1vZGVsOiBhbnkgPSB7fTtcclxuICBASW5wdXQoKSBvcHRpb25zOiBGb3JtbHlGb3JtT3B0aW9ucyA9IHt9O1xyXG4gIEBJbnB1dCgpIGN1c3RvbUZpZWxkQ2xhc3M6IHN0cmluZyA9ICdkZWZhdWx0LWZvcm1seS1maWVsZCc7XHJcblxyXG4gIG5nT25Jbml0KCkge31cclxuXHJcbiAgb25TdWJtaXQoKSB7XHJcbiAgICBpZiAodGhpcy5mb3JtLnZhbGlkKSB7XHJcbiAgICAgIGNvbnNvbGUubG9nKHRoaXMubW9kZWwpO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWx5LWZvcm0tdmlld2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2Zvcm1seS1mb3JtLXZpZXdlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './app/formly-form-viewer/formly-form-viewer.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsdURBQXVELENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2FwcC9mb3JtbHktZm9ybS12aWV3ZXIvZm9ybWx5LWZvcm0tdmlld2VyLmNvbXBvbmVudCc7XHJcbiJdfQ==
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, Input } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/forms';
|
|
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';
|
|
10
|
+
import * as i1 from '@angular/common';
|
|
11
|
+
import { CommonModule } from '@angular/common';
|
|
12
|
+
|
|
13
|
+
class FormlyViewerComponent {
|
|
14
|
+
form = new FormGroup({});
|
|
15
|
+
fields = [];
|
|
16
|
+
model = {};
|
|
17
|
+
options = {};
|
|
18
|
+
customFieldClass = 'default-formly-field';
|
|
19
|
+
ngOnInit() { }
|
|
20
|
+
onSubmit() {
|
|
21
|
+
if (this.form.valid) {
|
|
22
|
+
console.log(this.model);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
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"] }] });
|
|
34
|
+
}
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FormlyViewerComponent, decorators: [{
|
|
36
|
+
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>
|
|
44
|
+
`, imports: [
|
|
45
|
+
CommonModule,
|
|
46
|
+
ReactiveFormsModule,
|
|
47
|
+
FormlyModule,
|
|
48
|
+
FormlyIonicModule,
|
|
49
|
+
IonicModule
|
|
50
|
+
], styles: [".default-formly-field{margin-bottom:15px;padding:10px}\n"] }]
|
|
51
|
+
}], propDecorators: { form: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}], fields: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], model: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], options: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], customFieldClass: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}] } });
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Generated bundle index. Do not edit.
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
export { FormlyViewerComponent };
|
|
68
|
+
//# sourceMappingURL=formly-form-viewer.mjs.map
|
|
@@ -0,0 +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;IAEb,QAAQ,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACnB,YAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACzB;KACF;uGAbU,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,EAtBtB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EA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AA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FASF,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAzBjC,SAAS;+BACE,oBAAoB,EAAA,UAAA,EAClB,IAAI,EACN,QAAA,EAAA,CAAA;;;;;;;GAOT,EACQ,OAAA,EAAA;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,YAAY;wBACZ,iBAAiB;wBACjB,WAAW;AACZ,qBAAA,EAAA,MAAA,EAAA,CAAA,0DAAA,CAAA,EAAA,CAAA;8BASQ,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBACG,MAAM,EAAA,CAAA;sBAAd,KAAK;gBACG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,gBAAgB,EAAA,CAAA;sBAAxB,KAAK;;;ACrCR;;AAEG;;;;"}
|
package/index.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "formly-form-viewer",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"author": "Ionic Framework",
|
|
5
|
+
"homepage": "https://ionicframework.com/",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/JJKid/formly-form-viewer.git"
|
|
9
|
+
},
|
|
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",
|
|
23
|
+
"rxjs": "~7.8.0",
|
|
24
|
+
"zone.js": "~0.14.2"
|
|
25
|
+
},
|
|
26
|
+
"description": "An Ionic project",
|
|
27
|
+
"module": "fesm2022/formly-form-viewer.mjs",
|
|
28
|
+
"typings": "index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
"./package.json": {
|
|
31
|
+
"default": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./index.d.ts",
|
|
35
|
+
"esm2022": "./esm2022/formly-form-viewer.mjs",
|
|
36
|
+
"esm": "./esm2022/formly-form-viewer.mjs",
|
|
37
|
+
"default": "./fesm2022/formly-form-viewer.mjs"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"sideEffects": false,
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"tslib": "^2.3.0"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './app/formly-form-viewer/formly-form-viewer.component';
|