@erpsquad/common 1.0.1 → 1.0.2
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/common-BRx8CJLZ.js.map +1 -1
- package/dist/common-DjkB08j1.esm.js.map +1 -1
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/navigation-utils-93uihT3j.esm.js.map +1 -1
- package/dist/navigation-utils-DJjak6jv.js.map +1 -1
- package/dist/translations-A_1jDwOn.esm.js.map +1 -1
- package/dist/translations-DAx8u6R5.js.map +1 -1
- package/dist/utils/common-utility.d.ts +4 -5
- package/dist/utils/common.d.ts +6 -7
- package/dist/utils/date-range.d.ts +2 -3
- package/dist/utils/dateValidation.d.ts +1 -1
- package/dist/utils/form-builder-deconversion.d.ts +42 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.esm.js +2 -0
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -8,6 +8,7 @@ import { c as c12, u as u3, d as d5, a as a14, b as b12 } from "./use-permission
|
|
|
8
8
|
import { apiType, capitalizeWords, convertEmptyToNull, defaultUserCurrency, formatNumber, formatTime, formateDate, recursiveSort, removeExtraKeys, sortData, useCheckSkuAndName, useDataFetcher, useLanguageFallback, useMaterialCalculations, valueWithCurrency } from "./hooks/index.esm.js";
|
|
9
9
|
import { ThemeSelector, ThemeWrapper, getTheme, ThemeSelector as ThemeSelector2 } from "./theme/index.esm.js";
|
|
10
10
|
import { a as a15, c as c13, c as c14, t as t4 } from "./theme-impl-G5-3lpk8.esm.js";
|
|
11
|
+
import { default as default2 } from "dayjs";
|
|
11
12
|
import { C as C4, a as a16, e as e4, j as j3, i as i3, c as c15, l as l3, h as h4, b as b13, d as d6, f as f4, g as g4, n as n4, k as k3, m as m3, p as p3, u as u4 } from "./translations-A_1jDwOn.esm.js";
|
|
12
13
|
import { b as b14, c as c16, d as d7, e as e5, f as f5, g as g5, h as h5, i as i4, s as s3, a as a17 } from "./api-BPW-8Z4u.esm.js";
|
|
13
14
|
import { a as a18, s as s4 } from "./api-z0lNDG2t.esm.js";
|
|
@@ -328,6 +329,7 @@ export {
|
|
|
328
329
|
h4 as dateRangeValidation,
|
|
329
330
|
b13 as dateTimeValidation,
|
|
330
331
|
d6 as dateValidation,
|
|
332
|
+
default2 as dayjs,
|
|
331
333
|
G as defaultCompany,
|
|
332
334
|
F as defaultCurrencyFormat,
|
|
333
335
|
E as defaultCurrencySymbol,
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/config/index.ts"],"sourcesContent":["// Configuration system for application-specific business logic\n\nexport interface LibraryConfig {\n // Route and navigation configuration\n routes?: {\n // Function to generate paths with IDs\n generatePathWithId?: (path: string, id: string | number) => string;\n // Base paths for different modules\n basePaths?: {\n [module: string]: string;\n };\n };\n \n // Data transformation functions\n dataTransforms?: {\n // Function to transform API responses\n transformApiResponse?: (response: any, context?: string) => any;\n // Function to format currency\n formatCurrency?: (amount: number, currency?: string) => string;\n // Function to format dates\n formatDate?: (date: any, format?: string) => string;\n };\n \n // Validation functions\n validation?: {\n // Custom validation rules\n validateField?: (value: any, rules: any) => boolean | string;\n // Phone number validation\n validatePhone?: (phone: string, country?: string) => boolean;\n // Email validation\n validateEmail?: (email: string) => boolean;\n };\n \n // Permission system\n permissions?: {\n // Check if user has permission\n hasPermission?: (permission: string, context?: any) => boolean;\n // Get user permissions\n getUserPermissions?: () => string[];\n };\n \n // Localization\n localization?: {\n // Get current language\n getCurrentLanguage?: () => string;\n // Translate function\n translate?: (key: string, params?: any) => string;\n // Get available languages\n getAvailableLanguages?: () => Array<{ code: string; name: string }>;\n };\n \n // File handling\n fileHandling?: {\n // Upload file function\n uploadFile?: (file: File, options?: any) => Promise<any>;\n // Download file function\n downloadFile?: (fileId: string, options?: any) => Promise<any>;\n // Get file URL\n getFileUrl?: (fileId: string) => string;\n };\n \n // Notification system\n notifications?: {\n // Show success notification\n showSuccess?: (message: string, options?: any) => void;\n // Show error notification\n showError?: (message: string, options?: any) => void;\n // Show info notification\n showInfo?: (message: string, options?: any) => void;\n };\n}\n\nlet libraryConfig: LibraryConfig = {};\n\nexport const configureLibrary = (config: LibraryConfig) => {\n libraryConfig = { ...libraryConfig, ...config };\n};\n\nexport const getLibraryConfig = () => libraryConfig;\n\n// Helper function to get configuration with fallback\nexport const getConfigFunction = <T extends keyof LibraryConfig>(\n category: T,\n functionName: keyof LibraryConfig[T]\n): any => {\n const categoryConfig = libraryConfig[category];\n if (categoryConfig && categoryConfig[functionName]) {\n return categoryConfig[functionName];\n }\n \n // Return default implementation or throw error based on criticality\n switch (`${String(category)}.${String(functionName)}`) {\n case 'routes.generatePathWithId':\n return (path: string, id: string | number) => path.replace(':id', String(id));\n \n case 'dataTransforms.formatCurrency':\n return (amount: number, currency = 'USD') => `${currency} ${amount.toFixed(2)}`;\n \n case 'dataTransforms.formatDate':\n return (date: any) => new Date(date).toLocaleDateString();\n \n case 'validation.validateEmail':\n return (email: string) => /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email);\n \n case 'permissions.hasPermission':\n return () => true; // Default to allowing all permissions\n \n case 'localization.getCurrentLanguage':\n return () => 'en';\n \n case 'localization.translate':\n return (key: string) => key; // Return key as fallback\n \n case 'notifications.showSuccess':\n case 'notifications.showError':\n case 'notifications.showInfo':\n return (message: string) => console.log(message);\n \n default:\n return (...args: any[]) => {\n throw new Error(`Configuration not provided for ${String(category)}.${String(functionName)}. Please configure this in your consuming application.`);\n };\n }\n};"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/config/index.ts"],"sourcesContent":["// Configuration system for application-specific business logic\n\nexport interface LibraryConfig {\n // Route and navigation configuration\n routes?: {\n // Function to generate paths with IDs\n generatePathWithId?: (path: string, id: string | number) => string;\n // Base paths for different modules\n basePaths?: {\n [module: string]: string;\n };\n };\n \n // Data transformation functions\n dataTransforms?: {\n // Function to transform API responses\n transformApiResponse?: (response: any, context?: string) => any;\n // Function to format currency\n formatCurrency?: (amount: number, currency?: string) => string;\n // Function to format dates\n formatDate?: (date: any, format?: string) => string;\n };\n \n // Validation functions\n validation?: {\n // Custom validation rules\n validateField?: (value: any, rules: any) => boolean | string;\n // Phone number validation\n validatePhone?: (phone: string, country?: string) => boolean;\n // Email validation\n validateEmail?: (email: string) => boolean;\n };\n \n // Permission system\n permissions?: {\n // Check if user has permission\n hasPermission?: (permission: string, context?: any) => boolean;\n // Get user permissions\n getUserPermissions?: () => string[];\n };\n \n // Localization\n localization?: {\n // Get current language\n getCurrentLanguage?: () => string;\n // Translate function\n translate?: (key: string, params?: any) => string;\n // Get available languages\n getAvailableLanguages?: () => Array<{ code: string; name: string }>;\n };\n \n // File handling\n fileHandling?: {\n // Upload file function\n uploadFile?: (file: File, options?: any) => Promise<any>;\n // Download file function\n downloadFile?: (fileId: string, options?: any) => Promise<any>;\n // Get file URL\n getFileUrl?: (fileId: string) => string;\n };\n \n // Notification system\n notifications?: {\n // Show success notification\n showSuccess?: (message: string, options?: any) => void;\n // Show error notification\n showError?: (message: string, options?: any) => void;\n // Show info notification\n showInfo?: (message: string, options?: any) => void;\n };\n}\n\nlet libraryConfig: LibraryConfig = {};\n\nexport const configureLibrary = (config: LibraryConfig) => {\n libraryConfig = { ...libraryConfig, ...config };\n};\n\nexport const getLibraryConfig = () => libraryConfig;\n\n// Helper function to get configuration with fallback\nexport const getConfigFunction = <T extends keyof LibraryConfig>(\n category: T,\n functionName: keyof LibraryConfig[T]\n): any => {\n const categoryConfig = libraryConfig[category];\n if (categoryConfig && categoryConfig[functionName]) {\n return categoryConfig[functionName];\n }\n \n // Return default implementation or throw error based on criticality\n switch (`${String(category)}.${String(functionName)}`) {\n case 'routes.generatePathWithId':\n return (path: string, id: string | number) => path.replace(':id', String(id));\n \n case 'dataTransforms.formatCurrency':\n return (amount: number, currency = 'USD') => `${currency} ${amount.toFixed(2)}`;\n \n case 'dataTransforms.formatDate':\n return (date: any) => new Date(date).toLocaleDateString();\n \n case 'validation.validateEmail':\n return (email: string) => /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email);\n \n case 'permissions.hasPermission':\n return () => true; // Default to allowing all permissions\n \n case 'localization.getCurrentLanguage':\n return () => 'en';\n \n case 'localization.translate':\n return (key: string) => key; // Return key as fallback\n \n case 'notifications.showSuccess':\n case 'notifications.showError':\n case 'notifications.showInfo':\n return (message: string) => console.log(message);\n \n default:\n return (...args: any[]) => {\n throw new Error(`Configuration not provided for ${String(category)}.${String(functionName)}. Please configure this in your consuming application.`);\n };\n }\n};"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAwEA,IAAI,gBAA+B,CAAA;AAE5B,MAAM,mBAAmB,CAAC,WAA0B;AACzD,kBAAgB,EAAE,GAAG,eAAe,GAAG,OAAA;AACzC;AAEO,MAAM,mBAAmB,MAAM;AAG/B,MAAM,oBAAoB,CAC/B,UACA,iBACQ;AACR,QAAM,iBAAiB,cAAc,QAAQ;AAC7C,MAAI,kBAAkB,eAAe,YAAY,GAAG;AAClD,WAAO,eAAe,YAAY;AAAA,EACpC;AAGA,UAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,OAAO,YAAY,CAAC,IAAA;AAAA,IACjD,KAAK;AACH,aAAO,CAAC,MAAc,OAAwB,KAAK,QAAQ,OAAO,OAAO,EAAE,CAAC;AAAA,IAE9E,KAAK;AACH,aAAO,CAAC,QAAgB,WAAW,UAAU,GAAG,QAAQ,IAAI,OAAO,QAAQ,CAAC,CAAC;AAAA,IAE/E,KAAK;AACH,aAAO,CAAC,SAAc,IAAI,KAAK,IAAI,EAAE,mBAAA;AAAA,IAEvC,KAAK;AACH,aAAO,CAAC,UAAkB,6BAA6B,KAAK,KAAK;AAAA,IAEnE,KAAK;AACH,aAAO,MAAM;AAAA,IAEf,KAAK;AACH,aAAO,MAAM;AAAA,IAEf,KAAK;AACH,aAAO,CAAC,QAAgB;AAAA,IAE1B,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO,CAAC,YAAoB,QAAQ,IAAI,OAAO;AAAA,IAEjD;AACE,aAAO,IAAI,SAAgB;AACzB,cAAM,IAAI,MAAM,kCAAkC,OAAO,QAAQ,CAAC,IAAI,OAAO,YAAY,CAAC,wDAAwD;AAAA,MACpJ;AAAA,EAAA;AAEN;"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./common-BRx8CJLZ.js"),t=require("./all-language-XhvdjcQg.js"),r=require("./common-DyuISUDa.js"),o=require("./index-BOiMzaAf.js"),a=require("./navigation-utils-DJjak6jv.js"),s=require("./index-CDaL5lYE.js"),p=require("./use-permissions-BkJOAWow.js"),i=require("./hooks/index.js"),n=require("./theme/index.js"),l=require("./theme-impl-CPsK0d5d.js"),x=require("./translations-DAx8u6R5.js"),c=require("./api-DJ7SREez.js"),d=require("./api-VeUt6PG8.js"),m=require("./store-7xbraBig.js"),u=require("./redux/index.js"),g=require("./hooks-CzoDgYvR.js"),D=require("./api-client/index.js");let y={};exports.AuthContext=e.AuthContext,exports.AuthProvider=e.AuthProvider,exports.CustomSnackbar=e.CustomSnackbar,exports.INVENTORY_ADD_MODE_DISABLED_FIELDS=e.INVENTORY_ADD_MODE_DISABLED_FIELDS,exports.INVENTORY_ALWAYS_DISABLED_FIELDS=e.INVENTORY_ALWAYS_DISABLED_FIELDS,exports.INVENTORY_EDIT_MODE_DISABLED_FIELDS=e.INVENTORY_EDIT_MODE_DISABLED_FIELDS,exports.INVENTORY_FIELDS_TO_BE_DISABLED=e.INVENTORY_FIELDS_TO_BE_DISABLED,exports.INVENTORY_MATERIAL_COSTING_TYPE_ARR=e.INVENTORY_MATERIAL_COSTING_TYPE_ARR,exports.INVENTORY_MATERIAL_COSTING_TYPE_OPTIONS=e.INVENTORY_MATERIAL_COSTING_TYPE_OPTIONS,exports.INVENTORY_VARIANT_DISABLED_FIELDS=e.INVENTORY_VARIANT_DISABLED_FIELDS,exports.InvoiceStatus=e.InvoiceStatus,exports.Notification=e.Notification,exports.SECTION_TYPES=e.SECTION_TYPES,exports.Typography=e.Typography,exports.UTCDateFormat=e.UTCDateFormat,exports.addOrEditArray=e.addOrEditArray,exports.apiConfigurations=e.apiConfigurations,exports.appendConditionSafely=e.appendConditionSafely,exports.calculateAmountData=e.calculateAmountData,exports.calculatePeriods=e.calculatePeriods,exports.checkDuplicateTracking=e.checkDuplicateTracking,exports.checkForDuplicate=e.checkForDuplicate,exports.checkSkuAndItemName=e.checkSkuAndItemName,exports.convertRoutesToUseIdParams=e.convertRoutesToUseIdParams,exports.convertToUnderscore=e.convertToUnderscore,exports.createdOnAndBy=e.createdOnAndBy,exports.defaultCompany=e.defaultCompany,exports.defaultCurrencyFormat=e.defaultCurrencyFormat,exports.defaultCurrencySymbol=e.defaultCurrencySymbol,exports.displayPhone=e.displayPhone,exports.downloadDoc=e.downloadDoc,exports.downloadFile=e.downloadFile,exports.fetchApi=e.fetchApi,exports.fetchAssemblyItemData=e.fetchAssemblyItemData,exports.fetchCompanyLocations=e.fetchCompanyLocations,exports.fetchExchageRate=e.fetchExchageRate,exports.fetchItems=e.fetchItems,exports.fetchRentalResponseItems=e.fetchRentalResponseItems,exports.fetchRfqItemsByIdForResponse=e.fetchRfqItemsByIdForResponse,exports.filterAccessibleModules=e.filterAccessibleModules,exports.filterCoaByCompanyIdOrNull=e.filterCoaByCompanyIdOrNull,exports.findById=e.findById,exports.formatAmount=e.formatAmount,exports.formatAmountWithCurrency=e.formatAmountWithCurrency,exports.formatAmountWithCurrencyData=e.formatAmountWithCurrencyData,exports.formatDataTime=e.formatDataTime,exports.formatDate=e.formatDate,exports.formatDateForPayload=e.formatDateForPayload,exports.formatDateTimeForPayload=e.formatDateTimeForPayload,exports.formatEmptyDataToNull=e.formatEmptyDataToNull,exports.formatLabel=e.formatLabel,exports.formatOnlyTime=e.formatOnlyTime,exports.formatResponseDatesToDayJS=e.formatResponseDatesToDayJS,exports.formatResponseOnlyDatesToDayJS=e.formatResponseOnlyDatesToDayJS,exports.formatTimeForPayload=e.formatTimeForPayload,exports.formatUtcDate=e.formatUtcDate,exports.generateAndFormatStringFromObj=e.generateAndFormatStringFromObj,exports.generateFields=e.generateFields,exports.generateQueryString=e.generateQueryString,exports.generateRandomId=e.generateRandomId,exports.generateRouteWithId=e.generateRouteWithId,exports.getAccessibleModules=e.getAccessibleModules,exports.getCountryIdByName=e.getCountryIdByName,exports.getCurrency=e.getCurrency,exports.getErrorMessage=e.getErrorMessage,exports.getExcelExportTemplate=e.getExcelExportTemplate,exports.getExcelTemplateGenerateTemplate=e.getExcelTemplateGenerateTemplate,exports.getFieldFilters=e.getFieldFilters,exports.getFileName=e.getFileName,exports.getItems=e.getItems,exports.getLabelValuePairs=e.getLabelValuePairs,exports.getMinutesFromTime=e.getMinutesFromTime,exports.getName=e.getName,exports.getNestedValue=e.getNestedValue,exports.getNextScheduleDate=e.getNextScheduleDate,exports.getOperatorLabel=e.getOperatorLabel,exports.getOptions=e.getOptions,exports.getOptionsData=e.getOptionsData,exports.getPartyDependentData=e.getPartyDependentData,exports.getPartyName=e.getPartyName,exports.getSlicedValue=e.getSlicedValue,exports.getTaxAmountDataFromMultipleTaxCodes=e.getTaxAmountDataFromMultipleTaxCodes,exports.getTaxAmountFromMultipleTaxCodes=e.getTaxAmountFromMultipleTaxCodes,exports.getTimeFromMinutes=e.getTimeFromMinutes,exports.getToken=e.getToken,exports.handleRegularUpload=e.handleRegularUpload,exports.hasValue=e.hasValue,exports.images=e.images,exports.isBetweenTheDates=e.isBetweenTheDates,exports.isJSONString=e.isJSONString,exports.isJsonParse=e.isJsonParse,exports.manageItems=e.manageItems,exports.mapApiPayload=e.mapApiPayload,exports.mapAsyncApiPayload=e.mapAsyncApiPayload,exports.matchedMaterialCostingTypeLabel=e.matchedMaterialCostingTypeLabel,exports.navigateToRouteWithId=e.navigateToRouteWithId,exports.omitDataKeys=e.omitDataKeys,exports.partyDuplicateCheck=e.partyDuplicateCheck,exports.partyEmailIds=e.partyEmailIds,exports.postImportSheet=e.postImportSheet,exports.remainingMaterialCostingTypes=e.remainingMaterialCostingTypes,exports.removeIdFromObject=e.removeIdFromObject,exports.removeIdStaticIdsFromMongoObject=e.removeIdStaticIdsFromMongoObject,exports.responseItemDetailsColumns=e.responseItemDetailsColumns,exports.setRateBasedOnPriceRules=e.setRateBasedOnPriceRules,exports.showSnackBar=e.showSnackBar,exports.skuGenerator=e.skuGenerator,exports.specificFilters=e.specificFilters,exports.subModuleMappings=e.subModuleMappings,exports.toFixedWithNumbers=e.toFixedWithNumbers,exports.updateFieldsDisabledState=e.updateFieldsDisabledState,exports.updatePathnameWithIdParams=e.updatePathnameWithIdParams,exports.uploadAttachments=e.uploadAttachments,exports.uploadFiles=e.uploadFiles,exports.useAuth=e.useAuth,exports.validateDiscountValidity=e.validateDiscountValidity,exports.DEFAULT_LANG=t.DEFAULT_LANG,exports.LANGUAGES=t.LANGUAGES,exports.S3_BUCKET_URL=r.S3_BUCKET_URL,exports.Accordion=o.Accordion,exports.ActionBar=o.ActionBar,exports.ActivityArea=o.ActivityArea,exports.ActivityLog=o.ActivityTag$1,exports.ActivityTag=o.ActivityTag,exports.AddCircle=o.AddCircle,exports.Alert=o.Alert,exports.AndroidSwitch=o.Android12Switch,exports.AppBar=o.AppBarWrapper,exports.ApprovalWrapper=o.ApprovalWrapper,exports.AreaLinearChart=o.AreaLineChart,exports.ArrowBidirectional=o.ArrowBidirectional,exports.ArrowCircleDown=o.ArrowCircleDown,exports.ArrowDown=o.ArrowDown,exports.ArrowDownThree=o.ArrowDownThree,exports.ArrowDownTwo=o.ArrowDownTwo,exports.ArrowUpDown=o.ArrowUpDown,exports.ArrowUpTwo=o.ArrowUpTwo,exports.Assignments=o.Assignments,exports.Avatar=o.Avatar,exports.BlankCircle=o.BlankCircle,exports.BlockFiled=o.BlockFiled,exports.Board=o.BoardWrapper,exports.BreadCrumb=o.BreadCrumb,exports.Button=o.Button,exports.CalculationSummary=o.CalculationSummary,exports.Calendar=o.CalendarWrapper,exports.CalendarAdd=o.CalendarAdd,exports.CardWrapper=o.CardWrapper,exports.ChangeUserPasswordModal=o.ChangeUserPasswordModal,exports.ChartLegends=o.ChartLegends,exports.CheckBoxIcon=o.CheckBoxIcon,exports.Checkbox=o.Checkbox,exports.CheckboxSquare=o.CheckboxSquare,exports.ChipGenerator=o.ChipGenerator,exports.ChipOrPlaceholder=o.ChipOrPlaceholder,exports.CircularArrowSetting=o.CircularArrowSetting,exports.Clock=o.Clock,exports.Close=o.Close,exports.CoinOutline=o.CoinOutline,exports.ColorPickerInput=o.ColorPickerInput,exports.ConfirmModal=o.ConfirmPopUp,exports.Copy=o.Copy,exports.CountrySelect=o.CountrySelect,exports.CrossHire=o.CrossHire,exports.CustomGridCard=o.CustomGridCard,exports.CustomToggleSwitch=o.CustomToggleSwitch,exports.Dashboard=o.Dashboard,exports.DashboardCard=o.DashBoardCard,exports.DashboardHeader=o.DashBoardHeader,exports.DatePicker=o.DatePicker,exports.DateRangePicker=o.DateRangePicker,exports.DateTimePicker=o.DateTimePicker,exports.DocumentDownload=o.DocumentDownload,exports.DollarCircle=o.DollarCircle,exports.DollarCircleFilled=o.DollarCircleFilled,exports.DropdownButton=o.DropdownButton,exports.DyanmicTextEditor=o.DyanmicTextEditor,exports.DynamicButton=o.DynamicButton,exports.DynamicCheckBox=o.DynamicCheckBox,exports.DynamicCurrency=o.DynamicCurrency,exports.DynamicDate=o.DynamicDate,exports.DynamicDateRange=o.DynamicDateRange,exports.DynamicDateTime=o.DynamicDateTime,exports.DynamicElementHOC=o.DynamicElementHOC,exports.DynamicInfo=o.DynamicInfo,exports.DynamicInput=o.DynamicInput,exports.DynamicInputSelect=o.DynamicInputSelect,exports.DynamicLayoutWrapper=o.DynamicLayoutWrapper,exports.DynamicMedia=o.DynamicMedia,exports.DynamicModal=o.DynamicModal,exports.DynamicPhone=o.DynamicPhone,exports.DynamicRadioButton=o.DynamicRadioButton,exports.DynamicSearchSelect=o.DynamicSearchSelect,exports.DynamicSectionHOC=o.DynamicSectionHOC,exports.DynamicSelect=o.DynamicSelect,exports.DynamicTable=o.DynamicTable,exports.DynamicTagsInput=o.DynamicTagsInput,exports.DynamicTime=o.DynamicTime,exports.DynamicToggleButton=o.DynamicToggleButton,exports.ERPUIProvider=o.ERPUIProvider,exports.Edit=o.Edit,exports.Editor=o.CustomEditor,exports.Email=o.Email,exports.EntityViewWrapper=o.EntityViewWrapper,exports.ExpandableSummaryWrapper=o.ExpandableSummaryWrapper,exports.Export=o.Export,exports.Eye=o.Eye,exports.EyeOff=o.EyeOff,exports.EyePlusCircle=o.EyePlusCircle,exports.Fallback=o.Fallback,exports.FilledCircle=o.FilledCircle,exports.Filter=o.Filter,exports.FilterRemove=o.FilterRemove,exports.FolderSave=o.FolderSave,exports.Footer=o.Footer,exports.FormHeader=o.FormHeader,exports.FormLoader=o.FormLoader,exports.FormParser=o.FormParser,exports.Gantt=o.GanttChart,exports.Grid=o.Grid,exports.GridCard=o.GridCard,exports.GridFallback=o.GridFallback,exports.GridWrapper=o.GridWrapper,exports.Hashtag=o.Hashtag,exports.Header=o.Header,exports.HeaderCard=o.HeaderCard,exports.HrLine=o.HrLine,exports.Image=o.Image,exports.Import=o.Import,exports.Info=o.Info,exports.InfoCard=o.InfoCard,exports.InfoCircle=o.InfoCircle,exports.InventoryReportsTitleBar=o.InventoryReportsTitleBar,exports.Link=o.Link,exports.LinkHorizontal=o.LinkHorizontal,exports.List=o.List,exports.Loader=o.Loader,exports.Location=o.Location,exports.LocationAddModal=o.LocationAddModal,exports.LocationSelect=o.LocationSearchSelect,exports.MaterialTable=o.MaterialTable,exports.Modal=o.Modal,exports.ModalLoader=o.ModalLoader,exports.ModuleButton=o.ModuleTile,exports.MoreIcon=o.MoreIcon,exports.MultiSelect=o.MultiSelect,exports.Multiline=o.MultiLine,exports.PageLoader=o.PageLoader,exports.PageNavigator=o.PageNavigator,exports.Pagination=o.Pagination,exports.PaperClip=o.PaperClip,exports.Paragraph=o.Paragraph,exports.PartiesModal=o.CustomerVendorModal,exports.PaymentRequest=o.PaymentRequest,exports.Phone=o.Phone,exports.PhoneInput=o.PhoneInput,exports.Printer=o.Printer,exports.Promotion=o.Promotion,exports.ProtectedRoute=o.ProtectedRoute,exports.QuickApprovalModal=o.QuickApprovalModal,exports.Radio=o.Radio,exports.RadioButton=o.RadioButton,exports.Receipt=o.Receipt,exports.ReceiptFilled=o.ReceiptFilled,exports.ReceiptOutline=o.ReceiptOutline,exports.RecgtangleIcon=o.RecgtangleIcon,exports.RectangleFilledIcon=o.RectangleFilledIcon,exports.Replace=o.Replace,exports.ReportTable=o.ReportTable,exports.ReportsTitleBar=o.ReportsTitleBar,exports.ResetPasswordModal=o.ResetPasswordModal,exports.RfqResponse=o.ItemResponseDetails,exports.Save=o.Save,exports.SaveFilterModal=o.SaveFilterModal,exports.ScheduleReport=o.GeneralScheduleReport,exports.ScheduleReportModal=o.ScheduleReportModal,exports.Search=o.Search,exports.SearchBar=o.SearchBar,exports.SearchStatus=o.SearchStatus,exports.SearchableSelect=o.SearchableSelect,exports.Select=o.Select,exports.SettingsFallback=o.SettingsFallback,exports.SettingsFallbackIcon=o.SettingsFallbackIcon,exports.ShareModal=o.SharePopUp,exports.Sidebar=o.Sidebar,exports.Snackbar=o.Snackbar,exports.StackedLayer=o.StackedLayer,exports.StartFilled=o.StartFilled,exports.SubHeaderDoc=o.SubHeaderDoc,exports.TabBarUI=o.TabBarUi,exports.Tabs=o.TabBar,exports.TextArea=o.TextArea,exports.TextField=o.TextField,exports.Tick=o.Tick,exports.TickCircle=o.TickCircle,exports.TickCircleFilled=o.TickCircleFilled,exports.TimePicker=o.TimePicker,exports.TimeRangePicker=o.TimeRangePicker,exports.TitleDropdownButton=o.TitleDropdownButton,exports.Toast=o.Toast,exports.Toggle=o.Toggle,exports.ToggleSwitch=o.ToggleSwitch,exports.Tooltip=o.Tooltip,exports.Trash=o.Trash,exports.Upload=o.Upload,exports.UploadExcel=o.UploadExcel,exports.UploadMedia=o.UploadMedia,exports.UserDropdown=o.UserDropdown,exports.ViewModal=o.ViewModal,exports.Wave=o.Wave,exports.WorkCentre=o.WorkCentre,exports.createLocationThunk=o.createLocationThunk,exports.dynamicSelectAdd=o.dynamicSelectAdd,exports.useERPUI=o.useERPUI,exports.Chip=a.Chip,exports.Document=a.Document,exports.Menu=a.Menu,exports.RANGE=a.RANGE,exports.ValueField=a.ValueField,exports.calculateEntries=a.calculateEntries,exports.convertTableColumns=a.convertTableColumns,exports.getEntityId=a.getEntityId,exports.getFileNamesFromUrls=a.getFileNamesFromUrls,exports.getFileNamesFromUrlsAsLink=a.getFileNamesFromUrlsAsLink,exports.handleCompareDateRange=a.handleCompareDateRange,exports.handleCompareDateRangeSync=a.handleCompareDateRangeSync,exports.navigateWithId=a.navigateWithId,exports.renderEmptyRowsFallback=a.renderEmptyRowsFallback,exports.renderValueField=a.renderValueField,exports.transformTableColumns=a.transformTableColumns,exports.ErpLoader=s.ErpLoader,exports.LanguageContext=s.LanguageContext,exports.LanguageProvider=s.LanguageProvider,exports.PageContext=s.PageContext,exports.PageProvider=s.PageProvider,exports.PermissionContext=s.PermissionsContext,exports.PermissionProvider=s.PermissionsProvider,exports.useDeepMemo=p.useDeepMemo,exports.useLanguage=p.useLanguage,exports.useLocationFilter=p.useLocationFilter,exports.usePages=p.usePages,exports.usePermissions=p.usePermissions,exports.apiType=i.apiType,exports.capitalizeWords=i.capitalizeWords,exports.convertEmptyToNull=i.convertEmptyToNull,exports.defaultUserCurrency=i.defaultUserCurrency,exports.formatNumber=i.formatNumber,exports.formatTime=i.formatTime,exports.formateDate=i.formateDate,exports.recursiveSort=i.recursiveSort,exports.removeExtraKeys=i.removeExtraKeys,exports.sortData=i.sortData,exports.useCheckSkuAndName=i.useCheckSkuAndName,exports.useDataFetcher=i.useDataFetcher,exports.useLanguageFallback=i.useLanguageFallback,exports.useMaterialCalculations=i.useMaterialCalculations,exports.valueWithCurrency=i.valueWithCurrency,exports.ThemeSelector=n.ThemeSelector,exports.ThemeWrapper=n.ThemeWrapper,exports.getTheme=n.getTheme,exports.themeVariant=n.ThemeSelector,exports.createDarkTheme=l.createDarkTheme,exports.createLightTheme=l.createLightTheme,exports.createTheme=l.createLightTheme,exports.themes=l.themes,exports.COMMON_DATE_VALIDATIONS=x.COMMON_DATE_VALIDATIONS,exports.anyDateValidation=x.anyDateValidation,exports.businessDateValidation=x.businessDateValidation,exports.conditionalDateValidation=x.conditionalDateValidation,exports.createCustomMessages=x.createCustomMessages,exports.createDateValidation=x.createDateValidation,exports.createParameterizedNavigationHandler=x.createParameterizedNavigationHandler,exports.dateRangeValidation=x.dateRangeValidation,exports.dateTimeValidation=x.dateTimeValidation,exports.dateValidation=x.dateValidation,exports.futureDateValidation=x.futureDateValidation,exports.getCountry=x.getCountry,exports.loadModuleTranslations=x.loadModuleTranslations,exports.migrateRoutesToUseParams=x.migrateRoutesToUseParams,exports.migrateToPathWithId=x.migrateToPathWithId,exports.pastDateValidation=x.pastDateValidation,exports.updateTableConfigForParameterizedNavigation=x.updateTableConfigForParameterizedNavigation,exports.AccountingApi=c.api,exports.InventoryApi=c.api$1,exports.ManufacturingApi=c.api$2,exports.PurchaseApi=c.api$3,exports.RbacApi=c.api$4,exports.RentalApi=c.api$5,exports.SalesApi=c.api$6,exports.SystemFeatureApi=c.api$7,exports.setRoleURL=c.setBaseUrl,exports.setSystemFeatureURL=c.setBaseUrl$1,exports.DriveApi=d.api,exports.setDriveURL=d.setBaseUrl,exports.createLibraryStore=m.createLibraryStore,exports.fetchBom=m.fetchBom,exports.fetchCompanies=m.fetchCompanies,exports.getAllUserAndDepartmentDropdown=m.getAllUserAndDepartmentDropdown,exports.getLibrarySlices=m.getLibrarySlices,exports.headerSlice=m.headerSlice,exports.inventoryReportsTitleBarSlice=m.inventoryReportsTitleBarSlice,exports.libraryReducers=m.libraryReducers,exports.reportsTitleBarSlice=m.reportsTitleBarSlice,exports.resetHeaderState=m.resetHeaderState,exports.resetInventoryReportsTitleBarState=m.resetInventoryReportsTitleBarState,exports.resetLanguagesState=m.resetLanguagesState,exports.resetReportsTitleBarState=m.resetReportsTitleBarState,exports.resetShareState=m.resetState,exports.setAssemblyItems=m.setAssemblyItems,exports.setBomData=m.setBomData,exports.setCurrentLanguage=m.setCurrentLanguage,exports.setDepartments=m.setDepartments,exports.setInventoryCompanies=m.setCompanies$1,exports.setInventoryError=m.setError$2,exports.setInventoryLoading=m.setLoading$2,exports.setItems=m.setItems,exports.setLanguages=m.setLanguages,exports.setLanguagesData=m.setLanguagesData,exports.setReportsCompanies=m.setCompanies,exports.setReportsError=m.setError$1,exports.setReportsLoading=m.setLoading$1,exports.setShareError=m.setError,exports.setShareLoading=m.setLoading,exports.setUsers=m.setUsers,exports.setWarehouseLocations=m.setWarehouseLocations,exports.sharePage=m.sharePage,exports.shareSlice=m.shareSlice,exports.API_METHOD_GROUPS=u.API_METHOD_GROUPS,exports.createConfiguredApiClient=u.createConfiguredApiClient,exports.validateApiClient=u.validateApiClient,exports.useAppDispatch=g.useAppDispatch,exports.useAppSelector=g.useAppSelector,exports.useLibraryDispatch=g.useLibraryDispatch,exports.useLibrarySelector=g.useLibrarySelector,exports.DriveTypes=D.DriveTypes,exports.InventoryTypes=D.InventoryTypes,exports.ManufacturingTypes=D.ManufacturingTypes,exports.PurchaseTypes=D.PurchaseTypes,exports.RbacTypes=D.RbacTypes,exports.RentalTypes=D.RentalTypes,exports.SalesTypes=D.SalesTypes,exports.SystemFeatureTypes=D.SystemFeatureTypes,exports.UserApi=D.UserApi,exports.UserTypes=D.UserTypes,exports.configureLibrary=e=>{y={...y,...e}},exports.getConfigFunction=(e,t)=>{const r=y[e];if(r&&r[t])return r[t];switch(`${String(e)}.${String(t)}`){case"routes.generatePathWithId":return(e,t)=>e.replace(":id",String(t));case"dataTransforms.formatCurrency":return(e,t="USD")=>`${t} ${e.toFixed(2)}`;case"dataTransforms.formatDate":return e=>new Date(e).toLocaleDateString();case"validation.validateEmail":return e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);case"permissions.hasPermission":return()=>!0;case"localization.getCurrentLanguage":return()=>"en";case"localization.translate":return e=>e;case"notifications.showSuccess":case"notifications.showError":case"notifications.showInfo":return e=>{};default:return(...r)=>{throw new Error(`Configuration not provided for ${String(e)}.${String(t)}. Please configure this in your consuming application.`)}}},exports.getLibraryConfig=()=>y;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./common-BRx8CJLZ.js"),t=require("./all-language-XhvdjcQg.js"),r=require("./common-DyuISUDa.js"),o=require("./index-BOiMzaAf.js"),a=require("./navigation-utils-DJjak6jv.js"),s=require("./index-CDaL5lYE.js"),p=require("./use-permissions-BkJOAWow.js"),i=require("./hooks/index.js"),n=require("./theme/index.js"),l=require("./theme-impl-CPsK0d5d.js"),x=require("dayjs"),c=require("./translations-DAx8u6R5.js"),d=require("./api-DJ7SREez.js"),m=require("./api-VeUt6PG8.js"),u=require("./store-7xbraBig.js"),g=require("./redux/index.js"),D=require("./hooks-CzoDgYvR.js"),y=require("./api-client/index.js");function T(e){return e&&e.__esModule?e:{default:e}}var h=/* @__PURE__ */T(x);let S={};exports.AuthContext=e.AuthContext,exports.AuthProvider=e.AuthProvider,exports.CustomSnackbar=e.CustomSnackbar,exports.INVENTORY_ADD_MODE_DISABLED_FIELDS=e.INVENTORY_ADD_MODE_DISABLED_FIELDS,exports.INVENTORY_ALWAYS_DISABLED_FIELDS=e.INVENTORY_ALWAYS_DISABLED_FIELDS,exports.INVENTORY_EDIT_MODE_DISABLED_FIELDS=e.INVENTORY_EDIT_MODE_DISABLED_FIELDS,exports.INVENTORY_FIELDS_TO_BE_DISABLED=e.INVENTORY_FIELDS_TO_BE_DISABLED,exports.INVENTORY_MATERIAL_COSTING_TYPE_ARR=e.INVENTORY_MATERIAL_COSTING_TYPE_ARR,exports.INVENTORY_MATERIAL_COSTING_TYPE_OPTIONS=e.INVENTORY_MATERIAL_COSTING_TYPE_OPTIONS,exports.INVENTORY_VARIANT_DISABLED_FIELDS=e.INVENTORY_VARIANT_DISABLED_FIELDS,exports.InvoiceStatus=e.InvoiceStatus,exports.Notification=e.Notification,exports.SECTION_TYPES=e.SECTION_TYPES,exports.Typography=e.Typography,exports.UTCDateFormat=e.UTCDateFormat,exports.addOrEditArray=e.addOrEditArray,exports.apiConfigurations=e.apiConfigurations,exports.appendConditionSafely=e.appendConditionSafely,exports.calculateAmountData=e.calculateAmountData,exports.calculatePeriods=e.calculatePeriods,exports.checkDuplicateTracking=e.checkDuplicateTracking,exports.checkForDuplicate=e.checkForDuplicate,exports.checkSkuAndItemName=e.checkSkuAndItemName,exports.convertRoutesToUseIdParams=e.convertRoutesToUseIdParams,exports.convertToUnderscore=e.convertToUnderscore,exports.createdOnAndBy=e.createdOnAndBy,exports.defaultCompany=e.defaultCompany,exports.defaultCurrencyFormat=e.defaultCurrencyFormat,exports.defaultCurrencySymbol=e.defaultCurrencySymbol,exports.displayPhone=e.displayPhone,exports.downloadDoc=e.downloadDoc,exports.downloadFile=e.downloadFile,exports.fetchApi=e.fetchApi,exports.fetchAssemblyItemData=e.fetchAssemblyItemData,exports.fetchCompanyLocations=e.fetchCompanyLocations,exports.fetchExchageRate=e.fetchExchageRate,exports.fetchItems=e.fetchItems,exports.fetchRentalResponseItems=e.fetchRentalResponseItems,exports.fetchRfqItemsByIdForResponse=e.fetchRfqItemsByIdForResponse,exports.filterAccessibleModules=e.filterAccessibleModules,exports.filterCoaByCompanyIdOrNull=e.filterCoaByCompanyIdOrNull,exports.findById=e.findById,exports.formatAmount=e.formatAmount,exports.formatAmountWithCurrency=e.formatAmountWithCurrency,exports.formatAmountWithCurrencyData=e.formatAmountWithCurrencyData,exports.formatDataTime=e.formatDataTime,exports.formatDate=e.formatDate,exports.formatDateForPayload=e.formatDateForPayload,exports.formatDateTimeForPayload=e.formatDateTimeForPayload,exports.formatEmptyDataToNull=e.formatEmptyDataToNull,exports.formatLabel=e.formatLabel,exports.formatOnlyTime=e.formatOnlyTime,exports.formatResponseDatesToDayJS=e.formatResponseDatesToDayJS,exports.formatResponseOnlyDatesToDayJS=e.formatResponseOnlyDatesToDayJS,exports.formatTimeForPayload=e.formatTimeForPayload,exports.formatUtcDate=e.formatUtcDate,exports.generateAndFormatStringFromObj=e.generateAndFormatStringFromObj,exports.generateFields=e.generateFields,exports.generateQueryString=e.generateQueryString,exports.generateRandomId=e.generateRandomId,exports.generateRouteWithId=e.generateRouteWithId,exports.getAccessibleModules=e.getAccessibleModules,exports.getCountryIdByName=e.getCountryIdByName,exports.getCurrency=e.getCurrency,exports.getErrorMessage=e.getErrorMessage,exports.getExcelExportTemplate=e.getExcelExportTemplate,exports.getExcelTemplateGenerateTemplate=e.getExcelTemplateGenerateTemplate,exports.getFieldFilters=e.getFieldFilters,exports.getFileName=e.getFileName,exports.getItems=e.getItems,exports.getLabelValuePairs=e.getLabelValuePairs,exports.getMinutesFromTime=e.getMinutesFromTime,exports.getName=e.getName,exports.getNestedValue=e.getNestedValue,exports.getNextScheduleDate=e.getNextScheduleDate,exports.getOperatorLabel=e.getOperatorLabel,exports.getOptions=e.getOptions,exports.getOptionsData=e.getOptionsData,exports.getPartyDependentData=e.getPartyDependentData,exports.getPartyName=e.getPartyName,exports.getSlicedValue=e.getSlicedValue,exports.getTaxAmountDataFromMultipleTaxCodes=e.getTaxAmountDataFromMultipleTaxCodes,exports.getTaxAmountFromMultipleTaxCodes=e.getTaxAmountFromMultipleTaxCodes,exports.getTimeFromMinutes=e.getTimeFromMinutes,exports.getToken=e.getToken,exports.handleRegularUpload=e.handleRegularUpload,exports.hasValue=e.hasValue,exports.images=e.images,exports.isBetweenTheDates=e.isBetweenTheDates,exports.isJSONString=e.isJSONString,exports.isJsonParse=e.isJsonParse,exports.manageItems=e.manageItems,exports.mapApiPayload=e.mapApiPayload,exports.mapAsyncApiPayload=e.mapAsyncApiPayload,exports.matchedMaterialCostingTypeLabel=e.matchedMaterialCostingTypeLabel,exports.navigateToRouteWithId=e.navigateToRouteWithId,exports.omitDataKeys=e.omitDataKeys,exports.partyDuplicateCheck=e.partyDuplicateCheck,exports.partyEmailIds=e.partyEmailIds,exports.postImportSheet=e.postImportSheet,exports.remainingMaterialCostingTypes=e.remainingMaterialCostingTypes,exports.removeIdFromObject=e.removeIdFromObject,exports.removeIdStaticIdsFromMongoObject=e.removeIdStaticIdsFromMongoObject,exports.responseItemDetailsColumns=e.responseItemDetailsColumns,exports.setRateBasedOnPriceRules=e.setRateBasedOnPriceRules,exports.showSnackBar=e.showSnackBar,exports.skuGenerator=e.skuGenerator,exports.specificFilters=e.specificFilters,exports.subModuleMappings=e.subModuleMappings,exports.toFixedWithNumbers=e.toFixedWithNumbers,exports.updateFieldsDisabledState=e.updateFieldsDisabledState,exports.updatePathnameWithIdParams=e.updatePathnameWithIdParams,exports.uploadAttachments=e.uploadAttachments,exports.uploadFiles=e.uploadFiles,exports.useAuth=e.useAuth,exports.validateDiscountValidity=e.validateDiscountValidity,exports.DEFAULT_LANG=t.DEFAULT_LANG,exports.LANGUAGES=t.LANGUAGES,exports.S3_BUCKET_URL=r.S3_BUCKET_URL,exports.Accordion=o.Accordion,exports.ActionBar=o.ActionBar,exports.ActivityArea=o.ActivityArea,exports.ActivityLog=o.ActivityTag$1,exports.ActivityTag=o.ActivityTag,exports.AddCircle=o.AddCircle,exports.Alert=o.Alert,exports.AndroidSwitch=o.Android12Switch,exports.AppBar=o.AppBarWrapper,exports.ApprovalWrapper=o.ApprovalWrapper,exports.AreaLinearChart=o.AreaLineChart,exports.ArrowBidirectional=o.ArrowBidirectional,exports.ArrowCircleDown=o.ArrowCircleDown,exports.ArrowDown=o.ArrowDown,exports.ArrowDownThree=o.ArrowDownThree,exports.ArrowDownTwo=o.ArrowDownTwo,exports.ArrowUpDown=o.ArrowUpDown,exports.ArrowUpTwo=o.ArrowUpTwo,exports.Assignments=o.Assignments,exports.Avatar=o.Avatar,exports.BlankCircle=o.BlankCircle,exports.BlockFiled=o.BlockFiled,exports.Board=o.BoardWrapper,exports.BreadCrumb=o.BreadCrumb,exports.Button=o.Button,exports.CalculationSummary=o.CalculationSummary,exports.Calendar=o.CalendarWrapper,exports.CalendarAdd=o.CalendarAdd,exports.CardWrapper=o.CardWrapper,exports.ChangeUserPasswordModal=o.ChangeUserPasswordModal,exports.ChartLegends=o.ChartLegends,exports.CheckBoxIcon=o.CheckBoxIcon,exports.Checkbox=o.Checkbox,exports.CheckboxSquare=o.CheckboxSquare,exports.ChipGenerator=o.ChipGenerator,exports.ChipOrPlaceholder=o.ChipOrPlaceholder,exports.CircularArrowSetting=o.CircularArrowSetting,exports.Clock=o.Clock,exports.Close=o.Close,exports.CoinOutline=o.CoinOutline,exports.ColorPickerInput=o.ColorPickerInput,exports.ConfirmModal=o.ConfirmPopUp,exports.Copy=o.Copy,exports.CountrySelect=o.CountrySelect,exports.CrossHire=o.CrossHire,exports.CustomGridCard=o.CustomGridCard,exports.CustomToggleSwitch=o.CustomToggleSwitch,exports.Dashboard=o.Dashboard,exports.DashboardCard=o.DashBoardCard,exports.DashboardHeader=o.DashBoardHeader,exports.DatePicker=o.DatePicker,exports.DateRangePicker=o.DateRangePicker,exports.DateTimePicker=o.DateTimePicker,exports.DocumentDownload=o.DocumentDownload,exports.DollarCircle=o.DollarCircle,exports.DollarCircleFilled=o.DollarCircleFilled,exports.DropdownButton=o.DropdownButton,exports.DyanmicTextEditor=o.DyanmicTextEditor,exports.DynamicButton=o.DynamicButton,exports.DynamicCheckBox=o.DynamicCheckBox,exports.DynamicCurrency=o.DynamicCurrency,exports.DynamicDate=o.DynamicDate,exports.DynamicDateRange=o.DynamicDateRange,exports.DynamicDateTime=o.DynamicDateTime,exports.DynamicElementHOC=o.DynamicElementHOC,exports.DynamicInfo=o.DynamicInfo,exports.DynamicInput=o.DynamicInput,exports.DynamicInputSelect=o.DynamicInputSelect,exports.DynamicLayoutWrapper=o.DynamicLayoutWrapper,exports.DynamicMedia=o.DynamicMedia,exports.DynamicModal=o.DynamicModal,exports.DynamicPhone=o.DynamicPhone,exports.DynamicRadioButton=o.DynamicRadioButton,exports.DynamicSearchSelect=o.DynamicSearchSelect,exports.DynamicSectionHOC=o.DynamicSectionHOC,exports.DynamicSelect=o.DynamicSelect,exports.DynamicTable=o.DynamicTable,exports.DynamicTagsInput=o.DynamicTagsInput,exports.DynamicTime=o.DynamicTime,exports.DynamicToggleButton=o.DynamicToggleButton,exports.ERPUIProvider=o.ERPUIProvider,exports.Edit=o.Edit,exports.Editor=o.CustomEditor,exports.Email=o.Email,exports.EntityViewWrapper=o.EntityViewWrapper,exports.ExpandableSummaryWrapper=o.ExpandableSummaryWrapper,exports.Export=o.Export,exports.Eye=o.Eye,exports.EyeOff=o.EyeOff,exports.EyePlusCircle=o.EyePlusCircle,exports.Fallback=o.Fallback,exports.FilledCircle=o.FilledCircle,exports.Filter=o.Filter,exports.FilterRemove=o.FilterRemove,exports.FolderSave=o.FolderSave,exports.Footer=o.Footer,exports.FormHeader=o.FormHeader,exports.FormLoader=o.FormLoader,exports.FormParser=o.FormParser,exports.Gantt=o.GanttChart,exports.Grid=o.Grid,exports.GridCard=o.GridCard,exports.GridFallback=o.GridFallback,exports.GridWrapper=o.GridWrapper,exports.Hashtag=o.Hashtag,exports.Header=o.Header,exports.HeaderCard=o.HeaderCard,exports.HrLine=o.HrLine,exports.Image=o.Image,exports.Import=o.Import,exports.Info=o.Info,exports.InfoCard=o.InfoCard,exports.InfoCircle=o.InfoCircle,exports.InventoryReportsTitleBar=o.InventoryReportsTitleBar,exports.Link=o.Link,exports.LinkHorizontal=o.LinkHorizontal,exports.List=o.List,exports.Loader=o.Loader,exports.Location=o.Location,exports.LocationAddModal=o.LocationAddModal,exports.LocationSelect=o.LocationSearchSelect,exports.MaterialTable=o.MaterialTable,exports.Modal=o.Modal,exports.ModalLoader=o.ModalLoader,exports.ModuleButton=o.ModuleTile,exports.MoreIcon=o.MoreIcon,exports.MultiSelect=o.MultiSelect,exports.Multiline=o.MultiLine,exports.PageLoader=o.PageLoader,exports.PageNavigator=o.PageNavigator,exports.Pagination=o.Pagination,exports.PaperClip=o.PaperClip,exports.Paragraph=o.Paragraph,exports.PartiesModal=o.CustomerVendorModal,exports.PaymentRequest=o.PaymentRequest,exports.Phone=o.Phone,exports.PhoneInput=o.PhoneInput,exports.Printer=o.Printer,exports.Promotion=o.Promotion,exports.ProtectedRoute=o.ProtectedRoute,exports.QuickApprovalModal=o.QuickApprovalModal,exports.Radio=o.Radio,exports.RadioButton=o.RadioButton,exports.Receipt=o.Receipt,exports.ReceiptFilled=o.ReceiptFilled,exports.ReceiptOutline=o.ReceiptOutline,exports.RecgtangleIcon=o.RecgtangleIcon,exports.RectangleFilledIcon=o.RectangleFilledIcon,exports.Replace=o.Replace,exports.ReportTable=o.ReportTable,exports.ReportsTitleBar=o.ReportsTitleBar,exports.ResetPasswordModal=o.ResetPasswordModal,exports.RfqResponse=o.ItemResponseDetails,exports.Save=o.Save,exports.SaveFilterModal=o.SaveFilterModal,exports.ScheduleReport=o.GeneralScheduleReport,exports.ScheduleReportModal=o.ScheduleReportModal,exports.Search=o.Search,exports.SearchBar=o.SearchBar,exports.SearchStatus=o.SearchStatus,exports.SearchableSelect=o.SearchableSelect,exports.Select=o.Select,exports.SettingsFallback=o.SettingsFallback,exports.SettingsFallbackIcon=o.SettingsFallbackIcon,exports.ShareModal=o.SharePopUp,exports.Sidebar=o.Sidebar,exports.Snackbar=o.Snackbar,exports.StackedLayer=o.StackedLayer,exports.StartFilled=o.StartFilled,exports.SubHeaderDoc=o.SubHeaderDoc,exports.TabBarUI=o.TabBarUi,exports.Tabs=o.TabBar,exports.TextArea=o.TextArea,exports.TextField=o.TextField,exports.Tick=o.Tick,exports.TickCircle=o.TickCircle,exports.TickCircleFilled=o.TickCircleFilled,exports.TimePicker=o.TimePicker,exports.TimeRangePicker=o.TimeRangePicker,exports.TitleDropdownButton=o.TitleDropdownButton,exports.Toast=o.Toast,exports.Toggle=o.Toggle,exports.ToggleSwitch=o.ToggleSwitch,exports.Tooltip=o.Tooltip,exports.Trash=o.Trash,exports.Upload=o.Upload,exports.UploadExcel=o.UploadExcel,exports.UploadMedia=o.UploadMedia,exports.UserDropdown=o.UserDropdown,exports.ViewModal=o.ViewModal,exports.Wave=o.Wave,exports.WorkCentre=o.WorkCentre,exports.createLocationThunk=o.createLocationThunk,exports.dynamicSelectAdd=o.dynamicSelectAdd,exports.useERPUI=o.useERPUI,exports.Chip=a.Chip,exports.Document=a.Document,exports.Menu=a.Menu,exports.RANGE=a.RANGE,exports.ValueField=a.ValueField,exports.calculateEntries=a.calculateEntries,exports.convertTableColumns=a.convertTableColumns,exports.getEntityId=a.getEntityId,exports.getFileNamesFromUrls=a.getFileNamesFromUrls,exports.getFileNamesFromUrlsAsLink=a.getFileNamesFromUrlsAsLink,exports.handleCompareDateRange=a.handleCompareDateRange,exports.handleCompareDateRangeSync=a.handleCompareDateRangeSync,exports.navigateWithId=a.navigateWithId,exports.renderEmptyRowsFallback=a.renderEmptyRowsFallback,exports.renderValueField=a.renderValueField,exports.transformTableColumns=a.transformTableColumns,exports.ErpLoader=s.ErpLoader,exports.LanguageContext=s.LanguageContext,exports.LanguageProvider=s.LanguageProvider,exports.PageContext=s.PageContext,exports.PageProvider=s.PageProvider,exports.PermissionContext=s.PermissionsContext,exports.PermissionProvider=s.PermissionsProvider,exports.useDeepMemo=p.useDeepMemo,exports.useLanguage=p.useLanguage,exports.useLocationFilter=p.useLocationFilter,exports.usePages=p.usePages,exports.usePermissions=p.usePermissions,exports.apiType=i.apiType,exports.capitalizeWords=i.capitalizeWords,exports.convertEmptyToNull=i.convertEmptyToNull,exports.defaultUserCurrency=i.defaultUserCurrency,exports.formatNumber=i.formatNumber,exports.formatTime=i.formatTime,exports.formateDate=i.formateDate,exports.recursiveSort=i.recursiveSort,exports.removeExtraKeys=i.removeExtraKeys,exports.sortData=i.sortData,exports.useCheckSkuAndName=i.useCheckSkuAndName,exports.useDataFetcher=i.useDataFetcher,exports.useLanguageFallback=i.useLanguageFallback,exports.useMaterialCalculations=i.useMaterialCalculations,exports.valueWithCurrency=i.valueWithCurrency,exports.ThemeSelector=n.ThemeSelector,exports.ThemeWrapper=n.ThemeWrapper,exports.getTheme=n.getTheme,exports.themeVariant=n.ThemeSelector,exports.createDarkTheme=l.createDarkTheme,exports.createLightTheme=l.createLightTheme,exports.createTheme=l.createLightTheme,exports.themes=l.themes,Object.defineProperty(exports,"dayjs",{enumerable:!0,get:function(){return h.default}}),exports.COMMON_DATE_VALIDATIONS=c.COMMON_DATE_VALIDATIONS,exports.anyDateValidation=c.anyDateValidation,exports.businessDateValidation=c.businessDateValidation,exports.conditionalDateValidation=c.conditionalDateValidation,exports.createCustomMessages=c.createCustomMessages,exports.createDateValidation=c.createDateValidation,exports.createParameterizedNavigationHandler=c.createParameterizedNavigationHandler,exports.dateRangeValidation=c.dateRangeValidation,exports.dateTimeValidation=c.dateTimeValidation,exports.dateValidation=c.dateValidation,exports.futureDateValidation=c.futureDateValidation,exports.getCountry=c.getCountry,exports.loadModuleTranslations=c.loadModuleTranslations,exports.migrateRoutesToUseParams=c.migrateRoutesToUseParams,exports.migrateToPathWithId=c.migrateToPathWithId,exports.pastDateValidation=c.pastDateValidation,exports.updateTableConfigForParameterizedNavigation=c.updateTableConfigForParameterizedNavigation,exports.AccountingApi=d.api,exports.InventoryApi=d.api$1,exports.ManufacturingApi=d.api$2,exports.PurchaseApi=d.api$3,exports.RbacApi=d.api$4,exports.RentalApi=d.api$5,exports.SalesApi=d.api$6,exports.SystemFeatureApi=d.api$7,exports.setRoleURL=d.setBaseUrl,exports.setSystemFeatureURL=d.setBaseUrl$1,exports.DriveApi=m.api,exports.setDriveURL=m.setBaseUrl,exports.createLibraryStore=u.createLibraryStore,exports.fetchBom=u.fetchBom,exports.fetchCompanies=u.fetchCompanies,exports.getAllUserAndDepartmentDropdown=u.getAllUserAndDepartmentDropdown,exports.getLibrarySlices=u.getLibrarySlices,exports.headerSlice=u.headerSlice,exports.inventoryReportsTitleBarSlice=u.inventoryReportsTitleBarSlice,exports.libraryReducers=u.libraryReducers,exports.reportsTitleBarSlice=u.reportsTitleBarSlice,exports.resetHeaderState=u.resetHeaderState,exports.resetInventoryReportsTitleBarState=u.resetInventoryReportsTitleBarState,exports.resetLanguagesState=u.resetLanguagesState,exports.resetReportsTitleBarState=u.resetReportsTitleBarState,exports.resetShareState=u.resetState,exports.setAssemblyItems=u.setAssemblyItems,exports.setBomData=u.setBomData,exports.setCurrentLanguage=u.setCurrentLanguage,exports.setDepartments=u.setDepartments,exports.setInventoryCompanies=u.setCompanies$1,exports.setInventoryError=u.setError$2,exports.setInventoryLoading=u.setLoading$2,exports.setItems=u.setItems,exports.setLanguages=u.setLanguages,exports.setLanguagesData=u.setLanguagesData,exports.setReportsCompanies=u.setCompanies,exports.setReportsError=u.setError$1,exports.setReportsLoading=u.setLoading$1,exports.setShareError=u.setError,exports.setShareLoading=u.setLoading,exports.setUsers=u.setUsers,exports.setWarehouseLocations=u.setWarehouseLocations,exports.sharePage=u.sharePage,exports.shareSlice=u.shareSlice,exports.API_METHOD_GROUPS=g.API_METHOD_GROUPS,exports.createConfiguredApiClient=g.createConfiguredApiClient,exports.validateApiClient=g.validateApiClient,exports.useAppDispatch=D.useAppDispatch,exports.useAppSelector=D.useAppSelector,exports.useLibraryDispatch=D.useLibraryDispatch,exports.useLibrarySelector=D.useLibrarySelector,exports.DriveTypes=y.DriveTypes,exports.InventoryTypes=y.InventoryTypes,exports.ManufacturingTypes=y.ManufacturingTypes,exports.PurchaseTypes=y.PurchaseTypes,exports.RbacTypes=y.RbacTypes,exports.RentalTypes=y.RentalTypes,exports.SalesTypes=y.SalesTypes,exports.SystemFeatureTypes=y.SystemFeatureTypes,exports.UserApi=y.UserApi,exports.UserTypes=y.UserTypes,exports.configureLibrary=e=>{S={...S,...e}},exports.getConfigFunction=(e,t)=>{const r=S[e];if(r&&r[t])return r[t];switch(`${String(e)}.${String(t)}`){case"routes.generatePathWithId":return(e,t)=>e.replace(":id",String(t));case"dataTransforms.formatCurrency":return(e,t="USD")=>`${t} ${e.toFixed(2)}`;case"dataTransforms.formatDate":return e=>new Date(e).toLocaleDateString();case"validation.validateEmail":return e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);case"permissions.hasPermission":return()=>!0;case"localization.getCurrentLanguage":return()=>"en";case"localization.translate":return e=>e;case"notifications.showSuccess":case"notifications.showError":case"notifications.showInfo":return e=>{};default:return(...r)=>{throw new Error(`Configuration not provided for ${String(e)}.${String(t)}. Please configure this in your consuming application.`)}}},exports.getLibraryConfig=()=>S;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/config/index.ts"],"sourcesContent":["// Configuration system for application-specific business logic\n\nexport interface LibraryConfig {\n // Route and navigation configuration\n routes?: {\n // Function to generate paths with IDs\n generatePathWithId?: (path: string, id: string | number) => string;\n // Base paths for different modules\n basePaths?: {\n [module: string]: string;\n };\n };\n \n // Data transformation functions\n dataTransforms?: {\n // Function to transform API responses\n transformApiResponse?: (response: any, context?: string) => any;\n // Function to format currency\n formatCurrency?: (amount: number, currency?: string) => string;\n // Function to format dates\n formatDate?: (date: any, format?: string) => string;\n };\n \n // Validation functions\n validation?: {\n // Custom validation rules\n validateField?: (value: any, rules: any) => boolean | string;\n // Phone number validation\n validatePhone?: (phone: string, country?: string) => boolean;\n // Email validation\n validateEmail?: (email: string) => boolean;\n };\n \n // Permission system\n permissions?: {\n // Check if user has permission\n hasPermission?: (permission: string, context?: any) => boolean;\n // Get user permissions\n getUserPermissions?: () => string[];\n };\n \n // Localization\n localization?: {\n // Get current language\n getCurrentLanguage?: () => string;\n // Translate function\n translate?: (key: string, params?: any) => string;\n // Get available languages\n getAvailableLanguages?: () => Array<{ code: string; name: string }>;\n };\n \n // File handling\n fileHandling?: {\n // Upload file function\n uploadFile?: (file: File, options?: any) => Promise<any>;\n // Download file function\n downloadFile?: (fileId: string, options?: any) => Promise<any>;\n // Get file URL\n getFileUrl?: (fileId: string) => string;\n };\n \n // Notification system\n notifications?: {\n // Show success notification\n showSuccess?: (message: string, options?: any) => void;\n // Show error notification\n showError?: (message: string, options?: any) => void;\n // Show info notification\n showInfo?: (message: string, options?: any) => void;\n };\n}\n\nlet libraryConfig: LibraryConfig = {};\n\nexport const configureLibrary = (config: LibraryConfig) => {\n libraryConfig = { ...libraryConfig, ...config };\n};\n\nexport const getLibraryConfig = () => libraryConfig;\n\n// Helper function to get configuration with fallback\nexport const getConfigFunction = <T extends keyof LibraryConfig>(\n category: T,\n functionName: keyof LibraryConfig[T]\n): any => {\n const categoryConfig = libraryConfig[category];\n if (categoryConfig && categoryConfig[functionName]) {\n return categoryConfig[functionName];\n }\n \n // Return default implementation or throw error based on criticality\n switch (`${String(category)}.${String(functionName)}`) {\n case 'routes.generatePathWithId':\n return (path: string, id: string | number) => path.replace(':id', String(id));\n \n case 'dataTransforms.formatCurrency':\n return (amount: number, currency = 'USD') => `${currency} ${amount.toFixed(2)}`;\n \n case 'dataTransforms.formatDate':\n return (date: any) => new Date(date).toLocaleDateString();\n \n case 'validation.validateEmail':\n return (email: string) => /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email);\n \n case 'permissions.hasPermission':\n return () => true; // Default to allowing all permissions\n \n case 'localization.getCurrentLanguage':\n return () => 'en';\n \n case 'localization.translate':\n return (key: string) => key; // Return key as fallback\n \n case 'notifications.showSuccess':\n case 'notifications.showError':\n case 'notifications.showInfo':\n return (message: string) => console.log(message);\n \n default:\n return (...args: any[]) => {\n throw new Error(`Configuration not provided for ${String(category)}.${String(functionName)}. Please configure this in your consuming application.`);\n };\n }\n};"],"names":["libraryConfig","config","category","functionName","categoryConfig","String","path","id","replace","amount","currency","toFixed","date","Date","toLocaleDateString","email","test","key","message","args","Error"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/config/index.ts"],"sourcesContent":["// Configuration system for application-specific business logic\n\nexport interface LibraryConfig {\n // Route and navigation configuration\n routes?: {\n // Function to generate paths with IDs\n generatePathWithId?: (path: string, id: string | number) => string;\n // Base paths for different modules\n basePaths?: {\n [module: string]: string;\n };\n };\n \n // Data transformation functions\n dataTransforms?: {\n // Function to transform API responses\n transformApiResponse?: (response: any, context?: string) => any;\n // Function to format currency\n formatCurrency?: (amount: number, currency?: string) => string;\n // Function to format dates\n formatDate?: (date: any, format?: string) => string;\n };\n \n // Validation functions\n validation?: {\n // Custom validation rules\n validateField?: (value: any, rules: any) => boolean | string;\n // Phone number validation\n validatePhone?: (phone: string, country?: string) => boolean;\n // Email validation\n validateEmail?: (email: string) => boolean;\n };\n \n // Permission system\n permissions?: {\n // Check if user has permission\n hasPermission?: (permission: string, context?: any) => boolean;\n // Get user permissions\n getUserPermissions?: () => string[];\n };\n \n // Localization\n localization?: {\n // Get current language\n getCurrentLanguage?: () => string;\n // Translate function\n translate?: (key: string, params?: any) => string;\n // Get available languages\n getAvailableLanguages?: () => Array<{ code: string; name: string }>;\n };\n \n // File handling\n fileHandling?: {\n // Upload file function\n uploadFile?: (file: File, options?: any) => Promise<any>;\n // Download file function\n downloadFile?: (fileId: string, options?: any) => Promise<any>;\n // Get file URL\n getFileUrl?: (fileId: string) => string;\n };\n \n // Notification system\n notifications?: {\n // Show success notification\n showSuccess?: (message: string, options?: any) => void;\n // Show error notification\n showError?: (message: string, options?: any) => void;\n // Show info notification\n showInfo?: (message: string, options?: any) => void;\n };\n}\n\nlet libraryConfig: LibraryConfig = {};\n\nexport const configureLibrary = (config: LibraryConfig) => {\n libraryConfig = { ...libraryConfig, ...config };\n};\n\nexport const getLibraryConfig = () => libraryConfig;\n\n// Helper function to get configuration with fallback\nexport const getConfigFunction = <T extends keyof LibraryConfig>(\n category: T,\n functionName: keyof LibraryConfig[T]\n): any => {\n const categoryConfig = libraryConfig[category];\n if (categoryConfig && categoryConfig[functionName]) {\n return categoryConfig[functionName];\n }\n \n // Return default implementation or throw error based on criticality\n switch (`${String(category)}.${String(functionName)}`) {\n case 'routes.generatePathWithId':\n return (path: string, id: string | number) => path.replace(':id', String(id));\n \n case 'dataTransforms.formatCurrency':\n return (amount: number, currency = 'USD') => `${currency} ${amount.toFixed(2)}`;\n \n case 'dataTransforms.formatDate':\n return (date: any) => new Date(date).toLocaleDateString();\n \n case 'validation.validateEmail':\n return (email: string) => /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email);\n \n case 'permissions.hasPermission':\n return () => true; // Default to allowing all permissions\n \n case 'localization.getCurrentLanguage':\n return () => 'en';\n \n case 'localization.translate':\n return (key: string) => key; // Return key as fallback\n \n case 'notifications.showSuccess':\n case 'notifications.showError':\n case 'notifications.showInfo':\n return (message: string) => console.log(message);\n \n default:\n return (...args: any[]) => {\n throw new Error(`Configuration not provided for ${String(category)}.${String(functionName)}. Please configure this in your consuming application.`);\n };\n }\n};"],"names":["libraryConfig","config","category","functionName","categoryConfig","String","path","id","replace","amount","currency","toFixed","date","Date","toLocaleDateString","email","test","key","message","args","Error"],"mappings":"wvBAwEA,IAAIA,EAA+B,CAAA,usjBAEFC,IAC/BD,EAAgB,IAAKA,KAAkBC,8BAMR,CAC/BC,EACAC,KAEA,MAAMC,EAAiBJ,EAAcE,GACrC,GAAIE,GAAkBA,EAAeD,GACnC,OAAOC,EAAeD,GAIxB,OAAQ,GAAGE,OAAOH,MAAaG,OAAOF,MACpC,IAAK,4BACH,MAAO,CAACG,EAAcC,IAAwBD,EAAKE,QAAQ,MAAOH,OAAOE,IAE3E,IAAK,gCACH,MAAO,CAACE,EAAgBC,EAAW,QAAU,GAAGA,KAAYD,EAAOE,QAAQ,KAE7E,IAAK,4BACH,OAAQC,GAAc,IAAIC,KAAKD,GAAME,qBAEvC,IAAK,2BACH,OAAQC,GAAkB,6BAA6BC,KAAKD,GAE9D,IAAK,4BACH,MAAO,KAAM,EAEf,IAAK,kCACH,MAAO,IAAM,KAEf,IAAK,yBACH,OAAQE,GAAgBA,EAE1B,IAAK,4BACL,IAAK,0BACL,IAAK,yBACH,OAAQC,MAEV,QACE,MAAO,IAAIC,KACT,MAAM,IAAIC,MAAM,kCAAkCf,OAAOH,MAAaG,OAAOF,wFA1CrD,IAAMH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-utils-93uihT3j.esm.js","sources":["../src/components/icons/document.tsx","../src/components/chip/chip.tsx","../src/utils/calculation.ts","../src/components/menu/menu.tsx","../src/components/material-table/aggregation-fns/index.ts","../src/components/material-table/components/default-aggregation.tsx","../src/components/value-field/value-field.tsx","../src/utils/common-utility.tsx","../src/utils/date-range.ts","../src/utils/form-builder-deconversion.ts","../src/utils/navigation-utils.ts"],"sourcesContent":["import { createSvgIcon } from '@mui/material';\nimport Styled from './custom-styled-icon';\n\nexport const Document = Styled(\n\tcreateSvgIcon(\n\t\t<svg\n\t\t\twidth='20'\n\t\t\theight='20'\n\t\t\tviewBox='0 0 20 20'\n\t\t\tfill='none'\n\t\t\txmlns='http://www.w3.org/2000/svg'>\n\t\t\t<path\n\t\t\t\td='M18.3333 8.33332V12.5C18.3333 16.6667 16.6667 18.3333 12.5 18.3333H7.5C3.33333 18.3333 1.66666 16.6667 1.66666 12.5V7.49999C1.66666 3.33332 3.33333 1.66666 7.5 1.66666H11.6667'\n\t\t\t\tstroke='currentColor'\n\t\t\t\tstrokeWidth='1.5'\n\t\t\t\tstrokeLinecap='round'\n\t\t\t\tstrokeLinejoin='round'\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td='M18.3333 8.33332H15C12.5 8.33332 11.6667 7.49999 11.6667 4.99999V1.66666L18.3333 8.33332Z'\n\t\t\t\tstroke='currentColor'\n\t\t\t\tstrokeWidth='1.5'\n\t\t\t\tstrokeLinecap='round'\n\t\t\t\tstrokeLinejoin='round'\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td='M5.83334 10.8333H10.8333'\n\t\t\t\tstroke='currentColor'\n\t\t\t\tstrokeWidth='1.5'\n\t\t\t\tstrokeLinecap='round'\n\t\t\t\tstrokeLinejoin='round'\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td='M5.83334 14.1667H9.16667'\n\t\t\t\tstroke='currentColor'\n\t\t\t\tstrokeWidth='1.5'\n\t\t\t\tstrokeLinecap='round'\n\t\t\t\tstrokeLinejoin='round'\n\t\t\t/>\n\t\t</svg>,\n\t\t'Document'\n\t)\n);\n\nexport default Document;\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 default Chip;\n","export const calculateEntries = (\n\titems: any[],\n\texpenses?: any[],\n\tadditionalDiscountOn?: string,\n\tadditionalDiscountPercentage?: number,\n\tprovidedAdditionalDiscountAmount?: number,\n\troundOff?: boolean,\n\troundOffAmount?: number,\n promotionAmount?: number\n) => {\n\tlet totalQuantity = 0,\n\t\ttotalDiscount = 0,\n\t\ttotalTaxAmount = 0,\n\t\ttotalAmountExcludingAll = 0,\n\t\ttotalAmountIncludingAll = 0,\n\t\tadditionalDiscountAmount = 0,\n\t\ttotalGrossAmount = 0;\n\n\tif (items.length) {\n\t\titems.forEach((item) => {\n\t\t\ttotalQuantity += Number(item?.quantity || 0);\n\t\t\ttotalDiscount += Number(item?.discount_amount || 0);\n\t\t\ttotalAmountIncludingAll += Number(\n\t\t\t\titem.total_amount || 0\n\t\t\t);\n\t\t\ttotalTaxAmount += Number(item.tax_amount);\n\t\t\ttotalAmountExcludingAll +=\n\t\t\t\tNumber(item.quantity || 0) *\n\t\t\t\tNumber(item.rate || 0);\n\t\t\ttotalGrossAmount += Number(item.gross_amount || 0);\n\t\t});\n\t}\n\tif (expenses?.length) {\n\t\texpenses.forEach((item) => {\n\t\t\ttotalQuantity += 1;\n\t\t\ttotalDiscount += Number(item.discount_amount || 0);\n\t\t\ttotalAmountIncludingAll += Number(\n\t\t\t\titem.total_amount || 0\n\t\t\t);\n\t\t\ttotalTaxAmount += Number(item.tax_amount);\n\t\t\ttotalAmountExcludingAll += 1 * Number(item.rate);\n\t\t\ttotalGrossAmount += Number(item.gross_amount || 0);\n\t\t});\n\t}\n\n\tlet finalAmount = totalAmountIncludingAll;\n\n\tif (additionalDiscountOn) {\n\t\tif (additionalDiscountOn === 'Net Amount') {\n\t\t\tif (\n\t\t\t\tadditionalDiscountPercentage &&\n\t\t\t\tNumber(additionalDiscountPercentage) !== 0\n\t\t\t) {\n\t\t\t\tadditionalDiscountAmount =\n\t\t\t\t\ttotalAmountIncludingAll * (additionalDiscountPercentage / 100);\n\t\t\t} else {\n\t\t\t\tadditionalDiscountAmount = providedAdditionalDiscountAmount || 0;\n\t\t\t}\n\t\t} else if (additionalDiscountOn === 'Gross Amount') {\n\t\t\tif (\n\t\t\t\tadditionalDiscountPercentage &&\n\t\t\t\tNumber(additionalDiscountPercentage) !== 0\n\t\t\t) {\n\t\t\t\tadditionalDiscountAmount =\n\t\t\t\t\ttotalGrossAmount * (additionalDiscountPercentage / 100);\n\t\t\t} else {\n\t\t\t\tadditionalDiscountAmount = providedAdditionalDiscountAmount || 0;\n\t\t\t}\n\t\t}\n\t}\n\n\tfinalAmount =\n\t\tadditionalDiscountOn === 'Gross Amount'\n\t\t\t? Number(totalAmountIncludingAll) - Number(additionalDiscountAmount)\n\t\t\t: Number(totalAmountIncludingAll) - Number(additionalDiscountAmount);\n \n if(Number(promotionAmount)) {\n finalAmount = finalAmount - Number(promotionAmount)\n }\n\n\tconst actualTotalAmount = finalAmount;\n\tif (roundOff && roundOffAmount && Number(roundOffAmount)) {\n\t\tfinalAmount = Math.round(finalAmount / roundOffAmount) * roundOffAmount;\n\t}\n\tconst roundOffDifference = Number(finalAmount) - Number(actualTotalAmount);\n\tconst totalItemsExpenseDiscount = totalDiscount;\n\ttotalDiscount += Number(additionalDiscountAmount);\n\treturn {\n\t\ttotalQuantity,\n\t\ttotalDiscount,\n\t\ttotalItemsExpenseDiscount,\n\t\ttotalTaxAmount,\n\t\ttotalAmountExludingAll: totalAmountExcludingAll,\n\t\ttotalAmountIncludingAll,\n\t\tadditinoalDiscountAmount: additionalDiscountAmount,\n\t\ttotalGrossAmount,\n\t\tactualTotalAmount,\n\t\troundOffDifference,\n\t\tfinalAmount\n\t};\n};","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 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 default DefaultAggregation;\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=\"s5\" color={\"theme.secondary.700\"}>\n {label}\n </Typography>\n <Typography weight={\"medium\"} type=\"s3\" color={\"theme.secondary.1000\"} sx={{ wordBreak:'break-all', pr: 1 }} {...childrenTypoProps}>\n {children}\n </Typography>\n </Box>\n );\n};\n\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 } 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';\nconst downloadFile = async (url, fileName) => {\n\ttry {\n\t\t\t// Fetch the file from the provided URL\n\t\t\tconst response = await fetch(url);\n\t\t\tif (!response.ok) {\n\t\t\t\t\tthrow new Error(`Failed to fetch file: ${response.statusText}`);\n\t\t\t}\n\n\t\t\t// Convert the response to a blob\n\t\t\tconst blob = await response.blob();\n\n\t\t\t// Create a temporary URL for the blob\n\t\t\tconst blobUrl = window.URL.createObjectURL(blob);\n\n\t\t\t// Create a link element\n\t\t\tconst link = document.createElement('a');\n\t\t\tlink.href = blobUrl;\n\t\t\tlink.download = fileName || 'downloaded-file'; // Fallback filename if none provided\n\n\t\t\t// Append link to the body, trigger click, and remove it\n\t\t\tdocument.body.appendChild(link);\n\t\t\tlink.click();\n\t\t\tdocument.body.removeChild(link);\n\n\t\t\t// Revoke the blob URL to free up memory\n\t\t\twindow.URL.revokeObjectURL(blobUrl);\n\t} catch (error) {\n\t\t\tconsole.error('Error downloading file:', error);\n\t\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\ntype CurrencySymbolFn = (row: MRT_Row<MRT_RowData>) => string;\ntype StatusClassesFn = (row: MRT_Row<MRT_RowData>) => string;\ntype RedirectionLinkFn = (row: MRT_Row<MRT_RowData>) => string;\n\ninterface 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\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\t\t\t\t\t\n\t\t\t\t}\n\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<>\n\t\t\t\t\t\t\t{Array.isArray(renderedCellValue) ? (\n\t\t\t\t\t\t\t\t<>\n\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{renderedCellValue.map((rcv) => (\n\t\t\t\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\t\t\t\ttype='normal'\n\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\tlabel={\n\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{typeof rcv === 'object' ? _.get(rcv, column?.typeArrayAccessorKey||'', '') : rcv}\n\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}\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</Box> : '-'}\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\t<Chip\n\t\t\t\t\t\t\t\t\ttype='normal'\n\t\t\t\t\t\t\t\t\tclassName={\n\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(statusClasses instanceof Function\n\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: `${statusClasses}${getStatusClass(renderedCellValue)}`)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\n\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{renderedCellValue}\n\t\t\t\t\t\t\t\t\t\t</Typography>\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) : (\n\t\t\t\t\t\t'-'\n\t\t\t\t\t);\n\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\t...(renderedCellValue ? \n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\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\t\t\tcolor: theme.palette?.theme.tertiary4[900]\n\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\t\tbackgroundColor: theme.palette?.theme.tertiary6[200],\n\t\t\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\t\t}\n\t\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\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}\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 <ValueField key={label} label={t?.(label)}>\n\t\t{formatFn ? formatFn(value) : value ?? '-'}\n\t </ValueField>\n\t);\n };\n","import dayjs from 'dayjs';\r\n\r\n/**\r\n * Date range constants\r\n */\r\nexport const RANGE = {\r\n TODAY: 'Today',\r\n YESTERDAY: 'Yesterday',\r\n THIS_WEEK: 'This Week',\r\n PREVIOUS_WEEK: 'Previous Week',\r\n THIS_MONTH: 'This Month',\r\n PREVIOUS_MONTH: 'Previous Month',\r\n THIS_QUARTER: 'This Quarter',\r\n PREVIOUS_QUARTER: 'Previous Quarter',\r\n THIS_YEAR: 'This Year',\r\n PREVIOUS_YEAR: 'Previous Year',\r\n CUSTOM: 'Custom',\r\n} as const;\r\n\r\nexport type DateRangeType = keyof typeof RANGE;\r\n\r\ninterface HandleCompareDateRangeParams {\r\n range: string;\r\n from?: string;\r\n to?: string;\r\n}\r\n\r\ninterface DateRangeResult {\r\n from: string;\r\n to: string;\r\n}\r\n\r\n/**\r\n * Calculate date range based on the range type\r\n */\r\nexport const handleCompareDateRange = async (\r\n params: HandleCompareDateRangeParams\r\n): Promise<DateRangeResult> => {\r\n const { range, from = '', to = '' } = params;\r\n const today = dayjs();\r\n let startDate: dayjs.Dayjs;\r\n let endDate: dayjs.Dayjs;\r\n\r\n switch (range) {\r\n case RANGE.TODAY:\r\n startDate = today.startOf('day');\r\n endDate = today.endOf('day');\r\n break;\r\n\r\n case RANGE.YESTERDAY:\r\n startDate = today.subtract(1, 'day').startOf('day');\r\n endDate = today.subtract(1, 'day').endOf('day');\r\n break;\r\n\r\n case RANGE.THIS_WEEK:\r\n startDate = today.startOf('week');\r\n endDate = today.endOf('week');\r\n break;\r\n\r\n case RANGE.PREVIOUS_WEEK:\r\n startDate = today.subtract(1, 'week').startOf('week');\r\n endDate = today.subtract(1, 'week').endOf('week');\r\n break;\r\n\r\n case RANGE.THIS_MONTH:\r\n startDate = today.startOf('month');\r\n endDate = today.endOf('month');\r\n break;\r\n\r\n case RANGE.PREVIOUS_MONTH:\r\n startDate = today.subtract(1, 'month').startOf('month');\r\n endDate = today.subtract(1, 'month').endOf('month');\r\n break;\r\n\r\n case RANGE.THIS_QUARTER:\r\n const currentQuarter = Math.floor(today.month() / 3);\r\n startDate = today.month(currentQuarter * 3).startOf('month');\r\n endDate = today.month(currentQuarter * 3 + 2).endOf('month');\r\n break;\r\n\r\n case RANGE.PREVIOUS_QUARTER:\r\n const prevQuarter = Math.floor(today.month() / 3) - 1;\r\n startDate = today.month(prevQuarter * 3).startOf('month');\r\n endDate = today.month(prevQuarter * 3 + 2).endOf('month');\r\n break;\r\n\r\n case RANGE.THIS_YEAR:\r\n startDate = today.startOf('year');\r\n endDate = today.endOf('year');\r\n break;\r\n\r\n case RANGE.PREVIOUS_YEAR:\r\n startDate = today.subtract(1, 'year').startOf('year');\r\n endDate = today.subtract(1, 'year').endOf('year');\r\n break;\r\n\r\n case RANGE.CUSTOM:\r\n // For custom range, use the provided from/to dates or today\r\n startDate = from ? dayjs(from) : today.startOf('day');\r\n endDate = to ? dayjs(to) : today.endOf('day');\r\n break;\r\n\r\n default:\r\n // Default to today if range is not recognized\r\n startDate = today.startOf('day');\r\n endDate = today.endOf('day');\r\n }\r\n\r\n return {\r\n from: startDate.format('YYYY-MM-DD'),\r\n to: endDate.format('YYYY-MM-DD'),\r\n };\r\n};\r\n\r\n// Synchronous version (for compatibility)\r\nexport const handleCompareDateRangeSync = (\r\n params: HandleCompareDateRangeParams\r\n): DateRangeResult => {\r\n const { range, from = '', to = '' } = params;\r\n const today = dayjs();\r\n let startDate: dayjs.Dayjs;\r\n let endDate: dayjs.Dayjs;\r\n\r\n switch (range) {\r\n case RANGE.TODAY:\r\n startDate = today.startOf('day');\r\n endDate = today.endOf('day');\r\n break;\r\n\r\n case RANGE.YESTERDAY:\r\n startDate = today.subtract(1, 'day').startOf('day');\r\n endDate = today.subtract(1, 'day').endOf('day');\r\n break;\r\n\r\n case RANGE.THIS_WEEK:\r\n startDate = today.startOf('week');\r\n endDate = today.endOf('week');\r\n break;\r\n\r\n case RANGE.PREVIOUS_WEEK:\r\n startDate = today.subtract(1, 'week').startOf('week');\r\n endDate = today.subtract(1, 'week').endOf('week');\r\n break;\r\n\r\n case RANGE.THIS_MONTH:\r\n startDate = today.startOf('month');\r\n endDate = today.endOf('month');\r\n break;\r\n\r\n case RANGE.PREVIOUS_MONTH:\r\n startDate = today.subtract(1, 'month').startOf('month');\r\n endDate = today.subtract(1, 'month').endOf('month');\r\n break;\r\n\r\n case RANGE.THIS_QUARTER:\r\n const currentQuarter = Math.floor(today.month() / 3);\r\n startDate = today.month(currentQuarter * 3).startOf('month');\r\n endDate = today.month(currentQuarter * 3 + 2).endOf('month');\r\n break;\r\n\r\n case RANGE.PREVIOUS_QUARTER:\r\n const prevQuarter = Math.floor(today.month() / 3) - 1;\r\n startDate = today.month(prevQuarter * 3).startOf('month');\r\n endDate = today.month(prevQuarter * 3 + 2).endOf('month');\r\n break;\r\n\r\n case RANGE.THIS_YEAR:\r\n startDate = today.startOf('year');\r\n endDate = today.endOf('year');\r\n break;\r\n\r\n case RANGE.PREVIOUS_YEAR:\r\n startDate = today.subtract(1, 'year').startOf('year');\r\n endDate = today.subtract(1, 'year').endOf('year');\r\n break;\r\n\r\n case RANGE.CUSTOM:\r\n // For custom range, use the provided from/to dates or today\r\n startDate = from ? dayjs(from) : today.startOf('day');\r\n endDate = to ? dayjs(to) : today.endOf('day');\r\n break;\r\n\r\n default:\r\n // Default to today if range is not recognized\r\n startDate = today.startOf('day');\r\n endDate = today.endOf('day');\r\n }\r\n\r\n return {\r\n from: startDate.format('YYYY-MM-DD'),\r\n to: endDate.format('YYYY-MM-DD'),\r\n };\r\n};\r\n\r\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 currentTab.data.push({ ...otherSectionDetails, ...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 outputData.section.push({ ...otherSectionDetails, ...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","import { NavigateFunction } from 'react-router-dom';\n\n/**\n * Navigates to a route with an ID parameter, replacing the :id placeholder in the route path\n * This is a more RESTful approach than using location state\n * \n * @param navigate - The navigate function from useNavigate hook\n * @param routePath - The route path with :id placeholder\n * @param id - The ID to replace the placeholder with\n * @param fallbackState - Optional state to pass to the navigate function as fallback\n */\nexport const navigateWithId = (\n navigate: NavigateFunction,\n routePath: string,\n id: string | number,\n fallbackState?: any\n) => {\n // Replace :id in the route path with the actual ID\n const path = routePath.replace(':id', id.toString());\n \n // Navigate to the path, optionally with state as fallback for backward compatibility\n navigate(path, fallbackState ? { state: fallbackState } : undefined);\n};\n\n/**\n * Extracts the ID from the URL parameters and returns it\n * If the ID is not found in the URL, falls back to using location.state\n * \n * @param params - The params object from useParams hook\n * @param location - The location object from useLocation hook\n * @param idField - The field name in the location.state object that contains the ID (default: 'id')\n * @returns The ID from params or location.state\n */\nexport const getEntityId = (\n params: Record<string, string | undefined>,\n location: { state: any },\n idField: string = 'id'\n): string | undefined => {\n // First try to get the ID from URL params\n if (params.id) {\n return params.id;\n }\n \n // Fall back to location.state if params.id is not available\n if (location.state && location.state[idField]) {\n return location.state[idField].toString();\n }\n \n return undefined;\n}; "],"names":["MUIChip","MUIMenu","sum","React","_a","_b","_c","column","member"],"mappings":";;;;;;;AAGO,MAAM,WAAW;AAAA,EACvB;AAAA,IACC;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,OAAM;AAAA,QACN,QAAO;AAAA,QACP,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,OAAM;AAAA,QACN,UAAA;AAAA,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,GAAE;AAAA,cACF,QAAO;AAAA,cACP,aAAY;AAAA,cACZ,eAAc;AAAA,cACd,gBAAe;AAAA,YAAA;AAAA,UAAA;AAAA,UAEhB;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,GAAE;AAAA,cACF,QAAO;AAAA,cACP,aAAY;AAAA,cACZ,eAAc;AAAA,cACd,gBAAe;AAAA,YAAA;AAAA,UAAA;AAAA,UAEhB;AAAA,YAA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,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;AClaO,MAAM,iBAAiB,CAC5B,UACA,WACA,IACA,kBACG;AAEH,QAAM,OAAO,UAAU,QAAQ,OAAO,GAAG,UAAU;AAGnD,WAAS,MAAM,gBAAgB,EAAE,OAAO,cAAA,IAAkB,MAAS;AACrE;AAWO,MAAM,cAAc,CACzB,QACA,UACA,UAAkB,SACK;AAEvB,MAAI,OAAO,IAAI;AACb,WAAO,OAAO;AAAA,EAChB;AAGA,MAAI,SAAS,SAAS,SAAS,MAAM,OAAO,GAAG;AAC7C,WAAO,SAAS,MAAM,OAAO,EAAE,SAAA;AAAA,EACjC;AAEA,SAAO;AACT;"}
|
|
1
|
+
{"version":3,"file":"navigation-utils-93uihT3j.esm.js","sources":["../src/components/icons/document.tsx","../src/components/chip/chip.tsx","../src/utils/calculation.ts","../src/components/menu/menu.tsx","../src/components/material-table/aggregation-fns/index.ts","../src/components/material-table/components/default-aggregation.tsx","../src/components/value-field/value-field.tsx","../src/utils/common-utility.tsx","../src/utils/date-range.ts","../src/utils/form-builder-deconversion.ts","../src/utils/navigation-utils.ts"],"sourcesContent":["import { createSvgIcon } from '@mui/material';\nimport Styled from './custom-styled-icon';\n\nexport const Document = Styled(\n\tcreateSvgIcon(\n\t\t<svg\n\t\t\twidth='20'\n\t\t\theight='20'\n\t\t\tviewBox='0 0 20 20'\n\t\t\tfill='none'\n\t\t\txmlns='http://www.w3.org/2000/svg'>\n\t\t\t<path\n\t\t\t\td='M18.3333 8.33332V12.5C18.3333 16.6667 16.6667 18.3333 12.5 18.3333H7.5C3.33333 18.3333 1.66666 16.6667 1.66666 12.5V7.49999C1.66666 3.33332 3.33333 1.66666 7.5 1.66666H11.6667'\n\t\t\t\tstroke='currentColor'\n\t\t\t\tstrokeWidth='1.5'\n\t\t\t\tstrokeLinecap='round'\n\t\t\t\tstrokeLinejoin='round'\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td='M18.3333 8.33332H15C12.5 8.33332 11.6667 7.49999 11.6667 4.99999V1.66666L18.3333 8.33332Z'\n\t\t\t\tstroke='currentColor'\n\t\t\t\tstrokeWidth='1.5'\n\t\t\t\tstrokeLinecap='round'\n\t\t\t\tstrokeLinejoin='round'\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td='M5.83334 10.8333H10.8333'\n\t\t\t\tstroke='currentColor'\n\t\t\t\tstrokeWidth='1.5'\n\t\t\t\tstrokeLinecap='round'\n\t\t\t\tstrokeLinejoin='round'\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td='M5.83334 14.1667H9.16667'\n\t\t\t\tstroke='currentColor'\n\t\t\t\tstrokeWidth='1.5'\n\t\t\t\tstrokeLinecap='round'\n\t\t\t\tstrokeLinejoin='round'\n\t\t\t/>\n\t\t</svg>,\n\t\t'Document'\n\t)\n);\n\nexport default Document;\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 default Chip;\n","export const calculateEntries = (\n\titems: any[],\n\texpenses?: any[],\n\tadditionalDiscountOn?: string,\n\tadditionalDiscountPercentage?: number,\n\tprovidedAdditionalDiscountAmount?: number,\n\troundOff?: boolean,\n\troundOffAmount?: number,\n promotionAmount?: number\n) => {\n\tlet totalQuantity = 0,\n\t\ttotalDiscount = 0,\n\t\ttotalTaxAmount = 0,\n\t\ttotalAmountExcludingAll = 0,\n\t\ttotalAmountIncludingAll = 0,\n\t\tadditionalDiscountAmount = 0,\n\t\ttotalGrossAmount = 0;\n\n\tif (items.length) {\n\t\titems.forEach((item) => {\n\t\t\ttotalQuantity += Number(item?.quantity || 0);\n\t\t\ttotalDiscount += Number(item?.discount_amount || 0);\n\t\t\ttotalAmountIncludingAll += Number(\n\t\t\t\titem.total_amount || 0\n\t\t\t);\n\t\t\ttotalTaxAmount += Number(item.tax_amount);\n\t\t\ttotalAmountExcludingAll +=\n\t\t\t\tNumber(item.quantity || 0) *\n\t\t\t\tNumber(item.rate || 0);\n\t\t\ttotalGrossAmount += Number(item.gross_amount || 0);\n\t\t});\n\t}\n\tif (expenses?.length) {\n\t\texpenses.forEach((item) => {\n\t\t\ttotalQuantity += 1;\n\t\t\ttotalDiscount += Number(item.discount_amount || 0);\n\t\t\ttotalAmountIncludingAll += Number(\n\t\t\t\titem.total_amount || 0\n\t\t\t);\n\t\t\ttotalTaxAmount += Number(item.tax_amount);\n\t\t\ttotalAmountExcludingAll += 1 * Number(item.rate);\n\t\t\ttotalGrossAmount += Number(item.gross_amount || 0);\n\t\t});\n\t}\n\n\tlet finalAmount = totalAmountIncludingAll;\n\n\tif (additionalDiscountOn) {\n\t\tif (additionalDiscountOn === 'Net Amount') {\n\t\t\tif (\n\t\t\t\tadditionalDiscountPercentage &&\n\t\t\t\tNumber(additionalDiscountPercentage) !== 0\n\t\t\t) {\n\t\t\t\tadditionalDiscountAmount =\n\t\t\t\t\ttotalAmountIncludingAll * (additionalDiscountPercentage / 100);\n\t\t\t} else {\n\t\t\t\tadditionalDiscountAmount = providedAdditionalDiscountAmount || 0;\n\t\t\t}\n\t\t} else if (additionalDiscountOn === 'Gross Amount') {\n\t\t\tif (\n\t\t\t\tadditionalDiscountPercentage &&\n\t\t\t\tNumber(additionalDiscountPercentage) !== 0\n\t\t\t) {\n\t\t\t\tadditionalDiscountAmount =\n\t\t\t\t\ttotalGrossAmount * (additionalDiscountPercentage / 100);\n\t\t\t} else {\n\t\t\t\tadditionalDiscountAmount = providedAdditionalDiscountAmount || 0;\n\t\t\t}\n\t\t}\n\t}\n\n\tfinalAmount =\n\t\tadditionalDiscountOn === 'Gross Amount'\n\t\t\t? Number(totalAmountIncludingAll) - Number(additionalDiscountAmount)\n\t\t\t: Number(totalAmountIncludingAll) - Number(additionalDiscountAmount);\n \n if(Number(promotionAmount)) {\n finalAmount = finalAmount - Number(promotionAmount)\n }\n\n\tconst actualTotalAmount = finalAmount;\n\tif (roundOff && roundOffAmount && Number(roundOffAmount)) {\n\t\tfinalAmount = Math.round(finalAmount / roundOffAmount) * roundOffAmount;\n\t}\n\tconst roundOffDifference = Number(finalAmount) - Number(actualTotalAmount);\n\tconst totalItemsExpenseDiscount = totalDiscount;\n\ttotalDiscount += Number(additionalDiscountAmount);\n\treturn {\n\t\ttotalQuantity,\n\t\ttotalDiscount,\n\t\ttotalItemsExpenseDiscount,\n\t\ttotalTaxAmount,\n\t\ttotalAmountExludingAll: totalAmountExcludingAll,\n\t\ttotalAmountIncludingAll,\n\t\tadditinoalDiscountAmount: additionalDiscountAmount,\n\t\ttotalGrossAmount,\n\t\tactualTotalAmount,\n\t\troundOffDifference,\n\t\tfinalAmount\n\t};\n};","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 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 default DefaultAggregation;\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=\"s5\" color={\"theme.secondary.700\"}>\n {label}\n </Typography>\n <Typography weight={\"medium\"} type=\"s3\" color={\"theme.secondary.1000\"} sx={{ wordBreak:'break-all', pr: 1 }} {...childrenTypoProps}>\n {children}\n </Typography>\n </Box>\n );\n};\n\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 } 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';\nconst downloadFile = async (url, fileName) => {\n\ttry {\n\t\t\t// Fetch the file from the provided URL\n\t\t\tconst response = await fetch(url);\n\t\t\tif (!response.ok) {\n\t\t\t\t\tthrow new Error(`Failed to fetch file: ${response.statusText}`);\n\t\t\t}\n\n\t\t\t// Convert the response to a blob\n\t\t\tconst blob = await response.blob();\n\n\t\t\t// Create a temporary URL for the blob\n\t\t\tconst blobUrl = window.URL.createObjectURL(blob);\n\n\t\t\t// Create a link element\n\t\t\tconst link = document.createElement('a');\n\t\t\tlink.href = blobUrl;\n\t\t\tlink.download = fileName || 'downloaded-file'; // Fallback filename if none provided\n\n\t\t\t// Append link to the body, trigger click, and remove it\n\t\t\tdocument.body.appendChild(link);\n\t\t\tlink.click();\n\t\t\tdocument.body.removeChild(link);\n\n\t\t\t// Revoke the blob URL to free up memory\n\t\t\twindow.URL.revokeObjectURL(blobUrl);\n\t} catch (error) {\n\t\t\tconsole.error('Error downloading file:', error);\n\t\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\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\t\t\t\t\t\n\t\t\t\t}\n\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<>\n\t\t\t\t\t\t\t{Array.isArray(renderedCellValue) ? (\n\t\t\t\t\t\t\t\t<>\n\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{renderedCellValue.map((rcv) => (\n\t\t\t\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\t\t\t\ttype='normal'\n\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\tlabel={\n\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{typeof rcv === 'object' ? _.get(rcv, column?.typeArrayAccessorKey||'', '') : rcv}\n\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}\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</Box> : '-'}\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\t<Chip\n\t\t\t\t\t\t\t\t\ttype='normal'\n\t\t\t\t\t\t\t\t\tclassName={\n\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(statusClasses instanceof Function\n\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: `${statusClasses}${getStatusClass(renderedCellValue)}`)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\n\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{renderedCellValue}\n\t\t\t\t\t\t\t\t\t\t</Typography>\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) : (\n\t\t\t\t\t\t'-'\n\t\t\t\t\t);\n\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\t...(renderedCellValue ? \n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\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\t\t\tcolor: theme.palette?.theme.tertiary4[900]\n\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\t\tbackgroundColor: theme.palette?.theme.tertiary6[200],\n\t\t\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\t\t}\n\t\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\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}\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 <ValueField key={label} label={t?.(label)}>\n\t\t{formatFn ? formatFn(value) : value ?? '-'}\n\t </ValueField>\n\t);\n };\n","import dayjs from 'dayjs';\r\n\r\n/**\r\n * Date range constants\r\n */\r\nexport const RANGE = {\r\n TODAY: 'Today',\r\n YESTERDAY: 'Yesterday',\r\n THIS_WEEK: 'This Week',\r\n PREVIOUS_WEEK: 'Previous Week',\r\n THIS_MONTH: 'This Month',\r\n PREVIOUS_MONTH: 'Previous Month',\r\n THIS_QUARTER: 'This Quarter',\r\n PREVIOUS_QUARTER: 'Previous Quarter',\r\n THIS_YEAR: 'This Year',\r\n PREVIOUS_YEAR: 'Previous Year',\r\n CUSTOM: 'Custom',\r\n} as const;\r\n\r\nexport type DateRangeType = keyof typeof RANGE;\r\n\r\nexport interface HandleCompareDateRangeParams {\r\n range: string;\r\n from?: string;\r\n to?: string;\r\n}\r\n\r\nexport interface DateRangeResult {\r\n from: string;\r\n to: string;\r\n}\r\n\r\n/**\r\n * Calculate date range based on the range type\r\n */\r\nexport const handleCompareDateRange = async (\r\n params: HandleCompareDateRangeParams\r\n): Promise<DateRangeResult> => {\r\n const { range, from = '', to = '' } = params;\r\n const today = dayjs();\r\n let startDate: dayjs.Dayjs;\r\n let endDate: dayjs.Dayjs;\r\n\r\n switch (range) {\r\n case RANGE.TODAY:\r\n startDate = today.startOf('day');\r\n endDate = today.endOf('day');\r\n break;\r\n\r\n case RANGE.YESTERDAY:\r\n startDate = today.subtract(1, 'day').startOf('day');\r\n endDate = today.subtract(1, 'day').endOf('day');\r\n break;\r\n\r\n case RANGE.THIS_WEEK:\r\n startDate = today.startOf('week');\r\n endDate = today.endOf('week');\r\n break;\r\n\r\n case RANGE.PREVIOUS_WEEK:\r\n startDate = today.subtract(1, 'week').startOf('week');\r\n endDate = today.subtract(1, 'week').endOf('week');\r\n break;\r\n\r\n case RANGE.THIS_MONTH:\r\n startDate = today.startOf('month');\r\n endDate = today.endOf('month');\r\n break;\r\n\r\n case RANGE.PREVIOUS_MONTH:\r\n startDate = today.subtract(1, 'month').startOf('month');\r\n endDate = today.subtract(1, 'month').endOf('month');\r\n break;\r\n\r\n case RANGE.THIS_QUARTER:\r\n const currentQuarter = Math.floor(today.month() / 3);\r\n startDate = today.month(currentQuarter * 3).startOf('month');\r\n endDate = today.month(currentQuarter * 3 + 2).endOf('month');\r\n break;\r\n\r\n case RANGE.PREVIOUS_QUARTER:\r\n const prevQuarter = Math.floor(today.month() / 3) - 1;\r\n startDate = today.month(prevQuarter * 3).startOf('month');\r\n endDate = today.month(prevQuarter * 3 + 2).endOf('month');\r\n break;\r\n\r\n case RANGE.THIS_YEAR:\r\n startDate = today.startOf('year');\r\n endDate = today.endOf('year');\r\n break;\r\n\r\n case RANGE.PREVIOUS_YEAR:\r\n startDate = today.subtract(1, 'year').startOf('year');\r\n endDate = today.subtract(1, 'year').endOf('year');\r\n break;\r\n\r\n case RANGE.CUSTOM:\r\n // For custom range, use the provided from/to dates or today\r\n startDate = from ? dayjs(from) : today.startOf('day');\r\n endDate = to ? dayjs(to) : today.endOf('day');\r\n break;\r\n\r\n default:\r\n // Default to today if range is not recognized\r\n startDate = today.startOf('day');\r\n endDate = today.endOf('day');\r\n }\r\n\r\n return {\r\n from: startDate.format('YYYY-MM-DD'),\r\n to: endDate.format('YYYY-MM-DD'),\r\n };\r\n};\r\n\r\n// Synchronous version (for compatibility)\r\nexport const handleCompareDateRangeSync = (\r\n params: HandleCompareDateRangeParams\r\n): DateRangeResult => {\r\n const { range, from = '', to = '' } = params;\r\n const today = dayjs();\r\n let startDate: dayjs.Dayjs;\r\n let endDate: dayjs.Dayjs;\r\n\r\n switch (range) {\r\n case RANGE.TODAY:\r\n startDate = today.startOf('day');\r\n endDate = today.endOf('day');\r\n break;\r\n\r\n case RANGE.YESTERDAY:\r\n startDate = today.subtract(1, 'day').startOf('day');\r\n endDate = today.subtract(1, 'day').endOf('day');\r\n break;\r\n\r\n case RANGE.THIS_WEEK:\r\n startDate = today.startOf('week');\r\n endDate = today.endOf('week');\r\n break;\r\n\r\n case RANGE.PREVIOUS_WEEK:\r\n startDate = today.subtract(1, 'week').startOf('week');\r\n endDate = today.subtract(1, 'week').endOf('week');\r\n break;\r\n\r\n case RANGE.THIS_MONTH:\r\n startDate = today.startOf('month');\r\n endDate = today.endOf('month');\r\n break;\r\n\r\n case RANGE.PREVIOUS_MONTH:\r\n startDate = today.subtract(1, 'month').startOf('month');\r\n endDate = today.subtract(1, 'month').endOf('month');\r\n break;\r\n\r\n case RANGE.THIS_QUARTER:\r\n const currentQuarter = Math.floor(today.month() / 3);\r\n startDate = today.month(currentQuarter * 3).startOf('month');\r\n endDate = today.month(currentQuarter * 3 + 2).endOf('month');\r\n break;\r\n\r\n case RANGE.PREVIOUS_QUARTER:\r\n const prevQuarter = Math.floor(today.month() / 3) - 1;\r\n startDate = today.month(prevQuarter * 3).startOf('month');\r\n endDate = today.month(prevQuarter * 3 + 2).endOf('month');\r\n break;\r\n\r\n case RANGE.THIS_YEAR:\r\n startDate = today.startOf('year');\r\n endDate = today.endOf('year');\r\n break;\r\n\r\n case RANGE.PREVIOUS_YEAR:\r\n startDate = today.subtract(1, 'year').startOf('year');\r\n endDate = today.subtract(1, 'year').endOf('year');\r\n break;\r\n\r\n case RANGE.CUSTOM:\r\n // For custom range, use the provided from/to dates or today\r\n startDate = from ? dayjs(from) : today.startOf('day');\r\n endDate = to ? dayjs(to) : today.endOf('day');\r\n break;\r\n\r\n default:\r\n // Default to today if range is not recognized\r\n startDate = today.startOf('day');\r\n endDate = today.endOf('day');\r\n }\r\n\r\n return {\r\n from: startDate.format('YYYY-MM-DD'),\r\n to: endDate.format('YYYY-MM-DD'),\r\n };\r\n};\r\n\r\n","export 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 currentTab.data.push({ ...otherSectionDetails, ...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 outputData.section.push({ ...otherSectionDetails, ...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","import { NavigateFunction } from 'react-router-dom';\n\n/**\n * Navigates to a route with an ID parameter, replacing the :id placeholder in the route path\n * This is a more RESTful approach than using location state\n * \n * @param navigate - The navigate function from useNavigate hook\n * @param routePath - The route path with :id placeholder\n * @param id - The ID to replace the placeholder with\n * @param fallbackState - Optional state to pass to the navigate function as fallback\n */\nexport const navigateWithId = (\n navigate: NavigateFunction,\n routePath: string,\n id: string | number,\n fallbackState?: any\n) => {\n // Replace :id in the route path with the actual ID\n const path = routePath.replace(':id', id.toString());\n \n // Navigate to the path, optionally with state as fallback for backward compatibility\n navigate(path, fallbackState ? { state: fallbackState } : undefined);\n};\n\n/**\n * Extracts the ID from the URL parameters and returns it\n * If the ID is not found in the URL, falls back to using location.state\n * \n * @param params - The params object from useParams hook\n * @param location - The location object from useLocation hook\n * @param idField - The field name in the location.state object that contains the ID (default: 'id')\n * @returns The ID from params or location.state\n */\nexport const getEntityId = (\n params: Record<string, string | undefined>,\n location: { state: any },\n idField: string = 'id'\n): string | undefined => {\n // First try to get the ID from URL params\n if (params.id) {\n return params.id;\n }\n \n // Fall back to location.state if params.id is not available\n if (location.state && location.state[idField]) {\n return location.state[idField].toString();\n }\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