@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
@@ -1,23 +1,23 @@
1
1
  import React, { useMemo, useState, useEffect } from 'react';
2
2
  import SingleReferenceReadonly from '@pega/react-sdk-components/lib/components/template/SingleReferenceReadOnly';
3
3
  import MultiReferenceReadonly from '@pega/react-sdk-components/lib/components/template/MultiReferenceReadOnly';
4
- // import type { PConnProps } from '../../../types/PConnProps';
4
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
5
 
6
- // Can't use PConn props until proper props for getPConnect().getChildren()[0].getPConnect;
7
- // interface DataReferenceProps extends PConnProps {
8
- // // If any, enter additional props that only exist on this component
9
- // children: Array<any>,
10
- // label: string,
11
- // showLabel: any,
12
- // displayMode: string,
13
- // allowAndPersistChangesInReviewMode: boolean,
14
- // referenceType: string,
15
- // selectionMode: string,
16
- // displayAs: string,
17
- // ruleClass: string,
18
- // parameters: Array<string>, // need to fix
19
- // hideLabel: boolean
20
- // }
6
+ // ReferenceProps can't be used until getComponentConfig() is NOT private
7
+ interface DataReferenceProps extends PConnProps {
8
+ // If any, enter additional props that only exist on this component
9
+ children: Array<any>,
10
+ label: string,
11
+ showLabel: any,
12
+ displayMode: string,
13
+ allowAndPersistChangesInReviewMode: boolean,
14
+ referenceType: string,
15
+ selectionMode: string,
16
+ displayAs: string,
17
+ ruleClass: string,
18
+ parameters: Array<string>, // need to fix
19
+ hideLabel: boolean
20
+ }
21
21
 
22
22
 
23
23
  const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
@@ -26,7 +26,7 @@ const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
26
26
  declare const PCore: any;
27
27
 
28
28
 
29
- export default function DataReference(props /* : DataReferenceProps */) {
29
+ export default function DataReference(props: DataReferenceProps) {
30
30
  const {
31
31
  children,
32
32
  getPConnect,
@@ -49,9 +49,9 @@ export default function DataReference(props /* : DataReferenceProps */) {
49
49
  propsToUse.label = '';
50
50
  }
51
51
  const rawViewMetadata = pConn.getRawMetadata();
52
- const viewName = rawViewMetadata.name;
53
- const [firstChildMeta] = rawViewMetadata.children;
54
- const refList = rawViewMetadata.config.referenceList;
52
+ const viewName = rawViewMetadata["name"];
53
+ const [firstChildMeta] = rawViewMetadata["children"];
54
+ const refList = rawViewMetadata["config"].referenceList;
55
55
  const canBeChangedInReviewMode = allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');
56
56
  let propName;
57
57
  const isDisplayModeEnabled = ['LABELS_LEFT', 'STACKED_LARGE_VAL'].includes(displayMode);
@@ -61,7 +61,7 @@ export default function DataReference(props /* : DataReferenceProps */) {
61
61
  useEffect(() => {
62
62
  if (
63
63
  firstChildMeta?.type === "Dropdown" &&
64
- rawViewMetadata.config?.parameters
64
+ rawViewMetadata["config"]?.parameters
65
65
  ) {
66
66
  const { value, key, text } = firstChildMeta.config.datasource.fields;
67
67
  PCore.getDataApiUtils()
@@ -101,14 +101,14 @@ export default function DataReference(props /* : DataReferenceProps */) {
101
101
  delete firstChildMeta.config.readOnly;
102
102
  }
103
103
  if (firstChildMeta?.type === 'Dropdown') {
104
- firstChildMeta.config.datasource.source = rawViewMetadata.config?.parameters
104
+ firstChildMeta.config.datasource.source = rawViewMetadata["config"]?.parameters
105
105
  ? dropDownDataSource
106
106
  : '@DATASOURCE '.concat(refList).concat('.pxResults');
107
107
  } else if (firstChildMeta?.type === 'AutoComplete') {
108
108
  firstChildMeta.config.datasource = refList;
109
109
 
110
110
  /* Insert the parameters to the component only if present */
111
- if (rawViewMetadata.config?.parameters) {
111
+ if (rawViewMetadata["config"]?.parameters) {
112
112
  firstChildMeta.config.parameters = parameters;
113
113
  }
114
114
  }
@@ -187,8 +187,10 @@ export default function DataReference(props /* : DataReferenceProps */) {
187
187
  const recreatedFirstChild = useMemo(() => {
188
188
  const { type, config } = firstChildMeta;
189
189
  if (firstChildMeta?.type !== 'Region') {
190
- pConn.clearErrorMessages({
191
- property: propName
190
+ pConn.clearErrorMessages({ // Need to add empty string for category and context to match typdef
191
+ property: propName,
192
+ category: '',
193
+ context: ''
192
194
  });
193
195
  if (!canBeChangedInReviewMode && isDisplayModeEnabled && selectionMode === SELECTION_MODE.SINGLE) {
194
196
  return (
@@ -203,7 +205,7 @@ export default function DataReference(props /* : DataReferenceProps */) {
203
205
  referenceType={referenceType}
204
206
  hideLabel={hideLabel}
205
207
  dataRelationshipContext={
206
- rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null
208
+ rawViewMetadata["config"].contextClass && rawViewMetadata["config"].name ? rawViewMetadata["config"].name : null
207
209
  }
208
210
  />
209
211
  );
@@ -223,7 +225,7 @@ export default function DataReference(props /* : DataReferenceProps */) {
223
225
  // In the case of a datasource with parameters you cannot load the dropdown before the parameters
224
226
  if (
225
227
  type === 'Dropdown' &&
226
- rawViewMetadata.config?.parameters &&
228
+ rawViewMetadata["config"]?.parameters &&
227
229
  dropDownDataSource === null
228
230
  ) {
229
231
  return null;
@@ -238,19 +240,19 @@ export default function DataReference(props /* : DataReferenceProps */) {
238
240
  disabled: propsToUse.disabled,
239
241
  label: propsToUse.label,
240
242
  viewName: getPConnect().getCurrentView(),
241
- parameters: rawViewMetadata.config.parameters,
243
+ parameters: rawViewMetadata["config"].parameters,
242
244
  readOnly: false,
243
- localeReference: rawViewMetadata.config.localeReference,
245
+ localeReference: rawViewMetadata["config"].localeReference,
244
246
  ...(selectionMode === SELECTION_MODE.SINGLE ? { referenceType } : ''),
245
247
  dataRelationshipContext:
246
- rawViewMetadata.config.contextClass && rawViewMetadata.config.name
247
- ? rawViewMetadata.config.name
248
+ rawViewMetadata["config"].contextClass && rawViewMetadata["config"].name
249
+ ? rawViewMetadata["config"].name
248
250
  : null,
249
251
  hideLabel,
250
252
  onRecordChange: handleSelection
251
- }
253
+ },
252
254
  },
253
- null, null, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;);
255
+ '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
254
256
  }
255
257
  }, [
256
258
  firstChildMeta.config?.datasource?.source,
@@ -262,7 +264,7 @@ export default function DataReference(props /* : DataReferenceProps */) {
262
264
 
263
265
  // Only include the views region for rendering when it has content
264
266
  if (firstChildMeta?.type !== 'Region') {
265
- const viewsRegion = rawViewMetadata.children[1];
267
+ const viewsRegion = rawViewMetadata["children"][1];
266
268
  if (viewsRegion?.name === 'Views' && viewsRegion.children.length) {
267
269
  childrenToRender = [recreatedFirstChild, ...children.slice(1)];
268
270
  } else {
@@ -45,7 +45,7 @@ export default function Details(props /* : DetailsProps */) {
45
45
  }
46
46
 
47
47
  return getPConnect().createComponent(field,
48
- '','', {}); // 2nd, 3rd, and 4th args empty string/object until typedef marked correctly as optional;);
48
+ '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
49
49
  });
50
50
  }
51
51
 
@@ -47,7 +47,7 @@ export default function DetailsThreeColumn(props /* : DetailsThreeColumnProps */
47
47
  }
48
48
 
49
49
  return getPConnect().createComponent(field,
50
- null, null, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
50
+ '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
51
51
  });
52
52
  }
53
53
 
@@ -48,7 +48,7 @@ export default function DetailsTwoColumn(props /* : DetailsTwoColumnProps */) {
48
48
  }
49
49
 
50
50
  return getPConnect().createComponent(field,
51
- null, null, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
51
+ '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
52
52
  });
53
53
  }
54
54
 
@@ -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));
@@ -29,7 +29,7 @@ export default function MultiReferenceReadOnly(props: MultiReferenceReadOnlyProp
29
29
  hideLabel
30
30
  }
31
31
  },
32
- null, null, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
32
+ '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
33
33
 
34
34
  return (
35
35
  <React.Fragment>{component}</React.Fragment>
@@ -50,7 +50,7 @@ export default function NarrowWideDetails(props /* : NarrowWideDetailsProps */)
50
50
  }
51
51
 
52
52
  return getPConnect().createComponent(field,
53
- null, null, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
53
+ '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
54
54
  });
55
55
  }
56
56
 
@@ -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
 
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
2
  import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
3
3
 
4
- // Need to fix an error noted in comment below before typedefs will work correctly
5
4
  interface SingleReferenceReadOnlyProps extends PConnProps {
6
5
  // If any, enter additional props that only exist on this component
7
6
  config: any,
@@ -56,7 +55,7 @@ export default function SingleReferenceReadOnly(props: SingleReferenceReadOnlyPr
56
55
  dataRelationshipContext
57
56
  }
58
57
  },
59
- null, null, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
58
+ '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
60
59
 
61
60
  return (
62
61
  <React.Fragment>{component}</React.Fragment>
@@ -5,7 +5,7 @@ import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react
5
5
  import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
6
6
  // import type { PConnProps } from '../../../../types/PConnProps';
7
7
 
8
- // Can't use PConnProps until getPConnect.getChildren() type is ok
8
+ // Can't use PConnProps until PConnect.getChildren() type is ok
9
9
  // interface WideNarrowDetailsProps extends PConnProps {
10
10
  // // If any, enter additional props that only exist on this component
11
11
  // showLabel?: boolean,
@@ -43,7 +43,7 @@ export default function WideNarrowDetails(props /* : WideNarrowDetailsProps */)
43
43
  // Set up highlighted data to pass in return if is set to show, need raw metadata to pass to createComponent
44
44
  let highlightedDataArr = [];
45
45
  if (showHighlightedData) {
46
- const { highlightedData = [] } = getPConnect().getRawMetadata()["config"];
46
+ const { highlightedData = [] } = getPConnect().getRawMetadata().config;
47
47
  highlightedDataArr = highlightedData.map(field => {
48
48
  field.config.displayMode = 'STACKED_LARGE_VAL';
49
49
 
@@ -54,7 +54,7 @@ export default function WideNarrowDetails(props /* : WideNarrowDetailsProps */)
54
54
  }
55
55
 
56
56
  return getPConnect().createComponent(field,
57
- null, null, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
57
+ '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
58
58
  });
59
59
  }
60
60
 
@@ -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({