Skip to content

Commit 7adc9f8

Browse files
authored
Merge branch 'master' into mod/tor/US-642004
2 parents 796bd44 + 4a04c5b commit 7adc9f8

File tree

41 files changed

+363
-146
lines changed

Some content is hidden

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

41 files changed

+363
-146
lines changed

.github/workflows/mend-scan.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches:
88
- 'master'
99
schedule:
10-
- cron: '0 0 * * *'
10+
- cron: '0 0 * * 1'
1111
jobs:
1212
mendscan:
1313
env:
@@ -40,13 +40,13 @@ jobs:
4040
java -jar wss-unified-agent.jar
4141
fi
4242
- name: 'Upload WhiteSource folder'
43-
uses: actions/upload-artifact@v2
43+
uses: actions/upload-artifact@v4
4444
with:
4545
name: Mend
4646
path: whitesource
4747
retention-days: 14
4848
- name: 'Upload Mend folder if failure'
49-
uses: actions/upload-artifact@v2
49+
uses: actions/upload-artifact@v4
5050
if: failure()
5151
with:
5252
name: Mend

angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
"customWebpackConfig": {
111111
"path": "./scripts/extra-webpack.config.js"
112112
},
113-
"allowedCommonJsDependencies": ["downloadjs", "dayjs", "fast-deep-equal", "moment"]
113+
"allowedCommonJsDependencies": ["lodash.clonedeep", "downloadjs", "dayjs", "fast-deep-equal", "moment"]
114114
},
115115
"configurations": {
116116
"production": {

packages/angular-sdk-components/doc/KeyReleaseUpdates.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
### Angular SDK - Release Announcement - v23.1.10 (20 March 2024)
1+
### Angular SDK - Release Announcement - v24.1.10 (08 August 2024)
2+
3+
This release - **SDK-A v24.1.10** - is **only compatible with Pega Infinity 24.1**. This release is related to the [**release/24.1.10** branch of the React SDK repository](https://github.com/pegasystems/angular-sdk/tree/release/24.1.10).
4+
<br>
5+
6+
The SDK-R v24.1.10 release allow React SDK users to to take advantage of the latest [SDK enhancements and fixes noted in **What's New in the SDK?**](https://docs.pega.com/bundle/constellation-sdk/page/constellation-sdks/sdks/react-sdk-updates.html) including:
7+
8+
* Support has been added for the approve and reject case actions
9+
* Support for the Checkbox group and Combo-Box display options in the MultiSelect mode for the Data Reference and Case Reference fields.
10+
* Save For Later functionality now works as expected
11+
* Bug fixes
12+
* Full set of merged PRs can be found in the [react-sdk-components GitHub repo list of merged PRs](https://github.com/pegasystems/angular-sdk-components/pulls?q=is%3Apr+is%3Amerged+base%3Amaster+). This release includes all PRs since (and including) #153.
13+
<br />
14+
<hr />
15+
16+
### Previous Releases
17+
18+
#### Angular SDK - v23.1.10 (20 March 2024)
219

320
This release - **SDK-A v23.1.10** - is **only compatible with Pega Infinity 23**. This release is related to the [**release/23.1.10** branch of the Angular SDK repository](https://github.com/pegasystems/angular-sdk/tree/release/23.1.10).
421
<br>

packages/angular-sdk-components/src/lib/_components/designSystemExtension/material-case-summary/material-case-summary.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<dl class="psdk-case-summary-fields-primary">
33
<div *ngFor="let field of primaryFieldsWithStatus$" class="psdk-csf-primary-field">
44
<dt class="psdk-csf-primary-field-header">
5-
{{ field.config.label }}
5+
{{ field.config?.label }}
66
</dt>
77
<dd *ngIf="field.config.value === ''; else hasValue" class="psdk-csf-primary-field-data">
88
<ng-container [ngSwitch]="field.type.toLowerCase()">
@@ -28,10 +28,10 @@
2828
<dl *ngFor="let field of secondaryFields$" class="psdk-case-summary-fields-secondary">
2929
<div
3030
*ngIf="
31-
field.config?.label?.toLowerCase() == 'create operator' ||
32-
field.displayLabel.toLowerCase() == 'create operator' ||
33-
field.config?.label?.toLowerCase() == 'update operator' ||
34-
field.displayLabel.toLowerCase() == 'update operator';
31+
field?.config?.label?.toLowerCase() == 'create operator' ||
32+
field?.displayLabel?.toLowerCase() == 'create operator' ||
33+
field?.config?.label?.toLowerCase() == 'update operator' ||
34+
field?.displayLabel?.toLowerCase() == 'update operator';
3535
else hasSecondaryValue
3636
"
3737
>
@@ -40,7 +40,7 @@
4040
<ng-template #hasSecondaryValue>
4141
<div class="psdk-csf-secondary-field">
4242
<dt class="psdk-csf-secondary-field-header">
43-
{{ field.config.displayLabel || field.config.label }}
43+
{{ field.config?.displayLabel || field.config?.label }}
4444
</dt>
4545
<dd class="psdk-csf-secondary-field-data">
4646
<div [ngSwitch]="field.type">

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ export class OperatorComponent implements OnInit, OnChanges, OnDestroy {
4545
}
4646
}
4747

48+
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4849
ngOnDestroy(): void {
49-
this.renderer.destroy();
50+
// Ref: https://medium.com/@kamil.galek/mythical-angular-component-styles-cleanup-in-angular-17-f799a08b2abc
51+
// Commenting the below line as it is causing the Operator component's styles not getting applied.
52+
// this.renderer.destroy();
5053
}
5154

5255
updateSelf(): void {

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,14 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
193193
this.bDisabled$ = this.utils.getBooleanValue(this.configProps$.disabled);
194194
}
195195

196-
if (this.bDisabled$) {
197-
this.fieldControl.disable();
198-
} else {
199-
this.fieldControl.enable();
200-
}
201-
202196
if (this.configProps$.readOnly != null) {
203197
this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
198+
}
199+
200+
if (this.bDisabled$ || this.bReadonly$) {
204201
this.fieldControl.disable();
202+
} else {
203+
this.fieldControl.enable();
205204
}
206205

207206
this.componentReference = this.pConn$.getStateProps().value;

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,32 @@
22
<component-mapper *ngIf="bVisible$ !== false" name="FieldValueList" [props]="{ label$, value$, displayMode$ }"></component-mapper>
33
</div>
44
<ng-template #noDisplayMode>
5-
<div *ngIf="!bReadonly$ && bHasForm$; else noEdit">
5+
<div *ngIf="bHasForm$; else noEdit">
66
<div [formGroup]="formGroup$" *ngIf="bVisible$" class="psdk-currency-field">
77
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText">
88
<mat-label>{{ label$ }}</mat-label>
99
<div class="psdk-currency-input">
1010
<input
11-
style="margin-left: 5px"
11+
style="margin-left: 5px; margin-top: -1rem"
1212
type="text"
1313
matInput
1414
currencyMask
15-
[options]="{ prefix: currSym, thousands: currSep, decimal: currDec, align: 'left', nullable: true }"
15+
[options]="{
16+
prefix: currSym,
17+
thousands: currSep,
18+
decimal: currDec,
19+
align: 'left',
20+
nullable: true,
21+
precision: decimalPrecision,
22+
inputMode: inputMode
23+
}"
1624
[placeholder]="placeholder"
1725
[formControlName]="controlName$"
1826
[required]="bRequired$"
1927
[formControl]="fieldControl"
2028
[attr.data-test-id]="testId"
2129
(blur)="fieldOnBlur($event)"
30+
[readonly]="bReadonly$"
2231
/>
2332
</div>
2433
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
44
import { MatInputModule } from '@angular/material/input';
55
import { MatFormFieldModule } from '@angular/material/form-field';
66
import { interval } from 'rxjs';
7-
import { NgxCurrencyDirective } from 'ngx-currency';
7+
import { NgxCurrencyDirective, NgxCurrencyInputMode } from 'ngx-currency';
88
import { AngularPConnectData, AngularPConnectService } from '../../../_bridge/angular-pconnect';
99
import { Utils } from '../../../_helpers/utils';
1010
import { ComponentMapperComponent } from '../../../_bridge/component-mapper/component-mapper.component';
@@ -15,6 +15,7 @@ import { PConnFieldProps } from '../../../_types/PConnProps.interface';
1515
interface CurrrencyProps extends PConnFieldProps {
1616
// If any, enter additional props that only exist on Currency here
1717
currencyISOCode?: string;
18+
allowDecimals: boolean;
1819
}
1920

2021
@Component({
@@ -52,6 +53,8 @@ export class CurrencyComponent implements OnInit, OnDestroy {
5253
currSym: string;
5354
currSep: string;
5455
currDec: string;
56+
inputMode: any;
57+
decimalPrecision: number | undefined;
5558

5659
constructor(
5760
private angularPConnect: AngularPConnectService,
@@ -116,6 +119,7 @@ export class CurrencyComponent implements OnInit, OnDestroy {
116119
this.testId = this.configProps$.testId;
117120
this.label$ = this.configProps$.label;
118121
this.displayMode$ = this.configProps$.displayMode;
122+
this.inputMode = NgxCurrencyInputMode.Natural;
119123
let nValue: any = this.configProps$.value;
120124
if (nValue) {
121125
if (typeof nValue === 'string') {
@@ -163,6 +167,8 @@ export class CurrencyComponent implements OnInit, OnDestroy {
163167
this.currencyISOCode = this.configProps$.currencyISOCode;
164168
}
165169

170+
this.decimalPrecision = this.configProps$?.allowDecimals ? 2 : 0;
171+
166172
this.componentReference = this.pConn$.getStateProps().value;
167173

168174
// trigger display of error message with field control

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
[placeholder]="placeholder"
1414
[formControl]="fieldControl"
1515
(blur)="fieldOnBlur($event)"
16-
(dateTimeChange)="fieldOnBlur($event)"
16+
(dateTimeChange)="fieldOnDateChange($event)"
1717
[value]="value$"
1818
[required]="bRequired$"
1919
/>
20-
<mat-datepicker-toggle matSuffix [for]="$any(dtPicker)" [owlDateTimeTrigger]="dtPicker"></mat-datepicker-toggle>
20+
<mat-datepicker-toggle matSuffix [owlDateTimeTrigger]="dtPicker"></mat-datepicker-toggle>
2121
<owl-date-time #dtPicker></owl-date-time>
2222
<mat-error *ngIf="fieldControl?.invalid">{{ getErrorMessage() }}</mat-error>
2323
</mat-form-field>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,15 @@ export class DateTimeComponent implements OnInit, OnDestroy {
168168
}
169169
}
170170

171+
fieldOnDateChange(event: any) {
172+
// this comes from the date pop up
173+
if (typeof event.value === 'object') {
174+
// convert date to pega "date" format
175+
event.value = event.value?.toISOString();
176+
}
177+
this.angularPConnectData.actions?.onChange(this, { value: event.value });
178+
}
179+
171180
fieldOnBlur(event: any) {
172181
if (typeof event.value === 'object') {
173182
// convert date to pega "date" format

0 commit comments

Comments
 (0)