From 0e9e7cc667e8e4925e45cfdfbbc10ef1346ae5a9 Mon Sep 17 00:00:00 2001 From: ShaabanEltanany Date: Tue, 6 Oct 2020 16:09:16 +0200 Subject: adding action attributes sidebard Issue-ID: CCSDK-2874 Signed-off-by: ShaabanEltanany Change-Id: I962f98e9caaa8db4753d5266b8084eae7cb0961d --- .../action-attributes.component.css | 0 .../action-attributes.component.html | 164 ++++++++++++++++++++ .../action-attributes.component.spec.ts | 25 +++ .../action-attributes.component.ts | 32 ++++ .../models/InputActionAttribute.ts | 10 ++ .../packages/designer/designer.component.html | 170 +-------------------- .../feature-modules/packages/packages.module.ts | 2 + 7 files changed, 236 insertions(+), 167 deletions(-) create mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.css create mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.html create mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.spec.ts create mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts create mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/models/InputActionAttribute.ts (limited to 'cds-ui/designer-client/src') diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.css b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.html new file mode 100644 index 000000000..9a3818671 --- /dev/null +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.html @@ -0,0 +1,164 @@ + +
+
+
+
+
+ +
+
Action Attributes
+
+
+ + +
+
+
+
+
+
+
+ + +
+
+
+ +
+
+
Add Attribute
+
+
+ + Custom Attribute + + +
+
+ + Function Attribute +
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ + + diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.spec.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.spec.ts new file mode 100644 index 000000000..12078eb0d --- /dev/null +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ActionAttributesComponent } from './action-attributes.component'; + +describe('ActionAttributesComponent', () => { + let component: ActionAttributesComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ActionAttributesComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ActionAttributesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts new file mode 100644 index 000000000..b5e5fda75 --- /dev/null +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts @@ -0,0 +1,32 @@ +import {Component, OnInit} from '@angular/core'; +import {InputActionAttribute, OutputActionAttribute} from './models/InputActionAttribute'; + +@Component({ + selector: 'app-action-attributes', + templateUrl: './action-attributes.component.html', + styleUrls: ['./action-attributes.component.css'] +}) +export class ActionAttributesComponent implements OnInit { + + inputs: [InputActionAttribute]; + outputs: [OutputActionAttribute]; + actionAttributesSideBar: boolean; + + constructor() { + } + + ngOnInit() { + } + + _toggleSidebar2() { + this.actionAttributesSideBar = !this.actionAttributesSideBar; + } + + addInput(input: InputActionAttribute) { + this.inputs.push(input); + } + + addOutput(output: OutputActionAttribute) { + this.outputs.push(output); + } +} diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/models/InputActionAttribute.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/models/InputActionAttribute.ts new file mode 100644 index 000000000..5d2c1116e --- /dev/null +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/models/InputActionAttribute.ts @@ -0,0 +1,10 @@ +export class InputActionAttribute { + name: string; + description: string; + type: string; + required: boolean; +} + +export class OutputActionAttribute extends InputActionAttribute { + +} diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html index 980a94ca5..bca5ba951 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html @@ -269,175 +269,11 @@ - - -
-
-
-
-
- -
-
Action Attributes
-
-
- - -
-
-
-
-
-
-
- - -
-
-
- -
-
-
Add Attribute
-
-
- - Custom Attribute - - -
-
- - Function Attribute -
-
-
-
- -
-
-
- -
-
-
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
-
-
-
- -
-
-
- -
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- + [position]="'right'" #sidebarRight1> +
- @@ -680,4 +516,4 @@ - \ No newline at end of file + diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.module.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.module.ts index 828860a2c..d152e1ef3 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.module.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.module.ts @@ -34,6 +34,7 @@ import {TourMatMenuModule} from 'ngx-tour-md-menu'; import {ComponentCanDeactivateGuard} from '../../../common/core/canDactivate/ComponentCanDeactivateGuard'; import { ImportPackageComponent } from './packages-dashboard/import-package/import-package.component'; import { FunctionsAttributeComponent } from './designer/functions-attribute/functions-attribute.component'; +import { ActionAttributesComponent } from './designer/action-attributes/action-attributes.component'; @NgModule({ declarations: [PackagesDashboardComponent, @@ -58,6 +59,7 @@ import { FunctionsAttributeComponent } from './designer/functions-attribute/func DesignerSourceViewComponent, ImportPackageComponent, FunctionsAttributeComponent, + ActionAttributesComponent, ], imports: [ -- cgit 1.2.3-korg