Skip to content

Commit

Permalink
Closes kadai-io#203 - Update to Angular 19
Browse files Browse the repository at this point in the history
  • Loading branch information
CRoberto1926 committed Nov 22, 2024
1 parent 0a13c95 commit 1db9cb2
Show file tree
Hide file tree
Showing 92 changed files with 2,213 additions and 1,160 deletions.
28 changes: 14 additions & 14 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
"private": true,
"dependencies": {
"@ali-hm/angular-tree-component": "18.0.5",
"@angular-devkit/build-angular": "18.2.12",
"@angular/animations": "18.2.12",
"@angular/cdk": "18.2.13",
"@angular/common": "18.2.12",
"@angular/core": "18.2.12",
"@angular/forms": "18.2.12",
"@angular/material": "18.2.13",
"@angular/platform-browser": "18.2.12",
"@angular/platform-browser-dynamic": "18.2.12",
"@angular/router": "18.2.12",
"@angular-devkit/build-angular": "19.0.0",
"@angular/animations": "19.0.0",
"@angular/cdk": "19.0.0",
"@angular/common": "19.0.0",
"@angular/core": "19.0.0",
"@angular/forms": "19.0.0",
"@angular/material": "19.0.0",
"@angular/platform-browser": "19.0.0",
"@angular/platform-browser-dynamic": "19.0.0",
"@angular/router": "19.0.0",
"@ngneat/hot-toast": "7.0.0",
"@ngneat/overview": "6.1.1",
"@ngxs/router-plugin": "18.1.6",
Expand All @@ -53,10 +53,10 @@
},
"devDependencies": {
"@angular-builders/custom-webpack": "18.0.0",
"@angular/build": "^18.2.12",
"@angular/cli": "18.2.12",
"@angular/compiler": "18.2.12",
"@angular/compiler-cli": "18.2.12",
"@angular/build": "^19.0.0",
"@angular/cli": "19.0.0",
"@angular/compiler": "19.0.0",
"@angular/compiler-cli": "19.0.0",
"@ngxs/devtools-plugin": "18.1.6",
"@types/jest": "29.5.14",
"@types/lodash": "4.17.13",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,7 @@ describe('AccessItemsManagementComponent', () => {
MatExpansionModule,
MatTableModule
],
declarations: [
AccessItemsManagementComponent,
TypeAheadComponent,
KadaiSharedSortStub,
KadaiSharedSpinnerStub,
SvgIconStub
],
declarations: [AccessItemsManagementComponent, TypeAheadComponent],
providers: [
{
provide: FormsValidatorService,
Expand All @@ -132,6 +126,9 @@ describe('AccessItemsManagementComponent', () => {
StartupService,
KadaiEngineService,
WindowRefService,
KadaiSharedSortStub,
KadaiSharedSpinnerStub,
SvgIconStub,
provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting()
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ import { RequestInProgressService } from '../../../shared/services/request-in-pr
@Component({
selector: 'kadai-administration-access-items-management',
templateUrl: './access-items-management.component.html',
styleUrls: ['./access-items-management.component.scss']
styleUrls: ['./access-items-management.component.scss'],
standalone: false
})
export class AccessItemsManagementComponent implements OnInit {
accessIdPrevious: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import { KadaiEngineService } from '../../../shared/services/kadai-engine/kadai-
@Component({
selector: 'kadai-administration-overview',
templateUrl: './administration-overview.component.html',
styleUrls: ['./administration-overview.component.scss']
styleUrls: ['./administration-overview.component.scss'],
standalone: false
})
export class AdministrationOverviewComponent implements OnInit {
@Input() selectedTab = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h4 class="action-toolbar__headline">
<mat-icon class="action-toolbar__aquamarine-button">content_copy</mat-icon>
<span>Copy</span>
</button>
<button (click)="onRemoveClassification()" *ngIf="this.classification?.classificationId"
<button (click)="onRemoveClassification()" *ngIf="classification?.classificationId"
class="action-toolbar__dropdown"
mat-menu-item matTooltip="Delete this classification">
<mat-icon class="action-toolbar__red-button">delete</mat-icon>
Expand Down Expand Up @@ -204,7 +204,7 @@ <h6 class="detailed-fields__subheading"> General </h6>

<kadai-shared-field-error-display
[displayError]="!isFieldValid('classification.priority')"
[validationTrigger]="this.toggleValidationMap.get('classification.priority.name')"
[validationTrigger]="toggleValidationMap.get('classification.priority.name')"
errorMessage="* Priority is required">
</kadai-shared-field-error-display>
</div>
Expand All @@ -230,13 +230,13 @@ <h6 class="detailed-fields__subheading"> General </h6>
<!-- CATEGORY -->
<mat-form-field appearance="outline">
<mat-label>Category</mat-label>
<mat-select [(value)]="this.classification.category" required>
<mat-select [(value)]="classification.category" required>
<mat-select-trigger>
<svg-icon
[src]="(getCategoryIcon(this.classification.category) | async)?.left"
[src]="(getCategoryIcon(classification.category) | async)?.left"
class="detailed-fields__category-icon">
</svg-icon>
{{ this.classification.category }}
{{ classification.category }}
</mat-select-trigger>
<mat-option *ngFor="let category of categories$ | async" value="{{category}}">
<svg-icon [src]="(getCategoryIcon(category) | async)?.left"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,12 @@ describe('ClassificationDetailsComponent', () => {
MatTooltipModule,
NoopAnimationsModule
],
declarations: [ClassificationDetailsComponent, InputStub, FieldErrorDisplayStub, SvgIconStub, TextareaStub],
declarations: [ClassificationDetailsComponent],
providers: [
InputStub,
FieldErrorDisplayStub,
SvgIconStub,
TextareaStub,
{ provide: ClassificationsService, useValue: classificationServiceSpy },
{ provide: ClassificationCategoriesService, useValue: classificationCategoriesServiceSpy },
{ provide: DomainService, useValue: domainServiceSpy },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ import { trimForm } from '../../../shared/util/form-trimmer';
selector: 'kadai-administration-classification-details',
templateUrl: './classification-details.component.html',
animations: [highlight],
styleUrls: ['./classification-details.component.scss']
styleUrls: ['./classification-details.component.scss'],
standalone: false
})
export class ClassificationDetailsComponent implements OnInit, OnDestroy {
classification: Classification;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,13 @@ describe('ClassificationListComponent', () => {
NoopAnimationsModule,
MatProgressBarModule
],
declarations: [
ClassificationListComponent,
declarations: [ClassificationListComponent],
providers: [
ClassificationTypesSelectorStub,
TreeStub,
SvgIconStub,
ImportExportStub,
InputStub
],
providers: [
InputStub,
{
provide: ClassificationsService,
useValue: classificationServiceSpy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ import { Pair } from '../../../shared/models/pair';
@Component({
selector: 'kadai-administration-classification-list',
templateUrl: './classification-list.component.html',
styleUrls: ['./classification-list.component.scss']
styleUrls: ['./classification-list.component.scss'],
standalone: false
})
export class ClassificationListComponent implements OnInit, OnDestroy {
kadaiType = KadaiType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ describe('ClassificationOverviewComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [NgxsModule.forRoot([ClassificationState])],
declarations: [ClassificationOverviewComponent, ClassificationDetailsStub, ClassificationListStub, SvgIconStub],
declarations: [ClassificationOverviewComponent],
providers: [
ClassificationDetailsStub,
ClassificationListStub,
SvgIconStub,
{
provide: ClassificationsService,
useValue: classificationServiceSpy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ import { Classification } from '../../../shared/models/classification';
@Component({
selector: 'kadai-administration-classification-overview',
templateUrl: './classification-overview.component.html',
styleUrls: ['./classification-overview.component.scss']
styleUrls: ['./classification-overview.component.scss'],
standalone: false
})
export class ClassificationOverviewComponent implements OnInit, OnDestroy {
showDetail = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import { Location } from '@angular/common';
@Component({
selector: 'kadai-administration-classification-types-selector',
templateUrl: './classification-types-selector.component.html',
styleUrls: ['./classification-types-selector.component.scss']
styleUrls: ['./classification-types-selector.component.scss'],
standalone: false
})
export class ClassificationTypesSelectorComponent {
@Select(ClassificationSelectors.selectedClassificationType) classificationTypeSelected$: Observable<string>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ import { takeUntil } from 'rxjs/operators';
@Component({
selector: 'kadai-administration-import-export',
templateUrl: './import-export.component.html',
styleUrls: ['./import-export.component.scss']
styleUrls: ['./import-export.component.scss'],
standalone: false
})
export class ImportExportComponent implements OnInit, OnDestroy {
@Input() currentSelection: KadaiType;
Expand Down
3 changes: 2 additions & 1 deletion web/src/app/administration/components/tree/tree.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ import { RequestInProgressService } from '../../../shared/services/request-in-pr
@Component({
selector: 'kadai-administration-tree',
templateUrl: './tree.component.html',
styleUrls: ['./tree.component.scss']
styleUrls: ['./tree.component.scss'],
standalone: false
})
export class KadaiTreeComponent implements OnInit, AfterViewChecked, OnDestroy {
treeNodes: TreeNodeModel[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ describe('IconTypeComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [],
declarations: [IconTypeComponent, SvgIconStub],
providers: []
declarations: [IconTypeComponent],
providers: [SvgIconStub]
}).compileComponents();

fixture = TestBed.createComponent(IconTypeComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import { WorkbasketType } from 'app/shared/models/workbasket-type';
@Component({
selector: 'kadai-administration-icon-type',
templateUrl: './icon-type.component.html',
styleUrls: ['./icon-type.component.scss']
styleUrls: ['./icon-type.component.scss'],
standalone: false
})
export class IconTypeComponent implements OnInit, OnChanges {
@Input()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<!-- READ -->
<td
[ngClass]="{ 'has-changes': (accessItemsClone[index].permRead !== accessItem.value.permRead)}">
<input (change)="setSelectAllCheckbox(this.index, $event)" aria-label="permRead"
<input (change)="setSelectAllCheckbox(index, $event)" aria-label="permRead"
aria-labelledby="permRead" class="workbasket-access-items__permission-checkbox"
formControlName="permRead"
id="checkbox-{{index}}-0" type="checkbox">
Expand All @@ -125,7 +125,7 @@
<!-- READ TASKS -->
<td
[ngClass]="{ 'has-changes': (accessItemsClone[index].permReadTasks !== accessItem.value.permReadTasks)}">
<input (change)="setSelectAllCheckbox(this.index, $event)" aria-label="permReadTasks"
<input (change)="setSelectAllCheckbox(index, $event)" aria-label="permReadTasks"
aria-labelledby="permReadTasks" class="workbasket-access-items__permission-checkbox"
formControlName="permReadTasks"
id="checkbox-{{index}}-1" type="checkbox">
Expand All @@ -134,7 +134,7 @@
<!-- OPEN -->
<td
[ngClass]="{ 'has-changes': (accessItemsClone[index].permOpen !== accessItem.value.permOpen)}">
<input (change)="setSelectAllCheckbox(this.index, $event)" aria-label="permOpen"
<input (change)="setSelectAllCheckbox(index, $event)" aria-label="permOpen"
aria-labelledby="permOpen" class="workbasket-access-items__permission-checkbox"
formControlName="permOpen"
id="checkbox-{{index}}-2" type="checkbox">
Expand All @@ -143,7 +143,7 @@
<!-- EDIT TASKS -->
<td
[ngClass]="{ 'has-changes': (accessItemsClone[index].permEditTasks !== accessItem.value.permEditTasks)}">
<input (change)="setSelectAllCheckbox(this.index, $event)" aria-label="permEditTasks"
<input (change)="setSelectAllCheckbox(index, $event)" aria-label="permEditTasks"
aria-labelledby="permEditTasks" class="workbasket-access-items__permission-checkbox"
formControlName="permEditTasks"
id="checkbox-{{index}}-3" type="checkbox">
Expand All @@ -152,7 +152,7 @@
<!-- APPEND -->
<td
[ngClass]="{ 'has-changes': (accessItemsClone[index].permAppend !== accessItem.value.permAppend)}">
<input (change)="setSelectAllCheckbox(this.index, $event)" aria-label="permAppend"
<input (change)="setSelectAllCheckbox(index, $event)" aria-label="permAppend"
aria-labelledby="permAppend" class="workbasket-access-items__permission-checkbox"
formControlName="permAppend"
id="checkbox-{{index}}-4" type="checkbox">
Expand All @@ -161,7 +161,7 @@
<!-- TRANSFER -->
<td
[ngClass]="{ 'has-changes': (accessItemsClone[index].permTransfer !== accessItem.value.permTransfer)}">
<input (change)="setSelectAllCheckbox(this.index, $event)" aria-label="permTransfer"
<input (change)="setSelectAllCheckbox(index, $event)" aria-label="permTransfer"
aria-labelledby="permTransfer" class="workbasket-access-items__permission-checkbox"
formControlName="permTransfer"
id="checkbox-{{index}}-5" type="checkbox">
Expand All @@ -170,7 +170,7 @@
<!-- DISTRIBUTE -->
<td
[ngClass]="{ 'has-changes': (accessItemsClone[index].permDistribute !== accessItem.value.permDistribute)}">
<input (change)="setSelectAllCheckbox(this.index, $event)" aria-label="permDistribute"
<input (change)="setSelectAllCheckbox(index, $event)" aria-label="permDistribute"
aria-labelledby="permDistribute" class="workbasket-access-items__permission-checkbox"
formControlName="permDistribute"
id="checkbox-{{index}}-6" type="checkbox">
Expand All @@ -180,7 +180,7 @@
<ng-container *ngFor="let customField of customFields$ | async; let customIndex = index">
<td *ngIf="customField.visible"
[ngClass]="{ 'has-changes': accessItemsClone[index][getAccessItemCustomProperty(customIndex + 1)] !== accessItem.value[getAccessItemCustomProperty(customIndex+1)] }">
<input (change)="setSelectAllCheckbox(this.index, $event)" aria-label="customField"
<input (change)="setSelectAllCheckbox(index, $event)" aria-label="customField"
aria-labelledby="customField"
class="workbasket-access-items__permission-checkbox" formControlName="permCustom{{customIndex+1}}"
id="checkbox-{{index}}-{{customIndex + 7}}" type="checkbox">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ describe('WorkbasketAccessItemsComponent', () => {
MatIconModule,
MatTooltipModule
],
declarations: [WorkbasketAccessItemsComponent, TypeAheadComponent, SpinnerStub],
declarations: [WorkbasketAccessItemsComponent, TypeAheadComponent],
providers: [
SpinnerStub,
{
provide: RequestInProgressService,
useValue: requestInProgressServiceSpy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ import { ButtonAction } from '../../models/button-action';
selector: 'kadai-administration-workbasket-access-items',
templateUrl: './workbasket-access-items.component.html',
animations: [highlight],
styleUrls: ['./workbasket-access-items.component.scss']
styleUrls: ['./workbasket-access-items.component.scss'],
standalone: false
})
export class WorkbasketAccessItemsComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit, AfterViewChecked {
@Input() workbasket: Workbasket;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,7 @@ describe('WorkbasketDetailsComponent', () => {
MatTooltipModule,
NoopAnimationsModule
],
declarations: [
WorkbasketDetailsComponent,
WorkbasketAccessItemsStub,
WorkbasketDistributionTargetsStub,
WorkbasketInformationStub
],
declarations: [WorkbasketDetailsComponent],
providers: [
{
provide: DomainService,
Expand All @@ -118,6 +113,9 @@ describe('WorkbasketDetailsComponent', () => {
StartupService,
KadaiEngineService,
WindowRefService,
WorkbasketAccessItemsStub,
WorkbasketDistributionTargetsStub,
WorkbasketInformationStub,
provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting()
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ import { cloneDeep } from 'lodash';
@Component({
selector: 'kadai-administration-workbasket-details',
templateUrl: './workbasket-details.component.html',
styleUrls: ['./workbasket-details.component.scss']
styleUrls: ['./workbasket-details.component.scss'],
standalone: false
})
export class WorkbasketDetailsComponent implements OnInit, OnDestroy {
workbasket: Workbasket;
Expand Down
Loading

0 comments on commit 1db9cb2

Please sign in to comment.