@pega/angular-sdk-overrides 0.24.8 → 0.242.1
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/operator/operator.component.ts +1 -1
- package/lib/designSystemExtension/pulse/pulse.component.ts +7 -7
- package/lib/field/auto-complete/auto-complete.component.ts +3 -3
- package/lib/field/check-box/check-box.component.ts +3 -3
- package/lib/field/currency/currency.component.ts +3 -3
- package/lib/field/date/date.component.ts +3 -3
- package/lib/field/date-time/date-time.component.ts +2 -2
- package/lib/field/decimal/decimal.component.ts +4 -4
- package/lib/field/dropdown/dropdown.component.ts +3 -3
- package/lib/field/email/email.component.ts +1 -1
- package/lib/field/integer/integer.component.ts +1 -1
- package/lib/field/multiselect/multiselect.component.ts +4 -2
- package/lib/field/percentage/percentage.component.ts +3 -3
- package/lib/field/phone/phone.component.ts +1 -1
- package/lib/field/radio-buttons/radio-buttons.component.ts +2 -2
- package/lib/field/rich-text/rich-text.component.ts +3 -3
- package/lib/field/scalar-list/scalar-list.component.ts +1 -2
- package/lib/field/text-area/text-area.component.ts +1 -1
- package/lib/field/text-input/text-input.component.ts +1 -1
- package/lib/field/time/time.component.ts +1 -1
- package/lib/field/url/url.component.ts +1 -1
- package/lib/field/user-reference/user-reference.component.ts +1 -1
- package/lib/infra/Containers/flow-container/flow-container.component.ts +4 -4
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +1 -1
- 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 +11 -28
- package/lib/infra/assignment/assignment.component.ts +0 -1
- package/lib/infra/defer-load/defer-load.component.ts +3 -3
- package/lib/infra/navbar/navbar.component.ts +3 -3
- package/lib/infra/root-container/root-container.component.ts +3 -6
- package/lib/template/app-shell/app-shell.component.ts +20 -2
- package/lib/template/case-summary/case-summary.component.ts +1 -1
- package/lib/template/case-view/case-view.component.ts +1 -1
- package/lib/template/confirmation/confirmation.component.ts +1 -1
- package/lib/template/data-reference/data-reference.component.ts +35 -39
- package/lib/template/default-form/default-form.component.ts +1 -1
- package/lib/template/details/details.component.ts +1 -1
- package/lib/template/details-narrow-wide/details-narrow-wide.component.ts +1 -1
- package/lib/template/details-one-column/details-one-column.component.ts +1 -1
- package/lib/template/details-three-column/details-three-column.component.ts +1 -1
- package/lib/template/details-two-column/details-two-column.component.ts +1 -1
- package/lib/template/details-wide-narrow/details-wide-narrow.component.ts +1 -1
- package/lib/template/dynamic-tabs/dynamic-tabs.component.ts +1 -1
- package/lib/template/field-group-template/field-group-template.component.ts +0 -2
- package/lib/template/inline-dashboard-page/inline-dashboard-page.component.ts +2 -2
- package/lib/template/list-view/list-view.component.ts +2 -2
- package/lib/template/list-view/listViewHelpers.ts +1 -1
- package/lib/template/narrow-wide-form/narrow-wide-form.component.ts +1 -1
- package/lib/template/one-column/one-column.component.ts +1 -1
- package/lib/template/one-column-tab/one-column-tab.component.ts +1 -1
- package/lib/template/page/page.component.ts +1 -4
- package/lib/template/promoted-filters/promoted-filters.component.ts +1 -1
- package/lib/template/repeating-structures/repeating-structures.component.ts +1 -1
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +15 -13
- package/lib/template/simple-table-select/simple-table-select.component.ts +3 -3
- package/lib/template/three-column/three-column.component.ts +1 -1
- package/lib/template/two-column/two-column.component.ts +1 -1
- package/lib/template/two-column-tab/two-column-tab.component.ts +1 -1
- package/lib/template/wide-narrow-form/wide-narrow-form.component.ts +1 -1
- package/lib/template/wide-narrow-page/wide-narrow-page.component.ts +1 -1
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +3 -3
- package/lib/widget/attachment/attachment.component.ts +7 -9
- package/lib/widget/feed-container/feed-container.component.ts +7 -7
- package/lib/widget/file-utility/file-utility.component.ts +2 -5
- package/lib/widget/todo/todo.component.html +2 -2
- package/lib/widget/todo/todo.component.ts +93 -83
- package/package.json +1 -1
|
@@ -67,7 +67,7 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
67
67
|
const { containers } = PCore.getStore().getState();
|
|
68
68
|
const items = Object.keys(containers).filter(item => item.includes('root'));
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
PCore.getContainerUtils().getContainerAPI().addContainerItems(items);
|
|
71
71
|
|
|
72
72
|
// add preview and modalview containers to redux
|
|
73
73
|
// keep local copies of the the pConnect that is related
|
|
@@ -97,9 +97,6 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
|
|
100
|
-
// clear out hasViewContainer
|
|
101
|
-
sessionStorage.setItem('hasViewContainer', 'false');
|
|
102
|
-
|
|
103
100
|
this.mConn$ = configObjModal.getPConnect();
|
|
104
101
|
|
|
105
102
|
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
@@ -156,7 +153,7 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
156
153
|
if (items[key] && items[key].view && Object.keys(items[key].view).length > 0) {
|
|
157
154
|
const itemView = items[key].view;
|
|
158
155
|
|
|
159
|
-
const rootObject
|
|
156
|
+
const rootObject = PCore.createPConnect({
|
|
160
157
|
meta: itemView,
|
|
161
158
|
options: {
|
|
162
159
|
context: items[key].context
|
|
@@ -202,7 +199,7 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
202
199
|
|
|
203
200
|
this.componentName$ = localPConn.getComponentName();
|
|
204
201
|
if (this.componentName$ === 'ViewContainer') {
|
|
205
|
-
const configProps
|
|
202
|
+
const configProps = this.pConn$.getConfigProps();
|
|
206
203
|
const viewContConfig = {
|
|
207
204
|
meta: {
|
|
208
205
|
type: 'ViewContainer',
|
|
@@ -78,9 +78,27 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
78
78
|
if (this.pages$) {
|
|
79
79
|
this.bShowAppShell$ = true;
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
// @ts-ignore - Property 'pyCaseTypesAvailableToCreateDP' does not exist on type pxApplication
|
|
83
|
+
const caseTypesAvailableToCreateDP = PCore.getEnvironmentInfo().environmentInfoObject?.pxApplication?.pyCaseTypesAvailableToCreateDP;
|
|
84
|
+
if (caseTypesAvailableToCreateDP) {
|
|
85
|
+
const portalID = this.pConn$.getValue('.pyOwner');
|
|
86
|
+
PCore.getDataPageUtils()
|
|
87
|
+
.getPageDataAsync(caseTypesAvailableToCreateDP, this.pConn$.getContextName(), {
|
|
88
|
+
PortalName: portalID
|
|
89
|
+
})
|
|
90
|
+
.then((response: any) => {
|
|
91
|
+
if (response?.pyCaseTypesAvailableToCreate) {
|
|
92
|
+
this.pConn$.replaceState('.pyCaseTypesAvailableToCreate', response.pyCaseTypesAvailableToCreate, {
|
|
93
|
+
skipDirtyValidation: true
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
81
99
|
this.caseTypes$ = this.configProps$.caseTypes;
|
|
82
100
|
|
|
83
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
101
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
84
102
|
|
|
85
103
|
this.portalTemplate = this.configProps$.portalTemplate;
|
|
86
104
|
|
|
@@ -129,7 +147,7 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
129
147
|
}
|
|
130
148
|
|
|
131
149
|
this.caseTypes$ = this.configProps$.caseTypes;
|
|
132
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
150
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
133
151
|
});
|
|
134
152
|
}
|
|
135
153
|
|
|
@@ -55,7 +55,7 @@ export class CaseSummaryComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
55
55
|
// Then, continue on with other initialization
|
|
56
56
|
|
|
57
57
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as CaseSummaryProps;
|
|
58
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
58
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
59
59
|
|
|
60
60
|
this.generatePrimaryAndSecondaryFields();
|
|
61
61
|
|
|
@@ -120,7 +120,7 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
120
120
|
if (hasNewAttachments !== this.bHasNewAttachments) {
|
|
121
121
|
this.bHasNewAttachments = hasNewAttachments;
|
|
122
122
|
if (this.bHasNewAttachments) {
|
|
123
|
-
PCore.getPubSubUtils().publish(
|
|
123
|
+
PCore.getPubSubUtils().publish(PCore.getEvents().getCaseEvent().CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW, true);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -43,7 +43,7 @@ export class ConfirmationComponent implements OnInit, OnDestroy {
|
|
|
43
43
|
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
44
44
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
45
45
|
this.CONSTS = PCore.getConstants();
|
|
46
|
-
const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(this.pConn$.getTarget());
|
|
46
|
+
const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(this.pConn$.getTarget() ?? null);
|
|
47
47
|
this.rootInfo = PCore.getContainerUtils().getContainerItemData(this.pConn$.getTarget(), activeContainerItemID);
|
|
48
48
|
this.checkAndUpdate();
|
|
49
49
|
}
|
|
@@ -45,19 +45,18 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
45
45
|
ngOnInit(): void {
|
|
46
46
|
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
47
47
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
48
|
-
this.children = this.pConn$.getChildren()
|
|
48
|
+
this.children = this.pConn$.getChildren();
|
|
49
49
|
this.updateSelf();
|
|
50
50
|
if (this.firstChildMeta?.type === 'Dropdown' && this.rawViewMetadata.config?.parameters) {
|
|
51
51
|
const { value, key, text } = this.firstChildMeta.config.datasource.fields;
|
|
52
|
-
(
|
|
53
|
-
|
|
52
|
+
PCore.getDataApiUtils()
|
|
53
|
+
.getData(
|
|
54
54
|
this.refList,
|
|
55
55
|
{
|
|
56
56
|
dataViewParameters: this.parameters
|
|
57
|
-
}
|
|
57
|
+
},
|
|
58
58
|
''
|
|
59
|
-
)
|
|
60
|
-
)
|
|
59
|
+
)
|
|
61
60
|
.then(res => {
|
|
62
61
|
if (res.data.data !== null) {
|
|
63
62
|
const ddDataSource = res.data.data
|
|
@@ -103,7 +102,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
103
102
|
|
|
104
103
|
updateSelf() {
|
|
105
104
|
// Update properties based on configProps
|
|
106
|
-
const theConfigProps
|
|
105
|
+
const theConfigProps = this.pConn$.getConfigProps();
|
|
107
106
|
this.updatePropertiesFromProps(theConfigProps);
|
|
108
107
|
|
|
109
108
|
const displayAs = theConfigProps.displayAs;
|
|
@@ -187,41 +186,38 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
187
186
|
// AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value
|
|
188
187
|
const propValue = event?.id || event?.target?.value;
|
|
189
188
|
if (propValue && this.canBeChangedInReviewMode && this.isDisplayModeEnabled) {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
PCore.getDataApiUtils()
|
|
190
|
+
.getCaseEditLock(caseKey, '')
|
|
191
|
+
.then(caseResponse => {
|
|
192
|
+
const pageTokens = this.pConn$.getPageReference().replace('caseInfo.content', '').split('.');
|
|
193
|
+
let curr = {};
|
|
194
|
+
const commitData = curr;
|
|
194
195
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
pageTokens.forEach(el => {
|
|
197
|
+
if (el !== '') {
|
|
198
|
+
curr[el] = {};
|
|
199
|
+
curr = curr[el];
|
|
200
|
+
}
|
|
201
|
+
});
|
|
201
202
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
203
|
+
// expecting format like {Customer: {pyID:"C-100"}}
|
|
204
|
+
const propArr = this.propName.split('.');
|
|
205
|
+
propArr.forEach((element, idx) => {
|
|
206
|
+
if (idx + 1 === propArr.length) {
|
|
207
|
+
curr[element] = propValue;
|
|
208
|
+
} else {
|
|
209
|
+
curr[element] = {};
|
|
210
|
+
curr = curr[element];
|
|
211
|
+
}
|
|
212
|
+
});
|
|
212
213
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
) as Promise<any>
|
|
220
|
-
).then(response => {
|
|
221
|
-
PCore.getContainerUtils().updateParentLastUpdateTime(this.pConn$.getContextName(), response.data.data.caseInfo.lastUpdateTime);
|
|
222
|
-
PCore.getContainerUtils().updateRelatedContextEtag(this.pConn$.getContextName(), response.headers.etag);
|
|
214
|
+
PCore.getCaseUtils()
|
|
215
|
+
.updateCaseEditFieldsData(caseKey, { [caseKey]: commitData }, caseResponse.headers.etag, this.pConn$.getContextName())
|
|
216
|
+
.then(response => {
|
|
217
|
+
PCore.getContainerUtils().updateParentLastUpdateTime(this.pConn$.getContextName(), response.data.data.caseInfo.lastUpdateTime);
|
|
218
|
+
PCore.getContainerUtils().updateRelatedContextEtag(this.pConn$.getContextName(), response.headers.etag);
|
|
219
|
+
});
|
|
223
220
|
});
|
|
224
|
-
});
|
|
225
221
|
}
|
|
226
222
|
}
|
|
227
223
|
|
|
@@ -235,7 +231,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
|
|
|
235
231
|
property: this.propName,
|
|
236
232
|
category: '',
|
|
237
233
|
context: ''
|
|
238
|
-
}
|
|
234
|
+
});
|
|
239
235
|
if (!this.canBeChangedInReviewMode && this.isDisplayModeEnabled && this.selectionMode === SELECTION_MODE.SINGLE) {
|
|
240
236
|
this.displaySingleRef = true;
|
|
241
237
|
}
|
|
@@ -49,7 +49,7 @@ export class DefaultFormComponent implements OnInit {
|
|
|
49
49
|
const propToUse: any = { ...this.pConn$.getInheritedProps() };
|
|
50
50
|
this.showLabel = propToUse?.showLabel;
|
|
51
51
|
this.label = propToUse?.label;
|
|
52
|
-
const kids = this.pConn$.getChildren()
|
|
52
|
+
const kids = this.pConn$.getChildren();
|
|
53
53
|
this.instructions = this.templateUtils.getInstructions(this.pConn$, configProps?.instructions);
|
|
54
54
|
|
|
55
55
|
const numCols = configProps.NumCols ? configProps.NumCols : '1';
|
|
@@ -51,7 +51,7 @@ export class DetailsComponent implements OnInit, OnDestroy {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
updateSelf() {
|
|
54
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
54
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
55
55
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
56
56
|
|
|
57
57
|
if (this.showHighlightedData) {
|
|
@@ -51,7 +51,7 @@ export class DetailsNarrowWideComponent implements OnInit, OnDestroy {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
updateSelf() {
|
|
54
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
54
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
55
55
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
56
56
|
|
|
57
57
|
if (this.showHighlightedData) {
|
|
@@ -53,7 +53,7 @@ export class DetailsOneColumnComponent implements OnInit, OnDestroy {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
updateSelf() {
|
|
56
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
56
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
57
57
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
58
58
|
|
|
59
59
|
if (this.showHighlightedData) {
|
|
@@ -58,7 +58,7 @@ export class DetailsThreeColumnComponent implements OnInit, OnDestroy {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
updateSelf() {
|
|
61
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
61
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
62
62
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
63
63
|
|
|
64
64
|
if (this.showHighlightedData) {
|
|
@@ -58,7 +58,7 @@ export class DetailsTwoColumnComponent implements OnInit, OnDestroy {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
updateSelf() {
|
|
61
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
61
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
62
62
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
63
63
|
|
|
64
64
|
if (this.showHighlightedData) {
|
|
@@ -54,7 +54,7 @@ export class DetailsWideNarrowComponent implements OnInit, OnDestroy {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
updateSelf() {
|
|
57
|
-
const rawMetaData: any = this.pConn$.resolveConfigProps(
|
|
57
|
+
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
58
58
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
59
59
|
|
|
60
60
|
if (this.showHighlightedData) {
|
|
@@ -62,7 +62,7 @@ export class DynamicTabsComponent implements OnInit, OnDestroy {
|
|
|
62
62
|
this.pConn$.setInheritedProp('displayMode', 'LABELS_LEFT');
|
|
63
63
|
this.pConn$.setInheritedProp('readOnly', true);
|
|
64
64
|
|
|
65
|
-
const referenceListData
|
|
65
|
+
const referenceListData = this.pConn$.getValue(`${referenceList}.pxResults`, ''); // 2nd arg empty string until typedefs properly allow optional
|
|
66
66
|
|
|
67
67
|
this.tabsItems =
|
|
68
68
|
referenceListData?.map((item, i) => {
|
|
@@ -149,12 +149,10 @@ export class FieldGroupTemplateComponent implements OnInit, OnDestroy, OnChanges
|
|
|
149
149
|
};
|
|
150
150
|
|
|
151
151
|
addFieldGroupItem() {
|
|
152
|
-
// @ts-ignore - second parameter "pageRef" is optional for insert method
|
|
153
152
|
this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length);
|
|
154
153
|
}
|
|
155
154
|
|
|
156
155
|
deleteFieldGroupItem(index) {
|
|
157
|
-
// @ts-ignore - second parameter "pageRef" is optional for deleteEntry method
|
|
158
156
|
this.pConn$.getListActions().deleteEntry(index);
|
|
159
157
|
}
|
|
160
158
|
}
|
|
@@ -45,8 +45,8 @@ export class InlineDashboardPageComponent implements OnInit, OnChanges {
|
|
|
45
45
|
|
|
46
46
|
updateSelf() {
|
|
47
47
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as InlineDashboardPageProps;
|
|
48
|
-
const arChildren$ = this.pConn$.getChildren()
|
|
49
|
-
const allFilters =
|
|
48
|
+
const arChildren$ = this.pConn$.getChildren();
|
|
49
|
+
const allFilters = this.pConn$.getRawMetadata()?.children[1];
|
|
50
50
|
const filterComponents = buildFilterComponents(this.pConn$, allFilters);
|
|
51
51
|
this.inlineProps = this.configProps$;
|
|
52
52
|
this.children[0] = arChildren$[0];
|
|
@@ -22,7 +22,7 @@ import { getCurrencyOptions } from '@pega/angular-sdk-components';
|
|
|
22
22
|
import { getLocale, getSeconds } from '@pega/angular-sdk-components';
|
|
23
23
|
import { formatters } from '@pega/angular-sdk-components';
|
|
24
24
|
|
|
25
|
-
import {
|
|
25
|
+
import { init } from './listViewHelpers';
|
|
26
26
|
|
|
27
27
|
declare const window: any;
|
|
28
28
|
|
|
@@ -218,7 +218,7 @@ export class ListViewComponent implements OnInit, OnDestroy {
|
|
|
218
218
|
if (!this.payload) {
|
|
219
219
|
this.payload = { referenceList: this.configProps$.referenceList };
|
|
220
220
|
}
|
|
221
|
-
|
|
221
|
+
init({
|
|
222
222
|
pConn$: this.pConn$,
|
|
223
223
|
bInForm$: this.bInForm$,
|
|
224
224
|
...this.payload,
|
|
@@ -3,7 +3,7 @@ import { getContext, readContextResponse } from './utils';
|
|
|
3
3
|
// Remove this and use "real" PCore type once .d.ts is fixed (currently shows 1 error)
|
|
4
4
|
declare const PCore: any;
|
|
5
5
|
|
|
6
|
-
export function
|
|
6
|
+
export function init(props) {
|
|
7
7
|
const {
|
|
8
8
|
referenceList,
|
|
9
9
|
pConn$,
|
|
@@ -34,7 +34,7 @@ export class PageComponent implements OnInit, OnDestroy {
|
|
|
34
34
|
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
35
35
|
|
|
36
36
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as PageProps;
|
|
37
|
-
this.arChildren$ = this.pConn$.getChildren()
|
|
37
|
+
this.arChildren$ = this.pConn$.getChildren();
|
|
38
38
|
|
|
39
39
|
this.title$ = this.configProps$.title;
|
|
40
40
|
const operator = this.configProps$.operator;
|
|
@@ -42,9 +42,6 @@ export class PageComponent implements OnInit, OnDestroy {
|
|
|
42
42
|
if (operator && operator != '') {
|
|
43
43
|
this.title$ += `, ${operator}`;
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
// when showing a page, similar to updating root, need to cause viewContainer to call "initContainer"
|
|
47
|
-
sessionStorage.setItem('hasViewContainer', 'false');
|
|
48
45
|
}
|
|
49
46
|
|
|
50
47
|
ngOnDestroy(): void {
|
|
@@ -81,7 +81,7 @@ export class PromotedFiltersComponent implements OnInit, OnDestroy {
|
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
const filtersWithClassID = { ...this.filtersProperties, classID: this.pageClass };
|
|
84
|
-
this.transientItemID =
|
|
84
|
+
this.transientItemID = this.pConn$.getContainerManager().addTransientItem({ id: this.viewName, data: filtersWithClassID });
|
|
85
85
|
this.processedFilters = [];
|
|
86
86
|
this.filters.forEach(filter => {
|
|
87
87
|
const filterClone = { ...filter };
|
|
@@ -107,7 +107,7 @@ export class RepeatingStructuresComponent implements OnInit, AfterViewInit {
|
|
|
107
107
|
openAssignment(row) {
|
|
108
108
|
const { pxRefObjectClass, pzInsKey } = row;
|
|
109
109
|
const sTarget = this.pConn$.getContainerName();
|
|
110
|
-
const options
|
|
110
|
+
const options = { containerName: sTarget };
|
|
111
111
|
this.pConn$
|
|
112
112
|
.getActionsApi()
|
|
113
113
|
.openAssignment(pzInsKey, pxRefObjectClass, options)
|
|
@@ -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 {
|
|
@@ -158,6 +159,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
158
159
|
settingsSvgIcon$: string;
|
|
159
160
|
|
|
160
161
|
isInitialized = false;
|
|
162
|
+
targetClassLabel: string;
|
|
161
163
|
|
|
162
164
|
constructor(
|
|
163
165
|
private angularPConnect: AngularPConnectService,
|
|
@@ -219,7 +221,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
219
221
|
// but getRawMetadata() has each child.config with datasource and value showing their unresolved values (ex: "@P thePropName")
|
|
220
222
|
// We need to use the prop name as the "glue" to tie the Angular Material table dataSource, displayColumns and data together.
|
|
221
223
|
// So, in the code below, we'll use the unresolved config.value (but replacing the space with an underscore to keep things happy)
|
|
222
|
-
const rawMetadata
|
|
224
|
+
const rawMetadata = this.pConn$.getRawMetadata();
|
|
223
225
|
|
|
224
226
|
// Adapted from Nebula
|
|
225
227
|
const {
|
|
@@ -237,13 +239,14 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
237
239
|
editModeConfig,
|
|
238
240
|
displayMode,
|
|
239
241
|
useSeparateViewForEdit,
|
|
240
|
-
viewForEditModal
|
|
242
|
+
viewForEditModal,
|
|
243
|
+
targetClassLabel
|
|
241
244
|
} = this.configProps$;
|
|
242
245
|
|
|
243
246
|
this.referenceListStr = getContext(this.pConn$).referenceListStr;
|
|
244
247
|
this.label = labelProp || propertyLabel;
|
|
245
248
|
this.parameters = fieldMetadata?.datasource?.parameters;
|
|
246
|
-
|
|
249
|
+
this.targetClassLabel = targetClassLabel;
|
|
247
250
|
const hideAddRow = allowTableEdit === false;
|
|
248
251
|
const hideDeleteRow = allowTableEdit === false;
|
|
249
252
|
let { contextClass } = this.configProps$;
|
|
@@ -262,7 +265,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
262
265
|
// config.value (ex: "@P .DeclarantChoice") or
|
|
263
266
|
// config.datasource (ex: "@ASSOCIATED .DeclarantChoice")
|
|
264
267
|
// Neither of these appear in the resolved (this.configProps$)
|
|
265
|
-
const rawConfig = rawMetadata?.config;
|
|
268
|
+
const rawConfig: any = rawMetadata?.config;
|
|
266
269
|
const rawFields = rawConfig?.children?.[0]?.children || rawConfig?.presets?.[0].children?.[0]?.children;
|
|
267
270
|
this.rawFields = rawFields;
|
|
268
271
|
// At this point, fields has resolvedFields and rawFields we can use
|
|
@@ -355,7 +358,6 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
355
358
|
if (this.isInitialized) {
|
|
356
359
|
this.isInitialized = false;
|
|
357
360
|
if (this.allowEditingInModal) {
|
|
358
|
-
// @ts-ignore - An argument for 'uniqueField' was not provided.
|
|
359
361
|
this.pConn$.getListActions().initDefaultPageInstructions(
|
|
360
362
|
this.pConn$.getReferenceList(),
|
|
361
363
|
this.fieldDefs.filter(item => item.name).map(item => item.name)
|
|
@@ -918,19 +920,19 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
918
920
|
.getActionsApi()
|
|
919
921
|
.openEmbeddedDataModal(
|
|
920
922
|
this.defaultView,
|
|
921
|
-
this.pConn
|
|
923
|
+
this.pConn$ as any,
|
|
922
924
|
this.referenceListStr,
|
|
923
925
|
this.referenceList.length,
|
|
924
|
-
PCore.getConstants().RESOURCE_STATUS.CREATE
|
|
926
|
+
PCore.getConstants().RESOURCE_STATUS.CREATE,
|
|
927
|
+
this.targetClassLabel
|
|
925
928
|
);
|
|
926
929
|
} else {
|
|
927
|
-
// @ts-ignore - second parameter "pageRef" is optional for insert method
|
|
928
930
|
this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length);
|
|
929
931
|
}
|
|
930
932
|
|
|
931
933
|
this.pConn$.clearErrorMessages({
|
|
932
|
-
property:
|
|
933
|
-
}
|
|
934
|
+
property: this.pConn$.getStateProps()?.referenceList?.substring(1)
|
|
935
|
+
});
|
|
934
936
|
}
|
|
935
937
|
|
|
936
938
|
editRecord(data, index) {
|
|
@@ -939,16 +941,16 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
|
|
|
939
941
|
.getActionsApi()
|
|
940
942
|
.openEmbeddedDataModal(
|
|
941
943
|
this.bUseSeparateViewForEdit ? this.editView : this.defaultView,
|
|
942
|
-
this.pConn
|
|
944
|
+
this.pConn$ as any,
|
|
943
945
|
this.referenceListStr,
|
|
944
946
|
index,
|
|
945
|
-
PCore.getConstants().RESOURCE_STATUS.UPDATE
|
|
947
|
+
PCore.getConstants().RESOURCE_STATUS.UPDATE,
|
|
948
|
+
this.targetClassLabel
|
|
946
949
|
);
|
|
947
950
|
}
|
|
948
951
|
}
|
|
949
952
|
|
|
950
953
|
deleteRecord(index) {
|
|
951
|
-
// @ts-ignore - second parameter "pageRef" is optional for deleteEntry method
|
|
952
954
|
this.pConn$.getListActions().deleteEntry(index);
|
|
953
955
|
}
|
|
954
956
|
|
|
@@ -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;
|
|
@@ -137,7 +137,7 @@ export class SimpleTableSelectComponent implements OnInit, OnDestroy {
|
|
|
137
137
|
parameters: this.parameters
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
this.filters = (this.pConn$.getRawMetadata() as any).
|
|
140
|
+
this.filters = (this.pConn$.getRawMetadata()?.config as any).promotedFilters ?? [];
|
|
141
141
|
|
|
142
142
|
this.isSearchable = this.filters.length > 0;
|
|
143
143
|
}
|
|
@@ -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 = {};
|
|
@@ -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;
|
|
@@ -129,7 +129,7 @@ export class WssNavBarComponent implements OnInit, OnDestroy {
|
|
|
129
129
|
|
|
130
130
|
this.portalLogoImage$ = this.utils.getSDKStaticContentUrl().concat('assets/pzpega-logo-mark.svg');
|
|
131
131
|
this.portalOperator$ = PCore.getEnvironmentInfo().getOperatorName();
|
|
132
|
-
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$);
|
|
132
|
+
this.portalOperatorInitials$ = this.utils.getInitials(this.portalOperator$ ?? '');
|
|
133
133
|
this.showAppName$ = this.configProps$.showAppName;
|
|
134
134
|
|
|
135
135
|
this.portalApp$ = PCore.getEnvironmentInfo().getApplicationLabel();
|