@erpsquad/common 1.11.13 → 1.11.15
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 +2 -2
- package/dist/chunks/{DynamicDependentField-CUQlRksh.esm.js → DynamicDependentField-3BIqZuEi.esm.js} +2 -2
- package/dist/chunks/{DynamicDependentField-CUQlRksh.esm.js.map → DynamicDependentField-3BIqZuEi.esm.js.map} +1 -1
- package/dist/chunks/{DynamicDependentField-De5hIa2G.js → DynamicDependentField-BNQloFOt.js} +2 -2
- package/dist/chunks/{DynamicDependentField-De5hIa2G.js.map → DynamicDependentField-BNQloFOt.js.map} +1 -1
- package/dist/chunks/{ERPUIProvider-CE2TFUwH.esm.js → ERPUIProvider-BvdsmytD.esm.js} +3 -3
- package/dist/chunks/{ERPUIProvider-CE2TFUwH.esm.js.map → ERPUIProvider-BvdsmytD.esm.js.map} +1 -1
- package/dist/chunks/{ERPUIProvider-a11UHlA2.js → ERPUIProvider-DOPwl5-1.js} +3 -3
- package/dist/chunks/{ERPUIProvider-a11UHlA2.js.map → ERPUIProvider-DOPwl5-1.js.map} +1 -1
- package/dist/chunks/{FORMS-BxycFROH.js → FORMS-Co5DzR2b.js} +7 -7
- package/dist/chunks/{FORMS-BxycFROH.js.map → FORMS-Co5DzR2b.js.map} +1 -1
- package/dist/chunks/{FORMS-BSkTeBm_.esm.js → FORMS-Cq5klFbL.esm.js} +8 -8
- package/dist/chunks/{FORMS-BSkTeBm_.esm.js.map → FORMS-Cq5klFbL.esm.js.map} +1 -1
- package/dist/chunks/{FlexibleReduxExample-D72G_SVm.esm.js → FlexibleReduxExample-BzEsEgg_.esm.js} +4 -4
- package/dist/chunks/{FlexibleReduxExample-D72G_SVm.esm.js.map → FlexibleReduxExample-BzEsEgg_.esm.js.map} +1 -1
- package/dist/chunks/{FlexibleReduxExample-BP0K3ZqC.js → FlexibleReduxExample-CcL6mk5n.js} +4 -4
- package/dist/chunks/{FlexibleReduxExample-BP0K3ZqC.js.map → FlexibleReduxExample-CcL6mk5n.js.map} +1 -1
- package/dist/chunks/{SectionFlowEditor-rpYvUYCA.esm.js → SectionFlowEditor-DEbWSklc.esm.js} +8 -8
- package/dist/chunks/{SectionFlowEditor-rpYvUYCA.esm.js.map → SectionFlowEditor-DEbWSklc.esm.js.map} +1 -1
- package/dist/chunks/{SectionFlowEditor-D_zGaLTv.js → SectionFlowEditor-DagOI5vV.js} +5 -5
- package/dist/chunks/{SectionFlowEditor-D_zGaLTv.js.map → SectionFlowEditor-DagOI5vV.js.map} +1 -1
- package/dist/chunks/{action-bar-B8EkHk4R.esm.js → action-bar-CBNUSFDM.esm.js} +9 -6
- package/dist/chunks/action-bar-CBNUSFDM.esm.js.map +1 -0
- package/dist/chunks/{action-bar-B_EUV2Bt.js → action-bar-CkKLB98R.js} +8 -5
- package/dist/chunks/action-bar-CkKLB98R.js.map +1 -0
- package/dist/chunks/{actionCreator-D2PZfYi7.js → actionCreator-B7XTLcC3.js} +2 -2
- package/dist/chunks/{actionCreator-D2PZfYi7.js.map → actionCreator-B7XTLcC3.js.map} +1 -1
- package/dist/chunks/{actionCreator-D68eU9au.esm.js → actionCreator-BeyzfogA.esm.js} +2 -2
- package/dist/chunks/{actionCreator-D68eU9au.esm.js.map → actionCreator-BeyzfogA.esm.js.map} +1 -1
- package/dist/chunks/{actionCreator-C1EgKt0Q.js → actionCreator-CsznY4jv.js} +2 -2
- package/dist/chunks/{actionCreator-C1EgKt0Q.js.map → actionCreator-CsznY4jv.js.map} +1 -1
- package/dist/chunks/{actionCreator-DEVJN_Xh.js → actionCreator-CxF0fSo3.js} +2 -2
- package/dist/chunks/{actionCreator-DEVJN_Xh.js.map → actionCreator-CxF0fSo3.js.map} +1 -1
- package/dist/chunks/{actionCreator-BwQrLjXs.esm.js → actionCreator-D3Ywxqko.esm.js} +2 -2
- package/dist/chunks/{actionCreator-BwQrLjXs.esm.js.map → actionCreator-D3Ywxqko.esm.js.map} +1 -1
- package/dist/chunks/{actionCreator-DW6F8f7X.esm.js → actionCreator-D9o1yF_V.esm.js} +3 -3
- package/dist/chunks/{actionCreator-DW6F8f7X.esm.js.map → actionCreator-D9o1yF_V.esm.js.map} +1 -1
- package/dist/chunks/{actionCreator-DyXbdzac.esm.js → actionCreator-DGxoyGyk.esm.js} +3 -3
- package/dist/chunks/{actionCreator-DyXbdzac.esm.js.map → actionCreator-DGxoyGyk.esm.js.map} +1 -1
- package/dist/chunks/{actionCreator-DhKsKoNK.js → actionCreator-DIPsxXwE.js} +2 -2
- package/dist/chunks/{actionCreator-DhKsKoNK.js.map → actionCreator-DIPsxXwE.js.map} +1 -1
- package/dist/chunks/{actionCreator-CLs2lr2h.js → actionCreator-DfnX-Cj5.js} +2 -2
- package/dist/chunks/{actionCreator-CLs2lr2h.js.map → actionCreator-DfnX-Cj5.js.map} +1 -1
- package/dist/chunks/{actionCreator-Cm77Rmfx.esm.js → actionCreator-upsoTf3q.esm.js} +2 -2
- package/dist/chunks/{actionCreator-Cm77Rmfx.esm.js.map → actionCreator-upsoTf3q.esm.js.map} +1 -1
- package/dist/chunks/{add-template-C880g-xF.esm.js → add-template-BCxn7OXM.esm.js} +2 -2
- package/dist/chunks/{add-template-C880g-xF.esm.js.map → add-template-BCxn7OXM.esm.js.map} +1 -1
- package/dist/chunks/{add-template-BK-2FnRj.js → add-template-Cee6U_4N.js} +2 -2
- package/dist/chunks/{add-template-BK-2FnRj.js.map → add-template-Cee6U_4N.js.map} +1 -1
- package/dist/chunks/{address-modal-BR-jph_I.esm.js → address-modal-DBuj1ow2.esm.js} +2 -2
- package/dist/chunks/{address-modal-BR-jph_I.esm.js.map → address-modal-DBuj1ow2.esm.js.map} +1 -1
- package/dist/chunks/{address-modal-BHIlP-pd.js → address-modal-DfP7AYCO.js} +2 -2
- package/dist/chunks/{address-modal-BHIlP-pd.js.map → address-modal-DfP7AYCO.js.map} +1 -1
- package/dist/chunks/{ai-summary-7COdbF1n.js → ai-summary-CEgn0zWt.js} +2 -2
- package/dist/chunks/{ai-summary-7COdbF1n.js.map → ai-summary-CEgn0zWt.js.map} +1 -1
- package/dist/chunks/{ai-summary-Cs2CC-P1.esm.js → ai-summary-mqP0clDC.esm.js} +2 -2
- package/dist/chunks/{ai-summary-Cs2CC-P1.esm.js.map → ai-summary-mqP0clDC.esm.js.map} +1 -1
- package/dist/chunks/{api-DBmWILBN.esm.js → api-C1kYZQ6G.esm.js} +11 -11
- package/dist/chunks/{api-DBmWILBN.esm.js.map → api-C1kYZQ6G.esm.js.map} +1 -1
- package/dist/chunks/{api-DcArDfpV.js → api-CfErA7gR.js} +12 -1
- package/dist/chunks/{api-DcArDfpV.js.map → api-CfErA7gR.js.map} +1 -1
- package/dist/chunks/{api-w8De9u1Z.esm.js → api-D-Ups140.esm.js} +14 -3
- package/dist/chunks/{api-w8De9u1Z.esm.js.map → api-D-Ups140.esm.js.map} +1 -1
- package/dist/chunks/{appbar-D9sgcNKx.js → appbar-B5B09cG8.js} +2 -2
- package/dist/chunks/{appbar-D9sgcNKx.js.map → appbar-B5B09cG8.js.map} +1 -1
- package/dist/chunks/{appbar-DhAOoNnx.esm.js → appbar-DqKmstO3.esm.js} +2 -2
- package/dist/chunks/{appbar-DhAOoNnx.esm.js.map → appbar-DqKmstO3.esm.js.map} +1 -1
- package/dist/chunks/{approval-wrapper-Da93X7F6.esm.js → approval-wrapper-B75P0gcQ.esm.js} +2 -2
- package/dist/chunks/{approval-wrapper-Da93X7F6.esm.js.map → approval-wrapper-B75P0gcQ.esm.js.map} +1 -1
- package/dist/chunks/{approval-wrapper-Ci-cW-m0.js → approval-wrapper-BrMP1u_K.js} +2 -2
- package/dist/chunks/{approval-wrapper-Ci-cW-m0.js.map → approval-wrapper-BrMP1u_K.js.map} +1 -1
- package/dist/chunks/{chat-bot-padqRWR_.js → chat-bot-BAYqYRHn.js} +2 -2
- package/dist/chunks/{chat-bot-padqRWR_.js.map → chat-bot-BAYqYRHn.js.map} +1 -1
- package/dist/chunks/{chat-bot-BByP2-kp.esm.js → chat-bot-DpIhSCKc.esm.js} +2 -2
- package/dist/chunks/{chat-bot-BByP2-kp.esm.js.map → chat-bot-DpIhSCKc.esm.js.map} +1 -1
- package/dist/chunks/{common-utility-CARAexqF.js → common-utility-DRKuh2H0.js} +2 -2
- package/dist/chunks/{common-utility-CARAexqF.js.map → common-utility-DRKuh2H0.js.map} +1 -1
- package/dist/chunks/{common-utility-DWsblyLc.esm.js → common-utility-qSmp2In3.esm.js} +2 -2
- package/dist/chunks/{common-utility-DWsblyLc.esm.js.map → common-utility-qSmp2In3.esm.js.map} +1 -1
- package/dist/chunks/{custom-editor-CDTvJeBu.js → custom-editor-BPQayjzn.js} +2 -2
- package/dist/chunks/{custom-editor-CDTvJeBu.js.map → custom-editor-BPQayjzn.js.map} +1 -1
- package/dist/chunks/{custom-editor-Bxyz1m2D.esm.js → custom-editor-CDIvDJ3E.esm.js} +3 -3
- package/dist/chunks/{custom-editor-Bxyz1m2D.esm.js.map → custom-editor-CDIvDJ3E.esm.js.map} +1 -1
- package/dist/chunks/{custom-form-Bpb9HiXs.esm.js → custom-form-Bc3FhNpz.esm.js} +6 -6
- package/dist/chunks/{custom-form-Bpb9HiXs.esm.js.map → custom-form-Bc3FhNpz.esm.js.map} +1 -1
- package/dist/chunks/{custom-form-CdvLAqkM.js → custom-form-CS2SL4Bf.js} +6 -6
- package/dist/chunks/{custom-form-CdvLAqkM.js.map → custom-form-CS2SL4Bf.js.map} +1 -1
- package/dist/chunks/{dashboard-IQPv8qb9.esm.js → dashboard-BB35K2FP.esm.js} +3 -3
- package/dist/chunks/{dashboard-IQPv8qb9.esm.js.map → dashboard-BB35K2FP.esm.js.map} +1 -1
- package/dist/chunks/{dashboard-Bm3qCxyp.js → dashboard-BhnP9p8v.js} +3 -3
- package/dist/chunks/{dashboard-Bm3qCxyp.js.map → dashboard-BhnP9p8v.js.map} +1 -1
- package/dist/chunks/{dynamic-report-CdpkTznt.esm.js → dynamic-report-DqEqYFwB.esm.js} +4 -4
- package/dist/chunks/{dynamic-report-CdpkTznt.esm.js.map → dynamic-report-DqEqYFwB.esm.js.map} +1 -1
- package/dist/chunks/{dynamic-report-Dfk4XuTh.js → dynamic-report-o7m1ueU6.js} +4 -4
- package/dist/chunks/{dynamic-report-Dfk4XuTh.js.map → dynamic-report-o7m1ueU6.js.map} +1 -1
- package/dist/chunks/{dynamic-rows-mkgzMFjL.js → dynamic-rows-BExLpMXN.js} +2 -2
- package/dist/chunks/{dynamic-rows-mkgzMFjL.js.map → dynamic-rows-BExLpMXN.js.map} +1 -1
- package/dist/chunks/{dynamic-rows-D64m-Z1j.esm.js → dynamic-rows-aRfOvy43.esm.js} +2 -2
- package/dist/chunks/{dynamic-rows-D64m-Z1j.esm.js.map → dynamic-rows-aRfOvy43.esm.js.map} +1 -1
- package/dist/chunks/{dynamic-text-editor-Bq0VZD_0.esm.js → dynamic-text-editor-CdnVDWA3.esm.js} +2 -2
- package/dist/chunks/{dynamic-text-editor-Bq0VZD_0.esm.js.map → dynamic-text-editor-CdnVDWA3.esm.js.map} +1 -1
- package/dist/chunks/{dynamic-text-editor-DvQu_USR.js → dynamic-text-editor-CgisZkH-.js} +2 -2
- package/dist/chunks/{dynamic-text-editor-DvQu_USR.js.map → dynamic-text-editor-CgisZkH-.js.map} +1 -1
- package/dist/chunks/{edit-section-modal-JhrBM1O-.esm.js → edit-section-modal-CKzvbOam.esm.js} +2 -2
- package/dist/chunks/{edit-section-modal-JhrBM1O-.esm.js.map → edit-section-modal-CKzvbOam.esm.js.map} +1 -1
- package/dist/chunks/{edit-section-modal-BptwBP9b.js → edit-section-modal-R-TdrVeI.js} +2 -2
- package/dist/chunks/{edit-section-modal-BptwBP9b.js.map → edit-section-modal-R-TdrVeI.js.map} +1 -1
- package/dist/chunks/{filter-DnQLBnHo.esm.js → filter-BVY1nrjv.esm.js} +11 -5
- package/dist/chunks/filter-BVY1nrjv.esm.js.map +1 -0
- package/dist/chunks/{filter-D9Cx0Qtl.js → filter-BXScmUKA.js} +10 -4
- package/dist/chunks/filter-BXScmUKA.js.map +1 -0
- package/dist/chunks/{footer-lIzpfeIl.esm.js → footer-BEt1R0BF.esm.js} +2 -2
- package/dist/chunks/{footer-lIzpfeIl.esm.js.map → footer-BEt1R0BF.esm.js.map} +1 -1
- package/dist/chunks/{footer-bayElP1z.js → footer-DJZ4K1n0.js} +2 -2
- package/dist/chunks/{footer-bayElP1z.js.map → footer-DJZ4K1n0.js.map} +1 -1
- package/dist/chunks/{form-fields-BwxsvB9F.js → form-fields-COjlUd_z.js} +3 -3
- package/dist/chunks/{form-fields-BwxsvB9F.js.map → form-fields-COjlUd_z.js.map} +1 -1
- package/dist/chunks/{form-fields-BrayYpMV.esm.js → form-fields-CwtBhyBW.esm.js} +3 -3
- package/dist/chunks/{form-fields-BrayYpMV.esm.js.map → form-fields-CwtBhyBW.esm.js.map} +1 -1
- package/dist/chunks/{form-parser-Bvj6Zc2Z.js → form-parser-09IqF2B8.js} +2 -2
- package/dist/chunks/{form-parser-Bvj6Zc2Z.js.map → form-parser-09IqF2B8.js.map} +1 -1
- package/dist/chunks/{form-parser-BJRyYk98.esm.js → form-parser-DS9jYKXb.esm.js} +2 -2
- package/dist/chunks/{form-parser-BJRyYk98.esm.js.map → form-parser-DS9jYKXb.esm.js.map} +1 -1
- package/dist/chunks/{form-section-rVAcKmDS.js → form-section-94yk-i7O.js} +6 -6
- package/dist/chunks/{form-section-rVAcKmDS.js.map → form-section-94yk-i7O.js.map} +1 -1
- package/dist/chunks/{form-section-ooB5n5n5.esm.js → form-section-Ce7gW7nw.esm.js} +6 -6
- package/dist/chunks/{form-section-ooB5n5n5.esm.js.map → form-section-Ce7gW7nw.esm.js.map} +1 -1
- package/dist/chunks/{fullScreen-DS2-TuVH.esm.js → fullScreen-BGLa_jyN.esm.js} +3 -3
- package/dist/chunks/{fullScreen-DS2-TuVH.esm.js.map → fullScreen-BGLa_jyN.esm.js.map} +1 -1
- package/dist/chunks/{fullScreen-B6c2INGa.js → fullScreen-CeM0jO6X.js} +3 -3
- package/dist/chunks/{fullScreen-B6c2INGa.js.map → fullScreen-CeM0jO6X.js.map} +1 -1
- package/dist/chunks/{global-search-D0pVrSP1.js → global-search-BXrlGacV.js} +2 -2
- package/dist/chunks/{global-search-D0pVrSP1.js.map → global-search-BXrlGacV.js.map} +1 -1
- package/dist/chunks/{global-search-C3ZxZGB8.esm.js → global-search-Da6V1hCw.esm.js} +2 -2
- package/dist/chunks/{global-search-C3ZxZGB8.esm.js.map → global-search-Da6V1hCw.esm.js.map} +1 -1
- package/dist/chunks/{grid-view-Br1N0sdf.esm.js → grid-view-BFr24B5L.esm.js} +2 -2
- package/dist/chunks/{grid-view-Br1N0sdf.esm.js.map → grid-view-BFr24B5L.esm.js.map} +1 -1
- package/dist/chunks/{grid-view-DhnSmYaa.js → grid-view-DZce2PjW.js} +2 -2
- package/dist/chunks/{grid-view-DhnSmYaa.js.map → grid-view-DZce2PjW.js.map} +1 -1
- package/dist/chunks/{header-Bv0VHJ6c.js → header-Crrg21ks.js} +3 -3
- package/dist/chunks/{header-Bv0VHJ6c.js.map → header-Crrg21ks.js.map} +1 -1
- package/dist/chunks/{header-Dob8vfUx.esm.js → header-aasqgICS.esm.js} +3 -3
- package/dist/chunks/{header-Dob8vfUx.esm.js.map → header-aasqgICS.esm.js.map} +1 -1
- package/dist/chunks/{header-enhanced-Donxzxfw.esm.js → header-enhanced-CSAtP4BI.esm.js} +2 -2
- package/dist/chunks/{header-enhanced-Donxzxfw.esm.js.map → header-enhanced-CSAtP4BI.esm.js.map} +1 -1
- package/dist/chunks/{header-enhanced-CTtr4Pe-.js → header-enhanced-Y4qTE0ff.js} +2 -2
- package/dist/chunks/{header-enhanced-CTtr4Pe-.js.map → header-enhanced-Y4qTE0ff.js.map} +1 -1
- package/dist/chunks/{index-ALqg8b5U.esm.js → index-rN4vc8IA.esm.js} +2 -2
- package/dist/chunks/{index-ALqg8b5U.esm.js.map → index-rN4vc8IA.esm.js.map} +1 -1
- package/dist/chunks/{inline-edit-fields-Betje5F6.js → inline-edit-fields-BNvosaTN.js} +3 -3
- package/dist/chunks/{inline-edit-fields-Betje5F6.js.map → inline-edit-fields-BNvosaTN.js.map} +1 -1
- package/dist/chunks/{inline-edit-fields-tkexTfJu.esm.js → inline-edit-fields-CzTMCbzn.esm.js} +3 -3
- package/dist/chunks/{inline-edit-fields-tkexTfJu.esm.js.map → inline-edit-fields-CzTMCbzn.esm.js.map} +1 -1
- package/dist/chunks/{inventory-reports-title-bar-BF7AuiaE.js → inventory-reports-title-bar-BvhyLQ4V.js} +3 -3
- package/dist/chunks/{inventory-reports-title-bar-BF7AuiaE.js.map → inventory-reports-title-bar-BvhyLQ4V.js.map} +1 -1
- package/dist/chunks/{inventory-reports-title-bar-C7sOZnCf.esm.js → inventory-reports-title-bar-pf_78LUZ.esm.js} +3 -3
- package/dist/chunks/{inventory-reports-title-bar-C7sOZnCf.esm.js.map → inventory-reports-title-bar-pf_78LUZ.esm.js.map} +1 -1
- package/dist/chunks/{item-response-details-Detcy-bT.js → item-response-details-7iAPYOTv.js} +4 -4
- package/dist/chunks/{item-response-details-Detcy-bT.js.map → item-response-details-7iAPYOTv.js.map} +1 -1
- package/dist/chunks/{item-response-details-oFDZqbwX.esm.js → item-response-details-CSHehVMS.esm.js} +4 -4
- package/dist/chunks/{item-response-details-oFDZqbwX.esm.js.map → item-response-details-CSHehVMS.esm.js.map} +1 -1
- package/dist/chunks/{listing-kWwVSCCH.js → listing-9zOaeEtm.js} +4 -4
- package/dist/chunks/{listing-kWwVSCCH.js.map → listing-9zOaeEtm.js.map} +1 -1
- package/dist/chunks/{listing-BIwPAwDj.esm.js → listing-CPGsuBMA.esm.js} +4 -4
- package/dist/chunks/{listing-BIwPAwDj.esm.js.map → listing-CPGsuBMA.esm.js.map} +1 -1
- package/dist/chunks/{location-select-CrTin8mq.js → location-select-BOYOUv3I.js} +2 -2
- package/dist/chunks/{location-select-CrTin8mq.js.map → location-select-BOYOUv3I.js.map} +1 -1
- package/dist/chunks/{location-select-Co3yS2Qn.esm.js → location-select-Dl7zUTHR.esm.js} +2 -2
- package/dist/chunks/{location-select-Co3yS2Qn.esm.js.map → location-select-Dl7zUTHR.esm.js.map} +1 -1
- package/dist/chunks/{material-editable-table-ChD0DhXw.esm.js → material-editable-table-B8ed5YX6.esm.js} +3 -3
- package/dist/chunks/{material-editable-table-ChD0DhXw.esm.js.map → material-editable-table-B8ed5YX6.esm.js.map} +1 -1
- package/dist/chunks/{material-editable-table-CjtgcYTA.js → material-editable-table-Z_wQXpjN.js} +3 -3
- package/dist/chunks/{material-editable-table-CjtgcYTA.js.map → material-editable-table-Z_wQXpjN.js.map} +1 -1
- package/dist/chunks/media-BWriA8Un.esm.js +45 -0
- package/dist/chunks/{media-BNHjErng.esm.js.map → media-BWriA8Un.esm.js.map} +1 -1
- package/dist/chunks/media-D5-I9adp.js +44 -0
- package/dist/chunks/media-D5-I9adp.js.map +1 -0
- package/dist/chunks/{module-reducer-wwGUCVCs.js → module-reducer-BFrec-43.js} +2 -2
- package/dist/chunks/{module-reducer-wwGUCVCs.js.map → module-reducer-BFrec-43.js.map} +1 -1
- package/dist/chunks/{module-reducer-DJnOQQeS.esm.js → module-reducer-Bxu3--QK.esm.js} +2 -2
- package/dist/chunks/{module-reducer-DJnOQQeS.esm.js.map → module-reducer-Bxu3--QK.esm.js.map} +1 -1
- package/dist/chunks/{notification-menu-D9NWAvoZ.js → notification-menu-B7Se4fO6.js} +2 -2
- package/dist/chunks/{notification-menu-D9NWAvoZ.js.map → notification-menu-B7Se4fO6.js.map} +1 -1
- package/dist/chunks/{notification-menu-Cm55sfoj.esm.js → notification-menu-BNUazD23.esm.js} +3 -3
- package/dist/chunks/{notification-menu-Cm55sfoj.esm.js.map → notification-menu-BNUazD23.esm.js.map} +1 -1
- package/dist/chunks/{page-action-Drb4HiNc.js → page-action-BvfLbawr.js} +4 -4
- package/dist/chunks/{page-action-Drb4HiNc.js.map → page-action-BvfLbawr.js.map} +1 -1
- package/dist/chunks/{page-action-B3Jh4ITW.esm.js → page-action-C8VxjK9c.esm.js} +4 -4
- package/dist/chunks/{page-action-B3Jh4ITW.esm.js.map → page-action-C8VxjK9c.esm.js.map} +1 -1
- package/dist/chunks/{page-navigator-Cp0hmfhW.esm.js → page-navigator-GoMH0fMw.esm.js} +2 -2
- package/dist/chunks/{page-navigator-Cp0hmfhW.esm.js.map → page-navigator-GoMH0fMw.esm.js.map} +1 -1
- package/dist/chunks/{page-navigator-Bt1ZX2Uf.js → page-navigator-SUYJqdnx.js} +2 -2
- package/dist/chunks/{page-navigator-Bt1ZX2Uf.js.map → page-navigator-SUYJqdnx.js.map} +1 -1
- package/dist/chunks/{page-view-BshoJwrs.js → page-view-BortZKhR.js} +3 -3
- package/dist/chunks/{page-view-BshoJwrs.js.map → page-view-BortZKhR.js.map} +1 -1
- package/dist/chunks/{page-view-DC-S9vtU.esm.js → page-view-DRQ3PFJ7.esm.js} +3 -3
- package/dist/chunks/{page-view-DC-S9vtU.esm.js.map → page-view-DRQ3PFJ7.esm.js.map} +1 -1
- package/dist/chunks/{quick-approval-modal-M4mOc3VS.esm.js → quick-approval-modal-DXAqjdcl.esm.js} +2 -2
- package/dist/chunks/{quick-approval-modal-M4mOc3VS.esm.js.map → quick-approval-modal-DXAqjdcl.esm.js.map} +1 -1
- package/dist/chunks/{quick-approval-modal-Ckrkmjkl.js → quick-approval-modal-dc5AaSxs.js} +2 -2
- package/dist/chunks/{quick-approval-modal-Ckrkmjkl.js.map → quick-approval-modal-dc5AaSxs.js.map} +1 -1
- package/dist/chunks/{reducer-BHyZsdtk.js → reducer-BEMhiGFQ.js} +2 -2
- package/dist/chunks/{reducer-BHyZsdtk.js.map → reducer-BEMhiGFQ.js.map} +1 -1
- package/dist/chunks/{reducer-CUXI9fY3.esm.js → reducer-BjHl_KLr.esm.js} +2 -2
- package/dist/chunks/{reducer-CUXI9fY3.esm.js.map → reducer-BjHl_KLr.esm.js.map} +1 -1
- package/dist/chunks/{reducer-sGv2FmSj.esm.js → reducer-BkCNzjBL.esm.js} +3 -3
- package/dist/chunks/{reducer-sGv2FmSj.esm.js.map → reducer-BkCNzjBL.esm.js.map} +1 -1
- package/dist/chunks/{reducer-CrtUk_W3.esm.js → reducer-CSKSBC88.esm.js} +3 -3
- package/dist/chunks/{reducer-CrtUk_W3.esm.js.map → reducer-CSKSBC88.esm.js.map} +1 -1
- package/dist/chunks/{reducer-rdfC4LIG.esm.js → reducer-CiLCj0Py.esm.js} +2 -2
- package/dist/chunks/{reducer-rdfC4LIG.esm.js.map → reducer-CiLCj0Py.esm.js.map} +1 -1
- package/dist/chunks/{reducer-DPXa1mB5.js → reducer-CkWclHbN.js} +2 -2
- package/dist/chunks/{reducer-DPXa1mB5.js.map → reducer-CkWclHbN.js.map} +1 -1
- package/dist/chunks/{reducer-Cwtyv5b4.js → reducer-EEoFGAVV.js} +3 -3
- package/dist/chunks/{reducer-Cwtyv5b4.js.map → reducer-EEoFGAVV.js.map} +1 -1
- package/dist/chunks/{reducer-BTBP8UD4.esm.js → reducer-L9HIXcI1.esm.js} +2 -2
- package/dist/chunks/{reducer-BTBP8UD4.esm.js.map → reducer-L9HIXcI1.esm.js.map} +1 -1
- package/dist/chunks/{reducer-CVG2dtjZ.js → reducer-RjoBDU1j.js} +2 -2
- package/dist/chunks/{reducer-CVG2dtjZ.js.map → reducer-RjoBDU1j.js.map} +1 -1
- package/dist/chunks/{reducer-ujMQ0L5_.js → reducer-yTOIeGFg.js} +2 -2
- package/dist/chunks/{reducer-ujMQ0L5_.js.map → reducer-yTOIeGFg.js.map} +1 -1
- package/dist/chunks/{reports-title-bar-B8JTn7Ul.esm.js → reports-title-bar-BJ7NkV9U.esm.js} +4 -4
- package/dist/chunks/{reports-title-bar-B8JTn7Ul.esm.js.map → reports-title-bar-BJ7NkV9U.esm.js.map} +1 -1
- package/dist/chunks/{reports-title-bar-BJ7A6SmB.js → reports-title-bar-CdO0ixSd.js} +4 -4
- package/dist/chunks/{reports-title-bar-BJ7A6SmB.js.map → reports-title-bar-CdO0ixSd.js.map} +1 -1
- package/dist/chunks/{routes-Cs2E7oAc.js → routes-CFCfCWmQ.js} +3 -3
- package/dist/chunks/{routes-Cs2E7oAc.js.map → routes-CFCfCWmQ.js.map} +1 -1
- package/dist/chunks/{routes-CoCmY90I.esm.js → routes-CIaAl7t8.esm.js} +3 -3
- package/dist/chunks/{routes-CoCmY90I.esm.js.map → routes-CIaAl7t8.esm.js.map} +1 -1
- package/dist/chunks/{schedule-report-xnMShSOU.js → schedule-report-BP_lF8CG.js} +6 -6
- package/dist/chunks/{schedule-report-xnMShSOU.js.map → schedule-report-BP_lF8CG.js.map} +1 -1
- package/dist/chunks/{schedule-report-B5nyK1uE.esm.js → schedule-report-Buvq9E-k.esm.js} +6 -6
- package/dist/chunks/{schedule-report-B5nyK1uE.esm.js.map → schedule-report-Buvq9E-k.esm.js.map} +1 -1
- package/dist/chunks/{schedule-report-modal-LKJLZBDX.js → schedule-report-modal-COImNOlJ.js} +3 -3
- package/dist/chunks/{schedule-report-modal-LKJLZBDX.js.map → schedule-report-modal-COImNOlJ.js.map} +1 -1
- package/dist/chunks/{schedule-report-modal-Dcld1u__.esm.js → schedule-report-modal-CvfPn4bO.esm.js} +3 -3
- package/dist/chunks/{schedule-report-modal-Dcld1u__.esm.js.map → schedule-report-modal-CvfPn4bO.esm.js.map} +1 -1
- package/dist/chunks/{searchable-select-BNErtrmc.esm.js → searchable-select-Bu17d6NI.esm.js} +6 -6
- package/dist/chunks/{searchable-select-BNErtrmc.esm.js.map → searchable-select-Bu17d6NI.esm.js.map} +1 -1
- package/dist/chunks/{searchable-select-CvmvzflO.js → searchable-select-DWAOdcXD.js} +6 -6
- package/dist/chunks/{searchable-select-CvmvzflO.js.map → searchable-select-DWAOdcXD.js.map} +1 -1
- package/dist/chunks/{share-modal-7-fMdfwB.js → share-modal-C27qwY53.js} +3 -3
- package/dist/chunks/{share-modal-7-fMdfwB.js.map → share-modal-C27qwY53.js.map} +1 -1
- package/dist/chunks/{share-modal-B7bmQDz6.esm.js → share-modal-e1Ln_EkF.esm.js} +3 -3
- package/dist/chunks/{share-modal-B7bmQDz6.esm.js.map → share-modal-e1Ln_EkF.esm.js.map} +1 -1
- package/dist/chunks/{share-modal-enhanced-K3F95FBr.js → share-modal-enhanced-AISjjeWC.js} +2 -2
- package/dist/chunks/{share-modal-enhanced-K3F95FBr.js.map → share-modal-enhanced-AISjjeWC.js.map} +1 -1
- package/dist/chunks/{share-modal-enhanced-LzvFBkw7.esm.js → share-modal-enhanced-De3P9VK_.esm.js} +2 -2
- package/dist/chunks/{share-modal-enhanced-LzvFBkw7.esm.js.map → share-modal-enhanced-De3P9VK_.esm.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-Cu3so7yG.esm.js → sidebarScreen-DrXQgFfD.esm.js} +4 -4
- package/dist/chunks/{sidebarScreen-Cu3so7yG.esm.js.map → sidebarScreen-DrXQgFfD.esm.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-D6RdJmE_.js → sidebarScreen-fc0K8AIc.js} +4 -4
- package/dist/chunks/{sidebarScreen-D6RdJmE_.js.map → sidebarScreen-fc0K8AIc.js.map} +1 -1
- package/dist/chunks/{store-dnWK9iUF.js → store-C2Jq1vUE.js} +6 -6
- package/dist/chunks/{store-dnWK9iUF.js.map → store-C2Jq1vUE.js.map} +1 -1
- package/dist/chunks/{store-BJ-oYaJ9.esm.js → store-Fe4VwbF_.esm.js} +6 -6
- package/dist/chunks/{store-BJ-oYaJ9.esm.js.map → store-Fe4VwbF_.esm.js.map} +1 -1
- package/dist/chunks/{table-pjhCRENP.esm.js → table-Co5_7CEc.esm.js} +3 -3
- package/dist/chunks/{table-pjhCRENP.esm.js.map → table-Co5_7CEc.esm.js.map} +1 -1
- package/dist/chunks/{table-form-7QGuKo_u.js → table-form-BDB6k6Ka.js} +2 -2
- package/dist/chunks/{table-form-7QGuKo_u.js.map → table-form-BDB6k6Ka.js.map} +1 -1
- package/dist/chunks/{table-form-CNutzib7.esm.js → table-form-CL8axzXB.esm.js} +2 -2
- package/dist/chunks/{table-form-CNutzib7.esm.js.map → table-form-CL8axzXB.esm.js.map} +1 -1
- package/dist/chunks/{table-yoFD3IYO.js → table-pSQQBEqC.js} +3 -3
- package/dist/chunks/{table-yoFD3IYO.js.map → table-pSQQBEqC.js.map} +1 -1
- package/dist/chunks/{template-editor-router-BSESCNID.js → template-editor-router-BZbxO3bj.js} +2 -2
- package/dist/chunks/{template-editor-router-BSESCNID.js.map → template-editor-router-BZbxO3bj.js.map} +1 -1
- package/dist/chunks/{template-editor-router-Blq_7tbC.esm.js → template-editor-router-DkSQldFD.esm.js} +2 -2
- package/dist/chunks/{template-editor-router-Blq_7tbC.esm.js.map → template-editor-router-DkSQldFD.esm.js.map} +1 -1
- package/dist/chunks/{template-modal-jF46oWQM.js → template-modal-CtcB5ZXg.js} +2 -2
- package/dist/chunks/{template-modal-jF46oWQM.js.map → template-modal-CtcB5ZXg.js.map} +1 -1
- package/dist/chunks/{template-modal-DP-8WrJA.esm.js → template-modal-GAKNz6Ju.esm.js} +3 -3
- package/dist/chunks/{template-modal-DP-8WrJA.esm.js.map → template-modal-GAKNz6Ju.esm.js.map} +1 -1
- package/dist/chunks/{template-name-modal-Dctn8t3t.esm.js → template-name-modal-CLROXhxo.esm.js} +2 -2
- package/dist/chunks/{template-name-modal-Dctn8t3t.esm.js.map → template-name-modal-CLROXhxo.esm.js.map} +1 -1
- package/dist/chunks/{templates-B9XdPGUq.esm.js → templates-BWZsKOkq.esm.js} +8 -8
- package/dist/chunks/{templates-B9XdPGUq.esm.js.map → templates-BWZsKOkq.esm.js.map} +1 -1
- package/dist/chunks/{templates-Cb8eycox.js → templates-CWeYr33-.js} +7 -7
- package/dist/chunks/{templates-Cb8eycox.js.map → templates-CWeYr33-.js.map} +1 -1
- package/dist/chunks/{text-measurement-Ds7tr1Kv.esm.js → text-measurement-BDjRfcdG.esm.js} +2 -2
- package/dist/chunks/{text-measurement-Ds7tr1Kv.esm.js.map → text-measurement-BDjRfcdG.esm.js.map} +1 -1
- package/dist/chunks/{text-measurement-7rGbhzLN.js → text-measurement-DRYlij2S.js} +2 -2
- package/dist/chunks/{text-measurement-7rGbhzLN.js.map → text-measurement-DRYlij2S.js.map} +1 -1
- package/dist/chunks/{translations-B1tUxNsa.esm.js → translations-AfCWpvAq.esm.js} +3 -3
- package/dist/chunks/{translations-B1tUxNsa.esm.js.map → translations-AfCWpvAq.esm.js.map} +1 -1
- package/dist/chunks/{translations-C8G8AtUJ.js → translations-BHuYJsWp.js} +2 -2
- package/dist/chunks/{translations-C8G8AtUJ.js.map → translations-BHuYJsWp.js.map} +1 -1
- package/dist/chunks/{uom-field-wrapper-MYSrjipD.esm.js → uom-field-wrapper-Ci2KCrFu.esm.js} +2 -2
- package/dist/chunks/{uom-field-wrapper-MYSrjipD.esm.js.map → uom-field-wrapper-Ci2KCrFu.esm.js.map} +1 -1
- package/dist/chunks/{uom-field-wrapper-BHmSiaXi.js → uom-field-wrapper-qe_kL90T.js} +2 -2
- package/dist/chunks/{uom-field-wrapper-BHmSiaXi.js.map → uom-field-wrapper-qe_kL90T.js.map} +1 -1
- package/dist/chunks/{upload-excel-Bg-8pqKr.esm.js → upload-excel-BgU9rR6Y.esm.js} +2 -2
- package/dist/chunks/{upload-excel-Bg-8pqKr.esm.js.map → upload-excel-BgU9rR6Y.esm.js.map} +1 -1
- package/dist/chunks/{upload-excel-De5rbiL8.js → upload-excel-Dr6K-CAH.js} +2 -2
- package/dist/chunks/{upload-excel-De5rbiL8.js.map → upload-excel-Dr6K-CAH.js.map} +1 -1
- package/dist/chunks/upload-media-BE0tktWj.js +522 -0
- package/dist/chunks/upload-media-BE0tktWj.js.map +1 -0
- package/dist/chunks/upload-media-OmufgJmq.esm.js +523 -0
- package/dist/chunks/upload-media-OmufgJmq.esm.js.map +1 -0
- package/dist/chunks/{use-translations-CKS4yvGw.js → use-translations-C1Ggg0W6.js} +2 -2
- package/dist/chunks/{use-translations-CKS4yvGw.js.map → use-translations-C1Ggg0W6.js.map} +1 -1
- package/dist/chunks/{use-translations-CwqmNNF8.esm.js → use-translations-lguGhn5S.esm.js} +2 -2
- package/dist/chunks/{use-translations-CwqmNNF8.esm.js.map → use-translations-lguGhn5S.esm.js.map} +1 -1
- package/dist/chunks/{useAccountSetting-CQKsZpDR.esm.js → useAccountSetting-DcGLpWby.esm.js} +2 -2
- package/dist/chunks/{useAccountSetting-CQKsZpDR.esm.js.map → useAccountSetting-DcGLpWby.esm.js.map} +1 -1
- package/dist/chunks/{useAccountSetting-De-p6HcN.js → useAccountSetting-ouGcJ20y.js} +2 -2
- package/dist/chunks/{useAccountSetting-De-p6HcN.js.map → useAccountSetting-ouGcJ20y.js.map} +1 -1
- package/dist/chunks/{useCheckSkuAndName-vsjrM5X-.js → useCheckSkuAndName-CYsOfbJv.js} +2 -2
- package/dist/chunks/{useCheckSkuAndName-vsjrM5X-.js.map → useCheckSkuAndName-CYsOfbJv.js.map} +1 -1
- package/dist/chunks/{useCheckSkuAndName-DzRLmhaW.esm.js → useCheckSkuAndName-Hd41btzY.esm.js} +2 -2
- package/dist/chunks/{useCheckSkuAndName-DzRLmhaW.esm.js.map → useCheckSkuAndName-Hd41btzY.esm.js.map} +1 -1
- package/dist/chunks/{useReduxIntegration-B5pZYr9t.js → useReduxIntegration-4ziMWLT9.js} +2 -2
- package/dist/chunks/{useReduxIntegration-B5pZYr9t.js.map → useReduxIntegration-4ziMWLT9.js.map} +1 -1
- package/dist/chunks/{useReduxIntegration-D5y8PRkW.esm.js → useReduxIntegration-BL_5V7QV.esm.js} +2 -2
- package/dist/chunks/{useReduxIntegration-D5y8PRkW.esm.js.map → useReduxIntegration-BL_5V7QV.esm.js.map} +1 -1
- package/dist/chunks/{useUniquenessCheck-Pm-163jN.esm.js → useUniquenessCheck-DmKGritZ.esm.js} +2 -2
- package/dist/chunks/{useUniquenessCheck-Pm-163jN.esm.js.map → useUniquenessCheck-DmKGritZ.esm.js.map} +1 -1
- package/dist/chunks/{useUniquenessCheck-DZ3mosj1.js → useUniquenessCheck-L2KUVT1S.js} +2 -2
- package/dist/chunks/{useUniquenessCheck-DZ3mosj1.js.map → useUniquenessCheck-L2KUVT1S.js.map} +1 -1
- package/dist/chunks/{useVendorAICompare-BeU9KXTT.esm.js → useVendorAICompare-Bw0EuWHc.esm.js} +2 -2
- package/dist/chunks/{useVendorAICompare-BeU9KXTT.esm.js.map → useVendorAICompare-Bw0EuWHc.esm.js.map} +1 -1
- package/dist/chunks/{useVendorAICompare-DhZckL5o.js → useVendorAICompare-DWlQ7-7s.js} +2 -2
- package/dist/chunks/{useVendorAICompare-DhZckL5o.js.map → useVendorAICompare-DWlQ7-7s.js.map} +1 -1
- package/dist/chunks/value-editor-DBBKG2TA.js +261 -0
- package/dist/chunks/value-editor-DBBKG2TA.js.map +1 -0
- package/dist/chunks/value-editor-DR1T0F4i.esm.js +262 -0
- package/dist/chunks/value-editor-DR1T0F4i.esm.js.map +1 -0
- package/dist/chunks/{vendor-ai-summary-C-_Tmn05.js → vendor-ai-summary-1wlm-nT1.js} +3 -3
- package/dist/chunks/{vendor-ai-summary-C-_Tmn05.js.map → vendor-ai-summary-1wlm-nT1.js.map} +1 -1
- package/dist/chunks/{vendor-ai-summary-VtIIS5e1.esm.js → vendor-ai-summary-YcXA_SEB.esm.js} +3 -3
- package/dist/chunks/{vendor-ai-summary-VtIIS5e1.esm.js.map → vendor-ai-summary-YcXA_SEB.esm.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/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/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/fields/index.esm.js +1 -0
- package/dist/components/filter/fields/index.esm.js.map +1 -1
- package/dist/components/filter/fields/index.js +1 -0
- package/dist/components/filter/fields/index.js.map +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 +5 -5
- package/dist/components/form-control/form-builder/form-builder-element/index.js +5 -5
- 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/media/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/media/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 +5 -5
- package/dist/components/form-control/form-builder/index.js +5 -5
- 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 +7 -7
- package/dist/components/form-control/index.js +7 -7
- 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 +38 -38
- package/dist/components/index.js +38 -38
- 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/schedule-report/utils/common/index.esm.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/upload-media/index.esm.js +1 -1
- package/dist/components/upload-media/index.js +1 -1
- package/dist/components/upload-media/upload-media/index.esm.js +1 -1
- package/dist/components/upload-media/upload-media/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 +68 -68
- package/dist/index.js +65 -65
- 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 +2 -2
- package/dist/runtime/index.esm.js.map +1 -1
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/src/components/filter/components/date-range-value.d.ts +14 -0
- package/dist/src/components/upload-media/image-cropper.d.ts +12 -0
- package/dist/src/components/upload-media/upload-media.d.ts +6 -0
- 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 +8 -8
- package/dist/utils/index.js +4 -4
- package/dist/utils/server/index.esm.js +2 -2
- 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 +14 -14
- 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 +8 -8
- 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/template-name-modal/index.esm.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
- package/dist/chunks/action-bar-B8EkHk4R.esm.js.map +0 -1
- package/dist/chunks/action-bar-B_EUV2Bt.js.map +0 -1
- package/dist/chunks/filter-D9Cx0Qtl.js.map +0 -1
- package/dist/chunks/filter-DnQLBnHo.esm.js.map +0 -1
- package/dist/chunks/media-BNHjErng.esm.js +0 -39
- package/dist/chunks/media-CDeMBdV7.js +0 -38
- package/dist/chunks/media-CDeMBdV7.js.map +0 -1
- package/dist/chunks/upload-media-Bhiob8pM.js +0 -262
- package/dist/chunks/upload-media-Bhiob8pM.js.map +0 -1
- package/dist/chunks/upload-media-u_D3Fe_j.esm.js +0 -263
- package/dist/chunks/upload-media-u_D3Fe_j.esm.js.map +0 -1
- package/dist/chunks/value-editor-CbiP4U-V.js +0 -135
- package/dist/chunks/value-editor-CbiP4U-V.js.map +0 -1
- package/dist/chunks/value-editor-K2ox4TX9.esm.js +0 -136
- package/dist/chunks/value-editor-K2ox4TX9.esm.js.map +0 -1
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { DialogTitle, DialogContent, Box, ToggleButtonGroup, ToggleButton, DialogActions, styled, IconButton } from "@mui/material";
|
|
3
|
+
import images from "../images/index.esm.js";
|
|
4
|
+
import { B as Button } from "./button-BtdpXmjA.esm.js";
|
|
5
|
+
import { T as Typography } from "./typography-CG_A0iOJ.esm.js";
|
|
6
|
+
import { C as Close } from "./close-RLA63UHs.esm.js";
|
|
7
|
+
import { D as Document } from "./document-Bmf8f-js.esm.js";
|
|
8
|
+
import { D as DocumentPreview } from "./document-preview-CVd96q6J.esm.js";
|
|
9
|
+
import { enqueueSnackbar } from "notistack";
|
|
10
|
+
import { useState, useRef, useEffect, memo, useMemo } from "react";
|
|
11
|
+
import { M as Modal } from "./modal-DCla9U60.esm.js";
|
|
12
|
+
const CROPPABLE_IMAGE_TYPES = ["image/jpeg", "image/png", "image/webp", "image/bmp"];
|
|
13
|
+
const STAGE_MAX_W = 520;
|
|
14
|
+
const STAGE_MAX_H = 360;
|
|
15
|
+
const MIN_SIZE = 24;
|
|
16
|
+
const MAX_OUTPUT_WIDTH = 1200;
|
|
17
|
+
const HANDLE = 12;
|
|
18
|
+
const ASPECT_OPTIONS = [
|
|
19
|
+
{ label: "Free", value: null },
|
|
20
|
+
{ label: "1:1", value: 1 },
|
|
21
|
+
{ label: "3:1", value: 3 },
|
|
22
|
+
{ label: "4:3", value: 4 / 3 },
|
|
23
|
+
{ label: "16:9", value: 16 / 9 }
|
|
24
|
+
];
|
|
25
|
+
const clamp = (v, min, max) => Math.min(max, Math.max(min, v));
|
|
26
|
+
const fitRect = (dw, dh, aspect, center) => {
|
|
27
|
+
let w = dw * 0.8;
|
|
28
|
+
let h = dh * 0.8;
|
|
29
|
+
if (aspect) {
|
|
30
|
+
if (w / h > aspect) w = h * aspect;
|
|
31
|
+
else h = w / aspect;
|
|
32
|
+
}
|
|
33
|
+
const cx = center ? clamp(center.x, w / 2, dw - w / 2) : dw / 2;
|
|
34
|
+
const cy = center ? clamp(center.y, h / 2, dh - h / 2) : dh / 2;
|
|
35
|
+
return { x: cx - w / 2, y: cy - h / 2, w, h };
|
|
36
|
+
};
|
|
37
|
+
const ImageCropper = ({ file, aspect: initialAspect, showAspectOptions = false, onCancel, onApply }) => {
|
|
38
|
+
var _a;
|
|
39
|
+
const [imageUrl, setImageUrl] = useState("");
|
|
40
|
+
const [natural, setNatural] = useState(null);
|
|
41
|
+
const [aspect, setAspect] = useState(initialAspect ?? null);
|
|
42
|
+
const [rect, setRect] = useState({ x: 0, y: 0, w: 0, h: 0 });
|
|
43
|
+
const [applying, setApplying] = useState(false);
|
|
44
|
+
const imgRef = useRef(null);
|
|
45
|
+
const stageRef = useRef(null);
|
|
46
|
+
const dragRef = useRef(null);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (!file) return;
|
|
49
|
+
const url = URL.createObjectURL(file);
|
|
50
|
+
setImageUrl(url);
|
|
51
|
+
setNatural(null);
|
|
52
|
+
setAspect(initialAspect ?? null);
|
|
53
|
+
return () => URL.revokeObjectURL(url);
|
|
54
|
+
}, [file, initialAspect]);
|
|
55
|
+
const k = natural ? Math.min(STAGE_MAX_W / natural.w, STAGE_MAX_H / natural.h, 1) : 1;
|
|
56
|
+
const dw = natural ? Math.round(natural.w * k) : 0;
|
|
57
|
+
const dh = natural ? Math.round(natural.h * k) : 0;
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
if (natural) setRect(fitRect(dw, dh, aspect));
|
|
60
|
+
}, [natural]);
|
|
61
|
+
const handleAspectChange = (_, value) => {
|
|
62
|
+
var _a2;
|
|
63
|
+
if (value === null) return;
|
|
64
|
+
const next = ((_a2 = ASPECT_OPTIONS.find((o) => o.label === value)) == null ? void 0 : _a2.value) ?? null;
|
|
65
|
+
setAspect(next);
|
|
66
|
+
setRect((r) => fitRect(dw, dh, next, { x: r.x + r.w / 2, y: r.y + r.h / 2 }));
|
|
67
|
+
};
|
|
68
|
+
const pointerPos = (e) => {
|
|
69
|
+
const box = stageRef.current.getBoundingClientRect();
|
|
70
|
+
return { x: clamp(e.clientX - box.left, 0, dw), y: clamp(e.clientY - box.top, 0, dh) };
|
|
71
|
+
};
|
|
72
|
+
const startMove = (e) => {
|
|
73
|
+
var _a2;
|
|
74
|
+
e.stopPropagation();
|
|
75
|
+
(_a2 = stageRef.current) == null ? void 0 : _a2.setPointerCapture(e.pointerId);
|
|
76
|
+
dragRef.current = { type: "move", startX: e.clientX, startY: e.clientY, rect };
|
|
77
|
+
};
|
|
78
|
+
const startResize = (corner) => (e) => {
|
|
79
|
+
var _a2;
|
|
80
|
+
e.stopPropagation();
|
|
81
|
+
(_a2 = stageRef.current) == null ? void 0 : _a2.setPointerCapture(e.pointerId);
|
|
82
|
+
dragRef.current = {
|
|
83
|
+
type: "resize",
|
|
84
|
+
corner,
|
|
85
|
+
ax: corner.includes("w") ? rect.x + rect.w : rect.x,
|
|
86
|
+
ay: corner.includes("n") ? rect.y + rect.h : rect.y
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
const handlePointerMove = (e) => {
|
|
90
|
+
const d = dragRef.current;
|
|
91
|
+
if (!d) return;
|
|
92
|
+
if (d.type === "move") {
|
|
93
|
+
setRect({
|
|
94
|
+
...d.rect,
|
|
95
|
+
x: clamp(d.rect.x + e.clientX - d.startX, 0, dw - d.rect.w),
|
|
96
|
+
y: clamp(d.rect.y + e.clientY - d.startY, 0, dh - d.rect.h)
|
|
97
|
+
});
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const p = pointerPos(e);
|
|
101
|
+
const dirX = d.corner.includes("e") ? 1 : -1;
|
|
102
|
+
const dirY = d.corner.includes("s") ? 1 : -1;
|
|
103
|
+
const availW = dirX === 1 ? dw - d.ax : d.ax;
|
|
104
|
+
const availH = dirY === 1 ? dh - d.ay : d.ay;
|
|
105
|
+
let w = Math.abs(p.x - d.ax);
|
|
106
|
+
let h = Math.abs(p.y - d.ay);
|
|
107
|
+
if (aspect) {
|
|
108
|
+
w = Math.min(Math.max(w, h * aspect), availW, availH * aspect);
|
|
109
|
+
w = Math.max(w, MIN_SIZE);
|
|
110
|
+
h = w / aspect;
|
|
111
|
+
} else {
|
|
112
|
+
w = clamp(w, MIN_SIZE, availW);
|
|
113
|
+
h = clamp(h, MIN_SIZE, availH);
|
|
114
|
+
}
|
|
115
|
+
setRect({ x: dirX === 1 ? d.ax : d.ax - w, y: dirY === 1 ? d.ay : d.ay - h, w, h });
|
|
116
|
+
};
|
|
117
|
+
const handlePointerUp = () => {
|
|
118
|
+
dragRef.current = null;
|
|
119
|
+
};
|
|
120
|
+
const handleApply = () => {
|
|
121
|
+
const img = imgRef.current;
|
|
122
|
+
if (!img || !natural || !file) return;
|
|
123
|
+
setApplying(true);
|
|
124
|
+
const srcX = rect.x / k;
|
|
125
|
+
const srcY = rect.y / k;
|
|
126
|
+
const srcW = rect.w / k;
|
|
127
|
+
const srcH = rect.h / k;
|
|
128
|
+
const outW = Math.max(1, Math.min(Math.round(srcW), MAX_OUTPUT_WIDTH));
|
|
129
|
+
const outH = Math.max(1, Math.round(outW * srcH / srcW));
|
|
130
|
+
const canvas = document.createElement("canvas");
|
|
131
|
+
canvas.width = outW;
|
|
132
|
+
canvas.height = outH;
|
|
133
|
+
const ctx = canvas.getContext("2d");
|
|
134
|
+
if (!ctx) {
|
|
135
|
+
setApplying(false);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
ctx.drawImage(img, srcX, srcY, srcW, srcH, 0, 0, outW, outH);
|
|
139
|
+
canvas.toBlob((blob) => {
|
|
140
|
+
setApplying(false);
|
|
141
|
+
if (!blob) return;
|
|
142
|
+
const baseName = file.name.replace(/\.[^.]+$/, "");
|
|
143
|
+
onApply(new File([blob], `${baseName}.png`, { type: "image/png" }));
|
|
144
|
+
}, "image/png");
|
|
145
|
+
};
|
|
146
|
+
const corners = [
|
|
147
|
+
{ corner: "nw", sx: { left: -HANDLE / 2, top: -HANDLE / 2 }, cursor: "nwse-resize" },
|
|
148
|
+
{ corner: "ne", sx: { right: -HANDLE / 2, top: -HANDLE / 2 }, cursor: "nesw-resize" },
|
|
149
|
+
{ corner: "sw", sx: { left: -HANDLE / 2, bottom: -HANDLE / 2 }, cursor: "nesw-resize" },
|
|
150
|
+
{ corner: "se", sx: { right: -HANDLE / 2, bottom: -HANDLE / 2 }, cursor: "nwse-resize" }
|
|
151
|
+
];
|
|
152
|
+
const selectedLabel = ((_a = ASPECT_OPTIONS.find((o) => o.value === aspect)) == null ? void 0 : _a.label) ?? null;
|
|
153
|
+
return /* @__PURE__ */ jsxs(Modal, { open: Boolean(file), onClose: onCancel, maxWidth: "sm", fullWidth: true, children: [
|
|
154
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: /* @__PURE__ */ jsx(Typography, { type: "s3", weight: "medium", color: "#000", children: "Crop Image" }) }),
|
|
155
|
+
/* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsxs(Box, { display: "flex", flexDirection: "column", alignItems: "center", gap: 2, children: [
|
|
156
|
+
showAspectOptions && /* @__PURE__ */ jsx(
|
|
157
|
+
ToggleButtonGroup,
|
|
158
|
+
{
|
|
159
|
+
exclusive: true,
|
|
160
|
+
size: "small",
|
|
161
|
+
value: selectedLabel,
|
|
162
|
+
onChange: handleAspectChange,
|
|
163
|
+
"aria-label": "aspect ratio",
|
|
164
|
+
children: ASPECT_OPTIONS.map((o) => /* @__PURE__ */ jsx(ToggleButton, { value: o.label, sx: { textTransform: "none", px: 1.5 }, children: o.label }, o.label))
|
|
165
|
+
}
|
|
166
|
+
),
|
|
167
|
+
/* @__PURE__ */ jsxs(
|
|
168
|
+
Box,
|
|
169
|
+
{
|
|
170
|
+
ref: stageRef,
|
|
171
|
+
onPointerMove: handlePointerMove,
|
|
172
|
+
onPointerUp: handlePointerUp,
|
|
173
|
+
onPointerCancel: handlePointerUp,
|
|
174
|
+
sx: {
|
|
175
|
+
position: "relative",
|
|
176
|
+
width: dw || "auto",
|
|
177
|
+
height: dh || "auto",
|
|
178
|
+
minWidth: dw ? void 0 : 200,
|
|
179
|
+
minHeight: dh ? void 0 : 120,
|
|
180
|
+
overflow: "hidden",
|
|
181
|
+
userSelect: "none",
|
|
182
|
+
touchAction: "none",
|
|
183
|
+
backgroundColor: "#f3f3f3"
|
|
184
|
+
},
|
|
185
|
+
children: [
|
|
186
|
+
imageUrl && /* @__PURE__ */ jsx(
|
|
187
|
+
"img",
|
|
188
|
+
{
|
|
189
|
+
ref: imgRef,
|
|
190
|
+
src: imageUrl,
|
|
191
|
+
alt: "crop",
|
|
192
|
+
draggable: false,
|
|
193
|
+
onLoad: (e) => setNatural({ w: e.currentTarget.naturalWidth, h: e.currentTarget.naturalHeight }),
|
|
194
|
+
style: { display: "block", width: dw || "auto", height: dh || "auto", maxWidth: "none" }
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
natural && /* @__PURE__ */ jsx(
|
|
198
|
+
Box,
|
|
199
|
+
{
|
|
200
|
+
onPointerDown: startMove,
|
|
201
|
+
sx: {
|
|
202
|
+
position: "absolute",
|
|
203
|
+
left: rect.x,
|
|
204
|
+
top: rect.y,
|
|
205
|
+
width: rect.w,
|
|
206
|
+
height: rect.h,
|
|
207
|
+
border: "2px solid #fff",
|
|
208
|
+
outline: "1px dashed",
|
|
209
|
+
outlineColor: "theme.primary.600",
|
|
210
|
+
boxShadow: "0 0 0 9999px rgba(0,0,0,0.5)",
|
|
211
|
+
cursor: "move",
|
|
212
|
+
boxSizing: "border-box"
|
|
213
|
+
},
|
|
214
|
+
children: corners.map(({ corner, sx, cursor }) => /* @__PURE__ */ jsx(
|
|
215
|
+
Box,
|
|
216
|
+
{
|
|
217
|
+
onPointerDown: startResize(corner),
|
|
218
|
+
sx: {
|
|
219
|
+
position: "absolute",
|
|
220
|
+
width: HANDLE,
|
|
221
|
+
height: HANDLE,
|
|
222
|
+
backgroundColor: "theme.primary.600",
|
|
223
|
+
border: "2px solid #fff",
|
|
224
|
+
borderRadius: "50%",
|
|
225
|
+
boxSizing: "border-box",
|
|
226
|
+
cursor,
|
|
227
|
+
...sx
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
corner
|
|
231
|
+
))
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
/* @__PURE__ */ jsx(Typography, { type: "s5", color: "theme.secondary.700", children: "Drag the box to move it, drag the corners to resize." })
|
|
238
|
+
] }) }),
|
|
239
|
+
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
240
|
+
/* @__PURE__ */ jsx(Button, { variant: "outlined", onClick: onCancel, sx: { "&&&": { color: "#000" } }, children: "Cancel" }),
|
|
241
|
+
/* @__PURE__ */ jsx(Button, { variant: "contained", onClick: handleApply, disabled: !natural || applying, children: "Crop & Apply" })
|
|
242
|
+
] })
|
|
243
|
+
] });
|
|
244
|
+
};
|
|
245
|
+
const UploadMedia = memo((props) => {
|
|
246
|
+
const {
|
|
247
|
+
type,
|
|
248
|
+
label,
|
|
249
|
+
disabled,
|
|
250
|
+
error,
|
|
251
|
+
dataName,
|
|
252
|
+
dataPosition,
|
|
253
|
+
required,
|
|
254
|
+
max_size = 20,
|
|
255
|
+
onChange,
|
|
256
|
+
name,
|
|
257
|
+
value,
|
|
258
|
+
multiple,
|
|
259
|
+
renderPreview,
|
|
260
|
+
crop,
|
|
261
|
+
cropAspect,
|
|
262
|
+
cropAspectOptions,
|
|
263
|
+
...rest
|
|
264
|
+
} = props;
|
|
265
|
+
const VisuallyHiddenInput = styled("input")({
|
|
266
|
+
clip: "rect(0 0 0 0)",
|
|
267
|
+
clipPath: "inset(50%)",
|
|
268
|
+
height: 1,
|
|
269
|
+
overflow: "hidden",
|
|
270
|
+
position: "absolute",
|
|
271
|
+
bottom: 0,
|
|
272
|
+
left: 0,
|
|
273
|
+
whiteSpace: "nowrap",
|
|
274
|
+
width: 1
|
|
275
|
+
});
|
|
276
|
+
const StyledButton = styled(Button)(({ theme: { palette } }) => {
|
|
277
|
+
var _a, _b, _c, _d;
|
|
278
|
+
return {
|
|
279
|
+
marginBottom: 8,
|
|
280
|
+
"&.MuiButton-outlined": {
|
|
281
|
+
color: (_a = palette.theme) == null ? void 0 : _a.primary[1e3]
|
|
282
|
+
},
|
|
283
|
+
"&.Mui-disabled": {
|
|
284
|
+
background: (_b = palette.theme) == null ? void 0 : _b.secondary[200],
|
|
285
|
+
color: (_c = palette.theme) == null ? void 0 : _c.secondary[800],
|
|
286
|
+
borderWidth: "0.0625rem",
|
|
287
|
+
borderStyle: "solid",
|
|
288
|
+
borderColor: (_d = palette.theme) == null ? void 0 : _d.secondary[400]
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
});
|
|
292
|
+
const allowedImageTypes = [
|
|
293
|
+
"image/jpeg",
|
|
294
|
+
// JPG, JPEG
|
|
295
|
+
"image/png",
|
|
296
|
+
// PNG
|
|
297
|
+
"image/gif",
|
|
298
|
+
// GIF
|
|
299
|
+
"image/bmp",
|
|
300
|
+
// BMP
|
|
301
|
+
"image/webp",
|
|
302
|
+
// WebP
|
|
303
|
+
"image/svg+xml",
|
|
304
|
+
// SVG
|
|
305
|
+
"image/tiff",
|
|
306
|
+
// TIFF
|
|
307
|
+
"image/x-icon",
|
|
308
|
+
// ICO (icon files)
|
|
309
|
+
"image/heic",
|
|
310
|
+
// HEIC (High Efficiency Image Format)
|
|
311
|
+
"image/heif"
|
|
312
|
+
];
|
|
313
|
+
const allowedFileTypes = [
|
|
314
|
+
"application/pdf",
|
|
315
|
+
"application/msword",
|
|
316
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
317
|
+
"application/vnd.ms-powerpoint",
|
|
318
|
+
"application/vnd.oasis.opendocument.text",
|
|
319
|
+
"text/csv",
|
|
320
|
+
"text/plain",
|
|
321
|
+
"application/rtf",
|
|
322
|
+
"application/vnd.ms-excel",
|
|
323
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
324
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
325
|
+
"application/vnd.oasis.opendocument.spreadsheet",
|
|
326
|
+
"application/vnd.oasis.opendocument.presentation",
|
|
327
|
+
"image/jpeg",
|
|
328
|
+
// JPG, JPEG
|
|
329
|
+
"image/png",
|
|
330
|
+
// PNG
|
|
331
|
+
"image/gif",
|
|
332
|
+
// GIF
|
|
333
|
+
"image/bmp",
|
|
334
|
+
// BMP
|
|
335
|
+
"image/webp",
|
|
336
|
+
// WebP
|
|
337
|
+
"image/svg+xml",
|
|
338
|
+
// SVG
|
|
339
|
+
"image/tiff",
|
|
340
|
+
// TIFF
|
|
341
|
+
"image/x-icon",
|
|
342
|
+
// ICO (icon files)
|
|
343
|
+
"image/heic",
|
|
344
|
+
// HEIC (High Efficiency Image Format)
|
|
345
|
+
"image/heif"
|
|
346
|
+
];
|
|
347
|
+
const isValidFileType = (file) => {
|
|
348
|
+
if (type === "image") {
|
|
349
|
+
return allowedImageTypes.includes(file.type);
|
|
350
|
+
} else if (type === "file") {
|
|
351
|
+
return allowedFileTypes.includes(file.type);
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
const [pendingCropFile, setPendingCropFile] = useState(null);
|
|
355
|
+
const handleUpload = (e) => {
|
|
356
|
+
var _a;
|
|
357
|
+
const files = [...e.target.files];
|
|
358
|
+
e.target.value = "";
|
|
359
|
+
const filterredFiles = (_a = files.map((file) => {
|
|
360
|
+
if (file && file.size <= max_size * 1024 * 1024) {
|
|
361
|
+
if (isValidFileType(file)) {
|
|
362
|
+
return file;
|
|
363
|
+
} else {
|
|
364
|
+
enqueueSnackbar(`Invalid file type for ${file.name}. Please upload a valid ${type === "image" ? "image" : "document"}.`, { variant: "error" });
|
|
365
|
+
return null;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
if (file) {
|
|
369
|
+
enqueueSnackbar(`${file.name} exceeds the maximum size of ${max_size}MB.`, { variant: "error" });
|
|
370
|
+
}
|
|
371
|
+
return null;
|
|
372
|
+
})) == null ? void 0 : _a.filter(Boolean);
|
|
373
|
+
if (crop && !multiple && filterredFiles[0] && CROPPABLE_IMAGE_TYPES.includes(filterredFiles[0].type)) {
|
|
374
|
+
setPendingCropFile(filterredFiles[0]);
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
onChange(multiple ? (value == null ? void 0 : value.length) ? [...value, ...filterredFiles] : filterredFiles : filterredFiles[0]);
|
|
378
|
+
};
|
|
379
|
+
const handleRemoveFile = (index) => {
|
|
380
|
+
if (Array.isArray(value)) {
|
|
381
|
+
onChange(value.filter((_, i) => i !== index));
|
|
382
|
+
} else {
|
|
383
|
+
onChange(null);
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
const getFileName = (file) => {
|
|
387
|
+
if (!file) return "";
|
|
388
|
+
if (file instanceof File) {
|
|
389
|
+
return file.name;
|
|
390
|
+
} else if (typeof file === "string") {
|
|
391
|
+
const parts = file == null ? void 0 : file.split("/");
|
|
392
|
+
return parts == null ? void 0 : parts[(parts == null ? void 0 : parts.length) - 1];
|
|
393
|
+
} else if (Array.isArray(file) && (file == null ? void 0 : file.length) > 0) {
|
|
394
|
+
return file.map((f) => {
|
|
395
|
+
const parts = f == null ? void 0 : f.split("/");
|
|
396
|
+
return parts == null ? void 0 : parts[(parts == null ? void 0 : parts.length) - 1];
|
|
397
|
+
}).join(", ");
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
const DefaultPreview = ({ file }) => {
|
|
401
|
+
const { fileUrl, fileName } = useMemo(() => {
|
|
402
|
+
var _a;
|
|
403
|
+
const isFile = ((_a = file == null ? void 0 : file.constructor) == null ? void 0 : _a.name) === "File" || Object.prototype.toString.call(file) === "[object File]";
|
|
404
|
+
return {
|
|
405
|
+
fileUrl: isFile ? URL.createObjectURL(file) : file,
|
|
406
|
+
fileName: isFile ? file.name : void 0
|
|
407
|
+
};
|
|
408
|
+
}, [file]);
|
|
409
|
+
useEffect(() => {
|
|
410
|
+
return () => {
|
|
411
|
+
if (fileUrl == null ? void 0 : fileUrl.startsWith("blob:")) {
|
|
412
|
+
URL.revokeObjectURL(fileUrl);
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
}, [fileUrl]);
|
|
416
|
+
return /* @__PURE__ */ jsx(DocumentPreview, { fileUrl, fileName });
|
|
417
|
+
};
|
|
418
|
+
const renderDefaultPreview = (file) => /* @__PURE__ */ jsx(DefaultPreview, { file });
|
|
419
|
+
const getSelectedFiles = (files) => {
|
|
420
|
+
if (files) {
|
|
421
|
+
if (Array.isArray(files)) {
|
|
422
|
+
return files.map((file, index) => /* @__PURE__ */ jsxs(Box, { display: "flex", gap: 1, mb: 1, alignItems: "center", children: [
|
|
423
|
+
type === "file" && /* @__PURE__ */ jsx(Document, { fontSize: "small" }),
|
|
424
|
+
/* @__PURE__ */ jsx(
|
|
425
|
+
Typography,
|
|
426
|
+
{
|
|
427
|
+
type: "s5",
|
|
428
|
+
weight: "medium",
|
|
429
|
+
color: error ? "theme.error.600" : "theme.secondary.800",
|
|
430
|
+
"data-position": dataPosition,
|
|
431
|
+
"data-name": dataName,
|
|
432
|
+
noWrap: true,
|
|
433
|
+
children: getFileName(file)
|
|
434
|
+
}
|
|
435
|
+
),
|
|
436
|
+
(renderPreview || renderDefaultPreview)(file),
|
|
437
|
+
/* @__PURE__ */ jsx(IconButton, { size: "small", onClick: () => handleRemoveFile(index), children: /* @__PURE__ */ jsx(Close, { fontSize: "small" }) })
|
|
438
|
+
] }, file instanceof File ? file.name : file));
|
|
439
|
+
}
|
|
440
|
+
return /* @__PURE__ */ jsxs(Box, { display: "flex", gap: 1, mb: 1, alignItems: "center", children: [
|
|
441
|
+
type === "file" && /* @__PURE__ */ jsx(Document, { fontSize: "small" }),
|
|
442
|
+
/* @__PURE__ */ jsx(
|
|
443
|
+
Typography,
|
|
444
|
+
{
|
|
445
|
+
type: "s5",
|
|
446
|
+
weight: "medium",
|
|
447
|
+
color: error ? "theme.error.600" : "theme.secondary.800",
|
|
448
|
+
"data-position": dataPosition,
|
|
449
|
+
"data-name": dataName,
|
|
450
|
+
noWrap: true,
|
|
451
|
+
children: getFileName(files)
|
|
452
|
+
}
|
|
453
|
+
),
|
|
454
|
+
(renderPreview || renderDefaultPreview)(files),
|
|
455
|
+
/* @__PURE__ */ jsx(IconButton, { size: "small", onClick: () => handleRemoveFile(0), children: /* @__PURE__ */ jsx(Close, { fontSize: "small" }) })
|
|
456
|
+
] });
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
460
|
+
/* @__PURE__ */ jsxs(
|
|
461
|
+
Typography,
|
|
462
|
+
{
|
|
463
|
+
type: "s5",
|
|
464
|
+
weight: "medium",
|
|
465
|
+
mb: 0.5,
|
|
466
|
+
color: error ? "theme.error.600" : "theme.secondary.800",
|
|
467
|
+
"data-position": dataPosition,
|
|
468
|
+
"data-name": dataName,
|
|
469
|
+
children: [
|
|
470
|
+
label,
|
|
471
|
+
" ",
|
|
472
|
+
required && " *"
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
),
|
|
476
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex" }, children: /* @__PURE__ */ jsxs(
|
|
477
|
+
StyledButton,
|
|
478
|
+
{
|
|
479
|
+
component: "label",
|
|
480
|
+
startIcon: /* @__PURE__ */ jsx(
|
|
481
|
+
"img",
|
|
482
|
+
{
|
|
483
|
+
src: type === "image" ? images.uploadImage : images.uploadDocument
|
|
484
|
+
}
|
|
485
|
+
),
|
|
486
|
+
variant: "outlined",
|
|
487
|
+
disabled,
|
|
488
|
+
children: [
|
|
489
|
+
/* @__PURE__ */ jsx(Typography, { type: "s5", weight: "medium", color: "theme.secondary.1000", children: "Upload" }),
|
|
490
|
+
/* @__PURE__ */ jsx(
|
|
491
|
+
VisuallyHiddenInput,
|
|
492
|
+
{
|
|
493
|
+
type: "file",
|
|
494
|
+
accept: type === "file" ? allowedFileTypes.join(",") : type === "image" ? allowedImageTypes.join(",") : void 0,
|
|
495
|
+
onChange: handleUpload,
|
|
496
|
+
name,
|
|
497
|
+
multiple,
|
|
498
|
+
...rest
|
|
499
|
+
}
|
|
500
|
+
)
|
|
501
|
+
]
|
|
502
|
+
}
|
|
503
|
+
) }),
|
|
504
|
+
getSelectedFiles(value),
|
|
505
|
+
crop && /* @__PURE__ */ jsx(
|
|
506
|
+
ImageCropper,
|
|
507
|
+
{
|
|
508
|
+
file: pendingCropFile,
|
|
509
|
+
aspect: cropAspect,
|
|
510
|
+
showAspectOptions: Boolean(cropAspectOptions),
|
|
511
|
+
onCancel: () => setPendingCropFile(null),
|
|
512
|
+
onApply: (cropped) => {
|
|
513
|
+
setPendingCropFile(null);
|
|
514
|
+
onChange(cropped);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
)
|
|
518
|
+
] });
|
|
519
|
+
});
|
|
520
|
+
export {
|
|
521
|
+
UploadMedia as U
|
|
522
|
+
};
|
|
523
|
+
//# sourceMappingURL=upload-media-OmufgJmq.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-media-OmufgJmq.esm.js","sources":["../../src/components/upload-media/image-cropper.tsx","../../src/components/upload-media/upload-media.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\nimport { Box, DialogActions, DialogContent, DialogTitle, ToggleButton, ToggleButtonGroup } from \"@mui/material\";\nimport Modal from \"../modal/modal\";\nimport Button from \"../button/button\";\nimport Typography from \"../typography/typography\";\n\n// Formats the browser can decode onto a canvas. Anything else skips cropping.\nexport const CROPPABLE_IMAGE_TYPES = [\"image/jpeg\", \"image/png\", \"image/webp\", \"image/bmp\"];\n\nconst STAGE_MAX_W = 520;\nconst STAGE_MAX_H = 360;\nconst MIN_SIZE = 24;\nconst MAX_OUTPUT_WIDTH = 1200;\nconst HANDLE = 12;\n\nconst ASPECT_OPTIONS: { label: string; value: number | null }[] = [\n { label: \"Free\", value: null },\n { label: \"1:1\", value: 1 },\n { label: \"3:1\", value: 3 },\n { label: \"4:3\", value: 4 / 3 },\n { label: \"16:9\", value: 16 / 9 },\n];\n\ntype Rect = { x: number; y: number; w: number; h: number };\ntype Corner = \"nw\" | \"ne\" | \"sw\" | \"se\";\ntype Drag =\n | { type: \"move\"; startX: number; startY: number; rect: Rect }\n | { type: \"resize\"; corner: Corner; ax: number; ay: number };\n\nconst clamp = (v: number, min: number, max: number) => Math.min(max, Math.max(min, v));\n\n/** Largest centered rect with the given aspect inside the stage, ~80% of it. */\nconst fitRect = (dw: number, dh: number, aspect: number | null, center?: { x: number; y: number }): Rect => {\n let w = dw * 0.8;\n let h = dh * 0.8;\n if (aspect) {\n if (w / h > aspect) w = h * aspect;\n else h = w / aspect;\n }\n const cx = center ? clamp(center.x, w / 2, dw - w / 2) : dw / 2;\n const cy = center ? clamp(center.y, h / 2, dh - h / 2) : dh / 2;\n return { x: cx - w / 2, y: cy - h / 2, w, h };\n};\n\ninterface ImageCropperProps {\n file: File | null;\n /** initial width / height of the crop area; omit for free-form */\n aspect?: number;\n onCancel: () => void;\n /** show the aspect ratio presets (hidden by default; crop is free-form) */\n showAspectOptions?: boolean;\n onApply: (file: File) => void;\n}\n\nconst ImageCropper = ({ file, aspect: initialAspect, showAspectOptions = false, onCancel, onApply }: ImageCropperProps) => {\n const [imageUrl, setImageUrl] = useState(\"\");\n const [natural, setNatural] = useState<{ w: number; h: number } | null>(null);\n const [aspect, setAspect] = useState<number | null>(initialAspect ?? null);\n const [rect, setRect] = useState<Rect>({ x: 0, y: 0, w: 0, h: 0 });\n const [applying, setApplying] = useState(false);\n const imgRef = useRef<HTMLImageElement>(null);\n const stageRef = useRef<HTMLDivElement>(null);\n const dragRef = useRef<Drag | null>(null);\n\n useEffect(() => {\n if (!file) return;\n const url = URL.createObjectURL(file);\n setImageUrl(url);\n setNatural(null);\n setAspect(initialAspect ?? null);\n return () => URL.revokeObjectURL(url);\n }, [file, initialAspect]);\n\n // Displayed size: image fitted inside the stage\n const k = natural ? Math.min(STAGE_MAX_W / natural.w, STAGE_MAX_H / natural.h, 1) : 1;\n const dw = natural ? Math.round(natural.w * k) : 0;\n const dh = natural ? Math.round(natural.h * k) : 0;\n\n useEffect(() => {\n if (natural) setRect(fitRect(dw, dh, aspect));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [natural]);\n\n const handleAspectChange = (_: unknown, value: string | null) => {\n if (value === null) return;\n const next = ASPECT_OPTIONS.find((o) => o.label === value)?.value ?? null;\n setAspect(next);\n setRect((r) => fitRect(dw, dh, next, { x: r.x + r.w / 2, y: r.y + r.h / 2 }));\n };\n\n const pointerPos = (e: React.PointerEvent) => {\n const box = stageRef.current!.getBoundingClientRect();\n return { x: clamp(e.clientX - box.left, 0, dw), y: clamp(e.clientY - box.top, 0, dh) };\n };\n\n const startMove = (e: React.PointerEvent) => {\n e.stopPropagation();\n stageRef.current?.setPointerCapture(e.pointerId);\n dragRef.current = { type: \"move\", startX: e.clientX, startY: e.clientY, rect };\n };\n\n const startResize = (corner: Corner) => (e: React.PointerEvent) => {\n e.stopPropagation();\n stageRef.current?.setPointerCapture(e.pointerId);\n // the opposite corner stays fixed\n dragRef.current = {\n type: \"resize\",\n corner,\n ax: corner.includes(\"w\") ? rect.x + rect.w : rect.x,\n ay: corner.includes(\"n\") ? rect.y + rect.h : rect.y,\n };\n };\n\n const handlePointerMove = (e: React.PointerEvent) => {\n const d = dragRef.current;\n if (!d) return;\n\n if (d.type === \"move\") {\n setRect({\n ...d.rect,\n x: clamp(d.rect.x + e.clientX - d.startX, 0, dw - d.rect.w),\n y: clamp(d.rect.y + e.clientY - d.startY, 0, dh - d.rect.h),\n });\n return;\n }\n\n const p = pointerPos(e);\n const dirX = d.corner.includes(\"e\") ? 1 : -1;\n const dirY = d.corner.includes(\"s\") ? 1 : -1;\n const availW = dirX === 1 ? dw - d.ax : d.ax;\n const availH = dirY === 1 ? dh - d.ay : d.ay;\n\n let w = Math.abs(p.x - d.ax);\n let h = Math.abs(p.y - d.ay);\n if (aspect) {\n w = Math.min(Math.max(w, h * aspect), availW, availH * aspect);\n w = Math.max(w, MIN_SIZE);\n h = w / aspect;\n } else {\n w = clamp(w, MIN_SIZE, availW);\n h = clamp(h, MIN_SIZE, availH);\n }\n setRect({ x: dirX === 1 ? d.ax : d.ax - w, y: dirY === 1 ? d.ay : d.ay - h, w, h });\n };\n\n const handlePointerUp = () => {\n dragRef.current = null;\n };\n\n const handleApply = () => {\n const img = imgRef.current;\n if (!img || !natural || !file) return;\n setApplying(true);\n\n const srcX = rect.x / k;\n const srcY = rect.y / k;\n const srcW = rect.w / k;\n const srcH = rect.h / k;\n const outW = Math.max(1, Math.min(Math.round(srcW), MAX_OUTPUT_WIDTH));\n const outH = Math.max(1, Math.round((outW * srcH) / srcW));\n\n const canvas = document.createElement(\"canvas\");\n canvas.width = outW;\n canvas.height = outH;\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) {\n setApplying(false);\n return;\n }\n ctx.drawImage(img, srcX, srcY, srcW, srcH, 0, 0, outW, outH);\n\n canvas.toBlob((blob) => {\n setApplying(false);\n if (!blob) return;\n const baseName = file.name.replace(/\\.[^.]+$/, \"\");\n onApply(new File([blob], `${baseName}.png`, { type: \"image/png\" }));\n }, \"image/png\");\n };\n\n const corners: { corner: Corner; sx: object; cursor: string }[] = [\n { corner: \"nw\", sx: { left: -HANDLE / 2, top: -HANDLE / 2 }, cursor: \"nwse-resize\" },\n { corner: \"ne\", sx: { right: -HANDLE / 2, top: -HANDLE / 2 }, cursor: \"nesw-resize\" },\n { corner: \"sw\", sx: { left: -HANDLE / 2, bottom: -HANDLE / 2 }, cursor: \"nesw-resize\" },\n { corner: \"se\", sx: { right: -HANDLE / 2, bottom: -HANDLE / 2 }, cursor: \"nwse-resize\" },\n ];\n\n const selectedLabel = ASPECT_OPTIONS.find((o) => o.value === aspect)?.label ?? null;\n\n return (\n <Modal open={Boolean(file)} onClose={onCancel} maxWidth=\"sm\" fullWidth>\n <DialogTitle>\n <Typography type=\"s3\" weight=\"medium\" color=\"#000\">Crop Image</Typography>\n </DialogTitle>\n <DialogContent>\n <Box display=\"flex\" flexDirection=\"column\" alignItems=\"center\" gap={2}>\n {showAspectOptions && (\n <ToggleButtonGroup\n exclusive\n size=\"small\"\n value={selectedLabel}\n onChange={handleAspectChange}\n aria-label=\"aspect ratio\"\n >\n {ASPECT_OPTIONS.map((o) => (\n <ToggleButton key={o.label} value={o.label} sx={{ textTransform: \"none\", px: 1.5 }}>\n {o.label}\n </ToggleButton>\n ))}\n </ToggleButtonGroup>\n )}\n\n <Box\n ref={stageRef}\n onPointerMove={handlePointerMove}\n onPointerUp={handlePointerUp}\n onPointerCancel={handlePointerUp}\n sx={{\n position: \"relative\",\n width: dw || \"auto\",\n height: dh || \"auto\",\n minWidth: dw ? undefined : 200,\n minHeight: dh ? undefined : 120,\n overflow: \"hidden\",\n userSelect: \"none\",\n touchAction: \"none\",\n backgroundColor: \"#f3f3f3\",\n }}\n >\n {imageUrl && (\n <img\n ref={imgRef}\n src={imageUrl}\n alt=\"crop\"\n draggable={false}\n onLoad={(e) => setNatural({ w: e.currentTarget.naturalWidth, h: e.currentTarget.naturalHeight })}\n style={{ display: \"block\", width: dw || \"auto\", height: dh || \"auto\", maxWidth: \"none\" }}\n />\n )}\n {natural && (\n <Box\n onPointerDown={startMove}\n sx={{\n position: \"absolute\",\n left: rect.x,\n top: rect.y,\n width: rect.w,\n height: rect.h,\n border: \"2px solid #fff\",\n outline: \"1px dashed\",\n outlineColor: \"theme.primary.600\",\n boxShadow: \"0 0 0 9999px rgba(0,0,0,0.5)\",\n cursor: \"move\",\n boxSizing: \"border-box\",\n }}\n >\n {corners.map(({ corner, sx, cursor }) => (\n <Box\n key={corner}\n onPointerDown={startResize(corner)}\n sx={{\n position: \"absolute\",\n width: HANDLE,\n height: HANDLE,\n backgroundColor: \"theme.primary.600\",\n border: \"2px solid #fff\",\n borderRadius: \"50%\",\n boxSizing: \"border-box\",\n cursor,\n ...sx,\n }}\n />\n ))}\n </Box>\n )}\n </Box>\n <Typography type=\"s5\" color=\"theme.secondary.700\">\n Drag the box to move it, drag the corners to resize.\n </Typography>\n </Box>\n </DialogContent>\n <DialogActions>\n <Button variant=\"outlined\" onClick={onCancel} sx={{ \"&&&\": { color: \"#000\" } }}>Cancel</Button>\n <Button variant=\"contained\" onClick={handleApply} disabled={!natural || applying}>\n Crop & Apply\n </Button>\n </DialogActions>\n </Modal>\n );\n};\n\nexport default ImageCropper;\n","import { Box, styled, IconButton } from \"@mui/material\";\nimport logo from \"../../assets/images\";\nimport Button from \"../button/button\";\nimport Typography from \"../typography/typography\";\n// import { useEffect, useState } from \"react\";\nimport { Document, Close } from \"../icons\";\nimport DocumentPreview from \"../document-preview/document-preview\";\nimport { enqueueSnackbar } from \"notistack\";\nimport { memo, useMemo, useEffect, useState } from \"react\";\nimport ImageCropper, { CROPPABLE_IMAGE_TYPES } from \"./image-cropper\";\n// import Avatar from \"../avatar/avatar\";\n\nexport interface UploadImageProps {\n type?: string;\n label: string;\n disabled?: boolean;\n error?: boolean;\n dataPosition?: number;\n dataName?: string;\n required?: boolean;\n max_size?: number;\n name: string;\n value: string;\n onChange: (e: any) => any;\n multiple: boolean;\n renderPreview?: (file: any) => React.ReactNode;\n /** Open a crop dialog after a single image is chosen */\n crop?: boolean;\n /** initial width / height of the crop box (default: free-form) */\n cropAspect?: number;\n /** show aspect ratio presets in the crop dialog (default: hidden, free-form) */\n cropAspectOptions?: boolean;\n}\nconst UploadMedia = memo((props: UploadImageProps) => {\n const {\n type,\n label,\n disabled,\n error,\n dataName,\n dataPosition,\n required,\n max_size = 20,\n onChange,\n name,\n value,\n multiple,\n renderPreview,\n crop,\n cropAspect,\n cropAspectOptions,\n ...rest\n } = props;\n\n const VisuallyHiddenInput = styled(\"input\")({\n clip: \"rect(0 0 0 0)\",\n clipPath: \"inset(50%)\",\n height: 1,\n overflow: \"hidden\",\n position: \"absolute\",\n bottom: 0,\n left: 0,\n whiteSpace: \"nowrap\",\n width: 1,\n });\n\n // const [selectedFile, setSelectedFile] = useState<string | null>(null);\n const StyledButton = styled(Button)(({ theme: { palette } }) => ({\n marginBottom: 8,\n \"&.MuiButton-outlined\": {\n color: palette.theme?.primary[1000],\n },\n \"&.Mui-disabled\": {\n background: palette.theme?.secondary[200],\n color: palette.theme?.secondary[800],\n borderWidth: \"0.0625rem\",\n borderStyle: \"solid\",\n borderColor: palette.theme?.secondary[400],\n },\n }));\n\n const allowedImageTypes = [\n \"image/jpeg\", // JPG, JPEG\n \"image/png\", // PNG\n \"image/gif\", // GIF\n \"image/bmp\", // BMP\n \"image/webp\", // WebP\n \"image/svg+xml\", // SVG\n \"image/tiff\", // TIFF\n \"image/x-icon\", // ICO (icon files)\n \"image/heic\", // HEIC (High Efficiency Image Format)\n \"image/heif\"\n ]\n const allowedFileTypes = [\n \"application/pdf\",\n \"application/msword\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n 'application/vnd.ms-powerpoint',\n 'application/vnd.oasis.opendocument.text',\n 'text/csv',\n 'text/plain',\n 'application/rtf',\n 'application/vnd.ms-excel',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'application/vnd.oasis.opendocument.spreadsheet',\n 'application/vnd.oasis.opendocument.presentation',\n \"image/jpeg\", // JPG, JPEG\n \"image/png\", // PNG\n \"image/gif\", // GIF\n \"image/bmp\", // BMP\n \"image/webp\", // WebP\n \"image/svg+xml\", // SVG\n \"image/tiff\", // TIFF\n \"image/x-icon\", // ICO (icon files)\n \"image/heic\", // HEIC (High Efficiency Image Format)\n \"image/heif\"\n ];\n\n const isValidFileType = (file: any) => {\n if (type === \"image\") {\n return allowedImageTypes.includes(file.type);\n } else if (type === 'file') {\n return allowedFileTypes.includes(file.type);\n }\n };\n\n\n const [pendingCropFile, setPendingCropFile] = useState<File | null>(null);\n\n const handleUpload = (e: any) => {\n const files = [...e.target.files];\n // allow re-selecting the same file (e.g. after cancelling the crop dialog)\n e.target.value = \"\";\n const filterredFiles = files.map(file => {\n if (file && file.size <= max_size * 1024 * 1024) {\n if (isValidFileType(file)) {\n return file\n } else {\n enqueueSnackbar(`Invalid file type for ${file.name}. Please upload a valid ${type === 'image' ? 'image' : 'document'}.`, { variant: 'error' })\n return null\n }\n }\n if (file) {\n enqueueSnackbar(`${file.name} exceeds the maximum size of ${max_size}MB.`, { variant: 'error' })\n }\n return null\n })?.filter(Boolean)\n if (crop && !multiple && filterredFiles[0] && CROPPABLE_IMAGE_TYPES.includes(filterredFiles[0].type)) {\n setPendingCropFile(filterredFiles[0]);\n return;\n }\n onChange(multiple ? (value?.length ? [...value, ...filterredFiles] : filterredFiles) : filterredFiles[0]);\n };\n\n const handleRemoveFile = (index: number) => {\n if (Array.isArray(value)) {\n onChange(value.filter((_: any, i: number) => i !== index));\n } else {\n onChange(null);\n }\n };\n\n const getFileName = (file) => {\n if (!file) return \"\"\n if (file instanceof File) {\n return file.name\n } else if(typeof file === 'string') { \n const parts = file?.split('/');\n return parts?.[parts?.length - 1];\n } else if(Array.isArray(file) && file?.length > 0) {\n return file.map(f => {\n const parts = f?.split('/');\n return parts?.[parts?.length - 1];\n }).join(', ')\n }\n }\n // const getImagePreview = (file) => {\n // if (!file) return \"\"\n // if (file instanceof File) {\n // let previewUrl:any = ''\n // const reader = new FileReader();\n // reader.onload = () => {\n // previewUrl = reader.result;\n // };\n // reader.readAsDataURL(file);\n\n // return previewUrl\n // } else {\n // return file.includes(S3_BUCKET_URL) ? file : S3_BUCKET_URL + file\n // }\n // }\n\n const DefaultPreview = ({ file }: { file: any }) => {\n const { fileUrl, fileName } = useMemo(() => {\n const isFile = file?.constructor?.name === 'File' || Object.prototype.toString.call(file) === '[object File]';\n return {\n fileUrl: isFile ? URL.createObjectURL(file) : file,\n fileName: isFile ? file.name : undefined,\n };\n }, [file]);\n\n useEffect(() => {\n return () => {\n if (fileUrl?.startsWith('blob:')) {\n URL.revokeObjectURL(fileUrl);\n }\n };\n }, [fileUrl]);\n\n return <DocumentPreview fileUrl={fileUrl} fileName={fileName} />;\n };\n\n const renderDefaultPreview = (file: any) => <DefaultPreview file={file} />;\n\n const getSelectedFiles = (files: any) => {\n\n if (files) {\n if (Array.isArray(files)) {\n return files.map((file, index) => (\n <Box key={file instanceof File ? file.name : file} display=\"flex\" gap={1} mb={1} alignItems='center'>\n {type === 'file' && <Document fontSize=\"small\" />}\n <Typography\n type=\"s5\"\n weight=\"medium\"\n color={error ? \"theme.error.600\" : \"theme.secondary.800\"}\n data-position={dataPosition}\n data-name={dataName}\n noWrap\n >\n {getFileName(file)}\n </Typography>\n {(renderPreview || renderDefaultPreview)(file)}\n <IconButton size='small' onClick={() => handleRemoveFile(index)}>\n <Close fontSize='small' />\n </IconButton>\n </Box>\n ));\n }\n return (\n <Box display=\"flex\" gap={1} mb={1} alignItems='center'>\n {type === 'file' && <Document fontSize=\"small\" />}\n <Typography\n type=\"s5\"\n weight=\"medium\"\n color={error ? \"theme.error.600\" : \"theme.secondary.800\"}\n data-position={dataPosition}\n data-name={dataName}\n noWrap\n >\n {getFileName(files)}\n </Typography>\n {(renderPreview || renderDefaultPreview)(files)}\n <IconButton size='small' onClick={() => handleRemoveFile(0)}>\n <Close fontSize='small' />\n </IconButton>\n </Box>\n );\n }\n }\n\n // useEffect(() => {\n // if(!multiple) {\n // const parts = value?.split('/');\n // // const documentPath = parts?.slice(3, parts.length - 1).join('/');\n // const filename = parts?.[parts?.length - 1];\n\n \n // if (value) setSelectedFile(filename)\n // }\n // }, [multiple, value])\n\n return (\n <>\n <Typography\n type=\"s5\"\n weight={\"medium\"}\n mb={0.5}\n color={error ? \"theme.error.600\" : \"theme.secondary.800\"}\n data-position={dataPosition}\n data-name={dataName}\n >\n {label} {required && \" *\"}\n </Typography>\n <div style={{ display: \"flex\" }}>\n <StyledButton\n component=\"label\"\n startIcon={\n <img\n src={type === \"image\" ? logo.uploadImage : logo.uploadDocument}\n />\n }\n variant=\"outlined\"\n disabled={disabled}\n >\n <Typography type='s5' weight=\"medium\" color=\"theme.secondary.1000\">Upload</Typography>\n <VisuallyHiddenInput\n type=\"file\"\n accept={type === \"file\" ? allowedFileTypes.join(\",\") : (type === 'image' ? allowedImageTypes.join(\",\") : undefined)}\n // required={required}\n onChange={handleUpload}\n name={name}\n multiple={multiple}\n {...rest}\n />\n </StyledButton>\n </div >\n {getSelectedFiles(value)}\n {crop && (\n <ImageCropper\n file={pendingCropFile}\n aspect={cropAspect}\n showAspectOptions={Boolean(cropAspectOptions)}\n onCancel={() => setPendingCropFile(null)}\n onApply={(cropped) => {\n setPendingCropFile(null);\n onChange(cropped);\n }}\n />\n )}\n </>\n );\n})\n\nexport { UploadMedia };\nexport default UploadMedia;\n"],"names":["_a","logo"],"mappings":";;;;;;;;;;;AAOO,MAAM,wBAAwB,CAAC,cAAc,aAAa,cAAc,WAAW;AAE1F,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,WAAW;AACjB,MAAM,mBAAmB;AACzB,MAAM,SAAS;AAEf,MAAM,iBAA4D;AAAA,EAChE,EAAE,OAAO,QAAQ,OAAO,KAAA;AAAA,EACxB,EAAE,OAAO,OAAO,OAAO,EAAA;AAAA,EACvB,EAAE,OAAO,OAAO,OAAO,EAAA;AAAA,EACvB,EAAE,OAAO,OAAO,OAAO,IAAI,EAAA;AAAA,EAC3B,EAAE,OAAO,QAAQ,OAAO,KAAK,EAAA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;AAAA,MAAA;AAAA,IAAA,GAEJ;AAAA,IACC,iBAAiB,KAAK;AAAA,IACtB,QACC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,mBAAmB,QAAQ,iBAAiB;AAAA,QAC5C,UAAU,MAAM,mBAAmB,IAAI;AAAA,QACvC,SAAS,CAAC,YAAY;AACpB,6BAAmB,IAAI;AACvB,mBAAS,OAAO;AAAA,QAClB;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GAEJ;AAEJ,CAAC;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const React = require("react");
|
|
3
3
|
const reactI18next = require("react-i18next");
|
|
4
|
-
const translations = require("./translations-
|
|
4
|
+
const translations = require("./translations-BHuYJsWp.js");
|
|
5
5
|
const modules = require("./modules-maXT99-4.js");
|
|
6
6
|
const runtime = require("@erpsquad/common/runtime");
|
|
7
7
|
const pathname = require("./pathname-7-q_H5dJ.js");
|
|
@@ -58,4 +58,4 @@ const useAppTranslations = () => {
|
|
|
58
58
|
return { isLoading };
|
|
59
59
|
};
|
|
60
60
|
exports.useAppTranslations = useAppTranslations;
|
|
61
|
-
//# sourceMappingURL=use-translations-
|
|
61
|
+
//# sourceMappingURL=use-translations-C1Ggg0W6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-translations-
|
|
1
|
+
{"version":3,"file":"use-translations-C1Ggg0W6.js","sources":["../../src/hooks/use-translations.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n// import { useLocation } from 'react-router-dom'\nimport { getI18n, useTranslation } from 'react-i18next'\nimport { loadModuleTranslations } from '../utils/translations'\nimport modules from '../constants/modules'\nimport { useAuth } from '@erpsquad/common/runtime'\nimport { Pathname } from '../constants'\n\n// Global state to prevent duplicate calls across all hook instances\nlet globalLastLoadedModules = ''\nlet globalIsLoading = false\nlet globalInitialLoad = false\n\nexport const useAppTranslations = () => {\n\tconst [isLoading, setIsLoading] = useState(globalInitialLoad)\n\tconst location = window.location\n\tconst i18nInstance = getI18n()\n\tconst { user, loading } = useAuth()\n\tconst { t } = useTranslation()\n\n\tuseEffect(() => {\n\t\tconst erpModules = modules(t)\n\t\tconst currentPath = location.pathname.toLowerCase()\n\t\tif(user?.id && !loading) {\n\t\n\t\t\tconst matchedModule = erpModules.find(\n\t\t\t\t(mod) =>\n\t\t\t\t\tmod.link.toLowerCase() === currentPath ||\n\t\t\t\t\tmod.connectedRoutes?.some((route: string) => currentPath.startsWith(route.toLowerCase()))\n\t\t\t)\n\t\n\t\t\tlet modulesToLoad: string[] = []\n\t\n\t\t\tif (matchedModule?.translationModule) {\n\t\t\t\tmodulesToLoad = [...matchedModule.translationModule, 'common']\n\t\t\t} else if (!matchedModule && (currentPath === Pathname.DASHBOARD || currentPath === Pathname.LANDING_PAGE)) {\n\t\t\t\tmodulesToLoad = ['common']\n\t\t\t}\n\t\n\t\t\tif (modulesToLoad.length > 0) {\n\t\t\t\tconst moduleKey = [...modulesToLoad].sort().join(',')\n\t\n\t\t\t\t// Skip if same modules are already loaded or currently loading\n\t\t\t\tif (globalLastLoadedModules === moduleKey || globalIsLoading) {\n\t\t\t\t\tif (globalInitialLoad) {\n\t\t\t\t\t\tsetIsLoading(false)\n\t\t\t\t\t\tglobalInitialLoad = false\n\t\t\t\t\t}\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\n\t\t\t\tglobalIsLoading = true\n\t\t\t\tglobalLastLoadedModules = moduleKey\n\t\t\t\tsetIsLoading(true)\n\t\n\t\t\t\tloadModuleTranslations(modulesToLoad, i18nInstance).finally(() => {\n\t\t\t\t\tglobalIsLoading = false\n\t\t\t\t\tsetIsLoading(false)\n\t\t\t\t\tglobalInitialLoad = false\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\t// No modules to load, but still need to handle initial load state\n\t\t\t\tif (globalInitialLoad) {\n\t\t\t\t\tsetIsLoading(false)\n\t\t\t\t\tglobalInitialLoad = false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [location.pathname, t, user, loading])\n\n\treturn { isLoading }\n};\n\nexport default useAppTranslations;\nexport { useTranslation } from 'react-i18next';\n"],"names":["useState","getI18n","useAuth","useTranslation","useEffect","modules","Pathname","loadModuleTranslations"],"mappings":";;;;;;;AASA,IAAI,0BAA0B;AAC9B,IAAI,kBAAkB;AACtB,IAAI,oBAAoB;AAEjB,MAAM,qBAAqB,MAAM;AACvC,QAAM,CAAC,WAAW,YAAY,IAAIA,MAAAA,SAAS,iBAAiB;AAC5D,QAAM,WAAW,OAAO;AACxB,QAAM,eAAeC,aAAAA,QAAA;AACrB,QAAM,EAAE,MAAM,QAAA,IAAYC,gBAAA;AAC1B,QAAM,EAAE,EAAA,IAAMC,4BAAA;AAEdC,QAAAA,UAAU,MAAM;AACf,UAAM,aAAaC,QAAAA,QAAQ,CAAC;AAC5B,UAAM,cAAc,SAAS,SAAS,YAAA;AACtC,SAAG,6BAAM,OAAM,CAAC,SAAS;AAExB,YAAM,gBAAgB,WAAW;AAAA,QAChC,CAAC,QAAA;;AACA,qBAAI,KAAK,YAAA,MAAkB,iBAC3B,SAAI,oBAAJ,mBAAqB,KAAK,CAAC,UAAkB,YAAY,WAAW,MAAM,aAAa;AAAA;AAAA,MAAC;AAG1F,UAAI,gBAA0B,CAAA;AAE9B,UAAI,+CAAe,mBAAmB;AACrC,wBAAgB,CAAC,GAAG,cAAc,mBAAmB,QAAQ;AAAA,MAC9D,WAAW,CAAC,kBAAkB,gBAAgBC,SAAAA,SAAS,aAAa,gBAAgBA,kBAAS,eAAe;AAC3G,wBAAgB,CAAC,QAAQ;AAAA,MAC1B;AAEA,UAAI,cAAc,SAAS,GAAG;AAC7B,cAAM,YAAY,CAAC,GAAG,aAAa,EAAE,KAAA,EAAO,KAAK,GAAG;AAGpD,YAAI,4BAA4B,aAAa,iBAAiB;AAC7D,cAAI,mBAAmB;AACtB,yBAAa,KAAK;AAClB,gCAAoB;AAAA,UACrB;AACA;AAAA,QACD;AAEA,0BAAkB;AAClB,kCAA0B;AAC1B,qBAAa,IAAI;AAEjBC,qBAAAA,uBAAuB,eAAe,YAAY,EAAE,QAAQ,MAAM;AACjE,4BAAkB;AAClB,uBAAa,KAAK;AAClB,8BAAoB;AAAA,QACrB,CAAC;AAAA,MACF,OAAO;AAEN,YAAI,mBAAmB;AACtB,uBAAa,KAAK;AAClB,8BAAoB;AAAA,QACrB;AAAA,MACD;AAAA,IACD;AAAA,EACD,GAAG,CAAC,SAAS,UAAU,GAAG,MAAM,OAAO,CAAC;AAExC,SAAO,EAAE,UAAA;AACV;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect } from "react";
|
|
2
2
|
import { getI18n, useTranslation } from "react-i18next";
|
|
3
|
-
import { l as loadModuleTranslations } from "./translations-
|
|
3
|
+
import { l as loadModuleTranslations } from "./translations-AfCWpvAq.esm.js";
|
|
4
4
|
import { m as modules } from "./modules-BBu2Y-K9.esm.js";
|
|
5
5
|
import { useAuth } from "@erpsquad/common/runtime";
|
|
6
6
|
import { P as Pathname } from "./pathname-DkK1_yYM.esm.js";
|
|
@@ -59,4 +59,4 @@ const useAppTranslations = () => {
|
|
|
59
59
|
export {
|
|
60
60
|
useAppTranslations as u
|
|
61
61
|
};
|
|
62
|
-
//# sourceMappingURL=use-translations-
|
|
62
|
+
//# sourceMappingURL=use-translations-lguGhn5S.esm.js.map
|