Skip to content

Commit c6a90e2

Browse files
authored
Merge branch 'master' into safecheckforTheme
2 parents 71cee6a + d19290a commit c6a90e2

File tree

21 files changed

+532
-33
lines changed

21 files changed

+532
-33
lines changed

packages/angular-sdk-components/src/lib/_bridge/helpers/sdk-pega-component-map.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ import { OneColumnTabComponent } from '../../_components/template/one-column-tab
8383
import { PageComponent } from '../../_components/template/page/page.component';
8484
import { PromotedFiltersComponent } from '../../_components/template/promoted-filters/promoted-filters.component';
8585
import { SearchGroupsComponent } from '../../_components/template/advanced-search/search-groups/search-groups.component';
86+
import { SelfServiceCaseViewComponent } from '../../_components/template/self-service-case-view/self-service-case-view.component';
8687
import { SimpleTableComponent } from '../../_components/template/simple-table/simple-table.component';
8788
import { SimpleTableManualComponent } from '../../_components/template/simple-table-manual/simple-table-manual.component';
8889
import { SimpleTableSelectComponent } from '../../_components/template/simple-table-select/simple-table-select.component';
@@ -226,6 +227,7 @@ const pegaSdkComponentMap = {
226227
SearchForm: SearchFormComponent,
227228
SearchGroups: SearchGroupsComponent,
228229
SelectableCard: SelectableCardComponent,
230+
SelfServiceCaseView: SelfServiceCaseViewComponent,
229231
SemanticLink: SemanticLinkComponent,
230232
SimpleTable: SimpleTableComponent,
231233
SimpleTableManual: SimpleTableManualComponent,

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@
3535
else hasSecondaryValue
3636
"
3737
>
38-
<component-mapper name="Operator" [props]="{ pConn$: field?.kid, displayLabel: field?.displayLabel }"></component-mapper>
38+
<component-mapper
39+
name="Operator"
40+
[props]="{ pConn$: field?.kid, displayLabel: field?.displayLabel || field?.config.displayLabel }"
41+
></component-mapper>
3942
</div>
4043
<ng-template #hasSecondaryValue>
4144
<div class="psdk-csf-secondary-field">

packages/angular-sdk-components/src/lib/_components/infra/Containers/flow-container/flow-container.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ export class FlowContainerComponent extends FlowContainerBaseComponent implement
8989
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
9090

9191
this.localizedVal = PCore.getLocaleUtils().getLocaleValue;
92-
const caseInfo = this.pConn$.getCaseInfo();
93-
this.localeReference = `${caseInfo?.getClassName()}!CASE!${caseInfo.getName()}`.toUpperCase();
92+
this.localeReference = this.pConn$?.getCaseLocaleReference();
9493

9594
// Then, continue on with other initialization
9695

packages/angular-sdk-components/src/lib/_components/infra/Containers/modal-view-container/modal-view-container.component.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
234234
this.title$ =
235235
isDataObject || this.isMultiRecord
236236
? this.getModalHeading(dataObjectAction)
237-
: this.determineModalHeaderByAction(
238-
actionName,
239-
caseTypeName,
240-
ID,
241-
`${theNewCaseInfo?.getClassName()}!CASE!${theNewCaseInfo.getName()}`.toUpperCase()
242-
);
237+
: this.determineModalHeaderByAction(actionName, caseTypeName, ID, this.createdViewPConn$?.getCaseLocaleReference());
243238

244239
const bIsRefComponent = this.checkIfRefComponent(newComp);
245240

packages/angular-sdk-components/src/lib/_components/infra/assignment/assignment.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
257257
this.prevNavigationSteps = JSON.parse(JSON.stringify(oCaseInfo.navigation.steps));
258258
this.arNavigationSteps$.forEach(step => {
259259
if (step.name) {
260-
step.name = PCore.getLocaleUtils().getLocaleValue(step.name, undefined, this.localeReference);
260+
step.name = this.pConn$.getLocalizationService().getLocalizedText(step.name);
261261
}
262262
});
263263
this.arCurrentStepIndicies$ = [];

packages/angular-sdk-components/src/lib/_components/infra/navbar/navbar.component.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
*ngFor="let caseType of caseTypes$"
2323
(click)="navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType)"
2424
>
25-
<span class="psdk-nav-button-span">{{ localeUtils.getLocaleValue(caseType.pyLabel, '', localeReference) }}</span>
25+
<span class="psdk-nav-button-span">{{
26+
localeUtils.getLocaleValue(caseType.pyLabel, '', localeUtils.getCaseLocaleReference(caseType.pyClassName))
27+
}}</span>
2628
</mat-list-item>
2729
</mat-list>
2830
</mat-list>
@@ -32,7 +34,7 @@
3234
<mat-list-item (click)="navPanelButtonClick(page)">
3335
<div class="flex-box">
3436
<img class="psdk-nav-svg-icon" src="{{ page.iconName }}" />
35-
<span class="psdk-nav-button-span">{{ localeUtils.getLocaleValue(page.pyLabel, '', localeReference) }}</span>
37+
<span class="psdk-nav-button-span">{{ page.name }}</span>
3638
</div>
3739
</mat-list-item>
3840
</mat-list>

packages/angular-sdk-components/src/lib/_components/infra/navbar/navbar.component.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export class NavbarComponent implements OnInit, OnDestroy {
4949
localizedVal: any;
5050
localeCategory = 'AppShell';
5151
localeUtils = PCore.getLocaleUtils();
52-
localeReference: any;
5352
constructor(
5453
private angularPConnect: AngularPConnectService,
5554
private chRef: ChangeDetectorRef,
@@ -113,11 +112,17 @@ export class NavbarComponent implements OnInit, OnDestroy {
113112

114113
// making a copy, so can add info
115114
this.navPages$ = JSON.parse(JSON.stringify(this.pages$));
116-
115+
// @ts-ignore
116+
const localeReference = PCore.getLocaleUtils().getPortalLocaleReference() || this.pConn$.getValue('.pyLocaleReference');
117117
this.navPages$.forEach(page => {
118+
const destinationObject: any = {};
119+
this.pConn$.resolveConfigProps(
120+
{ defaultHeading: page.pyDefaultHeading || page.pyLabel, localeReference: page.pyLocalizationReference },
121+
destinationObject
122+
);
123+
page.name = this.localeUtils.getLocaleValue(destinationObject.defaultHeading, '', destinationObject.localeReference || localeReference);
118124
page.iconName = this.utils.getImageSrc(page.pxPageViewIcon, this.utils.getSDKStaticContentUrl());
119125
});
120-
this.localeReference = this.pConn$.getValue('.pyLocaleReference');
121126
this.actionsAPI = this.pConn$.getActionsApi();
122127
this.createWork = this.actionsAPI.createWork.bind(this.actionsAPI);
123128
this.showPage = this.actionsAPI.showPage.bind(this.actionsAPI);

packages/angular-sdk-components/src/lib/_components/infra/stages/stages.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<img class="psdk-stages-icon" src="{{ checkSvgIcon$ }}" />{{ PCore$.getLocaleUtils().getLocaleValue(stage.name, '', key) }}
55
</div>
66
<div *ngIf="stage.visited_status == 'active'" class="psdk-stages-inner-present">
7-
{{ PCore$.getLocaleUtils().getLocaleValue(stage.name, '', key) }}
7+
{{ localizationService.getLocalizedText(stage.name) }}
88
</div>
99
<div *ngIf="stage.visited_status == 'future'" class="psdk-stages-inner-future">
10-
{{ PCore$.getLocaleUtils().getLocaleValue(stage.name, '', key) }}
10+
{{ localizationService.getLocalizedText(stage.name) }}
1111
</div>
1212
</div>
1313
</div>

packages/angular-sdk-components/src/lib/_components/infra/stages/stages.component.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
}
2828

2929
.psdk-stages-bar {
30-
margin: 1rem 0rem;
3130
background-color: var(--mat-sys-surface-container);
3231
border-radius: 0.5rem;
3332
border: 0.0625rem solid var(--mat-sys-outline-variant);

packages/angular-sdk-components/src/lib/_components/infra/stages/stages.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ export class StagesComponent implements OnInit, OnDestroy {
2626
arStageResults$: any[];
2727
lastStage$: any;
2828
checkSvgIcon$: string;
29-
key: string;
29+
key: any;
30+
localizationService: any;
3031

3132
constructor(
3233
private angularPConnect: AngularPConnectService,
@@ -39,7 +40,8 @@ export class StagesComponent implements OnInit, OnDestroy {
3940

4041
// const imagePath = this.utils.getIconPath(this.utils.getSDKStaticContentUrl());
4142
this.checkSvgIcon$ = this.utils.getImageSrc('check', this.utils.getSDKStaticContentUrl());
42-
this.key = `${this.pConn$.getCaseInfo().getClassName()}!CASE!${this.pConn$.getCaseInfo().getName()}`.toUpperCase();
43+
this.key = this.pConn$?.getCaseLocaleReference();
44+
this.localizationService = this.pConn$?.getLocalizationService();
4345
}
4446

4547
ngOnDestroy(): void {

0 commit comments

Comments
 (0)