@pega/dx-component-builder-sdk
Version:
Utility for building custom UI components
40 lines (34 loc) • 1.44 kB
text/typescript
import { Component, OnInit, Input, Output, EventEmitter, forwardRef, OnChanges } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormGroup, ReactiveFormsModule } from '@angular/forms';
import { ReferenceComponent } from '@pega/angular-sdk-components';
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
({
selector: 'app-assignment-card',
templateUrl: './assignment-card.component.html',
styleUrls: ['./assignment-card.component.scss'],
standalone: true,
imports: [CommonModule, ReactiveFormsModule, forwardRef(() => ComponentMapperComponent)]
})
export class AssignmentCardComponent implements OnInit, OnChanges {
() pConn$: typeof PConnect;
() formGroup$: FormGroup;
() arMainButtons$: any[];
() arSecondaryButtons$: any[];
() arChildren$: any[];
() updateToken$: number;
() actionButtonClick: EventEmitter<any> = new EventEmitter();
ngOnInit(): void {
// Children may contain 'reference' component, so we need to
// normalize them
this.arChildren$ = ReferenceComponent.normalizePConnArray(this.arChildren$);
}
ngOnChanges() {
// Children may contain 'reference' component, so we need to
// normalize them
this.arChildren$ = ReferenceComponent.normalizePConnArray(this.arChildren$);
}
onActionButtonClick(oData: any) {
this.actionButtonClick.emit(oData);
}
}