@erpsquad/common 1.11.29 → 1.11.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/DonutChart-BlzVwF9V.js +104 -0
- package/dist/chunks/DonutChart-BlzVwF9V.js.map +1 -0
- package/dist/chunks/DonutChart-CBaRNVKd.esm.js +88 -0
- package/dist/chunks/DonutChart-CBaRNVKd.esm.js.map +1 -0
- package/dist/chunks/DynamicDependentField-B1jkZzNW.js +127 -0
- package/dist/chunks/DynamicDependentField-B1jkZzNW.js.map +1 -0
- package/dist/chunks/DynamicDependentField-m4v2i_Ss.esm.js +128 -0
- package/dist/chunks/DynamicDependentField-m4v2i_Ss.esm.js.map +1 -0
- package/dist/chunks/ERPUIProvider-D1yQ1CmD.esm.js +130 -0
- package/dist/chunks/ERPUIProvider-D1yQ1CmD.esm.js.map +1 -0
- package/dist/chunks/ERPUIProvider-O6cQFkJq.js +129 -0
- package/dist/chunks/ERPUIProvider-O6cQFkJq.js.map +1 -0
- package/dist/chunks/FORMS-CP_bWKVd.js +295 -0
- package/dist/chunks/FORMS-CP_bWKVd.js.map +1 -0
- package/dist/chunks/FORMS-D1M0DgHQ.esm.js +296 -0
- package/dist/chunks/FORMS-D1M0DgHQ.esm.js.map +1 -0
- package/dist/chunks/FlexibleReduxExample-Ckz_L6d8.esm.js +149 -0
- package/dist/chunks/FlexibleReduxExample-Ckz_L6d8.esm.js.map +1 -0
- package/dist/chunks/FlexibleReduxExample-Df-bAX9S.js +148 -0
- package/dist/chunks/FlexibleReduxExample-Df-bAX9S.js.map +1 -0
- package/dist/chunks/GroupBarChart-BSLOA0iQ.js +102 -0
- package/dist/chunks/GroupBarChart-BSLOA0iQ.js.map +1 -0
- package/dist/chunks/GroupBarChart-lhrIpM1h.esm.js +86 -0
- package/dist/chunks/GroupBarChart-lhrIpM1h.esm.js.map +1 -0
- package/dist/chunks/SectionFlowEditor-D1v29JFf.esm.js +5479 -0
- package/dist/chunks/SectionFlowEditor-D1v29JFf.esm.js.map +1 -0
- package/dist/chunks/SectionFlowEditor-D58o14CY.js +5478 -0
- package/dist/chunks/SectionFlowEditor-D58o14CY.js.map +1 -0
- package/dist/chunks/action-bar-D4SYJgTT.js +660 -0
- package/dist/chunks/action-bar-D4SYJgTT.js.map +1 -0
- package/dist/chunks/action-bar-D4Siz93J.esm.js +661 -0
- package/dist/chunks/action-bar-D4Siz93J.esm.js.map +1 -0
- package/dist/chunks/actionCreator-0uQghTUt.esm.js +22 -0
- package/dist/chunks/actionCreator-0uQghTUt.esm.js.map +1 -0
- package/dist/chunks/actionCreator-BIur2_cF.esm.js +28 -0
- package/dist/chunks/actionCreator-BIur2_cF.esm.js.map +1 -0
- package/dist/chunks/actionCreator-BYzzSzcP.esm.js +14 -0
- package/dist/chunks/actionCreator-BYzzSzcP.esm.js.map +1 -0
- package/dist/chunks/actionCreator-Cddz6Hfa.js +27 -0
- package/dist/chunks/actionCreator-Cddz6Hfa.js.map +1 -0
- package/dist/chunks/actionCreator-D45ZRUYG.js +13 -0
- package/dist/chunks/actionCreator-D45ZRUYG.js.map +1 -0
- package/dist/chunks/actionCreator-DA134jFh.js +21 -0
- package/dist/chunks/actionCreator-DA134jFh.js.map +1 -0
- package/dist/chunks/actionCreator-DCvH3aya.esm.js +79 -0
- package/dist/chunks/actionCreator-DCvH3aya.esm.js.map +1 -0
- package/dist/chunks/actionCreator-P2el50Ij.js +93 -0
- package/dist/chunks/actionCreator-P2el50Ij.js.map +1 -0
- package/dist/chunks/actionCreator-Ux93gVSu.esm.js +94 -0
- package/dist/chunks/actionCreator-Ux93gVSu.esm.js.map +1 -0
- package/dist/chunks/actionCreator-tNh5lk4r.js +78 -0
- package/dist/chunks/actionCreator-tNh5lk4r.js.map +1 -0
- package/dist/chunks/activity-log-ByIo_G8q.esm.js +104 -0
- package/dist/chunks/activity-log-ByIo_G8q.esm.js.map +1 -0
- package/dist/chunks/activity-log-Cyne0qwm.js +103 -0
- package/dist/chunks/activity-log-Cyne0qwm.js.map +1 -0
- package/dist/chunks/add-template-BYyqpxVx.js +10 -0
- package/dist/chunks/add-template-BYyqpxVx.js.map +1 -0
- package/dist/chunks/add-template-D1Ro9dcG.esm.js +11 -0
- package/dist/chunks/add-template-D1Ro9dcG.esm.js.map +1 -0
- package/dist/chunks/address-modal-CfE5Ae8t.js +680 -0
- package/dist/chunks/address-modal-CfE5Ae8t.js.map +1 -0
- package/dist/chunks/address-modal-gRlouRj8.esm.js +664 -0
- package/dist/chunks/address-modal-gRlouRj8.esm.js.map +1 -0
- package/dist/chunks/ai-summary-BxB8Rnuk.js +350 -0
- package/dist/chunks/ai-summary-BxB8Rnuk.js.map +1 -0
- package/dist/chunks/ai-summary-CxAKUX2p.esm.js +351 -0
- package/dist/chunks/ai-summary-CxAKUX2p.esm.js.map +1 -0
- package/dist/chunks/api-DwmixHAO.js +5922 -0
- package/dist/chunks/api-DwmixHAO.js.map +1 -0
- package/dist/chunks/api-u1lKzJVv.esm.js +5923 -0
- package/dist/chunks/api-u1lKzJVv.esm.js.map +1 -0
- package/dist/chunks/appbar-B9EKR8QS.esm.js +57 -0
- package/dist/chunks/appbar-B9EKR8QS.esm.js.map +1 -0
- package/dist/chunks/appbar-Dt_exHJ3.js +56 -0
- package/dist/chunks/appbar-Dt_exHJ3.js.map +1 -0
- package/dist/chunks/approval-wrapper-C8iOUYeE.js +139 -0
- package/dist/chunks/approval-wrapper-C8iOUYeE.js.map +1 -0
- package/dist/chunks/approval-wrapper-OmXAoB9R.esm.js +140 -0
- package/dist/chunks/approval-wrapper-OmXAoB9R.esm.js.map +1 -0
- package/dist/chunks/areaLinerChart-BEiJvhIq.esm.js +104 -0
- package/dist/chunks/areaLinerChart-BEiJvhIq.esm.js.map +1 -0
- package/dist/chunks/areaLinerChart-DetB92LI.js +120 -0
- package/dist/chunks/areaLinerChart-DetB92LI.js.map +1 -0
- package/dist/chunks/bar-chart-BjAvgQJP.esm.js +87 -0
- package/dist/chunks/bar-chart-BjAvgQJP.esm.js.map +1 -0
- package/dist/chunks/bar-chart-HkOgepOg.js +103 -0
- package/dist/chunks/bar-chart-HkOgepOg.js.map +1 -0
- package/dist/chunks/barChart-B-WO75Ok.js +160 -0
- package/dist/chunks/barChart-B-WO75Ok.js.map +1 -0
- package/dist/chunks/barChart-BLhVsRwm.esm.js +144 -0
- package/dist/chunks/barChart-BLhVsRwm.esm.js.map +1 -0
- package/dist/chunks/barLinechart-D3G4VUJZ.esm.js +180 -0
- package/dist/chunks/barLinechart-D3G4VUJZ.esm.js.map +1 -0
- package/dist/chunks/barLinechart-DEfYJvJj.js +196 -0
- package/dist/chunks/barLinechart-DEfYJvJj.js.map +1 -0
- package/dist/chunks/calculation-summary-GdbtqnzK.esm.js +193 -0
- package/dist/chunks/calculation-summary-GdbtqnzK.esm.js.map +1 -0
- package/dist/chunks/calculation-summary-IGoIPXGL.js +192 -0
- package/dist/chunks/calculation-summary-IGoIPXGL.js.map +1 -0
- package/dist/chunks/chat-bot-BIXoGUj-.js +3609 -0
- package/dist/chunks/chat-bot-BIXoGUj-.js.map +1 -0
- package/dist/chunks/chat-bot-DURQfOqY.esm.js +3610 -0
- package/dist/chunks/chat-bot-DURQfOqY.esm.js.map +1 -0
- package/dist/chunks/common-utility-BLazlXzI.js +300 -0
- package/dist/chunks/common-utility-BLazlXzI.js.map +1 -0
- package/dist/chunks/common-utility-BQcU3rOh.esm.js +301 -0
- package/dist/chunks/common-utility-BQcU3rOh.esm.js.map +1 -0
- package/dist/chunks/custom-date-picker-BCcOhhvL.js +55 -0
- package/dist/chunks/custom-date-picker-BCcOhhvL.js.map +1 -0
- package/dist/chunks/custom-date-picker-qIdI_Mxe.esm.js +56 -0
- package/dist/chunks/custom-date-picker-qIdI_Mxe.esm.js.map +1 -0
- package/dist/chunks/custom-editor-CPTkZWIZ.js +1257 -0
- package/dist/chunks/custom-editor-CPTkZWIZ.js.map +1 -0
- package/dist/chunks/custom-editor-De9IWFLM.esm.js +1257 -0
- package/dist/chunks/custom-editor-De9IWFLM.esm.js.map +1 -0
- package/dist/chunks/custom-form-BoIrVoZW.esm.js +1146 -0
- package/dist/chunks/custom-form-BoIrVoZW.esm.js.map +1 -0
- package/dist/chunks/custom-form-DgnkFIZM.js +1145 -0
- package/dist/chunks/custom-form-DgnkFIZM.js.map +1 -0
- package/dist/chunks/custom-grid-card-DWv2PDQb.esm.js +128 -0
- package/dist/chunks/custom-grid-card-DWv2PDQb.esm.js.map +1 -0
- package/dist/chunks/custom-grid-card-H63FyqOk.js +127 -0
- package/dist/chunks/custom-grid-card-H63FyqOk.js.map +1 -0
- package/dist/chunks/dashboard-CVAH7i-8.esm.js +75 -0
- package/dist/chunks/dashboard-CVAH7i-8.esm.js.map +1 -0
- package/dist/chunks/dashboard-Drpz8zP5.js +74 -0
- package/dist/chunks/dashboard-Drpz8zP5.js.map +1 -0
- package/dist/chunks/date-BN5rVQeb.js +55 -0
- package/dist/chunks/date-BN5rVQeb.js.map +1 -0
- package/dist/chunks/date-CZNWJ8r7.esm.js +56 -0
- package/dist/chunks/date-CZNWJ8r7.esm.js.map +1 -0
- package/dist/chunks/date-format-settings-DohP3zvG.esm.js +117 -0
- package/dist/chunks/date-format-settings-DohP3zvG.esm.js.map +1 -0
- package/dist/chunks/date-format-settings-QiQTyiTn.js +116 -0
- package/dist/chunks/date-format-settings-QiQTyiTn.js.map +1 -0
- package/dist/chunks/date-picker-BAf8u-E9.esm.js +129 -0
- package/dist/chunks/date-picker-BAf8u-E9.esm.js.map +1 -0
- package/dist/chunks/date-picker-Dv_dfc9e.js +128 -0
- package/dist/chunks/date-picker-Dv_dfc9e.js.map +1 -0
- package/dist/chunks/date-range-picker-BHAVj3qf.js +62 -0
- package/dist/chunks/date-range-picker-BHAVj3qf.js.map +1 -0
- package/dist/chunks/date-range-picker-Ce01L3eF.esm.js +198 -0
- package/dist/chunks/date-range-picker-Ce01L3eF.esm.js.map +1 -0
- package/dist/chunks/date-range-picker-Dt6ODTKk.js +197 -0
- package/dist/chunks/date-range-picker-Dt6ODTKk.js.map +1 -0
- package/dist/chunks/date-range-picker-XrXYvhk6.esm.js +63 -0
- package/dist/chunks/date-range-picker-XrXYvhk6.esm.js.map +1 -0
- package/dist/chunks/date-time-Cscyu2JC.esm.js +55 -0
- package/dist/chunks/date-time-Cscyu2JC.esm.js.map +1 -0
- package/dist/chunks/date-time-DnEKq5ca.js +54 -0
- package/dist/chunks/date-time-DnEKq5ca.js.map +1 -0
- package/dist/chunks/date-time-picker-DOjxcYjT.js +115 -0
- package/dist/chunks/date-time-picker-DOjxcYjT.js.map +1 -0
- package/dist/chunks/date-time-picker-Dcs1e1Bc.esm.js +116 -0
- package/dist/chunks/date-time-picker-Dcs1e1Bc.esm.js.map +1 -0
- package/dist/chunks/dateFormat-BU9us1HO.esm.js +58 -0
- package/dist/chunks/dateFormat-BU9us1HO.esm.js.map +1 -0
- package/dist/chunks/dateFormat-MGjtBNwQ.js +57 -0
- package/dist/chunks/dateFormat-MGjtBNwQ.js.map +1 -0
- package/dist/chunks/discount-summary-C2L7GwJ5.esm.js +60 -0
- package/dist/chunks/discount-summary-C2L7GwJ5.esm.js.map +1 -0
- package/dist/chunks/discount-summary-CdrsdFbM.js +59 -0
- package/dist/chunks/discount-summary-CdrsdFbM.js.map +1 -0
- package/dist/chunks/dynamic-report-Bq614rL9.esm.js +589 -0
- package/dist/chunks/dynamic-report-Bq614rL9.esm.js.map +1 -0
- package/dist/chunks/dynamic-report-Dc2pd29H.js +588 -0
- package/dist/chunks/dynamic-report-Dc2pd29H.js.map +1 -0
- package/dist/chunks/dynamic-rows-BMj3evxl.js +249 -0
- package/dist/chunks/dynamic-rows-BMj3evxl.js.map +1 -0
- package/dist/chunks/dynamic-rows-Bi_L6K1Q.esm.js +250 -0
- package/dist/chunks/dynamic-rows-Bi_L6K1Q.esm.js.map +1 -0
- package/dist/chunks/dynamic-text-editor-BzyWihOp.js +44 -0
- package/dist/chunks/dynamic-text-editor-BzyWihOp.js.map +1 -0
- package/dist/chunks/dynamic-text-editor-FtzncH90.esm.js +45 -0
- package/dist/chunks/dynamic-text-editor-FtzncH90.esm.js.map +1 -0
- package/dist/chunks/edit-section-modal-By1pY8Kd.js +76 -0
- package/dist/chunks/edit-section-modal-By1pY8Kd.js.map +1 -0
- package/dist/chunks/edit-section-modal-lx44BKxM.esm.js +77 -0
- package/dist/chunks/edit-section-modal-lx44BKxM.esm.js.map +1 -0
- package/dist/chunks/filter-3x9UWii1.js +414 -0
- package/dist/chunks/filter-3x9UWii1.js.map +1 -0
- package/dist/chunks/filter-BnSYAact.esm.js +415 -0
- package/dist/chunks/filter-BnSYAact.esm.js.map +1 -0
- package/dist/chunks/footer-BDXx5kJG.esm.js +64 -0
- package/dist/chunks/footer-BDXx5kJG.esm.js.map +1 -0
- package/dist/chunks/footer-CNUL1un1.js +63 -0
- package/dist/chunks/footer-CNUL1un1.js.map +1 -0
- package/dist/chunks/form-fields-D7-_tDuw.esm.js +355 -0
- package/dist/chunks/form-fields-D7-_tDuw.esm.js.map +1 -0
- package/dist/chunks/form-fields-DYqWfI4L.js +354 -0
- package/dist/chunks/form-fields-DYqWfI4L.js.map +1 -0
- package/dist/chunks/form-parser-DgKyP2XE.esm.js +591 -0
- package/dist/chunks/form-parser-DgKyP2XE.esm.js.map +1 -0
- package/dist/chunks/form-parser-r9UB3j_l.js +607 -0
- package/dist/chunks/form-parser-r9UB3j_l.js.map +1 -0
- package/dist/chunks/form-section-B0UL95xN.esm.js +476 -0
- package/dist/chunks/form-section-B0UL95xN.esm.js.map +1 -0
- package/dist/chunks/form-section-Ra3TDNTJ.js +475 -0
- package/dist/chunks/form-section-Ra3TDNTJ.js.map +1 -0
- package/dist/chunks/format-chart-value-EdWQQL_n.esm.js +37 -0
- package/dist/chunks/format-chart-value-EdWQQL_n.esm.js.map +1 -0
- package/dist/chunks/format-chart-value-liFH0bwI.js +53 -0
- package/dist/chunks/format-chart-value-liFH0bwI.js.map +1 -0
- package/dist/chunks/fullScreen-CIO00GJA.js +20 -0
- package/dist/chunks/fullScreen-CIO00GJA.js.map +1 -0
- package/dist/chunks/fullScreen-Cf1lZpPP.esm.js +21 -0
- package/dist/chunks/fullScreen-Cf1lZpPP.esm.js.map +1 -0
- package/dist/chunks/global-search-BsF1AKA-.js +149 -0
- package/dist/chunks/global-search-BsF1AKA-.js.map +1 -0
- package/dist/chunks/global-search-DyHFvWRQ.esm.js +150 -0
- package/dist/chunks/global-search-DyHFvWRQ.esm.js.map +1 -0
- package/dist/chunks/grid-view-5_HV93Hf.esm.js +52 -0
- package/dist/chunks/grid-view-5_HV93Hf.esm.js.map +1 -0
- package/dist/chunks/grid-view-D0q_qMd2.js +51 -0
- package/dist/chunks/grid-view-D0q_qMd2.js.map +1 -0
- package/dist/chunks/header-DAad5p_7.js +90 -0
- package/dist/chunks/header-DAad5p_7.js.map +1 -0
- package/dist/chunks/header-S5MMcx4g.esm.js +91 -0
- package/dist/chunks/header-S5MMcx4g.esm.js.map +1 -0
- package/dist/chunks/header-enhanced-BPJQGGo7.js +400 -0
- package/dist/chunks/header-enhanced-BPJQGGo7.js.map +1 -0
- package/dist/chunks/header-enhanced-BtUsM1g3.esm.js +401 -0
- package/dist/chunks/header-enhanced-BtUsM1g3.esm.js.map +1 -0
- package/dist/chunks/inline-edit-fields-BXrrK0UT.esm.js +324 -0
- package/dist/chunks/inline-edit-fields-BXrrK0UT.esm.js.map +1 -0
- package/dist/chunks/inline-edit-fields-DeS-sx9_.js +340 -0
- package/dist/chunks/inline-edit-fields-DeS-sx9_.js.map +1 -0
- package/dist/chunks/inventory-reports-title-bar-CFqheEGb.js +733 -0
- package/dist/chunks/inventory-reports-title-bar-CFqheEGb.js.map +1 -0
- package/dist/chunks/inventory-reports-title-bar-CuPn69g7.esm.js +734 -0
- package/dist/chunks/inventory-reports-title-bar-CuPn69g7.esm.js.map +1 -0
- package/dist/chunks/item-response-details-BkE8ExKF.js +78 -0
- package/dist/chunks/item-response-details-BkE8ExKF.js.map +1 -0
- package/dist/chunks/item-response-details-FLk2xeBs.esm.js +79 -0
- package/dist/chunks/item-response-details-FLk2xeBs.esm.js.map +1 -0
- package/dist/chunks/listing-BlTk1lk7.js +275 -0
- package/dist/chunks/listing-BlTk1lk7.js.map +1 -0
- package/dist/chunks/listing-CBjRBr5T.esm.js +276 -0
- package/dist/chunks/listing-CBjRBr5T.esm.js.map +1 -0
- package/dist/chunks/location-select-BfXoscUj.esm.js +86 -0
- package/dist/chunks/location-select-BfXoscUj.esm.js.map +1 -0
- package/dist/chunks/location-select-C4r-bjZM.js +85 -0
- package/dist/chunks/location-select-C4r-bjZM.js.map +1 -0
- package/dist/chunks/material-editable-table-CUi1XChG.esm.js +1469 -0
- package/dist/chunks/material-editable-table-CUi1XChG.esm.js.map +1 -0
- package/dist/chunks/material-editable-table-DvOXRsag.js +1485 -0
- package/dist/chunks/material-editable-table-DvOXRsag.js.map +1 -0
- package/dist/chunks/module-reducer-1oIfrGzZ.js +91 -0
- package/dist/chunks/module-reducer-1oIfrGzZ.js.map +1 -0
- package/dist/chunks/module-reducer-Brv5y-yX.esm.js +92 -0
- package/dist/chunks/module-reducer-Brv5y-yX.esm.js.map +1 -0
- package/dist/chunks/multi-line-chart-CrQ7Hgm6.esm.js +96 -0
- package/dist/chunks/multi-line-chart-CrQ7Hgm6.esm.js.map +1 -0
- package/dist/chunks/multi-line-chart-DR6mEZ86.js +112 -0
- package/dist/chunks/multi-line-chart-DR6mEZ86.js.map +1 -0
- package/dist/chunks/notification-menu-B6DQbph4.js +600 -0
- package/dist/chunks/notification-menu-B6DQbph4.js.map +1 -0
- package/dist/chunks/notification-menu-BBEzqTvl.esm.js +601 -0
- package/dist/chunks/notification-menu-BBEzqTvl.esm.js.map +1 -0
- package/dist/chunks/page-action-BmdnKUie.js +324 -0
- package/dist/chunks/page-action-BmdnKUie.js.map +1 -0
- package/dist/chunks/page-action-DGnAycU4.esm.js +325 -0
- package/dist/chunks/page-action-DGnAycU4.esm.js.map +1 -0
- package/dist/chunks/page-navigator-BnJz0dir.esm.js +243 -0
- package/dist/chunks/page-navigator-BnJz0dir.esm.js.map +1 -0
- package/dist/chunks/page-navigator-qI4ptpIo.js +242 -0
- package/dist/chunks/page-navigator-qI4ptpIo.js.map +1 -0
- package/dist/chunks/page-view-BzUYT4aO.esm.js +324 -0
- package/dist/chunks/page-view-BzUYT4aO.esm.js.map +1 -0
- package/dist/chunks/page-view-CgKAg8Fs.js +323 -0
- package/dist/chunks/page-view-CgKAg8Fs.js.map +1 -0
- package/dist/chunks/quick-approval-modal--Uat95AK.js +272 -0
- package/dist/chunks/quick-approval-modal--Uat95AK.js.map +1 -0
- package/dist/chunks/quick-approval-modal-Cf5zDkO6.esm.js +256 -0
- package/dist/chunks/quick-approval-modal-Cf5zDkO6.esm.js.map +1 -0
- package/dist/chunks/reducer-5KSgWLUj.js +49 -0
- package/dist/chunks/reducer-5KSgWLUj.js.map +1 -0
- package/dist/chunks/reducer-BVEMC024.esm.js +33 -0
- package/dist/chunks/reducer-BVEMC024.esm.js.map +1 -0
- package/dist/chunks/reducer-Ba-Uxr0O.js +42 -0
- package/dist/chunks/reducer-Ba-Uxr0O.js.map +1 -0
- package/dist/chunks/reducer-C3gV86mN.esm.js +56 -0
- package/dist/chunks/reducer-C3gV86mN.esm.js.map +1 -0
- package/dist/chunks/reducer-C_1a_Ybe.js +32 -0
- package/dist/chunks/reducer-C_1a_Ybe.js.map +1 -0
- package/dist/chunks/reducer-DXCv8Ljo.esm.js +43 -0
- package/dist/chunks/reducer-DXCv8Ljo.esm.js.map +1 -0
- package/dist/chunks/reducer-DklAfYwo.js +55 -0
- package/dist/chunks/reducer-DklAfYwo.js.map +1 -0
- package/dist/chunks/reducer-DujEnCl-.js +147 -0
- package/dist/chunks/reducer-DujEnCl-.js.map +1 -0
- package/dist/chunks/reducer-PeqRGVlz.esm.js +148 -0
- package/dist/chunks/reducer-PeqRGVlz.esm.js.map +1 -0
- package/dist/chunks/reducer-e3sR-XbO.esm.js +50 -0
- package/dist/chunks/reducer-e3sR-XbO.esm.js.map +1 -0
- package/dist/chunks/reportFilter-DoD3vUsz.esm.js +396 -0
- package/dist/chunks/reportFilter-DoD3vUsz.esm.js.map +1 -0
- package/dist/chunks/reportFilter-DzgDlbu8.js +395 -0
- package/dist/chunks/reportFilter-DzgDlbu8.js.map +1 -0
- package/dist/chunks/reports-title-bar-BpeDKpyV.js +1027 -0
- package/dist/chunks/reports-title-bar-BpeDKpyV.js.map +1 -0
- package/dist/chunks/reports-title-bar-Bt9ogCT7.esm.js +1028 -0
- package/dist/chunks/reports-title-bar-Bt9ogCT7.esm.js.map +1 -0
- package/dist/chunks/route-page-map-LXxD_klV.js +8054 -0
- package/dist/chunks/route-page-map-LXxD_klV.js.map +1 -0
- package/dist/chunks/route-page-map-j4V1FsT3.esm.js +8055 -0
- package/dist/chunks/route-page-map-j4V1FsT3.esm.js.map +1 -0
- package/dist/chunks/routes-7yLS4Qxk.js +46 -0
- package/dist/chunks/routes-7yLS4Qxk.js.map +1 -0
- package/dist/chunks/routes-BE9OtJcV.esm.js +47 -0
- package/dist/chunks/routes-BE9OtJcV.esm.js.map +1 -0
- package/dist/chunks/schedule-report-B4hM1BQS.esm.js +236 -0
- package/dist/chunks/schedule-report-B4hM1BQS.esm.js.map +1 -0
- package/dist/chunks/schedule-report-D5Gtf9VF.js +235 -0
- package/dist/chunks/schedule-report-D5Gtf9VF.js.map +1 -0
- package/dist/chunks/schedule-report-modal-CFAdRSIO.esm.js +288 -0
- package/dist/chunks/schedule-report-modal-CFAdRSIO.esm.js.map +1 -0
- package/dist/chunks/schedule-report-modal-DDsrLqOm.js +287 -0
- package/dist/chunks/schedule-report-modal-DDsrLqOm.js.map +1 -0
- package/dist/chunks/searchable-select-5i6MO2Ys.esm.js +5431 -0
- package/dist/chunks/searchable-select-5i6MO2Ys.esm.js.map +1 -0
- package/dist/chunks/searchable-select-BsG-QlJk.js +5447 -0
- package/dist/chunks/searchable-select-BsG-QlJk.js.map +1 -0
- package/dist/chunks/share-modal-Bpa_0udn.esm.js +218 -0
- package/dist/chunks/share-modal-Bpa_0udn.esm.js.map +1 -0
- package/dist/chunks/share-modal-CaYg96t_.js +217 -0
- package/dist/chunks/share-modal-CaYg96t_.js.map +1 -0
- package/dist/chunks/share-modal-enhanced-B7JfgceP.esm.js +270 -0
- package/dist/chunks/share-modal-enhanced-B7JfgceP.esm.js.map +1 -0
- package/dist/chunks/share-modal-enhanced-BguLEFga.js +269 -0
- package/dist/chunks/share-modal-enhanced-BguLEFga.js.map +1 -0
- package/dist/chunks/sidebarScreen-DgpLalyG.js +200 -0
- package/dist/chunks/sidebarScreen-DgpLalyG.js.map +1 -0
- package/dist/chunks/sidebarScreen-Dp1e8Luz.esm.js +201 -0
- package/dist/chunks/sidebarScreen-Dp1e8Luz.esm.js.map +1 -0
- package/dist/chunks/store-CuKFQXI5.js +88 -0
- package/dist/chunks/store-CuKFQXI5.js.map +1 -0
- package/dist/chunks/store-KAx-wGcm.esm.js +89 -0
- package/dist/chunks/store-KAx-wGcm.esm.js.map +1 -0
- package/dist/chunks/table-CbV-bnb7.js +184 -0
- package/dist/chunks/table-CbV-bnb7.js.map +1 -0
- package/dist/chunks/table-Cdo7w_gv.esm.js +185 -0
- package/dist/chunks/table-Cdo7w_gv.esm.js.map +1 -0
- package/dist/chunks/table-form-CsxWI8HQ.esm.js +1537 -0
- package/dist/chunks/table-form-CsxWI8HQ.esm.js.map +1 -0
- package/dist/chunks/table-form-Dd2DNL6w.js +1536 -0
- package/dist/chunks/table-form-Dd2DNL6w.js.map +1 -0
- package/dist/chunks/template-editor-router-3FVvWm8W.js +8 -0
- package/dist/chunks/template-editor-router-3FVvWm8W.js.map +1 -0
- package/dist/chunks/template-editor-router-D0yZgK0u.esm.js +9 -0
- package/dist/chunks/template-editor-router-D0yZgK0u.esm.js.map +1 -0
- package/dist/chunks/template-modal-BHZbvEx9.esm.js +769 -0
- package/dist/chunks/template-modal-BHZbvEx9.esm.js.map +1 -0
- package/dist/chunks/template-modal-BuKxVaFw.js +768 -0
- package/dist/chunks/template-modal-BuKxVaFw.js.map +1 -0
- package/dist/chunks/templates-B_y-ywXc.esm.js +279 -0
- package/dist/chunks/templates-B_y-ywXc.esm.js.map +1 -0
- package/dist/chunks/templates-CtBwZgn9.js +278 -0
- package/dist/chunks/templates-CtBwZgn9.js.map +1 -0
- package/dist/chunks/text-measurement-BcBEexWP.js +251 -0
- package/dist/chunks/text-measurement-BcBEexWP.js.map +1 -0
- package/dist/chunks/text-measurement-w3Vk7SeS.esm.js +252 -0
- package/dist/chunks/text-measurement-w3Vk7SeS.esm.js.map +1 -0
- package/dist/chunks/total-summary-DPOMR8e4.esm.js +41 -0
- package/dist/chunks/total-summary-DPOMR8e4.esm.js.map +1 -0
- package/dist/chunks/total-summary-erUelIxr.js +40 -0
- package/dist/chunks/total-summary-erUelIxr.js.map +1 -0
- package/dist/chunks/translations-BnLuKxeJ.js +58 -0
- package/dist/chunks/translations-BnLuKxeJ.js.map +1 -0
- package/dist/chunks/translations-DQJAYm2A.esm.js +59 -0
- package/dist/chunks/translations-DQJAYm2A.esm.js.map +1 -0
- package/dist/chunks/uom-field-wrapper-BlwUeXmo.js +79 -0
- package/dist/chunks/uom-field-wrapper-BlwUeXmo.js.map +1 -0
- package/dist/chunks/uom-field-wrapper-D2QSsD7M.esm.js +80 -0
- package/dist/chunks/uom-field-wrapper-D2QSsD7M.esm.js.map +1 -0
- package/dist/chunks/upload-excel-DF6rPBeA.esm.js +361 -0
- package/dist/chunks/upload-excel-DF6rPBeA.esm.js.map +1 -0
- package/dist/chunks/upload-excel-vbTf63qn.js +360 -0
- package/dist/chunks/upload-excel-vbTf63qn.js.map +1 -0
- package/dist/chunks/use-translations-C_AFtNWf.esm.js +62 -0
- package/dist/chunks/use-translations-C_AFtNWf.esm.js.map +1 -0
- package/dist/chunks/use-translations-Dnm_y9o4.js +61 -0
- package/dist/chunks/use-translations-Dnm_y9o4.js.map +1 -0
- package/dist/chunks/useAccountSetting-BimM7OxP.js +172 -0
- package/dist/chunks/useAccountSetting-BimM7OxP.js.map +1 -0
- package/dist/chunks/useAccountSetting-BsIE2d1l.esm.js +173 -0
- package/dist/chunks/useAccountSetting-BsIE2d1l.esm.js.map +1 -0
- package/dist/chunks/useCheckSkuAndName-C0twPQja.esm.js +50 -0
- package/dist/chunks/useCheckSkuAndName-C0twPQja.esm.js.map +1 -0
- package/dist/chunks/useCheckSkuAndName-CQq8Le-_.js +49 -0
- package/dist/chunks/useCheckSkuAndName-CQq8Le-_.js.map +1 -0
- package/dist/chunks/useReduxIntegration-B5GrPUbT.js +38 -0
- package/dist/chunks/useReduxIntegration-B5GrPUbT.js.map +1 -0
- package/dist/chunks/useReduxIntegration-DzhcP34r.esm.js +39 -0
- package/dist/chunks/useReduxIntegration-DzhcP34r.esm.js.map +1 -0
- package/dist/chunks/useUniquenessCheck-BIT9TNYY.esm.js +39 -0
- package/dist/chunks/useUniquenessCheck-BIT9TNYY.esm.js.map +1 -0
- package/dist/chunks/useUniquenessCheck-VBBQqtYP.js +38 -0
- package/dist/chunks/useUniquenessCheck-VBBQqtYP.js.map +1 -0
- package/dist/chunks/useVendorAICompare-Bu4fjpby.esm.js +31 -0
- package/dist/chunks/useVendorAICompare-Bu4fjpby.esm.js.map +1 -0
- package/dist/chunks/useVendorAICompare-Cad1SOQx.js +30 -0
- package/dist/chunks/useVendorAICompare-Cad1SOQx.js.map +1 -0
- package/dist/chunks/value-editor-CtppXtUW.js +266 -0
- package/dist/chunks/value-editor-CtppXtUW.js.map +1 -0
- package/dist/chunks/value-editor-xwtdV2gn.esm.js +267 -0
- package/dist/chunks/value-editor-xwtdV2gn.esm.js.map +1 -0
- package/dist/chunks/vendor-ai-summary-Cf8yBCJC.js +227 -0
- package/dist/chunks/vendor-ai-summary-Cf8yBCJC.js.map +1 -0
- package/dist/chunks/vendor-ai-summary-w6_aC72U.esm.js +228 -0
- package/dist/chunks/vendor-ai-summary-w6_aC72U.esm.js.map +1 -0
- 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/activityLog/activity-log/index.esm.js +1 -1
- package/dist/components/activityLog/activity-log/index.js +1 -1
- package/dist/components/activityLog/index.esm.js +1 -1
- package/dist/components/activityLog/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/calculation-summary/calculation-summary/index.esm.js +1 -1
- package/dist/components/calculation-summary/calculation-summary/index.js +1 -1
- package/dist/components/calculation-summary/components/discount-summary/index.esm.js +1 -1
- package/dist/components/calculation-summary/components/discount-summary/index.js +1 -1
- package/dist/components/calculation-summary/components/index.esm.js +2 -2
- package/dist/components/calculation-summary/components/index.js +2 -2
- package/dist/components/calculation-summary/components/total-summary/index.esm.js +1 -1
- package/dist/components/calculation-summary/components/total-summary/index.js +1 -1
- package/dist/components/calculation-summary/index.esm.js +3 -3
- package/dist/components/calculation-summary/index.js +3 -3
- package/dist/components/charts/areaLinerChart/index.esm.js +1 -1
- package/dist/components/charts/areaLinerChart/index.js +1 -1
- package/dist/components/charts/bar-chart/bar-chart/index.esm.js +1 -1
- package/dist/components/charts/bar-chart/bar-chart/index.js +1 -1
- package/dist/components/charts/bar-chart/index.esm.js +1 -1
- package/dist/components/charts/bar-chart/index.js +1 -1
- package/dist/components/charts/barChart/barChart/index.esm.js +1 -1
- package/dist/components/charts/barChart/barChart/index.js +1 -1
- package/dist/components/charts/barChart/index.esm.js +1 -1
- package/dist/components/charts/barChart/index.js +1 -1
- package/dist/components/charts/barLineChart/barLinechart/index.esm.js +1 -1
- package/dist/components/charts/barLineChart/barLinechart/index.js +1 -1
- package/dist/components/charts/barLineChart/index.esm.js +1 -1
- package/dist/components/charts/barLineChart/index.js +1 -1
- package/dist/components/charts/donutChart/DonutChart/index.esm.js +1 -1
- package/dist/components/charts/donutChart/DonutChart/index.js +1 -1
- package/dist/components/charts/donutChart/index.esm.js +1 -1
- package/dist/components/charts/donutChart/index.js +1 -1
- package/dist/components/charts/groupBarChart/GroupBarChart/index.esm.js +1 -1
- package/dist/components/charts/groupBarChart/GroupBarChart/index.js +1 -1
- package/dist/components/charts/groupBarChart/index.esm.js +1 -1
- package/dist/components/charts/groupBarChart/index.js +1 -1
- package/dist/components/charts/index.esm.js +7 -7
- package/dist/components/charts/index.js +7 -7
- package/dist/components/charts/multiLineChart/index.esm.js +1 -1
- package/dist/components/charts/multiLineChart/index.js +1 -1
- package/dist/components/charts/multiLineChart/multi-line-chart/index.esm.js +1 -1
- package/dist/components/charts/multiLineChart/multi-line-chart/index.js +1 -1
- package/dist/components/chat-bot/index.esm.js +2 -1
- package/dist/components/chat-bot/index.js +2 -1
- package/dist/components/chat-bot/index.js.map +1 -1
- package/dist/components/custom-forms/FORMS/index.esm.js +1 -1
- package/dist/components/custom-forms/FORMS/index.js +1 -1
- package/dist/components/custom-forms/grid-view/grid-view/index.esm.js +1 -1
- package/dist/components/custom-forms/grid-view/grid-view/index.js +1 -1
- package/dist/components/custom-forms/grid-view/index.esm.js +1 -1
- package/dist/components/custom-forms/grid-view/index.js +1 -1
- package/dist/components/custom-forms/index.esm.js +2 -2
- package/dist/components/custom-forms/index.js +2 -2
- package/dist/components/customer-ai-summary/index.esm.js +1 -1
- package/dist/components/customer-ai-summary/index.js +1 -1
- package/dist/components/date-picker/date-picker/index.esm.js +1 -1
- package/dist/components/date-picker/date-picker/index.js +1 -1
- package/dist/components/date-picker/index.esm.js +2 -2
- package/dist/components/date-picker/index.js +2 -2
- package/dist/components/date-range-picker/date-range-picker/index.esm.js +1 -1
- package/dist/components/date-range-picker/date-range-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.esm.js +2 -2
- package/dist/components/date-range-picker/index.js +2 -2
- package/dist/components/date-time-picker/date-time-picker/index.esm.js +1 -1
- package/dist/components/date-time-picker/date-time-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.esm.js +2 -2
- package/dist/components/date-time-picker/index.js +2 -2
- package/dist/components/department-add-modal/index.esm.js +1 -1
- package/dist/components/department-add-modal/index.js +1 -1
- package/dist/components/designation-add-modal/index.esm.js +1 -1
- package/dist/components/designation-add-modal/index.js +1 -1
- package/dist/components/editor/custom-editor/index.esm.js +1 -1
- package/dist/components/editor/custom-editor/index.js +1 -1
- package/dist/components/editor/index.esm.js +1 -1
- package/dist/components/editor/index.js +1 -1
- package/dist/components/examples/FlexibleReduxExample/index.esm.js +1 -1
- package/dist/components/examples/FlexibleReduxExample/index.js +1 -1
- package/dist/components/examples/index.esm.js +1 -1
- package/dist/components/examples/index.js +1 -1
- package/dist/components/filter/components/index.esm.js +1 -1
- package/dist/components/filter/components/index.js +1 -1
- package/dist/components/filter/components/value-editor/index.esm.js +1 -1
- package/dist/components/filter/components/value-editor/index.js +1 -1
- package/dist/components/filter/filter/index.esm.js +1 -1
- package/dist/components/filter/filter/index.js +1 -1
- package/dist/components/filter/index.esm.js +2 -2
- package/dist/components/filter/index.js +2 -2
- package/dist/components/footer/footer/index.esm.js +1 -1
- package/dist/components/footer/footer/index.js +1 -1
- package/dist/components/footer/index.esm.js +1 -1
- package/dist/components/footer/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/custom-date-picker/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/custom-date-picker/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/date/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/date/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/date-range-picker/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/date-range-picker/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/date-time/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/date-time/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 +8 -8
- package/dist/components/form-control/form-builder/form-builder-element/index.js +8 -8
- package/dist/components/form-control/form-builder/form-builder-element/location-add-modal/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/location-add-modal/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/select-configuration/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/select-configuration/index.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/table/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/table/index.js +1 -1
- package/dist/components/form-control/form-builder/index.esm.js +8 -8
- package/dist/components/form-control/form-builder/index.js +8 -8
- 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 +10 -10
- package/dist/components/form-control/index.js +10 -10
- package/dist/components/grid/custom-grid-card/custom-grid-card/index.esm.js +1 -1
- package/dist/components/grid/custom-grid-card/custom-grid-card/index.js +1 -1
- package/dist/components/grid/custom-grid-card/index.esm.js +1 -1
- package/dist/components/grid/custom-grid-card/index.js +1 -1
- package/dist/components/grid/index.esm.js +1 -1
- package/dist/components/grid/index.js +1 -1
- 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 +53 -53
- package/dist/components/index.js +53 -53
- package/dist/components/inventory-reports-title-bar/component/index.esm.js +1 -1
- package/dist/components/inventory-reports-title-bar/component/index.js +1 -1
- package/dist/components/inventory-reports-title-bar/component/reportFilter/index.esm.js +1 -1
- package/dist/components/inventory-reports-title-bar/component/reportFilter/index.js +1 -1
- package/dist/components/inventory-reports-title-bar/index.esm.js +4 -4
- package/dist/components/inventory-reports-title-bar/index.js +4 -4
- package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.esm.js +1 -1
- package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.js +1 -1
- package/dist/components/inventory-reports-title-bar/redux/actionCreator/index.esm.js +1 -1
- package/dist/components/inventory-reports-title-bar/redux/actionCreator/index.js +1 -1
- package/dist/components/inventory-reports-title-bar/redux/index.esm.js +2 -2
- package/dist/components/inventory-reports-title-bar/redux/index.js +2 -2
- package/dist/components/inventory-reports-title-bar/redux/reducer/index.esm.js +1 -1
- package/dist/components/inventory-reports-title-bar/redux/reducer/index.js +1 -1
- package/dist/components/listing/index.esm.js +1 -1
- package/dist/components/listing/index.js +1 -1
- package/dist/components/listing/listing/index.esm.js +1 -1
- package/dist/components/listing/listing/index.js +1 -1
- package/dist/components/location-select/index.esm.js +1 -1
- package/dist/components/location-select/index.js +1 -1
- package/dist/components/material-editable-table/components/index.esm.js +1 -1
- package/dist/components/material-editable-table/components/index.js +1 -1
- package/dist/components/material-editable-table/components/inline-edit-fields/index.esm.js +1 -1
- package/dist/components/material-editable-table/components/inline-edit-fields/index.js +1 -1
- package/dist/components/material-editable-table/index.esm.js +2 -2
- package/dist/components/material-editable-table/index.js +2 -2
- package/dist/components/material-editable-table/material-editable-table/index.esm.js +1 -1
- package/dist/components/material-editable-table/material-editable-table/index.js +1 -1
- package/dist/components/material-table/components/index.esm.js +1 -1
- package/dist/components/material-table/components/index.js +1 -1
- package/dist/components/material-table/components/inline-edit-fields/index.esm.js +1 -1
- package/dist/components/material-table/components/inline-edit-fields/index.js +1 -1
- package/dist/components/material-table/index.esm.js +1 -1
- package/dist/components/material-table/index.js +1 -1
- package/dist/components/material-table/material-table/index.esm.js +1 -1
- package/dist/components/material-table/material-table/index.js +1 -1
- package/dist/components/page-navigator/components/index.esm.js +1 -1
- package/dist/components/page-navigator/components/index.js +1 -1
- package/dist/components/page-navigator/components/page-action/index.esm.js +1 -1
- package/dist/components/page-navigator/components/page-action/index.js +1 -1
- package/dist/components/page-navigator/index.esm.js +2 -2
- package/dist/components/page-navigator/index.js +2 -2
- package/dist/components/page-navigator/page-navigator/index.esm.js +1 -1
- package/dist/components/page-navigator/page-navigator/index.js +1 -1
- package/dist/components/parties-modal/index.esm.js +1 -1
- package/dist/components/parties-modal/index.js +1 -1
- package/dist/components/parties-modal/parties-modal/index.esm.js +1 -1
- package/dist/components/parties-modal/parties-modal/index.js +1 -1
- package/dist/components/providers/ERPUIProvider/index.esm.js +1 -1
- package/dist/components/providers/ERPUIProvider/index.js +1 -1
- package/dist/components/providers/index.esm.js +1 -1
- package/dist/components/providers/index.js +1 -1
- package/dist/components/quick-approval-modal/index.esm.js +1 -1
- package/dist/components/quick-approval-modal/index.js +1 -1
- package/dist/components/quick-approval-modal/quick-approval-modal/index.esm.js +1 -1
- package/dist/components/quick-approval-modal/quick-approval-modal/index.js +1 -1
- package/dist/components/reports/dynamic-report/dynamic-report/index.esm.js +1 -1
- package/dist/components/reports/dynamic-report/dynamic-report/index.js +1 -1
- package/dist/components/reports/dynamic-report/dynamic-rows/index.esm.js +1 -1
- package/dist/components/reports/dynamic-report/dynamic-rows/index.js +1 -1
- package/dist/components/reports/dynamic-report/index.esm.js +2 -2
- package/dist/components/reports/dynamic-report/index.js +2 -2
- package/dist/components/reports/index.esm.js +2 -2
- package/dist/components/reports/index.js +2 -2
- package/dist/components/reports-title-bar/index.esm.js +3 -3
- package/dist/components/reports-title-bar/index.js +3 -3
- package/dist/components/reports-title-bar/redux/actionCreator/index.esm.js +1 -1
- package/dist/components/reports-title-bar/redux/actionCreator/index.js +1 -1
- package/dist/components/reports-title-bar/redux/index.esm.js +2 -2
- package/dist/components/reports-title-bar/redux/index.js +2 -2
- package/dist/components/reports-title-bar/redux/reducer/index.esm.js +1 -1
- package/dist/components/reports-title-bar/redux/reducer/index.js +1 -1
- package/dist/components/reports-title-bar/reports-title-bar/index.esm.js +1 -1
- package/dist/components/reports-title-bar/reports-title-bar/index.js +1 -1
- package/dist/components/rfq-response/index.esm.js +1 -1
- package/dist/components/rfq-response/index.js +1 -1
- package/dist/components/rfq-response/item-response-details/index.esm.js +1 -1
- package/dist/components/rfq-response/item-response-details/index.js +1 -1
- package/dist/components/schedule-report/index.esm.js +2 -2
- package/dist/components/schedule-report/index.js +2 -2
- package/dist/components/schedule-report/schedule-report/index.esm.js +1 -1
- package/dist/components/schedule-report/schedule-report/index.js +1 -1
- package/dist/components/schedule-report/schedule-report-modal/index.esm.js +1 -1
- package/dist/components/schedule-report/schedule-report-modal/index.js +1 -1
- package/dist/components/searchable-select/index.esm.js +1 -1
- package/dist/components/searchable-select/index.js +1 -1
- package/dist/components/share-modal/index.esm.js +4 -4
- package/dist/components/share-modal/index.js +4 -4
- package/dist/components/share-modal/redux/actionCreator/index.esm.js +1 -1
- package/dist/components/share-modal/redux/actionCreator/index.js +1 -1
- package/dist/components/share-modal/redux/index.esm.js +2 -2
- package/dist/components/share-modal/redux/index.js +2 -2
- package/dist/components/share-modal/redux/reducer/index.esm.js +1 -1
- package/dist/components/share-modal/redux/reducer/index.js +1 -1
- package/dist/components/share-modal/share-modal/index.esm.js +1 -1
- package/dist/components/share-modal/share-modal/index.js +1 -1
- package/dist/components/share-modal/share-modal-enhanced/index.esm.js +1 -1
- package/dist/components/share-modal/share-modal-enhanced/index.js +1 -1
- package/dist/components/team-add-modal/index.esm.js +1 -1
- package/dist/components/team-add-modal/index.js +1 -1
- package/dist/components/uom-field-wrapper/index.esm.js +1 -1
- package/dist/components/uom-field-wrapper/index.js +1 -1
- package/dist/components/uom-field-wrapper/uom-field-wrapper/index.esm.js +1 -1
- package/dist/components/uom-field-wrapper/uom-field-wrapper/index.js +1 -1
- package/dist/components/upload-excel/index.esm.js +1 -1
- package/dist/components/upload-excel/index.js +1 -1
- package/dist/components/upload-excel/upload-excel/index.esm.js +1 -1
- package/dist/components/upload-excel/upload-excel/index.js +1 -1
- package/dist/components/vendor-ai-summary/index.esm.js +1 -1
- package/dist/components/vendor-ai-summary/index.js +1 -1
- package/dist/constants/index.esm.js +1 -1
- package/dist/constants/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 +137 -119
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +100 -82
- package/dist/index.js.map +1 -1
- 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 +6 -2
- package/dist/runtime/index.esm.js.map +1 -1
- package/dist/runtime/index.js +6 -2
- package/dist/runtime/index.js.map +1 -1
- package/dist/src/components/calculation-summary/components/discount-summary.d.ts +1 -0
- package/dist/src/components/calculation-summary/components/total-summary.d.ts +1 -0
- package/dist/src/components/chat-bot/chat-bot-input.d.ts +2 -1
- package/dist/src/components/chat-bot/constants.d.ts +1 -0
- package/dist/src/components/reports-title-bar/reports-title-bar.d.ts +5 -0
- package/dist/src/utils/date-format-settings.d.ts +60 -0
- package/dist/src/utils/dateFormat.d.ts +1 -0
- package/dist/style.css +28 -1
- package/dist/utils/api/index.esm.js +1 -1
- package/dist/utils/api/index.js +1 -1
- package/dist/utils/common/index.esm.js +1 -1
- package/dist/utils/common/index.js +1 -1
- package/dist/utils/common-utility/index.esm.js +1 -1
- package/dist/utils/common-utility/index.js +1 -1
- package/dist/utils/dateFormat/index.esm.js +20 -2
- package/dist/utils/dateFormat/index.esm.js.map +1 -1
- package/dist/utils/dateFormat/index.js +19 -1
- package/dist/utils/dateFormat/index.js.map +1 -1
- package/dist/utils/form-builder-deconversion/index.esm.js +10 -4
- package/dist/utils/form-builder-deconversion/index.esm.js.map +1 -1
- package/dist/utils/form-builder-deconversion/index.js +10 -4
- package/dist/utils/form-builder-deconversion/index.js.map +1 -1
- package/dist/utils/index.esm.js +28 -10
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +23 -5
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/text-measurement/index.esm.js +1 -1
- package/dist/utils/text-measurement/index.js +1 -1
- package/dist/views/afterAuth/dashboard/index.esm.js +1 -1
- package/dist/views/afterAuth/dashboard/index.js +1 -1
- package/dist/views/afterAuth/index.esm.js +2 -2
- package/dist/views/afterAuth/index.js +2 -2
- package/dist/views/afterAuth/page-view/index.esm.js +1 -1
- package/dist/views/afterAuth/page-view/index.js +1 -1
- package/dist/views/form-builder/custom-form/index.esm.js +1 -1
- package/dist/views/form-builder/custom-form/index.js +1 -1
- package/dist/views/form-builder/element-edit-forms/index.esm.js +1 -1
- package/dist/views/form-builder/element-edit-forms/index.js +1 -1
- package/dist/views/form-builder/form-fields/index.esm.js +1 -1
- package/dist/views/form-builder/form-fields/index.js +1 -1
- package/dist/views/form-builder/index.esm.js +4 -4
- package/dist/views/form-builder/index.js +4 -4
- package/dist/views/form-builder/redux/index.esm.js +1 -1
- package/dist/views/form-builder/redux/index.js +1 -1
- package/dist/views/index.esm.js +13 -13
- package/dist/views/index.js +13 -13
- package/dist/views/template-editor/add-template/index.esm.js +1 -1
- package/dist/views/template-editor/add-template/index.js +1 -1
- package/dist/views/template-editor/components/index.esm.js +1 -1
- package/dist/views/template-editor/components/index.js +1 -1
- package/dist/views/template-editor/edit-section-modal/index.esm.js +1 -1
- package/dist/views/template-editor/edit-section-modal/index.js +1 -1
- package/dist/views/template-editor/index.esm.js +7 -7
- package/dist/views/template-editor/index.js +7 -7
- package/dist/views/template-editor/routes/index.esm.js +1 -1
- package/dist/views/template-editor/routes/index.js +1 -1
- package/dist/views/template-editor/template-modal/index.esm.js +1 -1
- package/dist/views/template-editor/template-modal/index.js +1 -1
- package/dist/views/template-editor/templates/index.esm.js +1 -1
- package/dist/views/template-editor/templates/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/DonutChart-BSM45IZR.js +0 -104
- package/dist/chunks/DonutChart-BSM45IZR.js.map +0 -1
- package/dist/chunks/DonutChart-CwRZ69d2.esm.js +0 -88
- package/dist/chunks/DonutChart-CwRZ69d2.esm.js.map +0 -1
- package/dist/chunks/DynamicDependentField-CxvG77Nz.esm.js +0 -128
- package/dist/chunks/DynamicDependentField-CxvG77Nz.esm.js.map +0 -1
- package/dist/chunks/DynamicDependentField-s4kwIrGN.js +0 -127
- package/dist/chunks/DynamicDependentField-s4kwIrGN.js.map +0 -1
- package/dist/chunks/ERPUIProvider-BzseBepc.esm.js +0 -130
- package/dist/chunks/ERPUIProvider-BzseBepc.esm.js.map +0 -1
- package/dist/chunks/ERPUIProvider-iB39BUBd.js +0 -129
- package/dist/chunks/ERPUIProvider-iB39BUBd.js.map +0 -1
- package/dist/chunks/FORMS-0-6vG5vm.js +0 -295
- package/dist/chunks/FORMS-0-6vG5vm.js.map +0 -1
- package/dist/chunks/FORMS-QrgpyEK_.esm.js +0 -296
- package/dist/chunks/FORMS-QrgpyEK_.esm.js.map +0 -1
- package/dist/chunks/FlexibleReduxExample-BgpligMk.js +0 -148
- package/dist/chunks/FlexibleReduxExample-BgpligMk.js.map +0 -1
- package/dist/chunks/FlexibleReduxExample-Dwvx4wTb.esm.js +0 -149
- package/dist/chunks/FlexibleReduxExample-Dwvx4wTb.esm.js.map +0 -1
- package/dist/chunks/GroupBarChart-Bqvs5N3s.esm.js +0 -86
- package/dist/chunks/GroupBarChart-Bqvs5N3s.esm.js.map +0 -1
- package/dist/chunks/GroupBarChart-CQjr7Ow8.js +0 -102
- package/dist/chunks/GroupBarChart-CQjr7Ow8.js.map +0 -1
- package/dist/chunks/SectionFlowEditor-Blhdf4jD.esm.js +0 -5479
- package/dist/chunks/SectionFlowEditor-Blhdf4jD.esm.js.map +0 -1
- package/dist/chunks/SectionFlowEditor-CNchIJ-0.js +0 -5478
- package/dist/chunks/SectionFlowEditor-CNchIJ-0.js.map +0 -1
- package/dist/chunks/action-bar-BCAyZghg.esm.js +0 -660
- package/dist/chunks/action-bar-BCAyZghg.esm.js.map +0 -1
- package/dist/chunks/action-bar-D6G70JMr.js +0 -659
- package/dist/chunks/action-bar-D6G70JMr.js.map +0 -1
- package/dist/chunks/actionCreator-2cZZuVFH.js +0 -93
- package/dist/chunks/actionCreator-2cZZuVFH.js.map +0 -1
- package/dist/chunks/actionCreator-BxsSTjDD.esm.js +0 -28
- package/dist/chunks/actionCreator-BxsSTjDD.esm.js.map +0 -1
- package/dist/chunks/actionCreator-CCbS63RH.js +0 -21
- package/dist/chunks/actionCreator-CCbS63RH.js.map +0 -1
- package/dist/chunks/actionCreator-CmAgJzDP.esm.js +0 -94
- package/dist/chunks/actionCreator-CmAgJzDP.esm.js.map +0 -1
- package/dist/chunks/actionCreator-D5jnL5Pv.js +0 -78
- package/dist/chunks/actionCreator-D5jnL5Pv.js.map +0 -1
- package/dist/chunks/actionCreator-DaS-QGI4.esm.js +0 -79
- package/dist/chunks/actionCreator-DaS-QGI4.esm.js.map +0 -1
- package/dist/chunks/actionCreator-DkS_8UbT.esm.js +0 -22
- package/dist/chunks/actionCreator-DkS_8UbT.esm.js.map +0 -1
- package/dist/chunks/actionCreator-QCAcDFaI.js +0 -27
- package/dist/chunks/actionCreator-QCAcDFaI.js.map +0 -1
- package/dist/chunks/actionCreator-jriFS6rf.esm.js +0 -14
- package/dist/chunks/actionCreator-jriFS6rf.esm.js.map +0 -1
- package/dist/chunks/actionCreator-tRYKJL_l.js +0 -13
- package/dist/chunks/actionCreator-tRYKJL_l.js.map +0 -1
- package/dist/chunks/activity-log-3DTR9uiM.esm.js +0 -103
- package/dist/chunks/activity-log-3DTR9uiM.esm.js.map +0 -1
- package/dist/chunks/activity-log-Hw1K_cMJ.js +0 -102
- package/dist/chunks/activity-log-Hw1K_cMJ.js.map +0 -1
- package/dist/chunks/add-template-B8cAl6jP.esm.js +0 -11
- package/dist/chunks/add-template-B8cAl6jP.esm.js.map +0 -1
- package/dist/chunks/add-template-DXfjAhLS.js +0 -10
- package/dist/chunks/add-template-DXfjAhLS.js.map +0 -1
- package/dist/chunks/address-modal-DDs0_DwZ.esm.js +0 -664
- package/dist/chunks/address-modal-DDs0_DwZ.esm.js.map +0 -1
- package/dist/chunks/address-modal-eIuNxXg0.js +0 -680
- package/dist/chunks/address-modal-eIuNxXg0.js.map +0 -1
- package/dist/chunks/ai-summary-CAKlYLnt.js +0 -350
- package/dist/chunks/ai-summary-CAKlYLnt.js.map +0 -1
- package/dist/chunks/ai-summary-Dto8NzAC.esm.js +0 -351
- package/dist/chunks/ai-summary-Dto8NzAC.esm.js.map +0 -1
- package/dist/chunks/api-BSqZ2y7J.esm.js +0 -5922
- package/dist/chunks/api-BSqZ2y7J.esm.js.map +0 -1
- package/dist/chunks/api-Ce693XLe.js +0 -5921
- package/dist/chunks/api-Ce693XLe.js.map +0 -1
- package/dist/chunks/appbar-C35Euxp4.js +0 -56
- package/dist/chunks/appbar-C35Euxp4.js.map +0 -1
- package/dist/chunks/appbar-DCoI9W6A.esm.js +0 -57
- package/dist/chunks/appbar-DCoI9W6A.esm.js.map +0 -1
- package/dist/chunks/approval-wrapper-B-41mLZw.esm.js +0 -140
- package/dist/chunks/approval-wrapper-B-41mLZw.esm.js.map +0 -1
- package/dist/chunks/approval-wrapper-C6-tXwaf.js +0 -139
- package/dist/chunks/approval-wrapper-C6-tXwaf.js.map +0 -1
- package/dist/chunks/areaLinerChart-BSaqONGz.esm.js +0 -104
- package/dist/chunks/areaLinerChart-BSaqONGz.esm.js.map +0 -1
- package/dist/chunks/areaLinerChart-CV1NKCGz.js +0 -120
- package/dist/chunks/areaLinerChart-CV1NKCGz.js.map +0 -1
- package/dist/chunks/bar-chart-C0okUFJS.js +0 -103
- package/dist/chunks/bar-chart-C0okUFJS.js.map +0 -1
- package/dist/chunks/bar-chart-D4myXwbk.esm.js +0 -87
- package/dist/chunks/bar-chart-D4myXwbk.esm.js.map +0 -1
- package/dist/chunks/barChart-B6SjqFTi.esm.js +0 -144
- package/dist/chunks/barChart-B6SjqFTi.esm.js.map +0 -1
- package/dist/chunks/barChart-_v5HVNeD.js +0 -160
- package/dist/chunks/barChart-_v5HVNeD.js.map +0 -1
- package/dist/chunks/barLinechart-BGRDgzAX.esm.js +0 -180
- package/dist/chunks/barLinechart-BGRDgzAX.esm.js.map +0 -1
- package/dist/chunks/barLinechart-Cybr4t95.js +0 -196
- package/dist/chunks/barLinechart-Cybr4t95.js.map +0 -1
- package/dist/chunks/calculation-summary-BhWssEJP.esm.js +0 -182
- package/dist/chunks/calculation-summary-BhWssEJP.esm.js.map +0 -1
- package/dist/chunks/calculation-summary-DdAaSwoG.js +0 -181
- package/dist/chunks/calculation-summary-DdAaSwoG.js.map +0 -1
- package/dist/chunks/chat-bot-C0ohNCRY.js +0 -3546
- package/dist/chunks/chat-bot-C0ohNCRY.js.map +0 -1
- package/dist/chunks/chat-bot-CzRxCBcZ.esm.js +0 -3547
- package/dist/chunks/chat-bot-CzRxCBcZ.esm.js.map +0 -1
- package/dist/chunks/common-utility-DNOInB1J.esm.js +0 -299
- package/dist/chunks/common-utility-DNOInB1J.esm.js.map +0 -1
- package/dist/chunks/common-utility-DXlg6tQv.js +0 -298
- package/dist/chunks/common-utility-DXlg6tQv.js.map +0 -1
- package/dist/chunks/custom-date-picker-Bj_9n8p8.esm.js +0 -56
- package/dist/chunks/custom-date-picker-Bj_9n8p8.esm.js.map +0 -1
- package/dist/chunks/custom-date-picker-Dt54H6AR.js +0 -55
- package/dist/chunks/custom-date-picker-Dt54H6AR.js.map +0 -1
- package/dist/chunks/custom-editor-D99-i2rN.js +0 -1257
- package/dist/chunks/custom-editor-D99-i2rN.js.map +0 -1
- package/dist/chunks/custom-editor-DbaK32F2.esm.js +0 -1257
- package/dist/chunks/custom-editor-DbaK32F2.esm.js.map +0 -1
- package/dist/chunks/custom-form-CiSSDja3.esm.js +0 -1146
- package/dist/chunks/custom-form-CiSSDja3.esm.js.map +0 -1
- package/dist/chunks/custom-form-rhJ1xvOV.js +0 -1145
- package/dist/chunks/custom-form-rhJ1xvOV.js.map +0 -1
- package/dist/chunks/custom-grid-card-25R5RDYY.js +0 -126
- package/dist/chunks/custom-grid-card-25R5RDYY.js.map +0 -1
- package/dist/chunks/custom-grid-card-ChSQynhf.esm.js +0 -127
- package/dist/chunks/custom-grid-card-ChSQynhf.esm.js.map +0 -1
- package/dist/chunks/dashboard-D7cAtema.js +0 -74
- package/dist/chunks/dashboard-D7cAtema.js.map +0 -1
- package/dist/chunks/dashboard-uhHB0n9T.esm.js +0 -75
- package/dist/chunks/dashboard-uhHB0n9T.esm.js.map +0 -1
- package/dist/chunks/date-BEkOnPLg.js +0 -55
- package/dist/chunks/date-BEkOnPLg.js.map +0 -1
- package/dist/chunks/date-DWW33q1y.esm.js +0 -56
- package/dist/chunks/date-DWW33q1y.esm.js.map +0 -1
- package/dist/chunks/date-picker-C0qJ2Ceq.js +0 -127
- package/dist/chunks/date-picker-C0qJ2Ceq.js.map +0 -1
- package/dist/chunks/date-picker-CqiwV3fq.esm.js +0 -128
- package/dist/chunks/date-picker-CqiwV3fq.esm.js.map +0 -1
- package/dist/chunks/date-range-picker-Bt_heXbX.js +0 -196
- package/dist/chunks/date-range-picker-Bt_heXbX.js.map +0 -1
- package/dist/chunks/date-range-picker-CXYyecdN.js +0 -61
- package/dist/chunks/date-range-picker-CXYyecdN.js.map +0 -1
- package/dist/chunks/date-range-picker-CvkYXRaH.esm.js +0 -197
- package/dist/chunks/date-range-picker-CvkYXRaH.esm.js.map +0 -1
- package/dist/chunks/date-range-picker-DDI-vDlU.esm.js +0 -62
- package/dist/chunks/date-range-picker-DDI-vDlU.esm.js.map +0 -1
- package/dist/chunks/date-time-Bmf9tUWN.js +0 -54
- package/dist/chunks/date-time-Bmf9tUWN.js.map +0 -1
- package/dist/chunks/date-time-TwBpGcVi.esm.js +0 -55
- package/dist/chunks/date-time-TwBpGcVi.esm.js.map +0 -1
- package/dist/chunks/date-time-picker-BiVDvz7V.esm.js +0 -115
- package/dist/chunks/date-time-picker-BiVDvz7V.esm.js.map +0 -1
- package/dist/chunks/date-time-picker-HC1XkaJG.js +0 -114
- package/dist/chunks/date-time-picker-HC1XkaJG.js.map +0 -1
- package/dist/chunks/dateFormat-DruK2Qh9.js +0 -56
- package/dist/chunks/dateFormat-DruK2Qh9.js.map +0 -1
- package/dist/chunks/dateFormat-VzMEQghL.esm.js +0 -57
- package/dist/chunks/dateFormat-VzMEQghL.esm.js.map +0 -1
- package/dist/chunks/discount-summary-Cfxk2tZa.esm.js +0 -60
- package/dist/chunks/discount-summary-Cfxk2tZa.esm.js.map +0 -1
- package/dist/chunks/discount-summary-RCy2t_AM.js +0 -59
- package/dist/chunks/discount-summary-RCy2t_AM.js.map +0 -1
- package/dist/chunks/dynamic-report-BfnrD-zq.js +0 -588
- package/dist/chunks/dynamic-report-BfnrD-zq.js.map +0 -1
- package/dist/chunks/dynamic-report-CmL56Rs0.esm.js +0 -589
- package/dist/chunks/dynamic-report-CmL56Rs0.esm.js.map +0 -1
- package/dist/chunks/dynamic-rows-5iZHYEWp.js +0 -249
- package/dist/chunks/dynamic-rows-5iZHYEWp.js.map +0 -1
- package/dist/chunks/dynamic-rows-Db28dAgS.esm.js +0 -250
- package/dist/chunks/dynamic-rows-Db28dAgS.esm.js.map +0 -1
- package/dist/chunks/dynamic-text-editor-B2k2GRDf.js +0 -44
- package/dist/chunks/dynamic-text-editor-B2k2GRDf.js.map +0 -1
- package/dist/chunks/dynamic-text-editor-DSyNRqGU.esm.js +0 -45
- package/dist/chunks/dynamic-text-editor-DSyNRqGU.esm.js.map +0 -1
- package/dist/chunks/edit-section-modal-Bg_OubEc.js +0 -76
- package/dist/chunks/edit-section-modal-Bg_OubEc.js.map +0 -1
- package/dist/chunks/edit-section-modal-CqbrHCo2.esm.js +0 -77
- package/dist/chunks/edit-section-modal-CqbrHCo2.esm.js.map +0 -1
- package/dist/chunks/filter-Br7IBDbh.esm.js +0 -415
- package/dist/chunks/filter-Br7IBDbh.esm.js.map +0 -1
- package/dist/chunks/filter-DqL-Ey7H.js +0 -414
- package/dist/chunks/filter-DqL-Ey7H.js.map +0 -1
- package/dist/chunks/footer-BmDKMyLP.js +0 -63
- package/dist/chunks/footer-BmDKMyLP.js.map +0 -1
- package/dist/chunks/footer-BmKXTODa.esm.js +0 -64
- package/dist/chunks/footer-BmKXTODa.esm.js.map +0 -1
- package/dist/chunks/form-fields-BiRJ8Gyp.esm.js +0 -355
- package/dist/chunks/form-fields-BiRJ8Gyp.esm.js.map +0 -1
- package/dist/chunks/form-fields-mWRtoHVX.js +0 -354
- package/dist/chunks/form-fields-mWRtoHVX.js.map +0 -1
- package/dist/chunks/form-parser-6_MQHzfU.js +0 -607
- package/dist/chunks/form-parser-6_MQHzfU.js.map +0 -1
- package/dist/chunks/form-parser-D0ZqEsBx.esm.js +0 -591
- package/dist/chunks/form-parser-D0ZqEsBx.esm.js.map +0 -1
- package/dist/chunks/form-section-D0ipOYv3.esm.js +0 -476
- package/dist/chunks/form-section-D0ipOYv3.esm.js.map +0 -1
- package/dist/chunks/form-section-DJJ5O8QE.js +0 -475
- package/dist/chunks/form-section-DJJ5O8QE.js.map +0 -1
- package/dist/chunks/format-chart-value-B5ClGhlz.esm.js +0 -37
- package/dist/chunks/format-chart-value-B5ClGhlz.esm.js.map +0 -1
- package/dist/chunks/format-chart-value-Cy1P2lbF.js +0 -53
- package/dist/chunks/format-chart-value-Cy1P2lbF.js.map +0 -1
- package/dist/chunks/fullScreen-CV2gntC3.js +0 -20
- package/dist/chunks/fullScreen-CV2gntC3.js.map +0 -1
- package/dist/chunks/fullScreen-DwP10GLK.esm.js +0 -21
- package/dist/chunks/fullScreen-DwP10GLK.esm.js.map +0 -1
- package/dist/chunks/global-search-BUpAIn8K.js +0 -149
- package/dist/chunks/global-search-BUpAIn8K.js.map +0 -1
- package/dist/chunks/global-search-C_L-lmq1.esm.js +0 -150
- package/dist/chunks/global-search-C_L-lmq1.esm.js.map +0 -1
- package/dist/chunks/grid-view-7yv8BBGS.esm.js +0 -52
- package/dist/chunks/grid-view-7yv8BBGS.esm.js.map +0 -1
- package/dist/chunks/grid-view-LeS2Q6Zy.js +0 -51
- package/dist/chunks/grid-view-LeS2Q6Zy.js.map +0 -1
- package/dist/chunks/header-BfLMcRXF.js +0 -90
- package/dist/chunks/header-BfLMcRXF.js.map +0 -1
- package/dist/chunks/header-CgGEFjRD.esm.js +0 -91
- package/dist/chunks/header-CgGEFjRD.esm.js.map +0 -1
- package/dist/chunks/header-enhanced-CP0w1-Dn.js +0 -400
- package/dist/chunks/header-enhanced-CP0w1-Dn.js.map +0 -1
- package/dist/chunks/header-enhanced-Cd3gRkWV.esm.js +0 -401
- package/dist/chunks/header-enhanced-Cd3gRkWV.esm.js.map +0 -1
- package/dist/chunks/inline-edit-fields-C7sJKda2.js +0 -340
- package/dist/chunks/inline-edit-fields-C7sJKda2.js.map +0 -1
- package/dist/chunks/inline-edit-fields-D0gvI8T3.esm.js +0 -324
- package/dist/chunks/inline-edit-fields-D0gvI8T3.esm.js.map +0 -1
- package/dist/chunks/inventory-reports-title-bar-C8Qo7NEx.js +0 -732
- package/dist/chunks/inventory-reports-title-bar-C8Qo7NEx.js.map +0 -1
- package/dist/chunks/inventory-reports-title-bar-DpG06q1U.esm.js +0 -733
- package/dist/chunks/inventory-reports-title-bar-DpG06q1U.esm.js.map +0 -1
- package/dist/chunks/item-response-details-Q4dR3qmN.js +0 -78
- package/dist/chunks/item-response-details-Q4dR3qmN.js.map +0 -1
- package/dist/chunks/item-response-details-TEvdMqA7.esm.js +0 -79
- package/dist/chunks/item-response-details-TEvdMqA7.esm.js.map +0 -1
- package/dist/chunks/listing-B7oUf-ga.esm.js +0 -276
- package/dist/chunks/listing-B7oUf-ga.esm.js.map +0 -1
- package/dist/chunks/listing-DINZMGWq.js +0 -275
- package/dist/chunks/listing-DINZMGWq.js.map +0 -1
- package/dist/chunks/location-select-B91gVEZg.esm.js +0 -86
- package/dist/chunks/location-select-B91gVEZg.esm.js.map +0 -1
- package/dist/chunks/location-select-DJGf2z9B.js +0 -85
- package/dist/chunks/location-select-DJGf2z9B.js.map +0 -1
- package/dist/chunks/material-editable-table-Bsy2JLb6.esm.js +0 -1469
- package/dist/chunks/material-editable-table-Bsy2JLb6.esm.js.map +0 -1
- package/dist/chunks/material-editable-table-CzJhE63R.js +0 -1485
- package/dist/chunks/material-editable-table-CzJhE63R.js.map +0 -1
- package/dist/chunks/module-reducer-CCZD_gz4.js +0 -91
- package/dist/chunks/module-reducer-CCZD_gz4.js.map +0 -1
- package/dist/chunks/module-reducer-DNm9BZ0L.esm.js +0 -92
- package/dist/chunks/module-reducer-DNm9BZ0L.esm.js.map +0 -1
- package/dist/chunks/multi-line-chart-BYBYGBdy.esm.js +0 -96
- package/dist/chunks/multi-line-chart-BYBYGBdy.esm.js.map +0 -1
- package/dist/chunks/multi-line-chart-Bt3wdHU7.js +0 -112
- package/dist/chunks/multi-line-chart-Bt3wdHU7.js.map +0 -1
- package/dist/chunks/notification-menu-BCCLpwDZ.js +0 -600
- package/dist/chunks/notification-menu-BCCLpwDZ.js.map +0 -1
- package/dist/chunks/notification-menu-PJM37Tp2.esm.js +0 -601
- package/dist/chunks/notification-menu-PJM37Tp2.esm.js.map +0 -1
- package/dist/chunks/page-action-CUTFLYyt.esm.js +0 -325
- package/dist/chunks/page-action-CUTFLYyt.esm.js.map +0 -1
- package/dist/chunks/page-action-EfPBRwHo.js +0 -324
- package/dist/chunks/page-action-EfPBRwHo.js.map +0 -1
- package/dist/chunks/page-navigator-J9GdrKkm.js +0 -242
- package/dist/chunks/page-navigator-J9GdrKkm.js.map +0 -1
- package/dist/chunks/page-navigator-PBXn7Eh_.esm.js +0 -243
- package/dist/chunks/page-navigator-PBXn7Eh_.esm.js.map +0 -1
- package/dist/chunks/page-view-D_Erav8n.js +0 -323
- package/dist/chunks/page-view-D_Erav8n.js.map +0 -1
- package/dist/chunks/page-view-DsptSruT.esm.js +0 -324
- package/dist/chunks/page-view-DsptSruT.esm.js.map +0 -1
- package/dist/chunks/quick-approval-modal-Bi9f6kIj.esm.js +0 -256
- package/dist/chunks/quick-approval-modal-Bi9f6kIj.esm.js.map +0 -1
- package/dist/chunks/quick-approval-modal-CoFcxeD9.js +0 -272
- package/dist/chunks/quick-approval-modal-CoFcxeD9.js.map +0 -1
- package/dist/chunks/reducer-BSDSt8P5.js +0 -49
- package/dist/chunks/reducer-BSDSt8P5.js.map +0 -1
- package/dist/chunks/reducer-Btzbg-kC.js +0 -55
- package/dist/chunks/reducer-Btzbg-kC.js.map +0 -1
- package/dist/chunks/reducer-C0vp7c_5.esm.js +0 -43
- package/dist/chunks/reducer-C0vp7c_5.esm.js.map +0 -1
- package/dist/chunks/reducer-C5hytm3p.js +0 -42
- package/dist/chunks/reducer-C5hytm3p.js.map +0 -1
- package/dist/chunks/reducer-C_iAxDoX.js +0 -32
- package/dist/chunks/reducer-C_iAxDoX.js.map +0 -1
- package/dist/chunks/reducer-DlQPn2Yf.js +0 -147
- package/dist/chunks/reducer-DlQPn2Yf.js.map +0 -1
- package/dist/chunks/reducer-DpGhVrVl.esm.js +0 -50
- package/dist/chunks/reducer-DpGhVrVl.esm.js.map +0 -1
- package/dist/chunks/reducer-DvN85Zfx.esm.js +0 -33
- package/dist/chunks/reducer-DvN85Zfx.esm.js.map +0 -1
- package/dist/chunks/reducer-LfwRh77b.esm.js +0 -56
- package/dist/chunks/reducer-LfwRh77b.esm.js.map +0 -1
- package/dist/chunks/reducer-qhCDNTSp.esm.js +0 -148
- package/dist/chunks/reducer-qhCDNTSp.esm.js.map +0 -1
- package/dist/chunks/reportFilter-CqxvTM6T.js +0 -394
- package/dist/chunks/reportFilter-CqxvTM6T.js.map +0 -1
- package/dist/chunks/reportFilter-DTsM7pWt.esm.js +0 -395
- package/dist/chunks/reportFilter-DTsM7pWt.esm.js.map +0 -1
- package/dist/chunks/reports-title-bar-BPCvX-LI.esm.js +0 -1016
- package/dist/chunks/reports-title-bar-BPCvX-LI.esm.js.map +0 -1
- package/dist/chunks/reports-title-bar-L1k7t3uz.js +0 -1015
- package/dist/chunks/reports-title-bar-L1k7t3uz.js.map +0 -1
- package/dist/chunks/route-page-map-Bz7COHkD.esm.js +0 -7427
- package/dist/chunks/route-page-map-Bz7COHkD.esm.js.map +0 -1
- package/dist/chunks/route-page-map-DfVJnKQA.js +0 -7426
- package/dist/chunks/route-page-map-DfVJnKQA.js.map +0 -1
- package/dist/chunks/routes-BC185juT.esm.js +0 -47
- package/dist/chunks/routes-BC185juT.esm.js.map +0 -1
- package/dist/chunks/routes-PNRu_AV8.js +0 -46
- package/dist/chunks/routes-PNRu_AV8.js.map +0 -1
- package/dist/chunks/schedule-report-CkrAwjTf.js +0 -235
- package/dist/chunks/schedule-report-CkrAwjTf.js.map +0 -1
- package/dist/chunks/schedule-report-YXW8mqxX.esm.js +0 -236
- package/dist/chunks/schedule-report-YXW8mqxX.esm.js.map +0 -1
- package/dist/chunks/schedule-report-modal-CDieUlju.esm.js +0 -288
- package/dist/chunks/schedule-report-modal-CDieUlju.esm.js.map +0 -1
- package/dist/chunks/schedule-report-modal-DbDqxLtB.js +0 -287
- package/dist/chunks/schedule-report-modal-DbDqxLtB.js.map +0 -1
- package/dist/chunks/searchable-select-Kg6j3WHo.js +0 -5447
- package/dist/chunks/searchable-select-Kg6j3WHo.js.map +0 -1
- package/dist/chunks/searchable-select-UNDm_sU3.esm.js +0 -5431
- package/dist/chunks/searchable-select-UNDm_sU3.esm.js.map +0 -1
- package/dist/chunks/share-modal-BkfNmJ6Q.esm.js +0 -218
- package/dist/chunks/share-modal-BkfNmJ6Q.esm.js.map +0 -1
- package/dist/chunks/share-modal-CfxRsno1.js +0 -217
- package/dist/chunks/share-modal-CfxRsno1.js.map +0 -1
- package/dist/chunks/share-modal-enhanced-B7ROQZkD.esm.js +0 -270
- package/dist/chunks/share-modal-enhanced-B7ROQZkD.esm.js.map +0 -1
- package/dist/chunks/share-modal-enhanced-CdPdyiPt.js +0 -269
- package/dist/chunks/share-modal-enhanced-CdPdyiPt.js.map +0 -1
- package/dist/chunks/sidebarScreen-CUDpCssG.js +0 -200
- package/dist/chunks/sidebarScreen-CUDpCssG.js.map +0 -1
- package/dist/chunks/sidebarScreen-ES06jsUC.esm.js +0 -201
- package/dist/chunks/sidebarScreen-ES06jsUC.esm.js.map +0 -1
- package/dist/chunks/store-BhWKdIyL.esm.js +0 -89
- package/dist/chunks/store-BhWKdIyL.esm.js.map +0 -1
- package/dist/chunks/store-DED99V-p.js +0 -88
- package/dist/chunks/store-DED99V-p.js.map +0 -1
- package/dist/chunks/table-D60IIwv_.js +0 -184
- package/dist/chunks/table-D60IIwv_.js.map +0 -1
- package/dist/chunks/table-DqRPlxNW.esm.js +0 -185
- package/dist/chunks/table-DqRPlxNW.esm.js.map +0 -1
- package/dist/chunks/table-form-5eM4xAoE.js +0 -1536
- package/dist/chunks/table-form-5eM4xAoE.js.map +0 -1
- package/dist/chunks/table-form-lDShKPGv.esm.js +0 -1537
- package/dist/chunks/table-form-lDShKPGv.esm.js.map +0 -1
- package/dist/chunks/template-editor-router-BDTAwEPd.esm.js +0 -9
- package/dist/chunks/template-editor-router-BDTAwEPd.esm.js.map +0 -1
- package/dist/chunks/template-editor-router-DQU440rt.js +0 -8
- package/dist/chunks/template-editor-router-DQU440rt.js.map +0 -1
- package/dist/chunks/template-modal-BEbtkxK2.esm.js +0 -769
- package/dist/chunks/template-modal-BEbtkxK2.esm.js.map +0 -1
- package/dist/chunks/template-modal-DM8bWq5q.js +0 -768
- package/dist/chunks/template-modal-DM8bWq5q.js.map +0 -1
- package/dist/chunks/templates-CcbbOv90.js +0 -278
- package/dist/chunks/templates-CcbbOv90.js.map +0 -1
- package/dist/chunks/templates-DchjIAQf.esm.js +0 -279
- package/dist/chunks/templates-DchjIAQf.esm.js.map +0 -1
- package/dist/chunks/text-measurement-B2SY4MOI.js +0 -251
- package/dist/chunks/text-measurement-B2SY4MOI.js.map +0 -1
- package/dist/chunks/text-measurement-C4VHjrOM.esm.js +0 -252
- package/dist/chunks/text-measurement-C4VHjrOM.esm.js.map +0 -1
- package/dist/chunks/total-summary-BCNJd8iL.esm.js +0 -41
- package/dist/chunks/total-summary-BCNJd8iL.esm.js.map +0 -1
- package/dist/chunks/total-summary-BhLK6YOW.js +0 -40
- package/dist/chunks/total-summary-BhLK6YOW.js.map +0 -1
- package/dist/chunks/translations-CzTYlXLs.js +0 -58
- package/dist/chunks/translations-CzTYlXLs.js.map +0 -1
- package/dist/chunks/translations-s7kQoO4z.esm.js +0 -59
- package/dist/chunks/translations-s7kQoO4z.esm.js.map +0 -1
- package/dist/chunks/uom-field-wrapper-CftM69IH.esm.js +0 -80
- package/dist/chunks/uom-field-wrapper-CftM69IH.esm.js.map +0 -1
- package/dist/chunks/uom-field-wrapper-DGJXWRgH.js +0 -79
- package/dist/chunks/uom-field-wrapper-DGJXWRgH.js.map +0 -1
- package/dist/chunks/upload-excel-BzL5o4KR.esm.js +0 -361
- package/dist/chunks/upload-excel-BzL5o4KR.esm.js.map +0 -1
- package/dist/chunks/upload-excel-WxhTn3iL.js +0 -360
- package/dist/chunks/upload-excel-WxhTn3iL.js.map +0 -1
- package/dist/chunks/use-translations-DK7JAMUq.esm.js +0 -62
- package/dist/chunks/use-translations-DK7JAMUq.esm.js.map +0 -1
- package/dist/chunks/use-translations-fvRLagN8.js +0 -61
- package/dist/chunks/use-translations-fvRLagN8.js.map +0 -1
- package/dist/chunks/useAccountSetting-0o3CgYbA.esm.js +0 -173
- package/dist/chunks/useAccountSetting-0o3CgYbA.esm.js.map +0 -1
- package/dist/chunks/useAccountSetting-DP26D8yo.js +0 -172
- package/dist/chunks/useAccountSetting-DP26D8yo.js.map +0 -1
- package/dist/chunks/useCheckSkuAndName-CoCwHFgC.js +0 -49
- package/dist/chunks/useCheckSkuAndName-CoCwHFgC.js.map +0 -1
- package/dist/chunks/useCheckSkuAndName-rkZ4hHCO.esm.js +0 -50
- package/dist/chunks/useCheckSkuAndName-rkZ4hHCO.esm.js.map +0 -1
- package/dist/chunks/useReduxIntegration-Cd6hvE5r.js +0 -38
- package/dist/chunks/useReduxIntegration-Cd6hvE5r.js.map +0 -1
- package/dist/chunks/useReduxIntegration-DM__4RiP.esm.js +0 -39
- package/dist/chunks/useReduxIntegration-DM__4RiP.esm.js.map +0 -1
- package/dist/chunks/useUniquenessCheck-B2o3fIcX.esm.js +0 -39
- package/dist/chunks/useUniquenessCheck-B2o3fIcX.esm.js.map +0 -1
- package/dist/chunks/useUniquenessCheck-pXvzabHu.js +0 -38
- package/dist/chunks/useUniquenessCheck-pXvzabHu.js.map +0 -1
- package/dist/chunks/useVendorAICompare-BkBY0x5p.js +0 -30
- package/dist/chunks/useVendorAICompare-BkBY0x5p.js.map +0 -1
- package/dist/chunks/useVendorAICompare-fc4aJtj1.esm.js +0 -31
- package/dist/chunks/useVendorAICompare-fc4aJtj1.esm.js.map +0 -1
- package/dist/chunks/value-editor-BmMNObtT.js +0 -265
- package/dist/chunks/value-editor-BmMNObtT.js.map +0 -1
- package/dist/chunks/value-editor-Djz4sP71.esm.js +0 -266
- package/dist/chunks/value-editor-Djz4sP71.esm.js.map +0 -1
- package/dist/chunks/vendor-ai-summary-B_2B-IuL.js +0 -227
- package/dist/chunks/vendor-ai-summary-B_2B-IuL.js.map +0 -1
- package/dist/chunks/vendor-ai-summary-CXNxB7TQ.esm.js +0 -228
- package/dist/chunks/vendor-ai-summary-CXNxB7TQ.esm.js.map +0 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const React = require("react");
|
|
3
|
+
const utils_apiConfig = require("../utils/api-config/index.js");
|
|
4
|
+
const api$1 = require("./api-DwmixHAO.js");
|
|
5
|
+
const api = require("./api-BNpPd9ZI.js");
|
|
6
|
+
const useApi = require("./useApi-DRf6TvNl.js");
|
|
7
|
+
function initializeApiBaseUrls() {
|
|
8
|
+
if (!utils_apiConfig.isApiConfigInitialized()) {
|
|
9
|
+
console.warn("API configuration not initialized yet. Base URLs will be set when configuration is available.");
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const config = utils_apiConfig.getApiConfig();
|
|
13
|
+
const baseUrl = config.backendBaseUrl;
|
|
14
|
+
api.setBaseUrl(`${baseUrl}/accounting`);
|
|
15
|
+
}
|
|
16
|
+
utils_apiConfig.onApiConfigReady((config) => {
|
|
17
|
+
const baseUrl = config.backendBaseUrl;
|
|
18
|
+
api.setBaseUrl(`${baseUrl}/accounting`);
|
|
19
|
+
});
|
|
20
|
+
const useFormFieldUpdater = ({
|
|
21
|
+
control,
|
|
22
|
+
setValue,
|
|
23
|
+
fieldToUpdate,
|
|
24
|
+
transformResponse,
|
|
25
|
+
watch,
|
|
26
|
+
fieldArrayName,
|
|
27
|
+
companyField = "company_id",
|
|
28
|
+
locationField = "location_id",
|
|
29
|
+
departmentField = "department_id",
|
|
30
|
+
customDependencies = [],
|
|
31
|
+
getFieldState,
|
|
32
|
+
isUpdateAccount = false
|
|
33
|
+
}) => {
|
|
34
|
+
var _a, _b, _c;
|
|
35
|
+
const { callApi } = useApi.useApi();
|
|
36
|
+
const [initialState, setInitialState] = React.useState(null);
|
|
37
|
+
const companyPath = fieldArrayName ? `${fieldArrayName}.${companyField}` : companyField;
|
|
38
|
+
const locationPath = fieldArrayName ? `${fieldArrayName}.${locationField}` : locationField;
|
|
39
|
+
const departmentPath = fieldArrayName ? `${fieldArrayName}.${departmentField}` : departmentField;
|
|
40
|
+
const data = (watch == null ? void 0 : watch(`${fieldArrayName}`)) || {};
|
|
41
|
+
const isDirtyCompany = (_a = getFieldState == null ? void 0 : getFieldState(companyPath)) == null ? void 0 : _a.isDirty;
|
|
42
|
+
const isDirtyLocation = (_b = getFieldState == null ? void 0 : getFieldState(locationPath)) == null ? void 0 : _b.isDirty;
|
|
43
|
+
const isDirtyDepartment = (_c = getFieldState == null ? void 0 : getFieldState(departmentPath)) == null ? void 0 : _c.isDirty;
|
|
44
|
+
const selectedCompany = (data == null ? void 0 : data[companyField]) || null;
|
|
45
|
+
const selectedLocation = (data == null ? void 0 : data[locationField]) || null;
|
|
46
|
+
const selectedDepartment = (data == null ? void 0 : data[departmentField]) || null;
|
|
47
|
+
React.useEffect(() => {
|
|
48
|
+
if (watch && !initialState) {
|
|
49
|
+
const filters = {
|
|
50
|
+
[companyField]: selectedCompany,
|
|
51
|
+
[locationField]: selectedLocation,
|
|
52
|
+
[departmentField]: selectedDepartment
|
|
53
|
+
};
|
|
54
|
+
const values = {};
|
|
55
|
+
Object.keys(fieldToUpdate).forEach((key) => {
|
|
56
|
+
const path = fieldArrayName ? `${fieldArrayName}.${key}` : key;
|
|
57
|
+
values[key] = watch(path);
|
|
58
|
+
});
|
|
59
|
+
setInitialState({ filters, values });
|
|
60
|
+
}
|
|
61
|
+
}, [watch, selectedCompany, selectedLocation, selectedDepartment, initialState, companyPath, locationPath, departmentPath, isDirtyCompany, isDirtyLocation, isDirtyDepartment]);
|
|
62
|
+
const updateFields = React.useCallback((data2, forceUpdate = false) => {
|
|
63
|
+
if (!setValue || !data2) return;
|
|
64
|
+
const transformed = transformResponse ? transformResponse(data2) : data2;
|
|
65
|
+
if (!transformed) return;
|
|
66
|
+
Object.entries(fieldToUpdate).forEach(([sourceField, targetField]) => {
|
|
67
|
+
const updateValue = transformed == null ? void 0 : transformed.find((i) => (i == null ? void 0 : i.config_key) == (typeof targetField == "object" ? targetField.key : targetField));
|
|
68
|
+
if (updateValue !== void 0 && updateValue !== null) {
|
|
69
|
+
const path = fieldArrayName ? `${fieldArrayName}.${sourceField}` : sourceField;
|
|
70
|
+
if (!forceUpdate) {
|
|
71
|
+
const existingValue = watch == null ? void 0 : watch(path);
|
|
72
|
+
if (existingValue !== void 0 && existingValue !== null && existingValue !== "") {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (typeof targetField == "object") {
|
|
77
|
+
targetField.value((updateValue == null ? void 0 : updateValue.reference_id) || (updateValue == null ? void 0 : updateValue.reference_text));
|
|
78
|
+
} else {
|
|
79
|
+
setValue(path, (updateValue == null ? void 0 : updateValue.reference_id) || (updateValue == null ? void 0 : updateValue.reference_text));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}, [setValue, fieldToUpdate, transformResponse, fieldArrayName, watch, ...customDependencies]);
|
|
84
|
+
const fetchAndUpdate = React.useCallback(async () => {
|
|
85
|
+
if (!selectedCompany || !initialState) return;
|
|
86
|
+
const getFilterValue = (val) => {
|
|
87
|
+
if (Array.isArray(val)) {
|
|
88
|
+
if (val.length === 0) return null;
|
|
89
|
+
const firstVal = val[0];
|
|
90
|
+
if (firstVal && typeof firstVal === "object") return firstVal.id || firstVal.value || null;
|
|
91
|
+
return firstVal || null;
|
|
92
|
+
}
|
|
93
|
+
if (val && typeof val === "object") return val.id || val.value || null;
|
|
94
|
+
return val || null;
|
|
95
|
+
};
|
|
96
|
+
const companyId = getFilterValue(selectedCompany);
|
|
97
|
+
const locationId = getFilterValue(selectedLocation);
|
|
98
|
+
const departmentId = getFilterValue(selectedDepartment);
|
|
99
|
+
if (!companyId || !initialState) return;
|
|
100
|
+
const initialFilters = {
|
|
101
|
+
companyId: getFilterValue(initialState.filters[companyField]),
|
|
102
|
+
locationId: getFilterValue(initialState.filters[locationField]),
|
|
103
|
+
departmentId: getFilterValue(initialState.filters[departmentField])
|
|
104
|
+
};
|
|
105
|
+
const isFilterChanged = initialFilters.companyId !== companyId || initialFilters.locationId !== locationId || initialFilters.departmentId !== departmentId;
|
|
106
|
+
const isTargetFieldsEmpty = Object.keys(fieldToUpdate).every((key) => {
|
|
107
|
+
const path = fieldArrayName ? `${fieldArrayName}.${key}` : key;
|
|
108
|
+
const val = watch == null ? void 0 : watch(path);
|
|
109
|
+
return val === void 0 || val === null || val === "";
|
|
110
|
+
});
|
|
111
|
+
if (!isFilterChanged && !isUpdateAccount && !isTargetFieldsEmpty) {
|
|
112
|
+
Object.entries(initialState.values).forEach(([key, value]) => {
|
|
113
|
+
const path = fieldArrayName ? `${fieldArrayName}.${key}` : key;
|
|
114
|
+
setValue == null ? void 0 : setValue(path, value);
|
|
115
|
+
});
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const filter = `(company_id.eq=${companyId || 1}&location_id.eq=${locationId || null}&department_id.eq=${departmentId || null})`;
|
|
119
|
+
const isUserChangedFilter = isDirtyCompany || isDirtyLocation || isDirtyDepartment;
|
|
120
|
+
const shouldForceUpdate = isUpdateAccount ? isFilterChanged && isUserChangedFilter : isFilterChanged;
|
|
121
|
+
callApi({
|
|
122
|
+
apiFunc: () => api.getV1SettingsConfigurations({
|
|
123
|
+
...api$1.getToken(),
|
|
124
|
+
filters: filter
|
|
125
|
+
}),
|
|
126
|
+
onSuccess: (res) => {
|
|
127
|
+
var _a2;
|
|
128
|
+
updateFields((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.configuration_list, shouldForceUpdate);
|
|
129
|
+
},
|
|
130
|
+
onError: (err) => {
|
|
131
|
+
console.error("Error fetching accounting settings:", err);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}, [selectedCompany, selectedLocation, selectedDepartment, initialState, callApi, setValue, isDirtyCompany, isDirtyLocation, isDirtyDepartment, isUpdateAccount]);
|
|
135
|
+
React.useEffect(() => {
|
|
136
|
+
fetchAndUpdate();
|
|
137
|
+
}, [fetchAndUpdate]);
|
|
138
|
+
return {
|
|
139
|
+
selectedCompany,
|
|
140
|
+
selectedLocation,
|
|
141
|
+
selectedDepartment
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
const useAccountingSetting = ({
|
|
145
|
+
fieldToUpdate,
|
|
146
|
+
fieldArrayName,
|
|
147
|
+
companyField = "company_id",
|
|
148
|
+
locationField = "location_id",
|
|
149
|
+
departmentField = "department_id",
|
|
150
|
+
formMethods,
|
|
151
|
+
customDependencies = [],
|
|
152
|
+
...rest
|
|
153
|
+
}) => {
|
|
154
|
+
const { setValue, control, watch, getFieldState } = formMethods || {};
|
|
155
|
+
return useFormFieldUpdater({
|
|
156
|
+
control,
|
|
157
|
+
setValue,
|
|
158
|
+
watch,
|
|
159
|
+
companyField,
|
|
160
|
+
locationField,
|
|
161
|
+
departmentField,
|
|
162
|
+
fieldToUpdate,
|
|
163
|
+
fieldArrayName,
|
|
164
|
+
customDependencies,
|
|
165
|
+
getFieldState,
|
|
166
|
+
...rest
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
exports.initializeApiBaseUrls = initializeApiBaseUrls;
|
|
170
|
+
exports.useAccountingSetting = useAccountingSetting;
|
|
171
|
+
exports.useFormFieldUpdater = useFormFieldUpdater;
|
|
172
|
+
//# sourceMappingURL=useAccountSetting-BimM7OxP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAccountSetting-BimM7OxP.js","sources":["../../src/hooks/useAccountSetting.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from \"react\";\nimport { Control, FieldValues, Path, PathValue, UseFormSetValue, useWatch } from \"react-hook-form\";\nimport { getApiConfig, getToken, isApiConfigInitialized, onApiConfigReady } from \"../utils\";\nimport { getV1SettingsConfigurations, setBaseUrl } from \"../api-client/api.accounting/api\";\nimport useApi from \"./useApi\";\n\ninterface UpdateMapping {\n [key: string]: string; // Form field name -> API config key\n}\n\ninterface UseFormFieldUpdaterConfig<T extends FieldValues = any> {\n control?: Control<T>;\n setValue?: UseFormSetValue<T>;\n watch?: any;\n fieldToUpdate: UpdateMapping;\n companyField?: string;\n locationField?: string;\n departmentField?: string;\n fieldArrayName?: string;\n transformResponse?: (data: any) => any;\n customDependencies?: any[];\n getFieldState?: any;\n isUpdateAccount?: boolean;\n}\nexport function initializeApiBaseUrls(): void {\n if (!isApiConfigInitialized()) {\n console.warn('API configuration not initialized yet. Base URLs will be set when configuration is available.');\n return;\n }\n\n const config = getApiConfig();\n const baseUrl = config.backendBaseUrl;\n\n setBaseUrl(`${baseUrl}/accounting`);\n}\n\nonApiConfigReady((config) => {\n const baseUrl = config.backendBaseUrl;\n setBaseUrl(`${baseUrl}/accounting`);\n});\n\n\nexport const useFormFieldUpdater = <T extends FieldValues = any>({\n control,\n setValue,\n fieldToUpdate,\n transformResponse,\n watch,\n fieldArrayName,\n companyField = 'company_id',\n locationField = 'location_id',\n departmentField = 'department_id',\n customDependencies = [],\n getFieldState,\n isUpdateAccount = false\n}: UseFormFieldUpdaterConfig<T>) => {\n const { callApi } = useApi();\n\n\n const [initialState, setInitialState] = useState<{\n filters: { [companyField]: any;[locationField]: any;[departmentField]: any };\n values: Record<string, any>;\n } | null>(null);\n const companyPath = fieldArrayName ? `${fieldArrayName}.${companyField}` : companyField;\n const locationPath = fieldArrayName ? `${fieldArrayName}.${locationField}` : locationField;\n const departmentPath = fieldArrayName ? `${fieldArrayName}.${departmentField}` : departmentField;\n const data = watch?.(`${fieldArrayName}`) || {};\n const isDirtyCompany = getFieldState?.(companyPath)?.isDirty;\n const isDirtyLocation = getFieldState?.(locationPath)?.isDirty;\n const isDirtyDepartment = getFieldState?.(departmentPath)?.isDirty;\n const selectedCompany = data?.[companyField] || null;\n const selectedLocation = data?.[locationField] || null;\n const selectedDepartment = data?.[departmentField] || null;\n useEffect(() => {\n if (watch && !initialState) {\n const filters = {\n [companyField]: selectedCompany,\n [locationField]: selectedLocation,\n [departmentField]: selectedDepartment,\n };\n const values: Record<string, any> = {};\n Object.keys(fieldToUpdate).forEach((key) => {\n const path = fieldArrayName ? `${fieldArrayName}.${key}` : key;\n values[key] = watch(path as any);\n });\n\n setInitialState({ filters, values });\n }\n }, [watch, selectedCompany, selectedLocation, selectedDepartment, initialState, companyPath, locationPath, departmentPath, isDirtyCompany, isDirtyLocation, isDirtyDepartment]);\n\n const updateFields = useCallback((data: any, forceUpdate: boolean = false) => {\n if (!setValue || !data) return;\n\n const transformed = transformResponse ? transformResponse(data) : data;\n if (!transformed) return;\n\n Object.entries(fieldToUpdate).forEach(([sourceField, targetField]: any) => {\n const updateValue = transformed?.find((i: any) => i?.config_key == (typeof targetField == 'object' ? targetField.key : targetField));\n if (updateValue !== undefined && updateValue !== null) {\n const path = fieldArrayName ? `${fieldArrayName}.${sourceField}` : sourceField;\n\n // Check if field already has a value - skip update only if NOT force updating (edit mode protection)\n if (!forceUpdate) {\n const existingValue = watch?.(path as any);\n if (existingValue !== undefined && existingValue !== null && existingValue !== '') {\n return; // Skip updating fields that already have values\n }\n }\n\n if (typeof targetField == 'object') {\n targetField.value(updateValue?.reference_id || updateValue?.reference_text);\n } else {\n setValue(path as any, updateValue?.reference_id || updateValue?.reference_text);\n }\n }\n });\n }, [setValue, fieldToUpdate, transformResponse, fieldArrayName, watch, ...customDependencies]);\n\n\n\n const fetchAndUpdate = useCallback(async () => {\n if (!selectedCompany || !initialState) return;\n // Helper to extract ID from array/object values\n const getFilterValue = (val: any) => {\n if (Array.isArray(val)) {\n if (val.length === 0) return null;\n const firstVal = val[0];\n if (firstVal && typeof firstVal === 'object') return firstVal.id || firstVal.value || null;\n return firstVal || null;\n }\n if (val && typeof val === 'object') return val.id || val.value || null;\n return val || null;\n };\n\n const companyId = getFilterValue(selectedCompany);\n const locationId = getFilterValue(selectedLocation);\n const departmentId = getFilterValue(selectedDepartment);\n\n if (!companyId || !initialState) return;\n\n const initialFilters = {\n companyId: getFilterValue(initialState.filters[companyField]),\n locationId: getFilterValue(initialState.filters[locationField]),\n departmentId: getFilterValue(initialState.filters[departmentField]),\n };\n\n const isFilterChanged =\n initialFilters.companyId !== companyId ||\n initialFilters.locationId !== locationId ||\n initialFilters.departmentId !== departmentId;\n\n const isTargetFieldsEmpty = Object.keys(fieldToUpdate).every((key) => {\n const path = fieldArrayName ? `${fieldArrayName}.${key}` : key;\n const val = watch?.(path as any);\n return val === undefined || val === null || val === \"\";\n });\n\n if (!isFilterChanged && !isUpdateAccount && !isTargetFieldsEmpty) {\n Object.entries(initialState.values).forEach(([key, value]) => {\n const path = fieldArrayName ? `${fieldArrayName}.${key}` : key;\n setValue?.(path as any, value as any);\n });\n return;\n }\n\n const filter = `(company_id.eq=${companyId || 1}&location_id.eq=${locationId || null}&department_id.eq=${departmentId || null})`;\n\n // In edit mode (isUpdateAccount=true): only force update if user manually changed filter (isDirty)\n // In add mode: force update when filter changes\n const isUserChangedFilter = isDirtyCompany || isDirtyLocation || isDirtyDepartment;\n const shouldForceUpdate = isUpdateAccount\n ? (isFilterChanged && isUserChangedFilter) // Edit mode: only when user changed\n : isFilterChanged; // Add mode: any filter change\n\n callApi({\n apiFunc: () => getV1SettingsConfigurations({\n ...getToken(),\n filters: filter\n }),\n onSuccess: (res: any) => {\n updateFields(res?.data?.configuration_list, shouldForceUpdate);\n },\n onError: (err) => {\n console.error('Error fetching accounting settings:', err);\n }\n });\n }, [selectedCompany, selectedLocation, selectedDepartment, initialState, callApi, setValue, isDirtyCompany, isDirtyLocation, isDirtyDepartment, isUpdateAccount]);\n\n useEffect(() => {\n fetchAndUpdate();\n }, [fetchAndUpdate]);\n\n return {\n selectedCompany,\n selectedLocation,\n selectedDepartment\n };\n};\n\nexport const useAccountingSetting = ({\n fieldToUpdate,\n fieldArrayName,\n companyField = 'company_id',\n locationField = 'location_id',\n departmentField = 'department_id',\n formMethods,\n customDependencies = [],\n ...rest\n}: {\n fieldToUpdate: any;\n fieldArrayName?: string;\n companyField?: string;\n locationField?: string;\n departmentField?: string;\n setValue?: any;\n control?: any;\n formMethods?: any;\n customDependencies?: any[];\n}) => {\n const { setValue, control, watch, getFieldState } = formMethods || {};\n\n return useFormFieldUpdater({\n control,\n setValue,\n watch,\n companyField,\n locationField,\n departmentField,\n fieldToUpdate,\n fieldArrayName,\n customDependencies,\n getFieldState,\n ...rest\n });\n};"],"names":["isApiConfigInitialized","getApiConfig","setBaseUrl","onApiConfigReady","useApi","useState","useEffect","useCallback","data","getV1SettingsConfigurations","getToken","_a"],"mappings":"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"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { useState, useEffect, useCallback } from "react";
|
|
2
|
+
import { isApiConfigInitialized, getApiConfig, onApiConfigReady } from "../utils/api-config/index.esm.js";
|
|
3
|
+
import { ab as getToken } from "./api-u1lKzJVv.esm.js";
|
|
4
|
+
import { h as getV1SettingsConfigurations, s as setBaseUrl } from "./api-CuStx4qV.esm.js";
|
|
5
|
+
import { u as useApi } from "./useApi-DgCJzWyy.esm.js";
|
|
6
|
+
function initializeApiBaseUrls() {
|
|
7
|
+
if (!isApiConfigInitialized()) {
|
|
8
|
+
console.warn("API configuration not initialized yet. Base URLs will be set when configuration is available.");
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const config = getApiConfig();
|
|
12
|
+
const baseUrl = config.backendBaseUrl;
|
|
13
|
+
setBaseUrl(`${baseUrl}/accounting`);
|
|
14
|
+
}
|
|
15
|
+
onApiConfigReady((config) => {
|
|
16
|
+
const baseUrl = config.backendBaseUrl;
|
|
17
|
+
setBaseUrl(`${baseUrl}/accounting`);
|
|
18
|
+
});
|
|
19
|
+
const useFormFieldUpdater = ({
|
|
20
|
+
control,
|
|
21
|
+
setValue,
|
|
22
|
+
fieldToUpdate,
|
|
23
|
+
transformResponse,
|
|
24
|
+
watch,
|
|
25
|
+
fieldArrayName,
|
|
26
|
+
companyField = "company_id",
|
|
27
|
+
locationField = "location_id",
|
|
28
|
+
departmentField = "department_id",
|
|
29
|
+
customDependencies = [],
|
|
30
|
+
getFieldState,
|
|
31
|
+
isUpdateAccount = false
|
|
32
|
+
}) => {
|
|
33
|
+
var _a, _b, _c;
|
|
34
|
+
const { callApi } = useApi();
|
|
35
|
+
const [initialState, setInitialState] = useState(null);
|
|
36
|
+
const companyPath = fieldArrayName ? `${fieldArrayName}.${companyField}` : companyField;
|
|
37
|
+
const locationPath = fieldArrayName ? `${fieldArrayName}.${locationField}` : locationField;
|
|
38
|
+
const departmentPath = fieldArrayName ? `${fieldArrayName}.${departmentField}` : departmentField;
|
|
39
|
+
const data = (watch == null ? void 0 : watch(`${fieldArrayName}`)) || {};
|
|
40
|
+
const isDirtyCompany = (_a = getFieldState == null ? void 0 : getFieldState(companyPath)) == null ? void 0 : _a.isDirty;
|
|
41
|
+
const isDirtyLocation = (_b = getFieldState == null ? void 0 : getFieldState(locationPath)) == null ? void 0 : _b.isDirty;
|
|
42
|
+
const isDirtyDepartment = (_c = getFieldState == null ? void 0 : getFieldState(departmentPath)) == null ? void 0 : _c.isDirty;
|
|
43
|
+
const selectedCompany = (data == null ? void 0 : data[companyField]) || null;
|
|
44
|
+
const selectedLocation = (data == null ? void 0 : data[locationField]) || null;
|
|
45
|
+
const selectedDepartment = (data == null ? void 0 : data[departmentField]) || null;
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (watch && !initialState) {
|
|
48
|
+
const filters = {
|
|
49
|
+
[companyField]: selectedCompany,
|
|
50
|
+
[locationField]: selectedLocation,
|
|
51
|
+
[departmentField]: selectedDepartment
|
|
52
|
+
};
|
|
53
|
+
const values = {};
|
|
54
|
+
Object.keys(fieldToUpdate).forEach((key) => {
|
|
55
|
+
const path = fieldArrayName ? `${fieldArrayName}.${key}` : key;
|
|
56
|
+
values[key] = watch(path);
|
|
57
|
+
});
|
|
58
|
+
setInitialState({ filters, values });
|
|
59
|
+
}
|
|
60
|
+
}, [watch, selectedCompany, selectedLocation, selectedDepartment, initialState, companyPath, locationPath, departmentPath, isDirtyCompany, isDirtyLocation, isDirtyDepartment]);
|
|
61
|
+
const updateFields = useCallback((data2, forceUpdate = false) => {
|
|
62
|
+
if (!setValue || !data2) return;
|
|
63
|
+
const transformed = transformResponse ? transformResponse(data2) : data2;
|
|
64
|
+
if (!transformed) return;
|
|
65
|
+
Object.entries(fieldToUpdate).forEach(([sourceField, targetField]) => {
|
|
66
|
+
const updateValue = transformed == null ? void 0 : transformed.find((i) => (i == null ? void 0 : i.config_key) == (typeof targetField == "object" ? targetField.key : targetField));
|
|
67
|
+
if (updateValue !== void 0 && updateValue !== null) {
|
|
68
|
+
const path = fieldArrayName ? `${fieldArrayName}.${sourceField}` : sourceField;
|
|
69
|
+
if (!forceUpdate) {
|
|
70
|
+
const existingValue = watch == null ? void 0 : watch(path);
|
|
71
|
+
if (existingValue !== void 0 && existingValue !== null && existingValue !== "") {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (typeof targetField == "object") {
|
|
76
|
+
targetField.value((updateValue == null ? void 0 : updateValue.reference_id) || (updateValue == null ? void 0 : updateValue.reference_text));
|
|
77
|
+
} else {
|
|
78
|
+
setValue(path, (updateValue == null ? void 0 : updateValue.reference_id) || (updateValue == null ? void 0 : updateValue.reference_text));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}, [setValue, fieldToUpdate, transformResponse, fieldArrayName, watch, ...customDependencies]);
|
|
83
|
+
const fetchAndUpdate = useCallback(async () => {
|
|
84
|
+
if (!selectedCompany || !initialState) return;
|
|
85
|
+
const getFilterValue = (val) => {
|
|
86
|
+
if (Array.isArray(val)) {
|
|
87
|
+
if (val.length === 0) return null;
|
|
88
|
+
const firstVal = val[0];
|
|
89
|
+
if (firstVal && typeof firstVal === "object") return firstVal.id || firstVal.value || null;
|
|
90
|
+
return firstVal || null;
|
|
91
|
+
}
|
|
92
|
+
if (val && typeof val === "object") return val.id || val.value || null;
|
|
93
|
+
return val || null;
|
|
94
|
+
};
|
|
95
|
+
const companyId = getFilterValue(selectedCompany);
|
|
96
|
+
const locationId = getFilterValue(selectedLocation);
|
|
97
|
+
const departmentId = getFilterValue(selectedDepartment);
|
|
98
|
+
if (!companyId || !initialState) return;
|
|
99
|
+
const initialFilters = {
|
|
100
|
+
companyId: getFilterValue(initialState.filters[companyField]),
|
|
101
|
+
locationId: getFilterValue(initialState.filters[locationField]),
|
|
102
|
+
departmentId: getFilterValue(initialState.filters[departmentField])
|
|
103
|
+
};
|
|
104
|
+
const isFilterChanged = initialFilters.companyId !== companyId || initialFilters.locationId !== locationId || initialFilters.departmentId !== departmentId;
|
|
105
|
+
const isTargetFieldsEmpty = Object.keys(fieldToUpdate).every((key) => {
|
|
106
|
+
const path = fieldArrayName ? `${fieldArrayName}.${key}` : key;
|
|
107
|
+
const val = watch == null ? void 0 : watch(path);
|
|
108
|
+
return val === void 0 || val === null || val === "";
|
|
109
|
+
});
|
|
110
|
+
if (!isFilterChanged && !isUpdateAccount && !isTargetFieldsEmpty) {
|
|
111
|
+
Object.entries(initialState.values).forEach(([key, value]) => {
|
|
112
|
+
const path = fieldArrayName ? `${fieldArrayName}.${key}` : key;
|
|
113
|
+
setValue == null ? void 0 : setValue(path, value);
|
|
114
|
+
});
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const filter = `(company_id.eq=${companyId || 1}&location_id.eq=${locationId || null}&department_id.eq=${departmentId || null})`;
|
|
118
|
+
const isUserChangedFilter = isDirtyCompany || isDirtyLocation || isDirtyDepartment;
|
|
119
|
+
const shouldForceUpdate = isUpdateAccount ? isFilterChanged && isUserChangedFilter : isFilterChanged;
|
|
120
|
+
callApi({
|
|
121
|
+
apiFunc: () => getV1SettingsConfigurations({
|
|
122
|
+
...getToken(),
|
|
123
|
+
filters: filter
|
|
124
|
+
}),
|
|
125
|
+
onSuccess: (res) => {
|
|
126
|
+
var _a2;
|
|
127
|
+
updateFields((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.configuration_list, shouldForceUpdate);
|
|
128
|
+
},
|
|
129
|
+
onError: (err) => {
|
|
130
|
+
console.error("Error fetching accounting settings:", err);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}, [selectedCompany, selectedLocation, selectedDepartment, initialState, callApi, setValue, isDirtyCompany, isDirtyLocation, isDirtyDepartment, isUpdateAccount]);
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
fetchAndUpdate();
|
|
136
|
+
}, [fetchAndUpdate]);
|
|
137
|
+
return {
|
|
138
|
+
selectedCompany,
|
|
139
|
+
selectedLocation,
|
|
140
|
+
selectedDepartment
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
const useAccountingSetting = ({
|
|
144
|
+
fieldToUpdate,
|
|
145
|
+
fieldArrayName,
|
|
146
|
+
companyField = "company_id",
|
|
147
|
+
locationField = "location_id",
|
|
148
|
+
departmentField = "department_id",
|
|
149
|
+
formMethods,
|
|
150
|
+
customDependencies = [],
|
|
151
|
+
...rest
|
|
152
|
+
}) => {
|
|
153
|
+
const { setValue, control, watch, getFieldState } = formMethods || {};
|
|
154
|
+
return useFormFieldUpdater({
|
|
155
|
+
control,
|
|
156
|
+
setValue,
|
|
157
|
+
watch,
|
|
158
|
+
companyField,
|
|
159
|
+
locationField,
|
|
160
|
+
departmentField,
|
|
161
|
+
fieldToUpdate,
|
|
162
|
+
fieldArrayName,
|
|
163
|
+
customDependencies,
|
|
164
|
+
getFieldState,
|
|
165
|
+
...rest
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
export {
|
|
169
|
+
useFormFieldUpdater as a,
|
|
170
|
+
initializeApiBaseUrls as i,
|
|
171
|
+
useAccountingSetting as u
|
|
172
|
+
};
|
|
173
|
+
//# sourceMappingURL=useAccountSetting-BsIE2d1l.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAccountSetting-BsIE2d1l.esm.js","sources":["../../src/hooks/useAccountSetting.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from \"react\";\nimport { Control, FieldValues, Path, PathValue, UseFormSetValue, useWatch } from \"react-hook-form\";\nimport { getApiConfig, getToken, isApiConfigInitialized, onApiConfigReady } from \"../utils\";\nimport { getV1SettingsConfigurations, setBaseUrl } from \"../api-client/api.accounting/api\";\nimport useApi from \"./useApi\";\n\ninterface UpdateMapping {\n [key: string]: string; // Form field name -> API config key\n}\n\ninterface UseFormFieldUpdaterConfig<T extends FieldValues = any> {\n control?: Control<T>;\n setValue?: UseFormSetValue<T>;\n watch?: any;\n fieldToUpdate: UpdateMapping;\n companyField?: string;\n locationField?: string;\n departmentField?: string;\n fieldArrayName?: string;\n transformResponse?: (data: any) => any;\n customDependencies?: any[];\n getFieldState?: any;\n isUpdateAccount?: boolean;\n}\nexport function initializeApiBaseUrls(): void {\n if (!isApiConfigInitialized()) {\n console.warn('API configuration not initialized yet. Base URLs will be set when configuration is available.');\n return;\n }\n\n const config = getApiConfig();\n const baseUrl = config.backendBaseUrl;\n\n setBaseUrl(`${baseUrl}/accounting`);\n}\n\nonApiConfigReady((config) => {\n const baseUrl = config.backendBaseUrl;\n setBaseUrl(`${baseUrl}/accounting`);\n});\n\n\nexport const useFormFieldUpdater = <T extends FieldValues = any>({\n control,\n setValue,\n fieldToUpdate,\n transformResponse,\n watch,\n fieldArrayName,\n companyField = 'company_id',\n locationField = 'location_id',\n departmentField = 'department_id',\n customDependencies = [],\n getFieldState,\n isUpdateAccount = false\n}: UseFormFieldUpdaterConfig<T>) => {\n const { callApi } = useApi();\n\n\n const [initialState, setInitialState] = useState<{\n filters: { [companyField]: any;[locationField]: any;[departmentField]: any };\n values: Record<string, any>;\n } | null>(null);\n const companyPath = fieldArrayName ? `${fieldArrayName}.${companyField}` : companyField;\n const locationPath = fieldArrayName ? `${fieldArrayName}.${locationField}` : locationField;\n const departmentPath = fieldArrayName ? `${fieldArrayName}.${departmentField}` : departmentField;\n const data = watch?.(`${fieldArrayName}`) || {};\n const isDirtyCompany = getFieldState?.(companyPath)?.isDirty;\n const isDirtyLocation = getFieldState?.(locationPath)?.isDirty;\n const isDirtyDepartment = getFieldState?.(departmentPath)?.isDirty;\n const selectedCompany = data?.[companyField] || null;\n const selectedLocation = data?.[locationField] || null;\n const selectedDepartment = data?.[departmentField] || null;\n useEffect(() => {\n if (watch && !initialState) {\n const filters = {\n [companyField]: selectedCompany,\n [locationField]: selectedLocation,\n [departmentField]: selectedDepartment,\n };\n const values: Record<string, any> = {};\n Object.keys(fieldToUpdate).forEach((key) => {\n const path = fieldArrayName ? `${fieldArrayName}.${key}` : key;\n values[key] = watch(path as any);\n });\n\n setInitialState({ filters, values });\n }\n }, [watch, selectedCompany, selectedLocation, selectedDepartment, initialState, companyPath, locationPath, departmentPath, isDirtyCompany, isDirtyLocation, isDirtyDepartment]);\n\n const updateFields = useCallback((data: any, forceUpdate: boolean = false) => {\n if (!setValue || !data) return;\n\n const transformed = transformResponse ? transformResponse(data) : data;\n if (!transformed) return;\n\n Object.entries(fieldToUpdate).forEach(([sourceField, targetField]: any) => {\n const updateValue = transformed?.find((i: any) => i?.config_key == (typeof targetField == 'object' ? targetField.key : targetField));\n if (updateValue !== undefined && updateValue !== null) {\n const path = fieldArrayName ? `${fieldArrayName}.${sourceField}` : sourceField;\n\n // Check if field already has a value - skip update only if NOT force updating (edit mode protection)\n if (!forceUpdate) {\n const existingValue = watch?.(path as any);\n if (existingValue !== undefined && existingValue !== null && existingValue !== '') {\n return; // Skip updating fields that already have values\n }\n }\n\n if (typeof targetField == 'object') {\n targetField.value(updateValue?.reference_id || updateValue?.reference_text);\n } else {\n setValue(path as any, updateValue?.reference_id || updateValue?.reference_text);\n }\n }\n });\n }, [setValue, fieldToUpdate, transformResponse, fieldArrayName, watch, ...customDependencies]);\n\n\n\n const fetchAndUpdate = useCallback(async () => {\n if (!selectedCompany || !initialState) return;\n // Helper to extract ID from array/object values\n const getFilterValue = (val: any) => {\n if (Array.isArray(val)) {\n if (val.length === 0) return null;\n const firstVal = val[0];\n if (firstVal && typeof firstVal === 'object') return firstVal.id || firstVal.value || null;\n return firstVal || null;\n }\n if (val && typeof val === 'object') return val.id || val.value || null;\n return val || null;\n };\n\n const companyId = getFilterValue(selectedCompany);\n const locationId = getFilterValue(selectedLocation);\n const departmentId = getFilterValue(selectedDepartment);\n\n if (!companyId || !initialState) return;\n\n const initialFilters = {\n companyId: getFilterValue(initialState.filters[companyField]),\n locationId: getFilterValue(initialState.filters[locationField]),\n departmentId: getFilterValue(initialState.filters[departmentField]),\n };\n\n const isFilterChanged =\n initialFilters.companyId !== companyId ||\n initialFilters.locationId !== locationId ||\n initialFilters.departmentId !== departmentId;\n\n const isTargetFieldsEmpty = Object.keys(fieldToUpdate).every((key) => {\n const path = fieldArrayName ? `${fieldArrayName}.${key}` : key;\n const val = watch?.(path as any);\n return val === undefined || val === null || val === \"\";\n });\n\n if (!isFilterChanged && !isUpdateAccount && !isTargetFieldsEmpty) {\n Object.entries(initialState.values).forEach(([key, value]) => {\n const path = fieldArrayName ? `${fieldArrayName}.${key}` : key;\n setValue?.(path as any, value as any);\n });\n return;\n }\n\n const filter = `(company_id.eq=${companyId || 1}&location_id.eq=${locationId || null}&department_id.eq=${departmentId || null})`;\n\n // In edit mode (isUpdateAccount=true): only force update if user manually changed filter (isDirty)\n // In add mode: force update when filter changes\n const isUserChangedFilter = isDirtyCompany || isDirtyLocation || isDirtyDepartment;\n const shouldForceUpdate = isUpdateAccount\n ? (isFilterChanged && isUserChangedFilter) // Edit mode: only when user changed\n : isFilterChanged; // Add mode: any filter change\n\n callApi({\n apiFunc: () => getV1SettingsConfigurations({\n ...getToken(),\n filters: filter\n }),\n onSuccess: (res: any) => {\n updateFields(res?.data?.configuration_list, shouldForceUpdate);\n },\n onError: (err) => {\n console.error('Error fetching accounting settings:', err);\n }\n });\n }, [selectedCompany, selectedLocation, selectedDepartment, initialState, callApi, setValue, isDirtyCompany, isDirtyLocation, isDirtyDepartment, isUpdateAccount]);\n\n useEffect(() => {\n fetchAndUpdate();\n }, [fetchAndUpdate]);\n\n return {\n selectedCompany,\n selectedLocation,\n selectedDepartment\n };\n};\n\nexport const useAccountingSetting = ({\n fieldToUpdate,\n fieldArrayName,\n companyField = 'company_id',\n locationField = 'location_id',\n departmentField = 'department_id',\n formMethods,\n customDependencies = [],\n ...rest\n}: {\n fieldToUpdate: any;\n fieldArrayName?: string;\n companyField?: string;\n locationField?: string;\n departmentField?: string;\n setValue?: any;\n control?: any;\n formMethods?: any;\n customDependencies?: any[];\n}) => {\n const { setValue, control, watch, getFieldState } = formMethods || {};\n\n return useFormFieldUpdater({\n control,\n setValue,\n watch,\n companyField,\n locationField,\n departmentField,\n fieldToUpdate,\n fieldArrayName,\n customDependencies,\n getFieldState,\n ...rest\n });\n};"],"names":["data","_a"],"mappings":"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"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { h as checkSkuAndItemName } from "./api-u1lKzJVv.esm.js";
|
|
3
|
+
const useNameSkuUniquenessCheck = ({
|
|
4
|
+
fieldPrefix,
|
|
5
|
+
formMethods,
|
|
6
|
+
data
|
|
7
|
+
}) => {
|
|
8
|
+
const { watch = () => {
|
|
9
|
+
}, setError = () => {
|
|
10
|
+
} } = formMethods || {};
|
|
11
|
+
const formValues = watch(fieldPrefix);
|
|
12
|
+
const namePrev = data == null ? void 0 : data.name;
|
|
13
|
+
const skuPrev = data == null ? void 0 : data.sku;
|
|
14
|
+
const checkNameAndSkuUniqueness = useCallback(async () => {
|
|
15
|
+
let isUnique = true;
|
|
16
|
+
try {
|
|
17
|
+
if (namePrev === (formValues == null ? void 0 : formValues.name) && skuPrev === (formValues == null ? void 0 : formValues.sku)) return true;
|
|
18
|
+
const response = await checkSkuAndItemName({
|
|
19
|
+
name: formValues == null ? void 0 : formValues.name,
|
|
20
|
+
sku: formValues == null ? void 0 : formValues.sku,
|
|
21
|
+
...(data == null ? void 0 : data.id) && { id: data == null ? void 0 : data.id }
|
|
22
|
+
});
|
|
23
|
+
if (response.name) {
|
|
24
|
+
setError(`${fieldPrefix}.name`, {
|
|
25
|
+
message: "Name already exists",
|
|
26
|
+
type: "manual",
|
|
27
|
+
ref: `${fieldPrefix}.name`
|
|
28
|
+
});
|
|
29
|
+
isUnique = false;
|
|
30
|
+
}
|
|
31
|
+
if (response.sku) {
|
|
32
|
+
setError(`${fieldPrefix}.sku`, {
|
|
33
|
+
message: "SKU already exists",
|
|
34
|
+
type: "manual",
|
|
35
|
+
ref: `${fieldPrefix}.sku`
|
|
36
|
+
});
|
|
37
|
+
isUnique = false;
|
|
38
|
+
}
|
|
39
|
+
return isUnique;
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error("Uniqueness check failed:", error);
|
|
42
|
+
return isUnique;
|
|
43
|
+
}
|
|
44
|
+
}, [formValues == null ? void 0 : formValues.name, formValues == null ? void 0 : formValues.sku, setError]);
|
|
45
|
+
return { checkNameAndSkuUniqueness };
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
useNameSkuUniquenessCheck as u
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=useCheckSkuAndName-C0twPQja.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCheckSkuAndName-C0twPQja.esm.js","sources":["../../src/hooks/useCheckSkuAndName.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { checkSkuAndItemName } from '../utils/common';\n\nexport interface IUseNameSkuUniquenessCheckProps {\n fieldPrefix: string;\n formMethods: any;\n data?: any;\n}\n\nexport const useNameSkuUniquenessCheck = ({\n fieldPrefix,\n formMethods,\n data,\n}: IUseNameSkuUniquenessCheckProps) => {\n const { watch=()=>{}, setError=()=>{} } = formMethods||{};\n const formValues = watch(fieldPrefix);\n\n const namePrev = data?.name;\n const skuPrev= data?.sku\n const checkNameAndSkuUniqueness = useCallback(async () => {\n let isUnique=true; \n\n try {\n if(namePrev===formValues?.name && skuPrev===formValues?.sku) return true;\n const response = await checkSkuAndItemName({\n name: formValues?.name,\n sku: formValues?.sku,\n ...(data?.id && { id: data?.id }),\n });\n if (response.name) {\n setError(`${fieldPrefix}.name`, {\n message: 'Name already exists',\n type: 'manual',\n ref: `${fieldPrefix}.name`,\n });\n isUnique=false;\n }\n\n if (response.sku) {\n setError(`${fieldPrefix}.sku`, {\n message: 'SKU already exists',\n type: 'manual',\n ref: `${fieldPrefix}.sku`,\n });\n isUnique=false;\n }\n\n return isUnique;\n } catch (error) {\n console.error('Uniqueness check failed:', error);\n return isUnique;\n }\n //eslint-disable-next-line\n }, [formValues?.name, formValues?.sku, setError]);\n\n return { checkNameAndSkuUniqueness };\n};\n\nexport default useNameSkuUniquenessCheck;\n"],"names":[],"mappings":";;AASO,MAAM,4BAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AACF,MAAuC;AACrC,QAAM,EAAE,QAAM,MAAI;AAAA,EAAC,GAAG,WAAS,MAAI;AAAA,EAAC,EAAA,IAAM,eAAa,CAAA;AACvD,QAAM,aAAa,MAAM,WAAW;AAEpC,QAAM,WAAW,6BAAM;AACvB,QAAM,UAAS,6BAAM;AACrB,QAAM,4BAA4B,YAAY,YAAY;AAC3D,QAAI,WAAS;AAEV,QAAI;AACF,UAAG,cAAW,yCAAY,SAAQ,aAAU,yCAAY,KAAK,QAAO;AACpE,YAAM,WAAW,MAAM,oBAAoB;AAAA,QACzC,MAAM,yCAAY;AAAA,QAClB,KAAK,yCAAY;AAAA,QACjB,IAAI,6BAAM,OAAM,EAAE,IAAI,6BAAM,GAAA;AAAA,MAAG,CAChC;AACD,UAAI,SAAS,MAAM;AACjB,iBAAS,GAAG,WAAW,SAAS;AAAA,UAC9B,SAAS;AAAA,UACT,MAAM;AAAA,UACN,KAAK,GAAG,WAAW;AAAA,QAAA,CACpB;AACD,mBAAS;AAAA,MACX;AAEA,UAAI,SAAS,KAAK;AAChB,iBAAS,GAAG,WAAW,QAAQ;AAAA,UAC7B,SAAS;AAAA,UACT,MAAM;AAAA,UACN,KAAK,GAAG,WAAW;AAAA,QAAA,CACpB;AACD,mBAAS;AAAA,MACX;AAEA,aAAO;AAAA,IACT,SAAS,OAAO;AACd,cAAQ,MAAM,4BAA4B,KAAK;AAC/C,aAAO;AAAA,IACT;AAAA,EAEF,GAAG,CAAC,yCAAY,MAAM,yCAAY,KAAK,QAAQ,CAAC;AAEhD,SAAO,EAAE,0BAAA;AACX;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const React = require("react");
|
|
3
|
+
const api = require("./api-DwmixHAO.js");
|
|
4
|
+
const useNameSkuUniquenessCheck = ({
|
|
5
|
+
fieldPrefix,
|
|
6
|
+
formMethods,
|
|
7
|
+
data
|
|
8
|
+
}) => {
|
|
9
|
+
const { watch = () => {
|
|
10
|
+
}, setError = () => {
|
|
11
|
+
} } = formMethods || {};
|
|
12
|
+
const formValues = watch(fieldPrefix);
|
|
13
|
+
const namePrev = data == null ? void 0 : data.name;
|
|
14
|
+
const skuPrev = data == null ? void 0 : data.sku;
|
|
15
|
+
const checkNameAndSkuUniqueness = React.useCallback(async () => {
|
|
16
|
+
let isUnique = true;
|
|
17
|
+
try {
|
|
18
|
+
if (namePrev === (formValues == null ? void 0 : formValues.name) && skuPrev === (formValues == null ? void 0 : formValues.sku)) return true;
|
|
19
|
+
const response = await api.checkSkuAndItemName({
|
|
20
|
+
name: formValues == null ? void 0 : formValues.name,
|
|
21
|
+
sku: formValues == null ? void 0 : formValues.sku,
|
|
22
|
+
...(data == null ? void 0 : data.id) && { id: data == null ? void 0 : data.id }
|
|
23
|
+
});
|
|
24
|
+
if (response.name) {
|
|
25
|
+
setError(`${fieldPrefix}.name`, {
|
|
26
|
+
message: "Name already exists",
|
|
27
|
+
type: "manual",
|
|
28
|
+
ref: `${fieldPrefix}.name`
|
|
29
|
+
});
|
|
30
|
+
isUnique = false;
|
|
31
|
+
}
|
|
32
|
+
if (response.sku) {
|
|
33
|
+
setError(`${fieldPrefix}.sku`, {
|
|
34
|
+
message: "SKU already exists",
|
|
35
|
+
type: "manual",
|
|
36
|
+
ref: `${fieldPrefix}.sku`
|
|
37
|
+
});
|
|
38
|
+
isUnique = false;
|
|
39
|
+
}
|
|
40
|
+
return isUnique;
|
|
41
|
+
} catch (error) {
|
|
42
|
+
console.error("Uniqueness check failed:", error);
|
|
43
|
+
return isUnique;
|
|
44
|
+
}
|
|
45
|
+
}, [formValues == null ? void 0 : formValues.name, formValues == null ? void 0 : formValues.sku, setError]);
|
|
46
|
+
return { checkNameAndSkuUniqueness };
|
|
47
|
+
};
|
|
48
|
+
exports.useNameSkuUniquenessCheck = useNameSkuUniquenessCheck;
|
|
49
|
+
//# sourceMappingURL=useCheckSkuAndName-CQq8Le-_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCheckSkuAndName-CQq8Le-_.js","sources":["../../src/hooks/useCheckSkuAndName.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { checkSkuAndItemName } from '../utils/common';\n\nexport interface IUseNameSkuUniquenessCheckProps {\n fieldPrefix: string;\n formMethods: any;\n data?: any;\n}\n\nexport const useNameSkuUniquenessCheck = ({\n fieldPrefix,\n formMethods,\n data,\n}: IUseNameSkuUniquenessCheckProps) => {\n const { watch=()=>{}, setError=()=>{} } = formMethods||{};\n const formValues = watch(fieldPrefix);\n\n const namePrev = data?.name;\n const skuPrev= data?.sku\n const checkNameAndSkuUniqueness = useCallback(async () => {\n let isUnique=true; \n\n try {\n if(namePrev===formValues?.name && skuPrev===formValues?.sku) return true;\n const response = await checkSkuAndItemName({\n name: formValues?.name,\n sku: formValues?.sku,\n ...(data?.id && { id: data?.id }),\n });\n if (response.name) {\n setError(`${fieldPrefix}.name`, {\n message: 'Name already exists',\n type: 'manual',\n ref: `${fieldPrefix}.name`,\n });\n isUnique=false;\n }\n\n if (response.sku) {\n setError(`${fieldPrefix}.sku`, {\n message: 'SKU already exists',\n type: 'manual',\n ref: `${fieldPrefix}.sku`,\n });\n isUnique=false;\n }\n\n return isUnique;\n } catch (error) {\n console.error('Uniqueness check failed:', error);\n return isUnique;\n }\n //eslint-disable-next-line\n }, [formValues?.name, formValues?.sku, setError]);\n\n return { checkNameAndSkuUniqueness };\n};\n\nexport default useNameSkuUniquenessCheck;\n"],"names":["useCallback","checkSkuAndItemName"],"mappings":";;;AASO,MAAM,4BAA4B,CAAC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AACF,MAAuC;AACrC,QAAM,EAAE,QAAM,MAAI;AAAA,EAAC,GAAG,WAAS,MAAI;AAAA,EAAC,EAAA,IAAM,eAAa,CAAA;AACvD,QAAM,aAAa,MAAM,WAAW;AAEpC,QAAM,WAAW,6BAAM;AACvB,QAAM,UAAS,6BAAM;AACrB,QAAM,4BAA4BA,MAAAA,YAAY,YAAY;AAC3D,QAAI,WAAS;AAEV,QAAI;AACF,UAAG,cAAW,yCAAY,SAAQ,aAAU,yCAAY,KAAK,QAAO;AACpE,YAAM,WAAW,MAAMC,wBAAoB;AAAA,QACzC,MAAM,yCAAY;AAAA,QAClB,KAAK,yCAAY;AAAA,QACjB,IAAI,6BAAM,OAAM,EAAE,IAAI,6BAAM,GAAA;AAAA,MAAG,CAChC;AACD,UAAI,SAAS,MAAM;AACjB,iBAAS,GAAG,WAAW,SAAS;AAAA,UAC9B,SAAS;AAAA,UACT,MAAM;AAAA,UACN,KAAK,GAAG,WAAW;AAAA,QAAA,CACpB;AACD,mBAAS;AAAA,MACX;AAEA,UAAI,SAAS,KAAK;AAChB,iBAAS,GAAG,WAAW,QAAQ;AAAA,UAC7B,SAAS;AAAA,UACT,MAAM;AAAA,UACN,KAAK,GAAG,WAAW;AAAA,QAAA,CACpB;AACD,mBAAS;AAAA,MACX;AAEA,aAAO;AAAA,IACT,SAAS,OAAO;AACd,cAAQ,MAAM,4BAA4B,KAAK;AAC/C,aAAO;AAAA,IACT;AAAA,EAEF,GAAG,CAAC,yCAAY,MAAM,yCAAY,KAAK,QAAQ,CAAC;AAEhD,SAAO,EAAE,0BAAA;AACX;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const ERPUIProvider = require("./ERPUIProvider-O6cQFkJq.js");
|
|
3
|
+
const useReduxIntegration = () => {
|
|
4
|
+
const { useRedux, apiClient } = ERPUIProvider.useERPUI();
|
|
5
|
+
const useConditionalRedux = (reduxHook, fallbackValue) => {
|
|
6
|
+
if (!useRedux) {
|
|
7
|
+
return fallbackValue;
|
|
8
|
+
}
|
|
9
|
+
try {
|
|
10
|
+
return reduxHook();
|
|
11
|
+
} catch (error) {
|
|
12
|
+
console.warn("Redux hook failed, falling back to default value:", error);
|
|
13
|
+
return fallbackValue;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const conditionalDispatch = (action) => {
|
|
17
|
+
if (!useRedux) {
|
|
18
|
+
console.warn("Redux not enabled, cannot dispatch action:", action);
|
|
19
|
+
return Promise.resolve();
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
const { useAppDispatch } = require("../redux/hooks");
|
|
23
|
+
const dispatch = useAppDispatch();
|
|
24
|
+
return dispatch(action);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.error("Failed to dispatch Redux action:", error);
|
|
27
|
+
return Promise.reject(error);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
useRedux,
|
|
32
|
+
apiClient,
|
|
33
|
+
useConditionalRedux,
|
|
34
|
+
conditionalDispatch
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
exports.useReduxIntegration = useReduxIntegration;
|
|
38
|
+
//# sourceMappingURL=useReduxIntegration-B5GrPUbT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReduxIntegration-B5GrPUbT.js","sources":["../../src/hooks/useReduxIntegration.ts"],"sourcesContent":["import { useERPUI } from '../components/providers/ERPUIProvider';\n\n/**\n * Hook to determine Redux integration status and provide conditional Redux usage\n */\nexport const useReduxIntegration = () => {\n const { useRedux, apiClient } = useERPUI();\n \n // Helper function to conditionally use Redux hooks\n const useConditionalRedux = <T>(\n reduxHook: () => T,\n fallbackValue: T\n ): T => {\n if (!useRedux) {\n return fallbackValue;\n }\n \n try {\n return reduxHook();\n } catch (error) {\n console.warn('Redux hook failed, falling back to default value:', error);\n return fallbackValue;\n }\n };\n \n // Helper function to conditionally dispatch Redux actions\n const conditionalDispatch = (action: any) => {\n if (!useRedux) {\n console.warn('Redux not enabled, cannot dispatch action:', action);\n return Promise.resolve();\n }\n \n try {\n const { useAppDispatch } = require('../redux/hooks');\n const dispatch = useAppDispatch();\n return dispatch(action);\n } catch (error) {\n console.error('Failed to dispatch Redux action:', error);\n return Promise.reject(error);\n }\n };\n \n return {\n useRedux,\n apiClient,\n useConditionalRedux,\n conditionalDispatch,\n };\n};"],"names":["useERPUI"],"mappings":";;AAKO,MAAM,sBAAsB,MAAM;AACvC,QAAM,EAAE,UAAU,UAAA,IAAcA,uBAAA;AAGhC,QAAM,sBAAsB,CAC1B,WACA,kBACM;AACN,QAAI,CAAC,UAAU;AACb,aAAO;AAAA,IACT;AAEA,QAAI;AACF,aAAO,UAAA;AAAA,IACT,SAAS,OAAO;AACd,cAAQ,KAAK,qDAAqD,KAAK;AACvE,aAAO;AAAA,IACT;AAAA,EACF;AAGA,QAAM,sBAAsB,CAAC,WAAgB;AAC3C,QAAI,CAAC,UAAU;AACb,cAAQ,KAAK,8CAA8C,MAAM;AACjE,aAAO,QAAQ,QAAA;AAAA,IACjB;AAEA,QAAI;AACF,YAAM,EAAE,eAAA,IAAmB,QAAQ,gBAAgB;AACnD,YAAM,WAAW,eAAA;AACjB,aAAO,SAAS,MAAM;AAAA,IACxB,SAAS,OAAO;AACd,cAAQ,MAAM,oCAAoC,KAAK;AACvD,aAAO,QAAQ,OAAO,KAAK;AAAA,IAC7B;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { u as useERPUI } from "./ERPUIProvider-D1yQ1CmD.esm.js";
|
|
2
|
+
const useReduxIntegration = () => {
|
|
3
|
+
const { useRedux, apiClient } = useERPUI();
|
|
4
|
+
const useConditionalRedux = (reduxHook, fallbackValue) => {
|
|
5
|
+
if (!useRedux) {
|
|
6
|
+
return fallbackValue;
|
|
7
|
+
}
|
|
8
|
+
try {
|
|
9
|
+
return reduxHook();
|
|
10
|
+
} catch (error) {
|
|
11
|
+
console.warn("Redux hook failed, falling back to default value:", error);
|
|
12
|
+
return fallbackValue;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const conditionalDispatch = (action) => {
|
|
16
|
+
if (!useRedux) {
|
|
17
|
+
console.warn("Redux not enabled, cannot dispatch action:", action);
|
|
18
|
+
return Promise.resolve();
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const { useAppDispatch } = require("../redux/hooks");
|
|
22
|
+
const dispatch = useAppDispatch();
|
|
23
|
+
return dispatch(action);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.error("Failed to dispatch Redux action:", error);
|
|
26
|
+
return Promise.reject(error);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
useRedux,
|
|
31
|
+
apiClient,
|
|
32
|
+
useConditionalRedux,
|
|
33
|
+
conditionalDispatch
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
useReduxIntegration as u
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=useReduxIntegration-DzhcP34r.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReduxIntegration-DzhcP34r.esm.js","sources":["../../src/hooks/useReduxIntegration.ts"],"sourcesContent":["import { useERPUI } from '../components/providers/ERPUIProvider';\n\n/**\n * Hook to determine Redux integration status and provide conditional Redux usage\n */\nexport const useReduxIntegration = () => {\n const { useRedux, apiClient } = useERPUI();\n \n // Helper function to conditionally use Redux hooks\n const useConditionalRedux = <T>(\n reduxHook: () => T,\n fallbackValue: T\n ): T => {\n if (!useRedux) {\n return fallbackValue;\n }\n \n try {\n return reduxHook();\n } catch (error) {\n console.warn('Redux hook failed, falling back to default value:', error);\n return fallbackValue;\n }\n };\n \n // Helper function to conditionally dispatch Redux actions\n const conditionalDispatch = (action: any) => {\n if (!useRedux) {\n console.warn('Redux not enabled, cannot dispatch action:', action);\n return Promise.resolve();\n }\n \n try {\n const { useAppDispatch } = require('../redux/hooks');\n const dispatch = useAppDispatch();\n return dispatch(action);\n } catch (error) {\n console.error('Failed to dispatch Redux action:', error);\n return Promise.reject(error);\n }\n };\n \n return {\n useRedux,\n apiClient,\n useConditionalRedux,\n conditionalDispatch,\n };\n};"],"names":[],"mappings":";AAKO,MAAM,sBAAsB,MAAM;AACvC,QAAM,EAAE,UAAU,UAAA,IAAc,SAAA;AAGhC,QAAM,sBAAsB,CAC1B,WACA,kBACM;AACN,QAAI,CAAC,UAAU;AACb,aAAO;AAAA,IACT;AAEA,QAAI;AACF,aAAO,UAAA;AAAA,IACT,SAAS,OAAO;AACd,cAAQ,KAAK,qDAAqD,KAAK;AACvE,aAAO;AAAA,IACT;AAAA,EACF;AAGA,QAAM,sBAAsB,CAAC,WAAgB;AAC3C,QAAI,CAAC,UAAU;AACb,cAAQ,KAAK,8CAA8C,MAAM;AACjE,aAAO,QAAQ,QAAA;AAAA,IACjB;AAEA,QAAI;AACF,YAAM,EAAE,eAAA,IAAmB,QAAQ,gBAAgB;AACnD,YAAM,WAAW,eAAA;AACjB,aAAO,SAAS,MAAM;AAAA,IACxB,SAAS,OAAO;AACd,cAAQ,MAAM,oCAAoC,KAAK;AACvD,aAAO,QAAQ,OAAO,KAAK;AAAA,IAC7B;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;"}
|