@pega/react-sdk-components 0.25.4 → 0.25.6
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.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +5 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +6 -13
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +11 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts.map +1 -1
- package/lib/components/field/Group/Group.js +2 -1
- package/lib/components/field/Group/Group.js.map +1 -1
- package/lib/components/field/Location/Location.css +4 -0
- package/lib/components/field/Location/Location.d.ts +1 -0
- package/lib/components/field/Location/Location.d.ts.map +1 -1
- package/lib/components/field/Location/Location.js +1 -0
- package/lib/components/field/Location/Location.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.css +79 -0
- package/lib/components/field/RichText/RichText.d.ts +1 -0
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +1 -0
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/SelectableCard/SelectableCard.js +2 -2
- package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -1
- package/lib/components/field/SelectableCard/utils.d.ts +0 -1
- package/lib/components/field/SelectableCard/utils.d.ts.map +1 -1
- package/lib/components/field/SelectableCard/utils.js +0 -3
- package/lib/components/field/SelectableCard/utils.js.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +1 -1
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/helpers/attachmentShared.d.ts +2 -0
- package/lib/components/helpers/attachmentShared.d.ts.map +1 -0
- package/lib/components/helpers/attachmentShared.js +6 -0
- package/lib/components/helpers/attachmentShared.js.map +1 -0
- package/lib/components/helpers/formatters/Currency.d.ts +1 -0
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +8 -4
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +1 -0
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/object-utils.d.ts +9 -0
- package/lib/components/helpers/object-utils.d.ts.map +1 -0
- package/lib/components/helpers/object-utils.js +11 -0
- package/lib/components/helpers/object-utils.js.map +1 -0
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +29 -24
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +2 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +44 -66
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +18 -36
- package/lib/components/infra/MultiStep/MultiStep.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.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +6 -4
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +2 -0
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +24 -36
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +16 -12
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/DefaultPage/DefaultPage.d.ts +1 -1
- package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -1
- package/lib/components/template/DefaultPage/DefaultPage.js +10 -1
- package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +26 -31
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +1 -1
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -1
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +70 -1
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +3 -2
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +3 -3
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/template/utils.d.ts +7 -0
- package/lib/components/template/utils.d.ts.map +1 -0
- package/lib/components/template/utils.js +52 -0
- package/lib/components/template/utils.js.map +1 -0
- package/lib/components/widget/Attachment/Attachment.d.ts +3 -1
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +241 -189
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.types.d.ts +90 -0
- package/lib/components/widget/Attachment/Attachment.types.d.ts.map +1 -0
- package/lib/components/widget/Attachment/Attachment.types.js +2 -0
- package/lib/components/widget/Attachment/Attachment.types.js.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts +25 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js +255 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js.map +1 -0
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -0
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +21 -8
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +2 -6
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/mediaco/ToDo/ToDo.css +81 -0
- package/lib/mediaco/ToDo/ToDo.d.ts +16 -0
- package/lib/mediaco/ToDo/ToDo.d.ts.map +1 -0
- package/lib/mediaco/ToDo/ToDo.js +187 -0
- package/lib/mediaco/ToDo/ToDo.js.map +1 -0
- package/lib/mediaco/ToDo/index.d.ts +2 -0
- package/lib/mediaco/ToDo/index.d.ts.map +1 -0
- package/lib/mediaco/ToDo/index.js +2 -0
- package/lib/mediaco/ToDo/index.js.map +1 -0
- package/lib/samples/Embedded/styles.css +26 -0
- package/lib/theme.d.ts +6 -0
- package/lib/theme.d.ts.map +1 -1
- package/lib/theme.js +34 -12
- package/lib/theme.js.map +1 -1
- package/package.json +1 -1
- package/lib/components/helpers/attachmentHelpers.d.ts +0 -16
- package/lib/components/helpers/attachmentHelpers.d.ts.map +0 -1
- package/lib/components/helpers/attachmentHelpers.js +0 -94
- package/lib/components/helpers/attachmentHelpers.js.map +0 -1
|
@@ -1,4 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar, Card, CardHeader, Divider, Typography } from '@mui/material';
|
|
3
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
4
|
+
import Grid2 from '@mui/material/Grid2';
|
|
5
|
+
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
6
|
+
import { prepareCaseSummaryData, filterUtilities } from '../utils';
|
|
7
|
+
import { Utils } from '../../helpers/utils';
|
|
8
|
+
const useStyles = makeStyles(theme => ({
|
|
9
|
+
root: {
|
|
10
|
+
paddingRight: theme.spacing(1),
|
|
11
|
+
paddingLeft: theme.spacing(1),
|
|
12
|
+
paddingTop: theme.spacing(1),
|
|
13
|
+
paddingBottom: theme.spacing(1),
|
|
14
|
+
marginRight: theme.spacing(1),
|
|
15
|
+
marginLeft: theme.spacing(1),
|
|
16
|
+
marginTop: theme.spacing(1),
|
|
17
|
+
marginBottom: theme.spacing(1)
|
|
18
|
+
},
|
|
19
|
+
caseViewHeader: {
|
|
20
|
+
backgroundColor: theme.palette.info.light,
|
|
21
|
+
color: theme.palette.getContrastText(theme.palette.info.light),
|
|
22
|
+
borderRadius: 'inherit'
|
|
23
|
+
},
|
|
24
|
+
caseViewIconBox: {
|
|
25
|
+
backgroundColor: theme.palette.info.dark,
|
|
26
|
+
width: theme.spacing(8),
|
|
27
|
+
height: theme.spacing(8),
|
|
28
|
+
padding: theme.spacing(1)
|
|
29
|
+
},
|
|
30
|
+
caseViewIconImage: {
|
|
31
|
+
filter: 'var(--svg-color)'
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
1
34
|
export default function SelfServiceCaseView(props) {
|
|
2
|
-
|
|
35
|
+
const classes = useStyles();
|
|
36
|
+
const CaseViewActionsMenu = getComponentFromMap('CaseViewActionsMenu');
|
|
37
|
+
const CaseSummary = getComponentFromMap('CaseSummary');
|
|
38
|
+
const { icon = '', getPConnect, header, subheader, showCaseLifecycle = true, showSummaryRegion = true, showUtilitiesRegion = true, showCaseActions = true, children, caseClass, caseInfo: { availableActions = [], availableProcesses = [], caseTypeID = '', caseTypeName = '' } } = props;
|
|
39
|
+
const pConnect = getPConnect();
|
|
40
|
+
const [bShowCaseLifecycle, bShowSummaryRegion, bShowUtilitiesRegion, bShowCaseActions] = [
|
|
41
|
+
showCaseLifecycle,
|
|
42
|
+
showSummaryRegion,
|
|
43
|
+
showUtilitiesRegion,
|
|
44
|
+
showCaseActions
|
|
45
|
+
].map((prop) => prop === true || prop === 'true');
|
|
46
|
+
const isObjectType = PCore.getCaseUtils().isObjectCaseType(caseClass);
|
|
47
|
+
const localeKey = pConnect?.getCaseLocaleReference();
|
|
48
|
+
const svgCase = Utils.getImageSrc(icon, Utils.getSDKStaticConentUrl());
|
|
49
|
+
const renderedRegions = isObjectType
|
|
50
|
+
? {
|
|
51
|
+
caseSummary: children[0],
|
|
52
|
+
utilities: filterUtilities(children[2])
|
|
53
|
+
}
|
|
54
|
+
: {
|
|
55
|
+
caseSummary: children[0],
|
|
56
|
+
stages: children[1],
|
|
57
|
+
todo: children[2],
|
|
58
|
+
utilities: filterUtilities(children[4])
|
|
59
|
+
};
|
|
60
|
+
const { primarySummaryFields, secondarySummaryFields } = prepareCaseSummaryData(renderedRegions.caseSummary, (config) => config?.availableInChannel?.selfService === true);
|
|
61
|
+
const isUtilitiesRegionNotEmpty = () => {
|
|
62
|
+
const utilitiesElement = renderedRegions.utilities;
|
|
63
|
+
if (utilitiesElement?.props?.getPConnect()?.getChildren()?.length > 0) {
|
|
64
|
+
return utilitiesElement.props
|
|
65
|
+
.getPConnect()
|
|
66
|
+
.getChildren()
|
|
67
|
+
.some((prop) => prop.getPConnect().getConfigProps().visibility !== false);
|
|
68
|
+
}
|
|
69
|
+
return false;
|
|
70
|
+
};
|
|
71
|
+
return (_jsxs("div", { children: [bShowCaseActions && (_jsxs("div", { style: { display: 'flex', justifyContent: 'space-around', alignItems: 'center', margin: '10px' }, children: [_jsx("div", { children: PCore.getLocaleUtils().getLocaleValue(header, '', localeKey) }), _jsx(CaseViewActionsMenu, { getPConnect: getPConnect, availableActions: availableActions, availableProcesses: availableProcesses, caseTypeName: caseTypeName, caseTypeID: caseTypeID })] })), _jsx("div", { children: _jsxs(Grid2, { container: true, children: [_jsx(Grid2, { size: { xs: 3 }, children: bShowSummaryRegion && (primarySummaryFields.length > 0 || secondarySummaryFields.length > 0) && (_jsx("div", { children: _jsxs(Card, { className: classes.root, children: [_jsx(CardHeader, { className: classes.caseViewHeader, title: _jsx(Typography, { variant: 'h6', component: 'div', id: 'case-name', children: PCore.getLocaleUtils().getLocaleValue(header, '', localeKey) }), subheader: _jsx(Typography, { variant: 'body1', component: 'div', id: 'caseId', children: subheader }), avatar: _jsx(Avatar, { className: classes.caseViewIconBox, variant: 'square', children: _jsx("img", { src: svgCase, className: classes.caseViewIconImage }) }) }), _jsx(Divider, {}), _jsx(CaseSummary, { arPrimaryFields: primarySummaryFields, arSecondaryFields: secondarySummaryFields }), _jsx(Divider, {})] }) })) }), _jsxs(Grid2, { size: { xs: 6 }, children: [bShowCaseLifecycle && renderedRegions.stages, renderedRegions.todo] }), bShowUtilitiesRegion && isUtilitiesRegionNotEmpty() && _jsx(Grid2, { size: { xs: 3 }, children: renderedRegions.utilities })] }) })] }));
|
|
3
72
|
}
|
|
4
73
|
//# sourceMappingURL=SelfServiceCaseView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelfServiceCaseView.js","sourceRoot":"","sources":["../../../../src/components/template/SelfServiceCaseView/SelfServiceCaseView.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK;IAC/C,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"SelfServiceCaseView.js","sourceRoot":"","sources":["../../../../src/components/template/SelfServiceCaseView/SelfServiceCaseView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KAC/B;IACD,cAAc,EAAE;QACd,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK;QACzC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAC9D,YAAY,EAAE,SAAS;KACxB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,WAAW,IAAC,eAAe,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,sBAAsB,GAAgB,EAC7G,KAAC,OAAO,KAAG,IACN,GACH,CACP,GACK,EAER,MAAC,KAAK,IAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,aACnB,kBAAkB,IAAI,eAAe,CAAC,MAAM,EAC5C,eAAe,CAAC,IAAI,IACf,EAEP,oBAAoB,IAAI,yBAAyB,EAAE,IAAI,KAAC,KAAK,IAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,YAAG,eAAe,CAAC,SAAS,GAAS,IAC7G,GACJ,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { Avatar, Card, CardHeader, Divider, Typography } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Grid2 from '@mui/material/Grid2';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { prepareCaseSummaryData, filterUtilities } from '../utils';\nimport { Utils } from '../../helpers/utils';\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 caseViewHeader: {\n backgroundColor: theme.palette.info.light,\n color: theme.palette.getContrastText(theme.palette.info.light),\n borderRadius: 'inherit'\n },\n caseViewIconBox: {\n backgroundColor: theme.palette.info.dark,\n width: theme.spacing(8),\n height: theme.spacing(8),\n padding: theme.spacing(1)\n },\n caseViewIconImage: {\n filter: 'var(--svg-color)'\n }\n}));\n\nexport default function SelfServiceCaseView(props) {\n const classes = useStyles();\n const CaseViewActionsMenu = getComponentFromMap('CaseViewActionsMenu');\n const CaseSummary = getComponentFromMap('CaseSummary');\n const {\n icon = '',\n getPConnect,\n header,\n subheader,\n showCaseLifecycle = true,\n showSummaryRegion = true,\n showUtilitiesRegion = true,\n showCaseActions = true,\n children,\n caseClass,\n caseInfo: { availableActions = [], availableProcesses = [], caseTypeID = '', caseTypeName = '' }\n } = props;\n const pConnect = getPConnect();\n const [bShowCaseLifecycle, bShowSummaryRegion, bShowUtilitiesRegion, bShowCaseActions] = [\n showCaseLifecycle,\n showSummaryRegion,\n showUtilitiesRegion,\n showCaseActions\n ].map((prop: boolean | string) => prop === true || prop === 'true');\n const isObjectType: boolean = (PCore.getCaseUtils() as any).isObjectCaseType(caseClass);\n const localeKey = pConnect?.getCaseLocaleReference();\n const svgCase = Utils.getImageSrc(icon, Utils.getSDKStaticConentUrl());\n const renderedRegions: any = isObjectType\n ? {\n caseSummary: children[0],\n utilities: filterUtilities(children[2])\n }\n : {\n caseSummary: children[0],\n stages: children[1],\n todo: children[2],\n utilities: filterUtilities(children[4])\n };\n const { primarySummaryFields, secondarySummaryFields } = prepareCaseSummaryData(\n renderedRegions.caseSummary,\n (config: any) => config?.availableInChannel?.selfService === true\n );\n\n const isUtilitiesRegionNotEmpty: () => boolean = () => {\n const utilitiesElement = renderedRegions.utilities;\n if (utilitiesElement?.props?.getPConnect()?.getChildren()?.length > 0) {\n return utilitiesElement.props\n .getPConnect()\n .getChildren()\n .some((prop: { getPConnect: () => any }) => prop.getPConnect().getConfigProps().visibility !== false);\n }\n return false;\n };\n\n return (\n <div>\n {bShowCaseActions && (\n <div style={{ display: 'flex', justifyContent: 'space-around', alignItems: 'center', margin: '10px' }}>\n <div>{PCore.getLocaleUtils().getLocaleValue(header, '', localeKey)}</div>\n <CaseViewActionsMenu\n getPConnect={getPConnect}\n availableActions={availableActions}\n availableProcesses={availableProcesses}\n caseTypeName={caseTypeName}\n caseTypeID={caseTypeID}\n />\n </div>\n )}\n <div>\n <Grid2 container>\n <Grid2 size={{ xs: 3 }}>\n {bShowSummaryRegion && (primarySummaryFields.length > 0 || secondarySummaryFields.length > 0) && (\n <div>\n <Card className={classes.root}>\n <CardHeader\n className={classes.caseViewHeader}\n title={\n <Typography variant='h6' component='div' id='case-name'>\n {PCore.getLocaleUtils().getLocaleValue(header, '', localeKey)}\n </Typography>\n }\n subheader={\n <Typography variant='body1' component='div' id='caseId'>\n {subheader}\n </Typography>\n }\n avatar={\n <Avatar className={classes.caseViewIconBox} variant='square'>\n <img src={svgCase} className={classes.caseViewIconImage} />\n </Avatar>\n }\n />\n <Divider />\n <CaseSummary arPrimaryFields={primarySummaryFields} arSecondaryFields={secondarySummaryFields}></CaseSummary>\n <Divider />\n </Card>\n </div>\n )}\n </Grid2>\n\n <Grid2 size={{ xs: 6 }}>\n {bShowCaseLifecycle && renderedRegions.stages}\n {renderedRegions.todo}\n </Grid2>\n\n {bShowUtilitiesRegion && isUtilitiesRegionNotEmpty() && <Grid2 size={{ xs: 3 }}>{renderedRegions.utilities}</Grid2>}\n </Grid2>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleReferenceReadOnly.d.ts","sourceRoot":"","sources":["../../../../src/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SingleReferenceReadOnly.d.ts","sourceRoot":"","sources":["../../../../src/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,4BAA6B,SAAQ,UAAU;IAEvD,MAAM,EAAE,GAAG,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,2CAsDlF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { FormControl, FormLabel } from '@mui/material';
|
|
2
3
|
export default function SingleReferenceReadOnly(props) {
|
|
3
4
|
const { getPConnect, displayAs = '', ruleClass = '', label = '', type = '', displayMode = '', referenceType = '', hideLabel = false, dataRelationshipContext = null, config } = props;
|
|
4
5
|
const editableComponents = ['AutoComplete', 'SimpleTableSelect', 'Dropdown'];
|
|
@@ -25,6 +26,6 @@ export default function SingleReferenceReadOnly(props) {
|
|
|
25
26
|
dataRelationshipContext
|
|
26
27
|
}
|
|
27
28
|
}, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
28
|
-
return _jsx(_Fragment, { children: component });
|
|
29
|
+
return (_jsx(_Fragment, { children: _jsxs(FormControl, { variant: 'standard', sx: { display: 'flex', flexDirection: 'row' }, children: [_jsx(FormLabel, { sx: { marginRight: '2rem' }, children: label }), component] }) }));
|
|
29
30
|
}
|
|
30
31
|
//# sourceMappingURL=SingleReferenceReadOnly.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleReferenceReadOnly.js","sourceRoot":"","sources":["../../../../src/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SingleReferenceReadOnly.js","sourceRoot":"","sources":["../../../../src/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAgBvD,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,KAAmC;IACjF,MAAM,EACJ,WAAW,EACX,SAAS,GAAG,EAAE,EACd,SAAS,GAAG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,IACE,GACb,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { FormControl, FormLabel } from '@mui/material';\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface SingleReferenceReadOnlyProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n config: any;\n displayAs?: string;\n ruleClass?: string;\n label?: string;\n displayMode?: string;\n type: string;\n referenceType?: string;\n hideLabel?: boolean;\n dataRelationshipContext?: string;\n}\n\nexport default function SingleReferenceReadOnly(props: SingleReferenceReadOnlyProps) {\n const {\n getPConnect,\n displayAs = '',\n ruleClass = '',\n label = '',\n type = '',\n displayMode = '',\n referenceType = '',\n hideLabel = false,\n dataRelationshipContext = null,\n config\n } = props;\n\n const editableComponents = ['AutoComplete', 'SimpleTableSelect', 'Dropdown'];\n\n if (editableComponents.includes(type)) {\n config.caseClass = ruleClass;\n config.text = config.primaryField;\n config.caseID = config.value;\n config.contextPage = `@P .${dataRelationshipContext}`;\n config.resourceParams = {\n workID: displayAs === 'table' ? config.selectionKey : config.value\n };\n config.resourcePayload = {\n caseClassName: ruleClass\n };\n }\n\n const component = getPConnect().createComponent(\n {\n type: 'SemanticLink',\n config: {\n ...config,\n label,\n displayMode,\n referenceType,\n hideLabel,\n dataRelationshipContext\n }\n },\n '',\n 0,\n {}\n ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional\n\n return (\n <>\n <FormControl variant='standard' sx={{ display: 'flex', flexDirection: 'row' }}>\n <FormLabel sx={{ marginRight: '2rem' }}>{label}</FormLabel>\n {component}\n </FormControl>\n </>\n );\n}\n"]}
|
|
@@ -21,8 +21,8 @@ const useStyles = makeStyles(theme => ({
|
|
|
21
21
|
marginRight: theme.spacing(2)
|
|
22
22
|
},
|
|
23
23
|
appListLogo: {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
maxWidth: '100%',
|
|
25
|
+
height: '3rem'
|
|
26
26
|
},
|
|
27
27
|
appName: {
|
|
28
28
|
marginLeft: theme.spacing(2),
|
|
@@ -51,7 +51,7 @@ export default function WssNavBar(props) {
|
|
|
51
51
|
setAnchorElUser(null);
|
|
52
52
|
};
|
|
53
53
|
const navLinksContent = (_jsx(Box, { id: 'nav-links', sx: { flexGrow: 1, display: { xs: 'none', md: 'flex' } }, style: { justifyContent: alignment }, children: navLinks.map(link => (_jsx(Button, { className: 'link-style', onClick: link.onClick, children: link.text }, link.text))) }));
|
|
54
|
-
return (_jsx("div", { id: 'NavBar', className: 'nav-bar', children: _jsx(AppBar, { position: 'static', color: 'primary', children: _jsxs(Container, { maxWidth:
|
|
54
|
+
return (_jsx("div", { id: 'NavBar', className: 'nav-bar', children: _jsx(AppBar, { position: 'static', color: 'primary', children: _jsxs(Container, { maxWidth: false, children: [_jsxs(Toolbar, { disableGutters: true, style: { justifyContent: 'space-between' }, children: [_jsxs(Button, { id: 'appName', style: { textTransform: 'capitalize' }, onClick: appInfo.onClick, children: [_jsx("img", { src: appInfo.imageSrc, className: classes.appListLogo }), _jsx("span", { className: classes.appName, children: appInfo.appName })] }), _jsxs(Box, { sx: { flexGrow: 1, display: { xs: 'flex', md: 'none' } }, children: [_jsx(IconButton, { size: 'small', "aria-label": 'account of current user', "aria-controls": 'menu-appbar', "aria-haspopup": 'true', onClick: handleOpenNavMenu, color: 'inherit', children: _jsx(MenuIcon, {}) }), _jsx(Menu, { id: 'menu-appbar', anchorEl: anchorElNav, anchorOrigin: {
|
|
55
55
|
vertical: 'bottom',
|
|
56
56
|
horizontal: 'left'
|
|
57
57
|
}, keepMounted: true, transformOrigin: {
|
|
@@ -1 +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,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,GAAG,MAAM,mBAA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CACf,UAAU,EAAE,OAAO;yCACpB,EACD,WAAW,QACX,eAAe,EAAE;4CACf,QAAQ,EAAE,KAAK;4CACf,UAAU,EAAE,OAAO;yCACpB,EACD,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,EAC3B,OAAO,EAAE,mBAAmB,YAE5B,KAAC,QAAQ,IAAC,OAAO,EAAE,MAAM,YACvB,KAAC,UAAU,cAAE,YAAY,CAAC,SAAS,EAAE,cAAc,CAAC,GAAc,GACzD,GACN,IACH,IACE,EACT,QAAQ,KAAK,OAAO,IAAI,4BAAG,eAAe,GAAI,IACrC,GACL,GACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport AppBar from '@mui/material/AppBar';\nimport Box from '@mui/material/Box';\nimport Toolbar from '@mui/material/Toolbar';\nimport Container from '@mui/material/Container';\nimport { IconButton, Menu, MenuItem, Typography, Button } from '@mui/material';\nimport Avatar from '@mui/material/Avatar';\nimport MenuIcon from '@mui/icons-material/Menu';\nimport { logout } from '@pega/auth/lib/sdk-auth-manager';\nimport type { PConnProps } from '../../../types/PConnProps';\nimport './WssNavBar.css';\n\ninterface WssNavBarProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n appInfo: any;\n navLinks: any[];\n operator: { currentUserInitials: string };\n navDisplayOptions: { alignment: string; position: string };\n\n portalName: string;\n imageSrc: string;\n\n fullImageSrc: string;\n appName: any;\n}\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 maxWidth: '100%',\n height: '3rem'\n },\n appName: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(4),\n fontSize: '1.5rem'\n }\n}));\n\nexport default function WssNavBar(props: WssNavBarProps) {\n const { appInfo, navLinks, operator, navDisplayOptions } = props;\n const { alignment, position } = 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 localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'AppShell';\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 const navLinksContent = (\n <Box id='nav-links' sx={{ flexGrow: 1, display: { xs: 'none', md: 'flex' } }} style={{ justifyContent: alignment }}>\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\n return (\n <div id='NavBar' className='nav-bar'>\n <AppBar position='static' color='primary'>\n <Container maxWidth={false}>\n <Toolbar disableGutters style={{ justifyContent: 'space-between' }}>\n <Button id='appName' 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 {position === 'inline' && <>{navLinksContent}</>}\n\n <Box sx={{ flexGrow: 0 }}>\n <IconButton onClick={handleOpenUserMenu} size='large'>\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>{localizedVal('Log off', localeCategory)}</Typography>\n </MenuItem>\n </Menu>\n </Box>\n </Toolbar>\n {position === 'below' && <>{navLinksContent}</>}\n </Container>\n </AppBar>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export declare function prepareCaseSummaryData(caseSummaryRegion: any, portalSpecificVisibilityChecker?: any): {
|
|
3
|
+
primarySummaryFields: any;
|
|
4
|
+
secondarySummaryFields: any;
|
|
5
|
+
};
|
|
6
|
+
export declare const filterUtilities: (utils: ReactNode) => any;
|
|
7
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/template/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,wBAAgB,sBAAsB,CAAC,iBAAiB,KAAA,EAAE,+BAA+B,CAAC,KAAA;;;EAuCzF;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,SAAS,QAa/C,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { isValidElement } from 'react';
|
|
2
|
+
export function prepareCaseSummaryData(caseSummaryRegion, portalSpecificVisibilityChecker) {
|
|
3
|
+
const filterVisibleChildren = children => {
|
|
4
|
+
return children
|
|
5
|
+
?.getPConnect()
|
|
6
|
+
?.getChildren()
|
|
7
|
+
?.filter(child => {
|
|
8
|
+
const configProps = child.getPConnect().getConfigProps();
|
|
9
|
+
const defaultVisibilityCn = !('visibility' in configProps) || configProps.visibility === true;
|
|
10
|
+
return defaultVisibilityCn && (portalSpecificVisibilityChecker?.(configProps) ?? true);
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
const convertChildrenToSummaryData = children => {
|
|
14
|
+
return children?.map(childItem => {
|
|
15
|
+
const childPConnData = childItem.getPConnect().resolveConfigProps(childItem.getPConnect().getRawMetadata());
|
|
16
|
+
return childPConnData;
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const summaryFieldChildren = caseSummaryRegion.props
|
|
20
|
+
.getPConnect()
|
|
21
|
+
.getChildren()[0]
|
|
22
|
+
?.getPConnect()
|
|
23
|
+
?.getReferencedViewPConnect()
|
|
24
|
+
?.getPConnect()
|
|
25
|
+
?.getChildren();
|
|
26
|
+
const primarySummaryFields = summaryFieldChildren && summaryFieldChildren.length > 0
|
|
27
|
+
? convertChildrenToSummaryData(filterVisibleChildren(summaryFieldChildren[0]))
|
|
28
|
+
: undefined;
|
|
29
|
+
const secondarySummaryFields = summaryFieldChildren && summaryFieldChildren.length > 1
|
|
30
|
+
? convertChildrenToSummaryData(filterVisibleChildren(summaryFieldChildren[1]))
|
|
31
|
+
: undefined;
|
|
32
|
+
return {
|
|
33
|
+
primarySummaryFields,
|
|
34
|
+
secondarySummaryFields
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export const filterUtilities = (utils) => {
|
|
38
|
+
let utilsMeta;
|
|
39
|
+
if (isValidElement(utils)) {
|
|
40
|
+
const pConnect = utils.props.getPConnect();
|
|
41
|
+
utilsMeta = pConnect.getRawMetadata?.();
|
|
42
|
+
if (!utilsMeta?.children?.length)
|
|
43
|
+
return;
|
|
44
|
+
utilsMeta = {
|
|
45
|
+
...utilsMeta,
|
|
46
|
+
children: utilsMeta.children.filter((child) => child.config?.availableInChannel?.selfService === true)
|
|
47
|
+
};
|
|
48
|
+
return utilsMeta.children?.length ? pConnect.createComponent(utilsMeta) : undefined;
|
|
49
|
+
}
|
|
50
|
+
return utilsMeta;
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/template/utils.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,UAAU,sBAAsB,CAAC,iBAAiB,EAAE,+BAAgC;IACxF,MAAM,qBAAqB,GAAG,QAAQ,CAAC,EAAE;QACvC,OAAO,QAAQ;YACb,EAAE,WAAW,EAAE;YACf,EAAE,WAAW,EAAE;YACf,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE;YACf,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE,CAAC;YACzD,MAAM,mBAAmB,GAAG,CAAC,CAAC,YAAY,IAAI,WAAW,CAAC,IAAI,WAAW,CAAC,UAAU,KAAK,IAAI,CAAC;YAC9F,OAAO,mBAAmB,IAAI,CAAC,+BAA+B,EAAE,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,CAAC;QACzF,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;IACF,MAAM,4BAA4B,GAAG,QAAQ,CAAC,EAAE;QAC9C,OAAO,QAAQ,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE;YAC/B,MAAM,cAAc,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC,kBAAkB,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE,CAAC,CAAC;YAC5G,OAAO,cAAc,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,KAAK;SACjD,WAAW,EAAE;SACb,WAAW,EAAE,CAAC,CAAC,CAAC;QACjB,EAAE,WAAW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esContent":["import type { ReactNode } from 'react';\nimport { isValidElement } from 'react';\n\nexport function prepareCaseSummaryData(caseSummaryRegion, portalSpecificVisibilityChecker?) {\n const filterVisibleChildren = children => {\n return children\n ?.getPConnect()\n ?.getChildren()\n ?.filter(child => {\n const configProps = child.getPConnect().getConfigProps();\n const defaultVisibilityCn = !('visibility' in configProps) || configProps.visibility === true;\n return defaultVisibilityCn && (portalSpecificVisibilityChecker?.(configProps) ?? true);\n });\n };\n const convertChildrenToSummaryData = children => {\n return children?.map(childItem => {\n const childPConnData = childItem.getPConnect().resolveConfigProps(childItem.getPConnect().getRawMetadata());\n return childPConnData;\n });\n };\n\n const summaryFieldChildren = caseSummaryRegion.props\n .getPConnect()\n .getChildren()[0]\n ?.getPConnect()\n ?.getReferencedViewPConnect()\n ?.getPConnect()\n ?.getChildren();\n\n const primarySummaryFields =\n summaryFieldChildren && summaryFieldChildren.length > 0\n ? convertChildrenToSummaryData(filterVisibleChildren(summaryFieldChildren[0]))\n : undefined;\n const secondarySummaryFields =\n summaryFieldChildren && summaryFieldChildren.length > 1\n ? convertChildrenToSummaryData(filterVisibleChildren(summaryFieldChildren[1]))\n : undefined;\n\n return {\n primarySummaryFields,\n secondarySummaryFields\n };\n}\n\nexport const filterUtilities = (utils: ReactNode) => {\n let utilsMeta;\n if (isValidElement(utils)) {\n const pConnect = utils.props.getPConnect();\n utilsMeta = pConnect.getRawMetadata?.();\n if (!utilsMeta?.children?.length) return;\n utilsMeta = {\n ...utilsMeta,\n children: utilsMeta.children.filter((child: any) => child.config?.availableInChannel?.selfService === true)\n };\n return utilsMeta.children?.length ? pConnect.createComponent(utilsMeta) : undefined;\n }\n return utilsMeta;\n};\n"]}
|
|
@@ -2,8 +2,10 @@ import type { PConnFieldProps } from '../../../types/PConnProps';
|
|
|
2
2
|
import './Attachment.css';
|
|
3
3
|
interface AttachmentProps extends Omit<PConnFieldProps, 'value'> {
|
|
4
4
|
value: any;
|
|
5
|
-
allowMultiple: string;
|
|
5
|
+
allowMultiple: boolean | string;
|
|
6
6
|
extensions: string;
|
|
7
|
+
editMode: string;
|
|
8
|
+
isTableFormatter: boolean;
|
|
7
9
|
}
|
|
8
10
|
export default function Attachment(props: AttachmentProps): import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Attachment.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/Attachment/Attachment.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,kBAAkB,CAAC;AAE1B,UAAU,eAAgB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC;IAE9D,KAAK,EAAE,GAAG,CAAC;IACX,aAAa,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,2CA8fxD"}
|