@pega/react-sdk-components 0.23.18 → 0.23.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.
- package/lib/components/helpers/authManager.d.ts.map +1 -1
- package/lib/components/helpers/authManager.js +1 -0
- package/lib/components/helpers/authManager.js.map +1 -1
- package/lib/components/helpers/event-utils.js +1 -1
- package/lib/components/helpers/event-utils.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/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +3 -49
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +0 -50
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +1 -2
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +3 -2
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +2 -323
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- 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 +47 -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/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +5 -39
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +3 -20
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +10 -4
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +30 -7
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +33 -0
- package/lib/sdk-pega-component-map.d.ts +2 -0
- package/lib/sdk-pega-component-map.js +2 -0
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,16 +2,8 @@ import React, { useEffect, useState } from "react";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
4
|
import { NavContext } from '../../helpers/reactContextHelpers';
|
|
5
|
-
// import {
|
|
6
|
-
// Avatar,
|
|
7
|
-
// Toaster,
|
|
8
|
-
// Banner,
|
|
9
|
-
// AppShell as CosmosAppShell
|
|
10
|
-
// } from "@pega/cosmos-react-core";
|
|
11
|
-
// import createPConnectComponent from "../../../bridge/react_pconnect";
|
|
12
|
-
// import { buildRecentList, onRecentClickHandler } from "./Recents/utils";
|
|
13
5
|
import './AppShell.css';
|
|
14
|
-
// AppShell can emit NavBar
|
|
6
|
+
// AppShell can emit NavBar
|
|
15
7
|
import NavBar from '../../infra/NavBar';
|
|
16
8
|
const useStyles = makeStyles((theme) => ({
|
|
17
9
|
root: {
|
|
@@ -25,286 +17,13 @@ const useStyles = makeStyles((theme) => ({
|
|
|
25
17
|
marginRight: theme.spacing(2),
|
|
26
18
|
},
|
|
27
19
|
}));
|
|
28
|
-
/*
|
|
29
|
-
* The wrapper handles knowing how to take in just children and mapping
|
|
30
|
-
* to the Cosmos template. This could be a combination of things but it knows...
|
|
31
|
-
*/
|
|
32
20
|
export default function AppShell(props) {
|
|
33
21
|
const { pages, caseTypes, showAppName, children, getPConnect, } = props;
|
|
34
22
|
const [open, setOpen] = useState(true);
|
|
35
23
|
const pConn = getPConnect();
|
|
36
|
-
// const actionsAPI = pConn.getActionsApi();
|
|
37
24
|
const envInfo = PCore.getEnvironmentInfo();
|
|
38
|
-
// const bannerRef = useRef(null);
|
|
39
|
-
// const hasBanner = httpMessages && httpMessages.length ? httpMessages.length > 0 : false;
|
|
40
25
|
const appNameToDisplay = showAppName ? envInfo.getApplicationLabel() : "";
|
|
41
26
|
const classes = useStyles();
|
|
42
|
-
// let banners = null;
|
|
43
|
-
// banners = hasBanner && (
|
|
44
|
-
// <Banner
|
|
45
|
-
// ref={bannerRef}
|
|
46
|
-
// id="appShellBanner"
|
|
47
|
-
// variant="urgent"
|
|
48
|
-
// heading="Error"
|
|
49
|
-
// onDismiss={() =>
|
|
50
|
-
// pConn.clearErrorMessages({
|
|
51
|
-
// category: "HTTP",
|
|
52
|
-
// context: null
|
|
53
|
-
// })
|
|
54
|
-
// }
|
|
55
|
-
// messages={httpMessages}
|
|
56
|
-
// />
|
|
57
|
-
// );
|
|
58
|
-
// useEffect(() => {
|
|
59
|
-
// if (hasBanner && bannerRef.current) {
|
|
60
|
-
// bannerRef.current.focus();
|
|
61
|
-
// window.scrollTo(0, bannerRef.current.offsetTop);
|
|
62
|
-
// }
|
|
63
|
-
// }, [hasBanner]);
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* Function to dispatch a show page action for the page links in
|
|
67
|
-
* the left nav of the app shell
|
|
68
|
-
*
|
|
69
|
-
* @param {string} searchString Name of view to show
|
|
70
|
-
*/
|
|
71
|
-
// function showSearchResults(searchString) {
|
|
72
|
-
// if (searchString === "") {
|
|
73
|
-
// actionsAPI.showPage("pySearchPage", "Data-Portal");
|
|
74
|
-
// return;
|
|
75
|
-
// }
|
|
76
|
-
// const searchTerm = searchString.replace(/['"]+/g, "");
|
|
77
|
-
// PCore.getDataApiUtils()
|
|
78
|
-
// .getData(
|
|
79
|
-
// "D_pySearch",
|
|
80
|
-
// `{"dataViewParameters": {"SearchString": "${encodeURIComponent(
|
|
81
|
-
// searchTerm
|
|
82
|
-
// )}"}}`
|
|
83
|
-
// )
|
|
84
|
-
// .then((response) => {
|
|
85
|
-
// if (
|
|
86
|
-
// response.data.data !== null &&
|
|
87
|
-
// response.data.resultCount === 1 &&
|
|
88
|
-
// response.data.data[0].pyID === searchTerm
|
|
89
|
-
// ) {
|
|
90
|
-
// /* This is a match for a work item - then we will open it */
|
|
91
|
-
// pConn
|
|
92
|
-
// .getActionsApi()
|
|
93
|
-
// .openWorkByHandle(
|
|
94
|
-
// response.data.data[0].pzInsKey,
|
|
95
|
-
// response.data.data[0].pzCategoryActionKeys
|
|
96
|
-
// );
|
|
97
|
-
// return;
|
|
98
|
-
// }
|
|
99
|
-
// // window.searchResults = {
|
|
100
|
-
// // searchString: searchTerm,
|
|
101
|
-
// // results: response.data
|
|
102
|
-
// // };
|
|
103
|
-
// actionsAPI.showPage("pySearchPage", "Data-Portal");
|
|
104
|
-
// });
|
|
105
|
-
// }
|
|
106
|
-
/**
|
|
107
|
-
*
|
|
108
|
-
* Function to dispatch a show page action for the page links in
|
|
109
|
-
* the left nav of the app shell
|
|
110
|
-
*
|
|
111
|
-
* @param {string} viewName Name of view to show
|
|
112
|
-
* @param {string} className Pega Applies to class of the page
|
|
113
|
-
*/
|
|
114
|
-
// function showPage(viewName, className) {
|
|
115
|
-
// actionsAPI.showPage(viewName, className);
|
|
116
|
-
// }
|
|
117
|
-
/**
|
|
118
|
-
*
|
|
119
|
-
* Function to dispatch a create work action
|
|
120
|
-
* @param {string} className - placeholder string of case type being created
|
|
121
|
-
*/
|
|
122
|
-
// function createWork(className) {
|
|
123
|
-
// actionsAPI
|
|
124
|
-
// .createWork(className)
|
|
125
|
-
// .catch((error) =>
|
|
126
|
-
// // eslint-disable-next-line no-console
|
|
127
|
-
// console.log("Error in case creation: ", error?.message)
|
|
128
|
-
// );
|
|
129
|
-
// }
|
|
130
|
-
/**
|
|
131
|
-
* Returns the Custome Component for each active case
|
|
132
|
-
*/
|
|
133
|
-
// const VisualComponent = useCallback(
|
|
134
|
-
// (context) => {
|
|
135
|
-
// if (activeCases && activeCases.length > 0) {
|
|
136
|
-
// const meta = PCore.getViewResources().fetchViewResources(
|
|
137
|
-
// "pyCaseVisual",
|
|
138
|
-
// getPConnect(),
|
|
139
|
-
// PCore.getStoreValue(".caseTypeID", "caseInfo", context)
|
|
140
|
-
// );
|
|
141
|
-
// if (meta?.config && !meta.config.defaultVisual) {
|
|
142
|
-
// const config = {
|
|
143
|
-
// meta,
|
|
144
|
-
// options: {
|
|
145
|
-
// context,
|
|
146
|
-
// pageReference: "caseInfo.content"
|
|
147
|
-
// }
|
|
148
|
-
// };
|
|
149
|
-
// const visualConfig = PCore.createPConnect(config);
|
|
150
|
-
// return React.createElement(createPConnectComponent(), visualConfig);
|
|
151
|
-
// }
|
|
152
|
-
// }
|
|
153
|
-
// return undefined;
|
|
154
|
-
// },
|
|
155
|
-
// [getPConnect, activeCases]
|
|
156
|
-
// );
|
|
157
|
-
/**
|
|
158
|
-
* Transforms the active cases information into the model that cosmos expect.
|
|
159
|
-
*/
|
|
160
|
-
// function getActiveCases() {
|
|
161
|
-
// if (activeCases) {
|
|
162
|
-
// const activeCaseLinks = [];
|
|
163
|
-
// activeCases.forEach((activeCase) => {
|
|
164
|
-
// const { caseID, className, workID, active, context } = activeCase;
|
|
165
|
-
// // activeCaseLinks.push({
|
|
166
|
-
// // onDismiss: () => {
|
|
167
|
-
// // PCore.getContainerUtils().closeContainerItem(
|
|
168
|
-
// // activeCase.containerItemID
|
|
169
|
-
// // );
|
|
170
|
-
// // },
|
|
171
|
-
// // key: caseID,
|
|
172
|
-
// // name: caseID,
|
|
173
|
-
// // onClick: () => {
|
|
174
|
-
// // actionsAPI.openWorkByHandle(workID, className);
|
|
175
|
-
// // },
|
|
176
|
-
// // active,
|
|
177
|
-
// // visual: VisualComponent(context)
|
|
178
|
-
// // });
|
|
179
|
-
// });
|
|
180
|
-
// return activeCaseLinks;
|
|
181
|
-
// }
|
|
182
|
-
// return activeCases;
|
|
183
|
-
// }
|
|
184
|
-
/**
|
|
185
|
-
* Translate Pega Data Page into the model that Cosmos expects
|
|
186
|
-
*
|
|
187
|
-
* Example:
|
|
188
|
-
* pxPageViewIcon: "pi pi-home-solid"
|
|
189
|
-
* pxURLPath: "Home"
|
|
190
|
-
* pyClassName: "Data-Portal"
|
|
191
|
-
* pyLabel: "Home"
|
|
192
|
-
* pyRuleName: "pyHome"
|
|
193
|
-
*/
|
|
194
|
-
// const links = !pages
|
|
195
|
-
// ? []
|
|
196
|
-
// : pages.map((page) => {
|
|
197
|
-
// return {
|
|
198
|
-
// name: page.pyLabel,
|
|
199
|
-
// icon: page.pxPageViewIcon.replace("pi pi-", ""),
|
|
200
|
-
// onClick: () => showPage(page.pyRuleName, page.pyClassName)
|
|
201
|
-
// };
|
|
202
|
-
// });
|
|
203
|
-
// const userName = envInfo.getOperatorName();
|
|
204
|
-
// const imageKey = envInfo.getOperatorImageInsKey();
|
|
205
|
-
// const logOffAction = () => {
|
|
206
|
-
// actionsAPI.logout().then(() => window?.top?.location?.reload());
|
|
207
|
-
// };
|
|
208
|
-
// const getOperator = () => {
|
|
209
|
-
// const operatorActions = [
|
|
210
|
-
// [{ text: "Logoff", id: "1", onClick: logOffAction }]
|
|
211
|
-
// ];
|
|
212
|
-
// if (imageKey) {
|
|
213
|
-
// return {
|
|
214
|
-
// avatar: (
|
|
215
|
-
// <div id="AvatarWithImageKey">Avatar with image key</div>
|
|
216
|
-
// // <Avatar
|
|
217
|
-
// // name={userName}
|
|
218
|
-
// // imageSrc={getPConnect().getImagePath(imageKey)}
|
|
219
|
-
// // />
|
|
220
|
-
// ),
|
|
221
|
-
// actions: operatorActions,
|
|
222
|
-
// name: userName
|
|
223
|
-
// };
|
|
224
|
-
// }
|
|
225
|
-
// return {
|
|
226
|
-
// avatar: (
|
|
227
|
-
// <div id="Avatar">Avatar</div>
|
|
228
|
-
// // <Avatar name={userName}>
|
|
229
|
-
// // {userName
|
|
230
|
-
// // .split(" ")
|
|
231
|
-
// // .map((i) => i.charAt(0))
|
|
232
|
-
// // .join("")
|
|
233
|
-
// // .toUpperCase()}
|
|
234
|
-
// // </Avatar>
|
|
235
|
-
// ),
|
|
236
|
-
// actions: operatorActions,
|
|
237
|
-
// name: userName
|
|
238
|
-
// };
|
|
239
|
-
// };
|
|
240
|
-
/**
|
|
241
|
-
* Translate Case Types page into what is expected by Cosmos
|
|
242
|
-
*
|
|
243
|
-
* Example:
|
|
244
|
-
* pyClassName: ""
|
|
245
|
-
* pyFlowType: ""
|
|
246
|
-
* pyLabel: "No case types defined"
|
|
247
|
-
*/
|
|
248
|
-
// const cases = !caseTypes
|
|
249
|
-
// ? []
|
|
250
|
-
// : caseTypes.map((caseType) => {
|
|
251
|
-
// let action = {};
|
|
252
|
-
// // Only add actions to entries with a class name to create so in case of empty message no action is added
|
|
253
|
-
// if (caseType.pyClassName) {
|
|
254
|
-
// action = { onClick: () => createWork(caseType.pyClassName) };
|
|
255
|
-
// }
|
|
256
|
-
// return {
|
|
257
|
-
// name: caseType.pyLabel,
|
|
258
|
-
// ...action
|
|
259
|
-
// };
|
|
260
|
-
// });
|
|
261
|
-
// const [recents, setRecents] = useState([]);
|
|
262
|
-
// const [searchVal, setSearchVal] = useState("");
|
|
263
|
-
// // default the icon to be empty. This will cause the image to be initially broken.
|
|
264
|
-
// const [iconURL, setIconURL] = useState("");
|
|
265
|
-
// useEffect(() => {
|
|
266
|
-
// // using the default icon then fetch it from the static folder (not auth involved)
|
|
267
|
-
// if (
|
|
268
|
-
// !portalLogo ||
|
|
269
|
-
// portalLogo.toLowerCase().includes("pzpega-logo-mark") ||
|
|
270
|
-
// portalLogo.toLowerCase().includes("py-logo")
|
|
271
|
-
// ) {
|
|
272
|
-
// setIconURL(
|
|
273
|
-
// `${PCore.getAssetLoader().getStaticServerUrl()}static/py-logo.svg`
|
|
274
|
-
// );
|
|
275
|
-
// }
|
|
276
|
-
// // not using default icon to fetch it using the way which uses authentication
|
|
277
|
-
// else {
|
|
278
|
-
// PCore.getAssetLoader()
|
|
279
|
-
// .getSvcImage(portalLogo)
|
|
280
|
-
// .then((data) => {
|
|
281
|
-
// setIconURL(window.URL.createObjectURL(data));
|
|
282
|
-
// })
|
|
283
|
-
// .catch(() => {
|
|
284
|
-
// console.error(
|
|
285
|
-
// `Unable to load the image for the portal logo/icon with the insName:${portalLogo}`
|
|
286
|
-
// );
|
|
287
|
-
// });
|
|
288
|
-
// }
|
|
289
|
-
// }, [portalLogo]);
|
|
290
|
-
/**
|
|
291
|
-
* To fetch recents and translate items into what Cosmos expects
|
|
292
|
-
*/
|
|
293
|
-
// const fetchRecents = () => {
|
|
294
|
-
// actionsAPI.getRecents(15).then((response) => {
|
|
295
|
-
// const recentsitems = response.data.recents;
|
|
296
|
-
// // setRecents(buildRecentList(recentsitems));
|
|
297
|
-
// });
|
|
298
|
-
// };
|
|
299
|
-
/**
|
|
300
|
-
* To handle on click of any recent item after the drawer is open
|
|
301
|
-
*
|
|
302
|
-
* @param {*} id : Recent item unique id
|
|
303
|
-
*/
|
|
304
|
-
// const onItemClick = (id, e) => {
|
|
305
|
-
// e.preventDefault();
|
|
306
|
-
// // onRecentClickHandler(id, actionsAPI);
|
|
307
|
-
// };
|
|
308
27
|
// useState for appName and mapChildren - note these are ONLY updated once (on component mount!)
|
|
309
28
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
310
29
|
const [appName, setAppName] = useState("");
|
|
@@ -332,58 +51,18 @@ export default function AppShell(props) {
|
|
|
332
51
|
return (React.createElement(NavContext.Provider, { value: { open, setOpen } },
|
|
333
52
|
React.createElement("div", { id: "AppShell", className: classes.root },
|
|
334
53
|
React.createElement(NavBar, { pConn: getPConnect(), appName: appNameToDisplay, pages: pages, caseTypes: caseTypes }),
|
|
335
|
-
React.createElement("div", { className: classes.content }, children)))
|
|
336
|
-
// <Toaster dismissAfter={3000}>
|
|
337
|
-
// <CosmosAppShell
|
|
338
|
-
// {...{
|
|
339
|
-
// appInfo: {
|
|
340
|
-
// imageSrc: `${iconURL}`,
|
|
341
|
-
// appName: `${appNameToDisplay}`,
|
|
342
|
-
// portalName
|
|
343
|
-
// },
|
|
344
|
-
// recents: {
|
|
345
|
-
// items: recents,
|
|
346
|
-
// onDrawerOpen: fetchRecents,
|
|
347
|
-
// onItemClick
|
|
348
|
-
// },
|
|
349
|
-
// searchInput: {
|
|
350
|
-
// onSearchChange: (value) => {
|
|
351
|
-
// setSearchVal(value);
|
|
352
|
-
// },
|
|
353
|
-
// onSearchSubmit: (value) => {
|
|
354
|
-
// showSearchResults(value.trim());
|
|
355
|
-
// setSearchVal("");
|
|
356
|
-
// },
|
|
357
|
-
// value: searchVal
|
|
358
|
-
// },
|
|
359
|
-
// caseTypes: cases,
|
|
360
|
-
// links,
|
|
361
|
-
// cases: getActiveCases(),
|
|
362
|
-
// operator: getOperator()
|
|
363
|
-
// }}
|
|
364
|
-
// main={[children]}
|
|
365
|
-
// banners={banners}
|
|
366
|
-
// className="app-shell"
|
|
367
|
-
// />
|
|
368
|
-
// </Toaster>
|
|
369
|
-
);
|
|
54
|
+
React.createElement("div", { className: classes.content }, children))));
|
|
370
55
|
}
|
|
371
56
|
AppShell.defaultProps = {
|
|
372
57
|
pages: [],
|
|
373
58
|
caseTypes: [],
|
|
374
59
|
children: [],
|
|
375
|
-
// httpMessages: [],
|
|
376
|
-
// activeCases: null
|
|
377
60
|
};
|
|
378
61
|
AppShell.propTypes = {
|
|
379
|
-
// portalName: PropTypes.string/* .isRequired */,
|
|
380
|
-
// portalLogo: PropTypes.string/* .isRequired */,
|
|
381
62
|
showAppName: PropTypes.bool /* .isRequired */,
|
|
382
63
|
pages: PropTypes.arrayOf(PropTypes.object),
|
|
383
64
|
caseTypes: PropTypes.arrayOf(PropTypes.object),
|
|
384
65
|
children: PropTypes.arrayOf(PropTypes.node),
|
|
385
66
|
getPConnect: PropTypes.func.isRequired,
|
|
386
|
-
// httpMessages: PropTypes.arrayOf(PropTypes.string),
|
|
387
|
-
// activeCases: PropTypes.arrayOf(PropTypes.object)
|
|
388
67
|
};
|
|
389
68
|
//# 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;AAE/D,WAAW;AACX,YAAY;AACZ,aAAa;AACb,YAAY;AACZ,+BAA+B;AAC/B,oCAAoC;AAEpC,wEAAwE;AACxE,2EAA2E;AAE3E,OAAO,gBAAgB,CAAC;AAExB,6CAA6C;AAC7C,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,C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S,GAAW;YACtG,6BAAK,SAAS,EAAE,OAAO,CAAC,OAAO,IAC5B,QAAQ,CACL,CACF,CACc;IAEtB,gCAAgC;IAChC,oBAAoB;IACpB,YAAY;IACZ,mBAAmB;IACnB,kCAAkC;IAClC,0CAA0C;IAC1C,qBAAqB;IACrB,WAAW;IACX,mBAAmB;IACnB,0BAA0B;IAC1B,sCAAsC;IACtC,sBAAsB;IACtB,WAAW;IACX,uBAAuB;IACvB,uCAAuC;IACvC,iCAAiC;IACjC,aAAa;IACb,uCAAuC;IACvC,6CAA6C;IAC7C,8BAA8B;IAC9B,aAAa;IACb,2BAA2B;IAC3B,WAAW;IACX,0BAA0B;IAC1B,eAAe;IACf,iCAAiC;IACjC,gCAAgC;IAChC,SAAS;IACT,wBAAwB;IACxB,wBAAwB;IACxB,4BAA4B;IAC5B,OAAO;IACP,aAAa;KACd,CAAC;AACJ,CAAC;AACD,QAAQ,CAAC,YAAY,GAAG;IACtB,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,oBAAoB;IACpB,oBAAoB;CACrB,CAAC;AACF,QAAQ,CAAC,SAAS,GAAG;IACnB,iDAAiD;IACjD,iDAAiD;IACjD,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;IACtC,qDAAqD;IACrD,mDAAmD;CACpD,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';\n\n// import {\n// Avatar,\n// Toaster,\n// Banner,\n// AppShell as CosmosAppShell\n// } from \"@pega/cosmos-react-core\";\n\n// import createPConnectComponent from \"../../../bridge/react_pconnect\";\n// import { buildRecentList, onRecentClickHandler } from \"./Recents/utils\";\n\nimport './AppShell.css';\n\n// AppShell can emit NavBar and ViewContainer\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\n/*\n * The wrapper handles knowing how to take in just children and mapping\n * to the Cosmos template. This could be a combination of things but it knows...\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 actionsAPI = pConn.getActionsApi();\n const envInfo = PCore.getEnvironmentInfo();\n\n // const bannerRef = useRef(null);\n // const hasBanner = httpMessages && httpMessages.length ? httpMessages.length > 0 : false;\n\n const appNameToDisplay = showAppName ? envInfo.getApplicationLabel() : \"\";\n\n const classes = useStyles();\n // let banners = null;\n // banners = hasBanner && (\n // <Banner\n // ref={bannerRef}\n // id=\"appShellBanner\"\n // variant=\"urgent\"\n // heading=\"Error\"\n // onDismiss={() =>\n // pConn.clearErrorMessages({\n // category: \"HTTP\",\n // context: null\n // })\n // }\n // messages={httpMessages}\n // />\n // );\n\n // useEffect(() => {\n // if (hasBanner && bannerRef.current) {\n // bannerRef.current.focus();\n // window.scrollTo(0, bannerRef.current.offsetTop);\n // }\n // }, [hasBanner]);\n\n /**\n *\n * Function to dispatch a show page action for the page links in\n * the left nav of the app shell\n *\n * @param {string} searchString Name of view to show\n */\n // function showSearchResults(searchString) {\n // if (searchString === \"\") {\n // actionsAPI.showPage(\"pySearchPage\", \"Data-Portal\");\n // return;\n // }\n // const searchTerm = searchString.replace(/['\"]+/g, \"\");\n // PCore.getDataApiUtils()\n // .getData(\n // \"D_pySearch\",\n // `{\"dataViewParameters\": {\"SearchString\": \"${encodeURIComponent(\n // searchTerm\n // )}\"}}`\n // )\n // .then((response) => {\n // if (\n // response.data.data !== null &&\n // response.data.resultCount === 1 &&\n // response.data.data[0].pyID === searchTerm\n // ) {\n // /* This is a match for a work item - then we will open it */\n // pConn\n // .getActionsApi()\n // .openWorkByHandle(\n // response.data.data[0].pzInsKey,\n // response.data.data[0].pzCategoryActionKeys\n // );\n // return;\n // }\n // // window.searchResults = {\n // // searchString: searchTerm,\n // // results: response.data\n // // };\n // actionsAPI.showPage(\"pySearchPage\", \"Data-Portal\");\n // });\n // }\n\n /**\n *\n * Function to dispatch a show page action for the page links in\n * the left nav of the app shell\n *\n * @param {string} viewName Name of view to show\n * @param {string} className Pega Applies to class of the page\n */\n // function showPage(viewName, className) {\n // actionsAPI.showPage(viewName, className);\n // }\n\n /**\n *\n * Function to dispatch a create work action\n * @param {string} className - placeholder string of case type being created\n */\n // function createWork(className) {\n // actionsAPI\n // .createWork(className)\n // .catch((error) =>\n // // eslint-disable-next-line no-console\n // console.log(\"Error in case creation: \", error?.message)\n // );\n // }\n\n /**\n * Returns the Custome Component for each active case\n */\n // const VisualComponent = useCallback(\n // (context) => {\n // if (activeCases && activeCases.length > 0) {\n // const meta = PCore.getViewResources().fetchViewResources(\n // \"pyCaseVisual\",\n // getPConnect(),\n // PCore.getStoreValue(\".caseTypeID\", \"caseInfo\", context)\n // );\n // if (meta?.config && !meta.config.defaultVisual) {\n // const config = {\n // meta,\n // options: {\n // context,\n // pageReference: \"caseInfo.content\"\n // }\n // };\n // const visualConfig = PCore.createPConnect(config);\n // return React.createElement(createPConnectComponent(), visualConfig);\n // }\n // }\n // return undefined;\n // },\n // [getPConnect, activeCases]\n // );\n\n /**\n * Transforms the active cases information into the model that cosmos expect.\n */\n // function getActiveCases() {\n // if (activeCases) {\n // const activeCaseLinks = [];\n // activeCases.forEach((activeCase) => {\n // const { caseID, className, workID, active, context } = activeCase;\n // // activeCaseLinks.push({\n // // onDismiss: () => {\n // // PCore.getContainerUtils().closeContainerItem(\n // // activeCase.containerItemID\n // // );\n // // },\n // // key: caseID,\n // // name: caseID,\n // // onClick: () => {\n // // actionsAPI.openWorkByHandle(workID, className);\n // // },\n // // active,\n // // visual: VisualComponent(context)\n // // });\n // });\n // return activeCaseLinks;\n // }\n // return activeCases;\n // }\n\n /**\n * Translate Pega Data Page into the model that Cosmos expects\n *\n * Example:\n * pxPageViewIcon: \"pi pi-home-solid\"\n * pxURLPath: \"Home\"\n * pyClassName: \"Data-Portal\"\n * pyLabel: \"Home\"\n * pyRuleName: \"pyHome\"\n */\n // const links = !pages\n // ? []\n // : pages.map((page) => {\n // return {\n // name: page.pyLabel,\n // icon: page.pxPageViewIcon.replace(\"pi pi-\", \"\"),\n // onClick: () => showPage(page.pyRuleName, page.pyClassName)\n // };\n // });\n\n // const userName = envInfo.getOperatorName();\n // const imageKey = envInfo.getOperatorImageInsKey();\n\n // const logOffAction = () => {\n // actionsAPI.logout().then(() => window?.top?.location?.reload());\n // };\n\n // const getOperator = () => {\n // const operatorActions = [\n // [{ text: \"Logoff\", id: \"1\", onClick: logOffAction }]\n // ];\n // if (imageKey) {\n // return {\n // avatar: (\n // <div id=\"AvatarWithImageKey\">Avatar with image key</div>\n // // <Avatar\n // // name={userName}\n // // imageSrc={getPConnect().getImagePath(imageKey)}\n // // />\n // ),\n // actions: operatorActions,\n // name: userName\n // };\n // }\n // return {\n // avatar: (\n // <div id=\"Avatar\">Avatar</div>\n // // <Avatar name={userName}>\n // // {userName\n // // .split(\" \")\n // // .map((i) => i.charAt(0))\n // // .join(\"\")\n // // .toUpperCase()}\n // // </Avatar>\n // ),\n // actions: operatorActions,\n // name: userName\n // };\n // };\n\n /**\n * Translate Case Types page into what is expected by Cosmos\n *\n * Example:\n * pyClassName: \"\"\n * pyFlowType: \"\"\n * pyLabel: \"No case types defined\"\n */\n // const cases = !caseTypes\n // ? []\n // : caseTypes.map((caseType) => {\n // let action = {};\n // // Only add actions to entries with a class name to create so in case of empty message no action is added\n // if (caseType.pyClassName) {\n // action = { onClick: () => createWork(caseType.pyClassName) };\n // }\n // return {\n // name: caseType.pyLabel,\n // ...action\n // };\n // });\n\n // const [recents, setRecents] = useState([]);\n\n // const [searchVal, setSearchVal] = useState(\"\");\n\n // // default the icon to be empty. This will cause the image to be initially broken.\n // const [iconURL, setIconURL] = 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 // ) {\n // setIconURL(\n // `${PCore.getAssetLoader().getStaticServerUrl()}static/py-logo.svg`\n // );\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((data) => {\n // setIconURL(window.URL.createObjectURL(data));\n // })\n // .catch(() => {\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 /**\n * To fetch recents and translate items into what Cosmos expects\n */\n // const fetchRecents = () => {\n // actionsAPI.getRecents(15).then((response) => {\n // const recentsitems = response.data.recents;\n // // setRecents(buildRecentList(recentsitems));\n // });\n // };\n\n /**\n * To handle on click of any recent item after the drawer is open\n *\n * @param {*} id : Recent item unique id\n */\n\n // const onItemClick = (id, e) => {\n // e.preventDefault();\n // // onRecentClickHandler(id, actionsAPI);\n // };\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 // <Toaster dismissAfter={3000}>\n // <CosmosAppShell\n // {...{\n // appInfo: {\n // imageSrc: `${iconURL}`,\n // appName: `${appNameToDisplay}`,\n // portalName\n // },\n // recents: {\n // items: recents,\n // onDrawerOpen: fetchRecents,\n // onItemClick\n // },\n // searchInput: {\n // onSearchChange: (value) => {\n // setSearchVal(value);\n // },\n // onSearchSubmit: (value) => {\n // showSearchResults(value.trim());\n // setSearchVal(\"\");\n // },\n // value: searchVal\n // },\n // caseTypes: cases,\n // links,\n // cases: getActiveCases(),\n // operator: getOperator()\n // }}\n // main={[children]}\n // banners={banners}\n // className=\"app-shell\"\n // />\n // </Toaster>\n );\n}\nAppShell.defaultProps = {\n pages: [],\n caseTypes: [],\n children: [],\n // httpMessages: [],\n // activeCases: null\n};\nAppShell.propTypes = {\n // portalName: PropTypes.string/* .isRequired */,\n // portalLogo: PropTypes.string/* .isRequired */,\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 // httpMessages: PropTypes.arrayOf(PropTypes.string),\n // activeCases: PropTypes.arrayOf(PropTypes.object)\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,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;IAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC;IAE3C,MAAM,gBAAgB,GAAG,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE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AAE,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"]}
|
|
@@ -6,7 +6,7 @@ export default function CaseSummary(props) {
|
|
|
6
6
|
const thePConn = getPConnect();
|
|
7
7
|
const theConfigProps = thePConn.getConfigProps();
|
|
8
8
|
const { status, showStatus } = theConfigProps;
|
|
9
|
-
// from
|
|
9
|
+
// from Constellation DX Components
|
|
10
10
|
// get the primary and secondary fields with the raw data (which has the non-resolved property values)
|
|
11
11
|
// const regionsRaw = getPConnect().getRawMetadata().children;
|
|
12
12
|
// const primaryFieldsRaw = regionsRaw[0].children;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSummary.js","sourceRoot":"","sources":["../../../../src/components/template/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,iBAAiB,MAAM,+CAA+C,CAAC;AAE9E,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK;IACvC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACxC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,cAAc,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,cAAc,CAAC;IAE9C,
|
|
1
|
+
{"version":3,"file":"CaseSummary.js","sourceRoot":"","sources":["../../../../src/components/template/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,iBAAiB,MAAM,+CAA+C,CAAC;AAE9E,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK;IACvC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACxC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,cAAc,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,cAAc,CAAC;IAE9C,mCAAmC;IACnC,sGAAsG;IACtG,8DAA8D;IAC9D,mDAAmD;IACnD,qDAAqD;IAErD,kBAAkB;IAClB,uDAAuD;IACvD,IAAI,eAAe,GAAc,EAAE,CAAC;IACpC,IAAI,iBAAiB,GAAc,EAAE,CAAC;IAEtC,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE;QAC5B,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAC7C,MAAM,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,CAAC;QAClF,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;YAC1D,eAAe,GAAG,cAAc,CAAC,QAAQ,CAAC;SAC3C;aAAM,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,kBAAkB,EAAE;YACnE,iBAAiB,GAAG,cAAc,CAAC,QAAQ,CAAC;SAC7C;KACF;IAED,+EAA+E;IAC/E,uDAAuD;IAEvD,+BAA+B;IAC/B,mFAAmF;IACnF,uFAAuF;IAEvF,OAAO,CACL,6BAAK,EAAE,EAAC,aAAa;QACnB,oBAAC,iBAAiB,IAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,GAAI;QACzF,oBAAC,iBAAiB,IAAC,SAAS,EAAE,iBAAiB,GAAI,CAC/C,CACP,CAAA;AACH,CAAC;AAED,WAAW,CAAC,SAAS,GAAG;IACtB,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CACvC,CAAC","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport CaseSummaryFields from '../../designSystemExtension/CaseSummaryFields';\n\nexport default function CaseSummary(props) {\n const { getPConnect, children } = props;\n const thePConn = getPConnect();\n const theConfigProps = thePConn.getConfigProps();\n const { status, showStatus } = theConfigProps;\n\n // from Constellation DX Components\n // get the primary and secondary fields with the raw data (which has the non-resolved property values)\n // const regionsRaw = getPConnect().getRawMetadata().children;\n // const primaryFieldsRaw = regionsRaw[0].children;\n // const secondaryFieldsRaw = regionsRaw[1].children;\n\n // From other SDKs\n // may want to move these into useEffect/useState combo\n let arPrimaryFields:Array<any> = [];\n let arSecondaryFields:Array<any> = [];\n\n for (const child of children) {\n const childPConn = child.props.getPConnect();\n const childPConnData = childPConn.resolveConfigProps(childPConn.getRawMetadata());\n if (childPConnData.name.toLowerCase() === \"primary fields\") {\n arPrimaryFields = childPConnData.children;\n } else if (childPConnData.name.toLowerCase() === \"secondary fields\") {\n arSecondaryFields = childPConnData.children;\n }\n }\n\n // At this point, should hand off to another component for layout and rendering\n // of primary and secondary fields in the Case Summary\n\n // debugging/investigation help\n // console.log(`CaseSummary: arPrimaryFields: ${JSON.stringify(arPrimaryFields)}`);\n // console.log(`CaseSummary: arSecondaryFields: ${JSON.stringify(arSecondaryFields)}`);\n\n return (\n <div id=\"CaseSummary\">\n <CaseSummaryFields status={status} showStatus={showStatus} theFields={arPrimaryFields} />\n <CaseSummaryFields theFields={arSecondaryFields} />\n </div>\n )\n}\n\nCaseSummary.propTypes = {\n getPConnect: PropTypes.func.isRequired\n};\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;AASnC,iBAAwB,YAAY,CAAC,KAAK,KAAA,sBAwDzC;kBAxDuB,YAAY;;;;;;;;;;;;;;;eAAZ,YAAY"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable no-unused-vars */
|
|
3
|
+
/* eslint-disable no-nested-ternary */
|
|
4
|
+
import { Fragment, 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 } from '@material-ui/core';
|
|
11
|
+
export default function Confirmation(props) {
|
|
12
|
+
const CONSTS = PCore.getConstants();
|
|
13
|
+
const [showConfirmView, setShowConfirmView] = useState(true);
|
|
14
|
+
const { showTasks, getPConnect, datasource } = props;
|
|
15
|
+
// Get the inherited props from the parent to determine label settings
|
|
16
|
+
// Not using whatsNext at the moment, need to figure out the use of it
|
|
17
|
+
const whatsNext = datasource?.source;
|
|
18
|
+
const items = whatsNext.length > 0 ? whatsNext.map(item => item.label) : '';
|
|
19
|
+
const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(getPConnect().getTarget());
|
|
20
|
+
const rootInfo = PCore.getContainerUtils().getContainerItemData(getPConnect().getTarget(), activeContainerItemID);
|
|
21
|
+
const onConfirmViewClose = () => {
|
|
22
|
+
setShowConfirmView(false);
|
|
23
|
+
PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CLOSE_CONFIRM_VIEW, rootInfo);
|
|
24
|
+
};
|
|
25
|
+
const todoProps = { ...props, renderTodoInConfirm: true };
|
|
26
|
+
const toDoList = getToDoAssignments(getPConnect());
|
|
27
|
+
const detailProps = { ...props, showLabel: false };
|
|
28
|
+
const showDetails = detailProps?.children?.[0]?.props?.getPConnect()?.getChildren()?.length > 0;
|
|
29
|
+
return showConfirmView ? (React.createElement(Fragment, null,
|
|
30
|
+
React.createElement("h2", null, props.showLabel ? props.label : ''),
|
|
31
|
+
showDetails ? React.createElement(Details, { ...detailProps }) : undefined,
|
|
32
|
+
showTasks ? (toDoList && toDoList.length > 0 ? (React.createElement(ToDo, { ...todoProps, datasource: { source: toDoList }, getPConnect: getPConnect, type: CONSTS.TODO, headerText: 'Open Tasks' })) : undefined) : undefined,
|
|
33
|
+
React.createElement("div", { style: { display: 'flex', justifyContent: 'flex-end' } },
|
|
34
|
+
React.createElement(Button, { variant: 'contained', color: 'primary', onClick: onConfirmViewClose }, "Done")))) : toDoList && toDoList.length > 0 ? (React.createElement(ToDo, { ...props, datasource: { source: toDoList }, getPConnect: getPConnect, type: CONSTS.TODO, headerText: 'Tasks' })) : null;
|
|
35
|
+
}
|
|
36
|
+
Confirmation.defaultProps = {
|
|
37
|
+
datasource: undefined,
|
|
38
|
+
label: '',
|
|
39
|
+
showLabel: true
|
|
40
|
+
};
|
|
41
|
+
Confirmation.propTypes = {
|
|
42
|
+
getPConnect: PropTypes.func.isRequired,
|
|
43
|
+
datasource: PropTypes.objectOf(PropTypes.any),
|
|
44
|
+
label: PropTypes.string,
|
|
45
|
+
showLabel: PropTypes.bool
|
|
46
|
+
};
|
|
47
|
+
//# 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,EAAE,QAAQ,EAAE,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,O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U,EAAC,OAAO,GAClB,CACH,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 } from '@material-ui/core';\n\ndeclare const PCore;\n\nexport default function Confirmation(props) {\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 <Fragment>\n <h2>{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 />\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 </Fragment>\n ) : toDoList && toDoList.length > 0 ? (\n <ToDo\n {...props}\n datasource={{ source: toDoList }}\n getPConnect={getPConnect}\n type={CONSTS.TODO}\n headerText='Tasks'\n />\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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../../../../src/components/template/ListView/ListView.tsx"],"names":[],"mappings":";AAMA,OAAO,SAAS,MAAM,YAAY,CAAC;AAkCnC,OAAO,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../../../../src/components/template/ListView/ListView.tsx"],"names":[],"mappings":";AAMA,OAAO,SAAS,MAAM,YAAY,CAAC;AAkCnC,OAAO,gBAAgB,CAAC;AAiBxB,iBAAwB,QAAQ,CAAC,KAAK,KAAA,eAkuCrC;kBAluCuB,QAAQ;;;;;;eAAR,QAAQ"}
|