@pega/dx-component-builder-sdk 0.242.14 → 0.242.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/README.md +3 -3
- package/package.json +1 -1
- package/src/constants.js +39 -6
- package/src/tasks/create/index.js +7 -5
- 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-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/src/tasks/quarantine/index.js +4 -2
- package/tests/assets/sdk-a/components/create/override-sdk/field/dropdown/dropdown.component.ts +122 -7
- package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.html +4 -4
- package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.ts +7 -12
- package/tests/assets/sdk-a/components/create/override-sdk/template/default-form/default-form.component.ts +2 -2
- package/tests/assets/sdk-a/components/create/override-sdk/template/details/details.component.ts +5 -39
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-narrow-wide/details-narrow-wide.component.ts +5 -38
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-one-column/details-one-column.component.ts +5 -40
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-three-column/details-three-column.component.ts +5 -41
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-two-column/details-two-column.component.ts +5 -41
- package/tests/assets/sdk-a/components/create/override-sdk/template/details-wide-narrow/details-wide-narrow.component.ts +5 -40
- package/tests/assets/sdk-a/components/create/override-sdk/template/one-column/one-column.component.ts +2 -2
- package/tests/assets/sdk-a/components/create/override-sdk/template/simple-table-manual/simple-table-manual.component.scss +1 -0
- package/tests/assets/sdk-a/components/create/override-sdk/template/three-column/three-column.component.ts +2 -2
- package/tests/assets/sdk-a/components/create/override-sdk/template/two-column/two-column.component.ts +2 -2
- package/tests/assets/sdk-a/components/create/override-sdk/template/wide-narrow-form/wide-narrow-form.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyRadioButtons/index.tsx +3 -5
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-picklist/pega-dxil-my-picklist.component.ts +29 -15
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-details/pega-dxil-my-details.component.ts +5 -39
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/demo.stories.tsx +1 -4
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/pega-dxil-my-form.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-two-column-details/pega-dxil-my-two-column-details.component.ts +6 -42
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-two-column-form/pega-dxil-my-two-column-form.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/dropdown/dropdown.component.ts +122 -7
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/case-view/case-view.component.html +4 -4
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/case-view/case-view.component.ts +7 -12
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/default-form/default-form.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details/details.component.ts +5 -39
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-narrow-wide/details-narrow-wide.component.ts +5 -38
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-one-column/details-one-column.component.ts +5 -40
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-sub-tabs/details-sub-tabs.component.html +1 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-sub-tabs/details-sub-tabs.component.ts +5 -37
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-three-column/details-three-column.component.ts +5 -41
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-two-column/details-two-column.component.ts +5 -41
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/details-wide-narrow/details-wide-narrow.component.ts +5 -40
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/one-column/one-column.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/simple-table-manual/simple-table-manual.component.scss +1 -0
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/three-column/three-column.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/two-column/two-column.component.ts +2 -2
- package/tests/assets/sdk-a/components/createAll/override-sdk/template/wide-narrow-form/wide-narrow-form.component.ts +2 -2
- 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/functional/sdk-a/localCreateAllListDeleteAllCustom.test.js +5 -5
- package/tests/functional/sdk-a/localCreateAllListDeleteAllOverride.test.js +5 -5
- package/tests/functional/sdk-a/localCreateBuildAllDeleteAllCustom.test.js +2 -2
- package/tests/functional/sdk-a/localCreateBuildDeleteCustom.test.js +2 -2
- package/tests/functional/sdk-a/localCreateBuildDeleteOverride.test.js +2 -2
- package/tests/functional/sdk-a/localCreateListDeleteCustom.test.js +1 -1
- package/tests/functional/sdk-a/localCreateListDeleteOverride.test.js +1 -1
- package/tests/functional/sdk-a/localCreateMapAllClearMap.test.js +2 -2
- package/tests/functional/sdk-a/localCreatePublishAllDeleteAllCustom.test.js +2 -2
- package/tests/functional/sdk-a/localCreatePublishAllDeleteAllOverride.test.js +2 -2
- package/tests/functional/sdk-a/localCreatePublishDeleteCustom.test.js +2 -2
- package/tests/functional/sdk-a/localCreatePublishDeleteOverride.test.js +2 -2
- package/tests/functional/sdk-a/localCreateRenameDeleteCustom.test.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
-
import { Grid } from '@mui/material';
|
|
2
|
+
import { Grid, GridSize } from '@mui/material';
|
|
3
3
|
import makeStyles from '@mui/styles/makeStyles';
|
|
4
4
|
|
|
5
5
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -35,8 +35,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: PropsWithChildren<{{COMP
|
|
|
35
35
|
// Calculate the size
|
|
36
36
|
// Default to assume the 2 columns are evenly split. However, override if templateCol
|
|
37
37
|
// (example value: "1fr 1fr")
|
|
38
|
-
let aSize = 6;
|
|
39
|
-
let bSize = 6;
|
|
38
|
+
let aSize: GridSize = 6;
|
|
39
|
+
let bSize: GridSize = 6;
|
|
40
40
|
|
|
41
41
|
const colAArray = templateCol
|
|
42
42
|
.replaceAll(/[a-z]+/g, '')
|
|
@@ -44,8 +44,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: PropsWithChildren<{{COMP
|
|
|
44
44
|
.map(itm => Number(itm));
|
|
45
45
|
const totalCols = colAArray.reduce((v, itm) => itm + v, 0);
|
|
46
46
|
const ratio = 12 / totalCols;
|
|
47
|
-
aSize = (ratio * colAArray[0]) as
|
|
48
|
-
bSize = (ratio * colAArray[1]) as
|
|
47
|
+
aSize = (ratio * colAArray[0]) as GridSize;
|
|
48
|
+
bSize = (ratio * colAArray[1]) as GridSize;
|
|
49
49
|
|
|
50
50
|
return (
|
|
51
51
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -3,6 +3,16 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
3
3
|
import {{COMPONENT_CLASS_NAME}} from './index';
|
|
4
4
|
import { historyData } from './mock';
|
|
5
5
|
|
|
6
|
+
window.PCore.getDataApiUtils = (): any => {
|
|
7
|
+
return {
|
|
8
|
+
getData: () => {
|
|
9
|
+
return new Promise(resolve => {
|
|
10
|
+
resolve(historyData);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
6
16
|
const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
7
17
|
title: '{{COMPONENT_CLASS_NAME}}',
|
|
8
18
|
component: {{COMPONENT_CLASS_NAME}},
|
|
@@ -13,26 +23,6 @@ export default meta;
|
|
|
13
23
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
14
24
|
|
|
15
25
|
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
16
|
-
window.PCore = {
|
|
17
|
-
...window.PCore,
|
|
18
|
-
getDataApiUtils: (): any => {
|
|
19
|
-
return {
|
|
20
|
-
getData: (): any => {
|
|
21
|
-
return new Promise(resolve => {
|
|
22
|
-
resolve(historyData);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
getConstants: (): any => {
|
|
28
|
-
return {
|
|
29
|
-
CASE_INFO: {
|
|
30
|
-
CASE_INFO_ID: 'caseInfo.ID'
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
26
|
const props = {
|
|
37
27
|
label: 'Case history',
|
|
38
28
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { Theme } from '@mui/material/styles';
|
|
2
3
|
import withStyles from '@mui/styles/withStyles';
|
|
3
4
|
import createStyles from '@mui/styles/createStyles';
|
|
4
5
|
import Table from '@mui/material/Table';
|
|
@@ -18,7 +19,7 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
|
|
|
18
19
|
// If any, enter additional props that only exist on this component
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
const StyledTableCell = withStyles((myTheme) =>
|
|
22
|
+
const StyledTableCell = withStyles((myTheme: Theme) =>
|
|
22
23
|
createStyles({
|
|
23
24
|
head: {
|
|
24
25
|
borderWidth: '1px',
|
|
@@ -12,27 +12,17 @@ const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
|
12
12
|
export default meta;
|
|
13
13
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
resolve(worklistData);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
getConstants: (): any => {
|
|
28
|
-
return {
|
|
29
|
-
CASE_INFO: {
|
|
30
|
-
INSTRUCTIONS: 'caseInfo.assignments[0].instructions'
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
},
|
|
15
|
+
window.PCore.getDataApiUtils = (): any => {
|
|
16
|
+
return {
|
|
17
|
+
getData: () => {
|
|
18
|
+
return new Promise(resolve => {
|
|
19
|
+
resolve(worklistData);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
34
22
|
};
|
|
23
|
+
};
|
|
35
24
|
|
|
25
|
+
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
36
26
|
const props = {
|
|
37
27
|
datasource: configProps.datasource,
|
|
38
28
|
whatsnewlink: configProps.whatsnewlink,
|
|
@@ -3,6 +3,16 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
3
3
|
import {{COMPONENT_CLASS_NAME}} from './index';
|
|
4
4
|
import { caseOpConfig, operatorDetails } from './mock';
|
|
5
5
|
|
|
6
|
+
window.PCore.getUserApi = (): any => {
|
|
7
|
+
return {
|
|
8
|
+
getOperatorDetails: () => {
|
|
9
|
+
return new Promise(resolve => {
|
|
10
|
+
resolve(operatorDetails);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
6
16
|
const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
7
17
|
title: '{{COMPONENT_CLASS_NAME}}',
|
|
8
18
|
component: {{COMPONENT_CLASS_NAME}},
|
|
@@ -13,26 +23,6 @@ export default meta;
|
|
|
13
23
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
14
24
|
|
|
15
25
|
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
16
|
-
window.PCore = {
|
|
17
|
-
...window.PCore,
|
|
18
|
-
getUserApi: (): any => {
|
|
19
|
-
return {
|
|
20
|
-
getOperatorDetails: () => {
|
|
21
|
-
return new Promise(resolve => {
|
|
22
|
-
resolve(operatorDetails);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
getLocaleUtils: (): any => {
|
|
28
|
-
return {
|
|
29
|
-
getLocaleValue: val => {
|
|
30
|
-
return val;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
26
|
const props = {
|
|
37
27
|
getPConnect: () => {
|
|
38
28
|
return {
|
|
@@ -29,6 +29,7 @@ export const quarantineTests = async(answers) => {
|
|
|
29
29
|
const testList = await getJestFunctionalTestList("ALL");
|
|
30
30
|
const frameWork = await getFramework();
|
|
31
31
|
const SDK_PATH = frameWork === "SDK-Angular" ? "sdk-a" : "sdk-r";
|
|
32
|
+
const SDK_PATH_CAP = SDK_PATH.toUpperCase();
|
|
32
33
|
const functionalPath = join(path.resolve(), JEST_TESTS_FUNCTIONAL_PATH, SDK_PATH);
|
|
33
34
|
|
|
34
35
|
// rename .test to .notest
|
|
@@ -37,7 +38,7 @@ export const quarantineTests = async(answers) => {
|
|
|
37
38
|
fs.renameSync(join(functionalPath, testName), join(functionalPath, quarantineName));
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
console.log(chalk.green(`All ${
|
|
41
|
+
console.log(chalk.green(`All ${SDK_PATH_CAP} tests are quarantined.`));
|
|
41
42
|
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -45,6 +46,7 @@ export const unquarantineTests = async(answers) => {
|
|
|
45
46
|
const testList = await getJestFunctionalTestList("ALL");
|
|
46
47
|
const frameWork = await getFramework();
|
|
47
48
|
const SDK_PATH = frameWork === "SDK-Angular" ? "sdk-a" : "sdk-r";
|
|
49
|
+
const SDK_PATH_CAP = SDK_PATH.toUpperCase();
|
|
48
50
|
const functionalPath = join(path.resolve(), JEST_TESTS_FUNCTIONAL_PATH, SDK_PATH);
|
|
49
51
|
|
|
50
52
|
// rename .test to .notest
|
|
@@ -53,7 +55,7 @@ export const unquarantineTests = async(answers) => {
|
|
|
53
55
|
fs.renameSync(join(functionalPath, testName), join(functionalPath, restoreName));
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
console.log(chalk.green(`All ${
|
|
58
|
+
console.log(chalk.green(`All ${SDK_PATH_CAP} tests are unquarantined.`));
|
|
57
59
|
|
|
58
60
|
}
|
|
59
61
|
|
package/tests/assets/sdk-a/components/create/override-sdk/field/dropdown/dropdown.component.ts
CHANGED
|
@@ -5,12 +5,47 @@ import { MatOptionModule } from '@angular/material/core';
|
|
|
5
5
|
import { MatSelectModule } from '@angular/material/select';
|
|
6
6
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
7
7
|
import { interval } from 'rxjs';
|
|
8
|
+
import isEqual from 'fast-deep-equal';
|
|
8
9
|
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
10
|
+
import { DatapageService } from '@pega/angular-sdk-components';
|
|
9
11
|
import { Utils } from '@pega/angular-sdk-components';
|
|
10
12
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
11
13
|
import { handleEvent } from '@pega/angular-sdk-components';
|
|
12
14
|
import { PConnFieldProps } from '@pega/angular-sdk-components';
|
|
13
15
|
|
|
16
|
+
function flattenParameters(params = {}) {
|
|
17
|
+
const flatParams = {};
|
|
18
|
+
Object.keys(params).forEach(key => {
|
|
19
|
+
const { name, value: theVal } = params[key];
|
|
20
|
+
flatParams[name] = theVal;
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
return flatParams;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function preProcessColumns(columnList) {
|
|
27
|
+
return columnList.map(col => {
|
|
28
|
+
const tempColObj = { ...col };
|
|
29
|
+
tempColObj.value = col.value && col.value.startsWith('.') ? col.value.substring(1) : col.value;
|
|
30
|
+
return tempColObj;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function getDisplayFieldsMetaData(columnList) {
|
|
35
|
+
const displayColumns = columnList.filter(col => col.display === 'true');
|
|
36
|
+
const metaDataObj: any = { key: '', primary: '', secondary: [] };
|
|
37
|
+
const keyCol = columnList.filter(col => col.key === 'true');
|
|
38
|
+
metaDataObj.key = keyCol.length > 0 ? keyCol[0].value : 'auto';
|
|
39
|
+
for (let index = 0; index < displayColumns.length; index += 1) {
|
|
40
|
+
if (displayColumns[index].primary === 'true') {
|
|
41
|
+
metaDataObj.primary = displayColumns[index].value;
|
|
42
|
+
} else {
|
|
43
|
+
metaDataObj.secondary.push(displayColumns[index].value);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return metaDataObj;
|
|
47
|
+
}
|
|
48
|
+
|
|
14
49
|
interface IOption {
|
|
15
50
|
key: string;
|
|
16
51
|
value: string;
|
|
@@ -22,6 +57,11 @@ interface DropdownProps extends PConnFieldProps {
|
|
|
22
57
|
datasource?: any[];
|
|
23
58
|
onRecordChange?: any;
|
|
24
59
|
fieldMetadata?: any;
|
|
60
|
+
listType?: string;
|
|
61
|
+
columns?: any[];
|
|
62
|
+
deferDatasource?: boolean;
|
|
63
|
+
datasourceMetadata?: any;
|
|
64
|
+
parameters?: any;
|
|
25
65
|
}
|
|
26
66
|
|
|
27
67
|
@Component({
|
|
@@ -53,7 +93,7 @@ export class DropdownComponent implements OnInit, OnDestroy {
|
|
|
53
93
|
testId = '';
|
|
54
94
|
helperText: string;
|
|
55
95
|
hideLabel: any;
|
|
56
|
-
|
|
96
|
+
theDatasource: any[] | null;
|
|
57
97
|
fieldControl = new FormControl('', null);
|
|
58
98
|
fieldMetadata: any[];
|
|
59
99
|
localeContext = '';
|
|
@@ -67,7 +107,8 @@ export class DropdownComponent implements OnInit, OnDestroy {
|
|
|
67
107
|
constructor(
|
|
68
108
|
private angularPConnect: AngularPConnectService,
|
|
69
109
|
private cdRef: ChangeDetectorRef,
|
|
70
|
-
private utils: Utils
|
|
110
|
+
private utils: Utils,
|
|
111
|
+
private dataPageService: DatapageService
|
|
71
112
|
) {}
|
|
72
113
|
|
|
73
114
|
ngOnInit(): void {
|
|
@@ -78,8 +119,9 @@ export class DropdownComponent implements OnInit, OnDestroy {
|
|
|
78
119
|
// Then, continue on with other initialization
|
|
79
120
|
|
|
80
121
|
// call updateSelf when initializing
|
|
81
|
-
// this.updateSelf();
|
|
82
122
|
this.checkAndUpdate();
|
|
123
|
+
// this should get called afer checkAndUpdate
|
|
124
|
+
this.getDatapageData();
|
|
83
125
|
|
|
84
126
|
if (this.formGroup$) {
|
|
85
127
|
// add control to formGroup
|
|
@@ -122,7 +164,6 @@ export class DropdownComponent implements OnInit, OnDestroy {
|
|
|
122
164
|
updateSelf(): void {
|
|
123
165
|
// moved this from ngOnInit() and call this from there instead...
|
|
124
166
|
this.configProps$ = this.pConn$.resolveConfigProps(this.pConn$.getConfigProps()) as DropdownProps;
|
|
125
|
-
|
|
126
167
|
if (this.configProps$.value != undefined) {
|
|
127
168
|
this.value$ = this.configProps$.value;
|
|
128
169
|
}
|
|
@@ -132,6 +173,7 @@ export class DropdownComponent implements OnInit, OnDestroy {
|
|
|
132
173
|
this.label$ = this.configProps$.label;
|
|
133
174
|
this.helperText = this.configProps$.helperText;
|
|
134
175
|
this.hideLabel = this.configProps$.hideLabel;
|
|
176
|
+
const datasource = this.configProps$.datasource;
|
|
135
177
|
// timeout and detectChanges to avoid ExpressionChangedAfterItHasBeenCheckedError
|
|
136
178
|
setTimeout(() => {
|
|
137
179
|
if (this.configProps$.required != null) {
|
|
@@ -140,6 +182,11 @@ export class DropdownComponent implements OnInit, OnDestroy {
|
|
|
140
182
|
this.cdRef.detectChanges();
|
|
141
183
|
});
|
|
142
184
|
|
|
185
|
+
if (!isEqual(datasource, this.theDatasource)) {
|
|
186
|
+
// inbound datasource is different, so update theDatasource
|
|
187
|
+
this.theDatasource = datasource || null;
|
|
188
|
+
}
|
|
189
|
+
|
|
143
190
|
if (this.configProps$.visibility != null) {
|
|
144
191
|
this.bVisible$ = this.utils.getBooleanValue(this.configProps$.visibility);
|
|
145
192
|
}
|
|
@@ -161,14 +208,18 @@ export class DropdownComponent implements OnInit, OnDestroy {
|
|
|
161
208
|
|
|
162
209
|
this.componentReference = this.pConn$.getStateProps().value;
|
|
163
210
|
|
|
164
|
-
const optionsList = [...this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject())];
|
|
165
|
-
optionsList?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
|
|
166
|
-
this.options$ = optionsList;
|
|
167
211
|
if (this.value$ === '' && !this.bReadonly$) {
|
|
168
212
|
this.value$ = 'Select';
|
|
169
213
|
}
|
|
170
214
|
|
|
215
|
+
if (this.theDatasource) {
|
|
216
|
+
const optionsList = [...this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject())];
|
|
217
|
+
optionsList?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
|
|
218
|
+
this.options$ = optionsList;
|
|
219
|
+
}
|
|
220
|
+
|
|
171
221
|
this.actionsApi = this.pConn$.getActionsApi();
|
|
222
|
+
|
|
172
223
|
this.propName = this.pConn$.getStateProps().value;
|
|
173
224
|
const className = this.pConn$.getCaseInfo().getClassName();
|
|
174
225
|
const refName = this.propName?.slice(this.propName.lastIndexOf('.') + 1);
|
|
@@ -199,6 +250,70 @@ export class DropdownComponent implements OnInit, OnDestroy {
|
|
|
199
250
|
}
|
|
200
251
|
}
|
|
201
252
|
|
|
253
|
+
getDatapageData() {
|
|
254
|
+
const configProps = this.pConn$.getConfigProps() as DropdownProps;
|
|
255
|
+
let { listType, parameters, datasource = [], columns = [] } = configProps;
|
|
256
|
+
const { deferDatasource, datasourceMetadata } = configProps;
|
|
257
|
+
const context = this.pConn$.getContextName();
|
|
258
|
+
if (deferDatasource && datasourceMetadata?.datasource?.name) {
|
|
259
|
+
listType = 'datapage';
|
|
260
|
+
datasource = datasourceMetadata.datasource.name;
|
|
261
|
+
const { parameters: dataSourceParameters, propertyForDisplayText, propertyForValue } = datasourceMetadata.datasource;
|
|
262
|
+
parameters = flattenParameters(dataSourceParameters);
|
|
263
|
+
const displayProp = propertyForDisplayText?.startsWith('@P') ? propertyForDisplayText.substring(3) : propertyForDisplayText;
|
|
264
|
+
const valueProp = propertyForValue?.startsWith('@P') ? propertyForValue.substring(3) : propertyForValue;
|
|
265
|
+
columns = [
|
|
266
|
+
{
|
|
267
|
+
key: 'true',
|
|
268
|
+
setProperty: 'Associated property',
|
|
269
|
+
value: valueProp
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
display: 'true',
|
|
273
|
+
primary: 'true',
|
|
274
|
+
useForSearch: true,
|
|
275
|
+
value: displayProp
|
|
276
|
+
}
|
|
277
|
+
];
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
columns = preProcessColumns(columns) || [];
|
|
281
|
+
if (!this.displayMode$ && listType !== 'associated' && typeof datasource === 'string') {
|
|
282
|
+
this.getData(datasource, parameters, columns, context, listType);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
getData(dataSource, parameters, columns, context, listType) {
|
|
287
|
+
const dataConfig: any = {
|
|
288
|
+
columns,
|
|
289
|
+
dataSource,
|
|
290
|
+
deferDatasource: true,
|
|
291
|
+
listType,
|
|
292
|
+
parameters,
|
|
293
|
+
matchPosition: 'contains',
|
|
294
|
+
maxResultsDisplay: '5000',
|
|
295
|
+
cacheLifeSpan: 'form'
|
|
296
|
+
};
|
|
297
|
+
PCore.getDataApi()
|
|
298
|
+
.init(dataConfig, context)
|
|
299
|
+
.then((dataApiObj: any) => {
|
|
300
|
+
const optionsData: any[] = [];
|
|
301
|
+
const displayColumn = getDisplayFieldsMetaData(columns);
|
|
302
|
+
dataApiObj?.fetchData('').then(response => {
|
|
303
|
+
response.data?.forEach(element => {
|
|
304
|
+
const val = element[displayColumn.primary]?.toString();
|
|
305
|
+
const obj = {
|
|
306
|
+
key: element[displayColumn.key] || element.pyGUID,
|
|
307
|
+
value: val
|
|
308
|
+
};
|
|
309
|
+
optionsData.push(obj);
|
|
310
|
+
});
|
|
311
|
+
optionsData?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
|
|
312
|
+
this.options$ = optionsData;
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
|
|
202
317
|
isSelected(buttonValue: string): boolean {
|
|
203
318
|
return this.value$ === buttonValue;
|
|
204
319
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="psdk-case-view" id="case-view">
|
|
2
|
-
<div
|
|
2
|
+
<div class="psdk-case-view-info">
|
|
3
3
|
<mat-toolbar color="primary" class="psdk-case-view-toolbar">
|
|
4
4
|
<mat-toolbar-row style="padding-left: 1rem">
|
|
5
5
|
<div class="psdk-case-icon-div">
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
></component-mapper>
|
|
48
48
|
</div>
|
|
49
49
|
<div class="psdk-case-view-main">
|
|
50
|
-
<div
|
|
50
|
+
<div>
|
|
51
51
|
<div *ngFor="let kid of arChildren$">
|
|
52
52
|
<div
|
|
53
53
|
*ngIf="
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
</div>
|
|
74
74
|
</div>
|
|
75
75
|
|
|
76
|
-
<div
|
|
76
|
+
<div>
|
|
77
77
|
<component-mapper name="DeferLoad" [props]="{ pConn$, loadData$: tabData$, name: tabData$?.config?.name }"></component-mapper>
|
|
78
78
|
</div>
|
|
79
79
|
</div>
|
|
80
|
-
<div
|
|
80
|
+
<div>
|
|
81
81
|
<div *ngIf="arChildren$" class="psdk-case-view-utilities">
|
|
82
82
|
<div *ngFor="let kid of arChildren$">
|
|
83
83
|
<div *ngIf="kid.getPConnect().getRawMetadata()?.type.toLowerCase() == 'region' && kid.getPConnect().getRawMetadata()?.name == 'Utilities'">
|
package/tests/assets/sdk-a/components/create/override-sdk/template/case-view/case-view.component.ts
CHANGED
|
@@ -27,7 +27,6 @@ interface CaseViewProps {
|
|
|
27
27
|
export class CaseViewComponent implements OnInit, OnDestroy {
|
|
28
28
|
@Input() pConn$: typeof PConnect;
|
|
29
29
|
@Input() formGroup$: FormGroup;
|
|
30
|
-
@Input() displayOnlyFA$: boolean;
|
|
31
30
|
|
|
32
31
|
// Used with AngularPConnect
|
|
33
32
|
angularPConnectData: AngularPConnectData = {};
|
|
@@ -161,19 +160,15 @@ export class CaseViewComponent implements OnInit, OnDestroy {
|
|
|
161
160
|
|
|
162
161
|
this.svgCase$ = this.utils.getImageSrc(this.configProps$.icon, this.utils.getSDKStaticContentUrl());
|
|
163
162
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
if (kidPConn.getRawMetadata().name == 'Tabs') {
|
|
170
|
-
this.mainTabs = kid;
|
|
171
|
-
this.mainTabData = this.mainTabs.getPConnect().getChildren();
|
|
172
|
-
}
|
|
163
|
+
for (const kid of this.arChildren$) {
|
|
164
|
+
const kidPConn = kid.getPConnect();
|
|
165
|
+
if (kidPConn.getRawMetadata().name == 'Tabs') {
|
|
166
|
+
this.mainTabs = kid;
|
|
167
|
+
this.mainTabData = this.mainTabs.getPConnect().getChildren();
|
|
173
168
|
}
|
|
174
|
-
|
|
175
|
-
this.generateTabsData();
|
|
176
169
|
}
|
|
170
|
+
|
|
171
|
+
this.generateTabsData();
|
|
177
172
|
}
|
|
178
173
|
|
|
179
174
|
generateTabsData() {
|
|
@@ -4,7 +4,7 @@ import { FormGroup } from '@angular/forms';
|
|
|
4
4
|
import { ReferenceComponent } from '@pega/angular-sdk-components';
|
|
5
5
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
6
6
|
import { TemplateUtils } from '@pega/angular-sdk-components';
|
|
7
|
-
import {
|
|
7
|
+
import { FormTemplateBase } from '@pega/angular-sdk-components';
|
|
8
8
|
|
|
9
9
|
interface DefaultFormProps {
|
|
10
10
|
// If any, enter additional props that only exist on this component
|
|
@@ -19,7 +19,7 @@ interface DefaultFormProps {
|
|
|
19
19
|
standalone: true,
|
|
20
20
|
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
|
|
21
21
|
})
|
|
22
|
-
export class DefaultFormComponent extends
|
|
22
|
+
export class DefaultFormComponent extends FormTemplateBase implements OnInit {
|
|
23
23
|
@Input() override pConn$: typeof PConnect;
|
|
24
24
|
@Input() formGroup$: FormGroup;
|
|
25
25
|
|
package/tests/assets/sdk-a/components/create/override-sdk/template/details/details.component.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
3
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
4
|
|
|
5
5
|
@Component({
|
|
6
6
|
selector: 'app-details',
|
|
@@ -9,48 +9,14 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
9
9
|
standalone: true,
|
|
10
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
11
|
})
|
|
12
|
-
export class DetailsComponent
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@Input() pConn$: typeof PConnect;
|
|
12
|
+
export class DetailsComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
16
14
|
|
|
17
15
|
highlightedDataArr: any[] = [];
|
|
18
16
|
showHighlightedData: boolean;
|
|
19
17
|
arFields$: any[] = [];
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
angularPConnectData: AngularPConnectData = {};
|
|
23
|
-
|
|
24
|
-
ngOnInit(): void {
|
|
25
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
26
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
27
|
-
|
|
28
|
-
// this.updateSelf();
|
|
29
|
-
this.checkAndUpdate();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
ngOnDestroy() {
|
|
33
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
34
|
-
this.angularPConnectData.unsubscribeFn();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
onStateChange() {
|
|
39
|
-
this.checkAndUpdate();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
checkAndUpdate() {
|
|
43
|
-
// Should always check the bridge to see if the component should
|
|
44
|
-
// update itself (re-render)
|
|
45
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
46
|
-
|
|
47
|
-
// ONLY call updateSelf when the component should update
|
|
48
|
-
if (bUpdateSelf) {
|
|
49
|
-
this.updateSelf();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
updateSelf() {
|
|
19
|
+
override updateSelf() {
|
|
54
20
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
55
21
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
56
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
3
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
4
4
|
|
|
5
5
|
@Component({
|
|
6
6
|
selector: 'app-details-narrow-wide',
|
|
@@ -9,48 +9,15 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
9
9
|
standalone: true,
|
|
10
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
11
11
|
})
|
|
12
|
-
export class DetailsNarrowWideComponent
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@Input() pConn$: typeof PConnect;
|
|
12
|
+
export class DetailsNarrowWideComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
16
14
|
|
|
17
15
|
arFields$: any[] = [];
|
|
18
16
|
arFields2$: any[] = [];
|
|
19
17
|
highlightedDataArr: any[] = [];
|
|
20
18
|
showHighlightedData: boolean;
|
|
21
|
-
// Used with AngularPConnect
|
|
22
|
-
angularPConnectData: AngularPConnectData = {};
|
|
23
|
-
|
|
24
|
-
ngOnInit(): void {
|
|
25
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
26
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
27
|
-
|
|
28
|
-
// this.updateSelf();
|
|
29
|
-
this.checkAndUpdate();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
ngOnDestroy() {
|
|
33
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
34
|
-
this.angularPConnectData.unsubscribeFn();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
onStateChange() {
|
|
39
|
-
this.checkAndUpdate();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
checkAndUpdate() {
|
|
43
|
-
// Should always check the bridge to see if the component should
|
|
44
|
-
// update itself (re-render)
|
|
45
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
46
|
-
|
|
47
|
-
// ONLY call updateSelf when the component should update
|
|
48
|
-
if (bUpdateSelf) {
|
|
49
|
-
this.updateSelf();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
19
|
|
|
53
|
-
updateSelf() {
|
|
20
|
+
override updateSelf() {
|
|
54
21
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
55
22
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
56
23
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
|
|
3
|
-
import { FormGroup } from '@angular/forms';
|
|
1
|
+
import { Component, forwardRef } from '@angular/core';
|
|
4
2
|
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
3
|
+
import { DetailsTemplateBase } from '@pega/angular-sdk-components';
|
|
5
4
|
|
|
6
5
|
@Component({
|
|
7
6
|
selector: 'app-details-one-column',
|
|
@@ -10,49 +9,15 @@ import { ComponentMapperComponent } from '@pega/angular-sdk-components';
|
|
|
10
9
|
standalone: true,
|
|
11
10
|
imports: [forwardRef(() => ComponentMapperComponent)]
|
|
12
11
|
})
|
|
13
|
-
export class DetailsOneColumnComponent
|
|
14
|
-
|
|
12
|
+
export class DetailsOneColumnComponent extends DetailsTemplateBase {
|
|
13
|
+
override pConn$: typeof PConnect;
|
|
15
14
|
|
|
16
|
-
@Input() pConn$: typeof PConnect;
|
|
17
|
-
@Input() formGroup$: FormGroup;
|
|
18
15
|
showHighlightedData: boolean;
|
|
19
16
|
highlightedDataArr: any;
|
|
20
17
|
|
|
21
18
|
arFields$: any[] = [];
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
angularPConnectData: AngularPConnectData = {};
|
|
25
|
-
|
|
26
|
-
ngOnInit(): void {
|
|
27
|
-
// First thing in initialization is registering and subscribing to the AngularPConnect service
|
|
28
|
-
this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange);
|
|
29
|
-
|
|
30
|
-
// this.updateSelf();
|
|
31
|
-
this.checkAndUpdate();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
ngOnDestroy() {
|
|
35
|
-
if (this.angularPConnectData.unsubscribeFn) {
|
|
36
|
-
this.angularPConnectData.unsubscribeFn();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
onStateChange() {
|
|
41
|
-
this.checkAndUpdate();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
checkAndUpdate() {
|
|
45
|
-
// Should always check the bridge to see if the component should
|
|
46
|
-
// update itself (re-render)
|
|
47
|
-
const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
|
|
48
|
-
|
|
49
|
-
// ONLY call updateSelf when the component should update
|
|
50
|
-
if (bUpdateSelf) {
|
|
51
|
-
this.updateSelf();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
updateSelf() {
|
|
20
|
+
override updateSelf() {
|
|
56
21
|
const rawMetaData: any = this.pConn$.resolveConfigProps(this.pConn$.getRawMetadata()?.config);
|
|
57
22
|
this.showHighlightedData = rawMetaData?.showHighlightedData;
|
|
58
23
|
|