@pega/react-sdk-components 0.23.29 → 0.23.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +20 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +13 -9
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseViewActionsMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseViewActionsMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAKvD,UAAU,wBAAyB,SAAQ,UAAU;IAEnD,gBAAgB,EAAE,GAAG,EAAE,CAAC;IACxB,kBAAkB,EAAE,GAAG,EAAE,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,eAkG1E"}
|
|
@@ -3,6 +3,9 @@ import { useState } from 'react';
|
|
|
3
3
|
import Button from '@material-ui/core/Button';
|
|
4
4
|
import Menu from '@material-ui/core/Menu';
|
|
5
5
|
import MenuItem from '@material-ui/core/MenuItem';
|
|
6
|
+
import Snackbar from '@material-ui/core/Snackbar';
|
|
7
|
+
import IconButton from '@material-ui/core/IconButton';
|
|
8
|
+
import CloseIcon from '@material-ui/icons/Close';
|
|
6
9
|
export default function CaseViewActionsMenu(props) {
|
|
7
10
|
const { getPConnect, availableActions, availableProcesses, caseTypeID, caseTypeName } = props;
|
|
8
11
|
const thePConn = getPConnect();
|
|
@@ -10,6 +13,8 @@ export default function CaseViewActionsMenu(props) {
|
|
|
10
13
|
const localeCategory = 'CaseView';
|
|
11
14
|
const localeKey = `${caseTypeID}!CASE!${caseTypeName}`.toUpperCase();
|
|
12
15
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
16
|
+
const [showSnackbar, setShowSnackbar] = useState(false);
|
|
17
|
+
const [snackbarMessage, setSnackbarMessage] = useState('');
|
|
13
18
|
const handleClick = (event) => {
|
|
14
19
|
setAnchorEl(event.currentTarget);
|
|
15
20
|
};
|
|
@@ -17,6 +22,16 @@ export default function CaseViewActionsMenu(props) {
|
|
|
17
22
|
setAnchorEl(null);
|
|
18
23
|
};
|
|
19
24
|
const arMenuItems = [];
|
|
25
|
+
function showToast(message) {
|
|
26
|
+
setSnackbarMessage(message);
|
|
27
|
+
setShowSnackbar(true);
|
|
28
|
+
}
|
|
29
|
+
function handleSnackbarClose(event, reason) {
|
|
30
|
+
if (reason === 'clickaway') {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
setShowSnackbar(false);
|
|
34
|
+
}
|
|
20
35
|
function _actionMenuActionsClick(data) {
|
|
21
36
|
const actionsAPI = thePConn.getActionsApi();
|
|
22
37
|
const openLocalAction = actionsAPI.openLocalAction.bind(actionsAPI);
|
|
@@ -33,6 +48,10 @@ export default function CaseViewActionsMenu(props) {
|
|
|
33
48
|
const openProcessAction = actionsAPI.openProcessAction.bind(actionsAPI);
|
|
34
49
|
openProcessAction(process.ID, {
|
|
35
50
|
...process
|
|
51
|
+
})
|
|
52
|
+
.then(() => { })
|
|
53
|
+
.catch(() => {
|
|
54
|
+
showToast(`${process.name} Submit failed!`);
|
|
36
55
|
});
|
|
37
56
|
handleClose();
|
|
38
57
|
}
|
|
@@ -42,6 +61,6 @@ export default function CaseViewActionsMenu(props) {
|
|
|
42
61
|
availableProcesses.forEach(process => {
|
|
43
62
|
arMenuItems.push(_jsx(MenuItem, { onClick: () => _actionMenuProcessClick(process), children: localizedVal(process.name, '', localeKey) }, process.ID));
|
|
44
63
|
});
|
|
45
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, { "aria-controls": 'simple-menu', "aria-haspopup": 'true', onClick: handleClick, children: localizedVal('Actions...', localeCategory) }), _jsx(Menu, { id: 'simple-menu', anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: arMenuItems })] }));
|
|
64
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { "aria-controls": 'simple-menu', "aria-haspopup": 'true', onClick: handleClick, children: localizedVal('Actions...', localeCategory) }), _jsx(Menu, { id: 'simple-menu', anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: arMenuItems }), _jsx(Snackbar, { open: showSnackbar, autoHideDuration: 3000, onClose: handleSnackbarClose, message: snackbarMessage, action: _jsx(IconButton, { size: 'small', "aria-label": 'close', color: 'inherit', onClick: handleSnackbarClose, children: _jsx(CloseIcon, { fontSize: 'small' }) }) })] }));
|
|
46
65
|
}
|
|
47
66
|
//# sourceMappingURL=CaseViewActionsMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseViewActionsMenu.js","sourceRoot":"","sources":["../../../../src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,QAAQ,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseViewActionsMenu.js","sourceRoot":"","sources":["../../../../src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC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AAC,OAAO,CAAC,OAAO,CAAC,EAAE;QACnC,WAAW,CAAC,IAAI,CACd,KAAC,QAAQ,IAAkB,OAAO,EAAE,GAAG,EAAE,CAAC,uBAAuB,CAAC,OAAO,CAAC,YACvE,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,CAAC,IAD7B,OAAO,CAAC,EAAE,CAEd,CACZ,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,8BACE,KAAC,MAAM,qBAAe,aAAa,mBAAe,MAAM,EAAC,OAAO,EAAE,WAAW,YAC1E,YAAY,CAAC,YAAY,EAAE,cAAc,CAAC,GACpC,EACT,KAAC,IAAI,IAAC,EAAE,EAAC,aAAa,EAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,QAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,WAAW,YACjG,WAAW,GACP,EACP,KAAC,QAAQ,IACP,IAAI,EAAE,YAAY,EAClB,gBAAgB,EAAE,IAAI,EACtB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,eAAe,EACxB,MAAM,EACJ,KAAC,UAAU,IAAC,IAAI,EAAC,OAAO,gBAAY,OAAO,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,mBAAmB,YACtF,KAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,GAAG,GACnB,GAEf,IACD,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport Button from '@material-ui/core/Button';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\n\nimport { PConnProps } from '../../../types/PConnProps';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport IconButton from '@material-ui/core/IconButton';\nimport CloseIcon from '@material-ui/icons/Close';\n\ninterface CaseViewActionsMenuProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n availableActions: any[];\n availableProcesses: any[];\n caseTypeID: string;\n caseTypeName: string;\n}\n\nexport default function CaseViewActionsMenu(props: CaseViewActionsMenuProps) {\n const { getPConnect, availableActions, availableProcesses, caseTypeID, caseTypeName } = props;\n const thePConn = getPConnect();\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'CaseView';\n const localeKey = `${caseTypeID}!CASE!${caseTypeName}`.toUpperCase();\n\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const [showSnackbar, setShowSnackbar] = useState(false);\n const [snackbarMessage, setSnackbarMessage]: any = useState('');\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const arMenuItems: any[] = [];\n\n function showToast(message: string) {\n setSnackbarMessage(message);\n setShowSnackbar(true);\n }\n\n function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {\n if (reason === 'clickaway') {\n return;\n }\n setShowSnackbar(false);\n }\n\n function _actionMenuActionsClick(data) {\n const actionsAPI = thePConn.getActionsApi();\n const openLocalAction = actionsAPI.openLocalAction.bind(actionsAPI);\n\n openLocalAction(data.ID, {\n ...data,\n containerName: 'modal',\n type: 'express'\n });\n // after doing the action, close the menu...\n handleClose();\n }\n\n function _actionMenuProcessClick(process) {\n const actionsAPI = thePConn.getActionsApi();\n const openProcessAction = actionsAPI.openProcessAction.bind(actionsAPI);\n openProcessAction(process.ID, {\n ...process\n })\n .then(() => {})\n .catch(() => {\n showToast(`${process.name} Submit failed!`);\n });\n handleClose();\n }\n\n availableActions.forEach(action => {\n arMenuItems.push(\n <MenuItem key={action.ID} onClick={() => _actionMenuActionsClick(action)}>\n {localizedVal(action.name, '', localeKey)}\n </MenuItem>\n );\n });\n\n availableProcesses.forEach(process => {\n arMenuItems.push(\n <MenuItem key={process.ID} onClick={() => _actionMenuProcessClick(process)}>\n {localizedVal(process.name, '', localeKey)}\n </MenuItem>\n );\n });\n\n return (\n <>\n <Button aria-controls='simple-menu' aria-haspopup='true' onClick={handleClick}>\n {localizedVal('Actions...', localeCategory)}\n </Button>\n <Menu id='simple-menu' anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>\n {arMenuItems}\n </Menu>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton size='small' aria-label='close' color='inherit' onClick={handleSnackbarClose}>\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </>\n );\n}\n"]}
|
|
@@ -2,19 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
This release - **SDK-R v23.1.11** - is **only compatible with Pega Infinity 23**. This release is related to the [**release/23.1.11** branch of the React SDK repository](https://github.com/pegasystems/react-sdk/tree/release/23.1.11).
|
|
4
4
|
<br>
|
|
5
|
-
(If you currently are using the React SDK with Pega Infinity 8.8, update your SDK to
|
|
6
|
-
the [SDK-R v8.8.20 - release/8.8.20 branch](https://github.com/pegasystems/react-sdk/tree/release/8.8.20).)
|
|
7
5
|
|
|
8
|
-
The SDK-R v23.1.11
|
|
9
|
-
[SDK enhancements and fixes noted in **What's New in the SDK?**](https://docs.pega.com/bundle/constellation-sdk/page/constellation-sdks/sdks/react-sdk-updates.html) including:
|
|
6
|
+
The SDK-R v23.1.11 release allow React SDK users to to take advantage of the latest [SDK enhancements and fixes noted in **What's New in the SDK?**](https://docs.pega.com/bundle/constellation-sdk/page/constellation-sdks/sdks/react-sdk-updates.html) including:
|
|
10
7
|
|
|
11
8
|
* React version upgrade to 17
|
|
9
|
+
* Additional functionality including FieldGroup support, Multiple Attachement, Optional Process flows
|
|
10
|
+
* Added modal dialog edit view in table
|
|
11
|
+
* Enhanced security including token storage and item obfuscation support.
|
|
12
|
+
* Added Lint support to improve code quality and Prettier support for code formatting.
|
|
12
13
|
* Bug fixes
|
|
13
|
-
*
|
|
14
|
+
* Full set of merged PRs can be found in the [react-sdk-components GitHub repo list of merged PRs](https://github.com/pegasystems/react-sdk-components/pulls?q=is%3Apr+is%3Amerged+base%3Amaster+). This release includes all PRs since (and including) #232.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
<br />
|
|
17
|
+
<hr />
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
### Previous Releases
|
|
20
|
+
|
|
21
|
+
#### React SDK - Release Announcement - v23.1.10 (08 November 2023)
|
|
22
|
+
|
|
23
|
+
This release - **SDK-R v23.1.10** - is **only compatible with Pega Infinity 23**. This release is related to the [**release/23.1.10** branch of the React SDK repository](https://github.com/pegasystems/react-sdk/tree/release/23.1.10).
|
|
18
24
|
<br>
|
|
19
25
|
(If you currently are using the React SDK with Pega Infinity 8.8, update your SDK to
|
|
20
26
|
the [SDK-R v8.8.20 - release/8.8.20 branch](https://github.com/pegasystems/react-sdk/tree/release/8.8.20).)
|
|
@@ -32,8 +38,6 @@ For more information, see [Using type definitions - update link when published](
|
|
|
32
38
|
|
|
33
39
|
<hr />
|
|
34
40
|
|
|
35
|
-
### Previous Releases
|
|
36
|
-
|
|
37
41
|
#### **Release SDK-R-C 8.23.11 (10 August 2023)**
|
|
38
42
|
|
|
39
43
|
* Many significant improvements to localization
|
package/package.json
CHANGED