forked from eclipse-edc/DataDashboard
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
103 changed files
with
1,967 additions
and
1,478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
.../component-library/data-address/data-address-type-select/data-address-type-select-mode.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
export type DataAddressTypeSelectMode = | ||
| 'Datasource-Create' | ||
| 'Datasource-Edit' | ||
| 'Datasink'; | ||
export type DataAddressTypeSelectMode = 'Datasource-Create' | 'Datasink'; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
...omponent-library/edit-asset-form/data-category-select/data-category-select.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<edit-asset-form-label | ||
htmlFor="create-asset-form-data-category" | ||
[ctrl]="control" | ||
[label]="label"></edit-asset-form-label> | ||
<mat-form-field class="w-full" color="accent"> | ||
<mat-select | ||
id="create-asset-form-data-category" | ||
placeholder="Select data category..." | ||
[formControl]="control" | ||
[compareWith]="'id' | compareByField"> | ||
<mat-option [value]="null"></mat-option> | ||
<mat-option *ngFor="let item of items" [value]="item"> | ||
{{ item.label }} | ||
</mat-option> | ||
</mat-select> | ||
</mat-form-field> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...t/data-subcategory-select-item.service.ts → ...t/data-subcategory-select-item.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
...nt-library/edit-asset-form/data-subcategory-select/data-subcategory-select.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<edit-asset-form-label | ||
htmlFor="create-asset-form-data-subcategory" | ||
[ctrl]="control" | ||
[label]="label"></edit-asset-form-label> | ||
<mat-form-field class="w-full" color="accent"> | ||
<mat-select | ||
id="create-asset-form-data-subcategory" | ||
placeholder="Select data subcategory..." | ||
[formControl]="control" | ||
[compareWith]="'id' | compareByField"> | ||
<mat-option [value]="null">-</mat-option> | ||
<mat-option | ||
*ngFor="let item of dataCategory | dataSubcategoryItems" | ||
[value]="item"> | ||
{{ item.label }} | ||
</mat-option> | ||
</mat-select> | ||
</mat-form-field> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...set-form-data-address-type-select/edit-asset-form-data-address-type-select.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<edit-asset-form-label [label]="label" [ctrl]="control"></edit-asset-form-label> | ||
<mat-form-field class="w-full m-1" color="accent"> | ||
<mat-select [formControl]="control"> | ||
<mat-option *ngIf="!control.value" [value]="null"></mat-option> | ||
<mat-option *ngFor="let item of items" [value]="item.id"> | ||
{{ item.label }} | ||
</mat-option> | ||
</mat-select> | ||
</mat-form-field> |
30 changes: 30 additions & 0 deletions
30
...asset-form-data-address-type-select/edit-asset-form-data-address-type-select.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import {Component, Input, OnChanges} from '@angular/core'; | ||
import {FormControl} from '@angular/forms'; | ||
import {SimpleChangesTyped} from '../../../core/utils/angular-utils'; | ||
import {DataAddressType} from '../../data-address/data-address-type-select/data-address-type'; | ||
import {dataAddressTypeSelectItems} from '../../data-address/data-address-type-select/data-address-type-select-items'; | ||
import {DataAddressTypeSelectMode} from '../../data-address/data-address-type-select/data-address-type-select-mode'; | ||
|
||
@Component({ | ||
selector: 'edit-asset-form-data-address-type-select', | ||
templateUrl: 'edit-asset-form-data-address-type-select.component.html', | ||
}) | ||
export class EditAssetFormDataAddressTypeSelectComponent implements OnChanges { | ||
@Input() | ||
label!: string; | ||
|
||
@Input() | ||
control!: FormControl<DataAddressType | null>; | ||
|
||
@Input() | ||
mode: DataAddressTypeSelectMode = 'Datasource-Create'; | ||
|
||
items = dataAddressTypeSelectItems(this.mode); | ||
ngOnChanges( | ||
changes: SimpleChangesTyped<EditAssetFormDataAddressTypeSelectComponent>, | ||
) { | ||
if (changes.mode) { | ||
this.items = dataAddressTypeSelectItems(this.mode); | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...ponent-library/edit-asset-form/edit-asset-form-group/edit-asset-form-group.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div | ||
class="grid grid-cols-1 gap-x-8 gap-y-10 !border-b !border-gray-900/10 pb-12 md:grid-cols-3"> | ||
<div> | ||
<h2 class="!text-base !font-medium !leading-7 !text-gray-900 !m-0"> | ||
{{ myTitle }} | ||
</h2> | ||
<p class="!mt-1 !text-sm !leading-6 !text-gray-600 !font-light"> | ||
{{ description }} | ||
</p> | ||
</div> | ||
|
||
<div class="grid gap-x-6 gap-y-6 md:col-span-2"> | ||
<ng-content></ng-content> | ||
</div> | ||
</div> |
10 changes: 10 additions & 0 deletions
10
...omponent-library/edit-asset-form/edit-asset-form-group/edit-asset-form-group.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {Component, Input} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'edit-asset-form-group', | ||
templateUrl: './edit-asset-form-group.component.html', | ||
}) | ||
export class EditAssetFormGroupComponent { | ||
@Input() myTitle!: string; | ||
@Input() description!: string; | ||
} |
9 changes: 9 additions & 0 deletions
9
...ponent-library/edit-asset-form/edit-asset-form-label/edit-asset-form-label.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<label | ||
[ngClass]=" | ||
ctrl?.invalid && (ctrl?.touched || ctrl?.dirty) | ||
? 'text-red-600' | ||
: 'text-gray-900' | ||
" | ||
[for]="htmlFor" | ||
>{{ label }}<span *ngIf="isRequired()" class="ml-0.5">*</span></label | ||
> |
16 changes: 16 additions & 0 deletions
16
...omponent-library/edit-asset-form/edit-asset-form-label/edit-asset-form-label.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {Component, Input} from '@angular/core'; | ||
import {FormControl, Validators} from '@angular/forms'; | ||
|
||
@Component({ | ||
selector: 'edit-asset-form-label', | ||
templateUrl: './edit-asset-form-label.component.html', | ||
}) | ||
export class EditAssetFormLabelComponent { | ||
@Input() label!: string; | ||
@Input() htmlFor?: string; | ||
@Input() ctrl?: FormControl<any>; | ||
|
||
isRequired(): boolean { | ||
return this.ctrl?.hasValidator(Validators.required) || false; | ||
} | ||
} |
87 changes: 87 additions & 0 deletions
87
src/app/component-library/edit-asset-form/edit-asset-form.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import {CommonModule} from '@angular/common'; | ||
import {NgModule} from '@angular/core'; | ||
import {FormsModule, ReactiveFormsModule} from '@angular/forms'; | ||
import {MatBadgeModule} from '@angular/material/badge'; | ||
import {MatButtonModule} from '@angular/material/button'; | ||
import {MatCardModule} from '@angular/material/card'; | ||
import {MatCheckboxModule} from '@angular/material/checkbox'; | ||
import {MatChipsModule} from '@angular/material/chips'; | ||
import {MatNativeDateModule} from '@angular/material/core'; | ||
import {MatDatepickerModule} from '@angular/material/datepicker'; | ||
import {MatDialogModule} from '@angular/material/dialog'; | ||
import {MatDividerModule} from '@angular/material/divider'; | ||
import {MatFormFieldModule} from '@angular/material/form-field'; | ||
import {MatIconModule} from '@angular/material/icon'; | ||
import {MatInputModule} from '@angular/material/input'; | ||
import {MatPaginatorModule} from '@angular/material/paginator'; | ||
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; | ||
import {MatRadioModule} from '@angular/material/radio'; | ||
import {MatSelectModule} from '@angular/material/select'; | ||
import {MatSlideToggleModule} from '@angular/material/slide-toggle'; | ||
import {MatStepperModule} from '@angular/material/stepper'; | ||
import {MatTooltipModule} from '@angular/material/tooltip'; | ||
import {RouterModule} from '@angular/router'; | ||
import {CatalogModule} from '../catalog/catalog.module'; | ||
import {PipesAndDirectivesModule} from '../pipes-and-directives/pipes-and-directives.module'; | ||
import {UiElementsModule} from '../ui-elements/ui-elements.module'; | ||
import {DataCategorySelectComponent} from './data-category-select/data-category-select.component'; | ||
import {DataSubcategoryItemsPipe} from './data-subcategory-select/data-subcategory-items.pipe'; | ||
import {DataSubcategorySelectComponent} from './data-subcategory-select/data-subcategory-select.component'; | ||
import {EditAssetFormDataAddressTypeSelectComponent} from './edit-asset-form-data-address-type-select/edit-asset-form-data-address-type-select.component'; | ||
import {EditAssetFormGroupComponent} from './edit-asset-form-group/edit-asset-form-group.component'; | ||
import {EditAssetFormLabelComponent} from './edit-asset-form-label/edit-asset-form-label.component'; | ||
import {EditAssetFormComponent} from './edit-asset-form/edit-asset-form.component'; | ||
import {KeywordSelectComponent} from './keyword-select/keyword-select.component'; | ||
import {LanguageSelectComponent} from './language-select/language-select.component'; | ||
import {TransportModeSelectComponent} from './transport-mode-select/transport-mode-select.component'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
// Angular | ||
CommonModule, | ||
FormsModule, | ||
ReactiveFormsModule, | ||
RouterModule, | ||
|
||
// Angular Material | ||
MatBadgeModule, | ||
MatButtonModule, | ||
MatCardModule, | ||
MatCheckboxModule, | ||
MatChipsModule, | ||
MatDatepickerModule, | ||
MatDividerModule, | ||
MatFormFieldModule, | ||
MatProgressSpinnerModule, | ||
MatSelectModule, | ||
MatSlideToggleModule, | ||
MatStepperModule, | ||
MatTooltipModule, | ||
MatPaginatorModule, | ||
MatInputModule, | ||
MatRadioModule, | ||
MatIconModule, | ||
MatDialogModule, | ||
MatNativeDateModule, | ||
|
||
// EDC UI Modules | ||
CatalogModule, | ||
PipesAndDirectivesModule, | ||
UiElementsModule, | ||
], | ||
declarations: [ | ||
EditAssetFormComponent, | ||
EditAssetFormGroupComponent, | ||
EditAssetFormLabelComponent, | ||
KeywordSelectComponent, | ||
DataCategorySelectComponent, | ||
DataSubcategorySelectComponent, | ||
DataSubcategoryItemsPipe, | ||
EditAssetFormDataAddressTypeSelectComponent, | ||
TransportModeSelectComponent, | ||
LanguageSelectComponent, | ||
], | ||
exports: [EditAssetFormComponent, EditAssetFormLabelComponent], | ||
providers: [], | ||
}) | ||
export class EditAssetFormModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.