@pega/angular-sdk-overrides 23.1.10 → 24.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/designSystemExtension/alert-banner/alert-banner.component.ts +1 -1
- package/lib/designSystemExtension/case-create-stage/case-create-stage.component.ts +1 -1
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html +7 -4
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +2 -1
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +3 -1
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +1 -1
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +4 -1
- package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.html +1 -1
- package/lib/designSystemExtension/operator/operator.component.ts +11 -6
- package/lib/designSystemExtension/pulse/pulse.component.ts +7 -7
- package/lib/field/auto-complete/auto-complete.component.ts +17 -14
- package/lib/field/cancel-alert/cancel-alert.component.ts +0 -2
- package/lib/field/check-box/check-box.component.html +16 -15
- package/lib/field/check-box/check-box.component.scss +14 -1
- package/lib/field/check-box/check-box.component.ts +128 -45
- package/lib/field/currency/currency.component.html +16 -7
- package/lib/field/currency/currency.component.ts +55 -20
- package/lib/field/date/date.component.html +1 -6
- package/lib/field/date/date.component.ts +22 -39
- package/lib/field/date-time/date-time.component.html +6 -7
- package/lib/field/date-time/date-time.component.ts +28 -45
- package/lib/field/decimal/decimal.component.html +14 -4
- package/lib/field/decimal/decimal.component.ts +47 -7
- package/lib/field/dropdown/dropdown.component.ts +132 -21
- package/lib/field/email/email.component.ts +14 -4
- package/lib/field/group/group.component.html +1 -1
- package/lib/field/group/group.component.ts +6 -2
- package/lib/field/integer/integer.component.html +1 -1
- package/lib/field/integer/integer.component.ts +13 -5
- package/lib/field/multiselect/multiselect.component.html +33 -0
- package/lib/field/multiselect/multiselect.component.scss +7 -0
- package/lib/field/multiselect/multiselect.component.spec.ts +21 -0
- package/lib/field/multiselect/multiselect.component.ts +369 -0
- package/lib/field/multiselect/utils.ts +209 -0
- package/lib/field/percentage/percentage.component.html +17 -6
- package/lib/field/percentage/percentage.component.ts +51 -12
- package/lib/field/phone/phone.component.html +1 -1
- package/lib/field/phone/phone.component.ts +11 -14
- package/lib/field/radio-buttons/radio-buttons.component.ts +9 -12
- package/lib/field/rich-text/config-ext.json +10 -0
- package/lib/field/rich-text/rich-text.component.html +1 -1
- package/lib/field/rich-text/rich-text.component.ts +8 -6
- package/lib/field/scalar-list/scalar-list.component.ts +4 -4
- package/lib/field/text/text.component.ts +2 -0
- package/lib/field/text-area/text-area.component.html +2 -1
- package/lib/field/text-area/text-area.component.ts +13 -8
- package/lib/field/text-input/text-input.component.html +1 -1
- package/lib/field/text-input/text-input.component.ts +13 -5
- package/lib/field/time/time.component.html +3 -2
- package/lib/field/time/time.component.ts +23 -7
- package/lib/field/url/url.component.html +2 -1
- package/lib/field/url/url.component.ts +15 -5
- package/lib/field/user-reference/user-reference.component.html +42 -45
- package/lib/field/user-reference/user-reference.component.ts +73 -27
- package/lib/infra/Containers/base-components/flow-container-base.component.ts +22 -0
- package/lib/infra/Containers/base-components/helper.ts +89 -0
- package/lib/infra/Containers/flow-container/flow-container.component.html +9 -4
- package/lib/infra/Containers/flow-container/flow-container.component.ts +38 -33
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +41 -9
- package/lib/infra/Containers/preview-view-container/preview-view-container.component.ts +1 -1
- package/lib/infra/Containers/view-container/helper.ts +22 -0
- package/lib/infra/Containers/view-container/view-container.component.ts +5 -18
- package/lib/infra/assignment/assignment.component.ts +37 -39
- package/lib/infra/dashboard-filter/dashboard-filter.component.ts +0 -1
- package/lib/infra/defer-load/defer-load.component.ts +9 -12
- package/lib/infra/multi-step/multi-step.component.html +1 -1
- package/lib/infra/multi-step/multi-step.component.scss +1 -0
- package/lib/infra/navbar/navbar.component.html +4 -4
- package/lib/infra/navbar/navbar.component.ts +9 -6
- package/lib/infra/root-container/root-container.component.ts +3 -3
- package/lib/infra/stages/stages.component.scss +2 -2
- package/lib/infra/view/view.component.html +7 -20
- package/lib/infra/view/view.component.ts +21 -3
- package/lib/template/app-shell/app-shell.component.ts +20 -2
- package/lib/template/banner-page/config-ext.json +9 -0
- package/lib/template/base/details-template-base.ts +67 -0
- package/lib/template/base/form-template-base.ts +10 -0
- package/lib/template/case-summary/case-summary.component.ts +38 -4
- package/lib/template/case-view/case-view.component.html +7 -7
- package/lib/template/case-view/case-view.component.scss +2 -0
- package/lib/template/case-view/case-view.component.ts +8 -19
- package/lib/template/confirmation/confirmation.component.ts +1 -1
- package/lib/template/data-reference/data-reference.component.ts +37 -43
- package/lib/template/default-form/default-form.component.html +0 -4
- package/lib/template/default-form/default-form.component.ts +7 -23
- package/lib/template/details/details.component.ts +7 -41
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +6 -39
- package/lib/template/details-one-column/details-one-column.component.ts +7 -42
- package/lib/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
- package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
- package/lib/template/details-three-column/details-three-column.component.ts +7 -43
- package/lib/template/details-two-column/details-two-column.component.ts +8 -44
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +7 -42
- package/lib/template/dynamic-tabs/dynamic-tabs.component.html +3 -0
- package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +8 -4
- package/lib/template/field-group-template/field-group-template.component.ts +4 -14
- package/lib/template/field-value-list/field-value-list.component.html +8 -3
- package/lib/template/field-value-list/field-value-list.component.scss +2 -1
- package/lib/template/field-value-list/field-value-list.component.ts +1 -0
- package/lib/template/inline-dashboard-page/config-ext.json +9 -0
- package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -2
- package/lib/template/list-view/list-view.component.html +9 -6
- package/lib/template/list-view/list-view.component.scss +11 -0
- package/lib/template/list-view/list-view.component.ts +60 -32
- package/lib/template/list-view/listViewHelpers.ts +1 -2
- package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +1 -1
- package/lib/template/one-column/one-column.component.ts +4 -3
- package/lib/template/one-column-tab/one-column-tab.component.ts +1 -1
- package/lib/template/page/page.component.ts +1 -1
- package/lib/template/promoted-filters/promoted-filters.component.ts +1 -1
- package/lib/template/repeating-structures/repeating-structures.component.ts +2 -3
- package/lib/template/simple-table/simple-table.component.ts +0 -2
- package/lib/template/simple-table-manual/helpers.ts +2 -2
- package/lib/template/simple-table-manual/simple-table-manual.component.html +1 -1
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +1 -0
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +60 -28
- package/lib/template/simple-table-select/simple-table-select.component.ts +5 -7
- package/lib/template/three-column/three-column.component.ts +4 -3
- package/lib/template/two-column/two-column.component.ts +4 -3
- package/lib/template/two-column-tab/two-column-tab.component.ts +1 -1
- package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +4 -3
- package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +1 -1
- package/lib/template/wss-nav-bar/wss-nav-bar.component.html +1 -1
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +5 -4
- package/lib/widget/attachment/attachment.component.html +50 -26
- package/lib/widget/attachment/attachment.component.scss +118 -0
- package/lib/widget/attachment/attachment.component.ts +256 -503
- package/lib/widget/case-history/case-history.component.ts +1 -2
- package/lib/widget/feed-container/feed-container.component.ts +7 -11
- package/lib/widget/file-utility/file-utility.component.html +2 -2
- package/lib/widget/file-utility/file-utility.component.ts +15 -22
- package/lib/widget/list-utility/list-utility.component.html +1 -1
- package/lib/widget/quick-create/config-ext.json +9 -0
- package/lib/widget/quick-create/quick-create.component.ts +1 -1
- package/lib/widget/todo/todo.component.html +8 -7
- package/lib/widget/todo/todo.component.ts +97 -86
- package/package.json +1 -1
|
@@ -45,19 +45,18 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
45
45
|
ngOnInit(): void {
|
|
46
46
|
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
47
47
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
48
|
-
this.children = this.pConn$.getChildren()
|
|
48
|
+
this.children = this.pConn$.getChildren();
|
|
49
49
|
this.updateSelf();
|
|
50
50
|
if (this.firstChildMeta?.type === 'Dropdown' && this.rawViewMetadata.config?.parameters) {
|
|
51
51
|
const { value, key, text } = this.firstChildMeta.config.datasource.fields;
|
|
52
|
-
(
|
|
53
|
-
|
|
52
|
+
PCore.getDataApiUtils()
|
|
53
|
+
.getData(
|
|
54
54
|
this.refList,
|
|
55
55
|
{
|
|
56
56
|
dataViewParameters: this.parameters
|
|
57
|
-
}
|
|
57
|
+
},
|
|
58
58
|
''
|
|
59
|
-
)
|
|
60
|
-
)
|
|
59
|
+
)
|
|
61
60
|
.then(res => {
|
|
62
61
|
if (res.data.data !== null) {
|
|
63
62
|
const ddDataSource = res.data.data
|
|
@@ -103,7 +102,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
103
102
|
|
|
104
103
|
updateSelf() {
|
|
105
104
|
// Update properties based on configProps
|
|
106
|
-
const theConfigProps
|
|
105
|
+
const theConfigProps = this.pConn$.getConfigProps();
|
|
107
106
|
this.updatePropertiesFromProps(theConfigProps);
|
|
108
107
|
|
|
109
108
|
const displayAs = theConfigProps.displayAs;
|
|
@@ -114,7 +113,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
114
113
|
this.refList = this.rawViewMetadata.config.referenceList;
|
|
115
114
|
this.canBeChangedInReviewMode = theConfigProps.allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');
|
|
116
115
|
// this.childrenToRender = this.children;
|
|
117
|
-
this.isDisplayModeEnabled = ['
|
|
116
|
+
this.isDisplayModeEnabled = ['DISPLAY_ONLY', 'STACKED_LARGE_VAL'].includes(displayMode);
|
|
118
117
|
|
|
119
118
|
if (this.firstChildMeta?.type !== 'Region') {
|
|
120
119
|
this.firstChildPConnect = this.pConn$.getChildren()[0].getPConnect;
|
|
@@ -176,10 +175,8 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
176
175
|
handleSelection(event) {
|
|
177
176
|
const caseKey = this.pConn$.getCaseInfo().getKey();
|
|
178
177
|
const refreshOptions = { autoDetectRefresh: true };
|
|
179
|
-
// @ts-ignore - second parameter pageReference for getValue method should be optional
|
|
180
178
|
if (this.canBeChangedInReviewMode && this.pConn$.getValue('__currentPageTabViewName')) {
|
|
181
|
-
|
|
182
|
-
this.pConn$.getActionsApi().refreshCaseView(caseKey, this.pConn$.getValue('__currentPageTabViewName'), null, refreshOptions);
|
|
179
|
+
this.pConn$.getActionsApi().refreshCaseView(caseKey, this.pConn$.getValue('__currentPageTabViewName'), '', refreshOptions);
|
|
183
180
|
PCore.getDeferLoadManager().refreshActiveComponents(this.pConn$.getContextName());
|
|
184
181
|
} else {
|
|
185
182
|
const pgRef = this.pConn$.getPageReference().replace('caseInfo.content', '');
|
|
@@ -189,41 +186,38 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
189
186
|
// AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value
|
|
190
187
|
const propValue = event?.id || event?.target?.value;
|
|
191
188
|
if (propValue && this.canBeChangedInReviewMode && this.isDisplayModeEnabled) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
189
|
+
PCore.getDataApiUtils()
|
|
190
|
+
.getCaseEditLock(caseKey, '')
|
|
191
|
+
.then(caseResponse => {
|
|
192
|
+
const pageTokens = this.pConn$.getPageReference().replace('caseInfo.content', '').split('.');
|
|
193
|
+
let curr = {};
|
|
194
|
+
const commitData = curr;
|
|
196
195
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
196
|
+
pageTokens.forEach(el => {
|
|
197
|
+
if (el !== '') {
|
|
198
|
+
curr[el] = {};
|
|
199
|
+
curr = curr[el];
|
|
200
|
+
}
|
|
201
|
+
});
|
|
203
202
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
203
|
+
// expecting format like {Customer: {pyID:"C-100"}}
|
|
204
|
+
const propArr = this.propName.split('.');
|
|
205
|
+
propArr.forEach((element, idx) => {
|
|
206
|
+
if (idx + 1 === propArr.length) {
|
|
207
|
+
curr[element] = propValue;
|
|
208
|
+
} else {
|
|
209
|
+
curr[element] = {};
|
|
210
|
+
curr = curr[element];
|
|
211
|
+
}
|
|
212
|
+
});
|
|
214
213
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
) as Promise<any>
|
|
222
|
-
).then(response => {
|
|
223
|
-
PCore.getContainerUtils().updateParentLastUpdateTime(this.pConn$.getContextName(), response.data.data.caseInfo.lastUpdateTime);
|
|
224
|
-
PCore.getContainerUtils().updateRelatedContextEtag(this.pConn$.getContextName(), response.headers.etag);
|
|
214
|
+
PCore.getCaseUtils()
|
|
215
|
+
.updateCaseEditFieldsData(caseKey, { [caseKey]: commitData }, caseResponse.headers.etag, this.pConn$.getContextName())
|
|
216
|
+
.then(response => {
|
|
217
|
+
PCore.getContainerUtils().updateParentLastUpdateTime(this.pConn$.getContextName(), response.data.data.caseInfo.lastUpdateTime);
|
|
218
|
+
PCore.getContainerUtils().updateRelatedContextEtag(this.pConn$.getContextName(), response.headers.etag);
|
|
219
|
+
});
|
|
225
220
|
});
|
|
226
|
-
});
|
|
227
221
|
}
|
|
228
222
|
}
|
|
229
223
|
|
|
@@ -237,7 +231,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
237
231
|
property: this.propName,
|
|
238
232
|
category: '',
|
|
239
233
|
context: ''
|
|
240
|
-
}
|
|
234
|
+
});
|
|
241
235
|
if (!this.canBeChangedInReviewMode && this.isDisplayModeEnabled && this.selectionMode === SELECTION_MODE.SINGLE) {
|
|
242
236
|
this.displaySingleRef = true;
|
|
243
237
|
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
<!-- When adding a component here, add the same component in 'region' template as well -->
|
|
2
|
-
<div *ngIf="!NO_HEADER_TEMPLATES.includes(template) && showLabel">
|
|
3
|
-
<div class="template-title-container">{{ label }}</div>
|
|
4
|
-
</div>
|
|
5
1
|
<div *ngIf="instructions" class="psdk-default-form-instruction-text">
|
|
6
2
|
<div key="instructions" id="instruction-text" [innerHTML]="instructions"></div>
|
|
7
3
|
</div>
|
|
@@ -4,11 +4,11 @@ import { FormGroup } from '@angular/forms';
|
|
|
4
4
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
5
5
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
6
6
|
import { TemplateUtils } from '@pega/angular-sdk-components';
|
|
7
|
+
import { FormTemplateBase } from '@pega/angular-sdk-components';
|
|
7
8
|
|
|
8
9
|
interface DefaultFormProps {
|
|
9
10
|
// If any, enter additional props that only exist on this component
|
|
10
11
|
NumCols: string;
|
|
11
|
-
template: string;
|
|
12
12
|
instructions: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -19,37 +19,21 @@ interface DefaultFormProps {
|
|
|
19
19
|
standalone: true,
|
|
20
20
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
21
21
|
})
|
|
22
|
-
export class DefaultFormComponent implements OnInit {
|
|
23
|
-
@Input() pConn$: typeof PConnect;
|
|
22
|
+
export class DefaultFormComponent extends FormTemplateBase implements OnInit {
|
|
23
|
+
@Input() override pConn$: typeof PConnect;
|
|
24
24
|
@Input() formGroup$: FormGroup;
|
|
25
25
|
|
|
26
26
|
arChildren$: any[];
|
|
27
27
|
divClass$: string;
|
|
28
|
-
template: any;
|
|
29
|
-
showLabel: any;
|
|
30
|
-
label: any;
|
|
31
28
|
instructions: string;
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
'Details',
|
|
37
|
-
'DetailsTwoColumn',
|
|
38
|
-
'DetailsThreeColumn',
|
|
39
|
-
'NarrowWideDetails',
|
|
40
|
-
'WideNarrowDetails',
|
|
41
|
-
'Confirmation'
|
|
42
|
-
];
|
|
43
|
-
|
|
44
|
-
constructor(private templateUtils: TemplateUtils) {}
|
|
30
|
+
constructor(private templateUtils: TemplateUtils) {
|
|
31
|
+
super();
|
|
32
|
+
}
|
|
45
33
|
|
|
46
34
|
ngOnInit(): void {
|
|
47
35
|
const configProps = this.pConn$.getConfigProps() as DefaultFormProps;
|
|
48
|
-
|
|
49
|
-
const propToUse: any = { ...this.pConn$.getInheritedProps() };
|
|
50
|
-
this.showLabel = propToUse?.showLabel;
|
|
51
|
-
this.label = propToUse?.label;
|
|
52
|
-
const kids = this.pConn$.getChildren() as any[];
|
|
36
|
+
const kids = this.pConn$.getChildren();
|
|
53
37
|
this.instructions = this.templateUtils.getInstructions(this.pConn$, configProps?.instructions);
|
|
54
38
|
|
|
55
39
|
const numCols = configProps.NumCols ? configProps.NumCols : '1';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
3
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
4
|
|
|
5
5
|
@Component({
|
|
6
6
|
selector: 'app-details',
|
|
@@ -9,49 +9,15 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
9
9
|
standalone: true,
|
|
10
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
11
|
})
|
|
12
|
-
export class DetailsComponent
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@Input() pConn$: typeof PConnect;
|
|
12
|
+
export class DetailsComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
16
14
|
|
|
17
15
|
highlightedDataArr: any[] = [];
|
|
18
16
|
showHighlightedData: boolean;
|
|
19
17
|
arFields$: any[] = [];
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
ngOnInit(): void {
|
|
25
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
26
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
27
|
-
|
|
28
|
-
// this.updateSelf();
|
|
29
|
-
this.checkAndUpdate();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
ngOnDestroy() {
|
|
33
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
34
|
-
this.angularPConnectData.unsubscribeFn();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
onStateChange() {
|
|
39
|
-
this.checkAndUpdate();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
checkAndUpdate() {
|
|
43
|
-
// Should always check the bridge to see if the component should
|
|
44
|
-
// update itself (re-render)
|
|
45
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
46
|
-
|
|
47
|
-
// ONLY call updateSelf when the component should update
|
|
48
|
-
if (bUpdateSelf) {
|
|
49
|
-
this.updateSelf();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
updateSelf() {
|
|
54
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps((this.pConn$.getRawMetadata() as any).config);
|
|
19
|
+
override updateSelf() {
|
|
20
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
55
21
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
56
22
|
|
|
57
23
|
if (this.showHighlightedData) {
|
|
@@ -79,7 +45,7 @@ export class DetailsComponent implements OnInit, OnDestroy {
|
|
|
79
45
|
if (theCompType === 'reference' || theCompType === 'group') {
|
|
80
46
|
const configProps = thePConn.getConfigProps();
|
|
81
47
|
configProps.readOnly = true;
|
|
82
|
-
configProps.displayMode = '
|
|
48
|
+
configProps.displayMode = 'DISPLAY_ONLY';
|
|
83
49
|
const propToUse = { ...thePConn.getInheritedProps() };
|
|
84
50
|
configProps.label = propToUse?.label;
|
|
85
51
|
const options = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
3
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
4
|
|
|
5
5
|
@Component({
|
|
6
6
|
selector: 'app-details-narrow-wide',
|
|
@@ -9,49 +9,16 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
9
9
|
standalone: true,
|
|
10
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
11
|
})
|
|
12
|
-
export class DetailsNarrowWideComponent
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@Input() pConn$: typeof PConnect;
|
|
12
|
+
export class DetailsNarrowWideComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
16
14
|
|
|
17
15
|
arFields$: any[] = [];
|
|
18
16
|
arFields2$: any[] = [];
|
|
19
17
|
highlightedDataArr: any[] = [];
|
|
20
18
|
showHighlightedData: boolean;
|
|
21
|
-
// Used with AngularPConnect
|
|
22
|
-
angularPConnectData: AngularPConnectData = {};
|
|
23
|
-
|
|
24
|
-
ngOnInit(): void {
|
|
25
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
26
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
27
|
-
|
|
28
|
-
// this.updateSelf();
|
|
29
|
-
this.checkAndUpdate();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
ngOnDestroy() {
|
|
33
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
34
|
-
this.angularPConnectData.unsubscribeFn();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
onStateChange() {
|
|
39
|
-
this.checkAndUpdate();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
checkAndUpdate() {
|
|
43
|
-
// Should always check the bridge to see if the component should
|
|
44
|
-
// update itself (re-render)
|
|
45
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
46
|
-
|
|
47
|
-
// ONLY call updateSelf when the component should update
|
|
48
|
-
if (bUpdateSelf) {
|
|
49
|
-
this.updateSelf();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
19
|
|
|
53
|
-
updateSelf() {
|
|
54
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
20
|
+
override updateSelf() {
|
|
21
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
55
22
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
56
23
|
|
|
57
24
|
if (this.showHighlightedData) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
3
|
-
import { FormGroup } from '@angular/forms';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
4
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
5
4
|
|
|
6
5
|
@Component({
|
|
7
6
|
selector: 'app-details-one-column',
|
|
@@ -10,50 +9,16 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
9
|
standalone: true,
|
|
11
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
12
11
|
})
|
|
13
|
-
export class DetailsOneColumnComponent
|
|
14
|
-
|
|
12
|
+
export class DetailsOneColumnComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
15
14
|
|
|
16
|
-
@Input() pConn$: typeof PConnect;
|
|
17
|
-
@Input() formGroup$: FormGroup;
|
|
18
15
|
showHighlightedData: boolean;
|
|
19
16
|
highlightedDataArr: any;
|
|
20
17
|
|
|
21
18
|
arFields$: any[] = [];
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
ngOnInit(): void {
|
|
27
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
28
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
29
|
-
|
|
30
|
-
// this.updateSelf();
|
|
31
|
-
this.checkAndUpdate();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
ngOnDestroy() {
|
|
35
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
36
|
-
this.angularPConnectData.unsubscribeFn();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
onStateChange() {
|
|
41
|
-
this.checkAndUpdate();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
checkAndUpdate() {
|
|
45
|
-
// Should always check the bridge to see if the component should
|
|
46
|
-
// update itself (re-render)
|
|
47
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
48
|
-
|
|
49
|
-
// ONLY call updateSelf when the component should update
|
|
50
|
-
if (bUpdateSelf) {
|
|
51
|
-
this.updateSelf();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
updateSelf() {
|
|
56
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps((this.pConn$.getRawMetadata() as any).config);
|
|
20
|
+
override updateSelf() {
|
|
21
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
57
22
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
58
23
|
|
|
59
24
|
if (this.showHighlightedData) {
|
|
@@ -70,7 +35,7 @@ export class DetailsOneColumnComponent implements OnInit, OnDestroy {
|
|
|
70
35
|
});
|
|
71
36
|
}
|
|
72
37
|
|
|
73
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
38
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
74
39
|
this.pConn$.setInheritedProp('readOnly', true);
|
|
75
40
|
|
|
76
41
|
const kids = this.pConn$.getChildren() as any[];
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
*ngIf="tab.content?.getPConnect()"
|
|
6
6
|
[name]="tab.content?.getPConnect().getComponentName()"
|
|
7
7
|
[props]="{
|
|
8
|
-
pConn$: tab.content?.getPConnect()
|
|
9
|
-
formGroup$: formGroup$
|
|
8
|
+
pConn$: tab.content?.getPConnect()
|
|
10
9
|
}"
|
|
11
10
|
errorMsg="Details Sub tabs wants component not yet available: {{ tab.content?.getPConnect().getComponentName() }}"
|
|
12
11
|
></component-mapper>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { FormGroup } from '@angular/forms';
|
|
4
3
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
5
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
6
4
|
import { getTransientTabs, getVisibleTabs, tabClick } from '@pega/angular-sdk-components';
|
|
7
5
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
6
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
8
7
|
|
|
9
8
|
@Component({
|
|
10
9
|
selector: 'app-details-sub-tabs',
|
|
@@ -13,45 +12,14 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
13
12
|
standalone: true,
|
|
14
13
|
imports: [MatTabsModule, CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
15
14
|
})
|
|
16
|
-
export class DetailsSubTabsComponent
|
|
17
|
-
|
|
18
|
-
@Input() formGroup$: FormGroup;
|
|
15
|
+
export class DetailsSubTabsComponent extends DetailsTemplateBase {
|
|
16
|
+
override pConn$: typeof PConnect;
|
|
19
17
|
|
|
20
|
-
angularPConnectData: AngularPConnectData = {};
|
|
21
18
|
currentTabId = '0';
|
|
22
19
|
tabItems: any[];
|
|
23
20
|
availableTabs: any[];
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ngOnInit(): void {
|
|
28
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
29
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
30
|
-
this.checkAndUpdate();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
ngOnDestroy() {
|
|
34
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
35
|
-
this.angularPConnectData.unsubscribeFn();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
onStateChange() {
|
|
40
|
-
this.checkAndUpdate();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
checkAndUpdate() {
|
|
44
|
-
// Should always check the bridge to see if the component should
|
|
45
|
-
// update itself (re-render)
|
|
46
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
47
|
-
|
|
48
|
-
// ONLY call updateSelf when the component should update
|
|
49
|
-
if (bUpdateSelf) {
|
|
50
|
-
this.updateSelf();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
updateSelf() {
|
|
22
|
+
override updateSelf() {
|
|
55
23
|
const children = this.pConn$?.getChildren();
|
|
56
24
|
const deferLoadedTabs = children[0];
|
|
57
25
|
this.availableTabs = getVisibleTabs(deferLoadedTabs, 'tabsSubs');
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
4
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
5
4
|
|
|
6
5
|
@Component({
|
|
7
6
|
selector: 'app-details-three-column',
|
|
@@ -10,11 +9,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
9
|
standalone: true,
|
|
11
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
12
11
|
})
|
|
13
|
-
export class DetailsThreeColumnComponent
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@Input() pConn$: typeof PConnect;
|
|
17
|
-
@Input() formGroup$: FormGroup;
|
|
12
|
+
export class DetailsThreeColumnComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
18
14
|
|
|
19
15
|
showHighlightedData: boolean;
|
|
20
16
|
highlightedDataArr: any;
|
|
@@ -25,40 +21,8 @@ export class DetailsThreeColumnComponent implements OnInit, OnDestroy {
|
|
|
25
21
|
|
|
26
22
|
propsToUse: any = {};
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
ngOnInit(): void {
|
|
32
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
33
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
34
|
-
|
|
35
|
-
// this.updateSelf();
|
|
36
|
-
this.checkAndUpdate();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
ngOnDestroy() {
|
|
40
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
41
|
-
this.angularPConnectData.unsubscribeFn();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
onStateChange() {
|
|
46
|
-
this.checkAndUpdate();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
checkAndUpdate() {
|
|
50
|
-
// Should always check the bridge to see if the component should
|
|
51
|
-
// update itself (re-render)
|
|
52
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
53
|
-
|
|
54
|
-
// ONLY call updateSelf when the component should update
|
|
55
|
-
if (bUpdateSelf) {
|
|
56
|
-
this.updateSelf();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
updateSelf() {
|
|
61
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps((this.pConn$.getRawMetadata() as any).config);
|
|
24
|
+
override updateSelf() {
|
|
25
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
62
26
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
63
27
|
|
|
64
28
|
if (this.showHighlightedData) {
|
|
@@ -75,7 +39,7 @@ export class DetailsThreeColumnComponent implements OnInit, OnDestroy {
|
|
|
75
39
|
});
|
|
76
40
|
}
|
|
77
41
|
|
|
78
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
42
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
79
43
|
this.pConn$.setInheritedProp('readOnly', true);
|
|
80
44
|
|
|
81
45
|
const kids = this.pConn$.getChildren() as any[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
4
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
5
4
|
|
|
6
5
|
@Component({
|
|
7
6
|
selector: 'app-details-two-column',
|
|
@@ -10,11 +9,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
9
|
standalone: true,
|
|
11
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
12
11
|
})
|
|
13
|
-
export class DetailsTwoColumnComponent
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@Input() pConn$: typeof PConnect;
|
|
17
|
-
@Input() formGroup$: FormGroup;
|
|
12
|
+
export class DetailsTwoColumnComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
18
14
|
|
|
19
15
|
showHighlightedData: boolean;
|
|
20
16
|
highlightedDataArr: any;
|
|
@@ -25,45 +21,13 @@ export class DetailsTwoColumnComponent implements OnInit, OnDestroy {
|
|
|
25
21
|
|
|
26
22
|
propsToUse: any = {};
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
ngOnInit(): void {
|
|
32
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
33
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
34
|
-
|
|
35
|
-
// this.updateSelf();
|
|
36
|
-
this.checkAndUpdate();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
ngOnDestroy() {
|
|
40
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
41
|
-
this.angularPConnectData.unsubscribeFn();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
onStateChange() {
|
|
46
|
-
this.checkAndUpdate();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
checkAndUpdate() {
|
|
50
|
-
// Should always check the bridge to see if the component should
|
|
51
|
-
// update itself (re-render)
|
|
52
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
53
|
-
|
|
54
|
-
// ONLY call updateSelf when the component should update
|
|
55
|
-
if (bUpdateSelf) {
|
|
56
|
-
this.updateSelf();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
updateSelf() {
|
|
61
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps((this.pConn$.getRawMetadata() as any).config);
|
|
24
|
+
override updateSelf() {
|
|
25
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
62
26
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
63
27
|
|
|
64
28
|
if (this.showHighlightedData) {
|
|
65
29
|
const highlightedData = rawMetaData?.highlightedData;
|
|
66
|
-
this.highlightedDataArr = highlightedData
|
|
30
|
+
this.highlightedDataArr = highlightedData?.map(field => {
|
|
67
31
|
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
68
32
|
|
|
69
33
|
if (field.config.value === '@P .pyStatusWork') {
|
|
@@ -75,7 +39,7 @@ export class DetailsTwoColumnComponent implements OnInit, OnDestroy {
|
|
|
75
39
|
});
|
|
76
40
|
}
|
|
77
41
|
|
|
78
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
42
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
79
43
|
this.pConn$.setInheritedProp('readOnly', true);
|
|
80
44
|
|
|
81
45
|
const kids = this.pConn$.getChildren() as any[];
|