From 3f93e339feea459c164f7c250f7bda88c76ea4ec Mon Sep 17 00:00:00 2001 From: mariateresa Date: Mon, 18 Mar 2024 17:55:25 +0100 Subject: [PATCH] work in progres... --- .../facet-composer.component.html | 40 +++--- .../facet-composer.component.scss | 12 ++ .../facet-composer.component.ts | 125 +++++++++--------- 3 files changed, 99 insertions(+), 78 deletions(-) diff --git a/src/main/webapp/app/facet-composer/facet-composer.component.html b/src/main/webapp/app/facet-composer/facet-composer.component.html index 2f90da0..b4ad2bb 100644 --- a/src/main/webapp/app/facet-composer/facet-composer.component.html +++ b/src/main/webapp/app/facet-composer/facet-composer.component.html @@ -18,43 +18,51 @@
-
- +
+ + + + - - +
-

{{typeSpec.facetSpecs[ind].description}}

+
- + + + relation - + {{item}} - - + -
+
{{typeSpec.facetSpecs[ind].guiProps[i].label}} +
- - - - + + +
+ + + +
diff --git a/src/main/webapp/app/facet-composer/facet-composer.component.scss b/src/main/webapp/app/facet-composer/facet-composer.component.scss index e69de29..838e961 100644 --- a/src/main/webapp/app/facet-composer/facet-composer.component.scss +++ b/src/main/webapp/app/facet-composer/facet-composer.component.scss @@ -0,0 +1,12 @@ +.tableTooltip{ + transform: scale(1.5)!important; + background-color: bisque!important; + position: relative !important; + font-size: 10px; + color: black!important; + font-weight: bold; +} + +.mat-icon { + font-size: 32px; +} diff --git a/src/main/webapp/app/facet-composer/facet-composer.component.ts b/src/main/webapp/app/facet-composer/facet-composer.component.ts index 705271d..7ac17eb 100644 --- a/src/main/webapp/app/facet-composer/facet-composer.component.ts +++ b/src/main/webapp/app/facet-composer/facet-composer.component.ts @@ -36,8 +36,8 @@ export class FacetComposerComponent implements OnInit { myForm: FormGroup; //form complessiva + facetData: IFacetComposer[]; typeSpec: ITypeSpecification; - // relationOptions: string[]|undefined; defaultProperty = { "type": "text", @@ -51,6 +51,7 @@ export class FacetComposerComponent implements OnInit { defaultFacet = { + "name": "nuova facet", "relation": "ConsistsOf", "properties": [ { @@ -70,7 +71,8 @@ export class FacetComposerComponent implements OnInit { @Inject(MAT_DIALOG_DATA) data: {type: IResource ,context:IContextNode}){ this.titleType = data.type.name; this.titlePath = data.context.path; - this.typeSpec = {} as ITypeSpecification; + this.facetData = []; + this.typeSpec = {} as ITypeSpecification; this.myForm = this.fb.group({ facets: new FormArray([ @@ -83,7 +85,11 @@ export class FacetComposerComponent implements OnInit { */ } - + removeGroup(i: number) { + // remove address from the list + const control = this.myForm.controls['times']; + control.removeAt(i); + } /* [INFO] An unhandled exception occurred: Script file node_modules/jsonpath-plus/dist/index-umd.js does not exist. [INFO] See "/private/var/folders/sx/pzmn6csj17n2l3d_f1m5jmdr0000gn/T/ng-8XFcFL/angular-errors.log" for further details. @@ -91,6 +97,7 @@ export class FacetComposerComponent implements OnInit { ngOnInit(): void { this.guiService.getFormStructure(this.titlePath,this.titleType).subscribe(res => { this.typeSpec = res; + this.facetData = res.facetSpecs; this.createForm(res); }); } @@ -107,14 +114,14 @@ export class FacetComposerComponent implements OnInit { //TODO: NOTA BENE--> FormGroup->access by NAME, FormArray->access by INDEX!! - createForm(facetData:ITypeSpecification):void{ - for(let i=0; i0){ - for (let k=0; kthis.myForm.controls['facets']; + controls.removeAt(index); - removeFacet(index: number): void { + + /* + for(let j=0; j(this.facetArray.controls[index]).controls.propertyArray).push(this.propertyGroup); - */ - } + // alert('add prop!'); + } close():void { this.resetForm();