@pega/dx-component-builder-sdk 24.2.13 → 24.2.15

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 (128) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/index.tsx.mustache +1 -1
  3. package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +7 -4
  4. package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/index.tsx.mustache +3 -2
  5. package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +1 -0
  6. package/src/tasks/publish/helper.js +1 -1
  7. package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/demo.stories.tsx +0 -1
  8. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +2 -2
  9. package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +4 -4
  10. package/tests/assets/sdk-r/components/create/override-sdk/field/CancelAlert/CancelAlert.tsx +1 -4
  11. package/tests/assets/sdk-r/components/create/override-sdk/field/Currency/Currency.tsx +8 -5
  12. package/tests/assets/sdk-r/components/create/override-sdk/field/Date/Date.tsx +5 -1
  13. package/tests/assets/sdk-r/components/create/override-sdk/field/DateTime/DateTime.tsx +13 -5
  14. package/tests/assets/sdk-r/components/create/override-sdk/field/Decimal/Decimal.tsx +7 -2
  15. package/tests/assets/sdk-r/components/create/override-sdk/field/Dropdown/Dropdown.tsx +34 -24
  16. package/tests/assets/sdk-r/components/create/override-sdk/field/Percentage/Percentage.tsx +6 -2
  17. package/tests/assets/sdk-r/components/create/override-sdk/field/RadioButtons/RadioButtons.tsx +3 -5
  18. package/tests/assets/sdk-r/components/create/override-sdk/field/ScalarList/ScalarList.tsx +1 -2
  19. package/tests/assets/sdk-r/components/create/override-sdk/field/Time/Time.tsx +1 -1
  20. package/tests/assets/sdk-r/components/create/override-sdk/field/UserReference/UserReference.tsx +1 -3
  21. package/tests/assets/sdk-r/components/create/override-sdk/infra/Assignment/Assignment.tsx +2 -6
  22. package/tests/assets/sdk-r/components/create/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +2 -3
  23. package/tests/assets/sdk-r/components/create/override-sdk/infra/DashboardFilter/filterUtils.tsx +1 -3
  24. package/tests/assets/sdk-r/components/create/override-sdk/infra/DeferLoad/DeferLoad.tsx +5 -5
  25. package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/FlowContainer.tsx +18 -108
  26. package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/helpers.ts +1 -5
  27. package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +3 -1
  28. package/tests/assets/sdk-r/components/create/override-sdk/infra/MultiStep/MultiStep.tsx +1 -6
  29. package/tests/assets/sdk-r/components/create/override-sdk/infra/RootContainer/RootContainer.tsx +1 -1
  30. package/tests/assets/sdk-r/components/create/override-sdk/infra/SimpleView/helper.ts +1 -1
  31. package/tests/assets/sdk-r/components/create/override-sdk/template/AppShell/AppShell.tsx +6 -6
  32. package/tests/assets/sdk-r/components/create/override-sdk/template/CaseView/CaseView.tsx +5 -4
  33. package/tests/assets/sdk-r/components/create/override-sdk/template/Confirmation/Confirmation.tsx +1 -1
  34. package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/DynamicTabs.tsx +0 -1
  35. package/tests/assets/sdk-r/components/create/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +10 -5
  36. package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/ListView.tsx +13 -9
  37. package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/hooks.ts +2 -0
  38. package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/utils.ts +0 -1
  39. package/tests/assets/sdk-r/components/create/override-sdk/template/PromotedFilters/PromotedFilters.tsx +0 -1
  40. package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTable/SimpleTable.tsx +0 -2
  41. package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +111 -94
  42. package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableSelect/SimpleTableSelect.tsx +2 -4
  43. package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.css +1 -0
  44. package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.tsx +91 -73
  45. package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.tsx +1 -1
  46. package/tests/assets/sdk-r/components/create/override-sdk/widget/QuickCreate/QuickCreate.tsx +0 -1
  47. package/tests/assets/sdk-r/components/create/override-sdk/widget/SummaryItem/SummaryItem.tsx +1 -1
  48. package/tests/assets/sdk-r/components/create/override-sdk/widget/ToDo/ToDo.tsx +1 -1
  49. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/demo.stories.tsx +0 -1
  50. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/demo.stories.tsx +0 -16
  51. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/demo.stories.tsx +0 -17
  52. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/demo.stories.tsx +0 -1
  53. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/demo.stories.tsx +0 -1
  54. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/mock.ts +1 -0
  55. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +9 -20
  56. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/demo.stories.tsx +0 -1
  57. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/demo.stories.tsx +0 -1
  58. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/mock.ts +1 -0
  59. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/demo.stories.tsx +1 -2
  60. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/demo.stories.tsx +0 -1
  61. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/demo.stories.tsx +0 -1
  62. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/demo.stories.tsx +0 -1
  63. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/demo.stories.tsx +0 -1
  64. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/demo.stories.tsx +0 -1
  65. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +0 -1
  66. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/demo.stories.tsx +0 -1
  67. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/demo.stories.tsx +10 -0
  68. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/demo.stories.tsx +1 -13
  69. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +10 -32
  70. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +10 -22
  71. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +10 -21
  72. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/demo.stories.tsx +0 -14
  73. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.tsx +0 -24
  74. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +0 -24
  75. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/demo.stories.tsx +0 -14
  76. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +2 -6
  77. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/index.tsx +1 -1
  78. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/demo.stories.tsx +0 -14
  79. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +7 -4
  80. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/index.tsx +3 -2
  81. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/demo.stories.tsx +8 -28
  82. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.tsx +10 -16
  83. package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +8 -28
  84. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +10 -20
  85. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +10 -20
  86. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +1 -0
  87. package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +9 -19
  88. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +2 -2
  89. package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/RichTextEditor/RichTextEditor.tsx +4 -4
  90. package/tests/assets/sdk-r/components/createAll/override-sdk/field/CancelAlert/CancelAlert.tsx +1 -4
  91. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Currency/Currency.tsx +8 -5
  92. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Date/Date.tsx +5 -1
  93. package/tests/assets/sdk-r/components/createAll/override-sdk/field/DateTime/DateTime.tsx +13 -5
  94. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Decimal/Decimal.tsx +7 -2
  95. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Dropdown/Dropdown.tsx +34 -24
  96. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Percentage/Percentage.tsx +6 -2
  97. package/tests/assets/sdk-r/components/createAll/override-sdk/field/RadioButtons/RadioButtons.tsx +3 -5
  98. package/tests/assets/sdk-r/components/createAll/override-sdk/field/ScalarList/ScalarList.tsx +1 -2
  99. package/tests/assets/sdk-r/components/createAll/override-sdk/field/Time/Time.tsx +1 -1
  100. package/tests/assets/sdk-r/components/createAll/override-sdk/field/UserReference/UserReference.tsx +1 -3
  101. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Assignment/Assignment.tsx +2 -6
  102. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +2 -3
  103. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DashboardFilter/filterUtils.tsx +1 -3
  104. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +5 -5
  105. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/FlowContainer.tsx +18 -108
  106. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/helpers.ts +1 -5
  107. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +3 -1
  108. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/MultiStep/MultiStep.tsx +1 -6
  109. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/RootContainer/RootContainer.tsx +1 -1
  110. package/tests/assets/sdk-r/components/createAll/override-sdk/infra/SimpleView/helper.ts +1 -1
  111. package/tests/assets/sdk-r/components/createAll/override-sdk/template/AppShell/AppShell.tsx +6 -6
  112. package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseView/CaseView.tsx +5 -4
  113. package/tests/assets/sdk-r/components/createAll/override-sdk/template/Confirmation/Confirmation.tsx +1 -1
  114. package/tests/assets/sdk-r/components/createAll/override-sdk/template/DynamicTabs/DynamicTabs.tsx +0 -1
  115. package/tests/assets/sdk-r/components/createAll/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +10 -5
  116. package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/ListView.tsx +13 -9
  117. package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/hooks.ts +2 -0
  118. package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/utils.ts +0 -1
  119. package/tests/assets/sdk-r/components/createAll/override-sdk/template/PromotedFilters/PromotedFilters.tsx +0 -1
  120. package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTable/SimpleTable.tsx +0 -2
  121. package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +111 -94
  122. package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableSelect/SimpleTableSelect.tsx +2 -4
  123. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.css +1 -0
  124. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.tsx +91 -73
  125. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +1 -1
  126. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/QuickCreate/QuickCreate.tsx +0 -1
  127. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/SummaryItem/SummaryItem.tsx +1 -1
  128. package/tests/assets/sdk-r/components/createAll/override-sdk/widget/ToDo/ToDo.tsx +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/dx-component-builder-sdk",
3
- "version": "24.2.13",
3
+ "version": "24.2.15",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -119,7 +119,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
119
119
  {{=<% %>=}}
120
120
  <div style={{ display: 'flex', alignItems: 'center' }} data-testid={testId}>
121
121
  <ArrowForwardIcon />
122
- <TextContent displayAs='body' content={localLabel} />
122
+ <TextContent displayAs='paragraph' content={localLabel} />
123
123
  <Tooltip title={PConnect.getLocalizedValue('Click to show/hide state list', '', '')}>
124
124
  <IconButton onClick={showHideTable} style={{ padding: '0 0.25rem' }}>
125
125
  <FormatListNumberedIcon />
@@ -100,6 +100,11 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
100
100
  const className = thePConn.getCaseInfo().getClassName();
101
101
  const refName = propName?.slice(propName.lastIndexOf('.') + 1);
102
102
 
103
+ const getPlaceholderOption = () => ({
104
+ key: placeholder,
105
+ value: thePConn.getLocalizedValue(placeholder)
106
+ });
107
+
103
108
  if (!isDeepEqual(datasource, theDatasource)) {
104
109
  // inbound datasource is different, so update theDatasource (to trigger useEffect)
105
110
  setDatasource(datasource);
@@ -134,10 +139,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
134
139
  if (theDatasource) {
135
140
  const list = Utils.getOptionList(props, getPConnect().getDataObject('')); // 1st arg empty string until typedef marked correctly
136
141
  const optionsList = [...list];
137
- optionsList.unshift({
138
- key: placeholder,
139
- value: thePConn.getLocalizedValue(placeholder)
140
- }); // 2nd and 3rd args empty string until typedef marked correctly
142
+ optionsList.unshift(getPlaceholderOption());
141
143
  setOptions(optionsList);
142
144
  }
143
145
  }, [theDatasource]);
@@ -147,6 +149,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
147
149
  getDataPage(datasource, parameters, context).then((results: any) => {
148
150
  const optionsData: any[] = [];
149
151
  const displayColumn = getDisplayFieldsMetaData(columns);
152
+ optionsData.unshift(getPlaceholderOption());
150
153
  results?.forEach(element => {
151
154
  const val = element[displayColumn.primary]?.toString();
152
155
  const obj = {
@@ -34,7 +34,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
34
34
  inline,
35
35
  displayMode,
36
36
  hideLabel,
37
- fieldMetadata
37
+ fieldMetadata,
38
+ disabled
38
39
  } = props;
39
40
  const [theSelectedButton, setSelectedButton] = useState(value);
40
41
 
@@ -108,7 +109,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
108
109
  localePath,
109
110
  thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
110
111
  )}
111
- control={<Radio key={theOption.key} color='primary' disabled={readOnly} />}
112
+ control={<Radio key={theOption.key} color='primary' disabled={readOnly || disabled} />}
112
113
  />
113
114
  );
114
115
  })}
@@ -207,6 +207,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
207
207
  <TextField
208
208
  defaultValue={caseOpName}
209
209
  label={caseOpLabel}
210
+ variant='standard'
210
211
  onClick={showOperatorDetails}
211
212
  InputProps={{
212
213
  readOnly: true,
@@ -228,7 +228,7 @@ export const publishComponentToServer = async (data, doFetch = true) => {
228
228
 
229
229
  const configContentObj = JSON.parse(configContent);
230
230
 
231
- if (configContentObj.type == null || configContentObj.subtype == null) {
231
+ if (!configContentObj.type) {
232
232
  console.log(chalk.bold.yellow(`No config-ext to publish for ${componentKey}`));
233
233
  return;
234
234
  }
@@ -1,6 +1,5 @@
1
1
 
2
2
  /* eslint-disable react/jsx-no-useless-fragment */
3
- // @ts-nocheck
4
3
  import { useState } from 'react';
5
4
  import type { Meta, StoryObj } from '@storybook/react';
6
5
 
@@ -63,7 +63,7 @@ export default function FieldValueList(props: FieldValueListProps) {
63
63
  const formattedValue = formatItemValue(value);
64
64
 
65
65
  return (
66
- <Grid item xs={variant === 'stacked' ? 12 : 8} className={variant === 'stacked' ? classes.noPaddingTop : ''}>
66
+ <Grid item xs={variant === 'stacked' || !name ? 12 : 8} className={variant === 'stacked' ? classes.noPaddingTop : ''}>
67
67
  {isHtml ? (
68
68
  // eslint-disable-next-line react/no-danger
69
69
  <div dangerouslySetInnerHTML={{ __html: formattedValue }} />
@@ -78,7 +78,7 @@ export default function FieldValueList(props: FieldValueListProps) {
78
78
 
79
79
  return (
80
80
  <Grid container spacing={4} justifyContent='space-between'>
81
- {getGridItemLabel()}
81
+ {name ? getGridItemLabel() : null}
82
82
  {getGridItemValue()}
83
83
  </Grid>
84
84
  );
@@ -1,6 +1,6 @@
1
1
  import React, { forwardRef } from 'react';
2
2
  import { Editor } from '@tinymce/tinymce-react';
3
- import { FormControl, FormHelperText, InputLabel } from '@mui/material';
3
+ import { FormControl, FormHelperText, FormLabel } from '@mui/material';
4
4
  import makeStyles from '@mui/styles/makeStyles';
5
5
 
6
6
  import { useAfterInitialEffect, useConsolidatedRef, useUID } from '@pega/react-sdk-components/lib/hooks';
@@ -108,11 +108,11 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
108
108
  }
109
109
 
110
110
  return (
111
- <FormControl variant='standard' data-test-id={testId} error={error} required={required}>
111
+ <FormControl variant='standard' data-test-id={testId} error={error} required={required} fullWidth>
112
112
  {!labelHidden && (
113
- <InputLabel id='demo-simple-select-error-label' className={classes.fieldLabel}>
113
+ <FormLabel htmlFor={id} className={classes.fieldLabel}>
114
114
  {label}
115
- </InputLabel>
115
+ </FormLabel>
116
116
  )}
117
117
  {richTextComponent}
118
118
  {info && <FormHelperText>{info}</FormHelperText>}
@@ -58,14 +58,12 @@ export default function CancelAlert(props: CancelAlertProps) {
58
58
  function cancelHandler() {
59
59
  if (isReverseCoexistence) {
60
60
  dismiss(true);
61
- // @ts-ignore - An argument for 'payload' was not provided.
62
61
  PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD);
63
62
  } else if (!isDataObject && !isLocalAction && !isBulkAction) {
64
63
  disableButton(btnIds.DELETE);
65
64
  actionsAPI
66
65
  .deleteCaseInCreateStage(containerItemID, hideDelete)
67
66
  .then(() => {
68
- // @ts-ignore - An argument for 'payload' was not provided.
69
67
  PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL);
70
68
  })
71
69
  .catch(() => {
@@ -78,13 +76,12 @@ export default function CancelAlert(props: CancelAlertProps) {
78
76
  });
79
77
  } else if (isLocalAction) {
80
78
  dismiss(true);
81
- actionsAPI.cancelAssignment(containerItemID);
79
+ actionsAPI.cancelAssignment(containerItemID, false);
82
80
  } else if (isBulkAction) {
83
81
  dismiss(true);
84
82
  actionsAPI.cancelBulkAction(containerItemID);
85
83
  } else {
86
84
  dismiss(true);
87
- // @ts-ignore - Argument of type '{ containerItemID: string; skipReleaseLockRequest: any; }' is not assignable to parameter of type 'ContainerInfo'.
88
85
  containerManagerAPI.removeContainerItem({ containerItemID, skipReleaseLockRequest });
89
86
  }
90
87
  }
@@ -1,4 +1,4 @@
1
- import { useState } from 'react';
1
+ import { useEffect, useState } from 'react';
2
2
  import { NumericFormat } from 'react-number-format';
3
3
  import { TextField } from '@mui/material';
4
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
@@ -45,9 +45,11 @@ export default function Currency(props: CurrrencyProps) {
45
45
  const helperTextToDisplay = validatemessage || helperText;
46
46
  const [values, setValues] = useState(value.toString());
47
47
 
48
- const testProp = {
49
- 'data-test-id': testId
50
- };
48
+ const testProp = { 'data-test-id': testId };
49
+
50
+ useEffect(() => {
51
+ setValues(value.toString());
52
+ }, [value]);
51
53
 
52
54
  // currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }
53
55
  const theSymbols = getCurrencyCharacters(currencyISOCode);
@@ -56,7 +58,7 @@ export default function Currency(props: CurrrencyProps) {
56
58
  const theCurrSep = theSymbols.theDigitGroupSeparator;
57
59
 
58
60
  const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
59
- const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
61
+ const formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);
60
62
 
61
63
  let readOnlyProp = {}; // Note: empty if NOT ReadOnly
62
64
 
@@ -86,6 +88,7 @@ export default function Currency(props: CurrrencyProps) {
86
88
  return (
87
89
  <NumericFormat
88
90
  valueIsNumericString
91
+ variant={readOnly ? 'standard' : 'outlined'}
89
92
  label={label}
90
93
  helperText={helperTextToDisplay}
91
94
  placeholder={placeholder ?? ''}
@@ -1,4 +1,4 @@
1
- import { useState } from 'react';
1
+ import { useEffect, useState } from 'react';
2
2
  import { DatePicker } from '@mui/x-date-pickers/DatePicker';
3
3
  import dayjs, { Dayjs } from 'dayjs';
4
4
 
@@ -39,6 +39,10 @@ export default function Date(props: DateProps) {
39
39
  dateFormatInfo.dateFormatStringLC = theDateFormat.dateFormatStringLC;
40
40
  dateFormatInfo.dateFormatMask = theDateFormat.dateFormatMask;
41
41
 
42
+ useEffect(() => {
43
+ setDateValue(dayjs(value));
44
+ }, [value]);
45
+
42
46
  if (displayMode === 'DISPLAY_ONLY') {
43
47
  const formattedDate = format(props.value, 'date', {
44
48
  format: dateFormatInfo.dateFormatString
@@ -1,7 +1,7 @@
1
- import { useState } from 'react';
1
+ import { useEffect, useState } from 'react';
2
2
  import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
3
3
  import dayjs, { Dayjs } from 'dayjs';
4
-
4
+ import DateFormatter from '@pega/react-sdk-components/lib/components/helpers/formatters/Date';
5
5
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
6
6
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
7
7
  import { dateFormatInfoDefault, getDateFormatInfo } from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
@@ -19,7 +19,10 @@ export default function DateTime(props: DateTimeProps) {
19
19
 
20
20
  const { getPConnect, label, required, disabled, value = '', validatemessage, status, readOnly, testId, helperText, displayMode, hideLabel } = props;
21
21
 
22
- const [dateValue, setDateValue] = useState<Dayjs | null>(value ? dayjs(value) : null);
22
+ const environmentInfo = PCore.getEnvironmentInfo();
23
+ const timezone = environmentInfo && environmentInfo.getTimeZone();
24
+
25
+ const [dateValue, setDateValue] = useState<Dayjs | null>(value ? dayjs(DateFormatter.convertToTimezone(value, { timezone })) : null);
23
26
 
24
27
  const pConn = getPConnect();
25
28
  const actions = pConn.getActionsApi();
@@ -34,6 +37,10 @@ export default function DateTime(props: DateTimeProps) {
34
37
  dateFormatInfo.dateFormatStringLC = theDateFormat.dateFormatStringLC;
35
38
  dateFormatInfo.dateFormatMask = theDateFormat.dateFormatMask;
36
39
 
40
+ useEffect(() => {
41
+ setDateValue(dayjs(DateFormatter.convertToTimezone(value, { timezone })));
42
+ }, [value]);
43
+
37
44
  if (displayMode === 'DISPLAY_ONLY') {
38
45
  const formattedDateTime = format(props.value, 'datetime', {
39
46
  format: `${dateFormatInfo.dateFormatString} hh:mm a`
@@ -60,8 +67,9 @@ export default function DateTime(props: DateTimeProps) {
60
67
  };
61
68
 
62
69
  const handleChange = date => {
63
- setDateValue(date);
64
- const changeValue = date && date.isValid() ? date.toISOString() : null;
70
+ const timeZoneDateTime = (dayjs as any).tz(date.format('YYYY-MM-DDTHH:mm:ss'), timezone);
71
+ const changeValue = timeZoneDateTime && timeZoneDateTime.isValid() ? timeZoneDateTime.toISOString() : '';
72
+ setDateValue(timeZoneDateTime);
65
73
  handleEvent(actions, 'changeNblur', propName, changeValue);
66
74
  };
67
75
 
@@ -1,6 +1,6 @@
1
1
  import { NumericFormat } from 'react-number-format';
2
2
  import { TextField } from '@mui/material';
3
- import { useState } from 'react';
3
+ import { useEffect, useState } from 'react';
4
4
  import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils';
5
5
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
6
6
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
@@ -58,6 +58,10 @@ export default function Decimal(props: DecimalProps) {
58
58
 
59
59
  const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
60
60
 
61
+ useEffect(() => {
62
+ setValues(value.toString());
63
+ }, [value]);
64
+
61
65
  let readOnlyProp = {}; // Note: empty if NOT ReadOnly
62
66
 
63
67
  if (readOnly) {
@@ -68,7 +72,7 @@ export default function Decimal(props: DecimalProps) {
68
72
  if (formatter === 'Currency') {
69
73
  formattedValue = format(value, formatter.toLowerCase(), theCurrencyOptions);
70
74
  } else {
71
- formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
75
+ formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);
72
76
  }
73
77
 
74
78
  if (displayMode === 'DISPLAY_ONLY') {
@@ -109,6 +113,7 @@ export default function Decimal(props: DecimalProps) {
109
113
  }}
110
114
  onBlur={!readOnly ? decimalOnBlur : undefined}
111
115
  prefix={readOnly && formatter === 'Currency' ? theCurrSym : ''}
116
+ suffix={readOnly && formatter === 'Percentage' ? '%' : ''}
112
117
  decimalSeparator={theCurrDec}
113
118
  thousandSeparator={showGroupSeparators ? theCurrSep : ''}
114
119
  decimalScale={readOnly && formatter === 'Currency' ? undefined : decimalPrecision}
@@ -94,6 +94,11 @@ export default function Dropdown(props: DropdownProps) {
94
94
  const className = thePConn.getCaseInfo().getClassName();
95
95
  const refName = propName?.slice(propName.lastIndexOf('.') + 1);
96
96
 
97
+ const getPlaceholderOption = () => ({
98
+ key: placeholder,
99
+ value: thePConn.getLocalizedValue(placeholder)
100
+ });
101
+
97
102
  if (!isDeepEqual(datasource, theDatasource)) {
98
103
  // inbound datasource is different, so update theDatasource (to trigger useEffect)
99
104
  setDatasource(datasource);
@@ -128,19 +133,17 @@ export default function Dropdown(props: DropdownProps) {
128
133
  if (theDatasource) {
129
134
  const list = Utils.getOptionList(props, getPConnect().getDataObject('')); // 1st arg empty string until typedef marked correctly
130
135
  const optionsList = [...list];
131
- optionsList.unshift({
132
- key: placeholder,
133
- value: thePConn.getLocalizedValue(placeholder, '', '')
134
- }); // 2nd and 3rd args empty string until typedef marked correctly
136
+ optionsList.unshift(getPlaceholderOption());
135
137
  setOptions(optionsList);
136
138
  }
137
139
  }, [theDatasource]);
138
140
 
139
141
  useEffect(() => {
140
- if (!displayMode && listType !== 'associated' && typeof datasource === 'string') {
142
+ if (listType !== 'associated' && typeof datasource === 'string') {
141
143
  getDataPage(datasource, parameters, context).then((results: any) => {
142
144
  const optionsData: any[] = [];
143
145
  const displayColumn = getDisplayFieldsMetaData(columns);
146
+ optionsData.push(getPlaceholderOption());
144
147
  results?.forEach(element => {
145
148
  const val = element[displayColumn.primary]?.toString();
146
149
  const obj = {
@@ -165,25 +168,33 @@ export default function Dropdown(props: DropdownProps) {
165
168
 
166
169
  let readOnlyProp = {};
167
170
 
168
- if (displayMode === 'DISPLAY_ONLY') {
169
- return (
170
- <FieldValueList
171
- name={hideLabel ? '' : label}
172
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
173
- value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
174
- />
175
- );
176
- }
171
+ const displayFn = (displayM, val) => {
172
+ if (displayM === 'DISPLAY_ONLY') {
173
+ return (
174
+ <FieldValueList
175
+ name={hideLabel ? '' : label}
176
+ // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
177
+ value={thePConn.getLocalizedValue(val, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
178
+ />
179
+ );
180
+ }
181
+
182
+ if (displayM === 'STACKED_LARGE_VAL') {
183
+ return (
184
+ <FieldValueList
185
+ name={hideLabel ? '' : label}
186
+ // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
187
+ value={thePConn.getLocalizedValue(val, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
188
+ variant='stacked'
189
+ />
190
+ );
191
+ }
192
+
193
+ return null;
194
+ };
177
195
 
178
- if (displayMode === 'STACKED_LARGE_VAL') {
179
- return (
180
- <FieldValueList
181
- name={hideLabel ? '' : label}
182
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
183
- value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
184
- variant='stacked'
185
- />
186
- );
196
+ if (displayMode) {
197
+ return displayFn(displayMode, options.find(option => option.key === value)?.value || value);
187
198
  }
188
199
 
189
200
  if (readOnly) {
@@ -224,7 +235,6 @@ export default function Dropdown(props: DropdownProps) {
224
235
  >
225
236
  {options.map((option: any) => (
226
237
  <MenuItem key={option.key} value={option.key}>
227
- {/* @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv' */}
228
238
  {thePConn.getLocalizedValue(option.value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
229
239
  </MenuItem>
230
240
  ))}
@@ -1,4 +1,4 @@
1
- import { useState } from 'react';
1
+ import { useEffect, useState } from 'react';
2
2
  import { NumericFormat } from 'react-number-format';
3
3
  import { TextField } from '@mui/material';
4
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
@@ -50,7 +50,11 @@ export default function Percentage(props: PercentageProps) {
50
50
  const helperTextToDisplay = validatemessage || helperText;
51
51
 
52
52
  const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
53
- const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
53
+ const formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);
54
+
55
+ useEffect(() => {
56
+ setValues(value.toString());
57
+ }, [value]);
54
58
 
55
59
  let readOnlyProp = {}; // Note: empty if NOT ReadOnly
56
60
 
@@ -29,7 +29,8 @@ export default function RadioButtons(props: RadioButtonsProps) {
29
29
  inline,
30
30
  displayMode,
31
31
  hideLabel,
32
- fieldMetadata
32
+ fieldMetadata,
33
+ disabled
33
34
  } = props;
34
35
  const [theSelectedButton, setSelectedButton] = useState(value);
35
36
 
@@ -65,7 +66,6 @@ export default function RadioButtons(props: RadioButtonsProps) {
65
66
  return (
66
67
  <FieldValueList
67
68
  name={hideLabel ? '' : label}
68
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
69
69
  value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
70
70
  />
71
71
  );
@@ -75,7 +75,6 @@ export default function RadioButtons(props: RadioButtonsProps) {
75
75
  return (
76
76
  <FieldValueList
77
77
  name={hideLabel ? '' : label}
78
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
79
78
  value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
80
79
  variant='stacked'
81
80
  />
@@ -102,10 +101,9 @@ export default function RadioButtons(props: RadioButtonsProps) {
102
101
  label={thePConn.getLocalizedValue(
103
102
  theOption.value,
104
103
  localePath,
105
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
106
104
  thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
107
105
  )}
108
- control={<Radio key={theOption.key} color='primary' disabled={readOnly} />}
106
+ control={<Radio key={theOption.key} color='primary' disabled={readOnly || disabled} />}
109
107
  />
110
108
  );
111
109
  })}
@@ -36,16 +36,15 @@ export default function ScalarList(props: ScalarListProps) {
36
36
  {
37
37
  type: componentType,
38
38
  config: {
39
- // @ts-ignore - Type '{ readOnly: true; displayInModal: boolean; value: any; displayMode: string; label: string; }' is not assignable to type 'ComponentMetadataConfig'.
40
39
  value: scalarValue,
41
40
  displayMode: 'DISPLAY_ONLY',
42
41
  label,
43
42
  ...restProps,
44
- // @ts-ignore - Type 'string' is not assignable to type 'boolean | undefined'.
45
43
  readOnly: 'true'
46
44
  }
47
45
  },
48
46
  '',
47
+ // @ts-ignore
49
48
  '',
50
49
  {}
51
50
  ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
@@ -39,7 +39,7 @@ export default function Time(props: TimeProps) {
39
39
  };
40
40
 
41
41
  const handleChange = date => {
42
- const theValue = date && date.isValid() ? date.format('HH:mm') : null;
42
+ const theValue = date && date.isValid() ? date.format('HH:mm:ss') : null;
43
43
  handleEvent(actions, 'changeNblur', propName, theValue);
44
44
  };
45
45
 
@@ -80,10 +80,8 @@ const UserReference = (props: UserReferenceProps) => {
80
80
  };
81
81
 
82
82
  PCore.getRestClient()
83
- // @ts-ignore - Argument of type '{ queryPayload: { dataViewName: string; }; }' is not assignable to parameter of type 'RestApiOptionsObject'
84
- // @ts-ignore - Expected 3 arguments, but got 2
85
83
  .invokeRestApi('getListData', { queryPayload })
86
- .then((res: any) => {
84
+ .then(res => {
87
85
  const ddDataSource = res.data.data.map(listItem => ({
88
86
  key: listItem.pyUserIdentifier,
89
87
  value: listItem.pyUserName
@@ -147,7 +147,7 @@ export default function Assignment(props: PropsWithChildren<AssignmentProps>) {
147
147
  }
148
148
 
149
149
  function onSaveActionSuccess(data) {
150
- actionsAPI.cancelAssignment(itemKey).then(() => {
150
+ actionsAPI.cancelAssignment(itemKey, false).then(() => {
151
151
  PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED, data);
152
152
  });
153
153
  }
@@ -174,7 +174,6 @@ export default function Assignment(props: PropsWithChildren<AssignmentProps>) {
174
174
 
175
175
  savePromise
176
176
  .then(() => {
177
- // @ts-ignore - Property 'c11nEnv' is private and only accessible within class 'CaseInfo'.
178
177
  const caseType = thePConn.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);
179
178
  onSaveActionSuccess({ caseType, caseID, assignmentID });
180
179
  })
@@ -189,10 +188,8 @@ export default function Assignment(props: PropsWithChildren<AssignmentProps>) {
189
188
  // check if create stage (modal)
190
189
  const { PUB_SUB_EVENTS } = PCore.getConstants();
191
190
  const { publish } = PCore.getPubSubUtils();
192
- // @ts-ignore - Property 'isAssignmentInCreateStage' is private and only accessible within class 'CaseInfo'
193
191
  const isAssignmentInCreateStage = thePConn.getCaseInfo().isAssignmentInCreateStage();
194
192
  const isLocalAction =
195
- // @ts-ignore - Property 'isLocalAction' is private and only accessible within class 'CaseInfo'.
196
193
  thePConn.getCaseInfo().isLocalAction() ||
197
194
  (PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION && getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));
198
195
  if (isAssignmentInCreateStage && isInModal && !isLocalAction) {
@@ -206,7 +203,7 @@ export default function Assignment(props: PropsWithChildren<AssignmentProps>) {
206
203
  showToast(`${localizedVal('Cancel failed!', localeCategory)}`);
207
204
  });
208
205
  } else {
209
- const cancelPromise = cancelAssignment(itemKey);
206
+ const cancelPromise = cancelAssignment(itemKey, false);
210
207
 
211
208
  cancelPromise
212
209
  .then(data => {
@@ -275,7 +272,6 @@ export default function Assignment(props: PropsWithChildren<AssignmentProps>) {
275
272
  }
276
273
 
277
274
  // expected format of refreshConditions : [{field: ".Name", event: "Changes"}]
278
- // @ts-ignore - Property 'getActionRefreshConditions' is private and only accessible within class 'CaseInfo'
279
275
  const refreshConditions = thePConn.getCaseInfo()?.getActionRefreshConditions();
280
276
  const context = thePConn.getContextName();
281
277
  const pageReference = thePConn.getPageReference();
@@ -1,5 +1,4 @@
1
1
  /* eslint-disable @typescript-eslint/no-shadow */
2
- /* eslint-disable operator-assignment */
3
2
  import { forwardRef, PropsWithChildren, useEffect, useRef, useState } from 'react';
4
3
  import { TextField } from '@mui/material';
5
4
  import { v4 as uuidv4 } from 'uuid';
@@ -20,7 +19,7 @@ interface DashboardFilterProps extends PConnProps {
20
19
  }
21
20
 
22
21
  export default function DashboardFilter(props: PropsWithChildren<DashboardFilterProps>) {
23
- const { children = [], name, filterProp, type = '', metadata = null, getPConnect } = props;
22
+ const { children, name, filterProp, type = '', metadata = null, getPConnect } = props;
24
23
  const { current: filterId } = useRef(uuidv4());
25
24
 
26
25
  const [startDate, setStartDate] = useState(null);
@@ -35,7 +34,7 @@ export default function DashboardFilter(props: PropsWithChildren<DashboardFilter
35
34
  } else if (type === 'RadioButtons') {
36
35
  const reference = getPConnect().getFullReference() + filterProp;
37
36
  const radList = document.getElementsByName(reference);
38
- for (let i = 0; i < radList.length; i = i + 1) {
37
+ for (let i = 0; i < radList.length; i += 1) {
39
38
  if ((radList[i] as HTMLInputElement).value === '') {
40
39
  (radList[i] as HTMLInputElement).checked = true;
41
40
  } else {
@@ -46,7 +46,6 @@ export const createFilterComponent = (getPConnect, filterMeta, index) => {
46
46
  }
47
47
  let propInfo: any = PCore.getMetadataUtils().getPropertyMetadata(cleanedName, filterMeta.config.ruleClass);
48
48
  if (!propInfo) {
49
- // @ts-ignore - PCore.getMetadataUtils().getPropertyMetadata - An argument for 'currentClassID' was not provided.
50
49
  propInfo = PCore.getMetadataUtils().getPropertyMetadata(cleanedName);
51
50
  }
52
51
  const { type: propertyType } = propInfo || { type: 'Text' };
@@ -78,11 +77,10 @@ export const buildFilterComponents = (getPConnect, allFilters) => {
78
77
  const filterComponents = allFilters.children.map((filter, index) => createFilterComponent(getPConnect, filter, index));
79
78
  if (filterComponents && filterComponents.length > 0) {
80
79
  filterComponents.push(
81
- <Grid>
80
+ <Grid style={{ display: 'flex', alignItems: 'center' }}>
82
81
  <Link
83
82
  style={{ cursor: 'pointer' }}
84
83
  onClick={() => {
85
- // @ts-ignore - second parameter “payload” for publish method should be optional
86
84
  PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL);
87
85
  }}
88
86
  underline='hover'
@@ -12,6 +12,7 @@ interface DeferLoadProps extends PConnProps {
12
12
  isChildDeferLoad?: boolean;
13
13
  isTab: boolean;
14
14
  deferLoadId: string;
15
+ lastUpdateCaseTime: any;
15
16
  }
16
17
 
17
18
  //
@@ -34,7 +35,7 @@ const useStyles = makeStyles(theme => ({
34
35
  }));
35
36
 
36
37
  export default function DeferLoad(props: DeferLoadProps) {
37
- const { getPConnect, name, deferLoadId, isTab } = props;
38
+ const { getPConnect, name, deferLoadId, isTab, lastUpdateCaseTime } = props;
38
39
  const [content, setContent] = useState<any>(null);
39
40
  const [isLoading, setLoading] = useState(true);
40
41
  const [currentLoadedAssignment, setCurrentLoadedAssignment] = useState('');
@@ -69,8 +70,8 @@ export default function DeferLoad(props: DeferLoadProps) {
69
70
  const getViewOptions = () => ({
70
71
  viewContext: resourceType,
71
72
  pageClass: loadViewCaseID ? '' : (pConnect.getDataObject('') as any).pyPortal.classID, // 2nd arg empty string until typedef allows optional
72
- container: isContainerPreview ? 'preview' : null,
73
- containerName: isContainerPreview ? 'preview' : null,
73
+ container: isContainerPreview ? 'preview' : undefined,
74
+ containerName: isContainerPreview ? 'preview' : undefined,
74
75
  updateData: isContainerPreview
75
76
  });
76
77
 
@@ -113,7 +114,6 @@ export default function DeferLoad(props: DeferLoadProps) {
113
114
  getPConnect()
114
115
  .getActionsApi()
115
116
  .showData(name, dataContext, dataContextParameters, {
116
- // @ts-ignore - Type 'boolean' is not assignable to type 'string'
117
117
  skipSemanticUrl: true,
118
118
  // @ts-ignore
119
119
  isDeferLoaded: true
@@ -145,7 +145,7 @@ export default function DeferLoad(props: DeferLoadProps) {
145
145
  console.log(`deferload: ${error}`);
146
146
  });
147
147
  }
148
- }, [name, getPConnect, currentLoadedAssignment]);
148
+ }, [name, getPConnect, currentLoadedAssignment, lastUpdateCaseTime]);
149
149
  /* TODO Cosmos need to handle for now added a wrapper div with pos relative */
150
150
  let deferLoadContent;
151
151
  if (isLoading) {