Skip to content
Merged
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
157 changes: 29 additions & 128 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
Expand Up @@ -68,7 +68,7 @@
"@angular/platform-browser-dynamic": "^18.2.12",
"@angular/router": "^18.2.12",
"@danielmoncada/angular-datetime-picker": "^18.1.0",
"@pega/auth": "~0.2.17",
"@pega/auth": "~0.2.19",
"@tinymce/tinymce-angular": "^8.0.1",
"core-js": "^3.39.0",
"dayjs": "^1.11.13",
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 } 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 { UpdateWorklistService } from '../../../../../../../packages/angular-sdk-components/src/lib/_messages/update-worklist.service';
Expand Down Expand Up @@ -89,13 +89,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 @@ -106,6 +106,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