File tree Expand file tree Collapse file tree 8 files changed +19
-177
lines changed Expand file tree Collapse file tree 8 files changed +19
-177
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export class AppComponent implements OnInit {
20
20
jsonSchema = {
21
21
camt : [
22
22
{ id : 'camt.052.001.11' , activated : false } ,
23
- { id : 'camt.053.001.11 ' , activated : false } ,
23
+ { id : 'camt.053.001.10 ' , activated : false } ,
24
24
{ id : 'camt.054.001.11' , activated : false } ] ,
25
25
pacs : [
26
26
{ id : 'pacs.002.001.12' , activated : false } ,
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import { MatListModule } from '@angular/material/list';
10
10
import { RouterModule } from '@angular/router' ;
11
11
import { MatIconModule } from '@angular/material/icon' ;
12
12
import { MatButtonModule } from '@angular/material/button' ;
13
- // import { NgxIsoFormModule } from 'projects/ngx-iso-form/src/public-api';
14
- import { NgxIsoFormModule } from 'ngx-iso-form' ;
13
+ import { NgxIsoFormModule } from 'projects/ngx-iso-form/src/public-api' ;
14
+ // import { NgxIsoFormModule } from 'ngx-iso-form';
15
15
import { ReadonlyComponent } from './readonly.component' ;
16
16
import { IsoComponent } from './component/iso.component' ;
17
17
import { MatFormFieldModule } from '@angular/material/form-field' ;
@@ -43,7 +43,7 @@ export function HttpLoaderFactory(http: HttpClient) {
43
43
MatFormFieldModule ,
44
44
MatInputModule ,
45
45
RouterModule . forRoot ( [
46
- { path : '**' , component : ReadonlyComponent }
46
+ { path : '**' , component : IsoComponent }
47
47
] , { useHash : true } ) ,
48
48
TranslateModule . forRoot ( {
49
49
defaultLanguage : 'en' ,
Original file line number Diff line number Diff line change 34
34
</ mat-nav-list >
35
35
</ as-split-area >
36
36
< as-split-area [size] ="75 ">
37
+ < textarea [(ngModel)] ="formData "> </ textarea >
38
+ < button (click) ="getForm() "> Get Form Data</ button >
39
+ < button (click) ="initForm() "> Show the form</ button >
37
40
< h3 > {{selectedSchema}}</ h3 >
38
41
< ngx-iso-form [schema] ="schema " [form] ="form "> </ ngx-iso-form >
39
42
</ as-split-area >
Original file line number Diff line number Diff line change @@ -17,10 +17,11 @@ export class IsoComponent implements OnInit {
17
17
form : IsoForm ;
18
18
schema : SchemaElement ;
19
19
selectedSchema : string ;
20
+ formData :string ;
20
21
jsonSchema = {
21
22
camt : [
22
23
{ id : 'camt.052.001.11' , activated : false } ,
23
- { id : 'camt.053.001.11 ' , activated : false } ,
24
+ { id : 'camt.053.001.10 ' , activated : false } ,
24
25
{ id : 'camt.054.001.11' , activated : false } ] ,
25
26
pacs : [
26
27
{ id : 'pacs.002.001.12' , activated : false } ,
@@ -73,9 +74,12 @@ export class IsoComponent implements OnInit {
73
74
} ) ;
74
75
}
75
76
}
77
+ initForm ( ) {
78
+ this . form = new IsoForm ( JSON . parse ( this . formData ) ) ;
79
+ }
76
80
getForm ( ) {
77
81
const data = this . form . getFormModel ( ) ;
78
- console . log ( JSON . stringify ( data ) ) ;
82
+ this . formData = JSON . stringify ( data )
79
83
}
80
84
81
85
}
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ Please declare all your translation rules under 'iso' object.
129
129
"GrpHdr" :{
130
130
"label" : " Group Header"
131
131
},
132
- "document_bktocstmrstmt_grphdr_credttm " : {
132
+ "Document_BkToCstmrStmt_GrpHdr_CreDtTm " : {
133
133
"label" : " Create Datetime" ,
134
134
"general" :{
135
135
"format" :" YYYY-MM-DDThh:mm:ss.sss+/-"
Original file line number Diff line number Diff line change @@ -197,7 +197,6 @@ export class NgxIsoFormComponent implements OnChanges {
197
197
}
198
198
199
199
protected getFormControl ( node : SchemaModel ) : FormControl {
200
- debugger
201
200
return this . service . getFormControl ( '' ) ;
202
201
}
203
202
Original file line number Diff line number Diff line change @@ -281,17 +281,17 @@ export class NgxIsoService {
281
281
const ccy = structuredClone ( item ) ;
282
282
const amt = structuredClone ( item ) ;
283
283
284
- ccy . id = `${ ccy . id } _ccy ` ;
284
+ ccy . id = `${ ccy . id } _Ccy ` ;
285
285
ccy . name = 'Ccy' ;
286
286
ccy . fractionDigits = '' ;
287
287
ccy . totalDigits = '' ;
288
288
ccy . maxLength = '3' ;
289
- ccy . xpath = `${ ccy . xpath } @ccy ` ;
289
+ ccy . xpath = `${ ccy . xpath } @Ccy ` ;
290
290
ccy . isCurrency = false ;
291
291
elements . push ( ccy ) ;
292
292
293
- amt . id = `${ amt . id } _amt ` ;
294
- amt . xpath = `${ amt . xpath } /amt ` ;
293
+ amt . id = `${ amt . id } _Amt ` ;
294
+ amt . xpath = `${ amt . xpath } /Amt ` ;
295
295
amt . isCurrency = false ;
296
296
amt . pattern = '' ;
297
297
elements . push ( amt ) ;
You can’t perform that action at this time.
0 commit comments