From a40d5730c0ca5f6b2b1e7dcadfcb0534d0c7785a Mon Sep 17 00:00:00 2001 From: tumms2021389 <97188066+tumms2021389@users.noreply.github.com> Date: Wed, 24 Jul 2024 18:12:28 +0530 Subject: [PATCH] TypeDefs upgraded to 3.0.0 version (#195) --- package-lock.json | 9 +++++---- package.json | 2 +- .../field/cancel-alert/cancel-alert.component.ts | 2 -- .../field/dropdown/dropdown.component.ts | 3 --- .../radio-buttons/radio-buttons.component.ts | 3 --- .../field/scalar-list/scalar-list.component.ts | 3 ++- .../field/text-area/text-area.component.ts | 2 -- .../flow-container/flow-container.component.ts | 12 ------------ .../modal-view-container.component.ts | 1 - .../view-container/view-container.component.ts | 1 - .../infra/assignment/assignment.component.ts | 7 +------ .../dashboard-filter.component.ts | 1 - .../infra/defer-load/defer-load.component.ts | 8 ++------ .../_components/infra/navbar/navbar.component.ts | 1 - .../template/case-view/case-view.component.ts | 6 ------ .../data-reference/data-reference.component.ts | 4 +--- .../dynamic-tabs/dynamic-tabs.component.ts | 1 - .../field-group-template.component.ts | 16 ++++------------ .../template/list-view/list-view.component.ts | 6 ++---- .../template/list-view/listViewHelpers.ts | 1 - .../repeating-structures.component.ts | 3 +-- .../simple-table-manual.component.ts | 13 ++++--------- .../simple-table-select.component.ts | 6 ++---- .../simple-table/simple-table.component.ts | 2 -- .../widget/attachment/attachment.component.ts | 3 --- .../case-history/case-history.component.ts | 1 - .../feed-container/feed-container.component.ts | 4 ---- .../file-utility/file-utility.component.ts | 4 ---- .../quick-create/quick-create.component.ts | 2 +- .../_components/widget/todo/todo.component.ts | 8 +++----- .../main-screen/main-screen.component.ts | 2 +- .../simple-portal/side-bar/side-bar.component.ts | 2 -- 32 files changed, 30 insertions(+), 109 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1713982e..5883e397 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,7 +49,7 @@ "@pega/configs": "^0.7.1", "@pega/constellationjs": "24.1.1-dev", "@pega/eslint-config": "^0.7.1", - "@pega/pcore-pconnect-typedefs": "~2.1.1", + "@pega/pcore-pconnect-typedefs": "~3.0.0", "@pega/prettier-config": "^0.7.1", "@playwright/test": "^1.40.1", "@types/jasmine": "~5.1.4", @@ -6493,9 +6493,10 @@ } }, "node_modules/@pega/pcore-pconnect-typedefs": { - "version": "2.1.1", - "dev": true, - "license": "ISC" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@pega/pcore-pconnect-typedefs/-/pcore-pconnect-typedefs-3.0.0.tgz", + "integrity": "sha512-++pN8e3EkeKS8f+IDZ5QxaIHTrka0wPpCHK7czI7ceSbj8xxQXbwm8xzoq6YYInfJsHS5xtsKVbcRei4imOFiw==", + "dev": true }, "node_modules/@pega/prettier-config": { "version": "0.7.1", diff --git a/package.json b/package.json index 1b94504b..2922ff41 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "@pega/configs": "^0.7.1", "@pega/constellationjs": "24.1.1-dev", "@pega/eslint-config": "^0.7.1", - "@pega/pcore-pconnect-typedefs": "~2.1.1", + "@pega/pcore-pconnect-typedefs": "~3.0.0", "@pega/prettier-config": "^0.7.1", "@playwright/test": "^1.40.1", "@types/jasmine": "~5.1.4", diff --git a/packages/angular-sdk-components/src/lib/_components/field/cancel-alert/cancel-alert.component.ts b/packages/angular-sdk-components/src/lib/_components/field/cancel-alert/cancel-alert.component.ts index 2f89ed59..08f7e78c 100644 --- a/packages/angular-sdk-components/src/lib/_components/field/cancel-alert/cancel-alert.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/field/cancel-alert/cancel-alert.component.ts @@ -71,7 +71,6 @@ export class CancelAlertComponent implements OnChanges { this.psService.sendMessage(false); this.dismissAlert(); - // @ts-ignore - second parameter “payload” for publish method should be optional PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CASE_CREATED); }) .catch(() => { @@ -92,7 +91,6 @@ export class CancelAlertComponent implements OnChanges { .then(() => { this.psService.sendMessage(false); this.dismissAlert(); - // @ts-ignore - second parameter “payload” for publish method should be optional PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL); }) .catch(() => { diff --git a/packages/angular-sdk-components/src/lib/_components/field/dropdown/dropdown.component.ts b/packages/angular-sdk-components/src/lib/_components/field/dropdown/dropdown.component.ts index ccbf15ba..4117e4ef 100644 --- a/packages/angular-sdk-components/src/lib/_components/field/dropdown/dropdown.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/field/dropdown/dropdown.component.ts @@ -159,7 +159,6 @@ export class DropdownComponent implements OnInit, OnDestroy { this.componentReference = (this.pConn$.getStateProps() as any).value; - // @ts-ignore - parameter “contextName” for getDataObject method should be optional const optionsList = [...this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject())]; optionsList?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') }); this.options$ = optionsList; @@ -184,7 +183,6 @@ export class DropdownComponent implements OnInit, OnDestroy { this.localizedValue = this.pConn$.getLocalizedValue( this.value$, this.localePath, - // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'. this.pConn$.getLocaleRuleNameFromKeys(this.localeClass, this.localeContext, this.localeName) ); // trigger display of error message with field control @@ -223,7 +221,6 @@ export class DropdownComponent implements OnInit, OnDestroy { return this.pConn$.getLocalizedValue( opt.value, this.localePath, - // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'. this.pConn$.getLocaleRuleNameFromKeys(this.localeClass, this.localeContext, this.localeName) ); } diff --git a/packages/angular-sdk-components/src/lib/_components/field/radio-buttons/radio-buttons.component.ts b/packages/angular-sdk-components/src/lib/_components/field/radio-buttons/radio-buttons.component.ts index 84c8b50c..2c4af84b 100644 --- a/packages/angular-sdk-components/src/lib/_components/field/radio-buttons/radio-buttons.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/field/radio-buttons/radio-buttons.component.ts @@ -166,7 +166,6 @@ export class RadioButtonsComponent implements OnInit, OnDestroy { this.componentReference = (this.pConn$.getStateProps() as any).value; - // @ts-ignore - parameter “contextName” for getDataObject method should be optional this.options$ = this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject()); const propName = (this.pConn$.getStateProps() as any).value; @@ -186,7 +185,6 @@ export class RadioButtonsComponent implements OnInit, OnDestroy { this.localizedValue = this.pConn$.getLocalizedValue( this.value$, this.localePath, - // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv' this.pConn$.getLocaleRuleNameFromKeys(this.localeClass, this.localeContext, this.localeName) ); // trigger display of error message with field control @@ -217,7 +215,6 @@ export class RadioButtonsComponent implements OnInit, OnDestroy { return this.pConn$.getLocalizedValue( opt.value, this.localePath, - // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv' this.pConn$.getLocaleRuleNameFromKeys(this.localeClass, this.localeContext, this.localeName) ); } diff --git a/packages/angular-sdk-components/src/lib/_components/field/scalar-list/scalar-list.component.ts b/packages/angular-sdk-components/src/lib/_components/field/scalar-list/scalar-list.component.ts index 1a117bf8..6383bcf3 100644 --- a/packages/angular-sdk-components/src/lib/_components/field/scalar-list/scalar-list.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/field/scalar-list/scalar-list.component.ts @@ -101,11 +101,12 @@ export class ScalarListComponent implements OnInit, OnDestroy { { type: componentType, config: { + // @ts-ignore - Object literal may only specify known properties, and 'value' does not exist in type 'ComponentMetadataConfig'. value: scalarValue, displayMode: 'LABELS_LEFT', label: this.label$, ...restProps, - readOnly: 'true' + readOnly: true } }, '', diff --git a/packages/angular-sdk-components/src/lib/_components/field/text-area/text-area.component.ts b/packages/angular-sdk-components/src/lib/_components/field/text-area/text-area.component.ts index ad7d97b4..3967f9b5 100644 --- a/packages/angular-sdk-components/src/lib/_components/field/text-area/text-area.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/field/text-area/text-area.component.ts @@ -107,8 +107,6 @@ export class TextAreaComponent implements OnInit, OnDestroy { if (this.configProps$.value != undefined) { this.value$ = this.configProps$.value; } - // @ts-ignore - Property 'getFieldMetadata' is private and only accessible within class 'C11nEnv'. - // @ts-ignore - Property 'getRawConfigProps' is private and only accessible within class 'C11nEnv' this.nMaxLength$ = this.pConn$.getFieldMetadata(this.pConn$.getRawConfigProps()?.value)?.maxLength || 100; this.testId = this.configProps$.testId; this.displayMode$ = this.configProps$.displayMode; diff --git a/packages/angular-sdk-components/src/lib/_components/infra/Containers/flow-container/flow-container.component.ts b/packages/angular-sdk-components/src/lib/_components/infra/Containers/flow-container/flow-container.component.ts index d77e964c..51cfd1aa 100644 --- a/packages/angular-sdk-components/src/lib/_components/infra/Containers/flow-container/flow-container.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/infra/Containers/flow-container/flow-container.component.ts @@ -179,7 +179,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy { } getTodoVisibilty() { - // @ts-ignore - second parameter pageReference for getValue method should be optional const caseViewMode = this.pConn$.getValue('context_data.caseViewMode'); if (caseViewMode && caseViewMode === 'review') { const kid = this.pConn$.getChildren()[0]; @@ -273,7 +272,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy { hasAssignments() { let hasAssignments = false; - // @ts-ignore - second parameter pageReference for getValue method should be optional const assignmentsList: any[] = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS); // const thisOperator = PCore.getEnvironmentInfo().getOperatorIdentifier(); // 8.7 includes assignments in Assignments List that may be assigned to @@ -308,9 +306,7 @@ export class FlowContainerComponent implements OnInit, OnDestroy { } isCaseWideLocalAction() { - // @ts-ignore - second parameter pageReference for getValue method should be optional const actionID = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.ACTIVE_ACTION_ID); - // @ts-ignore - second parameter pageReference for getValue method should be optional const caseActions = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.AVAILABLEACTIONS) as any[]; let bCaseWideAction = false; if (caseActions && actionID) { @@ -323,7 +319,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy { } hasChildCaseAssignments() { - // @ts-ignore - second parameter pageReference for getValue method should be optional const childCases = this.pConn$.getValue(this.pCoreConstants.CASE_INFO.CHILD_ASSIGNMENTS); return childCases && childCases.length > 0; @@ -334,9 +329,7 @@ export class FlowContainerComponent implements OnInit, OnDestroy { const { CASE_INFO: CASE_CONSTS } = PCore.getConstants(); - // @ts-ignore - second parameter pageReference for getValue method should be optional const caseActions = this.pConn$.getValue(CASE_CONSTS.CASE_INFO_ACTIONS) as any[]; - // @ts-ignore - second parameter pageReference for getValue method should be optional const activeActionID = this.pConn$.getValue(CASE_CONSTS.ACTIVE_ACTION_ID); const activeAction = caseActions?.find(action => action.ID === activeActionID); if (activeAction) { @@ -376,7 +369,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy { // const { getPConnect } = this.arChildren$[0].getPConnect(); const localPConn = this.arChildren$[0].getPConnect(); - // @ts-ignore - second parameter pageReference for getValue method should be optional const caseViewMode = this.pConn$.getValue('context_data.caseViewMode'); this.bShowBanner = showBanner(this.pConn$); @@ -430,7 +422,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy { const todoAssignments = getToDoAssignments(this.pConn$); if (todoAssignments && todoAssignments.length > 0) { - // @ts-ignore - second parameter pageReference for getValue method should be optional this.todo_caseInfoID$ = this.pConn$.getValue(CASE_CONSTS.CASE_INFO_ID); this.todo_datasource$ = { source: todoAssignments }; } @@ -458,7 +449,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy { } showCaseMessages() { - // @ts-ignore - second parameter pageReference for getValue method should be optional this.caseMessages$ = this.localizedVal(this.pConn$.getValue('caseMessages'), this.localeCategory); if (this.caseMessages$ || !this.hasAssignments()) { this.bHasCaseMessages$ = true; @@ -471,7 +461,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy { } // publish this "assignmentFinished" for mashup, need to get approved as a standard - // @ts-ignore - second parameter “payload” for publish method should be optional PCore.getPubSubUtils().publish('assignmentFinished'); this.psService.sendMessage(false); @@ -571,7 +560,6 @@ export class FlowContainerComponent implements OnInit, OnDestroy { this.psService.sendMessage(false); const oWorkItem = configObject.getPConnect(); - // @ts-ignore - parameter “contextName” for getDataObject method should be optional const oWorkData: any = oWorkItem.getDataObject(); this.containerName$ = this.localizedVal(this.getActiveViewLabel() || oWorkData.caseInfo.assignments?.[0].name, undefined, this.localeReference); diff --git a/packages/angular-sdk-components/src/lib/_components/infra/Containers/modal-view-container/modal-view-container.component.ts b/packages/angular-sdk-components/src/lib/_components/infra/Containers/modal-view-container/modal-view-container.component.ts index 11af1535..8407dfbb 100644 --- a/packages/angular-sdk-components/src/lib/_components/infra/Containers/modal-view-container/modal-view-container.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/infra/Containers/modal-view-container/modal-view-container.component.ts @@ -203,7 +203,6 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy { const configObject = this.getConfigObject(currentItem, this.pConn$); const newComp = configObject?.getPConnect(); // const newCompName = newComp.getComponentName(); - // @ts-ignore - parameter “contextName” for getDataObject method should be optional const caseInfo = newComp && newComp.getDataObject() && newComp.getDataObject().caseInfo ? newComp.getDataObject().caseInfo : null; // The metadata for pyDetails changed such that the "template": "CaseView" // is no longer a child of the created View but is in the created View's diff --git a/packages/angular-sdk-components/src/lib/_components/infra/Containers/view-container/view-container.component.ts b/packages/angular-sdk-components/src/lib/_components/infra/Containers/view-container/view-container.component.ts index 6c82e58c..c1f2d30d 100644 --- a/packages/angular-sdk-components/src/lib/_components/infra/Containers/view-container/view-container.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/infra/Containers/view-container/view-container.component.ts @@ -121,7 +121,6 @@ export class ViewContainerComponent implements OnInit, OnDestroy { } if (sessionStorage.getItem('hasViewContainer') == 'false') { - // @ts-ignore - Property 'getMetadata' is private and only accessible within class if (this.pConn$.getMetadata().children) { containerMgr.addContainerItem(this.dispatchObject); } diff --git a/packages/angular-sdk-components/src/lib/_components/infra/assignment/assignment.component.ts b/packages/angular-sdk-components/src/lib/_components/infra/assignment/assignment.component.ts index 571ad90e..f6d2f907 100644 --- a/packages/angular-sdk-components/src/lib/_components/infra/assignment/assignment.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/infra/assignment/assignment.component.ts @@ -357,8 +357,8 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges { savePromise .then(() => { + // @ts-ignore - Property 'c11nEnv' is private and only accessible within class 'CaseInfo'. const caseType = this.pConn$.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID); - // @ts-ignore - second parameter “payload” for publish method should be optional PCore.getPubSubUtils().publish('cancelPressed'); this.onSaveActionSuccess({ caseType, caseID, assignmentID }); }) @@ -373,12 +373,9 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges { case 'cancelAssignment': this.bReInit = true; this.erService.sendMessage('dismiss', ''); - // @ts-ignore - Property 'isAssignmentInCreateStage' is private and only accessible within class 'CaseInfo' const isAssignmentInCreateStage = this.pConn$.getCaseInfo().isAssignmentInCreateStage(); const isLocalAction = - // @ts-ignore - Property 'isLocalAction' is private and only accessible within class 'CaseInfo'. this.pConn$.getCaseInfo().isLocalAction() || - // @ts-ignore - second parameter pageReference for getValue method should be optional (PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION && this.pConn$.getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION)); // check if create stage (modal) if (isAssignmentInCreateStage && this.isInModal$ && !isLocalAction) { @@ -398,14 +395,12 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges { // publish before cancel pressed, because // cancel assignment happens "after" cancel assignment happens - // @ts-ignore - second parameter “payload” for publish method should be optional PCore.getPubSubUtils().publish('cancelPressed'); const cancelPromise = this.cancelAssignment(this.itemKey$); cancelPromise .then(() => { this.psService.sendMessage(false); - // @ts-ignore - second parameter “payload” for publish method should be optional PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL); }) .catch(() => { diff --git a/packages/angular-sdk-components/src/lib/_components/infra/dashboard-filter/dashboard-filter.component.ts b/packages/angular-sdk-components/src/lib/_components/infra/dashboard-filter/dashboard-filter.component.ts index 1b00184c..eaa0456a 100644 --- a/packages/angular-sdk-components/src/lib/_components/infra/dashboard-filter/dashboard-filter.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/infra/dashboard-filter/dashboard-filter.component.ts @@ -47,7 +47,6 @@ export class DashboardFilterComponent implements OnInit { clearFilters() { this.filtersFormGroup$.reset(); - // @ts-ignore - second parameter “payload” for publish method should be optional PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL); } diff --git a/packages/angular-sdk-components/src/lib/_components/infra/defer-load/defer-load.component.ts b/packages/angular-sdk-components/src/lib/_components/infra/defer-load/defer-load.component.ts index fc0f1b7b..1ca4b766 100644 --- a/packages/angular-sdk-components/src/lib/_components/infra/defer-load/defer-load.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/infra/defer-load/defer-load.component.ts @@ -57,7 +57,6 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges { onStateChange() { // Should always check the bridge to see if the component should // update itself (re-render) - // @ts-ignore - second parameter pageReference for getValue method should be optional const theRequestedAssignment = this.pConn$.getValue(PCore.getConstants().CASE_INFO.ASSIGNMENT_LABEL); if (theRequestedAssignment !== this.currentLoadedAssignment) { this.currentLoadedAssignment = theRequestedAssignment; @@ -66,7 +65,6 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges { } ngOnChanges() { - // @ts-ignore - second parameter pageReference for getValue method should be optional this.loadViewCaseID = this.pConn$.getValue(this.constants.PZINSKEY) || this.pConn$.getValue(this.constants.CASE_INFO.CASE_INFO_ID); let containerItemData; const targetName = this.pConn$.getTarget(); @@ -92,7 +90,6 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges { getViewOptions = () => ({ viewContext: this.resourceType, - // @ts-ignore - parameter “contextName” for getDataObject method should be optional pageClass: this.loadViewCaseID ? '' : this.pConn$.getDataObject().pyPortal.classID, container: this.isContainerPreview ? 'preview' : null, containerName: this.isContainerPreview ? 'preview' : null, @@ -139,9 +136,8 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges { this.pConn$ .getActionsApi() .showData(this.name, dataContext, dataContextParameters, { - // @ts-ignore - skipSemanticUrl should be boolean type skipSemanticUrl: true, - // @ts-ignore + // @ts-ignore - Object literal may only specify known properties, and 'isDeferLoaded' does not exist in type '{ containerName: string; skipSemanticUrl: boolean; }' isDeferLoaded: true }) .then(data => { @@ -162,7 +158,7 @@ export class DeferLoadComponent implements OnInit, OnDestroy, OnChanges { this.pConn$ .getActionsApi() .refreshCaseView(encodeURI(this.loadViewCaseID), this.name, '') - .then(data => { + .then((data: any) => { this.onResponse(data.root); }); } diff --git a/packages/angular-sdk-components/src/lib/_components/infra/navbar/navbar.component.ts b/packages/angular-sdk-components/src/lib/_components/infra/navbar/navbar.component.ts index 3ff9d05a..f8db86e9 100644 --- a/packages/angular-sdk-components/src/lib/_components/infra/navbar/navbar.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/infra/navbar/navbar.component.ts @@ -120,7 +120,6 @@ export class NavbarComponent implements OnInit, OnDestroy { this.navPages$.forEach(page => { page.iconName = this.utils.getImageSrc(page.pxPageViewIcon, this.utils.getSDKStaticContentUrl()); }); - // @ts-ignore - second parameter pageReference for getValue method should be optional this.localeReference = this.pConn$.getValue('.pyLocaleReference'); this.actionsAPI = this.pConn$.getActionsApi(); this.createWork = this.actionsAPI.createWork.bind(this.actionsAPI); diff --git a/packages/angular-sdk-components/src/lib/_components/template/case-view/case-view.component.ts b/packages/angular-sdk-components/src/lib/_components/template/case-view/case-view.component.ts index c2aeec2d..21f0d749 100644 --- a/packages/angular-sdk-components/src/lib/_components/template/case-view/case-view.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/template/case-view/case-view.component.ts @@ -106,9 +106,7 @@ export class CaseViewComponent implements OnInit, OnDestroy { } hasCaseIDChanged(): boolean { - // @ts-ignore - parameter “contextName” for getDataObject method should be optional if (this.currentCaseID !== this.pConn$.getDataObject().caseInfo.ID) { - // @ts-ignore - parameter “contextName” for getDataObject method should be optional this.currentCaseID = this.pConn$.getDataObject().caseInfo.ID; return true; } @@ -117,13 +115,11 @@ export class CaseViewComponent implements OnInit, OnDestroy { updateHeaderAndSummary() { this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as CaseViewProps; - // @ts-ignore - parameter “contextName” for getDataObject method should be optional const hasNewAttachments = this.pConn$.getDataObject().caseInfo?.hasNewAttachments; if (hasNewAttachments !== this.bHasNewAttachments) { this.bHasNewAttachments = hasNewAttachments; if (this.bHasNewAttachments) { - // @ts-ignore - Argument of type 'boolean' is not assignable to parameter of type 'object' PCore.getPubSubUtils().publish((PCore.getEvents().getCaseEvent() as any).CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW, true); } } @@ -142,7 +138,6 @@ export class CaseViewComponent implements OnInit, OnDestroy { this.heading$ = PCore.getLocaleUtils().getLocaleValue(this.configProps$.header, '', this.localeKey); this.id$ = this.configProps$.subheader; - // @ts-ignore - second parameter pageReference for getValue method should be optional this.status$ = this.pConn$.getValue('.pyStatusWork'); }); } @@ -158,7 +153,6 @@ export class CaseViewComponent implements OnInit, OnDestroy { this.arChildren$ = this.pConn$.getChildren() as any[]; - // @ts-ignore - parameter “contextName” for getDataObject method should be optional const caseInfo = this.pConn$.getDataObject().caseInfo; this.currentCaseID = caseInfo.ID; this.arAvailableActions$ = caseInfo?.availableActions ? caseInfo.availableActions : []; diff --git a/packages/angular-sdk-components/src/lib/_components/template/data-reference/data-reference.component.ts b/packages/angular-sdk-components/src/lib/_components/template/data-reference/data-reference.component.ts index 7116212e..48b25699 100644 --- a/packages/angular-sdk-components/src/lib/_components/template/data-reference/data-reference.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/template/data-reference/data-reference.component.ts @@ -176,10 +176,8 @@ export class DataReferenceComponent implements OnInit, OnDestroy { handleSelection(event) { const caseKey = this.pConn$.getCaseInfo().getKey(); const refreshOptions = { autoDetectRefresh: true }; - // @ts-ignore - second parameter pageReference for getValue method should be optional if (this.canBeChangedInReviewMode && this.pConn$.getValue('__currentPageTabViewName')) { - // @ts-ignore - second parameter pageReference for getValue method should be optional - this.pConn$.getActionsApi().refreshCaseView(caseKey, this.pConn$.getValue('__currentPageTabViewName'), null, refreshOptions); + this.pConn$.getActionsApi().refreshCaseView(caseKey, this.pConn$.getValue('__currentPageTabViewName'), '', refreshOptions); PCore.getDeferLoadManager().refreshActiveComponents(this.pConn$.getContextName()); } else { const pgRef = this.pConn$.getPageReference().replace('caseInfo.content', ''); diff --git a/packages/angular-sdk-components/src/lib/_components/template/dynamic-tabs/dynamic-tabs.component.ts b/packages/angular-sdk-components/src/lib/_components/template/dynamic-tabs/dynamic-tabs.component.ts index 5284caa0..a7e07b12 100644 --- a/packages/angular-sdk-components/src/lib/_components/template/dynamic-tabs/dynamic-tabs.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/template/dynamic-tabs/dynamic-tabs.component.ts @@ -56,7 +56,6 @@ export class DynamicTabsComponent implements OnInit, OnDestroy { updateSelf() { const { referenceList } = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as DynamicTabsProps; - // @ts-ignore - Property 'getComponentConfig' is private and only accessible within class 'C11nEnv' const { tablabel } = this.pConn$.getComponentConfig(); const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel); diff --git a/packages/angular-sdk-components/src/lib/_components/template/field-group-template/field-group-template.component.ts b/packages/angular-sdk-components/src/lib/_components/template/field-group-template/field-group-template.component.ts index 0779f1de..45368d76 100644 --- a/packages/angular-sdk-components/src/lib/_components/template/field-group-template/field-group-template.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/template/field-group-template/field-group-template.component.ts @@ -149,20 +149,12 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges }; addFieldGroupItem() { - if (PCore.getPCoreVersion()?.includes('8.7')) { - this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length, this.pageReference); - } else { - // @ts-ignore - second parameter "pageRef" is optional for insert method - this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length); - } + // @ts-ignore - second parameter "pageRef" is optional for insert method + this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length); } deleteFieldGroupItem(index) { - if (PCore.getPCoreVersion()?.includes('8.7')) { - this.pConn$.getListActions().deleteEntry(index, this.pageReference); - } else { - // @ts-ignore - second parameter "pageRef" is optional for deleteEntry method - this.pConn$.getListActions().deleteEntry(index); - } + // @ts-ignore - second parameter "pageRef" is optional for deleteEntry method + this.pConn$.getListActions().deleteEntry(index); } } diff --git a/packages/angular-sdk-components/src/lib/_components/template/list-view/list-view.component.ts b/packages/angular-sdk-components/src/lib/_components/template/list-view/list-view.component.ts index c43c4c98..5ebf1b82 100644 --- a/packages/angular-sdk-components/src/lib/_components/template/list-view/list-view.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/template/list-view/list-view.component.ts @@ -358,7 +358,6 @@ export class ListViewComponent implements OnInit, OnDestroy { } getListData() { - // @ts-ignore - Property 'getComponentConfig' is private and only accessible within class 'C11nEnv' const componentConfig = this.pConn$.getComponentConfig(); if (this.configProps$) { this.preparePayload(); @@ -369,8 +368,7 @@ export class ListViewComponent implements OnInit, OnDestroy { const dataViewParameters = this.payload.parameters; const workListDataPromise = !this.bInForm$ - ? // @ts-ignore - 3rd parameter "context" should be optional in getData method - PCore.getDataApiUtils().getData(refList, payload) + ? PCore.getDataApiUtils().getData(refList, payload) : PCore.getDataPageUtils().getDataAsync( refList, this.pConn$.getContextName(), @@ -614,7 +612,7 @@ export class ListViewComponent implements OnInit, OnDestroy { this.pConn$.getActionsApi().openAssignment(pzInsKey, pxObjClass, { containerName: 'primary', channelName: '' - }); + } as any); } else { this.pConn$.getActionsApi().openWorkByHandle(pzInsKey, pxObjClass); } diff --git a/packages/angular-sdk-components/src/lib/_components/template/list-view/listViewHelpers.ts b/packages/angular-sdk-components/src/lib/_components/template/list-view/listViewHelpers.ts index 3efc0c9b..422e9cf6 100644 --- a/packages/angular-sdk-components/src/lib/_components/template/list-view/listViewHelpers.ts +++ b/packages/angular-sdk-components/src/lib/_components/template/list-view/listViewHelpers.ts @@ -25,7 +25,6 @@ export function useInit(props) { let selectionCountThreshold; // promise to fetch metadata - // @ts-ignore - 3rd parameter "associationFilter" should be optional for getDataViewMetadata method const metaDataPromise = PCore.getAnalyticsUtils().getDataViewMetadata(referenceList, showDynamicFields); const promisesArray = [metaDataPromise]; diff --git a/packages/angular-sdk-components/src/lib/_components/template/repeating-structures/repeating-structures.component.ts b/packages/angular-sdk-components/src/lib/_components/template/repeating-structures/repeating-structures.component.ts index 923683ad..ad79be50 100644 --- a/packages/angular-sdk-components/src/lib/_components/template/repeating-structures/repeating-structures.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/template/repeating-structures/repeating-structures.component.ts @@ -41,8 +41,7 @@ export class RepeatingStructuresComponent implements OnInit, AfterViewInit { this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()); this.fields$ = this.initializeColumns(componentConfig.fields); - const refList = this.configProps$.referenceList; - // @ts-ignore - second parameter pageReference for getValue method should be optional + const refList: any = this.configProps$.referenceList; const tableDataResults = JSON.parse(JSON.stringify(this.pConn$.getValue(refList))); // update elements like date format diff --git a/packages/angular-sdk-components/src/lib/_components/template/simple-table-manual/simple-table-manual.component.ts b/packages/angular-sdk-components/src/lib/_components/template/simple-table-manual/simple-table-manual.component.ts index 2e9461a1..52099af7 100644 --- a/packages/angular-sdk-components/src/lib/_components/template/simple-table-manual/simple-table-manual.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/template/simple-table-manual/simple-table-manual.component.ts @@ -249,10 +249,8 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy { let { contextClass } = this.configProps$; this.referenceList = referenceList; if (!contextClass) { - // @ts-ignore - Property 'getComponentConfig' is private and only accessible within class 'C11nEnv' let listName = this.pConn$.getComponentConfig().referenceList; listName = PCore.getAnnotationUtils().getPropertyName(listName); - // @ts-ignore - Property 'getFieldMetadata' is private and only accessible within class 'C11nEnv' contextClass = this.pConn$.getFieldMetadata(listName)?.pageClass; } this.contextClass = contextClass; @@ -357,12 +355,13 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy { if (this.isInitialized) { this.isInitialized = false; if (this.allowEditingInModal) { + // @ts-ignore - An argument for 'uniqueField' was not provided. 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 + // @ts-ignore - An argument for 'propertyNames' was not provided. this.pConn$.getListActions().initDefaultPageInstructions(this.pConn$.getReferenceList()); } } @@ -949,12 +948,8 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy { } deleteRecord(index) { - if (PCore.getPCoreVersion()?.includes('8.7')) { - this.pConn$.getListActions().deleteEntry(index, this.pageReference); - } else { - // @ts-ignore - second parameter "pageRef" is optional for deleteEntry method - this.pConn$.getListActions().deleteEntry(index); - } + // @ts-ignore - second parameter "pageRef" is optional for deleteEntry method + this.pConn$.getListActions().deleteEntry(index); } buildElementsForTable() { diff --git a/packages/angular-sdk-components/src/lib/_components/template/simple-table-select/simple-table-select.component.ts b/packages/angular-sdk-components/src/lib/_components/template/simple-table-select/simple-table-select.component.ts index 5dd29988..39885c69 100644 --- a/packages/angular-sdk-components/src/lib/_components/template/simple-table-select/simple-table-select.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/template/simple-table-select/simple-table-select.component.ts @@ -85,10 +85,8 @@ export class SimpleTableSelectComponent implements OnInit, OnDestroy { contextPageReference = pageReference.concat('.').concat(referenceProp); } const metadata = isMultiSelectMode - ? // @ts-ignore - Property 'getFieldMetadata' is private and only accessible within class 'C11nEnv' - this.pConn$.getFieldMetadata(`@P .${referenceProp}`) - : // @ts-ignore - Property 'getCurrentPageFieldMetadata' is private and only accessible within class 'C11nEnv' - this.pConn$.getCurrentPageFieldMetadata(contextPageReference); + ? this.pConn$.getFieldMetadata(`@P .${referenceProp}`) + : this.pConn$.getCurrentPageFieldMetadata(contextPageReference); const { datasource: { parameters: fieldParameters = {} } = {}, pageClass } = metadata; diff --git a/packages/angular-sdk-components/src/lib/_components/template/simple-table/simple-table.component.ts b/packages/angular-sdk-components/src/lib/_components/template/simple-table/simple-table.component.ts index 36022a60..8f0d5ffd 100644 --- a/packages/angular-sdk-components/src/lib/_components/template/simple-table/simple-table.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/template/simple-table/simple-table.component.ts @@ -87,10 +87,8 @@ export class SimpleTableComponent implements OnInit, OnDestroy { const { multiRecordDisplayAs } = this.configProps$; let { contextClass } = this.configProps$; if (!contextClass) { - // @ts-ignore - Property 'getComponentConfig' is private and only accessible within class 'C11nEnv' let listName = this.pConn$.getComponentConfig().referenceList; listName = PCore.getAnnotationUtils().getPropertyName(listName); - // @ts-ignore - Property 'getFieldMetadata' is private and only accessible within class 'C11nEnv' contextClass = this.pConn$.getFieldMetadata(listName)?.pageClass; } if (multiRecordDisplayAs === 'fieldGroup') { diff --git a/packages/angular-sdk-components/src/lib/_components/widget/attachment/attachment.component.ts b/packages/angular-sdk-components/src/lib/_components/widget/attachment/attachment.component.ts index d4cd3d8c..0fefe34d 100644 --- a/packages/angular-sdk-components/src/lib/_components/widget/attachment/attachment.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/widget/attachment/attachment.component.ts @@ -320,7 +320,6 @@ export class AttachmentComponent implements OnInit, OnDestroy { const fieldName = (this.pConn$.getStateProps() as any).value; const context = this.pConn$.getContextName(); PCore.getMessageManager().addMessages({ - // @ts-ignore messages: [ { type: 'error', @@ -351,7 +350,6 @@ export class AttachmentComponent implements OnInit, OnDestroy { clearFieldErrorMessages() { const fieldName = (this.pConn$.getStateProps() as any).value; const context = this.pConn$.getContextName(); - // @ts-ignore PCore.getMessageManager().clearMessages({ type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR, property: fieldName, @@ -382,7 +380,6 @@ export class AttachmentComponent implements OnInit, OnDestroy { const context = this.pConn$.getContextName(); // set errors to property to block submit even on errors in file upload PCore.getMessageManager().addMessages({ - // @ts-ignore messages: [ { type: 'error', diff --git a/packages/angular-sdk-components/src/lib/_components/widget/case-history/case-history.component.ts b/packages/angular-sdk-components/src/lib/_components/widget/case-history/case-history.component.ts index 3d4d6666..1fbd1dae 100644 --- a/packages/angular-sdk-components/src/lib/_components/widget/case-history/case-history.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/widget/case-history/case-history.component.ts @@ -29,7 +29,6 @@ export class CaseHistoryComponent implements OnInit { ngOnInit(): void { this.configProps$ = this.pConn$.getConfigProps(); - // @ts-ignore - second parameter pageReference for getValue method should be optional const caseID = this.pConn$.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID); const dataViewName = 'D_pyWorkHistory'; const context = this.pConn$.getContextName(); diff --git a/packages/angular-sdk-components/src/lib/_components/widget/feed-container/feed-container.component.ts b/packages/angular-sdk-components/src/lib/_components/widget/feed-container/feed-container.component.ts index accf96f0..7c093ab4 100644 --- a/packages/angular-sdk-components/src/lib/_components/widget/feed-container/feed-container.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/widget/feed-container/feed-container.component.ts @@ -387,7 +387,6 @@ export class FeedContainerComponent implements OnInit, OnDestroy { if (bUpdateSelf) { this.updateSelf(); } else { - // @ts-ignore - parameter “contextName” for getDataObject method should be optional const newPulseData = this.pConn$.getDataObject().pulse; if (!isEqual(newPulseData, this.pulseData)) { @@ -395,7 +394,6 @@ export class FeedContainerComponent implements OnInit, OnDestroy { } } - // @ts-ignore - parameter “contextName” for getDataObject method should be optional this.pulseData = this.pConn$.getDataObject().pulse; } @@ -406,10 +404,8 @@ export class FeedContainerComponent implements OnInit, OnDestroy { getMessageData() { const messageIDs = (this.pConn$.getConfigProps() as any).messageIDs; const userName = (this.pConn$.getConfigProps() as any).currentUser; - // @ts-ignore - second parameter pageReference for getValue method should be optional const imageKey = this.pConn$.getValue('OperatorID.pyImageInsKey'); - // @ts-ignore - parameter “contextName” for getDataObject method should be optional const oData: any = this.pConn$.getDataObject(); if (messageIDs && messageIDs.length > 0) { diff --git a/packages/angular-sdk-components/src/lib/_components/widget/file-utility/file-utility.component.ts b/packages/angular-sdk-components/src/lib/_components/widget/file-utility/file-utility.component.ts index cde074d9..40bb6c7b 100644 --- a/packages/angular-sdk-components/src/lib/_components/widget/file-utility/file-utility.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/widget/file-utility/file-utility.component.ts @@ -142,7 +142,6 @@ export class FileUtilityComponent implements OnInit, OnDestroy { onAttachFiles(files) { const attachmentUtils = PCore.getAttachmentUtils(); - // @ts-ignore - second parameter pageReference for getValue method should be optional const caseID = this.pConn$.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID); if (files.length > 0) { @@ -185,7 +184,6 @@ export class FileUtilityComponent implements OnInit, OnDestroy { onAttachLinks(links) { const attachmentUtils = PCore.getAttachmentUtils(); - // @ts-ignore - second parameter pageReference for getValue method should be optional const caseID = this.pConn$.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID); if (links.length > 0) { @@ -711,7 +709,6 @@ export class FileUtilityComponent implements OnInit, OnDestroy { } getCaseID() { - // @ts-ignore - second parameter pageReference for getValue method should be optional return this.pConn$.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID) || ''; } @@ -760,7 +757,6 @@ export class FileUtilityComponent implements OnInit, OnDestroy { } caseHasChanged(): boolean { - // @ts-ignore - second parameter pageReference for getValue method should be optional const caseID = this.pConn$.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID); if (this.currentCaseID !== caseID) { this.currentCaseID = caseID; diff --git a/packages/angular-sdk-components/src/lib/_components/widget/quick-create/quick-create.component.ts b/packages/angular-sdk-components/src/lib/_components/widget/quick-create/quick-create.component.ts index 1d17c725..b85deaa5 100644 --- a/packages/angular-sdk-components/src/lib/_components/widget/quick-create/quick-create.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/widget/quick-create/quick-create.component.ts @@ -56,7 +56,7 @@ export class QuickCreateComponent implements OnInit, OnChanges { this.classFilter$.forEach(item => { let icon = this.utils.getImageSrc('polaris-solid', this.utils.getSDKStaticContentUrl()); let label = ''; - envInfo.environmentInfoObject.pyCaseTypeList.forEach(casetype => { + (envInfo.environmentInfoObject as any).pyCaseTypeList.forEach(casetype => { if (casetype.pyWorkTypeImplementationClassName === item) { icon = casetype.pxIcon && this.utils.getImageSrc(casetype?.pxIcon, this.utils.getSDKStaticContentUrl()); label = casetype.pyWorkTypeName ?? ''; diff --git a/packages/angular-sdk-components/src/lib/_components/widget/todo/todo.component.ts b/packages/angular-sdk-components/src/lib/_components/widget/todo/todo.component.ts index 90b089c4..c46db93e 100644 --- a/packages/angular-sdk-components/src/lib/_components/widget/todo/todo.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/widget/todo/todo.component.ts @@ -105,11 +105,9 @@ export class TodoComponent implements OnInit, OnDestroy, OnChanges { } updateWorkList(key) { - ( - PCore.getDataApiUtils() - // @ts-ignore - 2nd parameter "payload" and 3rd parameter "context" should be optional in getData method - .getData(key) as Promise - ) + PCore.getDataApiUtils() + // @ts-ignore - 2nd parameter "payload" and 3rd parameter "context" should be optional in getData method + .getData(key) .then(responseData => { const dataObject = {}; dataObject[key] = { diff --git a/projects/angular-test-app/src/app/_samples/embedded/main-screen/main-screen.component.ts b/projects/angular-test-app/src/app/_samples/embedded/main-screen/main-screen.component.ts index ba68aa08..2286a761 100644 --- a/projects/angular-test-app/src/app/_samples/embedded/main-screen/main-screen.component.ts +++ b/projects/angular-test-app/src/app/_samples/embedded/main-screen/main-screen.component.ts @@ -107,7 +107,7 @@ export class MainScreenComponent implements OnInit, OnDestroy { this.scservice.getSdkConfig().then(sdkConfig => { let mashupCaseType = sdkConfig.serverConfig.appMashupCaseType; if (!mashupCaseType) { - const caseTypes = PCore.getEnvironmentInfo().environmentInfoObject.pyCaseTypeList; + const caseTypes = (PCore.getEnvironmentInfo().environmentInfoObject as any).pyCaseTypeList; mashupCaseType = caseTypes[0].pyWorkTypeImplementationClassName; } diff --git a/projects/angular-test-app/src/app/_samples/simple-portal/side-bar/side-bar.component.ts b/projects/angular-test-app/src/app/_samples/simple-portal/side-bar/side-bar.component.ts index b8f3ac64..ca4c902b 100644 --- a/projects/angular-test-app/src/app/_samples/simple-portal/side-bar/side-bar.component.ts +++ b/projects/angular-test-app/src/app/_samples/simple-portal/side-bar/side-bar.component.ts @@ -110,7 +110,6 @@ export class SideBarComponent implements OnInit, OnDestroy { this.psservice.sendMessage(true); - // @ts-ignore - second parameter “payload” for publish method should be optional PCore.getPubSubUtils().publish('showWork'); createWork(oButtonData.caseTypeID, actionInfo); @@ -128,7 +127,6 @@ export class SideBarComponent implements OnInit, OnDestroy { this.psservice.sendMessage(true); - // @ts-ignore - second parameter “payload” for publish method should be optional PCore.getPubSubUtils().publish('showWork'); openAssignment(pzInsKey, pxRefObjectClass, options).then(() => {});