diff --git a/angular.json b/angular.json index 7821757..134b748 100644 --- a/angular.json +++ b/angular.json @@ -32,6 +32,7 @@ } ], "styles": [ + "@angular/material/prebuilt-themes/azure-blue.css", "src/styles.scss" ], "scripts": [] @@ -91,6 +92,7 @@ } ], "styles": [ + "@angular/material/prebuilt-themes/azure-blue.css", "src/styles.scss" ], "scripts": [] diff --git a/package-lock.json b/package-lock.json index b6897cc..6cd8453 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,12 @@ "version": "0.0.0", "dependencies": { "@angular/animations": "^19.0.0", + "@angular/cdk": "^19.0.3", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", "@angular/core": "^19.0.0", "@angular/forms": "^19.0.0", + "@angular/material": "^19.0.3", "@angular/platform-browser": "^19.0.0", "@angular/platform-browser-dynamic": "^19.0.0", "@angular/router": "^19.0.0", @@ -361,6 +363,23 @@ } } }, + "node_modules/@angular/cdk": { + "version": "19.0.3", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-19.0.3.tgz", + "integrity": "sha512-sPdIKbSgNk4z02FqdTTMUS62aLVA2R/DsnOk3qdH+nEfeS4nNWQEzwrvMf6dDsTeLQ6YJLWXfZfemsGYpOoiWg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "optionalDependencies": { + "parse5": "^7.1.2" + }, + "peerDependencies": { + "@angular/common": "^19.0.0 || ^20.0.0", + "@angular/core": "^19.0.0 || ^20.0.0", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, "node_modules/@angular/cli": { "version": "19.0.5", "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-19.0.5.tgz", @@ -494,6 +513,24 @@ "rxjs": "^6.5.3 || ^7.4.0" } }, + "node_modules/@angular/material": { + "version": "19.0.3", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-19.0.3.tgz", + "integrity": "sha512-aHAnmEzoE6nEF7S/lBlMwDMs6ZEkvE3omg9g6jY6WyKWtP9HYeCfwxmTPVclqcbXWxJWO/5Bvwfcjzs75uC+YA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/animations": "^19.0.0 || ^20.0.0", + "@angular/cdk": "19.0.3", + "@angular/common": "^19.0.0 || ^20.0.0", + "@angular/core": "^19.0.0 || ^20.0.0", + "@angular/forms": "^19.0.0 || ^20.0.0", + "@angular/platform-browser": "^19.0.0 || ^20.0.0", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, "node_modules/@angular/platform-browser": { "version": "19.0.4", "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-19.0.4.tgz", @@ -7846,7 +7883,7 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, + "devOptional": true, "license": "BSD-2-Clause", "engines": { "node": ">=0.12" @@ -12637,7 +12674,7 @@ "version": "7.2.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "entities": "^4.5.0" diff --git a/package.json b/package.json index f9a7a9e..0fe8260 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,12 @@ "private": true, "dependencies": { "@angular/animations": "^19.0.0", + "@angular/cdk": "^19.0.3", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", "@angular/core": "^19.0.0", "@angular/forms": "^19.0.0", + "@angular/material": "^19.0.3", "@angular/platform-browser": "^19.0.0", "@angular/platform-browser-dynamic": "^19.0.0", "@angular/router": "^19.0.0", @@ -52,4 +54,4 @@ "volta": { "node": "22.12.0" } -} +} \ No newline at end of file diff --git a/src/app/app.component.html b/src/app/app.component.html index 7dbe480..cf9d60c 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,8 +1,23 @@ -@for (employee of $employees | async ; track employee.id) { - - {{ employee | json}} - -
+@if ($employees | async; as employees) { + + + {{ node.firstName }} + @if (tree.isExpanded(node)) { + + + } @else { + + } + + } - + diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 84cbf39..6ff6968 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,17 +1,21 @@ -import {AsyncPipe, JsonPipe} from '@angular/common'; +import {AsyncPipe, KeyValuePipe} from '@angular/common'; import {Component} from '@angular/core'; +import {MatIconButton} from '@angular/material/button'; +import {MatIconModule} from '@angular/material/icon'; +import {MatTree, MatTreeModule} from '@angular/material/tree'; import { RouterOutlet } from '@angular/router'; import { EmployeeControllerService, FindAll1Response } from '@core/ems'; import { Observable } from 'rxjs'; @Component({ selector: 'app-root', - imports: [RouterOutlet, JsonPipe, AsyncPipe], + imports: [RouterOutlet, AsyncPipe, MatIconModule, MatTree, MatTreeModule, KeyValuePipe, MatIconButton], templateUrl: './app.component.html', styleUrl: './app.component.scss' }) export class AppComponent{ readonly $employees: Observable; + childrenAccessor = () => []; constructor(private apiClient: EmployeeControllerService) { this.$employees = this.apiClient.findAll1(); diff --git a/src/app/app.config.ts b/src/app/app.config.ts index 6fcdf48..988d8fd 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -5,13 +5,13 @@ import { provideRouter } from '@angular/router'; import { routes } from '@app/app.routes'; import { OpenAPI } from '@core/ems/core/OpenAPI'; OpenAPI.BASE = 'http://localhost:8080'; -OpenAPI.TOKEN = 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIzUFQ0dldiNno5MnlQWk1EWnBqT1U0RjFVN0lwNi1ELUlqQWVGczJPbGU0In0.eyJleHAiOjE3MzQ1MTY5MTQsImlhdCI6MTczNDUxMzMxNCwianRpIjoiM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ayhF42qQ3Pj2YymxENpQWHR1-BTFQOJmAhQKBzvKWgOHuiLCPr8NkMGWFQ520BcJdipbGnsM8tmXuLE9FWezHA7LEGVkwY2gTbQMLEPq8v8hrtIf76F2Dq34BIG3Nq_6QlG10rG_Heqta6kWWe2p4DJmebdpvAeW2qvTLD4x89oIhtYXSiRIiVS2uAur5XuJcjpbv8UXWx11zVX7KelZEXky92q_xPKerFMOGt6up5MkCijJBhVWewSWNldaix7_jKTXCp70Gtu4sgCIuoojKp9Nts942RZjw'; export const appConfig: ApplicationConfig = { providers: [ provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes), provideHttpClient(), - provideAnimationsAsync() + provideAnimationsAsync(), provideAnimationsAsync() ], }; diff --git a/src/index.html b/src/index.html index 5ac948d..e479876 100644 --- a/src/index.html +++ b/src/index.html @@ -6,8 +6,10 @@ + + - + diff --git a/src/styles.scss b/src/styles.scss index 90d4ee0..fa39552 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -1 +1,10 @@ /* You can add global styles to this file, and also import other style files */ + +html, body { + height: 100%; +} + +body { + margin: 0; + font-family: Roboto, "Helvetica Neue", sans-serif; +}