@pega/dx-component-builder-sdk 0.23.14 → 0.23.16
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/Constellation/field/Boolean/index.tsx.mustache +1 -1
- 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/create/override-sdk/template/list-view/utils.ts +4 -2
- 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-a/components/createAll/override-sdk/template/list-view/utils.ts +4 -2
- 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
|
@@ -5,14 +5,14 @@ import { historyData } from './mock';
|
|
|
5
5
|
|
|
6
6
|
window.PCore = {
|
|
7
7
|
...window.PCore,
|
|
8
|
-
getDataApiUtils: ()
|
|
8
|
+
getDataApiUtils: (): any => {
|
|
9
9
|
return {
|
|
10
10
|
getData: (): any => {
|
|
11
11
|
return new Promise(resolve => {
|
|
12
12
|
resolve(historyData);
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
16
|
},
|
|
17
17
|
getConstants: (): any => {
|
|
18
18
|
return {
|
|
@@ -21,7 +21,7 @@ window.PCore = {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
|
|
26
26
|
const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
27
27
|
title: '{{COMPONENT_CLASS_NAME}}',
|
|
@@ -32,7 +32,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
32
32
|
export default meta;
|
|
33
33
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
34
34
|
|
|
35
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
35
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
36
36
|
|
|
37
37
|
const props = {
|
|
38
38
|
label: 'Case history',
|
|
@@ -50,14 +50,26 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
50
50
|
},
|
|
51
51
|
getActionsApi: () => {
|
|
52
52
|
return {
|
|
53
|
-
updateFieldValue: () => {
|
|
54
|
-
|
|
53
|
+
updateFieldValue: () => {
|
|
54
|
+
/* nothing */
|
|
55
|
+
},
|
|
56
|
+
triggerFieldChange: () => {
|
|
57
|
+
/* nothing */
|
|
58
|
+
}
|
|
55
59
|
};
|
|
56
60
|
},
|
|
57
|
-
ignoreSuggestion: () => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
ignoreSuggestion: () => {
|
|
62
|
+
/* nothing */
|
|
63
|
+
},
|
|
64
|
+
acceptSuggestion: () => {
|
|
65
|
+
/* nothing */
|
|
66
|
+
},
|
|
67
|
+
setInheritedProps: () => {
|
|
68
|
+
/* nothing */
|
|
69
|
+
},
|
|
70
|
+
resolveConfigProps: () => {
|
|
71
|
+
/* nothing */
|
|
72
|
+
}
|
|
61
73
|
};
|
|
62
74
|
}
|
|
63
75
|
};
|
|
@@ -12,8 +12,7 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
12
12
|
export default meta;
|
|
13
13
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
14
14
|
|
|
15
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
16
|
-
|
|
15
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
17
16
|
const props = {
|
|
18
17
|
datasource: configProps.datasource,
|
|
19
18
|
whatsnewlink: configProps.whatsnewlink
|
|
@@ -24,5 +23,5 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
24
23
|
|
|
25
24
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
26
25
|
header: configProps.header,
|
|
27
|
-
description: configProps.description
|
|
28
|
-
}
|
|
26
|
+
description: configProps.description
|
|
27
|
+
};
|
|
@@ -14,7 +14,7 @@ window.PCore = {
|
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
|
|
19
19
|
const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
20
20
|
title: '{{COMPONENT_CLASS_NAME}}',
|
|
@@ -25,21 +25,33 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
25
25
|
export default meta;
|
|
26
26
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
27
27
|
|
|
28
|
-
export const Base{{COMPONENT_CLASS_NAME}}: Story =
|
|
28
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
29
29
|
|
|
30
30
|
const props = {
|
|
31
31
|
getPConnect: () => {
|
|
32
32
|
return {
|
|
33
33
|
getActionsApi: () => {
|
|
34
34
|
return {
|
|
35
|
-
updateFieldValue: () => {
|
|
36
|
-
|
|
35
|
+
updateFieldValue: () => {
|
|
36
|
+
/* nothing */
|
|
37
|
+
},
|
|
38
|
+
triggerFieldChange: () => {
|
|
39
|
+
/* nothing */
|
|
40
|
+
}
|
|
37
41
|
};
|
|
38
42
|
},
|
|
39
|
-
ignoreSuggestion: () => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
ignoreSuggestion: () => {
|
|
44
|
+
/* nothing */
|
|
45
|
+
},
|
|
46
|
+
acceptSuggestion: () => {
|
|
47
|
+
/* nothing */
|
|
48
|
+
},
|
|
49
|
+
setInheritedProps: () => {
|
|
50
|
+
/* nothing */
|
|
51
|
+
},
|
|
52
|
+
resolveConfigProps: () => {
|
|
53
|
+
/* nothing */
|
|
54
|
+
}
|
|
43
55
|
};
|
|
44
56
|
}
|
|
45
57
|
};
|
|
@@ -49,4 +61,4 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args) => {
|
|
|
49
61
|
|
|
50
62
|
Base{{COMPONENT_CLASS_NAME}}.args = {
|
|
51
63
|
...caseOpConfig
|
|
52
|
-
}
|
|
64
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<div class="field-group-container">
|
|
2
|
+
<div *ngIf="name" class="field-group-heading">
|
|
3
|
+
<span *ngIf="collapsible; else no_collapse" id="field-group-header" class="field-group-header" (click)="headerClickHandler()">
|
|
4
|
+
<mat-icon *ngIf="collapsed; else down_arrow" aria-hidden="false" aria-label="Arrow Right" fontIcon="keyboard_arrow_right"></mat-icon>
|
|
5
|
+
<ng-template #down_arrow>
|
|
6
|
+
<mat-icon aria-hidden="false" aria-label="Arrow Down" fontIcon="keyboard_arrow_down"></mat-icon>
|
|
7
|
+
</ng-template>
|
|
8
|
+
<b>{{ name }}</b>
|
|
9
|
+
</span>
|
|
10
|
+
<ng-template #no_collapse>
|
|
11
|
+
<span>{{ name }}</span>
|
|
12
|
+
</ng-template>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div *ngIf="instructions && instructions !== 'none'" class="field-group-instructions">
|
|
16
|
+
<div key="instructions" id="instruction-text" [innerHTML]="instructions"></div>
|
|
17
|
+
</div>
|
|
18
|
+
<div *ngIf="!collapsed" class="field-group-content">
|
|
19
|
+
<ng-container [ngTemplateOutlet]="childrenTemplate"></ng-container>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.field-group-container {
|
|
2
|
+
.field-group-heading {
|
|
3
|
+
padding-top: 8px;
|
|
4
|
+
padding-bottom: 8px;
|
|
5
|
+
font-weight: bold;
|
|
6
|
+
|
|
7
|
+
.field-group-header {
|
|
8
|
+
gap: 5px;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.field-group-instructions {
|
|
16
|
+
padding: 5px 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -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">
|
package/tests/assets/sdk-a/components/create/override-sdk/field/check-box/check-box.component.html
CHANGED
|
@@ -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/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/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
|
},
|
|
@@ -680,10 +680,12 @@ export const readContextResponse = async (context, params) => {
|
|
|
680
680
|
const dataViewName = PCore.getDataTypeUtils().getSavableDataPage(classID);
|
|
681
681
|
const dataPageKeys = PCore.getDataTypeUtils().getDataPageKeys(dataViewName);
|
|
682
682
|
dataPageKeys?.forEach(item => (item.isAlternateKeyStorage ? compositeKeys.push(item.linkedField) : compositeKeys.push(item.keyName)));
|
|
683
|
-
if (compositeKeys.length) {
|
|
683
|
+
if (compositeKeys.length && otherContext) {
|
|
684
684
|
otherContext.setCompositeKeys(compositeKeys);
|
|
685
685
|
}
|
|
686
|
-
otherContext
|
|
686
|
+
if (otherContext) {
|
|
687
|
+
otherContext.fetchRowActionDetails = null;
|
|
688
|
+
}
|
|
687
689
|
}
|
|
688
690
|
|
|
689
691
|
const presetArray = [];
|
|
@@ -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
|
},
|