@pega/angular-sdk-overrides 0.242.8 → 0.242.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/field/auto-complete/auto-complete.component.html +0 -1
- package/lib/field/auto-complete/auto-complete.component.ts +15 -2
- package/lib/field/dropdown/dropdown.component.ts +1 -2
- package/lib/field/list-view-action-buttons/list-view-action-buttons.component.ts +3 -2
- package/lib/field/phone/config-ext.json +1 -1
- package/lib/field/user-reference/user-reference.component.ts +5 -1
- package/lib/infra/root-container/root-container.component.ts +2 -2
- package/lib/template/confirmation/confirmation.component.html +1 -1
- package/lib/template/simple-table-manual/simple-table-manual.component.scss +4 -0
- package/package.json +1 -1
|
@@ -14,6 +14,10 @@ import { DatapageService } from '@pega/angular-sdk-components';
|
|
|
14
14
|
import { handleEvent } from '@pega/angular-sdk-components';
|
|
15
15
|
import { PConnFieldProps } from '@pega/angular-sdk-components';
|
|
16
16
|
|
|
17
|
+
interface IOption {
|
|
18
|
+
key: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}
|
|
17
21
|
interface AutoCompleteProps extends PConnFieldProps {
|
|
18
22
|
// If any, enter additional props that only exist on AutoComplete here
|
|
19
23
|
deferDatasource?: boolean;
|
|
@@ -108,6 +112,13 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
|
|
|
108
112
|
);
|
|
109
113
|
}
|
|
110
114
|
|
|
115
|
+
setOptions(options: IOption[]) {
|
|
116
|
+
this.options$ = options;
|
|
117
|
+
const index = this.options$?.findIndex(element => element.key === this.configProps$.value);
|
|
118
|
+
this.value$ = index > -1 ? this.options$[index].value : this.configProps$.value;
|
|
119
|
+
this.fieldControl.setValue(this.value$);
|
|
120
|
+
}
|
|
121
|
+
|
|
111
122
|
ngOnDestroy(): void {
|
|
112
123
|
if (this.formGroup$) {
|
|
113
124
|
this.formGroup$.removeControl(this.controlName$);
|
|
@@ -149,6 +160,7 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
|
|
|
149
160
|
if (this.configProps$.value != undefined) {
|
|
150
161
|
const index = this.options$?.findIndex(element => element.key === this.configProps$.value);
|
|
151
162
|
this.value$ = index > -1 ? this.options$[index].value : this.configProps$.value;
|
|
163
|
+
this.fieldControl.setValue(this.value$);
|
|
152
164
|
}
|
|
153
165
|
|
|
154
166
|
this.setPropertyValuesFromProps();
|
|
@@ -191,7 +203,8 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
|
|
|
191
203
|
|
|
192
204
|
this.componentReference = this.pConn$.getStateProps().value;
|
|
193
205
|
if (this.listType === 'associated') {
|
|
194
|
-
|
|
206
|
+
const optionsList = this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject('')); // 1st arg empty string until typedef marked correctly
|
|
207
|
+
this.setOptions(optionsList);
|
|
195
208
|
}
|
|
196
209
|
|
|
197
210
|
if (!this.displayMode$ && this.listType !== 'associated') {
|
|
@@ -263,7 +276,7 @@ export class AutoCompleteComponent implements OnInit, OnDestroy {
|
|
|
263
276
|
};
|
|
264
277
|
optionsData.push(obj);
|
|
265
278
|
});
|
|
266
|
-
this.
|
|
279
|
+
this.setOptions(optionsData);
|
|
267
280
|
}
|
|
268
281
|
|
|
269
282
|
flattenParameters(params = {}) {
|
|
@@ -121,7 +121,6 @@ export class DropdownComponent implements OnInit, OnDestroy {
|
|
|
121
121
|
// call updateSelf when initializing
|
|
122
122
|
this.checkAndUpdate();
|
|
123
123
|
// this should get called afer checkAndUpdate
|
|
124
|
-
this.getDatapageData();
|
|
125
124
|
|
|
126
125
|
if (this.formGroup$) {
|
|
127
126
|
// add control to formGroup
|
|
@@ -253,7 +252,7 @@ export class DropdownComponent implements OnInit, OnDestroy {
|
|
|
253
252
|
);
|
|
254
253
|
|
|
255
254
|
this.localizedValue = this.options$?.find(opt => opt.key === this.value$)?.value || this.localizedValue;
|
|
256
|
-
|
|
255
|
+
this.getDatapageData();
|
|
257
256
|
// trigger display of error message with field control
|
|
258
257
|
if (this.angularPConnectData.validateMessage != null && this.angularPConnectData.validateMessage != '') {
|
|
259
258
|
const timer = interval(100).subscribe(() => {
|
|
@@ -31,10 +31,11 @@ export class ListViewActionButtonsComponent {
|
|
|
31
31
|
this.pConn$
|
|
32
32
|
.getActionsApi()
|
|
33
33
|
.submitEmbeddedDataModal(this.context$)
|
|
34
|
-
.then(() => {
|
|
34
|
+
.then(() => {
|
|
35
|
+
this.closeActionsDialog.emit();
|
|
36
|
+
})
|
|
35
37
|
.finally(() => {
|
|
36
38
|
this.isDisabled = false;
|
|
37
39
|
});
|
|
38
|
-
this.closeActionsDialog.emit();
|
|
39
40
|
}
|
|
40
41
|
}
|
|
@@ -168,7 +168,11 @@ export class UserReferenceComponent implements OnInit, OnDestroy {
|
|
|
168
168
|
this.placeholder = placeholder || '';
|
|
169
169
|
this.displayMode$ = displayMode;
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
if (value && typeof value === 'object') {
|
|
172
|
+
this.value$ = value.userName ? value.userName : '';
|
|
173
|
+
} else {
|
|
174
|
+
this.value$ = value || '';
|
|
175
|
+
}
|
|
172
176
|
|
|
173
177
|
const { readOnly, required } = props;
|
|
174
178
|
[this.bReadonly$, this.bRequired$] = [readOnly, required].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));
|
|
@@ -171,9 +171,9 @@ export class RootContainerComponent implements OnInit, OnDestroy {
|
|
|
171
171
|
|
|
172
172
|
async configureModalContainer() {
|
|
173
173
|
const sdkConfig = await this.scService.getSdkConfig();
|
|
174
|
-
const
|
|
174
|
+
const showModalsInEmbeddedMode = sdkConfig.serverConfig.showModalsInEmbeddedMode;
|
|
175
175
|
|
|
176
|
-
if (!this.displayOnlyFA$ ||
|
|
176
|
+
if (!this.displayOnlyFA$ || showModalsInEmbeddedMode) {
|
|
177
177
|
const configObjModal = PCore.createPConnect({
|
|
178
178
|
meta: {
|
|
179
179
|
type: 'ModalViewContainer',
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<button mat-raised-button color="primary" (click)="onConfirmViewClose()">Done</button>
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
|
-
<div *ngIf="toDoList?.length > 0">
|
|
17
|
+
<div *ngIf="!showConfirmView && toDoList?.length > 0">
|
|
18
18
|
<component-mapper
|
|
19
19
|
name="Todo"
|
|
20
20
|
[props]="{ pConn$, datasource$: { source: toDoList }, headerText$: 'Tasks', type$: CONSTS.TODO, isConfirm: true }"
|