@pega/dx-component-builder-sdk 0.23.14 → 0.23.15
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/package.json +1 -1
- package/src/constants.js +8 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.html.mustache +5 -1
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.ts.mustache +6 -0
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.html.mustache +5 -1
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.ts.mustache +7 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/details.component.ts.mustache +2 -1
- package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.scss.mustache +14 -5
- package/src/tasks/create/templates/SDK-React/field/Boolean/demo.stories.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.tsx.mustache +17 -15
- package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.tsx.mustache +15 -14
- package/src/tasks/create/templates/SDK-React/field/Decimal/demo.stories.tsx.mustache +15 -14
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.tsx.mustache +14 -12
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/demo.stories.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Integer/demo.stories.tsx.mustache +3 -3
- package/src/tasks/create/templates/SDK-React/field/Picklist/demo.stories.tsx.mustache +2 -3
- package/src/tasks/create/templates/SDK-React/field/Picklist-Autocomplete/demo.stories.tsx.mustache +3 -3
- package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/demo.stories.tsx.mustache +6 -4
- package/src/tasks/create/templates/SDK-React/field/Text/demo.stories.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/field/Text-Email/demo.stories.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/field/Text-Input/demo.stories.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/demo.stories.tsx.mustache +6 -4
- package/src/tasks/create/templates/SDK-React/field/Text-URL/demo.stories.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/demo.stories.tsx.mustache +6 -4
- package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.tsx.mustache +22 -22
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.tsx.mustache +17 -17
- package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.tsx.mustache +30 -18
- package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.tsx.mustache +50 -24
- package/src/tasks/create/templates/SDK-React/template/PAGE/demo.stories.tsx.mustache +37 -21
- package/src/tasks/create/templates/SDK-React/widget/CASE/demo.stories.tsx.mustache +22 -10
- package/src/tasks/create/templates/SDK-React/widget/PAGE/demo.stories.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.tsx.mustache +21 -9
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/field-group/field-group.component.html +21 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/field-group/field-group.component.scss +18 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/field-group/field-group.component.spec.ts +21 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/field-group/field-group.component.ts +24 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/material-details-fields/material-details-fields.component.html +8 -2
- package/tests/assets/sdk-a/components/create/override-sdk/field/check-box/check-box.component.html +5 -1
- package/tests/assets/sdk-a/components/create/override-sdk/field/check-box/check-box.component.ts +6 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/date/date.component.html +5 -1
- package/tests/assets/sdk-a/components/create/override-sdk/field/date/date.component.ts +7 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/group/config-ext.json +8 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/group/group.component.html +25 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/group/group.component.scss +0 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/group/group.component.spec.ts +21 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/group/group.component.ts +84 -0
- package/tests/assets/sdk-a/components/create/override-sdk/template/app-shell/app-shell.component.ts +2 -2
- package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.ts +1 -1
- package/tests/assets/sdk-a/components/create/override-sdk/template/default-form/default-form.component.scss +9 -5
- package/tests/assets/sdk-a/components/create/override-sdk/template/details/details.component.ts +2 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/pega-dxil-my-boolean.component.html +5 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/pega-dxil-my-boolean.component.ts +6 -0
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date/pega-dxil-my-date.component.html +5 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date/pega-dxil-my-date.component.ts +7 -0
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-details/pega-dxil-my-details.component.ts +2 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/pega-dxil-my-form.component.scss +14 -5
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/field-group/field-group.component.html +21 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/field-group/field-group.component.scss +18 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/field-group/field-group.component.spec.ts +21 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/field-group/field-group.component.ts +24 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/material-details-fields/material-details-fields.component.html +8 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/check-box/check-box.component.html +5 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/check-box/check-box.component.ts +6 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/date/date.component.html +5 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/date/date.component.ts +7 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/config-ext.json +8 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.html +25 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.scss +0 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.spec.ts +21 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.ts +84 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/app-shell/app-shell.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/case-view/case-view.component.ts +1 -1
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/default-form/default-form.component.scss +9 -5
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details/details.component.ts +2 -1
- package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +15 -16
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +35 -6
- package/tests/assets/sdk-r/components/create/override-sdk/field/Checkbox/Checkbox.tsx +7 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/Group/Group.tsx +37 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Group/config-ext.json +8 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Group/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +14 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/DefaultForm/DefaultForm.css +6 -2
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +19 -1
- package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.tsx +22 -16
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/PConnProps.d.ts +46 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/demo.stories.tsx +54 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/index.tsx +73 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/mock.ts +15 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/styles.ts +15 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +23 -21
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/demo.stories.tsx +14 -12
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.tsx +17 -15
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +21 -23
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +15 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +20 -22
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/demo.stories.tsx +15 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +1 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/index.tsx +23 -24
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/demo.stories.tsx +3 -3
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/demo.stories.tsx +8 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +18 -19
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/demo.stories.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/demo.stories.tsx +6 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +33 -34
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/demo.stories.tsx +2 -3
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/demo.stories.tsx +6 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/index.tsx +22 -23
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MySearchbox/demo.stories.tsx +3 -3
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MySearchbox/index.tsx +28 -29
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/config.json +83 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/demo.stories.tsx +59 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +101 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/mock.ts +16 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/styles.js +7 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +15 -16
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +15 -16
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +6 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +1 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +16 -17
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/demo.stories.tsx +22 -22
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +16 -17
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.tsx +56 -18
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx +3 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/demo.stories.tsx +37 -21
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/index.tsx +4 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +17 -17
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +16 -17
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +50 -24
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/index.tsx +8 -9
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +22 -10
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +10 -11
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +21 -9
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +34 -34
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +3 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/index.tsx +23 -24
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldGroup/FieldGroup.tsx +35 -6
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Checkbox/Checkbox.tsx +7 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/Group.tsx +37 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/config-ext.json +8 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +14 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DefaultForm/DefaultForm.css +6 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +19 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +22 -16
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { FieldGroupComponent } from './field-group.component';
|
|
4
|
+
|
|
5
|
+
describe('FieldGroupComponent', () => {
|
|
6
|
+
let component: FieldGroupComponent;
|
|
7
|
+
let fixture: ComponentFixture<FieldGroupComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [FieldGroupComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(FieldGroupComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input, TemplateRef } from '@angular/core';
|
|
3
|
+
import { MatGridListModule } from '@angular/material/grid-list';
|
|
4
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-field-group',
|
|
8
|
+
templateUrl: './field-group.component.html',
|
|
9
|
+
styleUrls: ['./field-group.component.scss'],
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [CommonModule, MatGridListModule, MatIconModule]
|
|
12
|
+
})
|
|
13
|
+
export class FieldGroupComponent {
|
|
14
|
+
@Input() name?: string;
|
|
15
|
+
@Input() collapsible = false;
|
|
16
|
+
@Input() instructions: string;
|
|
17
|
+
@Input() childrenTemplate: TemplateRef<any>;
|
|
18
|
+
|
|
19
|
+
collapsed = false;
|
|
20
|
+
|
|
21
|
+
headerClickHandler() {
|
|
22
|
+
this.collapsed = !this.collapsed;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<div id="details-fields-list">
|
|
2
2
|
<div *ngFor="let field of arFields$">
|
|
3
|
-
<div *ngIf="field.type === '
|
|
4
|
-
<component-mapper name="
|
|
3
|
+
<div *ngIf="field.type === 'group'; else noGroup">
|
|
4
|
+
<component-mapper name="Group" [props]="{ pConn$: field.pConn }"></component-mapper>
|
|
5
5
|
</div>
|
|
6
|
+
<ng-template #noGroup>
|
|
7
|
+
<div *ngIf="field.type === 'reference'; else showDetails">
|
|
8
|
+
<component-mapper name="View" [props]="{ pConn$: field.pConn }"></component-mapper>
|
|
9
|
+
</div>
|
|
10
|
+
</ng-template>
|
|
11
|
+
|
|
6
12
|
<ng-template #showDetails>
|
|
7
13
|
<div class="psdk-grid-filter" *ngIf="field.config.label">
|
|
8
14
|
<div class="psdk-details-fields-label">
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<div *ngIf="displayMode$; else noDisplayMode">
|
|
2
|
-
<component-mapper
|
|
2
|
+
<component-mapper
|
|
3
|
+
*ngIf="bVisible$ !== false"
|
|
4
|
+
name="FieldValueList"
|
|
5
|
+
[props]="{ label$: caption$, value$: value$ ? trueLabel$ : falseLabel$, displayMode$ }"
|
|
6
|
+
></component-mapper>
|
|
3
7
|
</div>
|
|
4
8
|
<ng-template #noDisplayMode>
|
|
5
9
|
<div *ngIf="!bReadonly$ && bHasForm$; else noEdit">
|
package/tests/assets/sdk-a/components/createAll/override-sdk/field/check-box/check-box.component.ts
CHANGED
|
@@ -13,6 +13,8 @@ interface CheckboxProps extends Omit<PConnFieldProps, 'value'> {
|
|
|
13
13
|
// Everything from PConnFieldProps except value and change type of value to boolean
|
|
14
14
|
value: boolean;
|
|
15
15
|
caption?: string;
|
|
16
|
+
trueLabel?: string;
|
|
17
|
+
falseLabel?: string;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
@Component({
|
|
@@ -45,6 +47,8 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
|
|
|
45
47
|
bHasForm$ = true;
|
|
46
48
|
componentReference = '';
|
|
47
49
|
helperText: string;
|
|
50
|
+
trueLabel$?: string;
|
|
51
|
+
falseLabel$?: string;
|
|
48
52
|
|
|
49
53
|
fieldControl = new FormControl('', null);
|
|
50
54
|
|
|
@@ -116,6 +120,8 @@ export class CheckBoxComponent implements OnInit, OnDestroy {
|
|
|
116
120
|
|
|
117
121
|
this.caption$ = this.configProps$.caption;
|
|
118
122
|
this.helperText = this.configProps$.helperText;
|
|
123
|
+
this.trueLabel$ = this.configProps$.trueLabel;
|
|
124
|
+
this.falseLabel$ = this.configProps$.falseLabel;
|
|
119
125
|
|
|
120
126
|
// timeout and detectChanges to avoid ExpressionChangedAfterItHasBeenCheckedError
|
|
121
127
|
setTimeout(() => {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<div *ngIf="displayMode$; else noDisplayMode">
|
|
2
|
-
<component-mapper
|
|
2
|
+
<component-mapper
|
|
3
|
+
*ngIf="bVisible$ !== false"
|
|
4
|
+
name="FieldValueList"
|
|
5
|
+
[props]="{ label$, value$: getFormattedValue(), displayMode$ }"
|
|
6
|
+
></component-mapper>
|
|
3
7
|
</div>
|
|
4
8
|
<ng-template #noDisplayMode>
|
|
5
9
|
<div *ngIf="!bReadonly$ && bHasForm$; else noEdit">
|
|
@@ -14,6 +14,7 @@ import { Utils } from '@pega/angular-sdk-components';
|
|
|
14
14
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
15
15
|
import { dateFormatInfoDefault, getDateFormatInfo } from '@pega/angular-sdk-components';
|
|
16
16
|
import { PConnFieldProps } from '@pega/angular-sdk-components';
|
|
17
|
+
import { format } from '@pega/angular-sdk-components';
|
|
17
18
|
|
|
18
19
|
interface DateProps extends PConnFieldProps {
|
|
19
20
|
// If any, enter additional props that only exist on Date here
|
|
@@ -242,4 +243,10 @@ export class DateComponent implements OnInit, OnDestroy {
|
|
|
242
243
|
}
|
|
243
244
|
return errMessage;
|
|
244
245
|
}
|
|
246
|
+
|
|
247
|
+
getFormattedValue() {
|
|
248
|
+
return format(this.value$, 'date', {
|
|
249
|
+
format: this.theDateFormat.dateFormatString
|
|
250
|
+
});
|
|
251
|
+
}
|
|
245
252
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<ng-container *ngIf="visibility$">
|
|
2
|
+
<component-mapper
|
|
3
|
+
name="FieldGroup"
|
|
4
|
+
[props]="{
|
|
5
|
+
name: showHeading$ ? heading$ : undefined,
|
|
6
|
+
collapsible: collapsible$,
|
|
7
|
+
instructions: instructions$,
|
|
8
|
+
childrenTemplate: childrenTemplate
|
|
9
|
+
}"
|
|
10
|
+
>
|
|
11
|
+
</component-mapper>
|
|
12
|
+
|
|
13
|
+
<ng-template #childrenTemplate>
|
|
14
|
+
<div *ngFor="let kid of arChildren$">
|
|
15
|
+
<component-mapper
|
|
16
|
+
[name]="kid.getPConnect().getComponentName()"
|
|
17
|
+
[props]="{
|
|
18
|
+
pConn$: kid.getPConnect(),
|
|
19
|
+
formGroup$: formGroup$
|
|
20
|
+
}"
|
|
21
|
+
errorMsg="Field Group wants component not yet available: {{ kid.getPConnect().getComponentName() }}"
|
|
22
|
+
></component-mapper>
|
|
23
|
+
</div>
|
|
24
|
+
</ng-template>
|
|
25
|
+
</ng-container>
|
|
File without changes
|
package/tests/assets/sdk-a/components/createAll/override-sdk/field/group/group.component.spec.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { GroupComponent } from './group.component';
|
|
4
|
+
|
|
5
|
+
describe('GroupComponent', () => {
|
|
6
|
+
let component: GroupComponent;
|
|
7
|
+
let fixture: ComponentFixture<GroupComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [GroupComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(GroupComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, forwardRef, Input, OnInit } from '@angular/core';
|
|
3
|
+
import { FormGroup } from '@angular/forms';
|
|
4
|
+
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
5
|
+
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
6
|
+
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
7
|
+
import { PConnFieldProps } from '@pega/angular-sdk-components';
|
|
8
|
+
|
|
9
|
+
interface GroupProps extends PConnFieldProps {
|
|
10
|
+
// If any, enter additional props that only exist on Group here
|
|
11
|
+
showHeading: boolean;
|
|
12
|
+
heading: string;
|
|
13
|
+
instructions: string;
|
|
14
|
+
collapsible: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'app-group',
|
|
19
|
+
templateUrl: './group.component.html',
|
|
20
|
+
styleUrls: ['./group.component.scss'],
|
|
21
|
+
standalone: true,
|
|
22
|
+
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
23
|
+
})
|
|
24
|
+
export class GroupComponent implements OnInit {
|
|
25
|
+
@Input() pConn$: typeof PConnect;
|
|
26
|
+
@Input() formGroup$: FormGroup;
|
|
27
|
+
|
|
28
|
+
arChildren$: any[];
|
|
29
|
+
visibility$?: boolean;
|
|
30
|
+
showHeading$?: boolean;
|
|
31
|
+
heading$: string;
|
|
32
|
+
instructions$: string;
|
|
33
|
+
collapsible$: boolean;
|
|
34
|
+
|
|
35
|
+
// Used with AngularPConnect
|
|
36
|
+
angularPConnectData: AngularPConnectData = {};
|
|
37
|
+
configProps$: GroupProps;
|
|
38
|
+
|
|
39
|
+
constructor(private angularPConnect: AngularPConnectService) {}
|
|
40
|
+
|
|
41
|
+
ngOnInit(): void {
|
|
42
|
+
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
43
|
+
|
|
44
|
+
this.checkAndUpdate();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Callback passed when subscribing to store change
|
|
48
|
+
onStateChange() {
|
|
49
|
+
this.checkAndUpdate();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
checkAndUpdate() {
|
|
53
|
+
// Should always check the bridge to see if the component should
|
|
54
|
+
// update itself (re-render)
|
|
55
|
+
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
56
|
+
|
|
57
|
+
// ONLY call updateSelf when the component should update
|
|
58
|
+
if (bUpdateSelf) {
|
|
59
|
+
this.updateSelf();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
updateSelf(): void {
|
|
64
|
+
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as GroupProps;
|
|
65
|
+
this.arChildren$ = ReferenceComponent.normalizePConnArray(this.pConn$.getChildren());
|
|
66
|
+
this.visibility$ = this.configProps$.visibility;
|
|
67
|
+
this.showHeading$ = this.configProps$.showHeading;
|
|
68
|
+
this.heading$ = this.configProps$.heading;
|
|
69
|
+
this.instructions$ = this.configProps$.instructions;
|
|
70
|
+
this.collapsible$ = this.configProps$.collapsible;
|
|
71
|
+
|
|
72
|
+
if (this.configProps$.displayMode === 'LABELS_LEFT') {
|
|
73
|
+
if (this.configProps$.visibility === undefined) this.visibility$ = true;
|
|
74
|
+
|
|
75
|
+
this.arChildren$.forEach(child => {
|
|
76
|
+
const pConn = child.getPConnect();
|
|
77
|
+
pConn.setInheritedProp('displayMode', 'LABELS_LEFT');
|
|
78
|
+
pConn.setInheritedProp('readOnly', true);
|
|
79
|
+
|
|
80
|
+
return child;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -143,7 +143,7 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
143
143
|
this.sErrorMessages = this.sErrorMessages.concat(errorMessages.actionMessage).concat('\n');
|
|
144
144
|
|
|
145
145
|
if (this.bOkDisplayError) {
|
|
146
|
-
const config = { panelClass: ['snackbar-newline'] };
|
|
146
|
+
const config = { panelClass: ['snackbar-newline'], duration: 5000 };
|
|
147
147
|
this.snackBarRef = this.snackBar.open(this.sErrorMessages, 'Ok', config);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
@@ -159,7 +159,7 @@ export class AppShellComponent implements OnInit, OnDestroy {
|
|
|
159
159
|
this.bOkDisplayError = true;
|
|
160
160
|
|
|
161
161
|
if (this.bOkDisplayError) {
|
|
162
|
-
const config = { panelClass: ['snackbar-newline'] };
|
|
162
|
+
const config = { panelClass: ['snackbar-newline'], duration: 5000 };
|
|
163
163
|
this.snackBarRef = this.snackBar.open(this.sErrorMessages, 'Ok', config);
|
|
164
164
|
}
|
|
165
165
|
// this.snackBarRef.afterDismissed().subscribe( info => {
|
|
@@ -223,7 +223,7 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
223
223
|
const actionsAPI = this.pConn$.getActionsApi();
|
|
224
224
|
const openLocalAction = actionsAPI.openLocalAction.bind(actionsAPI);
|
|
225
225
|
|
|
226
|
-
openLocalAction(editAction.ID, { ...editAction });
|
|
226
|
+
openLocalAction(editAction.ID, { ...editAction, containerName: 'modal', type: 'express' });
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
_menuActionClick(data) {
|
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
.psdk-default-form-one-column {
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
4
|
-
gap: calc(1rem);
|
|
4
|
+
column-gap: calc(1rem);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.psdk-default-form-two-column {
|
|
8
8
|
display: grid;
|
|
9
9
|
grid-template-columns: repeat(2, 1fr);
|
|
10
|
-
gap: calc(1rem);
|
|
10
|
+
column-gap: calc(1rem);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.psdk-default-form-three-column {
|
|
14
14
|
display: grid;
|
|
15
15
|
grid-template-columns: repeat(3, 1fr);
|
|
16
|
-
gap: calc(1rem);
|
|
16
|
+
column-gap: calc(1rem);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.psdk-default-form-three-column .grid-column {
|
|
20
|
+
grid-column: 1 / span 3;
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
.psdk-default-form-two-column .grid-column {
|
|
20
24
|
grid-column: 1 / span 2;
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
.psdk-default-form-
|
|
24
|
-
grid-column: 1
|
|
27
|
+
.psdk-default-form-one-column .grid-column {
|
|
28
|
+
grid-column: 1;
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
.template-title-container {
|
package/tests/assets/sdk-a/components/createAll/override-sdk/template/details/details.component.ts
CHANGED
|
@@ -76,7 +76,7 @@ export class DetailsComponent implements OnInit, OnDestroy {
|
|
|
76
76
|
fields?.forEach(field => {
|
|
77
77
|
const thePConn = field.getPConnect();
|
|
78
78
|
const theCompType = thePConn.getComponentName().toLowerCase();
|
|
79
|
-
if (theCompType === 'reference') {
|
|
79
|
+
if (theCompType === 'reference' || theCompType === 'group') {
|
|
80
80
|
const configProps = thePConn.getConfigProps();
|
|
81
81
|
configProps.readOnly = true;
|
|
82
82
|
configProps.displayMode = 'LABELS_LEFT';
|
|
@@ -89,6 +89,7 @@ export class DetailsComponent implements OnInit, OnDestroy {
|
|
|
89
89
|
};
|
|
90
90
|
const viewContConfig = {
|
|
91
91
|
meta: {
|
|
92
|
+
...thePConn.getMetadata(),
|
|
92
93
|
type: theCompType,
|
|
93
94
|
config: configProps
|
|
94
95
|
},
|
package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/demo.stories.tsx
CHANGED
|
@@ -14,7 +14,7 @@ const meta: Meta<typeof PegaDxilMyTestText> = {
|
|
|
14
14
|
export default meta;
|
|
15
15
|
type Story = StoryObj<typeof PegaDxilMyTestText>;
|
|
16
16
|
|
|
17
|
-
export const BasePegaDxilMyTestText: Story =
|
|
17
|
+
export const BasePegaDxilMyTestText: Story = args => {
|
|
18
18
|
const [value, setValue] = useState(configProps.value);
|
|
19
19
|
|
|
20
20
|
const props = {
|
|
@@ -34,8 +34,12 @@ export const BasePegaDxilMyTestText: Story = (args) => {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
},
|
|
37
|
-
onChange:
|
|
38
|
-
|
|
37
|
+
onChange: event => {
|
|
38
|
+
setValue(event.target.value);
|
|
39
|
+
},
|
|
40
|
+
onBlur: () => {
|
|
41
|
+
return configProps.value;
|
|
42
|
+
}
|
|
39
43
|
};
|
|
40
44
|
|
|
41
45
|
return <PegaDxilMyTestText {...props} {...args} />;
|
|
@@ -51,5 +55,5 @@ BasePegaDxilMyTestText.args = {
|
|
|
51
55
|
status: configProps.status,
|
|
52
56
|
hideLabel: configProps.hideLabel,
|
|
53
57
|
displayMode: configProps.displayMode,
|
|
54
|
-
validatemessage: configProps.validatemessage
|
|
58
|
+
validatemessage: configProps.validatemessage
|
|
55
59
|
};
|
package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx
CHANGED
|
@@ -14,7 +14,6 @@ interface PegaDxilMyTestTextProps extends PConnFieldProps {
|
|
|
14
14
|
// Duplicated runtime code from React SDK
|
|
15
15
|
|
|
16
16
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
17
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
18
17
|
export default function PegaDxilMyTestText(props: PegaDxilMyTestTextProps) {
|
|
19
18
|
// Get emitted components from map (so we can get any override that may exist)
|
|
20
19
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
@@ -81,21 +80,21 @@ export default function PegaDxilMyTestText(props: PegaDxilMyTestTextProps) {
|
|
|
81
80
|
|
|
82
81
|
return (
|
|
83
82
|
<StyledPegaDxilMyTestTextWrapper>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
83
|
+
<TextField
|
|
84
|
+
fullWidth
|
|
85
|
+
variant={readOnly ? 'standard' : 'outlined'}
|
|
86
|
+
helperText={helperTextToDisplay}
|
|
87
|
+
placeholder={placeholder ?? ''}
|
|
88
|
+
size='small'
|
|
89
|
+
required={required}
|
|
90
|
+
disabled={disabled}
|
|
91
|
+
onChange={handleChange}
|
|
92
|
+
onBlur={!readOnly ? handleBlur : undefined}
|
|
93
|
+
error={status === 'error'}
|
|
94
|
+
label={label}
|
|
95
|
+
value={inputValue}
|
|
96
|
+
InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}
|
|
97
|
+
/>
|
|
99
98
|
</StyledPegaDxilMyTestTextWrapper>
|
|
100
99
|
);
|
|
101
100
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { PropsWithChildren, useState } from 'react';
|
|
2
2
|
import Grid from '@material-ui/core/Grid';
|
|
3
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
|
+
import KeyboardArrowRightIcon from '@material-ui/icons/KeyboardArrowRight';
|
|
5
|
+
import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
|
|
4
6
|
|
|
5
7
|
// FieldGroupProps is one of the few components that does NOT have getPConnect.
|
|
6
8
|
// So, no need to extend PConnProps
|
|
7
9
|
interface FieldGroupProps {
|
|
8
10
|
// If any, enter additional props that only exist on this component
|
|
9
|
-
name
|
|
11
|
+
name?: string;
|
|
12
|
+
collapsible?: boolean;
|
|
13
|
+
instructions?: string;
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
const useStyles = makeStyles(theme => ({
|
|
@@ -23,12 +27,22 @@ const useStyles = makeStyles(theme => ({
|
|
|
23
27
|
},
|
|
24
28
|
fullWidth: {
|
|
25
29
|
width: '100%'
|
|
30
|
+
},
|
|
31
|
+
fieldGroupHeader: {
|
|
32
|
+
display: 'flex',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
gap: '5px',
|
|
35
|
+
cursor: collapsible => (collapsible ? 'pointer' : 'auto')
|
|
36
|
+
},
|
|
37
|
+
instructionText: {
|
|
38
|
+
padding: '5px 0'
|
|
26
39
|
}
|
|
27
40
|
}));
|
|
28
41
|
|
|
29
42
|
export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>) {
|
|
30
|
-
const { children, name } = props;
|
|
31
|
-
const classes = useStyles();
|
|
43
|
+
const { children, name, collapsible = false, instructions } = props;
|
|
44
|
+
const classes = useStyles(collapsible);
|
|
45
|
+
const [collapsed, setCollapsed] = useState(false);
|
|
32
46
|
|
|
33
47
|
const descAndChildren = (
|
|
34
48
|
<Grid container>
|
|
@@ -36,15 +50,30 @@ export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>) {
|
|
|
36
50
|
</Grid>
|
|
37
51
|
);
|
|
38
52
|
|
|
53
|
+
const headerClickHandler = () => {
|
|
54
|
+
setCollapsed(current => !current);
|
|
55
|
+
};
|
|
56
|
+
|
|
39
57
|
return (
|
|
40
58
|
<Grid container spacing={4} justifyContent='space-between'>
|
|
41
59
|
<Grid item style={{ width: '100%' }}>
|
|
42
60
|
{name && (
|
|
43
61
|
<div className={classes.fieldMargin}>
|
|
44
|
-
|
|
62
|
+
{collapsible ? (
|
|
63
|
+
<span id='field-group-header' className={classes.fieldGroupHeader} onClick={headerClickHandler}>
|
|
64
|
+
{collapsed ? <KeyboardArrowRightIcon /> : <KeyboardArrowDownIcon />}
|
|
65
|
+
<b>{name}</b>
|
|
66
|
+
</span>
|
|
67
|
+
) : (
|
|
68
|
+
<b>{name}</b>
|
|
69
|
+
)}
|
|
45
70
|
</div>
|
|
46
71
|
)}
|
|
47
|
-
{
|
|
72
|
+
{instructions && instructions !== 'none' && (
|
|
73
|
+
// eslint-disable-next-line react/no-danger
|
|
74
|
+
<div key='instructions' className={classes.instructionText} dangerouslySetInnerHTML={{ __html: instructions }} />
|
|
75
|
+
)}
|
|
76
|
+
{!collapsed && descAndChildren}
|
|
48
77
|
</Grid>
|
|
49
78
|
</Grid>
|
|
50
79
|
);
|
|
@@ -10,6 +10,8 @@ interface CheckboxProps extends Omit<PConnFieldProps, 'value'> {
|
|
|
10
10
|
value?: boolean;
|
|
11
11
|
// eslint-disable-next-line react/no-unused-prop-types
|
|
12
12
|
caption?: string;
|
|
13
|
+
trueLabel?: string;
|
|
14
|
+
falseLabel?: string;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
export default function CheckboxComponent(props: CheckboxProps) {
|
|
@@ -18,7 +20,6 @@ export default function CheckboxComponent(props: CheckboxProps) {
|
|
|
18
20
|
|
|
19
21
|
const {
|
|
20
22
|
getPConnect,
|
|
21
|
-
label,
|
|
22
23
|
value = false,
|
|
23
24
|
readOnly,
|
|
24
25
|
testId,
|
|
@@ -28,7 +29,9 @@ export default function CheckboxComponent(props: CheckboxProps) {
|
|
|
28
29
|
helperText,
|
|
29
30
|
validatemessage,
|
|
30
31
|
displayMode,
|
|
31
|
-
hideLabel
|
|
32
|
+
hideLabel,
|
|
33
|
+
trueLabel,
|
|
34
|
+
falseLabel
|
|
32
35
|
} = props;
|
|
33
36
|
const helperTextToDisplay = validatemessage || helperText;
|
|
34
37
|
|
|
@@ -45,11 +48,11 @@ export default function CheckboxComponent(props: CheckboxProps) {
|
|
|
45
48
|
}, [value]);
|
|
46
49
|
|
|
47
50
|
if (displayMode === 'LABELS_LEFT') {
|
|
48
|
-
return <FieldValueList name={hideLabel ? '' :
|
|
51
|
+
return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} />;
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
52
|
-
return <FieldValueList name={hideLabel ? '' :
|
|
55
|
+
return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} variant='stacked' />;
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
const handleChange = event => {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReactElement, useMemo } from 'react';
|
|
2
|
+
import { Grid } from '@material-ui/core';
|
|
3
|
+
import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
|
|
4
|
+
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
|
+
|
|
6
|
+
interface GroupProps extends PConnFieldProps {
|
|
7
|
+
children: ReactElement[];
|
|
8
|
+
heading: string;
|
|
9
|
+
showHeading: boolean;
|
|
10
|
+
instructions?: string;
|
|
11
|
+
collapsible: boolean;
|
|
12
|
+
type: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default function Group(props: GroupProps) {
|
|
16
|
+
const { children, heading, showHeading, instructions, collapsible, displayMode, type } = props;
|
|
17
|
+
|
|
18
|
+
const isReadOnly = displayMode === 'LABELS_LEFT';
|
|
19
|
+
|
|
20
|
+
const content = useMemo(() => {
|
|
21
|
+
return (
|
|
22
|
+
<Grid container spacing={2}>
|
|
23
|
+
{children?.map(child => (
|
|
24
|
+
<Grid item xs={12} key={child.key}>
|
|
25
|
+
{child}
|
|
26
|
+
</Grid>
|
|
27
|
+
))}
|
|
28
|
+
</Grid>
|
|
29
|
+
);
|
|
30
|
+
}, [children, type, isReadOnly]);
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<FieldGroup name={showHeading ? heading : undefined} collapsible={collapsible} instructions={instructions}>
|
|
34
|
+
{content}
|
|
35
|
+
</FieldGroup>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Group';
|
|
@@ -46,6 +46,15 @@ export default function CaseViewActionsMenu(props: CaseViewActionsMenuProps) {
|
|
|
46
46
|
handleClose();
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
function _actionMenuProcessClick(process) {
|
|
50
|
+
const actionsAPI = thePConn.getActionsApi();
|
|
51
|
+
const openProcessAction = actionsAPI.openProcessAction.bind(actionsAPI);
|
|
52
|
+
openProcessAction(process.ID, {
|
|
53
|
+
...process
|
|
54
|
+
});
|
|
55
|
+
handleClose();
|
|
56
|
+
}
|
|
57
|
+
|
|
49
58
|
availableActions.forEach(action => {
|
|
50
59
|
arMenuItems.push(
|
|
51
60
|
<MenuItem key={action.ID} onClick={() => _actionMenuActionsClick(action)}>
|
|
@@ -55,7 +64,11 @@ export default function CaseViewActionsMenu(props: CaseViewActionsMenuProps) {
|
|
|
55
64
|
});
|
|
56
65
|
|
|
57
66
|
availableProcesses.forEach(process => {
|
|
58
|
-
arMenuItems.push(
|
|
67
|
+
arMenuItems.push(
|
|
68
|
+
<MenuItem key={process.ID} onClick={() => _actionMenuProcessClick(process)}>
|
|
69
|
+
{localizedVal(process.name, '', localeKey)}
|
|
70
|
+
</MenuItem>
|
|
71
|
+
);
|
|
59
72
|
});
|
|
60
73
|
|
|
61
74
|
return (
|
package/tests/assets/sdk-r/components/create/override-sdk/template/DefaultForm/DefaultForm.css
CHANGED
|
@@ -16,12 +16,16 @@
|
|
|
16
16
|
gap: calc(1rem);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
.psdk-default-form-three-column .grid-column {
|
|
20
|
+
grid-column: 1 / span 3;
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
.psdk-default-form-two-column .grid-column {
|
|
20
24
|
grid-column: 1 / span 2;
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
.psdk-default-form-
|
|
24
|
-
grid-column: 1
|
|
27
|
+
.psdk-default-form-one-column .grid-column {
|
|
28
|
+
grid-column: 1;
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
.psdk-default-form-instruction-text {
|