@pega/react-sdk-components 0.23.19 → 0.23.21
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/designSystemExtension/Banner/Banner.css +35 -0
- package/lib/components/designSystemExtension/Banner/Banner.d.ts +4 -0
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -0
- package/lib/components/designSystemExtension/Banner/Banner.js +18 -0
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -0
- package/lib/components/designSystemExtension/Banner/index.d.ts +2 -0
- package/lib/components/designSystemExtension/Banner/index.d.ts.map +1 -0
- package/lib/components/designSystemExtension/Banner/index.js +2 -0
- package/lib/components/designSystemExtension/Banner/index.js.map +1 -0
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +1 -2
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +6 -7
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/helpers/template-utils.d.ts.map +1 -1
- package/lib/components/helpers/template-utils.js +4 -3
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +42 -42
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +118 -119
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +2 -1
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +108 -14
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +26 -0
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -0
- package/lib/components/template/BannerPage/BannerPage.js +41 -0
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -0
- package/lib/components/template/BannerPage/index.d.ts +2 -0
- package/lib/components/template/BannerPage/index.d.ts.map +1 -0
- package/lib/components/template/BannerPage/index.js +2 -0
- package/lib/components/template/BannerPage/index.js.map +1 -0
- package/lib/components/template/Confirmation/Confirmation.d.ts +20 -0
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -0
- package/lib/components/template/Confirmation/Confirmation.js +61 -0
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -0
- package/lib/components/template/Confirmation/index.d.ts +2 -0
- package/lib/components/template/Confirmation/index.d.ts.map +1 -0
- package/lib/components/template/Confirmation/index.js +2 -0
- package/lib/components/template/Confirmation/index.js.map +1 -0
- package/lib/components/template/WssNavBar/WssNavBar.css +5 -0
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +4 -0
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -0
- package/lib/components/template/WssNavBar/WssNavBar.js +83 -0
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -0
- package/lib/components/template/WssNavBar/index.d.ts +2 -0
- package/lib/components/template/WssNavBar/index.d.ts.map +1 -0
- package/lib/components/template/WssNavBar/index.js +2 -0
- package/lib/components/template/WssNavBar/index.js.map +1 -0
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +4 -4
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +10 -4
- package/lib/components/widget/ToDo/ToDo.d.ts +2 -0
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +45 -11
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/sdk-pega-component-map.d.ts +8 -0
- package/lib/sdk-pega-component-map.js +9 -1
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../../src/components/template/AppShell/AppShell.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../../src/components/template/AppShell/AppShell.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,gBAAgB,CAAC;AA6BxB,iBAAwB,QAAQ,CAAC,KAAK,KAAA,eAoLrC;kBApLuB,QAAQ;;;;;;;;;;;;;;eAAR,QAAQ"}
|
|
@@ -1,32 +1,53 @@
|
|
|
1
|
-
import React, { useEffect, useState } from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
|
+
import { Utils } from '../../helpers/utils';
|
|
5
|
+
import Avatar from '@material-ui/core/Avatar';
|
|
4
6
|
import { NavContext } from '../../helpers/reactContextHelpers';
|
|
5
7
|
import './AppShell.css';
|
|
6
|
-
// AppShell can emit NavBar
|
|
8
|
+
// AppShell can emit NavBar or WssNavBar
|
|
7
9
|
import NavBar from '../../infra/NavBar';
|
|
8
|
-
|
|
10
|
+
import WssNavBar from '../../template/WssNavBar';
|
|
11
|
+
const useStyles = makeStyles(theme => ({
|
|
9
12
|
root: {
|
|
10
|
-
display: 'flex'
|
|
13
|
+
display: 'flex'
|
|
11
14
|
},
|
|
12
15
|
content: {
|
|
13
16
|
flexGrow: 1,
|
|
14
17
|
height: '100vh',
|
|
15
18
|
overflow: 'auto',
|
|
16
19
|
marginLeft: theme.spacing(2),
|
|
17
|
-
marginRight: theme.spacing(2)
|
|
20
|
+
marginRight: theme.spacing(2)
|
|
18
21
|
},
|
|
22
|
+
wsscontent: {
|
|
23
|
+
flexGrow: 1,
|
|
24
|
+
height: '100vh',
|
|
25
|
+
overflow: 'auto',
|
|
26
|
+
marginLeft: theme.spacing(1),
|
|
27
|
+
marginRight: theme.spacing(1)
|
|
28
|
+
}
|
|
19
29
|
}));
|
|
20
30
|
export default function AppShell(props) {
|
|
21
|
-
const { pages, caseTypes, showAppName, children, getPConnect, } = props;
|
|
31
|
+
const { pages, caseTypes, showAppName, children, getPConnect, portalTemplate, portalName, portalLogo, navDisplayOptions } = props;
|
|
22
32
|
const [open, setOpen] = useState(true);
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
34
|
+
const [activeTab, setActiveTab] = useState(!pages ? null : pages[0]?.pyRuleName);
|
|
23
35
|
const pConn = getPConnect();
|
|
24
36
|
const envInfo = PCore.getEnvironmentInfo();
|
|
25
|
-
const
|
|
37
|
+
const imageKey = envInfo.getOperatorImageInsKey();
|
|
38
|
+
const userName = envInfo.getOperatorName();
|
|
39
|
+
const currentUserInitials = Utils.getInitials(userName);
|
|
40
|
+
const appNameToDisplay = showAppName ? envInfo.getApplicationLabel() : '';
|
|
41
|
+
const portalClass = pConn.getValue('.classID');
|
|
42
|
+
const envPortalName = envInfo.getPortalName();
|
|
43
|
+
const localeUtils = PCore.getLocaleUtils();
|
|
26
44
|
const classes = useStyles();
|
|
45
|
+
const actionsAPI = pConn.getActionsApi();
|
|
46
|
+
const localeReference = pConn.getValue('.pyLocaleReference');
|
|
47
|
+
const [imageBlobUrl, setImageBlobUrl] = useState(null);
|
|
27
48
|
// useState for appName and mapChildren - note these are ONLY updated once (on component mount!)
|
|
28
49
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
29
|
-
const [appName, setAppName] = useState(
|
|
50
|
+
const [appName, setAppName] = useState('');
|
|
30
51
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
31
52
|
const [mapChildren, setMapChildren] = useState([]);
|
|
32
53
|
// Initial setting of appName and mapChildren
|
|
@@ -35,12 +56,74 @@ export default function AppShell(props) {
|
|
|
35
56
|
const tempMap = pConn.getChildren().map((child, index) => {
|
|
36
57
|
const theChildComp = child.getPConnect().getComponentName();
|
|
37
58
|
const theKey = `.${index}`;
|
|
38
|
-
return React.createElement("div", { id: theChildComp, key: theKey, style: { border:
|
|
59
|
+
return (React.createElement("div", { id: theChildComp, key: theKey, style: { border: 'solid 1px silver', margin: '1px' } },
|
|
39
60
|
theChildComp,
|
|
40
|
-
" will be here");
|
|
61
|
+
" will be here"));
|
|
41
62
|
});
|
|
42
63
|
setMapChildren(tempMap);
|
|
43
64
|
}, []);
|
|
65
|
+
const [iconURL, setIconURL] = useState('');
|
|
66
|
+
const [fullIconURL, setFullIconURL] = useState('');
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
// using the default icon then fetch it from the static folder (not auth involved)
|
|
69
|
+
if (!portalLogo ||
|
|
70
|
+
portalLogo.toLowerCase().includes('pzpega-logo-mark') ||
|
|
71
|
+
portalLogo.toLowerCase().includes('py-logo') ||
|
|
72
|
+
portalLogo.toLowerCase().includes('py-full-logo')) {
|
|
73
|
+
const portalLogoImage = Utils.getIconPath(PCore.getAssetLoader().getStaticServerUrl()).concat('pzpega-logo-mark.svg');
|
|
74
|
+
setIconURL(portalLogoImage);
|
|
75
|
+
setFullIconURL(`${PCore.getAssetLoader().getStaticServerUrl()}static/py-full-logo.svg`);
|
|
76
|
+
}
|
|
77
|
+
// not using default icon to fetch it using the way which uses authentication
|
|
78
|
+
else {
|
|
79
|
+
PCore.getAssetLoader()
|
|
80
|
+
.getSvcImage(portalLogo)
|
|
81
|
+
.then(blob => window.URL.createObjectURL(blob))
|
|
82
|
+
.then(data => {
|
|
83
|
+
setIconURL(data);
|
|
84
|
+
setFullIconURL(data);
|
|
85
|
+
})
|
|
86
|
+
.catch(() => {
|
|
87
|
+
// eslint-disable-next-line no-console
|
|
88
|
+
console.error(`Unable to load the image for the portal logo/icon with the insName:${portalLogo}`);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}, [portalLogo]);
|
|
92
|
+
useEffect(() => {
|
|
93
|
+
if (imageKey && portalTemplate === 'wss') {
|
|
94
|
+
PCore.getAssetLoader()
|
|
95
|
+
.getSvcImage(imageKey)
|
|
96
|
+
.then(blob => window.URL.createObjectURL(blob))
|
|
97
|
+
.then(imagePath => setImageBlobUrl(imagePath));
|
|
98
|
+
}
|
|
99
|
+
}, []);
|
|
100
|
+
const getOperator = () => {
|
|
101
|
+
return {
|
|
102
|
+
avatar: portalTemplate !== 'wss' ? React.createElement(Avatar, null) : { name: userName, imageSrc: imageBlobUrl },
|
|
103
|
+
name: userName,
|
|
104
|
+
currentUserInitials
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
function showPage(viewName, className) {
|
|
108
|
+
actionsAPI.showPage(viewName, className);
|
|
109
|
+
}
|
|
110
|
+
function openURL(URL) {
|
|
111
|
+
window.open(URL, '_blank');
|
|
112
|
+
}
|
|
113
|
+
const links = !pages
|
|
114
|
+
? []
|
|
115
|
+
: pages.map(page => {
|
|
116
|
+
const name = localeUtils.getLocaleValue(page.pyLabel, '', localeReference);
|
|
117
|
+
return {
|
|
118
|
+
text: name,
|
|
119
|
+
name,
|
|
120
|
+
icon: page.pxPageViewIcon.replace('pi pi-', ''),
|
|
121
|
+
active: page.pyRuleName === activeTab,
|
|
122
|
+
onClick: () => !page.pyURLContent || page.pyURLContent === ''
|
|
123
|
+
? showPage(page.pyRuleName, page.pyClassName)
|
|
124
|
+
: openURL(page.pyURLContent)
|
|
125
|
+
};
|
|
126
|
+
});
|
|
44
127
|
if (pConn.hasChildren()) {
|
|
45
128
|
// const theChildren = pConn.getChildren();
|
|
46
129
|
// const mapChildCompNames = theChildren.map((child) => { return child.getPConnect().getComponentName()});
|
|
@@ -48,21 +131,32 @@ export default function AppShell(props) {
|
|
|
48
131
|
// console.log(`AppShell has children: ${theChildren.length}`);
|
|
49
132
|
// console.log(`--> ${mapChildCompNames.map((name) => {return name;})}`);
|
|
50
133
|
}
|
|
134
|
+
if (portalTemplate === 'wss') {
|
|
135
|
+
return (React.createElement("div", { id: 'AppShell' },
|
|
136
|
+
React.createElement(WssNavBar, { portalName: portalName, imageSrc: iconURL, fullImageSrc: fullIconURL, appName: localeUtils.getLocaleValue(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()), appInfo: {
|
|
137
|
+
imageSrc: iconURL,
|
|
138
|
+
appName: localeUtils.getLocaleValue(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()),
|
|
139
|
+
onClick: links[0] && links[0].onClick ? links[0].onClick : undefined
|
|
140
|
+
}, navLinks: links.filter((link, index) => {
|
|
141
|
+
return index !== 0;
|
|
142
|
+
}), operator: getOperator(), navDisplayOptions: navDisplayOptions }),
|
|
143
|
+
React.createElement("div", { className: classes.wsscontent }, children)));
|
|
144
|
+
}
|
|
51
145
|
return (React.createElement(NavContext.Provider, { value: { open, setOpen } },
|
|
52
|
-
React.createElement("div", { id:
|
|
146
|
+
React.createElement("div", { id: 'AppShell', className: classes.root },
|
|
53
147
|
React.createElement(NavBar, { pConn: getPConnect(), appName: appNameToDisplay, pages: pages, caseTypes: caseTypes }),
|
|
54
148
|
React.createElement("div", { className: classes.content }, children))));
|
|
55
149
|
}
|
|
56
150
|
AppShell.defaultProps = {
|
|
57
151
|
pages: [],
|
|
58
152
|
caseTypes: [],
|
|
59
|
-
children: []
|
|
153
|
+
children: []
|
|
60
154
|
};
|
|
61
155
|
AppShell.propTypes = {
|
|
62
156
|
showAppName: PropTypes.bool /* .isRequired */,
|
|
63
157
|
pages: PropTypes.arrayOf(PropTypes.object),
|
|
64
158
|
caseTypes: PropTypes.arrayOf(PropTypes.object),
|
|
65
159
|
children: PropTypes.arrayOf(PropTypes.node),
|
|
66
|
-
getPConnect: PropTypes.func.isRequired
|
|
160
|
+
getPConnect: PropTypes.func.isRequired
|
|
67
161
|
};
|
|
68
162
|
//# sourceMappingURL=AppShell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../../src/components/template/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,gBAAgB,CAAC;AAExB,2BAA2B;AAC3B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACvC,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;KAChB;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KAC9B;CACF,CAAC,CAAC,CAAC;AAKJ,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK;IACpC,MAAM,EACJ,KAAK,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,WAAW,GACZ,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEvC,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;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E,OAAO,EAAC;QACzC,6BAAK,EAAE,EAAC,UAAU,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI;YACxC,oBAAC,MAAM,IAAC,KAAK,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAW;YACtG,6BAAK,SAAS,EAAE,OAAO,CAAC,OAAO,IAC5B,QAAQ,CACL,CACF,CACc,CACvB,CAAC;AACJ,CAAC;AAED,QAAQ,CAAC,YAAY,GAAG;IACtB,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;CACb,CAAC;AACF,QAAQ,CAAC,SAAS,GAAG;IACnB,WAAW,EAAE,SAAS,CAAC,IAAI,CAAA,iBAAiB;IAC5C,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;IAC1C,SAAS,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;IAC9C,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC;IAC3C,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CACvC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport { NavContext } from '../../helpers/reactContextHelpers';\nimport './AppShell.css';\n\n// AppShell can emit NavBar\nimport NavBar from '../../infra/NavBar';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n },\n content: {\n flexGrow: 1,\n height: '100vh',\n overflow: 'auto',\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n },\n}));\n\ndeclare const PCore;\n\n\nexport default function AppShell(props) {\n const {\n pages,\n caseTypes,\n showAppName,\n children,\n getPConnect,\n } = props;\n const [open, setOpen] = useState(true);\n\n const pConn = getPConnect();\n const envInfo = PCore.getEnvironmentInfo();\n\n const appNameToDisplay = showAppName ? envInfo.getApplicationLabel() : \"\";\n\n const classes = useStyles();\n\n // useState for appName and mapChildren - note these are ONLY updated once (on component mount!)\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const [appName, setAppName] = useState(\"\");\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const [mapChildren, setMapChildren] = useState([]);\n\n // Initial setting of appName and mapChildren\n useEffect( () => {\n setAppName(PCore.getEnvironmentInfo().getApplicationName());\n\n const tempMap = pConn.getChildren().map((child, index) => {\n const theChildComp = child.getPConnect().getComponentName();\n const theKey = `.${index}`;\n return <div id={theChildComp} key={theKey} style={{border: \"solid 1px silver\", margin: \"1px\"}}>{theChildComp} will be here</div>\n });\n\n setMapChildren(tempMap)\n\n }, []);\n\n if (pConn.hasChildren()) {\n // const theChildren = pConn.getChildren();\n // const mapChildCompNames = theChildren.map((child) => { return child.getPConnect().getComponentName()});\n\n // debugging/investigation help\n // console.log(`AppShell has children: ${theChildren.length}`);\n // console.log(`--> ${mapChildCompNames.map((name) => {return name;})}`);\n }\n\n return (\n\n <NavContext.Provider value={{open, setOpen}}>\n <div id=\"AppShell\" className={classes.root}>\n <NavBar pConn={getPConnect()} appName={appNameToDisplay} pages={pages} caseTypes={caseTypes}></NavBar>\n <div className={classes.content}>\n {children}\n </div>\n </div>\n </NavContext.Provider>\n );\n}\n\nAppShell.defaultProps = {\n pages: [],\n caseTypes: [],\n children: [],\n};\nAppShell.propTypes = {\n showAppName: PropTypes.bool/* .isRequired */,\n pages: PropTypes.arrayOf(PropTypes.object),\n caseTypes: PropTypes.arrayOf(PropTypes.object),\n children: PropTypes.arrayOf(PropTypes.node),\n getPConnect: PropTypes.func.isRequired,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../../src/components/template/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE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,SAAS,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;IAC9C,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC;IAC3C,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CACvC,CAAC","sourcesContent":["import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Utils } from '../../helpers/utils';\nimport Avatar from '@material-ui/core/Avatar';\nimport { NavContext } from '../../helpers/reactContextHelpers';\nimport './AppShell.css';\n\n// AppShell can emit NavBar or WssNavBar\nimport NavBar from '../../infra/NavBar';\nimport WssNavBar from '../../template/WssNavBar';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n display: 'flex'\n },\n content: {\n flexGrow: 1,\n height: '100vh',\n overflow: 'auto',\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n },\n wsscontent: {\n flexGrow: 1,\n height: '100vh',\n overflow: 'auto',\n marginLeft: theme.spacing(1),\n marginRight: theme.spacing(1)\n }\n}));\n\ndeclare const PCore;\n\n\nexport default function AppShell(props) {\n const {\n pages,\n caseTypes,\n showAppName,\n children,\n getPConnect,\n portalTemplate,\n portalName,\n portalLogo,\n navDisplayOptions\n } = props;\n const [open, setOpen] = useState(true);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const [activeTab, setActiveTab] = useState(!pages ? null : pages[0]?.pyRuleName);\n const pConn = getPConnect();\n const envInfo = PCore.getEnvironmentInfo();\n const imageKey = envInfo.getOperatorImageInsKey();\n const userName = envInfo.getOperatorName();\n const currentUserInitials = Utils.getInitials(userName);\n const appNameToDisplay = showAppName ? envInfo.getApplicationLabel() : '';\n const portalClass = pConn.getValue('.classID');\n const envPortalName = envInfo.getPortalName();\n const localeUtils = PCore.getLocaleUtils();\n const classes = useStyles();\n const actionsAPI = pConn.getActionsApi();\n const localeReference = pConn.getValue('.pyLocaleReference');\n const [imageBlobUrl, setImageBlobUrl] = useState(null);\n // useState for appName and mapChildren - note these are ONLY updated once (on component mount!)\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const [appName, setAppName] = useState('');\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const [mapChildren, setMapChildren] = useState([]);\n\n // Initial setting of appName and mapChildren\n useEffect(() => {\n setAppName(PCore.getEnvironmentInfo().getApplicationName());\n\n const tempMap = pConn.getChildren().map((child, index) => {\n const theChildComp = child.getPConnect().getComponentName();\n const theKey = `.${index}`;\n return (\n <div id={theChildComp} key={theKey} style={{ border: 'solid 1px silver', margin: '1px' }}>\n {theChildComp} will be here\n </div>\n );\n });\n\n setMapChildren(tempMap);\n }, []);\n\n const [iconURL, setIconURL] = useState('');\n const [fullIconURL, setFullIconURL] = useState('');\n useEffect(() => {\n // using the default icon then fetch it from the static folder (not auth involved)\n if (\n !portalLogo ||\n portalLogo.toLowerCase().includes('pzpega-logo-mark') ||\n portalLogo.toLowerCase().includes('py-logo') ||\n portalLogo.toLowerCase().includes('py-full-logo')\n ) {\n const portalLogoImage = Utils.getIconPath(PCore.getAssetLoader().getStaticServerUrl()).concat(\n 'pzpega-logo-mark.svg'\n );\n setIconURL(portalLogoImage);\n setFullIconURL(`${PCore.getAssetLoader().getStaticServerUrl()}static/py-full-logo.svg`);\n }\n // not using default icon to fetch it using the way which uses authentication\n else {\n PCore.getAssetLoader()\n .getSvcImage(portalLogo)\n .then(blob => window.URL.createObjectURL(blob))\n .then(data => {\n setIconURL(data);\n setFullIconURL(data);\n })\n .catch(() => {\n // eslint-disable-next-line no-console\n console.error(\n `Unable to load the image for the portal logo/icon with the insName:${portalLogo}`\n );\n });\n }\n }, [portalLogo]);\n\n useEffect(() => {\n if (imageKey && portalTemplate === 'wss') {\n PCore.getAssetLoader()\n .getSvcImage(imageKey)\n .then(blob => window.URL.createObjectURL(blob))\n .then(imagePath => setImageBlobUrl(imagePath));\n }\n }, []);\n\n const getOperator = () => {\n return {\n avatar: portalTemplate !== 'wss' ? <Avatar /> : { name: userName, imageSrc: imageBlobUrl },\n name: userName,\n currentUserInitials\n };\n };\n\n function showPage(viewName, className) {\n actionsAPI.showPage(viewName, className);\n }\n\n function openURL(URL) {\n window.open(URL, '_blank');\n }\n\n const links = !pages\n ? []\n : pages.map(page => {\n const name = localeUtils.getLocaleValue(page.pyLabel, '', localeReference);\n return {\n text: name,\n name,\n icon: page.pxPageViewIcon.replace('pi pi-', ''),\n active: page.pyRuleName === activeTab,\n onClick: () =>\n !page.pyURLContent || page.pyURLContent === ''\n ? showPage(page.pyRuleName, page.pyClassName)\n : openURL(page.pyURLContent)\n };\n });\n\n if (pConn.hasChildren()) {\n // const theChildren = pConn.getChildren();\n // const mapChildCompNames = theChildren.map((child) => { return child.getPConnect().getComponentName()});\n // debugging/investigation help\n // console.log(`AppShell has children: ${theChildren.length}`);\n // console.log(`--> ${mapChildCompNames.map((name) => {return name;})}`);\n }\n\n if (portalTemplate === 'wss') {\n return (\n <div id='AppShell'>\n <WssNavBar\n portalName={portalName}\n imageSrc={iconURL}\n fullImageSrc={fullIconURL}\n appName={localeUtils.getLocaleValue(\n appNameToDisplay,\n '',\n `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()\n )}\n appInfo={{\n imageSrc: iconURL,\n appName: localeUtils.getLocaleValue(\n appNameToDisplay,\n '',\n `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()\n ),\n onClick: links[0] && links[0].onClick ? links[0].onClick : undefined\n }}\n navLinks={links.filter((link, index) => {\n return index !== 0;\n })}\n operator={getOperator()}\n navDisplayOptions={navDisplayOptions}\n />\n <div className={classes.wsscontent}>{children}</div>\n </div>\n\n );\n }\n\n return (\n <NavContext.Provider value={{ open, setOpen }}>\n <div id='AppShell' className={classes.root}>\n <NavBar\n pConn={getPConnect()}\n appName={appNameToDisplay}\n pages={pages}\n caseTypes={caseTypes}\n ></NavBar>\n <div className={classes.content}>{children}</div>\n </div>\n </NavContext.Provider>\n );\n}\n\nAppShell.defaultProps = {\n pages: [],\n caseTypes: [],\n children: []\n};\nAppShell.propTypes = {\n showAppName: PropTypes.bool /* .isRequired */,\n pages: PropTypes.arrayOf(PropTypes.object),\n caseTypes: PropTypes.arrayOf(PropTypes.object),\n children: PropTypes.arrayOf(PropTypes.node),\n getPConnect: PropTypes.func.isRequired\n};\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
declare function BannerPage(props: any): JSX.Element;
|
|
4
|
+
declare namespace BannerPage {
|
|
5
|
+
var propTypes: {
|
|
6
|
+
children: PropTypes.Validator<PropTypes.ReactNodeLike[]>;
|
|
7
|
+
layout: PropTypes.Requireable<string>;
|
|
8
|
+
heading: PropTypes.Requireable<string>;
|
|
9
|
+
message: PropTypes.Requireable<string>;
|
|
10
|
+
imageTheme: PropTypes.Requireable<string>;
|
|
11
|
+
backgroundImage: PropTypes.Requireable<string>;
|
|
12
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
13
|
+
tintImage: PropTypes.Requireable<boolean>;
|
|
14
|
+
};
|
|
15
|
+
var defaultProps: {
|
|
16
|
+
layout: string;
|
|
17
|
+
heading: string;
|
|
18
|
+
message: string;
|
|
19
|
+
imageTheme: string;
|
|
20
|
+
backgroundImage: string;
|
|
21
|
+
backgroundColor: string;
|
|
22
|
+
tintImage: boolean;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export default BannerPage;
|
|
26
|
+
//# sourceMappingURL=BannerPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerPage.d.ts","sourceRoot":"","sources":["../../../../src/components/template/BannerPage/BannerPage.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAOnC,iBAAwB,UAAU,CAAC,KAAK,KAAA,eA+BvC;kBA/BuB,UAAU;;;;;;;;;;;;;;;;;;;;;eAAV,UAAU"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useMemo, Children } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Banner from '../../designSystemExtension/Banner';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
/*
|
|
6
|
+
* BannerPage template.
|
|
7
|
+
*/
|
|
8
|
+
export default function BannerPage(props) {
|
|
9
|
+
const { children, layout, heading, message, imageTheme, backgroundImage, backgroundColor, tintImage } = props;
|
|
10
|
+
const childArray = useMemo(() => {
|
|
11
|
+
return Children.toArray(children);
|
|
12
|
+
}, [children]);
|
|
13
|
+
return (React.createElement(Banner, { variant: layout, a: childArray[0], b: childArray[1], banner: {
|
|
14
|
+
variant: imageTheme,
|
|
15
|
+
backgroundColor,
|
|
16
|
+
title: heading,
|
|
17
|
+
message,
|
|
18
|
+
backgroundImage,
|
|
19
|
+
tintImage
|
|
20
|
+
} }));
|
|
21
|
+
}
|
|
22
|
+
BannerPage.propTypes = {
|
|
23
|
+
children: PropTypes.arrayOf(PropTypes.node).isRequired,
|
|
24
|
+
layout: PropTypes.string,
|
|
25
|
+
heading: PropTypes.string,
|
|
26
|
+
message: PropTypes.string,
|
|
27
|
+
imageTheme: PropTypes.string,
|
|
28
|
+
backgroundImage: PropTypes.string,
|
|
29
|
+
backgroundColor: PropTypes.string,
|
|
30
|
+
tintImage: PropTypes.bool
|
|
31
|
+
};
|
|
32
|
+
BannerPage.defaultProps = {
|
|
33
|
+
layout: 'two-column',
|
|
34
|
+
heading: '',
|
|
35
|
+
message: '',
|
|
36
|
+
imageTheme: 'light',
|
|
37
|
+
backgroundImage: '',
|
|
38
|
+
backgroundColor: '',
|
|
39
|
+
tintImage: false
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=BannerPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerPage.js","sourceRoot":"","sources":["../../../../src/components/template/BannerPage/BannerPage.tsx"],"names":[],"mapp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AO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,OAAO;IACnB,eAAe,EAAE,EAAE;IACnB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE,KAAK;CACjB,CAAC","sourcesContent":["import { useMemo, Children } from 'react';\nimport PropTypes from 'prop-types';\nimport Banner from '../../designSystemExtension/Banner';\nimport React from 'react';\n\n/*\n * BannerPage template.\n */\nexport default function BannerPage(props) {\n const {\n children,\n layout,\n heading,\n message,\n imageTheme,\n backgroundImage,\n backgroundColor,\n tintImage\n } = props;\n\n const childArray = useMemo(() => {\n return Children.toArray(children);\n }, [children]);\n\n return (\n <Banner\n variant={layout}\n a={childArray[0]}\n b={childArray[1]}\n banner={{\n variant: imageTheme,\n backgroundColor,\n title: heading,\n message,\n backgroundImage,\n tintImage\n }}\n />\n );\n}\n\nBannerPage.propTypes = {\n children: PropTypes.arrayOf(PropTypes.node).isRequired,\n layout: PropTypes.string,\n heading: PropTypes.string,\n message: PropTypes.string,\n imageTheme: PropTypes.string,\n backgroundImage: PropTypes.string,\n backgroundColor: PropTypes.string,\n tintImage: PropTypes.bool\n};\n\nBannerPage.defaultProps = {\n layout: 'two-column',\n heading: '',\n message: '',\n imageTheme: 'light',\n backgroundImage: '',\n backgroundColor: '',\n tintImage: false\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/template/BannerPage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/template/BannerPage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { default } from './BannerPage';\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
declare function Confirmation(props: any): JSX.Element | null;
|
|
4
|
+
declare namespace Confirmation {
|
|
5
|
+
var defaultProps: {
|
|
6
|
+
datasource: undefined;
|
|
7
|
+
label: string;
|
|
8
|
+
showLabel: boolean;
|
|
9
|
+
};
|
|
10
|
+
var propTypes: {
|
|
11
|
+
getPConnect: PropTypes.Validator<(...args: any[]) => any>;
|
|
12
|
+
datasource: PropTypes.Requireable<{
|
|
13
|
+
[x: string]: any;
|
|
14
|
+
}>;
|
|
15
|
+
label: PropTypes.Requireable<string>;
|
|
16
|
+
showLabel: PropTypes.Requireable<boolean>;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export default Confirmation;
|
|
20
|
+
//# sourceMappingURL=Confirmation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Confirmation.d.ts","sourceRoot":"","sources":["../../../../src/components/template/Confirmation/Confirmation.tsx"],"names":[],"mappings":";AAIA,OAAO,SAAS,MAAM,YAAY,CAAC;AAsBnC,iBAAwB,YAAY,CAAC,KAAK,KAAA,sBA6DzC;kBA7DuB,YAAY;;;;;;;;;;;;;;;eAAZ,YAAY"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable no-unused-vars */
|
|
3
|
+
/* eslint-disable no-nested-ternary */
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { getToDoAssignments } from '../../infra/Containers/FlowContainer/helpers';
|
|
8
|
+
import ToDo from '../../widget/ToDo';
|
|
9
|
+
import Details from '../Details/Details';
|
|
10
|
+
import { Button, Card, makeStyles } from '@material-ui/core';
|
|
11
|
+
const useStyles = makeStyles(theme => ({
|
|
12
|
+
root: {
|
|
13
|
+
paddingRight: theme.spacing(1),
|
|
14
|
+
paddingLeft: theme.spacing(1),
|
|
15
|
+
paddingTop: theme.spacing(1),
|
|
16
|
+
paddingBottom: theme.spacing(1),
|
|
17
|
+
marginRight: theme.spacing(1),
|
|
18
|
+
marginLeft: theme.spacing(1),
|
|
19
|
+
marginTop: theme.spacing(1),
|
|
20
|
+
marginBottom: theme.spacing(1)
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
23
|
+
export default function Confirmation(props) {
|
|
24
|
+
const classes = useStyles();
|
|
25
|
+
const CONSTS = PCore.getConstants();
|
|
26
|
+
const [showConfirmView, setShowConfirmView] = useState(true);
|
|
27
|
+
const { showTasks, getPConnect, datasource } = props;
|
|
28
|
+
// Get the inherited props from the parent to determine label settings
|
|
29
|
+
// Not using whatsNext at the moment, need to figure out the use of it
|
|
30
|
+
const whatsNext = datasource?.source;
|
|
31
|
+
const items = whatsNext.length > 0 ? whatsNext.map(item => item.label) : '';
|
|
32
|
+
const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(getPConnect().getTarget());
|
|
33
|
+
const rootInfo = PCore.getContainerUtils().getContainerItemData(getPConnect().getTarget(), activeContainerItemID);
|
|
34
|
+
const onConfirmViewClose = () => {
|
|
35
|
+
setShowConfirmView(false);
|
|
36
|
+
PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CLOSE_CONFIRM_VIEW, rootInfo);
|
|
37
|
+
};
|
|
38
|
+
const todoProps = { ...props, renderTodoInConfirm: true };
|
|
39
|
+
const toDoList = getToDoAssignments(getPConnect());
|
|
40
|
+
const detailProps = { ...props, showLabel: false };
|
|
41
|
+
const showDetails = detailProps?.children?.[0]?.props?.getPConnect()?.getChildren()?.length > 0;
|
|
42
|
+
return showConfirmView ? (React.createElement(Card, { className: classes.root },
|
|
43
|
+
React.createElement("h2", { id: 'confirm-label' }, props.showLabel ? props.label : ''),
|
|
44
|
+
showDetails ? React.createElement(Details, { ...detailProps }) : undefined,
|
|
45
|
+
showTasks ? (toDoList && toDoList.length > 0 ? (React.createElement(ToDo, { ...todoProps, datasource: { source: toDoList }, getPConnect: getPConnect, type: CONSTS.TODO, headerText: 'Open Tasks', isConfirm: true })) : undefined) : undefined,
|
|
46
|
+
React.createElement("div", { style: { display: 'flex', justifyContent: 'flex-end' } },
|
|
47
|
+
React.createElement(Button, { variant: 'contained', color: 'primary', onClick: onConfirmViewClose }, "Done")))) : toDoList && toDoList.length > 0 ? (React.createElement(Card, { className: classes.root },
|
|
48
|
+
React.createElement(ToDo, { ...props, datasource: { source: toDoList }, getPConnect: getPConnect, type: CONSTS.TODO, headerText: 'Tasks', isConfirm: true }))) : null;
|
|
49
|
+
}
|
|
50
|
+
Confirmation.defaultProps = {
|
|
51
|
+
datasource: undefined,
|
|
52
|
+
label: '',
|
|
53
|
+
showLabel: true
|
|
54
|
+
};
|
|
55
|
+
Confirmation.propTypes = {
|
|
56
|
+
getPConnect: PropTypes.func.isRequired,
|
|
57
|
+
datasource: PropTypes.objectOf(PropTypes.any),
|
|
58
|
+
label: PropTypes.string,
|
|
59
|
+
showLabel: PropTypes.bool
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=Confirmation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Confirmation.js","sourceRoot":"","sources":["../../../../src/components/template/Confirmation/Confirmation.tsx"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,mCAAmC;AACnC,sCAAsC;AACtC,OAAO,EAAY,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,OAAO,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI7D,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CA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C,YAAY,EACvB,SAAS,SACT,CACH,CAAC,CAAC,CAAC,SAAS,CACd,CAAC,CAAC,CAAC,SAAS;QACb,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE;YACzD,oBAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,kBAAkB,WAE9D,CACL,CACD,CACR,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACpC,oBAAC,IAAI,IAAC,SAAS,EAAE,OAAO,CAAC,IAAI;QAC3B,oBAAC,IAAI,OACC,KAAK,EACT,UAAU,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAChC,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,UAAU,EAAC,OAAO,EAClB,SAAS,SACT,CACG,CACR,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,YAAY,CAAC,YAAY,GAAG;IAC1B,UAAU,EAAE,SAAS;IACrB,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF,YAAY,CAAC,SAAS,GAAG;IACvB,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACtC,UAAU,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;IAC7C,KAAK,EAAE,SAAS,CAAC,MAAM;IACvB,SAAS,EAAE,SAAS,CAAC,IAAI;CAC1B,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-unused-vars */\n/* eslint-disable no-nested-ternary */\nimport { Fragment, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { getToDoAssignments } from '../../infra/Containers/FlowContainer/helpers';\nimport ToDo from '../../widget/ToDo';\nimport Details from '../Details/Details';\nimport { Button, Card, makeStyles } from '@material-ui/core';\n\ndeclare const PCore;\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n }\n}));\n\nexport default function Confirmation(props) {\n const classes = useStyles();\n const CONSTS = PCore.getConstants();\n const [showConfirmView, setShowConfirmView] = useState(true);\n const { showTasks, getPConnect, datasource } = props;\n // Get the inherited props from the parent to determine label settings\n // Not using whatsNext at the moment, need to figure out the use of it\n const whatsNext = datasource?.source;\n const items = whatsNext.length > 0 ? whatsNext.map(item => item.label) : '';\n const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(\n getPConnect().getTarget()\n );\n const rootInfo = PCore.getContainerUtils().getContainerItemData(\n getPConnect().getTarget(),\n activeContainerItemID\n );\n const onConfirmViewClose = () => {\n setShowConfirmView(false);\n PCore.getPubSubUtils().publish(\n PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CLOSE_CONFIRM_VIEW,\n rootInfo\n );\n };\n const todoProps = { ...props, renderTodoInConfirm: true };\n const toDoList = getToDoAssignments(getPConnect());\n const detailProps = { ...props, showLabel: false };\n const showDetails = detailProps?.children?.[0]?.props?.getPConnect()?.getChildren()?.length > 0;\n return showConfirmView ? (\n <Card className={classes.root}>\n <h2 id='confirm-label'>{props.showLabel ? props.label : ''}</h2>\n {showDetails ? <Details {...detailProps} /> : undefined}\n {showTasks ? (\n toDoList && toDoList.length > 0 ? (\n <ToDo\n {...todoProps}\n datasource={{ source: toDoList }}\n getPConnect={getPConnect}\n type={CONSTS.TODO}\n headerText='Open Tasks'\n isConfirm\n />\n ) : undefined\n ) : undefined}\n <div style={{ display: 'flex', justifyContent: 'flex-end' }}>\n <Button variant='contained' color='primary' onClick={onConfirmViewClose}>\n Done\n </Button>\n </div>\n </Card>\n ) : toDoList && toDoList.length > 0 ? (\n <Card className={classes.root}>\n <ToDo\n {...props}\n datasource={{ source: toDoList }}\n getPConnect={getPConnect}\n type={CONSTS.TODO}\n headerText='Tasks'\n isConfirm\n />\n </Card>\n ) : null;\n}\n\nConfirmation.defaultProps = {\n datasource: undefined,\n label: '',\n showLabel: true\n};\n\nConfirmation.propTypes = {\n getPConnect: PropTypes.func.isRequired,\n datasource: PropTypes.objectOf(PropTypes.any),\n label: PropTypes.string,\n showLabel: PropTypes.bool\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/template/Confirmation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/template/Confirmation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export { default } from './Confirmation';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WssNavBar.d.ts","sourceRoot":"","sources":["../../../../src/components/template/WssNavBar/WssNavBar.tsx"],"names":[],"mappings":";AAWA,OAAO,iBAAiB,CAAC;AAuBzB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,KAAA,eA0GtC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
3
|
+
import AppBar from '@material-ui/core/AppBar';
|
|
4
|
+
import Box from '@material-ui/core/Box';
|
|
5
|
+
import Toolbar from '@material-ui/core/Toolbar';
|
|
6
|
+
import Container from '@material-ui/core/Container';
|
|
7
|
+
import { IconButton, Menu, MenuItem, Typography } from '@material-ui/core';
|
|
8
|
+
import { Button } from '@material-ui/core';
|
|
9
|
+
import Avatar from '@material-ui/core/Avatar';
|
|
10
|
+
import MenuIcon from '@material-ui/icons/Menu';
|
|
11
|
+
import { logout } from '../../helpers/authManager';
|
|
12
|
+
import './WssNavBar.css';
|
|
13
|
+
const useStyles = makeStyles(theme => ({
|
|
14
|
+
root: {
|
|
15
|
+
display: 'flex'
|
|
16
|
+
},
|
|
17
|
+
content: {
|
|
18
|
+
flexGrow: 1,
|
|
19
|
+
height: '100vh',
|
|
20
|
+
marginLeft: theme.spacing(2),
|
|
21
|
+
marginRight: theme.spacing(2)
|
|
22
|
+
},
|
|
23
|
+
appListLogo: {
|
|
24
|
+
width: '3.6rem'
|
|
25
|
+
},
|
|
26
|
+
appName: {
|
|
27
|
+
color: 'white',
|
|
28
|
+
marginLeft: theme.spacing(2),
|
|
29
|
+
marginRight: theme.spacing(4),
|
|
30
|
+
fontSize: '1.5rem'
|
|
31
|
+
}
|
|
32
|
+
}));
|
|
33
|
+
export default function WssNavBar(props) {
|
|
34
|
+
const { appInfo, navLinks, operator, navDisplayOptions } = props;
|
|
35
|
+
const { alignment } = navDisplayOptions;
|
|
36
|
+
const classes = useStyles();
|
|
37
|
+
const [anchorElNav, setAnchorElNav] = useState(null);
|
|
38
|
+
const [anchorElUser, setAnchorElUser] = useState(null);
|
|
39
|
+
const handleOpenNavMenu = (event) => {
|
|
40
|
+
setAnchorElNav(event.currentTarget);
|
|
41
|
+
};
|
|
42
|
+
const handleOpenUserMenu = (event) => {
|
|
43
|
+
setAnchorElUser(event.currentTarget);
|
|
44
|
+
};
|
|
45
|
+
const handleCloseNavMenu = () => {
|
|
46
|
+
setAnchorElNav(null);
|
|
47
|
+
};
|
|
48
|
+
const handleCloseUserMenu = () => {
|
|
49
|
+
setAnchorElUser(null);
|
|
50
|
+
};
|
|
51
|
+
return (React.createElement("div", { id: 'NavBar' },
|
|
52
|
+
React.createElement(AppBar, { position: 'static', color: 'primary' },
|
|
53
|
+
React.createElement(Container, { maxWidth: 'xl' },
|
|
54
|
+
React.createElement(Toolbar, { disableGutters: true },
|
|
55
|
+
React.createElement(Button, { style: { textTransform: 'capitalize' }, onClick: appInfo.onClick },
|
|
56
|
+
React.createElement("img", { src: appInfo.imageSrc, className: classes.appListLogo }),
|
|
57
|
+
React.createElement("span", { className: classes.appName }, appInfo.appName)),
|
|
58
|
+
React.createElement(Box, { sx: { flexGrow: 1, display: { xs: 'flex', md: 'none' } } },
|
|
59
|
+
React.createElement(IconButton, { size: 'small', "aria-label": 'account of current user', "aria-controls": 'menu-appbar', "aria-haspopup": 'true', onClick: handleOpenNavMenu, color: 'inherit' },
|
|
60
|
+
React.createElement(MenuIcon, null)),
|
|
61
|
+
React.createElement(Menu, { id: 'menu-appbar', anchorEl: anchorElNav, anchorOrigin: {
|
|
62
|
+
vertical: 'bottom',
|
|
63
|
+
horizontal: 'left'
|
|
64
|
+
}, keepMounted: true, transformOrigin: {
|
|
65
|
+
vertical: 'top',
|
|
66
|
+
horizontal: 'left'
|
|
67
|
+
}, open: Boolean(anchorElNav), onClose: handleCloseNavMenu }, navLinks.map(link => (React.createElement(MenuItem, { key: link.text, onClick: link.onClick },
|
|
68
|
+
React.createElement(Typography, null, link.text)))))),
|
|
69
|
+
React.createElement(Box, { sx: { flexGrow: 1, display: { xs: 'none', md: 'flex' } }, style: { justifyContent: alignment } }, navLinks.map(link => (React.createElement(Button, { className: 'link-style', key: link.text, onClick: link.onClick }, link.text)))),
|
|
70
|
+
React.createElement(Box, { sx: { flexGrow: 0 } },
|
|
71
|
+
React.createElement(IconButton, { onClick: handleOpenUserMenu },
|
|
72
|
+
React.createElement(Avatar, null, operator.currentUserInitials)),
|
|
73
|
+
React.createElement(Menu, { id: 'menu-appbar', anchorEl: anchorElUser, anchorOrigin: {
|
|
74
|
+
vertical: 'top',
|
|
75
|
+
horizontal: 'right'
|
|
76
|
+
}, keepMounted: true, transformOrigin: {
|
|
77
|
+
vertical: 'top',
|
|
78
|
+
horizontal: 'right'
|
|
79
|
+
}, open: Boolean(anchorElUser), onClose: handleCloseUserMenu },
|
|
80
|
+
React.createElement(MenuItem, { onClick: logout },
|
|
81
|
+
React.createElement(Typography, null, "Logout")))))))));
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=WssNavBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WssNavBar.js","sourceRoot":"","sources":["../../../../src/components/template/WssNavBar/WssNavBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,OAAO,MAAM,2BAA2B,CAAC;AAChD,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,iBAAiB,CAAC;AAEzB,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;KAChB;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,OAAO;QACf,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KAC9B;IACD,WAAW,EAAE;QACX,KAAK,EAAE,QAAQ;KAChB;IACD,OAAO,EAAE;QACP,KAAK,EAAE,OAAO;QACd,UAAU,EAAE,KAAK,CA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AC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACpB,oBAAC,MAAM,IAAC,SAAS,EAAC,YAAY,EAAC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IACjE,IAAI,CAAC,IAAI,CACH,CACV,CAAC,CACE;oBAEN,oBAAC,GAAG,IAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;wBACtB,oBAAC,UAAU,IAAC,OAAO,EAAE,kBAAkB;4BACrC,oBAAC,MAAM,QAAE,QAAQ,CAAC,mBAAmB,CAAU,CACpC;wBACb,oBAAC,IAAI,IACH,EAAE,EAAC,aAAa,EAChB,QAAQ,EAAE,YAAY,EACtB,YAAY,EAAE;gCACZ,QAAQ,EAAE,KAAK;gCACf,UAAU,EAAE,OAAO;6BACpB,EACD,WAAW,QACX,eAAe,EAAE;gCACf,QAAQ,EAAE,KAAK;gCACf,UAAU,EAAE,OAAO;6BACpB,EACD,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,EAC3B,OAAO,EAAE,mBAAmB;4BAE5B,oBAAC,QAAQ,IAAC,OAAO,EAAE,MAAM;gCACvB,oBAAC,UAAU,iBAAoB,CACtB,CACN,CACH,CACE,CACA,CACL,CACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport AppBar from '@material-ui/core/AppBar';\nimport Box from '@material-ui/core/Box';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport Container from '@material-ui/core/Container';\nimport { IconButton, Menu, MenuItem, Typography } from '@material-ui/core';\nimport { Button } from '@material-ui/core';\nimport Avatar from '@material-ui/core/Avatar';\nimport MenuIcon from '@material-ui/icons/Menu';\nimport { logout } from '../../helpers/authManager';\nimport './WssNavBar.css';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n display: 'flex'\n },\n content: {\n flexGrow: 1,\n height: '100vh',\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n },\n appListLogo: {\n width: '3.6rem'\n },\n appName: {\n color: 'white',\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(4),\n fontSize: '1.5rem'\n }\n}));\n\nexport default function WssNavBar(props) {\n const { appInfo, navLinks, operator, navDisplayOptions } = props;\n const { alignment } = navDisplayOptions;\n const classes = useStyles();\n\n const [anchorElNav, setAnchorElNav] = useState<null | HTMLElement>(null);\n const [anchorElUser, setAnchorElUser] = useState<null | HTMLElement>(null);\n\n const handleOpenNavMenu = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorElNav(event.currentTarget);\n };\n const handleOpenUserMenu = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorElUser(event.currentTarget);\n };\n\n const handleCloseNavMenu = () => {\n setAnchorElNav(null);\n };\n\n const handleCloseUserMenu = () => {\n setAnchorElUser(null);\n };\n\n return (\n <div id='NavBar'>\n <AppBar position='static' color='primary'>\n <Container maxWidth='xl'>\n <Toolbar disableGutters>\n <Button style={{ textTransform: 'capitalize' }} onClick={appInfo.onClick}>\n <img src={appInfo.imageSrc} className={classes.appListLogo} />\n <span className={classes.appName}>{appInfo.appName}</span>\n </Button>\n <Box sx={{ flexGrow: 1, display: { xs: 'flex', md: 'none' } }}>\n <IconButton\n size='small'\n aria-label='account of current user'\n aria-controls='menu-appbar'\n aria-haspopup='true'\n onClick={handleOpenNavMenu}\n color='inherit'\n >\n <MenuIcon />\n </IconButton>\n <Menu\n id='menu-appbar'\n anchorEl={anchorElNav}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'left'\n }}\n keepMounted\n transformOrigin={{\n vertical: 'top',\n horizontal: 'left'\n }}\n open={Boolean(anchorElNav)}\n onClose={handleCloseNavMenu}\n >\n {navLinks.map(link => (\n <MenuItem key={link.text} onClick={link.onClick}>\n <Typography>{link.text}</Typography>\n </MenuItem>\n ))}\n </Menu>\n </Box>\n\n <Box\n sx={{ flexGrow: 1, display: { xs: 'none', md: 'flex' } }}\n style={{ justifyContent: alignment }}\n >\n {navLinks.map(link => (\n <Button className='link-style' key={link.text} onClick={link.onClick}>\n {link.text}\n </Button>\n ))}\n </Box>\n\n <Box sx={{ flexGrow: 0 }}>\n <IconButton onClick={handleOpenUserMenu}>\n <Avatar>{operator.currentUserInitials}</Avatar>\n </IconButton>\n <Menu\n id='menu-appbar'\n anchorEl={anchorElUser}\n anchorOrigin={{\n vertical: 'top',\n horizontal: 'right'\n }}\n keepMounted\n transformOrigin={{\n vertical: 'top',\n horizontal: 'right'\n }}\n open={Boolean(anchorElUser)}\n onClose={handleCloseUserMenu}\n >\n <MenuItem onClick={logout}>\n <Typography>Logout</Typography>\n </MenuItem>\n </Menu>\n </Box>\n </Toolbar>\n </Container>\n </AppBar>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/template/WssNavBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/template/WssNavBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { default } from './WssNavBar';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":";AAKA,OAAO,kBAAkB,CAAC;AAW1B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,KAAA,
|
|
1
|
+
{"version":3,"file":"Attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":";AAKA,OAAO,kBAAkB,CAAC;AAW1B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,KAAA,eAucvC"}
|
|
@@ -367,12 +367,12 @@ export default function Attachment(props) {
|
|
|
367
367
|
isArrayDeepMerge: false
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
|
-
PCore.getPubSubUtils().subscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, resetAttachmentStoredState, caseID);
|
|
371
|
-
return () => {
|
|
372
|
-
PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, caseID);
|
|
373
|
-
};
|
|
374
370
|
}
|
|
375
371
|
}
|
|
372
|
+
PCore.getPubSubUtils().subscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, resetAttachmentStoredState, caseID);
|
|
373
|
+
return () => {
|
|
374
|
+
PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION, caseID);
|
|
375
|
+
};
|
|
376
376
|
}, []);
|
|
377
377
|
let content = (React.createElement("div", { className: 'file-div' },
|
|
378
378
|
file.inProgress && (React.createElement("div", { className: "progress-div" },
|