Skip to content

Commit

Permalink
fix: removal of unnessary code & error fixes (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
tumms2021389 authored Nov 21, 2024
1 parent d71eecb commit 79fb57b
Show file tree
Hide file tree
Showing 15 changed files with 9 additions and 159 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pega/angular-sdk-components",
"version": "24.1.10",
"version": "24.2.10",
"description": "Angular SDK packaging: bridge and components, overrides",
"main": "index.ts",
"private": true,
Expand Down
6 changes: 3 additions & 3 deletions packages/angular-sdk-components/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@pega/angular-sdk-components",
"version": "24.1.10",
"version": "24.2.10",
"peerDependencies": {
"@angular/common": "^17.3.12",
"@angular/core": "^17.3.12"
"@angular/common": "^18.2.12",
"@angular/core": "^18.2.12"
},
"dependencies": {
"tslib": "^2.6.2"
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions packages/angular-sdk-components/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ export * from './lib/_helpers/filter-utils';
export * from './lib/_helpers/instructions-utils';

export * from './lib/_messages/error-messages.service';
export * from './lib/_messages/get-login-status.service';
export * from './lib/_messages/oauth-response.service';
export * from './lib/_messages/progress-spinner.service';
export * from './lib/_messages/reset-pconnect.service';
export * from './lib/_messages/update-worklist.service';

export * from './lib/_types/PConnProps.interface';
Expand Down
2 changes: 1 addition & 1 deletion packages/angular-sdk-overrides/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pega/angular-sdk-overrides",
"version": "24.1.10",
"version": "24.2.10",
"description": "Angular SDK - Code for overriding components",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ComponentMapperComponent } from '../../../../../../../packages/angular-
export class MCMainContentComponent implements OnInit {
@Input() pConn$: typeof PConnect;

sComponentName$: string;
sComponentName$: string | undefined;

ngOnInit(): void {
if (this.pConn$) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { Subscription, interval } from 'rxjs';
import { Subscription } from 'rxjs';
import { loginIfNecessary, logout, sdkSetAuthHeader } from '@pega/auth/lib/sdk-auth-manager';

import { ProgressSpinnerService } from '../../../../../../../packages/angular-sdk-components/src/lib/_messages/progress-spinner.service';
import { ResetPConnectService } from '../../../../../../../packages/angular-sdk-components/src/lib/_messages/reset-pconnect.service';
import { UpdateWorklistService } from '../../../../../../../packages/angular-sdk-components/src/lib/_messages/update-worklist.service';
import { endpoints } from '../../../../../../../packages/angular-sdk-components/src/lib/_services/endpoints';
import { ServerConfigService } from '../../../../../../../packages/angular-sdk-components/src/lib/_services/server-config.service';
Expand Down Expand Up @@ -45,14 +44,12 @@ export class MCNavComponent implements OnInit, OnDestroy {
isProgress$ = false;

progressSpinnerSubscription: Subscription;
resetPConnectSubscription: Subscription;

bootstrapShell: any;

constructor(
private cdRef: ChangeDetectorRef,
private psservice: ProgressSpinnerService,
private rpcservice: ResetPConnectService,
private uwservice: UpdateWorklistService,
private titleService: Title,
private scservice: ServerConfigService
Expand All @@ -66,7 +63,6 @@ export class MCNavComponent implements OnInit, OnDestroy {

ngOnDestroy() {
this.progressSpinnerSubscription.unsubscribe();
this.resetPConnectSubscription.unsubscribe();
}

async initialize() {
Expand All @@ -79,24 +75,6 @@ export class MCNavComponent implements OnInit, OnDestroy {
this.showHideProgress(message.show);
});

this.resetPConnectSubscription = this.rpcservice.getMessage().subscribe(message => {
if (message.reset) {
this.bPConnectLoaded$ = false;

/// window.PCore = null;

const timer = interval(1000).subscribe(() => {
// this.getPConnectAndUpdate();
window.myLoadMashup('app-root', false);

// update the worklist
this.uwservice.sendMessage(true);

timer.unsubscribe();
});
}
});

// Add event listener for when logged in and constellation bootstrap is loaded
document.addEventListener('SdkConstellationReady', () => {
this.bLoggedIn$ = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export class NavigationComponent implements OnInit, OnDestroy {
userName$ = '';
isProgress$ = false;
progressSpinnerSubscription: Subscription;
resetPConnectSubscription: Subscription;

constructor(
private uwservice: UpdateWorklistService,
Expand All @@ -64,7 +63,6 @@ export class NavigationComponent implements OnInit, OnDestroy {

ngOnDestroy() {
this.progressSpinnerSubscription.unsubscribe();
this.resetPConnectSubscription.unsubscribe();

PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL, 'cancelAssignment');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { CommonModule } from '@angular/common';
import { HttpParams } from '@angular/common/http';
import { MatButtonModule } from '@angular/material/button';
import { Subscription } from 'rxjs';
import { GetLoginStatusService } from '../../../../../../../packages/angular-sdk-components/src/lib/_messages/get-login-status.service';
import { ProgressSpinnerService } from '../../../../../../../packages/angular-sdk-components/src/lib/_messages/progress-spinner.service';
import { UpdateWorklistService } from '../../../../../../../packages/angular-sdk-components/src/lib/_messages/update-worklist.service';
import { CaseService } from '../../../../../../../packages/angular-sdk-components/src/lib/_services/case.service';
Expand All @@ -25,7 +24,6 @@ export class SideBarComponent implements OnInit, OnDestroy {

constructor(
private psservice: ProgressSpinnerService,
private glsservice: GetLoginStatusService,
private uwservice: UpdateWorklistService,
private dpservice: DatapageService,
private cservice: CaseService
Expand Down Expand Up @@ -67,7 +65,6 @@ export class SideBarComponent implements OnInit, OnDestroy {
},
err => {
alert(`Errors from get casetypes:${err.errors}`);
this.glsservice.sendMessage('LoggedOff');
}
);
}
Expand Down

0 comments on commit 79fb57b

Please sign in to comment.