@pega/angular-sdk-overrides
Advanced tools
Comparing version 0.23.6 to 0.23.7
@@ -121,3 +121,3 @@ import { Component, OnInit, Input, ChangeDetectorRef, forwardRef, OnDestroy } from '@angular/core'; | ||
const filterVal = (value || this.filterValue).toLowerCase(); | ||
return this.options$?.filter(option => option.value.toLowerCase().includes(filterVal)); | ||
return this.options$?.filter(option => option.value?.toLowerCase().includes(filterVal)); | ||
} | ||
@@ -124,0 +124,0 @@ |
@@ -72,2 +72,6 @@ import { CommonModule } from '@angular/common'; | ||
if (this.configProps$.visibility === undefined) { | ||
this.visibility$ = this.pConn$.getComputedVisibility(); | ||
} | ||
if (this.configProps$.displayMode === 'LABELS_LEFT') { | ||
@@ -74,0 +78,0 @@ if (this.configProps$.visibility === undefined) this.visibility$ = true; |
@@ -39,2 +39,3 @@ import { Component, OnInit, Input, ChangeDetectorRef, forwardRef, OnDestroy } from '@angular/core'; | ||
controlName$: string; | ||
testId = ''; | ||
bHasForm$ = true; | ||
@@ -104,2 +105,3 @@ componentReference = ''; | ||
this.testId = this.configProps$.testId; | ||
this.label$ = this.configProps$.label; | ||
@@ -106,0 +108,0 @@ this.displayMode$ = this.configProps$.displayMode; |
@@ -39,2 +39,3 @@ import { Component, OnInit, Input, ChangeDetectorRef, forwardRef, OnDestroy } from '@angular/core'; | ||
controlName$: string; | ||
testId = ''; | ||
bHasForm$ = true; | ||
@@ -110,2 +111,3 @@ componentReference = ''; | ||
this.testId = this.configProps$.testId; | ||
this.label$ = this.configProps$.label; | ||
@@ -112,0 +114,0 @@ this.displayMode$ = this.configProps$.displayMode; |
@@ -15,2 +15,3 @@ import { CommonModule } from '@angular/common'; | ||
@Input() displayMode$: any; | ||
@Input() isHtml$ = false; | ||
} |
@@ -622,6 +622,2 @@ /* eslint-disable max-classes-per-file */ | ||
compare(a: number | string, b: number | string, isAsc: boolean) { | ||
return (a < b ? -1 : 1) * (isAsc ? 1 : -1); | ||
} | ||
_headerSortClick(event, columnData) { | ||
@@ -659,17 +655,18 @@ // images 0 - filter, 1 - arrow, 2 - more | ||
clearOutArrows(event, columnData) { | ||
const arImages = event.srcElement.parentElement.getElementsByTagName('img'); | ||
// Commenting below method, since the code which is using it, is already commented | ||
// clearOutArrows(event, columnData) { | ||
// const arImages = event.srcElement.parentElement.getElementsByTagName('img'); | ||
for (const theImage of arImages) { | ||
// let theImage = arImages[i] | ||
const arrow = theImage.getAttribute('arrow'); | ||
if (arrow) { | ||
const arrowId = theImage.getAttribute('arrowid'); | ||
if (arrow != 'none' && arrowId != columnData.config.name) { | ||
theImage.setAttribute('arrow', 'none'); | ||
theImage.src = ''; | ||
} | ||
} | ||
} | ||
} | ||
// for (const theImage of arImages) { | ||
// // let theImage = arImages[i] | ||
// const arrow = theImage.getAttribute('arrow'); | ||
// if (arrow) { | ||
// const arrowId = theImage.getAttribute('arrowid'); | ||
// if (arrow != 'none' && arrowId != columnData.config.name) { | ||
// theImage.setAttribute('arrow', 'none'); | ||
// theImage.src = ''; | ||
// } | ||
// } | ||
// } | ||
// } | ||
@@ -694,6 +691,6 @@ sortCompare(a, b): number { | ||
case 'up': | ||
if (aValue < bValue) { | ||
if (!aValue || aValue < bValue) { | ||
return -1; | ||
} | ||
if (aValue > bValue) { | ||
if (!bValue || aValue > bValue) { | ||
return 1; | ||
@@ -703,6 +700,6 @@ } | ||
case 'down': | ||
if (aValue > bValue) { | ||
if (!bValue || aValue > bValue) { | ||
return -1; | ||
} | ||
if (aValue < bValue) { | ||
if (!aValue || aValue < bValue) { | ||
return 1; | ||
@@ -709,0 +706,0 @@ } |
@@ -133,3 +133,3 @@ import { getSeconds } from '@pega/angular-sdk-components'; | ||
fillAvailableSpace: !!field.config.fillAvailableSpace, | ||
id: index, | ||
id: `${index}`, | ||
name: field.config.value.substr(4), | ||
@@ -136,0 +136,0 @@ cellRenderer: TABLE_CELL, |
@@ -160,2 +160,4 @@ /* eslint-disable max-classes-per-file */ | ||
isInitialized = false; | ||
constructor( | ||
@@ -168,2 +170,3 @@ private angularPConnect: AngularPConnectService, | ||
ngOnInit(): void { | ||
this.isInitialized = true; | ||
// First thing in initialization is registering and subscribing to the AngularPConnect service | ||
@@ -305,2 +308,4 @@ this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange); | ||
this.initializeDefaultPageInstructions(); | ||
// end of from Nebula | ||
@@ -354,2 +359,17 @@ | ||
initializeDefaultPageInstructions() { | ||
if (this.isInitialized) { | ||
this.isInitialized = false; | ||
if (this.allowEditingInModal) { | ||
this.pConn$.getListActions().initDefaultPageInstructions( | ||
this.pConn$.getReferenceList(), | ||
this.fieldDefs.filter(item => item.name).map(item => item.name) | ||
); | ||
} else { | ||
// @ts-ignore - An argument for 'fields' was not provided | ||
this.pConn$.getListActions().initDefaultPageInstructions(this.pConn$.getReferenceList()); | ||
} | ||
} | ||
} | ||
getResultsText() { | ||
@@ -376,9 +396,24 @@ const recordsCount = this.readOnlyMode ? this.rowData?.data.length : this.referenceList?.length; | ||
if (aValue === bValue) { | ||
return 0; | ||
// | ||
switch (this.arrowDirection) { | ||
case 'up': | ||
if (!aValue || aValue < bValue) { | ||
return -1; | ||
} | ||
if (!bValue || aValue > bValue) { | ||
return 1; | ||
} | ||
break; | ||
case 'down': | ||
if (!bValue || aValue > bValue) { | ||
return -1; | ||
} | ||
if (!aValue || aValue < bValue) { | ||
return 1; | ||
} | ||
break; | ||
default: | ||
break; | ||
} | ||
if (this.arrowDirection === 'up') return aValue - bValue; | ||
if (this.arrowDirection === 'down') return bValue - aValue; | ||
return 0; | ||
@@ -897,4 +932,2 @@ } | ||
); | ||
} else if (PCore.getPCoreVersion()?.includes('8.7')) { | ||
this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length, this.pageReference); | ||
} else { | ||
@@ -904,2 +937,6 @@ // @ts-ignore - second parameter "pageRef" is optional for insert method | ||
} | ||
this.pConn$.clearErrorMessages({ | ||
property: (this.pConn$.getStateProps() as any)?.referenceList?.substring(1) | ||
} as any); | ||
} | ||
@@ -906,0 +943,0 @@ |
{ | ||
"name": "@pega/angular-sdk-overrides", | ||
"version": "0.23.6", | ||
"version": "0.23.7", | ||
"description": "Angular SDK - Code for overriding components", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
896694
18511