Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15,463 changes: 8,347 additions & 7,116 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@danielmoncada/angular-datetime-picker": "^17.0.0",
"@pega/auth": "~0.2.13",
"@pega/auth": "~0.2.15",
"@tinymce/tinymce-angular": "^8.0.1",
"core-js": "^3.35.0",
"dayjs": "^1.11.10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
}

// updateSelf
// eslint-disable-next-line sonarjs/cognitive-complexity
updateSelf(): void {
// moved this from ngOnInit() and call this from there instead...
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as CheckboxProps;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export class MultiselectComponent implements OnInit, OnDestroy {
}

// updateSelf
// eslint-disable-next-line sonarjs/cognitive-complexity
updateSelf() {
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps());

Expand Down Expand Up @@ -245,6 +246,7 @@ export class MultiselectComponent implements OnInit, OnDestroy {
}

// main search function trigger
// eslint-disable-next-line sonarjs/cognitive-complexity
getCaseListBasedOnParams(searchText, group, selectedRows, currentItemsTree, isTriggeredFromSearch = false) {
if (this.referenceList && this.referenceList.length > 0) {
this.listActions.getSelectedRows(true).then(result => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function prepareSearchResults(listObjData, displayFieldMeta) {
return searchResults;
}

// eslint-disable-next-line sonarjs/cognitive-complexity
async function doSearch(
searchText,
clickedGroup,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ export class ListViewComponent implements OnInit, OnDestroy {

filterDataWithDate(item, filterObj, filterValue) {
let bKeep;
let value = item[filterObj.ref] != null ?? item[filterObj.ref] != '' ? getSeconds(item[filterObj.ref]) : null;
let value = item[filterObj.ref] != null || item[filterObj.ref] != '' ? getSeconds(item[filterObj.ref]) : null;
filterValue = filterObj.containsFilterValue != null && filterObj.containsFilterValue != '' ? getSeconds(filterObj.containsFilterValue) : null;

switch (filterObj.containsFilter) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export const createMetaForTable = (fields, renderMode) => {

export const filterDataByDate = (item, filterObj) => {
let bKeep;
let value = item[filterObj.ref] != null ?? item[filterObj.ref] != '' ? getSeconds(item[filterObj.ref]) : null;
let value = item[filterObj.ref] != null || item[filterObj.ref] != '' ? getSeconds(item[filterObj.ref]) : null;
let filterValue = filterObj.containsFilterValue != null && filterObj.containsFilterValue != '' ? getSeconds(filterObj.containsFilterValue) : null;

switch (filterObj.containsFilter) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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 { loginIfNecessary, logout, sdkSetAuthHeader } from '@pega/auth/lib/sdk-auth-manager';
import { loginIfNecessary, logout, sdkSetAuthHeader, sdkSetCustomTokenParamsCB } 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';
Expand Down Expand Up @@ -111,13 +111,13 @@ export class MCNavComponent implements OnInit, OnDestroy {

const sdkConfigAuth = await this.scservice.getSdkConfigAuth();

if (!sdkConfigAuth.mashupClientId && sdkConfigAuth.customAuthType === 'Basic') {
if ((sdkConfigAuth.mashupGrantType === 'none' || !sdkConfigAuth.mashupClientId) && sdkConfigAuth.customAuthType === 'Basic') {
// Service package to use custom auth with Basic
const sB64 = window.btoa(`${sdkConfigAuth.mashupUserIdentifier}:${window.atob(sdkConfigAuth.mashupPassword)}`);
sdkSetAuthHeader(`Basic ${sB64}`);
}

if (!sdkConfigAuth.mashupClientId && sdkConfigAuth.customAuthType === 'BasicTO') {
if ((sdkConfigAuth.mashupGrantType === 'none' || !sdkConfigAuth.mashupClientId) && sdkConfigAuth.customAuthType === 'BasicTO') {
const now = new Date();
const expTime = new Date(now.getTime() + 5 * 60 * 1000);
let sISOTime = `${expTime.toISOString().split('.')[0]}Z`;
Expand All @@ -128,6 +128,14 @@ export class MCNavComponent implements OnInit, OnDestroy {
sdkSetAuthHeader(`Basic ${sB64}`);
}

if (sdkConfigAuth.mashupGrantType === 'customBearer' && sdkConfigAuth.customAuthType === 'CustomIdentifier') {
// Use custom bearer with specific custom parameter to set the desired operator via
// a userIdentifier property. (Caution: highly insecure...being used for simple demonstration)
sdkSetCustomTokenParamsCB(() => {
return { userIdentifier: sdkConfigAuth.mashupUserIdentifier };
});
}

// Login if needed, without doing an initial main window redirect
// eslint-disable-next-line no-restricted-globals
const sAppName = location.pathname.substring(location.pathname.indexOf('/') + 1);
Expand Down
Loading