Skip to content

Commit 796bd44

Browse files
mohas22mohas22
authored andcommitted
upgraded typedef to 3.2.1
1 parent 9945e25 commit 796bd44

File tree

76 files changed

+197
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+197
-203
lines changed

package-lock.json

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"@pega/configs": "^0.7.1",
9696
"@pega/constellationjs": "24.1.1-dev",
9797
"@pega/eslint-config": "^0.7.1",
98-
"@pega/pcore-pconnect-typedefs": "~3.0.0",
98+
"@pega/pcore-pconnect-typedefs": "3.2.1",
9999
"@pega/prettier-config": "^0.7.1",
100100
"@playwright/test": "^1.40.1",
101101
"@types/jasmine": "~5.1.4",

packages/angular-sdk-components/src/lib/_components/designSystemExtension/alert-banner/alert-banner.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ export class AlertBannerComponent {
2222
onAlertClose(config) {
2323
const { PAGE, type, target } = config;
2424
const { clearMessages } = PCore.getMessageManager();
25-
clearMessages({ category: PAGE, type, context: target } as any);
25+
clearMessages({ category: PAGE, type, context: target });
2626
}
2727
}

packages/angular-sdk-components/src/lib/_components/designSystemExtension/case-create-stage/case-create-stage.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ export class CaseCreateStageComponent implements OnInit, OnDestroy {
5353
}
5454

5555
updateSelf() {
56-
this.arChildren$ = this.pConn$.getChildren() as any[];
56+
this.arChildren$ = this.pConn$.getChildren();
5757
}
5858
}

packages/angular-sdk-components/src/lib/_components/designSystemExtension/operator/operator.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
5050
}
5151

5252
updateSelf(): void {
53-
const configProps$ = this.pConn$.getConfigProps() as any;
53+
const configProps$ = this.pConn$.getConfigProps();
5454
this.displayLabel = this.displayLabel?.toLowerCase();
5555
const label = configProps$?.label?.toLowerCase();
5656
if (label === 'create operator' || this.displayLabel === 'create operator') {

packages/angular-sdk-components/src/lib/_components/designSystemExtension/pulse/pulse.component.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ export class PulseComponent implements OnInit {
1717
@Input() pConn$: typeof PConnect;
1818

1919
configProps$: PulseProps;
20-
currentUser$: string;
21-
currentUserInitials$ = '--';
20+
currentUser$: string | undefined;
21+
currentUserInitials$: string | undefined = '--';
2222

2323
ngOnInit() {
2424
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());
2525
// this.currentUser$ = this.configProps$.currentUser;
2626
this.currentUser$ = PCore.getEnvironmentInfo().getOperatorName();
2727

2828
if (this.currentUser$ != '') {
29-
this.currentUserInitials$ = this.currentUser$.charAt(0);
29+
this.currentUserInitials$ = this.currentUser$?.charAt(0);
3030

31-
if (this.currentUser$.lastIndexOf(' ') > 0) {
32-
const lastName = this.currentUser$.substring(this.currentUser$.lastIndexOf(' ') + 1);
31+
if (this.currentUser$ && this.currentUser$.lastIndexOf(' ') > 0) {
32+
const lastName = this.currentUser$?.substring(this.currentUser$.lastIndexOf(' ') + 1);
3333
this.currentUserInitials$ += lastName.charAt(0);
34-
} else if (this.currentUser$.lastIndexOf('.') > 0) {
35-
const lastName = this.currentUser$.substring(this.currentUser$.lastIndexOf('.') + 1);
34+
} else if (this.currentUser$ && this.currentUser$.lastIndexOf('.') > 0) {
35+
const lastName = this.currentUser$?.substring(this.currentUser$.lastIndexOf('.') + 1);
3636
this.currentUserInitials$ += lastName.charAt(0);
3737
}
3838
}

packages/angular-sdk-components/src/lib/_components/field/auto-complete/auto-complete.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
184184
this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
185185
}
186186

187-
this.componentReference = (this.pConn$.getStateProps() as any).value;
187+
this.componentReference = this.pConn$.getStateProps().value;
188188
if (this.listType === 'associated') {
189189
this.options$ = this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject('')); // 1st arg empty string until typedef marked correctly
190190
}
@@ -220,7 +220,7 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
220220
let datasource = this.configProps$.datasource;
221221
let columns = this.configProps$.columns;
222222
// const { deferDatasource, datasourceMetadata } = this.configProps$;
223-
const { deferDatasource, datasourceMetadata }: any = this.pConn$.getConfigProps();
223+
const { deferDatasource, datasourceMetadata } = this.pConn$.getConfigProps();
224224
// convert associated to datapage listtype and transform props
225225
// Process deferDatasource when datapage name is present. WHhen tableType is promptList / localList
226226
if (deferDatasource && datasourceMetadata?.datasource?.name) {
@@ -318,7 +318,7 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
318318

319319
const value = key;
320320
const actionsApi = this.pConn$?.getActionsApi();
321-
const propName = (this.pConn$?.getStateProps() as any).value;
321+
const propName = this.pConn$?.getStateProps().value;
322322
handleEvent(actionsApi, 'changeNblur', propName, value);
323323
if (this.configProps$?.onRecordChange) {
324324
el.value = value;

packages/angular-sdk-components/src/lib/_components/field/check-box/check-box.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
146146
}
147147

148148
this.actionsApi = this.pConn$.getActionsApi();
149-
this.propName = (this.pConn$.getStateProps() as any).value;
149+
this.propName = this.pConn$.getStateProps().value;
150150

151151
// multi case
152152
this.selectionMode = this.configProps$.selectionMode;
@@ -159,7 +159,7 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
159159
this.datasource = this.configProps$.datasource;
160160
this.selectionKey = this.configProps$.selectionKey;
161161
const listSourceItems = this.datasource?.source ?? [];
162-
const dataField: any = this.selectionKey?.split?.('.')[1];
162+
const dataField = this.selectionKey?.split?.('.')[1] ?? '';
163163
const listToDisplay: any[] = [];
164164
listSourceItems.forEach(element => {
165165
element.selected = this.selectedvalues?.some?.(data => data[dataField] === element.key);
@@ -204,7 +204,7 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
204204
this.fieldControl.disable();
205205
}
206206

207-
this.componentReference = (this.pConn$.getStateProps() as any).value;
207+
this.componentReference = this.pConn$.getStateProps().value;
208208

209209
// eslint-disable-next-line sonarjs/no-redundant-boolean
210210
if (this.value$ === 'true' || this.value$ == true) {

packages/angular-sdk-components/src/lib/_components/field/currency/currency.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class CurrencyComponent implements OnInit, OnDestroy {
125125
}
126126
this.helperText = this.configProps$.helperText;
127127
this.placeholder = this.configProps$.placeholder || '';
128-
const currencyISOCode: any = this.configProps$?.currencyISOCode;
128+
const currencyISOCode = this.configProps$?.currencyISOCode ?? '';
129129

130130
const theSymbols = getCurrencyCharacters(currencyISOCode);
131131
this.currSym = theSymbols.theCurrencySymbol;
@@ -163,7 +163,7 @@ export class CurrencyComponent implements OnInit, OnDestroy {
163163
this.currencyISOCode = this.configProps$.currencyISOCode;
164164
}
165165

166-
this.componentReference = (this.pConn$.getStateProps() as any).value;
166+
this.componentReference = this.pConn$.getStateProps().value;
167167

168168
// trigger display of error message with field control
169169
if (this.angularPConnectData.validateMessage != null && this.angularPConnectData.validateMessage != '') {
@@ -178,7 +178,7 @@ export class CurrencyComponent implements OnInit, OnDestroy {
178178

179179
fieldOnBlur(event: any) {
180180
const actionsApi = this.pConn$?.getActionsApi();
181-
const propName = (this.pConn$?.getStateProps() as any).value;
181+
const propName = this.pConn$?.getStateProps().value;
182182
let value = event?.target?.value;
183183
value = value?.substring(1);
184184
if (this.currSep === ',') {

packages/angular-sdk-components/src/lib/_components/field/date-time/date-time.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class DateTimeComponent implements OnInit, OnDestroy {
6161
// Start with default dateFormatInfo
6262
dateFormatInfo = dateFormatInfoDefault;
6363
// and then update, as needed, based on locale, etc.
64-
theDateFormat: any = getDateFormatInfo();
64+
theDateFormat = getDateFormatInfo();
6565
placeholder: string;
6666

6767
constructor(
@@ -155,7 +155,7 @@ export class DateTimeComponent implements OnInit, OnDestroy {
155155
this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
156156
}
157157

158-
this.componentReference = (this.pConn$.getStateProps() as any).value;
158+
this.componentReference = this.pConn$.getStateProps().value;
159159

160160
// trigger display of error message with field control
161161
if (this.angularPConnectData.validateMessage != null && this.angularPConnectData.validateMessage != '') {

0 commit comments

Comments
 (0)