@pega/angular-sdk-overrides 0.26.1 → 0.26.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.html +4 -1
- package/lib/designSystemExtension/alert/alert.component.scss +9 -10
- package/lib/designSystemExtension/alert/alert.component.ts +6 -2
- package/lib/designSystemExtension/material-details-fields/material-details-fields.component.html +30 -21
- package/lib/designSystemExtension/operator/operator.component.ts +2 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.html +104 -10
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +141 -1
- package/lib/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +224 -72
- package/lib/field/auto-complete/auto-complete.component.html +2 -1
- package/lib/field/auto-complete/auto-complete.component.ts +8 -6
- package/lib/field/check-box/check-box.component.html +3 -1
- package/lib/field/check-box/check-box.component.ts +10 -1
- package/lib/field/currency/currency.component.html +2 -1
- package/lib/field/currency/currency.component.ts +10 -1
- package/lib/field/date/date.component.html +2 -1
- package/lib/field/date/date.component.ts +2 -0
- package/lib/field/date-time/date-time.component.html +2 -1
- package/lib/field/date-time/date-time.component.scss +46 -40
- package/lib/field/date-time/date-time.component.ts +2 -0
- package/lib/field/decimal/decimal.component.html +2 -1
- package/lib/field/decimal/decimal.component.ts +2 -0
- package/lib/field/dropdown/dropdown.component.html +2 -1
- package/lib/field/dropdown/dropdown.component.ts +10 -1
- package/lib/field/email/email.component.html +2 -1
- package/lib/field/email/email.component.ts +2 -2
- package/lib/field/field.base.ts +27 -1
- package/lib/field/integer/integer.component.html +2 -1
- package/lib/field/integer/integer.component.ts +4 -2
- package/lib/field/location/location.component.html +2 -1
- package/lib/field/location/location.component.ts +3 -1
- package/lib/field/object-reference/object-reference.component.html +1 -1
- package/lib/field/object-reference/object-reference.component.ts +3 -0
- package/lib/field/percentage/percentage.component.html +2 -1
- package/lib/field/percentage/percentage.component.ts +10 -1
- package/lib/field/phone/phone.component.html +2 -1
- package/lib/field/phone/phone.component.ts +2 -1
- package/lib/field/radio-buttons/radio-buttons.component.html +2 -1
- package/lib/field/radio-buttons/radio-buttons.component.ts +10 -1
- package/lib/field/rich-text/rich-text.component.scss +1 -166
- package/lib/field/rich-text/rich-text.component.ts +1 -1
- package/lib/field/semantic-link/semantic-link.component.ts +9 -5
- package/lib/field/text-area/text-area.component.html +2 -1
- package/lib/field/text-area/text-area.component.ts +2 -1
- package/lib/field/text-input/text-input.component.html +2 -1
- package/lib/field/text-input/text-input.component.ts +2 -1
- package/lib/field/time/time.component.html +2 -1
- package/lib/field/time/time.component.ts +2 -1
- package/lib/field/url/url.component.html +2 -1
- package/lib/field/url/url.component.ts +2 -1
- package/lib/field/user-reference/user-reference.component.html +4 -2
- package/lib/field/user-reference/user-reference.component.ts +10 -5
- package/lib/infra/Containers/flow-container/flow-container.component.ts +33 -40
- package/lib/infra/Containers/modal-view-container/modal-view-container.component.ts +46 -50
- package/lib/infra/Containers/view-container/view-container.component.ts +32 -31
- package/lib/infra/navbar/navbar.component.ts +33 -35
- package/lib/infra/root-container/root-container.component.ts +33 -38
- package/lib/template/app-shell/app-shell.component.ts +12 -11
- package/lib/template/base/details-template-base.ts +2 -1
- package/lib/template/default-form/default-form.component.html +19 -3
- package/lib/template/default-form/default-form.component.ts +13 -3
- package/lib/template/simple-table-manual/helpers.ts +3 -3
- package/lib/template/simple-table-manual/simple-table-manual.component.html +29 -11
- package/lib/template/simple-table-manual/simple-table-manual.component.ts +69 -11
- package/lib/template/single-reference-readonly/single-reference-readonly.component.html +1 -1
- package/lib/template/single-reference-readonly/single-reference-readonly.component.scss +4 -0
- package/lib/template/single-reference-readonly/single-reference-readonly.component.ts +4 -4
- package/lib/template/wss-nav-bar/wss-nav-bar.component.ts +18 -20
- package/lib/widget/attachment/AttachmentUtils.ts +18 -10
- package/lib/widget/attachment/attachment.component.html +16 -6
- package/lib/widget/attachment/attachment.component.ts +12 -2
- package/lib/widget/case-history/case-history.component.ts +6 -2
- package/lib/widget/file-utility/file-utility.component.ts +25 -29
- package/lib/widget/todo/todo.component.ts +7 -2
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<ng-template #noDisplayMode>
|
|
5
5
|
<div *ngIf="bHasForm$; else noEdit">
|
|
6
6
|
<div [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
7
|
-
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic"
|
|
7
|
+
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic">
|
|
8
8
|
<mat-label>{{ label$ }}</mat-label>
|
|
9
9
|
<input
|
|
10
10
|
type="text"
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
(blur)="fieldOnBlur($event)"
|
|
30
30
|
[readonly]="bReadonly$"
|
|
31
31
|
/>
|
|
32
|
+
<mat-hint *ngIf="helperText" [appFieldWarning]="bFieldMessageVisible$">{{ helperText }}</mat-hint>
|
|
32
33
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
33
34
|
</mat-form-field>
|
|
34
35
|
</div>
|
|
@@ -6,6 +6,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
|
|
6
6
|
import { NgxCurrencyDirective, NgxCurrencyInputMode } from 'ngx-currency';
|
|
7
7
|
|
|
8
8
|
import { FieldBase } from '@pega/angular-sdk-components';
|
|
9
|
+
import { FieldWarningDirective } from '@pega/angular-sdk-components';
|
|
9
10
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
10
11
|
import { handleEvent } from '@pega/angular-sdk-components';
|
|
11
12
|
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/angular-sdk-components';
|
|
@@ -31,6 +32,7 @@ interface DecimalProps extends PConnFieldProps {
|
|
|
31
32
|
MatFormFieldModule,
|
|
32
33
|
MatInputModule,
|
|
33
34
|
NgxCurrencyDirective,
|
|
35
|
+
FieldWarningDirective,
|
|
34
36
|
forwardRef(() => ComponentMapperComponent)
|
|
35
37
|
]
|
|
36
38
|
})
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<ng-template #noDisplayMode>
|
|
9
9
|
<div *ngIf="!bReadonly$ && bHasForm$; else noEdit">
|
|
10
10
|
<div [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
11
|
-
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic"
|
|
11
|
+
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic">
|
|
12
12
|
<mat-select
|
|
13
13
|
[value]="value$"
|
|
14
14
|
[required]="bRequired$"
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
</mat-option>
|
|
23
23
|
</mat-select>
|
|
24
24
|
<mat-label>{{ label$ }}</mat-label>
|
|
25
|
+
<mat-hint *ngIf="helperText" [appFieldWarning]="bFieldMessageVisible$">{{ helperText }}</mat-hint>
|
|
25
26
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
26
27
|
</mat-form-field>
|
|
27
28
|
</div>
|
|
@@ -7,6 +7,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
|
|
7
7
|
import isEqual from 'fast-deep-equal';
|
|
8
8
|
|
|
9
9
|
import { FieldBase } from '@pega/angular-sdk-components';
|
|
10
|
+
import { FieldWarningDirective } from '@pega/angular-sdk-components';
|
|
10
11
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
11
12
|
import { handleEvent } from '@pega/angular-sdk-components';
|
|
12
13
|
import { PConnFieldProps } from '@pega/angular-sdk-components';
|
|
@@ -66,7 +67,15 @@ interface DropdownProps extends PConnFieldProps {
|
|
|
66
67
|
selector: 'app-dropdown',
|
|
67
68
|
templateUrl: './dropdown.component.html',
|
|
68
69
|
styleUrls: ['./dropdown.component.scss'],
|
|
69
|
-
imports: [
|
|
70
|
+
imports: [
|
|
71
|
+
CommonModule,
|
|
72
|
+
ReactiveFormsModule,
|
|
73
|
+
MatFormFieldModule,
|
|
74
|
+
MatSelectModule,
|
|
75
|
+
MatOptionModule,
|
|
76
|
+
FieldWarningDirective,
|
|
77
|
+
forwardRef(() => ComponentMapperComponent)
|
|
78
|
+
]
|
|
70
79
|
})
|
|
71
80
|
export class DropdownComponent extends FieldBase implements OnInit, OnDestroy {
|
|
72
81
|
@Output() onRecordChange: EventEmitter<any> = new EventEmitter();
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<ng-template #noDisplayMode>
|
|
5
5
|
<div *ngIf="!bReadonly$ && bHasForm$; else noEdit">
|
|
6
6
|
<div [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
7
|
-
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic"
|
|
7
|
+
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic">
|
|
8
8
|
<mat-label>{{ label$ }}</mat-label>
|
|
9
9
|
<input
|
|
10
10
|
matInput
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
(change)="fieldOnChange($event)"
|
|
18
18
|
(blur)="fieldOnBlur($event)"
|
|
19
19
|
/>
|
|
20
|
+
<mat-hint *ngIf="helperText" [appFieldWarning]="bFieldMessageVisible$">{{ helperText }}</mat-hint>
|
|
20
21
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
21
22
|
</mat-form-field>
|
|
22
23
|
</div>
|
|
@@ -5,6 +5,7 @@ import { MatInputModule } from '@angular/material/input';
|
|
|
5
5
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
6
|
|
|
7
7
|
import { FieldBase } from '@pega/angular-sdk-components';
|
|
8
|
+
import { FieldWarningDirective } from '@pega/angular-sdk-components';
|
|
8
9
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
9
10
|
import { handleEvent } from '@pega/angular-sdk-components';
|
|
10
11
|
import { PConnFieldProps } from '@pega/angular-sdk-components';
|
|
@@ -17,7 +18,7 @@ interface EmailProps extends PConnFieldProps {
|
|
|
17
18
|
selector: 'app-email',
|
|
18
19
|
templateUrl: './email.component.html',
|
|
19
20
|
styleUrls: ['./email.component.scss'],
|
|
20
|
-
imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, forwardRef(() => ComponentMapperComponent)]
|
|
21
|
+
imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, FieldWarningDirective, forwardRef(() => ComponentMapperComponent)]
|
|
21
22
|
})
|
|
22
23
|
export class EmailComponent extends FieldBase implements OnInit, OnDestroy {
|
|
23
24
|
configProps$: EmailProps;
|
|
@@ -28,7 +29,6 @@ export class EmailComponent extends FieldBase implements OnInit, OnDestroy {
|
|
|
28
29
|
override updateSelf(): void {
|
|
29
30
|
// Resolve configuration properties
|
|
30
31
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as EmailProps;
|
|
31
|
-
|
|
32
32
|
// Update component common properties
|
|
33
33
|
this.updateComponentCommonProperties(this.configProps$);
|
|
34
34
|
|
package/lib/field/field.base.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms';
|
|
|
3
3
|
|
|
4
4
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
5
5
|
import { Utils } from '@pega/angular-sdk-components';
|
|
6
|
+
import type { PConnFieldProps } from '../../_types/PConnProps.interface';
|
|
6
7
|
|
|
7
8
|
@Directive()
|
|
8
9
|
export class FieldBase implements OnInit, OnDestroy {
|
|
@@ -31,6 +32,10 @@ export class FieldBase implements OnInit, OnDestroy {
|
|
|
31
32
|
bDisabled$ = false;
|
|
32
33
|
bVisible$ = true;
|
|
33
34
|
displayMode$ = '';
|
|
35
|
+
bFieldMessageVisible$ = false;
|
|
36
|
+
fieldMessage = '';
|
|
37
|
+
|
|
38
|
+
private defaultHelperText = '';
|
|
34
39
|
|
|
35
40
|
/**
|
|
36
41
|
* Initializes the component, registers with AngularPConnect, and sets up form control.
|
|
@@ -101,7 +106,7 @@ export class FieldBase implements OnInit, OnDestroy {
|
|
|
101
106
|
this.label$ = label;
|
|
102
107
|
this.hideLabel = hideLabel;
|
|
103
108
|
this.displayMode$ = displayMode;
|
|
104
|
-
this.
|
|
109
|
+
this.defaultHelperText = helperText ?? '';
|
|
105
110
|
this.placeholder = placeholder || '';
|
|
106
111
|
|
|
107
112
|
// Convert boolean properties
|
|
@@ -113,10 +118,27 @@ export class FieldBase implements OnInit, OnDestroy {
|
|
|
113
118
|
// Enable or disable field control
|
|
114
119
|
this.fieldControl[this.bDisabled$ ? 'disable' : 'enable']();
|
|
115
120
|
|
|
121
|
+
this.updateFieldMessage(configProps);
|
|
122
|
+
|
|
116
123
|
// Display error message if validation message exists
|
|
117
124
|
this.displayValidationMessage();
|
|
118
125
|
}
|
|
119
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Updates the contextual field message state for fields that support it.
|
|
129
|
+
*
|
|
130
|
+
* @param configProps The resolved field configuration.
|
|
131
|
+
*/
|
|
132
|
+
protected updateFieldMessage(configProps: Pick<PConnFieldProps, 'messageConfig' | 'showFieldMessage'>): void {
|
|
133
|
+
const { messageConfig = {}, showFieldMessage } = configProps;
|
|
134
|
+
const isVisible = this.utils.getBooleanValue(messageConfig.visibility);
|
|
135
|
+
const shouldShowFieldMessage = this.utils.getBooleanValue(showFieldMessage) && isVisible && !this.bReadonly$;
|
|
136
|
+
|
|
137
|
+
this.bFieldMessageVisible$ = shouldShowFieldMessage;
|
|
138
|
+
this.fieldMessage = shouldShowFieldMessage ? (messageConfig.content ?? '') : '';
|
|
139
|
+
this.updateHelperText();
|
|
140
|
+
}
|
|
141
|
+
|
|
120
142
|
/**
|
|
121
143
|
* Displays the validation message if it exists.
|
|
122
144
|
*/
|
|
@@ -129,6 +151,10 @@ export class FieldBase implements OnInit, OnDestroy {
|
|
|
129
151
|
}
|
|
130
152
|
}
|
|
131
153
|
|
|
154
|
+
private updateHelperText(): void {
|
|
155
|
+
this.helperText = this.bFieldMessageVisible$ ? this.fieldMessage : this.defaultHelperText;
|
|
156
|
+
}
|
|
157
|
+
|
|
132
158
|
/**
|
|
133
159
|
* Retrieves the error message for the current field control.
|
|
134
160
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<ng-template #noDisplayMode>
|
|
5
5
|
<div *ngIf="!bReadonly$ && bHasForm$; else noEdit">
|
|
6
6
|
<div [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
7
|
-
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic"
|
|
7
|
+
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic">
|
|
8
8
|
<mat-label>{{ label$ }}</mat-label>
|
|
9
9
|
<input
|
|
10
10
|
matInput
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
(change)="fieldOnChange($event)"
|
|
19
19
|
(blur)="fieldOnBlur($event)"
|
|
20
20
|
/>
|
|
21
|
+
<mat-hint *ngIf="helperText" [appFieldWarning]="bFieldMessageVisible$">{{ helperText }}</mat-hint>
|
|
21
22
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
22
23
|
</mat-form-field>
|
|
23
24
|
</div>
|
|
@@ -5,6 +5,7 @@ import { MatInputModule } from '@angular/material/input';
|
|
|
5
5
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
6
|
|
|
7
7
|
import { FieldBase } from '@pega/angular-sdk-components';
|
|
8
|
+
import { FieldWarningDirective } from '@pega/angular-sdk-components';
|
|
8
9
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
9
10
|
import { handleEvent } from '@pega/angular-sdk-components';
|
|
10
11
|
import { PConnFieldProps } from '@pega/angular-sdk-components';
|
|
@@ -17,7 +18,7 @@ interface IntegerProps extends PConnFieldProps {
|
|
|
17
18
|
selector: 'app-integer',
|
|
18
19
|
templateUrl: './integer.component.html',
|
|
19
20
|
styleUrls: ['./integer.component.scss'],
|
|
20
|
-
imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, forwardRef(() => ComponentMapperComponent)]
|
|
21
|
+
imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, FieldWarningDirective, forwardRef(() => ComponentMapperComponent)]
|
|
21
22
|
})
|
|
22
23
|
export class IntegerComponent extends FieldBase {
|
|
23
24
|
configProps$: IntegerProps;
|
|
@@ -57,7 +58,8 @@ export class IntegerComponent extends FieldBase {
|
|
|
57
58
|
|
|
58
59
|
if (isValueChanged) {
|
|
59
60
|
const value = event?.target?.value;
|
|
60
|
-
|
|
61
|
+
const normalizedValue = value === '' ? '' : Number(value);
|
|
62
|
+
handleEvent(this.actionsApi, 'changeNblur', this.propName, normalizedValue);
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div *ngIf="mapReady && bVisible$">
|
|
2
2
|
<!-- Google suggestions -->
|
|
3
|
-
<mat-form-field class="psdk-full-width"
|
|
3
|
+
<mat-form-field class="psdk-full-width">
|
|
4
4
|
<mat-label>{{ label$ }}</mat-label>
|
|
5
5
|
<input
|
|
6
6
|
matInput
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
(blur)="fieldOnBlur()"
|
|
15
15
|
/>
|
|
16
16
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
17
|
+
<mat-hint *ngIf="helperText" [appFieldWarning]="bFieldMessageVisible$">{{ helperText }}</mat-hint>
|
|
17
18
|
<button
|
|
18
19
|
mat-icon-button
|
|
19
20
|
matSuffix
|
|
@@ -11,6 +11,7 @@ import { GoogleMapsModule } from '@angular/google-maps';
|
|
|
11
11
|
import { debounceTime, from, of, switchMap } from 'rxjs';
|
|
12
12
|
|
|
13
13
|
import { FieldBase } from '@pega/angular-sdk-components';
|
|
14
|
+
import { FieldWarningDirective } from '@pega/angular-sdk-components';
|
|
14
15
|
import { GoogleMapsLoaderService } from '@pega/angular-sdk-components';
|
|
15
16
|
import { handleEvent } from '@pega/angular-sdk-components';
|
|
16
17
|
|
|
@@ -34,7 +35,8 @@ interface LocationProps extends PConnFieldProps {
|
|
|
34
35
|
MatIconModule,
|
|
35
36
|
MatInputModule,
|
|
36
37
|
MatProgressSpinnerModule,
|
|
37
|
-
ReactiveFormsModule
|
|
38
|
+
ReactiveFormsModule,
|
|
39
|
+
FieldWarningDirective
|
|
38
40
|
],
|
|
39
41
|
templateUrl: './location.component.html',
|
|
40
42
|
styleUrl: './location.component.scss'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<ng-container *ngIf="bVisible$" [ngSwitch]="renderMode">
|
|
2
2
|
<!-- SingleReferenceReadOnly mode -->
|
|
3
3
|
<div *ngSwitchCase="'singleReferenceReadonly'">
|
|
4
|
-
<component-mapper name="SingleReferenceReadOnly" [props]="{ pConn
|
|
4
|
+
<component-mapper name="SingleReferenceReadOnly" [props]="{ pConn$, isDetails$, dataRelationshipContext }"></component-mapper>
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
7
|
<!-- MultiReferenceReadonly mode -->
|
|
@@ -46,6 +46,7 @@ type RenderMode = 'singleReferenceReadonly' | 'multiReferenceReadonly' | 'semant
|
|
|
46
46
|
export class ObjectReferenceComponent implements OnInit, OnDestroy {
|
|
47
47
|
@Input() pConn$: typeof PConnect;
|
|
48
48
|
@Input() formGroup$: FormGroup;
|
|
49
|
+
@Input() isDetails$ = false;
|
|
49
50
|
|
|
50
51
|
angularPConnectData: AngularPConnectData = {};
|
|
51
52
|
configProps: ObjectReferenceProps;
|
|
@@ -56,6 +57,7 @@ export class ObjectReferenceComponent implements OnInit, OnDestroy {
|
|
|
56
57
|
newComponentName: string;
|
|
57
58
|
newPconn: typeof PConnect;
|
|
58
59
|
rawViewMetadata: ComponentMetadataConfig | undefined;
|
|
60
|
+
dataRelationshipContext: string | null = null;
|
|
59
61
|
|
|
60
62
|
// Rendering mode
|
|
61
63
|
renderMode: RenderMode = 'dynamicComponent';
|
|
@@ -143,6 +145,7 @@ export class ObjectReferenceComponent implements OnInit, OnDestroy {
|
|
|
143
145
|
|
|
144
146
|
this.isDisplayModeEnabled = displayMode === 'DISPLAY_ONLY';
|
|
145
147
|
this.type = rawConfig?.componentType;
|
|
148
|
+
this.dataRelationshipContext = rawConfig?.displayField ? getDataRelationshipContextFromKey(rawConfig.displayField) : null;
|
|
146
149
|
this.canBeChangedInReviewMode = editableInReview && ['AutoComplete', 'Dropdown'].includes(this.type);
|
|
147
150
|
|
|
148
151
|
if (this.handleReadOnlyMode(rawConfig, mode)) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<ng-template #noDisplayMode>
|
|
5
5
|
<div *ngIf="bHasForm$; else noEdit">
|
|
6
6
|
<div [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
7
|
-
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic"
|
|
7
|
+
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic">
|
|
8
8
|
<mat-label>{{ label$ }}</mat-label>
|
|
9
9
|
<input
|
|
10
10
|
type="text"
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
(blur)="fieldOnBlur($event)"
|
|
31
31
|
[readonly]="bReadonly$"
|
|
32
32
|
/>
|
|
33
|
+
<mat-hint *ngIf="helperText" [appFieldWarning]="bFieldMessageVisible$">{{ helperText }}</mat-hint>
|
|
33
34
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
34
35
|
</mat-form-field>
|
|
35
36
|
</div>
|
|
@@ -6,6 +6,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
|
|
6
6
|
import { NgxCurrencyDirective, NgxCurrencyInputMode } from 'ngx-currency';
|
|
7
7
|
|
|
8
8
|
import { FieldBase } from '@pega/angular-sdk-components';
|
|
9
|
+
import { FieldWarningDirective } from '@pega/angular-sdk-components';
|
|
9
10
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
10
11
|
import { handleEvent } from '@pega/angular-sdk-components';
|
|
11
12
|
import { getCurrencyCharacters } from '@pega/angular-sdk-components';
|
|
@@ -24,7 +25,15 @@ interface PercentageProps extends Omit<PConnFieldProps, 'value'> {
|
|
|
24
25
|
selector: 'app-percentage',
|
|
25
26
|
templateUrl: './percentage.component.html',
|
|
26
27
|
styleUrls: ['./percentage.component.scss'],
|
|
27
|
-
imports: [
|
|
28
|
+
imports: [
|
|
29
|
+
CommonModule,
|
|
30
|
+
ReactiveFormsModule,
|
|
31
|
+
MatFormFieldModule,
|
|
32
|
+
MatInputModule,
|
|
33
|
+
NgxCurrencyDirective,
|
|
34
|
+
FieldWarningDirective,
|
|
35
|
+
forwardRef(() => ComponentMapperComponent)
|
|
36
|
+
]
|
|
28
37
|
})
|
|
29
38
|
export class PercentageComponent extends FieldBase {
|
|
30
39
|
configProps$: PercentageProps;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
</div>
|
|
4
4
|
<ng-template #noDisplayMode>
|
|
5
5
|
<div *ngIf="bHasForm$ && bVisible$; else noEdit">
|
|
6
|
-
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic"
|
|
6
|
+
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic" floatLabel="always">
|
|
7
7
|
<mat-tel-input
|
|
8
8
|
[attr.data-test-id]="testId"
|
|
9
9
|
[formControl]="fieldControl"
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
>
|
|
19
19
|
</mat-tel-input>
|
|
20
20
|
<mat-label>{{ label$ }}</mat-label>
|
|
21
|
+
<mat-hint *ngIf="helperText" [appFieldWarning]="bFieldMessageVisible$">{{ helperText }}</mat-hint>
|
|
21
22
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
22
23
|
</mat-form-field>
|
|
23
24
|
</div>
|
|
@@ -6,6 +6,7 @@ import { MatTelInput } from 'mat-tel-input';
|
|
|
6
6
|
import { parsePhoneNumberFromString } from 'libphonenumber-js';
|
|
7
7
|
|
|
8
8
|
import { FieldBase } from '@pega/angular-sdk-components';
|
|
9
|
+
import { FieldWarningDirective } from '@pega/angular-sdk-components';
|
|
9
10
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
10
11
|
import { handleEvent } from '@pega/angular-sdk-components';
|
|
11
12
|
import { PConnFieldProps } from '@pega/angular-sdk-components';
|
|
@@ -18,7 +19,7 @@ interface PhoneProps extends PConnFieldProps {
|
|
|
18
19
|
selector: 'app-phone',
|
|
19
20
|
templateUrl: './phone.component.html',
|
|
20
21
|
styleUrls: ['./phone.component.scss'],
|
|
21
|
-
imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, MatTelInput, forwardRef(() => ComponentMapperComponent)]
|
|
22
|
+
imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, MatTelInput, FieldWarningDirective, forwardRef(() => ComponentMapperComponent)]
|
|
22
23
|
})
|
|
23
24
|
export class PhoneComponent extends FieldBase {
|
|
24
25
|
configProps$: PhoneProps;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
<ng-template #noDisplayMode>
|
|
11
11
|
<div [formGroup]="formGroup$" *ngIf="bVisible$">
|
|
12
|
-
<mat-form-field class="psdk-radio-form" subscriptSizing="dynamic"
|
|
12
|
+
<mat-form-field class="psdk-radio-form" subscriptSizing="dynamic">
|
|
13
13
|
<mat-label>{{ label$ }}</mat-label>
|
|
14
14
|
<input matInput [placeholder]="placeholder" style="display: none" [required]="bRequired$" />
|
|
15
15
|
<mat-radio-group
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
{{ getLocalizedOptionValue(opt) }}
|
|
31
31
|
</mat-radio-button>
|
|
32
32
|
</mat-radio-group>
|
|
33
|
+
<mat-hint *ngIf="helperText" [appFieldWarning]="bFieldMessageVisible$">{{ helperText }}</mat-hint>
|
|
33
34
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
34
35
|
</mat-form-field>
|
|
35
36
|
</div>
|
|
@@ -6,6 +6,7 @@ import { MatInputModule } from '@angular/material/input';
|
|
|
6
6
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
7
7
|
|
|
8
8
|
import { FieldBase } from '@pega/angular-sdk-components';
|
|
9
|
+
import { FieldWarningDirective } from '@pega/angular-sdk-components';
|
|
9
10
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
10
11
|
import { Utils } from '@pega/angular-sdk-components';
|
|
11
12
|
import { handleEvent } from '@pega/angular-sdk-components';
|
|
@@ -28,7 +29,15 @@ interface RadioButtonsProps extends PConnFieldProps {
|
|
|
28
29
|
templateUrl: './radio-buttons.component.html',
|
|
29
30
|
styleUrls: ['./radio-buttons.component.scss'],
|
|
30
31
|
providers: [Utils],
|
|
31
|
-
imports: [
|
|
32
|
+
imports: [
|
|
33
|
+
CommonModule,
|
|
34
|
+
ReactiveFormsModule,
|
|
35
|
+
MatFormFieldModule,
|
|
36
|
+
MatInputModule,
|
|
37
|
+
MatRadioModule,
|
|
38
|
+
FieldWarningDirective,
|
|
39
|
+
forwardRef(() => ComponentMapperComponent)
|
|
40
|
+
]
|
|
32
41
|
})
|
|
33
42
|
export class RadioButtonsComponent extends FieldBase {
|
|
34
43
|
configProps$: RadioButtonsProps;
|
|
@@ -2,171 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
:host {
|
|
4
4
|
display: block;
|
|
5
|
-
background-color:
|
|
5
|
+
background-color: transparent;
|
|
6
6
|
color: var(--mat-sys-on-surface, #000);
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
::ng-deep {
|
|
10
|
-
.tox-tinymce {
|
|
11
|
-
border: 1px solid var(--mat-sys-outline, #ccc) !important;
|
|
12
|
-
border-radius: 4px !important;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.tox-edit-area__iframe {
|
|
16
|
-
background-color: transparent !important;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.tox .tox-toolbar,
|
|
20
|
-
.tox .tox-toolbar__primary,
|
|
21
|
-
.tox .tox-editor-header {
|
|
22
|
-
background-color: var(--mat-sys-surface-container-high, #f0f0f0) !important;
|
|
23
|
-
border-bottom: 1px solid var(--mat-sys-outline-variant, #ccc) !important;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.tox .tox-tbtn {
|
|
27
|
-
color: var(--mat-sys-on-surface-variant, #555) !important;
|
|
28
|
-
background: transparent !important;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.tox .tox-tbtn svg {
|
|
32
|
-
fill: var(--mat-sys-on-surface-variant, #555) !important;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.tox .tox-tbtn:hover {
|
|
36
|
-
background: var(--mat-sys-hover-state-layer-opacity, rgba(0, 0, 0, 0.05)) !important;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.tox .tox-tbtn--enabled,
|
|
40
|
-
.tox .tox-tbtn--enabled:hover {
|
|
41
|
-
background: var(--mat-sys-secondary-container, #e8def8) !important;
|
|
42
|
-
color: var(--mat-sys-on-secondary-container, #1d192b) !important;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.tox .tox-tbtn--enabled svg {
|
|
46
|
-
fill: var(--mat-sys-on-secondary-container, #1d192b) !important;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.tox .tox-tbtn--select {
|
|
50
|
-
background-color: transparent !important;
|
|
51
|
-
margin: 2px 0;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.tox .tox-tbtn__select-label {
|
|
55
|
-
color: var(--mat-sys-on-surface, #000) !important;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.tox .tox-tbtn__select-chevron svg {
|
|
59
|
-
fill: var(--mat-sys-on-surface-variant, #555) !important;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.tox .tox-tbtn--select:hover {
|
|
63
|
-
background-color: var(--mat-sys-hover-state-layer-opacity, rgba(0, 0, 0, 0.05)) !important;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.tox .tox-statusbar {
|
|
67
|
-
background-color: var(--mat-sys-surface-container-high, #f0f0f0) !important;
|
|
68
|
-
border-top: 1px solid var(--mat-sys-outline-variant, #ccc) !important;
|
|
69
|
-
color: var(--mat-sys-on-surface-variant, #555) !important;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.tox .tox-dialog {
|
|
73
|
-
background-color: var(--mat-sys-surface-container, #fff) !important;
|
|
74
|
-
color: var(--mat-sys-on-surface, #000) !important;
|
|
75
|
-
border: 1px solid var(--mat-sys-outline-variant, #ccc) !important;
|
|
76
|
-
box-shadow: 0 4px 12px var(--mat-sys-shadow, rgba(0, 0, 0, 0.2)) !important;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.tox .tox-dialog__header {
|
|
80
|
-
background-color: var(--mat-sys-surface-container, #fff) !important;
|
|
81
|
-
color: var(--mat-sys-on-surface, #000) !important;
|
|
82
|
-
border-bottom: 1px solid var(--mat-sys-outline-variant, #ccc) !important;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.tox .tox-dialog__footer {
|
|
86
|
-
background-color: var(--mat-sys-surface-container, #fff) !important;
|
|
87
|
-
border-top: 1px solid var(--mat-sys-outline-variant, #ccc) !important;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.tox .tox-dialog-wrap__backdrop {
|
|
91
|
-
background-color: var(--mat-sys-scrim, rgba(0, 0, 0, 0.5)) !important;
|
|
92
|
-
opacity: 0.6;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.tox .tox-dialog__body input,
|
|
96
|
-
.tox .tox-dialog__body textarea,
|
|
97
|
-
.tox .tox-dialog__body select {
|
|
98
|
-
background-color: transparent !important;
|
|
99
|
-
color: var(--mat-sys-on-surface, #000) !important;
|
|
100
|
-
border: 1px solid var(--mat-sys-outline, #ccc) !important;
|
|
101
|
-
border-radius: 4px !important;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.tox .tox-label {
|
|
105
|
-
color: var(--mat-sys-on-surface-variant, #555) !important;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.tox .tox-button--icon--hover:hover {
|
|
109
|
-
background-color: var(--mat-sys-hover-state-layer-opacity) !important;
|
|
110
|
-
color: var(--mat-sys-on-surface) !important;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.tox .tox-dialog__footer .tox-button {
|
|
114
|
-
background-color: var(--mat-sys-primary, #6200ee) !important;
|
|
115
|
-
color: var(--mat-sys-on-primary, #fff) !important;
|
|
116
|
-
border: none !important;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.tox .tox-dialog__footer .tox-button--secondary {
|
|
120
|
-
background-color: transparent !important;
|
|
121
|
-
color: var(--mat-sys-primary, #6200ee) !important;
|
|
122
|
-
border: 1px solid var(--mat-sys-outline, #ccc) !important;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
::ng-deep {
|
|
127
|
-
.tox .tox-menu {
|
|
128
|
-
background-color: var(--mat-sys-surface-container, #2e334f) !important;
|
|
129
|
-
border: 1px solid var(--mat-sys-outline-variant, #404562) !important;
|
|
130
|
-
box-shadow: 0 4px 10px var(--mat-sys-shadow, rgba(0, 0, 0, 0.3)) !important;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.tox .tox-collection__item {
|
|
134
|
-
color: var(--mat-sys-on-surface, #dde1ff) !important;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.tox .tox-collection__item--active {
|
|
138
|
-
background-color: var(--mat-sys-secondary-container, #810081) !important;
|
|
139
|
-
color: var(--mat-sys-on-secondary-container, #ffd7f5) !important;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.tox .tox-collection__item-icon svg {
|
|
143
|
-
fill: var(--mat-sys-on-surface, #dde1ff) !important;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.tox .tox-collection__item-accessory {
|
|
147
|
-
color: var(--mat-sys-on-surface-variant, #c0c5e7) !important;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.tox .tox-swatches__picker-btn {
|
|
151
|
-
border-color: var(--mat-sys-outline-variant) !important;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.tox .tox-listbox {
|
|
155
|
-
background-color: transparent !important;
|
|
156
|
-
border: 1px solid var(--mat-sys-outline, #8a8faf) !important;
|
|
157
|
-
color: var(--mat-sys-on-surface, #dde1ff) !important;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.tox .tox-listbox__select-chevron svg {
|
|
161
|
-
fill: var(--mat-sys-on-surface-variant, #c0c5e7) !important;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.tox .tox-listbox__select-label {
|
|
165
|
-
color: var(--mat-sys-on-surface, #dde1ff) !important;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.tox .tox-listboxfield .tox-listbox--select {
|
|
169
|
-
background-color: transparent !important;
|
|
170
|
-
color: var(--mat-sys-on-surface, #dde1ff) !important;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
@@ -46,7 +46,7 @@ export class RichTextComponent extends FieldBase {
|
|
|
46
46
|
|
|
47
47
|
fieldOnChange(editorValue: any) {
|
|
48
48
|
const oldVal = this.value$ ?? '';
|
|
49
|
-
const newVal = editorValue
|
|
49
|
+
const newVal = typeof editorValue === 'string' ? editorValue : (editorValue ?? '');
|
|
50
50
|
|
|
51
51
|
const isValueChanged = newVal.toString() !== oldVal.toString();
|
|
52
52
|
|
|
@@ -98,11 +98,14 @@ export class SemanticLinkComponent implements OnInit, OnDestroy {
|
|
|
98
98
|
};
|
|
99
99
|
}, {});
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
if (lookUpDataPage) {
|
|
102
|
+
this.pConn$.getActionsApi().showData('pyDetails', lookUpDataPage, {
|
|
103
|
+
...this.payload
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return;
|
|
104
107
|
}
|
|
105
|
-
if ((this.referenceType && this.referenceType.toUpperCase() === 'DATA') || this.shouldTreatAsDataReference) {
|
|
108
|
+
if (this.dataViewName && ((this.referenceType && this.referenceType.toUpperCase() === 'DATA') || this.shouldTreatAsDataReference)) {
|
|
106
109
|
this.pConn$.getActionsApi().showData('pyDetails', this.dataViewName, {
|
|
107
110
|
...this.payload
|
|
108
111
|
});
|
|
@@ -153,7 +156,8 @@ export class SemanticLinkComponent implements OnInit, OnDestroy {
|
|
|
153
156
|
}
|
|
154
157
|
|
|
155
158
|
private buildDataPayload() {
|
|
156
|
-
const { dataRelationshipContext
|
|
159
|
+
const { dataRelationshipContext: configuredDataRelationshipContext, contextPage } = this.configProps$;
|
|
160
|
+
const dataRelationshipContext = configuredDataRelationshipContext ?? null;
|
|
157
161
|
const {
|
|
158
162
|
RESOURCE_TYPES: { DATA }
|
|
159
163
|
} = PCore.getConstants();
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<div *ngIf="bHasForm$; else noEdit">
|
|
6
6
|
<div [formGroup]="formGroup$">
|
|
7
7
|
<div *ngIf="bVisible$">
|
|
8
|
-
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic"
|
|
8
|
+
<mat-form-field class="psdk-full-width" subscriptSizing="dynamic">
|
|
9
9
|
<mat-label>{{ label$ }}</mat-label>
|
|
10
10
|
<textarea
|
|
11
11
|
matInput
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
(change)="fieldOnChange($event)"
|
|
22
22
|
(blur)="fieldOnBlur($event)"
|
|
23
23
|
></textarea>
|
|
24
|
+
<mat-hint *ngIf="helperText" [appFieldWarning]="bFieldMessageVisible$">{{ helperText }}</mat-hint>
|
|
24
25
|
<mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error>
|
|
25
26
|
</mat-form-field>
|
|
26
27
|
</div>
|