@pega/angular-sdk-overrides 0.24.9 → 0.25.2
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 +1 -2
- package/lib/designSystemExtension/banner/banner.component.scss +12 -2
- package/lib/designSystemExtension/banner/banner.component.ts +0 -1
- package/lib/designSystemExtension/case-create-stage/case-create-stage.component.ts +1 -2
- 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 +7 -35
- 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 +4 -4
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.scss +4 -3
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.ts +10 -2
- package/lib/designSystemExtension/material-summary-item/material-summary-item.component.scss +2 -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 +5 -6
- package/lib/designSystemExtension/pulse/pulse.component.scss +2 -2
- package/lib/designSystemExtension/pulse/pulse.component.ts +7 -8
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +0 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +0 -1
- package/lib/designSystemExtension/wss-quick-create/wss-quick-create.component.scss +16 -8
- 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 +56 -178
- 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 +32 -157
- package/lib/field/currency/currency.component.html +4 -4
- package/lib/field/currency/currency.component.ts +65 -175
- package/lib/field/date/date.component.html +4 -8
- package/lib/field/date/date.component.ts +39 -177
- package/lib/field/date-time/date-time.component.html +3 -4
- package/lib/field/date-time/date-time.component.ts +46 -146
- package/lib/field/decimal/decimal.component.html +4 -3
- package/lib/field/decimal/decimal.component.ts +66 -166
- package/lib/field/dropdown/dropdown.component.html +1 -0
- package/lib/field/dropdown/dropdown.component.ts +158 -153
- package/lib/field/email/email.component.ts +28 -148
- package/lib/field/field.base.ts +149 -0
- package/lib/field/group/group.component.ts +9 -7
- package/lib/field/integer/integer.component.ts +30 -152
- 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 +385 -0
- package/lib/field/multiselect/multiselect.component.ts +56 -151
- 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 +3 -3
- package/lib/field/percentage/percentage.component.ts +68 -161
- package/lib/field/phone/config-ext.json +1 -1
- package/lib/field/phone/phone.component.html +9 -6
- package/lib/field/phone/phone.component.scss +9 -0
- package/lib/field/phone/phone.component.ts +48 -159
- 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 +39 -162
- package/lib/field/rich-text/rich-text.component.ts +32 -93
- package/lib/field/scalar-list/scalar-list.component.ts +20 -77
- 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 +8 -5
- package/lib/field/text-area/text-area.component.html +4 -1
- package/lib/field/text-area/text-area.component.ts +30 -148
- package/lib/field/text-content/text-content.component.ts +0 -1
- package/lib/field/text-input/text-input.component.ts +28 -150
- package/lib/field/time/time.component.html +2 -2
- package/lib/field/time/time.component.ts +39 -145
- package/lib/field/url/url.component.ts +28 -149
- package/lib/field/user-reference/user-reference.component.html +40 -46
- package/lib/field/user-reference/user-reference.component.scss +0 -1
- package/lib/field/user-reference/user-reference.component.ts +110 -21
- package/lib/infra/Containers/flow-container/flow-container.component.html +1 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +29 -54
- 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 +6 -19
- package/lib/infra/Containers/preview-view-container/preview-view-container.component.ts +1 -1
- package/lib/infra/Containers/view-container/helper.ts +55 -0
- package/lib/infra/Containers/view-container/view-container.component.ts +6 -19
- 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 +90 -47
- 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 +24 -16
- package/lib/infra/error-boundary/error-boundary.component.ts +0 -1
- package/lib/infra/multi-step/multi-step.component.scss +1 -21
- package/lib/infra/multi-step/multi-step.component.ts +0 -1
- package/lib/infra/navbar/navbar.component.html +25 -28
- package/lib/infra/navbar/navbar.component.scss +16 -4
- package/lib/infra/navbar/navbar.component.ts +11 -9
- package/lib/infra/reference/reference.component.ts +77 -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 +28 -35
- package/lib/infra/stages/stages.component.html +2 -2
- package/lib/infra/stages/stages.component.scss +9 -37
- package/lib/infra/stages/stages.component.ts +4 -3
- package/lib/infra/view/view.component.html +7 -20
- package/lib/infra/view/view.component.ts +20 -5
- 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 +66 -10
- package/lib/template/banner-page/banner-page.component.ts +0 -1
- package/lib/template/base/details-template-base.ts +67 -0
- package/lib/template/base/form-template-base.ts +16 -0
- package/lib/template/case-summary/case-summary.component.scss +0 -2
- package/lib/template/case-summary/case-summary.component.ts +7 -23
- package/lib/template/case-view/case-view.component.html +7 -7
- package/lib/template/case-view/case-view.component.scss +18 -10
- package/lib/template/case-view/case-view.component.ts +9 -15
- package/lib/template/confirmation/confirmation.component.html +1 -1
- package/lib/template/confirmation/confirmation.component.ts +1 -2
- package/lib/template/data-reference/data-reference-advanced-search.service.ts +16 -0
- package/lib/template/data-reference/data-reference.component.html +11 -8
- package/lib/template/data-reference/data-reference.component.ts +377 -148
- 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.html +0 -4
- package/lib/template/default-form/default-form.component.ts +50 -26
- 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 +7 -42
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +6 -40
- package/lib/template/details-one-column/details-one-column.component.ts +7 -43
- 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 -38
- package/lib/template/details-three-column/details-three-column.component.ts +7 -44
- package/lib/template/details-two-column/details-two-column.component.ts +8 -45
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +7 -43
- 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-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 +68 -48
- package/lib/template/field-value-list/field-value-list.component.html +2 -2
- package/lib/template/field-value-list/field-value-list.component.scss +6 -1
- 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 +2 -3
- package/lib/template/list-page/list-page.component.ts +0 -1
- package/lib/template/list-view/list-view.component.html +14 -4
- package/lib/template/list-view/list-view.component.scss +30 -19
- package/lib/template/list-view/list-view.component.ts +179 -95
- package/lib/template/list-view/listViewHelpers.ts +4 -10
- 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 +1 -2
- 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 +4 -4
- 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 +1 -2
- package/lib/template/page/page.component.ts +1 -2
- package/lib/template/promoted-filters/promoted-filters.component.ts +1 -2
- package/lib/template/repeating-structures/repeating-structures.component.ts +1 -3
- package/lib/template/self-service-case-view/self-service-case-view.component.html +80 -0
- package/lib/template/self-service-case-view/self-service-case-view.component.scss +124 -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 +216 -0
- package/lib/template/simple-table/simple-table.component.ts +0 -2
- package/lib/template/simple-table-manual/helpers.ts +127 -11
- package/lib/template/simple-table-manual/simple-table-manual.component.html +27 -8
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +16 -17
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +118 -58
- package/lib/template/simple-table-select/simple-table-select.component.ts +3 -4
- 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 +4 -4
- package/lib/template/three-column-page/three-column-page.component.ts +0 -1
- package/lib/template/two-column/two-column.component.ts +4 -4
- package/lib/template/two-column-page/two-column-page.component.ts +0 -1
- package/lib/template/two-column-tab/two-column-tab.component.ts +1 -2
- package/lib/template/utils.ts +58 -0
- package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +4 -4
- package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +1 -2
- package/lib/template/wss-nav-bar/wss-nav-bar.component.html +5 -4
- package/lib/template/wss-nav-bar/wss-nav-bar.component.scss +2 -8
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +3 -11
- 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 +2 -5
- package/lib/widget/attachment/attachment.component.ts +256 -259
- 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 +9 -12
- package/lib/widget/file-utility/file-utility.component.html +3 -3
- package/lib/widget/file-utility/file-utility.component.scss +5 -16
- package/lib/widget/file-utility/file-utility.component.ts +2 -6
- package/lib/widget/list-utility/list-utility.component.scss +3 -5
- package/lib/widget/list-utility/list-utility.component.ts +0 -1
- package/lib/widget/quick-create/quick-create.component.ts +0 -1
- package/lib/widget/todo/todo.component.html +13 -11
- package/lib/widget/todo/todo.component.scss +19 -11
- package/lib/widget/todo/todo.component.ts +101 -87
- package/lib/widget/utility/utility.component.ts +0 -1
- package/package.json +1 -1
|
@@ -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, AfterViewInit } 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,35 +22,36 @@ 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
|
-
export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges {
|
|
34
|
+
export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {
|
|
32
35
|
@Input() configProps$: FieldGroupTemplateProps;
|
|
33
36
|
@Input() pConn$: typeof PConnect;
|
|
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: number;
|
|
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
|
|
@@ -58,9 +62,21 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
58
62
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
59
63
|
this.updateSelf();
|
|
60
64
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
this.menuIconOverride$ = this.utils.getImageSrc('trash', this.utils.getSDKStaticContentUrl());
|
|
66
|
+
|
|
67
|
+
const { allowActions, allowTableEdit, referenceList } = this.configProps$;
|
|
68
|
+
|
|
69
|
+
if (allowActions && Object.keys(allowActions).length > 0) {
|
|
70
|
+
this.allowAdd = allowActions.allowAdd ?? allowTableEdit ?? true;
|
|
71
|
+
this.allowEdit = allowActions.allowEdit ?? true;
|
|
72
|
+
this.allowDelete = allowActions.allowDelete ?? allowTableEdit ?? true;
|
|
73
|
+
} else {
|
|
74
|
+
this.allowAdd = allowTableEdit ?? true;
|
|
75
|
+
this.allowDelete = allowTableEdit ?? true;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (referenceList?.length === 0 && (this.allowAdd || this.allowEdit)) {
|
|
79
|
+
this.pConn$.getListActions().insert({ classID: this.contextClass }, referenceList.length);
|
|
64
80
|
}
|
|
65
81
|
}
|
|
66
82
|
|
|
@@ -85,56 +101,57 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
85
101
|
const props = changes.configProps$;
|
|
86
102
|
if (props.currentValue !== props.previousValue) {
|
|
87
103
|
this.configProps$ = props.currentValue;
|
|
104
|
+
|
|
88
105
|
if (changes?.pConn$?.currentValue) {
|
|
89
106
|
this.pConn$ = changes?.pConn$?.currentValue;
|
|
90
107
|
}
|
|
108
|
+
|
|
91
109
|
this.updateSelf();
|
|
92
110
|
}
|
|
93
111
|
}
|
|
94
112
|
}
|
|
95
113
|
|
|
114
|
+
ngAfterViewInit() {
|
|
115
|
+
const resolvedList = getReferenceList(this.pConn$);
|
|
116
|
+
// @ts-ignore - Expected 3 arguments, but got 1
|
|
117
|
+
this.pConn$.getListActions().initDefaultPageInstructions(resolvedList);
|
|
118
|
+
}
|
|
119
|
+
|
|
96
120
|
updateSelf() {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
this.contextClass =
|
|
110
|
-
|
|
111
|
-
this.
|
|
112
|
-
|
|
121
|
+
const inheritedProps: any = this.pConn$.getInheritedProps();
|
|
122
|
+
|
|
123
|
+
const { label, hideLabel, allowRowDelete, referenceList, fieldHeader, renderMode, displayMode, heading, contextClass, lookForChildInConfig } =
|
|
124
|
+
this.configProps$;
|
|
125
|
+
|
|
126
|
+
// label within inheritedProps takes precedence over configProps
|
|
127
|
+
this.label$ = inheritedProps.label || label;
|
|
128
|
+
|
|
129
|
+
this.showLabel$ = referenceList?.length === 0 || !hideLabel;
|
|
130
|
+
|
|
131
|
+
this.readonlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY';
|
|
132
|
+
|
|
133
|
+
this.contextClass = contextClass;
|
|
134
|
+
this.heading = heading ?? 'Row';
|
|
135
|
+
this.fieldHeader = fieldHeader;
|
|
136
|
+
|
|
113
137
|
const resolvedList = getReferenceList(this.pConn$);
|
|
114
|
-
this.pageReference = `${this.pConn$.getPageReference()}${resolvedList}`;
|
|
115
138
|
this.pConn$.setReferenceList(resolvedList);
|
|
139
|
+
|
|
116
140
|
if (this.readonlyMode) {
|
|
117
|
-
this.pConn$.setInheritedProp('displayMode', '
|
|
141
|
+
this.pConn$.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
118
142
|
}
|
|
119
|
-
|
|
120
|
-
if (this.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if (this.referenceList?.length === 0 && this.allowAddEdit !== false) {
|
|
124
|
-
this.addFieldGroupItem();
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
const children: any = [];
|
|
128
|
-
this.referenceList?.forEach((item, index) => {
|
|
129
|
-
children.push({
|
|
143
|
+
|
|
144
|
+
if (this.referenceListLength != referenceList?.length) {
|
|
145
|
+
this.children = referenceList?.map((item, index) => {
|
|
146
|
+
return {
|
|
130
147
|
id: index,
|
|
131
148
|
name: this.fieldHeader === 'propertyRef' ? this.getDynamicHeader(item, index) : this.getStaticHeader(this.heading, index),
|
|
132
|
-
children: buildView(this.pConn$, index, lookForChildInConfig)
|
|
133
|
-
|
|
149
|
+
children: buildView(this.pConn$, index, lookForChildInConfig),
|
|
150
|
+
allowRowDelete: evaluateAllowRowAction(allowRowDelete, item)
|
|
151
|
+
};
|
|
134
152
|
});
|
|
135
|
-
this.children = children;
|
|
136
153
|
}
|
|
137
|
-
this.
|
|
154
|
+
this.referenceListLength = referenceList?.length || 0;
|
|
138
155
|
}
|
|
139
156
|
|
|
140
157
|
getStaticHeader = (heading, index) => {
|
|
@@ -149,12 +166,15 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
149
166
|
};
|
|
150
167
|
|
|
151
168
|
addFieldGroupItem() {
|
|
152
|
-
|
|
153
|
-
this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length);
|
|
169
|
+
this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceListLength);
|
|
154
170
|
}
|
|
155
171
|
|
|
156
172
|
deleteFieldGroupItem(index) {
|
|
157
|
-
// @ts-ignore - second parameter "pageRef" is optional for deleteEntry method
|
|
158
173
|
this.pConn$.getListActions().deleteEntry(index);
|
|
159
174
|
}
|
|
175
|
+
|
|
176
|
+
getAddBtnLabel() {
|
|
177
|
+
const { targetClassLabel } = this.configProps$;
|
|
178
|
+
return targetClassLabel ? `+ Add ${targetClassLabel}` : '+ Add';
|
|
179
|
+
}
|
|
160
180
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<div *ngIf="displayMode$ === '
|
|
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>
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
column-gap: calc(2 * 0.5rem);
|
|
5
5
|
row-gap: calc(2 * 0.5rem);
|
|
6
6
|
align-items: start;
|
|
7
|
+
padding-block: 8px;
|
|
8
|
+
}
|
|
9
|
+
.psdk-container-nolabels {
|
|
10
|
+
align-items: start;
|
|
11
|
+
padding-block: 8px;
|
|
7
12
|
}
|
|
8
13
|
.psdk-value {
|
|
9
14
|
margin: 8px 0px;
|
|
@@ -14,5 +19,5 @@
|
|
|
14
19
|
font-size: 1.25rem;
|
|
15
20
|
}
|
|
16
21
|
.psdk-val-labels-left {
|
|
17
|
-
|
|
22
|
+
white-space: break-spaces;
|
|
18
23
|
}
|
|
@@ -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 {
|
|
@@ -45,8 +44,8 @@ export class InlineDashboardPageComponent implements OnInit, OnChanges {
|
|
|
45
44
|
|
|
46
45
|
updateSelf() {
|
|
47
46
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as InlineDashboardPageProps;
|
|
48
|
-
const arChildren$ = this.pConn$.getChildren()
|
|
49
|
-
const allFilters =
|
|
47
|
+
const arChildren$ = this.pConn$.getChildren();
|
|
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 {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<div class="psdk-list-header">
|
|
2
2
|
<div>
|
|
3
|
+
<h3 *ngIf="label" class="label" style="font-weight: bold">
|
|
4
|
+
{{ label }} <span class="results-count">{{ getResultsText() }}</span>
|
|
5
|
+
</h3>
|
|
3
6
|
<mat-form-field class="psdk-search" *ngIf="bShowSearch$">
|
|
4
7
|
<mat-label><img class="psdk-icon-search" src="{{ searchIcon$ }}" /> <span class="psdk-search-label">Search</span> </mat-label>
|
|
5
8
|
<input matInput id="search" (keyup)="applySearch($event)" placeholder="" />
|
|
@@ -170,14 +173,21 @@
|
|
|
170
173
|
<tr mat-row *matRowDef="let row; columns: displayedColumns$"></tr>
|
|
171
174
|
</table>
|
|
172
175
|
<div *ngIf="repeatListData?.length === 0">
|
|
173
|
-
<table id="list-view"
|
|
174
|
-
|
|
175
|
-
|
|
176
|
+
<table id="list-view" mat-table [dataSource]="[]">
|
|
177
|
+
<!-- Define columns for headers -->
|
|
178
|
+
<ng-container *ngFor="let col of displayedColumns$" [matColumnDef]="col">
|
|
179
|
+
<th mat-header-cell *matHeaderCellDef>
|
|
180
|
+
{{ getValue(col) }}
|
|
181
|
+
</th>
|
|
176
182
|
</ng-container>
|
|
183
|
+
|
|
184
|
+
<!-- Render only header row -->
|
|
177
185
|
<tr mat-header-row *matHeaderRowDef="displayedColumns$"></tr>
|
|
178
186
|
</table>
|
|
179
187
|
</div>
|
|
180
|
-
<div class="psdk-no-records" *ngIf="repeatListData?.length === 0">
|
|
188
|
+
<div class="psdk-no-records" *ngIf="repeatListData?.length === 0">
|
|
189
|
+
{{ utils.getGenericFieldsLocalizedValue('COSMOSFIELDS.lists', 'No records found.') }}
|
|
190
|
+
</div>
|
|
181
191
|
</div>
|
|
182
192
|
</div>
|
|
183
193
|
</div>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
.psdk-list-header {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
border-radius: 0.6125rem;
|
|
2
|
+
border: 1px solid var(--mat-sys-outline-variant);
|
|
3
|
+
background-color: var(--mat-sys-surface-container);
|
|
4
|
+
padding: 0.5rem 0rem;
|
|
6
5
|
}
|
|
7
6
|
|
|
8
7
|
table {
|
|
9
8
|
width: 100%;
|
|
9
|
+
border-bottom: 1px solid var(--app-neutral-light-color);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
::ng-deep .mat-sort-header-content {
|
|
@@ -69,6 +69,7 @@ td.mat-mdc-footer-cell {
|
|
|
69
69
|
padding: 0.125rem 0.125rem;
|
|
70
70
|
min-width: unset;
|
|
71
71
|
width: 1.1rem;
|
|
72
|
+
margin-right: 1rem;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
.psdk-outer-div-in-form {
|
|
@@ -110,11 +111,11 @@ td.mat-mdc-footer-cell {
|
|
|
110
111
|
display: table;
|
|
111
112
|
margin: auto;
|
|
112
113
|
min-width: 100px;
|
|
113
|
-
background-color: var(--
|
|
114
|
-
border: 1px solid var(--
|
|
114
|
+
background-color: var(--mat-sys-surface);
|
|
115
|
+
border: 1px solid var(--mat-sys-outline-variant);
|
|
115
116
|
border-radius: 10px;
|
|
116
117
|
padding: 20px;
|
|
117
|
-
box-shadow: 0 0 10px 3px var(--
|
|
118
|
+
box-shadow: 0 0 10px 3px var(--mat-sys-level3);
|
|
118
119
|
position: absolute;
|
|
119
120
|
z-index: 99;
|
|
120
121
|
}
|
|
@@ -126,7 +127,7 @@ td.mat-mdc-footer-cell {
|
|
|
126
127
|
align-items: center;
|
|
127
128
|
height: 100%;
|
|
128
129
|
width: 100%;
|
|
129
|
-
background-color:
|
|
130
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
130
131
|
position: fixed;
|
|
131
132
|
z-index: 999;
|
|
132
133
|
top: 0px;
|
|
@@ -137,11 +138,11 @@ td.mat-mdc-footer-cell {
|
|
|
137
138
|
display: table;
|
|
138
139
|
margin: auto;
|
|
139
140
|
min-width: 150px;
|
|
140
|
-
background-color: var(--
|
|
141
|
-
border: 1px solid var(--
|
|
141
|
+
background-color: var(--mat-sys-surface-container);
|
|
142
|
+
border: 1px solid var(--mat-sys-outline-variant);
|
|
142
143
|
border-radius: 10px;
|
|
143
144
|
padding: 20px;
|
|
144
|
-
box-shadow: 0 0 10px 3px var(--
|
|
145
|
+
box-shadow: 0 0 10px 3px var(--mat-sys-level3);
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
tr.mat-mdc-row {
|
|
@@ -153,15 +154,25 @@ tr.mat-mdc-row {
|
|
|
153
154
|
justify-content: center;
|
|
154
155
|
display: flex;
|
|
155
156
|
align-items: center;
|
|
156
|
-
border: 1px solid var(--
|
|
157
|
+
border: 1px solid var(--mat-sys-outline-variant);
|
|
157
158
|
border-top: none;
|
|
158
159
|
}
|
|
159
160
|
|
|
160
|
-
.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
161
|
+
.results-count {
|
|
162
|
+
opacity: 0.7;
|
|
163
|
+
font-size: 0.8rem;
|
|
164
|
+
font-weight: bold;
|
|
165
|
+
margin-inline-start: 0.625rem;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.label {
|
|
169
|
+
margin: 8px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
::ng-deep th.mat-mdc-header-cell,
|
|
173
|
+
td.mat-mdc-cell,
|
|
174
|
+
td.mat-mdc-footer-cell {
|
|
175
|
+
border-right: 1px solid var(--app-neutral-light-color);
|
|
176
|
+
padding: 8px !important;
|
|
177
|
+
// min-width: 10rem;
|
|
167
178
|
}
|