@pega/angular-sdk-overrides 24.2.10 → 25.1.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/alert.component.scss +3 -3
- package/lib/designSystemExtension/alert/alert.component.ts +0 -1
- package/lib/designSystemExtension/alert-banner/alert-banner.component.ts +0 -1
- package/lib/designSystemExtension/banner/banner.component.html +1 -1
- package/lib/designSystemExtension/banner/banner.component.scss +17 -3
- package/lib/designSystemExtension/banner/banner.component.ts +0 -1
- package/lib/designSystemExtension/case-create-stage/case-create-stage.component.ts +0 -1
- package/lib/designSystemExtension/field-group/field-group.component.ts +0 -1
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.html +6 -3
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.scss +5 -34
- package/lib/designSystemExtension/material-case-summary/material-case-summary.component.ts +0 -2
- package/lib/designSystemExtension/material-details/material-details.component.scss +0 -5
- package/lib/designSystemExtension/material-details/material-details.component.ts +0 -1
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +3 -3
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss +4 -3
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +6 -1
- package/lib/designSystemExtension/material-summary-item/material-summary-item.component.scss +4 -17
- package/lib/designSystemExtension/material-summary-item/material-summary-item.component.ts +0 -1
- package/lib/designSystemExtension/material-summary-list/material-summary-list.component.ts +0 -1
- package/lib/designSystemExtension/material-utility/material-utility.component.scss +1 -2
- package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.scss +1 -1
- package/lib/designSystemExtension/material-vertical-tabs/material-vertical-tabs.component.ts +0 -1
- package/lib/designSystemExtension/operator/operator.component.html +2 -2
- package/lib/designSystemExtension/operator/operator.component.scss +13 -12
- package/lib/designSystemExtension/operator/operator.component.ts +4 -5
- package/lib/designSystemExtension/pulse/pulse.component.scss +2 -2
- package/lib/designSystemExtension/pulse/pulse.component.ts +0 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.html +4 -17
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +0 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +30 -1
- package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.scss +16 -9
- package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.ts +0 -1
- package/lib/field/auto-complete/auto-complete.component.html +0 -2
- package/lib/field/auto-complete/auto-complete.component.ts +48 -173
- package/lib/field/cancel-alert/cancel-alert.component.html +8 -12
- package/lib/field/cancel-alert/cancel-alert.component.scss +2 -3
- package/lib/field/cancel-alert/cancel-alert.component.ts +24 -37
- package/lib/field/check-box/check-box.component.html +17 -6
- package/lib/field/check-box/check-box.component.scss +0 -1
- package/lib/field/check-box/check-box.component.ts +25 -151
- package/lib/field/currency/currency.component.ts +54 -181
- package/lib/field/date/date.component.html +4 -3
- package/lib/field/date/date.component.ts +30 -151
- package/lib/field/date-time/date-time.component.html +2 -2
- package/lib/field/date-time/date-time.component.ts +47 -148
- package/lib/field/decimal/decimal.component.html +1 -0
- package/lib/field/decimal/decimal.component.ts +61 -164
- package/lib/field/dropdown/dropdown.component.html +1 -0
- package/lib/field/dropdown/dropdown.component.ts +43 -152
- package/lib/field/email/email.component.ts +28 -158
- package/lib/field/field.base.ts +149 -0
- package/lib/field/group/group.component.ts +7 -5
- package/lib/field/integer/integer.component.html +1 -1
- package/lib/field/integer/integer.component.ts +30 -160
- package/lib/field/list-view-action-buttons/list-view-action-buttons.component.html +1 -1
- package/lib/field/list-view-action-buttons/list-view-action-buttons.component.ts +3 -3
- package/lib/field/location/config-ext.json +8 -0
- package/lib/field/location/location.component.html +45 -0
- package/lib/field/location/location.component.scss +18 -0
- package/lib/field/location/location.component.spec.ts +22 -0
- package/lib/field/location/location.component.ts +280 -0
- package/lib/field/multiselect/multiselect.component.ts +47 -152
- package/lib/field/multiselect/utils.ts +55 -47
- package/lib/field/object-reference/object-reference.component.html +17 -0
- package/lib/field/object-reference/object-reference.component.scss +0 -0
- package/lib/field/object-reference/object-reference.component.spec.ts +22 -0
- package/lib/field/object-reference/object-reference.component.ts +237 -0
- package/lib/field/percentage/percentage.component.html +1 -1
- package/lib/field/percentage/percentage.component.ts +62 -170
- package/lib/field/phone/config-ext.json +1 -1
- package/lib/field/phone/phone.component.html +18 -17
- package/lib/field/phone/phone.component.scss +4 -0
- package/lib/field/phone/phone.component.ts +47 -156
- package/lib/field/radio-buttons/radio-buttons.component.html +17 -12
- package/lib/field/radio-buttons/radio-buttons.component.scss +4 -2
- package/lib/field/radio-buttons/radio-buttons.component.ts +37 -160
- package/lib/field/rich-text/rich-text.component.html +2 -0
- package/lib/field/rich-text/rich-text.component.scss +172 -0
- package/lib/field/rich-text/rich-text.component.ts +32 -93
- package/lib/field/scalar-list/scalar-list.component.ts +17 -73
- package/lib/field/selectable-card/selectable-card.component.html +70 -0
- package/lib/field/selectable-card/selectable-card.component.scss +11 -0
- package/lib/field/selectable-card/selectable-card.component.spec.ts +22 -0
- package/lib/field/selectable-card/selectable-card.component.ts +219 -0
- package/lib/field/semantic-link/semantic-link.component.html +4 -8
- package/lib/field/semantic-link/semantic-link.component.scss +0 -13
- package/lib/field/semantic-link/semantic-link.component.ts +165 -6
- package/lib/field/text/text.component.scss +0 -1
- package/lib/field/text/text.component.ts +6 -5
- package/lib/field/text-area/text-area.component.html +4 -2
- package/lib/field/text-area/text-area.component.ts +30 -155
- package/lib/field/text-content/text-content.component.ts +0 -1
- package/lib/field/text-input/text-input.component.html +1 -1
- package/lib/field/text-input/text-input.component.ts +28 -158
- package/lib/field/time/time.component.html +2 -2
- package/lib/field/time/time.component.ts +34 -154
- package/lib/field/url/url.component.html +1 -1
- package/lib/field/url/url.component.ts +28 -157
- package/lib/field/user-reference/user-reference.component.html +40 -38
- package/lib/field/user-reference/user-reference.component.scss +0 -1
- package/lib/field/user-reference/user-reference.component.ts +70 -9
- package/lib/infra/Containers/flow-container/flow-container.component.html +2 -2
- package/lib/infra/Containers/flow-container/flow-container.component.ts +24 -51
- package/lib/infra/Containers/flow-container/helpers.ts +2 -2
- package/lib/infra/Containers/hybrid-view-container/hybrid-view-container.component.ts +0 -1
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.html +1 -11
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +5 -18
- package/lib/infra/Containers/view-container/helper.ts +35 -2
- package/lib/infra/Containers/view-container/view-container.component.ts +1 -2
- package/lib/infra/action-buttons/action-buttons.component.html +13 -8
- package/lib/infra/action-buttons/action-buttons.component.scss +23 -0
- package/lib/infra/action-buttons/action-buttons.component.ts +1 -3
- package/lib/infra/assignment/assignment.component.html +1 -1
- package/lib/infra/assignment/assignment.component.ts +100 -46
- package/lib/infra/assignment-card/assignment-card.component.html +2 -2
- package/lib/infra/assignment-card/assignment-card.component.scss +0 -4
- package/lib/infra/assignment-card/assignment-card.component.ts +21 -5
- package/lib/infra/dashboard-filter/dashboard-filter.component.ts +0 -1
- package/lib/infra/defer-load/defer-load.component.html +6 -2
- package/lib/infra/defer-load/defer-load.component.ts +25 -12
- package/lib/infra/error-boundary/error-boundary.component.ts +0 -1
- package/lib/infra/multi-step/multi-step.component.html +22 -38
- package/lib/infra/multi-step/multi-step.component.scss +14 -27
- package/lib/infra/multi-step/multi-step.component.ts +0 -1
- package/lib/infra/navbar/navbar.component.html +36 -41
- package/lib/infra/navbar/navbar.component.scss +22 -4
- package/lib/infra/navbar/navbar.component.ts +8 -6
- package/lib/infra/reference/reference.component.ts +82 -90
- package/lib/infra/region/region.component.ts +0 -1
- package/lib/infra/root-container/root-container.component.html +2 -15
- package/lib/infra/root-container/root-container.component.scss +0 -1
- package/lib/infra/root-container/root-container.component.ts +25 -32
- package/lib/infra/stages/stages.component.html +4 -3
- package/lib/infra/stages/stages.component.scss +12 -36
- package/lib/infra/stages/stages.component.ts +4 -3
- package/lib/infra/view/view.component.html +1 -1
- package/lib/infra/view/view.component.ts +3 -7
- package/lib/template/advanced-search/advanced-search.component.html +12 -0
- package/lib/template/advanced-search/advanced-search.component.scss +0 -0
- package/lib/template/advanced-search/advanced-search.component.spec.ts +0 -0
- package/lib/template/advanced-search/advanced-search.component.ts +112 -0
- package/lib/template/advanced-search/advanced-search.service.ts +27 -0
- package/lib/template/advanced-search/search-group/persist-utils.ts +56 -0
- package/lib/template/advanced-search/search-groups/search-groups.component.html +32 -0
- package/lib/template/advanced-search/search-groups/search-groups.component.scss +0 -0
- package/lib/template/advanced-search/search-groups/search-groups.component.spec.ts +0 -0
- package/lib/template/advanced-search/search-groups/search-groups.component.ts +294 -0
- package/lib/template/advanced-search/search-groups/utils.ts +29 -0
- package/lib/template/app-shell/app-shell.component.html +4 -1
- package/lib/template/app-shell/app-shell.component.scss +0 -3
- package/lib/template/app-shell/app-shell.component.ts +46 -8
- package/lib/template/banner-page/banner-page.component.ts +0 -1
- package/lib/template/base/form-template-base.ts +6 -0
- package/lib/template/case-summary/case-summary.component.scss +0 -2
- package/lib/template/case-summary/case-summary.component.ts +6 -22
- package/lib/template/case-view/case-view.component.html +4 -4
- package/lib/template/case-view/case-view.component.scss +18 -10
- package/lib/template/case-view/case-view.component.ts +1 -11
- package/lib/template/confirmation/confirmation.component.html +2 -2
- package/lib/template/confirmation/confirmation.component.ts +0 -1
- package/lib/template/data-reference/data-reference.component.html +11 -8
- package/lib/template/data-reference/data-reference.component.ts +346 -113
- package/lib/template/data-reference/search-form/search-form.component.html +39 -0
- package/lib/template/data-reference/search-form/search-form.component.scss +11 -0
- package/lib/template/data-reference/search-form/search-form.component.spec.ts +0 -0
- package/lib/template/data-reference/search-form/search-form.component.ts +167 -0
- package/lib/template/data-reference/search-form/tabsData.ts +160 -0
- package/lib/template/data-reference/utils.ts +92 -0
- package/lib/template/default-form/default-form.component.ts +45 -5
- package/lib/template/default-page/default-page.component.html +34 -0
- package/lib/template/default-page/default-page.component.scss +31 -0
- package/lib/template/default-page/default-page.component.spec.ts +24 -0
- package/lib/template/default-page/default-page.component.ts +64 -0
- package/lib/template/details/details.component.ts +0 -1
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +0 -1
- package/lib/template/details-one-column/details-one-column.component.ts +0 -1
- package/lib/template/details-sub-tabs/details-sub-tabs.component.ts +0 -1
- package/lib/template/details-three-column/details-three-column.component.ts +0 -1
- package/lib/template/details-two-column/details-two-column.component.ts +0 -1
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +0 -1
- package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +0 -1
- package/lib/template/field-group-list/field-group-list.component.scss +0 -1
- package/lib/template/field-group-list/field-group-list.component.ts +0 -1
- package/lib/template/field-group-template/field-group-template.component.html +7 -7
- package/lib/template/field-group-template/field-group-template.component.scss +8 -0
- package/lib/template/field-group-template/field-group-template.component.ts +64 -55
- package/lib/template/field-value-list/field-value-list.component.html +2 -2
- package/lib/template/field-value-list/field-value-list.component.scss +4 -0
- package/lib/template/field-value-list/field-value-list.component.ts +0 -1
- package/lib/template/inline-dashboard/inline-dashboard.component.ts +0 -1
- package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +1 -2
- package/lib/template/list-page/list-page.component.ts +0 -1
- package/lib/template/list-view/list-view.component.html +170 -160
- package/lib/template/list-view/list-view.component.scss +25 -21
- package/lib/template/list-view/list-view.component.ts +208 -122
- package/lib/template/list-view/listViewHelpers.ts +3 -9
- package/lib/template/list-view/utils.ts +27 -7
- package/lib/template/multi-reference-readonly/multi-reference-readonly.component.ts +0 -1
- package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +0 -1
- package/lib/template/object-page/object-page.component.html +1 -0
- package/lib/template/object-page/object-page.component.scss +0 -0
- package/lib/template/object-page/object-page.component.spec.ts +22 -0
- package/lib/template/object-page/object-page.component.ts +14 -0
- package/lib/template/one-column/one-column.component.ts +0 -1
- package/lib/template/one-column-page/one-column-page.component.ts +0 -1
- package/lib/template/one-column-tab/one-column-tab.component.scss +1 -1
- package/lib/template/one-column-tab/one-column-tab.component.ts +0 -1
- package/lib/template/page/page.component.ts +0 -1
- package/lib/template/promoted-filters/promoted-filters.component.ts +0 -1
- package/lib/template/repeating-structures/repeating-structures.component.ts +0 -2
- package/lib/template/self-service-case-view/self-service-case-view.component.html +78 -0
- package/lib/template/self-service-case-view/self-service-case-view.component.scss +132 -0
- package/lib/template/self-service-case-view/self-service-case-view.component.spec.ts +24 -0
- package/lib/template/self-service-case-view/self-service-case-view.component.ts +207 -0
- package/lib/template/simple-table/simple-table.component.ts +0 -2
- package/lib/template/simple-table-manual/helpers.ts +126 -10
- package/lib/template/simple-table-manual/simple-table-manual.component.html +27 -8
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +15 -17
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +103 -45
- package/lib/template/simple-table-select/simple-table-select.component.ts +0 -1
- package/lib/template/single-reference-readonly/single-reference-readonly.component.html +4 -1
- package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +21 -0
- package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +104 -4
- package/lib/template/sub-tabs/sub-tabs.component.ts +0 -1
- package/lib/template/three-column/three-column.component.ts +0 -1
- package/lib/template/three-column-page/three-column-page.component.ts +0 -1
- package/lib/template/two-column/two-column.component.ts +0 -1
- package/lib/template/two-column-page/two-column-page.component.ts +0 -1
- package/lib/template/two-column-tab/two-column-tab.component.ts +0 -1
- package/lib/template/utils.ts +58 -0
- package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +0 -1
- package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +0 -1
- package/lib/template/wss-nav-bar/wss-nav-bar.component.html +6 -5
- package/lib/template/wss-nav-bar/wss-nav-bar.component.scss +8 -17
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +1 -9
- package/lib/widget/app-announcement/app-announcement.component.html +1 -2
- package/lib/widget/app-announcement/app-announcement.component.scss +2 -2
- package/lib/widget/app-announcement/app-announcement.component.ts +0 -1
- package/lib/widget/attachment/Attachment.types.ts +92 -0
- package/lib/widget/attachment/AttachmentUtils.ts +287 -0
- package/lib/widget/attachment/attachment.component.html +3 -3
- package/lib/widget/attachment/attachment.component.scss +9 -12
- package/lib/widget/attachment/attachment.component.ts +267 -254
- package/lib/widget/case-history/case-history.component.ts +0 -1
- package/lib/widget/feed-container/feed-container.component.scss +3 -9
- package/lib/widget/feed-container/feed-container.component.ts +2 -5
- package/lib/widget/file-utility/file-utility.component.html +3 -3
- package/lib/widget/file-utility/file-utility.component.scss +6 -17
- package/lib/widget/file-utility/file-utility.component.ts +24 -9
- package/lib/widget/list-utility/list-utility.component.scss +4 -5
- package/lib/widget/list-utility/list-utility.component.ts +0 -1
- package/lib/widget/quick-create/quick-create.component.ts +41 -23
- package/lib/widget/todo/todo.component.html +12 -10
- package/lib/widget/todo/todo.component.scss +20 -10
- package/lib/widget/todo/todo.component.ts +11 -7
- package/lib/widget/utility/utility.component.ts +0 -1
- package/package.json +1 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
4
|
+
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
|
+
|
|
6
|
+
interface DefaultPageProps {
|
|
7
|
+
// If any, enter additional props that only exist on this component
|
|
8
|
+
layout?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
heading?: string;
|
|
11
|
+
message?: string;
|
|
12
|
+
backgroundImage?: string;
|
|
13
|
+
enableBanner?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'app-default-page',
|
|
18
|
+
templateUrl: './default-page.component.html',
|
|
19
|
+
styleUrls: ['./default-page.component.scss'],
|
|
20
|
+
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
21
|
+
})
|
|
22
|
+
export class DefaultPageComponent implements OnInit, OnChanges {
|
|
23
|
+
@Input() pConn$: typeof PConnect;
|
|
24
|
+
@Input() formGroup$: any;
|
|
25
|
+
|
|
26
|
+
configProps$: DefaultPageProps;
|
|
27
|
+
arChildren$: any[];
|
|
28
|
+
title?: string;
|
|
29
|
+
heading: any;
|
|
30
|
+
message?: string;
|
|
31
|
+
backgroundImage?: string;
|
|
32
|
+
layout$?: string;
|
|
33
|
+
enableBanner$?: boolean;
|
|
34
|
+
|
|
35
|
+
constructor() {
|
|
36
|
+
this.backgroundImage = this.configProps$?.backgroundImage;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
ngOnInit() {
|
|
40
|
+
this.backgroundImage = this.configProps$?.backgroundImage;
|
|
41
|
+
this.updateSelf();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
ngOnChanges(changes: SimpleChanges): void {
|
|
45
|
+
const { pConn$ } = changes;
|
|
46
|
+
this.backgroundImage = this.configProps$?.backgroundImage;
|
|
47
|
+
|
|
48
|
+
if (pConn$.previousValue && pConn$.previousValue !== pConn$.currentValue) {
|
|
49
|
+
this.updateSelf();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
updateSelf() {
|
|
54
|
+
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as DefaultPageProps;
|
|
55
|
+
|
|
56
|
+
this.layout$ = this.configProps$.layout;
|
|
57
|
+
this.heading = this.configProps$.heading;
|
|
58
|
+
this.message = this.configProps$.message;
|
|
59
|
+
this.backgroundImage = this.configProps$.backgroundImage;
|
|
60
|
+
this.enableBanner$ = this.configProps$.enableBanner;
|
|
61
|
+
|
|
62
|
+
this.arChildren$ = ReferenceComponent.normalizePConnArray(this.pConn$.getChildren());
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -6,7 +6,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
6
|
selector: 'app-details',
|
|
7
7
|
templateUrl: './details.component.html',
|
|
8
8
|
styleUrls: ['./details.component.scss'],
|
|
9
|
-
standalone: true,
|
|
10
9
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
10
|
})
|
|
12
11
|
export class DetailsComponent extends DetailsTemplateBase {
|
|
@@ -6,7 +6,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
6
|
selector: 'app-details-narrow-wide',
|
|
7
7
|
templateUrl: './details-narrow-wide.component.html',
|
|
8
8
|
styleUrls: ['./details-narrow-wide.component.scss'],
|
|
9
|
-
standalone: true,
|
|
10
9
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
10
|
})
|
|
12
11
|
export class DetailsNarrowWideComponent extends DetailsTemplateBase {
|
|
@@ -6,7 +6,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
6
|
selector: 'app-details-one-column',
|
|
7
7
|
templateUrl: './details-one-column.component.html',
|
|
8
8
|
styleUrls: ['./details-one-column.component.scss'],
|
|
9
|
-
standalone: true,
|
|
10
9
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
10
|
})
|
|
12
11
|
export class DetailsOneColumnComponent extends DetailsTemplateBase {
|
|
@@ -9,7 +9,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
9
9
|
selector: 'app-details-sub-tabs',
|
|
10
10
|
templateUrl: './details-sub-tabs.component.html',
|
|
11
11
|
styleUrls: ['./details-sub-tabs.component.scss'],
|
|
12
|
-
standalone: true,
|
|
13
12
|
imports: [MatTabsModule, CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
14
13
|
})
|
|
15
14
|
export class DetailsSubTabsComponent extends DetailsTemplateBase {
|
|
@@ -6,7 +6,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
6
|
selector: 'app-details-three-column',
|
|
7
7
|
templateUrl: './details-three-column.component.html',
|
|
8
8
|
styleUrls: ['./details-three-column.component.scss'],
|
|
9
|
-
standalone: true,
|
|
10
9
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
10
|
})
|
|
12
11
|
export class DetailsThreeColumnComponent extends DetailsTemplateBase {
|
|
@@ -6,7 +6,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
6
|
selector: 'app-details-two-column',
|
|
7
7
|
templateUrl: './details-two-column.component.html',
|
|
8
8
|
styleUrls: ['./details-two-column.component.scss'],
|
|
9
|
-
standalone: true,
|
|
10
9
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
10
|
})
|
|
12
11
|
export class DetailsTwoColumnComponent extends DetailsTemplateBase {
|
|
@@ -6,7 +6,6 @@ import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
|
6
6
|
selector: 'app-details-wide-narrow',
|
|
7
7
|
templateUrl: './details-wide-narrow.component.html',
|
|
8
8
|
styleUrls: ['./details-wide-narrow.component.scss'],
|
|
9
|
-
standalone: true,
|
|
10
9
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
10
|
})
|
|
12
11
|
export class DetailsWideNarrowComponent extends DetailsTemplateBase {
|
|
@@ -17,7 +17,6 @@ interface DynamicTabsProps {
|
|
|
17
17
|
selector: 'app-dynamic-tabs',
|
|
18
18
|
templateUrl: './dynamic-tabs.component.html',
|
|
19
19
|
styleUrls: ['./dynamic-tabs.component.scss'],
|
|
20
|
-
standalone: true,
|
|
21
20
|
imports: [CommonModule, MatTabsModule, forwardRef(() => ComponentMapperComponent)]
|
|
22
21
|
})
|
|
23
22
|
export class DynamicTabsComponent implements OnInit, OnDestroy {
|
|
@@ -6,7 +6,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
6
6
|
selector: 'app-field-group-list',
|
|
7
7
|
templateUrl: './field-group-list.component.html',
|
|
8
8
|
styleUrls: ['./field-group-list.component.scss'],
|
|
9
|
-
standalone: true,
|
|
10
9
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
11
10
|
})
|
|
12
11
|
export class FieldGroupListComponent {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div id="field-group">
|
|
2
|
-
<h3 *ngIf="showLabel$"
|
|
2
|
+
<h3 *ngIf="showLabel$" class="field-group-template-header" style="font-weight: bold">
|
|
3
3
|
{{ label$ }}
|
|
4
4
|
</h3>
|
|
5
5
|
<div *ngIf="readonlyMode; else editable">
|
|
@@ -11,23 +11,23 @@
|
|
|
11
11
|
</div>
|
|
12
12
|
<ng-template #editable>
|
|
13
13
|
<div *ngIf="children && children.length > 0">
|
|
14
|
-
<div *ngFor="let
|
|
14
|
+
<div class="field-group-template-item" *ngFor="let child of children; let i = index">
|
|
15
15
|
<div class="header-div">
|
|
16
16
|
<div style="width: 80%">
|
|
17
|
-
<b>{{
|
|
17
|
+
<b>{{ child.name }}</b>
|
|
18
18
|
</div>
|
|
19
|
-
<div *ngIf="
|
|
19
|
+
<div *ngIf="allowDelete && child.allowRowDelete" style="width: 20%; text-align: right">
|
|
20
20
|
<button id="delete-button" mat-icon-button (click)="deleteFieldGroupItem(i)">
|
|
21
21
|
<img class="psdk-utility-card-action-svg-icon" src="{{ menuIconOverride$ }}" />
|
|
22
22
|
</button>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
|
-
<div *ngIf="
|
|
27
|
-
<component-mapper name="Region" [props]="{ pConn$:
|
|
26
|
+
<div *ngIf="child.children.getPConnect().getRawMetadata().type.toLowerCase() == 'region'">
|
|
27
|
+
<component-mapper name="Region" [props]="{ pConn$: child.children.getPConnect(), formGroup$ }"></component-mapper>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
30
|
-
<button *ngIf="allowAddEdit !== false" mat-button color="primary" style="font-size: 16px" (click)="addFieldGroupItem()">+ Add</button>
|
|
31
30
|
</div>
|
|
31
|
+
<button *ngIf="allowAdd" mat-button color="primary" style="font-size: 16px" (click)="addFieldGroupItem()">{{ getAddBtnLabel() }}</button>
|
|
32
32
|
</ng-template>
|
|
33
33
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges } from '@angular/core';
|
|
1
|
+
import { Component, OnInit, Input, forwardRef, OnDestroy, OnChanges, signal } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { MatButtonModule } from '@angular/material/button';
|
|
@@ -6,11 +6,14 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
|
|
|
6
6
|
import { buildView, getReferenceList } from '@pega/angular-sdk-components';
|
|
7
7
|
import { Utils } from '@pega/angular-sdk-components';
|
|
8
8
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
9
|
+
import { evaluateAllowRowAction } from '@pega/angular-sdk-components';
|
|
9
10
|
|
|
10
11
|
interface FieldGroupTemplateProps {
|
|
11
12
|
// If any, enter additional props that only exist on this component
|
|
12
13
|
label?: string;
|
|
13
|
-
|
|
14
|
+
hideLabel?: boolean;
|
|
15
|
+
allowActions?: any;
|
|
16
|
+
allowRowDelete?: any;
|
|
14
17
|
referenceList?: any[];
|
|
15
18
|
contextClass: string;
|
|
16
19
|
renderMode?: string;
|
|
@@ -19,13 +22,13 @@ interface FieldGroupTemplateProps {
|
|
|
19
22
|
displayMode?: string;
|
|
20
23
|
fieldHeader?: string;
|
|
21
24
|
allowTableEdit: boolean;
|
|
25
|
+
targetClassLabel?: string;
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
@Component({
|
|
25
29
|
selector: 'app-field-group-template',
|
|
26
30
|
templateUrl: './field-group-template.component.html',
|
|
27
31
|
styleUrls: ['./field-group-template.component.scss'],
|
|
28
|
-
standalone: true,
|
|
29
32
|
imports: [CommonModule, MatButtonModule, forwardRef(() => ComponentMapperComponent)]
|
|
30
33
|
})
|
|
31
34
|
export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges {
|
|
@@ -34,33 +37,42 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
34
37
|
@Input() formGroup$: FormGroup;
|
|
35
38
|
|
|
36
39
|
angularPConnectData: AngularPConnectData = {};
|
|
37
|
-
|
|
40
|
+
|
|
38
41
|
showLabel$?: boolean = true;
|
|
39
42
|
label$?: string;
|
|
40
43
|
readonlyMode: boolean;
|
|
41
44
|
contextClass: any;
|
|
42
|
-
referenceList: any;
|
|
43
|
-
pageReference: any;
|
|
44
45
|
heading: any;
|
|
45
46
|
children: any;
|
|
46
47
|
menuIconOverride$: any;
|
|
47
|
-
|
|
48
|
-
allowAddEdit: boolean;
|
|
48
|
+
referenceListLength = signal<number | null>(null);
|
|
49
49
|
fieldHeader: any;
|
|
50
50
|
|
|
51
|
+
allowAdd = true;
|
|
52
|
+
allowEdit = true;
|
|
53
|
+
allowDelete = true;
|
|
54
|
+
|
|
51
55
|
constructor(
|
|
52
56
|
private angularPConnect: AngularPConnectService,
|
|
53
57
|
private utils: Utils
|
|
54
58
|
) {}
|
|
55
59
|
|
|
56
60
|
ngOnInit(): void {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
this.
|
|
61
|
+
this.menuIconOverride$ = this.utils.getImageSrc('trash', this.utils.getSDKStaticContentUrl());
|
|
62
|
+
|
|
63
|
+
const { allowActions, allowTableEdit, referenceList } = this.configProps$;
|
|
60
64
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
this.
|
|
65
|
+
if (allowActions && Object.keys(allowActions).length > 0) {
|
|
66
|
+
this.allowAdd = allowActions.allowAdd ?? allowTableEdit ?? true;
|
|
67
|
+
this.allowEdit = allowActions.allowEdit ?? true;
|
|
68
|
+
this.allowDelete = allowActions.allowDelete ?? allowTableEdit ?? true;
|
|
69
|
+
} else {
|
|
70
|
+
this.allowAdd = allowTableEdit ?? true;
|
|
71
|
+
this.allowDelete = allowTableEdit ?? true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (referenceList?.length === 0 && (this.allowAdd || this.allowEdit)) {
|
|
75
|
+
this.pConn$.getListActions().insert({ classID: this.contextClass }, referenceList.length);
|
|
64
76
|
}
|
|
65
77
|
}
|
|
66
78
|
|
|
@@ -70,71 +82,63 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
70
82
|
}
|
|
71
83
|
}
|
|
72
84
|
|
|
73
|
-
onStateChange() {
|
|
74
|
-
// Should always check the bridge to see if the component should
|
|
75
|
-
// update itself (re-render)
|
|
76
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
77
|
-
// ONLY call updateSelf when the component should update
|
|
78
|
-
if (bUpdateSelf) {
|
|
79
|
-
this.updateSelf();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
85
|
ngOnChanges(changes) {
|
|
84
86
|
if (changes && changes.configProps$) {
|
|
85
87
|
const props = changes.configProps$;
|
|
86
88
|
if (props.currentValue !== props.previousValue) {
|
|
87
89
|
this.configProps$ = props.currentValue;
|
|
90
|
+
|
|
88
91
|
if (changes?.pConn$?.currentValue) {
|
|
89
92
|
this.pConn$ = changes?.pConn$?.currentValue;
|
|
90
93
|
}
|
|
94
|
+
|
|
91
95
|
this.updateSelf();
|
|
96
|
+
|
|
97
|
+
setTimeout(() => {
|
|
98
|
+
this.angularPConnect.shouldComponentUpdate(this);
|
|
99
|
+
}, 100);
|
|
92
100
|
}
|
|
93
101
|
}
|
|
94
102
|
}
|
|
95
103
|
|
|
96
104
|
updateSelf() {
|
|
97
|
-
|
|
98
|
-
this.label$ = this.configProps$.label;
|
|
99
|
-
this.showLabel$ = this.configProps$.showLabel;
|
|
100
|
-
// label & showLabel within inheritedProps takes precedence over configProps
|
|
101
|
-
this.label$ = (this.inheritedProps$ as any).label || this.label$;
|
|
102
|
-
this.showLabel$ = (this.inheritedProps$ as any).showLabel || this.showLabel$;
|
|
105
|
+
const inheritedProps: any = this.pConn$.getInheritedProps();
|
|
103
106
|
|
|
104
|
-
|
|
107
|
+
const { label, hideLabel, allowRowDelete, referenceList, fieldHeader, renderMode, displayMode, heading, contextClass, lookForChildInConfig } =
|
|
108
|
+
this.configProps$;
|
|
109
|
+
|
|
110
|
+
// label within inheritedProps takes precedence over configProps
|
|
111
|
+
this.label$ = inheritedProps.label || label;
|
|
112
|
+
|
|
113
|
+
this.showLabel$ = referenceList?.length === 0 || !hideLabel;
|
|
105
114
|
|
|
106
|
-
const renderMode = this.configProps$.renderMode;
|
|
107
|
-
const displayMode = this.configProps$.displayMode;
|
|
108
115
|
this.readonlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY';
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
this.heading =
|
|
112
|
-
this.fieldHeader =
|
|
116
|
+
|
|
117
|
+
this.contextClass = contextClass;
|
|
118
|
+
this.heading = heading ?? 'Row';
|
|
119
|
+
this.fieldHeader = fieldHeader;
|
|
120
|
+
|
|
113
121
|
const resolvedList = getReferenceList(this.pConn$);
|
|
114
|
-
this.pageReference = `${this.pConn$.getPageReference()}${resolvedList}`;
|
|
115
122
|
this.pConn$.setReferenceList(resolvedList);
|
|
123
|
+
|
|
116
124
|
if (this.readonlyMode) {
|
|
117
125
|
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
118
126
|
}
|
|
119
|
-
|
|
120
|
-
if (this.
|
|
121
|
-
//
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
const children: any = [];
|
|
128
|
-
this.referenceList?.forEach((item, index) => {
|
|
129
|
-
children.push({
|
|
127
|
+
|
|
128
|
+
if (this.referenceListLength() != referenceList?.length) {
|
|
129
|
+
// @ts-ignore - Expected 3 arguments, but got 1
|
|
130
|
+
this.pConn$.getListActions().initDefaultPageInstructions(resolvedList);
|
|
131
|
+
|
|
132
|
+
this.children = referenceList?.map((item, index) => {
|
|
133
|
+
return {
|
|
130
134
|
id: index,
|
|
131
135
|
name: this.fieldHeader === 'propertyRef' ? this.getDynamicHeader(item, index) : this.getStaticHeader(this.heading, index),
|
|
132
|
-
children: buildView(this.pConn$, index, lookForChildInConfig)
|
|
133
|
-
|
|
136
|
+
children: buildView(this.pConn$, index, lookForChildInConfig),
|
|
137
|
+
allowRowDelete: evaluateAllowRowAction(allowRowDelete, item)
|
|
138
|
+
};
|
|
134
139
|
});
|
|
135
|
-
this.children = children;
|
|
136
140
|
}
|
|
137
|
-
this.
|
|
141
|
+
this.referenceListLength.set(referenceList?.length || 0);
|
|
138
142
|
}
|
|
139
143
|
|
|
140
144
|
getStaticHeader = (heading, index) => {
|
|
@@ -142,17 +146,22 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
142
146
|
};
|
|
143
147
|
|
|
144
148
|
getDynamicHeader = (item, index) => {
|
|
145
|
-
if (this.
|
|
149
|
+
if (this.heading && item[this.heading.substring(1)]) {
|
|
146
150
|
return item[this.heading.substring(1)];
|
|
147
151
|
}
|
|
148
152
|
return `Row ${index + 1}`;
|
|
149
153
|
};
|
|
150
154
|
|
|
151
155
|
addFieldGroupItem() {
|
|
152
|
-
this.pConn$.getListActions().insert({ classID: this.contextClass }, this.
|
|
156
|
+
this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceListLength() as number);
|
|
153
157
|
}
|
|
154
158
|
|
|
155
159
|
deleteFieldGroupItem(index) {
|
|
156
160
|
this.pConn$.getListActions().deleteEntry(index);
|
|
157
161
|
}
|
|
162
|
+
|
|
163
|
+
getAddBtnLabel() {
|
|
164
|
+
const { targetClassLabel } = this.configProps$;
|
|
165
|
+
return targetClassLabel ? `+ Add ${targetClassLabel}` : '+ Add';
|
|
166
|
+
}
|
|
158
167
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<div *ngIf="displayMode$ === 'DISPLAY_ONLY'; else STACKED_LARGE_VAL"
|
|
2
|
-
<div class="psdk-grid-label">{{ label$ }}</div>
|
|
1
|
+
<div *ngIf="displayMode$ === 'DISPLAY_ONLY'; else STACKED_LARGE_VAL" [ngClass]="label$ ? 'psdk-container-labels-left' : 'psdk-container-nolabels'">
|
|
2
|
+
<div *ngIf="label$" class="psdk-grid-label">{{ label$ }}</div>
|
|
3
3
|
<div class="psdk-val-labels-left">
|
|
4
4
|
<ng-container *ngTemplateOutlet="valueTemplate"></ng-container>
|
|
5
5
|
</div>
|
|
@@ -5,7 +5,6 @@ import { Component, Input } from '@angular/core';
|
|
|
5
5
|
selector: 'app-field-value-list',
|
|
6
6
|
templateUrl: './field-value-list.component.html',
|
|
7
7
|
styleUrls: ['./field-value-list.component.scss'],
|
|
8
|
-
standalone: true,
|
|
9
8
|
imports: [CommonModule]
|
|
10
9
|
})
|
|
11
10
|
export class FieldValueListComponent {
|
|
@@ -13,7 +13,6 @@ interface InlineDashboardProps {
|
|
|
13
13
|
selector: 'app-inline-dashboard',
|
|
14
14
|
templateUrl: './inline-dashboard.component.html',
|
|
15
15
|
styleUrls: ['./inline-dashboard.component.scss'],
|
|
16
|
-
standalone: true,
|
|
17
16
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
18
17
|
})
|
|
19
18
|
export class InlineDashboardComponent {
|
|
@@ -15,7 +15,6 @@ interface InlineDashboardPageProps {
|
|
|
15
15
|
selector: 'app-inline-dashboard-page',
|
|
16
16
|
templateUrl: './inline-dashboard-page.component.html',
|
|
17
17
|
styleUrls: ['./inline-dashboard-page.component.scss'],
|
|
18
|
-
standalone: true,
|
|
19
18
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
20
19
|
})
|
|
21
20
|
export class InlineDashboardPageComponent implements OnInit, OnChanges {
|
|
@@ -46,7 +45,7 @@ export class InlineDashboardPageComponent implements OnInit, OnChanges {
|
|
|
46
45
|
updateSelf() {
|
|
47
46
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as InlineDashboardPageProps;
|
|
48
47
|
const arChildren$ = this.pConn$.getChildren();
|
|
49
|
-
const allFilters = this.pConn$.getRawMetadata()?.children[1];
|
|
48
|
+
const allFilters = this.pConn$.getRawMetadata()?.children?.[1];
|
|
50
49
|
const filterComponents = buildFilterComponents(this.pConn$, allFilters);
|
|
51
50
|
this.inlineProps = this.configProps$;
|
|
52
51
|
this.children[0] = arChildren$[0];
|
|
@@ -5,7 +5,6 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
5
5
|
selector: 'app-list-page',
|
|
6
6
|
templateUrl: './list-page.component.html',
|
|
7
7
|
styleUrls: ['./list-page.component.scss'],
|
|
8
|
-
standalone: true,
|
|
9
8
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
10
9
|
})
|
|
11
10
|
export class ListPageComponent {
|