@erpsquad/common 1.0.3-ace → 1.0.4-ace
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/api-client/index.esm.js +1 -1
- package/dist/api-client/index.js +1 -1
- package/dist/chunks/{DonutChart-WS8fwatJ.esm.js → DonutChart-BjQkpfAG.esm.js} +2 -2
- package/dist/chunks/{DonutChart-WS8fwatJ.esm.js.map → DonutChart-BjQkpfAG.esm.js.map} +1 -1
- package/dist/chunks/{DonutChart-DWU2uoyL.js → DonutChart-sor91tb4.js} +2 -2
- package/dist/chunks/{DonutChart-DWU2uoyL.js.map → DonutChart-sor91tb4.js.map} +1 -1
- package/dist/chunks/{DynamicDependentField-BjtgOcsu.js → DynamicDependentField-DmmxtKee.js} +2 -2
- package/dist/chunks/{DynamicDependentField-BjtgOcsu.js.map → DynamicDependentField-DmmxtKee.js.map} +1 -1
- package/dist/chunks/{DynamicDependentField-kszx_nOE.esm.js → DynamicDependentField-Du3ybZuN.esm.js} +2 -2
- package/dist/chunks/{DynamicDependentField-kszx_nOE.esm.js.map → DynamicDependentField-Du3ybZuN.esm.js.map} +1 -1
- package/dist/chunks/{ERPUIProvider-CuLn6GgT.esm.js → ERPUIProvider-DfDUPIZr.esm.js} +3 -3
- package/dist/chunks/{ERPUIProvider-CuLn6GgT.esm.js.map → ERPUIProvider-DfDUPIZr.esm.js.map} +1 -1
- package/dist/chunks/{ERPUIProvider-DrGWz8Gj.js → ERPUIProvider-nx_BfPuj.js} +3 -3
- package/dist/chunks/{ERPUIProvider-DrGWz8Gj.js.map → ERPUIProvider-nx_BfPuj.js.map} +1 -1
- package/dist/chunks/{FORMS-BNxOG-5g.js → FORMS-BaVFnQ_D.js} +7 -7
- package/dist/chunks/{FORMS-BNxOG-5g.js.map → FORMS-BaVFnQ_D.js.map} +1 -1
- package/dist/chunks/{FORMS-XfcH0nOC.esm.js → FORMS-fkr86Ff4.esm.js} +7 -7
- package/dist/chunks/{FORMS-XfcH0nOC.esm.js.map → FORMS-fkr86Ff4.esm.js.map} +1 -1
- package/dist/chunks/{FlexibleReduxExample-Do1M4acB.esm.js → FlexibleReduxExample-CF6jFZrR.esm.js} +4 -4
- package/dist/chunks/{FlexibleReduxExample-Do1M4acB.esm.js.map → FlexibleReduxExample-CF6jFZrR.esm.js.map} +1 -1
- package/dist/chunks/{FlexibleReduxExample-BsW_npX3.js → FlexibleReduxExample-fA-DzSV-.js} +4 -4
- package/dist/chunks/{FlexibleReduxExample-BsW_npX3.js.map → FlexibleReduxExample-fA-DzSV-.js.map} +1 -1
- package/dist/chunks/{GroupBarChart-Cux2aKLI.js → GroupBarChart-9AajX3v7.js} +2 -2
- package/dist/chunks/{GroupBarChart-Cux2aKLI.js.map → GroupBarChart-9AajX3v7.js.map} +1 -1
- package/dist/chunks/{GroupBarChart-CRhqBA_7.esm.js → GroupBarChart-GWc7enSw.esm.js} +2 -2
- package/dist/chunks/{GroupBarChart-CRhqBA_7.esm.js.map → GroupBarChart-GWc7enSw.esm.js.map} +1 -1
- package/dist/chunks/{SectionFlowEditor-yxAu-1sr.esm.js → SectionFlowEditor-BL3S31DJ.esm.js} +5 -5
- package/dist/chunks/{SectionFlowEditor-yxAu-1sr.esm.js.map → SectionFlowEditor-BL3S31DJ.esm.js.map} +1 -1
- package/dist/chunks/{SectionFlowEditor-8vJNrOf9.js → SectionFlowEditor-CesiP9Qa.js} +5 -5
- package/dist/chunks/{SectionFlowEditor-8vJNrOf9.js.map → SectionFlowEditor-CesiP9Qa.js.map} +1 -1
- package/dist/chunks/{action-bar-zfVbBVdn.js → action-bar-BRQTZTPS.js} +4 -4
- package/dist/chunks/{action-bar-zfVbBVdn.js.map → action-bar-BRQTZTPS.js.map} +1 -1
- package/dist/chunks/{action-bar-CBnZArlI.esm.js → action-bar-CyMc5X1E.esm.js} +4 -4
- package/dist/chunks/{action-bar-CBnZArlI.esm.js.map → action-bar-CyMc5X1E.esm.js.map} +1 -1
- package/dist/chunks/{actionCreator-tBiOGk5Q.js → actionCreator-AWTuLeZw.js} +3 -3
- package/dist/chunks/{actionCreator-tBiOGk5Q.js.map → actionCreator-AWTuLeZw.js.map} +1 -1
- package/dist/chunks/{actionCreator-BL4QoFPv.js → actionCreator-B-hgAg65.js} +2 -2
- package/dist/chunks/{actionCreator-BL4QoFPv.js.map → actionCreator-B-hgAg65.js.map} +1 -1
- package/dist/chunks/{actionCreator-DkXgIOpu.esm.js → actionCreator-BCOqYl5q.esm.js} +3 -3
- package/dist/chunks/{actionCreator-DkXgIOpu.esm.js.map → actionCreator-BCOqYl5q.esm.js.map} +1 -1
- package/dist/chunks/{actionCreator-B8cvQD5V.esm.js → actionCreator-BMoFqDwT.esm.js} +3 -3
- package/dist/chunks/{actionCreator-B8cvQD5V.esm.js.map → actionCreator-BMoFqDwT.esm.js.map} +1 -1
- package/dist/chunks/{actionCreator-BeLqcccU.esm.js → actionCreator-BV4S2rFG.esm.js} +2 -2
- package/dist/chunks/{actionCreator-BeLqcccU.esm.js.map → actionCreator-BV4S2rFG.esm.js.map} +1 -1
- package/dist/chunks/{actionCreator-1NYH3Rlc.js → actionCreator-CaZGVT05.js} +2 -2
- package/dist/chunks/{actionCreator-1NYH3Rlc.js.map → actionCreator-CaZGVT05.js.map} +1 -1
- package/dist/chunks/{actionCreator-CA9pNj6P.esm.js → actionCreator-CqGmxVbX.esm.js} +2 -2
- package/dist/chunks/{actionCreator-CA9pNj6P.esm.js.map → actionCreator-CqGmxVbX.esm.js.map} +1 -1
- package/dist/chunks/{actionCreator-BG5g9gL1.js → actionCreator-CwiKvo6M.js} +2 -2
- package/dist/chunks/{actionCreator-BG5g9gL1.js.map → actionCreator-CwiKvo6M.js.map} +1 -1
- package/dist/chunks/{actionCreator-1hNRokhR.js → actionCreator-DToaRGg4.js} +3 -3
- package/dist/chunks/{actionCreator-1hNRokhR.js.map → actionCreator-DToaRGg4.js.map} +1 -1
- package/dist/chunks/{actionCreator-YFQFe-No.esm.js → actionCreator-DgYDgN3d.esm.js} +2 -2
- package/dist/chunks/{actionCreator-YFQFe-No.esm.js.map → actionCreator-DgYDgN3d.esm.js.map} +1 -1
- package/dist/chunks/{add-template-C9xTN-KP.js → add-template-CdCBOVo6.js} +2 -2
- package/dist/chunks/{add-template-C9xTN-KP.js.map → add-template-CdCBOVo6.js.map} +1 -1
- package/dist/chunks/{add-template-DYST3MSg.esm.js → add-template-DqObLmXe.esm.js} +2 -2
- package/dist/chunks/{add-template-DYST3MSg.esm.js.map → add-template-DqObLmXe.esm.js.map} +1 -1
- package/dist/chunks/{address-modal-DGd1zK3n.esm.js → address-modal-DkjWB67x.esm.js} +2 -2
- package/dist/chunks/{address-modal-DGd1zK3n.esm.js.map → address-modal-DkjWB67x.esm.js.map} +1 -1
- package/dist/chunks/{address-modal-BuJLRlRy.js → address-modal-aqlXy7tE.js} +2 -2
- package/dist/chunks/{address-modal-BuJLRlRy.js.map → address-modal-aqlXy7tE.js.map} +1 -1
- package/dist/chunks/{ai-summary-DDXnJgB9.js → ai-summary-Bm0i82Cv.js} +3 -3
- package/dist/chunks/{ai-summary-DDXnJgB9.js.map → ai-summary-Bm0i82Cv.js.map} +1 -1
- package/dist/chunks/{ai-summary-CEiOTvTG.esm.js → ai-summary-Cd_-lqiw.esm.js} +3 -3
- package/dist/chunks/{ai-summary-CEiOTvTG.esm.js.map → ai-summary-Cd_-lqiw.esm.js.map} +1 -1
- package/dist/chunks/{api-sH_Pejh4.js → api-BssOHO1r.js} +4 -2
- package/dist/chunks/{api-sH_Pejh4.js.map → api-BssOHO1r.js.map} +1 -1
- package/dist/chunks/{api-z9fx-h0I.js → api-CMfhmBXs.js} +2 -2
- package/dist/chunks/{api-z9fx-h0I.js.map → api-CMfhmBXs.js.map} +1 -1
- package/dist/chunks/{api-BbDJI6Vu.esm.js → api-Cjrgqn4x.esm.js} +4 -2
- package/dist/chunks/{api-BbDJI6Vu.esm.js.map → api-Cjrgqn4x.esm.js.map} +1 -1
- package/dist/chunks/{api-Dr_ix7kP.esm.js → api-D2SOwm_T.esm.js} +2 -2
- package/dist/chunks/{api-Dr_ix7kP.esm.js.map → api-D2SOwm_T.esm.js.map} +1 -1
- package/dist/chunks/{appbar-BOxH0kXa.js → appbar-COvm9bCU.js} +2 -2
- package/dist/chunks/{appbar-BOxH0kXa.js.map → appbar-COvm9bCU.js.map} +1 -1
- package/dist/chunks/{appbar-CrbjQtNr.esm.js → appbar-Dl1d3CbM.esm.js} +2 -2
- package/dist/chunks/{appbar-CrbjQtNr.esm.js.map → appbar-Dl1d3CbM.esm.js.map} +1 -1
- package/dist/chunks/{approval-wrapper-CKetHvYK.js → approval-wrapper-BzQygD9p.js} +2 -2
- package/dist/chunks/{approval-wrapper-CKetHvYK.js.map → approval-wrapper-BzQygD9p.js.map} +1 -1
- package/dist/chunks/{approval-wrapper-DZVi4Erw.esm.js → approval-wrapper-J_OVzpzB.esm.js} +2 -2
- package/dist/chunks/{approval-wrapper-DZVi4Erw.esm.js.map → approval-wrapper-J_OVzpzB.esm.js.map} +1 -1
- package/dist/chunks/{areaLinerChart-d23jjlqj.esm.js → areaLinerChart-C-hqVHXL.esm.js} +2 -2
- package/dist/chunks/{areaLinerChart-d23jjlqj.esm.js.map → areaLinerChart-C-hqVHXL.esm.js.map} +1 -1
- package/dist/chunks/{areaLinerChart-C2eaKDLU.js → areaLinerChart-DNNv0-Yl.js} +2 -2
- package/dist/chunks/{areaLinerChart-C2eaKDLU.js.map → areaLinerChart-DNNv0-Yl.js.map} +1 -1
- package/dist/chunks/{bar-chart-BO8OHHJq.esm.js → bar-chart-Bie0_znG.esm.js} +2 -2
- package/dist/chunks/{bar-chart-BO8OHHJq.esm.js.map → bar-chart-Bie0_znG.esm.js.map} +1 -1
- package/dist/chunks/{bar-chart-B9zk5jaW.js → bar-chart-DNcQdTNR.js} +2 -2
- package/dist/chunks/{bar-chart-B9zk5jaW.js.map → bar-chart-DNcQdTNR.js.map} +1 -1
- package/dist/chunks/{barChart-DIBrw37G.js → barChart-CumhOI-9.js} +2 -2
- package/dist/chunks/{barChart-DIBrw37G.js.map → barChart-CumhOI-9.js.map} +1 -1
- package/dist/chunks/{barChart-WmeRkdvz.esm.js → barChart-MUjYPZyR.esm.js} +2 -2
- package/dist/chunks/{barChart-WmeRkdvz.esm.js.map → barChart-MUjYPZyR.esm.js.map} +1 -1
- package/dist/chunks/{barLinechart-2Hh8zb35.esm.js → barLinechart-BDggld0_.esm.js} +2 -2
- package/dist/chunks/{barLinechart-2Hh8zb35.esm.js.map → barLinechart-BDggld0_.esm.js.map} +1 -1
- package/dist/chunks/{barLinechart-Cp3Iwmso.js → barLinechart-BJt7IJ4H.js} +2 -2
- package/dist/chunks/{barLinechart-Cp3Iwmso.js.map → barLinechart-BJt7IJ4H.js.map} +1 -1
- package/dist/chunks/{chat-bot-79l5o6O2.esm.js → chat-bot-B6yge4-P.esm.js} +5 -5
- package/dist/chunks/{chat-bot-79l5o6O2.esm.js.map → chat-bot-B6yge4-P.esm.js.map} +1 -1
- package/dist/chunks/{chat-bot-DrM29aew.js → chat-bot-DQWfUUcv.js} +5 -5
- package/dist/chunks/{chat-bot-DrM29aew.js.map → chat-bot-DQWfUUcv.js.map} +1 -1
- package/dist/chunks/{common-utility-BYNTnVJ5.esm.js → common-utility-B5badntl.esm.js} +2 -2
- package/dist/chunks/{common-utility-BYNTnVJ5.esm.js.map → common-utility-B5badntl.esm.js.map} +1 -1
- package/dist/chunks/{common-utility-CGTtEwGW.js → common-utility-BEXaK598.js} +2 -2
- package/dist/chunks/{common-utility-CGTtEwGW.js.map → common-utility-BEXaK598.js.map} +1 -1
- package/dist/chunks/{custom-editor-Dmw_91eF.esm.js → custom-editor-CraiO4kk.esm.js} +2 -2
- package/dist/chunks/{custom-editor-Dmw_91eF.esm.js.map → custom-editor-CraiO4kk.esm.js.map} +1 -1
- package/dist/chunks/{custom-editor-riXelfDS.js → custom-editor-WrisvQ6y.js} +2 -2
- package/dist/chunks/{custom-editor-riXelfDS.js.map → custom-editor-WrisvQ6y.js.map} +1 -1
- package/dist/chunks/{custom-form-DZ9wmdq0.js → custom-form-BfgSYSKA.js} +6 -6
- package/dist/chunks/{custom-form-DZ9wmdq0.js.map → custom-form-BfgSYSKA.js.map} +1 -1
- package/dist/chunks/{custom-form-mMKBVN_P.esm.js → custom-form-CR2OxCkQ.esm.js} +6 -6
- package/dist/chunks/{custom-form-mMKBVN_P.esm.js.map → custom-form-CR2OxCkQ.esm.js.map} +1 -1
- package/dist/chunks/{dashboard-CbU2Gch_.esm.js → dashboard-C8O6LZhk.esm.js} +3 -3
- package/dist/chunks/{dashboard-CbU2Gch_.esm.js.map → dashboard-C8O6LZhk.esm.js.map} +1 -1
- package/dist/chunks/{dashboard-BzD7DKxd.js → dashboard-DipAIdnU.js} +3 -3
- package/dist/chunks/{dashboard-BzD7DKxd.js.map → dashboard-DipAIdnU.js.map} +1 -1
- package/dist/chunks/{dynamic-report-h05SeJnZ.js → dynamic-report-BpiE-iox.js} +4 -4
- package/dist/chunks/{dynamic-report-h05SeJnZ.js.map → dynamic-report-BpiE-iox.js.map} +1 -1
- package/dist/chunks/{dynamic-report-DgFpE7N-.esm.js → dynamic-report-DiZ0U4me.esm.js} +4 -4
- package/dist/chunks/{dynamic-report-DgFpE7N-.esm.js.map → dynamic-report-DiZ0U4me.esm.js.map} +1 -1
- package/dist/chunks/{dynamic-rows-BTeQ0BUe.js → dynamic-rows-Dwm9qdGA.js} +2 -2
- package/dist/chunks/{dynamic-rows-BTeQ0BUe.js.map → dynamic-rows-Dwm9qdGA.js.map} +1 -1
- package/dist/chunks/{dynamic-rows-BZxixrwo.esm.js → dynamic-rows-aWhL0Hp8.esm.js} +2 -2
- package/dist/chunks/{dynamic-rows-BZxixrwo.esm.js.map → dynamic-rows-aWhL0Hp8.esm.js.map} +1 -1
- package/dist/chunks/{dynamic-text-editor-D8gR9GaY.js → dynamic-text-editor-BipOB4dF.js} +2 -2
- package/dist/chunks/{dynamic-text-editor-D8gR9GaY.js.map → dynamic-text-editor-BipOB4dF.js.map} +1 -1
- package/dist/chunks/{dynamic-text-editor-qgQ6N99t.esm.js → dynamic-text-editor-CC6oXwN1.esm.js} +2 -2
- package/dist/chunks/{dynamic-text-editor-qgQ6N99t.esm.js.map → dynamic-text-editor-CC6oXwN1.esm.js.map} +1 -1
- package/dist/chunks/{edit-section-modal-DeWrVUrJ.js → edit-section-modal-DoHF6hqR.js} +2 -2
- package/dist/chunks/{edit-section-modal-DeWrVUrJ.js.map → edit-section-modal-DoHF6hqR.js.map} +1 -1
- package/dist/chunks/{edit-section-modal-Bvx01dFQ.esm.js → edit-section-modal-nXIDUvVr.esm.js} +2 -2
- package/dist/chunks/{edit-section-modal-Bvx01dFQ.esm.js.map → edit-section-modal-nXIDUvVr.esm.js.map} +1 -1
- package/dist/chunks/{filter-CGtRunHJ.esm.js → filter-BHQVqjGz.esm.js} +3 -3
- package/dist/chunks/{filter-CGtRunHJ.esm.js.map → filter-BHQVqjGz.esm.js.map} +1 -1
- package/dist/chunks/{filter-CpVdFTZk.js → filter-Jy25t8x6.js} +3 -3
- package/dist/chunks/{filter-CpVdFTZk.js.map → filter-Jy25t8x6.js.map} +1 -1
- package/dist/chunks/{footer-jIdxIST5.esm.js → footer-Bu6ArSWH.esm.js} +2 -2
- package/dist/chunks/{footer-jIdxIST5.esm.js.map → footer-Bu6ArSWH.esm.js.map} +1 -1
- package/dist/chunks/{footer-B-bG141m.js → footer-CIRAccWM.js} +2 -2
- package/dist/chunks/{footer-B-bG141m.js.map → footer-CIRAccWM.js.map} +1 -1
- package/dist/chunks/{form-fields-BD6TVVkP.js → form-fields-DU758qIt.js} +2 -2
- package/dist/chunks/{form-fields-BD6TVVkP.js.map → form-fields-DU758qIt.js.map} +1 -1
- package/dist/chunks/{form-fields-DUMxoT-P.esm.js → form-fields-iP17Dg4u.esm.js} +2 -2
- package/dist/chunks/{form-fields-DUMxoT-P.esm.js.map → form-fields-iP17Dg4u.esm.js.map} +1 -1
- package/dist/chunks/{form-parser-BW5mE4AJ.esm.js → form-parser-BXQ9T8MG.esm.js} +2 -2
- package/dist/chunks/{form-parser-BW5mE4AJ.esm.js.map → form-parser-BXQ9T8MG.esm.js.map} +1 -1
- package/dist/chunks/{form-parser-DPP9wdn_.js → form-parser-D0XC0fkv.js} +2 -2
- package/dist/chunks/{form-parser-DPP9wdn_.js.map → form-parser-D0XC0fkv.js.map} +1 -1
- package/dist/chunks/{form-section-BY4LiiBQ.esm.js → form-section-B85_0JS4.esm.js} +5 -5
- package/dist/chunks/{form-section-BY4LiiBQ.esm.js.map → form-section-B85_0JS4.esm.js.map} +1 -1
- package/dist/chunks/{form-section-DCl1EFSd.js → form-section-Dml21tNP.js} +5 -5
- package/dist/chunks/{form-section-DCl1EFSd.js.map → form-section-Dml21tNP.js.map} +1 -1
- package/dist/chunks/{format-chart-value-BxtmFgqz.esm.js → format-chart-value-GUtvkF0_.esm.js} +2 -2
- package/dist/chunks/{format-chart-value-BxtmFgqz.esm.js.map → format-chart-value-GUtvkF0_.esm.js.map} +1 -1
- package/dist/chunks/{format-chart-value-BF6L7oId.js → format-chart-value-KKQC1QCo.js} +2 -2
- package/dist/chunks/{format-chart-value-BF6L7oId.js.map → format-chart-value-KKQC1QCo.js.map} +1 -1
- package/dist/chunks/{fullScreen-uyGi9rfr.js → fullScreen-BJwU_99w.js} +3 -3
- package/dist/chunks/{fullScreen-uyGi9rfr.js.map → fullScreen-BJwU_99w.js.map} +1 -1
- package/dist/chunks/{fullScreen-Ci19ysR_.esm.js → fullScreen-Ch8tUses.esm.js} +3 -3
- package/dist/chunks/{fullScreen-Ci19ysR_.esm.js.map → fullScreen-Ch8tUses.esm.js.map} +1 -1
- package/dist/chunks/{global-search-aHW5eozh.js → global-search-CVTK3v_t.js} +3 -3
- package/dist/chunks/{global-search-aHW5eozh.js.map → global-search-CVTK3v_t.js.map} +1 -1
- package/dist/chunks/{global-search-B83nmMyJ.esm.js → global-search-WqIsQMSe.esm.js} +3 -3
- package/dist/chunks/{global-search-B83nmMyJ.esm.js.map → global-search-WqIsQMSe.esm.js.map} +1 -1
- package/dist/chunks/{grid-view-g1dmcPRj.js → grid-view-Bxemhm7R.js} +2 -2
- package/dist/chunks/{grid-view-g1dmcPRj.js.map → grid-view-Bxemhm7R.js.map} +1 -1
- package/dist/chunks/{grid-view-BEIkUYRb.esm.js → grid-view-DznttWVS.esm.js} +2 -2
- package/dist/chunks/{grid-view-BEIkUYRb.esm.js.map → grid-view-DznttWVS.esm.js.map} +1 -1
- package/dist/chunks/{header-Cv3pYYOJ.js → header-CG4sV7VJ.js} +3 -3
- package/dist/chunks/{header-Cv3pYYOJ.js.map → header-CG4sV7VJ.js.map} +1 -1
- package/dist/chunks/{header-DCYhcHX_.esm.js → header-DjnR7PBT.esm.js} +3 -3
- package/dist/chunks/{header-DCYhcHX_.esm.js.map → header-DjnR7PBT.esm.js.map} +1 -1
- package/dist/chunks/{header-enhanced-Dt5Pv5Mz.esm.js → header-enhanced-5VHII3Xj.esm.js} +2 -2
- package/dist/chunks/{header-enhanced-Dt5Pv5Mz.esm.js.map → header-enhanced-5VHII3Xj.esm.js.map} +1 -1
- package/dist/chunks/{header-enhanced-ED31n2dw.js → header-enhanced-CjqzXrGD.js} +2 -2
- package/dist/chunks/{header-enhanced-ED31n2dw.js.map → header-enhanced-CjqzXrGD.js.map} +1 -1
- package/dist/chunks/{inline-edit-fields--JeZHnsd.js → inline-edit-fields-4SkNqHXq.js} +2 -2
- package/dist/chunks/{inline-edit-fields--JeZHnsd.js.map → inline-edit-fields-4SkNqHXq.js.map} +1 -1
- package/dist/chunks/{inline-edit-fields-4TkgIV0p.esm.js → inline-edit-fields-D2gm0cK8.esm.js} +2 -2
- package/dist/chunks/{inline-edit-fields-4TkgIV0p.esm.js.map → inline-edit-fields-D2gm0cK8.esm.js.map} +1 -1
- package/dist/chunks/{inventory-reports-title-bar-CGNsLMM0.esm.js → inventory-reports-title-bar-5GnnubWk.esm.js} +3 -3
- package/dist/chunks/{inventory-reports-title-bar-CGNsLMM0.esm.js.map → inventory-reports-title-bar-5GnnubWk.esm.js.map} +1 -1
- package/dist/chunks/{inventory-reports-title-bar-RHFSpaHJ.js → inventory-reports-title-bar-BpzxNxOX.js} +3 -3
- package/dist/chunks/{inventory-reports-title-bar-RHFSpaHJ.js.map → inventory-reports-title-bar-BpzxNxOX.js.map} +1 -1
- package/dist/chunks/{item-response-details-Baju19gw.esm.js → item-response-details-BjVYLt2n.esm.js} +4 -4
- package/dist/chunks/{item-response-details-Baju19gw.esm.js.map → item-response-details-BjVYLt2n.esm.js.map} +1 -1
- package/dist/chunks/{item-response-details-Ch2x4AB8.js → item-response-details-DLenSU_H.js} +4 -4
- package/dist/chunks/{item-response-details-Ch2x4AB8.js.map → item-response-details-DLenSU_H.js.map} +1 -1
- package/dist/chunks/{listing-C1lb0KRN.esm.js → listing-CHO3VzcE.esm.js} +4 -4
- package/dist/chunks/{listing-C1lb0KRN.esm.js.map → listing-CHO3VzcE.esm.js.map} +1 -1
- package/dist/chunks/{listing-BoMElyul.js → listing-DXZlHr6W.js} +4 -4
- package/dist/chunks/{listing-BoMElyul.js.map → listing-DXZlHr6W.js.map} +1 -1
- package/dist/chunks/{location-select-D1RTjvbQ.js → location-select-DlvZNWYm.js} +2 -2
- package/dist/chunks/{location-select-D1RTjvbQ.js.map → location-select-DlvZNWYm.js.map} +1 -1
- package/dist/chunks/{location-select-UzAN29RG.esm.js → location-select-QLWknWKO.esm.js} +2 -2
- package/dist/chunks/{location-select-UzAN29RG.esm.js.map → location-select-QLWknWKO.esm.js.map} +1 -1
- package/dist/chunks/{material-editable-table-CkqD8M35.js → material-editable-table-B7n0tW33.js} +3 -3
- package/dist/chunks/{material-editable-table-CkqD8M35.js.map → material-editable-table-B7n0tW33.js.map} +1 -1
- package/dist/chunks/{material-editable-table-B8xzbLYe.esm.js → material-editable-table-bn_t-NCt.esm.js} +3 -3
- package/dist/chunks/{material-editable-table-B8xzbLYe.esm.js.map → material-editable-table-bn_t-NCt.esm.js.map} +1 -1
- package/dist/chunks/{module-reducer-BAJ0S8cz.esm.js → module-reducer-BFtZJEYw.esm.js} +2 -2
- package/dist/chunks/{module-reducer-BAJ0S8cz.esm.js.map → module-reducer-BFtZJEYw.esm.js.map} +1 -1
- package/dist/chunks/{module-reducer-ChesImTg.js → module-reducer-CCShBW7s.js} +2 -2
- package/dist/chunks/{module-reducer-ChesImTg.js.map → module-reducer-CCShBW7s.js.map} +1 -1
- package/dist/chunks/{multi-line-chart-BsQDKt-h.js → multi-line-chart-CQUOI36h.js} +2 -2
- package/dist/chunks/{multi-line-chart-BsQDKt-h.js.map → multi-line-chart-CQUOI36h.js.map} +1 -1
- package/dist/chunks/{multi-line-chart-CVSP6q9f.esm.js → multi-line-chart-W5Gjnxlm.esm.js} +2 -2
- package/dist/chunks/{multi-line-chart-CVSP6q9f.esm.js.map → multi-line-chart-W5Gjnxlm.esm.js.map} +1 -1
- package/dist/chunks/{notification-menu-ChtGTeQR.js → notification-menu-BNJrwnGN.js} +2 -2
- package/dist/chunks/{notification-menu-ChtGTeQR.js.map → notification-menu-BNJrwnGN.js.map} +1 -1
- package/dist/chunks/{notification-menu-CpG_NgP6.esm.js → notification-menu-Ow53R188.esm.js} +2 -2
- package/dist/chunks/{notification-menu-CpG_NgP6.esm.js.map → notification-menu-Ow53R188.esm.js.map} +1 -1
- package/dist/chunks/{page-action-VZWspmgo.js → page-action-B78I2iXC.js} +4 -4
- package/dist/chunks/{page-action-VZWspmgo.js.map → page-action-B78I2iXC.js.map} +1 -1
- package/dist/chunks/{page-action-BUeP067F.esm.js → page-action-TMWyr5F6.esm.js} +4 -4
- package/dist/chunks/{page-action-BUeP067F.esm.js.map → page-action-TMWyr5F6.esm.js.map} +1 -1
- package/dist/chunks/{page-navigator-BbvHyfoY.js → page-navigator-CI1pSo3R.js} +2 -2
- package/dist/chunks/{page-navigator-BbvHyfoY.js.map → page-navigator-CI1pSo3R.js.map} +1 -1
- package/dist/chunks/{page-navigator-z6HidlqL.esm.js → page-navigator-CLqnkwpO.esm.js} +2 -2
- package/dist/chunks/{page-navigator-z6HidlqL.esm.js.map → page-navigator-CLqnkwpO.esm.js.map} +1 -1
- package/dist/chunks/{page-view-CzRfuk67.js → page-view-CVWjiU0f.js} +3 -3
- package/dist/chunks/{page-view-CzRfuk67.js.map → page-view-CVWjiU0f.js.map} +1 -1
- package/dist/chunks/{page-view-CBEtB1PV.esm.js → page-view-DkfeC5_G.esm.js} +3 -3
- package/dist/chunks/{page-view-CBEtB1PV.esm.js.map → page-view-DkfeC5_G.esm.js.map} +1 -1
- package/dist/chunks/{quick-approval-modal-DMxeQWZK.esm.js → quick-approval-modal-D9FD_xef.esm.js} +2 -2
- package/dist/chunks/{quick-approval-modal-DMxeQWZK.esm.js.map → quick-approval-modal-D9FD_xef.esm.js.map} +1 -1
- package/dist/chunks/{quick-approval-modal-B9PbEHP4.js → quick-approval-modal-nlkahFbp.js} +2 -2
- package/dist/chunks/{quick-approval-modal-B9PbEHP4.js.map → quick-approval-modal-nlkahFbp.js.map} +1 -1
- package/dist/chunks/{reducer-CObabkoL.esm.js → reducer-BPMjyf9a.esm.js} +2 -2
- package/dist/chunks/{reducer-CObabkoL.esm.js.map → reducer-BPMjyf9a.esm.js.map} +1 -1
- package/dist/chunks/{reducer-BeVaTdI8.js → reducer-BZQKdlpX.js} +2 -2
- package/dist/chunks/{reducer-BeVaTdI8.js.map → reducer-BZQKdlpX.js.map} +1 -1
- package/dist/chunks/{reducer-BjD2jll_.esm.js → reducer-BnsKBJw8.esm.js} +2 -2
- package/dist/chunks/{reducer-BjD2jll_.esm.js.map → reducer-BnsKBJw8.esm.js.map} +1 -1
- package/dist/chunks/{reducer-BtKYiz9H.js → reducer-CxWSjaXF.js} +2 -2
- package/dist/chunks/{reducer-BtKYiz9H.js.map → reducer-CxWSjaXF.js.map} +1 -1
- package/dist/chunks/{reducer-BSNJY1XY.js → reducer-DM6A8goc.js} +2 -2
- package/dist/chunks/{reducer-BSNJY1XY.js.map → reducer-DM6A8goc.js.map} +1 -1
- package/dist/chunks/{reducer-BFs_VqNc.esm.js → reducer-DXc1VTrX.esm.js} +2 -2
- package/dist/chunks/{reducer-BFs_VqNc.esm.js.map → reducer-DXc1VTrX.esm.js.map} +1 -1
- package/dist/chunks/{reducer-B69eW_gv.js → reducer-DfXTDi29.js} +3 -3
- package/dist/chunks/{reducer-B69eW_gv.js.map → reducer-DfXTDi29.js.map} +1 -1
- package/dist/chunks/{reducer-BbjXYh_B.esm.js → reducer-HM6SmTqJ.esm.js} +3 -3
- package/dist/chunks/{reducer-BbjXYh_B.esm.js.map → reducer-HM6SmTqJ.esm.js.map} +1 -1
- package/dist/chunks/{reducer-D4dFqAdg.esm.js → reducer-UyXvMR1i.esm.js} +2 -2
- package/dist/chunks/{reducer-D4dFqAdg.esm.js.map → reducer-UyXvMR1i.esm.js.map} +1 -1
- package/dist/chunks/{reducer-Oz2SWiWJ.js → reducer-mn4zbXVb.js} +2 -2
- package/dist/chunks/{reducer-Oz2SWiWJ.js.map → reducer-mn4zbXVb.js.map} +1 -1
- package/dist/chunks/{reports-title-bar-ztN-jLtw.js → reports-title-bar-BLTGdG2M.js} +4 -4
- package/dist/chunks/{reports-title-bar-ztN-jLtw.js.map → reports-title-bar-BLTGdG2M.js.map} +1 -1
- package/dist/chunks/{reports-title-bar-gBxmfdLL.esm.js → reports-title-bar-Ccu4HR82.esm.js} +4 -4
- package/dist/chunks/{reports-title-bar-gBxmfdLL.esm.js.map → reports-title-bar-Ccu4HR82.esm.js.map} +1 -1
- package/dist/chunks/{routes-KXB0E9uI.esm.js → routes-C477T2qM.esm.js} +3 -3
- package/dist/chunks/{routes-KXB0E9uI.esm.js.map → routes-C477T2qM.esm.js.map} +1 -1
- package/dist/chunks/{routes-BC79drEf.js → routes-D43hKLn0.js} +3 -3
- package/dist/chunks/{routes-BC79drEf.js.map → routes-D43hKLn0.js.map} +1 -1
- package/dist/chunks/{schedule-report-eL1Ed6zr.js → schedule-report-D8yyR2T1.js} +6 -6
- package/dist/chunks/{schedule-report-eL1Ed6zr.js.map → schedule-report-D8yyR2T1.js.map} +1 -1
- package/dist/chunks/{schedule-report-DCLWGn9a.esm.js → schedule-report-DFPhZTWQ.esm.js} +6 -6
- package/dist/chunks/{schedule-report-DCLWGn9a.esm.js.map → schedule-report-DFPhZTWQ.esm.js.map} +1 -1
- package/dist/chunks/{schedule-report-modal-BlWTcvor.js → schedule-report-modal-BV2In7GG.js} +3 -3
- package/dist/chunks/{schedule-report-modal-BlWTcvor.js.map → schedule-report-modal-BV2In7GG.js.map} +1 -1
- package/dist/chunks/{schedule-report-modal-BKtAI14C.esm.js → schedule-report-modal-DAitfzVJ.esm.js} +3 -3
- package/dist/chunks/{schedule-report-modal-BKtAI14C.esm.js.map → schedule-report-modal-DAitfzVJ.esm.js.map} +1 -1
- package/dist/chunks/{searchable-select-BrWB_iEY.js → searchable-select-COzZZrUe.js} +6 -6
- package/dist/chunks/{searchable-select-BrWB_iEY.js.map → searchable-select-COzZZrUe.js.map} +1 -1
- package/dist/chunks/{searchable-select-Dz1UvTdo.esm.js → searchable-select-DEq3Pr3H.esm.js} +6 -6
- package/dist/chunks/{searchable-select-Dz1UvTdo.esm.js.map → searchable-select-DEq3Pr3H.esm.js.map} +1 -1
- package/dist/chunks/{share-modal-HDSKWcTn.js → share-modal-DapxkByD.js} +3 -3
- package/dist/chunks/{share-modal-HDSKWcTn.js.map → share-modal-DapxkByD.js.map} +1 -1
- package/dist/chunks/{share-modal-CN6J_ADQ.esm.js → share-modal-Dc4EkNI4.esm.js} +3 -3
- package/dist/chunks/{share-modal-CN6J_ADQ.esm.js.map → share-modal-Dc4EkNI4.esm.js.map} +1 -1
- package/dist/chunks/{share-modal-enhanced-DZ8hTclZ.js → share-modal-enhanced-DCfTWdU7.js} +2 -2
- package/dist/chunks/{share-modal-enhanced-DZ8hTclZ.js.map → share-modal-enhanced-DCfTWdU7.js.map} +1 -1
- package/dist/chunks/{share-modal-enhanced-Ce0lIqWB.esm.js → share-modal-enhanced-dhTu7nyp.esm.js} +2 -2
- package/dist/chunks/{share-modal-enhanced-Ce0lIqWB.esm.js.map → share-modal-enhanced-dhTu7nyp.esm.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-C6fKqi4n.esm.js → sidebarScreen-BwwqWGGS.esm.js} +5 -5
- package/dist/chunks/{sidebarScreen-C6fKqi4n.esm.js.map → sidebarScreen-BwwqWGGS.esm.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-7gvCdrw9.js → sidebarScreen-DiG512mA.js} +5 -5
- package/dist/chunks/{sidebarScreen-7gvCdrw9.js.map → sidebarScreen-DiG512mA.js.map} +1 -1
- package/dist/chunks/{store-CSo8knz8.esm.js → store-Cf8Yk56o.esm.js} +6 -6
- package/dist/chunks/{store-CSo8knz8.esm.js.map → store-Cf8Yk56o.esm.js.map} +1 -1
- package/dist/chunks/{store-D2nGfPol.js → store-E5if0cXB.js} +6 -6
- package/dist/chunks/{store-D2nGfPol.js.map → store-E5if0cXB.js.map} +1 -1
- package/dist/chunks/{table-b0EpB65I.js → table-CfpnwIyj.js} +3 -3
- package/dist/chunks/{table-b0EpB65I.js.map → table-CfpnwIyj.js.map} +1 -1
- package/dist/chunks/{table-form-Bghjnj37.esm.js → table-form-BqGf2idN.esm.js} +2 -2
- package/dist/chunks/{table-form-Bghjnj37.esm.js.map → table-form-BqGf2idN.esm.js.map} +1 -1
- package/dist/chunks/{table-form-D4F7v_t4.js → table-form-C5xq55kc.js} +2 -2
- package/dist/chunks/{table-form-D4F7v_t4.js.map → table-form-C5xq55kc.js.map} +1 -1
- package/dist/chunks/{table-x1bzbTK6.esm.js → table-nl97obVt.esm.js} +3 -3
- package/dist/chunks/{table-x1bzbTK6.esm.js.map → table-nl97obVt.esm.js.map} +1 -1
- package/dist/chunks/{template-editor-router-DHmTTl_F.js → template-editor-router-Bdh_ItkQ.js} +2 -2
- package/dist/chunks/{template-editor-router-DHmTTl_F.js.map → template-editor-router-Bdh_ItkQ.js.map} +1 -1
- package/dist/chunks/{template-editor-router-CwHENU6J.esm.js → template-editor-router-UE1U5z_E.esm.js} +2 -2
- package/dist/chunks/{template-editor-router-CwHENU6J.esm.js.map → template-editor-router-UE1U5z_E.esm.js.map} +1 -1
- package/dist/chunks/{template-modal-DlFoQ2dY.js → template-modal-BxxN_xKT.js} +2 -2
- package/dist/chunks/{template-modal-DlFoQ2dY.js.map → template-modal-BxxN_xKT.js.map} +1 -1
- package/dist/chunks/{template-modal-DdR7nG8Q.esm.js → template-modal-D9biSMyo.esm.js} +2 -2
- package/dist/chunks/{template-modal-DdR7nG8Q.esm.js.map → template-modal-D9biSMyo.esm.js.map} +1 -1
- package/dist/chunks/{templates-DX4xAZRi.js → templates-CstgYE06.js} +7 -7
- package/dist/chunks/{templates-DX4xAZRi.js.map → templates-CstgYE06.js.map} +1 -1
- package/dist/chunks/{templates-DUhh0h0B.esm.js → templates-SOtQvG29.esm.js} +7 -7
- package/dist/chunks/{templates-DUhh0h0B.esm.js.map → templates-SOtQvG29.esm.js.map} +1 -1
- package/dist/chunks/{text-measurement-AhkuPkOw.js → text-measurement-D3KEy78-.js} +2 -2
- package/dist/chunks/{text-measurement-AhkuPkOw.js.map → text-measurement-D3KEy78-.js.map} +1 -1
- package/dist/chunks/{text-measurement-D_-WzK_v.esm.js → text-measurement-aH9Y1fr-.esm.js} +2 -2
- package/dist/chunks/{text-measurement-D_-WzK_v.esm.js.map → text-measurement-aH9Y1fr-.esm.js.map} +1 -1
- package/dist/chunks/{translations-DScrzz7Y.esm.js → translations-BU6iX2ow.esm.js} +2 -2
- package/dist/chunks/{translations-DScrzz7Y.esm.js.map → translations-BU6iX2ow.esm.js.map} +1 -1
- package/dist/chunks/{translations-DOHMv_xZ.js → translations-ByAyDnTY.js} +2 -2
- package/dist/chunks/{translations-DOHMv_xZ.js.map → translations-ByAyDnTY.js.map} +1 -1
- package/dist/chunks/{uom-field-wrapper-Btetc3F2.esm.js → uom-field-wrapper-CCkY964E.esm.js} +2 -2
- package/dist/chunks/{uom-field-wrapper-Btetc3F2.esm.js.map → uom-field-wrapper-CCkY964E.esm.js.map} +1 -1
- package/dist/chunks/{uom-field-wrapper-Ds1n5IgW.js → uom-field-wrapper-gOq_4o_e.js} +2 -2
- package/dist/chunks/{uom-field-wrapper-Ds1n5IgW.js.map → uom-field-wrapper-gOq_4o_e.js.map} +1 -1
- package/dist/chunks/{upload-excel-dpXtKd_l.js → upload-excel-DRyb2Xm1.js} +2 -2
- package/dist/chunks/{upload-excel-dpXtKd_l.js.map → upload-excel-DRyb2Xm1.js.map} +1 -1
- package/dist/chunks/{upload-excel-CepRYe_B.esm.js → upload-excel-zkm9tkpN.esm.js} +2 -2
- package/dist/chunks/{upload-excel-CepRYe_B.esm.js.map → upload-excel-zkm9tkpN.esm.js.map} +1 -1
- package/dist/chunks/{use-translations-BNdWlMPY.js → use-translations-CNk9fcvb.js} +2 -2
- package/dist/chunks/{use-translations-BNdWlMPY.js.map → use-translations-CNk9fcvb.js.map} +1 -1
- package/dist/chunks/{use-translations-B1c0XSTx.esm.js → use-translations-CQWlQv9M.esm.js} +2 -2
- package/dist/chunks/{use-translations-B1c0XSTx.esm.js.map → use-translations-CQWlQv9M.esm.js.map} +1 -1
- package/dist/chunks/{useAccountSetting-6AjhlLUw.esm.js → useAccountSetting-BZjQ0dCe.esm.js} +3 -3
- package/dist/chunks/{useAccountSetting-6AjhlLUw.esm.js.map → useAccountSetting-BZjQ0dCe.esm.js.map} +1 -1
- package/dist/chunks/{useAccountSetting-DVltR1Ev.js → useAccountSetting-Bzi15WwS.js} +3 -3
- package/dist/chunks/{useAccountSetting-DVltR1Ev.js.map → useAccountSetting-Bzi15WwS.js.map} +1 -1
- package/dist/chunks/{useCheckSkuAndName-CBi5twv1.js → useCheckSkuAndName-DCspaELJ.js} +2 -2
- package/dist/chunks/{useCheckSkuAndName-CBi5twv1.js.map → useCheckSkuAndName-DCspaELJ.js.map} +1 -1
- package/dist/chunks/{useCheckSkuAndName-CMZ3qIbt.esm.js → useCheckSkuAndName-DPBlrHUR.esm.js} +2 -2
- package/dist/chunks/{useCheckSkuAndName-CMZ3qIbt.esm.js.map → useCheckSkuAndName-DPBlrHUR.esm.js.map} +1 -1
- package/dist/chunks/{useReduxIntegration-CSRrd2Ir.esm.js → useReduxIntegration-DKIMB9xW.esm.js} +2 -2
- package/dist/chunks/{useReduxIntegration-CSRrd2Ir.esm.js.map → useReduxIntegration-DKIMB9xW.esm.js.map} +1 -1
- package/dist/chunks/{useReduxIntegration-OKuwhc4R.js → useReduxIntegration-DjQ9jNrm.js} +2 -2
- package/dist/chunks/{useReduxIntegration-OKuwhc4R.js.map → useReduxIntegration-DjQ9jNrm.js.map} +1 -1
- package/dist/chunks/{useUniquenessCheck-duLTxVyn.esm.js → useUniquenessCheck-BDjuzD2o.esm.js} +2 -2
- package/dist/chunks/{useUniquenessCheck-duLTxVyn.esm.js.map → useUniquenessCheck-BDjuzD2o.esm.js.map} +1 -1
- package/dist/chunks/{useUniquenessCheck-DI04jci7.js → useUniquenessCheck-CRVWEtTC.js} +2 -2
- package/dist/chunks/{useUniquenessCheck-DI04jci7.js.map → useUniquenessCheck-CRVWEtTC.js.map} +1 -1
- package/dist/chunks/{useVendorAICompare-DgIPinj4.esm.js → useVendorAICompare-BENmzbDd.esm.js} +3 -3
- package/dist/chunks/{useVendorAICompare-DgIPinj4.esm.js.map → useVendorAICompare-BENmzbDd.esm.js.map} +1 -1
- package/dist/chunks/{useVendorAICompare-BcXlfgRF.js → useVendorAICompare-BfyOofxO.js} +3 -3
- package/dist/chunks/{useVendorAICompare-BcXlfgRF.js.map → useVendorAICompare-BfyOofxO.js.map} +1 -1
- package/dist/chunks/{value-editor-BPooKfgR.js → value-editor-DmTivapJ.js} +3 -3
- package/dist/chunks/{value-editor-BPooKfgR.js.map → value-editor-DmTivapJ.js.map} +1 -1
- package/dist/chunks/{value-editor-C05d33xD.esm.js → value-editor-rR_kI-RV.esm.js} +3 -3
- package/dist/chunks/{value-editor-C05d33xD.esm.js.map → value-editor-rR_kI-RV.esm.js.map} +1 -1
- package/dist/chunks/{vendor-ai-summary-DSBn4a9f.esm.js → vendor-ai-summary-D80mypc8.esm.js} +3 -3
- package/dist/chunks/{vendor-ai-summary-DSBn4a9f.esm.js.map → vendor-ai-summary-D80mypc8.esm.js.map} +1 -1
- package/dist/chunks/{vendor-ai-summary-BdMVr03O.js → vendor-ai-summary-Q7PB5cvc.js} +3 -3
- package/dist/chunks/{vendor-ai-summary-BdMVr03O.js.map → vendor-ai-summary-Q7PB5cvc.js.map} +1 -1
- package/dist/components/action-bar/action-bar/index.esm.js +1 -1
- package/dist/components/action-bar/action-bar/index.js +1 -1
- package/dist/components/action-bar/index.esm.js +1 -1
- package/dist/components/action-bar/index.js +1 -1
- package/dist/components/address-modal/index.esm.js +1 -1
- package/dist/components/address-modal/index.js +1 -1
- package/dist/components/ai-summary/ai-summary/index.esm.js +1 -1
- package/dist/components/ai-summary/ai-summary/index.js +1 -1
- package/dist/components/ai-summary/index.esm.js +1 -1
- package/dist/components/ai-summary/index.js +1 -1
- package/dist/components/appbar/appbar/index.esm.js +1 -1
- package/dist/components/appbar/appbar/index.js +1 -1
- package/dist/components/appbar/index.esm.js +1 -1
- package/dist/components/appbar/index.js +1 -1
- package/dist/components/approval-wrapper/approval-wrapper/index.esm.js +1 -1
- package/dist/components/approval-wrapper/approval-wrapper/index.js +1 -1
- package/dist/components/approval-wrapper/index.esm.js +1 -1
- package/dist/components/approval-wrapper/index.js +1 -1
- package/dist/components/charts/areaLinerChart/index.esm.js +1 -1
- package/dist/components/charts/areaLinerChart/index.js +1 -1
- package/dist/components/charts/bar-chart/bar-chart/index.esm.js +1 -1
- package/dist/components/charts/bar-chart/bar-chart/index.js +1 -1
- package/dist/components/charts/bar-chart/index.esm.js +1 -1
- package/dist/components/charts/bar-chart/index.js +1 -1
- package/dist/components/charts/barChart/barChart/index.esm.js +1 -1
- package/dist/components/charts/barChart/barChart/index.js +1 -1
- package/dist/components/charts/barChart/index.esm.js +1 -1
- package/dist/components/charts/barChart/index.js +1 -1
- package/dist/components/charts/barLineChart/barLinechart/index.esm.js +1 -1
- package/dist/components/charts/barLineChart/barLinechart/index.js +1 -1
- package/dist/components/charts/barLineChart/index.esm.js +1 -1
- package/dist/components/charts/barLineChart/index.js +1 -1
- package/dist/components/charts/donutChart/DonutChart/index.esm.js +1 -1
- package/dist/components/charts/donutChart/DonutChart/index.js +1 -1
- package/dist/components/charts/donutChart/index.esm.js +1 -1
- package/dist/components/charts/donutChart/index.js +1 -1
- package/dist/components/charts/groupBarChart/GroupBarChart/index.esm.js +1 -1
- package/dist/components/charts/groupBarChart/GroupBarChart/index.js +1 -1
- package/dist/components/charts/groupBarChart/index.esm.js +1 -1
- package/dist/components/charts/groupBarChart/index.js +1 -1
- package/dist/components/charts/index.esm.js +7 -7
- package/dist/components/charts/index.js +7 -7
- package/dist/components/charts/multiLineChart/index.esm.js +1 -1
- package/dist/components/charts/multiLineChart/index.js +1 -1
- package/dist/components/charts/multiLineChart/multi-line-chart/index.esm.js +1 -1
- package/dist/components/charts/multiLineChart/multi-line-chart/index.js +1 -1
- package/dist/components/chat-bot/index.esm.js +1 -1
- package/dist/components/chat-bot/index.js +1 -1
- package/dist/components/custom-forms/FORMS/index.esm.js +1 -1
- package/dist/components/custom-forms/FORMS/index.js +1 -1
- package/dist/components/custom-forms/grid-view/grid-view/index.esm.js +1 -1
- package/dist/components/custom-forms/grid-view/grid-view/index.js +1 -1
- package/dist/components/custom-forms/grid-view/index.esm.js +1 -1
- package/dist/components/custom-forms/grid-view/index.js +1 -1
- package/dist/components/custom-forms/index.esm.js +2 -2
- package/dist/components/custom-forms/index.js +2 -2
- package/dist/components/customer-ai-summary/index.esm.js +2 -2
- package/dist/components/customer-ai-summary/index.js +2 -2
- package/dist/components/department-add-modal/index.esm.js +1 -1
- package/dist/components/department-add-modal/index.js +1 -1
- package/dist/components/designation-add-modal/index.esm.js +1 -1
- package/dist/components/designation-add-modal/index.js +1 -1
- package/dist/components/editor/custom-editor/index.esm.js +1 -1
- package/dist/components/editor/custom-editor/index.js +1 -1
- package/dist/components/editor/index.esm.js +1 -1
- package/dist/components/editor/index.js +1 -1
- package/dist/components/examples/FlexibleReduxExample/index.esm.js +1 -1
- package/dist/components/examples/FlexibleReduxExample/index.js +1 -1
- package/dist/components/examples/index.esm.js +1 -1
- package/dist/components/examples/index.js +1 -1
- package/dist/components/filter/components/index.esm.js +1 -1
- package/dist/components/filter/components/index.js +1 -1
- package/dist/components/filter/components/value-editor/index.esm.js +1 -1
- package/dist/components/filter/components/value-editor/index.js +1 -1
- package/dist/components/filter/filter/index.esm.js +1 -1
- package/dist/components/filter/filter/index.js +1 -1
- package/dist/components/filter/index.esm.js +2 -2
- package/dist/components/filter/index.js +2 -2
- package/dist/components/footer/footer/index.esm.js +1 -1
- package/dist/components/footer/footer/index.js +1 -1
- package/dist/components/footer/index.esm.js +1 -1
- package/dist/components/footer/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/dynamic-dependent-field/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/dynamic-dependent-field/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/dynamic-select/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/dynamic-select/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/dynamic-text-editor/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/dynamic-text-editor/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/fixed-asset-item-add-modal/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/fixed-asset-item-add-modal/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/index.esm.js +4 -4
- package/dist/components/form-control/form-builder/form-builder-element/index.js +4 -4
- package/dist/components/form-control/form-builder/form-builder-element/location-add-modal/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/location-add-modal/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/select-configuration/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/select-configuration/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/table/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/table/index.js +1 -1
- package/dist/components/form-control/form-builder/index.esm.js +4 -4
- package/dist/components/form-control/form-builder/index.js +4 -4
- package/dist/components/form-control/form-parser/form-parser/index.esm.js +1 -1
- package/dist/components/form-control/form-parser/form-parser/index.js +1 -1
- package/dist/components/form-control/form-parser/form-section/index.esm.js +1 -1
- package/dist/components/form-control/form-parser/form-section/index.js +1 -1
- package/dist/components/form-control/form-parser/index.esm.js +2 -2
- package/dist/components/form-control/form-parser/index.js +2 -2
- package/dist/components/form-control/index.esm.js +6 -6
- package/dist/components/form-control/index.js +6 -6
- package/dist/components/header/components/global-search/index.esm.js +1 -1
- package/dist/components/header/components/global-search/index.js +1 -1
- package/dist/components/header/components/index.esm.js +1 -1
- package/dist/components/header/components/index.js +1 -1
- package/dist/components/header/components/notification-menu/index.esm.js +1 -1
- package/dist/components/header/components/notification-menu/index.js +1 -1
- package/dist/components/header/components/notification-menu/notification-menu/index.esm.js +1 -1
- package/dist/components/header/components/notification-menu/notification-menu/index.js +1 -1
- package/dist/components/header/header/index.esm.js +1 -1
- package/dist/components/header/header/index.js +1 -1
- package/dist/components/header/header-enhanced/index.esm.js +1 -1
- package/dist/components/header/header-enhanced/index.js +1 -1
- package/dist/components/header/index.esm.js +5 -5
- package/dist/components/header/index.js +5 -5
- package/dist/components/header/redux/actionCreator/index.esm.js +1 -1
- package/dist/components/header/redux/actionCreator/index.js +1 -1
- package/dist/components/header/redux/index.esm.js +2 -2
- package/dist/components/header/redux/index.js +2 -2
- package/dist/components/header/redux/reducer/index.esm.js +1 -1
- package/dist/components/header/redux/reducer/index.js +1 -1
- package/dist/components/index.esm.js +43 -43
- package/dist/components/index.js +43 -43
- package/dist/components/inventory-reports-title-bar/index.esm.js +3 -3
- package/dist/components/inventory-reports-title-bar/index.js +3 -3
- package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.esm.js +1 -1
- package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.js +1 -1
- package/dist/components/inventory-reports-title-bar/redux/actionCreator/index.esm.js +1 -1
- package/dist/components/inventory-reports-title-bar/redux/actionCreator/index.js +1 -1
- package/dist/components/inventory-reports-title-bar/redux/index.esm.js +2 -2
- package/dist/components/inventory-reports-title-bar/redux/index.js +2 -2
- package/dist/components/inventory-reports-title-bar/redux/reducer/index.esm.js +1 -1
- package/dist/components/inventory-reports-title-bar/redux/reducer/index.js +1 -1
- package/dist/components/listing/index.esm.js +1 -1
- package/dist/components/listing/index.js +1 -1
- package/dist/components/listing/listing/index.esm.js +1 -1
- package/dist/components/listing/listing/index.js +1 -1
- package/dist/components/location-select/index.esm.js +1 -1
- package/dist/components/location-select/index.js +1 -1
- package/dist/components/material-editable-table/components/index.esm.js +1 -1
- package/dist/components/material-editable-table/components/index.js +1 -1
- package/dist/components/material-editable-table/components/inline-edit-fields/index.esm.js +1 -1
- package/dist/components/material-editable-table/components/inline-edit-fields/index.js +1 -1
- package/dist/components/material-editable-table/index.esm.js +2 -2
- package/dist/components/material-editable-table/index.js +2 -2
- package/dist/components/material-editable-table/material-editable-table/index.esm.js +1 -1
- package/dist/components/material-editable-table/material-editable-table/index.js +1 -1
- package/dist/components/material-table/components/index.esm.js +1 -1
- package/dist/components/material-table/components/index.js +1 -1
- package/dist/components/material-table/components/inline-edit-fields/index.esm.js +1 -1
- package/dist/components/material-table/components/inline-edit-fields/index.js +1 -1
- package/dist/components/material-table/index.esm.js +1 -1
- package/dist/components/material-table/index.js +1 -1
- package/dist/components/material-table/material-table/index.esm.js +1 -1
- package/dist/components/material-table/material-table/index.js +1 -1
- package/dist/components/page-navigator/components/index.esm.js +1 -1
- package/dist/components/page-navigator/components/index.js +1 -1
- package/dist/components/page-navigator/components/page-action/index.esm.js +1 -1
- package/dist/components/page-navigator/components/page-action/index.js +1 -1
- package/dist/components/page-navigator/index.esm.js +2 -2
- package/dist/components/page-navigator/index.js +2 -2
- package/dist/components/page-navigator/page-navigator/index.esm.js +1 -1
- package/dist/components/page-navigator/page-navigator/index.js +1 -1
- package/dist/components/parties-modal/index.esm.js +1 -1
- package/dist/components/parties-modal/index.js +1 -1
- package/dist/components/parties-modal/parties-modal/index.esm.js +1 -1
- package/dist/components/parties-modal/parties-modal/index.js +1 -1
- package/dist/components/providers/ERPUIProvider/index.esm.js +1 -1
- package/dist/components/providers/ERPUIProvider/index.js +1 -1
- package/dist/components/providers/index.esm.js +1 -1
- package/dist/components/providers/index.js +1 -1
- package/dist/components/quick-approval-modal/index.esm.js +1 -1
- package/dist/components/quick-approval-modal/index.js +1 -1
- package/dist/components/quick-approval-modal/quick-approval-modal/index.esm.js +1 -1
- package/dist/components/quick-approval-modal/quick-approval-modal/index.js +1 -1
- package/dist/components/reports/dynamic-report/dynamic-report/index.esm.js +1 -1
- package/dist/components/reports/dynamic-report/dynamic-report/index.js +1 -1
- package/dist/components/reports/dynamic-report/dynamic-rows/index.esm.js +1 -1
- package/dist/components/reports/dynamic-report/dynamic-rows/index.js +1 -1
- package/dist/components/reports/dynamic-report/index.esm.js +2 -2
- package/dist/components/reports/dynamic-report/index.js +2 -2
- package/dist/components/reports/index.esm.js +2 -2
- package/dist/components/reports/index.js +2 -2
- package/dist/components/reports-title-bar/index.esm.js +3 -3
- package/dist/components/reports-title-bar/index.js +3 -3
- package/dist/components/reports-title-bar/redux/actionCreator/index.esm.js +1 -1
- package/dist/components/reports-title-bar/redux/actionCreator/index.js +1 -1
- package/dist/components/reports-title-bar/redux/index.esm.js +2 -2
- package/dist/components/reports-title-bar/redux/index.js +2 -2
- package/dist/components/reports-title-bar/redux/reducer/index.esm.js +1 -1
- package/dist/components/reports-title-bar/redux/reducer/index.js +1 -1
- package/dist/components/reports-title-bar/reports-title-bar/index.esm.js +1 -1
- package/dist/components/reports-title-bar/reports-title-bar/index.js +1 -1
- package/dist/components/rfq-response/index.esm.js +1 -1
- package/dist/components/rfq-response/index.js +1 -1
- package/dist/components/rfq-response/item-response-details/index.esm.js +1 -1
- package/dist/components/rfq-response/item-response-details/index.js +1 -1
- package/dist/components/schedule-report/index.esm.js +2 -2
- package/dist/components/schedule-report/index.js +2 -2
- package/dist/components/schedule-report/schedule-report/index.esm.js +1 -1
- package/dist/components/schedule-report/schedule-report/index.js +1 -1
- package/dist/components/schedule-report/schedule-report-modal/index.esm.js +1 -1
- package/dist/components/schedule-report/schedule-report-modal/index.js +1 -1
- package/dist/components/searchable-select/index.esm.js +1 -1
- package/dist/components/searchable-select/index.js +1 -1
- package/dist/components/share-modal/index.esm.js +4 -4
- package/dist/components/share-modal/index.js +4 -4
- package/dist/components/share-modal/redux/actionCreator/index.esm.js +1 -1
- package/dist/components/share-modal/redux/actionCreator/index.js +1 -1
- package/dist/components/share-modal/redux/index.esm.js +2 -2
- package/dist/components/share-modal/redux/index.js +2 -2
- package/dist/components/share-modal/redux/reducer/index.esm.js +1 -1
- package/dist/components/share-modal/redux/reducer/index.js +1 -1
- package/dist/components/share-modal/share-modal/index.esm.js +1 -1
- package/dist/components/share-modal/share-modal/index.js +1 -1
- package/dist/components/share-modal/share-modal-enhanced/index.esm.js +1 -1
- package/dist/components/share-modal/share-modal-enhanced/index.js +1 -1
- package/dist/components/team-add-modal/index.esm.js +1 -1
- package/dist/components/team-add-modal/index.js +1 -1
- package/dist/components/uom-field-wrapper/index.esm.js +1 -1
- package/dist/components/uom-field-wrapper/index.js +1 -1
- package/dist/components/uom-field-wrapper/uom-field-wrapper/index.esm.js +1 -1
- package/dist/components/uom-field-wrapper/uom-field-wrapper/index.js +1 -1
- package/dist/components/upload-excel/index.esm.js +1 -1
- package/dist/components/upload-excel/index.js +1 -1
- package/dist/components/upload-excel/upload-excel/index.esm.js +1 -1
- package/dist/components/upload-excel/upload-excel/index.js +1 -1
- package/dist/components/vendor-ai-summary/index.esm.js +1 -1
- package/dist/components/vendor-ai-summary/index.js +1 -1
- package/dist/hooks/index.esm.js +6 -6
- package/dist/hooks/index.js +6 -6
- package/dist/hooks/use-translations/index.esm.js +1 -1
- package/dist/hooks/use-translations/index.js +1 -1
- package/dist/hooks/useAccountSetting/index.esm.js +1 -1
- package/dist/hooks/useAccountSetting/index.js +1 -1
- package/dist/hooks/useCheckSkuAndName/index.esm.js +1 -1
- package/dist/hooks/useCheckSkuAndName/index.js +1 -1
- package/dist/hooks/useReduxIntegration/index.esm.js +1 -1
- package/dist/hooks/useReduxIntegration/index.js +1 -1
- package/dist/hooks/useUniquenessCheck/index.esm.js +1 -1
- package/dist/hooks/useUniquenessCheck/index.js +1 -1
- package/dist/index.esm.js +71 -71
- package/dist/index.js +71 -71
- package/dist/layout/fullScreen/index.esm.js +1 -1
- package/dist/layout/fullScreen/index.js +1 -1
- package/dist/layout/index.esm.js +2 -2
- package/dist/layout/index.js +2 -2
- package/dist/layout/sidebarScreen/index.esm.js +1 -1
- package/dist/layout/sidebarScreen/index.js +1 -1
- package/dist/redux/index.esm.js +3 -3
- package/dist/redux/index.js +3 -3
- package/dist/runtime/index.esm.js +1 -1
- package/dist/runtime/index.js +1 -1
- package/dist/utils/api/index.esm.js +1 -1
- package/dist/utils/api/index.js +1 -1
- package/dist/utils/common/index.esm.js +1 -1
- package/dist/utils/common/index.js +1 -1
- package/dist/utils/common-utility/index.esm.js +1 -1
- package/dist/utils/common-utility/index.js +1 -1
- package/dist/utils/index.esm.js +5 -5
- package/dist/utils/index.js +4 -4
- package/dist/utils/text-measurement/index.esm.js +1 -1
- package/dist/utils/text-measurement/index.js +1 -1
- package/dist/views/afterAuth/dashboard/index.esm.js +1 -1
- package/dist/views/afterAuth/dashboard/index.js +1 -1
- package/dist/views/afterAuth/index.esm.js +2 -2
- package/dist/views/afterAuth/index.js +2 -2
- package/dist/views/afterAuth/page-view/index.esm.js +1 -1
- package/dist/views/afterAuth/page-view/index.js +1 -1
- package/dist/views/form-builder/custom-form/index.esm.js +1 -1
- package/dist/views/form-builder/custom-form/index.js +1 -1
- package/dist/views/form-builder/element-edit-forms/index.esm.js +1 -1
- package/dist/views/form-builder/element-edit-forms/index.js +1 -1
- package/dist/views/form-builder/form-fields/index.esm.js +1 -1
- package/dist/views/form-builder/form-fields/index.js +1 -1
- package/dist/views/form-builder/index.esm.js +4 -4
- package/dist/views/form-builder/index.js +4 -4
- package/dist/views/form-builder/redux/index.esm.js +1 -1
- package/dist/views/form-builder/redux/index.js +1 -1
- package/dist/views/index.esm.js +13 -13
- package/dist/views/index.js +13 -13
- package/dist/views/template-editor/add-template/index.esm.js +1 -1
- package/dist/views/template-editor/add-template/index.js +1 -1
- package/dist/views/template-editor/components/index.esm.js +1 -1
- package/dist/views/template-editor/components/index.js +1 -1
- package/dist/views/template-editor/edit-section-modal/index.esm.js +1 -1
- package/dist/views/template-editor/edit-section-modal/index.js +1 -1
- package/dist/views/template-editor/index.esm.js +7 -7
- package/dist/views/template-editor/index.js +7 -7
- package/dist/views/template-editor/routes/index.esm.js +1 -1
- package/dist/views/template-editor/routes/index.js +1 -1
- package/dist/views/template-editor/template-modal/index.esm.js +1 -1
- package/dist/views/template-editor/template-modal/index.js +1 -1
- package/dist/views/template-editor/templates/index.esm.js +1 -1
- package/dist/views/template-editor/templates/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const toolkit = require("@reduxjs/toolkit");
|
|
3
|
-
const api = require("./api-
|
|
3
|
+
const api = require("./api-BssOHO1r.js");
|
|
4
4
|
const createConfiguredApiClient = (baseApiClient, getAuthToken) => {
|
|
5
5
|
const configuredClient = {};
|
|
6
6
|
Object.keys(baseApiClient).forEach((methodName) => {
|
|
@@ -88,4 +88,4 @@ const createModuleSlice = ({
|
|
|
88
88
|
};
|
|
89
89
|
exports.createConfiguredApiClient = createConfiguredApiClient;
|
|
90
90
|
exports.createModuleSlice = createModuleSlice;
|
|
91
|
-
//# sourceMappingURL=module-reducer-
|
|
91
|
+
//# sourceMappingURL=module-reducer-CCShBW7s.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-reducer-
|
|
1
|
+
{"version":3,"file":"module-reducer-CCShBW7s.js","sources":["../../src/redux/apiConfig.ts","../../src/redux/module-reducer.ts"],"sourcesContent":["// API configuration helper for Redux slices\r\n// This allows consuming applications to configure their API clients\r\n\r\nexport interface ApiClientConfig {\r\n // Share modal API methods\r\n getV1PagesUserList?: (params?: any) => Promise<any>;\r\n postV1PagesShare?: (data: any) => Promise<any>;\r\n \r\n // Header API methods\r\n getV1Languages?: (params?: any) => Promise<any>;\r\n \r\n // Reports title bar API methods\r\n getV1Company?: (params?: any) => Promise<any>;\r\n \r\n // Inventory reports title bar API methods\r\n getV1InventoryItems?: (params?: any) => Promise<any>;\r\n getV1WarehouseLocation?: (params?: any) => Promise<any>;\r\n getV1AssemblyItems?: (params?: any) => Promise<any>;\r\n getV1BillsOfMaterials?: (params?: any) => Promise<any>;\r\n}\r\n\r\n// Helper function to validate API client configuration\r\nexport const validateApiClient = (apiClient: ApiClientConfig, requiredMethods: string[]): boolean => {\r\n for (const method of requiredMethods) {\r\n if (typeof (apiClient as any)[method] !== 'function') {\r\n console.warn(`API client missing required method: ${method}`);\r\n return false;\r\n }\r\n }\r\n return true;\r\n};\r\n\r\n// Predefined method groups for different slices\r\nexport const API_METHOD_GROUPS = {\r\n share: ['getV1PagesUserList', 'postV1PagesShare'],\r\n header: ['getV1Languages'],\r\n reportsTitleBar: ['getV1Company'],\r\n inventoryReportsTitleBar: ['getV1InventoryItems', 'getV1WarehouseLocation', 'getV1AssemblyItems', 'getV1BillsOfMaterials'],\r\n} as const;\r\n\r\n// Helper to create a configured API client with authentication\r\nexport const createConfiguredApiClient = (\r\n baseApiClient: any,\r\n getAuthToken: () => any\r\n): ApiClientConfig => {\r\n const configuredClient: any = {};\r\n \r\n // Wrap each API method to include authentication\r\n Object.keys(baseApiClient).forEach(methodName => {\r\n if (typeof baseApiClient[methodName] === 'function') {\r\n configuredClient[methodName] = async (params: any = {}) => {\r\n const authToken = getAuthToken();\r\n return baseApiClient[methodName]({ ...authToken, ...params });\r\n };\r\n }\r\n });\r\n \r\n return configuredClient;\r\n};","/* eslint-disable @typescript-eslint/no-unused-vars */\r\n/* eslint-disable unused-imports/no-unused-vars */\r\nimport { createSlice, SliceCaseReducers, AnyAction, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { getErrorMessage } from \"../utils/common\";\r\n\r\ninterface SliceConfig<T extends StateSlice> {\r\n name: string;\r\n initialState: T;\r\n actions: Partial<Record<keyof T, ActionGroup<T>>>;\r\n}\r\n\r\n// Utility functions to handle loading and error state\r\nconst setLoadingState = <T extends StateSlice>(state: T, key: keyof T, isLoading = true) => {\r\n if (state[key] && typeof state[key] === \"object\") {\r\n state[key] = { ...state[key], isLoading, isError: false, error: \"\" };\r\n }\r\n};\r\n\r\nconst setErrorState = <T extends StateSlice>(state: T, key: keyof T, error: string) => {\r\n if (state[key] && typeof state[key] === \"object\") {\r\n state[key] = { ...state[key], isLoading: false, isError: true, error };\r\n }\r\n};\r\n\r\n// **Generic Redux Slice Factory**\r\nexport const createModuleSlice = <T extends StateSlice>({\r\n name,\r\n initialState,\r\n actions,\r\n reducers,\r\n extraReducers\r\n}: SliceConfig<T>) => {\r\n return createSlice<T, SliceCaseReducers<T>>({\r\n name,\r\n initialState,\r\n reducers: {\r\n setPaginationModel: (state, { payload }: PayloadAction<Partial<T[\"paginationModel\"]>>) => {\r\n if (\"paginationModel\" in state && typeof state.paginationModel === \"object\") {\r\n state.paginationModel = { ...state.paginationModel, ...payload };\r\n }\r\n },\r\n setOptionsData: (state, { payload }: PayloadAction<{ name: string; value: any }>) => {\r\n if (\"optionsData\" in state && typeof state.optionsData === \"object\") {\r\n state.optionsData = { ...state.optionsData, ...payload}\r\n }\r\n },\r\n setStaticOptions: (state, { payload }) => {\r\n state.staticOptions = {...state.staticOptions, ...payload}\r\n },\r\n resetState: () => initialState,\r\n ...reducers\r\n },\r\n extraReducers: (builder) => {\r\n Object.entries(actions).forEach(([stateKey, actionGroup]) => {\r\n if (actionGroup) {\r\n Object.entries(actionGroup).forEach(([actionName, action]) => {\r\n if (action && \"pending\" in action && \"fulfilled\" in action && \"rejected\" in action) {\r\n // Handle AsyncThunk Actions\r\n builder\r\n .addCase(action.pending, (state) => setLoadingState(state, stateKey as keyof T))\r\n .addCase(action.fulfilled, (state, { payload }: PayloadAction<any>) => {\r\n if (state[stateKey as keyof T] && typeof state[stateKey as keyof T] === \"object\") {\r\n state[stateKey as keyof T] = {\r\n ...state[stateKey as keyof T],\r\n isLoading: false,\r\n ...(payload?.rows ? { rows: payload.rows } : {}),\r\n ...(payload?.data ? { data: payload.data } : {}),\r\n ...(payload?.fields ? { fields: payload.fields } : {}),\r\n ...(payload?.activityLogs ? { activityLogs: payload.activityLogs } : {}),\r\n ...(payload?.pagination ? { pagination: payload.pagination } : {}),\r\n };\r\n if(payload?.pagination) {\r\n state.paginationModel = { ...state.paginationModel, ...payload.pagination }\r\n }\r\n }\r\n })\r\n .addCase(action.rejected, (state, { error }: AnyAction) =>{\r\n\r\n setErrorState(state, stateKey as keyof T, getErrorMessage(error?.message))\r\n }\r\n );\r\n }\r\n });\r\n }\r\n });\r\n if (extraReducers) {\r\n extraReducers(builder);\r\n }\r\n },\r\n \r\n });\r\n};\r\n"],"names":["createSlice","getErrorMessage"],"mappings":";;;AAyCO,MAAM,4BAA4B,CACvC,eACA,iBACoB;AACpB,QAAM,mBAAwB,CAAA;AAG9B,SAAO,KAAK,aAAa,EAAE,QAAQ,CAAA,eAAc;AAC/C,QAAI,OAAO,cAAc,UAAU,MAAM,YAAY;AACnD,uBAAiB,UAAU,IAAI,OAAO,SAAc,CAAA,MAAO;AACzD,cAAM,YAAY,aAAA;AAClB,eAAO,cAAc,UAAU,EAAE,EAAE,GAAG,WAAW,GAAG,QAAQ;AAAA,MAC9D;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO;AACT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ime = require("react/jsx-runtime");
|
|
3
3
|
const React = require("react");
|
|
4
4
|
const d3 = require("d3");
|
|
5
|
-
const formatChartValue = require("./format-chart-value-
|
|
5
|
+
const formatChartValue = require("./format-chart-value-KKQC1QCo.js");
|
|
6
6
|
function _interopNamespaceDefault(e) {
|
|
7
7
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
8
|
if (e) {
|
|
@@ -109,4 +109,4 @@ const MultiLineChart = ({
|
|
|
109
109
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: wrapperRef, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "relative" }, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { ref: svgRef, width: "100%", height, viewBox: `0 0 ${containerWidth} ${height}` }) }) });
|
|
110
110
|
};
|
|
111
111
|
exports.MultiLineChart = MultiLineChart;
|
|
112
|
-
//# sourceMappingURL=multi-line-chart-
|
|
112
|
+
//# sourceMappingURL=multi-line-chart-CQUOI36h.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-line-chart-BsQDKt-h.js","sources":["../../src/components/charts/multiLineChart/multi-line-chart.tsx"],"sourcesContent":["import React, { useRef, useEffect, useState } from 'react';\r\nimport * as d3 from 'd3';\r\nimport { formatChartValueLabel, getAxisLeftMargin } from '../format-chart-value';\r\n\r\nexport interface IMultiLineChartProps {\r\n data: any;\r\n width?: number;\r\n height?: number;\r\n margin?: { top: number, right: number, bottom: number, left: number };\r\n yAxisData: any;\r\n xAxisData: any;\r\n colors?: string[];\r\n line?: boolean;\r\n yAxisLabelType?: 'inPercent' | 'inValue' | 'custom';\r\n customLabelFormatter?: (value: number) => string;\r\n currency?: string\r\n}\r\nconst formatNumber = (num: number, symbol: string, labelType: string) => {\r\n if (labelType === 'inPercent') {\r\n return `${d3.format(\".0%\")(num / 100)}`;\r\n } else if (labelType === 'inValue') {\r\n return formatChartValueLabel(num, symbol);\r\n }\r\n return num.toString();\r\n};\r\n\r\n\r\n\r\nconst MultiLineChart = ({\r\n data,\r\n yAxisData,\r\n xAxisData,\r\n colors = ['steelblue', 'orange', 'green', 'red'], // Default colors\r\n height = 400,\r\n margin: marginProp = { top: 20, right: 50, bottom: 30, left: 50 },\r\n line = false,\r\n yAxisLabelType = 'inValue',\r\n currency,\r\n customLabelFormatter,\r\n}: IMultiLineChartProps) => {\r\n const svgRef = useRef<SVGSVGElement>(null);\r\n const wrapperRef = useRef<HTMLDivElement>(null);\r\n const [containerWidth, setContainerWidth] = useState<number>(0);\r\n\r\n useEffect(() => {\r\n }, [yAxisLabelType]);\r\n // ResizeObserver to adjust the chart size dynamically\r\n useEffect(() => {\r\n const wrapper = wrapperRef.current;\r\n\r\n const resizeObserver = new ResizeObserver((entries) => {\r\n if (entries[0]) {\r\n const newWidth = entries[0].contentRect.width;\r\n setContainerWidth(newWidth);\r\n }\r\n });\r\n\r\n if (wrapper) {\r\n resizeObserver.observe(wrapper);\r\n }\r\n\r\n return () => {\r\n if (wrapper) {\r\n resizeObserver.unobserve(wrapper);\r\n }\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n \r\n if (containerWidth === 0) return; \r\n\r\n const svg = d3.select(svgRef.current);\r\n svg.selectAll(\"*\").remove(); \r\n\r\n // Only money axes (with a currency symbol) get longer labels, so only they need a wider left margin\r\n const axisMax = d3.scaleLinear().domain([0, (d3.max(yAxisData) as number) || 0]).nice().domain()[1];\r\n const margin = currency ? { ...marginProp, left: getAxisLeftMargin(axisMax, marginProp.left) } : marginProp;\r\n const innerWidth = containerWidth-margin.left- margin.right;\r\n const innerHeight = height - margin.top - margin.bottom;\r\n\r\n // Scales\r\n const x = d3.scaleLinear()\r\n .domain([0, xAxisData.length]) // Linear scale based on index of xAxisData\r\n .range([0, innerWidth]);\r\n\r\n const y = d3.scaleLinear()\r\n .domain([0, d3.max(yAxisData) as number])\r\n .nice()\r\n .range([innerHeight, 0]);\r\n\r\n\r\n // Append x-axis\r\n const xAxis = svg.append(\"g\")\r\n .attr(\"class\", \"x-axis\")\r\n .attr(\"transform\", `translate(${margin.left},${height - margin.bottom})`)\r\n .call(d3.axisBottom(x)\r\n .ticks(xAxisData.length - 1)\r\n .tickFormat((d, i) => xAxisData[i])\r\n );\r\n\r\n xAxis.selectAll(\"text\")\r\n .attr(\"transform\", \"translate(20, 10)\") // Push labels down by 10px\r\n .style(\"text-anchor\", \"middle\"); // Keep the labels centered\r\n xAxis.select(\".domain\").attr(\"stroke\", \"none\");\r\n\r\n // Append y-axis\r\n const yAxis = svg.append(\"g\")\r\n .attr(\"class\", \"y-axis\")\r\n .attr(\"transform\", `translate(${margin.left},${margin.top})`)\r\n .call(d3.axisLeft(y).tickPadding(10).tickFormat((d: any) =>\r\n customLabelFormatter\r\n ? customLabelFormatter(d)\r\n : formatNumber(d, currency, yAxisLabelType)\r\n )\r\n .tickSizeOuter(0) as any,);\r\n\r\n if (line) {\r\n yAxis.selectAll('.grid-line')\r\n .data(y.ticks())\r\n .enter()\r\n .append('line')\r\n .attr('class', 'grid-line')\r\n .attr('x1', 0)\r\n .attr('x2', innerWidth)\r\n .attr('y1', d => y(d))\r\n .attr('y2', d => y(d))\r\n .style('stroke', '#ddd')\r\n .style('stroke-dasharray', '6,3') // Dotted line\r\n .style('stroke-width', 1);\r\n }\r\n xAxis.selectAll(\".tick line\").remove();\r\n yAxis.selectAll(\".tick line\").remove();\r\n yAxis.select(\".domain\").attr(\"stroke\", \"none\");\r\n\r\n // Plot the lines for each dataset\r\n\r\n Object.keys(data).forEach((key, index) => {\r\n if (key !== 'months') {\r\n const chartLine = d3.line()\r\n .x((d, i) => x(i)) // Use index-based positioning for x-axis\r\n .y((d: any) => y(d)).curve(data[key].isSmooth ? d3.curveMonotoneX : d3.curveLinear);\r\n // Append the line\r\n svg.append(\"path\")\r\n .datum(data[key]?.data)\r\n .attr(\"fill\", \"none\")\r\n .attr(\"stroke\", colors[index % colors.length])\r\n .attr(\"stroke-width\", 2)\r\n .attr(\"transform\", `translate(${margin.left},${margin.top})`)\r\n .attr(\"d\", chartLine)\r\n .on(\"mouseover\", function () {\r\n d3.select(this).attr(\"stroke-width\", 4);\r\n })\r\n .on(\"mouseout\", function () {\r\n d3.select(this).attr(\"stroke-width\", 2);\r\n });\r\n\r\n\r\n\r\n // Append circles for each data point\r\n if (data[key]?.displayDot) {\r\n svg.selectAll(`.circle-${key}`)\r\n .data(data[key]?.data)\r\n .enter()\r\n .append(\"circle\")\r\n .attr(\"class\", `circle-${key}`)\r\n .attr(\"cx\", (d, i) => x(i) + margin.left) // Adjust for margin.left\r\n .attr(\"cy\", (d: any) => y(d) + margin.top) // Adjust for margin.top\r\n .attr(\"r\", 4) // Circle radius\r\n .attr(\"fill\", colors[index % colors.length])\r\n .attr(\"stroke\", \"white\") // Optional: adds a border for contrast\r\n .attr(\"stroke-width\", 1.5)\r\n .on(\"mouseover\", function () {\r\n d3.select(this).attr(\"r\", 6); // Increase size on hover\r\n })\r\n .on(\"mouseout\", function () {\r\n d3.select(this).attr(\"r\", 4); // Return to normal size\r\n });\r\n }\r\n\r\n }\r\n });\r\n }, [data, yAxisData, xAxisData, height, containerWidth, colors, marginProp, line, yAxisLabelType, currency, customLabelFormatter]);\r\n\r\n return (\r\n <div ref={wrapperRef} style={{ width: '100%', height: '100%' }}>\r\n <div style={{ position: 'relative' }}>\r\n <svg ref={svgRef} width=\"100%\" height={height} viewBox={`0 0 ${containerWidth} ${height}`} />\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport { MultiLineChart };\r\nexport default MultiLineChart;\r\n"],"names":["d3","formatChartValueLabel","useRef","useState","useEffect","getAxisLeftMargin","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAM,eAAe,CAAC,KAAa,QAAgB,cAAsB;AACrE,MAAI,cAAc,aAAa;AAC3B,WAAO,GAAGA,cAAG,OAAO,KAAK,EAAE,MAAM,GAAG,CAAC;AAAA,EACzC,WAAW,cAAc,WAAW;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EAAE,EAC7B,KAAK,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC,IAAI,OAAO,IAAI,EACvC,KAAK,MAAM,CAAC,MAAW,EAAE,CAAC,IAAI,OAAO,GAAG,EACxC,KAAK,KAAK,CAAC,EACX,KAAK,QAAQ,OAAO,QAAQ,OAAO,MAAM,CAAC,EAC1C,KAAK,UAAU,OAAO,EACtB,KAAK,gBAAgB,GAAG,EACxB,GAAG,aAAa,WAAY;AACzBA,0BAAG,OAAO,IAAI,EAAE,KAAK,KAAK,CAAC;AAAA,UAC/B,CAAC,EACA,GAAG,YAAY,WAAY;AACxBA,0BAAG,OAAO,IAAI,EAAE,KAAK,KAAK,CAAC;AAAA,UAC/B,CAAC;AAAA,QACT;AAAA,MAEJ;AAAA,IACJ,CAAC;AAAA,EACL,GAAG,CAAC,MAAM,WAAW,WAAW,QAAQ,gBAAgB,QAAQ,YAAY,MAAM,gBAAgB,UAAU,oBAAoB,CAAC;AAEjI,SACIM,2BAAAA,IAAC,OAAA,EAAI,KAAK,YAAY,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAA,GAClD,UAAAA,2BAAAA,IAAC,OAAA,EAAI,OAAO,EAAE,UAAU,WAAA,GACpB,UAAAA,2BAAAA,IAAC,OAAA,EAAI,KAAK,QAAQ,OAAM,QAAO,QAAgB,SAAS,OAAO,cAAc,IAAI,MAAM,GAAA,CAAI,GAC/F,GACJ;AAER;;"}
|
|
1
|
+
{"version":3,"file":"multi-line-chart-CQUOI36h.js","sources":["../../src/components/charts/multiLineChart/multi-line-chart.tsx"],"sourcesContent":["import React, { useRef, useEffect, useState } from 'react';\r\nimport * as d3 from 'd3';\r\nimport { formatChartValueLabel, getAxisLeftMargin } from '../format-chart-value';\r\n\r\nexport interface IMultiLineChartProps {\r\n data: any;\r\n width?: number;\r\n height?: number;\r\n margin?: { top: number, right: number, bottom: number, left: number };\r\n yAxisData: any;\r\n xAxisData: any;\r\n colors?: string[];\r\n line?: boolean;\r\n yAxisLabelType?: 'inPercent' | 'inValue' | 'custom';\r\n customLabelFormatter?: (value: number) => string;\r\n currency?: string\r\n}\r\nconst formatNumber = (num: number, symbol: string, labelType: string) => {\r\n if (labelType === 'inPercent') {\r\n return `${d3.format(\".0%\")(num / 100)}`;\r\n } else if (labelType === 'inValue') {\r\n return formatChartValueLabel(num, symbol);\r\n }\r\n return num.toString();\r\n};\r\n\r\n\r\n\r\nconst MultiLineChart = ({\r\n data,\r\n yAxisData,\r\n xAxisData,\r\n colors = ['steelblue', 'orange', 'green', 'red'], // Default colors\r\n height = 400,\r\n margin: marginProp = { top: 20, right: 50, bottom: 30, left: 50 },\r\n line = false,\r\n yAxisLabelType = 'inValue',\r\n currency,\r\n customLabelFormatter,\r\n}: IMultiLineChartProps) => {\r\n const svgRef = useRef<SVGSVGElement>(null);\r\n const wrapperRef = useRef<HTMLDivElement>(null);\r\n const [containerWidth, setContainerWidth] = useState<number>(0);\r\n\r\n useEffect(() => {\r\n }, [yAxisLabelType]);\r\n // ResizeObserver to adjust the chart size dynamically\r\n useEffect(() => {\r\n const wrapper = wrapperRef.current;\r\n\r\n const resizeObserver = new ResizeObserver((entries) => {\r\n if (entries[0]) {\r\n const newWidth = entries[0].contentRect.width;\r\n setContainerWidth(newWidth);\r\n }\r\n });\r\n\r\n if (wrapper) {\r\n resizeObserver.observe(wrapper);\r\n }\r\n\r\n return () => {\r\n if (wrapper) {\r\n resizeObserver.unobserve(wrapper);\r\n }\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n \r\n if (containerWidth === 0) return; \r\n\r\n const svg = d3.select(svgRef.current);\r\n svg.selectAll(\"*\").remove(); \r\n\r\n // Only money axes (with a currency symbol) get longer labels, so only they need a wider left margin\r\n const axisMax = d3.scaleLinear().domain([0, (d3.max(yAxisData) as number) || 0]).nice().domain()[1];\r\n const margin = currency ? { ...marginProp, left: getAxisLeftMargin(axisMax, marginProp.left) } : marginProp;\r\n const innerWidth = containerWidth-margin.left- margin.right;\r\n const innerHeight = height - margin.top - margin.bottom;\r\n\r\n // Scales\r\n const x = d3.scaleLinear()\r\n .domain([0, xAxisData.length]) // Linear scale based on index of xAxisData\r\n .range([0, innerWidth]);\r\n\r\n const y = d3.scaleLinear()\r\n .domain([0, d3.max(yAxisData) as number])\r\n .nice()\r\n .range([innerHeight, 0]);\r\n\r\n\r\n // Append x-axis\r\n const xAxis = svg.append(\"g\")\r\n .attr(\"class\", \"x-axis\")\r\n .attr(\"transform\", `translate(${margin.left},${height - margin.bottom})`)\r\n .call(d3.axisBottom(x)\r\n .ticks(xAxisData.length - 1)\r\n .tickFormat((d, i) => xAxisData[i])\r\n );\r\n\r\n xAxis.selectAll(\"text\")\r\n .attr(\"transform\", \"translate(20, 10)\") // Push labels down by 10px\r\n .style(\"text-anchor\", \"middle\"); // Keep the labels centered\r\n xAxis.select(\".domain\").attr(\"stroke\", \"none\");\r\n\r\n // Append y-axis\r\n const yAxis = svg.append(\"g\")\r\n .attr(\"class\", \"y-axis\")\r\n .attr(\"transform\", `translate(${margin.left},${margin.top})`)\r\n .call(d3.axisLeft(y).tickPadding(10).tickFormat((d: any) =>\r\n customLabelFormatter\r\n ? customLabelFormatter(d)\r\n : formatNumber(d, currency, yAxisLabelType)\r\n )\r\n .tickSizeOuter(0) as any,);\r\n\r\n if (line) {\r\n yAxis.selectAll('.grid-line')\r\n .data(y.ticks())\r\n .enter()\r\n .append('line')\r\n .attr('class', 'grid-line')\r\n .attr('x1', 0)\r\n .attr('x2', innerWidth)\r\n .attr('y1', d => y(d))\r\n .attr('y2', d => y(d))\r\n .style('stroke', '#ddd')\r\n .style('stroke-dasharray', '6,3') // Dotted line\r\n .style('stroke-width', 1);\r\n }\r\n xAxis.selectAll(\".tick line\").remove();\r\n yAxis.selectAll(\".tick line\").remove();\r\n yAxis.select(\".domain\").attr(\"stroke\", \"none\");\r\n\r\n // Plot the lines for each dataset\r\n\r\n Object.keys(data).forEach((key, index) => {\r\n if (key !== 'months') {\r\n const chartLine = d3.line()\r\n .x((d, i) => x(i)) // Use index-based positioning for x-axis\r\n .y((d: any) => y(d)).curve(data[key].isSmooth ? d3.curveMonotoneX : d3.curveLinear);\r\n // Append the line\r\n svg.append(\"path\")\r\n .datum(data[key]?.data)\r\n .attr(\"fill\", \"none\")\r\n .attr(\"stroke\", colors[index % colors.length])\r\n .attr(\"stroke-width\", 2)\r\n .attr(\"transform\", `translate(${margin.left},${margin.top})`)\r\n .attr(\"d\", chartLine)\r\n .on(\"mouseover\", function () {\r\n d3.select(this).attr(\"stroke-width\", 4);\r\n })\r\n .on(\"mouseout\", function () {\r\n d3.select(this).attr(\"stroke-width\", 2);\r\n });\r\n\r\n\r\n\r\n // Append circles for each data point\r\n if (data[key]?.displayDot) {\r\n svg.selectAll(`.circle-${key}`)\r\n .data(data[key]?.data)\r\n .enter()\r\n .append(\"circle\")\r\n .attr(\"class\", `circle-${key}`)\r\n .attr(\"cx\", (d, i) => x(i) + margin.left) // Adjust for margin.left\r\n .attr(\"cy\", (d: any) => y(d) + margin.top) // Adjust for margin.top\r\n .attr(\"r\", 4) // Circle radius\r\n .attr(\"fill\", colors[index % colors.length])\r\n .attr(\"stroke\", \"white\") // Optional: adds a border for contrast\r\n .attr(\"stroke-width\", 1.5)\r\n .on(\"mouseover\", function () {\r\n d3.select(this).attr(\"r\", 6); // Increase size on hover\r\n })\r\n .on(\"mouseout\", function () {\r\n d3.select(this).attr(\"r\", 4); // Return to normal size\r\n });\r\n }\r\n\r\n }\r\n });\r\n }, [data, yAxisData, xAxisData, height, containerWidth, colors, marginProp, line, yAxisLabelType, currency, customLabelFormatter]);\r\n\r\n return (\r\n <div ref={wrapperRef} style={{ width: '100%', height: '100%' }}>\r\n <div style={{ position: 'relative' }}>\r\n <svg ref={svgRef} width=\"100%\" height={height} viewBox={`0 0 ${containerWidth} ${height}`} />\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport { MultiLineChart };\r\nexport default MultiLineChart;\r\n"],"names":["d3","formatChartValueLabel","useRef","useState","useE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
-
import { g as getAxisLeftMargin, f as formatChartValueLabel } from "./format-chart-value-
|
|
4
|
+
import { g as getAxisLeftMargin, f as formatChartValueLabel } from "./format-chart-value-GUtvkF0_.esm.js";
|
|
5
5
|
const formatNumber = (num, symbol, labelType) => {
|
|
6
6
|
if (labelType === "inPercent") {
|
|
7
7
|
return `${d3.format(".0%")(num / 100)}`;
|
|
@@ -93,4 +93,4 @@ const MultiLineChart = ({
|
|
|
93
93
|
export {
|
|
94
94
|
MultiLineChart as M
|
|
95
95
|
};
|
|
96
|
-
//# sourceMappingURL=multi-line-chart-
|
|
96
|
+
//# sourceMappingURL=multi-line-chart-W5Gjnxlm.esm.js.map
|
package/dist/chunks/{multi-line-chart-CVSP6q9f.esm.js.map → multi-line-chart-W5Gjnxlm.esm.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-line-chart-CVSP6q9f.esm.js","sources":["../../src/components/charts/multiLineChart/multi-line-chart.tsx"],"sourcesContent":["import React, { useRef, useEffect, useState } from 'react';\r\nimport * as d3 from 'd3';\r\nimport { formatChartValueLabel, getAxisLeftMargin } from '../format-chart-value';\r\n\r\nexport interface IMultiLineChartProps {\r\n data: any;\r\n width?: number;\r\n height?: number;\r\n margin?: { top: number, right: number, bottom: number, left: number };\r\n yAxisData: any;\r\n xAxisData: any;\r\n colors?: string[];\r\n line?: boolean;\r\n yAxisLabelType?: 'inPercent' | 'inValue' | 'custom';\r\n customLabelFormatter?: (value: number) => string;\r\n currency?: string\r\n}\r\nconst formatNumber = (num: number, symbol: string, labelType: string) => {\r\n if (labelType === 'inPercent') {\r\n return `${d3.format(\".0%\")(num / 100)}`;\r\n } else if (labelType === 'inValue') {\r\n return formatChartValueLabel(num, symbol);\r\n }\r\n return num.toString();\r\n};\r\n\r\n\r\n\r\nconst MultiLineChart = ({\r\n data,\r\n yAxisData,\r\n xAxisData,\r\n colors = ['steelblue', 'orange', 'green', 'red'], // Default colors\r\n height = 400,\r\n margin: marginProp = { top: 20, right: 50, bottom: 30, left: 50 },\r\n line = false,\r\n yAxisLabelType = 'inValue',\r\n currency,\r\n customLabelFormatter,\r\n}: IMultiLineChartProps) => {\r\n const svgRef = useRef<SVGSVGElement>(null);\r\n const wrapperRef = useRef<HTMLDivElement>(null);\r\n const [containerWidth, setContainerWidth] = useState<number>(0);\r\n\r\n useEffect(() => {\r\n }, [yAxisLabelType]);\r\n // ResizeObserver to adjust the chart size dynamically\r\n useEffect(() => {\r\n const wrapper = wrapperRef.current;\r\n\r\n const resizeObserver = new ResizeObserver((entries) => {\r\n if (entries[0]) {\r\n const newWidth = entries[0].contentRect.width;\r\n setContainerWidth(newWidth);\r\n }\r\n });\r\n\r\n if (wrapper) {\r\n resizeObserver.observe(wrapper);\r\n }\r\n\r\n return () => {\r\n if (wrapper) {\r\n resizeObserver.unobserve(wrapper);\r\n }\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n \r\n if (containerWidth === 0) return; \r\n\r\n const svg = d3.select(svgRef.current);\r\n svg.selectAll(\"*\").remove(); \r\n\r\n // Only money axes (with a currency symbol) get longer labels, so only they need a wider left margin\r\n const axisMax = d3.scaleLinear().domain([0, (d3.max(yAxisData) as number) || 0]).nice().domain()[1];\r\n const margin = currency ? { ...marginProp, left: getAxisLeftMargin(axisMax, marginProp.left) } : marginProp;\r\n const innerWidth = containerWidth-margin.left- margin.right;\r\n const innerHeight = height - margin.top - margin.bottom;\r\n\r\n // Scales\r\n const x = d3.scaleLinear()\r\n .domain([0, xAxisData.length]) // Linear scale based on index of xAxisData\r\n .range([0, innerWidth]);\r\n\r\n const y = d3.scaleLinear()\r\n .domain([0, d3.max(yAxisData) as number])\r\n .nice()\r\n .range([innerHeight, 0]);\r\n\r\n\r\n // Append x-axis\r\n const xAxis = svg.append(\"g\")\r\n .attr(\"class\", \"x-axis\")\r\n .attr(\"transform\", `translate(${margin.left},${height - margin.bottom})`)\r\n .call(d3.axisBottom(x)\r\n .ticks(xAxisData.length - 1)\r\n .tickFormat((d, i) => xAxisData[i])\r\n );\r\n\r\n xAxis.selectAll(\"text\")\r\n .attr(\"transform\", \"translate(20, 10)\") // Push labels down by 10px\r\n .style(\"text-anchor\", \"middle\"); // Keep the labels centered\r\n xAxis.select(\".domain\").attr(\"stroke\", \"none\");\r\n\r\n // Append y-axis\r\n const yAxis = svg.append(\"g\")\r\n .attr(\"class\", \"y-axis\")\r\n .attr(\"transform\", `translate(${margin.left},${margin.top})`)\r\n .call(d3.axisLeft(y).tickPadding(10).tickFormat((d: any) =>\r\n customLabelFormatter\r\n ? customLabelFormatter(d)\r\n : formatNumber(d, currency, yAxisLabelType)\r\n )\r\n .tickSizeOuter(0) as any,);\r\n\r\n if (line) {\r\n yAxis.selectAll('.grid-line')\r\n .data(y.ticks())\r\n .enter()\r\n .append('line')\r\n .attr('class', 'grid-line')\r\n .attr('x1', 0)\r\n .attr('x2', innerWidth)\r\n .attr('y1', d => y(d))\r\n .attr('y2', d => y(d))\r\n .style('stroke', '#ddd')\r\n .style('stroke-dasharray', '6,3') // Dotted line\r\n .style('stroke-width', 1);\r\n }\r\n xAxis.selectAll(\".tick line\").remove();\r\n yAxis.selectAll(\".tick line\").remove();\r\n yAxis.select(\".domain\").attr(\"stroke\", \"none\");\r\n\r\n // Plot the lines for each dataset\r\n\r\n Object.keys(data).forEach((key, index) => {\r\n if (key !== 'months') {\r\n const chartLine = d3.line()\r\n .x((d, i) => x(i)) // Use index-based positioning for x-axis\r\n .y((d: any) => y(d)).curve(data[key].isSmooth ? d3.curveMonotoneX : d3.curveLinear);\r\n // Append the line\r\n svg.append(\"path\")\r\n .datum(data[key]?.data)\r\n .attr(\"fill\", \"none\")\r\n .attr(\"stroke\", colors[index % colors.length])\r\n .attr(\"stroke-width\", 2)\r\n .attr(\"transform\", `translate(${margin.left},${margin.top})`)\r\n .attr(\"d\", chartLine)\r\n .on(\"mouseover\", function () {\r\n d3.select(this).attr(\"stroke-width\", 4);\r\n })\r\n .on(\"mouseout\", function () {\r\n d3.select(this).attr(\"stroke-width\", 2);\r\n });\r\n\r\n\r\n\r\n // Append circles for each data point\r\n if (data[key]?.displayDot) {\r\n svg.selectAll(`.circle-${key}`)\r\n .data(data[key]?.data)\r\n .enter()\r\n .append(\"circle\")\r\n .attr(\"class\", `circle-${key}`)\r\n .attr(\"cx\", (d, i) => x(i) + margin.left) // Adjust for margin.left\r\n .attr(\"cy\", (d: any) => y(d) + margin.top) // Adjust for margin.top\r\n .attr(\"r\", 4) // Circle radius\r\n .attr(\"fill\", colors[index % colors.length])\r\n .attr(\"stroke\", \"white\") // Optional: adds a border for contrast\r\n .attr(\"stroke-width\", 1.5)\r\n .on(\"mouseover\", function () {\r\n d3.select(this).attr(\"r\", 6); // Increase size on hover\r\n })\r\n .on(\"mouseout\", function () {\r\n d3.select(this).attr(\"r\", 4); // Return to normal size\r\n });\r\n }\r\n\r\n }\r\n });\r\n }, [data, yAxisData, xAxisData, height, containerWidth, colors, marginProp, line, yAxisLabelType, currency, customLabelFormatter]);\r\n\r\n return (\r\n <div ref={wrapperRef} style={{ width: '100%', height: '100%' }}>\r\n <div style={{ position: 'relative' }}>\r\n <svg ref={svgRef} width=\"100%\" height={height} viewBox={`0 0 ${containerWidth} ${height}`} />\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport { MultiLineChart };\r\nexport default MultiLineChart;\r\n"],"names":[],"mappings":";;;;AAiBA,MAAM,eAAe,CAAC,KAAa,QAAgB,cAAsB;AACrE,MAAI,cAAc,aAAa;AAC3B,WAAO,GAAG,GAAG,OAAO,KAAK,EAAE,MAAM,GAAG,CAAC;AAAA,EACzC,WAAW,cAAc,WAAW;AAChC,WAAO,sBAAsB,KAAK,MAAM;AAAA,EAC5C;AACA,SAAO,IAAI,SAAA;AACf;AAIA,MAAM,iBAAiB,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,CAAC,aAAa,UAAU,SAAS,KAAK;AAAA;AAAA,EAC/C,SAAS;AAAA,EACT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AAI,EAAE,KAAK,KAAK,CAAC;AAAA,UAC/B,CAAC,EACA,GAAG,YAAY,WAAY;AACxB,eAAG,OAAO,IAAI,EAAE,KAAK,KAAK,CAAC;AAAA,UAC/B,CAAC;AAAA,QACT;AAAA,MAEJ;AAAA,IACJ,CAAC;AAAA,EACL,GAAG,CAAC,MAAM,WAAW,WAAW,QAAQ,gBAAgB,QAAQ,YAAY,MAAM,gBAAgB,UAAU,oBAAoB,CAAC;AAEjI,SACI,oBAAC,OAAA,EAAI,KAAK,YAAY,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAA,GAClD,UAAA,oBAAC,OAAA,EAAI,OAAO,EAAE,UAAU,WAAA,GACpB,UAAA,oBAAC,OAAA,EAAI,KAAK,QAAQ,OAAM,QAAO,QAAgB,SAAS,OAAO,cAAc,IAAI,MAAM,GAAA,CAAI,GAC/F,GACJ;AAER;"}
|
|
1
|
+
{"version":3,"file":"multi-line-chart-W5Gjnxlm.esm.js","sources":["../../src/components/charts/multiLineChart/multi-line-chart.tsx"],"sourcesContent":["import React, { useRef, useEffect, useState } from 'react';\r\nimport * as d3 from 'd3';\r\nimport { formatChartValueLabel, getAxisLeftMargin } from '../format-chart-value';\r\n\r\nexport interface IMultiLineChartProps {\r\n data: any;\r\n width?: number;\r\n height?: number;\r\n margin?: { top: number, right: number, bottom: number, left: number };\r\n yAxisData: any;\r\n xAxisData: any;\r\n colors?: string[];\r\n line?: boolean;\r\n yAxisLabelType?: 'inPercent' | 'inValue' | 'custom';\r\n customLabelFormatter?: (value: number) => string;\r\n currency?: string\r\n}\r\nconst formatNumber = (num: number, symbol: string, labelType: string) => {\r\n if (labelType === 'inPercent') {\r\n return `${d3.format(\".0%\")(num / 100)}`;\r\n } else if (labelType === 'inValue') {\r\n return formatChartValueLabel(num, symbol);\r\n }\r\n return num.toString();\r\n};\r\n\r\n\r\n\r\nconst MultiLineChart = ({\r\n data,\r\n yAxisData,\r\n xAxisData,\r\n colors = ['steelblue', 'orange', 'green', 'red'], // Default colors\r\n height = 400,\r\n margin: marginProp = { top: 20, right: 50, bottom: 30, left: 50 },\r\n line = false,\r\n yAxisLabelType = 'inValue',\r\n currency,\r\n customLabelFormatter,\r\n}: IMultiLineChartProps) => {\r\n const svgRef = useRef<SVGSVGElement>(null);\r\n const wrapperRef = useRef<HTMLDivElement>(null);\r\n const [containerWidth, setContainerWidth] = useState<number>(0);\r\n\r\n useEffect(() => {\r\n }, [yAxisLabelType]);\r\n // ResizeObserver to adjust the chart size dynamically\r\n useEffect(() => {\r\n const wrapper = wrapperRef.current;\r\n\r\n const resizeObserver = new ResizeObserver((entries) => {\r\n if (entries[0]) {\r\n const newWidth = entries[0].contentRect.width;\r\n setContainerWidth(newWidth);\r\n }\r\n });\r\n\r\n if (wrapper) {\r\n resizeObserver.observe(wrapper);\r\n }\r\n\r\n return () => {\r\n if (wrapper) {\r\n resizeObserver.unobserve(wrapper);\r\n }\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n \r\n if (containerWidth === 0) return; \r\n\r\n const svg = d3.select(svgRef.current);\r\n svg.selectAll(\"*\").remove(); \r\n\r\n // Only money axes (with a currency symbol) get longer labels, so only they need a wider left margin\r\n const axisMax = d3.scaleLinear().domain([0, (d3.max(yAxisData) as number) || 0]).nice().domain()[1];\r\n const margin = currency ? { ...marginProp, left: getAxisLeftMargin(axisMax, marginProp.left) } : marginProp;\r\n const innerWidth = containerWidth-margin.left- margin.right;\r\n const innerHeight = height - margin.top - margin.bottom;\r\n\r\n // Scales\r\n const x = d3.scaleLinear()\r\n .domain([0, xAxisData.length]) // Linear scale based on index of xAxisData\r\n .range([0, innerWidth]);\r\n\r\n const y = d3.scaleLinear()\r\n .domain([0, d3.max(yAxisData) as number])\r\n .nice()\r\n .range([innerHeight, 0]);\r\n\r\n\r\n // Append x-axis\r\n const xAxis = svg.append(\"g\")\r\n .attr(\"class\", \"x-axis\")\r\n .attr(\"transform\", `translate(${margin.left},${height - margin.bottom})`)\r\n .call(d3.axisBottom(x)\r\n .ticks(xAxisData.length - 1)\r\n .tickFormat((d, i) => xAxisData[i])\r\n );\r\n\r\n xAxis.selectAll(\"text\")\r\n .attr(\"transform\", \"translate(20, 10)\") // Push labels down by 10px\r\n .style(\"text-anchor\", \"middle\"); // Keep the labels centered\r\n xAxis.select(\".domain\").attr(\"stroke\", \"none\");\r\n\r\n // Append y-axis\r\n const yAxis = svg.append(\"g\")\r\n .attr(\"class\", \"y-axis\")\r\n .attr(\"transform\", `translate(${margin.left},${margin.top})`)\r\n .call(d3.axisLeft(y).tickPadding(10).tickFormat((d: any) =>\r\n customLabelFormatter\r\n ? customLabelFormatter(d)\r\n : formatNumber(d, currency, yAxisLabelType)\r\n )\r\n .tickSizeOuter(0) as any,);\r\n\r\n if (line) {\r\n yAxis.selectAll('.grid-line')\r\n .data(y.ticks())\r\n .enter()\r\n .append('line')\r\n .attr('class', 'grid-line')\r\n .attr('x1', 0)\r\n .attr('x2', innerWidth)\r\n .attr('y1', d => y(d))\r\n .attr('y2', d => y(d))\r\n .style('stroke', '#ddd')\r\n .style('stroke-dasharray', '6,3') // Dotted line\r\n .style('stroke-width', 1);\r\n }\r\n xAxis.selectAll(\".tick line\").remove();\r\n yAxis.selectAll(\".tick line\").remove();\r\n yAxis.select(\".domain\").attr(\"stroke\", \"none\");\r\n\r\n // Plot the lines for each dataset\r\n\r\n Object.keys(data).forEach((key, index) => {\r\n if (key !== 'months') {\r\n const chartLine = d3.line()\r\n .x((d, i) => x(i)) // Use index-based positioning for x-axis\r\n .y((d: any) => y(d)).curve(data[key].isSmooth ? d3.curveMonotoneX : d3.curveLinear);\r\n // Append the line\r\n svg.append(\"path\")\r\n .datum(data[key]?.data)\r\n .attr(\"fill\", \"none\")\r\n .attr(\"stroke\", colors[index % colors.length])\r\n .attr(\"stroke-width\", 2)\r\n .attr(\"transform\", `translate(${margin.left},${margin.top})`)\r\n .attr(\"d\", chartLine)\r\n .on(\"mouseover\", function () {\r\n d3.select(this).attr(\"stroke-width\", 4);\r\n })\r\n .on(\"mouseout\", function () {\r\n d3.select(this).attr(\"stroke-width\", 2);\r\n });\r\n\r\n\r\n\r\n // Append circles for each data point\r\n if (data[key]?.displayDot) {\r\n svg.selectAll(`.circle-${key}`)\r\n .data(data[key]?.data)\r\n .enter()\r\n .append(\"circle\")\r\n .attr(\"class\", `circle-${key}`)\r\n .attr(\"cx\", (d, i) => x(i) + margin.left) // Adjust for margin.left\r\n .attr(\"cy\", (d: any) => y(d) + margin.top) // Adjust for margin.top\r\n .attr(\"r\", 4) // Circle radius\r\n .attr(\"fill\", colors[index % colors.length])\r\n .attr(\"stroke\", \"white\") // Optional: adds a border for contrast\r\n .attr(\"stroke-width\", 1.5)\r\n .on(\"mouseover\", function () {\r\n d3.select(this).attr(\"r\", 6); // Increase size on hover\r\n })\r\n .on(\"mouseout\", function () {\r\n d3.select(this).attr(\"r\", 4); // Return to normal size\r\n });\r\n }\r\n\r\n }\r\n });\r\n }, [data, yAxisData, xAxisData, height, containerWidth, colors, marginProp, line, yAxisLabelType, currency, customLabelFormatter]);\r\n\r\n return (\r\n <div ref={wrapperRef} style={{ width: '100%', height: '100%' }}>\r\n <div style={{ position: 'relative' }}>\r\n <svg ref={svgRef} width=\"100%\" height={height} viewBox={`0 0 ${containerWidth} ${height}`} />\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport { MultiLineChart };\r\nexport default MultiLineChart;\r\n"],"names":[],"mappings":";;;;AAiBA,MAAM,eAAe,CAAC,KAAa,QAAgB,cAAsB;AACrE,MAAI,cAAc,aAAa;AAC3B,WAAO,GAAG,GAAG,OAAO,KAAK,EAAE,MAAM,GAAG,CAAC;AAAA,EACzC,WAAW,cAAc,WAAW;AAChC,WAAO,sBAAsB,KAAK,MAAM;AAAA,EAC5C;AACA,SAAO,IAAI,SAAA;AACf;AAIA,MAAM,iBAAiB,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,CAAC,aAAa,UAAU,SAAS,KAAK;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AG,aAAa,WAAY;AACzB,eAAG,OAAO,IAAI,EAAE,KAAK,KAAK,CAAC;AAAA,UAC/B,CAAC,EACA,GAAG,YAAY,WAAY;AACxB,eAAG,OAAO,IAAI,EAAE,KAAK,KAAK,CAAC;AAAA,UAC/B,CAAC;AAAA,QACT;AAAA,MAEJ;AAAA,IACJ,CAAC;AAAA,EACL,GAAG,CAAC,MAAM,WAAW,WAAW,QAAQ,gBAAgB,QAAQ,YAAY,MAAM,gBAAgB,UAAU,oBAAoB,CAAC;AAEjI,SACI,oBAAC,OAAA,EAAI,KAAK,YAAY,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAA,GAClD,UAAA,oBAAC,OAAA,EAAI,OAAO,EAAE,UAAU,WAAA,GACpB,UAAA,oBAAC,OAAA,EAAI,KAAK,QAAQ,OAAM,QAAO,QAAgB,SAAS,OAAO,cAAc,IAAI,MAAM,GAAA,CAAI,GAC/F,GACJ;AAER;"}
|
|
@@ -4,7 +4,7 @@ const React = require("react");
|
|
|
4
4
|
const material = require("@mui/material");
|
|
5
5
|
const iconsMaterial = require("@mui/icons-material");
|
|
6
6
|
const api = require("./api-D3c7E20L.js");
|
|
7
|
-
const api$1 = require("./api-
|
|
7
|
+
const api$1 = require("./api-BssOHO1r.js");
|
|
8
8
|
const utils_formatText = require("../utils/format-text/index.js");
|
|
9
9
|
const typography = require("./typography-Bqfr1Ksf.js");
|
|
10
10
|
const images = require("../images/index.js");
|
|
@@ -497,4 +497,4 @@ const NotificationMenu = () => {
|
|
|
497
497
|
] });
|
|
498
498
|
};
|
|
499
499
|
exports.NotificationMenu = NotificationMenu;
|
|
500
|
-
//# sourceMappingURL=notification-menu-
|
|
500
|
+
//# sourceMappingURL=notification-menu-BNJrwnGN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-menu-ChtGTeQR.js","sources":["../../src/components/header/components/notification-menu/notification-menu.tsx"],"sourcesContent":["import React, { useState, useCallback, useRef, useEffect } from 'react'\r\nimport {\r\n\tIconButton,\r\n\tMenu,\r\n\tMenuItem,\r\n\tBadge,\r\n\tBox,\r\n\tCircularProgress,\r\n\tAvatar,\r\n\tListItemText,\r\n\tListItemAvatar,\r\n\tAlert,\r\n\tSkeleton,\r\n} from '@mui/material'\r\nimport {\r\n\tPerson as PersonIcon,\r\n\tEmail as EmailIcon,\r\n\tWarning as WarningIcon,\r\n\tCheckCircle as CheckCircleIcon,\r\n\tAssignment as AssignmentIcon,\r\n\tAccountBalance as AccountBalanceIcon,\r\n\tHourglassEmpty as HourglassEmptyIcon,\r\n\tCancel as CancelIcon,\r\n} from '@mui/icons-material'\r\nimport {\r\n\tgetV1Notification,\r\n\tgetV1NotificationMarkAllAsRead,\r\n\tpatchV1NotificationMarkAsReadId,\r\n} from '../../../../api-client/api.system-feature/api'\r\nimport { getErrorMessage, getToken } from '../../../../utils/common'\r\nimport formatText, { convertToUnderscore, formatLabel } from '../../../../utils/format-text'\r\nimport Typography from '../../../typography/typography'\r\nimport images from '../../../../assets/images'\r\nimport { generateRouteWithId } from '../../../../utils/route-utils'\r\nimport { PathnameGenerator, PathnameAccounting } from '../../../../constants/pathnames/pathname.accounting'\r\nimport { ROUTES as RENTALROUTES } from '../../../../constants/pathnames/pathname.rental'\r\n\r\nimport { PathnameInventory, PathnameGenerator as PathnameGeneratorInventory } from '../../../../constants/pathnames/pathname.inventory'\r\n\r\nimport {\r\n\tPathnameManufacturing,\r\n\tPathnameGenerator as PathnameGeneratorManufacuring,\r\n} from '../../../../constants/pathnames/pathname.manufacturing.ts'\r\n\r\nimport {\r\n\tPathnamePurchase,\r\n\tPathnameGenerator as PathnameGeneratorPurchase,\r\n} from '../../../../constants/pathnames/pathname.procurement.ts'\r\n\r\nimport { PathnameCrm, PathnameGenerator as PathnameGeneratorCrm } from '../../../../constants/pathnames/pathname.crm.ts'\r\n\r\nimport { PathnameRental, PathnameGenerator as PathnameGeneratorRental } from '../../../../constants/pathnames/pathname.rental.ts'\r\n\r\nimport { useNavigate } from 'react-router-dom'\r\nimport { Notification, Tick } from '../../../icons'\r\nimport Button from '../../../button/button'\r\nimport { enqueueSnackbar } from 'notistack'\r\n\r\nconst getNotificationUrl = (data: any) => {\r\n\tconst { moduleName = '', moduleId = '', notificationData = {} } = data\r\n\tconst key = convertToUnderscore(moduleName)\r\n\r\n\tconst routeMap: Record<string, () => string> = {\r\n\t\tsales_invoice: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_SALES_INVOICES), moduleId.toString()),\r\n\r\n\t\tasset_transfers: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_ASSET_TRANSFER), moduleId.toString()),\r\n\r\n\t\tbudgets: () => generateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_BUDGET), moduleId.toString()),\r\n\r\n\t\tcash_expense: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_CASH_EXPENSE), moduleId.toString()),\r\n\r\n\t\tcredit_notes: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_CREDIT_NOTE), moduleId.toString()),\r\n\r\n\t\tdebit_notes: () => generateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_DEBIT_NOTE), moduleId.toString()),\r\n\r\n\t\texpense_reimbursement: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_EXPENSE_REIMBURSEMENT), moduleId.toString()),\r\n\r\n\t\tjournal_entries: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_JOURNAL_ENTRY), moduleId.toString()),\r\n\r\n\t\tpayment_entries: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_PAYMENT_ENTRY), moduleId.toString()),\r\n\r\n\t\tpurchase_invoice: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_PURCHASE_INVOICE), moduleId.toString()),\r\n\r\n\t\tstock_transfer: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorInventory(PathnameInventory.VIEW_STOCK_TRANSFER), moduleId.toString()),\r\n\r\n\t\tbills_of_materials: () =>\r\n\t\t\tgenerateRouteWithId(\r\n\t\t\t\tPathnameGeneratorManufacuring(PathnameManufacturing.VIEW_BILL_OF_MATERIAL),\r\n\t\t\t\tmoduleId.toString()\r\n\t\t\t),\r\n\r\n\t\tpurchase_agreement: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_AGREEMENT), moduleId.toString()),\r\n\r\n\t\tpurchase_orders: () =>\r\n\t\t\tgenerateRouteWithId(\r\n\t\t\t\tnotificationData?.data?.is_rental == 1\r\n\t\t\t\t\t? RENTALROUTES.VIEW\r\n\t\t\t\t\t: PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_ORDER),\r\n\t\t\t\tmoduleId.toString()\r\n\t\t\t),\r\n\r\n\t\tpurchase_request: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_ORDER), moduleId.toString()),\r\n\r\n\t\tvra: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_VENDOR_RETURNS), moduleId.toString()),\r\n\r\n\t\tsales_customer_returns: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_CUSTOMER_RETURNS), moduleId.toString()),\r\n\r\n\t\tsales_order: () => generateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_SALES_ORDER), moduleId.toString()),\r\n\r\n\t\tquotation: () => generateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_QUOTATION), moduleId.toString()),\r\n\r\n\t\trental_order: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_RENTAL_ORDER), moduleId.toString()),\r\n\r\n\t\treplacement_order: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_RENTAL_ORDER), moduleId.toString()),\r\n\r\n\t\trental_agreement: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_AGREEMENT), moduleId.toString()),\r\n\r\n\t\tcross_hire_order: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_CROSS_HIRE_ORDER), moduleId.toString()),\r\n\r\n\t\tcross_hire_request: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_CROSS_HIRE_REQUEST), moduleId.toString()),\r\n\t}\r\n\r\n\treturn routeMap[key]?.() || '/dashboard'\r\n}\r\n\r\nconst mainModuleIcons = {\r\n\trbac: images.user,\r\n\tdocument: images.document,\r\n\t'accounts-and-finance': images.accounting,\r\n\tinventory: images.inventory,\r\n\tmanufacturing: images.manufacturing,\r\n\tsales: images.crm,\r\n\trental: images.rental,\r\n\tuser: images.user,\r\n\tpurchase: images.procurement,\r\n\thrms: images.hrms,\r\n}\r\nconst mainModuleBgColors = {\r\n\trbac: '#F3E5F5',\r\n\tdocument: '#FFF8E1',\r\n\t'accounts-and-finance': '#E8F5E8',\r\n\tinventory: '#E3F2FD',\r\n\tmanufacturing: '#FFF3E0',\r\n\tsales: '#F3E5F5',\r\n\trental: '#E8F5E8',\r\n\tuser: '#F3E5F5',\r\n\tpurchase: '#FCE4EC',\r\n\thrms: '#fcfcfc',\r\n}\r\n\r\nconst NotificationMenu = () => {\r\n\tconst [anchorEl, setAnchorEl] = useState(null)\r\n\tconst [notifications, setNotifications] = useState([])\r\n\tconst [loading, setLoading] = useState(false)\r\n\tconst [loadingMore, setLoadingMore] = useState(false)\r\n\tconst [error, setError] = useState(null)\r\n\tconst [unreadCount, setUnreadCount] = useState(0)\r\n\tconst [markingAllAsRead, setMarkingAllAsRead] = useState(false)\r\n\tconst [pagination, setPagination] = useState({\r\n\t\tskip: 0,\r\n\t\tlimit: 20,\r\n\t\ttotalCount: 0,\r\n\t\thasMore: true,\r\n\t})\r\n\r\n\tconst navigate = useNavigate()\r\n\r\n\tconst menuRef = useRef(null)\r\n\tconst isLoadingMoreRef = useRef(false)\r\n\tconst open = Boolean(anchorEl)\r\n\r\n\t// Transform API notification to display format\r\n\tconst transformNotification = (apiNotification) => {\r\n\t\tconst moduleIcons = {\r\n\t\t\t'accounts-and-finance': <AccountBalanceIcon color=\"primary\" />,\r\n\t\t\tuser: <PersonIcon color=\"action\" />,\r\n\t\t\tapproval: <AssignmentIcon color=\"warning\" />,\r\n\t\t}\r\n\r\n\t\tconst getInitials = (performedUser) => {\r\n\t\t\tif (!performedUser) return null\r\n\t\t\tconst firstName = performedUser.first_name || ''\r\n\t\t\tconst lastName = performedUser.last_name || ''\r\n\t\t\tif (!firstName && !lastName) return null\r\n\t\t\treturn (firstName.charAt(0) + lastName.charAt(0)).toUpperCase()\r\n\t\t}\r\n\r\n\t\tconst getFullName = (performedUser) => {\r\n\t\t\tif (!performedUser) return null\r\n\t\t\tconst firstName = performedUser.first_name || ''\r\n\t\t\tconst lastName = performedUser.last_name || ''\r\n\t\t\treturn `${firstName} ${lastName}`.trim() || null\r\n\t\t}\r\n\r\n\t\tconst formatTimestamp = (dateString) => {\r\n\t\t\tconst date = new Date(dateString)\r\n\t\t\tconst now = new Date()\r\n\t\t\tconst diffMs = now - date\r\n\t\t\tconst diffMins = Math.floor(diffMs / 60000)\r\n\t\t\tconst diffHours = Math.floor(diffMs / 3600000)\r\n\t\t\tconst diffDays = Math.floor(diffMs / 86400000)\r\n\r\n\t\t\tif (diffMins < 1) return 'Just now'\r\n\t\t\tif (diffMins < 60) return `${diffMins} minute${diffMins > 1 ? 's' : ''} ago`\r\n\t\t\tif (diffHours < 24) return `${diffHours} hour${diffHours > 1 ? 's' : ''} ago`\r\n\t\t\tif (diffDays < 7) return `${diffDays} day${diffDays > 1 ? 's' : ''} ago`\r\n\t\t\treturn date.toLocaleDateString()\r\n\t\t}\r\n\r\n\t\tconst subData = apiNotification.sub_module_data || {}\r\n\r\n\t\treturn {\r\n\t\t\tid: apiNotification.id,\r\n\t\t\ttype: apiNotification.action || apiNotification.notification_type || 'info',\r\n\t\t\ttitle: formatText(apiNotification.title),\r\n\t\t\tmessage: apiNotification.message,\r\n\t\t\ttimestamp: formatTimestamp(apiNotification.created_at),\r\n\t\t\tread: apiNotification.status === 'read',\r\n\t\t\tavatar: getInitials(apiNotification.performed_user),\r\n\t\t\tperformedByName: getFullName(apiNotification.performed_user),\r\n\t\t\tmodule: apiNotification.module,\r\n\t\t\tsubModule: apiNotification.sub_module,\r\n\t\t\tsubModuleId: apiNotification.sub_module_id,\r\n\t\t\tstatus: apiNotification.status,\r\n\t\t\tseriesNumber: subData.series_number || null,\r\n\t\t\tdocumentStatus: subData.status || null,\r\n\t\t\tcustomerName: subData.customer_name || null,\r\n\t\t\ticon: moduleIcons[apiNotification.module] || moduleIcons[apiNotification.action] || <PersonIcon color=\"action\" />,\r\n\t\t}\r\n\t}\r\n\r\n\t// Fetch notifications with pagination\r\n\tconst fetchNotifications = useCallback(async (isLoadMore = false) => {\r\n\t\t// Prevent multiple simultaneous load more requests\r\n\t\tif (isLoadMore && isLoadingMoreRef.current) {\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\tif (isLoadMore) {\r\n\t\t\tisLoadingMoreRef.current = true\r\n\t\t\tsetLoadingMore(true)\r\n\t\t} else {\r\n\t\t\tsetLoading(true)\r\n\t\t\t// Reset pagination when loading fresh data\r\n\t\t\tsetPagination((prev) => ({\r\n\t\t\t\t...prev,\r\n\t\t\t\tskip: 0,\r\n\t\t\t\thasMore: true,\r\n\t\t\t}))\r\n\t\t}\r\n\t\tsetError(null)\r\n\r\n\t\ttry {\r\n\t\t\tconst currentSkip = isLoadMore ? pagination.skip : 0\r\n\t\t\tconst response = await getV1Notification({\r\n\t\t\t\tskip: currentSkip,\r\n\t\t\t\tlimit: pagination.limit,\r\n\t\t\t\t...getToken(),\r\n\t\t\t})\r\n\r\n\t\t\tif (response.success && response.data) {\r\n\t\t\t\tconst transformedNotifications = response.data.notifications.map(transformNotification)\r\n\r\n\t\t\t\tif (isLoadMore) {\r\n\t\t\t\t\tsetNotifications((prev) => [...prev, ...transformedNotifications])\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetNotifications(transformedNotifications)\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Update pagination\r\n\t\t\t\tconst newSkip = currentSkip + response.data.notifications.length\r\n\t\t\t\tconst hasMore = newSkip < response.data.pagination.totalCount\r\n\r\n\t\t\t\tsetPagination((prev) => ({\r\n\t\t\t\t\t...prev,\r\n\t\t\t\t\tskip: newSkip,\r\n\t\t\t\t\ttotalCount: response.data.pagination.totalCount,\r\n\t\t\t\t\thasMore,\r\n\t\t\t\t}))\r\n\r\n\t\t\t\t// Calculate unread count (assuming 'pending' status means unread)\r\n\t\t\t\tif (!isLoadMore) {\r\n\t\t\t\t\tconst unread = response.data.pagination.unreadCount\r\n\t\t\t\t\tsetUnreadCount(unread)\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsetUnreadCount(0)\r\n\t\t\t\tthrow new Error(response.message || 'Failed to load notifications')\r\n\t\t\t}\r\n\t\t} catch (err) {\r\n\t\t\tsetError('Failed to load notifications')\r\n\t\t} finally {\r\n\t\t\tsetLoading(false)\r\n\t\t\tsetLoadingMore(false)\r\n\t\t\tif (isLoadMore) {\r\n\t\t\t\tisLoadingMoreRef.current = false\r\n\t\t\t}\r\n\t\t}\r\n\t}, [pagination.limit, pagination.skip])\r\n\r\n\t// Handle scroll for infinite loading\r\n\tconst handleScroll = useCallback(\r\n\t\t(event) => {\r\n\t\t\tconst { scrollTop, scrollHeight, clientHeight } = event.target\r\n\t\t\tconst isNearBottom = scrollTop + clientHeight >= scrollHeight - 50 // Increased threshold\r\n\r\n\t\t\tif (isNearBottom && !isLoadingMoreRef.current && !loading && pagination.hasMore) {\r\n\t\t\t\tfetchNotifications(true)\r\n\t\t\t}\r\n\t\t},\r\n\t\t[fetchNotifications, loading, pagination.hasMore]\r\n\t)\r\n\r\n\tconst handleClick = (event) => {\r\n\t\tsetAnchorEl(event.currentTarget)\r\n\t\tif (notifications.length === 0) {\r\n\t\t\tfetchNotifications()\r\n\t\t}\r\n\t}\r\n\r\n\tconst handleClose = () => {\r\n\t\tsetAnchorEl(null)\r\n\r\n\t\t// Don't clear notifications immediately to avoid flickering\r\n\t\t// They will be refreshed when menu is opened again\r\n\t}\r\n\r\n\tconst handleNotificationClick = async (notificationId) => {\r\n\t\t// Mark notification as read\r\n\t\tconst n = notifications.find((n) => {\r\n\t\t\treturn n.id === notificationId\r\n\t\t})\r\n\t\tif (!n) return\r\n\r\n\t\thandleClose()\r\n\r\n\t\tif (n.status === 'pending') {\r\n\t\t\tawait patchV1NotificationMarkAsReadId({\r\n\t\t\t\tid: notificationId,\r\n\t\t\t\t...getToken(),\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tsetNotifications((prev) => prev.map((n) => (n.id === notificationId ? { ...n, read: true } : n)))\r\n\t\tsetUnreadCount((prev) => Math.max(0, prev - 1))\r\n\t\tconst url = getNotificationUrl({\r\n\t\t\tmoduleName: n.subModule,\r\n\t\t\tmoduleId: n.subModuleId,\r\n\t\t\tnotificationData: n,\r\n\t\t})\r\n setTimeout(() => {\r\n navigate(url)\r\n }, 300)\r\n\t}\r\n\r\n\tconst getNotificationIcon = (notification) => {\r\n\t\tif (notification.icon) {\r\n\t\t\treturn notification.icon\r\n\t\t}\r\n\r\n\t\tswitch (notification.type) {\r\n\t\t\tcase 'approval':\r\n\t\t\t\treturn <AssignmentIcon color=\"warning\" />\r\n\t\t\tcase 'user':\r\n\t\t\t\treturn <PersonIcon color=\"action\" />\r\n\t\t\tcase 'message':\r\n\t\t\t\treturn <EmailIcon color=\"primary\" />\r\n\t\t\tcase 'warning':\r\n\t\t\t\treturn <WarningIcon color=\"warning\" />\r\n\t\t\tcase 'success':\r\n\t\t\t\treturn <CheckCircleIcon color=\"success\" />\r\n\t\t\tdefault:\r\n\t\t\t\treturn <PersonIcon color=\"action\" />\r\n\t\t}\r\n\t}\r\n\r\n\tconst handleMarkAllAsRead = useCallback(async () => {\r\n\t\tif (markingAllAsRead) return // Prevent multiple calls\r\n\r\n\t\tsetMarkingAllAsRead(true)\r\n\r\n\t\tif (!unreadCount) {\r\n\t\t\tenqueueSnackbar('No unread notifications!')\r\n\t\t\tsetMarkingAllAsRead(false)\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tawait getV1NotificationMarkAllAsRead({ ...getToken() })\r\n\t\t\t// Update local state immediately for better UX\r\n\t\t\tsetNotifications((prev) => prev.map((n) => ({ ...n, read: true, status: 'read' })))\r\n\t\t\tsetUnreadCount(0)\r\n\t\t} catch (error) {\r\n\t\t\tconst m = getErrorMessage(error.message)\r\n\t\t\tenqueueSnackbar(m, { variant: 'error' })\r\n\t\t} finally {\r\n\t\t\tsetMarkingAllAsRead(false)\r\n\t\t}\r\n\t}, [markingAllAsRead, unreadCount])\r\n\r\n\t// Remove the problematic useEffect that was causing extra API calls\r\n\r\n useEffect(() => {\r\n if(!open) {\r\n setTimeout(() => {\r\n setNotifications([])\r\n }, 500)\r\n }\r\n }, [open])\r\n\r\n\tconst getPerformerLabel = (action: string) => {\r\n\t\tswitch (action?.toLowerCase()) {\r\n\t\t\tcase 'approved':\r\n\t\t\t\treturn 'Approved by'\r\n\t\t\tcase 'rejected':\r\n\t\t\tcase 'reject':\r\n\t\t\t\treturn 'Rejected by'\r\n\t\t\tdefault:\r\n\t\t\t\treturn 'Request to'\r\n\t\t}\r\n\t}\r\n\r\n\tconst getStatusIcon = (action: string) => {\r\n\t\tswitch (action?.toLowerCase()) {\r\n\t\t\tcase 'approved':\r\n\t\t\t\treturn <CheckCircleIcon sx={{ fontSize: '0.8125rem', color: 'success.main' }} />\r\n\t\t\tcase 'rejected':\r\n\t\t\tcase 'reject':\r\n\t\t\t\treturn <CancelIcon sx={{ fontSize: '0.8125rem', color: 'error.main' }} />\r\n\t\t\tdefault:\r\n\t\t\t\treturn <HourglassEmptyIcon sx={{ fontSize: '0.8125rem', color: 'warning.main' }} />\r\n\t\t}\r\n\t}\r\n\r\n\treturn (\r\n\t\t<Box>\r\n\t\t\t<IconButton\r\n\t\t\t\t// size=\"small\"\r\n\t\t\t\taria-label=\"notifications\"\r\n\t\t\t\taria-controls={open ? 'notification-menu' : undefined}\r\n\t\t\t\taria-haspopup=\"true\"\r\n\t\t\t\taria-expanded={open ? 'true' : undefined}\r\n\t\t\t\tonClick={handleClick}\r\n\t\t\t>\r\n\t\t\t\t<Badge badgeContent={unreadCount} color=\"error\">\r\n\t\t\t\t\t<Notification fontSize=\"small\" />\r\n\t\t\t\t</Badge>\r\n\t\t\t</IconButton>\r\n\r\n\t\t\t<Menu\r\n\t\t\t\tid=\"notification-menu\"\r\n\t\t\t\tanchorEl={anchorEl}\r\n\t\t\t\topen={open}\r\n\t\t\t\tonClose={handleClose}\r\n\t\t\t\tref={menuRef}\r\n\t\t\t\tslotProps={{\r\n\t\t\t\t\tpaper: {\r\n\t\t\t\t\t\tsx: {\r\n\t\t\t\t\t\t\toverflow: 'visible',\r\n\t\t\t\t\t\t\tminWidth: 340,\r\n\t\t\t\t\t\t\tmaxWidth: 380,\r\n\t\t\t\t\t\t\tmaxHeight: 460,\r\n\t\t\t\t\t\t\tborder: '1px solid #ECEDEF',\r\n\t\t\t\t\t\t\tborderRadius: '8px',\r\n\t\t\t\t\t\t\t'&:before': {\r\n\t\t\t\t\t\t\t\tcontent: '\"\"',\r\n\t\t\t\t\t\t\t\tdisplay: 'block',\r\n\t\t\t\t\t\t\t\tposition: 'absolute',\r\n\t\t\t\t\t\t\t\ttop: 0,\r\n\t\t\t\t\t\t\t\tright: 13,\r\n\t\t\t\t\t\t\t\twidth: 10,\r\n\t\t\t\t\t\t\t\theight: 10,\r\n\t\t\t\t\t\t\t\tbgcolor: 'background.paper',\r\n\t\t\t\t\t\t\t\ttransform: 'translateY(-50%) rotate(45deg)',\r\n\t\t\t\t\t\t\t\tzIndex: 0,\r\n\t\t\t\t\t\t\t\tborder: '1px solid',\r\n\t\t\t\t\t\t\t\tborderColor: '#ECEDEF',\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t},\r\n\t\t\t\t}}\r\n\t\t\t\tsx={{\r\n\t\t\t\t\t'& .MuiList-root': {\r\n\t\t\t\t\t\tborderRadius: '8px',\r\n\t\t\t\t\t\tmaxHeight: 460,\r\n\t\t\t\t\t\toverflowY: 'auto',\r\n\t\t\t\t\t\tpadding: 0,\r\n\t\t\t\t\t},\r\n\t\t\t\t}}\r\n\t\t\t\ttransformOrigin={{ horizontal: 'right', vertical: 'top' }}\r\n\t\t\t\tanchorOrigin={{ horizontal: 'right', vertical: 'bottom' }}\r\n\t\t\t\tonScroll={handleScroll}\r\n\t\t\t>\r\n\t\t\t\t{/* Header */}\r\n\t\t\t\t<Box sx={{ px: 1.5, py: 1, borderBottom: '1px solid #ECEDEF', backgroundColor: '#fff' }}>\r\n\t\t\t\t\t<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 1, minHeight: 24 }}>\r\n\t\t\t\t\t\t<Box sx={{ display: 'flex', alignItems: 'baseline', gap: 0.75, minWidth: 0 }}>\r\n\t\t\t\t\t\t\t<Typography type=\"s3\" weight=\"bold\" color=\"grey.1000\" sx={{ fontSize: '0.8125rem !important' }}>\r\n\t\t\t\t\t\t\t\tNotifications\r\n\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t{unreadCount > 0 && (\r\n\t\t\t\t\t\t\t\t<Box\r\n\t\t\t\t\t\t\t\t\tcomponent=\"span\"\r\n\t\t\t\t\t\t\t\t\tsx={{\r\n\t\t\t\t\t\t\t\t\t\tfontSize: '0.625rem',\r\n\t\t\t\t\t\t\t\t\t\tfontWeight: 600,\r\n\t\t\t\t\t\t\t\t\t\tlineHeight: 1,\r\n\t\t\t\t\t\t\t\t\t\tpx: 0.75,\r\n\t\t\t\t\t\t\t\t\t\tpy: 0.375,\r\n\t\t\t\t\t\t\t\t\t\tborderRadius: '10px',\r\n\t\t\t\t\t\t\t\t\t\tbgcolor: '#E2F5EC',\r\n\t\t\t\t\t\t\t\t\t\tcolor: '#1A8A56',\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t{unreadCount} unread\r\n\t\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t{unreadCount > 0 && (\r\n\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\tvariant=\"text\"\r\n\t\t\t\t\t\t\t\tsize=\"small\"\r\n\t\t\t\t\t\t\t\tstartIcon={\r\n\t\t\t\t\t\t\t\t\tmarkingAllAsRead ? (\r\n\t\t\t\t\t\t\t\t\t\t<CircularProgress size={12} color=\"inherit\" />\r\n\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t<Tick sx={{ fontSize: '0.75rem !important' }} />\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tsx={{ minHeight: 24, px: 0.75, '&.MuiButton-text': { bgcolor: 'transparent', color: '#1A8A56', '&:hover': { bgcolor: '#F1FBF6', color: '#146B43' } } }}\r\n\t\t\t\t\t\t\t\tonClick={handleMarkAllAsRead}\r\n\t\t\t\t\t\t\t\tdisabled={unreadCount <= 0 || markingAllAsRead}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\tMark all as read\r\n\t\t\t\t\t\t\t</Button>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t</Box>\r\n\t\t\t\t</Box>\r\n\r\n\t\t\t\t{/* Loading State */}\r\n\t\t\t\t{loading && notifications.length === 0 && (\r\n\t\t\t\t\t<Box sx={{ minWidth: 340 }}>\r\n\t\t\t\t\t\t{[0, 1, 2, 3, 4].map((i) => (\r\n\t\t\t\t\t\t\t<Box key={i} sx={{ display: 'flex', gap: 1, px: 1.5, py: 1, borderBottom: '1px solid #ECEDEF' }}>\r\n\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={28} height={28} sx={{ borderRadius: '6px', flexShrink: 0 }} />\r\n\t\t\t\t\t\t\t\t<Box sx={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 0.5 }}>\r\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={i % 2 ? '55%' : '70%'} height={12} />\r\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width=\"40%\" height={10} />\r\n\t\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t))}\r\n\t\t\t\t\t</Box>\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{/* Error State */}\r\n\t\t\t\t{error && (\r\n\t\t\t\t\t<Box sx={{ p: 1 }}>\r\n\t\t\t\t\t\t<Alert severity=\"error\">{error}</Alert>\r\n\t\t\t\t\t</Box>\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{/* Notifications List */}\r\n\t\t\t\t{!loading && !error && notifications.length > 0 && (\r\n\t\t\t\t\t<Box sx={{ maxHeight: 380, overflowY: 'auto' }} onScroll={handleScroll}>\r\n\t\t\t\t\t\t{notifications.map((notification) => (\r\n\t\t\t\t\t\t\t<MenuItem\r\n\t\t\t\t\t\t\t\tkey={notification.id}\r\n\t\t\t\t\t\t\t\tonClick={() => handleNotificationClick(notification.id)}\r\n\t\t\t\t\t\t\t\tsx={{\r\n\t\t\t\t\t\t\t\t\tpy: 0.875,\r\n\t\t\t\t\t\t\t\t\tpx: 1.5,\r\n\t\t\t\t\t\t\t\t\tgap: 1,\r\n\t\t\t\t\t\t\t\t\tborderRadius: 0,\r\n\t\t\t\t\t\t\t\t\tmargin: '0 !important',\r\n\t\t\t\t\t\t\t\t\tborderBottom: '1px solid #ECEDEF',\r\n\t\t\t\t\t\t\t\t\talignItems: 'flex-start',\r\n\t\t\t\t\t\t\t\t\twhiteSpace: 'normal',\r\n\t\t\t\t\t\t\t\t\tbackgroundColor: !notification.read ? '#F1FBF6' : 'transparent',\r\n\t\t\t\t\t\t\t\t\t'&:hover': { backgroundColor: '#F7F8F9' },\r\n\t\t\t\t\t\t\t\t\t'&:last-of-type': { borderBottom: 0 },\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<ListItemAvatar sx={{ minWidth: 0, mt: 0.125 }}>\r\n\t\t\t\t\t\t\t\t\t{mainModuleIcons?.[notification.module] ? (\r\n\t\t\t\t\t\t\t\t\t\t<Avatar\r\n\t\t\t\t\t\t\t\t\t\t\tsx={{\r\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 28,\r\n\t\t\t\t\t\t\t\t\t\t\t\theight: 28,\r\n\t\t\t\t\t\t\t\t\t\t\t\tbgcolor: mainModuleBgColors[notification.module] || 'primary.main',\r\n\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: '6px',\r\n\t\t\t\t\t\t\t\t\t\t\t\t'& img': { width: 18, height: 18, objectFit: 'contain' },\r\n\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\tsrc={mainModuleIcons?.[notification.module]}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t) : notification.avatar ? (\r\n\t\t\t\t\t\t\t\t\t\t<Avatar sx={{ width: 28, height: 28, fontSize: '0.6875rem', bgcolor: 'primary.main', color: 'white', borderRadius: '6px' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t{notification.avatar}\r\n\t\t\t\t\t\t\t\t\t\t</Avatar>\r\n\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t<Avatar sx={{ width: 28, height: 28, bgcolor: '#F2F3F5', color: '#6D7178', borderRadius: '6px', '& svg': { fontSize: 16 } }}>\r\n\t\t\t\t\t\t\t\t\t\t\t{getNotificationIcon(notification)}\r\n\t\t\t\t\t\t\t\t\t\t</Avatar>\r\n\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t</ListItemAvatar>\r\n\t\t\t\t\t\t\t\t<ListItemText\r\n\t\t\t\t\t\t\t\t\tsx={{ margin: 0, minWidth: 0 }}\r\n\t\t\t\t\t\t\t\t\tprimary={\r\n\t\t\t\t\t\t\t\t\t\t<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5, flexWrap: 'wrap' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t<Typography type=\"s3\" weight={notification.read ? 'medium' : 'bold'} color=\"grey.1000\" sx={{ fontSize: '0.75rem !important', lineHeight: 1.35 }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{notification.title}\r\n\t\t\t\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t\t\t\t\t{notification.seriesNumber && (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Typography type=\"s4\" sx={{ color: 'text.secondary', fontWeight: 500, fontSize: '0.6875rem !important' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.seriesNumber}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t{getStatusIcon(notification.type)}\r\n\t\t\t\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tsecondary={\r\n\t\t\t\t\t\t\t\t\t\t<Box sx={{ mt: 0.125 }}>\r\n\t\t\t\t\t\t\t\t\t\t\t{notification.customerName && (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Typography type=\"s4\" color=\"grey.800\" sx={{ display: 'block', fontSize: '0.6875rem !important' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography component=\"span\" type=\"s5\" sx={{ fontSize: '0.6875rem !important', color: 'text.secondary', mr: 0.5 }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.module === 'purchase' ? 'Vendor:' : 'Customer:'}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.customerName}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5, flexWrap: 'wrap' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{notification.performedByName && (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography type=\"s5\" sx={{ fontSize: '0.6875rem !important', color: 'text.secondary' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{getPerformerLabel(notification.type)} {notification.performedByName}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{notification.performedByName && (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Box sx={{ height: 3, width: 3, borderRadius: '100%', backgroundColor: 'grey.400', flexShrink: 0 }} />\r\n\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Typography type=\"s5\" sx={{ fontSize: '0.625rem !important', color: 'text.disabled' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.timestamp}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t{!notification.read && (\r\n\t\t\t\t\t\t\t\t\t<Box sx={{ width: 6, height: 6, borderRadius: '50%', backgroundColor: 'primary.main', flexShrink: 0, mt: 0.75 }} />\r\n\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t</MenuItem>\r\n\t\t\t\t\t\t))}\r\n\r\n\t\t\t\t\t\t{/* Loading More Indicator */}\r\n\t\t\t\t\t\t{loadingMore && (\r\n\t\t\t\t\t\t\t<Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', py: 1, px: 1.5, gap: 1 }}>\r\n\t\t\t\t\t\t\t\t<CircularProgress size={14} />\r\n\t\t\t\t\t\t\t\t<Typography variant=\"caption\" sx={{ color: 'text.secondary' }}>\r\n\t\t\t\t\t\t\t\t\tLoading more...\r\n\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t)}\r\n\r\n\t\t\t\t\t\t{/* End of List Indicator */}\r\n\t\t\t\t\t\t{!pagination.hasMore && notifications.length > 0 && (\r\n\t\t\t\t\t\t\t<Box sx={{ textAlign: 'center', py: 0.75, px: 1.5, borderTop: '1px solid #ECEDEF' }}>\r\n\t\t\t\t\t\t\t\t<Typography type=\"s5\" color=\"grey.800\" textAlign=\"center\" sx={{ fontSize: '0.6875rem !important' }}>\r\n\t\t\t\t\t\t\t\t\tNo more notifications\r\n\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t</Box>\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{/* Empty State */}\r\n\t\t\t\t{!loading && !error && notifications.length === 0 && (\r\n\t\t\t\t\t<Box sx={{ py: 2.5, px: 2, textAlign: 'center' }}>\r\n\t\t\t\t\t\t<Notification sx={{ fontSize: 28, color: 'text.disabled', mb: 0.5 }} />\r\n\t\t\t\t\t\t<Typography type=\"s4\" color=\"grey.800\" textAlign=\"center\">\r\n\t\t\t\t\t\t\tNo notifications yet\r\n\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t</Box>\r\n\t\t\t\t)}\r\n\t\t\t</Menu>\r\n\t\t</Box>\r\n\t)\r\n}\r\n\r\nexport { NotificationMenu };\r\nexport default NotificationMenu\r\n"],"names":["convertToUnderscore","generateRouteWithId","PathnameGenerator","PathnameAccounting","PathnameGeneratorInventory","PathnameInventory","PathnameGeneratorManufacuring","PathnameManufacturing","PathnameGeneratorPurchase","PathnamePurchase","_a","RENTALROUTES","PathnameGeneratorCrm","PathnameCrm","PathnameGeneratorRental","PathnameRental","images","useState","useNavigate","useRef","jsx","AccountBalanceIcon","PersonIcon","AssignmentIcon","formatText","useCallback","getV1Notification","getToken","n","patchV1NotificationMarkAsReadId","notification","EmailIcon","WarningIcon","CheckCircleIcon","enqueueSnackbar","getV1NotificationMarkAllAsRead","error","getErrorMessage","useEffect","CancelIcon","HourglassEmptyIcon","Box","IconButton","Badge","Notification","jsxs","Menu","Typography","Button","CircularProgress","Tick","Skeleton","Alert","MenuItem","ListItemAvatar","Avatar","ListItemText"],"mappings":";;;;;;;;;;;;;;;;;AA0DA,MAAM,qBAAqB,CAAC,SAAc;;AACzC,QAAM,EAAE,aAAa,IAAI,WAAW,IAAI,mBAAmB,CAAA,MAAO;AAClE,QAAM,MAAMA,iBAAAA,oBAAoB,UAAU;AAE1C,QAAM,WAAyC;AAAA,IAC9C,eAAe,MACdC,iBAAAA,oBAAoBC,oCAAkBC,gBAAAA,mBAAmB,mBAAmB,GAAG,SAAS,UAAU;AAAA,IAEnG,iBAAiB,MAChBF,iBAAAA,oBAAoBC,oCAAkBC,gBAAAA,mBAAmB,mBAAmB,GAAG,SAAS,UAAU;AAAA,IAEnG,SAAS,MAAMF,iBAAAA,oBAAoBC,oCAAkBC,gBAAAA,mBAAmB,WAAW,GAAG,SAAS,UAAU;AAAA,IAEzG,cAAc,MACbF,iBAAAA,oBAAoBC,oCAAkBC,gBAAAA,mBAAmB,iBAAiB,GAAG,SAAS,UAAU;AAAA,IAEjG,cAAc,MACbF,iBA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AK,IAAI,GAAG,WAAW,YACrC,UAAA;AAAA,YAAArB,2BAAAA,IAACwB,aAAAA,cAAA,EAAa,IAAI,EAAE,UAAU,IAAI,OAAO,iBAAiB,IAAI,IAAA,EAAI,CAAG;AAAA,YACrExB,2BAAAA,IAAC2B,WAAAA,cAAW,MAAK,MAAK,OAAM,YAAW,WAAU,UAAS,UAAA,uBAAA,CAE1D;AAAA,UAAA,EAAA,CACD;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEF,GACD;AAEF;;"}
|
|
1
|
+
{"version":3,"file":"notification-menu-BNJrwnGN.js","sources":["../../src/components/header/components/notification-menu/notification-menu.tsx"],"sourcesContent":["import React, { useState, useCallback, useRef, useEffect } from 'react'\r\nimport {\r\n\tIconButton,\r\n\tMenu,\r\n\tMenuItem,\r\n\tBadge,\r\n\tBox,\r\n\tCircularProgress,\r\n\tAvatar,\r\n\tListItemText,\r\n\tListItemAvatar,\r\n\tAlert,\r\n\tSkeleton,\r\n} from '@mui/material'\r\nimport {\r\n\tPerson as PersonIcon,\r\n\tEmail as EmailIcon,\r\n\tWarning as WarningIcon,\r\n\tCheckCircle as CheckCircleIcon,\r\n\tAssignment as AssignmentIcon,\r\n\tAccountBalance as AccountBalanceIcon,\r\n\tHourglassEmpty as HourglassEmptyIcon,\r\n\tCancel as CancelIcon,\r\n} from '@mui/icons-material'\r\nimport {\r\n\tgetV1Notification,\r\n\tgetV1NotificationMarkAllAsRead,\r\n\tpatchV1NotificationMarkAsReadId,\r\n} from '../../../../api-client/api.system-feature/api'\r\nimport { getErrorMessage, getToken } from '../../../../utils/common'\r\nimport formatText, { convertToUnderscore, formatLabel } from '../../../../utils/format-text'\r\nimport Typography from '../../../typography/typography'\r\nimport images from '../../../../assets/images'\r\nimport { generateRouteWithId } from '../../../../utils/route-utils'\r\nimport { PathnameGenerator, PathnameAccounting } from '../../../../constants/pathnames/pathname.accounting'\r\nimport { ROUTES as RENTALROUTES } from '../../../../constants/pathnames/pathname.rental'\r\n\r\nimport { PathnameInventory, PathnameGenerator as PathnameGeneratorInventory } from '../../../../constants/pathnames/pathname.inventory'\r\n\r\nimport {\r\n\tPathnameManufacturing,\r\n\tPathnameGenerator as PathnameGeneratorManufacuring,\r\n} from '../../../../constants/pathnames/pathname.manufacturing.ts'\r\n\r\nimport {\r\n\tPathnamePurchase,\r\n\tPathnameGenerator as PathnameGeneratorPurchase,\r\n} from '../../../../constants/pathnames/pathname.procurement.ts'\r\n\r\nimport { PathnameCrm, PathnameGenerator as PathnameGeneratorCrm } from '../../../../constants/pathnames/pathname.crm.ts'\r\n\r\nimport { PathnameRental, PathnameGenerator as PathnameGeneratorRental } from '../../../../constants/pathnames/pathname.rental.ts'\r\n\r\nimport { useNavigate } from 'react-router-dom'\r\nimport { Notification, Tick } from '../../../icons'\r\nimport Button from '../../../button/button'\r\nimport { enqueueSnackbar } from 'notistack'\r\n\r\nconst getNotificationUrl = (data: any) => {\r\n\tconst { moduleName = '', moduleId = '', notificationData = {} } = data\r\n\tconst key = convertToUnderscore(moduleName)\r\n\r\n\tconst routeMap: Record<string, () => string> = {\r\n\t\tsales_invoice: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_SALES_INVOICES), moduleId.toString()),\r\n\r\n\t\tasset_transfers: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_ASSET_TRANSFER), moduleId.toString()),\r\n\r\n\t\tbudgets: () => generateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_BUDGET), moduleId.toString()),\r\n\r\n\t\tcash_expense: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_CASH_EXPENSE), moduleId.toString()),\r\n\r\n\t\tcredit_notes: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_CREDIT_NOTE), moduleId.toString()),\r\n\r\n\t\tdebit_notes: () => generateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_DEBIT_NOTE), moduleId.toString()),\r\n\r\n\t\texpense_reimbursement: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_EXPENSE_REIMBURSEMENT), moduleId.toString()),\r\n\r\n\t\tjournal_entries: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_JOURNAL_ENTRY), moduleId.toString()),\r\n\r\n\t\tpayment_entries: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_PAYMENT_ENTRY), moduleId.toString()),\r\n\r\n\t\tpurchase_invoice: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGenerator(PathnameAccounting.VIEW_PURCHASE_INVOICE), moduleId.toString()),\r\n\r\n\t\tstock_transfer: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorInventory(PathnameInventory.VIEW_STOCK_TRANSFER), moduleId.toString()),\r\n\r\n\t\tbills_of_materials: () =>\r\n\t\t\tgenerateRouteWithId(\r\n\t\t\t\tPathnameGeneratorManufacuring(PathnameManufacturing.VIEW_BILL_OF_MATERIAL),\r\n\t\t\t\tmoduleId.toString()\r\n\t\t\t),\r\n\r\n\t\tpurchase_agreement: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_AGREEMENT), moduleId.toString()),\r\n\r\n\t\tpurchase_orders: () =>\r\n\t\t\tgenerateRouteWithId(\r\n\t\t\t\tnotificationData?.data?.is_rental == 1\r\n\t\t\t\t\t? RENTALROUTES.VIEW\r\n\t\t\t\t\t: PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_ORDER),\r\n\t\t\t\tmoduleId.toString()\r\n\t\t\t),\r\n\r\n\t\tpurchase_request: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_PURCHASE_ORDER), moduleId.toString()),\r\n\r\n\t\tvra: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorPurchase(PathnamePurchase.VIEW_VENDOR_RETURNS), moduleId.toString()),\r\n\r\n\t\tsales_customer_returns: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_CUSTOMER_RETURNS), moduleId.toString()),\r\n\r\n\t\tsales_order: () => generateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_SALES_ORDER), moduleId.toString()),\r\n\r\n\t\tquotation: () => generateRouteWithId(PathnameGeneratorCrm(PathnameCrm.VIEW_QUOTATION), moduleId.toString()),\r\n\r\n\t\trental_order: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_RENTAL_ORDER), moduleId.toString()),\r\n\r\n\t\treplacement_order: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_RENTAL_ORDER), moduleId.toString()),\r\n\r\n\t\trental_agreement: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_AGREEMENT), moduleId.toString()),\r\n\r\n\t\tcross_hire_order: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_CROSS_HIRE_ORDER), moduleId.toString()),\r\n\r\n\t\tcross_hire_request: () =>\r\n\t\t\tgenerateRouteWithId(PathnameGeneratorRental(PathnameRental.VIEW_CROSS_HIRE_REQUEST), moduleId.toString()),\r\n\t}\r\n\r\n\treturn routeMap[key]?.() || '/dashboard'\r\n}\r\n\r\nconst mainModuleIcons = {\r\n\trbac: images.user,\r\n\tdocument: images.document,\r\n\t'accounts-and-finance': images.accounting,\r\n\tinventory: images.inventory,\r\n\tmanufacturing: images.manufacturing,\r\n\tsales: images.crm,\r\n\trental: images.rental,\r\n\tuser: images.user,\r\n\tpurchase: images.procurement,\r\n\thrms: images.hrms,\r\n}\r\nconst mainModuleBgColors = {\r\n\trbac: '#F3E5F5',\r\n\tdocument: '#FFF8E1',\r\n\t'accounts-and-finance': '#E8F5E8',\r\n\tinventory: '#E3F2FD',\r\n\tmanufacturing: '#FFF3E0',\r\n\tsales: '#F3E5F5',\r\n\trental: '#E8F5E8',\r\n\tuser: '#F3E5F5',\r\n\tpurchase: '#FCE4EC',\r\n\thrms: '#fcfcfc',\r\n}\r\n\r\nconst NotificationMenu = () => {\r\n\tconst [anchorEl, setAnchorEl] = useState(null)\r\n\tconst [notifications, setNotifications] = useState([])\r\n\tconst [loading, setLoading] = useState(false)\r\n\tconst [loadingMore, setLoadingMore] = useState(false)\r\n\tconst [error, setError] = useState(null)\r\n\tconst [unreadCount, setUnreadCount] = useState(0)\r\n\tconst [markingAllAsRead, setMarkingAllAsRead] = useState(false)\r\n\tconst [pagination, setPagination] = useState({\r\n\t\tskip: 0,\r\n\t\tlimit: 20,\r\n\t\ttotalCount: 0,\r\n\t\thasMore: true,\r\n\t})\r\n\r\n\tconst navigate = useNavigate()\r\n\r\n\tconst menuRef = useRef(null)\r\n\tconst isLoadingMoreRef = useRef(false)\r\n\tconst open = Boolean(anchorEl)\r\n\r\n\t// Transform API notification to display format\r\n\tconst transformNotification = (apiNotification) => {\r\n\t\tconst moduleIcons = {\r\n\t\t\t'accounts-and-finance': <AccountBalanceIcon color=\"primary\" />,\r\n\t\t\tuser: <PersonIcon color=\"action\" />,\r\n\t\t\tapproval: <AssignmentIcon color=\"warning\" />,\r\n\t\t}\r\n\r\n\t\tconst getInitials = (performedUser) => {\r\n\t\t\tif (!performedUser) return null\r\n\t\t\tconst firstName = performedUser.first_name || ''\r\n\t\t\tconst lastName = performedUser.last_name || ''\r\n\t\t\tif (!firstName && !lastName) return null\r\n\t\t\treturn (firstName.charAt(0) + lastName.charAt(0)).toUpperCase()\r\n\t\t}\r\n\r\n\t\tconst getFullName = (performedUser) => {\r\n\t\t\tif (!performedUser) return null\r\n\t\t\tconst firstName = performedUser.first_name || ''\r\n\t\t\tconst lastName = performedUser.last_name || ''\r\n\t\t\treturn `${firstName} ${lastName}`.trim() || null\r\n\t\t}\r\n\r\n\t\tconst formatTimestamp = (dateString) => {\r\n\t\t\tconst date = new Date(dateString)\r\n\t\t\tconst now = new Date()\r\n\t\t\tconst diffMs = now - date\r\n\t\t\tconst diffMins = Math.floor(diffMs / 60000)\r\n\t\t\tconst diffHours = Math.floor(diffMs / 3600000)\r\n\t\t\tconst diffDays = Math.floor(diffMs / 86400000)\r\n\r\n\t\t\tif (diffMins < 1) return 'Just now'\r\n\t\t\tif (diffMins < 60) return `${diffMins} minute${diffMins > 1 ? 's' : ''} ago`\r\n\t\t\tif (diffHours < 24) return `${diffHours} hour${diffHours > 1 ? 's' : ''} ago`\r\n\t\t\tif (diffDays < 7) return `${diffDays} day${diffDays > 1 ? 's' : ''} ago`\r\n\t\t\treturn date.toLocaleDateString()\r\n\t\t}\r\n\r\n\t\tconst subData = apiNotification.sub_module_data || {}\r\n\r\n\t\treturn {\r\n\t\t\tid: apiNotification.id,\r\n\t\t\ttype: apiNotification.action || apiNotification.notification_type || 'info',\r\n\t\t\ttitle: formatText(apiNotification.title),\r\n\t\t\tmessage: apiNotification.message,\r\n\t\t\ttimestamp: formatTimestamp(apiNotification.created_at),\r\n\t\t\tread: apiNotification.status === 'read',\r\n\t\t\tavatar: getInitials(apiNotification.performed_user),\r\n\t\t\tperformedByName: getFullName(apiNotification.performed_user),\r\n\t\t\tmodule: apiNotification.module,\r\n\t\t\tsubModule: apiNotification.sub_module,\r\n\t\t\tsubModuleId: apiNotification.sub_module_id,\r\n\t\t\tstatus: apiNotification.status,\r\n\t\t\tseriesNumber: subData.series_number || null,\r\n\t\t\tdocumentStatus: subData.status || null,\r\n\t\t\tcustomerName: subData.customer_name || null,\r\n\t\t\ticon: moduleIcons[apiNotification.module] || moduleIcons[apiNotification.action] || <PersonIcon color=\"action\" />,\r\n\t\t}\r\n\t}\r\n\r\n\t// Fetch notifications with pagination\r\n\tconst fetchNotifications = useCallback(async (isLoadMore = false) => {\r\n\t\t// Prevent multiple simultaneous load more requests\r\n\t\tif (isLoadMore && isLoadingMoreRef.current) {\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\tif (isLoadMore) {\r\n\t\t\tisLoadingMoreRef.current = true\r\n\t\t\tsetLoadingMore(true)\r\n\t\t} else {\r\n\t\t\tsetLoading(true)\r\n\t\t\t// Reset pagination when loading fresh data\r\n\t\t\tsetPagination((prev) => ({\r\n\t\t\t\t...prev,\r\n\t\t\t\tskip: 0,\r\n\t\t\t\thasMore: true,\r\n\t\t\t}))\r\n\t\t}\r\n\t\tsetError(null)\r\n\r\n\t\ttry {\r\n\t\t\tconst currentSkip = isLoadMore ? pagination.skip : 0\r\n\t\t\tconst response = await getV1Notification({\r\n\t\t\t\tskip: currentSkip,\r\n\t\t\t\tlimit: pagination.limit,\r\n\t\t\t\t...getToken(),\r\n\t\t\t})\r\n\r\n\t\t\tif (response.success && response.data) {\r\n\t\t\t\tconst transformedNotifications = response.data.notifications.map(transformNotification)\r\n\r\n\t\t\t\tif (isLoadMore) {\r\n\t\t\t\t\tsetNotifications((prev) => [...prev, ...transformedNotifications])\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetNotifications(transformedNotifications)\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Update pagination\r\n\t\t\t\tconst newSkip = currentSkip + response.data.notifications.length\r\n\t\t\t\tconst hasMore = newSkip < response.data.pagination.totalCount\r\n\r\n\t\t\t\tsetPagination((prev) => ({\r\n\t\t\t\t\t...prev,\r\n\t\t\t\t\tskip: newSkip,\r\n\t\t\t\t\ttotalCount: response.data.pagination.totalCount,\r\n\t\t\t\t\thasMore,\r\n\t\t\t\t}))\r\n\r\n\t\t\t\t// Calculate unread count (assuming 'pending' status means unread)\r\n\t\t\t\tif (!isLoadMore) {\r\n\t\t\t\t\tconst unread = response.data.pagination.unreadCount\r\n\t\t\t\t\tsetUnreadCount(unread)\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsetUnreadCount(0)\r\n\t\t\t\tthrow new Error(response.message || 'Failed to load notifications')\r\n\t\t\t}\r\n\t\t} catch (err) {\r\n\t\t\tsetError('Failed to load notifications')\r\n\t\t} finally {\r\n\t\t\tsetLoading(false)\r\n\t\t\tsetLoadingMore(false)\r\n\t\t\tif (isLoadMore) {\r\n\t\t\t\tisLoadingMoreRef.current = false\r\n\t\t\t}\r\n\t\t}\r\n\t}, [pagination.limit, pagination.skip])\r\n\r\n\t// Handle scroll for infinite loading\r\n\tconst handleScroll = useCallback(\r\n\t\t(event) => {\r\n\t\t\tconst { scrollTop, scrollHeight, clientHeight } = event.target\r\n\t\t\tconst isNearBottom = scrollTop + clientHeight >= scrollHeight - 50 // Increased threshold\r\n\r\n\t\t\tif (isNearBottom && !isLoadingMoreRef.current && !loading && pagination.hasMore) {\r\n\t\t\t\tfetchNotifications(true)\r\n\t\t\t}\r\n\t\t},\r\n\t\t[fetchNotifications, loading, pagination.hasMore]\r\n\t)\r\n\r\n\tconst handleClick = (event) => {\r\n\t\tsetAnchorEl(event.currentTarget)\r\n\t\tif (notifications.length === 0) {\r\n\t\t\tfetchNotifications()\r\n\t\t}\r\n\t}\r\n\r\n\tconst handleClose = () => {\r\n\t\tsetAnchorEl(null)\r\n\r\n\t\t// Don't clear notifications immediately to avoid flickering\r\n\t\t// They will be refreshed when menu is opened again\r\n\t}\r\n\r\n\tconst handleNotificationClick = async (notificationId) => {\r\n\t\t// Mark notification as read\r\n\t\tconst n = notifications.find((n) => {\r\n\t\t\treturn n.id === notificationId\r\n\t\t})\r\n\t\tif (!n) return\r\n\r\n\t\thandleClose()\r\n\r\n\t\tif (n.status === 'pending') {\r\n\t\t\tawait patchV1NotificationMarkAsReadId({\r\n\t\t\t\tid: notificationId,\r\n\t\t\t\t...getToken(),\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tsetNotifications((prev) => prev.map((n) => (n.id === notificationId ? { ...n, read: true } : n)))\r\n\t\tsetUnreadCount((prev) => Math.max(0, prev - 1))\r\n\t\tconst url = getNotificationUrl({\r\n\t\t\tmoduleName: n.subModule,\r\n\t\t\tmoduleId: n.subModuleId,\r\n\t\t\tnotificationData: n,\r\n\t\t})\r\n setTimeout(() => {\r\n navigate(url)\r\n }, 300)\r\n\t}\r\n\r\n\tconst getNotificationIcon = (notification) => {\r\n\t\tif (notification.icon) {\r\n\t\t\treturn notification.icon\r\n\t\t}\r\n\r\n\t\tswitch (notification.type) {\r\n\t\t\tcase 'approval':\r\n\t\t\t\treturn <AssignmentIcon color=\"warning\" />\r\n\t\t\tcase 'user':\r\n\t\t\t\treturn <PersonIcon color=\"action\" />\r\n\t\t\tcase 'message':\r\n\t\t\t\treturn <EmailIcon color=\"primary\" />\r\n\t\t\tcase 'warning':\r\n\t\t\t\treturn <WarningIcon color=\"warning\" />\r\n\t\t\tcase 'success':\r\n\t\t\t\treturn <CheckCircleIcon color=\"success\" />\r\n\t\t\tdefault:\r\n\t\t\t\treturn <PersonIcon color=\"action\" />\r\n\t\t}\r\n\t}\r\n\r\n\tconst handleMarkAllAsRead = useCallback(async () => {\r\n\t\tif (markingAllAsRead) return // Prevent multiple calls\r\n\r\n\t\tsetMarkingAllAsRead(true)\r\n\r\n\t\tif (!unreadCount) {\r\n\t\t\tenqueueSnackbar('No unread notifications!')\r\n\t\t\tsetMarkingAllAsRead(false)\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tawait getV1NotificationMarkAllAsRead({ ...getToken() })\r\n\t\t\t// Update local state immediately for better UX\r\n\t\t\tsetNotifications((prev) => prev.map((n) => ({ ...n, read: true, status: 'read' })))\r\n\t\t\tsetUnreadCount(0)\r\n\t\t} catch (error) {\r\n\t\t\tconst m = getErrorMessage(error.message)\r\n\t\t\tenqueueSnackbar(m, { variant: 'error' })\r\n\t\t} finally {\r\n\t\t\tsetMarkingAllAsRead(false)\r\n\t\t}\r\n\t}, [markingAllAsRead, unreadCount])\r\n\r\n\t// Remove the problematic useEffect that was causing extra API calls\r\n\r\n useEffect(() => {\r\n if(!open) {\r\n setTimeout(() => {\r\n setNotifications([])\r\n }, 500)\r\n }\r\n }, [open])\r\n\r\n\tconst getPerformerLabel = (action: string) => {\r\n\t\tswitch (action?.toLowerCase()) {\r\n\t\t\tcase 'approved':\r\n\t\t\t\treturn 'Approved by'\r\n\t\t\tcase 'rejected':\r\n\t\t\tcase 'reject':\r\n\t\t\t\treturn 'Rejected by'\r\n\t\t\tdefault:\r\n\t\t\t\treturn 'Request to'\r\n\t\t}\r\n\t}\r\n\r\n\tconst getStatusIcon = (action: string) => {\r\n\t\tswitch (action?.toLowerCase()) {\r\n\t\t\tcase 'approved':\r\n\t\t\t\treturn <CheckCircleIcon sx={{ fontSize: '0.8125rem', color: 'success.main' }} />\r\n\t\t\tcase 'rejected':\r\n\t\t\tcase 'reject':\r\n\t\t\t\treturn <CancelIcon sx={{ fontSize: '0.8125rem', color: 'error.main' }} />\r\n\t\t\tdefault:\r\n\t\t\t\treturn <HourglassEmptyIcon sx={{ fontSize: '0.8125rem', color: 'warning.main' }} />\r\n\t\t}\r\n\t}\r\n\r\n\treturn (\r\n\t\t<Box>\r\n\t\t\t<IconButton\r\n\t\t\t\t// size=\"small\"\r\n\t\t\t\taria-label=\"notifications\"\r\n\t\t\t\taria-controls={open ? 'notification-menu' : undefined}\r\n\t\t\t\taria-haspopup=\"true\"\r\n\t\t\t\taria-expanded={open ? 'true' : undefined}\r\n\t\t\t\tonClick={handleClick}\r\n\t\t\t>\r\n\t\t\t\t<Badge badgeContent={unreadCount} color=\"error\">\r\n\t\t\t\t\t<Notification fontSize=\"small\" />\r\n\t\t\t\t</Badge>\r\n\t\t\t</IconButton>\r\n\r\n\t\t\t<Menu\r\n\t\t\t\tid=\"notification-menu\"\r\n\t\t\t\tanchorEl={anchorEl}\r\n\t\t\t\topen={open}\r\n\t\t\t\tonClose={handleClose}\r\n\t\t\t\tref={menuRef}\r\n\t\t\t\tslotProps={{\r\n\t\t\t\t\tpaper: {\r\n\t\t\t\t\t\tsx: {\r\n\t\t\t\t\t\t\toverflow: 'visible',\r\n\t\t\t\t\t\t\tminWidth: 340,\r\n\t\t\t\t\t\t\tmaxWidth: 380,\r\n\t\t\t\t\t\t\tmaxHeight: 460,\r\n\t\t\t\t\t\t\tborder: '1px solid #ECEDEF',\r\n\t\t\t\t\t\t\tborderRadius: '8px',\r\n\t\t\t\t\t\t\t'&:before': {\r\n\t\t\t\t\t\t\t\tcontent: '\"\"',\r\n\t\t\t\t\t\t\t\tdisplay: 'block',\r\n\t\t\t\t\t\t\t\tposition: 'absolute',\r\n\t\t\t\t\t\t\t\ttop: 0,\r\n\t\t\t\t\t\t\t\tright: 13,\r\n\t\t\t\t\t\t\t\twidth: 10,\r\n\t\t\t\t\t\t\t\theight: 10,\r\n\t\t\t\t\t\t\t\tbgcolor: 'background.paper',\r\n\t\t\t\t\t\t\t\ttransform: 'translateY(-50%) rotate(45deg)',\r\n\t\t\t\t\t\t\t\tzIndex: 0,\r\n\t\t\t\t\t\t\t\tborder: '1px solid',\r\n\t\t\t\t\t\t\t\tborderColor: '#ECEDEF',\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t},\r\n\t\t\t\t}}\r\n\t\t\t\tsx={{\r\n\t\t\t\t\t'& .MuiList-root': {\r\n\t\t\t\t\t\tborderRadius: '8px',\r\n\t\t\t\t\t\tmaxHeight: 460,\r\n\t\t\t\t\t\toverflowY: 'auto',\r\n\t\t\t\t\t\tpadding: 0,\r\n\t\t\t\t\t},\r\n\t\t\t\t}}\r\n\t\t\t\ttransformOrigin={{ horizontal: 'right', vertical: 'top' }}\r\n\t\t\t\tanchorOrigin={{ horizontal: 'right', vertical: 'bottom' }}\r\n\t\t\t\tonScroll={handleScroll}\r\n\t\t\t>\r\n\t\t\t\t{/* Header */}\r\n\t\t\t\t<Box sx={{ px: 1.5, py: 1, borderBottom: '1px solid #ECEDEF', backgroundColor: '#fff' }}>\r\n\t\t\t\t\t<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 1, minHeight: 24 }}>\r\n\t\t\t\t\t\t<Box sx={{ display: 'flex', alignItems: 'baseline', gap: 0.75, minWidth: 0 }}>\r\n\t\t\t\t\t\t\t<Typography type=\"s3\" weight=\"bold\" color=\"grey.1000\" sx={{ fontSize: '0.8125rem !important' }}>\r\n\t\t\t\t\t\t\t\tNotifications\r\n\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t{unreadCount > 0 && (\r\n\t\t\t\t\t\t\t\t<Box\r\n\t\t\t\t\t\t\t\t\tcomponent=\"span\"\r\n\t\t\t\t\t\t\t\t\tsx={{\r\n\t\t\t\t\t\t\t\t\t\tfontSize: '0.625rem',\r\n\t\t\t\t\t\t\t\t\t\tfontWeight: 600,\r\n\t\t\t\t\t\t\t\t\t\tlineHeight: 1,\r\n\t\t\t\t\t\t\t\t\t\tpx: 0.75,\r\n\t\t\t\t\t\t\t\t\t\tpy: 0.375,\r\n\t\t\t\t\t\t\t\t\t\tborderRadius: '10px',\r\n\t\t\t\t\t\t\t\t\t\tbgcolor: '#E2F5EC',\r\n\t\t\t\t\t\t\t\t\t\tcolor: '#1A8A56',\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t{unreadCount} unread\r\n\t\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t{unreadCount > 0 && (\r\n\t\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t\tvariant=\"text\"\r\n\t\t\t\t\t\t\t\tsize=\"small\"\r\n\t\t\t\t\t\t\t\tstartIcon={\r\n\t\t\t\t\t\t\t\t\tmarkingAllAsRead ? (\r\n\t\t\t\t\t\t\t\t\t\t<CircularProgress size={12} color=\"inherit\" />\r\n\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t<Tick sx={{ fontSize: '0.75rem !important' }} />\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tsx={{ minHeight: 24, px: 0.75, '&.MuiButton-text': { bgcolor: 'transparent', color: '#1A8A56', '&:hover': { bgcolor: '#F1FBF6', color: '#146B43' } } }}\r\n\t\t\t\t\t\t\t\tonClick={handleMarkAllAsRead}\r\n\t\t\t\t\t\t\t\tdisabled={unreadCount <= 0 || markingAllAsRead}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\tMark all as read\r\n\t\t\t\t\t\t\t</Button>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t</Box>\r\n\t\t\t\t</Box>\r\n\r\n\t\t\t\t{/* Loading State */}\r\n\t\t\t\t{loading && notifications.length === 0 && (\r\n\t\t\t\t\t<Box sx={{ minWidth: 340 }}>\r\n\t\t\t\t\t\t{[0, 1, 2, 3, 4].map((i) => (\r\n\t\t\t\t\t\t\t<Box key={i} sx={{ display: 'flex', gap: 1, px: 1.5, py: 1, borderBottom: '1px solid #ECEDEF' }}>\r\n\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={28} height={28} sx={{ borderRadius: '6px', flexShrink: 0 }} />\r\n\t\t\t\t\t\t\t\t<Box sx={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 0.5 }}>\r\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width={i % 2 ? '55%' : '70%'} height={12} />\r\n\t\t\t\t\t\t\t\t\t<Skeleton variant=\"rounded\" width=\"40%\" height={10} />\r\n\t\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t))}\r\n\t\t\t\t\t</Box>\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{/* Error State */}\r\n\t\t\t\t{error && (\r\n\t\t\t\t\t<Box sx={{ p: 1 }}>\r\n\t\t\t\t\t\t<Alert severity=\"error\">{error}</Alert>\r\n\t\t\t\t\t</Box>\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{/* Notifications List */}\r\n\t\t\t\t{!loading && !error && notifications.length > 0 && (\r\n\t\t\t\t\t<Box sx={{ maxHeight: 380, overflowY: 'auto' }} onScroll={handleScroll}>\r\n\t\t\t\t\t\t{notifications.map((notification) => (\r\n\t\t\t\t\t\t\t<MenuItem\r\n\t\t\t\t\t\t\t\tkey={notification.id}\r\n\t\t\t\t\t\t\t\tonClick={() => handleNotificationClick(notification.id)}\r\n\t\t\t\t\t\t\t\tsx={{\r\n\t\t\t\t\t\t\t\t\tpy: 0.875,\r\n\t\t\t\t\t\t\t\t\tpx: 1.5,\r\n\t\t\t\t\t\t\t\t\tgap: 1,\r\n\t\t\t\t\t\t\t\t\tborderRadius: 0,\r\n\t\t\t\t\t\t\t\t\tmargin: '0 !important',\r\n\t\t\t\t\t\t\t\t\tborderBottom: '1px solid #ECEDEF',\r\n\t\t\t\t\t\t\t\t\talignItems: 'flex-start',\r\n\t\t\t\t\t\t\t\t\twhiteSpace: 'normal',\r\n\t\t\t\t\t\t\t\t\tbackgroundColor: !notification.read ? '#F1FBF6' : 'transparent',\r\n\t\t\t\t\t\t\t\t\t'&:hover': { backgroundColor: '#F7F8F9' },\r\n\t\t\t\t\t\t\t\t\t'&:last-of-type': { borderBottom: 0 },\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<ListItemAvatar sx={{ minWidth: 0, mt: 0.125 }}>\r\n\t\t\t\t\t\t\t\t\t{mainModuleIcons?.[notification.module] ? (\r\n\t\t\t\t\t\t\t\t\t\t<Avatar\r\n\t\t\t\t\t\t\t\t\t\t\tsx={{\r\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 28,\r\n\t\t\t\t\t\t\t\t\t\t\t\theight: 28,\r\n\t\t\t\t\t\t\t\t\t\t\t\tbgcolor: mainModuleBgColors[notification.module] || 'primary.main',\r\n\t\t\t\t\t\t\t\t\t\t\t\tborderRadius: '6px',\r\n\t\t\t\t\t\t\t\t\t\t\t\t'& img': { width: 18, height: 18, objectFit: 'contain' },\r\n\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t\tsrc={mainModuleIcons?.[notification.module]}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t) : notification.avatar ? (\r\n\t\t\t\t\t\t\t\t\t\t<Avatar sx={{ width: 28, height: 28, fontSize: '0.6875rem', bgcolor: 'primary.main', color: 'white', borderRadius: '6px' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t{notification.avatar}\r\n\t\t\t\t\t\t\t\t\t\t</Avatar>\r\n\t\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t\t<Avatar sx={{ width: 28, height: 28, bgcolor: '#F2F3F5', color: '#6D7178', borderRadius: '6px', '& svg': { fontSize: 16 } }}>\r\n\t\t\t\t\t\t\t\t\t\t\t{getNotificationIcon(notification)}\r\n\t\t\t\t\t\t\t\t\t\t</Avatar>\r\n\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t</ListItemAvatar>\r\n\t\t\t\t\t\t\t\t<ListItemText\r\n\t\t\t\t\t\t\t\t\tsx={{ margin: 0, minWidth: 0 }}\r\n\t\t\t\t\t\t\t\t\tprimary={\r\n\t\t\t\t\t\t\t\t\t\t<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5, flexWrap: 'wrap' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t<Typography type=\"s3\" weight={notification.read ? 'medium' : 'bold'} color=\"grey.1000\" sx={{ fontSize: '0.75rem !important', lineHeight: 1.35 }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{notification.title}\r\n\t\t\t\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t\t\t\t\t{notification.seriesNumber && (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Typography type=\"s4\" sx={{ color: 'text.secondary', fontWeight: 500, fontSize: '0.6875rem !important' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.seriesNumber}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t{getStatusIcon(notification.type)}\r\n\t\t\t\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tsecondary={\r\n\t\t\t\t\t\t\t\t\t\t<Box sx={{ mt: 0.125 }}>\r\n\t\t\t\t\t\t\t\t\t\t\t{notification.customerName && (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Typography type=\"s4\" color=\"grey.800\" sx={{ display: 'block', fontSize: '0.6875rem !important' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography component=\"span\" type=\"s5\" sx={{ fontSize: '0.6875rem !important', color: 'text.secondary', mr: 0.5 }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.module === 'purchase' ? 'Vendor:' : 'Customer:'}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.customerName}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5, flexWrap: 'wrap' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{notification.performedByName && (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Typography type=\"s5\" sx={{ fontSize: '0.6875rem !important', color: 'text.secondary' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{getPerformerLabel(notification.type)} {notification.performedByName}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{notification.performedByName && (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Box sx={{ height: 3, width: 3, borderRadius: '100%', backgroundColor: 'grey.400', flexShrink: 0 }} />\r\n\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Typography type=\"s5\" sx={{ fontSize: '0.625rem !important', color: 'text.disabled' }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{notification.timestamp}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t{!notification.read && (\r\n\t\t\t\t\t\t\t\t\t<Box sx={{ width: 6, height: 6, borderRadius: '50%', backgroundColor: 'primary.main', flexShrink: 0, mt: 0.75 }} />\r\n\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t</MenuItem>\r\n\t\t\t\t\t\t))}\r\n\r\n\t\t\t\t\t\t{/* Loading More Indicator */}\r\n\t\t\t\t\t\t{loadingMore && (\r\n\t\t\t\t\t\t\t<Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', py: 1, px: 1.5, gap: 1 }}>\r\n\t\t\t\t\t\t\t\t<CircularProgress size={14} />\r\n\t\t\t\t\t\t\t\t<Typography variant=\"caption\" sx={{ color: 'text.secondary' }}>\r\n\t\t\t\t\t\t\t\t\tLoading more...\r\n\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t)}\r\n\r\n\t\t\t\t\t\t{/* End of List Indicator */}\r\n\t\t\t\t\t\t{!pagination.hasMore && notifications.length > 0 && (\r\n\t\t\t\t\t\t\t<Box sx={{ textAlign: 'center', py: 0.75, px: 1.5, borderTop: '1px solid #ECEDEF' }}>\r\n\t\t\t\t\t\t\t\t<Typography type=\"s5\" color=\"grey.800\" textAlign=\"center\" sx={{ fontSize: '0.6875rem !important' }}>\r\n\t\t\t\t\t\t\t\t\tNo more notifications\r\n\t\t\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t\t\t</Box>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t</Box>\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{/* Empty State */}\r\n\t\t\t\t{!loading && !error && notifications.length === 0 && (\r\n\t\t\t\t\t<Box sx={{ py: 2.5, px: 2, textAlign: 'center' }}>\r\n\t\t\t\t\t\t<Notification sx={{ fontSize: 28, color: 'text.disabled', mb: 0.5 }} />\r\n\t\t\t\t\t\t<Typography type=\"s4\" color=\"grey.800\" textAlign=\"center\">\r\n\t\t\t\t\t\t\tNo notifications yet\r\n\t\t\t\t\t\t</Typography>\r\n\t\t\t\t\t</Box>\r\n\t\t\t\t)}\r\n\t\t\t</Menu>\r\n\t\t</Box>\r\n\t)\r\n}\r\n\r\nexport { NotificationMenu };\r\nexport default NotificationMenu\r\n"],"names":["convertToUnderscore","generateRouteWithId","PathnameGenerator","PathnameAccounting","PathnameGeneratorInventory","PathnameInventory","PathnameGeneratorManufacuring","PathnameManufacturing","PathnameGeneratorPurchase","PathnamePurchase","_a","RENTALROUTES","PathnameGeneratorCrm","PathnameCrm","PathnameGeneratorRental","PathnameRental","images","useState","useNavigate","useRef","jsx","AccountBalanceIcon","PersonIcon","AssignmentIcon","formatText","useCallback","getV1Notification","getToken","n","patchV1NotificationMarkAsReadId","notification","EmailIcon","WarningIcon","CheckCircleIcon","enqueueSnackbar","getV1NotificationMarkAllAsRead","error","getErrorMessage","useEffect","CancelIcon","HourglassEmptyIcon","Box","IconButton","Badge","Notification","jsxs","Menu","Typography","Button","CircularProgress","Tick","Skeleton","Alert","MenuItem","ListItemAvatar","Avatar","ListItemText"],"mappings":";;;;;;;;;;;;;;;;;AA0DA,MAAM,qBAAqB,CAAC,SAAc;;AACzC,QAAM,EAAE,aAAa,IAAI,WAAW,IAAI,mBAAmB,CAAA,MAAO;AAClE,QAAM,MAAMA,i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AAE,OAAO,iBAAA,GAAoB,UAAA,kBAAA,CAE/D;AAAA,YAAA,GACD;AAAA,YAIA,CAAC,WAAW,WAAW,cAAc,SAAS,KAC9C3B,2BAAAA,IAACqB,cAAA,EAAI,IAAI,EAAE,WAAW,UAAU,IAAI,MAAM,IAAI,KAAK,WAAW,oBAAA,GAC7D,UAAArB,2BAAAA,IAAC2B,uBAAA,EAAW,MAAK,MAAK,OAAM,YAAW,WAAU,UAAS,IAAI,EAAE,UAAU,uBAAA,GAA0B,mCAEpG,EAAA,CACD;AAAA,UAAA,GAEF;AAAA,UAIA,CAAC,WAAW,CAAC,SAAS,cAAc,WAAW,KAC/CF,2BAAAA,KAACJ,cAAA,EAAI,IAAI,EAAE,IAAI,KAAK,IAAI,GAAG,WAAW,YACrC,UAAA;AAAA,YAAArB,2BAAAA,IAACwB,aAAAA,cAAA,EAAa,IAAI,EAAE,UAAU,IAAI,OAAO,iBAAiB,IAAI,IAAA,EAAI,CAAG;AAAA,YACrExB,2BAAAA,IAAC2B,WAAAA,cAAW,MAAK,MAAK,OAAM,YAAW,WAAU,UAAS,UAAA,uBAAA,CAE1D;AAAA,UAAA,EAAA,CACD;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEF,GACD;AAEF;;"}
|
|
@@ -3,7 +3,7 @@ import { useState, useRef, useCallback, useEffect } from "react";
|
|
|
3
3
|
import { Box, IconButton, Badge, Menu, CircularProgress, Skeleton, Alert, MenuItem, ListItemAvatar, Avatar, ListItemText } from "@mui/material";
|
|
4
4
|
import { Person, CheckCircle, Warning, Email, Assignment, HourglassEmpty, Cancel, AccountBalance } from "@mui/icons-material";
|
|
5
5
|
import { l as getV1Notification, m as getV1NotificationMarkAllAsRead, n as patchV1NotificationMarkAsReadId } from "./api-C1kYZQ6G.esm.js";
|
|
6
|
-
import { ab as getToken, W as getErrorMessage } from "./api-
|
|
6
|
+
import { ab as getToken, W as getErrorMessage } from "./api-Cjrgqn4x.esm.js";
|
|
7
7
|
import formatText, { convertToUnderscore } from "../utils/format-text/index.esm.js";
|
|
8
8
|
import { T as Typography } from "./typography-CG_A0iOJ.esm.js";
|
|
9
9
|
import images from "../images/index.esm.js";
|
|
@@ -498,4 +498,4 @@ const NotificationMenu = () => {
|
|
|
498
498
|
export {
|
|
499
499
|
NotificationMenu as N
|
|
500
500
|
};
|
|
501
|
-
//# sourceMappingURL=notification-menu-
|
|
501
|
+
//# sourceMappingURL=notification-menu-Ow53R188.esm.js.map
|