udp-react-enterprise-component-library 25.18.1-beta.54 → 25.18.1-beta.56
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/dist/{AmbientVisualizationCard-Dig-Mh_G.js → AmbientVisualizationCard-BmTQR121.js} +2 -2
- package/dist/{AmbientVisualizationCard-Dig-Mh_G.js.map → AmbientVisualizationCard-BmTQR121.js.map} +1 -1
- package/dist/{AmbientVisualizer-B1Xwwe0J.js → AmbientVisualizer-BABKxgsK.js} +1 -1
- package/dist/{AmbientVisualizer-B1Xwwe0J.js.map → AmbientVisualizer-BABKxgsK.js.map} +1 -1
- package/dist/{CardList-BPNGTxsh.js → CardList-B8nTYXo7.js} +1 -1
- package/dist/{CardList-BPNGTxsh.js.map → CardList-B8nTYXo7.js.map} +1 -1
- package/dist/{Directory-CoEKdRkU.js → Directory-MpK8T6IZ.js} +1 -1
- package/dist/{Directory-CoEKdRkU.js.map → Directory-MpK8T6IZ.js.map} +1 -1
- package/dist/{EntityHeader-DKkYwvsi.js → EntityHeader-C3Ae5BLK.js} +1 -1
- package/dist/{EntityHeader-DKkYwvsi.js.map → EntityHeader-C3Ae5BLK.js.map} +1 -1
- package/dist/{FieldArrayCard-C1I5_qJ4.js → FieldArrayCard-Ds_ysYWL.js} +2 -2
- package/dist/{FieldArrayCard-C1I5_qJ4.js.map → FieldArrayCard-Ds_ysYWL.js.map} +1 -1
- package/dist/{FluentLink-D-gKioCQ.js → FluentLink-CkA7BUEB.js} +1 -1
- package/dist/{FluentLink-D-gKioCQ.js.map → FluentLink-CkA7BUEB.js.map} +1 -1
- package/dist/{FluentSelectMenu-BEREJbe-.js → FluentSelectMenu-Cx274cVa.js} +1 -1
- package/dist/{FluentSelectMenu-BEREJbe-.js.map → FluentSelectMenu-Cx274cVa.js.map} +1 -1
- package/dist/{FluentSimpleSelect-Djff-up8.js → FluentSimpleSelect-BfoxBQj4.js} +2 -2
- package/dist/{FluentSimpleSelect-Djff-up8.js.map → FluentSimpleSelect-BfoxBQj4.js.map} +1 -1
- package/dist/{FluentTimePicker-hNcocKsd.js → FluentTimePicker-BFxFcgvX.js} +1 -1
- package/dist/{FluentTimePicker-hNcocKsd.js.map → FluentTimePicker-BFxFcgvX.js.map} +1 -1
- package/dist/{GraphCard-Dv4a99wo.js → GraphCard-BhcSveF4.js} +1 -1
- package/dist/{GraphCard-Dv4a99wo.js.map → GraphCard-BhcSveF4.js.map} +1 -1
- package/dist/{IconKey-D7fZ_U4O.js → IconKey-BLHF3hfg.js} +1 -1
- package/dist/{IconKey-D7fZ_U4O.js.map → IconKey-BLHF3hfg.js.map} +1 -1
- package/dist/{Notes-UkwV2z4D.js → Notes-YAF2dipI.js} +1 -1
- package/dist/{Notes-UkwV2z4D.js.map → Notes-YAF2dipI.js.map} +1 -1
- package/dist/{PaymentForm-CtrVBoH8.js → PaymentForm-DFJrSIy8.js} +2 -2
- package/dist/{PaymentForm-CtrVBoH8.js.map → PaymentForm-DFJrSIy8.js.map} +1 -1
- package/dist/{TicketCard-IqCCKSc0.js → TicketCard-CpttpQoj.js} +1 -1
- package/dist/{TicketCard-IqCCKSc0.js.map → TicketCard-CpttpQoj.js.map} +1 -1
- package/dist/UI/dataDisplay/GraphCard/index.js +1 -1
- package/dist/UI/dataDisplay/cardList/index.js +1 -1
- package/dist/UI/dataDisplay/directory/index.js +1 -1
- package/dist/UI/dataDisplay/entityHeader/index.js +1 -1
- package/dist/UI/dataDisplay/map/index.js +1 -1
- package/dist/UI/dataDisplay/notes/index.js +1 -1
- package/dist/UI/dataDisplay/ticketCard/index.js +1 -1
- package/dist/UI/dataDisplay/visualization/index.js +1 -1
- package/dist/UI/inputs/fieldArrayCard/index.js +1 -1
- package/dist/UI/inputs/link/index.js +1 -1
- package/dist/UI/inputs/menus/index.js +2 -2
- package/dist/UI/inputs/pickers/index.js +2 -2
- package/dist/UI/surfaces/cards/chartDisplayCards/index.js +1 -1
- package/dist/{pickers-B-bB40GS.js → UdpTimeSelector-Dc5RiWq-.js} +1 -1
- package/dist/UdpTimeSelector-Dc5RiWq-.js.map +1 -0
- package/dist/{UdpTransactionsPage-CCcw7ZRU.js → UdpTransactionsPage-CNl_xeZO.js} +126 -47
- package/dist/UdpTransactionsPage-CNl_xeZO.js.map +1 -0
- package/dist/index.js +18 -18
- package/dist/types/src/maintenanceEngine/tableBrowser/TableColumnDefs.d.ts +1 -1
- package/dist/types/src/maintenanceEngine/tableBrowser/TableColumnDefs.d.ts.map +1 -1
- package/dist/types/src/udp/pages/UdpTransactionsPage/components/EditTransactionDetailsForm.d.ts.map +1 -1
- package/dist/types/src/udp/pages/UdpTransactionsPage/components/EditTransactionDetailsFormFields.d.ts +1 -0
- package/dist/types/src/udp/pages/UdpTransactionsPage/components/EditTransactionDetailsFormFields.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/udp/pages/UdpPages/index.js +1 -1
- package/dist/udp/pages/UdpTransactionsPage/index.js +1 -1
- package/dist/uploader/index.js +1 -1
- package/dist/{uploader-CGVZIlR1.js → uploader-YWjDebFN.js} +1 -1
- package/dist/{uploader-CGVZIlR1.js.map → uploader-YWjDebFN.js.map} +1 -1
- package/dist/utilities/form/paymentForm/index.js +1 -1
- package/export-map.json +1 -1
- package/package.json +2 -2
- package/dist/UdpTransactionsPage-CCcw7ZRU.js.map +0 -1
- package/dist/pickers-B-bB40GS.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketCard-
|
|
1
|
+
{"version":3,"file":"TicketCard-CpttpQoj.js","names":["useStyles","useStyles"],"sources":["../src/UI/dataDisplay/ticketCard/NotificationElement.jsx","../src/UI/dataDisplay/ticketCard/StatusLineItem.jsx","../src/UI/dataDisplay/ticketCard/TicketCard.jsx"],"sourcesContent":["import React from 'react'\nimport { makeStyles, Typography } from '@material-ui/core'\nimport PropTypes from 'prop-types'\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n width: 0,\n height: 0,\n borderTop: '0px solid transparent',\n borderRight: `45px solid ${theme?.palette?.error?.main}`,\n borderBottom: '45px solid transparent'\n },\n number: {\n marginLeft: theme.spacing(3.5),\n paddingTop: theme.spacing(0.5),\n color: theme?.palette?.common?.white\n }\n}))\n\nexport const NotificationElement = ({ alertNumber }) => {\n const classes = useStyles()\n\n return (\n <div className={classes.root}>\n <div className={classes.number}>\n <Typography> {alertNumber} </Typography>\n </div>\n </div>\n )\n}\nNotificationElement.propTypes = {\n /**\n * number of alert items\n */\n alertNumber: PropTypes.number.isRequired\n}\n","import React from 'react'\nimport { makeStyles, Divider, Typography } from '@material-ui/core'\nimport { FluentIconButton } from '../../inputs/buttons/FluentIconButton'\nimport { StatusChip } from '../status/StatusChip'\nimport { ArrowUpRightIcon } from '@fluentui/react-icons'\nimport PropTypes from 'prop-types'\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n width: '100%',\n height: 44\n },\n wrapper: { display: 'flex' },\n labelCount: {\n flex: 1,\n display: 'flex'\n },\n status: {\n marginRight: theme.spacing(1)\n },\n icon: {\n marginRight: theme.spacing(1)\n }\n}))\n\nexport const StatusLineItem = ({\n label,\n amount,\n status,\n icon,\n handleClick\n}) => {\n const classes = useStyles()\n\n return (\n <div className={classes.root}>\n <div className={classes.wrapper}>\n <div className={classes.labelCount}>\n <div className={classes.icon}> {icon} </div>\n <Typography> {label} </Typography>\n </div>\n <div className={classes.status}>\n {status === 'error' && <StatusChip label={amount} status={status} />}\n\n {status !== 'error' && amount}\n </div>\n <FluentIconButton\n onClick={handleClick}\n className={classes.launch}\n icon={ArrowUpRightIcon}\n aria-label='launch'\n />\n </div>\n\n <Divider />\n </div>\n )\n}\nStatusLineItem.propTypes = {\n /**\n * stat label\n */\n label: PropTypes.string.isRequired,\n /**\n * Total amount stat\n */\n amount: PropTypes.number,\n /**\n * Type of status for status chip\n */\n status: PropTypes.string,\n /**\n * list icon\n */\n icon: PropTypes.node,\n /**\n * onClick event\n */\n handleClick: PropTypes.func\n}\n","import React from 'react'\nimport { makeStyles, Card, CardContent, Typography } from '@material-ui/core'\nimport { StatusLineItem } from './StatusLineItem'\nimport { NotificationElement } from './NotificationElement'\nimport PropTypes from 'prop-types'\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex'\n },\n overviewContainer: {\n width: theme.spacing(16),\n height: theme.spacing(16),\n background: '#393939', // Add to theme\n marginRight: theme.spacing(2),\n position: 'relative'\n },\n notification: {\n position: 'absolute',\n right: 0,\n top: 0\n },\n totalNumber: {\n textAlign: 'center',\n // color: theme.palette.common.white\n color: '#FFFFFF', // Hex color added to avoid TypeError\n fontWeight: 400\n },\n label: {\n display: 'flex',\n justifyContent: 'center',\n marginTop: -8,\n // color: theme.pallette.common.white\n color: '#FFFFFF'\n },\n itemContainer: {\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n alignContent: 'space-around',\n marginTop: theme.spacing(0.5)\n }\n}))\n\nexport const TicketCard = ({\n totalAmount,\n label,\n notification,\n alertNumber,\n ticketData,\n component = 'h6'\n}) => {\n const classes = useStyles()\n\n return (\n <div className={classes.root}>\n <div>\n <Card elevation={0} square className={classes.overviewContainer}>\n <CardContent>\n <Typography\n variant='h1'\n component={component}\n className={classes.totalNumber}\n >\n {totalAmount}\n </Typography>\n </CardContent>\n <div className={classes.label}>\n <Typography variant='caption'>{label} </Typography>\n </div>\n {notification && (\n <div className={classes.notification}>\n <NotificationElement alertNumber={alertNumber} />\n </div>\n )}\n </Card>\n </div>\n\n <div className={classes.itemContainer}>\n {ticketData &&\n ticketData.map((item) => {\n return (\n <StatusLineItem\n label={item.label}\n amount={item.amount}\n status={item.status === 'error' && 'error'}\n icon={item.icon}\n key={item.id}\n />\n )\n })}\n </div>\n </div>\n )\n}\nTicketCard.propTypes = {\n /**\n * Total amount stat\n */\n totalAmount: PropTypes.number,\n /**\n * Stat label\n */\n label: PropTypes.string.isRequired,\n /**\n * Type of status to toggle notification\n */\n notification: PropTypes.bool,\n /**\n * amount of alert items\n */\n alertNumber: PropTypes.number,\n /**\n * prop for mapped data\n */\n ticketData: PropTypes.arrayOf(\n PropTypes.shape({\n ticketAmount: PropTypes.string.isRequired,\n label: PropTypes.number.isRequired,\n notification: PropTypes.number.isRequired,\n alertNumber: PropTypes.number,\n id: PropTypes.number.isRequired,\n ticketData: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.isRequired,\n amount: PropTypes.number,\n status: PropTypes.string.isRequired,\n icon: PropTypes.node\n })\n )\n }).isRequired\n ).isRequired,\n /**\n * Header Tag override. Defaults to H2\n */\n component: PropTypes.string\n}\n\nTicketCard.defaultProps = {\n component: 'h2'\n}\n"],"mappings":"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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as StatusLineItem, r as NotificationElement, t as TicketCard } from "../../../TicketCard-
|
|
1
|
+
import { n as StatusLineItem, r as NotificationElement, t as TicketCard } from "../../../TicketCard-CpttpQoj.js";
|
|
2
2
|
|
|
3
3
|
export { NotificationElement, StatusLineItem, TicketCard };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as GaugeGraph, r as RatioVisulization, t as AmbientVisualizer } from "../../../AmbientVisualizer-
|
|
1
|
+
import { n as GaugeGraph, r as RatioVisulization, t as AmbientVisualizer } from "../../../AmbientVisualizer-BABKxgsK.js";
|
|
2
2
|
|
|
3
3
|
export { AmbientVisualizer, GaugeGraph, RatioVisulization };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as FluentSelectGroupMenu, n as FluentScrollLoadAutocompleteMenu, r as SelectGroupMenu, t as FluentSimpleSelect } from "../../../FluentSimpleSelect-
|
|
2
|
-
import { t as FluentSelectMenu } from "../../../FluentSelectMenu-
|
|
1
|
+
import { i as FluentSelectGroupMenu, n as FluentScrollLoadAutocompleteMenu, r as SelectGroupMenu, t as FluentSimpleSelect } from "../../../FluentSimpleSelect-BfoxBQj4.js";
|
|
2
|
+
import { t as FluentSelectMenu } from "../../../FluentSelectMenu-Cx274cVa.js";
|
|
3
3
|
|
|
4
4
|
export { FluentScrollLoadAutocompleteMenu, FluentSelectGroupMenu, FluentSelectMenu, FluentSimpleSelect, SelectGroupMenu };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as FluentColorPicker } from "../../../FluentColorPicker-Wi2o3JqX.js";
|
|
2
2
|
import { t as FluentDatePicker } from "../../../FluentDatePicker-C6WEywwM.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
3
|
+
import { t as FluentTimePicker } from "../../../FluentTimePicker-BFxFcgvX.js";
|
|
4
|
+
import { n as UdpDateSelector, r as FluentDateTimePicker, t as UdpTimeSelector } from "../../../UdpTimeSelector-Dc5RiWq-.js";
|
|
5
5
|
|
|
6
6
|
export { FluentColorPicker, FluentDatePicker, FluentDateTimePicker, FluentTimePicker, UdpDateSelector, UdpTimeSelector };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as AmbientSplitStatCard, t as AmbientVisualizationCard } from "../../../../AmbientVisualizationCard-
|
|
1
|
+
import { n as AmbientSplitStatCard, t as AmbientVisualizationCard } from "../../../../AmbientVisualizationCard-BmTQR121.js";
|
|
2
2
|
|
|
3
3
|
export { AmbientSplitStatCard, AmbientVisualizationCard };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UdpTimeSelector-Dc5RiWq-.js","names":["useStyles","useStyles"],"sources":["../src/UI/inputs/pickers/FluentDateTimePicker.jsx","../src/UI/inputs/pickers/UdpDateSelector.jsx","../src/UI/inputs/pickers/UdpTimeSelector.jsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { makeStyles, InputAdornment } from '@material-ui/core';\nimport { EventDateIcon } from '@fluentui/react-icons';\nimport {\n MuiPickersUtilsProvider,\n KeyboardDateTimePicker\n} from '@material-ui/pickers';\nimport DateFnsUtils from '@date-io/date-fns';\nimport PropTypes from 'prop-types';\n\nconst useStyles = makeStyles((theme) => ({\n root: {},\n inputRoot: {\n fontSize: 12\n },\n input: {\n borderRadius: 2,\n height: 32,\n padding: 0,\n paddingLeft: theme.spacing(1)\n },\n formTextInput: {\n fontSize: 14\n },\n labelRoot: {\n fontSize: 14\n },\n FormControl: {\n display: 'none',\n marginTop: 0\n }\n}));\n\nexport const FluentDateTimePicker = (props) => {\n const classes = useStyles();\n const {\n id,\n udprecordid,\n label,\n startAdornment,\n endAdornment,\n handleDateChange: onChangeProp,\n selectedDate,\n ...otherProps\n } = props;\n\n const onChange = useCallback(\n (e, value) => {\n return onChangeProp?.(e, value);\n },\n [onChangeProp]\n );\n\n return (\n <div>\n <MuiPickersUtilsProvider utils={DateFnsUtils}>\n <KeyboardDateTimePicker\n // disableToolbar\n // variant='inline'\n format='MM/dd/yyyy HH:mm'\n margin='normal'\n id={id}\n udprecordid={udprecordid}\n inputVariant='outlined'\n value={selectedDate}\n onChange={onChange}\n {...otherProps}\n KeyboardButtonProps={{\n 'aria-label': 'change date',\n udprecordid: udprecordid + '-button'\n }}\n keyboardIcon={<EventDateIcon style={{ fontSize: 16 }} />}\n InputProps={{\n classes: {\n root: classes.input,\n input: classes.formTextInput,\n ...props.InputProps?.classes\n },\n ...props.InputProps,\n ...startAdornment,\n ...endAdornment,\n startAdornment: (\n <InputAdornment\n classes={{ root: classes.inputRoot }}\n className={classes.inputRoot}\n position='start'\n >\n {label}\n </InputAdornment>\n )\n }}\n InputLabelProps={{\n shrink: false,\n classes: {\n root: classes.labelRoot,\n focused: classes.labelFocused\n }\n }}\n />\n </MuiPickersUtilsProvider>\n </div>\n );\n};\n\nFluentDateTimePicker.propTypes = {\n /**\n * Adornment label (eg, From: )\n */\n label: PropTypes.string.isRequired\n /**\n * Id\n */\n};\n","import React from 'react'; \nimport { makeStyles} from '@material-ui/core'; \nimport PropTypes from 'prop-types'; \n \nconst useStyles = makeStyles((theme) => ({ \n dateInput: { \n borderRadius: 2, \n height: 32, \n padding: theme.spacing(1), \n margin: theme.spacing(1), // Add margin around the input \n fontSize: 14, \n border: '1px solid #ced4da', \n backgroundColor: 'transparent', // Set the background color to transparent \n '&:focus': { \n borderColor: theme.palette.primary.main, \n outline: 'none', \n }, \n }, \n})); \n \nexport const UdpDateSelector = (props) => { \n const classes = useStyles(); \n const { \n id, \n udprecordid, \n label, \n handleDateChange: onChangeProp, \n selectedDate, \n ...otherProps \n } = props; \n \n const onChange = (event) => { \n return onChangeProp?.(event.target.value); \n }; \n \n return ( \n <label htmlFor={id} className={classes.labelRoot}> \n {label} \n <input \n type=\"date\" \n id={id} \n className={classes.dateInput} \n value={selectedDate} \n onChange={onChange} \n {...otherProps} \n /> \n </label> \n ); \n}; \n \nUdpDateSelector.propTypes = { \n label: PropTypes.string.isRequired, \n id: PropTypes.string.isRequired, \n handleDateChange: PropTypes.func, \n selectedDate: PropTypes.string, \n}; \n \nexport default UdpDateSelector; ","import React from 'react'; \nimport { makeStyles } from '@material-ui/core'; \nimport PropTypes from 'prop-types'; \n \nconst useStyles = makeStyles((theme) => ({ \n // Style for the time input box with transparent background \n timeInput: { \n borderRadius: 2, // Rounded corners with a radius of 2px \n height: 32, \n padding: theme.spacing(1), // Padding inside the input box, typically 8px if default theme spacing is used \n margin: theme.spacing(1), // Margin outside the input box to create space around the element \n fontSize: 14, // Font size of 14px for the text inside the input \n border: '1px solid #ced4da', // Border of 1px solid grey, matching old Material-UI grey \n backgroundColor: 'transparent', \n '&:focus': { \n borderColor: theme.palette.primary.main, // Border color changes to primary color when the input is focused \n outline: 'none', // Removes the default browser outline on focus \n }, \n }, \n})); \n\n \nexport const UdpTimeSelector = (props) => { \n const classes = useStyles(); \n const { id, label, ...otherProps } = props; \n \n return ( \n <label htmlFor={id} className={classes.labelRoot}> \n {label} \n <input \n type=\"time\" \n id={id} \n udprecordid={\"udpRecord-FluentTimePicker-\"+id}\n className={classes.timeInput} \n {...otherProps} \n /> \n </label> \n ); \n}; \n \nUdpTimeSelector.propTypes = { \n /** \n * Label for the time input \n */ \n label: PropTypes.string, \n /** \n * Id for the time input \n */ \n id: PropTypes.string, \n}; \n \nexport default UdpTimeSelector; "],"mappings":"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"}
|
|
@@ -20,13 +20,14 @@ import { t as UdpTabs } from "./UdpTabs-DVZGEwOC.js";
|
|
|
20
20
|
import { t as PageContainer } from "./PageContainer-DTXNLt_2.js";
|
|
21
21
|
import { t as Adornment } from "./Adornment-Ciq1X7he.js";
|
|
22
22
|
import { t as AmbientCard } from "./AmbientCard-CLW4bPCu.js";
|
|
23
|
-
import { t as
|
|
23
|
+
import { t as AmbientTextField } from "./AmbientTextField-CdnqPJUw.js";
|
|
24
24
|
import { t as FluentDialog } from "./FluentDialog-B5ZxvX1E.js";
|
|
25
25
|
import { t as LinearProgress$1 } from "./LinearProgress-CpJeIaEP.js";
|
|
26
26
|
import { t as FluentTextField } from "./FluentTextField-WfFk-koa.js";
|
|
27
27
|
import { t as useAuthedUser } from "./useAuthedUser-Bhr7Yhlg.js";
|
|
28
28
|
import { t as Divider$1 } from "./Divider-B63XWSBY.js";
|
|
29
29
|
import { n as AmbientList } from "./dataDisplay-CTkvIsCs.js";
|
|
30
|
+
import { t as AmbientAutoComplete } from "./AmbientAutoComplete-NohpvB31.js";
|
|
30
31
|
import { t as EmptyStateDisplay } from "./EmptyStateDisplay-YOwCw38_.js";
|
|
31
32
|
import { t as FileViewer } from "./fileViewer-BbIFHura.js";
|
|
32
33
|
import { n as UdpTabPanel } from "./tabs-CAaJhUt5.js";
|
|
@@ -34,7 +35,7 @@ import { n as UdpTimeline } from "./timeline-CdeAJqvB.js";
|
|
|
34
35
|
import { t as SearchMethodUdpGrid } from "./SearchMethodUdpGrid-CWYZUOx-.js";
|
|
35
36
|
import { i as getLocalizedDateTimeString, t as formatDate } from "./dateUtils-COj9Xpy9.js";
|
|
36
37
|
import { t as UdpActionCard } from "./UdpActionCard-D-YAYE-C.js";
|
|
37
|
-
import { t as Attachments } from "./uploader-
|
|
38
|
+
import { t as Attachments } from "./uploader-YWjDebFN.js";
|
|
38
39
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
39
40
|
import { CircularProgress, FormControlLabel, LinearProgress, Switch, makeStyles } from "@material-ui/core";
|
|
40
41
|
import { useSnackbar } from "notistack";
|
|
@@ -47,6 +48,7 @@ import { ConfigService, UdpAttachmentItem, UdpTimelineConnector, UdpTimelineDot,
|
|
|
47
48
|
import "./udp/pages/UdpTransactionsPage/sidesheets/WorkflowActions.css";
|
|
48
49
|
import "./udp/pages/UdpTransactionsPage/sidesheets/EditTransaction.css";
|
|
49
50
|
import "./udp/pages/UdpTransactionsPage/components/EditTransactionDetailsFooterItem.css";
|
|
51
|
+
import "./udp/pages/UdpTransactionsPage/components/EditTransactionDetailsFormFields.css";
|
|
50
52
|
import "./udp/pages/UdpTransactionsPage/UdpTransactionsPage.css";
|
|
51
53
|
|
|
52
54
|
//#region src/stores/transactionStore.ts
|
|
@@ -1170,12 +1172,13 @@ var EditTransactionDetailsFooterItem_default = EditTransactionDetailsFooterItem;
|
|
|
1170
1172
|
const EditTransactionDetailsFormFields = (props) => {
|
|
1171
1173
|
const { transaction, fieldAttributes } = props;
|
|
1172
1174
|
const { t } = useTranslation();
|
|
1175
|
+
const { getHiddenFields, getRequiredFields } = useTransactionEngine(transaction.transactionTypeId);
|
|
1173
1176
|
const fieldComponentMap = {
|
|
1174
|
-
string:
|
|
1175
|
-
datetime:
|
|
1176
|
-
number:
|
|
1177
|
+
string: AmbientTextField,
|
|
1178
|
+
datetime: AmbientTextField,
|
|
1179
|
+
number: AmbientTextField,
|
|
1177
1180
|
bool: Switch,
|
|
1178
|
-
array:
|
|
1181
|
+
array: AmbientAutoComplete
|
|
1179
1182
|
};
|
|
1180
1183
|
const getEntityName = (optionValuesArr, entityId) => {
|
|
1181
1184
|
return (optionValuesArr?.find((entity) => entity.id == entityId))?.name;
|
|
@@ -1185,29 +1188,41 @@ const EditTransactionDetailsFormFields = (props) => {
|
|
|
1185
1188
|
"short",
|
|
1186
1189
|
"long"
|
|
1187
1190
|
];
|
|
1191
|
+
const removeTimeFormatDate = (date) => {
|
|
1192
|
+
const parsedDate = new Date(date);
|
|
1193
|
+
if (parsedDate.getTime()) {
|
|
1194
|
+
const year = parsedDate.getFullYear();
|
|
1195
|
+
const month = parsedDate.getMonth() + 1;
|
|
1196
|
+
const day = parsedDate.getDate().toString().padStart(2, "0");
|
|
1197
|
+
return `${year}-${month.toString().padStart(2, "0")}-${day}`;
|
|
1198
|
+
}
|
|
1199
|
+
return parsedDate;
|
|
1200
|
+
};
|
|
1188
1201
|
const dataTypeComponentMap = (transaction$1, attribute) => {
|
|
1189
|
-
|
|
1190
|
-
let
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
const isAsscoiationLabel = attribute.properties.maintainenceConfig.associationLabel;
|
|
1202
|
+
const fieldName = attribute.name;
|
|
1203
|
+
let fieldDataType = attribute.type.toLowerCase();
|
|
1204
|
+
fieldDataType = numberDataTypes.includes(fieldDataType) ? "number" : fieldDataType;
|
|
1205
|
+
const isAsscoiationLabel = attribute.associationLabel;
|
|
1194
1206
|
let fieldComponentProps = null;
|
|
1195
|
-
switch (
|
|
1207
|
+
switch (fieldDataType) {
|
|
1196
1208
|
case "number":
|
|
1197
1209
|
fieldComponentProps = {
|
|
1198
|
-
initialValue: transaction$1.entityBusinessObject[
|
|
1210
|
+
initialValue: transaction$1.entityBusinessObject[fieldName],
|
|
1199
1211
|
type: "number",
|
|
1200
1212
|
InputProps: { inputProps: { min: 0 } }
|
|
1201
1213
|
};
|
|
1202
1214
|
break;
|
|
1203
1215
|
case "datetime":
|
|
1204
|
-
fieldComponentProps = {
|
|
1216
|
+
fieldComponentProps = {
|
|
1217
|
+
initialValue: removeTimeFormatDate(transaction$1.entityBusinessObject[fieldName]),
|
|
1218
|
+
type: "date"
|
|
1219
|
+
};
|
|
1205
1220
|
break;
|
|
1206
1221
|
case "array":
|
|
1207
1222
|
fieldComponentProps = {
|
|
1208
|
-
options: attribute?.options
|
|
1209
|
-
|
|
1210
|
-
initialValue: transaction$1.entityBusinessObject[
|
|
1223
|
+
options: attribute?.options?.map((option) => option.id),
|
|
1224
|
+
getOptionLabelFunction: (option) => getEntityName(attribute?.options, option) || option,
|
|
1225
|
+
initialValue: transaction$1.entityBusinessObject[fieldName]
|
|
1211
1226
|
};
|
|
1212
1227
|
break;
|
|
1213
1228
|
case "bool":
|
|
@@ -1216,24 +1231,26 @@ const EditTransactionDetailsFormFields = (props) => {
|
|
|
1216
1231
|
initialValue: false
|
|
1217
1232
|
};
|
|
1218
1233
|
break;
|
|
1219
|
-
default: fieldComponentProps = { initialValue: transaction$1.entityBusinessObject[
|
|
1234
|
+
default: fieldComponentProps = { initialValue: transaction$1.entityBusinessObject[fieldName] };
|
|
1220
1235
|
}
|
|
1221
|
-
|
|
1236
|
+
const formLabel = isAsscoiationLabel ? fieldName + " Name" : fieldName;
|
|
1237
|
+
const isRequired = getRequiredFields(transaction$1).includes(fieldName) || attribute.required;
|
|
1238
|
+
const isHidden = getHiddenFields(transaction$1).includes(fieldName) || attribute.isPrimaryKey || !attribute.extendedProperties.defaultVisible;
|
|
1222
1239
|
let fieldComponent = /* @__PURE__ */ React.createElement(Field, {
|
|
1223
|
-
component: fieldComponentMap[
|
|
1240
|
+
component: fieldComponentMap[fieldDataType] ?? AmbientTextField,
|
|
1224
1241
|
label: t(formLabel),
|
|
1225
|
-
name:
|
|
1242
|
+
name: fieldName,
|
|
1226
1243
|
fullWidth: true,
|
|
1227
1244
|
variant: "outlined",
|
|
1228
1245
|
margin: "normal",
|
|
1229
|
-
disabled: attribute.
|
|
1230
|
-
required:
|
|
1246
|
+
disabled: attribute.isReadOnly,
|
|
1247
|
+
required: isRequired && fieldDataType != "bool",
|
|
1231
1248
|
...fieldComponentProps
|
|
1232
1249
|
});
|
|
1233
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null,
|
|
1250
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, !isHidden && (fieldDataType == "bool" ? /* @__PURE__ */ React.createElement(FormControlLabel, {
|
|
1234
1251
|
control: fieldComponent,
|
|
1235
1252
|
label: formLabel
|
|
1236
|
-
}) : fieldComponent);
|
|
1253
|
+
}) : fieldComponent));
|
|
1237
1254
|
};
|
|
1238
1255
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, fieldAttributes.map((attribute) => {
|
|
1239
1256
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, dataTypeComponentMap(transaction, attribute));
|
|
@@ -1249,7 +1266,11 @@ const EditTransactionDetailsForm = (props) => {
|
|
|
1249
1266
|
const fullyQualifiedName = transaction.entityBusinessKey?.split("|")[0];
|
|
1250
1267
|
const { handleErrorSnackbar, handleSuccessSnackbar } = useHandleAxiosSnackbar();
|
|
1251
1268
|
const { t } = useTranslation();
|
|
1252
|
-
const
|
|
1269
|
+
const { currentApiCatalogId, catalogsMap } = useCatalogStore();
|
|
1270
|
+
const catalogObjectList = useMemo(() => {
|
|
1271
|
+
if (catalogsMap && currentApiCatalogId && catalogsMap[currentApiCatalogId]) return catalogsMap[currentApiCatalogId]?.ctlg?.catalogObjectList;
|
|
1272
|
+
}, [catalogsMap, currentApiCatalogId]);
|
|
1273
|
+
const [{ data: udpObjectInfo }, fetchUdpObjectInfo] = useAxiosMutate(ConfigService$1.productV1ApiUrl, `UdpObjectInfo/search`, {
|
|
1253
1274
|
method: "post",
|
|
1254
1275
|
data: {
|
|
1255
1276
|
eagerLoad: true,
|
|
@@ -1262,9 +1283,9 @@ const EditTransactionDetailsForm = (props) => {
|
|
|
1262
1283
|
}]
|
|
1263
1284
|
}
|
|
1264
1285
|
});
|
|
1265
|
-
const updateFieldInfo = (tableEntries,
|
|
1286
|
+
const updateFieldInfo = (tableEntries, catalogObjectFieldInfo, fkFieldInfo, fkDomainName) => {
|
|
1266
1287
|
let updatedFields = {
|
|
1267
|
-
|
|
1288
|
+
type: "array",
|
|
1268
1289
|
options: tableEntries,
|
|
1269
1290
|
domainName: fkDomainName
|
|
1270
1291
|
};
|
|
@@ -1272,29 +1293,87 @@ const EditTransactionDetailsForm = (props) => {
|
|
|
1272
1293
|
...fkFieldInfo,
|
|
1273
1294
|
...updatedFields
|
|
1274
1295
|
};
|
|
1275
|
-
const index =
|
|
1276
|
-
if (index != -1)
|
|
1296
|
+
const index = catalogObjectFieldInfo.findIndex((f) => f.name.toLowerCase() === fkFieldInfo.name.toLowerCase());
|
|
1297
|
+
if (index != -1) catalogObjectFieldInfo[index] = updatedFieldInfo;
|
|
1277
1298
|
};
|
|
1278
|
-
const
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1299
|
+
const mergeCatalogObjectInfoFieldInfo = useCallback((entityCatalogObjectInfo, filteredEntityFieldInfo) => {
|
|
1300
|
+
return entityCatalogObjectInfo.map((entityCatalogObject) => {
|
|
1301
|
+
let matchingEntityFieldInfo = filteredEntityFieldInfo.find((fieldInfo) => {
|
|
1302
|
+
let formattedFieldName = fieldInfo.name.slice(0, 1).toLowerCase() + fieldInfo.name.slice(1);
|
|
1303
|
+
if (fieldInfo.name == "ID") formattedFieldName = formattedFieldName.toLowerCase();
|
|
1304
|
+
return formattedFieldName == entityCatalogObject.name;
|
|
1305
|
+
});
|
|
1306
|
+
if (matchingEntityFieldInfo) {
|
|
1307
|
+
let additional_fields = {
|
|
1308
|
+
hidden: matchingEntityFieldInfo.properties.maintainenceConfig.hidden,
|
|
1309
|
+
associationLabel: matchingEntityFieldInfo.properties.maintainenceConfig.associationLabel,
|
|
1310
|
+
isPrimaryKey: matchingEntityFieldInfo.isPrimaryKey
|
|
1311
|
+
};
|
|
1312
|
+
return {
|
|
1313
|
+
...entityCatalogObject,
|
|
1314
|
+
...additional_fields
|
|
1315
|
+
};
|
|
1316
|
+
} else return entityCatalogObject;
|
|
1317
|
+
});
|
|
1318
|
+
}, []);
|
|
1319
|
+
const filterOutManyToManyRelationships = (CatalogObjectInfo) => {
|
|
1320
|
+
return CatalogObjectInfo.filter((catalogObject) => {
|
|
1321
|
+
const cardinality = catalogObject.extendedProperties?.childEntityAssoc?.Cardinality;
|
|
1322
|
+
if (cardinality != void 0) return cardinality != CardinalityTypeEnums.Many_To_Many && cardinality != CardinalityTypeEnums.One_To_One && catalogObject.name.toLowerCase() != "businessobjectkey";
|
|
1323
|
+
else return catalogObject.name.toLowerCase() != "businessobjectkey";
|
|
1324
|
+
});
|
|
1289
1325
|
};
|
|
1326
|
+
const updateFkFields = useCallback(async (entityCatalogObjectInfo, catalogObjectInfo) => {
|
|
1327
|
+
const childEntityAssociation = catalogObjectInfo.extendedProperties.childEntityAssoc;
|
|
1328
|
+
if (childEntityAssociation.Cardinality != void 0) {
|
|
1329
|
+
const foreignKeyAssociationFields = childEntityAssociation.Keys[0].split(",");
|
|
1330
|
+
let fieldsInAssociationToIgnore = [
|
|
1331
|
+
"id",
|
|
1332
|
+
"businessobjectkey",
|
|
1333
|
+
"entitybusinesskey"
|
|
1334
|
+
];
|
|
1335
|
+
return Promise.all(foreignKeyAssociationFields.map(async (fkFieldName) => {
|
|
1336
|
+
if (fkFieldName.toLowerCase() != "id" && !fieldsInAssociationToIgnore.includes(fkFieldName.toLowerCase())) {
|
|
1337
|
+
let fkFieldInfo = entityCatalogObjectInfo.find((field) => field.name.toLowerCase() == fkFieldName.toLowerCase());
|
|
1338
|
+
const fkDomainName = getSanitizedName(childEntityAssociation.TargetType);
|
|
1339
|
+
try {
|
|
1340
|
+
const getTableEntriesResp = await apiMutate(ConfigService$1.productV1ApiUrl, `${fkDomainName}`, { method: "get" });
|
|
1341
|
+
if (getTableEntriesResp.data.length > 0 && fkFieldInfo) updateFieldInfo(getTableEntriesResp.data, entityCatalogObjectInfo, fkFieldInfo, fkDomainName);
|
|
1342
|
+
} catch (error) {
|
|
1343
|
+
handleErrorSnackbar(new Error(t(`Error finiding field information! Please try again.`)));
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
}));
|
|
1347
|
+
}
|
|
1348
|
+
}, [handleErrorSnackbar, t]);
|
|
1349
|
+
const filterAdjustEntityAttributes = useCallback(async (catalogObjectInfo) => {
|
|
1350
|
+
let entityCatalogObjectInfo = catalogObjectInfo;
|
|
1351
|
+
entityCatalogObjectInfo = filterOutManyToManyRelationships(entityCatalogObjectInfo);
|
|
1352
|
+
let filteredEntityFieldInfo = (await fetchUdpObjectInfo()).data.pageList[0].objectFieldInfo.filter((fieldInfo) => fieldInfo.properties.isDefaultVisible);
|
|
1353
|
+
await Promise.all(entityCatalogObjectInfo.map((catalogObjectInfo$1) => {
|
|
1354
|
+
return updateFkFields(entityCatalogObjectInfo, catalogObjectInfo$1);
|
|
1355
|
+
}));
|
|
1356
|
+
entityCatalogObjectInfo = entityCatalogObjectInfo.filter((catalogObject) => !catalogObject.extendedProperties.childEntity);
|
|
1357
|
+
return mergeCatalogObjectInfoFieldInfo(entityCatalogObjectInfo, filteredEntityFieldInfo);
|
|
1358
|
+
}, [
|
|
1359
|
+
fetchUdpObjectInfo,
|
|
1360
|
+
mergeCatalogObjectInfoFieldInfo,
|
|
1361
|
+
updateFkFields
|
|
1362
|
+
]);
|
|
1290
1363
|
useEffect(() => {
|
|
1291
|
-
|
|
1292
|
-
|
|
1364
|
+
if (catalogObjectList) {
|
|
1365
|
+
let domainName = transaction.entityBusinessKey.split("|")[0].split(".").pop();
|
|
1366
|
+
let domainCatalogObject = catalogObjectList?.find((catalogObject) => getSanitizedName(catalogObject.catalogObjectName) == domainName);
|
|
1367
|
+
if (domainCatalogObject) filterAdjustEntityAttributes(domainCatalogObject.properties).then((filteredResp) => {
|
|
1293
1368
|
setEntityAttributes(filteredResp);
|
|
1294
1369
|
});
|
|
1295
|
-
}
|
|
1296
|
-
}, [
|
|
1297
|
-
|
|
1370
|
+
}
|
|
1371
|
+
}, [
|
|
1372
|
+
filterAdjustEntityAttributes,
|
|
1373
|
+
catalogObjectList,
|
|
1374
|
+
transaction
|
|
1375
|
+
]);
|
|
1376
|
+
const executeSaveChanges = useCallback(async (data) => apiMutate(ConfigService$1.productV1ApiUrl, `udpTransaction/${transaction?.transactionId}/saveChanges`, { method: "put" }, data), [transaction.transactionId]);
|
|
1298
1377
|
const onSubmit = useCallback(async (values) => {
|
|
1299
1378
|
if ((await executeSaveChanges({ data: values }))?.status === 200) handleSuccessSnackbar(t("Transaction has been saved successfully"));
|
|
1300
1379
|
else handleErrorSnackbar(new Error(t(`Error saving Transaction. Please try again later.`)));
|
|
@@ -2045,4 +2124,4 @@ var UdpTransactionsPage_exports = /* @__PURE__ */ __export({ default: () => UdpT
|
|
|
2045
2124
|
|
|
2046
2125
|
//#endregion
|
|
2047
2126
|
export { UdpTransactionsPage_default as n, UdpTransactionsPage_exports as t };
|
|
2048
|
-
//# sourceMappingURL=UdpTransactionsPage-
|
|
2127
|
+
//# sourceMappingURL=UdpTransactionsPage-CNl_xeZO.js.map
|