diff --git a/.gitignore b/.gitignore index 651746eac..27703dea2 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ speed-measure-plugin.json .history/* # misc +/.angular/cache /.sass-cache /connect.lock /coverage diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..9cf949503 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false \ No newline at end of file diff --git a/README.md b/README.md index e0e9a94fc..602963f51 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/dxc-technology/halstack-angular/blob/master/CONTRIBUTING.md) ![Publish Next Version](https://github.com/dxc-technology/halstack-angular/workflows/Publish%20Next%20Version/badge.svg) ![Publish Release](https://github.com/dxc-technology/halstack-angular/workflows/Publish%20Release/badge.svg) -# Halstack Angular CDK +## Halstack Angular CDK ## # # Halstack Angular CDK is a npm library of reusable Angular components, made with the purpose of helping Angular developers with the task of implementing User Interfaces following the DXC Design Guidelines. @@ -25,7 +25,7 @@ These instructions will get you a copy of the project up and running on your loc The project is divided in two main folders. One is for the actual library, and the other one is a Angular application using the library. -### Library +### Library test Contained in the `projects\dxc-ngx-cdk`. diff --git a/angular.json b/angular.json index d1f1a57d0..13ab74e5b 100644 --- a/angular.json +++ b/angular.json @@ -22,6 +22,7 @@ "index": "projects/dxc-ngx-cdk-site/src/index.html", "main": "projects/dxc-ngx-cdk-site/src/main.ts", "polyfills": "projects/dxc-ngx-cdk-site/src/polyfills.ts", + "inlineStyleLanguage": "scss", "tsConfig": "projects/dxc-ngx-cdk-site/tsconfig.app.json", "aot": false, "assets": [ @@ -50,7 +51,13 @@ ], "scripts": [], - "baseHref": "/" + "baseHref": "/", + "vendorChunk": true, + "extractLicenses": false, + "buildOptimizer": false, + "sourceMap": true, + "optimization": false, + "namedChunks": true }, "configurations": { "production": { @@ -63,16 +70,14 @@ "optimization": true, "outputHashing": "all", "sourceMap": false, - "extractCss": true, "namedChunks": false, "extractLicenses": true, "vendorChunk": false, - "buildOptimizer": false, "budgets": [ { "type": "initial", "maximumWarning": "4mb", - "maximumError": "5mb" + "maximumError": "6mb" }, { "type": "anyComponentStyle", @@ -81,7 +86,8 @@ } ] } - } + }, + "defaultConfiguration": "" }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", @@ -122,19 +128,6 @@ "scripts": [] } }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "projects/dxc-ngx-cdk-site/tsconfig.app.json", - "projects/dxc-ngx-cdk-site/tsconfig.spec.json", - "projects/dxc-ngx-cdk-site/e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { @@ -179,9 +172,18 @@ } ], "styles": [ - "projects/dxc-ngx-cdk-examples/src/styles.scss" + "projects/dxc-ngx-cdk-examples/src/styles.scss", + "./node_modules/bootstrap/dist/css/bootstrap.css", ], - "scripts": [] + "scripts": [ + "./node_modules/bootstrap/dist/js/bootstrap.js" + ], + "vendorChunk": true, + "extractLicenses": false, + "buildOptimizer": false, + "sourceMap": true, + "optimization": false, + "namedChunks": true }, "configurations": { "production": { @@ -194,9 +196,7 @@ "optimization": true, "outputHashing": "all", "sourceMap": false, - "extractCss": true, "namedChunks": false, - "aot": false, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, @@ -212,7 +212,8 @@ } ] } - } + }, + "defaultConfiguration": "" }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", @@ -249,18 +250,6 @@ "projects/dxc-ngx-cdk-examples/src/assets" ] } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "projects/dxc-ngx-cdk-examples/tsconfig.app.json", - "projects/dxc-ngx-cdk-examples/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } } } }, @@ -271,7 +260,7 @@ "prefix": "dxc-ngx-cdk", "architect": { "build": { - "builder": "@angular-devkit/build-ng-packagr:build", + "builder": "@angular-devkit/build-angular:ng-packagr", "options": { "tsConfig": "projects/dxc-ngx-cdk/tsconfig.lib.json", "project": "projects/dxc-ngx-cdk/ng-package.json" @@ -280,7 +269,15 @@ "production": { "tsConfig": "projects/dxc-ngx-cdk/tsconfig.lib.prod.json" } - } + }, + "styles": [ + "./node_modules/bootstrap/dist/css/bootstrap.css" + ], + "scripts": [ + "../app/node_modules/jquery/dist/jquery.min.js", + "./node_modules/jstree/dist/jstree.min.js", + "./node_modules/bootstrap/dist/js/bootstrap.js" + ] }, "test": { "builder": "@angular-devkit/build-angular:karma", @@ -289,23 +286,10 @@ "tsConfig": "projects/dxc-ngx-cdk/tsconfig.spec.json", "karmaConfig": "projects/dxc-ngx-cdk/karma.conf.js" } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "projects/dxc-ngx-cdk/tsconfig.lib.json", - "projects/dxc-ngx-cdk/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } } } } }, - "defaultProject": "angular-dxc-site", "cli": { "analytics": false } diff --git a/package.json b/package.json index b38024052..d9205813c 100644 --- a/package.json +++ b/package.json @@ -3,84 +3,92 @@ "version": "0.0.0", "scripts": { "ng": "ng", - "start": "ng serve angular-dxc-site --baseHref=/tools/angular/", + "start": "ng run angular-dxc-site:serve", "start:next": "ng serve angular-dxc-site --baseHref=/tools/angular/next/", - "start-example": "ng serve dxc-angular-cdk", - "build-next-cdk-site": "ng build angular-dxc-site --prod --baseHref=/tools/angular/next/", - "build-release-cdk-site": "ng build angular-dxc-site --prod ", + "build-next-cdk-site": "ng build angular-dxc-site --configuration production --baseHref=/tools/angular/next/", + "build-release-cdk-site": "ng build angular-dxc-site --configuration production ", "link-lib": "cd ./projects/dxc-ngx-cdk-site && npm link ../../dist/dxc-ngx-cdk", "unlink-lib": "cd ./dist/dxc-ngx-cdk && npm unlink", "test": "jest", "lint": "ng lint", "e2e": "ng e2e", - "cy:open": "cypress open", - "cy:fast": "cypress run --env updateSnapshots=true --spec './cypress/integration/fast-visual-regression.js' --config video=false ", - "cypress:ci": "start-server-and-test start http://localhost:4200 cy:fast", - "gzip": "gzipper compress ./dist/angular-dxc-site ./dist/angular-dxc-site-gzip", "scully": "scully", "scully:next": "scully --configFile scully.angular-dxc-site.next.config", - "scully:serve": "scully serve" + "scully:serve": "scully serve", + "pre-analyze": "ng build --stats-json", + "analyze": "webpack-bundle-analyzer ./dist/angular-dxc-site/stats.json", + "storybook": "ng run dxc-ngx-cdk:storybook", + "build-storybook": "ng run dxc-ngx-cdk:build-storybook", + "postinstall": "ngcc" }, "private": true, "dependencies": { - "@angular/animations": "10.2.0", - "@angular/cdk": "10.2.5", - "@angular/common": "10.2.0", - "@angular/compiler": "10.2.0", - "@angular/core": "10.2.0", - "@angular/forms": "10.2.0", - "@angular/material": "10.2.5", - "@angular/material-moment-adapter": "10.2.5", - "@angular/platform-browser": "10.2.0", - "@angular/platform-browser-dynamic": "10.2.0", - "@angular/router": "10.2.0", + "@angular/animations": "15.2.4", + "@angular/cdk": "15.2.3", + "@angular/common": "15.2.4", + "@angular/compiler": "15.2.4", + "@angular/core": "15.2.4", + "@angular/forms": "15.2.4", + "@angular/material": "15.2.3", + "@angular/material-moment-adapter": "15.2.3", + "@angular/platform-browser": "15.2.4", + "@angular/platform-browser-dynamic": "15.2.4", + "@angular/router": "15.2.4", "@babel/preset-env": "^7.4.5", - "@material-extended/mde": "^2.2.2", - "@scullyio/init": "^1.0.1", - "@scullyio/ng-lib": "^1.0.0", - "@scullyio/scully": "^1.0.0", - "@types/jest": "^25.2.1", - "aws-sdk": "^2.718.0", - "babel-jest": "^24.8.0", - "emotion": "10.0.27", - "jest": "^24.9.0", - "jest-preset-angular": "^7.1.1", - "moment": "^2.24.0", - "ng-packagr": "^10.1.0", - "ngx-monaco-editor": "8.1.1", - "rgb-hex": "^3.0.0", - "rxjs": "~6.5.2", - "tinycolor2": "^1.4.2", + "@ctrl/tinycolor": "^3.6.0", + "@emotion/css": "11.11.0", + "csstype": ">=3.0.2 <=3.1.2", + "@mdi/font": "^7.2.96", + "@scullyio/init": "^2.1.41", + "@scullyio/ng-lib": "^2.1.41", + "@scullyio/scully": "^2.1.41", + "@types/jest": "^29.5.1", + "amazon-cognito-identity-js": "^6.2.0", + "aws-sdk": "^2.1366.0", + "babel-jest": "^29.5.0", + "bootstrap": "^5.2.3", + "emotion": "11.0.0", + "file-saver": "^2.0.5", + "fs": "0.0.1-security", + "immutable": "^4.3.0", + "jest": "^29.5.0", + "jest-preset-angular": "^13.0.1", + "moment": "^2.29.4", + "ng-packagr": "^15.2.2", + "ngx-infinite-scroll": "^15.0.0", + "ngx-material-timepicker": "^5.5.3", + "ngx-monaco-editor-v2": "15.0.1", + "ngx-toastr": "16.1.1", + "rgb-hex": "^4.0.1", + "rxjs": "~7.4.0", + "tinycolor2": "^1.6.0", "vanilla-text-mask": "^5.1.1", - "zone.js": "~0.10.3" + "zone.js": "~0.13.0" }, "devDependencies": { - "@angular-devkit/build-angular": "0.1002.0", - "@angular-devkit/build-ng-packagr": "0.1002.0", - "@angular/cli": "10.2.0", - "@angular/compiler-cli": "10.2.0", - "@angular/language-service": "10.2.0", - "@babel/core": "^7.4.5", - "@schematics/angular": "^10.2.1", - "@scullyio/scully-plugin-base-href-rewrite": "^1.0.0-beta.0", - "@types/jasmine": "3.3.8", - "@types/jasminewd2": "2.0.3", - "@types/node": "^12.11.1", - "babel-loader": "^8.0.6", - "codelyzer": "^5.1.2", - "jasmine-core": "~3.5.0", - "jasmine-spec-reporter": "~5.0.0", - "karma": "~5.0.0", - "karma-chrome-launcher": "~3.1.0", - "karma-coverage-istanbul-reporter": "~3.0.2", - "karma-jasmine": "~4.0.0", - "karma-jasmine-html-reporter": "^1.5.0", - "protractor": "~7.0.0", - "start-server-and-test": "^1.10.6", - "ts-node": "7.0.0", - "tslib": "^2.0.0", + "@angular-devkit/build-angular": "15.2.4", + "@angular/cli": "15.2.4", + "@angular/compiler-cli": "15.2.4", + "@angular/language-service": "15.2.4", + "@babel/core": "^7.21.4", + "@schematics/angular": "15.2.7", + "@scullyio/scully-plugin-base-href-rewrite": "^2.1.41", + "@types/jasmine": "~4.3.1", + "@types/jasminewd2": "2.0.10", + "@types/node": "^18.16.1", + "babel-loader": "^9.1.2", + "codelyzer": "^6.0.1", + "jasmine-core": "~4.6.0", + "jasmine-spec-reporter": "~7.0.0", + "karma": "~6.4.2", + "karma-chrome-launcher": "~3.2.0", + "karma-coverage-istanbul-reporter": "~3.0.3", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "^2.0.0", + "start-server-and-test": "^2.0.0", + "ts-node": "10.9.1", + "tslib": "^2.5.0", "tslint": "~6.1.0", - "typescript": "^3.6.5", - "rgb-hex": "^3.0.0" + "typescript": "4.9.5" } } diff --git a/projects/dxc-ngx-cdk-examples/src/app/app-initializer.service.ts b/projects/dxc-ngx-cdk-examples/src/app/app-initializer.service.ts new file mode 100644 index 000000000..c0af5d3b4 --- /dev/null +++ b/projects/dxc-ngx-cdk-examples/src/app/app-initializer.service.ts @@ -0,0 +1,106 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { ConfigurationsetupService, RequiredFormat, LocalStorageService } from '@dxc-technology/halstack-angular'; + +@Injectable({ + providedIn: 'root' +}) +export class AppInitializer { + rmaConfig: any = {}; + constructor(private http: HttpClient, + private configService: ConfigurationsetupService, + private localStorage: LocalStorageService) { + + } + loadConfig() { + const val = this.localStorage.get('clientId'); + if (val === null) { + this.localStorage.set('clientId', '0'); + } + let myPromiseArray = []; + myPromiseArray.push(this.http + .get('../rmacommon/config.json') + .toPromise()); + myPromiseArray.push(this.http + .get('./assets/config/buttonmap.json') + .toPromise()); + + return Promise.all(myPromiseArray).then(result => { + this.configService.config({ + SERVER: { + RMUISERVER: result[0].RMUISERVER + '/RiskmasterUI', + RMASERVER: result[0].RMASERVER + '/riskmasterapi', + CLAIMSROOTURI: (result[0].CLAIMSROOTURI + (result[0].CLAIMSROOTURIVIRDIR != '' ? '/' + result[0].CLAIMSROOTURIVIRDIR : '')), + UXRMASERVER: (window.location.protocol + '//' + + window.location.hostname + (window.location.port ? ':' + + window.location.port : '')) + }, + TIMEOUT: result[0].TIMEOUT, + AUTHENTICATIONKEY: '', + HELPLINK: result[0].RMAHELPLINK, + REQUIRED: RequiredFormat.STAR, + ButtonIcon: result[1], + Settings: {}, + Resource: {}, + GlobalResource: {} + }); + }).catch((err: any) => { + this.configService.config({ + SERVER: { + CLAIMSERVER: 'http://localhost/claimsapi', + CODESERVER: 'http://localhost/claimsapi', + RESOURCESERVER: 'http://localhost/claimsapi', + UTITILTYSERVER: 'http://localhost/claimsapi', + ENTITYSERVER: 'http://localhost/claimsapi', + RMASERVER: 'http://localhost/riskmasterapi' + }, + TIMEOUT: '90', + AUTHENTICATIONKEY: `a1WuztmA0oJKzv3N2JNvbWUBalcZ6/pIXWSNY+Ie7evkH + ea089/pUH3xO6P6PXFH1pq3tituSAHYT6jlLCn8ELh59OxNmT8wwLeABoUq3dx9CVPEK3YcXUWGWZFM0cWtdUo9UuhpxrJzIQkOy2nJeKzjCqBFZKcFIjgR59rSTXs=`, + HELPLINK: '', + REQUIRED: RequiredFormat.BORDER, + ButtonIcon: { "save": "save", "SAVE": "save", "undo": "undo", + "UNDO": "undo", "create": "add", + "CREATE": "add" }, + Settings: {}, + Resource: {}, + GlobalResource:{} + }); + }); + // return this.http + // .get('../rmacommon/config.json') + // .toPromise() + // .then((data: any) => { + // this.configService.config({ + // SERVER: { + // RMASERVER: data.RMASERVER + '/' + data.RMASERVERVIRDIR, + // CLAIMSROOTURI: data.RMASERVER + '/' + data.CLAIMSROOTURIVIRDIR + // }, + // TIMEOUT: '90', + // AUTHENTICATIONKEY: '', + // HELPLINK: '', + // REQUIRED: RequiredFormat.STAR + // }); + // }) + // .catch((err: any) => { + // this.configService.config({ + // SERVER: { + // CLAIMSERVER: 'http://localhost/claimsapi', + // CODESERVER: 'http://localhost/claimsapi', + // RESOURCESERVER: 'http://localhost/claimsapi', + // UTITILTYSERVER: 'http://localhost/claimsapi', + // ENTITYSERVER: 'http://localhost/claimsapi', + // RMASERVER: 'http://localhost' + // }, + // TIMEOUT: '90', + // AUTHENTICATIONKEY: `a1WuztmA0oJKzv3N2JNvbWUBalcZ6/pIXWSNY+Ie7evkH + // ea089/pUH3xO6P6PXFH1pq3tituSAHYT6jlLCn8ELh59OxNmT8wwLeABoUq3dx9CVPEK3YcXUWGWZFM0cWtdUo9UuhpxrJzIQkOy2nJeKzjCqBFZKcFIjgR59rSTXs=`, + // HELPLINK: '', + // REQUIRED: RequiredFormat.BORDER + // }); + // console.log('Error', err); + // }); + + + } +} diff --git a/projects/dxc-ngx-cdk-examples/src/app/app.component.html b/projects/dxc-ngx-cdk-examples/src/app/app.component.html index f65d7af23..122c192e9 100644 --- a/projects/dxc-ngx-cdk-examples/src/app/app.component.html +++ b/projects/dxc-ngx-cdk-examples/src/app/app.component.html @@ -10,6 +10,7 @@
+
diff --git a/projects/dxc-ngx-cdk-examples/src/app/app.component.scss b/projects/dxc-ngx-cdk-examples/src/app/app.component.scss index 04f9a3ee7..b7fb411d7 100644 --- a/projects/dxc-ngx-cdk-examples/src/app/app.component.scss +++ b/projects/dxc-ngx-cdk-examples/src/app/app.component.scss @@ -28,6 +28,8 @@ header { } .sidenav-links { padding: 20px; + display: flex; + flex-direction: column; .nav-item { margin-bottom: 5px; padding-left: 0px; diff --git a/projects/dxc-ngx-cdk-examples/src/app/app.module.ts b/projects/dxc-ngx-cdk-examples/src/app/app.module.ts index e882ad98c..c902f64e4 100644 --- a/projects/dxc-ngx-cdk-examples/src/app/app.module.ts +++ b/projects/dxc-ngx-cdk-examples/src/app/app.module.ts @@ -1,5 +1,6 @@ -import { NgModule } from "@angular/core"; +import { NgModule, APP_INITIALIZER } from "@angular/core"; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; import { AppRoutingModule } from "./app-routing.module"; import { AppComponent } from "./app.component"; import { ButtonInfoComponent } from "./pages/button/button-info.component"; @@ -72,13 +73,26 @@ import { ThemeModule, DxcApplicationLayoutModule, DxcChipModule, + DxcCommonModule, + DxcLocalStorageModule, + DxcModalFormModule, + DxcCrudTableModule, + DxcResizeService, + DxcSizeDetectorModule } from "@dxc-technology/halstack-angular"; import { UploadComponent } from "./pages/upload/upload.component"; import { TextareaInfoComponent } from "./pages/textarea/textarea-info.component"; import { ApplicationInfoComponent } from './pages/standard/application-info.component'; import { ChipComponent } from './pages/chip/chip.component'; import { ToggleGroupInfoComponent } from './pages/toggle-group/toggle-group-info.component'; -import { BackgroundProviderModule } from "projects/dxc-ngx-cdk/src/public-api"; +import { AppInitializer } from './app-initializer.service'; +import { CrudGridComponent } from './pages/crud-grid/crud-grid.component'; + +export function startupServiceFactory(startupService: AppInitializer) { + return (): Promise => { + return startupService.loadConfig(); + }; +} @NgModule({ declarations: [ @@ -117,7 +131,8 @@ import { BackgroundProviderModule } from "projects/dxc-ngx-cdk/src/public-api"; UploadComponent, ApplicationInfoComponent, ChipComponent, - AccordionGroupComponent + AccordionGroupComponent, + CrudGridComponent, ], imports: [ AppRoutingModule, @@ -158,10 +173,32 @@ import { BackgroundProviderModule } from "projects/dxc-ngx-cdk/src/public-api"; ThemeModule, DxcApplicationLayoutModule, DxcChipModule, + DxcCrudTableModule, DxcAccordionGroupModule, - BackgroundProviderModule + DxcCommonModule, + ReactiveFormsModule, + FormsModule, + DxcSizeDetectorModule, + DxcLocalStorageModule.forRoot({ + prefix: '', + delimiter: '' + }), + DxcModalFormModule + ], + + providers: [AppInitializer, + { + provide: APP_INITIALIZER, + useFactory: startupServiceFactory, + deps: [AppInitializer], + multi: true + + }, + { + provide: 'ThemeService', useClass: + ThemeService + }, DxcResizeService ], - providers: [{ provide: "ThemeService", useClass: ThemeService }], bootstrap: [AppComponent], }) export class AppModule { } diff --git a/projects/dxc-ngx-cdk-examples/src/app/components.ts b/projects/dxc-ngx-cdk-examples/src/app/components.ts index 643197a7d..d345b208d 100644 --- a/projects/dxc-ngx-cdk-examples/src/app/components.ts +++ b/projects/dxc-ngx-cdk-examples/src/app/components.ts @@ -33,6 +33,7 @@ import { ApplicationInfoComponent } from './pages/standard/application-info.comp import { ChipComponent } from './pages/chip/chip.component'; import { ToggleGroupInfoComponent } from './pages/toggle-group/toggle-group-info.component'; import { AccordionGroupComponent } from './pages/accordion-group/accordion-group.component'; +import { CrudGridComponent } from './pages/crud-grid/crud-grid.component'; export const Components = [ { @@ -75,6 +76,11 @@ export const Components = [ route: 'chip', component: ChipComponent }, + { + name: 'Crud Grid', + route: 'crudgrid', + component: CrudGridComponent + }, { name: 'Date', route: 'date', diff --git a/projects/dxc-ngx-cdk-examples/src/app/pages/all/all.component.html b/projects/dxc-ngx-cdk-examples/src/app/pages/all/all.component.html index 10e23ed5b..12d5735e1 100644 --- a/projects/dxc-ngx-cdk-examples/src/app/pages/all/all.component.html +++ b/projects/dxc-ngx-cdk-examples/src/app/pages/all/all.component.html @@ -29,4 +29,5 @@ + diff --git a/projects/dxc-ngx-cdk-examples/src/app/pages/button/button-info.component.html b/projects/dxc-ngx-cdk-examples/src/app/pages/button/button-info.component.html index ea51304f6..c3cee6a92 100644 --- a/projects/dxc-ngx-cdk-examples/src/app/pages/button/button-info.component.html +++ b/projects/dxc-ngx-cdk-examples/src/app/pages/button/button-info.component.html @@ -1,8 +1,8 @@

Disabled

- - - + + +

Sizes

Text Editor Control + +
+ + +
+
diff --git a/projects/dxc-ngx-cdk-examples/src/app/pages/crud-grid/crud-grid.component.scss b/projects/dxc-ngx-cdk-examples/src/app/pages/crud-grid/crud-grid.component.scss new file mode 100644 index 000000000..ffee414af --- /dev/null +++ b/projects/dxc-ngx-cdk-examples/src/app/pages/crud-grid/crud-grid.component.scss @@ -0,0 +1,38 @@ +.card { + position: relative; + display: flex; + flex-direction: column; + min-width: 0; + word-wrap: break-word; + background-color: #fff; + background-clip: border-box; + border: 1px solid rgba(0, 0, 0, 0.125); + border-radius: 0.25rem; +} +.mat-form-field { + box-shadow: none !important; +} +.mat-form-field { + line-height: 1.125 !important; + width: 100% !important; +} +.mat-form-field-wrapper { + box-shadow: none !important; +} + +.mat-form-field-wrapper { + box-shadow: none !important; +} +.mat-form-field-wrapper { + padding-bottom: 1.34375em !important; +} +.mat-form-field-infix { + padding-top: 0px !important; + height: 32px !important; + padding-bottom: 1px !important; + border-top: unset; +} +.mat-input-element { + height: 33px !important; + margin: 0rem 0rem 0.8rem 0rem !important; +} diff --git a/projects/dxc-ngx-cdk-examples/src/app/pages/crud-grid/crud-grid.component.ts b/projects/dxc-ngx-cdk-examples/src/app/pages/crud-grid/crud-grid.component.ts new file mode 100644 index 000000000..4eb25af5f --- /dev/null +++ b/projects/dxc-ngx-cdk-examples/src/app/pages/crud-grid/crud-grid.component.ts @@ -0,0 +1,112 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { UntypedFormBuilder, FormControl, UntypedFormGroup } from '@angular/forms'; +import { List } from 'immutable'; +import { Button, DxcCrudTableComponent, DxcResizeService } from '@dxc-technology/halstack-angular'; +import { EFieldsType, EMethod, IFieldsBaseProperties, IRequest, ITextEditorproperties } from '@dxc-technology/halstack-angular'; + +@Component({ + selector: 'app-crud-grid', + templateUrl: './crud-grid.component.html', + styleUrls: ['./crud-grid.component.scss'] +}) +export class CrudGridComponent implements OnInit { + @ViewChild('crudgridcomponent', {static: false}) crudGridComponent: DxcCrudTableComponent; + testForm: UntypedFormGroup; + message:{ [key: string]: string }; + columns: Array; + gridToolbarList: List