@pega/dx-component-builder-sdk 0.23.13 → 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 +20 -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/Boolean/index.tsx.mustache +23 -21
- package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.tsx.mustache +17 -15
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +24 -26
- package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.tsx.mustache +15 -14
- package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +20 -22
- 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 +4 -5
- 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-Currency/index.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/demo.stories.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/field/Integer/demo.stories.tsx.mustache +3 -3
- package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/field/Picklist/demo.stories.tsx.mustache +2 -3
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +3 -4
- 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-Autocomplete/index.tsx.mustache +31 -32
- package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/demo.stories.tsx.mustache +6 -4
- package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/index.tsx.mustache +22 -23
- package/src/tasks/create/templates/SDK-React/field/Text/demo.stories.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +18 -19
- 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-Email/index.tsx.mustache +26 -27
- 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-Input/index.tsx.mustache +18 -19
- 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-Paragraph/index.tsx.mustache +21 -22
- 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-Phone/index.tsx.mustache +39 -40
- package/src/tasks/create/templates/SDK-React/field/Text-URL/demo.stories.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +19 -20
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/demo.stories.tsx.mustache +6 -4
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +4 -5
- package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.tsx.mustache +22 -22
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +19 -20
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.tsx.mustache +17 -17
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +19 -20
- package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.tsx.mustache +30 -18
- package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +6 -7
- package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.tsx.mustache +50 -24
- package/src/tasks/create/templates/SDK-React/template/FORM-region/index.tsx.mustache +8 -9
- package/src/tasks/create/templates/SDK-React/template/PAGE/demo.stories.tsx.mustache +37 -21
- package/src/tasks/create/templates/SDK-React/template/PAGE/index.tsx.mustache +4 -5
- package/src/tasks/create/templates/SDK-React/widget/CASE/demo.stories.tsx.mustache +22 -10
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +10 -11
- package/src/tasks/create/templates/SDK-React/widget/PAGE/demo.stories.tsx.mustache +3 -4
- package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +23 -24
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.tsx.mustache +21 -9
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +37 -37
- package/src/tasks/validator/index.js +52 -47
- 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/designSystemExtension/rich-text-editor/rich-text-editor.component.html +33 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +19 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.spec.ts +24 -0
- package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +89 -0
- 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/field/rich-text/rich-text.component.html +20 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.scss +0 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.spec.ts +24 -0
- package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.ts +131 -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/create/override-sdk/widget/file-utility/file-utility.component.ts +21 -15
- 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/designSystemExtension/rich-text-editor/rich-text-editor.component.html +33 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.scss +19 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.spec.ts +24 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/rich-text-editor/rich-text-editor.component.ts +89 -0
- 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/field/rich-text/rich-text.component.html +20 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/rich-text.component.scss +0 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/rich-text.component.spec.ts +24 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/rich-text.component.ts +131 -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-a/components/createAll/override-sdk/widget/file-utility/file-utility.component.ts +21 -15
- 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
package/tests/assets/sdk-a/components/create/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
|
|
@@ -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
|
+
}
|
package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.html
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<div *ngIf="displayMode$; else noDisplayMode">
|
|
2
|
+
<component-mapper *ngIf="bVisible$ !== false" name="FieldValueList" [props]="{ label$, value$, displayMode$ }"></component-mapper>
|
|
3
|
+
</div>
|
|
4
|
+
<ng-template #noDisplayMode>
|
|
5
|
+
<div *ngIf="!bReadonly$; else noEdit">
|
|
6
|
+
<div *ngIf="bVisible$">
|
|
7
|
+
<component-mapper
|
|
8
|
+
name="RichTextEditor"
|
|
9
|
+
[props]="{ placeholder, required: bRequired$, disabled: bDisabled$, label: label$, readonly: false, error, info, testId, value: value$ }"
|
|
10
|
+
[parent]="this"
|
|
11
|
+
[outputEvents]="{ onBlur: fieldOnBlur, onChange: fieldOnChange }"
|
|
12
|
+
></component-mapper>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</ng-template>
|
|
16
|
+
<ng-template #noEdit>
|
|
17
|
+
<div *ngIf="bVisible$ !== false">
|
|
18
|
+
<component-mapper name="RichTextEditor" [props]="{ label: label$, value: value$, readonly: true, testId }" [parent]="this"></component-mapper>
|
|
19
|
+
</div>
|
|
20
|
+
</ng-template>
|
package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.scss
ADDED
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { RichTextComponent } from './rich-text.component';
|
|
4
|
+
|
|
5
|
+
describe('RichTextComponent', () => {
|
|
6
|
+
let component: RichTextComponent;
|
|
7
|
+
let fixture: ComponentFixture<RichTextComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(waitForAsync(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [RichTextComponent]
|
|
12
|
+
}).compileComponents();
|
|
13
|
+
}));
|
|
14
|
+
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
fixture = TestBed.createComponent(RichTextComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/rich-text.component.ts
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { Component, OnInit, Input, forwardRef, OnDestroy } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormGroup, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
5
|
+
import { Utils } from '@pega/angular-sdk-components';
|
|
6
|
+
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
7
|
+
import { handleEvent } from '@pega/angular-sdk-components';
|
|
8
|
+
import { PConnFieldProps } from '@pega/angular-sdk-components';
|
|
9
|
+
|
|
10
|
+
interface RichTextProps extends PConnFieldProps {
|
|
11
|
+
// If any, enter additional props that only exist on RichText here
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@Component({
|
|
15
|
+
selector: 'app-rich-text',
|
|
16
|
+
templateUrl: './rich-text.component.html',
|
|
17
|
+
styleUrls: ['./rich-text.component.scss'],
|
|
18
|
+
standalone: true,
|
|
19
|
+
imports: [CommonModule, ReactiveFormsModule, forwardRef(() => ComponentMapperComponent)]
|
|
20
|
+
})
|
|
21
|
+
export class RichTextComponent implements OnInit, OnDestroy {
|
|
22
|
+
@Input() pConn$: typeof PConnect;
|
|
23
|
+
@Input() formGroup$: FormGroup;
|
|
24
|
+
|
|
25
|
+
// Used with AngularPConnect
|
|
26
|
+
angularPConnectData: AngularPConnectData = {};
|
|
27
|
+
configProps$: RichTextProps;
|
|
28
|
+
|
|
29
|
+
label$ = '';
|
|
30
|
+
value$ = '';
|
|
31
|
+
bRequired$ = false;
|
|
32
|
+
bReadonly$ = false;
|
|
33
|
+
bDisabled$ = false;
|
|
34
|
+
bVisible$ = true;
|
|
35
|
+
displayMode$?: string = '';
|
|
36
|
+
controlName$: string;
|
|
37
|
+
testId: string;
|
|
38
|
+
helperText: string;
|
|
39
|
+
placeholder: any;
|
|
40
|
+
info: any;
|
|
41
|
+
error: boolean;
|
|
42
|
+
status: any;
|
|
43
|
+
|
|
44
|
+
constructor(
|
|
45
|
+
private angularPConnect: AngularPConnectService,
|
|
46
|
+
private utils: Utils
|
|
47
|
+
) {}
|
|
48
|
+
|
|
49
|
+
ngOnInit(): void {
|
|
50
|
+
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
51
|
+
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
52
|
+
|
|
53
|
+
// call updateSelf when initializing
|
|
54
|
+
this.checkAndUpdate();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
ngOnDestroy(): void {
|
|
58
|
+
if (this.angularPConnectData.unsubscribeFn) {
|
|
59
|
+
this.angularPConnectData.unsubscribeFn();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Callback passed when subscribing to store change
|
|
64
|
+
onStateChange() {
|
|
65
|
+
this.checkAndUpdate();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
checkAndUpdate() {
|
|
69
|
+
// Should always check the bridge to see if the component should
|
|
70
|
+
// update itself (re-render)
|
|
71
|
+
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
72
|
+
|
|
73
|
+
// ONLY call updateSelf when the component should update
|
|
74
|
+
if (bUpdateSelf) {
|
|
75
|
+
this.updateSelf();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// updateSelf
|
|
80
|
+
updateSelf(): void {
|
|
81
|
+
// moved this from ngOnInit() and call this from there instead...
|
|
82
|
+
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as RichTextProps;
|
|
83
|
+
const stateProps: any = this.pConn$.getStateProps();
|
|
84
|
+
this.status = stateProps?.status;
|
|
85
|
+
|
|
86
|
+
if (this.configProps$.value != undefined) {
|
|
87
|
+
this.value$ = this.configProps$.value;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
this.testId = this.configProps$.testId;
|
|
91
|
+
this.displayMode$ = this.configProps$.displayMode;
|
|
92
|
+
this.label$ = this.configProps$.label;
|
|
93
|
+
this.placeholder = this.configProps$.placeholder;
|
|
94
|
+
this.info = stateProps?.validatemessage || this.configProps$.helperText;
|
|
95
|
+
this.error = stateProps?.status === 'error';
|
|
96
|
+
|
|
97
|
+
if (this.configProps$.required != null) {
|
|
98
|
+
this.bRequired$ = this.utils.getBooleanValue(this.configProps$.required);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (this.configProps$.visibility != null) {
|
|
102
|
+
this.bVisible$ = this.utils.getBooleanValue(this.configProps$.visibility);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (this.configProps$.disabled != undefined) {
|
|
106
|
+
this.bDisabled$ = this.utils.getBooleanValue(this.configProps$.disabled);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (this.configProps$.readOnly != null) {
|
|
110
|
+
this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
fieldOnChange() {
|
|
115
|
+
if (this.status === 'error') {
|
|
116
|
+
const property = (this.pConn$.getStateProps() as any).value;
|
|
117
|
+
this.pConn$.clearErrorMessages({
|
|
118
|
+
property,
|
|
119
|
+
category: '',
|
|
120
|
+
context: ''
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
fieldOnBlur(editorValue: any) {
|
|
126
|
+
// PConnect wants to use eventHandler for onBlur
|
|
127
|
+
const actionsApi = this.pConn$?.getActionsApi();
|
|
128
|
+
const propName = (this.pConn$?.getStateProps() as any).value;
|
|
129
|
+
handleEvent(actionsApi, 'changeNblur', propName, editorValue);
|
|
130
|
+
}
|
|
131
|
+
}
|
package/tests/assets/sdk-a/components/create/override-sdk/template/app-shell/app-shell.component.ts
CHANGED
|
@@ -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 => {
|
package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.ts
CHANGED
|
@@ -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/create/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
|
},
|
|
@@ -149,24 +149,30 @@ export class FileUtilityComponent implements OnInit, OnDestroy {
|
|
|
149
149
|
this.lu_bLoading$ = true;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
attachmentUtils
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
})
|
|
163
|
-
.catch(console.error);
|
|
152
|
+
const arFiles: any = Array.from(files);
|
|
153
|
+
|
|
154
|
+
Promise.allSettled(
|
|
155
|
+
arFiles.map(file => attachmentUtils.uploadAttachment(file, this.onUploadProgress, this.errorHandler, this.pConn$.getContextName()))
|
|
156
|
+
)
|
|
157
|
+
.then((fileResponses: any) => {
|
|
158
|
+
const uploadedFiles: any = [];
|
|
159
|
+
fileResponses.forEach(fileResponse => {
|
|
160
|
+
if (fileResponse.status === 'fulfilled') {
|
|
161
|
+
uploadedFiles.push(fileResponse.value);
|
|
164
162
|
}
|
|
165
|
-
})
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
});
|
|
164
|
+
if (uploadedFiles.length > 0) {
|
|
165
|
+
(attachmentUtils.linkAttachmentsToCase(caseID, uploadedFiles, 'File', this.pConn$.getContextName()) as Promise<any>)
|
|
166
|
+
.then(() => {
|
|
167
|
+
this.refreshAttachments();
|
|
168
|
+
})
|
|
169
|
+
.catch();
|
|
170
|
+
}
|
|
171
|
+
})
|
|
172
|
+
.catch();
|
|
168
173
|
|
|
169
174
|
this.arFileList$ = [];
|
|
175
|
+
this.lu_bLoading$ = false;
|
|
170
176
|
}
|
|
171
177
|
|
|
172
178
|
refreshAttachments() {
|
|
@@ -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">
|
|
@@ -13,6 +13,8 @@ interface PegaDxilMyBooleanProps 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 PegaDxilMyBooleanComponent 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 PegaDxilMyBooleanComponent 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 PegaDxilMyDateProps extends PConnFieldProps {
|
|
19
20
|
// If any, enter additional props that only exist on Date here
|
|
@@ -242,4 +243,10 @@ export class PegaDxilMyDateComponent 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
|
}
|
|
@@ -75,7 +75,7 @@ export class PegaDxilMyDetailsComponent implements OnInit, OnDestroy {
|
|
|
75
75
|
fields?.forEach(field => {
|
|
76
76
|
const thePConn = field.getPConnect();
|
|
77
77
|
const theCompType = thePConn.getComponentName().toLowerCase();
|
|
78
|
-
if (theCompType === 'reference') {
|
|
78
|
+
if (theCompType === 'reference' || theCompType === 'group') {
|
|
79
79
|
const configProps = thePConn.getConfigProps();
|
|
80
80
|
configProps.readOnly = true;
|
|
81
81
|
configProps.displayMode = 'LABELS_LEFT';
|
|
@@ -88,6 +88,7 @@ export class PegaDxilMyDetailsComponent implements OnInit, OnDestroy {
|
|
|
88
88
|
};
|
|
89
89
|
const viewContConfig = {
|
|
90
90
|
meta: {
|
|
91
|
+
...thePConn.getMetadata(),
|
|
91
92
|
type: theCompType,
|
|
92
93
|
config: configProps
|
|
93
94
|
},
|
|
@@ -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 {
|
|
@@ -29,3 +33,8 @@
|
|
|
29
33
|
font-weight: 600;
|
|
30
34
|
margin: 10px 0px;
|
|
31
35
|
}
|
|
36
|
+
|
|
37
|
+
.psdk-default-form-instruction-text {
|
|
38
|
+
padding-top: 0.625rem;
|
|
39
|
+
padding-bottom: 0.625rem;
|
|
40
|
+
}
|