@erpsquad/common 1.10.11 → 1.10.12
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/chunks/{CssBaseline-Ba0wbudi.js → CssBaseline-CaG36t1j.js} +2 -2
- package/dist/chunks/{CssBaseline-Ba0wbudi.js.map → CssBaseline-CaG36t1j.js.map} +1 -1
- package/dist/chunks/{CssBaseline-qnbPrAjr.esm.js → CssBaseline-GdktO2pw.esm.js} +2 -2
- package/dist/chunks/{CssBaseline-qnbPrAjr.esm.js.map → CssBaseline-GdktO2pw.esm.js.map} +1 -1
- package/dist/chunks/{android-12-switch-Co1-sM3a.esm.js → android-12-switch-CmTlHqzZ.esm.js} +13 -13
- package/dist/chunks/{android-12-switch-Co1-sM3a.esm.js.map → android-12-switch-CmTlHqzZ.esm.js.map} +1 -1
- package/dist/chunks/{android-12-switch-DRV67SLg.js → android-12-switch-QbNrLcJ5.js} +13 -13
- package/dist/chunks/{android-12-switch-DRV67SLg.js.map → android-12-switch-QbNrLcJ5.js.map} +1 -1
- package/dist/chunks/{apiHelper-gxUrse_j.esm.js → apiHelper-0m5piQqF.esm.js} +6 -6
- package/dist/chunks/{apiHelper-gxUrse_j.esm.js.map → apiHelper-0m5piQqF.esm.js.map} +1 -1
- package/dist/chunks/{apiHelper-8K4t1nbo.js → apiHelper-CK8OhEUv.js} +6 -6
- package/dist/chunks/{apiHelper-8K4t1nbo.js.map → apiHelper-CK8OhEUv.js.map} +1 -1
- package/dist/chunks/{appbar-Br7-Ty75.js → appbar-DhZRcO79.js} +7 -7
- package/dist/chunks/{appbar-Br7-Ty75.js.map → appbar-DhZRcO79.js.map} +1 -1
- package/dist/chunks/{appbar-DN-sBu_D.esm.js → appbar-jwyLUzHp.esm.js} +7 -7
- package/dist/chunks/{appbar-DN-sBu_D.esm.js.map → appbar-jwyLUzHp.esm.js.map} +1 -1
- package/dist/chunks/{arrow-up-Cz4A_O0J.esm.js → arrow-up-Bp6K1xq8.esm.js} +2 -2
- package/dist/chunks/{arrow-up-Cz4A_O0J.esm.js.map → arrow-up-Bp6K1xq8.esm.js.map} +1 -1
- package/dist/chunks/{arrow-up-BC9MfTDu.js → arrow-up-DL3NGhTM.js} +2 -2
- package/dist/chunks/{arrow-up-BC9MfTDu.js.map → arrow-up-DL3NGhTM.js.map} +1 -1
- package/dist/chunks/{dashboard-CmeL1xk8.esm.js → dashboard-D-jCCLFt.esm.js} +2 -2
- package/dist/chunks/{dashboard-CmeL1xk8.esm.js.map → dashboard-D-jCCLFt.esm.js.map} +1 -1
- package/dist/chunks/{dashboard-DZujrViq.js → dashboard-MOyqxPUY.js} +2 -2
- package/dist/chunks/{dashboard-DZujrViq.js.map → dashboard-MOyqxPUY.js.map} +1 -1
- package/dist/chunks/{default-data-BnQ1UFnR.js → default-data-C_390oGn.js} +12 -12
- package/dist/chunks/{default-data-BnQ1UFnR.js.map → default-data-C_390oGn.js.map} +1 -1
- package/dist/chunks/{default-data-Bw8FG8QM.esm.js → default-data-CfWWR300.esm.js} +12 -12
- package/dist/chunks/{default-data-Bw8FG8QM.esm.js.map → default-data-CfWWR300.esm.js.map} +1 -1
- package/dist/chunks/{document-D7m0P_S2.js → document-BFgGr8K0.js} +2 -2
- package/dist/chunks/{document-D7m0P_S2.js.map → document-BFgGr8K0.js.map} +1 -1
- package/dist/chunks/{document-DKQMhgnk.esm.js → document-zEiaIfTI.esm.js} +2 -2
- package/dist/chunks/{document-DKQMhgnk.esm.js.map → document-zEiaIfTI.esm.js.map} +1 -1
- package/dist/chunks/{form-builder-deconversion-DBro79hr.esm.js → form-builder-deconversion--L0SCbSE.esm.js} +3 -3
- package/dist/chunks/{form-builder-deconversion-DBro79hr.esm.js.map → form-builder-deconversion--L0SCbSE.esm.js.map} +1 -1
- package/dist/chunks/{form-builder-deconversion-DHEmDVSG.js → form-builder-deconversion-BDKiVY14.js} +3 -3
- package/dist/chunks/{form-builder-deconversion-DHEmDVSG.js.map → form-builder-deconversion-BDKiVY14.js.map} +1 -1
- package/dist/chunks/{fullScreen-C4NRh2lh.esm.js → fullScreen-LwKF0Wcm.esm.js} +3 -3
- package/dist/chunks/{fullScreen-C4NRh2lh.esm.js.map → fullScreen-LwKF0Wcm.esm.js.map} +1 -1
- package/dist/chunks/{fullScreen-DFr77Xsw.js → fullScreen-twu05Zih.js} +3 -3
- package/dist/chunks/{fullScreen-DFr77Xsw.js.map → fullScreen-twu05Zih.js.map} +1 -1
- package/dist/chunks/{identifier-B8P9ZGxG.js → identifier-BTBl-PeG.js} +74 -67
- package/dist/chunks/{identifier-B8P9ZGxG.js.map → identifier-BTBl-PeG.js.map} +1 -1
- package/dist/chunks/{identifier-u4E_J1of.esm.js → identifier-DOIuZkWc.esm.js} +74 -67
- package/dist/chunks/{identifier-u4E_J1of.esm.js.map → identifier-DOIuZkWc.esm.js.map} +1 -1
- package/dist/chunks/{languageContext-CsSaAsO4.js → languageContext-DNk-Xb1X.js} +2 -2
- package/dist/chunks/{languageContext-CsSaAsO4.js.map → languageContext-DNk-Xb1X.js.map} +1 -1
- package/dist/chunks/{languageContext-YZSA8Vf8.esm.js → languageContext-DiyXk1ct.esm.js} +2 -2
- package/dist/chunks/{languageContext-YZSA8Vf8.esm.js.map → languageContext-DiyXk1ct.esm.js.map} +1 -1
- package/dist/chunks/{migration-utils-COUVncTl.js → migration-utils-C_LTTPYb.js} +3 -3
- package/dist/chunks/{migration-utils-COUVncTl.js.map → migration-utils-C_LTTPYb.js.map} +1 -1
- package/dist/chunks/{migration-utils-CDFyW-3I.esm.js → migration-utils-tJMzKUsy.esm.js} +3 -3
- package/dist/chunks/{migration-utils-CDFyW-3I.esm.js.map → migration-utils-tJMzKUsy.esm.js.map} +1 -1
- package/dist/chunks/{notification-Dr_nE2Dc.esm.js → notification-BkYKSve7.esm.js} +2 -2
- package/dist/chunks/{notification-Dr_nE2Dc.esm.js.map → notification-BkYKSve7.esm.js.map} +1 -1
- package/dist/chunks/{notification-lAbbtOBF.js → notification-mmnVEZtt.js} +2 -2
- package/dist/chunks/{notification-lAbbtOBF.js.map → notification-mmnVEZtt.js.map} +1 -1
- package/dist/chunks/{page-context-DAof2pOQ.esm.js → page-context-Cnr2ZeHV.esm.js} +3 -3
- package/dist/chunks/{page-context-DAof2pOQ.esm.js.map → page-context-Cnr2ZeHV.esm.js.map} +1 -1
- package/dist/chunks/{page-context-D1bSKATz.js → page-context-DWkmgit5.js} +3 -3
- package/dist/chunks/{page-context-D1bSKATz.js.map → page-context-DWkmgit5.js.map} +1 -1
- package/dist/chunks/{sidebar-CTn-nSpk.js → sidebar-Be8tRMuJ.js} +7 -7
- package/dist/chunks/{sidebar-CTn-nSpk.js.map → sidebar-Be8tRMuJ.js.map} +1 -1
- package/dist/chunks/{sidebar-CSX2S5NL.esm.js → sidebar-URo-Ugma.esm.js} +7 -7
- package/dist/chunks/{sidebar-CSX2S5NL.esm.js.map → sidebar-URo-Ugma.esm.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-CXu3WmH_.js → sidebarScreen-BiOLZtd_.js} +4 -4
- package/dist/chunks/{sidebarScreen-CXu3WmH_.js.map → sidebarScreen-BiOLZtd_.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-BcVYvEKG.esm.js → sidebarScreen-DchkvJ0r.esm.js} +4 -4
- package/dist/chunks/{sidebarScreen-BcVYvEKG.esm.js.map → sidebarScreen-DchkvJ0r.esm.js.map} +1 -1
- package/dist/chunks/{theme-impl-BgGLJiHC.js → theme-impl-B-jAlah0.js} +3 -3
- package/dist/chunks/{theme-impl-BgGLJiHC.js.map → theme-impl-B-jAlah0.js.map} +1 -1
- package/dist/chunks/{theme-impl-B5ncd0_-.esm.js → theme-impl-DiwS-WWR.esm.js} +3 -3
- package/dist/chunks/{theme-impl-B5ncd0_-.esm.js.map → theme-impl-DiwS-WWR.esm.js.map} +1 -1
- package/dist/chunks/{themeSelector-Y7FIaMIK.esm.js → themeSelector-C9iyIueK.esm.js} +2 -2
- package/dist/chunks/{themeSelector-Y7FIaMIK.esm.js.map → themeSelector-C9iyIueK.esm.js.map} +1 -1
- package/dist/chunks/{themeSelector-CkbUQSqY.js → themeSelector-Cpzcr0j7.js} +2 -2
- package/dist/chunks/{themeSelector-CkbUQSqY.js.map → themeSelector-Cpzcr0j7.js.map} +1 -1
- package/dist/chunks/{tick-CRp4S9uN.esm.js → tick-CdbM5wXS.esm.js} +2 -2
- package/dist/chunks/{tick-CRp4S9uN.esm.js.map → tick-CdbM5wXS.esm.js.map} +1 -1
- package/dist/chunks/{tick-By8O3yMK.js → tick-D0uXfgm_.js} +2 -2
- package/dist/chunks/{tick-By8O3yMK.js.map → tick-D0uXfgm_.js.map} +1 -1
- package/dist/chunks/{toggle-switch-cUD3eGwN.js → toggle-switch-C2GpPNpX.js} +2 -2
- package/dist/chunks/{toggle-switch-cUD3eGwN.js.map → toggle-switch-C2GpPNpX.js.map} +1 -1
- package/dist/chunks/{toggle-switch-BHNFcNhi.esm.js → toggle-switch-DiErs4or.esm.js} +2 -2
- package/dist/chunks/{toggle-switch-BHNFcNhi.esm.js.map → toggle-switch-DiErs4or.esm.js.map} +1 -1
- package/dist/chunks/{trash-CUP1jXNo.js → trash-CJyhARBA.js} +2 -2
- package/dist/chunks/{trash-CUP1jXNo.js.map → trash-CJyhARBA.js.map} +1 -1
- package/dist/chunks/{trash-jodcm4T5.esm.js → trash-COwV7lxA.esm.js} +2 -2
- package/dist/chunks/{trash-jodcm4T5.esm.js.map → trash-COwV7lxA.esm.js.map} +1 -1
- package/dist/chunks/{uom-field-wrapper-D00qlYvK.esm.js → uom-field-wrapper-BzVzCvAa.esm.js} +20 -18
- package/dist/chunks/uom-field-wrapper-BzVzCvAa.esm.js.map +1 -0
- package/dist/chunks/{uom-field-wrapper-y_CRMTek.js → uom-field-wrapper-DJwrpP7O.js} +19 -17
- package/dist/chunks/uom-field-wrapper-DJwrpP7O.js.map +1 -0
- package/dist/chunks/{useAccountSetting-DHl__SuY.esm.js → useAccountSetting-BQ5piMue.esm.js} +2 -2
- package/dist/chunks/{useAccountSetting-DHl__SuY.esm.js.map → useAccountSetting-BQ5piMue.esm.js.map} +1 -1
- package/dist/chunks/{useAccountSetting-DPLca3-A.js → useAccountSetting-CUspIaW-.js} +2 -2
- package/dist/chunks/{useAccountSetting-DPLca3-A.js.map → useAccountSetting-CUspIaW-.js.map} +1 -1
- package/dist/chunks/{useAuth-CvOvpFeW.esm.js → useAuth-C-3iW-8X.esm.js} +3 -3
- package/dist/chunks/{useAuth-CvOvpFeW.esm.js.map → useAuth-C-3iW-8X.esm.js.map} +1 -1
- package/dist/chunks/{useAuth-BeJvQGbT.js → useAuth-Yr6hG7pu.js} +3 -3
- package/dist/chunks/{useAuth-BeJvQGbT.js.map → useAuth-Yr6hG7pu.js.map} +1 -1
- package/dist/chunks/{useLangauge-DefQLNzN.js → useLangauge-CCz6ZvDN.js} +2 -2
- package/dist/chunks/{useLangauge-DefQLNzN.js.map → useLangauge-CCz6ZvDN.js.map} +1 -1
- package/dist/chunks/{useLangauge-CGkrC5u9.esm.js → useLangauge-VBzM6AFW.esm.js} +2 -2
- package/dist/chunks/{useLangauge-CGkrC5u9.esm.js.map → useLangauge-VBzM6AFW.esm.js.map} +1 -1
- package/dist/chunks/{useReduxIntegration-C_zZ-Yo7.js → useReduxIntegration-BCVXu6FN.js} +3 -3
- package/dist/chunks/{useReduxIntegration-C_zZ-Yo7.js.map → useReduxIntegration-BCVXu6FN.js.map} +1 -1
- package/dist/chunks/{useReduxIntegration-CGMt-mLL.esm.js → useReduxIntegration-DFf-QPFH.esm.js} +3 -3
- package/dist/chunks/{useReduxIntegration-CGMt-mLL.esm.js.map → useReduxIntegration-DFf-QPFH.esm.js.map} +1 -1
- package/dist/components/index.esm.js +14 -14
- package/dist/components/index.js +14 -14
- package/dist/contexts/index.esm.js +3 -3
- package/dist/contexts/index.js +3 -3
- package/dist/hooks/index.esm.js +5 -5
- package/dist/hooks/index.js +5 -5
- package/dist/icons/index.esm.js +7 -7
- package/dist/icons/index.js +7 -7
- package/dist/index.esm.js +23 -23
- package/dist/index.js +23 -23
- package/dist/layout/index.esm.js +2 -2
- package/dist/layout/index.js +2 -2
- package/dist/theme/index.esm.js +2 -2
- package/dist/theme/index.js +2 -2
- package/dist/utils/index.esm.js +3 -3
- package/dist/utils/index.js +3 -3
- package/dist/views/index.esm.js +7 -7
- package/dist/views/index.js +6 -6
- package/package.json +1 -1
- package/dist/chunks/uom-field-wrapper-D00qlYvK.esm.js.map +0 -1
- package/dist/chunks/uom-field-wrapper-y_CRMTek.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-builder-deconversion-DHEmDVSG.js","sources":["../../src/components/menu/menu.tsx","../../src/components/material-table/aggregation-fns/index.ts","../../src/components/material-table/components/default-aggregation.tsx","../../src/components/chip/chip.tsx","../../src/components/value-field/value-field.tsx","../../src/utils/common-utility.tsx","../../src/utils/form-builder-deconversion.ts"],"sourcesContent":["import { Menu as MUIMenu, MenuProps, styled } from \"@mui/material\";\n\nconst StyledMenu = styled(MUIMenu)(() => ({\n \".MuiPaper-rounded\": {\n borderRadius: \"0.5rem\",\n minWidth: \"10rem\",\n },\n}));\n\nconst Menu = ({ children, anchorEl, onClose, open, ...rest }: MenuProps) => {\n return (\n <>\n <StyledMenu\n id=\"basic-menu\"\n anchorEl={anchorEl}\n open={open}\n onClose={onClose}\n MenuListProps={{\n \"aria-labelledby\": \"basic-button\",\n }}\n {...rest}\n >\n {children}\n </StyledMenu>\n </>\n );\n};\n\nexport { Menu };\nexport default Menu;\n","import _ from 'lodash';\nimport { MRT_RowData } from 'material-react-table';\n\nconst average = (data: MRT_RowData[], column: string) => {\n\tconst sum = data.reduce(\n\t\t(acc: number, row) => acc + Number(extractNumber(row[column])),\n\t\t0\n\t);\n\tconst count = data.length;\n\treturn !isNaN(sum) ? `${_.round(sum / count,2)}` : '-';\n};\n\nconst extractNumber = (inputString: any) => {\n\t// Use a regular expression to match the numeric part, including decimals\n\tif (typeof inputString === 'string') {\n\t\tconst match = inputString.match(/[\\d,]+(\\.\\d{1,2})?/);\n\t\treturn match ? match[0] : 0;\n\t}\n\treturn inputString;\n};\nconst sum = (data: MRT_RowData[], column: string) => {\n\tconst sum = data.reduce(\n\t\t(acc: number, row) => acc + Number(extractNumber(row[column])),\n\t\t0\n\t);\n\treturn !isNaN(sum) ? `${_.round(sum,2)}` : '-';\n};\n\nconst max = (data: MRT_RowData[], column: string) => {\n\tconst maxVal = Math.max(...data.map((row) => Number(row[column])));\n\treturn `${maxVal}`;\n};\n\nconst countEmpty = (data: MRT_RowData[], column: string) => {\n\tconst empty = data?.filter((d) => {\n\t\tconst value = _.get(d, column); \n\t\treturn isNaN(Number(value)) \n\t\t\t? Boolean(!_.size(value)) \n\t\t\t: Boolean(!Number(value))\n\t}\n\t);\n\treturn `${empty.length}`;\n};\n\nconst percentageEmpty = (data: MRT_RowData[], column: string) => {\n\tconst empty = data?.filter((d) => {\n\t\tconst value = _.get(d, column); \n\t\treturn isNaN(Number(value))\n\t\t\t? Boolean(!_.size(value))\n\t\t\t: Boolean(!Number(value))\n\t}\n\t);\n\tconst percentage = (empty.length / data.length) * 100;\n\n\treturn `${_.round(percentage,2)}%`;\n};\n\nconst percentageFull = (data: MRT_RowData[], column: string) => {\n\tconst full = data?.filter((d) => {\n\t\tconst value = _.get(d, column); \n\t\treturn isNaN(Number(value))\n\t\t\t? Boolean(_.size(value))\n\t\t\t: Boolean(Number(value))\n\t}\n\t);\n\tconst percentage = (full.length / data.length) * 100;\n\n\treturn `${_.round(percentage,2)}%`;\n};\n\nconst countFull = (data: MRT_RowData[], column: string) => {\n\tconst full = data?.filter((d) => {\n\t\tconst value = _.get(d, column); \n\t\treturn isNaN(Number(value))\n\t\t\t? Boolean(_.size(value))\n\t\t\t: Boolean(Number(value))\n\t}\n\t);\n\treturn `${full.length}`;\n};\n\nconst none = () => {\n\treturn null;\n};\n\nconst min = (data: MRT_RowData[], column: string) => {\n\tconst minValue = Math.min(...data.map((row) => Number(row[column])));\n\treturn `${minValue}`;\n};\n\nexport const aggregationFns = {\n\tnone,\n\tmin,\n\tmax,\n\tsum,\n\taverage,\n\tcountEmpty,\n\tcountFull,\n\tpercentageEmpty,\n\tpercentageFull\n};\n","import React, { useEffect } from 'react';\nimport Typography from '../../typography/typography';\nimport { MenuItem } from '@mui/material';\nimport Menu from '../../menu/menu';\nimport { aggregationFns } from '../aggregation-fns';\nimport { MRT_RowData } from 'material-react-table';\n\ntype aggregationType =\n\t| 'none'\n\t| 'count_empty'\n\t| 'count_full'\n\t| 'percentage_empty'\n\t| 'percentage_full'\n\t| 'average'\n\t| 'sum';\n\ninterface IAggregation {\n\tlabel: string;\n\tvalue: aggregationType;\n}\n\nconst aggregations: IAggregation[] = [\n\t{\n\t\tlabel: 'Count Empty',\n\t\tvalue: 'count_empty'\n\t},\n\t{\n\t\tlabel: 'Count Full',\n\t\tvalue: 'count_full'\n\t},\n\t{\n\t\tlabel: 'Percentage Full',\n\t\tvalue: 'percentage_full'\n\t},\n\t{\n\t\tlabel: 'Percentage Empty',\n\t\tvalue: 'percentage_empty'\n\t},\n\t{\n\t\tlabel: 'Average',\n\t\tvalue: 'average'\n\t},\n\t{\n\t\tlabel: 'Sum',\n\t\tvalue: 'sum'\n\t},\n\t{\n\t\tlabel: 'None',\n\t\tvalue: 'none'\n\t}\n];\n\nconst aggregationFnsLookup = {\n\tcount_empty: aggregationFns.countEmpty,\n\tcount_full: aggregationFns.countFull,\n\tpercentage_empty: aggregationFns.percentageEmpty,\n\tpercentage_full: aggregationFns.percentageFull,\n\taverage: aggregationFns.average,\n\tsum: aggregationFns.sum,\n\tnone: aggregationFns.none\n};\n\ninterface IDefaultAggregation {\n\tdata: MRT_RowData[];\n\tcolumn: string;\n\tcolumnDef?: any;\n}\n\nconst DefaultAggregation = ({\n\tdata,\n\tcolumn,\n\t// columnDef\n}: IDefaultAggregation) => {\n\tconst [selectedType, setSelectedType] =\n\t\tReact.useState<aggregationType>('none');\n\tconst [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);\n\tconst [calculatedValue, setCalculatedValue] = React.useState<string | null>();\n\tconst open = Boolean(anchorEl);\n\n\tconst handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n\t\tsetAnchorEl(event.currentTarget);\n\t};\n\n\tconst handleClose = () => {\n\t\tsetAnchorEl(null);\n\t};\n\n\tconst handleAggregationType = (val: aggregationType) => {\n\t\tsetSelectedType(val);\n\t\thandleClose();\n\t};\n\n\tuseEffect(() => {\n\t\tconst func = aggregationFnsLookup[selectedType];\n\t\tsetCalculatedValue(func(data, column));\n\t}, [selectedType, column, data]);\n\n\treturn (\n\t\t<>\n\t\t\t<Typography\n\t\t\t\tonClick={handleClick}\n\t\t\t\tsx={{ cursor: 'pointer', width:\"100%\", height:\"100%\" }}\n\t\t\t\ttype='s4'\n\t\t\t\tweight='normal'\n\t\t\t\tcolor={\n\t\t\t\t\tcalculatedValue ? 'theme.secondary.1000' : 'theme.secondary.500'\n\t\t\t\t}>\n\t\t\t\t{calculatedValue || '+ Add Calculation'}\n\t\t\t</Typography>\n\t\t\t<Menu\n\t\t\t\tid='basic-menu'\n\t\t\t\tanchorEl={anchorEl}\n\t\t\t\topen={open}\n\t\t\t\tonClose={handleClose}>\n\t\t\t\t{aggregations?.map((aggr) => (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tkey={aggr.value}\n\t\t\t\t\t\tselected={selectedType == aggr?.value}\n\t\t\t\t\t\tonClick={() => handleAggregationType(aggr?.value)}\n\t\t\t\t\t\t// disabled={\n\t\t\t\t\t\t// \t(!columnDef || columnDef?.type !== 'number') &&\n\t\t\t\t\t\t// \t(aggr.value === 'sum' || aggr.value === 'average')\n\t\t\t\t\t\t// }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<Typography color='theme.secondary.1000' type='s4'>\n\t\t\t\t\t\t\t{aggr?.label}\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t</MenuItem>\n\t\t\t\t))}\n\t\t\t</Menu>\n\t\t</>\n\t);\n};\n\nexport { DefaultAggregation };\nexport default DefaultAggregation;\n","import { Chip as MUIChip, ChipProps, styled } from \"@mui/material\";\n\ninterface IChip extends ChipProps {\n type?: \"rounded\" | \"normal\";\n active?: boolean;\n inActive?: boolean;\n label?: string | React.ReactNode | number | JSX.Element;\n}\n\nconst StyledChip = styled(MUIChip)<IChip>(\n ({ theme: { palette }, active, type, inActive }) => ({\n cursor: \"pointer\",\n fontSize: \".75rem\",\n color: palette.theme?.secondary[800],\n borderRadius: type === \"rounded\" ? \"1.5rem\" : \"0.25rem\",\n backgroundColor: palette.theme?.secondary[200],\n ...(active && {\n \"&.MuiChip-filled\": {\n color: palette.theme?.primary[700],\n backgroundColor: palette.theme?.primary[200],\n \"&:hover\": {\n backgroundColor: palette.theme?.primary[200]\n },\n },\n \"&.MuiChip-outlined\": {\n color: palette.theme?.primary[800],\n borderColor: palette.theme?.primary[300],\n \"&:hover\": {\n backgroundColor: palette.theme?.primary[200]\n },\n },\n }),\n ...(inActive && {\n \"&.MuiChip-filled\": {\n color: palette.theme?.error[700],\n backgroundColor: palette.theme?.error[200],\n \"&:hover\": {\n backgroundColor: palette.theme?.error[200]\n },\n },\n \"&.MuiChip-outlined\": {\n color: palette.theme?.error[800],\n borderColor: palette.theme?.error[300],\n \"&:hover\": {\n backgroundColor: palette.theme?.error[200]\n },\n },\n }),\n\n \"& .MuiChip-icon\": {\n marginRight: \"0.125rem\",\n marginLeft: \"0rem\",\n color: \"inherit\",\n },\n \"& .MuiChip-deleteIcon\": {\n marginLeft: \"0.25rem\",\n fontSize: \".875rem\",\n color: \"inherit\",\n marginRight: \"0rem\",\n },\n \"&.MuiChip-root\": {\n height: \"fit-content\",\n padding: \"0.25rem 0.5rem\",\n \".MuiChip-label\": {\n padding: \"0rem\",\n },\n },\n }),\n);\n\nconst Chip = (props: IChip) => {\n const {\n label,\n type = \"rounded\",\n variant = \"filled\",\n active = false,\n inActive = false,\n ...rest\n } = props;\n\n return (\n <StyledChip\n label={label}\n variant={variant}\n active={active}\n inActive={inActive}\n type={type}\n {...rest}\n />\n );\n};\n\nexport { Chip };\nexport default Chip;\n","import { Box } from \"@mui/material\";\nimport Typography from \"../typography/typography\";\nimport \"./value-field.scss\";\n\ninterface ValueFieldProps {\n label: string;\n children: React.ReactNode;\n childrenTypoProps?:any\n}\n\nconst ValueField = (props: ValueFieldProps) => {\n const { label, children, childrenTypoProps } = props;\n\n return (\n <Box className=\"valueField--Container\" >\n <Typography weight={\"medium\"} type=\"s3\" color={\"theme.secondary.1000\"}>\n {label}\n </Typography>\n <Typography weight={\"medium\"} type=\"s5\" color={\"theme.secondary.700\"} sx={{ wordBreak:'break-all', pr: 1 }} {...childrenTypoProps}>\n {children}\n </Typography>\n </Box>\n );\n};\n\nexport { ValueField };\nexport default ValueField;\n","\nimport React from 'react';\n\nimport { Box } from '@mui/material';\n/* eslint-disable no-mixed-spaces-and-tabs */\nimport Typography from '../components/typography/typography';\nimport { Document } from '../components/icons';\nimport { MaterialTableColumnProps, TypeBooleanLabels } from '../components/material-table/material-table';\nimport { TFunction } from 'i18next';\nimport { formatDate } from './dateFormat';\nimport { MRT_Row, MRT_RowData } from 'material-react-table';\nimport { Link } from 'react-router-dom';\nimport DefaultAggregation from '../components/material-table/components/default-aggregation';\nimport Chip from '../components/chip/chip';\nimport _ from 'lodash';\nimport images from '../assets/images';\nimport { formatAmount, formatAmountWithCurrency, toFixedWithNumbers } from \"./common\";\nimport { defaultCurrencyFormat } from './common';\n\nimport { defaultCurrencySymbol } from './common';\nimport ValueField from '../components/value-field/value-field';\nimport { formatLabel } from './format-text';\nimport { generateRouteWithId } from './route-utils';\nimport dayjs from 'dayjs';\nimport { useAuth } from '@/hooks';\nconst downloadFile = async (url, fileName) => {\n\ttry {\n\t\t// Fetch the file from the provided URL\n\t\tconst response = await fetch(url);\n\t\tif (!response.ok) {\n\t\t\tthrow new Error(`Failed to fetch file: ${response.statusText}`);\n\t\t}\n\n\t\t// Convert the response to a blob\n\t\tconst blob = await response.blob();\n\n\t\t// Create a temporary URL for the blob\n\t\tconst blobUrl = window.URL.createObjectURL(blob);\n\n\t\t// Create a link element\n\t\tconst link = document.createElement('a');\n\t\tlink.href = blobUrl;\n\t\tlink.download = fileName || 'downloaded-file'; // Fallback filename if none provided\n\n\t\t// Append link to the body, trigger click, and remove it\n\t\tdocument.body.appendChild(link);\n\t\tlink.click();\n\t\tdocument.body.removeChild(link);\n\n\t\t// Revoke the blob URL to free up memory\n\t\twindow.URL.revokeObjectURL(blobUrl);\n\t} catch (error) {\n\t\tconsole.error('Error downloading file:', error);\n\t\tthrow error; // Re-throw to allow caller to handle the error\n\t}\n};\n\nexport const getFileNamesFromUrlsAsLink = (fileUrls: string | string[], mode?: string) => {\n\tconst fUrls = fileUrls\n\t\t? Array.isArray(fileUrls)\n\t\t\t? fileUrls\n\t\t\t: [fileUrls]\n\t\t: [];\n\n\tif (fUrls && fUrls.length) {\n\t\treturn (\n\t\t\t<Box\n\t\t\t\tdisplay='flex'\n\t\t\t\tgap={1}\n\t\t\t\tmb={1}\n\t\t\t\talignItems='center'\n\t\t\t\tflexDirection='column'>\n\t\t\t\t{fUrls.map((url) => {\n\t\t\t\t\tconst fileName = url.substring(url.lastIndexOf('/') + 1);\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\ttype='s3'\n\t\t\t\t\t\t\tweight='medium'\n\t\t\t\t\t\t\tcolor='#246DFF'\n\t\t\t\t\t\t\tsx={{ textDecoration: 'underline', textUnderlineOffset: '3px', cursor: 'pointer' }}\n\t\t\t\t\t\t\tnoWrap\n\t\t\t\t\t\t\tonClick={() => mode === 'add' ? undefined : downloadFile(url, fileName)}>\n\t\t\t\t\t\t\t{fileName}\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Box>\n\t\t);\n\t}\n\n\treturn null;\n};\n\nexport const getFileNamesFromUrls = (fileUrls: string[]) => {\n\tif (!fileUrls) return null;\n\n\tif (!fileUrls?.filter(Boolean)?.length) return null;\n\n\treturn fileUrls?.filter(Boolean)?.map((url) => {\n\t\tconst fileName = url?.substring(url?.lastIndexOf('/') + 1) || '';\n\t\treturn (\n\t\t\t<Box display='flex' gap={1} mb={1} alignItems='center'>\n\t\t\t\t<Document fontSize='small' />\n\t\t\t\t<Typography\n\t\t\t\t\ttype='s3'\n\t\t\t\t\tweight='medium'\n\t\t\t\t\tcolor={'theme.secondary.1000'}\n\t\t\t\t\tsx={{ cursor: 'pointer' }}\n\t\t\t\t\tnoWrap onClick={() => downloadFile(url, fileName)}>\n\t\t\t\t\t{fileName}\n\t\t\t\t</Typography>\n\t\t\t</Box>\n\t\t);\n\t});\n};\n\nexport type CurrencySymbolFn = (row: MRT_Row<MRT_RowData>) => string;\nexport type StatusClassesFn = (row: MRT_Row<MRT_RowData>) => string;\nexport type RedirectionLinkFn = (row: MRT_Row<MRT_RowData>) => string;\n\nexport interface ITransformTableColumns {\n\tcolumns: MaterialTableColumnProps[];\n\tcurrencySymbol?: string | CurrencySymbolFn;\n\ttranslationFn?: TFunction<'translation', undefined>;\n\tenableFooter?: boolean;\n\tredirectionLink?: string | RedirectionLinkFn;\n\tredirectionLinkState?: (row: MRT_Row<MRT_RowData>) => void;\n\tredirectionPathWithId?: string;\n\tidField?: string;\n\tcustomizeValue?: (row: MRT_Row<MRT_RowData>, columnAccessorKey?: string, value?: any) => any;\n\tstatusClasses?: string | StatusClassesFn;\n\trows: any[];\n\tcurrencyFormat?: boolean\n}\n\nconst jsonArrayToString = (json: any) => {\n\tif (!json) return '';\n\n\ttry {\n\t\treturn JSON.parse(json)?.join(', ');\n\t} catch (error) {\n\t\treturn '';\n\t}\n};\nconst getStatusClass = (status: any) => {\n\tif (typeof status === 'string') {\n\t\treturn status?.toLowerCase()?.replace(' ', '');\n\t} else if (typeof status === 'number') {\n\t\treturn status ? 'enabled' : 'disabled';\n\t}\n};\n\nexport const transformTableColumns = ({\n\tcolumns = [],\n\tcurrencySymbol,\n\ttranslationFn = undefined,\n\tenableFooter = false,\n\tredirectionLink = '',\n\tredirectionLinkState = undefined,\n\tredirectionPathWithId = '',\n\tidField = 'id',\n\tstatusClasses = '',\n\trows = [],\n\tcustomizeValue = undefined,\n\tcurrencyFormat\n}: ITransformTableColumns) => {\n\tconst currencyFormatData = currencyFormat ? currencyFormat : defaultCurrencyFormat()\n\n\treturn columns.map((column) => ({\n\t\t...column,\n\t\theader: translationFn ? translationFn(column.header) : column.header,\n\t\tCell: ({ renderedCellValue, row }: any) => {\n\t\t\tlet v = renderedCellValue;\n\t\t\tif (typeof v === 'number' && v && String(v)?.includes('.')) {\n\t\t\t\treturn v = toFixedWithNumbers(v)\n\t\t\t}\n\t\t\tconst columnType = column.type || (column.header === \"Amount\" || column.header === \"Rate\" ? \"currency\" : undefined);\n\t\t\tswitch (columnType) {\n\t\t\t\tcase 'formattedString':\n\t\t\t\t\tv = formatLabel(renderedCellValue) || '-';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'date':\n\t\t\t\t\tv = formatDate(\n\t\t\t\t\t\trenderedCellValue,\n\t\t\t\t\t\tcolumn.editProperties?.dateFormat || 'DD-MM-YYYY'\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'datetime':\n\t\t\t\t\tv = formatDate(\n\t\t\t\t\t\trenderedCellValue,\n\t\t\t\t\t\tcolumn.editProperties?.dateFormat || 'DD-MM-YYYY hh:mm A'\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'currency':\n\t\t\t\tcase 'amount': {\n\t\t\t\t\tconst cs = column?.showDefaultCurrency ? defaultCurrencySymbol() : currencySymbol instanceof Function ? currencySymbol(row) : (currencySymbol || defaultCurrencySymbol());\n\t\t\t\t\tv = renderedCellValue || renderedCellValue == 0\n\t\t\t\t\t\t? `${formatAmount(renderedCellValue, currencyFormatData, 'before', cs) || '-'}`\n\t\t\t\t\t\t: null;\n\n\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'status':\n\t\t\t\tcase 'enum':\n\t\t\t\tcase 'array':\n\t\t\t\t\t{\n\t\t\t\t\t\tv = renderedCellValue || renderedCellValue === 0 ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{Array.isArray(renderedCellValue) ? (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{renderedCellValue?.length ? <Box sx={{ display: 'flex', alignItems: 'center', gap: 1, flexWrap: 'wrap' }}>\n\t\t\t\t\t\t\t\t\t\t\t{renderedCellValue.map((rcv) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype='normal'\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={column.custom_class ? column?.custom_class : (typeof rcv === 'string' ? rcv : '')}\n\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography type='s4' weight='medium' color={'inherit'}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{typeof rcv === 'object' ? _.get(rcv, column?.typeArrayAccessorKey || '', '') : rcv}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</Box> : '-'}\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\t\t\ttype='normal'\n\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\tcolumn.custom_class ? column?.custom_class :\n\t\t\t\t\t\t\t\t\t\t\t\t(statusClasses instanceof Function\n\t\t\t\t\t\t\t\t\t\t\t\t\t? statusClasses(row)\n\t\t\t\t\t\t\t\t\t\t\t\t\t: `${statusClasses}${getStatusClass(renderedCellValue)}`)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlabel={\n\n\t\t\t\t\t\t\t\t\t\t\t<Typography type='s4' weight='medium' color={'inherit'}>\n\t\t\t\t\t\t\t\t\t\t\t\t{renderedCellValue}\n\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t'-'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'boolean':\n\t\t\t\t\tv = (\n\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\ttype='normal'\n\t\t\t\t\t\t\t// active={Boolean(renderedCellValue)}\n\t\t\t\t\t\t\t// inActive={Boolean(!renderedCellValue)}\n\t\t\t\t\t\t\tsx={(theme) => ({\n\t\t\t\t\t\t\t\t...(renderedCellValue ?\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbackgroundColor: theme.palette?.theme.tertiary4[200],\n\t\t\t\t\t\t\t\t\t\tcolor: theme.palette?.theme.tertiary4[900]\n\t\t\t\t\t\t\t\t\t} :\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbackgroundColor: theme.palette?.theme.tertiary6[200],\n\t\t\t\t\t\t\t\t\t\tcolor: theme.palette?.theme.tertiary6[900]\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t<Typography type='s4' weight='medium' color={'inherit'}>\n\t\t\t\t\t\t\t\t\t{column?.typeBooleanLabels?.[renderedCellValue as keyof TypeBooleanLabels] || '-'}\n\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'jsonArray':\n\t\t\t\t\tv = jsonArrayToString(renderedCellValue);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'custom':\n\t\t\t\tcase 'custom_link':\n\t\t\t\t\tv = customizeValue?.(row, column.accessorKey, renderedCellValue);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'toFixed':\n\t\t\t\t\tv = toFixedWithNumbers(renderedCellValue)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Allow customizeValue to override any type's default rendering\n\t\t\t// if (customizeValue) {\n\t\t\t// \tconst customResult = customizeValue(row, column.accessorKey, renderedCellValue);\n\t\t\t// \tif (customResult !== undefined) {\n\t\t\t// \t\tv = customResult;\n\t\t\t// \t}\n\t\t\t// }\n\n\t\t\t// If redirectionPathWithId is provided, use it for URL parameter-based navigation\n\t\t\tif (redirectionPathWithId && column.type != 'custom_link') {\n\t\t\t\tconst id = row.original[idField || 'id'];\n\t\t\t\tif (id) {\n\t\t\t\t\tconst path = redirectionPathWithId instanceof Function ? generateRouteWithId(redirectionPathWithId(row), id?.toString()) : generateRouteWithId(redirectionPathWithId, id?.toString());\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Link to={path}>\n\t\t\t\t\t\t\t{v}\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Fall back to the existing redirection logic\n\t\t\telse if (redirectionLink && column.type != 'custom_link') {\n\t\t\t\tconst id = row.original[idField || 'id'];\n\t\t\t\tconst path = redirectionLink instanceof Function ? generateRouteWithId(redirectionLink(row), id?.toString()) : generateRouteWithId(redirectionLink, id?.toString());\n\t\t\t\treturn (\n\t\t\t\t\t<Link to={path}\n\t\t\t\t\t\tstate={redirectionLinkState?.(row)}>\n\t\t\t\t\t\t{v}\n\t\t\t\t\t</Link>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn v;\n\t\t},\n\t\t...(Boolean(enableFooter) && {\n\t\t\tFooter: ({ column }) => (\n\t\t\t\t<DefaultAggregation data={rows} column={String(column.id)} />\n\t\t\t)\n\t\t})\n\t}));\n};\n\nexport const renderEmptyRowsFallback = (text: string) => (\n\t<Box className='no-data'>\n\t\t<img src={images.common.tableNoData} />\n\t\t<Typography type='s3' weight='medium' color='theme.secondary.1000'>\n\t\t\t{text}\n\t\t</Typography>\n\t</Box>\n)\n\n/* eslint-disable no-mixed-spaces-and-tabs */\nexport const renderValueField = (label: string, value: any, t: any, formatFn?: (val: any) => string) => {\n\treturn (\n\t\t<ValueField key={label} label={t?.(label)}>\n\t\t\t{formatFn ? formatFn(value) : value ?? '-'}\n\t\t</ValueField>\n\t);\n};\n\nexport const formateValueByType = ({\n\tvalue,\n\ttype,\n\tformat,\n\tweight\n}: {\n\tvalue: any;\n\ttype: string;\n\tformat?: string;\n\tweight?: \"normal\" | \"medium\" | \"bold\";\n}) => {\n\tconst numberTypes = ['number', 'amount', 'toFixed'];\n\tconst valueCheck = [null, undefined, '0'];\n\tif (valueCheck.includes(value)) return <Typography type='s4' weight={weight} color='theme.neutral.1000'>{numberTypes?.includes(type) ? value : (value || '-')}</Typography>;\n\n\tswitch (type) {\n\t\tcase 'date':\n\t\t\treturn dayjs(value).isValid() ? formatDate(value, format) : value;\n\t\tcase 'toFixed':\n\t\t\treturn <Typography type='s4' weight={weight} color='theme.neutral.1000'>{value ? toFixedWithNumbers(Number(value)) : '-'}</Typography>;\n\t\tcase 'amount':\n\t\t\treturn <Typography type='s4' weight={weight} color='theme.neutral.1000'>{value ? formatAmountWithCurrency(Number(value)) : '-'}</Typography>;\n\t\tdefault:\n\t\t\treturn weight ? <Typography type='s4' weight={weight} color='theme.neutral.1000'>{value || '-'}</Typography> : value || '-';\n\t}\n};\n\n\nconst setCompany = (value: any) => {\n\tconst { user } = useAuth();\n\treturn {\n\t\tvalue: user?.company_id,\n\t\toptions: [{\n\t\t\tlabel: user?.company_data?.name,\n\t\t\tvalue: user?.company_id\n\t\t}]\n\t}\n}\nexport const configMapper = {\n\t'company': {\n\t\tcallBack: setCompany,\n\n\t}\n}\n","type ItemType = {\n section_name: any;\n is_system_field: boolean;\n field_type: string;\n label: string;\n name?: string;\n placeholder: string;\n default_value: any;\n validation: any[];\n is_multiline: any;\n section_order: any;\n option?: any;\n time_format?: string;\n currency?: string;\n field_properties: {\n is_accordion?: boolean;\n float_step?: any;\n options: any;\n is_multiselect: any;\n title: string;\n title_position: \"start\" | \"end\";\n is_multiline: boolean\n is_checked: boolean\n table: string,\n table_columns: string[]\n table_rows?: any\n is_multiple: boolean\n enable_footer?: boolean\n footer_action?: 'add'\n other_buttons?: React.ReactNode[]\n };\n is_section_field?: true;\n section_type?: \"default\" | \"Form switcher section\";\n form_switcher_label?: string;\n form_switcher_name?: string;\n switcher_forms?: {\n value?: string;\n name?: string;\n id?: number;\n }[];\n is_accordion?: boolean;\n}\n\nconst getFirstNonSectionField = (formData: any[]) => {\n const firstField = formData?.find((field) => !field.is_section_field)\n return firstField\n}\n\nconst formBuilderDeConversion = (formData: any) => {\n const outputData: any = {};\n if (formData.length === 0) {\n return outputData;\n }\n\n const firstItem = getFirstNonSectionField(formData);\n\n if (firstItem?.tab_name) {\n outputData.tab = <any>[];\n let currentTab: {\n title: string;\n data: any;\n remove_tab?: any;\n tab_order?: any;\n } | null = null;\n let currentSection: {\n label: string;\n members: any;\n remove_section: any;\n field_type?: string;\n is_accordion?: boolean;\n } | null = null;\n let otherSectionDetails: any = {}\n let sectionOrder: any = null\n\n formData.forEach((item: any) => {\n if (item?.is_section_field) {\n otherSectionDetails = {\n field_type: item?.field_type,\n label: item?.label,\n is_accordion: item?.is_accordion,\n is_section_field: item?.is_section_field,\n section_type: item?.section_type,\n form_switcher_label: item?.form_switcher_label,\n form_switcher_name: item?.form_switcher_name,\n switcher_forms: item?.switcher_forms,\n disabled: Boolean(item?.disabled)\n }\n currentSection = null\n sectionOrder = sectionOrder++\n } else {\n if (!currentTab || currentTab.title !== item.tab_name) {\n\n currentTab = {\n tab_order: item.tab_order || 1,\n title: item.tab_name,\n data: [],\n };\n const checkIfTabExist = outputData.tab.find(tab => tab.title === currentTab?.title)\n\n if (!checkIfTabExist) {\n outputData.tab.push(currentTab);\n } else {\n currentTab = checkIfTabExist\n }\n currentSection = null;\n }\n\n if (!currentSection || currentSection.label !== item.section_name || sectionOrder !== item.section_order) {\n currentSection = {\n field_type: \"section\",\n label: item.section_name || \"\",\n is_accordion: item.field_properties?.is_accordion,\n members: [],\n remove_section: item.is_system_field === true ? true : false,\n };\n\n const checkIfSectionExist = currentTab.data.find(section => section.label === currentSection?.label)\n if (!checkIfSectionExist) {\n // Merge section details and update currentSection reference to the actual pushed object\n currentSection = { ...otherSectionDetails, ...currentSection };\n currentTab.data.push(currentSection);\n } else {\n currentSection = checkIfSectionExist\n }\n otherSectionDetails = null\n }\n sectionOrder = item.section_order\n\n const thenValidations = item?.validation?.find((v: { type: string }) => v.type === \"when\")?.thenValidations || []\n\n const member = {\n ...item,\n id: `${Date.now()}-${Math.random()}`,\n field_type:\n item.field_type === \"media\" ? \"file\" : item.field_type || \"text\",\n type: item.is_system_field ? \"system\" : \"custom\",\n label: item.label || \"\",\n placeholder: item.placeholder || \"\",\n default_value: item.default_value || \"\",\n ...(item?.time_format &&\n item?.field_type === \"time\" && { option: item?.time_format }),\n ...(item?.currency &&\n item?.field_type === \"currency\" && { option: item?.currency }),\n ...(item.field_type === \"text\" && {\n min_length:\n item.validation.find(\n (v: { type: string }) => v.type === \"min_length\",\n )?.value || null,\n }),\n ...(item.field_type === \"text\" && {\n max_length:\n item.validation.find(\n (v: { type: string }) => v.type === \"max_length\",\n )?.value || null,\n }),\n ...(item.field_type === \"number\" && {\n min_length:\n item.validation.find((v: { type: string }) => v.type === \"min_val\")\n ?.value || null,\n }),\n ...(item.field_type === \"number\" && {\n max_length:\n item.validation.find((v: { type: string }) => v.type === \"max_val\")\n ?.value || null,\n }),\n ...((item.is_multiline !== undefined || item.field_properties.is_multiline !== undefined) && {\n is_multiline: item.is_multiline || item.field_properties.is_multiline,\n }),\n is_required:\n item.validation.find((v: { type: string }) => v.type === \"required\")?.value ||\n thenValidations?.find((v: { type: string }) => v.type === \"required\")?.value ||\n false,\n is_unique:\n item.validation.find((v: { type: string }) => v.type === \"unique\")\n ?.value || false,\n section_order: item.section_order || 0,\n ...(item.field_properties.float_step && {\n float_step: item.field_properties.float_step.toString(),\n }),\n ...(item.field_properties.options && {\n options: item.field_properties.options,\n }),\n ...(item.field_properties.is_multiselect !== undefined && {\n is_multiselect: item.field_properties.is_multiselect,\n }),\n ...(item.field_properties?.enable_footer !== undefined && {\n enable_footer: Boolean(item.field_properties.enable_footer),\n }),\n ...(item.field_properties?.footer_action !== undefined && {\n footer_action: item.field_properties.footer_action || 'add',\n }),\n ...(item.field_type === \"date\" && {\n is_future_dates_allowed:\n item.validation.find(\n (v: { type: string }) => v.type === \"is_future_dates_allowed\",\n )?.value || null,\n }),\n ...(item.field_type === \"date\" && {\n is_past_dates_allowed:\n item.validation.find(\n (v: { type: string }) => v.type === \"is_past_dates_allowed\",\n )?.value || null,\n }),\n ...((item.field_type === \"image\" || item.field_type === \"media\" || item.field_type === \"file\") && {\n max_size:\n item.validation.find(\n (v: { type: string }) => v.type === \"max_file_size\",\n )?.value || undefined,\n is_multiple: item.field_properties?.is_multiple\n }),\n ...((item.field_type === \"toggleButton\" || item.field_type === \"checkbox\" || item.field_type === \"radioButton\") && {\n title: item.field_properties?.title ? item.field_properties?.title : '',\n title_position: item.field_properties?.title_position ?? \"end\",\n is_checked: item.field_properties?.is_checked\n }),\n ...((item.field_type === \"table\") && {\n table: item.field_properties?.table,\n table_columns: convertTableColumns(item.field_properties?.table_columns),\n table_rows: item.field_properties?.table_rows,\n otherButtons: item.field_properties?.other_buttons || []\n }),\n };\n if (currentSection) {\n currentSection.members.push(member);\n if (\n currentSection.members.some((member: any) => member.type === \"system\")\n ) {\n currentSection.remove_section = true;\n } else {\n currentSection.remove_section = false;\n }\n currentTab.remove_tab = currentTab.data.some(\n (section: { members: any[] }) =>\n section.members.some(\n (member: { type: string }) => member.type === \"system\",\n ),\n );\n }\n }\n });\n } else {\n // Convert to sections format\n outputData.section = [];\n let currentSection: {\n label: any;\n members: any;\n remove_section: any;\n field_type?: string;\n is_accordion?: boolean;\n } | null = null;\n let otherSectionDetails: any = {}\n let sectionOrder: any = null\n\n formData.forEach(\n (item: ItemType) => {\n if (item.is_section_field) {\n otherSectionDetails = {\n field_type: item?.field_type,\n label: item?.label,\n is_accordion: item?.is_accordion,\n is_section_field: item?.is_section_field,\n section_type: item?.section_type,\n form_switcher_label: item?.form_switcher_label,\n form_switcher_name: item?.form_switcher_name,\n switcher_forms: item?.switcher_forms,\n disabled: Boolean(item?.disabled)\n }\n sectionOrder = sectionOrder++\n currentSection = null\n } else {\n if (!currentSection || currentSection.label !== item.section_name || sectionOrder !== item.section_order) {\n currentSection = {\n field_type: \"section\",\n label: item.section_name || \"\",\n is_accordion: item.field_properties?.is_accordion,\n members: [],\n remove_section: item.is_system_field === true ? true : false,\n };\n\n const checkIfSectionExist = outputData?.section?.find(section => section.label === currentSection?.label)\n if (!checkIfSectionExist) {\n // Merge section details and update currentSection reference to the actual pushed object\n currentSection = { ...otherSectionDetails, ...currentSection };\n outputData.section.push(currentSection);\n } else {\n currentSection = checkIfSectionExist\n }\n\n // outputData.section.push({ ...otherSectionDetails, ...currentSection });\n\n otherSectionDetails = null\n }\n sectionOrder = item.section_order\n\n const thenValidations = item?.validation?.find((v: { type: string }) => v.type === \"when\")?.thenValidations || []\n\n const member = {\n ...item,\n id: `${Date.now()}-${Math.random()}`,\n field_type:\n item.field_type === \"media\" ? \"file\" : item.field_type || \"text\",\n type: item.is_system_field ? \"system\" : \"custom\",\n label: item.label,\n placeholder: item.placeholder || \"\",\n default_value: item.default_value || \"\",\n ...(item?.time_format &&\n item?.field_type === \"time\" && { option: item?.time_format }),\n ...(item?.currency &&\n item?.field_type === \"currency\" && { option: item?.currency }),\n ...(item.field_type === \"text\" && {\n min_length:\n item.validation.find(\n (v: { type: string }) => v.type === \"min_length\",\n )?.value || null,\n }),\n ...(item.field_type === \"text\" && {\n max_length:\n item.validation.find(\n (v: { type: string }) => v.type === \"max_length\",\n )?.value || null,\n }),\n ...(item.field_type === \"number\" && {\n min_length:\n item.validation.find(\n (v: { type: string }) => v.type === \"min_val\",\n )?.value || null,\n }),\n ...(item.field_type === \"number\" && {\n max_length:\n item.validation.find(\n (v: { type: string }) => v.type === \"max_val\",\n )?.value || null,\n }),\n ...((item.is_multiline !== undefined || item.field_properties?.is_multiline !== undefined) && {\n is_multiline: item.is_multiline || item.field_properties.is_multiline,\n }),\n is_required:\n item.validation.find((v: { type: string }) => v.type === \"required\")?.value ||\n thenValidations?.find((v: { type: string }) => v.type === \"required\")?.value ||\n false,\n is_unique:\n item.validation.find((v: { type: string }) => v.type === \"unique\")\n ?.value || false,\n section_order: item.section_order || 0,\n ...(item.field_properties?.float_step && {\n float_step: Number(item.field_properties.float_step),\n }),\n ...(item.field_properties?.options && {\n options: item.field_properties.options,\n }),\n ...(item.field_properties?.is_multiselect !== undefined && {\n is_multiselect: item.field_properties.is_multiselect,\n }),\n ...(item.field_properties?.enable_footer !== undefined && {\n enable_footer: Boolean(item.field_properties.enable_footer),\n }),\n ...(item.field_properties?.footer_action !== undefined && {\n footer_action: item.field_properties.footer_action || 'add',\n }),\n ...(item.field_type === \"date\" && {\n is_future_dates_allowed:\n item.validation.find(\n (v: { type: string }) => v.type === \"is_future_dates_allowed\",\n )?.value || null,\n }),\n ...(item.field_type === \"date\" && {\n is_past_dates_allowed:\n item.validation.find(\n (v: { type: string }) => v.type === \"is_past_dates_allowed\",\n )?.value || null,\n }),\n ...((item.field_type === \"image\" || item.field_type === \"media\" || item.field_type === \"file\") && {\n max_size:\n item.validation.find(\n (v: { type: string }) => v.type === \"max_file_size\",\n )?.value || undefined,\n is_multiple: item.field_properties?.is_multiple\n }),\n ...((item.field_type === \"toggleButton\" || item.field_type === \"checkbox\") && {\n title: item.field_properties?.title ? item.field_properties?.title : item.label,\n title_position: item.field_properties?.title_position ?? \"end\",\n is_checked: item.field_properties?.is_checked\n }),\n ...((item.field_type === \"table\") && {\n table: item.field_properties?.table,\n table_columns: convertTableColumns(item.field_properties?.table_columns),\n table_rows: item.field_properties?.table_rows,\n otherButtons: item.field_properties?.other_buttons || []\n }),\n };\n\n currentSection.members.push(member);\n if (\n currentSection.members.some((member: any) => member.type === \"system\")\n ) {\n currentSection.remove_section = true;\n } else {\n currentSection.remove_section = false;\n }\n }\n }\n );\n }\n\n return outputData;\n};\n\n\n\nfunction formatText(key: string): string {\n return key ? key\n .split(/[:_-]/)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(\" \") : key;\n}\n\nexport const convertTableColumns = (columns: string[]) => {\n if (!Array.isArray(columns)) return [];\n\n return columns.map(column => {\n if (typeof column === 'object') {\n return { ...column }\n } else {\n const colArr = column.split(\".\").filter(str => str)\n const header = colArr.length ? (colArr.length > 1 ? formatText(colArr[colArr.length - 1]) : formatText(colArr[0])) : \"-\"\n\n return {\n header,\n accessorKey: column,\n visible: true,\n }\n }\n })\n}\n\nexport default formBuilderDeConversion;\n"],"names":["styled","MUIMenu","jsx","Fragment","sum","useEffect","jsxs","Typography","MenuItem","MUIChip","Box","Document","defaultCurrencyFormat","toFixedWithNumbers","formatLabel","formatDate","defaultCurrencySymbol","formatAmount","_a","_b","_c","_d","generateRouteWithId","Link","column","images","formatAmountWithCurrency","useAuth","member"],"mappings":";;;;;;;;;;;;;AAEA,MAAM,aAAaA,SAAAA,OAAOC,SAAAA,IAAO,EAAE,OAAO;AAAA,EACxC,qBAAqB;AAAA,IACnB,cAAc;AAAA,IACd,UAAU;AAAA,EAAA;AAEd,EAAE;AAEF,MAAM,OAAO,CAAC,EAAE,UAAU,UAAU,SAAS,MAAM,GAAG,WAAsB;AAC1E,SACEC,iDAAAC,WAAAA,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E,YAAA,IAAgB,KAAK,MAAM,CAAC,CAAC,EAC1D,KAAK,GAAG,IAAI;AACjB;AAEO,MAAM,sBAAsB,CAAC,YAAsB;AACxD,MAAI,CAAC,MAAM,QAAQ,OAAO,UAAU,CAAA;AAEpC,SAAO,QAAQ,IAAI,CAAA,WAAU;AAC3B,QAAI,OAAO,WAAW,UAAU;AAC9B,aAAO,EAAE,GAAG,OAAA;AAAA,IACd,OAAO;AACL,YAAM,SAAS,OAAO,MAAM,GAAG,EAAE,OAAO,SAAO,GAAG;AAClD,YAAM,SAAS,OAAO,SAAU,OAAO,SAAS,IAAI,WAAW,OAAO,OAAO,SAAS,CAAC,CAAC,IAAI,WAAW,OAAO,CAAC,CAAC,IAAK;AAErH,aAAO;AAAA,QACL;AAAA,QACA,aAAa;AAAA,QACb,SAAS;AAAA,MAAA;AAAA,IAEb;AAAA,EACF,CAAC;AACH;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"form-builder-deconversion-BDKiVY14.js","sources":["../../src/components/menu/menu.tsx","../../src/components/material-table/aggregation-fns/index.ts","../../src/components/material-table/components/default-aggregation.tsx","../../src/components/chip/chip.tsx","../../src/components/value-field/value-field.tsx","../../src/utils/common-utility.tsx","../../src/utils/form-builder-deconversion.ts"],"sourcesContent":["import { Menu as MUIMenu, MenuProps, styled } from \"@mui/material\";\n\nconst StyledMenu = styled(MUIMenu)(() => ({\n \".MuiPaper-rounded\": {\n borderRadius: \"0.5rem\",\n minWidth: \"10rem\",\n },\n}));\n\nconst Menu = ({ children, anchorEl, onClose, open, ...rest }: MenuProps) => {\n return (\n <>\n <StyledMenu\n id=\"basic-menu\"\n anchorEl={anchorEl}\n open={open}\n onClose={onClose}\n MenuListProps={{\n \"aria-labelledby\": \"basic-button\",\n }}\n {...rest}\n >\n {children}\n </StyledMenu>\n </>\n );\n};\n\nexport { Menu };\nexport default Menu;\n","import _ from 'lodash';\nimport { MRT_RowData } from 'material-react-table';\n\nconst average = (data: MRT_RowData[], column: string) => {\n\tconst sum = data.reduce(\n\t\t(acc: number, row) => acc + Number(extractNumber(row[column])),\n\t\t0\n\t);\n\tconst count = data.length;\n\treturn !isNaN(sum) ? `${_.round(sum / count,2)}` : '-';\n};\n\nconst extractNumber = (inputString: any) => {\n\t// Use a regular expression to match the numeric part, including decimals\n\tif (typeof inputString === 'string') {\n\t\tconst match = inputString.match(/[\\d,]+(\\.\\d{1,2})?/);\n\t\treturn match ? match[0] : 0;\n\t}\n\treturn inputString;\n};\nconst sum = (data: MRT_RowData[], column: string) => {\n\tconst sum = data.reduce(\n\t\t(acc: number, row) => acc + Number(extractNumber(row[column])),\n\t\t0\n\t);\n\treturn !isNaN(sum) ? `${_.round(sum,2)}` : '-';\n};\n\nconst max = (data: MRT_RowData[], column: string) => {\n\tconst maxVal = Math.max(...data.map((row) => Number(row[column])));\n\treturn `${maxVal}`;\n};\n\nconst countEmpty = (data: MRT_RowData[], column: string) => {\n\tconst empty = data?.filter((d) => {\n\t\tconst value = _.get(d, column); \n\t\treturn isNaN(Number(value)) \n\t\t\t? Boolean(!_.size(value)) \n\t\t\t: Boolean(!Number(value))\n\t}\n\t);\n\treturn `${empty.length}`;\n};\n\nconst percentageEmpty = (data: MRT_RowData[], column: string) => {\n\tconst empty = data?.filter((d) => {\n\t\tconst value = _.get(d, column); \n\t\treturn isNaN(Number(value))\n\t\t\t? Boolean(!_.size(value))\n\t\t\t: Boolean(!Number(value))\n\t}\n\t);\n\tconst percentage = (empty.length / data.length) * 100;\n\n\treturn `${_.round(percentage,2)}%`;\n};\n\nconst percentageFull = (data: MRT_RowData[], column: string) => {\n\tconst full = data?.filter((d) => {\n\t\tconst value = _.get(d, column); \n\t\treturn isNaN(Number(value))\n\t\t\t? Boolean(_.size(value))\n\t\t\t: Boolean(Number(value))\n\t}\n\t);\n\tconst percentage = (full.length / data.length) * 100;\n\n\treturn `${_.round(percentage,2)}%`;\n};\n\nconst countFull = (data: MRT_RowData[], column: string) => {\n\tconst full = data?.filter((d) => {\n\t\tconst value = _.get(d, column); \n\t\treturn isNaN(Number(value))\n\t\t\t? Boolean(_.size(value))\n\t\t\t: Boolean(Number(value))\n\t}\n\t);\n\treturn `${full.length}`;\n};\n\nconst none = () => {\n\treturn null;\n};\n\nconst min = (data: MRT_RowData[], column: string) => {\n\tconst minValue = Math.min(...data.map((row) => Number(row[column])));\n\treturn `${minValue}`;\n};\n\nexport const aggregationFns = {\n\tnone,\n\tmin,\n\tmax,\n\tsum,\n\taverage,\n\tcountEmpty,\n\tcountFull,\n\tpercentageEmpty,\n\tpercentageFull\n};\n","import React, { useEffect } from 'react';\nimport Typography from '../../typography/typography';\nimport { MenuItem } from '@mui/material';\nimport Menu from '../../menu/menu';\nimport { aggregationFns } from '../aggregation-fns';\nimport { MRT_RowData } from 'material-react-table';\n\ntype aggregationType =\n\t| 'none'\n\t| 'count_empty'\n\t| 'count_full'\n\t| 'percentage_empty'\n\t| 'percentage_full'\n\t| 'average'\n\t| 'sum';\n\ninterface IAggregation {\n\tlabel: string;\n\tvalue: aggregationType;\n}\n\nconst aggregations: IAggregation[] = [\n\t{\n\t\tlabel: 'Count Empty',\n\t\tvalue: 'count_empty'\n\t},\n\t{\n\t\tlabel: 'Count Full',\n\t\tvalue: 'count_full'\n\t},\n\t{\n\t\tlabel: 'Percentage Full',\n\t\tvalue: 'percentage_full'\n\t},\n\t{\n\t\tlabel: 'Percentage Empty',\n\t\tvalue: 'percentage_empty'\n\t},\n\t{\n\t\tlabel: 'Average',\n\t\tvalue: 'average'\n\t},\n\t{\n\t\tlabel: 'Sum',\n\t\tvalue: 'sum'\n\t},\n\t{\n\t\tlabel: 'None',\n\t\tvalue: 'none'\n\t}\n];\n\nconst aggregationFnsLookup = {\n\tcount_empty: aggregationFns.countEmpty,\n\tcount_full: aggregationFns.countFull,\n\tpercentage_empty: aggregationFns.percentageEmpty,\n\tpercentage_full: aggregationFns.percentageFull,\n\taverage: aggregationFns.average,\n\tsum: aggregationFns.sum,\n\tnone: aggregationFns.none\n};\n\ninterface IDefaultAggregation {\n\tdata: MRT_RowData[];\n\tcolumn: string;\n\tcolumnDef?: any;\n}\n\nconst DefaultAggregation = ({\n\tdata,\n\tcolumn,\n\t// columnDef\n}: IDefaultAggregation) => {\n\tconst [selectedType, setSelectedType] =\n\t\tReact.useState<aggregationType>('none');\n\tconst [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);\n\tconst [calculatedValue, setCalculatedValue] = React.useState<string | null>();\n\tconst open = Boolean(anchorEl);\n\n\tconst handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n\t\tsetAnchorEl(event.currentTarget);\n\t};\n\n\tconst handleClose = () => {\n\t\tsetAnchorEl(null);\n\t};\n\n\tconst handleAggregationType = (val: aggregationType) => {\n\t\tsetSelectedType(val);\n\t\thandleClose();\n\t};\n\n\tuseEffect(() => {\n\t\tconst func = aggregationFnsLookup[selectedType];\n\t\tsetCalculatedValue(func(data, column));\n\t}, [selectedType, column, data]);\n\n\treturn (\n\t\t<>\n\t\t\t<Typography\n\t\t\t\tonClick={handleClick}\n\t\t\t\tsx={{ cursor: 'pointer', width:\"100%\", height:\"100%\" }}\n\t\t\t\ttype='s4'\n\t\t\t\tweight='normal'\n\t\t\t\tcolor={\n\t\t\t\t\tcalculatedValue ? 'theme.secondary.1000' : 'theme.secondary.500'\n\t\t\t\t}>\n\t\t\t\t{calculatedValue || '+ Add Calculation'}\n\t\t\t</Typography>\n\t\t\t<Menu\n\t\t\t\tid='basic-menu'\n\t\t\t\tanchorEl={anchorEl}\n\t\t\t\topen={open}\n\t\t\t\tonClose={handleClose}>\n\t\t\t\t{aggregations?.map((aggr) => (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tkey={aggr.value}\n\t\t\t\t\t\tselected={selectedType == aggr?.value}\n\t\t\t\t\t\tonClick={() => handleAggregationType(aggr?.value)}\n\t\t\t\t\t\t// disabled={\n\t\t\t\t\t\t// \t(!columnDef || columnDef?.type !== 'number') &&\n\t\t\t\t\t\t// \t(aggr.value === 'sum' || aggr.value === 'average')\n\t\t\t\t\t\t// }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<Typography color='theme.secondary.1000' type='s4'>\n\t\t\t\t\t\t\t{aggr?.label}\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t</MenuItem>\n\t\t\t\t))}\n\t\t\t</Menu>\n\t\t</>\n\t);\n};\n\nexport { DefaultAggregation };\nexport default DefaultAggregation;\n","import { Chip as MUIChip, ChipProps, styled } from \"@mui/material\";\n\ninterface IChip extends ChipProps {\n type?: \"rounded\" | \"normal\";\n active?: boolean;\n inActive?: boolean;\n label?: string | React.ReactNode | number | JSX.Element;\n}\n\nconst StyledChip = styled(MUIChip)<IChip>(\n ({ theme: { palette }, active, type, inActive }) => ({\n cursor: \"pointer\",\n fontSize: \".75rem\",\n color: palette.theme?.secondary[800],\n borderRadius: type === \"rounded\" ? \"1.5rem\" : \"0.25rem\",\n backgroundColor: palette.theme?.secondary[200],\n ...(active && {\n \"&.MuiChip-filled\": {\n color: palette.theme?.primary[700],\n backgroundColor: palette.theme?.primary[200],\n \"&:hover\": {\n backgroundColor: palette.theme?.primary[200]\n },\n },\n \"&.MuiChip-outlined\": {\n color: palette.theme?.primary[800],\n borderColor: palette.theme?.primary[300],\n \"&:hover\": {\n backgroundColor: palette.theme?.primary[200]\n },\n },\n }),\n ...(inActive && {\n \"&.MuiChip-filled\": {\n color: palette.theme?.error[700],\n backgroundColor: palette.theme?.error[200],\n \"&:hover\": {\n backgroundColor: palette.theme?.error[200]\n },\n },\n \"&.MuiChip-outlined\": {\n color: palette.theme?.error[800],\n borderColor: palette.theme?.error[300],\n \"&:hover\": {\n backgroundColor: palette.theme?.error[200]\n },\n },\n }),\n\n \"& .MuiChip-icon\": {\n marginRight: \"0.125rem\",\n marginLeft: \"0rem\",\n color: \"inherit\",\n },\n \"& .MuiChip-deleteIcon\": {\n marginLeft: \"0.25rem\",\n fontSize: \".875rem\",\n color: \"inherit\",\n marginRight: \"0rem\",\n },\n \"&.MuiChip-root\": {\n height: \"fit-content\",\n padding: \"0.25rem 0.5rem\",\n \".MuiChip-label\": {\n padding: \"0rem\",\n },\n },\n }),\n);\n\nconst Chip = (props: IChip) => {\n const {\n label,\n type = \"rounded\",\n variant = \"filled\",\n active = false,\n inActive = false,\n ...rest\n } = props;\n\n return (\n <StyledChip\n label={label}\n variant={variant}\n active={active}\n inActive={inActive}\n type={type}\n {...rest}\n />\n );\n};\n\nexport { Chip };\nexport default Chip;\n","import { Box } from \"@mui/material\";\nimport Typography from \"../typography/typography\";\nimport \"./value-field.scss\";\n\ninterface ValueFieldProps {\n label: string;\n children: React.ReactNode;\n childrenTypoProps?:any\n}\n\nconst ValueField = (props: ValueFieldProps) => {\n const { label, children, childrenTypoProps } = props;\n\n return (\n <Box className=\"valueField--Container\" >\n <Typography weight={\"medium\"} type=\"s3\" color={\"theme.secondary.1000\"}>\n {label}\n </Typography>\n <Typography weight={\"medium\"} type=\"s5\" color={\"theme.secondary.700\"} sx={{ wordBreak:'break-all', pr: 1 }} {...childrenTypoProps}>\n {children}\n </Typography>\n </Box>\n );\n};\n\nexport { ValueField };\nexport default ValueField;\n","\nimport React from 'react';\n\nimport { Box } from '@mui/material';\n/* eslint-disable no-mixed-spaces-and-tabs */\nimport Typography from '../components/typography/typography';\nimport { Document } from '../components/icons';\nimport { MaterialTableColumnProps, TypeBooleanLabels } from '../components/material-table/material-table';\nimport { TFunction } from 'i18next';\nimport { formatDate } from './dateFormat';\nimport { MRT_Row, MRT_RowData } from 'material-react-table';\nimport { Link } from 'react-router-dom';\nimport DefaultAggregation from '../components/material-table/components/default-aggregation';\nimport Chip from '../components/chip/chip';\nimport _ from 'lodash';\nimport images from '../assets/images';\nimport { formatAmount, formatAmountWithCurrency, toFixedWithNumbers } from \"./common\";\nimport { defaultCurrencyFormat } from './common';\n\nimport { defaultCurrencySymbol } from './common';\nimport ValueField from '../components/value-field/value-field';\nimport { formatLabel } from './format-text';\nimport { generateRouteWithId } from './route-utils';\nimport dayjs from 'dayjs';\nimport { useAuth } from '@/hooks';\nconst downloadFile = async (url, fileName) => {\n\ttry {\n\t\t// Fetch the file from the provided URL\n\t\tconst response = await fetch(url);\n\t\tif (!response.ok) {\n\t\t\tthrow new Error(`Failed to fetch file: ${response.statusText}`);\n\t\t}\n\n\t\t// Convert the response to a blob\n\t\tconst blob = await response.blob();\n\n\t\t// Create a temporary URL for the blob\n\t\tconst blobUrl = window.URL.createObjectURL(blob);\n\n\t\t// Create a link element\n\t\tconst link = document.createElement('a');\n\t\tlink.href = blobUrl;\n\t\tlink.download = fileName || 'downloaded-file'; // Fallback filename if none provided\n\n\t\t// Append link to the body, trigger click, and remove it\n\t\tdocument.body.appendChild(link);\n\t\tlink.click();\n\t\tdocument.body.removeChild(link);\n\n\t\t// Revoke the blob URL to free up memory\n\t\twindow.URL.revokeObjectURL(blobUrl);\n\t} catch (error) {\n\t\tconsole.error('Error downloading file:', error);\n\t\tthrow error; // Re-throw to allow caller to handle the error\n\t}\n};\n\nexport const getFileNamesFromUrlsAsLink = (fileUrls: string | string[], mode?: string) => {\n\tconst fUrls = fileUrls\n\t\t? Array.isArray(fileUrls)\n\t\t\t? fileUrls\n\t\t\t: [fileUrls]\n\t\t: [];\n\n\tif (fUrls && fUrls.length) {\n\t\treturn (\n\t\t\t<Box\n\t\t\t\tdisplay='flex'\n\t\t\t\tgap={1}\n\t\t\t\tmb={1}\n\t\t\t\talignItems='center'\n\t\t\t\tflexDirection='column'>\n\t\t\t\t{fUrls.map((url) => {\n\t\t\t\t\tconst fileName = url.substring(url.lastIndexOf('/') + 1);\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\ttype='s3'\n\t\t\t\t\t\t\tweight='medium'\n\t\t\t\t\t\t\tcolor='#246DFF'\n\t\t\t\t\t\t\tsx={{ textDecoration: 'underline', textUnderlineOffset: '3px', cursor: 'pointer' }}\n\t\t\t\t\t\t\tnoWrap\n\t\t\t\t\t\t\tonClick={() => mode === 'add' ? undefined : downloadFile(url, fileName)}>\n\t\t\t\t\t\t\t{fileName}\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Box>\n\t\t);\n\t}\n\n\treturn null;\n};\n\nexport const getFileNamesFromUrls = (fileUrls: string[]) => {\n\tif (!fileUrls) return null;\n\n\tif (!fileUrls?.filter(Boolean)?.length) return null;\n\n\treturn fileUrls?.filter(Boolean)?.map((url) => {\n\t\tconst fileName = url?.substring(url?.lastIndexOf('/') + 1) || '';\n\t\treturn (\n\t\t\t<Box display='flex' gap={1} mb={1} alignItems='center'>\n\t\t\t\t<Document fontSize='small' />\n\t\t\t\t<Typography\n\t\t\t\t\ttype='s3'\n\t\t\t\t\tweight='medium'\n\t\t\t\t\tcolor={'theme.secondary.1000'}\n\t\t\t\t\tsx={{ cursor: 'pointer' }}\n\t\t\t\t\tnoWrap onClick={() => downloadFile(url, fileName)}>\n\t\t\t\t\t{fileName}\n\t\t\t\t</Typography>\n\t\t\t</Box>\n\t\t);\n\t});\n};\n\nexport type CurrencySymbolFn = (row: MRT_Row<MRT_RowData>) => string;\nexport type StatusClassesFn = (row: MRT_Row<MRT_RowData>) => string;\nexport type RedirectionLinkFn = (row: MRT_Row<MRT_RowData>) => string;\n\nexport interface ITransformTableColumns {\n\tcolumns: MaterialTableColumnProps[];\n\tcurrencySymbol?: string | CurrencySymbolFn;\n\ttranslationFn?: TFunction<'translation', undefined>;\n\tenableFooter?: boolean;\n\tredirectionLink?: string | RedirectionLinkFn;\n\tredirectionLinkState?: (row: MRT_Row<MRT_RowData>) => void;\n\tredirectionPathWithId?: string;\n\tidField?: string;\n\tcustomizeValue?: (row: MRT_Row<MRT_RowData>, columnAccessorKey?: string, value?: any) => any;\n\tstatusClasses?: string | StatusClassesFn;\n\trows: any[];\n\tcurrencyFormat?: boolean\n}\n\nconst jsonArrayToString = (json: any) => {\n\tif (!json) return '';\n\n\ttry {\n\t\treturn JSON.parse(json)?.join(', ');\n\t} catch (error) {\n\t\treturn '';\n\t}\n};\nconst getStatusClass = (status: any) => {\n\tif (typeof status === 'string') {\n\t\treturn status?.toLowerCase()?.replace(' ', '');\n\t} else if (typeof status === 'number') {\n\t\treturn status ? 'enabled' : 'disabled';\n\t}\n};\n\nexport const transformTableColumns = ({\n\tcolumns = [],\n\tcurrencySymbol,\n\ttranslationFn = undefined,\n\tenableFooter = false,\n\tredirectionLink = '',\n\tredirectionLinkState = undefined,\n\tredirectionPathWithId = '',\n\tidField = 'id',\n\tstatusClasses = '',\n\trows = [],\n\tcustomizeValue = undefined,\n\tcurrencyFormat\n}: ITransformTableColumns) => {\n\tconst currencyFormatData = currencyFormat ? currencyFormat : defaultCurrencyFormat()\n\n\treturn columns.map((column) => ({\n\t\t...column,\n\t\theader: translationFn ? translationFn(column.header) : column.header,\n\t\tCell: ({ renderedCellValue, row }: any) => {\n\t\t\tlet v = renderedCellValue;\n\t\t\tif (typeof v === 'number' && v && String(v)?.includes('.')) {\n\t\t\t\treturn v = toFixedWithNumbers(v)\n\t\t\t}\n\t\t\tconst columnType = column.type || (column.header === \"Amount\" || column.header === \"Rate\" ? \"currency\" : undefined);\n\t\t\tswitch (columnType) {\n\t\t\t\tcase 'formattedString':\n\t\t\t\t\tv = formatLabel(renderedCellValue) || '-';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'date':\n\t\t\t\t\tv = formatDate(\n\t\t\t\t\t\trenderedCellValue,\n\t\t\t\t\t\tcolumn.editProperties?.dateFormat || 'DD-MM-YYYY'\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'datetime':\n\t\t\t\t\tv = formatDate(\n\t\t\t\t\t\trenderedCellValue,\n\t\t\t\t\t\tcolumn.editProperties?.dateFormat || 'DD-MM-YYYY hh:mm A'\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'currency':\n\t\t\t\tcase 'amount': {\n\t\t\t\t\tconst cs = column?.showDefaultCurrency ? defaultCurrencySymbol() : currencySymbol instanceof Function ? currencySymbol(row) : (currencySymbol || defaultCurrencySymbol());\n\t\t\t\t\tv = renderedCellValue || renderedCellValue == 0\n\t\t\t\t\t\t? `${formatAmount(renderedCellValue, currencyFormatData, 'before', cs) || '-'}`\n\t\t\t\t\t\t: null;\n\n\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'status':\n\t\t\t\tcase 'enum':\n\t\t\t\tcase 'array':\n\t\t\t\t\t{\n\t\t\t\t\t\tv = renderedCellValue || renderedCellValue === 0 ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{Array.isArray(renderedCellValue) ? (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{renderedCellValue?.length ? <Box sx={{ display: 'flex', alignItems: 'center', gap: 1, flexWrap: 'wrap' }}>\n\t\t\t\t\t\t\t\t\t\t\t{renderedCellValue.map((rcv) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype='normal'\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={column.custom_class ? column?.custom_class : (typeof rcv === 'string' ? rcv : '')}\n\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography type='s4' weight='medium' color={'inherit'}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{typeof rcv === 'object' ? _.get(rcv, column?.typeArrayAccessorKey || '', '') : rcv}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</Box> : '-'}\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\t\t\ttype='normal'\n\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\tcolumn.custom_class ? column?.custom_class :\n\t\t\t\t\t\t\t\t\t\t\t\t(statusClasses instanceof Function\n\t\t\t\t\t\t\t\t\t\t\t\t\t? statusClasses(row)\n\t\t\t\t\t\t\t\t\t\t\t\t\t: `${statusClasses}${getStatusClass(renderedCellValue)}`)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlabel={\n\n\t\t\t\t\t\t\t\t\t\t\t<Typography type='s4' weight='medium' color={'inherit'}>\n\t\t\t\t\t\t\t\t\t\t\t\t{renderedCellValue}\n\t\t\t\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t'-'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'boolean':\n\t\t\t\t\tv = (\n\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\ttype='normal'\n\t\t\t\t\t\t\t// active={Boolean(renderedCellValue)}\n\t\t\t\t\t\t\t// inActive={Boolean(!renderedCellValue)}\n\t\t\t\t\t\t\tsx={(theme) => ({\n\t\t\t\t\t\t\t\t...(renderedCellValue ?\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbackgroundColor: theme.palette?.theme.tertiary4[200],\n\t\t\t\t\t\t\t\t\t\tcolor: theme.palette?.theme.tertiary4[900]\n\t\t\t\t\t\t\t\t\t} :\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbackgroundColor: theme.palette?.theme.tertiary6[200],\n\t\t\t\t\t\t\t\t\t\tcolor: theme.palette?.theme.tertiary6[900]\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t<Typography type='s4' weight='medium' color={'inherit'}>\n\t\t\t\t\t\t\t\t\t{column?.typeBooleanLabels?.[renderedCellValue as keyof TypeBooleanLabels] || '-'}\n\t\t\t\t\t\t\t\t</Typography>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'jsonArray':\n\t\t\t\t\tv = jsonArrayToString(renderedCellValue);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'custom':\n\t\t\t\tcase 'custom_link':\n\t\t\t\t\tv = customizeValue?.(row, column.accessorKey, renderedCellValue);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'toFixed':\n\t\t\t\t\tv = toFixedWithNumbers(renderedCellValue)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Allow customizeValue to override any type's default rendering\n\t\t\t// if (customizeValue) {\n\t\t\t// \tconst customResult = customizeValue(row, column.accessorKey, renderedCellValue);\n\t\t\t// \tif (customResult !== undefined) {\n\t\t\t// \t\tv = customResult;\n\t\t\t// \t}\n\t\t\t// }\n\n\t\t\t// If redirectionPathWithId is provided, use it for URL parameter-based navigation\n\t\t\tif (redirectionPathWithId && column.type != 'custom_link') {\n\t\t\t\tconst id = row.original[idField || 'id'];\n\t\t\t\tif (id) {\n\t\t\t\t\tconst path = redirectionPathWithId instanceof Function ? generateRouteWithId(redirectionPathWithId(row), id?.toString()) : generateRouteWithId(redirectionPathWithId, id?.toString());\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Link to={path}>\n\t\t\t\t\t\t\t{v}\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Fall back to the existing redirection logic\n\t\t\telse if (redirectionLink && column.type != 'custom_link') {\n\t\t\t\tconst id = row.original[idField || 'id'];\n\t\t\t\tconst path = redirectionLink instanceof Function ? generateRouteWithId(redirectionLink(row), id?.toString()) : generateRouteWithId(redirectionLink, id?.toString());\n\t\t\t\treturn (\n\t\t\t\t\t<Link to={path}\n\t\t\t\t\t\tstate={redirectionLinkState?.(row)}>\n\t\t\t\t\t\t{v}\n\t\t\t\t\t</Link>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn v;\n\t\t},\n\t\t...(Boolean(enableFooter) && {\n\t\t\tFooter: ({ column }) => (\n\t\t\t\t<DefaultAggregation data={rows} column={String(column.id)} />\n\t\t\t)\n\t\t})\n\t}));\n};\n\nexport const renderEmptyRowsFallback = (text: string) => (\n\t<Box className='no-data'>\n\t\t<img src={images.common.tableNoData} />\n\t\t<Typography type='s3' weight='medium' color='theme.secondary.1000'>\n\t\t\t{text}\n\t\t</Typography>\n\t</Box>\n)\n\n/* eslint-disable no-mixed-spaces-and-tabs */\nexport const renderValueField = (label: string, value: any, t: any, formatFn?: (val: any) => string) => {\n\treturn (\n\t\t<ValueField key={label} label={t?.(label)}>\n\t\t\t{formatFn ? formatFn(value) : value ?? '-'}\n\t\t</ValueField>\n\t);\n};\n\nexport const formateValueByType = ({\n\tvalue,\n\ttype,\n\tformat,\n\tweight\n}: {\n\tvalue: any;\n\ttype: string;\n\tformat?: string;\n\tweight?: \"normal\" | \"medium\" | \"bold\";\n}) => {\n\tconst numberTypes = ['number', 'amount', 'toFixed'];\n\tconst valueCheck = [null, undefined, '0'];\n\tif (valueCheck.includes(value)) return <Typography type='s4' weight={weight} color='theme.neutral.1000'>{numberTypes?.includes(type) ? value : (value || '-')}</Typography>;\n\n\tswitch (type) {\n\t\tcase 'date':\n\t\t\treturn dayjs(value).isValid() ? formatDate(value, format) : value;\n\t\tcase 'toFixed':\n\t\t\treturn <Typography type='s4' weight={weight} color='theme.neutral.1000'>{value ? toFixedWithNumbers(Number(value)) : '-'}</Typography>;\n\t\tcase 'amount':\n\t\t\treturn <Typography type='s4' weight={weight} color='theme.neutral.1000'>{value ? formatAmountWithCurrency(Number(value)) : '-'}</Typography>;\n\t\tdefault:\n\t\t\treturn weight ? <Typography type='s4' weight={weight} color='theme.neutral.1000'>{value || '-'}</Typography> : value || '-';\n\t}\n};\n\n\nconst setCompany = (value: any) => {\n\tconst { user } = useAuth();\n\treturn {\n\t\tvalue: user?.company_id,\n\t\toptions: [{\n\t\t\tlabel: user?.company_data?.name,\n\t\t\tvalue: user?.company_id\n\t\t}]\n\t}\n}\nexport const configMapper = {\n\t'company': {\n\t\tcallBack: setCompany,\n\n\t}\n}\n","type ItemType = {\n section_name: any;\n is_system_field: boolean;\n field_type: string;\n label: string;\n name?: string;\n placeholder: string;\n default_value: any;\n validation: any[];\n is_multiline: any;\n section_order: any;\n option?: any;\n time_format?: string;\n currency?: string;\n field_properties: {\n is_accordion?: boolean;\n float_step?: any;\n options: any;\n is_multiselect: any;\n title: string;\n title_position: \"start\" | \"end\";\n is_multiline: boolean\n is_checked: boolean\n table: string,\n table_columns: string[]\n table_rows?: any\n is_multiple: boolean\n enable_footer?: boolean\n footer_action?: 'add'\n other_buttons?: React.ReactNode[]\n };\n is_section_field?: true;\n section_type?: \"default\" | \"Form switcher section\";\n form_switcher_label?: string;\n form_switcher_name?: string;\n switcher_forms?: {\n value?: string;\n name?: string;\n id?: number;\n }[];\n is_accordion?: boolean;\n}\n\nconst getFirstNonSectionField = (formData: any[]) => {\n const firstField = formData?.find((field) => !field.is_section_field)\n return firstField\n}\n\nconst formBuilderDeConversion = (formData: any) => {\n const outputData: any = {};\n if (formData.length === 0) {\n return outputData;\n }\n\n const firstItem = getFirstNonSectionField(formData);\n\n if (firstItem?.tab_name) {\n outputData.tab = <any>[];\n let currentTab: {\n title: string;\n data: any;\n remove_tab?: any;\n tab_order?: any;\n } | null = null;\n let currentSection: {\n label: string;\n members: any;\n remove_section: any;\n field_type?: string;\n is_accordion?: boolean;\n } | null = null;\n let otherSectionDetails: any = {}\n let sectionOrder: any = null\n\n formData.forEach((item: any) => {\n if (item?.is_section_field) {\n otherSectionDetails = {\n field_type: item?.field_type,\n label: item?.label,\n is_accordion: item?.is_accordion,\n is_section_field: item?.is_section_field,\n section_type: item?.section_type,\n form_switcher_label: item?.form_switcher_label,\n form_switcher_name: item?.form_switcher_name,\n switcher_forms: item?.switcher_forms,\n disabled: Boolean(item?.disabled)\n }\n currentSection = null\n sectionOrder = sectionOrder++\n } else {\n if (!currentTab || currentTab.title !== item.tab_name) {\n\n currentTab = {\n tab_order: item.tab_order || 1,\n title: item.tab_name,\n data: [],\n };\n const checkIfTabExist = outputData.tab.find(tab => tab.title === currentTab?.title)\n\n if (!checkIfTabExist) {\n outputData.tab.push(currentTab);\n } else {\n currentTab = checkIfTabExist\n }\n currentSection = null;\n }\n\n if (!currentSection || currentSection.label !== item.section_name || sectionOrder !== item.section_order) {\n currentSection = {\n field_type: \"section\",\n label: item.section_name || \"\",\n is_accordion: item.field_properties?.is_accordion,\n members: [],\n remove_section: item.is_system_field === true ? true : false,\n };\n\n const checkIfSectionExist = currentTab.data.find(section => section.label === currentSection?.label)\n if (!checkIfSectionExist) {\n // Merge section details and update currentSection reference to the actual pushed object\n currentSection = { ...otherSectionDetails, ...currentSection };\n currentTab.data.push(currentSection);\n } else {\n currentSection = checkIfSectionExist\n }\n otherSectionDetails = null\n }\n sectionOrder = item.section_order\n\n const thenValidations = item?.validation?.find((v: { type: string }) => v.type === \"when\")?.thenValidations || []\n\n const member = {\n ...item,\n id: `${Date.now()}-${Math.random()}`,\n field_type:\n item.field_type === \"media\" ? \"file\" : item.field_type || \"text\",\n type: item.is_system_field ? \"system\" : \"custom\",\n label: item.label || \"\",\n placeholder: item.placeholder || \"\",\n default_value: item.default_value || \"\",\n ...(item?.time_format &&\n item?.field_type === \"time\" && { option: item?.time_format }),\n ...(item?.currency &&\n item?.field_type === \"currency\" && { option: item?.currency }),\n ...(item.field_type === \"text\" && {\n min_length:\n item.validation.find(\n (v: { type: string }) => v.type === \"min_length\",\n )?.value || null,\n }),\n ...(item.field_type === \"text\" && {\n max_length:\n item.validation.find(\n (v: { type: string }) => v.type === \"max_length\",\n )?.value || null,\n }),\n ...(item.field_type === \"number\" && {\n min_length:\n item.validation.find((v: { type: string }) => v.type === \"min_val\")\n ?.value || null,\n }),\n ...(item.field_type === \"number\" && {\n max_length:\n item.validation.find((v: { type: string }) => v.type === \"max_val\")\n ?.value || null,\n }),\n ...((item.is_multiline !== undefined || item.field_properties.is_multiline !== undefined) && {\n is_multiline: item.is_multiline || item.field_properties.is_multiline,\n }),\n is_required:\n item.validation.find((v: { type: string }) => v.type === \"required\")?.value ||\n thenValidations?.find((v: { type: string }) => v.type === \"required\")?.value ||\n false,\n is_unique:\n item.validation.find((v: { type: string }) => v.type === \"unique\")\n ?.value || false,\n section_order: item.section_order || 0,\n ...(item.field_properties.float_step && {\n float_step: item.field_properties.float_step.toString(),\n }),\n ...(item.field_properties.options && {\n options: item.field_properties.options,\n }),\n ...(item.field_properties.is_multiselect !== undefined && {\n is_multiselect: item.field_properties.is_multiselect,\n }),\n ...(item.field_properties?.enable_footer !== undefined && {\n enable_footer: Boolean(item.field_properties.enable_footer),\n }),\n ...(item.field_properties?.footer_action !== undefined && {\n footer_action: item.field_properties.footer_action || 'add',\n }),\n ...(item.field_type === \"date\" && {\n is_future_dates_allowed:\n item.validation.find(\n (v: { type: string }) => v.type === \"is_future_dates_allowed\",\n )?.value || null,\n }),\n ...(item.field_type === \"date\" && {\n is_past_dates_allowed:\n item.validation.find(\n (v: { type: string }) => v.type === \"is_past_dates_allowed\",\n )?.value || null,\n }),\n ...((item.field_type === \"image\" || item.field_type === \"media\" || item.field_type === \"file\") && {\n max_size:\n item.validation.find(\n (v: { type: string }) => v.type === \"max_file_size\",\n )?.value || undefined,\n is_multiple: item.field_properties?.is_multiple\n }),\n ...((item.field_type === \"toggleButton\" || item.field_type === \"checkbox\" || item.field_type === \"radioButton\") && {\n title: item.field_properties?.title ? item.field_properties?.title : '',\n title_position: item.field_properties?.title_position ?? \"end\",\n is_checked: item.field_properties?.is_checked\n }),\n ...((item.field_type === \"table\") && {\n table: item.field_properties?.table,\n table_columns: convertTableColumns(item.field_properties?.table_columns),\n table_rows: item.field_properties?.table_rows,\n otherButtons: item.field_properties?.other_buttons || []\n }),\n };\n if (currentSection) {\n currentSection.members.push(member);\n if (\n currentSection.members.some((member: any) => member.type === \"system\")\n ) {\n currentSection.remove_section = true;\n } else {\n currentSection.remove_section = false;\n }\n currentTab.remove_tab = currentTab.data.some(\n (section: { members: any[] }) =>\n section.members.some(\n (member: { type: string }) => member.type === \"system\",\n ),\n );\n }\n }\n });\n } else {\n // Convert to sections format\n outputData.section = [];\n let currentSection: {\n label: any;\n members: any;\n remove_section: any;\n field_type?: string;\n is_accordion?: boolean;\n } | null = null;\n let otherSectionDetails: any = {}\n let sectionOrder: any = null\n\n formData.forEach(\n (item: ItemType) => {\n if (item.is_section_field) {\n otherSectionDetails = {\n field_type: item?.field_type,\n label: item?.label,\n is_accordion: item?.is_accordion,\n is_section_field: item?.is_section_field,\n section_type: item?.section_type,\n form_switcher_label: item?.form_switcher_label,\n form_switcher_name: item?.form_switcher_name,\n switcher_forms: item?.switcher_forms,\n disabled: Boolean(item?.disabled)\n }\n sectionOrder = sectionOrder++\n currentSection = null\n } else {\n if (!currentSection || currentSection.label !== item.section_name || sectionOrder !== item.section_order) {\n currentSection = {\n field_type: \"section\",\n label: item.section_name || \"\",\n is_accordion: item.field_properties?.is_accordion,\n members: [],\n remove_section: item.is_system_field === true ? true : false,\n };\n\n const checkIfSectionExist = outputData?.section?.find(section => section.label === currentSection?.label)\n if (!checkIfSectionExist) {\n // Merge section details and update currentSection reference to the actual pushed object\n currentSection = { ...otherSectionDetails, ...currentSection };\n outputData.section.push(currentSection);\n } else {\n currentSection = checkIfSectionExist\n }\n\n // outputData.section.push({ ...otherSectionDetails, ...currentSection });\n\n otherSectionDetails = null\n }\n sectionOrder = item.section_order\n\n const thenValidations = item?.validation?.find((v: { type: string }) => v.type === \"when\")?.thenValidations || []\n\n const member = {\n ...item,\n id: `${Date.now()}-${Math.random()}`,\n field_type:\n item.field_type === \"media\" ? \"file\" : item.field_type || \"text\",\n type: item.is_system_field ? \"system\" : \"custom\",\n label: item.label,\n placeholder: item.placeholder || \"\",\n default_value: item.default_value || \"\",\n ...(item?.time_format &&\n item?.field_type === \"time\" && { option: item?.time_format }),\n ...(item?.currency &&\n item?.field_type === \"currency\" && { option: item?.currency }),\n ...(item.field_type === \"text\" && {\n min_length:\n item.validation.find(\n (v: { type: string }) => v.type === \"min_length\",\n )?.value || null,\n }),\n ...(item.field_type === \"text\" && {\n max_length:\n item.validation.find(\n (v: { type: string }) => v.type === \"max_length\",\n )?.value || null,\n }),\n ...(item.field_type === \"number\" && {\n min_length:\n item.validation.find(\n (v: { type: string }) => v.type === \"min_val\",\n )?.value || null,\n }),\n ...(item.field_type === \"number\" && {\n max_length:\n item.validation.find(\n (v: { type: string }) => v.type === \"max_val\",\n )?.value || null,\n }),\n ...((item.is_multiline !== undefined || item.field_properties?.is_multiline !== undefined) && {\n is_multiline: item.is_multiline || item.field_properties.is_multiline,\n }),\n is_required:\n item.validation.find((v: { type: string }) => v.type === \"required\")?.value ||\n thenValidations?.find((v: { type: string }) => v.type === \"required\")?.value ||\n false,\n is_unique:\n item.validation.find((v: { type: string }) => v.type === \"unique\")\n ?.value || false,\n section_order: item.section_order || 0,\n ...(item.field_properties?.float_step && {\n float_step: Number(item.field_properties.float_step),\n }),\n ...(item.field_properties?.options && {\n options: item.field_properties.options,\n }),\n ...(item.field_properties?.is_multiselect !== undefined && {\n is_multiselect: item.field_properties.is_multiselect,\n }),\n ...(item.field_properties?.enable_footer !== undefined && {\n enable_footer: Boolean(item.field_properties.enable_footer),\n }),\n ...(item.field_properties?.footer_action !== undefined && {\n footer_action: item.field_properties.footer_action || 'add',\n }),\n ...(item.field_type === \"date\" && {\n is_future_dates_allowed:\n item.validation.find(\n (v: { type: string }) => v.type === \"is_future_dates_allowed\",\n )?.value || null,\n }),\n ...(item.field_type === \"date\" && {\n is_past_dates_allowed:\n item.validation.find(\n (v: { type: string }) => v.type === \"is_past_dates_allowed\",\n )?.value || null,\n }),\n ...((item.field_type === \"image\" || item.field_type === \"media\" || item.field_type === \"file\") && {\n max_size:\n item.validation.find(\n (v: { type: string }) => v.type === \"max_file_size\",\n )?.value || undefined,\n is_multiple: item.field_properties?.is_multiple\n }),\n ...((item.field_type === \"toggleButton\" || item.field_type === \"checkbox\") && {\n title: item.field_properties?.title ? item.field_properties?.title : item.label,\n title_position: item.field_properties?.title_position ?? \"end\",\n is_checked: item.field_properties?.is_checked\n }),\n ...((item.field_type === \"table\") && {\n table: item.field_properties?.table,\n table_columns: convertTableColumns(item.field_properties?.table_columns),\n table_rows: item.field_properties?.table_rows,\n otherButtons: item.field_properties?.other_buttons || []\n }),\n };\n\n currentSection.members.push(member);\n if (\n currentSection.members.some((member: any) => member.type === \"system\")\n ) {\n currentSection.remove_section = true;\n } else {\n currentSection.remove_section = false;\n }\n }\n }\n );\n }\n\n return outputData;\n};\n\n\n\nfunction formatText(key: string): string {\n return key ? key\n .split(/[:_-]/)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(\" \") : key;\n}\n\nexport const convertTableColumns = (columns: string[]) => {\n if (!Array.isArray(columns)) return [];\n\n return columns.map(column => {\n if (typeof column === 'object') {\n return { ...column }\n } else {\n const colArr = column.split(\".\").filter(str => str)\n const header = colArr.length ? (colArr.length > 1 ? formatText(colArr[colArr.length - 1]) : formatText(colArr[0])) : \"-\"\n\n return {\n header,\n accessorKey: column,\n visible: true,\n }\n }\n })\n}\n\nexport default formBuilderDeConversion;\n"],"names":["styled","MUIMenu","jsx","Fragment","sum","useEffect","jsxs","Typography","MenuItem","MUIChip","Box","Document","defaultCurrencyFormat","toFixedWithNumbers","formatLabel","formatDate","defaultCurrencySymbol","formatAmount","_a","_b","_c","_d","generateRouteWithId","Link","column","images","formatAmountWithCurrency","useAuth","member"],"mappings":";;;;;;;;;;;;;AAEA,MAAM,aAAaA,SAAA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ClC,OAAO;AACL,2BAAe,iBAAiB;AAAA,UAClC;AAAA,QACF;AAAA,MACF;AAAA,IAAA;AAAA,EAEJ;AAEA,SAAO;AACT;AAIA,SAAS,WAAW,KAAqB;AACvC,SAAO,MAAM,IACV,MAAM,OAAO,EACb,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,EAAE,YAAA,IAAgB,KAAK,MAAM,CAAC,CAAC,EAC1D,KAAK,GAAG,IAAI;AACjB;AAEO,MAAM,sBAAsB,CAAC,YAAsB;AACxD,MAAI,CAAC,MAAM,QAAQ,OAAO,UAAU,CAAA;AAEpC,SAAO,QAAQ,IAAI,CAAA,WAAU;AAC3B,QAAI,OAAO,WAAW,UAAU;AAC9B,aAAO,EAAE,GAAG,OAAA;AAAA,IACd,OAAO;AACL,YAAM,SAAS,OAAO,MAAM,GAAG,EAAE,OAAO,SAAO,GAAG;AAClD,YAAM,SAAS,OAAO,SAAU,OAAO,SAAS,IAAI,WAAW,OAAO,OAAO,SAAS,CAAC,CAAC,IAAI,WAAW,OAAO,CAAC,CAAC,IAAK;AAErH,aAAO;AAAA,QACL;AAAA,QACA,aAAa;AAAA,QACb,SAAS;AAAA,MAAA;AAAA,IAEb;AAAA,EACF,CAAC;AACH;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "./jsx-runtime-ClFauRgV.esm.js";
|
|
2
|
-
import { f as Box, a as AppBarWrapper, A as ActivityArea } from "./appbar-
|
|
2
|
+
import { f as Box, a as AppBarWrapper, A as ActivityArea } from "./appbar-jwyLUzHp.esm.js";
|
|
3
3
|
import { d as drawerWidth } from "./mui.constants-BFBzxaiA.esm.js";
|
|
4
|
-
import { C as CssBaseline } from "./CssBaseline-
|
|
4
|
+
import { C as CssBaseline } from "./CssBaseline-GdktO2pw.esm.js";
|
|
5
5
|
const FullscreenLayout = (props) => {
|
|
6
6
|
const { children } = props;
|
|
7
7
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { sx: { display: "flex" }, children: [
|
|
@@ -13,4 +13,4 @@ const FullscreenLayout = (props) => {
|
|
|
13
13
|
export {
|
|
14
14
|
FullscreenLayout as F
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=fullScreen-
|
|
16
|
+
//# sourceMappingURL=fullScreen-LwKF0Wcm.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullScreen-
|
|
1
|
+
{"version":3,"file":"fullScreen-LwKF0Wcm.esm.js","sources":["../../src/layout/fullScreen/fullScreen.tsx"],"sourcesContent":["import CssBaseline from '@mui/material/CssBaseline';\nimport Box from '@mui/material/Box';\n\nimport AppBar from '../../components/appbar/appbar';\nimport ActivityArea from '../../components/activityArea/activityArea';\n\nimport drawerWidth from '../../constants/mui.constants';\n\nexport interface IFullscreenLayoutProps {\n children: React.ReactNode;\n}\n\nexport const FullscreenLayout = (props: IFullscreenLayoutProps) => {\n\tconst { children } = props;\n\treturn (\n\t\t<Box sx={{ display: 'flex' }}>\n\t\t\t<CssBaseline />\n\t\t\t<AppBar width={drawerWidth} />\n\t\t\t<ActivityArea>{children}</ActivityArea>\n\t\t</Box>\n\t);\n};\n\nexport default FullscreenLayout;\n"],"names":["jsx","AppBar"],"mappings":";;;;AAYO,MAAM,mBAAmB,CAAC,UAAkC;AAClE,QAAM,EAAE,aAAa;AACrB,gDACE,KAAA,EAAI,IAAI,EAAE,SAAS,UACnB,UAAA;AAAA,IAAAA,kCAAAA,IAAC,aAAA,EAAY;AAAA,IACbA,kCAAAA,IAACC,eAAA,EAAO,OAAO,YAAA,CAAa;AAAA,IAC5BD,sCAAC,gBAAc,SAAA,CAAS;AAAA,EAAA,GACzB;AAEF;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("./jsx-runtime-B6vEU3CM.js");
|
|
3
|
-
const appbar = require("./appbar-
|
|
3
|
+
const appbar = require("./appbar-DhZRcO79.js");
|
|
4
4
|
const mui_constants = require("./mui.constants-CJEIUmWO.js");
|
|
5
|
-
const CssBaseline = require("./CssBaseline-
|
|
5
|
+
const CssBaseline = require("./CssBaseline-CaG36t1j.js");
|
|
6
6
|
const FullscreenLayout = (props) => {
|
|
7
7
|
const { children } = props;
|
|
8
8
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(appbar.Box, { sx: { display: "flex" }, children: [
|
|
@@ -12,4 +12,4 @@ const FullscreenLayout = (props) => {
|
|
|
12
12
|
] });
|
|
13
13
|
};
|
|
14
14
|
exports.FullscreenLayout = FullscreenLayout;
|
|
15
|
-
//# sourceMappingURL=fullScreen-
|
|
15
|
+
//# sourceMappingURL=fullScreen-twu05Zih.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullScreen-
|
|
1
|
+
{"version":3,"file":"fullScreen-twu05Zih.js","sources":["../../src/layout/fullScreen/fullScreen.tsx"],"sourcesContent":["import CssBaseline from '@mui/material/CssBaseline';\nimport Box from '@mui/material/Box';\n\nimport AppBar from '../../components/appbar/appbar';\nimport ActivityArea from '../../components/activityArea/activityArea';\n\nimport drawerWidth from '../../constants/mui.constants';\n\nexport interface IFullscreenLayoutProps {\n children: React.ReactNode;\n}\n\nexport const FullscreenLayout = (props: IFullscreenLayoutProps) => {\n\tconst { children } = props;\n\treturn (\n\t\t<Box sx={{ display: 'flex' }}>\n\t\t\t<CssBaseline />\n\t\t\t<AppBar width={drawerWidth} />\n\t\t\t<ActivityArea>{children}</ActivityArea>\n\t\t</Box>\n\t);\n};\n\nexport default FullscreenLayout;\n"],"names":["Box","jsx","CssBaseline","AppBar","drawerWidth","ActivityArea"],"mappings":";;;;;AAYO,MAAM,mBAAmB,CAAC,UAAkC;AAClE,QAAM,EAAE,aAAa;AACrB,2DACEA,OAAAA,KAAA,EAAI,IAAI,EAAE,SAAS,UACnB,UAAA;AAAA,IAAAC,2BAAAA,kBAAAA,IAACC,YAAAA,aAAA,EAAY;AAAA,IACbD,2BAAAA,kBAAAA,IAACE,OAAAA,eAAA,EAAO,OAAOC,cAAAA,YAAA,CAAa;AAAA,IAC5BH,iDAACI,OAAAA,gBAAc,SAAA,CAAS;AAAA,EAAA,GACzB;AAEF;;"}
|
|
@@ -439,70 +439,77 @@ function requireReactPropTypesSecret() {
|
|
|
439
439
|
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
440
440
|
return ReactPropTypesSecret_1;
|
|
441
441
|
}
|
|
442
|
-
var has
|
|
442
|
+
var has;
|
|
443
443
|
var hasRequiredHas;
|
|
444
444
|
function requireHas() {
|
|
445
|
-
if (hasRequiredHas) return has
|
|
445
|
+
if (hasRequiredHas) return has;
|
|
446
446
|
hasRequiredHas = 1;
|
|
447
|
-
has
|
|
448
|
-
return has
|
|
449
|
-
}
|
|
450
|
-
var
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
var
|
|
456
|
-
printWarning = function(text) {
|
|
457
|
-
var message = "Warning: " + text;
|
|
458
|
-
if (typeof console !== "undefined") {
|
|
459
|
-
console.error(message);
|
|
460
|
-
}
|
|
461
|
-
try {
|
|
462
|
-
throw new Error(message);
|
|
463
|
-
} catch (x) {
|
|
464
|
-
}
|
|
447
|
+
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
448
|
+
return has;
|
|
449
|
+
}
|
|
450
|
+
var checkPropTypes_1;
|
|
451
|
+
var hasRequiredCheckPropTypes;
|
|
452
|
+
function requireCheckPropTypes() {
|
|
453
|
+
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
454
|
+
hasRequiredCheckPropTypes = 1;
|
|
455
|
+
var printWarning = function() {
|
|
465
456
|
};
|
|
466
|
-
}
|
|
467
|
-
function checkPropTypes(typeSpecs, values2, location, componentName, getStack) {
|
|
468
457
|
if (process.env.NODE_ENV !== "production") {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
458
|
+
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
459
|
+
var loggedTypeFailures = {};
|
|
460
|
+
var has2 = requireHas();
|
|
461
|
+
printWarning = function(text) {
|
|
462
|
+
var message = "Warning: " + text;
|
|
463
|
+
if (typeof console !== "undefined") {
|
|
464
|
+
console.error(message);
|
|
465
|
+
}
|
|
466
|
+
try {
|
|
467
|
+
throw new Error(message);
|
|
468
|
+
} catch (x) {
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
function checkPropTypes(typeSpecs, values2, location, componentName, getStack) {
|
|
473
|
+
if (process.env.NODE_ENV !== "production") {
|
|
474
|
+
for (var typeSpecName in typeSpecs) {
|
|
475
|
+
if (has2(typeSpecs, typeSpecName)) {
|
|
476
|
+
var error;
|
|
477
|
+
try {
|
|
478
|
+
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
479
|
+
var err = Error(
|
|
480
|
+
(componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
481
|
+
);
|
|
482
|
+
err.name = "Invariant Violation";
|
|
483
|
+
throw err;
|
|
484
|
+
}
|
|
485
|
+
error = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
486
|
+
} catch (ex) {
|
|
487
|
+
error = ex;
|
|
488
|
+
}
|
|
489
|
+
if (error && !(error instanceof Error)) {
|
|
490
|
+
printWarning(
|
|
491
|
+
(componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
495
|
+
loggedTypeFailures[error.message] = true;
|
|
496
|
+
var stack = getStack ? getStack() : "";
|
|
497
|
+
printWarning(
|
|
498
|
+
"Failed " + location + " type: " + error.message + (stack != null ? stack : "")
|
|
476
499
|
);
|
|
477
|
-
err.name = "Invariant Violation";
|
|
478
|
-
throw err;
|
|
479
500
|
}
|
|
480
|
-
error = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
481
|
-
} catch (ex) {
|
|
482
|
-
error = ex;
|
|
483
|
-
}
|
|
484
|
-
if (error && !(error instanceof Error)) {
|
|
485
|
-
printWarning(
|
|
486
|
-
(componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
487
|
-
);
|
|
488
|
-
}
|
|
489
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
490
|
-
loggedTypeFailures[error.message] = true;
|
|
491
|
-
var stack = getStack ? getStack() : "";
|
|
492
|
-
printWarning(
|
|
493
|
-
"Failed " + location + " type: " + error.message + (stack != null ? stack : "")
|
|
494
|
-
);
|
|
495
501
|
}
|
|
496
502
|
}
|
|
497
503
|
}
|
|
498
504
|
}
|
|
505
|
+
checkPropTypes.resetWarningCache = function() {
|
|
506
|
+
if (process.env.NODE_ENV !== "production") {
|
|
507
|
+
loggedTypeFailures = {};
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
checkPropTypes_1 = checkPropTypes;
|
|
511
|
+
return checkPropTypes_1;
|
|
499
512
|
}
|
|
500
|
-
checkPropTypes.resetWarningCache = function() {
|
|
501
|
-
if (process.env.NODE_ENV !== "production") {
|
|
502
|
-
loggedTypeFailures = {};
|
|
503
|
-
}
|
|
504
|
-
};
|
|
505
|
-
var checkPropTypes_1 = checkPropTypes;
|
|
506
513
|
var factoryWithTypeCheckers;
|
|
507
514
|
var hasRequiredFactoryWithTypeCheckers;
|
|
508
515
|
function requireFactoryWithTypeCheckers() {
|
|
@@ -511,12 +518,12 @@ function requireFactoryWithTypeCheckers() {
|
|
|
511
518
|
var ReactIs = requireReactIs();
|
|
512
519
|
var assign2 = requireObjectAssign();
|
|
513
520
|
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
514
|
-
var
|
|
515
|
-
var
|
|
516
|
-
var
|
|
521
|
+
var has2 = requireHas();
|
|
522
|
+
var checkPropTypes = requireCheckPropTypes();
|
|
523
|
+
var printWarning = function() {
|
|
517
524
|
};
|
|
518
525
|
if (process.env.NODE_ENV !== "production") {
|
|
519
|
-
|
|
526
|
+
printWarning = function(text) {
|
|
520
527
|
var message = "Warning: " + text;
|
|
521
528
|
if (typeof console !== "undefined") {
|
|
522
529
|
console.error(message);
|
|
@@ -593,7 +600,7 @@ function requireFactoryWithTypeCheckers() {
|
|
|
593
600
|
var cacheKey = componentName + ":" + propName;
|
|
594
601
|
if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
595
602
|
manualPropTypeWarningCount < 3) {
|
|
596
|
-
|
|
603
|
+
printWarning(
|
|
597
604
|
"You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
598
605
|
);
|
|
599
606
|
manualPropTypeCallCache[cacheKey] = true;
|
|
@@ -692,11 +699,11 @@ function requireFactoryWithTypeCheckers() {
|
|
|
692
699
|
if (!Array.isArray(expectedValues)) {
|
|
693
700
|
if (process.env.NODE_ENV !== "production") {
|
|
694
701
|
if (arguments.length > 1) {
|
|
695
|
-
|
|
702
|
+
printWarning(
|
|
696
703
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
697
704
|
);
|
|
698
705
|
} else {
|
|
699
|
-
|
|
706
|
+
printWarning("Invalid argument supplied to oneOf, expected an array.");
|
|
700
707
|
}
|
|
701
708
|
}
|
|
702
709
|
return emptyFunctionThatReturnsNull;
|
|
@@ -730,7 +737,7 @@ function requireFactoryWithTypeCheckers() {
|
|
|
730
737
|
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
|
|
731
738
|
}
|
|
732
739
|
for (var key in propValue) {
|
|
733
|
-
if (
|
|
740
|
+
if (has2(propValue, key)) {
|
|
734
741
|
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
735
742
|
if (error instanceof Error) {
|
|
736
743
|
return error;
|
|
@@ -743,13 +750,13 @@ function requireFactoryWithTypeCheckers() {
|
|
|
743
750
|
}
|
|
744
751
|
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
745
752
|
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
746
|
-
process.env.NODE_ENV !== "production" ?
|
|
753
|
+
process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
|
|
747
754
|
return emptyFunctionThatReturnsNull;
|
|
748
755
|
}
|
|
749
756
|
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
750
757
|
var checker = arrayOfTypeCheckers[i];
|
|
751
758
|
if (typeof checker !== "function") {
|
|
752
|
-
|
|
759
|
+
printWarning(
|
|
753
760
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
|
|
754
761
|
);
|
|
755
762
|
return emptyFunctionThatReturnsNull;
|
|
@@ -763,7 +770,7 @@ function requireFactoryWithTypeCheckers() {
|
|
|
763
770
|
if (checkerResult == null) {
|
|
764
771
|
return null;
|
|
765
772
|
}
|
|
766
|
-
if (checkerResult.data &&
|
|
773
|
+
if (checkerResult.data && has2(checkerResult.data, "expectedType")) {
|
|
767
774
|
expectedTypes.push(checkerResult.data.expectedType);
|
|
768
775
|
}
|
|
769
776
|
}
|
|
@@ -817,7 +824,7 @@ function requireFactoryWithTypeCheckers() {
|
|
|
817
824
|
var allKeys = assign2({}, props[propName], shapeTypes);
|
|
818
825
|
for (var key in allKeys) {
|
|
819
826
|
var checker = shapeTypes[key];
|
|
820
|
-
if (
|
|
827
|
+
if (has2(shapeTypes, key) && typeof checker !== "function") {
|
|
821
828
|
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
822
829
|
}
|
|
823
830
|
if (!checker) {
|
|
@@ -939,8 +946,8 @@ function requireFactoryWithTypeCheckers() {
|
|
|
939
946
|
}
|
|
940
947
|
return propValue.constructor.name;
|
|
941
948
|
}
|
|
942
|
-
ReactPropTypes.checkPropTypes =
|
|
943
|
-
ReactPropTypes.resetWarningCache =
|
|
949
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
950
|
+
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
944
951
|
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
945
952
|
return ReactPropTypes;
|
|
946
953
|
};
|
|
@@ -4227,4 +4234,4 @@ exports.styled = styled;
|
|
|
4227
4234
|
exports.styledEngine = styledEngine;
|
|
4228
4235
|
exports.unstable_createStyleFunctionSx = unstable_createStyleFunctionSx;
|
|
4229
4236
|
exports.useDefaultProps = useDefaultProps;
|
|
4230
|
-
//# sourceMappingURL=identifier-
|
|
4237
|
+
//# sourceMappingURL=identifier-BTBl-PeG.js.map
|