udp-react-enterprise-component-library 25.18.1-beta.53 → 25.18.1-beta.54
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/{AmbientAutoComplete-TYJ_JlO5.js → AmbientAutoComplete-NohpvB31.js} +3 -2
- package/dist/AmbientAutoComplete-NohpvB31.js.map +1 -0
- package/dist/{ImportDataFromFileMapping-DR5rjwE8.js → ImportDataFromFileMapping-3XXgUR-Z.js} +2 -2
- package/dist/{ImportDataFromFileMapping-DR5rjwE8.js.map → ImportDataFromFileMapping-3XXgUR-Z.js.map} +1 -1
- package/dist/MyExportsPage-C79id2As.js +3 -0
- package/dist/{MyExportsPage-zKRz4fL5.js → MyExportsPage-Ckti0gqK.js} +2 -2
- package/dist/{MyExportsPage-zKRz4fL5.js.map → MyExportsPage-Ckti0gqK.js.map} +1 -1
- package/dist/{Shell-B6Qxi2hZ.js → Shell-B8oi58iV.js} +2 -2
- package/dist/{Shell-B6Qxi2hZ.js.map → Shell-B8oi58iV.js.map} +1 -1
- package/dist/UI/forms/index.js +1 -1
- package/dist/UI/index.js +1 -1
- package/dist/UI/inputs/textField/index.js +1 -1
- package/dist/{UdpImportFromFileMappingPage-BOBh4ySA.js → UdpImportFromFileMappingPage-B2jpLQlP.js} +2 -2
- package/dist/{UdpImportFromFileMappingPage-BOBh4ySA.js.map → UdpImportFromFileMappingPage-B2jpLQlP.js.map} +1 -1
- package/dist/{UdpTransactionTypesPage-DFpnQn7f.js → UdpTransactionTypesPage-C-TdPgtF.js} +2 -2
- package/dist/{UdpTransactionTypesPage-DFpnQn7f.js.map → UdpTransactionTypesPage-C-TdPgtF.js.map} +1 -1
- package/dist/{UdpTransactionsPage-hu97DvPW.js → UdpTransactionsPage-CCcw7ZRU.js} +2 -2
- package/dist/{UdpTransactionsPage-hu97DvPW.js.map → UdpTransactionsPage-CCcw7ZRU.js.map} +1 -1
- package/dist/{forms-KpO4nIfl.js → forms-BVssUn2h.js} +7 -5
- package/dist/{forms-KpO4nIfl.js.map → forms-BVssUn2h.js.map} +1 -1
- package/dist/index.js +8 -8
- package/dist/routes/index.js +1 -1
- package/dist/{routes-qV4EIuwZ.js → routes-BxMFj34q.js} +2 -2
- package/dist/{routes-qV4EIuwZ.js.map → routes-BxMFj34q.js.map} +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/types/src/UI/forms/UdpTransactionEmailForm.d.ts +5 -2
- package/dist/types/src/UI/forms/UdpTransactionEmailForm.d.ts.map +1 -1
- package/dist/types/src/UI/inputs/textField/AmbientAutoComplete.d.ts.map +1 -1
- 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/utilities/useDateStringColumnDef.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/udp/export/index.js +1 -1
- package/dist/udp/fileImportMapping/index.js +1 -1
- package/dist/udp/pages/UdpImportFromFileMappingPage/index.js +1 -1
- package/dist/udp/pages/UdpPages/index.js +3 -3
- package/dist/udp/pages/UdpTransactionTypesPage/index.js +1 -1
- package/dist/udp/pages/UdpTransactionsPage/index.js +1 -1
- package/dist/uploader/index.js +1 -1
- package/dist/{uploader-Dvf2cDh8.js → uploader-CGVZIlR1.js} +2 -2
- package/dist/{uploader-Dvf2cDh8.js.map → uploader-CGVZIlR1.js.map} +1 -1
- package/export-map.json +1 -1
- package/package.json +1 -1
- package/dist/AmbientAutoComplete-TYJ_JlO5.js.map +0 -1
- package/dist/MyExportsPage-DFIMneFr.js +0 -3
|
@@ -18,7 +18,7 @@ import { t as Box$1 } from "./Box-Colr5GEl.js";
|
|
|
18
18
|
import { t as Grid$1 } from "./Grid-D1-yWIw5.js";
|
|
19
19
|
import { n as ListElement } from "./ListCard-SkkEVkQJ.js";
|
|
20
20
|
import { t as FluentCheckbox } from "./FluentCheckbox-CX7XgoFz.js";
|
|
21
|
-
import { t as AmbientAutoComplete } from "./AmbientAutoComplete-
|
|
21
|
+
import { t as AmbientAutoComplete } from "./AmbientAutoComplete-NohpvB31.js";
|
|
22
22
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
23
23
|
import { Divider, FormControlLabel, LinearProgress, Paper, TextField, Typography, makeStyles, useTheme } from "@material-ui/core";
|
|
24
24
|
import { useTranslation } from "react-i18next";
|
|
@@ -432,7 +432,7 @@ const PaymentReversalForm = ({ id, paymentData, onSubmitCompleted }) => {
|
|
|
432
432
|
|
|
433
433
|
//#endregion
|
|
434
434
|
//#region src/UI/forms/UdpTransactionEmailForm.jsx
|
|
435
|
-
const UdpTransactionEmailForm = ({ existingTransactionAttachments, toOptions, ccOptions, toLabelFunction, ccLabelFunction,
|
|
435
|
+
const UdpTransactionEmailForm = ({ existingTransactionAttachments, toOptions, ccOptions, toLabelFunction, toGroupBy, toFilterOptions, ccLabelFunction, ccGroupBy, ccFilterOptions, attachmentsLabelFunction }) => {
|
|
436
436
|
const i18n = useTranslation().t;
|
|
437
437
|
const form = useForm();
|
|
438
438
|
const handleOnBodyChange = useCallback((value) => {
|
|
@@ -446,7 +446,8 @@ const UdpTransactionEmailForm = ({ existingTransactionAttachments, toOptions, cc
|
|
|
446
446
|
isMultiple: true,
|
|
447
447
|
options: toOptions,
|
|
448
448
|
getOptionLabelFunction: toLabelFunction,
|
|
449
|
-
groupBy,
|
|
449
|
+
groupBy: toGroupBy,
|
|
450
|
+
filterOptions: toFilterOptions,
|
|
450
451
|
label: i18n("To"),
|
|
451
452
|
required: true
|
|
452
453
|
}), /* @__PURE__ */ React.createElement(Field, {
|
|
@@ -457,7 +458,8 @@ const UdpTransactionEmailForm = ({ existingTransactionAttachments, toOptions, cc
|
|
|
457
458
|
isMultiple: true,
|
|
458
459
|
options: ccOptions,
|
|
459
460
|
getOptionLabelFunction: ccLabelFunction,
|
|
460
|
-
groupBy,
|
|
461
|
+
groupBy: ccGroupBy,
|
|
462
|
+
filterOptions: ccFilterOptions,
|
|
461
463
|
label: i18n("Cc")
|
|
462
464
|
}), /* @__PURE__ */ React.createElement(Field, {
|
|
463
465
|
component: AmbientAutoComplete,
|
|
@@ -483,4 +485,4 @@ const UdpTransactionEmailForm = ({ existingTransactionAttachments, toOptions, cc
|
|
|
483
485
|
|
|
484
486
|
//#endregion
|
|
485
487
|
export { PaymentReversalForm as n, LoginForm as r, UdpTransactionEmailForm as t };
|
|
486
|
-
//# sourceMappingURL=forms-
|
|
488
|
+
//# sourceMappingURL=forms-BVssUn2h.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms-KpO4nIfl.js","names":["useStyles","Box","LinearProgress","Typography","Grid","FormControl"],"sources":["../src/UI/forms/LoginForm.jsx","../src/UI/forms/PaymentReversalForm.jsx","../src/UI/forms/UdpTransactionEmailForm.jsx"],"sourcesContent":["import React from 'react';\nimport {\n TextField,\n Paper,\n Typography,\n makeStyles,\n LinearProgress,\n useTheme\n} from '@material-ui/core';\nimport { LayoutUnit } from '../../layout/LayoutUnit';\nimport { Form, FormButtons, SubmitButton, Field } from '../../utilities/form';\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n justifyContent: 'center',\n marginTop: theme.spacing(8)\n },\n loginWindow: {\n position: 'relative',\n flex: 1,\n padding: theme.spacing(3),\n width: 390\n },\n underline: {\n '&::after': {\n borderColor: 'black'\n }\n },\n label: {\n color: 'black'\n },\n logo: {\n width: 150\n },\n error: {\n color: theme.palette.error.main\n }\n}));\n\nexport const LoginForm = (props) => {\n const { onSubmit, logo, usernameLabel, passwordLabel, error, loading } =\n props;\n const classes = useStyles();\n const theme = useTheme();\n\n return (\n <div className={classes.root}>\n <Form onSubmit={onSubmit}>\n <Paper className={classes.loginWindow}>\n <Typography variant='h5' gutterBottom>\n Login\n </Typography>\n {error && (\n <Typography variant='body1' className={classes.error}>\n Your username or password is invalid\n </Typography>\n )}\n <Field\n component={TextField}\n margin='normal'\n type='email'\n name='username'\n InputProps={{\n classes: {\n underline: classes.underline\n }\n }}\n InputLabelProps={{\n focused: true,\n shrink: true,\n style: { color: theme.palette.grey[500] }\n }}\n label={usernameLabel || 'Sign in name'}\n fullWidth\n size='small'\n variant='standard'\n validate={(value) => {\n if (!value?.length) {\n return 'Please enter your sign in name';\n }\n }}\n />\n <Field\n component={TextField}\n margin='normal'\n type='password'\n name='password'\n InputProps={{\n classes: {\n underline: classes.underline\n }\n }}\n InputLabelProps={{\n focused: true,\n shrink: true,\n style: { color: theme.palette.grey[500] }\n }}\n label={passwordLabel || 'Password'}\n fullWidth\n size='small'\n variant='standard'\n validate={(value) => {\n if (!value?.length) {\n return 'Please enter your password';\n }\n }}\n />\n\n <FormButtons style={{ justifyContent: 'flex-end', marginBottom: 0 }}>\n <SubmitButton\n variant='contained'\n disablePristine={false}\n style={{\n margin: 0,\n backgroundColor: theme.palette.grey[800],\n color: '#fff'\n }}\n >\n Sign In\n </SubmitButton>\n </FormButtons>\n {logo && (\n <div>\n <img className={classes.logo} src={logo} alt='Unity' />\n </div>\n )}\n <LayoutUnit unit='xxs' />\n </Paper>\n {loading && <LinearProgress />}\n </Form>\n </div>\n );\n};\n","import React, { useState, useEffect, useCallback, useMemo } from 'react';\nimport { format } from 'date-fns';\nimport { FluentCardText } from '../surfaces/cards/fluentCards/FluentCardText';\nimport { IndicatorChip } from '../utilityDisplay/IndicatorChip';\nimport { makeStyles, Divider, FormControlLabel } from '@material-ui/core';\nimport { Box } from '../Box';\nimport { AmbientCard } from '../surfaces/cards/AmbientCard';\nimport { Typography } from '../dataDisplay/typography/Typography';\nimport { Grid } from '../Grid';\nimport { ListElement } from '../mapLayout/ui/ListCard';\nimport { useTranslation } from 'react-i18next';\nimport { FluentCheckbox } from '../inputs/checkbox/FluentCheckbox';\nimport { FormControl } from '../utilityDisplay/FormControl';\nimport { Field } from '../../utilities/form/Field';\nimport { FluentTextField } from '../inputs/textField/FluentTextField';\nimport { Form } from '../../utilities/form/Form';\nimport { apiMutate } from '../../utilities/useAxiosMutate';\nimport { LinearProgress } from '../loading/LinearProgress';\nimport { ConfigService } from '../../configService';\n\nconst useStyles = makeStyles((theme) => ({\n formControlHalf: {\n width: '40%'\n },\n formControl: {\n width: '100%'\n },\n formControlMargin: {\n width: '100%',\n marginTop: '5px'\n },\n formControlCheck: {\n width: '100%',\n marginTop: '5px',\n marginLeft: '3px'\n },\n submitControl: {\n marginTop: '35px'\n },\n assetTypeLabel: {\n top: theme.spacing(-0.7)\n },\n labelText: {\n color: 'rgba(0, 0, 0)',\n fontSize: '0.875rem'\n },\n main: {\n flexGrow: 1,\n padding: '0 24px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center'\n },\n appIcon: {\n width: 24,\n height: 24,\n color: theme.palette.text.primary\n },\n arrowIcon: {\n width: 12,\n height: 12\n },\n linkTitle: {\n marginRight: theme.spacing(1)\n },\n formControlGeneral: {\n width: '100%',\n marginLeft: '5px',\n marginTop: '5px'\n },\n cardNumber: {\n width: '60%'\n },\n accordion: {\n width: '100%',\n margin: '0px',\n padding: '0px',\n boxShadow: 'none',\n backgroundColor: 'inherit',\n '&:before': {\n display: 'none'\n },\n '&$expanded': {\n margin: '0px'\n }\n },\n accordionSummary: {\n padding: '0px',\n paddingLeft: '5px',\n margin: '0px',\n minHeight: '0px',\n backgroundColor: 'inherit',\n flexDirection: 'row-reverse',\n '&$expanded': {\n margin: '0px',\n padding: '0px',\n minHeight: '0px'\n }\n },\n expanded: {\n margin: '0px',\n paddingLeft: '5px'\n },\n content: {\n margin: 0,\n backgroundColor: 'inherit',\n '&$expanded': {\n margin: 0\n }\n },\n accordionDetails: {\n padding: '0px',\n display: 'block',\n margin: '0px'\n },\n cardContent: {\n backgroundColor: '#FAFAFA'\n },\n listItem: {\n paddingTop: '3px',\n paddingBottom: '3px',\n fontSize: '0.875rem'\n },\n listItemDetail: {\n display: 'flex',\n justifyContent: 'flex-end'\n },\n listItemAccordion: {\n paddingTop: '3px',\n paddingBottom: '3px',\n paddingLeft: '0px'\n },\n divider: {\n margin: '0px 12px'\n },\n dividerBold: {\n margin: '0px 12px',\n backgroundColor: 'black'\n },\n itemCheckbox: {\n padding: '0px'\n },\n itemDescription: {\n color: 'grey'\n },\n list: {\n backgroundColor: '#FFF'\n },\n dropdown: {\n marginTop: theme.spacing(-1),\n backgroundColor: '#FFF'\n },\n locationDropDown: {\n margin: theme.spacing(0),\n marginTop: theme.spacing(-0.5),\n fontSize: '0.75rem'\n },\n box: {\n display: 'flex',\n justifyContent: 'space-around',\n flexDirection: 'row',\n paddingBottom: '15px',\n gap: '10px',\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column',\n flexWrap: 'wrap',\n alignItems: 'flex-start'\n }\n }\n}));\n\nconst PAYMENT_APPROVED = 1;\nconst PAYMENT_DENIED = 43;\nconst RESULT_SUCCESS = 200;\nconst RESULT_FAILURE = 401;\n\nexport const PaymentReversalForm = ({ id, paymentData, onSubmitCompleted }) => {\n const classes = useStyles();\n const { t } = useTranslation();\n\n const [loading, setLoading] = useState(true);\n const [paymentTransaction, setPaymentTransaction] = useState(undefined);\n\n /**\n * API call to get the payment transaction details\n */\n const getPaymentTransaction = useCallback(\n async (payload) => {\n if (!payload) {\n return null;\n }\n\n return apiMutate(\n ConfigService.pgV1ApiUrl,\n `PaymentTransaction/search`,\n {\n method: 'POST',\n data: payload\n },\n {}\n );\n },\n []\n );\n\n /**\n * API call to get the account information by account number\n */\n const reverseTransactionExecute = useCallback(\n async (transactionID) => {\n if (!transactionID) {\n return null;\n }\n\n return apiMutate(\n ConfigService.pgV1ApiUrl,\n `PaymentTransaction/${transactionID}`,\n {\n method: 'DELETE',\n },\n {}\n );\n },\n []\n );\n\n /**\n * submitAccountDetailsForm\n * @param {*} formData\n * @return {*}\n */\n const handleSubmitPaymentReversal = (values) => {\n // const data = {\n // amountToReverse: values.amountToReverse,\n // isSendCustomerPaymentConfirmation:\n // values.isSendCustomerPaymentConfirmation\n // };\n\n if (!paymentData?.transactionId) {\n return;\n }\n\n reverseTransactionExecute(paymentData?.transactionId)\n .then(() => {\n onSubmitCompleted && onSubmitCompleted({ transactionId: paymentData?.transactionId, error: false });\n })\n .catch((error) => {\n onSubmitCompleted && onSubmitCompleted({ transactionId: paymentData?.transactionId, error });\n });\n }\n\n useEffect(() => {\n const fetchData = async () => {\n try {\n setLoading(true);\n const response = await getPaymentTransaction({\n eagerLoad: true,\n pageNumber: 1,\n pageSize: 20,\n filterElements: [\n {\n searchField: 'transactionId',\n searchValue: paymentData?.transactionId,\n searchOperator: '=',\n },\n ],\n orderElements: [],\n });\n\n if (response?.data) {\n setPaymentTransaction(response?.data?.pageList?.[0]);\n }\n\n } catch (err) {\n console.error(err);\n } finally {\n setLoading(false);\n }\n };\n\n if (paymentData?.transactionId) {\n fetchData();\n }\n }, [getPaymentTransaction, paymentData]);\n\n const statusText = useMemo(() => {\n return (paymentTransaction?.responseCode === PAYMENT_APPROVED && paymentTransaction?.paymentResultID === RESULT_SUCCESS) ? 'Approved' :\n (paymentTransaction?.responseCode === PAYMENT_DENIED && paymentTransaction?.paymentResultID === RESULT_FAILURE) ? 'Declined' : 'Undetermined';\n }, [paymentTransaction]);\n\n const statusCode = useMemo(() => {\n return (paymentTransaction?.responseCode === PAYMENT_APPROVED && paymentTransaction?.paymentResultID === RESULT_SUCCESS) ? 'ok':\n (paymentTransaction?.responseCode === PAYMENT_DENIED && paymentTransaction?.paymentResultID === RESULT_FAILURE) ? 'error' : 'warning';\n }, [paymentTransaction]);\n\n return (\n <Box>\n {loading && (\n <Box sx={{ width: '100%' }}>\n <LinearProgress />\n </Box>\n )}\n <Box className={classes.box}>\n <FluentCardText title='Value' description={`$${paymentData?.amount}`} />\n <FluentCardText\n title='Status'\n description={\n <IndicatorChip\n text={statusText}\n status={statusCode}\n />\n }\n />\n </Box>\n <AmbientCard fullWidth={true}>\n <Typography\n variant='subtitle2'\n style={{ marginTop: '0px', marginBottom: '10px' }}\n >\n {t('Payment Details')}\n </Typography>\n\n <Box display='flex' flexDirection='column'>\n <Grid container spacing={1}>\n {[\n [t('Transaction ID'), paymentData?.transactionId || t('N/A')],\n [t('Date/Time'), paymentData?.transactionDate ? format(new Date(paymentData?.transactionDate), 'EEE, MMM d, yyyy') : t('N/A')],\n [t('Processor'), paymentData?.paymentSourceName || t('No Information found')],\n [t('Response Code'), paymentData?.authorizationNumber || t('N/A')]\n ].map(([k, v]) => (\n <Grid item xs={12} sm={6}>\n {/* @ts-ignore */}\n <ListElement subject={k} value={v} hideDivider={true} />\n </Grid>\n ))}\n </Grid>\n </Box>\n\n <Divider style={{ marginTop: '10px', marginBottom: '10px' }} />\n\n <Box display='flex' flexDirection='column'>\n <Grid container spacing={1}>\n {[\n [t('Customer Name'), paymentTransaction?.reference3 || t('N/A')],\n [t('Type'), paymentData?.tender || t('N/A')],\n [t('Card Holder Name'), t('N/A')],\n [t('CC Number'), paymentData?.cardLast4 || t('N/A')],\n [t('Company'), paymentTransaction?.applicationClient?.name || t('N/A')],\n [t('Expiration Date'), paymentData?.date || t('N/A')],\n [t('AVS'), t('N/A')],\n [t('Status'),paymentData?.authorizationNumber ? 'Approved' : 'Declined'],\n [t('Confirmation'), paymentData?.authorizationNumber || t('N/A')]\n ].map(([k, v]) => (\n <Grid item xs={12} sm={6}>\n {/* @ts-ignore */}\n <ListElement subject={k} value={v} hideDivider={true} />\n </Grid>\n ))}\n </Grid>\n </Box>\n\n <Divider style={{ marginTop: '10px', marginBottom: '10px' }} />\n\n <Box display='flex' flexDirection='column'>\n <Grid container spacing={1}>\n {[\n [t('First Attempt Date'), paymentData?.date || t('N/A')],\n [t('Initial Transaction'), paymentData?.date || t('N/A')],\n [t('Next Attempt Date'), paymentData?.date || t('N/A')],\n [t('Retry Count'), t('N/A')]\n ].map(([k, v]) => (\n <Grid item xs={12} sm={6}>\n {/* @ts-ignore */}\n <ListElement subject={k} value={v} hideDivider={true} />\n </Grid>\n ))}\n </Grid>\n </Box>\n\n <Divider style={{ marginTop: '10px', marginBottom: '10px' }} />\n\n <Form\n id={id}\n onSubmit={handleSubmitPaymentReversal}\n render={({ handleSubmit, form, values }) => {\n return (\n <>\n <FormControl className={classes.formControl}>\n <Field\n component={FluentTextField}\n ComponentProps={{\n label: t('Amount to Reverse'),\n variant: 'outlined',\n margin: 'normal',\n size: 'small',\n disabled: false,\n fullWidth: true,\n autoComplete: 'off',\n inputProps: {\n maxLength: 256,\n autocomplete: 'off'\n }\n }}\n name='amountToReverse'\n initialValue={paymentData?.amount}\n onChange={() => {}}\n required={true}\n />\n </FormControl>\n\n <FormControl className={classes.formControlGeneral}>\n <FormControlLabel\n control={\n <Field\n component={FluentCheckbox}\n name='isSendCustomerPaymentConfirmation'\n type='checkbox'\n defaultValue={false}\n required={false}\n onChange={() => {}}\n // @ts-ignore\n size='small'\n />\n }\n label={t('Send Customer Payment Confirmation')}\n />\n </FormControl>\n </>\n );\n }}\n />\n </AmbientCard>\n </Box>\n );\n};\n","import React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Field } from '../../utilities/form';\nimport { CkRichEditor } from '../inputs/richEditors';\nimport { AmbientAutoComplete, AmbientTextField } from '../inputs/textField';\nimport { useForm } from '../../utilities/form';\nimport { LayoutUnit } from '../../layout';\n\nexport const UdpTransactionEmailForm = ({\n existingTransactionAttachments,\n toOptions,\n ccOptions,\n toLabelFunction,\n ccLabelFunction,\n attachmentsLabelFunction,\n groupBy\n}) => {\n const i18n = useTranslation().t;\n const form = useForm();\n\n const handleOnBodyChange = useCallback(\n (value) => {\n form.change('body', value);\n },\n [form]\n );\n\n return (\n <>\n <Field\n component={AmbientAutoComplete}\n name='to'\n margin='normal'\n variant='outlined'\n isMultiple={true}\n options={toOptions}\n getOptionLabelFunction={toLabelFunction}\n groupBy={groupBy}\n label={i18n('To')}\n required={true}\n />\n <Field\n component={AmbientAutoComplete}\n name='cc'\n margin='normal'\n variant='outlined'\n isMultiple={true}\n options={ccOptions}\n getOptionLabelFunction={ccLabelFunction}\n groupBy={groupBy}\n label={i18n('Cc')}\n />\n <Field\n component={AmbientAutoComplete}\n name='attachments'\n margin='normal'\n variant='outlined'\n isMultiple={true}\n options={existingTransactionAttachments}\n getOptionLabelFunction={attachmentsLabelFunction}\n label={i18n('Attachments')}\n />\n <Field\n component={AmbientTextField}\n name='subject'\n margin='normal'\n variant='outlined'\n label={i18n('Subject')}\n required={true}\n />\n <LayoutUnit unit='nudge' />\n <CkRichEditor name='body' handleChange={handleOnBodyChange} />\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,MAAMA,cAAY,YAAY,WAAW;CACvC,MAAM;EACJ,SAAS;EACT,gBAAgB;EAChB,WAAW,MAAM,QAAQ,EAAE;EAC5B;CACD,aAAa;EACX,UAAU;EACV,MAAM;EACN,SAAS,MAAM,QAAQ,EAAE;EACzB,OAAO;EACR;CACD,WAAW,EACT,YAAY,EACV,aAAa,SACd,EACF;CACD,OAAO,EACL,OAAO,SACR;CACD,MAAM,EACJ,OAAO,KACR;CACD,OAAO,EACL,OAAO,MAAM,QAAQ,MAAM,MAC5B;CACF,EAAE;AAEH,MAAa,aAAa,UAAU;CAClC,MAAM,EAAE,UAAU,MAAM,eAAe,eAAe,OAAO,YAC3D;CACF,MAAM,UAAUA,aAAW;CAC3B,MAAM,QAAQ,UAAU;AAExB,QACE,oCAAC,SAAI,WAAW,QAAQ,QACtB,oCAAC,QAAe,YACd,oCAAC,SAAM,WAAW,QAAQ,eACxB,oCAAC;EAAW,SAAQ;EAAK;IAAa,QAEzB,EACZ,SACC,oCAAC;EAAW,SAAQ;EAAQ,WAAW,QAAQ;IAAO,uCAEzC,EAEf,oCAAC;EACC,WAAW;EACX,QAAO;EACP,MAAK;EACL,MAAK;EACL,YAAY,EACV,SAAS,EACP,WAAW,QAAQ,WACpB,EACF;EACD,iBAAiB;GACf,SAAS;GACT,QAAQ;GACR,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAK,MAAM;GAC1C;EACD,OAAO,iBAA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,QAAO;EACP,SAAQ;EACR,YAAY;EACZ,SAAS;EACT,wBAAwB;EACf;EACT,OAAO,KAAK,KAAK;GACjB,EACF,oCAAC;EACC,WAAW;EACX,MAAK;EACL,QAAO;EACP,SAAQ;EACR,YAAY;EACZ,SAAS;EACT,wBAAwB;EACxB,OAAO,KAAK,cAAc;GAC1B,EACF,oCAAC;EACC,WAAW;EACX,MAAK;EACL,QAAO;EACP,SAAQ;EACR,OAAO,KAAK,UAAU;EACtB,UAAU;GACV,EACF,oCAAC,cAAW,MAAK,UAAU,EAC3B,oCAAC;EAAa,MAAK;EAAO,cAAc;GAAsB,CAC7D"}
|
|
1
|
+
{"version":3,"file":"forms-BVssUn2h.js","names":["useStyles","Box","LinearProgress","Typography","Grid","FormControl"],"sources":["../src/UI/forms/LoginForm.jsx","../src/UI/forms/PaymentReversalForm.jsx","../src/UI/forms/UdpTransactionEmailForm.jsx"],"sourcesContent":["import React from 'react';\nimport {\n TextField,\n Paper,\n Typography,\n makeStyles,\n LinearProgress,\n useTheme\n} from '@material-ui/core';\nimport { LayoutUnit } from '../../layout/LayoutUnit';\nimport { Form, FormButtons, SubmitButton, Field } from '../../utilities/form';\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n justifyContent: 'center',\n marginTop: theme.spacing(8)\n },\n loginWindow: {\n position: 'relative',\n flex: 1,\n padding: theme.spacing(3),\n width: 390\n },\n underline: {\n '&::after': {\n borderColor: 'black'\n }\n },\n label: {\n color: 'black'\n },\n logo: {\n width: 150\n },\n error: {\n color: theme.palette.error.main\n }\n}));\n\nexport const LoginForm = (props) => {\n const { onSubmit, logo, usernameLabel, passwordLabel, error, loading } =\n props;\n const classes = useStyles();\n const theme = useTheme();\n\n return (\n <div className={classes.root}>\n <Form onSubmit={onSubmit}>\n <Paper className={classes.loginWindow}>\n <Typography variant='h5' gutterBottom>\n Login\n </Typography>\n {error && (\n <Typography variant='body1' className={classes.error}>\n Your username or password is invalid\n </Typography>\n )}\n <Field\n component={TextField}\n margin='normal'\n type='email'\n name='username'\n InputProps={{\n classes: {\n underline: classes.underline\n }\n }}\n InputLabelProps={{\n focused: true,\n shrink: true,\n style: { color: theme.palette.grey[500] }\n }}\n label={usernameLabel || 'Sign in name'}\n fullWidth\n size='small'\n variant='standard'\n validate={(value) => {\n if (!value?.length) {\n return 'Please enter your sign in name';\n }\n }}\n />\n <Field\n component={TextField}\n margin='normal'\n type='password'\n name='password'\n InputProps={{\n classes: {\n underline: classes.underline\n }\n }}\n InputLabelProps={{\n focused: true,\n shrink: true,\n style: { color: theme.palette.grey[500] }\n }}\n label={passwordLabel || 'Password'}\n fullWidth\n size='small'\n variant='standard'\n validate={(value) => {\n if (!value?.length) {\n return 'Please enter your password';\n }\n }}\n />\n\n <FormButtons style={{ justifyContent: 'flex-end', marginBottom: 0 }}>\n <SubmitButton\n variant='contained'\n disablePristine={false}\n style={{\n margin: 0,\n backgroundColor: theme.palette.grey[800],\n color: '#fff'\n }}\n >\n Sign In\n </SubmitButton>\n </FormButtons>\n {logo && (\n <div>\n <img className={classes.logo} src={logo} alt='Unity' />\n </div>\n )}\n <LayoutUnit unit='xxs' />\n </Paper>\n {loading && <LinearProgress />}\n </Form>\n </div>\n );\n};\n","import React, { useState, useEffect, useCallback, useMemo } from 'react';\nimport { format } from 'date-fns';\nimport { FluentCardText } from '../surfaces/cards/fluentCards/FluentCardText';\nimport { IndicatorChip } from '../utilityDisplay/IndicatorChip';\nimport { makeStyles, Divider, FormControlLabel } from '@material-ui/core';\nimport { Box } from '../Box';\nimport { AmbientCard } from '../surfaces/cards/AmbientCard';\nimport { Typography } from '../dataDisplay/typography/Typography';\nimport { Grid } from '../Grid';\nimport { ListElement } from '../mapLayout/ui/ListCard';\nimport { useTranslation } from 'react-i18next';\nimport { FluentCheckbox } from '../inputs/checkbox/FluentCheckbox';\nimport { FormControl } from '../utilityDisplay/FormControl';\nimport { Field } from '../../utilities/form/Field';\nimport { FluentTextField } from '../inputs/textField/FluentTextField';\nimport { Form } from '../../utilities/form/Form';\nimport { apiMutate } from '../../utilities/useAxiosMutate';\nimport { LinearProgress } from '../loading/LinearProgress';\nimport { ConfigService } from '../../configService';\n\nconst useStyles = makeStyles((theme) => ({\n formControlHalf: {\n width: '40%'\n },\n formControl: {\n width: '100%'\n },\n formControlMargin: {\n width: '100%',\n marginTop: '5px'\n },\n formControlCheck: {\n width: '100%',\n marginTop: '5px',\n marginLeft: '3px'\n },\n submitControl: {\n marginTop: '35px'\n },\n assetTypeLabel: {\n top: theme.spacing(-0.7)\n },\n labelText: {\n color: 'rgba(0, 0, 0)',\n fontSize: '0.875rem'\n },\n main: {\n flexGrow: 1,\n padding: '0 24px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center'\n },\n appIcon: {\n width: 24,\n height: 24,\n color: theme.palette.text.primary\n },\n arrowIcon: {\n width: 12,\n height: 12\n },\n linkTitle: {\n marginRight: theme.spacing(1)\n },\n formControlGeneral: {\n width: '100%',\n marginLeft: '5px',\n marginTop: '5px'\n },\n cardNumber: {\n width: '60%'\n },\n accordion: {\n width: '100%',\n margin: '0px',\n padding: '0px',\n boxShadow: 'none',\n backgroundColor: 'inherit',\n '&:before': {\n display: 'none'\n },\n '&$expanded': {\n margin: '0px'\n }\n },\n accordionSummary: {\n padding: '0px',\n paddingLeft: '5px',\n margin: '0px',\n minHeight: '0px',\n backgroundColor: 'inherit',\n flexDirection: 'row-reverse',\n '&$expanded': {\n margin: '0px',\n padding: '0px',\n minHeight: '0px'\n }\n },\n expanded: {\n margin: '0px',\n paddingLeft: '5px'\n },\n content: {\n margin: 0,\n backgroundColor: 'inherit',\n '&$expanded': {\n margin: 0\n }\n },\n accordionDetails: {\n padding: '0px',\n display: 'block',\n margin: '0px'\n },\n cardContent: {\n backgroundColor: '#FAFAFA'\n },\n listItem: {\n paddingTop: '3px',\n paddingBottom: '3px',\n fontSize: '0.875rem'\n },\n listItemDetail: {\n display: 'flex',\n justifyContent: 'flex-end'\n },\n listItemAccordion: {\n paddingTop: '3px',\n paddingBottom: '3px',\n paddingLeft: '0px'\n },\n divider: {\n margin: '0px 12px'\n },\n dividerBold: {\n margin: '0px 12px',\n backgroundColor: 'black'\n },\n itemCheckbox: {\n padding: '0px'\n },\n itemDescription: {\n color: 'grey'\n },\n list: {\n backgroundColor: '#FFF'\n },\n dropdown: {\n marginTop: theme.spacing(-1),\n backgroundColor: '#FFF'\n },\n locationDropDown: {\n margin: theme.spacing(0),\n marginTop: theme.spacing(-0.5),\n fontSize: '0.75rem'\n },\n box: {\n display: 'flex',\n justifyContent: 'space-around',\n flexDirection: 'row',\n paddingBottom: '15px',\n gap: '10px',\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column',\n flexWrap: 'wrap',\n alignItems: 'flex-start'\n }\n }\n}));\n\nconst PAYMENT_APPROVED = 1;\nconst PAYMENT_DENIED = 43;\nconst RESULT_SUCCESS = 200;\nconst RESULT_FAILURE = 401;\n\nexport const PaymentReversalForm = ({ id, paymentData, onSubmitCompleted }) => {\n const classes = useStyles();\n const { t } = useTranslation();\n\n const [loading, setLoading] = useState(true);\n const [paymentTransaction, setPaymentTransaction] = useState(undefined);\n\n /**\n * API call to get the payment transaction details\n */\n const getPaymentTransaction = useCallback(\n async (payload) => {\n if (!payload) {\n return null;\n }\n\n return apiMutate(\n ConfigService.pgV1ApiUrl,\n `PaymentTransaction/search`,\n {\n method: 'POST',\n data: payload\n },\n {}\n );\n },\n []\n );\n\n /**\n * API call to get the account information by account number\n */\n const reverseTransactionExecute = useCallback(\n async (transactionID) => {\n if (!transactionID) {\n return null;\n }\n\n return apiMutate(\n ConfigService.pgV1ApiUrl,\n `PaymentTransaction/${transactionID}`,\n {\n method: 'DELETE',\n },\n {}\n );\n },\n []\n );\n\n /**\n * submitAccountDetailsForm\n * @param {*} formData\n * @return {*}\n */\n const handleSubmitPaymentReversal = (values) => {\n // const data = {\n // amountToReverse: values.amountToReverse,\n // isSendCustomerPaymentConfirmation:\n // values.isSendCustomerPaymentConfirmation\n // };\n\n if (!paymentData?.transactionId) {\n return;\n }\n\n reverseTransactionExecute(paymentData?.transactionId)\n .then(() => {\n onSubmitCompleted && onSubmitCompleted({ transactionId: paymentData?.transactionId, error: false });\n })\n .catch((error) => {\n onSubmitCompleted && onSubmitCompleted({ transactionId: paymentData?.transactionId, error });\n });\n }\n\n useEffect(() => {\n const fetchData = async () => {\n try {\n setLoading(true);\n const response = await getPaymentTransaction({\n eagerLoad: true,\n pageNumber: 1,\n pageSize: 20,\n filterElements: [\n {\n searchField: 'transactionId',\n searchValue: paymentData?.transactionId,\n searchOperator: '=',\n },\n ],\n orderElements: [],\n });\n\n if (response?.data) {\n setPaymentTransaction(response?.data?.pageList?.[0]);\n }\n\n } catch (err) {\n console.error(err);\n } finally {\n setLoading(false);\n }\n };\n\n if (paymentData?.transactionId) {\n fetchData();\n }\n }, [getPaymentTransaction, paymentData]);\n\n const statusText = useMemo(() => {\n return (paymentTransaction?.responseCode === PAYMENT_APPROVED && paymentTransaction?.paymentResultID === RESULT_SUCCESS) ? 'Approved' :\n (paymentTransaction?.responseCode === PAYMENT_DENIED && paymentTransaction?.paymentResultID === RESULT_FAILURE) ? 'Declined' : 'Undetermined';\n }, [paymentTransaction]);\n\n const statusCode = useMemo(() => {\n return (paymentTransaction?.responseCode === PAYMENT_APPROVED && paymentTransaction?.paymentResultID === RESULT_SUCCESS) ? 'ok':\n (paymentTransaction?.responseCode === PAYMENT_DENIED && paymentTransaction?.paymentResultID === RESULT_FAILURE) ? 'error' : 'warning';\n }, [paymentTransaction]);\n\n return (\n <Box>\n {loading && (\n <Box sx={{ width: '100%' }}>\n <LinearProgress />\n </Box>\n )}\n <Box className={classes.box}>\n <FluentCardText title='Value' description={`$${paymentData?.amount}`} />\n <FluentCardText\n title='Status'\n description={\n <IndicatorChip\n text={statusText}\n status={statusCode}\n />\n }\n />\n </Box>\n <AmbientCard fullWidth={true}>\n <Typography\n variant='subtitle2'\n style={{ marginTop: '0px', marginBottom: '10px' }}\n >\n {t('Payment Details')}\n </Typography>\n\n <Box display='flex' flexDirection='column'>\n <Grid container spacing={1}>\n {[\n [t('Transaction ID'), paymentData?.transactionId || t('N/A')],\n [t('Date/Time'), paymentData?.transactionDate ? format(new Date(paymentData?.transactionDate), 'EEE, MMM d, yyyy') : t('N/A')],\n [t('Processor'), paymentData?.paymentSourceName || t('No Information found')],\n [t('Response Code'), paymentData?.authorizationNumber || t('N/A')]\n ].map(([k, v]) => (\n <Grid item xs={12} sm={6}>\n {/* @ts-ignore */}\n <ListElement subject={k} value={v} hideDivider={true} />\n </Grid>\n ))}\n </Grid>\n </Box>\n\n <Divider style={{ marginTop: '10px', marginBottom: '10px' }} />\n\n <Box display='flex' flexDirection='column'>\n <Grid container spacing={1}>\n {[\n [t('Customer Name'), paymentTransaction?.reference3 || t('N/A')],\n [t('Type'), paymentData?.tender || t('N/A')],\n [t('Card Holder Name'), t('N/A')],\n [t('CC Number'), paymentData?.cardLast4 || t('N/A')],\n [t('Company'), paymentTransaction?.applicationClient?.name || t('N/A')],\n [t('Expiration Date'), paymentData?.date || t('N/A')],\n [t('AVS'), t('N/A')],\n [t('Status'),paymentData?.authorizationNumber ? 'Approved' : 'Declined'],\n [t('Confirmation'), paymentData?.authorizationNumber || t('N/A')]\n ].map(([k, v]) => (\n <Grid item xs={12} sm={6}>\n {/* @ts-ignore */}\n <ListElement subject={k} value={v} hideDivider={true} />\n </Grid>\n ))}\n </Grid>\n </Box>\n\n <Divider style={{ marginTop: '10px', marginBottom: '10px' }} />\n\n <Box display='flex' flexDirection='column'>\n <Grid container spacing={1}>\n {[\n [t('First Attempt Date'), paymentData?.date || t('N/A')],\n [t('Initial Transaction'), paymentData?.date || t('N/A')],\n [t('Next Attempt Date'), paymentData?.date || t('N/A')],\n [t('Retry Count'), t('N/A')]\n ].map(([k, v]) => (\n <Grid item xs={12} sm={6}>\n {/* @ts-ignore */}\n <ListElement subject={k} value={v} hideDivider={true} />\n </Grid>\n ))}\n </Grid>\n </Box>\n\n <Divider style={{ marginTop: '10px', marginBottom: '10px' }} />\n\n <Form\n id={id}\n onSubmit={handleSubmitPaymentReversal}\n render={({ handleSubmit, form, values }) => {\n return (\n <>\n <FormControl className={classes.formControl}>\n <Field\n component={FluentTextField}\n ComponentProps={{\n label: t('Amount to Reverse'),\n variant: 'outlined',\n margin: 'normal',\n size: 'small',\n disabled: false,\n fullWidth: true,\n autoComplete: 'off',\n inputProps: {\n maxLength: 256,\n autocomplete: 'off'\n }\n }}\n name='amountToReverse'\n initialValue={paymentData?.amount}\n onChange={() => {}}\n required={true}\n />\n </FormControl>\n\n <FormControl className={classes.formControlGeneral}>\n <FormControlLabel\n control={\n <Field\n component={FluentCheckbox}\n name='isSendCustomerPaymentConfirmation'\n type='checkbox'\n defaultValue={false}\n required={false}\n onChange={() => {}}\n // @ts-ignore\n size='small'\n />\n }\n label={t('Send Customer Payment Confirmation')}\n />\n </FormControl>\n </>\n );\n }}\n />\n </AmbientCard>\n </Box>\n );\n};\n","import React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Field } from '../../utilities/form';\nimport { CkRichEditor } from '../inputs/richEditors';\nimport { AmbientAutoComplete, AmbientTextField } from '../inputs/textField';\nimport { useForm } from '../../utilities/form';\nimport { LayoutUnit } from '../../layout';\n\nexport const UdpTransactionEmailForm = ({\n existingTransactionAttachments,\n toOptions,\n ccOptions,\n toLabelFunction,\n toGroupBy,\n toFilterOptions,\n ccLabelFunction,\n ccGroupBy,\n ccFilterOptions,\n attachmentsLabelFunction\n}) => {\n const i18n = useTranslation().t;\n const form = useForm();\n\n const handleOnBodyChange = useCallback(\n (value) => {\n form.change('body', value);\n },\n [form]\n );\n\n return (\n <>\n <Field\n component={AmbientAutoComplete}\n name='to'\n margin='normal'\n variant='outlined'\n isMultiple={true}\n options={toOptions}\n getOptionLabelFunction={toLabelFunction}\n groupBy={toGroupBy}\n filterOptions={toFilterOptions}\n label={i18n('To')}\n required={true}\n />\n <Field\n component={AmbientAutoComplete}\n name='cc'\n margin='normal'\n variant='outlined'\n isMultiple={true}\n options={ccOptions}\n getOptionLabelFunction={ccLabelFunction}\n groupBy={ccGroupBy}\n filterOptions={ccFilterOptions}\n label={i18n('Cc')}\n />\n <Field\n component={AmbientAutoComplete}\n name='attachments'\n margin='normal'\n variant='outlined'\n isMultiple={true}\n options={existingTransactionAttachments}\n getOptionLabelFunction={attachmentsLabelFunction}\n label={i18n('Attachments')}\n />\n <Field\n component={AmbientTextField}\n name='subject'\n margin='normal'\n variant='outlined'\n label={i18n('Subject')}\n required={true}\n />\n <LayoutUnit unit='nudge' />\n <CkRichEditor name='body' handleChange={handleOnBodyChange} />\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,MAAMA,cAAY,YAAY,WAAW;CACvC,MAAM;EACJ,SAAS;EACT,gBAAgB;EAChB,WAAW,MAAM,QAAQ,EAAE;EAC5B;CACD,aAAa;EACX,UAAU;EACV,MAAM;EACN,SAAS,MAAM,QAAQ,EAAE;EACzB,OAAO;EACR;CACD,WAAW,EACT,YAAY,EACV,aAAa,SACd,EACF;CACD,OAAO,EACL,OAAO,SACR;CACD,MAAM,EACJ,OAAO,KACR;CACD,OAAO,EACL,OAAO,MAAM,QAAQ,MAAM,MAC5B;CACF,EAAE;AAEH,MAAa,aAAa,UAAU;CAClC,MAAM,EAAE,UAAU,MAAM,eAAe,eAAe,OAAO,YAC3D;CACF,MAAM,UAAUA,aAAW;CAC3B,MAAM,QAAQ,UAAU;AAExB,QACE,oCAAC,SAAI,WAAW,QAAQ,QACtB,oCAAC,QAAe,YACd,oCAAC,SAAM,WAAW,QAAQ,eACxB,oCAAC;EAAW,SAAQ;EAAK;IAAa,QAEzB,EACZ,SACC,oCAAC;EAAW,SAAQ;EAAQ,WAAW,QAAQ;IAAO,uCAEzC,EAEf,oCAAC;EACC,WAAW;EACX,QAAO;EACP,MAAK;EACL,MAAK;EACL,YAAY,EACV,SAAS,EACP,WAAW,QAAQ,WACpB,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ACP,SAAQ;EACR,YAAY;EACZ,SAAS;EACT,wBAAwB;EACxB,SAAS;EACT,eAAe;EACf,OAAO,KAAK,KAAK;EACjB,UAAU;GACV,EACF,oCAAC;EACC,WAAW;EACX,MAAK;EACL,QAAO;EACP,SAAQ;EACR,YAAY;EACZ,SAAS;EACT,wBAAwB;EACxB,SAAS;EACT,eAAe;EACf,OAAO,KAAK,KAAK;GACjB,EACF,oCAAC;EACC,WAAW;EACX,MAAK;EACL,QAAO;EACP,SAAQ;EACR,YAAY;EACZ,SAAS;EACT,wBAAwB;EACxB,OAAO,KAAK,cAAc;GAC1B,EACF,oCAAC;EACC,WAAW;EACX,MAAK;EACL,QAAO;EACP,SAAQ;EACR,OAAO,KAAK,UAAU;EACtB,UAAU;GACV,EACF,oCAAC,cAAW,MAAK,UAAU,EAC3B,oCAAC;EAAa,MAAK;EAAO,cAAc;GAAsB,CAC7D"}
|
package/dist/index.js
CHANGED
|
@@ -147,7 +147,7 @@ import { t as PowerBIReport } from "./PowerBIReport-CMrcDCCK.js";
|
|
|
147
147
|
import { t as PageStatus } from "./PageStatus-DNxWVAG8.js";
|
|
148
148
|
import { n as getRouteRolesMapAndMenuActiveMap, t as getMenuItemsRecursively } from "./menuUtilities-Da5uVIJ8.js";
|
|
149
149
|
import { n as useMenuContext, t as MenuProvider } from "./MenuProvider-BuTAUs0Z.js";
|
|
150
|
-
import { n as PrivateRoute, t as UdpRoutes } from "./routes-
|
|
150
|
+
import { n as PrivateRoute, t as UdpRoutes } from "./routes-BxMFj34q.js";
|
|
151
151
|
import { o as ShellDropdown, s as AmbientProjectSwitcher } from "./SiteHeader-CuOFCr7D.js";
|
|
152
152
|
import { n as AppMenuItem, r as AppMenuItemComponent, t as AppMenu } from "./AppMenu-oGJtO6Vp.js";
|
|
153
153
|
import { t as BreadCrumbMenu } from "./BreadCrumbMenu-AehSna6J.js";
|
|
@@ -177,14 +177,14 @@ import { t as FormControl } from "./FormControl-CkybPp4U.js";
|
|
|
177
177
|
import { t as IndicatorChip } from "./IndicatorChip-Dmaib9uq.js";
|
|
178
178
|
import { t as InputAdornment } from "./InputAdornment-CLuALIhc.js";
|
|
179
179
|
import { n as UdpCrudFormFields, t as CrudForm } from "./CrudForm-C9xMnPoA.js";
|
|
180
|
-
import { n as PaymentReversalForm, r as LoginForm, t as UdpTransactionEmailForm } from "./forms-
|
|
180
|
+
import { n as PaymentReversalForm, r as LoginForm, t as UdpTransactionEmailForm } from "./forms-BVssUn2h.js";
|
|
181
181
|
import { t as FluentCardText } from "./FluentCardText-BbDL3Uo_.js";
|
|
182
182
|
import { t as Box } from "./Box-Colr5GEl.js";
|
|
183
183
|
import { t as Grid } from "./Grid-D1-yWIw5.js";
|
|
184
184
|
import { n as ListElement, t as ListCard } from "./ListCard-SkkEVkQJ.js";
|
|
185
185
|
import { t as FluentCheckbox } from "./FluentCheckbox-CX7XgoFz.js";
|
|
186
186
|
import { n as FluentTagField, r as FluentTagFieldComponent, t as KeyValueTextField } from "./textField-OwxxHROu.js";
|
|
187
|
-
import { t as AmbientAutoComplete } from "./AmbientAutoComplete-
|
|
187
|
+
import { t as AmbientAutoComplete } from "./AmbientAutoComplete-NohpvB31.js";
|
|
188
188
|
import { t as ExtenderToggle } from "./ExtenderToggle-DAaajb90.js";
|
|
189
189
|
import { t as HeaderExpander } from "./HeaderExpander-Coexy8dm.js";
|
|
190
190
|
import { t as AmbientToast } from "./AmbientToast-iliGNjGA.js";
|
|
@@ -225,7 +225,7 @@ import { t as UdpMap } from "./maps-BgmvNpkU.js";
|
|
|
225
225
|
import { t as UdpAdvancedSearchBuilder } from "./advancedSearchBuilder-7ixhIwLW.js";
|
|
226
226
|
import { n as SapFlexibleTemplate, t as ToggleSection } from "./templates-2r09nl9N.js";
|
|
227
227
|
import { t as AlertContainer } from "./UI-Baviuqz7.js";
|
|
228
|
-
import { t as Shell } from "./Shell-
|
|
228
|
+
import { t as Shell } from "./Shell-B8oi58iV.js";
|
|
229
229
|
import { t as UserForm } from "./UserForm-DNgeQvad.js";
|
|
230
230
|
import { t as SearchMethodUdpGrid } from "./SearchMethodUdpGrid-CWYZUOx-.js";
|
|
231
231
|
import { n as UdpMaintenanceEnginePage } from "./UdpMaintenanceEnginePage-C5OzABlj.js";
|
|
@@ -239,19 +239,19 @@ import { n as UdpPrivateForm } from "./UdpFormsPrivateForm-D6clAgfY.js";
|
|
|
239
239
|
import { n as UdpFormsListPage_default } from "./UdpFormsListPage-BsTi2bXy.js";
|
|
240
240
|
import { n as UdpFormsBuilderPage_default } from "./UdpFormsBuilderPage-C1oc66zH.js";
|
|
241
241
|
import { t as AmbientStepper } from "./AmbientStepper-BkhoDtpx.js";
|
|
242
|
-
import { t as ImportDataFromFileMapping } from "./ImportDataFromFileMapping-
|
|
242
|
+
import { t as ImportDataFromFileMapping } from "./ImportDataFromFileMapping-3XXgUR-Z.js";
|
|
243
243
|
import { i as EntityMaintenanceUdpGrid, n as ApiMethodInstanceUdpGrid, r as BackwardsCompatibleGrid, t as ServerSideUdpGrid } from "./newGrid-zmtQXU5G.js";
|
|
244
244
|
import { r as useUdpExport, t as ExportSidesheet } from "./ExportSidesheet-DWkoiwxC.js";
|
|
245
245
|
import { t as ClientSideUdpGrid } from "./ClientSideUdpGrid-D5fGumO-.js";
|
|
246
246
|
import { t as TrimForAvatar } from "./TrimForAvatar-BmM2bU6E.js";
|
|
247
247
|
import { i as FluentMenuListButton, n as FluentCompoundButton, r as FluentUploadButton, t as FluentUploadIconButton } from "./buttons-CuLiERQe.js";
|
|
248
248
|
import { t as AmbientToggleButtonGroup } from "./AmbientToggleButtonGroup-Bi9yW5gC.js";
|
|
249
|
-
import { n as UdpTransactionsPage_default } from "./UdpTransactionsPage-
|
|
249
|
+
import { n as UdpTransactionsPage_default } from "./UdpTransactionsPage-CCcw7ZRU.js";
|
|
250
250
|
import { t as AccountFlags } from "./status-moefSFBs.js";
|
|
251
251
|
import { n as FormHeader, r as FormSubHeader, t as StylizedTitle } from "./typography-CvW7cAl8.js";
|
|
252
252
|
import { n as UdpDateSelector, r as FluentDateTimePicker, t as UdpTimeSelector } from "./pickers-B-bB40GS.js";
|
|
253
253
|
import { t as FluentTimePicker } from "./FluentTimePicker-hNcocKsd.js";
|
|
254
|
-
import { t as Attachments } from "./uploader-
|
|
254
|
+
import { t as Attachments } from "./uploader-CGVZIlR1.js";
|
|
255
255
|
import { UdpPages } from "./udp/pages/UdpPages/index.js";
|
|
256
256
|
import { t as CardList } from "./CardList-BPNGTxsh.js";
|
|
257
257
|
import { t as GraphCard } from "./GraphCard-Dv4a99wo.js";
|
|
@@ -299,7 +299,7 @@ import { t as StatusCellRenderer } from "./StatusCellRenderer-E7SYy9Qk.js";
|
|
|
299
299
|
import { t as UdpFormsSubmissionGrid } from "./UdpFormsSubmissionGrid-DzMuwwTO.js";
|
|
300
300
|
import { n as FieldType, t as FieldArrayCard } from "./FieldArrayCard-C1I5_qJ4.js";
|
|
301
301
|
import { n as ApprovalIcon, t as RejectIcon } from "./RejectIcon-BxDdz-WJ.js";
|
|
302
|
-
import { t as MyExportsPage } from "./MyExportsPage-
|
|
302
|
+
import { t as MyExportsPage } from "./MyExportsPage-Ckti0gqK.js";
|
|
303
303
|
import { n as getI18nInstance, r as initializeUnityI18n, t as UdpAppProvider } from "./UdpAppProvider-BuJv7P-y.js";
|
|
304
304
|
import "./errorBoundary/index.js";
|
|
305
305
|
import { UdpPagesLazy, UdpPagesLoaders } from "./udp/pages/UdpPagesLazy/index.js";
|
package/dist/routes/index.js
CHANGED
|
@@ -70,7 +70,7 @@ const MenuPage = lazy(() => import("./MenuPage-R6mbeCuS.js"));
|
|
|
70
70
|
const UdpPublicForm = lazy(() => import("./udp/pages/UdpFormsPublicForm/index.js"));
|
|
71
71
|
const WorkflowContainer = lazy(() => import("./WorkflowContainer-Boj87JRI.js"));
|
|
72
72
|
const PasswordResetRedirect = lazy(() => import("./PasswordResetRedirect-CqxRmE48.js"));
|
|
73
|
-
const MyExportsPage = lazy(() => import("./MyExportsPage-
|
|
73
|
+
const MyExportsPage = lazy(() => import("./MyExportsPage-C79id2As.js"));
|
|
74
74
|
const PageNotFoundRoute = lazy(() => import("./PageNotFoundRoute-DKg6oVCt.js"));
|
|
75
75
|
const UdpMaintenanceConfigPage = lazy(() => import("./udp/pages/UdpMaintenanceConfigPage/index.js"));
|
|
76
76
|
const UdpMaintenanceEnginePage = lazy(() => import("./udp/pages/UdpMaintenanceEnginePage/index.js"));
|
|
@@ -152,4 +152,4 @@ const UdpRoutes = (props) => {
|
|
|
152
152
|
|
|
153
153
|
//#endregion
|
|
154
154
|
export { PrivateRoute as n, UdpRoutes as t };
|
|
155
|
-
//# sourceMappingURL=routes-
|
|
155
|
+
//# sourceMappingURL=routes-BxMFj34q.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes-qV4EIuwZ.js","names":["props"],"sources":["../src/routes/PrivateRoute.jsx","../src/routes/UdpRoutes.jsx"],"sourcesContent":["import React, { useMemo } from 'react';\r\nimport { Route } from 'react-router-dom';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useIsUnityAuthenticated } from '../utilities/auth/useIsUnityAuthenticated';\r\nimport { useUser } from '../utilities/auth/useUser';\r\nimport { PageForbiddenRoute } from './components/PageForbiddenRoute';\r\nimport { useMenuContext } from '../utilities/menus/MenuProvider';\r\n\r\nexport const PrivateRoute = ({ rolesMap: propRolesMap, menuActiveMap: propMenuActiveMap, ...routeProps }) => {\r\n const isAuthenticated = useIsUnityAuthenticated();\r\n const user = useUser();\r\n const { t } = useTranslation();\r\n const menuContext = useMenuContext?.();\r\n const rolesMap = menuContext?.rolesMap ?? propRolesMap;\r\n const menuActiveMap = menuContext?.menuActiveMap ?? propMenuActiveMap;\r\n const userRoles = user.roleIds;\r\n //path is passed from frontend so making sure it meets expected fromat of all lowercase, no spaces, and has format /pathname or /pathname/:param\r\n let pathAsKey = routeProps.path\r\n .toLowerCase()\r\n .replaceAll(' ', '')\r\n .replace('/', '');\r\n pathAsKey = pathAsKey.split('/:')[0];\r\n\r\n const userHasAccessToTenant = useMemo(() => {\r\n if (user?.tenantIds?.includes(user.currentTenantId)) {\r\n return true;\r\n }\r\n return false;\r\n }, [user]);\r\n\r\n const userHasRoles = useMemo(() => {\r\n if (rolesMap?.size > 0) {\r\n if (!rolesMap.has(routeProps.path)) {\r\n return true;\r\n }\r\n const routeRoles = rolesMap.get(routeProps.path);\r\n return routeRoles.every((element) => userRoles.includes(element));\r\n }\r\n return true\r\n }, [userRoles, rolesMap, routeProps.path]);\r\n\r\n const menuIsActive = useMemo(() => {\r\n if (menuActiveMap?.size > 0 && menuActiveMap.has(routeProps.path)) {\r\n return menuActiveMap.get(routeProps.path);\r\n }\r\n }, [menuActiveMap, routeProps.path]);\r\n\r\n if (!userHasAccessToTenant && isAuthenticated && user?.statusCode === 200) {\r\n return (\r\n <Route\r\n path='*'\r\n render={(props) => (\r\n <PageForbiddenRoute\r\n message={t(\r\n 'You do not have access to this tenant. Please select a different Tenant.'\r\n )}\r\n showButton={false}\r\n />\r\n )}\r\n />\r\n );\r\n }\r\n\r\n if (rolesMap?.has(routeProps.path) && !menuIsActive) {\r\n return (\r\n <Route\r\n path='*'\r\n render={(props) => (\r\n <PageForbiddenRoute\r\n message={t(\r\n 'Trying to access inactive menu. Please check your menu configurations'\r\n )}\r\n showButton={false}\r\n />\r\n )}\r\n />\r\n );\r\n }\r\n\r\n if (!user.isUnitySystemAdmin && rolesMap?.size > 0 && !userHasRoles) {\r\n return (\r\n <Route\r\n path='*'\r\n render={(props) => (\r\n <PageForbiddenRoute\r\n message={t(\r\n 'You do not have the required roles to access this page. Please contact an administrator to get access'\r\n )}\r\n showButton={false}\r\n />\r\n )}\r\n />\r\n );\r\n }\r\n\r\n if (isAuthenticated && user?.statusCode === 200) {\r\n return <Route {...routeProps} />;\r\n }\r\n\r\n return null;\r\n};\r\n","import React, { Suspense, lazy } from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport { PrivateRoute } from './PrivateRoute';\nimport { UdpPageEnums } from '../enums/pageEnums';\nimport { ConfigService } from '../configService';\nimport { PageLoading } from '../UI/feedback/PageLoading';\n\n// Lazy load route components\nconst VirtualBrowser = lazy(() =>\n import('../maintenanceEngine/virtualBrowser/VirtualBrowser')\n);\nconst MenuPage = lazy(() => import('../menuPage/MenuPage'));\nconst UdpPublicForm = lazy(() => import('../udp/pages/UdpFormsPublicForm'));\nconst WorkflowContainer = lazy(() => import('../workflow/WorkflowContainer'));\nconst PasswordResetRedirect = lazy(() =>\n import('./components/PasswordResetRedirect')\n);\nconst MyExportsPage = lazy(() => import('../udp/export/MyExportsPage'));\nconst PageNotFoundRoute = lazy(() => import('./components/PageNotFoundRoute'));\nconst UdpMaintenanceConfigPage = lazy(() =>\n import('../udp/pages/UdpMaintenanceConfigPage')\n);\nconst UdpMaintenanceEnginePage = lazy(() =>\n import('../udp/pages/UdpMaintenanceEnginePage')\n);\nconst AadCallback = lazy(() => import('../utilities/auth/AadCallback'));\n\n\nconst UdpTransactionsPage = lazy(() =>\n import('../udp/pages/UdpTransactionsPage')\n);\n\nconst UdpTransactionTypesPage = lazy(() =>\n import('../udp/pages/UdpTransactionTypesPage')\n);\n\nconst PageContainer = lazy(() =>\n import('../page/PageContainer').then(module => ({ default: module.PageContainer }))\n);\n\nconst Reports = lazy(() => import('../reports/Reports'));\n\nconst Inquiry = lazy(() => import('../inquiry/Inquiry'));\n\nexport const UdpRoutes = (props) => {\n const { ...other } = props;\n return (\n <Suspense fallback={<PageLoading />}>\n <Switch>\n <PrivateRoute\n path='/virtual/:id'\n render={(props) => <VirtualBrowser {...props} {...other} />}\n />\n <PrivateRoute\n path='/menupage/:id'\n render={(props) => <MenuPage {...props} {...other} />}\n />\n\n <Route\n path={`/page/${UdpPageEnums.Udp_Public_Forms_Page}`}\n render={(props) => <UdpPublicForm {...props} {...other} />}\n />\n <Route\n path={`/passwordresetsuccess`}\n render={(props) => <PasswordResetRedirect props={props} />}\n />\n <PrivateRoute\n path='/workflowtask/:id'\n render={(props) => <WorkflowContainer {...props} {...other} />}\n />\n <PrivateRoute\n path='/myexports'\n render={(props) => (\n <MyExportsPage\n productId={ConfigService.config.UNITY_PRODUCT_ID}\n {...props}\n {...other}\n />\n )}\n />\n <PrivateRoute\n path='/crudbrowser'\n render={(props) => <UdpMaintenanceEnginePage {...props} />}\n />\n <PrivateRoute\n path='/tablebrowser'\n render={(props) => <UdpMaintenanceConfigPage {...props} />}\n />\n\n <Route path='/aad_callback' component={AadCallback} />\n <PrivateRoute\n path='/transactionsPage'\n render={(props) => <UdpTransactionsPage {...props} />}\n />\n <PrivateRoute\n path='/transactionTypesPage'\n render={(props) => <UdpTransactionTypesPage {...props} />}\n />\n <PrivateRoute path=\"/reports/:id\" exact component={Reports} />\n <PrivateRoute\n path=\"/inquiry/:id\"\n render={props => <Inquiry {...props} />}\n />\n <PrivateRoute\n path=\"/page/:id\"\n render={props => (\n <PageContainer fromMenu={true} {...props} />\n )}\n />\n <PrivateRoute path='*' component={PageNotFoundRoute} />\n </Switch>\n </Suspense>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAQA,MAAa,gBAAgB,EAAE,UAAU,cAAc,eAAe,mBAAmB,GAAG,iBAAiB;CAC3G,MAAM,kBAAkB,yBAAyB;CACjD,MAAM,OAAO,SAAS;CACtB,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,cAAc,kBAAkB;CACtC,MAAM,WAAW,aAAa,YAAY;CAC1C,MAAM,gBAAgB,aAAa,iBAAiB;CACpD,MAAM,YAAY,KAAK;CAEvB,IAAI,YAAY,WAAW,KACxB,aAAa,CACb,WAAW,KAAK,GAAG,CACnB,QAAQ,KAAK,GAAG;AACnB,aAAY,UAAU,MAAM,KAAK,CAAC;CAElC,MAAM,wBAAwB,cAAc;AAC1C,MAAI,MAAM,WAAW,SAAS,KAAK,gBAAgB,CACjD,QAAO;AAET,SAAO;IACN,CAAC,KAAK,CAAC;CAEV,MAAM,eAAe,cAAc;AACjC,MAAI,UAAU,OAAO,GA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oCAAC,yBAA4BA,QAAS;GACzD,EACF,oCAAC;EAAa,MAAK;EAAe;EAAM,WAAW;GAAW,EAChE,oCAAC;EACC,MAAK;EACL,SAAQ,YAAS,oCAAC,SAAYA,QAAS;GACvC,EACF,oCAAC;EACC,MAAK;EACL,SAAQ,YACN,oCAAC;GAAc,UAAU;GAAM,GAAIA;IAAS;GAE9C,EACA,oCAAC;EAAa,MAAK;EAAI,WAAW;GAAqB,CAChD,CACA"}
|
|
1
|
+
{"version":3,"file":"routes-BxMFj34q.js","names":["props"],"sources":["../src/routes/PrivateRoute.jsx","../src/routes/UdpRoutes.jsx"],"sourcesContent":["import React, { useMemo } from 'react';\r\nimport { Route } from 'react-router-dom';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { useIsUnityAuthenticated } from '../utilities/auth/useIsUnityAuthenticated';\r\nimport { useUser } from '../utilities/auth/useUser';\r\nimport { PageForbiddenRoute } from './components/PageForbiddenRoute';\r\nimport { useMenuContext } from '../utilities/menus/MenuProvider';\r\n\r\nexport const PrivateRoute = ({ rolesMap: propRolesMap, menuActiveMap: propMenuActiveMap, ...routeProps }) => {\r\n const isAuthenticated = useIsUnityAuthenticated();\r\n const user = useUser();\r\n const { t } = useTranslation();\r\n const menuContext = useMenuContext?.();\r\n const rolesMap = menuContext?.rolesMap ?? propRolesMap;\r\n const menuActiveMap = menuContext?.menuActiveMap ?? propMenuActiveMap;\r\n const userRoles = user.roleIds;\r\n //path is passed from frontend so making sure it meets expected fromat of all lowercase, no spaces, and has format /pathname or /pathname/:param\r\n let pathAsKey = routeProps.path\r\n .toLowerCase()\r\n .replaceAll(' ', '')\r\n .replace('/', '');\r\n pathAsKey = pathAsKey.split('/:')[0];\r\n\r\n const userHasAccessToTenant = useMemo(() => {\r\n if (user?.tenantIds?.includes(user.currentTenantId)) {\r\n return true;\r\n }\r\n return false;\r\n }, [user]);\r\n\r\n const userHasRoles = useMemo(() => {\r\n if (rolesMap?.size > 0) {\r\n if (!rolesMap.has(routeProps.path)) {\r\n return true;\r\n }\r\n const routeRoles = rolesMap.get(routeProps.path);\r\n return routeRoles.every((element) => userRoles.includes(element));\r\n }\r\n return true\r\n }, [userRoles, rolesMap, routeProps.path]);\r\n\r\n const menuIsActive = useMemo(() => {\r\n if (menuActiveMap?.size > 0 && menuActiveMap.has(routeProps.path)) {\r\n return menuActiveMap.get(routeProps.path);\r\n }\r\n }, [menuActiveMap, routeProps.path]);\r\n\r\n if (!userHasAccessToTenant && isAuthenticated && user?.statusCode === 200) {\r\n return (\r\n <Route\r\n path='*'\r\n render={(props) => (\r\n <PageForbiddenRoute\r\n message={t(\r\n 'You do not have access to this tenant. Please select a different Tenant.'\r\n )}\r\n showButton={false}\r\n />\r\n )}\r\n />\r\n );\r\n }\r\n\r\n if (rolesMap?.has(routeProps.path) && !menuIsActive) {\r\n return (\r\n <Route\r\n path='*'\r\n render={(props) => (\r\n <PageForbiddenRoute\r\n message={t(\r\n 'Trying to access inactive menu. Please check your menu configurations'\r\n )}\r\n showButton={false}\r\n />\r\n )}\r\n />\r\n );\r\n }\r\n\r\n if (!user.isUnitySystemAdmin && rolesMap?.size > 0 && !userHasRoles) {\r\n return (\r\n <Route\r\n path='*'\r\n render={(props) => (\r\n <PageForbiddenRoute\r\n message={t(\r\n 'You do not have the required roles to access this page. Please contact an administrator to get access'\r\n )}\r\n showButton={false}\r\n />\r\n )}\r\n />\r\n );\r\n }\r\n\r\n if (isAuthenticated && user?.statusCode === 200) {\r\n return <Route {...routeProps} />;\r\n }\r\n\r\n return null;\r\n};\r\n","import React, { Suspense, lazy } from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport { PrivateRoute } from './PrivateRoute';\nimport { UdpPageEnums } from '../enums/pageEnums';\nimport { ConfigService } from '../configService';\nimport { PageLoading } from '../UI/feedback/PageLoading';\n\n// Lazy load route components\nconst VirtualBrowser = lazy(() =>\n import('../maintenanceEngine/virtualBrowser/VirtualBrowser')\n);\nconst MenuPage = lazy(() => import('../menuPage/MenuPage'));\nconst UdpPublicForm = lazy(() => import('../udp/pages/UdpFormsPublicForm'));\nconst WorkflowContainer = lazy(() => import('../workflow/WorkflowContainer'));\nconst PasswordResetRedirect = lazy(() =>\n import('./components/PasswordResetRedirect')\n);\nconst MyExportsPage = lazy(() => import('../udp/export/MyExportsPage'));\nconst PageNotFoundRoute = lazy(() => import('./components/PageNotFoundRoute'));\nconst UdpMaintenanceConfigPage = lazy(() =>\n import('../udp/pages/UdpMaintenanceConfigPage')\n);\nconst UdpMaintenanceEnginePage = lazy(() =>\n import('../udp/pages/UdpMaintenanceEnginePage')\n);\nconst AadCallback = lazy(() => import('../utilities/auth/AadCallback'));\n\n\nconst UdpTransactionsPage = lazy(() =>\n import('../udp/pages/UdpTransactionsPage')\n);\n\nconst UdpTransactionTypesPage = lazy(() =>\n import('../udp/pages/UdpTransactionTypesPage')\n);\n\nconst PageContainer = lazy(() =>\n import('../page/PageContainer').then(module => ({ default: module.PageContainer }))\n);\n\nconst Reports = lazy(() => import('../reports/Reports'));\n\nconst Inquiry = lazy(() => import('../inquiry/Inquiry'));\n\nexport const UdpRoutes = (props) => {\n const { ...other } = props;\n return (\n <Suspense fallback={<PageLoading />}>\n <Switch>\n <PrivateRoute\n path='/virtual/:id'\n render={(props) => <VirtualBrowser {...props} {...other} />}\n />\n <PrivateRoute\n path='/menupage/:id'\n render={(props) => <MenuPage {...props} {...other} />}\n />\n\n <Route\n path={`/page/${UdpPageEnums.Udp_Public_Forms_Page}`}\n render={(props) => <UdpPublicForm {...props} {...other} />}\n />\n <Route\n path={`/passwordresetsuccess`}\n render={(props) => <PasswordResetRedirect props={props} />}\n />\n <PrivateRoute\n path='/workflowtask/:id'\n render={(props) => <WorkflowContainer {...props} {...other} />}\n />\n <PrivateRoute\n path='/myexports'\n render={(props) => (\n <MyExportsPage\n productId={ConfigService.config.UNITY_PRODUCT_ID}\n {...props}\n {...other}\n />\n )}\n />\n <PrivateRoute\n path='/crudbrowser'\n render={(props) => <UdpMaintenanceEnginePage {...props} />}\n />\n <PrivateRoute\n path='/tablebrowser'\n render={(props) => <UdpMaintenanceConfigPage {...props} />}\n />\n\n <Route path='/aad_callback' component={AadCallback} />\n <PrivateRoute\n path='/transactionsPage'\n render={(props) => <UdpTransactionsPage {...props} />}\n />\n <PrivateRoute\n path='/transactionTypesPage'\n render={(props) => <UdpTransactionTypesPage {...props} />}\n />\n <PrivateRoute path=\"/reports/:id\" exact component={Reports} />\n <PrivateRoute\n path=\"/inquiry/:id\"\n render={props => <Inquiry {...props} />}\n />\n <PrivateRoute\n path=\"/page/:id\"\n render={props => (\n <PageContainer fromMenu={true} {...props} />\n )}\n />\n <PrivateRoute path='*' component={PageNotFoundRoute} />\n </Switch>\n </Suspense>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAQA,MAAa,gBAAgB,EAAE,UAAU,cAAc,eAAe,mBAAmB,GAAG,iBAAiB;CAC3G,MAAM,kBAAkB,yBAAyB;CACjD,MAAM,OAAO,SAAS;CACtB,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,cAAc,kBAAkB;CACtC,MAAM,WAAW,aAAa,YAAY;CAC1C,MAAM,gBAAgB,aAAa,iBAAiB;CACpD,MAAM,YAAY,KAAK;CAEvB,IAAI,YAAY,WAAW,KACxB,aAAa,CACb,WAAW,KAAK,GAAG,CACnB,QAAQ,KAAK,GAAG;AACnB,aAAY,UAAU,MAAM,KAAK,CAAC;CAElC,MAAM,wBAAwB,cAAc;AAC1C,MAAI,MAAM,WAAW,SAAS,KAAK,gBAAgB,CACjD,QAAO;AAET,SAAO;IACN,CAAC,KAAK,CAAC;CAEV,MAAM,eAAe,cAAc;AACjC,MAAI,UAAU,OAAO,GAAG;AACtB,OAAI,CAAC,SAAS,IAAI,WAAW,KAAK,CAChC,QAAO;AAGT,UADmB,SAAS,IAAI,WAAW,KAAK,CAC9B,OAAO,YAAY,UAAU,SAAS,QAAQ,CAAC;;AAEnE,SAAO;IACN;EAAC;EAAW;EAAU,WAAW;EAAK,CA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C;GAAc,UAAU;GAAM,GAAIA;IAAS;GAE9C,EACA,oCAAC;EAAa,MAAK;EAAI,WAAW;GAAqB,CAChD,CACA"}
|
package/dist/shell/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { n as SiteHeaderRightComponentTarget, t as SiteHeaderRightComponent } fr
|
|
|
2
2
|
import { n as useBuildEnvironment, t as APP_RIBBON_SPACE } from "../useBuildEnvironment-2gdqpmBX.js";
|
|
3
3
|
import { t as SidebarCollapseButton } from "../SidebarCollapseButton-_UUtsftD.js";
|
|
4
4
|
import { a as LanguageSwitcher, i as HelpCenter, o as ShellDropdown, r as EnvironmentRibbon, s as AmbientProjectSwitcher, t as SiteHeaderSpacer } from "../SiteHeader-CuOFCr7D.js";
|
|
5
|
-
import { t as Shell } from "../Shell-
|
|
5
|
+
import { t as Shell } from "../Shell-B8oi58iV.js";
|
|
6
6
|
import { r as isPasswordValid, t as UserForm } from "../UserForm-DNgeQvad.js";
|
|
7
7
|
import "./ui/index.js";
|
|
8
8
|
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const UdpTransactionEmailForm: ({ existingTransactionAttachments, toOptions, ccOptions, toLabelFunction, ccLabelFunction,
|
|
2
|
+
export declare const UdpTransactionEmailForm: ({ existingTransactionAttachments, toOptions, ccOptions, toLabelFunction, toGroupBy, toFilterOptions, ccLabelFunction, ccGroupBy, ccFilterOptions, attachmentsLabelFunction }: {
|
|
3
3
|
attachmentsLabelFunction: any;
|
|
4
|
+
ccFilterOptions: any;
|
|
5
|
+
ccGroupBy: any;
|
|
4
6
|
ccLabelFunction: any;
|
|
5
7
|
ccOptions: any;
|
|
6
8
|
existingTransactionAttachments: any;
|
|
7
|
-
|
|
9
|
+
toFilterOptions: any;
|
|
10
|
+
toGroupBy: any;
|
|
8
11
|
toLabelFunction: any;
|
|
9
12
|
toOptions: any;
|
|
10
13
|
}) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UdpTransactionEmailForm.d.ts","sourceRoot":"","sources":["../../../../../src/UI/forms/UdpTransactionEmailForm.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAQ3C,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"UdpTransactionEmailForm.d.ts","sourceRoot":"","sources":["../../../../../src/UI/forms/UdpTransactionEmailForm.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAQ3C,eAAO,MAAM,uBAAuB;;;;;;;;;;;uBAuEnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmbientAutoComplete.d.ts","sourceRoot":"","sources":["../../../../../../src/UI/inputs/textField/AmbientAutoComplete.jsx"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,KAAsB,MAAM,OAAO,CAAC;AAsD3C,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"AmbientAutoComplete.d.ts","sourceRoot":"","sources":["../../../../../../src/UI/inputs/textField/AmbientAutoComplete.jsx"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,KAAsB,MAAM,OAAO,CAAC;AAsD3C,eAAO,MAAM,mBAAmB,mCAoG/B,CAAC"}
|
|
@@ -5,7 +5,6 @@ export declare const TableColumnDefs: (actionList: any) => ({
|
|
|
5
5
|
wrapText: boolean;
|
|
6
6
|
autoHeight: boolean;
|
|
7
7
|
sortable: boolean;
|
|
8
|
-
filter?: undefined;
|
|
9
8
|
pinned?: undefined;
|
|
10
9
|
cellRenderer?: undefined;
|
|
11
10
|
// minWidth: 50,
|
|
@@ -14,6 +13,7 @@ export declare const TableColumnDefs: (actionList: any) => ({
|
|
|
14
13
|
maxWidth?: undefined;
|
|
15
14
|
suppressMenu?: undefined;
|
|
16
15
|
cellStyle?: undefined;
|
|
16
|
+
filter?: undefined;
|
|
17
17
|
} | {
|
|
18
18
|
field?: undefined;
|
|
19
19
|
wrapText?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableColumnDefs.d.ts","sourceRoot":"","sources":["../../../../../src/maintenanceEngine/tableBrowser/TableColumnDefs.js"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"TableColumnDefs.d.ts","sourceRoot":"","sources":["../../../../../src/maintenanceEngine/tableBrowser/TableColumnDefs.js"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;;;;;IAsBtB,gBAAgB;;;;;;;;;;;;;;;IAAhB,gBAAgB;;;;;;;;;;;;;IAarB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;CAOnC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GridExcelStyleEnums } from '../../enums/unitySystemEnums';
|
|
2
2
|
export declare const useDateStringColumnDef: (includeTime?: boolean, timeZone?: any, includeTimeZoneOffset?: boolean) => {
|
|
3
|
-
filter?: undefined;
|
|
4
3
|
valueFormatter?: undefined;
|
|
5
4
|
cellClass?: undefined;
|
|
5
|
+
filter?: undefined;
|
|
6
6
|
filterParams?: undefined;
|
|
7
7
|
} | {
|
|
8
8
|
valueFormatter: (params: any) => string;
|