@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
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</mat-menu>
|
|
28
28
|
</div>
|
|
29
29
|
</th>
|
|
30
|
-
<td mat-cell *matCellDef="let element">{{ element[dCol.config.name] }}</td>
|
|
30
|
+
<td mat-cell *matCellDef="let element">{{ element[dCol.config.name] || '---' }}</td>
|
|
31
31
|
</ng-container>
|
|
32
32
|
<ng-container matColumnDef="DeleteIcon">
|
|
33
33
|
<div *ngIf="allowEditingInModal">
|
|
@@ -45,6 +45,7 @@ interface SimpleTableManualProps {
|
|
|
45
45
|
displayMode?: string;
|
|
46
46
|
useSeparateViewForEdit: any;
|
|
47
47
|
viewForEditModal: any;
|
|
48
|
+
targetClassLabel: string;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
class Group {
|
|
@@ -157,6 +158,9 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
157
158
|
editView: any;
|
|
158
159
|
settingsSvgIcon$: string;
|
|
159
160
|
|
|
161
|
+
isInitialized = false;
|
|
162
|
+
targetClassLabel: string;
|
|
163
|
+
|
|
160
164
|
constructor(
|
|
161
165
|
private angularPConnect: AngularPConnectService,
|
|
162
166
|
private utils: Utils,
|
|
@@ -164,6 +168,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
164
168
|
) {}
|
|
165
169
|
|
|
166
170
|
ngOnInit(): void {
|
|
171
|
+
this.isInitialized = true;
|
|
167
172
|
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
168
173
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
169
174
|
this.configProps$ = this.pConn$.getConfigProps() as SimpleTableManualProps;
|
|
@@ -216,7 +221,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
216
221
|
// but getRawMetadata() has each child.config with datasource and value showing their unresolved values (ex: "@P thePropName")
|
|
217
222
|
// We need to use the prop name as the "glue" to tie the Angular Material table dataSource, displayColumns and data together.
|
|
218
223
|
// So, in the code below, we'll use the unresolved config.value (but replacing the space with an underscore to keep things happy)
|
|
219
|
-
const rawMetadata
|
|
224
|
+
const rawMetadata = this.pConn$.getRawMetadata();
|
|
220
225
|
|
|
221
226
|
// Adapted from Nebula
|
|
222
227
|
const {
|
|
@@ -234,22 +239,21 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
234
239
|
editModeConfig,
|
|
235
240
|
displayMode,
|
|
236
241
|
useSeparateViewForEdit,
|
|
237
|
-
viewForEditModal
|
|
242
|
+
viewForEditModal,
|
|
243
|
+
targetClassLabel
|
|
238
244
|
} = this.configProps$;
|
|
239
245
|
|
|
240
246
|
this.referenceListStr = getContext(this.pConn$).referenceListStr;
|
|
241
247
|
this.label = labelProp || propertyLabel;
|
|
242
248
|
this.parameters = fieldMetadata?.datasource?.parameters;
|
|
243
|
-
|
|
249
|
+
this.targetClassLabel = targetClassLabel;
|
|
244
250
|
const hideAddRow = allowTableEdit === false;
|
|
245
251
|
const hideDeleteRow = allowTableEdit === false;
|
|
246
252
|
let { contextClass } = this.configProps$;
|
|
247
253
|
this.referenceList = referenceList;
|
|
248
254
|
if (!contextClass) {
|
|
249
|
-
// @ts-ignore - Property 'getComponentConfig' is private and only accessible within class 'C11nEnv'
|
|
250
255
|
let listName = this.pConn$.getComponentConfig().referenceList;
|
|
251
256
|
listName = PCore.getAnnotationUtils().getPropertyName(listName);
|
|
252
|
-
// @ts-ignore - Property 'getFieldMetadata' is private and only accessible within class 'C11nEnv'
|
|
253
257
|
contextClass = this.pConn$.getFieldMetadata(listName)?.pageClass;
|
|
254
258
|
}
|
|
255
259
|
this.contextClass = contextClass;
|
|
@@ -261,7 +265,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
261
265
|
// config.value (ex: "@P .DeclarantChoice") or
|
|
262
266
|
// config.datasource (ex: "@ASSOCIATED .DeclarantChoice")
|
|
263
267
|
// Neither of these appear in the resolved (this.configProps$)
|
|
264
|
-
const rawConfig = rawMetadata?.config;
|
|
268
|
+
const rawConfig: any = rawMetadata?.config;
|
|
265
269
|
const rawFields = rawConfig?.children?.[0]?.children || rawConfig?.presets?.[0].children?.[0]?.children;
|
|
266
270
|
this.rawFields = rawFields;
|
|
267
271
|
// At this point, fields has resolvedFields and rawFields we can use
|
|
@@ -300,6 +304,8 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
300
304
|
// Nebula and we may not end up using it all.
|
|
301
305
|
this.fieldDefs = buildFieldsForTable(rawFields, resolvedFields, showDeleteButton);
|
|
302
306
|
|
|
307
|
+
this.initializeDefaultPageInstructions();
|
|
308
|
+
|
|
303
309
|
// end of from Nebula
|
|
304
310
|
|
|
305
311
|
// Here, we use the "name" field in fieldDefs since that has the assoicated property
|
|
@@ -348,9 +354,24 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
348
354
|
// ties the 3 data structures together.
|
|
349
355
|
}
|
|
350
356
|
|
|
357
|
+
initializeDefaultPageInstructions() {
|
|
358
|
+
if (this.isInitialized) {
|
|
359
|
+
this.isInitialized = false;
|
|
360
|
+
if (this.allowEditingInModal) {
|
|
361
|
+
this.pConn$.getListActions().initDefaultPageInstructions(
|
|
362
|
+
this.pConn$.getReferenceList(),
|
|
363
|
+
this.fieldDefs.filter(item => item.name).map(item => item.name)
|
|
364
|
+
);
|
|
365
|
+
} else {
|
|
366
|
+
// @ts-ignore - An argument for 'propertyNames' was not provided.
|
|
367
|
+
this.pConn$.getListActions().initDefaultPageInstructions(this.pConn$.getReferenceList());
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
351
372
|
getResultsText() {
|
|
352
373
|
const recordsCount = this.readOnlyMode ? this.rowData?.data.length : this.referenceList?.length;
|
|
353
|
-
return `${recordsCount} result${recordsCount > 1 ? 's' : ''}`;
|
|
374
|
+
return `${recordsCount || 0} result${recordsCount > 1 ? 's' : ''}`;
|
|
354
375
|
}
|
|
355
376
|
|
|
356
377
|
sortCompare(a, b): number {
|
|
@@ -369,13 +390,28 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
369
390
|
}
|
|
370
391
|
}
|
|
371
392
|
|
|
372
|
-
|
|
373
|
-
|
|
393
|
+
//
|
|
394
|
+
switch (this.arrowDirection) {
|
|
395
|
+
case 'up':
|
|
396
|
+
if (!aValue || aValue < bValue) {
|
|
397
|
+
return -1;
|
|
398
|
+
}
|
|
399
|
+
if (!bValue || aValue > bValue) {
|
|
400
|
+
return 1;
|
|
401
|
+
}
|
|
402
|
+
break;
|
|
403
|
+
case 'down':
|
|
404
|
+
if (!bValue || aValue > bValue) {
|
|
405
|
+
return -1;
|
|
406
|
+
}
|
|
407
|
+
if (!aValue || aValue < bValue) {
|
|
408
|
+
return 1;
|
|
409
|
+
}
|
|
410
|
+
break;
|
|
411
|
+
default:
|
|
412
|
+
break;
|
|
374
413
|
}
|
|
375
414
|
|
|
376
|
-
if (this.arrowDirection === 'up') return aValue - bValue;
|
|
377
|
-
if (this.arrowDirection === 'down') return bValue - aValue;
|
|
378
|
-
|
|
379
415
|
return 0;
|
|
380
416
|
}
|
|
381
417
|
|
|
@@ -884,17 +920,19 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
884
920
|
.getActionsApi()
|
|
885
921
|
.openEmbeddedDataModal(
|
|
886
922
|
this.defaultView,
|
|
887
|
-
this.pConn
|
|
923
|
+
this.pConn$ as any,
|
|
888
924
|
this.referenceListStr,
|
|
889
925
|
this.referenceList.length,
|
|
890
|
-
PCore.getConstants().RESOURCE_STATUS.CREATE
|
|
926
|
+
PCore.getConstants().RESOURCE_STATUS.CREATE,
|
|
927
|
+
this.targetClassLabel
|
|
891
928
|
);
|
|
892
|
-
} else if (PCore.getPCoreVersion()?.includes('8.7')) {
|
|
893
|
-
this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length, this.pageReference);
|
|
894
929
|
} else {
|
|
895
|
-
// @ts-ignore - second parameter "pageRef" is optional for insert method
|
|
896
930
|
this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length);
|
|
897
931
|
}
|
|
932
|
+
|
|
933
|
+
this.pConn$.clearErrorMessages({
|
|
934
|
+
property: this.pConn$.getStateProps()?.referenceList?.substring(1)
|
|
935
|
+
});
|
|
898
936
|
}
|
|
899
937
|
|
|
900
938
|
editRecord(data, index) {
|
|
@@ -903,21 +941,17 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
903
941
|
.getActionsApi()
|
|
904
942
|
.openEmbeddedDataModal(
|
|
905
943
|
this.bUseSeparateViewForEdit ? this.editView : this.defaultView,
|
|
906
|
-
this.pConn
|
|
944
|
+
this.pConn$ as any,
|
|
907
945
|
this.referenceListStr,
|
|
908
946
|
index,
|
|
909
|
-
PCore.getConstants().RESOURCE_STATUS.UPDATE
|
|
947
|
+
PCore.getConstants().RESOURCE_STATUS.UPDATE,
|
|
948
|
+
this.targetClassLabel
|
|
910
949
|
);
|
|
911
950
|
}
|
|
912
951
|
}
|
|
913
952
|
|
|
914
953
|
deleteRecord(index) {
|
|
915
|
-
|
|
916
|
-
this.pConn$.getListActions().deleteEntry(index, this.pageReference);
|
|
917
|
-
} else {
|
|
918
|
-
// @ts-ignore - second parameter "pageRef" is optional for deleteEntry method
|
|
919
|
-
this.pConn$.getListActions().deleteEntry(index);
|
|
920
|
-
}
|
|
954
|
+
this.pConn$.getListActions().deleteEntry(index);
|
|
921
955
|
}
|
|
922
956
|
|
|
923
957
|
buildElementsForTable() {
|
|
@@ -928,9 +962,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
928
962
|
this.rawFields?.forEach(item => {
|
|
929
963
|
const referenceListData = getReferenceList(this.pConn$);
|
|
930
964
|
const isDatapage = referenceListData.startsWith('D_');
|
|
931
|
-
const pageReferenceValue = isDatapage
|
|
932
|
-
? `${referenceListData}[${index}]`
|
|
933
|
-
: `${this.pConn$.getPageReference()}${referenceListData.substring(referenceListData.lastIndexOf('.'))}[${index}]`;
|
|
965
|
+
const pageReferenceValue = isDatapage ? `${referenceListData}[${index}]` : `${this.pConn$.getPageReference()}${referenceListData}[${index}]`;
|
|
934
966
|
const config = {
|
|
935
967
|
meta: item,
|
|
936
968
|
options: {
|
|
@@ -57,7 +57,7 @@ export class SimpleTableSelectComponent implements OnInit, OnDestroy {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
updateSelf() {
|
|
60
|
-
const theConfigProps
|
|
60
|
+
const theConfigProps = this.pConn$.getConfigProps();
|
|
61
61
|
this.label = theConfigProps.label;
|
|
62
62
|
this.renderMode = theConfigProps.renderMode;
|
|
63
63
|
this.showLabel = theConfigProps.showLabel;
|
|
@@ -71,7 +71,7 @@ export class SimpleTableSelectComponent implements OnInit, OnDestroy {
|
|
|
71
71
|
this.propsToUse.label = '';
|
|
72
72
|
}
|
|
73
73
|
const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;
|
|
74
|
-
const { selectionMode, selectionList }
|
|
74
|
+
const { selectionMode, selectionList } = this.pConn$.getConfigProps();
|
|
75
75
|
const isMultiSelectMode = selectionMode === MULTI;
|
|
76
76
|
if (isMultiSelectMode && this.renderMode === 'ReadOnly') {
|
|
77
77
|
this.showSimpleTableManual = true;
|
|
@@ -85,10 +85,8 @@ export class SimpleTableSelectComponent implements OnInit, OnDestroy {
|
|
|
85
85
|
contextPageReference = pageReference.concat('.').concat(referenceProp);
|
|
86
86
|
}
|
|
87
87
|
const metadata = isMultiSelectMode
|
|
88
|
-
?
|
|
89
|
-
|
|
90
|
-
: // @ts-ignore - Property 'getCurrentPageFieldMetadata' is private and only accessible within class 'C11nEnv'
|
|
91
|
-
this.pConn$.getCurrentPageFieldMetadata(contextPageReference);
|
|
88
|
+
? this.pConn$.getFieldMetadata(`@P .${referenceProp}`)
|
|
89
|
+
: this.pConn$.getCurrentPageFieldMetadata(contextPageReference);
|
|
92
90
|
|
|
93
91
|
const { datasource: { parameters: fieldParameters = {} } = {}, pageClass } = metadata;
|
|
94
92
|
|
|
@@ -139,7 +137,7 @@ export class SimpleTableSelectComponent implements OnInit, OnDestroy {
|
|
|
139
137
|
parameters: this.parameters
|
|
140
138
|
};
|
|
141
139
|
|
|
142
|
-
this.filters = (this.pConn$.getRawMetadata() as any).
|
|
140
|
+
this.filters = (this.pConn$.getRawMetadata()?.config as any).promotedFilters ?? [];
|
|
143
141
|
|
|
144
142
|
this.isSearchable = this.filters.length > 0;
|
|
145
143
|
}
|
|
@@ -2,6 +2,7 @@ import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
|
+
import { FormTemplateBase } from '@pega/angular-sdk-components';
|
|
5
6
|
|
|
6
7
|
@Component({
|
|
7
8
|
selector: 'app-three-column',
|
|
@@ -10,8 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
11
|
standalone: true,
|
|
11
12
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
12
13
|
})
|
|
13
|
-
export class ThreeColumnComponent implements OnInit, OnChanges {
|
|
14
|
-
@Input() pConn$: typeof PConnect;
|
|
14
|
+
export class ThreeColumnComponent extends FormTemplateBase implements OnInit, OnChanges {
|
|
15
|
+
@Input() override pConn$: typeof PConnect;
|
|
15
16
|
@Input() formGroup$: FormGroup;
|
|
16
17
|
|
|
17
18
|
arChildren$: any[];
|
|
@@ -29,6 +30,6 @@ export class ThreeColumnComponent implements OnInit, OnChanges {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
updateSelf() {
|
|
32
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
33
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -2,6 +2,7 @@ import { Component, OnInit, Input, forwardRef, SimpleChanges, OnChanges } from '
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
|
+
import { FormTemplateBase } from '@pega/angular-sdk-components';
|
|
5
6
|
|
|
6
7
|
@Component({
|
|
7
8
|
selector: 'app-two-column',
|
|
@@ -10,8 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
11
|
standalone: true,
|
|
11
12
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
12
13
|
})
|
|
13
|
-
export class TwoColumnComponent implements OnInit, OnChanges {
|
|
14
|
-
@Input() pConn$: typeof PConnect;
|
|
14
|
+
export class TwoColumnComponent extends FormTemplateBase implements OnInit, OnChanges {
|
|
15
|
+
@Input() override pConn$: typeof PConnect;
|
|
15
16
|
@Input() formGroup$: FormGroup;
|
|
16
17
|
|
|
17
18
|
arChildren$: any[];
|
|
@@ -29,6 +30,6 @@ export class TwoColumnComponent implements OnInit, OnChanges {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
updateSelf() {
|
|
32
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
33
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -2,6 +2,7 @@ import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
5
|
+
import { FormTemplateBase } from '@pega/angular-sdk-components';
|
|
5
6
|
|
|
6
7
|
@Component({
|
|
7
8
|
selector: 'app-wide-narrow-form',
|
|
@@ -10,8 +11,8 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
11
|
standalone: true,
|
|
11
12
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
12
13
|
})
|
|
13
|
-
export class WideNarrowFormComponent implements OnInit, OnChanges {
|
|
14
|
-
@Input() pConn$: typeof PConnect;
|
|
14
|
+
export class WideNarrowFormComponent extends FormTemplateBase implements OnInit, OnChanges {
|
|
15
|
+
@Input() override pConn$: typeof PConnect;
|
|
15
16
|
@Input() formGroup$: FormGroup;
|
|
16
17
|
|
|
17
18
|
arChildren$: any[];
|
|
@@ -29,6 +30,6 @@ export class WideNarrowFormComponent implements OnInit, OnChanges {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
updateSelf() {
|
|
32
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
33
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -15,7 +15,7 @@ export class WideNarrowPageComponent implements OnInit, OnDestroy {
|
|
|
15
15
|
@Input() pConn$: typeof PConnect;
|
|
16
16
|
@Input() formGroup$: FormGroup;
|
|
17
17
|
|
|
18
|
-
thePConnType = '';
|
|
18
|
+
thePConnType: string | undefined = '';
|
|
19
19
|
|
|
20
20
|
// Used with AngularPConnect
|
|
21
21
|
angularPConnectData: AngularPConnectData = {};
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</mat-list-item>
|
|
26
26
|
<mat-menu #menu="matMenu">
|
|
27
27
|
<button mat-menu-item>Profile</button>
|
|
28
|
-
<button mat-menu-item (click)="navPanelLogoutClick()">
|
|
28
|
+
<button mat-menu-item (click)="navPanelLogoutClick()">{{ localizedVal('Log off', localeCategory) }}</button>
|
|
29
29
|
</mat-menu>
|
|
30
30
|
</mat-list>
|
|
31
31
|
</mat-toolbar-row>
|
|
@@ -37,11 +37,11 @@ export class WssNavBarComponent implements OnInit, OnDestroy {
|
|
|
37
37
|
navExpandCollapse$: string;
|
|
38
38
|
bShowCaseTypes$ = false;
|
|
39
39
|
|
|
40
|
-
portalApp
|
|
40
|
+
portalApp$: string | undefined = '';
|
|
41
41
|
portalLogoImage$: string;
|
|
42
42
|
showAppName$ = false;
|
|
43
43
|
|
|
44
|
-
portalOperator$: string;
|
|
44
|
+
portalOperator$: string | undefined;
|
|
45
45
|
portalOperatorInitials$: string;
|
|
46
46
|
|
|
47
47
|
actionsAPI: any;
|
|
@@ -50,7 +50,8 @@ export class WssNavBarComponent implements OnInit, OnDestroy {
|
|
|
50
50
|
logout: any;
|
|
51
51
|
|
|
52
52
|
navIcon$: string;
|
|
53
|
-
|
|
53
|
+
localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
54
|
+
localeCategory = 'AppShell';
|
|
54
55
|
constructor(
|
|
55
56
|
private angularPConnect: AngularPConnectService,
|
|
56
57
|
private cdRef: ChangeDetectorRef,
|
|
@@ -128,7 +129,7 @@ export class WssNavBarComponent implements OnInit, OnDestroy {
|
|
|
128
129
|
|
|
129
130
|
this.portalLogoImage$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
|
|
130
131
|
this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
|
|
131
|
-
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$);
|
|
132
|
+
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
|
|
132
133
|
this.showAppName$ = this.configProps$.showAppName;
|
|
133
134
|
|
|
134
135
|
this.portalApp$ = PCore.getEnvironmentInfo().getApplicationLabel();
|
|
@@ -1,31 +1,55 @@
|
|
|
1
|
-
<div class="
|
|
2
|
-
<span class="
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
<div class="file-upload-container" *ngIf="bVisible$">
|
|
2
|
+
<span class="attachment-label" [ngClass]="{ 'file-label': bRequired$ }">{{ label$ }}</span>
|
|
3
|
+
<div *ngIf="(files.length === 0 && !allowMultiple$) || allowMultiple$">
|
|
4
|
+
<div
|
|
5
|
+
style="margin-bottom: 10px"
|
|
6
|
+
id="attachment-container"
|
|
7
|
+
[ngClass]="validateMessage ? 'psdk-modal-file-selector-error' : 'psdk-modal-file-selector'"
|
|
8
|
+
>
|
|
9
|
+
<div [hidden]="true" id="attachment-ID">
|
|
10
|
+
{{ valueRef }}
|
|
11
|
+
</div>
|
|
12
|
+
<input hidden type="file" [required]="bRequired$" #uploader [id]="valueRef" [multiple]="allowMultiple$" (change)="onFileAdded($event)" />
|
|
13
|
+
<button mat-stroked-button color="primary" [disabled]="bDisabled$" (click)="uploader.click()">
|
|
14
|
+
{{
|
|
15
|
+
allowMultiple$
|
|
16
|
+
? uploadMultipleFilesLabel === 'file_upload_text_multiple'
|
|
17
|
+
? 'Choose files'
|
|
18
|
+
: uploadMultipleFilesLabel
|
|
19
|
+
: uploadSingleFileLabel === 'file_upload_text_one'
|
|
20
|
+
? 'Choose a file'
|
|
21
|
+
: uploadSingleFileLabel
|
|
22
|
+
}}
|
|
23
|
+
</button>
|
|
24
|
+
</div>
|
|
16
25
|
</div>
|
|
17
26
|
<span *ngIf="validateMessage" class="file-error">{{ validateMessage }}</span>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
<div *ngIf="files && files.length > 0">
|
|
28
|
+
<div *ngFor="let file of files">
|
|
29
|
+
<div class="psdk-attachment-card">
|
|
30
|
+
<div className="psdk-utility-card-icon">
|
|
31
|
+
<img *ngIf="!file.inProgress" class="psdk-attachment-card-svg-icon" src="{{ srcImg }}" />
|
|
32
|
+
<mat-spinner *ngIf="file.inProgress" class="progress-spinner" diameter="40"></mat-spinner>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="psdk-attachment-card-main">
|
|
35
|
+
<div class="psdk-attachment-card-main-primary-label">{{ file.props.name }}</div>
|
|
36
|
+
<div *ngIf="file.props.meta" [ngStyle]="{ color: file.props.error ? 'red' : null }">{{ file.props.meta }}</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="psdk-attachment-action">
|
|
39
|
+
<button id="delete-attachment" *ngIf="file.ID" class="psdk-utility-button" (click)="deleteFile(file)">
|
|
40
|
+
<img class="psdk-utility-card-action-svg-icon" src="{{ deleteIcon }}" />
|
|
41
|
+
</button>
|
|
42
|
+
<div *ngIf="!file.ID">
|
|
43
|
+
<button id="setting-button" mat-icon-button [matMenuTriggerFor]="actionMenu">
|
|
44
|
+
<mat-icon>more_vert</mat-icon>
|
|
45
|
+
</button>
|
|
46
|
+
<mat-menu #actionMenu="matMenu">
|
|
47
|
+
<button mat-menu-item (click)="downloadFile(file.responseProps ? file.responseProps : {})">Download</button>
|
|
48
|
+
<button mat-menu-item (click)="deleteFile(file)">Delete</button>
|
|
49
|
+
</mat-menu>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
29
53
|
</div>
|
|
30
54
|
</div>
|
|
31
55
|
</div>
|
|
@@ -53,3 +53,121 @@
|
|
|
53
53
|
::ng-deep .mat-mdc-form-field-infix {
|
|
54
54
|
width: auto;
|
|
55
55
|
}
|
|
56
|
+
.psdk-modal-file-selector {
|
|
57
|
+
border: 1px dashed var(--app-neutral-dark-color);
|
|
58
|
+
padding: 0.5rem;
|
|
59
|
+
text-align: center;
|
|
60
|
+
position: relative;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.label-required::after {
|
|
64
|
+
display: inline;
|
|
65
|
+
content: ' *';
|
|
66
|
+
vertical-align: top;
|
|
67
|
+
color: var(--app-neutral-dark-color);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.file-error {
|
|
71
|
+
color: var(--app-error-light-color);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.psdk-modal-file-selector-error {
|
|
75
|
+
border: 1px dashed var(--app-error-light-color);
|
|
76
|
+
padding: 0.5rem;
|
|
77
|
+
text-align: center;
|
|
78
|
+
position: relative;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.psdk-full-width {
|
|
82
|
+
width: 100%;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.psdk-label-readonly {
|
|
86
|
+
opacity: 54%;
|
|
87
|
+
font-size: 0.8rem;
|
|
88
|
+
font-weight: 400;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.psdk-data-readonly {
|
|
92
|
+
padding-top: 0.625rem;
|
|
93
|
+
width: 100%;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.psdk-attachment-list {
|
|
97
|
+
border: 1px solid var(--app-neutral-color);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
::ng-deep .mat-mdc-form-field-infix {
|
|
101
|
+
width: auto;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.psdk-attachment-card {
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
border: 0.0625rem solid rgb(207, 207, 207);
|
|
108
|
+
border-radius: calc(0.25rem);
|
|
109
|
+
padding: 0.25rem 0rem 0.25rem 0.25rem;
|
|
110
|
+
min-height: 3rem;
|
|
111
|
+
margin-bottom: 0.5rem;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.psdk-attachment-card-main-primary-label {
|
|
115
|
+
font-weight: 500;
|
|
116
|
+
text-overflow: ellipsis;
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
white-space: normal;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.psdk-attachment-card-main {
|
|
122
|
+
flex-grow: 2;
|
|
123
|
+
margin-left: 5px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.psdk-attachment-action {
|
|
127
|
+
flex-grow: 1;
|
|
128
|
+
text-align: right;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.psdk-attachment-card-svg-icon {
|
|
132
|
+
width: 2.5rem;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.psdk-utility-button {
|
|
136
|
+
background: none;
|
|
137
|
+
border: none;
|
|
138
|
+
margin-right: 0.5rem;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.psdk-utility-card-action-svg-icon {
|
|
143
|
+
width: 1.4rem;
|
|
144
|
+
display: inline-block;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.file-div {
|
|
148
|
+
border: 1px dashed var(--app-neutral-dark-color);
|
|
149
|
+
width: 100%;
|
|
150
|
+
padding: 0.5rem;
|
|
151
|
+
text-align: center;
|
|
152
|
+
position: relative;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.file-div-error {
|
|
156
|
+
border: 1px dashed var(--app-error-light-color);
|
|
157
|
+
width: 100%;
|
|
158
|
+
padding: 0.5rem;
|
|
159
|
+
text-align: center;
|
|
160
|
+
position: relative;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.attachment-label {
|
|
164
|
+
display: block;
|
|
165
|
+
margin-bottom: 10px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.file-label::after {
|
|
169
|
+
display: inline;
|
|
170
|
+
content: ' *';
|
|
171
|
+
vertical-align: top;
|
|
172
|
+
color: var(--app-neutral-dark-color);
|
|
173
|
+
}
|