@pega/angular-sdk-overrides 24.2.10 → 24.2.12
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/material-case-summary/material-case-summary.component.ts +0 -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 +6 -0
- package/lib/designSystemExtension/operator/operator.component.html +1 -1
- package/lib/designSystemExtension/operator/operator.component.scss +10 -2
- package/lib/designSystemExtension/operator/operator.component.ts +4 -3
- package/lib/field/auto-complete/auto-complete.component.html +0 -1
- package/lib/field/auto-complete/auto-complete.component.ts +15 -2
- package/lib/field/check-box/check-box.component.html +4 -0
- package/lib/field/currency/currency.component.ts +19 -13
- package/lib/field/date/date.component.html +2 -1
- package/lib/field/date-time/date-time.component.html +2 -2
- package/lib/field/date-time/date-time.component.ts +17 -3
- package/lib/field/decimal/decimal.component.html +1 -0
- package/lib/field/decimal/decimal.component.ts +38 -15
- package/lib/field/dropdown/dropdown.component.html +1 -0
- package/lib/field/dropdown/dropdown.component.ts +18 -4
- package/lib/field/email/email.component.ts +17 -7
- package/lib/field/integer/integer.component.html +1 -1
- package/lib/field/integer/integer.component.ts +16 -6
- 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 -2
- package/lib/field/percentage/percentage.component.html +1 -1
- package/lib/field/percentage/percentage.component.ts +27 -17
- package/lib/field/phone/config-ext.json +1 -1
- package/lib/field/phone/phone.component.html +3 -1
- package/lib/field/phone/phone.component.ts +6 -13
- package/lib/field/radio-buttons/radio-buttons.component.html +3 -6
- package/lib/field/rich-text/rich-text.component.ts +12 -3
- package/lib/field/text/text.component.ts +6 -4
- package/lib/field/text-area/text-area.component.html +4 -2
- package/lib/field/text-area/text-area.component.ts +16 -6
- package/lib/field/text-input/text-input.component.html +1 -1
- package/lib/field/text-input/text-input.component.ts +16 -6
- package/lib/field/time/time.component.html +2 -2
- package/lib/field/time/time.component.ts +21 -6
- package/lib/field/url/url.component.html +1 -1
- package/lib/field/url/url.component.ts +16 -6
- package/lib/field/user-reference/user-reference.component.html +40 -38
- package/lib/field/user-reference/user-reference.component.ts +70 -7
- package/lib/infra/Containers/flow-container/flow-container.component.ts +17 -43
- package/lib/infra/Containers/flow-container/helpers.ts +2 -2
- 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 +0 -7
- package/lib/infra/action-buttons/action-buttons.component.html +1 -1
- package/lib/infra/assignment/assignment.component.html +1 -1
- package/lib/infra/assignment/assignment.component.ts +82 -39
- package/lib/infra/assignment-card/assignment-card.component.html +1 -0
- package/lib/infra/defer-load/defer-load.component.ts +4 -1
- package/lib/infra/navbar/navbar.component.ts +0 -2
- package/lib/infra/reference/reference.component.ts +77 -90
- package/lib/infra/root-container/root-container.component.html +2 -15
- package/lib/infra/root-container/root-container.component.ts +24 -27
- package/lib/template/base/form-template-base.ts +6 -0
- package/lib/template/confirmation/confirmation.component.html +1 -1
- package/lib/template/default-form/default-form.component.ts +35 -2
- 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 -41
- 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/list-view/list-view.component.html +3 -1
- package/lib/template/list-view/list-view.component.ts +1 -3
- package/lib/template/list-view/listViewHelpers.ts +2 -5
- package/lib/template/list-view/utils.ts +2 -5
- package/lib/template/simple-table-manual/helpers.ts +9 -7
- package/lib/template/simple-table-manual/simple-table-manual.component.html +25 -6
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +11 -3
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +62 -24
- package/lib/template/utils.ts +16 -0
- package/lib/widget/feed-container/feed-container.component.ts +0 -2
- package/lib/widget/todo/todo.component.html +4 -5
- package/lib/widget/todo/todo.component.scss +9 -0
- package/lib/widget/todo/todo.component.ts +4 -3
- package/package.json +1 -1
package/lib/template/utils.ts
CHANGED
|
@@ -21,3 +21,19 @@ export function filterForFieldValueList(fields: any) {
|
|
|
21
21
|
value
|
|
22
22
|
}));
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* This method evaluates whether a row action is allowed based on the provided conditions.
|
|
27
|
+
* @param {string|boolean|undefined} allowRowDelete - The condition for allowing row deletion.
|
|
28
|
+
* @param {object} rowData - The data of the row being evaluated.
|
|
29
|
+
* @returns {boolean} - Returns true if the row action is allowed, false otherwise.
|
|
30
|
+
*/
|
|
31
|
+
export const evaluateAllowRowAction = (allowRowDelete, rowData) => {
|
|
32
|
+
if (allowRowDelete === undefined || allowRowDelete === true) return true;
|
|
33
|
+
if (allowRowDelete.startsWith?.('@E ')) {
|
|
34
|
+
const expression = allowRowDelete.replace('@E ', '');
|
|
35
|
+
// @ts-ignore - Expected 3 arguments, but got 2
|
|
36
|
+
return PCore.getExpressionEngine().evaluate(expression, rowData);
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
};
|
|
@@ -9,8 +9,6 @@ import isEqual from 'fast-deep-equal';
|
|
|
9
9
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
10
10
|
import { Utils } from '@pega/angular-sdk-components';
|
|
11
11
|
|
|
12
|
-
declare const window: any;
|
|
13
|
-
|
|
14
12
|
@Component({
|
|
15
13
|
selector: 'app-feed-container',
|
|
16
14
|
templateUrl: './feed-container.component.html',
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<div class="psdk-todo">
|
|
2
|
-
<div class="psdk-todo-header">
|
|
3
|
-
<div
|
|
2
|
+
<div *ngIf="showTodoList$" class="psdk-todo-header">
|
|
3
|
+
<div class="psdk-avatar">{{ this.currentUserInitials$ }}</div>
|
|
4
4
|
<div id="worklist" class="psdk-todo-text">{{ headerText$ }}</div>
|
|
5
|
-
<div
|
|
5
|
+
<div class="psdk-assignment-count">{{ count }}</div>
|
|
6
6
|
</div>
|
|
7
|
-
<br /><br />
|
|
8
7
|
<div *ngIf="showTodoList$" class="psdk-display-divider"></div>
|
|
9
8
|
|
|
10
9
|
<div class="psdk-todo-assignments">
|
|
@@ -27,7 +26,7 @@
|
|
|
27
26
|
</div>
|
|
28
27
|
</div>
|
|
29
28
|
</div>
|
|
30
|
-
<div class="psdk-todo-assignment-action"
|
|
29
|
+
<div *ngIf="!isConfirm || canPerform" class="psdk-todo-assignment-action">
|
|
31
30
|
<button mat-flat-button color="primary" (click)="clickGo(assignment)">{{ localizedVal('Go', localeCategory) }}</button>
|
|
32
31
|
</div>
|
|
33
32
|
</div>
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
.psdk-todo-assignments > *:last-child {
|
|
2
|
+
.psdk-display-divider {
|
|
3
|
+
display: none;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
.psdk-display-divider {
|
|
2
8
|
border-bottom: 0.0625rem solid var(--app-neutral-light-color);
|
|
9
|
+
margin-block: 0.5rem;
|
|
3
10
|
}
|
|
4
11
|
|
|
5
12
|
.psdk-todo {
|
|
@@ -12,6 +19,7 @@
|
|
|
12
19
|
|
|
13
20
|
.psdk-todo-header {
|
|
14
21
|
display: inline-flex;
|
|
22
|
+
margin-bottom: 1rem;
|
|
15
23
|
}
|
|
16
24
|
|
|
17
25
|
.psdk-todo-text {
|
|
@@ -58,6 +66,7 @@
|
|
|
58
66
|
display: inline-flex;
|
|
59
67
|
width: 100%;
|
|
60
68
|
padding: 0.625rem 0rem;
|
|
69
|
+
align-items: center;
|
|
61
70
|
}
|
|
62
71
|
|
|
63
72
|
.psdk-todo-assignment-data {
|
|
@@ -91,7 +91,6 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
91
91
|
localeCategory = 'Todo';
|
|
92
92
|
showlessLocalizedValue = this.localizedVal('show_less', 'CosmosFields');
|
|
93
93
|
showMoreLocalizedValue = this.localizedVal('show_more', 'CosmosFields');
|
|
94
|
-
canPerform: boolean;
|
|
95
94
|
count: number;
|
|
96
95
|
|
|
97
96
|
constructor(
|
|
@@ -119,6 +118,10 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
119
118
|
PCore.getPubSubUtils().unsubscribe(CREATE_STAGE_DELETED, CREATE_STAGE_DELETED);
|
|
120
119
|
}
|
|
121
120
|
|
|
121
|
+
get canPerform() {
|
|
122
|
+
return this.assignmentsSource$?.[0]?.canPerform === 'true' || this.assignmentsSource$?.[0]?.canPerform === true;
|
|
123
|
+
}
|
|
124
|
+
|
|
122
125
|
updateList() {
|
|
123
126
|
const {
|
|
124
127
|
WORK_BASKET: {
|
|
@@ -156,8 +159,6 @@ export class TodoComponent implements OnInit, OnDestroy {
|
|
|
156
159
|
}
|
|
157
160
|
}
|
|
158
161
|
|
|
159
|
-
this.canPerform = this.arAssignments$?.[0]?.canPerform === 'true' || this.arAssignments$?.[0]?.canPerform === true;
|
|
160
|
-
|
|
161
162
|
this.currentUser$ = PCore.getEnvironmentInfo().getOperatorName();
|
|
162
163
|
this.currentUserInitials$ = this.utils.getInitials(this.currentUser$ ?? '');
|
|
163
164
|
}
|