From 1882380466bbdefeff8ce51da825f16cb21ce184 Mon Sep 17 00:00:00 2001 From: AhmedEldeeb50 Date: Sat, 2 May 2020 18:06:36 +0200 Subject: Package > Temp&Mapp: View Issue-ID: CCSDK-2324 Signed-off-by: AhmedEldeeb50 Change-Id: I39b3a84893d048a6186f6daf4195c20dbcdb98b9 --- cds-ui/designer-client/angular.json | 14 +++-- cds-ui/designer-client/package-lock.json | 8 +++ cds-ui/designer-client/package.json | 1 + cds-ui/designer-client/src/app/app.module.ts | 2 + .../package-creation/package-creation.store.ts | 4 ++ .../templ-mapp-creation.component.css | 4 ++ .../templ-mapp-creation.component.html | 25 +++++---- .../templ-mapp-creation.component.ts | 59 +++++++++++++++------- .../templ-mapp-listing.component.html | 6 +-- .../templ-mapp-listing.component.ts | 2 + 10 files changed, 87 insertions(+), 38 deletions(-) (limited to 'cds-ui') diff --git a/cds-ui/designer-client/angular.json b/cds-ui/designer-client/angular.json index 256c35c1e..e503c1535 100644 --- a/cds-ui/designer-client/angular.json +++ b/cds-ui/designer-client/angular.json @@ -25,6 +25,7 @@ ], "styles": [ "src/styles.css", + "node_modules/ngx-toastr/toastr.css", "./node_modules/datatables.net-dt/css/jquery.dataTables.css", "./node_modules/bootstrap/dist/css/bootstrap.min.css", "./node_modules/@angular/material/prebuilt-themes/purple-green.css", @@ -61,12 +62,10 @@ }, "configurations": { "production": { - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - } - ], + "fileReplacements": [{ + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + }], "optimization": true, "outputHashing": "all", "sourceMap": false, @@ -76,8 +75,7 @@ "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, - "budgets": [ - { + "budgets": [{ "type": "initial", "maximumWarning": "2mb", "maximumError": "5mb" diff --git a/cds-ui/designer-client/package-lock.json b/cds-ui/designer-client/package-lock.json index 46997c4ab..89d9c064c 100644 --- a/cds-ui/designer-client/package-lock.json +++ b/cds-ui/designer-client/package-lock.json @@ -8101,6 +8101,14 @@ "tslib": "^1.9.0" } }, + "ngx-toastr": { + "version": "11.3.3", + "resolved": "https://registry.npmjs.org/ngx-toastr/-/ngx-toastr-11.3.3.tgz", + "integrity": "sha512-DbLFkSZHsVPuuIIrsY1ziEhdkFUQ0V1yG1N0+1nKXGI5QBVesEDxLUVtntjzxJcWw/uUV+bKApo//tGHHORabQ==", + "requires": { + "tslib": "^1.9.0" + } + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", diff --git a/cds-ui/designer-client/package.json b/cds-ui/designer-client/package.json index ec968ba7a..1e5128111 100644 --- a/cds-ui/designer-client/package.json +++ b/cds-ui/designer-client/package.json @@ -43,6 +43,7 @@ "ng2-ace-editor": "^0.3.9", "ngx-bootstrap": "^5.6.1", "ngx-file-drop": "^8.0.8", + "ngx-toastr": "^11.3.3", "rxjs": "~6.4.0", "stream": "0.0.2", "tslib": "^1.10.0", diff --git a/cds-ui/designer-client/src/app/app.module.ts b/cds-ui/designer-client/src/app/app.module.ts index da7ddfbd0..fd07d34c0 100644 --- a/cds-ui/designer-client/src/app/app.module.ts +++ b/cds-ui/designer-client/src/app/app.module.ts @@ -34,6 +34,7 @@ import {SidebarModule} from 'ng-sidebar'; import {SharedModulesModule} from './modules/shared-modules/shared-modules.module'; import {NgxFileDropModule} from 'ngx-file-drop'; import {ResourceDictionaryModule} from './modules/feature-modules/resource-dictionary/resource-dictionary.module'; +import { ToastrModule } from 'ngx-toastr'; @NgModule({ @@ -53,6 +54,7 @@ import {ResourceDictionaryModule} from './modules/feature-modules/resource-dicti NgxFileDropModule, ResourceDictionaryModule, SidebarModule, + ToastrModule.forRoot() // ToastrModule added ], providers: [ApiService], diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts index 0808223cd..8302697fe 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts @@ -84,6 +84,10 @@ export class PackageCreationStore extends Store { this.state.scripts.files.delete(name); } + fileExist(key: string) { + return this.state.templates.files.has(key); + } + removeFileFromDefinition(filename) { this.state.definitions.imports.delete(filename); } diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.css b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.css index e69de29bb..7273b9c27 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.css +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.css @@ -0,0 +1,4 @@ +.accordian-title { + color: #a09e9e; + font-size: .9em; +} \ No newline at end of file diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html index 16c3101f2..e6149c883 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html @@ -12,13 +12,13 @@
-
+
@@ -70,7 +70,8 @@
@@ -119,8 +120,10 @@ - - + + {{ dict.name }} {{ dict.name }} @@ -166,8 +169,10 @@ - - + + {{ dict['name'] }} {{ dict['name'] }} @@ -194,7 +199,7 @@
- +
@@ -212,8 +217,8 @@