@pega/angular-sdk-overrides
Advanced tools
Comparing version 0.242.1 to 0.242.2
@@ -76,3 +76,3 @@ import { CommonModule } from '@angular/common'; | ||
if (this.configProps$.displayMode === 'LABELS_LEFT') { | ||
if (this.configProps$.displayMode === 'DISPLAY_ONLY') { | ||
if (this.configProps$.visibility === undefined) this.visibility$ = true; | ||
@@ -82,3 +82,3 @@ | ||
const pConn = child.getPConnect(); | ||
pConn.setInheritedProp('displayMode', 'LABELS_LEFT'); | ||
pConn.setInheritedProp('displayMode', 'DISPLAY_ONLY'); | ||
pConn.setInheritedProp('readOnly', true); | ||
@@ -85,0 +85,0 @@ |
@@ -105,3 +105,3 @@ import { CommonModule } from '@angular/common'; | ||
value: scalarValue, | ||
displayMode: 'LABELS_LEFT', | ||
displayMode: 'DISPLAY_ONLY', | ||
label: this.label$, | ||
@@ -117,5 +117,5 @@ ...restProps, | ||
}); | ||
this.isDisplayModeEnabled = ['LABELS_LEFT', 'STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(this.displayMode$ as string); | ||
this.isDisplayModeEnabled = ['STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(this.displayMode$ as string); | ||
this.value$ = this.items; | ||
} | ||
} |
@@ -107,2 +107,4 @@ import { Component, OnInit, Input, ChangeDetectorRef, NgZone, forwardRef, OnDestroy, Injector } from '@angular/core'; | ||
this.checkAndUpdate(); | ||
PCore.getPubSubUtils().subscribe( | ||
@@ -461,3 +463,5 @@ PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL, | ||
this.caseMessages$ = this.localizedVal(this.pConn$.getValue('caseMessages'), this.localeCategory); | ||
if (this.caseMessages$ || !this.hasAssignments()) { | ||
// caseMessages's behavior has changed in 24.2, and hence it doesn't let Optional Action work. | ||
// Changing the below condition for now. Was: (theCaseMessages || !hasAssignments()) | ||
if (!this.hasAssignments()) { | ||
this.bHasCaseMessages$ = true; | ||
@@ -598,3 +602,2 @@ this.bShowConfirm = true; | ||
// eslint-disable-next-line sonarjs/no-identical-functions | ||
topViewRefresh(): void { | ||
@@ -601,0 +604,0 @@ Object.values(this.formGroup$.controls).forEach(control => { |
@@ -102,14 +102,19 @@ import { Component, OnInit, Input, NgZone, forwardRef, OnDestroy } from '@angular/core'; | ||
}; | ||
containerMgr.initializeContainers({ | ||
type: mode === CONTAINER_TYPE.MULTIPLE ? CONTAINER_TYPE.MULTIPLE : CONTAINER_TYPE.SINGLE | ||
}); | ||
if (mode === CONTAINER_TYPE.MULTIPLE && limit) { | ||
/* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */ | ||
PCore.getContainerUtils().setContainerLimit(`${APP.APP}/${name}`, limit); | ||
if (sessionStorage.getItem('hasViewContainer') == 'false') { | ||
containerMgr.initializeContainers({ | ||
type: mode === CONTAINER_TYPE.MULTIPLE ? CONTAINER_TYPE.MULTIPLE : CONTAINER_TYPE.SINGLE | ||
}); | ||
if (mode === CONTAINER_TYPE.MULTIPLE && limit) { | ||
/* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */ | ||
PCore.getContainerUtils().setContainerLimit(`${APP.APP}/${name}`, limit); | ||
} | ||
if (!PCore.checkIfSemanticURL()) containerMgr.addContainerItem(this.pConn$ as any); | ||
if (!this.displayOnlyFA$) configureBrowserBookmark(this.pConn$); | ||
sessionStorage.setItem('hasViewContainer', 'true'); | ||
} | ||
if (!PCore.checkIfSemanticURL()) containerMgr.addContainerItem(this.pConn$ as any); | ||
if (!this.displayOnlyFA$) configureBrowserBookmark(this.pConn$); | ||
// cannot call checkAndUpdate becasue first time through, will call updateSelf and that is incorrect (causes issues). | ||
@@ -116,0 +121,0 @@ // however, need angularPConnect to be initialized with currentProps for future updates, so calling shouldComponentUpdate directly |
@@ -119,3 +119,3 @@ import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges } from '@angular/core'; | ||
const configObject = PCore.createPConnect(config); | ||
configObject.getPConnect().setInheritedProp('displayMode', 'LABELS_LEFT'); | ||
configObject.getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY'); | ||
this.loadedPConn$ = ReferenceComponent.normalizePConn(configObject.getPConnect()); | ||
@@ -122,0 +122,0 @@ this.componentName$ = this.loadedPConn$.getComponentName(); |
@@ -100,2 +100,5 @@ import { Component, OnInit, Input, NgZone, forwardRef, OnDestroy } from '@angular/core'; | ||
// clear out hasViewContainer | ||
sessionStorage.setItem('hasViewContainer', 'false'); | ||
this.mConn$ = configObjModal.getPConnect(); | ||
@@ -102,0 +105,0 @@ |
@@ -116,3 +116,3 @@ import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core'; | ||
// this.childrenToRender = this.children; | ||
this.isDisplayModeEnabled = ['LABELS_LEFT', 'STACKED_LARGE_VAL'].includes(displayMode); | ||
this.isDisplayModeEnabled = ['DISPLAY_ONLY', 'STACKED_LARGE_VAL'].includes(displayMode); | ||
@@ -119,0 +119,0 @@ if (this.firstChildMeta?.type !== 'Region') { |
@@ -7,2 +7,3 @@ import { Component, OnInit, Input, forwardRef } from '@angular/core'; | ||
import { TemplateUtils } from '@pega/angular-sdk-components'; | ||
import { FormTemplateBaseComponent } from '@pega/angular-sdk-components'; | ||
@@ -23,4 +24,4 @@ interface DefaultFormProps { | ||
}) | ||
export class DefaultFormComponent implements OnInit { | ||
@Input() pConn$: typeof PConnect; | ||
export class DefaultFormComponent extends FormTemplateBaseComponent implements OnInit { | ||
@Input() override pConn$: typeof PConnect; | ||
@Input() formGroup$: FormGroup; | ||
@@ -46,3 +47,5 @@ | ||
constructor(private templateUtils: TemplateUtils) {} | ||
constructor(private templateUtils: TemplateUtils) { | ||
super(); | ||
} | ||
@@ -49,0 +52,0 @@ ngOnInit(): void { |
@@ -73,3 +73,3 @@ import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core'; | ||
this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT'); | ||
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY'); | ||
this.pConn$.setInheritedProp('readOnly', true); | ||
@@ -76,0 +76,0 @@ |
@@ -78,3 +78,3 @@ import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core'; | ||
this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT'); | ||
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY'); | ||
this.pConn$.setInheritedProp('readOnly', true); | ||
@@ -81,0 +81,0 @@ |
@@ -78,3 +78,3 @@ import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core'; | ||
this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT'); | ||
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY'); | ||
this.pConn$.setInheritedProp('readOnly', true); | ||
@@ -81,0 +81,0 @@ |
@@ -74,3 +74,3 @@ import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core'; | ||
this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT'); | ||
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY'); | ||
this.pConn$.setInheritedProp('readOnly', true); | ||
@@ -77,0 +77,0 @@ |
@@ -82,3 +82,3 @@ import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core'; | ||
configProps.readOnly = true; | ||
configProps.displayMode = 'LABELS_LEFT'; | ||
configProps.displayMode = 'DISPLAY_ONLY'; | ||
const propToUse = { ...thePConn.getInheritedProps() }; | ||
@@ -85,0 +85,0 @@ configProps.label = propToUse?.label; |
@@ -62,3 +62,3 @@ import { Component, Input, OnDestroy, OnInit, forwardRef } from '@angular/core'; | ||
this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT'); | ||
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY'); | ||
this.pConn$.setInheritedProp('readOnly', true); | ||
@@ -65,0 +65,0 @@ |
@@ -108,3 +108,3 @@ import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges } from '@angular/core'; | ||
const displayMode = this.configProps$.displayMode; | ||
this.readonlyMode = renderMode === 'ReadOnly' || displayMode === 'LABELS_LEFT'; | ||
this.readonlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY'; | ||
this.contextClass = this.configProps$.contextClass; | ||
@@ -118,3 +118,3 @@ const lookForChildInConfig = this.configProps$.lookForChildInConfig; | ||
if (this.readonlyMode) { | ||
this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT'); | ||
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY'); | ||
} | ||
@@ -121,0 +121,0 @@ this.referenceList = this.configProps$.referenceList; |
@@ -964,3 +964,3 @@ /* eslint-disable max-classes-per-file */ | ||
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; | ||
@@ -967,0 +967,0 @@ |
@@ -5,2 +5,3 @@ import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '@angular/core'; | ||
import { ComponentMapperComponent } from '@pega/angular-sdk-components'; | ||
import { FormTemplateBaseComponent } from '@pega/angular-sdk-components'; | ||
@@ -14,4 +15,4 @@ @Component({ | ||
}) | ||
export class OneColumnComponent implements OnInit, OnChanges { | ||
@Input() pConn$: typeof PConnect; | ||
export class OneColumnComponent extends FormTemplateBaseComponent implements OnInit, OnChanges { | ||
@Input() override pConn$: typeof PConnect; | ||
@Input() formGroup$: FormGroup; | ||
@@ -18,0 +19,0 @@ |
@@ -45,2 +45,5 @@ import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core'; | ||
} | ||
// when showing a page, similar to updating root, need to cause viewContainer to call "initContainer" | ||
sessionStorage.setItem('hasViewContainer', 'false'); | ||
} | ||
@@ -47,0 +50,0 @@ |
@@ -193,3 +193,3 @@ import { getSeconds } from '@pega/angular-sdk-components'; | ||
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; | ||
@@ -196,0 +196,0 @@ |
@@ -5,2 +5,3 @@ import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '@angular/core'; | ||
import { ComponentMapperComponent } from '@pega/angular-sdk-components'; | ||
import { FormTemplateBaseComponent } from '@pega/angular-sdk-components'; | ||
@@ -14,4 +15,4 @@ @Component({ | ||
}) | ||
export class ThreeColumnComponent implements OnInit, OnChanges { | ||
@Input() pConn$: typeof PConnect; | ||
export class ThreeColumnComponent extends FormTemplateBaseComponent implements OnInit, OnChanges { | ||
@Input() override pConn$: typeof PConnect; | ||
@Input() formGroup$: FormGroup; | ||
@@ -18,0 +19,0 @@ |
@@ -5,2 +5,3 @@ import { Component, OnInit, Input, forwardRef, SimpleChanges, OnChanges } from '@angular/core'; | ||
import { ComponentMapperComponent } from '@pega/angular-sdk-components'; | ||
import { FormTemplateBaseComponent } from '@pega/angular-sdk-components'; | ||
@@ -14,4 +15,4 @@ @Component({ | ||
}) | ||
export class TwoColumnComponent implements OnInit, OnChanges { | ||
@Input() pConn$: typeof PConnect; | ||
export class TwoColumnComponent extends FormTemplateBaseComponent implements OnInit, OnChanges { | ||
@Input() override pConn$: typeof PConnect; | ||
@Input() formGroup$: FormGroup; | ||
@@ -18,0 +19,0 @@ |
@@ -5,2 +5,3 @@ import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '@angular/core'; | ||
import { ComponentMapperComponent } from '@pega/angular-sdk-components'; | ||
import { FormTemplateBaseComponent } from '@pega/angular-sdk-components'; | ||
@@ -14,4 +15,4 @@ @Component({ | ||
}) | ||
export class WideNarrowFormComponent implements OnInit, OnChanges { | ||
@Input() pConn$: typeof PConnect; | ||
export class WideNarrowFormComponent extends FormTemplateBaseComponent implements OnInit, OnChanges { | ||
@Input() override pConn$: typeof PConnect; | ||
@Input() formGroup$: FormGroup; | ||
@@ -18,0 +19,0 @@ |
{ | ||
"name": "@pega/angular-sdk-overrides", | ||
"version": "0.242.1", | ||
"version": "0.242.2", | ||
"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
929515
520
19183