@pega/dx-component-builder-sdk 0.242.15 → 0.242.17
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/README.md +3 -3
- package/package.json +1 -1
- package/src/constants.js +39 -6
- package/src/tasks/create/templates/Constellation/field/Date/demo.stories.tsx.mustache +0 -16
- package/src/tasks/create/templates/Constellation/field/DateTime/demo.stories.tsx.mustache +0 -17
- package/src/tasks/create/templates/Constellation/field/Decimal/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Decimal-Currency/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/demo.stories.tsx.mustache +9 -20
- package/src/tasks/create/templates/Constellation/field/Picklist/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/index.tsx.mustache +3 -5
- package/src/tasks/create/templates/Constellation/field/Text/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Email/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Email/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/field/Text-Input/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Paragraph/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Phone/demo.stories.tsx.mustache +1 -2
- package/src/tasks/create/templates/Constellation/field/Text-URL/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/TimeOfDay/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS/demo.stories.tsx.mustache +10 -0
- package/src/tasks/create/templates/Constellation/template/PAGE/demo.stories.tsx.mustache +0 -13
- package/src/tasks/create/templates/Constellation/widget/CASE/demo.stories.tsx.mustache +10 -32
- package/src/tasks/create/templates/Constellation/widget/CASE/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/widget/PAGE/demo.stories.tsx.mustache +10 -21
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/demo.stories.tsx.mustache +10 -22
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.spec.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Date/demo.stories.tsx.mustache +1 -11
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/demo.stories.tsx.mustache +1 -12
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/decimal.component.spec.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/demo.stories.tsx.mustache +1 -15
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.spec.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/demo.stories.tsx.mustache +10 -21
- package/src/tasks/create/templates/SDK-Angular/field/Integer/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Picklist-Autocomplete/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Picklist-RadioButtons/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/template/FORM/demo.stories.tsx.mustache +9 -17
- package/src/tasks/create/templates/SDK-Angular/template/FORM/mock.ts.mustache +19 -1
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/demo.stories.tsx.mustache +7 -16
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/mock.ts.mustache +19 -1
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/demo.stories.tsx.mustache +35 -47
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/demo.stories.tsx.mustache +7 -17
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/demo.stories.tsx.mustache +7 -10
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/demo.stories.tsx.mustache +9 -17
- package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.tsx.mustache +0 -21
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +5 -1
- package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.tsx.mustache +0 -21
- package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +13 -5
- package/src/tasks/create/templates/SDK-React/field/Decimal/demo.stories.tsx.mustache +0 -14
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +6 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.tsx.mustache +0 -14
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +6 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/demo.stories.tsx.mustache +0 -14
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +5 -1
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/demo.stories.tsx.mustache +2 -6
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Integer/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +25 -20
- package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/index.tsx.mustache +1 -4
- package/src/tasks/create/templates/SDK-React/field/Text/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/Text-Email/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/Text-Input/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/Text-URL/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.tsx.mustache +8 -28
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +7 -2
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.tsx.mustache +8 -28
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +7 -2
- package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.tsx.mustache +10 -16
- package/src/tasks/create/templates/SDK-React/template/FORM-region/index.tsx.mustache +5 -5
- package/src/tasks/create/templates/SDK-React/widget/CASE/demo.stories.tsx.mustache +10 -20
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/SDK-React/widget/PAGE/demo.stories.tsx.mustache +9 -19
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.tsx.mustache +10 -20
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyRadioButtons/index.tsx +3 -5
- package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/field/Phone/Phone.tsx +5 -5
- package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/FlowContainer.tsx +360 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/helpers.ts +138 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +68 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ModalViewContainer.tsx +345 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.css +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Reference/Reference.tsx +52 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Reference/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Region/Region.tsx +17 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Region/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/RootContainer/RootContainer.tsx +240 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/RootContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/SimpleView/SimpleView.tsx +48 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/SimpleView/helper.ts +125 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/SimpleView/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ViewContainer/ViewContainer.tsx +201 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ViewContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/DynamicTabs.tsx +80 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/config.json +36 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/ListView.tsx +29 -28
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +13 -5
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/index.tsx +3 -5
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/index.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +6 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +5 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +13 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +6 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/index.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +5 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +5 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +25 -20
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/index.tsx +1 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +7 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +7 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +28 -13
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/index.tsx +5 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +2 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Phone/Phone.tsx +5 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/FlowContainer.tsx +360 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/helpers.ts +138 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +68 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ModalViewContainer.tsx +345 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.css +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Reference/Reference.tsx +52 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Reference/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Region/Region.tsx +17 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Region/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/RootContainer/RootContainer.tsx +240 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/RootContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/SimpleView/SimpleView.tsx +48 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/SimpleView/helper.ts +125 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/SimpleView/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ViewContainer/ViewContainer.tsx +201 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ViewContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DynamicTabs/DynamicTabs.tsx +80 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DynamicTabs/config.json +36 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DynamicTabs/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/ListView.tsx +29 -28
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +13 -5
package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/DynamicTabs.tsx
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React, { Children, useMemo, useState } from 'react';
|
|
2
|
+
import { Tab, Tabs } from '@mui/material';
|
|
3
|
+
import { TabContext, TabPanel } from '@mui/lab';
|
|
4
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
5
|
+
|
|
6
|
+
import { buildView } from '@pega/react-sdk-components/lib/components/helpers/field-group-utils';
|
|
7
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
|
+
|
|
9
|
+
const useStyles = makeStyles(() => ({
|
|
10
|
+
tab: {
|
|
11
|
+
minWidth: '72px'
|
|
12
|
+
}
|
|
13
|
+
}));
|
|
14
|
+
|
|
15
|
+
interface DynamicTabsProps extends PConnProps {
|
|
16
|
+
// If any, enter additional props that only exist on this component
|
|
17
|
+
showLabel: boolean;
|
|
18
|
+
label: string;
|
|
19
|
+
referenceList?: any[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function DynamicTabs(props: DynamicTabsProps) {
|
|
23
|
+
const classes = useStyles();
|
|
24
|
+
const { referenceList, showLabel, label, getPConnect } = props;
|
|
25
|
+
const pConnect = getPConnect();
|
|
26
|
+
// Get the inherited props from the parent to determine label settings
|
|
27
|
+
const propsToUse = { label, showLabel, ...pConnect.getInheritedProps() };
|
|
28
|
+
const defaultTabIndex = 0;
|
|
29
|
+
// @ts-ignore - Property 'getComponentConfig' is private and only accessible within class 'C11nEnv'.
|
|
30
|
+
const { tablabel } = pConnect.getComponentConfig();
|
|
31
|
+
const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);
|
|
32
|
+
const referenceListData: any = pConnect.getValue(`${referenceList}.pxResults`, ''); // 2nd arg empty string until typedefs properly allow optional
|
|
33
|
+
const memoisedTabViews = useMemo(() => {
|
|
34
|
+
pConnect.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
35
|
+
pConnect.setInheritedProp('readOnly', true);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
referenceListData &&
|
|
39
|
+
Children.toArray(
|
|
40
|
+
referenceListData.map((item, index) => {
|
|
41
|
+
return <React.Fragment key={item[tablabelProp]}>{buildView(pConnect, index, '')}</React.Fragment>;
|
|
42
|
+
})
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
}, [referenceListData]);
|
|
46
|
+
const [panelShown, changePanel] = useState(defaultTabIndex);
|
|
47
|
+
const handleTabClick = (e, id) => {
|
|
48
|
+
changePanel(parseInt(id, 10));
|
|
49
|
+
};
|
|
50
|
+
// Loop over the tab contents and and pull out the labels for the navigation
|
|
51
|
+
const tabItems =
|
|
52
|
+
referenceListData?.map((item, i) => {
|
|
53
|
+
const currentTabLabel = item[tablabelProp] || PCore.getLocaleUtils().getLocaleValue('No label specified in config', 'Generic');
|
|
54
|
+
return {
|
|
55
|
+
name: currentTabLabel,
|
|
56
|
+
id: i
|
|
57
|
+
};
|
|
58
|
+
}) || [];
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<>
|
|
62
|
+
{propsToUse.label && <h3 id='dynamic-tabs-title'>{propsToUse.label}</h3>}
|
|
63
|
+
<TabContext value={panelShown.toString()}>
|
|
64
|
+
<Tabs onChange={handleTabClick} value={panelShown} variant='scrollable' scrollButtons='auto' indicatorColor='primary' id='dynamic-tabs'>
|
|
65
|
+
{tabItems.map((tab: any) => (
|
|
66
|
+
<Tab key={tab.id} label={tab.name} value={tab.id} className={classes.tab} />
|
|
67
|
+
))}
|
|
68
|
+
</Tabs>
|
|
69
|
+
|
|
70
|
+
{tabItems.map((tab: any) => (
|
|
71
|
+
<TabPanel key={tab.id} value={tab.id.toString()} tabIndex={+tab.id} id='dynamic-tabpanel'>
|
|
72
|
+
<div>{memoisedTabViews[parseInt(tab.id, 10)] || 'No content exists'}</div>
|
|
73
|
+
</TabPanel>
|
|
74
|
+
))}
|
|
75
|
+
</TabContext>
|
|
76
|
+
</>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export default DynamicTabs;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "DynamicTabs",
|
|
3
|
+
"label": "Dynamic tabs (list)",
|
|
4
|
+
"description": "Dynamic tabs (list)",
|
|
5
|
+
"type": "Template",
|
|
6
|
+
"subtype": "DETAILS",
|
|
7
|
+
"icon": "DynamicTabs.svg",
|
|
8
|
+
"hideTemplateEdit": true,
|
|
9
|
+
"hideFromTemplatePicker": true,
|
|
10
|
+
"viewHeadingLabel": "Default heading",
|
|
11
|
+
"properties": [
|
|
12
|
+
{
|
|
13
|
+
"name": "referenceList",
|
|
14
|
+
"label": "Data page",
|
|
15
|
+
"format": "CONTENTPICKERSOURCE"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "parameters",
|
|
19
|
+
"label": "Parameters",
|
|
20
|
+
"format": "PARAMETERS",
|
|
21
|
+
"showOverride": false
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "tablabel",
|
|
25
|
+
"label": "Tab label",
|
|
26
|
+
"format": "PROPERTY",
|
|
27
|
+
"ofContextClass": true
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"format": "VIEWPICKER",
|
|
31
|
+
"name": "Views",
|
|
32
|
+
"label": "Tab content",
|
|
33
|
+
"ofContextClass": true
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DynamicTabs';
|
|
@@ -1034,34 +1034,35 @@ export default function ListView(props: ListViewProps) {
|
|
|
1034
1034
|
</TableRow>
|
|
1035
1035
|
</TableHead>
|
|
1036
1036
|
<TableBody>
|
|
1037
|
-
{
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
{
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
{
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1037
|
+
{arRows &&
|
|
1038
|
+
stableSort(arRows, getComparator(order, orderBy))
|
|
1039
|
+
.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
|
1040
|
+
.map(row => {
|
|
1041
|
+
return (
|
|
1042
|
+
<TableRow key={row.pxRefObjectInsName || row.pyID}>
|
|
1043
|
+
{arColumns.map(column => {
|
|
1044
|
+
const value = row[column.id];
|
|
1045
|
+
return (
|
|
1046
|
+
<TableCell key={column.id} align={column.align} className={classes.cell}>
|
|
1047
|
+
{_showButton(column.id, row) || column.displayAsLink ? (
|
|
1048
|
+
<Link
|
|
1049
|
+
component='button'
|
|
1050
|
+
onClick={() => {
|
|
1051
|
+
_listViewClick(row, column);
|
|
1052
|
+
}}
|
|
1053
|
+
underline='hover'
|
|
1054
|
+
>
|
|
1055
|
+
{column.format && typeof value === 'number' ? column.format(value) : value}
|
|
1056
|
+
</Link>
|
|
1057
|
+
) : (
|
|
1058
|
+
<>{column.format && typeof value === 'number' ? column.format(value) : value || '---'}</>
|
|
1059
|
+
)}
|
|
1060
|
+
</TableCell>
|
|
1061
|
+
);
|
|
1062
|
+
})}
|
|
1063
|
+
</TableRow>
|
|
1064
|
+
);
|
|
1065
|
+
})}
|
|
1065
1066
|
</TableBody>
|
|
1066
1067
|
</Table>
|
|
1067
1068
|
</TableContainer>
|
|
@@ -258,11 +258,16 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
258
258
|
function generateRowsData() {
|
|
259
259
|
// if referenceList is empty and dataPageName property value exists then make a datapage fetch call and get the list of data.
|
|
260
260
|
if (!referenceList.length && dataPageName) {
|
|
261
|
-
getDataPage(dataPageName, parameters, context)
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
261
|
+
getDataPage(dataPageName, parameters, context)
|
|
262
|
+
.then(listData => {
|
|
263
|
+
const data = formatRowsData(listData);
|
|
264
|
+
myRows = data;
|
|
265
|
+
setRowData(data);
|
|
266
|
+
})
|
|
267
|
+
.catch(e => {
|
|
268
|
+
// eslint-disable-next-line no-console
|
|
269
|
+
console.log(e);
|
|
270
|
+
});
|
|
266
271
|
} else {
|
|
267
272
|
// The referenceList prop has the JSON data for each row to be displayed
|
|
268
273
|
// in the table. So, iterate over referenceList to create the dataRows that
|
|
@@ -378,6 +383,9 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
378
383
|
};
|
|
379
384
|
|
|
380
385
|
function descendingComparator<T>(a: T, b: T, orderedBy: keyof T) {
|
|
386
|
+
if (!orderedBy || (!a[orderedBy] && !b[orderedBy])) {
|
|
387
|
+
return 0;
|
|
388
|
+
}
|
|
381
389
|
if (!b[orderedBy] || b[orderedBy] < a[orderedBy]) {
|
|
382
390
|
return -1;
|
|
383
391
|
}
|
|
@@ -77,9 +77,7 @@ function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProps) {
|
|
|
77
77
|
const propName: string = stateProps.value;
|
|
78
78
|
const configProps = pConn.getConfigProps();
|
|
79
79
|
const className = pConn.getCaseInfo().getClassName();
|
|
80
|
-
|
|
81
|
-
const { getLocaleRuleNameFromKeys, getLocalizedValue } = pConn;
|
|
82
|
-
|
|
80
|
+
|
|
83
81
|
// @ts-ignore
|
|
84
82
|
let configProperty = pConn.getRawMetadata()?.config?.value || '';
|
|
85
83
|
configProperty = configProperty.startsWith('@P') ? configProperty.substring(3) : configProperty;
|
|
@@ -141,10 +139,10 @@ function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProps) {
|
|
|
141
139
|
id={`${fullReference}.${item.key}`}
|
|
142
140
|
value={item.key}
|
|
143
141
|
key={`${fullReference}.${item.key}`}
|
|
144
|
-
label={getLocalizedValue(
|
|
142
|
+
label={pConn.getLocalizedValue(
|
|
145
143
|
isDatapage ? item.text : item.value,
|
|
146
144
|
localePath,
|
|
147
|
-
getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
145
|
+
pConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
148
146
|
)}
|
|
149
147
|
name={fullReference}
|
|
150
148
|
/>
|
|
@@ -48,8 +48,8 @@ function PegaDxilMyCaseWidget(props: PegaDxilMyCaseWidgetProps) {
|
|
|
48
48
|
description: <Text style={{ wordBreak: 'break-word' }}>{entry.pyMessageKey}</Text>,
|
|
49
49
|
user: entry.pyPerformer,
|
|
50
50
|
id: index
|
|
51
|
-
};
|
|
52
|
-
})
|
|
51
|
+
} as any;
|
|
52
|
+
}) as any
|
|
53
53
|
);
|
|
54
54
|
} else {
|
|
55
55
|
setHistory([]);
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
2
|
import { NumericFormat } from 'react-number-format';
|
|
3
3
|
import { TextField } from '@mui/material';
|
|
4
4
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
@@ -55,6 +55,10 @@ export default function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
|
|
|
55
55
|
'data-test-id': testId
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
setValues(value.toString());
|
|
60
|
+
}, [value]);
|
|
61
|
+
|
|
58
62
|
// currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }
|
|
59
63
|
const theSymbols = getCurrencyCharacters(currencyISOCode);
|
|
60
64
|
const theCurrSym = theSymbols.theCurrencySymbol;
|
|
@@ -93,6 +97,7 @@ export default function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
|
|
|
93
97
|
<StyledPegaDxilMyCurrencyWrapper>
|
|
94
98
|
<NumericFormat
|
|
95
99
|
valueIsNumericString
|
|
100
|
+
variant={readOnly ? 'standard' : 'outlined'}
|
|
96
101
|
label={label}
|
|
97
102
|
helperText={helperTextToDisplay}
|
|
98
103
|
placeholder={placeholder ?? ''}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
2
|
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
|
|
3
3
|
import { LocalizationProvider } from '@mui/x-date-pickers';
|
|
4
4
|
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
@@ -46,6 +46,10 @@ export default function PegaDxilMyDate(props: PegaDxilMyDateProps) {
|
|
|
46
46
|
dateFormatInfo.dateFormatStringLC = theDateFormat.dateFormatStringLC;
|
|
47
47
|
dateFormatInfo.dateFormatMask = theDateFormat.dateFormatMask;
|
|
48
48
|
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
setDateValue(dayjs(value));
|
|
51
|
+
}, [value]);
|
|
52
|
+
|
|
49
53
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
50
54
|
const formattedDate = format(props.value, 'date', {
|
|
51
55
|
format: dateFormatInfo.dateFormatString
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
2
|
import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
|
|
3
3
|
import { LocalizationProvider } from '@mui/x-date-pickers';
|
|
4
4
|
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
5
5
|
import dayjs, { Dayjs } from 'dayjs';
|
|
6
|
-
|
|
6
|
+
import DateFormatter from '@pega/react-sdk-components/lib/components/helpers/formatters/Date';
|
|
7
7
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
8
8
|
import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
|
|
9
9
|
import { dateFormatInfoDefault, getDateFormatInfo } from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
|
|
@@ -26,7 +26,10 @@ export default function PegaDxilMyDateTime(props: PegaDxilMyDateTimeProps) {
|
|
|
26
26
|
|
|
27
27
|
const { getPConnect, label, required, disabled, value = '', validatemessage, status, readOnly, testId, helperText, displayMode, hideLabel } = props;
|
|
28
28
|
|
|
29
|
-
const
|
|
29
|
+
const environmentInfo = PCore.getEnvironmentInfo();
|
|
30
|
+
const timezone = environmentInfo && environmentInfo.getTimeZone();
|
|
31
|
+
|
|
32
|
+
const [dateValue, setDateValue] = useState<Dayjs | null>(value ? dayjs(DateFormatter.convertToTimezone(value, { timezone })) : null);
|
|
30
33
|
|
|
31
34
|
const pConn = getPConnect();
|
|
32
35
|
const actions = pConn.getActionsApi();
|
|
@@ -41,6 +44,10 @@ export default function PegaDxilMyDateTime(props: PegaDxilMyDateTimeProps) {
|
|
|
41
44
|
dateFormatInfo.dateFormatStringLC = theDateFormat.dateFormatStringLC;
|
|
42
45
|
dateFormatInfo.dateFormatMask = theDateFormat.dateFormatMask;
|
|
43
46
|
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
setDateValue(dayjs(DateFormatter.convertToTimezone(value, { timezone })));
|
|
49
|
+
}, [value]);
|
|
50
|
+
|
|
44
51
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
45
52
|
const formattedDateTime = format(props.value, 'datetime', {
|
|
46
53
|
format: `${dateFormatInfo.dateFormatString} hh:mm a`
|
|
@@ -67,8 +74,9 @@ export default function PegaDxilMyDateTime(props: PegaDxilMyDateTimeProps) {
|
|
|
67
74
|
};
|
|
68
75
|
|
|
69
76
|
const handleChange = date => {
|
|
70
|
-
|
|
71
|
-
const changeValue =
|
|
77
|
+
const timeZoneDateTime = dayjs.tz(date.format('YYYY-MM-DDTHH:mm:ss'), timezone);
|
|
78
|
+
const changeValue = timeZoneDateTime && timeZoneDateTime.isValid() ? timeZoneDateTime.toISOString() : '';
|
|
79
|
+
setDateValue(timeZoneDateTime);
|
|
72
80
|
handleEvent(actions, 'changeNblur', propName, changeValue);
|
|
73
81
|
};
|
|
74
82
|
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NumericFormat } from 'react-number-format';
|
|
2
2
|
import { TextField } from '@mui/material';
|
|
3
|
-
import { useState } from 'react';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
4
|
import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
6
|
import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
|
|
@@ -63,6 +63,10 @@ export default function PegaDxilMyDecimal(props: PegaDxilMyDecimalProps) {
|
|
|
63
63
|
|
|
64
64
|
const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
|
|
65
65
|
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
setValues(value.toString());
|
|
68
|
+
}, [value]);
|
|
69
|
+
|
|
66
70
|
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
67
71
|
|
|
68
72
|
if (readOnly) {
|
|
@@ -115,6 +119,7 @@ export default function PegaDxilMyDecimal(props: PegaDxilMyDecimalProps) {
|
|
|
115
119
|
}}
|
|
116
120
|
onBlur={!readOnly ? decimalOnBlur : undefined}
|
|
117
121
|
prefix={readOnly && formatter === 'Currency' ? theCurrSym : ''}
|
|
122
|
+
suffix={readOnly && formatter === 'Percentage' ? '%' : ''}
|
|
118
123
|
decimalSeparator={theCurrDec}
|
|
119
124
|
thousandSeparator={showGroupSeparators ? theCurrSep : ''}
|
|
120
125
|
decimalScale={readOnly && formatter === 'Currency' ? undefined : decimalPrecision}
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/index.tsx
CHANGED
|
@@ -125,7 +125,7 @@ export default function PegaDxilMyIconButtonUrl(props: PegaDxilMyIconButtonUrlPr
|
|
|
125
125
|
</Tooltip>
|
|
126
126
|
{
|
|
127
127
|
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
128
|
-
<a href={validUrl} style={{ display: 'flex' }}>
|
|
128
|
+
<a href={validUrl} target='_blank' style={{ display: 'flex' }} rel='noreferrer'>
|
|
129
129
|
<LanguageIcon />
|
|
130
130
|
</a>
|
|
131
131
|
}
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
2
|
import { NumericFormat } from 'react-number-format';
|
|
3
3
|
import { TextField } from '@mui/material';
|
|
4
4
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
@@ -56,6 +56,10 @@ export default function PegaDxilMyPercentage(props: PegaDxilMyPercentageProps) {
|
|
|
56
56
|
const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
|
|
57
57
|
const formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);
|
|
58
58
|
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
setValues(value.toString());
|
|
61
|
+
}, [value]);
|
|
62
|
+
|
|
59
63
|
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
60
64
|
|
|
61
65
|
if (readOnly) {
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import MuiPhoneNumber from 'material-ui-phone-number';
|
|
2
1
|
import { useEffect, useState } from 'react';
|
|
2
|
+
import { MuiTelInput } from 'mui-tel-input';
|
|
3
3
|
|
|
4
4
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
5
5
|
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
@@ -63,12 +63,12 @@ export default function PegaDxilMyPhone(props: PegaDxilMyPhoneProps) {
|
|
|
63
63
|
return (
|
|
64
64
|
<div>
|
|
65
65
|
<StyledPegaDxilMyPhoneWrapper>
|
|
66
|
-
<
|
|
66
|
+
<MuiTelInput
|
|
67
67
|
fullWidth
|
|
68
68
|
helperText={helperTextToDisplay}
|
|
69
69
|
placeholder={placeholder ?? ''}
|
|
70
70
|
size='small'
|
|
71
|
-
defaultCountry='
|
|
71
|
+
defaultCountry='US'
|
|
72
72
|
required={required}
|
|
73
73
|
disabled={disabled}
|
|
74
74
|
onChange={onChange}
|
|
@@ -99,13 +99,13 @@ export default function PegaDxilMyPhone(props: PegaDxilMyPhoneProps) {
|
|
|
99
99
|
|
|
100
100
|
return (
|
|
101
101
|
<StyledPegaDxilMyPhoneWrapper>
|
|
102
|
-
<
|
|
102
|
+
<MuiTelInput
|
|
103
103
|
fullWidth
|
|
104
104
|
variant='outlined'
|
|
105
105
|
helperText={helperTextToDisplay}
|
|
106
106
|
placeholder={placeholder ?? ''}
|
|
107
107
|
size='small'
|
|
108
|
-
defaultCountry='
|
|
108
|
+
defaultCountry='US'
|
|
109
109
|
required={required}
|
|
110
110
|
disabled={disabled}
|
|
111
111
|
onChange={handleChange}
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx
CHANGED
|
@@ -143,7 +143,7 @@ export default function PegaDxilMyPicklist(props: PegaDxilMyPicklistProps) {
|
|
|
143
143
|
}, [theDatasource]);
|
|
144
144
|
|
|
145
145
|
useEffect(() => {
|
|
146
|
-
if (
|
|
146
|
+
if (listType !== 'associated' && typeof datasource === 'string') {
|
|
147
147
|
getDataPage(datasource, parameters, context).then((results: any) => {
|
|
148
148
|
const optionsData: any[] = [];
|
|
149
149
|
const displayColumn = getDisplayFieldsMetaData(columns);
|
|
@@ -171,25 +171,31 @@ export default function PegaDxilMyPicklist(props: PegaDxilMyPicklistProps) {
|
|
|
171
171
|
|
|
172
172
|
let readOnlyProp = {};
|
|
173
173
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
174
|
+
const displayFn = (displayM, val) => {
|
|
175
|
+
if (displayM === 'DISPLAY_ONLY') {
|
|
176
|
+
return (
|
|
177
|
+
<FieldValueList
|
|
178
|
+
name={hideLabel ? '' : label}
|
|
179
|
+
value={thePConn.getLocalizedValue(val, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
|
|
180
|
+
/>
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (displayM === 'STACKED_LARGE_VAL') {
|
|
185
|
+
return (
|
|
186
|
+
<FieldValueList
|
|
187
|
+
name={hideLabel ? '' : label}
|
|
188
|
+
value={thePConn.getLocalizedValue(val, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
|
|
189
|
+
variant='stacked'
|
|
190
|
+
/>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return null;
|
|
195
|
+
};
|
|
183
196
|
|
|
184
|
-
if (displayMode
|
|
185
|
-
return (
|
|
186
|
-
<FieldValueList
|
|
187
|
-
name={hideLabel ? '' : label}
|
|
188
|
-
// @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
|
|
189
|
-
value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
|
|
190
|
-
variant='stacked'
|
|
191
|
-
/>
|
|
192
|
-
);
|
|
197
|
+
if (displayMode) {
|
|
198
|
+
return displayFn(displayMode, options.find(option => option.key === value)?.value || value);
|
|
193
199
|
}
|
|
194
200
|
|
|
195
201
|
if (readOnly) {
|
|
@@ -231,7 +237,6 @@ export default function PegaDxilMyPicklist(props: PegaDxilMyPicklistProps) {
|
|
|
231
237
|
>
|
|
232
238
|
{options.map((option: any) => (
|
|
233
239
|
<MenuItem key={option.key} value={option.key}>
|
|
234
|
-
{/* @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv' */}
|
|
235
240
|
{thePConn.getLocalizedValue(option.value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
|
|
236
241
|
</MenuItem>
|
|
237
242
|
))}
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/index.tsx
CHANGED
|
@@ -70,7 +70,6 @@ export default function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProp
|
|
|
70
70
|
return (
|
|
71
71
|
<FieldValueList
|
|
72
72
|
name={hideLabel ? '' : label}
|
|
73
|
-
// @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
|
|
74
73
|
value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
|
|
75
74
|
/>
|
|
76
75
|
);
|
|
@@ -80,7 +79,6 @@ export default function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProp
|
|
|
80
79
|
return (
|
|
81
80
|
<FieldValueList
|
|
82
81
|
name={hideLabel ? '' : label}
|
|
83
|
-
// @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
|
|
84
82
|
value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
|
|
85
83
|
variant='stacked'
|
|
86
84
|
/>
|
|
@@ -97,7 +95,7 @@ export default function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProp
|
|
|
97
95
|
|
|
98
96
|
return (
|
|
99
97
|
<StyledPegaDxilMyRadiobuttonsWrapper>
|
|
100
|
-
<FormControl error={status === 'error'} required={required}>
|
|
98
|
+
<FormControl variant='standard' error={status === 'error'} required={required}>
|
|
101
99
|
<FormLabel component='legend'>{label}</FormLabel>
|
|
102
100
|
<RadioGroup value={theSelectedButton} onChange={handleChange} onBlur={!readOnly ? handleBlur : undefined} row={inline}>
|
|
103
101
|
{theOptions.map(theOption => {
|
|
@@ -108,7 +106,6 @@ export default function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProp
|
|
|
108
106
|
label={thePConn.getLocalizedValue(
|
|
109
107
|
theOption.value,
|
|
110
108
|
localePath,
|
|
111
|
-
// @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
|
|
112
109
|
thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
113
110
|
)}
|
|
114
111
|
control={<Radio key={theOption.key} color='primary' disabled={readOnly} />}
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx
CHANGED
|
@@ -47,7 +47,7 @@ export default function PegaDxilMyTimeOfDay(props: PegaDxilMyTimeOfDayProps) {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
const handleChange = date => {
|
|
50
|
-
const theValue = date && date.isValid() ? date.format('HH:mm') : null;
|
|
50
|
+
const theValue = date && date.isValid() ? date.format('HH:mm:ss') : null;
|
|
51
51
|
handleEvent(actions, 'changeNblur', propName, theValue);
|
|
52
52
|
};
|
|
53
53
|
|