@erpsquad/common 1.9.98 → 1.9.99
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/{actionCreator-DmP63jZz.esm.js → actionCreator-C-u8gtV-.esm.js} +2 -2
- package/dist/chunks/{actionCreator-DmP63jZz.esm.js.map → actionCreator-C-u8gtV-.esm.js.map} +1 -1
- package/dist/chunks/{actionCreator-DwRQnQNP.js → actionCreator-DSrKE0hh.js} +2 -2
- package/dist/chunks/{actionCreator-DwRQnQNP.js.map → actionCreator-DSrKE0hh.js.map} +1 -1
- package/dist/chunks/{android-12-switch-C3WlgdKQ.esm.js → android-12-switch-DSBIf4t0.esm.js} +39 -33
- package/dist/chunks/android-12-switch-DSBIf4t0.esm.js.map +1 -0
- package/dist/chunks/{android-12-switch-CVH-tc4s.js → android-12-switch-DvCF0gyx.js} +39 -33
- package/dist/chunks/android-12-switch-DvCF0gyx.js.map +1 -0
- package/dist/chunks/{apiHelper-DSbRnRC1.js → apiHelper-5tNsUtSY.js} +12 -9
- package/dist/chunks/apiHelper-5tNsUtSY.js.map +1 -0
- package/dist/chunks/{apiHelper-DOCeCGD-.esm.js → apiHelper-Cv_qWaYo.esm.js} +12 -9
- package/dist/chunks/apiHelper-Cv_qWaYo.esm.js.map +1 -0
- package/dist/chunks/{appbar-CrH_SjSo.esm.js → appbar-DM2iBqb4.esm.js} +4 -4
- package/dist/chunks/{appbar-CrH_SjSo.esm.js.map → appbar-DM2iBqb4.esm.js.map} +1 -1
- package/dist/chunks/{appbar-D6bWAv8x.js → appbar-rfkAYQdQ.js} +4 -4
- package/dist/chunks/{appbar-D6bWAv8x.js.map → appbar-rfkAYQdQ.js.map} +1 -1
- package/dist/chunks/{common-QvMCr1xx.js → common-6VUrYJDq.js} +10 -1
- package/dist/chunks/{common-QvMCr1xx.js.map → common-6VUrYJDq.js.map} +1 -1
- package/dist/chunks/{common-B-nmtH5r.esm.js → common-B6euWODJ.esm.js} +10 -1
- package/dist/chunks/{common-B-nmtH5r.esm.js.map → common-B6euWODJ.esm.js.map} +1 -1
- package/dist/chunks/{custom-editor-BvMlZ1Oc.js → custom-editor-DIQqk_yI.js} +2 -2
- package/dist/chunks/{custom-editor-BvMlZ1Oc.js.map → custom-editor-DIQqk_yI.js.map} +1 -1
- package/dist/chunks/{custom-editor-OrxKsIQY.esm.js → custom-editor-DnfTs5-j.esm.js} +2 -2
- package/dist/chunks/{custom-editor-OrxKsIQY.esm.js.map → custom-editor-DnfTs5-j.esm.js.map} +1 -1
- package/dist/chunks/{default-data-D1f8nbl6.esm.js → default-data-BV_r59U9.esm.js} +12 -12
- package/dist/chunks/{default-data-D1f8nbl6.esm.js.map → default-data-BV_r59U9.esm.js.map} +1 -1
- package/dist/chunks/{default-data-9-BQ_0wq.js → default-data-DQ7VPUoj.js} +12 -12
- package/dist/chunks/{default-data-9-BQ_0wq.js.map → default-data-DQ7VPUoj.js.map} +1 -1
- package/dist/chunks/{form-builder-conversion-Var45CEx.esm.js → form-builder-conversion-BdWASNEo.esm.js} +2 -2
- package/dist/chunks/{form-builder-conversion-Var45CEx.esm.js.map → form-builder-conversion-BdWASNEo.esm.js.map} +1 -1
- package/dist/chunks/{form-builder-conversion-nTpiw7Q2.js → form-builder-conversion-D69EGO5g.js} +2 -2
- package/dist/chunks/{form-builder-conversion-nTpiw7Q2.js.map → form-builder-conversion-D69EGO5g.js.map} +1 -1
- package/dist/chunks/{form-builder-deconversion-BjiEAt-i.esm.js → form-builder-deconversion-CUwBfP4C.esm.js} +3 -3
- package/dist/chunks/{form-builder-deconversion-BjiEAt-i.esm.js.map → form-builder-deconversion-CUwBfP4C.esm.js.map} +1 -1
- package/dist/chunks/{form-builder-deconversion-CFTqjOTb.js → form-builder-deconversion-v5GvXDZ9.js} +3 -3
- package/dist/chunks/{form-builder-deconversion-CFTqjOTb.js.map → form-builder-deconversion-v5GvXDZ9.js.map} +1 -1
- package/dist/chunks/{fullScreen-DSPrY2tY.esm.js → fullScreen-BO0UA3Zr.esm.js} +2 -2
- package/dist/chunks/{fullScreen-DSPrY2tY.esm.js.map → fullScreen-BO0UA3Zr.esm.js.map} +1 -1
- package/dist/chunks/{fullScreen-BtbOZq50.js → fullScreen-Bfrr-bT2.js} +2 -2
- package/dist/chunks/{fullScreen-BtbOZq50.js.map → fullScreen-Bfrr-bT2.js.map} +1 -1
- package/dist/chunks/{languageContext-s_EUKz_A.js → languageContext-BP7EvzMv.js} +3 -3
- package/dist/chunks/{languageContext-s_EUKz_A.js.map → languageContext-BP7EvzMv.js.map} +1 -1
- package/dist/chunks/{languageContext-CbCRCTbP.esm.js → languageContext-DM_LTp53.esm.js} +3 -3
- package/dist/chunks/{languageContext-CbCRCTbP.esm.js.map → languageContext-DM_LTp53.esm.js.map} +1 -1
- package/dist/chunks/{migration-utils-Bn35YUJM.esm.js → migration-utils-D9TSOBR0.esm.js} +2 -2
- package/dist/chunks/{migration-utils-Bn35YUJM.esm.js.map → migration-utils-D9TSOBR0.esm.js.map} +1 -1
- package/dist/chunks/{migration-utils-CmzV1tw3.js → migration-utils-DwLXzWtr.js} +2 -2
- package/dist/chunks/{migration-utils-CmzV1tw3.js.map → migration-utils-DwLXzWtr.js.map} +1 -1
- package/dist/chunks/{page-context-DATjzley.esm.js → page-context-B_wK6kLR.esm.js} +3 -3
- package/dist/chunks/{page-context-DATjzley.esm.js.map → page-context-B_wK6kLR.esm.js.map} +1 -1
- package/dist/chunks/{page-context-BKgBvHxw.js → page-context-h7LEMAG0.js} +3 -3
- package/dist/chunks/{page-context-BKgBvHxw.js.map → page-context-h7LEMAG0.js.map} +1 -1
- package/dist/chunks/{reducer-Gajha1Kz.esm.js → reducer-Bpuo5eq1.esm.js} +2 -2
- package/dist/chunks/{reducer-Gajha1Kz.esm.js.map → reducer-Bpuo5eq1.esm.js.map} +1 -1
- package/dist/chunks/{reducer-DGvVphqy.js → reducer-t-U331ho.js} +2 -2
- package/dist/chunks/{reducer-DGvVphqy.js.map → reducer-t-U331ho.js.map} +1 -1
- package/dist/chunks/{shareSlice-Cn2PGA6m.js → shareSlice-Br9IsR9k.js} +2 -2
- package/dist/chunks/{shareSlice-Cn2PGA6m.js.map → shareSlice-Br9IsR9k.js.map} +1 -1
- package/dist/chunks/{shareSlice-DGme6jBu.esm.js → shareSlice-CbG_VJcW.esm.js} +2 -2
- package/dist/chunks/{shareSlice-DGme6jBu.esm.js.map → shareSlice-CbG_VJcW.esm.js.map} +1 -1
- package/dist/chunks/{sidebar-D2Q9rQrz.js → sidebar-C2zkLZyA.js} +4 -4
- package/dist/chunks/{sidebar-D2Q9rQrz.js.map → sidebar-C2zkLZyA.js.map} +1 -1
- package/dist/chunks/{sidebar-gl6ML9FB.esm.js → sidebar-l49eLo8p.esm.js} +4 -4
- package/dist/chunks/{sidebar-gl6ML9FB.esm.js.map → sidebar-l49eLo8p.esm.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-57BCIH9V.esm.js → sidebarScreen-BQN2N8jx.esm.js} +5 -5
- package/dist/chunks/{sidebarScreen-57BCIH9V.esm.js.map → sidebarScreen-BQN2N8jx.esm.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-CnsblLHN.js → sidebarScreen-PoYXto7E.js} +5 -5
- package/dist/chunks/{sidebarScreen-CnsblLHN.js.map → sidebarScreen-PoYXto7E.js.map} +1 -1
- package/dist/chunks/{store-DEoLcgbp.js → store-BdrUnJ3G.js} +3 -3
- package/dist/chunks/{store-DEoLcgbp.js.map → store-BdrUnJ3G.js.map} +1 -1
- package/dist/chunks/{store-zDGOGRDm.esm.js → store-ksRZPIIc.esm.js} +3 -3
- package/dist/chunks/{store-zDGOGRDm.esm.js.map → store-ksRZPIIc.esm.js.map} +1 -1
- package/dist/chunks/{translations-BVvsrCTo.js → translations-1vp9srMj.js} +2 -2
- package/dist/chunks/{translations-BVvsrCTo.js.map → translations-1vp9srMj.js.map} +1 -1
- package/dist/chunks/{translations-DJFxXzIm.esm.js → translations-B5t-KZNN.esm.js} +2 -2
- package/dist/chunks/{translations-DJFxXzIm.esm.js.map → translations-B5t-KZNN.esm.js.map} +1 -1
- package/dist/chunks/{uom-field-wrapper-CzXOP8fb.esm.js → uom-field-wrapper-Ckop1JTE.esm.js} +13 -13
- package/dist/chunks/{uom-field-wrapper-CzXOP8fb.esm.js.map → uom-field-wrapper-Ckop1JTE.esm.js.map} +1 -1
- package/dist/chunks/{uom-field-wrapper-CjqCwlbR.js → uom-field-wrapper-l8HA79k1.js} +13 -13
- package/dist/chunks/{uom-field-wrapper-CjqCwlbR.js.map → uom-field-wrapper-l8HA79k1.js.map} +1 -1
- package/dist/chunks/{useAccountSetting-nBdUAbgS.esm.js → useAccountSetting-D6Hhq1Pz.esm.js} +3 -3
- package/dist/chunks/{useAccountSetting-nBdUAbgS.esm.js.map → useAccountSetting-D6Hhq1Pz.esm.js.map} +1 -1
- package/dist/chunks/{useAccountSetting-ChWinjqQ.js → useAccountSetting-ngzko7sX.js} +3 -3
- package/dist/chunks/{useAccountSetting-ChWinjqQ.js.map → useAccountSetting-ngzko7sX.js.map} +1 -1
- package/dist/chunks/{useAuth-BhsPEB2T.js → useAuth-HvZ6U960.js} +2 -2
- package/dist/chunks/{useAuth-BhsPEB2T.js.map → useAuth-HvZ6U960.js.map} +1 -1
- package/dist/chunks/{useAuth-C4WcddEE.esm.js → useAuth-Tfx2guEJ.esm.js} +2 -2
- package/dist/chunks/{useAuth-C4WcddEE.esm.js.map → useAuth-Tfx2guEJ.esm.js.map} +1 -1
- package/dist/chunks/{useLangauge-Bie5anLS.esm.js → useLangauge-BU_fP3ZM.esm.js} +2 -2
- package/dist/chunks/{useLangauge-Bie5anLS.esm.js.map → useLangauge-BU_fP3ZM.esm.js.map} +1 -1
- package/dist/chunks/{useLangauge-BtG3kyRv.js → useLangauge-DwsR1jcv.js} +2 -2
- package/dist/chunks/{useLangauge-BtG3kyRv.js.map → useLangauge-DwsR1jcv.js.map} +1 -1
- package/dist/chunks/{useReduxIntegration-D6MZKdkS.js → useReduxIntegration-JMVTp0lq.js} +4 -4
- package/dist/chunks/{useReduxIntegration-D6MZKdkS.js.map → useReduxIntegration-JMVTp0lq.js.map} +1 -1
- package/dist/chunks/{useReduxIntegration--sS2yQ4F.esm.js → useReduxIntegration-VgWJGErE.esm.js} +4 -4
- package/dist/chunks/{useReduxIntegration--sS2yQ4F.esm.js.map → useReduxIntegration-VgWJGErE.esm.js.map} +1 -1
- package/dist/components/index.esm.js +9 -9
- package/dist/components/index.js +9 -9
- 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/index.esm.js +24 -24
- package/dist/index.js +24 -24
- package/dist/layout/index.esm.js +2 -2
- package/dist/layout/index.js +2 -2
- package/dist/redux/index.esm.js +4 -4
- package/dist/redux/index.js +4 -4
- package/dist/src/utils/api.d.ts +10 -0
- package/dist/utils/api.d.ts +10 -0
- package/dist/utils/index.esm.js +7 -7
- package/dist/utils/index.js +6 -6
- package/dist/views/index.esm.js +8 -8
- package/dist/views/index.js +7 -7
- package/package.json +1 -1
- package/dist/chunks/android-12-switch-C3WlgdKQ.esm.js.map +0 -1
- package/dist/chunks/android-12-switch-CVH-tc4s.js.map +0 -1
- package/dist/chunks/apiHelper-DOCeCGD-.esm.js.map +0 -1
- package/dist/chunks/apiHelper-DSbRnRC1.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apiHelper-DOCeCGD-.esm.js","sources":["../../src/hooks/use-translations.ts","../../src/hooks/useDataFetcher.tsx","../../src/components/providers/ERPUIProvider.tsx","../../src/hooks/apiHelper.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n// import { useLocation } from 'react-router-dom'\nimport { getI18n, useTranslation } from 'react-i18next'\nimport { loadModuleTranslations } from '../utils/translations'\nimport modules from '../constants/modules'\nimport { useAuth } from './useAuth'\n\n// Global state to prevent duplicate calls across all hook instances\nlet globalLastLoadedModules = ''\nlet globalIsLoading = false\nlet globalInitialLoad = false\n\nexport const useAppTranslations = () => {\n\tconst [isLoading, setIsLoading] = useState(globalInitialLoad)\n\tconst location = window.location\n\tconst i18nInstance = getI18n()\n\tconst { user, loading } = useAuth()\n\tconst { t } = useTranslation()\n\n\tuseEffect(() => {\n\t\tconst erpModules = modules(t)\n\t\tconst currentPath = location.pathname.toLowerCase()\n\t\tif(user?.id && !loading) {\n\t\n\t\t\tconst matchedModule = erpModules.find(\n\t\t\t\t(mod) =>\n\t\t\t\t\tmod.link.toLowerCase() === currentPath ||\n\t\t\t\t\tmod.connectedRoutes?.some((route: string) => currentPath.startsWith(route.toLowerCase()))\n\t\t\t)\n\t\n\t\t\tlet modulesToLoad: string[] = []\n\t\n\t\t\tif (matchedModule?.translationModule) {\n\t\t\t\tmodulesToLoad = [...matchedModule.translationModule, 'common']\n\t\t\t} else if (!matchedModule && currentPath === '/dashboard') {\n\t\t\t\tmodulesToLoad = ['common']\n\t\t\t}\n\t\n\t\t\tif (modulesToLoad.length > 0) {\n\t\t\t\tconst moduleKey = [...modulesToLoad].sort().join(',')\n\t\n\t\t\t\t// Skip if same modules are already loaded or currently loading\n\t\t\t\tif (globalLastLoadedModules === moduleKey || globalIsLoading) {\n\t\t\t\t\tif (globalInitialLoad) {\n\t\t\t\t\t\tsetIsLoading(false)\n\t\t\t\t\t\tglobalInitialLoad = false\n\t\t\t\t\t}\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\n\t\t\t\tglobalIsLoading = true\n\t\t\t\tglobalLastLoadedModules = moduleKey\n\t\t\t\tsetIsLoading(true)\n\t\n\t\t\t\tloadModuleTranslations(modulesToLoad, i18nInstance).finally(() => {\n\t\t\t\t\tglobalIsLoading = false\n\t\t\t\t\tsetIsLoading(false)\n\t\t\t\t\tglobalInitialLoad = false\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\t// No modules to load, but still need to handle initial load state\n\t\t\t\tif (globalInitialLoad) {\n\t\t\t\t\tsetIsLoading(false)\n\t\t\t\t\tglobalInitialLoad = false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [location.pathname, t, user, loading])\n\n\treturn { isLoading }\n};\n\nexport default useAppTranslations;\n","import { useCallback, useState, useEffect } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { usePages } from './use-pages';\nimport { useLocation } from 'react-router-dom';\ninterface FilterParams {\n\tskip: number;\n\tlimit: number;\n\tsearch?: string;\n\tselect?: string;\n\torder?: string;\n\tfilters?: string;\n}\n\ninterface ActivePage {\n\tsort?: { id: string; desc: boolean };\n\tfilterQueryString?: string;\n\tsearch?: string;\n\tvisible_columns?: { visible: boolean; accessorKey: string }[];\n}\n\nconst useGenericDataFetcher = (\n\tcols?: ActivePage,\n\tpagination: { skip: number; limit: number },\n\tfetchAction: (filters: FilterParams) => void,\n\tcustomeFilter: any = '',\n\tcustomDeps?: any[],\n\tshowCreatedBy: boolean = true,\n\tcustomFields?: any = []\n) => {\n\tconst { activePage } = usePages();\n\tconst dispatch = useDispatch();\n\tconst location = useLocation();\n\n\tconst sourceColumns = Array.isArray(cols) ? cols?.filter((col: any) => col.visible) : activePage?.visible_columns;\n\n\tconst [trackedPath, setTrackedPath] = useState<string | null>(null);\n\tconst [trackedColumns, setTrackedColumns] = useState<any[]>([]);\n\n\tuseEffect(() => {\n\t\tif (trackedPath !== location?.pathname) {\n\t\t\tsetTrackedPath(location?.pathname);\n\t\t\tsetTrackedColumns([]);\n\t\t}\n\t}, [location?.pathname, trackedPath]);\n\n\tuseEffect(() => {\n\t\tif (trackedPath === location?.pathname && sourceColumns?.length > 0) {\n\t\t\tif (JSON.stringify(trackedColumns) !== JSON.stringify(sourceColumns)) {\n\t\t\t\tsetTrackedColumns(sourceColumns);\n\t\t\t}\n\t\t}\n\t}, [location?.pathname, trackedPath, sourceColumns]);\n\n\tconst getProcessedFilters = useCallback(() => {\n\t\tconst { filterQueryString } = activePage || {};\n\t\tconst queryString = filterQueryString?.replaceAll(/[()]/g, \"\") || '';\n\t\tconst extraQueryString = queryString.length ? `&${queryString}` : '';\n\t\tlet filters = customeFilter;\n\n\t\tif (extraQueryString) {\n\t\t\tfilters = filters ? `(${filters}${extraQueryString})` : `(${extraQueryString})`;\n\t\t} else if (filters) {\n\t\t\tfilters = `(${filters})`;\n\t\t}\n\n\t\treturn filters || undefined;\n\t\t//eslint-disable-next-line\n\t}, [activePage.filterQueryString, customeFilter]);\n\n\tconst fetchData = useCallback(() => {\n\t\tif (!fetchAction) {\n\t\t\treturn;\n\t\t}\n\t\tconst { sort = null, search } = activePage;\n\n\t\tif (!trackedColumns || trackedColumns.length === 0) return;\n\n\t\tconst filters = getProcessedFilters();\n\t\tconst visibleColumns = trackedColumns?.filter((vc) => vc.visible)\n\n\t\tconst selectPayload = visibleColumns?.length > 0 ? `[${visibleColumns\n\t\t\t?.map((item) =>\n\t\t\t\titem.accessorKey?.includes(\".\")\n\t\t\t\t\t? item.accessorKey.split(\".\")[0]\n\t\t\t\t\t: item.accessorKey\n\t\t\t)}${showCreatedBy ? ',created_at,created_by_data' : ''}${customFields?.length ? `,${customFields?.join(',')}` : ''}]` : undefined\n\t\tconst payload: FilterParams = {\n\t\t\tskip: activePage?.skip || pagination?.skip,\n\t\t\tlimit: pagination.limit,\n\t\t\tsearch,\n\t\t\tselect: selectPayload,\n\t\t\t...(sort && { order: `${sort.id}:${sort.desc ? -1 : 1}` }),\n\t\t\t...(filters && { filters }),\n\t\t};\n\n\t\tdispatch(fetchAction(payload));\n\t\t//eslint-disable-next-line\n\t}, [\n\t\ttrackedColumns,\n\t\tactivePage.sort,\n\t\tactivePage.filterQueryString,\n\t\tactivePage.search,\n\t\t// pagination?.skip,\n\t\tactivePage?.skip,\n\t\tpagination?.limit,\n\t\tdispatch,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t...(customDeps || []),\n\t]);\n\n\n\n\treturn fetchData;\n};\n\nexport default useGenericDataFetcher;\n","import React, { createContext, useContext, ReactNode, Suspense } from 'react';\nimport { Provider as ReduxProvider } from 'react-redux';\nimport { ThemeProvider } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport { SnackbarProvider } from 'notistack';\nimport { BrowserRouter } from 'react-router-dom';\nimport { createLibraryStore, ApiClientConfig } from '../../redux';\nimport { createLightTheme, createDarkTheme, Color } from '../../theme';\nimport { AuthProvider } from '../../contexts/AuthContext';\nimport { LanguageProvider } from '../../contexts/languageContext';\nimport { PageProvider } from '../../contexts/page-context';\nimport { PermissionsProvider } from '../../contexts/permission-context';\nimport MUIThemeWrapper from '../../theme/themeWrapper';\nimport Loader from '../loader';\nimport useAppTranslations from '../../hooks/use-translations';\nimport '../../utils/i18n';\nimport { initializeApiConfig, ApiConfig } from '../../utils/api-config';\nimport { initializeApiBaseUrls, extendApiConfigurations } from '../../utils/api';\nimport { setModuleRoutes } from '../../utils/module-routes-config';\n\n// Context for library configuration\ninterface ERPUIContextValue {\n useRedux: boolean;\n apiClient?: ApiClientConfig;\n theme?: any;\n themeMode: 'light' | 'dark';\n direction: 'ltr' | 'rtl';\n primaryColor?: Color;\n}\n\nconst ERPUIContext = createContext<ERPUIContextValue>({\n useRedux: false,\n themeMode: 'light',\n direction: 'ltr',\n});\n\nexport const useERPUI = () => useContext(ERPUIContext);\n\n// Provider props interface\ninterface ERPUIProviderProps {\n children: ReactNode;\n\n // Redux configuration\n useRedux?: boolean;\n reduxStore?: any;\n apiClient?: ApiClientConfig;\n additionalReducers?: Record<string, any>;\n\n // Theme configuration\n theme?: any;\n themeMode?: 'light' | 'dark';\n primaryColor?: Color;\n direction?: 'ltr' | 'rtl';\n\n // Context providers configuration\n enableAuth?: boolean;\n enableLanguage?: boolean;\n enablePages?: boolean;\n enablePermissions?: boolean;\n enableRouter?: boolean;\n enableSnackbar?: boolean;\n\n // Other configuration\n enableCssBaseline?: boolean;\n snackbarConfig?: {\n maxSnack?: number;\n anchorOrigin?: {\n vertical: 'top' | 'bottom';\n horizontal: 'left' | 'center' | 'right';\n };\n autoHideDuration?: number;\n };\n\n // API configuration\n apiConfig?: ApiConfig;\n\n // Additional API configurations to extend the shared apiConfigurations map\n additionalApiConfigurations?: Record<string, any>;\n\n // Module routes override — allows MFE apps to inject their own full route set\n // so the header module dropdown can match routes correctly.\n // Example: { hrms: Object.values(PathnameHrms).map(p => Pathname.DASHBOARD_HRMS + p) }\n moduleRoutes?: Record<string, string[]>;\n\n // Route maps\n routeToColumnsMap?: Record<string, any>;\n routeToResourceMap?: Record<string, any>;\n publicRoutes?: string[]; // Optional prop to allow customization of public routes in AuthProvider\n}\n\nexport const ERPUIProvider: React.FC<ERPUIProviderProps> = ({\n children,\n\n // Redux props\n useRedux = false,\n reduxStore,\n apiClient,\n additionalReducers = {},\n\n // Theme props\n theme: customTheme,\n themeMode = 'light',\n primaryColor,\n direction = 'ltr',\n\n // Context providers configuration\n enableAuth = true,\n enableLanguage = true,\n enablePages = true,\n enablePermissions = true,\n enableRouter = false, // Default false since consuming app usually provides router\n enableSnackbar = true,\n\n // Other props\n enableCssBaseline = true,\n snackbarConfig = {\n maxSnack: 3,\n anchorOrigin: { vertical: 'top', horizontal: 'right' },\n autoHideDuration: 5000,\n },\n\n // API configuration\n apiConfig: providedApiConfig,\n additionalApiConfigurations,\n moduleRoutes,\n routeToColumnsMap,\n routeToResourceMap,\n publicRoutes = [], // Default empty array for public routes in AuthProvider \n}) => {\n console.log(\"additionalApiConfigurations...........\",additionalApiConfigurations)\n\n // Initialize API configuration synchronously before first render\n // This prevents \"API configuration not initialized\" errors when components\n // try to use the API during initial render\n const isInitialized = React.useRef(false);\n\n if (providedApiConfig && !isInitialized.current) {\n try {\n initializeApiConfig(providedApiConfig);\n initializeApiBaseUrls();\n if (additionalApiConfigurations) {\n extendApiConfigurations(additionalApiConfigurations);\n }\n // Inject MFE-provided module routes so the header can resolve modules\n if (moduleRoutes) {\n setModuleRoutes(moduleRoutes);\n }\n isInitialized.current = true;\n } catch (error) {\n console.error('Failed to initialize API configuration:', error);\n }\n }\n // const { isLoading } = useAppTranslations();\n // if (isLoading) {\n // return <Loader />;\n // }\n // Create or use provided Redux store\n const store = React.useMemo(() => {\n if (!useRedux) return null;\n\n if (reduxStore) {\n return reduxStore;\n }\n\n return createLibraryStore(additionalReducers, apiClient);\n }, [useRedux, reduxStore, additionalReducers, apiClient]);\n\n // Create theme\n const theme = React.useMemo(() => {\n if (customTheme) {\n return customTheme;\n }\n\n const themeCreator = themeMode === 'dark' ? createDarkTheme : createLightTheme;\n const { theme: generatedTheme } = themeCreator(primaryColor, direction);\n return generatedTheme;\n }, [customTheme, themeMode, primaryColor, direction]);\n\n // Context value\n const contextValue: ERPUIContextValue = {\n useRedux,\n apiClient,\n theme,\n themeMode,\n direction,\n primaryColor,\n };\n\n // Build provider tree from inside out\n let content = (\n <ERPUIContext.Provider value={contextValue}>\n {/* <ThemeProvider theme={theme}>\n {enableCssBaseline && <CssBaseline />} */}\n {/* <Suspense fallback={<Loader />}> */}\n <MUIThemeWrapper theme={theme} enableCssBaseline={enableCssBaseline}>\n {children}\n </MUIThemeWrapper>\n {/* </Suspense> */}\n {/* </ThemeProvider> */}\n </ERPUIContext.Provider>\n );\n\n // Wrap with snackbar provider if enabled\n if (enableSnackbar) {\n content = (\n <SnackbarProvider {...snackbarConfig}>\n {content}\n </SnackbarProvider>\n );\n }\n\n // Wrap with page provider if enabled\n // if (enablePages) {\n // content = (\n // <PageProvider routeToColumnsMap={routeToColumnsMap} routeToResourceMap={routeToResourceMap}>\n // {content}\n // </PageProvider>\n // );\n // }\n\n // Wrap with permissions provider if enabled\n if (enablePermissions) {\n content = (\n <PermissionsProvider>\n {content}\n </PermissionsProvider>\n );\n }\n\n // Wrap with language provider if enabled\n if (enableLanguage) {\n content = (\n <LanguageProvider>\n {content}\n </LanguageProvider>\n );\n }\n\n // Wrap with auth provider if enabled\n if (enableAuth) {\n content = (\n <AuthProvider publicRoutes={publicRoutes}>\n {content}\n </AuthProvider>\n );\n }\n\n // Wrap with router if enabled\n if (enableRouter) {\n content = (\n <BrowserRouter>\n {content}\n </BrowserRouter>\n );\n }\n\n // Wrap with Redux provider if enabled\n if (useRedux && store) {\n content = (\n <ReduxProvider store={store}>\n {content}\n </ReduxProvider>\n );\n }\n\n return content;\n};\n\nexport default ERPUIProvider;","import { enqueueSnackbar } from \"notistack\";\n\ntype ApiResponse = {\n meta?: {\n requestStatus?: string;\n };\n error?: {\n message?: string;\n };\n payload?:any\n};\n\ntype Callback = () => void;\n\nexport function apiHelper(res: ApiResponse, callBack?: Callback): void {\n if (res?.meta?.requestStatus === \"rejected\") {\n const errorMessage = (() => {\n try {\n return res.error?.message ? JSON.parse(res.error.message) : null;\n } catch {\n return { message: \"Something went wrong\" };\n }\n })();\n\n const message = errorMessage?.message?.replace(\"Error:\", \"\").trim() || \"Something went wrong\";\n\n enqueueSnackbar(message, {\n variant: \"error\",\n });\n return\n }\n\n if (callBack && typeof callBack === \"function\") {\n callBack();\n } else if (callBack) {\n console.warn(\"Provided callBack is not a function.\");\n }\n}\n"],"names":["React","jsx","ReduxProvider","_a"],"mappings":";;;;;;;;;;;;;;;;;AAQA,IAAI,0BAA0B;AAC9B,IAAI,kBAAkB;AACtB,IAAI,oBAAoB;AAEjB,MAAM,qBAAqB,MAAM;AACvC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,iBAAiB;AAC5D,QAAM,WAAW,OAAO;AACxB,QAAM,eAAe,QAAA;AACrB,QAAM,EAAE,MAAM,QAAA,IAAY,QAAA;AAC1B,QAAM,EAAE,EAAA,IAAM,eAAA;AAEd,YAAU,MAAM;AACf,UAAM,aAAa,QAAQ,CAAC;AAC5B,UAAM,cAAc,SAAS,SAAS,YAAA;AACtC,SAAG,6BAAM,OAAM,CAAC,SAAS;AAExB,YAAM,gBAAgB,WAAW;AAAA,QAChC,CAAC,QAAA;;AACA,qBAAI,KAAK,YAAA,MAAkB,iBAC3B,SAAI,oBAAJ,mBAAqB,KAAK,CAAC,UAAkB,YAAY,WAAW,MAAM,aAAa;AAAA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oBACE,UAAA,QAAA,CACH;AAAA,EAEJ;AAGA,MAAI,YAAY;AACd,cACEA,kCAAAA,IAAC,cAAA,EAAa,cACX,UAAA,SACH;AAAA,EAEJ;AAGA,MAAI,cAAc;AAChB,cACEA,kCAAAA,IAAC,iBACE,UAAA,QAAA,CACH;AAAA,EAEJ;AAGA,MAAI,YAAY,OAAO;AACrB,cACEA,kCAAAA,IAACC,UAAA,EAAc,OACZ,UAAA,SACH;AAAA,EAEJ;AAEA,SAAO;AACT;AC5PO,SAAS,UAAU,KAAkB,UAA2B;;AACrE,QAAI,gCAAK,SAAL,mBAAW,mBAAkB,YAAY;AAC3C,UAAM,gBAAgB,MAAM;;AAC1B,UAAI;AACF,iBAAOC,MAAA,IAAI,UAAJ,gBAAAA,IAAW,WAAU,KAAK,MAAM,IAAI,MAAM,OAAO,IAAI;AAAA,MAC9D,QAAQ;AACN,eAAO,EAAE,SAAS,uBAAA;AAAA,MACpB;AAAA,IACF,GAAA;AAEA,UAAM,YAAU,kDAAc,YAAd,mBAAuB,QAAQ,UAAU,IAAI,WAAU;AAEvE,oBAAgB,SAAS;AAAA,MACvB,SAAS;AAAA,IAAA,CACV;AACD;AAAA,EACF;AAEA,MAAI,YAAY,OAAO,aAAa,YAAY;AAC9C,aAAA;AAAA,EACF,WAAW,UAAU;AACnB,YAAQ,KAAK,sCAAsC;AAAA,EACrD;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apiHelper-DSbRnRC1.js","sources":["../../src/hooks/use-translations.ts","../../src/hooks/useDataFetcher.tsx","../../src/components/providers/ERPUIProvider.tsx","../../src/hooks/apiHelper.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n// import { useLocation } from 'react-router-dom'\nimport { getI18n, useTranslation } from 'react-i18next'\nimport { loadModuleTranslations } from '../utils/translations'\nimport modules from '../constants/modules'\nimport { useAuth } from './useAuth'\n\n// Global state to prevent duplicate calls across all hook instances\nlet globalLastLoadedModules = ''\nlet globalIsLoading = false\nlet globalInitialLoad = false\n\nexport const useAppTranslations = () => {\n\tconst [isLoading, setIsLoading] = useState(globalInitialLoad)\n\tconst location = window.location\n\tconst i18nInstance = getI18n()\n\tconst { user, loading } = useAuth()\n\tconst { t } = useTranslation()\n\n\tuseEffect(() => {\n\t\tconst erpModules = modules(t)\n\t\tconst currentPath = location.pathname.toLowerCase()\n\t\tif(user?.id && !loading) {\n\t\n\t\t\tconst matchedModule = erpModules.find(\n\t\t\t\t(mod) =>\n\t\t\t\t\tmod.link.toLowerCase() === currentPath ||\n\t\t\t\t\tmod.connectedRoutes?.some((route: string) => currentPath.startsWith(route.toLowerCase()))\n\t\t\t)\n\t\n\t\t\tlet modulesToLoad: string[] = []\n\t\n\t\t\tif (matchedModule?.translationModule) {\n\t\t\t\tmodulesToLoad = [...matchedModule.translationModule, 'common']\n\t\t\t} else if (!matchedModule && currentPath === '/dashboard') {\n\t\t\t\tmodulesToLoad = ['common']\n\t\t\t}\n\t\n\t\t\tif (modulesToLoad.length > 0) {\n\t\t\t\tconst moduleKey = [...modulesToLoad].sort().join(',')\n\t\n\t\t\t\t// Skip if same modules are already loaded or currently loading\n\t\t\t\tif (globalLastLoadedModules === moduleKey || globalIsLoading) {\n\t\t\t\t\tif (globalInitialLoad) {\n\t\t\t\t\t\tsetIsLoading(false)\n\t\t\t\t\t\tglobalInitialLoad = false\n\t\t\t\t\t}\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\n\t\t\t\tglobalIsLoading = true\n\t\t\t\tglobalLastLoadedModules = moduleKey\n\t\t\t\tsetIsLoading(true)\n\t\n\t\t\t\tloadModuleTranslations(modulesToLoad, i18nInstance).finally(() => {\n\t\t\t\t\tglobalIsLoading = false\n\t\t\t\t\tsetIsLoading(false)\n\t\t\t\t\tglobalInitialLoad = false\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\t// No modules to load, but still need to handle initial load state\n\t\t\t\tif (globalInitialLoad) {\n\t\t\t\t\tsetIsLoading(false)\n\t\t\t\t\tglobalInitialLoad = false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [location.pathname, t, user, loading])\n\n\treturn { isLoading }\n};\n\nexport default useAppTranslations;\n","import { useCallback, useState, useEffect } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { usePages } from './use-pages';\nimport { useLocation } from 'react-router-dom';\ninterface FilterParams {\n\tskip: number;\n\tlimit: number;\n\tsearch?: string;\n\tselect?: string;\n\torder?: string;\n\tfilters?: string;\n}\n\ninterface ActivePage {\n\tsort?: { id: string; desc: boolean };\n\tfilterQueryString?: string;\n\tsearch?: string;\n\tvisible_columns?: { visible: boolean; accessorKey: string }[];\n}\n\nconst useGenericDataFetcher = (\n\tcols?: ActivePage,\n\tpagination: { skip: number; limit: number },\n\tfetchAction: (filters: FilterParams) => void,\n\tcustomeFilter: any = '',\n\tcustomDeps?: any[],\n\tshowCreatedBy: boolean = true,\n\tcustomFields?: any = []\n) => {\n\tconst { activePage } = usePages();\n\tconst dispatch = useDispatch();\n\tconst location = useLocation();\n\n\tconst sourceColumns = Array.isArray(cols) ? cols?.filter((col: any) => col.visible) : activePage?.visible_columns;\n\n\tconst [trackedPath, setTrackedPath] = useState<string | null>(null);\n\tconst [trackedColumns, setTrackedColumns] = useState<any[]>([]);\n\n\tuseEffect(() => {\n\t\tif (trackedPath !== location?.pathname) {\n\t\t\tsetTrackedPath(location?.pathname);\n\t\t\tsetTrackedColumns([]);\n\t\t}\n\t}, [location?.pathname, trackedPath]);\n\n\tuseEffect(() => {\n\t\tif (trackedPath === location?.pathname && sourceColumns?.length > 0) {\n\t\t\tif (JSON.stringify(trackedColumns) !== JSON.stringify(sourceColumns)) {\n\t\t\t\tsetTrackedColumns(sourceColumns);\n\t\t\t}\n\t\t}\n\t}, [location?.pathname, trackedPath, sourceColumns]);\n\n\tconst getProcessedFilters = useCallback(() => {\n\t\tconst { filterQueryString } = activePage || {};\n\t\tconst queryString = filterQueryString?.replaceAll(/[()]/g, \"\") || '';\n\t\tconst extraQueryString = queryString.length ? `&${queryString}` : '';\n\t\tlet filters = customeFilter;\n\n\t\tif (extraQueryString) {\n\t\t\tfilters = filters ? `(${filters}${extraQueryString})` : `(${extraQueryString})`;\n\t\t} else if (filters) {\n\t\t\tfilters = `(${filters})`;\n\t\t}\n\n\t\treturn filters || undefined;\n\t\t//eslint-disable-next-line\n\t}, [activePage.filterQueryString, customeFilter]);\n\n\tconst fetchData = useCallback(() => {\n\t\tif (!fetchAction) {\n\t\t\treturn;\n\t\t}\n\t\tconst { sort = null, search } = activePage;\n\n\t\tif (!trackedColumns || trackedColumns.length === 0) return;\n\n\t\tconst filters = getProcessedFilters();\n\t\tconst visibleColumns = trackedColumns?.filter((vc) => vc.visible)\n\n\t\tconst selectPayload = visibleColumns?.length > 0 ? `[${visibleColumns\n\t\t\t?.map((item) =>\n\t\t\t\titem.accessorKey?.includes(\".\")\n\t\t\t\t\t? item.accessorKey.split(\".\")[0]\n\t\t\t\t\t: item.accessorKey\n\t\t\t)}${showCreatedBy ? ',created_at,created_by_data' : ''}${customFields?.length ? `,${customFields?.join(',')}` : ''}]` : undefined\n\t\tconst payload: FilterParams = {\n\t\t\tskip: activePage?.skip || pagination?.skip,\n\t\t\tlimit: pagination.limit,\n\t\t\tsearch,\n\t\t\tselect: selectPayload,\n\t\t\t...(sort && { order: `${sort.id}:${sort.desc ? -1 : 1}` }),\n\t\t\t...(filters && { filters }),\n\t\t};\n\n\t\tdispatch(fetchAction(payload));\n\t\t//eslint-disable-next-line\n\t}, [\n\t\ttrackedColumns,\n\t\tactivePage.sort,\n\t\tactivePage.filterQueryString,\n\t\tactivePage.search,\n\t\t// pagination?.skip,\n\t\tactivePage?.skip,\n\t\tpagination?.limit,\n\t\tdispatch,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t...(customDeps || []),\n\t]);\n\n\n\n\treturn fetchData;\n};\n\nexport default useGenericDataFetcher;\n","import React, { createContext, useContext, ReactNode, Suspense } from 'react';\nimport { Provider as ReduxProvider } from 'react-redux';\nimport { ThemeProvider } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport { SnackbarProvider } from 'notistack';\nimport { BrowserRouter } from 'react-router-dom';\nimport { createLibraryStore, ApiClientConfig } from '../../redux';\nimport { createLightTheme, createDarkTheme, Color } from '../../theme';\nimport { AuthProvider } from '../../contexts/AuthContext';\nimport { LanguageProvider } from '../../contexts/languageContext';\nimport { PageProvider } from '../../contexts/page-context';\nimport { PermissionsProvider } from '../../contexts/permission-context';\nimport MUIThemeWrapper from '../../theme/themeWrapper';\nimport Loader from '../loader';\nimport useAppTranslations from '../../hooks/use-translations';\nimport '../../utils/i18n';\nimport { initializeApiConfig, ApiConfig } from '../../utils/api-config';\nimport { initializeApiBaseUrls, extendApiConfigurations } from '../../utils/api';\nimport { setModuleRoutes } from '../../utils/module-routes-config';\n\n// Context for library configuration\ninterface ERPUIContextValue {\n useRedux: boolean;\n apiClient?: ApiClientConfig;\n theme?: any;\n themeMode: 'light' | 'dark';\n direction: 'ltr' | 'rtl';\n primaryColor?: Color;\n}\n\nconst ERPUIContext = createContext<ERPUIContextValue>({\n useRedux: false,\n themeMode: 'light',\n direction: 'ltr',\n});\n\nexport const useERPUI = () => useContext(ERPUIContext);\n\n// Provider props interface\ninterface ERPUIProviderProps {\n children: ReactNode;\n\n // Redux configuration\n useRedux?: boolean;\n reduxStore?: any;\n apiClient?: ApiClientConfig;\n additionalReducers?: Record<string, any>;\n\n // Theme configuration\n theme?: any;\n themeMode?: 'light' | 'dark';\n primaryColor?: Color;\n direction?: 'ltr' | 'rtl';\n\n // Context providers configuration\n enableAuth?: boolean;\n enableLanguage?: boolean;\n enablePages?: boolean;\n enablePermissions?: boolean;\n enableRouter?: boolean;\n enableSnackbar?: boolean;\n\n // Other configuration\n enableCssBaseline?: boolean;\n snackbarConfig?: {\n maxSnack?: number;\n anchorOrigin?: {\n vertical: 'top' | 'bottom';\n horizontal: 'left' | 'center' | 'right';\n };\n autoHideDuration?: number;\n };\n\n // API configuration\n apiConfig?: ApiConfig;\n\n // Additional API configurations to extend the shared apiConfigurations map\n additionalApiConfigurations?: Record<string, any>;\n\n // Module routes override — allows MFE apps to inject their own full route set\n // so the header module dropdown can match routes correctly.\n // Example: { hrms: Object.values(PathnameHrms).map(p => Pathname.DASHBOARD_HRMS + p) }\n moduleRoutes?: Record<string, string[]>;\n\n // Route maps\n routeToColumnsMap?: Record<string, any>;\n routeToResourceMap?: Record<string, any>;\n publicRoutes?: string[]; // Optional prop to allow customization of public routes in AuthProvider\n}\n\nexport const ERPUIProvider: React.FC<ERPUIProviderProps> = ({\n children,\n\n // Redux props\n useRedux = false,\n reduxStore,\n apiClient,\n additionalReducers = {},\n\n // Theme props\n theme: customTheme,\n themeMode = 'light',\n primaryColor,\n direction = 'ltr',\n\n // Context providers configuration\n enableAuth = true,\n enableLanguage = true,\n enablePages = true,\n enablePermissions = true,\n enableRouter = false, // Default false since consuming app usually provides router\n enableSnackbar = true,\n\n // Other props\n enableCssBaseline = true,\n snackbarConfig = {\n maxSnack: 3,\n anchorOrigin: { vertical: 'top', horizontal: 'right' },\n autoHideDuration: 5000,\n },\n\n // API configuration\n apiConfig: providedApiConfig,\n additionalApiConfigurations,\n moduleRoutes,\n routeToColumnsMap,\n routeToResourceMap,\n publicRoutes = [], // Default empty array for public routes in AuthProvider \n}) => {\n console.log(\"additionalApiConfigurations...........\",additionalApiConfigurations)\n\n // Initialize API configuration synchronously before first render\n // This prevents \"API configuration not initialized\" errors when components\n // try to use the API during initial render\n const isInitialized = React.useRef(false);\n\n if (providedApiConfig && !isInitialized.current) {\n try {\n initializeApiConfig(providedApiConfig);\n initializeApiBaseUrls();\n if (additionalApiConfigurations) {\n extendApiConfigurations(additionalApiConfigurations);\n }\n // Inject MFE-provided module routes so the header can resolve modules\n if (moduleRoutes) {\n setModuleRoutes(moduleRoutes);\n }\n isInitialized.current = true;\n } catch (error) {\n console.error('Failed to initialize API configuration:', error);\n }\n }\n // const { isLoading } = useAppTranslations();\n // if (isLoading) {\n // return <Loader />;\n // }\n // Create or use provided Redux store\n const store = React.useMemo(() => {\n if (!useRedux) return null;\n\n if (reduxStore) {\n return reduxStore;\n }\n\n return createLibraryStore(additionalReducers, apiClient);\n }, [useRedux, reduxStore, additionalReducers, apiClient]);\n\n // Create theme\n const theme = React.useMemo(() => {\n if (customTheme) {\n return customTheme;\n }\n\n const themeCreator = themeMode === 'dark' ? createDarkTheme : createLightTheme;\n const { theme: generatedTheme } = themeCreator(primaryColor, direction);\n return generatedTheme;\n }, [customTheme, themeMode, primaryColor, direction]);\n\n // Context value\n const contextValue: ERPUIContextValue = {\n useRedux,\n apiClient,\n theme,\n themeMode,\n direction,\n primaryColor,\n };\n\n // Build provider tree from inside out\n let content = (\n <ERPUIContext.Provider value={contextValue}>\n {/* <ThemeProvider theme={theme}>\n {enableCssBaseline && <CssBaseline />} */}\n {/* <Suspense fallback={<Loader />}> */}\n <MUIThemeWrapper theme={theme} enableCssBaseline={enableCssBaseline}>\n {children}\n </MUIThemeWrapper>\n {/* </Suspense> */}\n {/* </ThemeProvider> */}\n </ERPUIContext.Provider>\n );\n\n // Wrap with snackbar provider if enabled\n if (enableSnackbar) {\n content = (\n <SnackbarProvider {...snackbarConfig}>\n {content}\n </SnackbarProvider>\n );\n }\n\n // Wrap with page provider if enabled\n // if (enablePages) {\n // content = (\n // <PageProvider routeToColumnsMap={routeToColumnsMap} routeToResourceMap={routeToResourceMap}>\n // {content}\n // </PageProvider>\n // );\n // }\n\n // Wrap with permissions provider if enabled\n if (enablePermissions) {\n content = (\n <PermissionsProvider>\n {content}\n </PermissionsProvider>\n );\n }\n\n // Wrap with language provider if enabled\n if (enableLanguage) {\n content = (\n <LanguageProvider>\n {content}\n </LanguageProvider>\n );\n }\n\n // Wrap with auth provider if enabled\n if (enableAuth) {\n content = (\n <AuthProvider publicRoutes={publicRoutes}>\n {content}\n </AuthProvider>\n );\n }\n\n // Wrap with router if enabled\n if (enableRouter) {\n content = (\n <BrowserRouter>\n {content}\n </BrowserRouter>\n );\n }\n\n // Wrap with Redux provider if enabled\n if (useRedux && store) {\n content = (\n <ReduxProvider store={store}>\n {content}\n </ReduxProvider>\n );\n }\n\n return content;\n};\n\nexport default ERPUIProvider;","import { enqueueSnackbar } from \"notistack\";\n\ntype ApiResponse = {\n meta?: {\n requestStatus?: string;\n };\n error?: {\n message?: string;\n };\n payload?:any\n};\n\ntype Callback = () => void;\n\nexport function apiHelper(res: ApiResponse, callBack?: Callback): void {\n if (res?.meta?.requestStatus === \"rejected\") {\n const errorMessage = (() => {\n try {\n return res.error?.message ? JSON.parse(res.error.message) : null;\n } catch {\n return { message: \"Something went wrong\" };\n }\n })();\n\n const message = errorMessage?.message?.replace(\"Error:\", \"\").trim() || \"Something went wrong\";\n\n enqueueSnackbar(message, {\n variant: \"error\",\n });\n return\n }\n\n if (callBack && typeof callBack === \"function\") {\n callBack();\n } else if (callBack) {\n console.warn(\"Provided callBack is not a function.\");\n }\n}\n"],"names":["useState","getI18n","useAuth","useTranslation","useEffect","modules","loadModuleTranslations","usePages","useDispatch","useLocation","useCallback","createContext","useContext","initializeApiConfig","initializeApiBaseUrls","extendApiConfigurations","setModuleRoutes","store","createLibraryStore","createDarkTheme","createLightTheme","jsx","MUIThemeWrapper","SnackbarProvider","PermissionsProvider","LanguageProvider","AuthProvider","BrowserRouter","ReduxProvider","_a","enqueueSnackbar"],"mappings":";;;;;;;;;;;;;;;;;;AAQA,IAAI,0BAA0B;AAC9B,IAAI,kBAAkB;AACtB,IAAI,oBAAoB;AAEjB,MAAM,qBAAqB,MAAM;AACvC,QAAM,CAAC,WAAW,YAAY,IAAIA,MAAAA,SAAS,iBAAiB;AAC5D,QAAM,WAAW,OAAO;AACxB,QAAM,eAAeC,aAAAA,QAAA;AACrB,QAAM,EAAE,MAAM,QAAA,IAAYC,gBAAA;AAC1B,QAAM,EAAE,EAAA,IAAMC,4BAAA;AAEdC,QAAAA,UAAU,MAAM;AACf,UAAM,aAAaC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