@pega/dx-component-builder-sdk 0.8.2 → 0.23.2

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.
Files changed (77) hide show
  1. package/package.json +1 -1
  2. package/src/constants.js +0 -1
  3. package/src/tasks/bundle/builderAngular/webpack.config.js +1 -2
  4. package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +28 -25
  5. package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.jsx.mustache +1 -1
  6. package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.jsx.mustache +1 -1
  7. package/src/tasks/create/templates/SDK-React/field/Decimal/demo.stories.jsx.mustache +1 -0
  8. package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.jsx.mustache +1 -1
  9. package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.jsx.mustache +1 -1
  10. package/src/tasks/create/templates/SDK-React/template/DETAILS/mock.stories.js.mustache +1 -1
  11. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.jsx.mustache +1 -1
  12. package/src/tasks/create/templates/SDK-React/template/DETAILS-region/mock.stories.js.mustache +1 -1
  13. package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.jsx.mustache +1 -1
  14. package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +9 -10
  15. package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.jsx.mustache +1 -1
  16. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.jsx.mustache +1 -1
  17. package/tests/assets/components/SDK-React/create/override-sdk/field/AutoComplete/AutoComplete.tsx +1 -1
  18. package/tests/assets/components/SDK-React/create/override-sdk/field/Checkbox/Checkbox.tsx +27 -25
  19. package/tests/assets/components/SDK-React/create/override-sdk/field/Currency/Currency.tsx +1 -1
  20. package/tests/assets/components/SDK-React/create/override-sdk/field/Date/Date.tsx +1 -1
  21. package/tests/assets/components/SDK-React/create/override-sdk/field/DateTime/DateTime.tsx +1 -1
  22. package/tests/assets/components/SDK-React/create/override-sdk/field/Decimal/Decimal.tsx +1 -1
  23. package/tests/assets/components/SDK-React/create/override-sdk/field/Dropdown/Dropdown.tsx +15 -14
  24. package/tests/assets/components/SDK-React/create/override-sdk/field/RadioButtons/RadioButtons.tsx +9 -8
  25. package/tests/assets/components/SDK-React/create/override-sdk/field/TextInput/TextInput.tsx +1 -1
  26. package/tests/assets/components/SDK-React/create/override-sdk/infra/Assignment/Assignment.tsx +18 -15
  27. package/tests/assets/components/SDK-React/create/override-sdk/infra/ErrorBoundary/ErrorBoundary.tsx +1 -1
  28. package/tests/assets/components/SDK-React/create/override-sdk/template/AppShell/AppShell.tsx +1 -1
  29. package/tests/assets/components/SDK-React/create/override-sdk/template/CaseSummary/CaseSummary.tsx +3 -1
  30. package/tests/assets/components/SDK-React/create/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +1 -1
  31. package/tests/assets/components/SDK-React/create/override-sdk/template/PromotedFilters/PromotedFilters.tsx +13 -11
  32. package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTable/SimpleTable.tsx +9 -9
  33. package/tests/assets/components/SDK-React/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +1 -1
  34. package/tests/assets/components/SDK-React/create/override-sdk/widget/Attachment/Attachment.tsx +2 -2
  35. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +28 -25
  36. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/demo.stories.jsx +1 -1
  37. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.jsx +1 -1
  38. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.jsx +1 -1
  39. package/tests/assets/components/SDK-React/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/demo.stories.jsx +1 -0
  40. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyDetails/demo.stories.jsx +1 -1
  41. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyDetails/mock.stories.js +1 -1
  42. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.jsx +1 -1
  43. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx +9 -10
  44. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +1 -1
  45. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/mock.stories.js +1 -1
  46. package/tests/assets/components/SDK-React/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +1 -1
  47. package/tests/assets/components/SDK-React/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +1 -1
  48. package/tests/assets/components/SDK-React/createAll/override-sdk/field/AutoComplete/AutoComplete.tsx +1 -1
  49. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Checkbox/Checkbox.tsx +27 -25
  50. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Currency/Currency.tsx +1 -1
  51. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Date/Date.tsx +1 -1
  52. package/tests/assets/components/SDK-React/createAll/override-sdk/field/DateTime/DateTime.tsx +1 -1
  53. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Decimal/Decimal.tsx +1 -1
  54. package/tests/assets/components/SDK-React/createAll/override-sdk/field/Dropdown/Dropdown.tsx +15 -14
  55. package/tests/assets/components/SDK-React/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +9 -8
  56. package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/ScalarList.tsx +2 -2
  57. package/tests/assets/components/SDK-React/createAll/override-sdk/field/ScalarList/config-ext.json +7 -22
  58. package/tests/assets/components/SDK-React/createAll/override-sdk/field/TextInput/TextInput.tsx +1 -1
  59. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/Assignment/Assignment.tsx +18 -15
  60. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
  61. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/DashboardFilter/filterUtils.tsx +2 -1
  62. package/tests/assets/components/SDK-React/createAll/override-sdk/infra/ErrorBoundary/ErrorBoundary.tsx +1 -1
  63. package/tests/assets/components/SDK-React/createAll/override-sdk/template/AppShell/AppShell.tsx +1 -1
  64. package/tests/assets/components/SDK-React/createAll/override-sdk/template/CaseSummary/CaseSummary.tsx +3 -1
  65. package/tests/assets/components/SDK-React/createAll/override-sdk/template/DataReference/DataReference.tsx +36 -34
  66. package/tests/assets/components/SDK-React/createAll/override-sdk/template/Details/Details.tsx +1 -1
  67. package/tests/assets/components/SDK-React/createAll/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +1 -1
  68. package/tests/assets/components/SDK-React/createAll/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +1 -1
  69. package/tests/assets/components/SDK-React/createAll/override-sdk/template/InlineDashboardPage/InlineDashboardPage.tsx +1 -1
  70. package/tests/assets/components/SDK-React/createAll/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
  71. package/tests/assets/components/SDK-React/createAll/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +1 -1
  72. package/tests/assets/components/SDK-React/createAll/override-sdk/template/PromotedFilters/PromotedFilters.tsx +13 -11
  73. package/tests/assets/components/SDK-React/createAll/override-sdk/template/SimpleTable/SimpleTable.tsx +9 -9
  74. package/tests/assets/components/SDK-React/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +1 -1
  75. package/tests/assets/components/SDK-React/createAll/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -2
  76. package/tests/assets/components/SDK-React/createAll/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +3 -3
  77. package/tests/assets/components/SDK-React/createAll/override-sdk/widget/Attachment/Attachment.tsx +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/dx-component-builder-sdk",
3
- "version": "0.8.2",
3
+ "version": "0.23.2",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
package/src/constants.js CHANGED
@@ -423,7 +423,6 @@ export const COMPONENT_SCHEMA = {
423
423
  name: 'View',
424
424
  value: 'View'
425
425
  }
426
-
427
426
  ],
428
427
  template: [
429
428
  {
@@ -259,8 +259,7 @@ export default (
259
259
  },
260
260
  'sass-loader'
261
261
  )
262
- },
263
- {
262
+ }, {
264
263
  test: /\.(d.ts)$/, /* latest react-sdk-components needs to ignore compiling .d.ts and .map files */
265
264
  loader: 'null-loader',
266
265
  },
@@ -10,36 +10,39 @@ import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event
10
10
  // import PropTypes from 'prop-types';
11
11
  import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
12
12
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
13
- import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
14
-
15
- interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
16
- // If any, enter additional props that only exist on this componentName
17
- // Everything from PConnFieldProps except value and change type of value to boolean
18
-
19
- value?: boolean,
20
- label: string,
21
- required: boolean,
22
- disabled: boolean,
23
- validatemessage: string,
24
- status?: string,
25
- // eslint-disable-next-line react/no-unused-prop-types
26
- onChange: any,
27
- // eslint-disable-next-line react/no-unused-prop-types
28
- onBlur?: any,
29
- readOnly: boolean,
30
- testId: string,
31
- helperText: string,
32
- displayMode?: string,
33
- hideLabel: boolean,
34
- // eslint-disable-next-line react/no-unused-prop-types
35
- placeholder?: string
36
- }
13
+ // import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
14
+
15
+ // Checkbox passes in 'value' as a boolean. So can't use the default
16
+ // PConnFieldProps since it expects value to be a string.
17
+ // But can't use {{COMPONENT_CLASS_NAME}}Props until getValidationApi() knows about validate method
18
+ // interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
19
+ // // If any, enter additional props that only exist on this componentName
20
+ // // Everything from PConnFieldProps except value and change type of value to boolean
21
+ //
22
+ // value?: boolean,
23
+ // label: string,
24
+ // required: boolean,
25
+ // disabled: boolean,
26
+ // validatemessage: string,
27
+ // status?: string,
28
+ // // eslint-disable-next-line react/no-unused-prop-types
29
+ // onChange: any,
30
+ // // eslint-disable-next-line react/no-unused-prop-types
31
+ // onBlur?: any,
32
+ // readOnly: boolean,
33
+ // testId: string,
34
+ // helperText: string,
35
+ // displayMode?: string,
36
+ // hideLabel: boolean,
37
+ // // eslint-disable-next-line react/no-unused-prop-types
38
+ // placeholder?: string
39
+ // }
37
40
 
38
41
  // Duplicated runtime code from React SDK
39
42
 
40
43
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
41
44
  // any default values in config.pros should be set in defaultProps at bottom of this file
42
- export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
45
+ export default function {{COMPONENT_CLASS_NAME}}(props /* : {{COMPONENT_CLASS_NAME}}Props */) {
43
46
  const {
44
47
  getPConnect,
45
48
  label,
@@ -61,4 +61,4 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
61
61
  <{{COMPONENT_CLASS_NAME}} {...props} />
62
62
  </>
63
63
  );
64
- };
64
+ };
@@ -59,4 +59,4 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
59
59
  <{{COMPONENT_CLASS_NAME}} {...props} />
60
60
  </>
61
61
  );
62
- };
62
+ };
@@ -52,3 +52,4 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
52
52
  </>
53
53
  );
54
54
  };
55
+
@@ -66,4 +66,4 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
66
66
  <{{COMPONENT_CLASS_NAME}} {...props} />
67
67
  </>
68
68
  );
69
- };
69
+ };
@@ -71,4 +71,4 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
71
71
  <{{COMPONENT_CLASS_NAME}} {...props}></{{COMPONENT_CLASS_NAME}}>
72
72
  </>
73
73
  );
74
- };
74
+ };
@@ -346,4 +346,4 @@ export const regionChildrenResolved = [
346
346
  ],
347
347
  displayMode: "LABELS_LEFT",
348
348
  },
349
- ];
349
+ ];
@@ -73,4 +73,4 @@ export const BaseYourOrgRequiredDxilDetailsRegion = () => {
73
73
  ></{{COMPONENT_CLASS_NAME}}>
74
74
  </>
75
75
  );
76
- };
76
+ };
@@ -247,4 +247,4 @@ export const pyReviewRaw = {
247
247
  },
248
248
  ],
249
249
  classID: "MyCo-MyCompon-Work-MyComponents",
250
- };
250
+ };
@@ -251,4 +251,4 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
251
251
  <{{COMPONENT_CLASS_NAME}} {...props}></{{COMPONENT_CLASS_NAME}}>
252
252
  </>
253
253
  );
254
- };
254
+ };
@@ -2,27 +2,26 @@ import React, { createElement } from 'react';
2
2
 
3
3
  import { getInstructions } from './utils';
4
4
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
5
- // import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
6
 
7
7
  import './DefaultForm.css';
8
8
 
9
9
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from "./styles";
10
10
 
11
- // Can't use {{COMPONENT_CLASS_NAME}}Props until getPConnect().getChildren()[0] is fixed
12
- // interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
13
- // // If any, enter additional props that only exist on this componentName
14
- // NumCols?: string,
15
- // instructions?: string,
16
- // // eslint-disable-next-line react/no-unused-prop-types
17
- // children: Array<any>
18
- // }
11
+ interface {{COMPONENT_CLASS_NAME}}Props extends PConnProps {
12
+ // If any, enter additional props that only exist on this componentName
13
+ NumCols?: string,
14
+ instructions?: string,
15
+ // eslint-disable-next-line react/no-unused-prop-types
16
+ children: Array<any>
17
+ }
19
18
 
20
19
 
21
20
  // Duplicated runtime code from React SDK
22
21
 
23
22
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
24
23
  // any default values in config.pros should be set in defaultProps at bottom of this file
25
- export default function {{COMPONENT_CLASS_NAME}}(props /* : {{COMPONENT_CLASS_NAME}}Props */) {
24
+ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
26
25
  const { getPConnect, NumCols = '1' } = props;
27
26
  const instructions = getInstructions(getPConnect(), props.instructions);
28
27
 
@@ -180,4 +180,4 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
180
180
  </{{COMPONENT_CLASS_NAME}}>
181
181
  </>
182
182
  );
183
- };
183
+ };
@@ -49,4 +49,4 @@ export const Base{{COMPONENT_CLASS_NAME}} = () => {
49
49
  <{{COMPONENT_CLASS_NAME}} {...props} />
50
50
  </>
51
51
  );
52
- };
52
+ };
@@ -81,7 +81,7 @@ export default function AutoComplete(props:AutoCompleteProps) {
81
81
 
82
82
  const thePConn = getPConnect();
83
83
  const actionsApi = thePConn.getActionsApi();
84
- const propName = thePConn.getStateProps().value;
84
+ const propName = thePConn.getStateProps()["value"];
85
85
 
86
86
  if (!isDeepEqual(datasource, theDatasource)) {
87
87
  // inbound datasource is different, so update theDatasource (to trigger useEffect)
@@ -8,34 +8,36 @@ import {
8
8
  } from '@material-ui/core';
9
9
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
10
10
  import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
11
- import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
11
+ // import type { PConnProps } from '../../../types/PConnProps';
12
12
 
13
13
  // Checkbox passes in 'value' as a boolean. So can't use the default
14
14
  // PConnFieldProps since it expects value to be a string.
15
- interface CheckboxProps extends PConnProps {
16
- // If any, enter additional props that only exist on Checkbox here
17
- // Everything from PConnFieldProps except value and change type of value to boolean
15
+ // But can't use CheckBoxProps until getValidationApi() knows about validate method
16
+ // Currently just thinks that returns an "object"
17
+ // interface CheckboxProps extends PConnProps {
18
+ // // If any, enter additional props that only exist on Checkbox here
19
+ // // Everything from PConnFieldProps except value and change type of value to boolean
18
20
 
19
- value?: boolean,
20
- label: string,
21
- required: boolean,
22
- disabled: boolean,
23
- validatemessage: string,
24
- status?: string,
25
- // eslint-disable-next-line react/no-unused-prop-types
26
- onChange: any,
27
- // eslint-disable-next-line react/no-unused-prop-types
28
- onBlur?: any,
29
- readOnly: boolean,
30
- testId: string,
31
- helperText: string,
32
- displayMode?: string,
33
- hideLabel: boolean,
34
- // eslint-disable-next-line react/no-unused-prop-types
35
- placeholder?: string
36
- }
21
+ // value?: boolean,
22
+ // label: string,
23
+ // required: boolean,
24
+ // disabled: boolean,
25
+ // validatemessage: string,
26
+ // status?: string,
27
+ // // eslint-disable-next-line react/no-unused-prop-types
28
+ // onChange: any,
29
+ // // eslint-disable-next-line react/no-unused-prop-types
30
+ // onBlur?: any,
31
+ // readOnly: boolean,
32
+ // testId: string,
33
+ // helperText: string,
34
+ // displayMode?: string,
35
+ // hideLabel: boolean,
36
+ // // eslint-disable-next-line react/no-unused-prop-types
37
+ // placeholder?: string
38
+ // }
37
39
 
38
- export default function CheckboxComponent(props: CheckboxProps) {
40
+ export default function CheckboxComponent(props /* : CheckboxProps */) {
39
41
  const {
40
42
  getPConnect,
41
43
  label,
@@ -54,9 +56,9 @@ export default function CheckboxComponent(props: CheckboxProps) {
54
56
 
55
57
  const thePConn = getPConnect();
56
58
  const theConfigProps = thePConn.getConfigProps();
57
- const { caption } = theConfigProps;
59
+ const caption = theConfigProps["caption"];
58
60
  const actionsApi = thePConn.getActionsApi();
59
- const propName = thePConn.getStateProps().value;
61
+ const propName = thePConn.getStateProps()["value"];
60
62
 
61
63
  const [checked, setChecked] = useState(false);
62
64
  useEffect(() => {
@@ -35,7 +35,7 @@ export default function Currency(props:CurrrencyProps) {
35
35
 
36
36
  const pConn = getPConnect();
37
37
  const actions = pConn.getActionsApi();
38
- const propName = pConn.getStateProps().value;
38
+ const propName = pConn.getStateProps()["value"];
39
39
  const helperTextToDisplay = validatemessage || helperText;
40
40
 
41
41
  // console.log(`Currency: label: ${label} value: ${value}`);
@@ -37,7 +37,7 @@ export default function Date(props:DateProps) {
37
37
 
38
38
  const pConn = getPConnect();
39
39
  const actions = pConn.getActionsApi();
40
- const propName = pConn.getStateProps().value;
40
+ const propName = pConn.getStateProps()["value"];
41
41
  const helperTextToDisplay = validatemessage || helperText;
42
42
 
43
43
  // Start with default dateFormatInfo
@@ -31,7 +31,7 @@ export default function DateTime(props: DateTimeProps) {
31
31
 
32
32
  const pConn = getPConnect();
33
33
  const actions = pConn.getActionsApi();
34
- const propName = pConn.getStateProps().value;
34
+ const propName = pConn.getStateProps()["value"];
35
35
  const helperTextToDisplay = validatemessage || helperText;
36
36
 
37
37
  // Start with default dateFormatInfo
@@ -38,7 +38,7 @@ export default function Decimal(props: DecimalProps) {
38
38
 
39
39
  const pConn = getPConnect();
40
40
  const actions = pConn.getActionsApi();
41
- const propName = pConn.getStateProps().value;
41
+ const propName = pConn.getStateProps()["value"];
42
42
  const helperTextToDisplay = validatemessage || helperText;
43
43
 
44
44
  const [decValue, setDecimalvalue] = useState('');
@@ -4,26 +4,27 @@ import MenuItem from '@material-ui/core/MenuItem';
4
4
  import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
5
5
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
6
6
  import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
7
- import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
+ // import type { PConnFieldProps } from '../../../types/PConnProps';
8
8
 
9
9
  interface IOption {
10
10
  key: string;
11
11
  value: string;
12
12
  }
13
13
 
14
- interface DropdownProps extends PConnFieldProps {
15
- // If any, enter additional props that only exist on Dropdown here
16
- datasource?: Array<any>,
17
- onRecordChange?: any,
18
- fieldMetadata?: any,
19
- // eslint-disable-next-line react/no-unused-prop-types
20
- listType: string,
21
- // eslint-disable-next-line react/no-unused-prop-types
22
- additionalProps?: object
23
- }
14
+ // Can't use DropdownProps with 8.23 until getLocaleRuleNameFromKeys is NOT private
15
+ // interface DropdownProps extends PConnFieldProps {
16
+ // // If any, enter additional props that only exist on Dropdown here
17
+ // datasource?: Array<any>,
18
+ // onRecordChange?: any,
19
+ // fieldMetadata?: any,
20
+ // // eslint-disable-next-line react/no-unused-prop-types
21
+ // listType: string,
22
+ // // eslint-disable-next-line react/no-unused-prop-types
23
+ // additionalProps?: object
24
+ // }
24
25
 
25
26
 
26
- export default function Dropdown(props: DropdownProps) {
27
+ export default function Dropdown(props /* : DropdownProps */) {
27
28
  const {
28
29
  getPConnect,
29
30
  label,
@@ -41,14 +42,14 @@ export default function Dropdown(props: DropdownProps) {
41
42
  onRecordChange,
42
43
  fieldMetadata
43
44
  } = props;
44
- let { placeholder } = props;
45
+ let { placeholder = "" } = props;
45
46
  placeholder = placeholder || 'Select...';
46
47
  const [options, setOptions] = useState<Array<IOption>>([]);
47
48
  const helperTextToDisplay = validatemessage || helperText;
48
49
 
49
50
  const thePConn = getPConnect();
50
51
  const actionsApi = thePConn.getActionsApi();
51
- const propName = thePConn.getStateProps().value;
52
+ const propName = thePConn.getStateProps()["value"];
52
53
  const className = thePConn.getCaseInfo().getClassName();
53
54
  const refName = propName?.slice(propName.lastIndexOf('.') + 1);
54
55
 
@@ -11,16 +11,17 @@ import {
11
11
  import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
12
12
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
13
13
  import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
14
- import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
14
+ // import type { PConnFieldProps } from '../../../types/PConnProps';
15
15
 
16
- interface RadioButtonsProps extends PConnFieldProps {
17
- // If any, enter additional props that only exist on RadioButtons here
18
- inline: boolean,
19
- fieldMetadata?: any
20
- }
16
+ // Can't use RadioButtonProps until getLocaleRuleNameFromKeys is NOT private
17
+ // interface RadioButtonsProps extends PConnFieldProps {
18
+ // // If any, enter additional props that only exist on RadioButtons here
19
+ // inline: boolean,
20
+ // fieldMetadata?: any
21
+ // }
21
22
 
22
23
 
23
- export default function RadioButtons(props: RadioButtonsProps) {
24
+ export default function RadioButtons(props /* : RadioButtonsProps */ ) {
24
25
  const {
25
26
  getPConnect,
26
27
  label,
@@ -40,7 +41,7 @@ export default function RadioButtons(props: RadioButtonsProps) {
40
41
  const thePConn = getPConnect();
41
42
  const theConfigProps = thePConn.getConfigProps();
42
43
  const actionsApi = thePConn.getActionsApi();
43
- const propName = thePConn.getStateProps().value;
44
+ const propName = thePConn.getStateProps()["value"];
44
45
  const helperTextToDisplay = validatemessage || helperText;
45
46
  const className = thePConn.getCaseInfo().getClassName();
46
47
 
@@ -31,7 +31,7 @@ export default function TextInput(props: TextInputProps) {
31
31
 
32
32
  const pConn = getPConnect();
33
33
  const actions = pConn.getActionsApi();
34
- const propName = pConn.getStateProps().value;
34
+ const propName = pConn.getStateProps()["value"];
35
35
 
36
36
  const helperTextToDisplay = validatemessage || helperText;
37
37
 
@@ -5,20 +5,23 @@ import Snackbar from '@material-ui/core/Snackbar';
5
5
  import IconButton from '@material-ui/core/IconButton';
6
6
  import CloseIcon from '@material-ui/icons/Close';
7
7
 
8
- import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
-
10
- interface AssignmentProps extends PConnProps {
11
- // If any, enter additional props that only exist on this component
12
- children: Array<any>,
13
- itemKey: string,
14
- isInModal: boolean,
15
- banners: Array<any>
16
- // eslint-disable-next-line react/no-unused-prop-types
17
- actionButtons: Array<any>,
18
- }
19
-
20
-
21
- export default function Assignment(props: AssignmentProps) {
8
+ // import type { PConnProps } from '../../../types/PConnProps';
9
+
10
+ // Can't use AssignmentProps until the following are NOT private
11
+ // getCaseInfo().isAssignmentInCreateStage()
12
+ // getCaseInfo().isLocalAction()
13
+ // interface AssignmentProps extends PConnProps {
14
+ // // If any, enter additional props that only exist on this component
15
+ // children: Array<any>,
16
+ // itemKey: string,
17
+ // isInModal: boolean,
18
+ // banners: Array<any>
19
+ // // eslint-disable-next-line react/no-unused-prop-types
20
+ // actionButtons: Array<any>,
21
+ // }
22
+
23
+
24
+ export default function Assignment(props /* : AssignmentProps */) {
22
25
  const { getPConnect, children, itemKey = '', isInModal = false, banners = [] } = props;
23
26
  const thePConn = getPConnect();
24
27
 
@@ -81,7 +84,7 @@ export default function Assignment(props: AssignmentProps) {
81
84
  const oData = thePConn.getDataObject(''); // 1st arg empty string until typedefs allow it to be optional
82
85
 
83
86
  if (oWorkData?.caseInfo && oWorkData.caseInfo.assignments !== null) {
84
- const oCaseInfo = oData.caseInfo;
87
+ const oCaseInfo = oData["caseInfo"];
85
88
 
86
89
  if (oCaseInfo && oCaseInfo.actionButtons) {
87
90
  setActionButtons(oCaseInfo.actionButtons);
@@ -38,7 +38,7 @@ export default function ErrorBoundary(props: ErrorBoundaryProps) {
38
38
  Raw meta data for the component:`, localeCategory)} ${JSON.stringify(pConn.getRawMetadata())}`);
39
39
  }
40
40
 
41
- if (pConn.getConfigProps().type === "page") {
41
+ if (pConn.getConfigProps()["type"] === "page") {
42
42
  return (
43
43
  theErrorDiv
44
44
  );
@@ -93,7 +93,7 @@ export default function AppShell(props:AppShellProps) {
93
93
  useEffect(() => {
94
94
  setAppName(PCore.getEnvironmentInfo().getApplicationName());
95
95
 
96
- const tempMap: any = pConn.getChildren()?.map((child: any, index) => {
96
+ const tempMap: any = pConn.getChildren()?.["map"]((child: any, index) => {
97
97
  const theChildComp = child.getPConnect().getComponentName();
98
98
  const theKey = `.${index}`;
99
99
  return (
@@ -13,7 +13,9 @@ export default function CaseSummary(props: CaseSummaryProps) {
13
13
  const { getPConnect, children } = props;
14
14
  const thePConn = getPConnect();
15
15
  const theConfigProps = thePConn.getConfigProps();
16
- const { status, showStatus } = theConfigProps;
16
+ // const { status, showStatus } = theConfigProps;
17
+ const status = theConfigProps["status"];
18
+ const showStatus = theConfigProps["showStatus"];
17
19
 
18
20
  // from Constellation DX Components
19
21
  // get the primary and secondary fields with the raw data (which has the non-resolved property values)
@@ -23,7 +23,7 @@ export default function InlineDashboardPage(props: InlineDashboardPageProps) {
23
23
  return Children.toArray(children);
24
24
  }, [children]);
25
25
 
26
- const allFilters = getPConnect().getRawMetadata().children[1];
26
+ const allFilters = getPConnect().getRawMetadata()["children"][1];
27
27
 
28
28
  useEffect(() => {
29
29
  setFilterComponents(buildFilterComponents(getPConnect, allFilters));
@@ -6,16 +6,18 @@ import ListView from '@pega/react-sdk-components/lib/components/template/ListVie
6
6
  import { isEmptyObject } from '@pega/react-sdk-components/lib/components/helpers/common-utils';
7
7
  import './PromotedFilters.css';
8
8
 
9
- import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
10
-
11
- interface PromotedFilterProps extends PConnProps {
12
- // If any, enter additional props that only exist on this component
13
- viewName: string,
14
- filters: Array<any>,
15
- listViewProps: any,
16
- pageClass: string,
17
- parameters?: object
18
- }
9
+ // import type { PConnProps } from '../../../types/PConnProps';
10
+
11
+ // Can't use PromotedFilterProps until getContainerManager() knows about addTransientItem
12
+ // Currently just expects "object"
13
+ // interface PromotedFilterProps extends PConnProps {
14
+ // // If any, enter additional props that only exist on this component
15
+ // viewName: string,
16
+ // filters: Array<any>,
17
+ // listViewProps: any,
18
+ // pageClass: string,
19
+ // parameters?: object
20
+ // }
19
21
 
20
22
 
21
23
  const localeCategory = 'SimpleTable';
@@ -65,7 +67,7 @@ function isValidInput(input) {
65
67
  return Object.values(input).findIndex((v) => v) >= 0;
66
68
  }
67
69
 
68
- export default function PromotedFilters(props: PromotedFilterProps) {
70
+ export default function PromotedFilters(props /* : PromotedFilterProps */) {
69
71
  const localizedVal = PCore.getLocaleUtils().getLocaleValue;
70
72
  const { getPConnect, viewName, filters, listViewProps, pageClass, parameters } = props;
71
73
  const [initTable, setInitTable] = useState(false);
@@ -1,18 +1,18 @@
1
1
  import React from 'react';
2
2
  import FieldGroupTemplate from '@pega/react-sdk-components/lib/components/template/FieldGroupTemplate';
3
3
  import SimpleTableManual from '@pega/react-sdk-components/lib/components/template/SimpleTable/SimpleTableManual';
4
- import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
-
6
- interface SimpleTableProps extends PConnProps {
7
- // If any, enter additional props that only exist on this component
8
- multiRecordDisplayAs: string,
9
- allowTableEdit: boolean,
10
- contextClass: any
11
- }
4
+ // import type { PConnProps } from '../../../../types/PConnProps';
12
5
 
6
+ // Can't use SimpleTableProps until getComponentConfig() and getFieldMetadata() are NOT private
7
+ // interface SimpleTableProps extends PConnProps {
8
+ // // If any, enter additional props that only exist on this component
9
+ // multiRecordDisplayAs: string,
10
+ // allowTableEdit: boolean,
11
+ // contextClass: any
12
+ // }
13
13
 
14
14
 
15
- export default function SimpleTable(props: SimpleTableProps) {
15
+ export default function SimpleTable(props /* : SimpleTableProps */) {
16
16
  const { getPConnect, multiRecordDisplayAs, allowTableEdit } = props;
17
17
 
18
18
  let { contextClass } = props;
@@ -150,7 +150,7 @@ export default function SimpleTableManual(props: SimpleTableManualProps) {
150
150
  // config.datasource (ex: "@ASSOCIATED .DeclarantChoice")
151
151
  // Neither of these appear in the resolved props
152
152
 
153
- const rawConfig = rawMetadata?.config;
153
+ const rawConfig = rawMetadata?.["config"];
154
154
  const rawFields =
155
155
  rawConfig?.children?.[0]?.children || rawConfig?.presets?.[0].children?.[0]?.children;
156
156
 
@@ -44,7 +44,7 @@ export default function Attachment(props /* :AttachmentProps */) {
44
44
  categoryName = value.pyCategoryName;
45
45
  }
46
46
 
47
- let valueRef = pConn.getStateProps().value;
47
+ let valueRef = pConn.getStateProps()["value"];
48
48
  valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;
49
49
  const [file, setFile] = useState(fileTemp);
50
50
 
@@ -254,7 +254,7 @@ export default function Attachment(props /* :AttachmentProps */) {
254
254
  }
255
255
  );
256
256
  }
257
- const fieldName = pConn.getStateProps().value;
257
+ const fieldName = pConn.getStateProps()["value"];
258
258
  const context = pConn.getContextName();
259
259
 
260
260
  PCore.getMessageManager().clearMessages({