@pega/react-sdk-overrides 0.23.25 → 8.8.20

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 (141) hide show
  1. package/lib/designSystemExtension/AlertBanner/AlertBanner.tsx +47 -0
  2. package/lib/designSystemExtension/AlertBanner/index.tsx +1 -0
  3. package/lib/designSystemExtension/Banner/Banner.css +4 -0
  4. package/lib/designSystemExtension/Banner/Banner.tsx +25 -11
  5. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +15 -10
  6. package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +10 -11
  7. package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +10 -3
  8. package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +11 -5
  9. package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +11 -3
  10. package/lib/designSystemExtension/Operator/Operator.tsx +30 -21
  11. package/lib/designSystemExtension/Pulse/Pulse.tsx +11 -7
  12. package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +121 -0
  13. package/lib/designSystemExtension/RichTextEditor/index.tsx +1 -0
  14. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.css +6 -2
  15. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +12 -3
  16. package/lib/field/AutoComplete/AutoComplete.tsx +37 -18
  17. package/lib/field/CancelAlert/CancelAlert.tsx +21 -12
  18. package/lib/field/Checkbox/Checkbox.tsx +41 -17
  19. package/lib/field/Currency/Currency.tsx +23 -15
  20. package/lib/field/Currency/currency-utils.ts +1 -2
  21. package/lib/field/Date/Date.tsx +31 -17
  22. package/lib/field/DateTime/DateTime.tsx +26 -15
  23. package/lib/field/Decimal/Decimal.tsx +82 -19
  24. package/lib/field/Dropdown/Dropdown.tsx +57 -14
  25. package/lib/field/Email/Email.tsx +17 -9
  26. package/lib/field/Integer/Integer.tsx +15 -7
  27. package/lib/field/Percentage/Percentage.tsx +15 -7
  28. package/lib/field/Phone/Phone.tsx +21 -12
  29. package/lib/field/RadioButtons/RadioButtons.tsx +54 -27
  30. package/lib/field/RichText/RichText.tsx +93 -0
  31. package/lib/field/RichText/index.tsx +1 -0
  32. package/lib/field/ScalarList/ScalarList.tsx +64 -0
  33. package/lib/field/ScalarList/config-ext.json +8 -0
  34. package/lib/field/ScalarList/index.tsx +1 -0
  35. package/lib/field/SemanticLink/SemanticLink.tsx +26 -25
  36. package/lib/field/SemanticLink/utils.ts +2 -1
  37. package/lib/field/TextArea/TextArea.tsx +14 -5
  38. package/lib/field/TextContent/TextContent.tsx +10 -1
  39. package/lib/field/TextInput/TextInput.tsx +40 -11
  40. package/lib/field/Time/Time.tsx +29 -26
  41. package/lib/field/URL/URL.tsx +24 -8
  42. package/lib/field/UserReference/UserReference.tsx +52 -60
  43. package/lib/helpers/{attachmentHelpers.js → attachmentHelpers.ts} +5 -5
  44. package/lib/helpers/auth.js +741 -390
  45. package/lib/helpers/authManager.ts +933 -0
  46. package/lib/helpers/case-utils.tsx +103 -0
  47. package/lib/helpers/common-utils.ts +4 -0
  48. package/lib/helpers/config_access.js +63 -145
  49. package/lib/helpers/data_page.ts +2 -1
  50. package/lib/helpers/date-format-utils.ts +29 -19
  51. package/lib/helpers/{event-utils.js → event-utils.ts} +1 -1
  52. package/lib/helpers/{field-group-utils.js → field-group-utils.ts} +4 -3
  53. package/lib/helpers/formatters/{Currency.js → Currency.ts} +13 -12
  54. package/lib/helpers/formatters/{CurrencyMap.js → CurrencyMap.ts} +8 -5
  55. package/lib/helpers/formatters/{Date.js → Date.ts} +2 -2
  56. package/lib/helpers/formatters/{common.js → common.ts} +4 -4
  57. package/lib/helpers/formatters/{index.js → index.ts} +3 -3
  58. package/lib/helpers/simpleTableHelpers.ts +10 -6
  59. package/lib/helpers/state-utils.tsx +47 -0
  60. package/lib/helpers/template-utils.ts +3 -4
  61. package/lib/helpers/utils.ts +12 -4
  62. package/lib/helpers/versionHelpers.ts +0 -1
  63. package/lib/infra/ActionButtons/ActionButtons.tsx +13 -18
  64. package/lib/infra/Assignment/Assignment.tsx +38 -32
  65. package/lib/infra/AssignmentCard/AssignmentCard.tsx +15 -19
  66. package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +76 -64
  67. package/lib/infra/Containers/FlowContainer/{helpers.js → helpers.ts} +18 -16
  68. package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +41 -27
  69. package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +19 -28
  70. package/lib/infra/DashboardFilter/DashboardFilter.tsx +16 -20
  71. package/lib/infra/DashboardFilter/filterUtils.tsx +3 -1
  72. package/lib/infra/DeferLoad/DeferLoad.tsx +16 -19
  73. package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +20 -19
  74. package/lib/infra/MultiStep/MultiStep.tsx +24 -24
  75. package/lib/infra/NavBar/NavBar.tsx +23 -24
  76. package/lib/infra/Reference/Reference.tsx +13 -18
  77. package/lib/infra/Region/Region.tsx +8 -6
  78. package/lib/infra/RootContainer/RootContainer.tsx +32 -39
  79. package/lib/infra/Stages/Stages.tsx +15 -9
  80. package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +8 -1
  81. package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +12 -12
  82. package/lib/infra/View/View.tsx +30 -58
  83. package/lib/template/AppShell/AppShell.tsx +51 -34
  84. package/lib/template/BannerPage/BannerPage.tsx +26 -31
  85. package/lib/template/CaseSummary/CaseSummary.tsx +15 -8
  86. package/lib/template/CaseView/CaseView.tsx +137 -100
  87. package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +27 -27
  88. package/lib/template/Confirmation/Confirmation.tsx +29 -52
  89. package/lib/template/DataReference/DataReference.tsx +50 -52
  90. package/lib/template/DefaultForm/DefaultForm.tsx +29 -20
  91. package/lib/template/DefaultForm/utils/index.ts +33 -0
  92. package/lib/template/Details/Details/Details.tsx +16 -17
  93. package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +13 -16
  94. package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +19 -18
  95. package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +20 -18
  96. package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +24 -27
  97. package/lib/template/InlineDashboard/InlineDashboard.tsx +11 -7
  98. package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +19 -17
  99. package/lib/template/ListPage/ListPage.tsx +14 -13
  100. package/lib/template/ListView/ListView.tsx +140 -152
  101. package/lib/template/ListView/{hooks.js → hooks.ts} +3 -1
  102. package/lib/template/ListView/{utils.js → utils.ts} +172 -23
  103. package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +12 -17
  104. package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +16 -1
  105. package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +19 -18
  106. package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +9 -1
  107. package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +17 -17
  108. package/lib/template/OneColumn/OneColumn/OneColumn.tsx +8 -7
  109. package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +10 -10
  110. package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +5 -7
  111. package/lib/template/PromotedFilters/PromotedFilters.tsx +23 -17
  112. package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +103 -6
  113. package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +28 -7
  114. package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +26 -31
  115. package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +34 -36
  116. package/lib/template/SubTabs/SubTabs.tsx +10 -11
  117. package/lib/template/SubTabs/tabUtils.ts +0 -2
  118. package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +10 -15
  119. package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +10 -10
  120. package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +10 -12
  121. package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +17 -3
  122. package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +35 -25
  123. package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +7 -1
  124. package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +15 -17
  125. package/lib/template/WssNavBar/WssNavBar.tsx +36 -14
  126. package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +13 -21
  127. package/lib/widget/Attachment/Attachment.css +15 -3
  128. package/lib/widget/Attachment/Attachment.tsx +51 -32
  129. package/lib/widget/CaseHistory/CaseHistory.tsx +13 -11
  130. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +13 -1
  131. package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +40 -26
  132. package/lib/widget/Followers/Followers.tsx +10 -11
  133. package/lib/widget/QuickCreate/QuickCreate.tsx +15 -6
  134. package/lib/widget/SummaryItem/SummaryItem.tsx +12 -4
  135. package/lib/widget/SummaryList/SummaryList.tsx +17 -3
  136. package/lib/widget/ToDo/ToDo.tsx +69 -104
  137. package/package.json +1 -1
  138. package/lib/helpers/authManager.js +0 -631
  139. /package/lib/helpers/formatters/{Boolean.js → Boolean.ts} +0 -0
  140. /package/lib/helpers/{reactContextHelpers.js → reactContextHelpers.ts} +0 -0
  141. /package/lib/template/ListView/{DefaultViewMeta.js → DefaultViewMeta.ts} +0 -0
@@ -2,7 +2,19 @@ import React from "react";
2
2
  import { Button } from '@material-ui/core';
3
3
  import './ActionButtonsForFileUtil.css';
4
4
 
5
- export default function ActionButtonsForFileUtil(props) {
5
+ // ActionButtonsForFileUtil does NOT have getPConnect.
6
+ // So, no need to extend PConnProps
7
+
8
+ interface ActionButtonsForFileUtilProps {
9
+ // If any, enter additional props that only exist on this component
10
+ arMainButtons: Array<any>,
11
+ arSecondaryButtons: Array<any>,
12
+ primaryAction: any,
13
+ secondaryAction: any
14
+ }
15
+
16
+
17
+ export default function ActionButtonsForFileUtil(props: ActionButtonsForFileUtilProps) {
6
18
 
7
19
  return (
8
20
  <div className="psdk-actions">
@@ -2,18 +2,33 @@ import React, { useEffect, useState } from "react";
2
2
  import TextField from '@material-ui/core/TextField';
3
3
  import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
4
4
  import download from "downloadjs";
5
- import SummaryList from '@pega/react-sdk-components/lib/components/widget/SummaryList';
6
- import ActionButtonsForFileUtil from '@pega/react-sdk-components/lib/components/widget/FileUtility/ActionButtonsForFileUtil';
5
+ // import SummaryList from '../../SummaryList';
6
+ // import ActionButtonsForFileUtil from '../ActionButtonsForFileUtil';
7
7
  import './FileUtility.css';
8
8
  import { IconButton, Menu, MenuItem } from '@material-ui/core';
9
9
  import MoreVertIcon from '@material-ui/icons/MoreVert';
10
10
  import { Button } from '@material-ui/core';
11
11
  import { validateMaxSize } from '@pega/react-sdk-components/lib/components/helpers/attachmentHelpers';
12
12
  import { CircularProgress } from "@material-ui/core";
13
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
13
14
 
14
- declare const PCore;
15
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
16
+
17
+
18
+ interface FileUtilityProps extends PConnProps {
19
+ // If any, enter additional props that only exist on this component
20
+ }
21
+
22
+
23
+ // Remove this and use "real" PCore type once .d.ts is fixed (currently shows 5 errors)
24
+ declare const PCore: any;
25
+
26
+
27
+ export default function FileUtility(props:FileUtilityProps) {
28
+ // Get emitted components from map (so we can get any override that may exist)
29
+ const SummaryList = getComponentFromMap('SummaryList');
30
+ const ActionButtonsForFileUtil = getComponentFromMap('ActionButtonsForFileUtil');
15
31
 
16
- export default function FileUtility(props) {
17
32
  const { getPConnect } = props;
18
33
  const thePConn = getPConnect();
19
34
  const required = true;
@@ -22,8 +37,8 @@ export default function FileUtility(props) {
22
37
  count: 0
23
38
  };
24
39
  const [list, setList] = useState(listTemp);
25
- const headerSvgIcon$ = Utils.getImageSrc('paper-clip', PCore.getAssetLoader().getStaticServerUrl());
26
- const closeSvgIcon = Utils.getImageSrc("times", PCore.getAssetLoader().getStaticServerUrl());
40
+ const headerSvgIcon$ = Utils.getImageSrc('paper-clip', Utils.getSDKStaticConentUrl());
41
+ const closeSvgIcon = Utils.getImageSrc("times", Utils.getSDKStaticConentUrl());
27
42
  const configProps: any = thePConn.resolveConfigProps(thePConn.getConfigProps());
28
43
 
29
44
  const header = configProps.label;
@@ -31,16 +46,16 @@ export default function FileUtility(props) {
31
46
  showfileModal: false,
32
47
  fileList: [],
33
48
  attachedFiles: [],
34
- fileMainButtons: [{ actionID: "attach", jsAction: "attachFiles", name: "Attach files"}],
35
- fileSecondaryButtons: [{ actionID: "cancel", jsAction: "cancel", name: "Cancel"}]
49
+ fileMainButtons: [{ actionID: "attach", jsAction: "attachFiles", name: thePConn.getLocalizedValue('Attach files', '', '')}], // 2nd and 3rd args empty string until typedef marked correctly
50
+ fileSecondaryButtons: [{ actionID: "cancel", jsAction: "cancel", name: thePConn.getLocalizedValue('Cancel', '', '')}] // 2nd and 3rd args empty string until typedef marked correctly
36
51
  };
37
52
  const [fileData, setFileData] = useState(fileTemp);
38
53
  const linkTemp = {
39
54
  showLinkModal: false,
40
55
  linksList: [],
41
56
  attachedLinks: [],
42
- linkMainButtons: [{ actionID: "attach", jsAction: "attachLinks", name: "Attach links"}],
43
- linkSecondaryButtons: [{ actionID: "cancel", jsAction: "cancel", name: "Cancel"}]
57
+ linkMainButtons: [{ actionID: "attach", jsAction: "attachLinks", name: thePConn.getLocalizedValue('Attach links', '', '')}], // 2nd and 3rd args empty string until typedef marked correctly
58
+ linkSecondaryButtons: [{ actionID: "cancel", jsAction: "cancel", name: thePConn.getLocalizedValue('Cancel', '', '')}] // 2nd and 3rd args empty string until typedef marked correctly
44
59
  };
45
60
  const [linkData, setLinkData] = useState(linkTemp);
46
61
  const [anchorEl, setAnchorEl] = useState(null);
@@ -75,12 +90,11 @@ export default function FileUtility(props) {
75
90
  }) {
76
91
  let actions;
77
92
 
78
-
79
93
  if (att.progress && att.progress !== 100) {
80
94
  actions = [
81
95
  {
82
96
  id: `Cancel-${att.ID}`,
83
- text: "Cancel",
97
+ text: thePConn.getLocalizedValue('Cancel', '', ''), // 2nd and 3rd args empty string until typedef marked correctly
84
98
  icon: "times",
85
99
  onClick: cancelFile
86
100
  }
@@ -93,7 +107,7 @@ export default function FileUtility(props) {
93
107
  "download",
94
108
  {
95
109
  id: `download-${ID}`,
96
- text: isFile ? "Download" : "Open",
110
+ text: isFile ? thePConn.getLocalizedValue('Download', '', '') : thePConn.getLocalizedValue('Open', '', ''), // 2nd and 3rd args empty string until typedef marked correctly
97
111
  icon: isFile ? "download" : "open",
98
112
  onClick: downloadFile
99
113
  }
@@ -102,7 +116,7 @@ export default function FileUtility(props) {
102
116
  "delete",
103
117
  {
104
118
  id: `Delete-${ID}`,
105
- text: "Delete",
119
+ text: thePConn.getLocalizedValue('Delete', '', ''), // 2nd and 3rd args empty string until typedef marked correctly
106
120
  icon: "trash",
107
121
  onClick: deleteFile
108
122
  }
@@ -118,7 +132,7 @@ export default function FileUtility(props) {
118
132
  actions = [
119
133
  {
120
134
  id: `Remove-${att.ID}`,
121
- text: "Remove",
135
+ text: thePConn.getLocalizedValue('Remove', '', ''), // 2nd and 3rd args empty string until typedef marked correctly
122
136
  icon: "trash",
123
137
  onClick: removeFile
124
138
  }
@@ -186,7 +200,7 @@ export default function FileUtility(props) {
186
200
  const getAttachments = () => {
187
201
 
188
202
  const attachmentUtils = PCore.getAttachmentUtils();
189
- const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
203
+ const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly
190
204
 
191
205
  if (caseID && caseID !== "") {
192
206
  const attPromise = attachmentUtils.getCaseAttachments(caseID, thePConn.getContextName());
@@ -245,7 +259,7 @@ export default function FileUtility(props) {
245
259
  function setNewFiles(arFiles) {
246
260
  let index = 0;
247
261
  for (const file of arFiles) {
248
- if (!validateMaxSize(file, 5)) {
262
+ if (!validateMaxSize(file, '5')) {
249
263
  file.error = true;
250
264
  file.meta = "File is too big. Max allowed size is 5MB.";
251
265
  }
@@ -318,7 +332,7 @@ export default function FileUtility(props) {
318
332
 
319
333
  function onAttachFiles() {
320
334
  const attachmentUtils = PCore.getAttachmentUtils();
321
- const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
335
+ const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly
322
336
  const onUploadProgress = () => {};
323
337
  const errorHandler = () => {};
324
338
  closeFilePopup()
@@ -443,7 +457,7 @@ export default function FileUtility(props) {
443
457
 
444
458
  function onAttachLinks() {
445
459
  const attachmentUtils = PCore.getAttachmentUtils();
446
- const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
460
+ const caseID = thePConn.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID, ''); // 2nd arg empty string until typedef marked correctly
447
461
  const links = linkData.attachedLinks;
448
462
  closeAddLinksPopup();
449
463
  const linksToAttach = links.map((item: any) => ({
@@ -492,8 +506,8 @@ export default function FileUtility(props) {
492
506
  open={Boolean(anchorEl)}
493
507
  onClose={handleClose}
494
508
  >
495
- <MenuItem style={{fontSize: '14px'}} onClick={onAddFilesClick}>Add Files</MenuItem>
496
- <MenuItem style={{fontSize: '14px'}} onClick={onAddLinksClick}>Add Links</MenuItem>
509
+ <MenuItem style={{fontSize: '14px'}} onClick={onAddFilesClick}>{thePConn.getLocalizedValue('Add files', '', '')}</MenuItem> {/* 2nd and 3rd args empty string until typedef marked correctly */}
510
+ <MenuItem style={{fontSize: '14px'}} onClick={onAddLinksClick}>{thePConn.getLocalizedValue('Add links', '', '')}</MenuItem> {/* 2nd and 3rd args empty string until typedef marked correctly */}
497
511
  </Menu>
498
512
  </div>
499
513
  </div>
@@ -506,12 +520,12 @@ export default function FileUtility(props) {
506
520
  {fileData.showfileModal && (
507
521
  <div className="psdk-dialog-background">
508
522
  <div className="psdk-modal-file-top">
509
- <h3>Add local files</h3>
523
+ <h3>{thePConn.getLocalizedValue('Add local files', '', '')}</h3>
510
524
  <div className="psdk-modal-body">
511
525
  <div className="psdk-modal-file-selector">
512
526
  <label htmlFor='upload-files'>
513
527
  <input style={{ display: 'none' }} id='upload-files' name='upload-files' type='file' multiple onChange={uploadMyFiles}/>
514
- <Button variant='outlined' color='primary' component="span">Upload file(s)</Button>
528
+ <Button variant='outlined' color='primary' component="span">{thePConn.getLocalizedValue('Attach files', '', '')}</Button> {/* 2nd and 3rd args empty string until typedef marked correctly */}
515
529
  </label>
516
530
  </div>
517
531
  {fileData.fileList.length > 0 && (<div style={{marginTop: '1rem'}}>
@@ -527,7 +541,7 @@ export default function FileUtility(props) {
527
541
  {linkData.showLinkModal && (
528
542
  <div className="psdk-dialog-background">
529
543
  <div className="psdk-modal-file-top">
530
- <h3>Add links</h3>
544
+ <h3>{thePConn.getLocalizedValue('Add links', '', '')}</h3> {/* 2nd and 3rd args empty string until typedef marked correctly */}
531
545
  <div className="psdk-modal-body">
532
546
  <div className="psdk-modal-links-row">
533
547
  <div className="psdk-links-two-column">
@@ -539,7 +553,7 @@ export default function FileUtility(props) {
539
553
  </div>
540
554
  </div>
541
555
  <div className="psdk-modal-link-add">
542
- <Button className="psdk-add-link-action" color="primary" variant="contained" component="span" onClick={addLink} disabled={link.disable}>Add Link</Button>
556
+ <Button className="psdk-add-link-action" color="primary" variant="contained" component="span" onClick={addLink} disabled={link.disable}>{thePConn.getLocalizedValue('Add link', '', '')}</Button> {/* 2nd and 3rd args empty string until typedef marked correctly */}
543
557
  </div>
544
558
  </div>
545
559
  {linkData.linksList.length > 0 && (<div style={{marginTop: '1rem'}}>
@@ -554,7 +568,7 @@ export default function FileUtility(props) {
554
568
  {showViewAllModal && (<div className="psdk-dialog-background">
555
569
  <div className="psdk-modal-file-top">
556
570
  <div className="psdk-view-all-header">
557
- <h3>Attachments</h3>
571
+ <h3>{thePConn.getLocalizedValue('Attachments', '', '')}</h3> {/* 2nd and 3rd args empty string until typedef marked correctly */}
558
572
  {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
559
573
  <button type="button" className="psdk-close-button" onClick = {() => setViewAll(false)}><img className="psdk-utility-card-actions-svg-icon" src={closeSvgIcon}></img></button>
560
574
  </div>
@@ -1,9 +1,15 @@
1
1
  import React from "react";
2
- // import PropTypes from "prop-types";
3
2
  import { Card, CardContent, CardHeader, Typography } from "@material-ui/core";
4
3
  import { makeStyles } from '@material-ui/core/styles';
5
4
  // import { green } from "@material-ui/core/colors";
6
5
 
6
+ // Followers does NOT have getPConnect. So, no need to extend from PConnProps
7
+ interface FollowersProps {
8
+ // If any, enter additional props that only exist on this component
9
+ children: Array<any>
10
+ }
11
+
12
+
7
13
  const useStyles = makeStyles((theme) => ({
8
14
  root: {
9
15
  paddingRight: theme.spacing(1),
@@ -19,9 +25,10 @@ const useStyles = makeStyles((theme) => ({
19
25
  },
20
26
  }));
21
27
 
22
- export default function Followers(/* props */) {
28
+ export default function Followers(props: FollowersProps) {
23
29
  const componentName = "Followers";
24
- // const { children } = props;
30
+ // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
31
+ const { children } = props;
25
32
  const classes = useStyles();
26
33
 
27
34
  return (
@@ -33,11 +40,3 @@ export default function Followers(/* props */) {
33
40
  </Card>
34
41
  );
35
42
  }
36
-
37
- Followers.defaultProps = {
38
- // children: []
39
- }
40
-
41
- Followers.propTypes = {
42
- // children: PropTypes.arrayOf(PropTypes.node)
43
- };
@@ -1,16 +1,25 @@
1
1
  import React from "react";
2
- import WssQuickCreate from '@pega/react-sdk-components/lib/components/designSystemExtension/WssQuickCreate';
3
2
  import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
3
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
+ // import type { PConnProps } from '../../../types/PConnProps';
4
5
 
5
- declare const PCore: any;
6
+ // Can't add PConnTypes until we can resolve type problems with
7
+ // 2nd arg to createWork
8
+ // interface QuickCreateProps extends PConnProps {
9
+ // // If any, enter additional props that only exist on this component
10
+ // }
11
+
12
+
13
+ export default function QuickCreate(props /* : QuickCreateProps */) {
14
+ // Get emitted components from map (so we can get any override that may exist)
15
+ const WssQuickCreate = getComponentFromMap('WssQuickCreate');
6
16
 
7
- export default function QuickCreate(props) {
8
17
  const { getPConnect, heading, showCaseIcons, classFilter } = props;
9
18
  const pConn = getPConnect();
10
19
  const createCase = (className) => {
11
20
  pConn
12
21
  .getActionsApi()
13
- .createWork(className, {})
22
+ .createWork(className, { })
14
23
  .catch((error) => {
15
24
  // eslint-disable-next-line no-console
16
25
  console.log('Error in case creation: ', error?.message)
@@ -26,11 +35,11 @@ export default function QuickCreate(props) {
26
35
  envInfo.environmentInfoObject.pyCaseTypeList.length > 0
27
36
  ) {
28
37
  classFilter.forEach((item) => {
29
- let icon = Utils.getImageSrc('polaris-solid', PCore.getAssetLoader().getStaticServerUrl());
38
+ let icon = Utils.getImageSrc('polaris-solid', Utils.getSDKStaticConentUrl());
30
39
  let label = '';
31
40
  envInfo.environmentInfoObject.pyCaseTypeList.forEach((casetype) => {
32
41
  if (casetype.pyWorkTypeImplementationClassName === item) {
33
- icon = casetype.pxIcon && Utils.getImageSrc(casetype?.pxIcon, PCore.getAssetLoader().getStaticServerUrl());
42
+ icon = casetype.pxIcon && Utils.getImageSrc(casetype?.pxIcon, Utils.getSDKStaticConentUrl());
34
43
  label = casetype.pyWorkTypeName ?? '';
35
44
  }
36
45
  });
@@ -4,19 +4,27 @@ import './SummaryItem.css'
4
4
  import { IconButton, Menu, MenuItem } from '@material-ui/core';
5
5
  import MoreVertIcon from '@material-ui/icons/MoreVert';
6
6
 
7
- declare const PCore: any;
7
+ // SummaryItem does NOT have getPConnect. So, no need to extend from PConnProps
8
8
 
9
- export default function SummaryItem(props) {
9
+ interface SummaryItemProps {
10
+ // If any, enter additional props that only exist on this component
11
+ menuIconOverride$: string,
12
+ menuIconOverrideAction$: any,
13
+ arItems$: Array<any> | any
14
+ }
15
+
16
+
17
+ export default function SummaryItem(props:SummaryItemProps) {
10
18
  let imagePath$ = "";
11
19
  let menuIconOverride$;
12
20
  menuIconOverride$ = props.menuIconOverride$
13
- imagePath$ = Utils.getIconPath(PCore.getAssetLoader().getStaticServerUrl());
21
+ imagePath$ = Utils.getIconPath(Utils.getSDKStaticConentUrl());
14
22
  const item = props.arItems$;
15
23
  const srcImg = `${imagePath$}${item.visual.icon}.svg`
16
24
  const [anchorEl, setAnchorEl] = useState(null);
17
25
  const open = Boolean(anchorEl);
18
26
  if (menuIconOverride$) {
19
- menuIconOverride$ = Utils.getImageSrc(menuIconOverride$ , PCore.getAssetLoader().getStaticServerUrl());
27
+ menuIconOverride$ = Utils.getImageSrc(menuIconOverride$ , Utils.getSDKStaticConentUrl());
20
28
  }
21
29
 
22
30
  function removeAttachment() {
@@ -1,11 +1,25 @@
1
1
  import React from "react";
2
- import SummaryItem from '@pega/react-sdk-components/lib/components/widget/SummaryItem/index'
2
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
3
3
 
4
- export default function SummaryList(props) {
4
+ // SummaryList does NOT have getPConnect. So, no need to extend from PConnProps
5
+
6
+ interface SummaryListProps {
7
+ // If any, enter additional props that only exist on this component
8
+ arItems$: Array<any>,
9
+ menuIconOverride$?: string,
10
+ menuIconOverrideAction$?: any
11
+ }
12
+
13
+
14
+ export default function SummaryList(props: SummaryListProps) {
15
+ // Get emitted components from map (so we can get any override that may exist)
16
+ const SummaryItem = getComponentFromMap('SummaryItem');
17
+
18
+ const { menuIconOverride$: menuOverride = ""} = props;
5
19
  return (
6
20
  <div>
7
21
  {props.arItems$.map(file => (
8
- <SummaryItem key={file.id} menuIconOverride$={props.menuIconOverride$} arItems$={file} menuIconOverrideAction$={props.menuIconOverrideAction$}></SummaryItem>
22
+ <SummaryItem key={file.id} menuIconOverride$={menuOverride} arItems$={file} menuIconOverrideAction$={props.menuIconOverrideAction$}></SummaryItem>
9
23
  ))}
10
24
  </div>
11
25
  );