@erpsquad/common 1.8.26 → 1.8.28
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/_virtual/index/index.esm3.js +4 -2
- package/dist/_virtual/index/index.esm3.js.map +1 -1
- package/dist/_virtual/index/index.esm4.js +3 -3
- package/dist/_virtual/index/index.esm5.js +2 -4
- package/dist/_virtual/index/index.esm5.js.map +1 -1
- package/dist/_virtual/index/index3.js +1 -1
- package/dist/_virtual/index/index4.js +1 -1
- package/dist/_virtual/index/index5.js +1 -1
- package/dist/api-client/api.inventory/api.d.ts +5 -2
- package/dist/api-client/api.manufacturing/api.d.ts +15 -102
- package/dist/api-client/api.purchase/api.d.ts +3 -2
- package/dist/api-client/api.system-feature/api.d.ts +0 -2
- package/dist/components/action-bar/action-bar/index.esm.js +1 -1
- package/dist/components/action-bar/action-bar/index.esm.js.map +1 -1
- package/dist/components/action-bar/action-bar/index.js +1 -1
- package/dist/components/action-bar/action-bar/index.js.map +1 -1
- package/dist/components/editor/custom-editor/index.esm.js +1 -1
- package/dist/components/editor/custom-editor/index.esm.js.map +1 -1
- package/dist/components/editor/custom-editor/index.js +1 -1
- package/dist/components/editor/custom-editor/index.js.map +1 -1
- package/dist/components/filter/filter/index.esm.js +1 -1
- package/dist/components/filter/filter/index.esm.js.map +1 -1
- package/dist/components/filter/filter/index.js +1 -1
- package/dist/components/filter/filter/index.js.map +1 -1
- package/dist/components/header/header/index.esm.js +1 -1
- package/dist/components/header/header/index.esm.js.map +1 -1
- package/dist/components/header/header/index.js +1 -1
- package/dist/components/header/header/index.js.map +1 -1
- package/dist/components/header/redux/actionCreator/index.esm.js +1 -1
- package/dist/components/header/redux/actionCreator/index.esm.js.map +1 -1
- package/dist/components/header/redux/actionCreator/index.js +1 -1
- package/dist/components/header/redux/actionCreator/index.js.map +1 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.esm.js +429 -435
- package/dist/components/index.esm.js.map +1 -1
- package/dist/components/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.esm.js.map +1 -1
- package/dist/components/inventory-reports-title-bar/redux/actionCreator/index.js +1 -1
- package/dist/components/inventory-reports-title-bar/redux/actionCreator/index.js.map +1 -1
- package/dist/components/material-table/aggregation-fns/index/index.esm.js +0 -10
- package/dist/components/material-table/aggregation-fns/index/index.esm.js.map +1 -1
- package/dist/components/material-table/aggregation-fns/index/index.js +1 -1
- package/dist/components/material-table/aggregation-fns/index/index.js.map +1 -1
- package/dist/components/reports-title-bar/redux/actionCreator/index.esm.js +1 -1
- package/dist/components/reports-title-bar/redux/actionCreator/index.esm.js.map +1 -1
- package/dist/components/reports-title-bar/redux/actionCreator/index.js +1 -1
- package/dist/components/reports-title-bar/redux/actionCreator/index.js.map +1 -1
- package/dist/components/share-modal/redux/actionCreator/index.esm.js +1 -1
- package/dist/components/share-modal/redux/actionCreator/index.esm.js.map +1 -1
- package/dist/components/share-modal/redux/actionCreator/index.js +1 -1
- package/dist/components/share-modal/redux/actionCreator/index.js.map +1 -1
- package/dist/components/upload/upload/index.esm.js +2 -2
- package/dist/components/upload/upload/index.esm.js.map +1 -1
- package/dist/components/upload/upload/index.js +2 -2
- package/dist/components/upload/upload/index.js.map +1 -1
- package/dist/contexts/AuthContext/index.esm.js +2 -2
- package/dist/contexts/AuthContext/index.esm.js.map +1 -1
- package/dist/contexts/AuthContext/index.js +1 -1
- package/dist/contexts/AuthContext/index.js.map +1 -1
- package/dist/contexts/languageContext/index.esm.js +1 -1
- package/dist/contexts/languageContext/index.esm.js.map +1 -1
- package/dist/contexts/languageContext/index.js +1 -1
- package/dist/contexts/languageContext/index.js.map +1 -1
- package/dist/index.d.ts +1 -138
- package/dist/index.esm.js +521 -533
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/node_modules/@asseinfo/react-kanban/dist/index/index.esm.js +1 -1
- package/dist/node_modules/@asseinfo/react-kanban/dist/index/index.js +1 -1
- package/dist/node_modules/@glideapps/glide-data-grid/dist/js/index/index.esm.js +0 -32
- package/dist/node_modules/@glideapps/glide-data-grid/dist/js/index/index.esm.js.map +1 -1
- package/dist/node_modules/@glideapps/glide-data-grid/dist/js/index/index.js +36 -36
- package/dist/node_modules/@glideapps/glide-data-grid/dist/js/index/index.js.map +1 -1
- package/dist/node_modules/@mui/system/colorManipulator/index.esm.js +2 -2
- package/dist/node_modules/@mui/system/colorManipulator/index.js +1 -1
- package/dist/src/api-client/api.accounting/api.d.ts +750 -0
- package/dist/src/api-client/api.drive/api.d.ts +44 -0
- package/dist/src/api-client/api.inventory/api.d.ts +282 -0
- package/dist/src/api-client/api.manufacturing/api.d.ts +476 -0
- package/dist/src/api-client/api.purchase/api.d.ts +330 -0
- package/dist/src/api-client/api.rbac/api.d.ts +99 -0
- package/dist/src/api-client/api.rental/api.d.ts +752 -0
- package/dist/src/api-client/api.sales/api.d.ts +429 -0
- package/dist/src/api-client/api.system-feature/api.d.ts +148 -0
- package/dist/src/api-client/api.user/api.d.ts +14 -0
- package/dist/src/api-client/index.d.ts +20 -0
- package/dist/{components → src/components}/accordion/accordion.d.ts +1 -1
- package/dist/{components → src/components}/action-bar/action-bar.d.ts +1 -1
- package/dist/src/components/checkbox/checkbox.d.ts +4 -0
- package/dist/{components → src/components}/date-picker/date-picker.d.ts +1 -1
- package/dist/{components → src/components}/footer/footer.d.ts +1 -1
- package/dist/src/components/form-control/form-builder/form-builder-element/media.d.ts +4 -0
- package/dist/src/components/form-control/form-builder/form-builder-element/phone.d.ts +3 -0
- package/dist/src/components/form-control/form-builder/form-builder-element/select.d.ts +4 -0
- package/dist/src/components/form-control/form-builder/form-builder-element/text.d.ts +4 -0
- package/dist/src/components/form-control/form-builder/form-builder-element/time.d.ts +4 -0
- package/dist/src/components/form-control/form-parser/form-switcher.d.ts +2 -0
- package/dist/src/components/icons/action-arrow.d.ts +4 -0
- package/dist/src/components/icons/add-circle.d.ts +4 -0
- package/dist/src/components/icons/arrow-bidirectional.d.ts +4 -0
- package/dist/src/components/icons/arrow-circle-down.d.ts +4 -0
- package/dist/src/components/icons/arrow-down-three.d.ts +4 -0
- package/dist/src/components/icons/arrow-down-two.d.ts +4 -0
- package/dist/src/components/icons/arrow-down.d.ts +4 -0
- package/dist/src/components/icons/arrow-up-down.d.ts +4 -0
- package/dist/src/components/icons/arrow-up-two.d.ts +4 -0
- package/dist/src/components/icons/assignments.d.ts +4 -0
- package/dist/src/components/icons/blank-circle.d.ts +4 -0
- package/dist/src/components/icons/block-filled.d.ts +6 -0
- package/dist/src/components/icons/calendar-add.d.ts +4 -0
- package/dist/src/components/icons/calendar.d.ts +4 -0
- package/dist/src/components/icons/checkbox-square.d.ts +4 -0
- package/dist/src/components/icons/circular-arrow-setting.d.ts +6 -0
- package/dist/src/components/icons/clock.d.ts +4 -0
- package/dist/src/components/icons/close.d.ts +6 -0
- package/dist/src/components/icons/coin-outline.d.ts +4 -0
- package/dist/src/components/icons/copy.d.ts +4 -0
- package/dist/src/components/icons/coupon.d.ts +4 -0
- package/dist/src/components/icons/cross-hire.d.ts +6 -0
- package/dist/src/components/icons/custom-styled-icon.d.ts +6 -0
- package/dist/src/components/icons/dashboard.d.ts +4 -0
- package/dist/src/components/icons/document-download.d.ts +4 -0
- package/dist/src/components/icons/document.d.ts +4 -0
- package/dist/src/components/icons/dollar-circle-filled.d.ts +6 -0
- package/dist/src/components/icons/dollar-circle.d.ts +4 -0
- package/dist/src/components/icons/edit.d.ts +4 -0
- package/dist/src/components/icons/email.d.ts +4 -0
- package/dist/src/components/icons/export.d.ts +6 -0
- package/dist/src/components/icons/eye-off.d.ts +4 -0
- package/dist/src/components/icons/eye-plus-circle.d.ts +6 -0
- package/dist/src/components/icons/eye.d.ts +4 -0
- package/dist/src/components/icons/filled-circle.d.ts +4 -0
- package/dist/src/components/icons/filter-remove.d.ts +4 -0
- package/dist/src/components/icons/filter.d.ts +4 -0
- package/dist/src/components/icons/folder-save.d.ts +4 -0
- package/dist/src/components/icons/grid.d.ts +4 -0
- package/dist/src/components/icons/hashtag.d.ts +4 -0
- package/dist/src/components/icons/image.d.ts +4 -0
- package/dist/src/components/icons/import.d.ts +4 -0
- package/dist/src/components/icons/info-circle.d.ts +4 -0
- package/dist/src/components/icons/info.d.ts +6 -0
- package/dist/src/components/icons/link-horizontal.d.ts +4 -0
- package/dist/src/components/icons/link.d.ts +4 -0
- package/dist/src/components/icons/location.d.ts +4 -0
- package/dist/src/components/icons/lowest-lead-time.d.ts +4 -0
- package/dist/src/components/icons/lowest-min-qty.d.ts +4 -0
- package/dist/src/components/icons/lowest-price.d.ts +4 -0
- package/dist/src/components/icons/more.d.ts +4 -0
- package/dist/src/components/icons/notification.d.ts +4 -0
- package/dist/src/components/icons/paper-clip.d.ts +4 -0
- package/dist/src/components/icons/paragraph.d.ts +4 -0
- package/dist/src/components/icons/payment-request.d.ts +6 -0
- package/dist/src/components/icons/phone.d.ts +4 -0
- package/dist/src/components/icons/printer.d.ts +4 -0
- package/dist/src/components/icons/process-calendar.d.ts +4 -0
- package/dist/src/components/icons/promotion.d.ts +6 -0
- package/dist/src/components/icons/radio-button.d.ts +4 -0
- package/dist/src/components/icons/receipt-filled.d.ts +6 -0
- package/dist/src/components/icons/receipt-outline.d.ts +4 -0
- package/dist/src/components/icons/receipt.d.ts +6 -0
- package/dist/src/components/icons/refresh-icon.d.ts +4 -0
- package/dist/src/components/icons/replace.d.ts +4 -0
- package/dist/src/components/icons/save.d.ts +6 -0
- package/dist/src/components/icons/search-status.d.ts +4 -0
- package/dist/src/components/icons/search.d.ts +4 -0
- package/dist/src/components/icons/settings-fallback.d.ts +7 -0
- package/dist/src/components/icons/sort-arrow-icon.d.ts +4 -0
- package/dist/src/components/icons/stacked-layer.d.ts +6 -0
- package/dist/src/components/icons/start-filled.d.ts +6 -0
- package/dist/src/components/icons/three-dot-icon.d.ts +4 -0
- package/dist/src/components/icons/tick-circle-filled.d.ts +6 -0
- package/dist/src/components/icons/tick-circle.d.ts +4 -0
- package/dist/src/components/icons/tick-octagon.d.ts +4 -0
- package/dist/src/components/icons/tick.d.ts +4 -0
- package/dist/src/components/icons/toggle-switch.d.ts +4 -0
- package/dist/src/components/icons/trash.d.ts +4 -0
- package/dist/src/components/icons/wave.d.ts +6 -0
- package/dist/src/components/icons/with-out-tick-octagon.d.ts +4 -0
- package/dist/src/components/icons/work-centre.d.ts +6 -0
- package/dist/src/components/index.d.ts +125 -0
- package/dist/{components → src/components}/location-select.d.ts +1 -1
- package/dist/{components → src/components}/material-table/material-table.d.ts +1 -1
- package/dist/{components → src/components}/phone-input/phone-input.d.ts +1 -1
- package/dist/src/components/radio/radio.d.ts +4 -0
- package/dist/src/components/select/select.d.ts +3 -0
- package/dist/src/components/switches/android-12-switch.d.ts +4 -0
- package/dist/src/components/text-field/text-field.d.ts +3 -0
- package/dist/{components → src/components}/time-picker/time-picker.d.ts +1 -1
- package/dist/{components → src/components}/upload-media/upload-media.d.ts +1 -1
- package/dist/src/constants/index.d.ts +13 -0
- package/dist/src/contexts/index.d.ts +5 -0
- package/dist/src/hooks/index.d.ts +16 -0
- package/dist/src/index.d.ts +138 -0
- package/dist/src/layout/index.d.ts +2 -0
- package/dist/src/redux/index.d.ts +9 -0
- package/dist/src/styles/index.d.ts +2 -0
- package/dist/src/theme/index.d.ts +4 -0
- package/dist/src/types/index.d.ts +100 -0
- package/dist/src/utils/index.d.ts +31 -0
- package/dist/src/views/index.d.ts +2 -0
- package/dist/style.css +3 -5
- package/dist/styles/index.d.ts +1 -1
- package/dist/utils/api/index.esm.js +4 -4
- package/dist/utils/api/index.esm.js.map +1 -1
- package/dist/utils/api/index.js +1 -1
- package/dist/utils/api/index.js.map +1 -1
- package/dist/utils/common/index.esm.js +8 -8
- package/dist/utils/common/index.esm.js.map +1 -1
- package/dist/utils/common/index.js +1 -1
- package/dist/utils/common/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.esm.js +50 -54
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/views/form-builder/redux/actionCreator/index.esm.js +1 -1
- package/dist/views/form-builder/redux/actionCreator/index.esm.js.map +1 -1
- package/dist/views/form-builder/redux/actionCreator/index.js +1 -1
- package/dist/views/form-builder/redux/actionCreator/index.js.map +1 -1
- package/dist/views/form-builder/redux/reducer/index.esm.js +0 -8
- package/dist/views/form-builder/redux/reducer/index.esm.js.map +1 -1
- package/dist/views/form-builder/redux/reducer/index.js +1 -1
- package/dist/views/form-builder/redux/reducer/index.js.map +1 -1
- package/dist/views/index.d.ts +1 -1
- package/dist/views/index.esm.js +0 -2
- package/dist/views/index.esm.js.map +1 -1
- package/dist/views/index.js +1 -1
- package/dist/views/template-editor/components/EditorSidebar/index.esm.js +3 -3
- package/dist/views/template-editor/components/EditorSidebar/index.esm.js.map +1 -1
- package/dist/views/template-editor/components/EditorSidebar/index.js +14 -14
- package/dist/views/template-editor/components/EditorSidebar/index.js.map +1 -1
- package/dist/views/template-editor/templates/index.esm.js +1 -1
- package/dist/views/template-editor/templates/index.esm.js.map +1 -1
- package/dist/views/template-editor/templates/index.js +1 -1
- package/dist/views/template-editor/templates/index.js.map +1 -1
- package/package.json +2 -1
- package/dist/_virtual/ArrowBack/index.esm.js +0 -5
- package/dist/_virtual/ArrowBack/index.esm.js.map +0 -1
- package/dist/_virtual/ArrowBack/index.js +0 -2
- package/dist/_virtual/ArrowBack/index.js.map +0 -1
- package/dist/_virtual/ArrowForward/index.esm.js +0 -5
- package/dist/_virtual/ArrowForward/index.esm.js.map +0 -1
- package/dist/_virtual/ArrowForward/index.js +0 -2
- package/dist/_virtual/ArrowForward/index.js.map +0 -1
- package/dist/_virtual/IndeterminateCheckBox/index.esm.js +0 -5
- package/dist/_virtual/IndeterminateCheckBox/index.esm.js.map +0 -1
- package/dist/_virtual/IndeterminateCheckBox/index.js +0 -2
- package/dist/_virtual/IndeterminateCheckBox/index.js.map +0 -1
- package/dist/_virtual/NorthEast/index.esm.js +0 -5
- package/dist/_virtual/NorthEast/index.esm.js.map +0 -1
- package/dist/_virtual/NorthEast/index.js +0 -2
- package/dist/_virtual/NorthEast/index.js.map +0 -1
- package/dist/_virtual/Visibility/index.esm.js +0 -5
- package/dist/_virtual/Visibility/index.esm.js.map +0 -1
- package/dist/_virtual/Visibility/index.js +0 -2
- package/dist/_virtual/Visibility/index.js.map +0 -1
- package/dist/components/charts/line-chart/area-line-chart/index.esm.js +0 -40
- package/dist/components/charts/line-chart/area-line-chart/index.esm.js.map +0 -1
- package/dist/components/charts/line-chart/area-line-chart/index.js +0 -2
- package/dist/components/charts/line-chart/area-line-chart/index.js.map +0 -1
- package/dist/components/checkbox/checkbox.d.ts +0 -4
- package/dist/components/filter/fields/index.esm.js +0 -180
- package/dist/components/filter/fields/index.esm.js.map +0 -1
- package/dist/components/filter/fields/index.js +0 -2
- package/dist/components/filter/fields/index.js.map +0 -1
- package/dist/components/form-control/form-builder/form-builder-element/media.d.ts +0 -4
- package/dist/components/form-control/form-builder/form-builder-element/phone.d.ts +0 -3
- package/dist/components/form-control/form-builder/form-builder-element/select.d.ts +0 -4
- package/dist/components/form-control/form-builder/form-builder-element/text.d.ts +0 -4
- package/dist/components/form-control/form-builder/form-builder-element/time.d.ts +0 -4
- package/dist/components/form-control/form-parser/form-switcher.d.ts +0 -2
- package/dist/components/icons/action-arrow.d.ts +0 -4
- package/dist/components/icons/add-circle.d.ts +0 -4
- package/dist/components/icons/arrow-bidirectional.d.ts +0 -4
- package/dist/components/icons/arrow-circle-down.d.ts +0 -4
- package/dist/components/icons/arrow-down-three.d.ts +0 -4
- package/dist/components/icons/arrow-down-two.d.ts +0 -4
- package/dist/components/icons/arrow-down.d.ts +0 -4
- package/dist/components/icons/arrow-up-down.d.ts +0 -4
- package/dist/components/icons/arrow-up-two.d.ts +0 -4
- package/dist/components/icons/assignments.d.ts +0 -4
- package/dist/components/icons/blank-circle.d.ts +0 -4
- package/dist/components/icons/block-filled.d.ts +0 -6
- package/dist/components/icons/calendar-add.d.ts +0 -4
- package/dist/components/icons/calendar.d.ts +0 -4
- package/dist/components/icons/checkbox-square.d.ts +0 -4
- package/dist/components/icons/circular-arrow-setting.d.ts +0 -6
- package/dist/components/icons/clock.d.ts +0 -4
- package/dist/components/icons/close.d.ts +0 -6
- package/dist/components/icons/coin-outline.d.ts +0 -4
- package/dist/components/icons/copy.d.ts +0 -4
- package/dist/components/icons/coupon.d.ts +0 -4
- package/dist/components/icons/cross-hire.d.ts +0 -6
- package/dist/components/icons/custom-styled-icon.d.ts +0 -6
- package/dist/components/icons/dashboard.d.ts +0 -4
- package/dist/components/icons/document-download.d.ts +0 -4
- package/dist/components/icons/document.d.ts +0 -4
- package/dist/components/icons/dollar-circle-filled.d.ts +0 -6
- package/dist/components/icons/dollar-circle.d.ts +0 -4
- package/dist/components/icons/edit.d.ts +0 -4
- package/dist/components/icons/email.d.ts +0 -4
- package/dist/components/icons/export.d.ts +0 -6
- package/dist/components/icons/eye-off.d.ts +0 -4
- package/dist/components/icons/eye-plus-circle.d.ts +0 -6
- package/dist/components/icons/eye.d.ts +0 -4
- package/dist/components/icons/filled-circle.d.ts +0 -4
- package/dist/components/icons/filter-remove.d.ts +0 -4
- package/dist/components/icons/filter.d.ts +0 -4
- package/dist/components/icons/folder-save.d.ts +0 -4
- package/dist/components/icons/grid.d.ts +0 -4
- package/dist/components/icons/hashtag.d.ts +0 -4
- package/dist/components/icons/image.d.ts +0 -4
- package/dist/components/icons/import.d.ts +0 -4
- package/dist/components/icons/info-circle.d.ts +0 -4
- package/dist/components/icons/info.d.ts +0 -6
- package/dist/components/icons/link-horizontal.d.ts +0 -4
- package/dist/components/icons/link.d.ts +0 -4
- package/dist/components/icons/location.d.ts +0 -4
- package/dist/components/icons/lowest-lead-time.d.ts +0 -4
- package/dist/components/icons/lowest-min-qty.d.ts +0 -4
- package/dist/components/icons/lowest-price.d.ts +0 -4
- package/dist/components/icons/more.d.ts +0 -4
- package/dist/components/icons/notification.d.ts +0 -4
- package/dist/components/icons/paper-clip.d.ts +0 -4
- package/dist/components/icons/paragraph.d.ts +0 -4
- package/dist/components/icons/payment-request.d.ts +0 -6
- package/dist/components/icons/phone.d.ts +0 -4
- package/dist/components/icons/printer.d.ts +0 -4
- package/dist/components/icons/process-calendar.d.ts +0 -4
- package/dist/components/icons/promotion.d.ts +0 -6
- package/dist/components/icons/radio-button.d.ts +0 -4
- package/dist/components/icons/receipt-filled.d.ts +0 -6
- package/dist/components/icons/receipt-outline.d.ts +0 -4
- package/dist/components/icons/receipt.d.ts +0 -6
- package/dist/components/icons/refresh-icon.d.ts +0 -4
- package/dist/components/icons/replace.d.ts +0 -4
- package/dist/components/icons/save.d.ts +0 -6
- package/dist/components/icons/search-status.d.ts +0 -4
- package/dist/components/icons/search.d.ts +0 -4
- package/dist/components/icons/settings-fallback.d.ts +0 -7
- package/dist/components/icons/sort-arrow-icon.d.ts +0 -4
- package/dist/components/icons/stacked-layer.d.ts +0 -6
- package/dist/components/icons/start-filled.d.ts +0 -6
- package/dist/components/icons/three-dot-icon.d.ts +0 -4
- package/dist/components/icons/tick-circle-filled.d.ts +0 -6
- package/dist/components/icons/tick-circle.d.ts +0 -4
- package/dist/components/icons/tick-octagon.d.ts +0 -4
- package/dist/components/icons/tick.d.ts +0 -4
- package/dist/components/icons/toggle-switch.d.ts +0 -4
- package/dist/components/icons/trash.d.ts +0 -4
- package/dist/components/icons/wave.d.ts +0 -6
- package/dist/components/icons/with-out-tick-octagon.d.ts +0 -4
- package/dist/components/icons/work-centre.d.ts +0 -6
- package/dist/components/material-editable-table/components/inline-edit-fields/index.esm.js +0 -312
- package/dist/components/material-editable-table/components/inline-edit-fields/index.esm.js.map +0 -1
- package/dist/components/material-editable-table/components/inline-edit-fields/index.js +0 -4
- package/dist/components/material-editable-table/components/inline-edit-fields/index.js.map +0 -1
- package/dist/components/material-editable-table/material-editable-table/index.esm.js +0 -1164
- package/dist/components/material-editable-table/material-editable-table/index.esm.js.map +0 -1
- package/dist/components/material-editable-table/material-editable-table/index.js +0 -28
- package/dist/components/material-editable-table/material-editable-table/index.js.map +0 -1
- package/dist/components/material-editable-table/material-editable-table.d.ts +0 -40
- package/dist/components/material-table/aggregation-fns/index.d.ts +0 -13
- package/dist/components/material-table/components/default-aggregation.d.ts +0 -9
- package/dist/components/material-table/components/header-cell.d.ts +0 -5
- package/dist/components/material-table/components/inline-edit-fields.d.ts +0 -17
- package/dist/components/material-table/components/number-aggregation/index.esm.js +0 -133
- package/dist/components/material-table/components/number-aggregation/index.esm.js.map +0 -1
- package/dist/components/material-table/components/number-aggregation/index.js +0 -5
- package/dist/components/material-table/components/number-aggregation/index.js.map +0 -1
- package/dist/components/material-table/components/number-aggregation.d.ts +0 -9
- package/dist/components/radio/radio.d.ts +0 -4
- package/dist/components/select/select.d.ts +0 -3
- package/dist/components/switches/android-12-switch.d.ts +0 -2
- package/dist/components/text-field/text-field.d.ts +0 -3
- package/dist/node_modules/@mui/icons-material/ArrowBack/index.esm.js +0 -18
- package/dist/node_modules/@mui/icons-material/ArrowBack/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/icons-material/ArrowBack/index.js +0 -2
- package/dist/node_modules/@mui/icons-material/ArrowBack/index.js.map +0 -1
- package/dist/node_modules/@mui/icons-material/ArrowForward/index.esm.js +0 -18
- package/dist/node_modules/@mui/icons-material/ArrowForward/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/icons-material/ArrowForward/index.js +0 -2
- package/dist/node_modules/@mui/icons-material/ArrowForward/index.js.map +0 -1
- package/dist/node_modules/@mui/icons-material/IndeterminateCheckBox/index.esm.js +0 -18
- package/dist/node_modules/@mui/icons-material/IndeterminateCheckBox/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/icons-material/IndeterminateCheckBox/index.js +0 -2
- package/dist/node_modules/@mui/icons-material/IndeterminateCheckBox/index.js.map +0 -1
- package/dist/node_modules/@mui/icons-material/NorthEast/index.esm.js +0 -18
- package/dist/node_modules/@mui/icons-material/NorthEast/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/icons-material/NorthEast/index.js +0 -2
- package/dist/node_modules/@mui/icons-material/NorthEast/index.js.map +0 -1
- package/dist/node_modules/@mui/icons-material/Visibility/index.esm.js +0 -18
- package/dist/node_modules/@mui/icons-material/Visibility/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/icons-material/Visibility/index.js +0 -2
- package/dist/node_modules/@mui/icons-material/Visibility/index.js.map +0 -1
- package/dist/utils/fileSize/index.esm.js +0 -22
- package/dist/utils/fileSize/index.esm.js.map +0 -1
- package/dist/utils/fileSize/index.js +0 -2
- package/dist/utils/fileSize/index.js.map +0 -1
- package/dist/views/beforeAuth/components/activity-tag-data/activity-tag-data/index.esm.js +0 -48
- package/dist/views/beforeAuth/components/activity-tag-data/activity-tag-data/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/components/activity-tag-data/activity-tag-data/index.js +0 -2
- package/dist/views/beforeAuth/components/activity-tag-data/activity-tag-data/index.js.map +0 -1
- package/dist/views/beforeAuth/components/calendar-data/calendar-data/index.esm.js +0 -50
- package/dist/views/beforeAuth/components/calendar-data/calendar-data/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/components/calendar-data/calendar-data/index.js +0 -2
- package/dist/views/beforeAuth/components/calendar-data/calendar-data/index.js.map +0 -1
- package/dist/views/beforeAuth/components/gantt-data/gantt-data/index.esm.js +0 -57
- package/dist/views/beforeAuth/components/gantt-data/gantt-data/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/components/gantt-data/gantt-data/index.js +0 -2
- package/dist/views/beforeAuth/components/gantt-data/gantt-data/index.js.map +0 -1
- package/dist/views/beforeAuth/components/grid-data/grid-data/index.esm.js +0 -41
- package/dist/views/beforeAuth/components/grid-data/grid-data/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/components/grid-data/grid-data/index.js +0 -2
- package/dist/views/beforeAuth/components/grid-data/grid-data/index.js.map +0 -1
- package/dist/views/beforeAuth/components/index/index.esm.js +0 -1144
- package/dist/views/beforeAuth/components/index/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/components/index/index.js +0 -206
- package/dist/views/beforeAuth/components/index/index.js.map +0 -1
- package/dist/views/beforeAuth/components/kanbann-content/kanbann-raw/index.esm.js +0 -72
- package/dist/views/beforeAuth/components/kanbann-content/kanbann-raw/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/components/kanbann-content/kanbann-raw/index.js +0 -2
- package/dist/views/beforeAuth/components/kanbann-content/kanbann-raw/index.js.map +0 -1
- package/dist/views/beforeAuth/components/list-content/column-raw/index.esm.js +0 -54
- package/dist/views/beforeAuth/components/list-content/column-raw/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/components/list-content/column-raw/index.js +0 -2
- package/dist/views/beforeAuth/components/list-content/column-raw/index.js.map +0 -1
- package/dist/views/beforeAuth/components/list-content/list-data/index.esm.js +0 -61
- package/dist/views/beforeAuth/components/list-content/list-data/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/components/list-content/list-data/index.js +0 -2
- package/dist/views/beforeAuth/components/list-content/list-data/index.js.map +0 -1
- package/dist/views/beforeAuth/components/multiline-data/multiline-data/index.esm.js +0 -21
- package/dist/views/beforeAuth/components/multiline-data/multiline-data/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/components/multiline-data/multiline-data/index.js +0 -2
- package/dist/views/beforeAuth/components/multiline-data/multiline-data/index.js.map +0 -1
- package/dist/views/beforeAuth/components/tabs-data/tabs-data/index.esm.js +0 -21
- package/dist/views/beforeAuth/components/tabs-data/tabs-data/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/components/tabs-data/tabs-data/index.js +0 -2
- package/dist/views/beforeAuth/components/tabs-data/tabs-data/index.js.map +0 -1
- package/dist/views/beforeAuth/components/user-dropdown-data/user-dropdown-data/index.esm.js +0 -306
- package/dist/views/beforeAuth/components/user-dropdown-data/user-dropdown-data/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/components/user-dropdown-data/user-dropdown-data/index.js +0 -2
- package/dist/views/beforeAuth/components/user-dropdown-data/user-dropdown-data/index.js.map +0 -1
- package/dist/{@types → src/@types}/common.d.ts +0 -0
- package/dist/{@types → src/@types}/page.d.ts +0 -0
- package/dist/{@types → src/@types}/pagination-model.d.ts +0 -0
- package/dist/{assets → src/assets}/dynamic-svg-icon/dynamic-svg-icon.d.ts +0 -0
- package/dist/{assets → src/assets}/images.d.ts +0 -0
- package/dist/{assets → src/assets}/view-modal/calendar-icon.d.ts +0 -0
- package/dist/{assets → src/assets}/view-modal/chart-icon.d.ts +0 -0
- package/dist/{assets → src/assets}/view-modal/gantt-icon.d.ts +0 -0
- package/dist/{assets → src/assets}/view-modal/grid-icon.d.ts +0 -0
- package/dist/{assets → src/assets}/view-modal/kanban-icon.d.ts +0 -0
- package/dist/{assets → src/assets}/view-modal/table-icon.d.ts +0 -0
- package/dist/{components → src/components}/Dashboard/dashboard-card.d.ts +0 -0
- package/dist/{components → src/components}/Dashboard/dashboard-header.d.ts +0 -0
- package/dist/{components → src/components}/activity-tag/activity-tag.d.ts +0 -0
- package/dist/{components → src/components}/activityArea/activityArea.d.ts +0 -0
- package/dist/{components → src/components}/activityLog/activity-log.d.ts +0 -0
- package/dist/{components → src/components}/alert/alert.d.ts +0 -0
- package/dist/{components → src/components}/appbar/appbar.d.ts +0 -0
- package/dist/{components → src/components}/approval-wrapper/approval-wrapper.d.ts +0 -0
- package/dist/{components → src/components}/avatar/avatar.d.ts +0 -0
- package/dist/{components → src/components}/board/board.d.ts +0 -0
- package/dist/{components → src/components}/board/columnHeader.d.ts +0 -0
- package/dist/{components → src/components}/bread-crumb/bread-crumb.d.ts +0 -0
- package/dist/{components → src/components}/button/button.d.ts +0 -0
- package/dist/{components → src/components}/calculation-summary/calculation-summary.d.ts +0 -0
- package/dist/{components → src/components}/calculation-summary/components/discount-summary.d.ts +0 -0
- package/dist/{components → src/components}/calculation-summary/components/items-summary.d.ts +0 -0
- package/dist/{components → src/components}/calculation-summary/components/subtotal-summary.d.ts +0 -0
- package/dist/{components → src/components}/calculation-summary/components/taxes-and-charges-summary.d.ts +0 -0
- package/dist/{components → src/components}/calculation-summary/components/total-summary.d.ts +0 -0
- package/dist/{components → src/components}/calendar/calendar.d.ts +0 -0
- package/dist/{components → src/components}/card-wrapper/card-wrapper.d.ts +0 -0
- package/dist/{components → src/components}/change-user-password-modal/change-user-password-modal.d.ts +0 -0
- package/dist/{components → src/components}/charts/ChartLegends.d.ts +0 -0
- package/dist/{components → src/components}/charts/areaLinerChart.d.ts +0 -0
- package/dist/{components → src/components}/charts/bar-chart/bar-chart.d.ts +0 -0
- package/dist/{components → src/components}/charts/barChart/barChart.d.ts +0 -0
- package/dist/{components → src/components}/charts/barLineChart/barLinechart.d.ts +0 -0
- package/dist/{components → src/components}/charts/donut-chart/donut-chart.d.ts +0 -0
- package/dist/{components → src/components}/charts/donutChart/DonutChart.d.ts +0 -0
- package/dist/{components → src/components}/charts/groupBarChart/GroupBarChart.d.ts +0 -0
- package/dist/{components → src/components}/charts/line-chart/area-line-chart.d.ts +0 -0
- package/dist/{components → src/components}/charts/line-chart/area-lineChart.d.ts +0 -0
- package/dist/{components → src/components}/charts/line-chart/line-chart.d.ts +0 -0
- package/dist/{components → src/components}/charts/multiLineChart/multi-line-chart.d.ts +0 -0
- package/dist/{components → src/components}/chip/chip.d.ts +0 -0
- package/dist/{components → src/components}/chip-generator/chip-generator.d.ts +0 -0
- package/dist/{components → src/components}/color-picker-input/color-picker-input.d.ts +0 -0
- package/dist/{components → src/components}/confirm-modal/confirm-modal.d.ts +0 -0
- package/dist/{components → src/components}/country-select/country-select.d.ts +0 -0
- package/dist/{components → src/components}/custom-snackbar/custom-snackbar.d.ts +0 -0
- package/dist/{components → src/components}/custom-toggle-switch/custom-toggle-switch.d.ts +0 -0
- package/dist/{components → src/components}/date-range-picker/date-range-picker.d.ts +0 -0
- package/dist/{components → src/components}/date-time-picker/date-time-picker.d.ts +0 -0
- package/dist/{components → src/components}/dropdown-button/dropdown-button.d.ts +0 -0
- package/dist/{components → src/components}/dynamic-layout-wrapper/dynamic-layout-wrapper.d.ts +0 -0
- package/dist/{components → src/components}/dynamic-modal.d.ts +0 -0
- package/dist/{components → src/components}/editor/custom-editor.d.ts +0 -0
- package/dist/{components → src/components}/entity-view-wrapper/entity-view-wrapper.d.ts +0 -0
- package/dist/{components → src/components}/examples/FlexibleReduxExample.d.ts +0 -0
- package/dist/{components → src/components}/expandable-summary-wrapper/expandable-summary-wrapper.d.ts +0 -0
- package/dist/{components → src/components}/fallback/fallback.d.ts +0 -0
- package/dist/{components → src/components}/filter/components/add-filter.d.ts +0 -0
- package/dist/{components → src/components}/filter/components/add-group.d.ts +0 -0
- package/dist/{components → src/components}/filter/components/combinator-select.d.ts +0 -0
- package/dist/{components → src/components}/filter/components/delete-group.d.ts +0 -0
- package/dist/{components → src/components}/filter/components/field-select.d.ts +0 -0
- package/dist/{components → src/components}/filter/components/operator-select.d.ts +0 -0
- package/dist/{components → src/components}/filter/components/remove-action.d.ts +0 -0
- package/dist/{components → src/components}/filter/components/value-editor.d.ts +0 -0
- package/dist/{components → src/components}/filter/fields.d.ts +0 -0
- package/dist/{components → src/components}/filter/filter.d.ts +0 -0
- package/dist/{components → src/components}/footer.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/element-controller.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/button.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/checkbox.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/chip-or-placeholder.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/date-range-picker.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/date-time.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/date.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/dynamic-currency-input.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/dynamic-element-hoc.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/dynamic-input-select.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/dynamic-select.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/dynamic-tags-input.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/dynamic-text-editor.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/index.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/info.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/location-add-modal/location-add-modal.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/number-input.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/radio-button.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/section.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/select-configuration.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/table.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-builder/form-builder-element/toggle-button.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-parser/data.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-parser/form-parser.d.ts +0 -0
- package/dist/{components → src/components}/form-control/form-parser/form-section.d.ts +0 -0
- package/dist/{components → src/components}/form-control/index.d.ts +0 -0
- package/dist/{components → src/components}/form-header/form-header.d.ts +0 -0
- package/dist/{components → src/components}/gantt/gantt.d.ts +0 -0
- package/dist/{components → src/components}/grid/custom-grid-card/custom-grid-card.d.ts +0 -0
- package/dist/{components → src/components}/grid/grid-card/grid-card.d.ts +0 -0
- package/dist/{components → src/components}/grid/grid-wrapper/grid-wrapper.d.ts +0 -0
- package/dist/{components → src/components}/grid-fallback/grid-fallback.d.ts +0 -0
- package/dist/{components → src/components}/header/components/notification-menu/notification-menu.d.ts +0 -0
- package/dist/{components → src/components}/header/header-enhanced.d.ts +0 -0
- package/dist/{components → src/components}/header/header.d.ts +0 -0
- package/dist/{components → src/components}/header/redux/actionCreator.d.ts +0 -0
- package/dist/{components → src/components}/header/redux/reducer.d.ts +0 -0
- package/dist/{components → src/components}/header/redux/state.d.ts +0 -0
- package/dist/{components → src/components}/header copy.d.ts +0 -0
- package/dist/{components → src/components}/header-card/header-card.d.ts +0 -0
- package/dist/{components → src/components}/hr-line/hr-line.d.ts +0 -0
- package/dist/{components → src/components}/icons/check-box.d.ts +0 -0
- package/dist/{components → src/components}/icons/index.d.ts +0 -0
- package/dist/{components → src/components}/icons/rectangle-filled.d.ts +0 -0
- package/dist/{components → src/components}/icons/rectangle.d.ts +0 -0
- package/dist/{components → src/components}/info-card/info-card.d.ts +0 -0
- package/dist/{components → src/components}/inventory-reports-title-bar/component/reportFilter.d.ts +0 -0
- package/dist/{components → src/components}/inventory-reports-title-bar/inventory-reports-title-bar.d.ts +0 -0
- package/dist/{components → src/components}/inventory-reports-title-bar/redux/actionCreator.d.ts +0 -0
- package/dist/{components → src/components}/inventory-reports-title-bar/redux/reducer.d.ts +0 -0
- package/dist/{components → src/components}/inventory-reports-title-bar/redux/state.d.ts +0 -0
- package/dist/{components → src/components}/inventory-reports-title-bar/report-buttons/report-buttons.d.ts +0 -0
- package/dist/{components → src/components}/list/list.d.ts +0 -0
- package/dist/{components → src/components}/loader.d.ts +0 -0
- package/dist/{components → src/components}/loaders/erp-loader.d.ts +0 -0
- package/dist/{components → src/components}/loaders/form-loader.d.ts +0 -0
- package/dist/{components → src/components}/loaders/index.d.ts +0 -0
- package/dist/{components → src/components}/loaders/modal-loader.d.ts +0 -0
- package/dist/{components → src/components}/loaders/page-loader.d.ts +0 -0
- package/dist/{components/material-editable-table → src/components/material-table}/aggregation-fns/index.d.ts +0 -0
- package/dist/{components/material-editable-table → src/components/material-table}/components/default-aggregation.d.ts +0 -0
- package/dist/{components/material-editable-table → src/components/material-table}/components/header-cell.d.ts +0 -0
- package/dist/{components/material-editable-table → src/components/material-table}/components/inline-edit-fields.d.ts +0 -0
- package/dist/{components/material-editable-table → src/components/material-table}/components/number-aggregation.d.ts +0 -0
- package/dist/{components → src/components}/menu/menu.d.ts +0 -0
- package/dist/{components → src/components}/modal/modal.d.ts +0 -0
- package/dist/{components → src/components}/module-button/module-button.d.ts +0 -0
- package/dist/{components → src/components}/mulitline/multiline.d.ts +0 -0
- package/dist/{components → src/components}/multi-select/multi-select.d.ts +0 -0
- package/dist/{components → src/components}/page-navigator/components/add-page-modal.d.ts +0 -0
- package/dist/{components → src/components}/page-navigator/components/add-page.d.ts +0 -0
- package/dist/{components → src/components}/page-navigator/components/page-action.d.ts +0 -0
- package/dist/{components → src/components}/page-navigator/components/shared-page-modal.d.ts +0 -0
- package/dist/{components → src/components}/page-navigator/components/shared-page-view.d.ts +0 -0
- package/dist/{components → src/components}/page-navigator/page-navigator.d.ts +0 -0
- package/dist/{components → src/components}/pagination/pagination.d.ts +0 -0
- package/dist/{components → src/components}/parties-modal/parties-modal.d.ts +0 -0
- package/dist/{components → src/components}/parties-modal/utils/constant.d.ts +0 -0
- package/dist/{components → src/components}/parties-modal/validator.d.ts +0 -0
- package/dist/{components → src/components}/protected-route.d.ts +0 -0
- package/dist/{components → src/components}/providers/ERPUIProvider.d.ts +0 -0
- package/dist/{components → src/components}/providers/index.d.ts +0 -0
- package/dist/{components → src/components}/quick-approval-modal/quick-approval-modal.d.ts +0 -0
- package/dist/{components → src/components}/reports/dynamic-report/dynamic-report.d.ts +0 -0
- package/dist/{components → src/components}/reports/dynamic-report/dynamic-rows.d.ts +0 -0
- package/dist/{components → src/components}/reports-title-bar/redux/actionCreator.d.ts +0 -0
- package/dist/{components → src/components}/reports-title-bar/redux/reducer.d.ts +0 -0
- package/dist/{components → src/components}/reports-title-bar/redux/state.d.ts +0 -0
- package/dist/{components → src/components}/reports-title-bar/report-buttons/report-buttons.d.ts +0 -0
- package/dist/{components → src/components}/reports-title-bar/reports-title-bar.d.ts +0 -0
- package/dist/{components → src/components}/reset-password-modal/reset-password-modal.d.ts +0 -0
- package/dist/{components → src/components}/rfq-response/item-response-details.d.ts +0 -0
- package/dist/{components → src/components}/save-filter-modal/save-filter-modal.d.ts +0 -0
- package/dist/{components → src/components}/schedule-report/schedule-report-modal.d.ts +0 -0
- package/dist/{components → src/components}/schedule-report/schedule-report.d.ts +0 -0
- package/dist/{components → src/components}/schedule-report/utils/common.d.ts +0 -0
- package/dist/{components → src/components}/schedule-report/utils/constant.d.ts +0 -0
- package/dist/{components → src/components}/schedule-report/utils/type.d.ts +0 -0
- package/dist/{components → src/components}/schedule-report/validator.d.ts +0 -0
- package/dist/{components → src/components}/search-bar/search-bar.d.ts +0 -0
- package/dist/{components → src/components}/searchable-select.d.ts +0 -0
- package/dist/{components → src/components}/select/controller/chip-or-placeholder.d.ts +0 -0
- package/dist/{components → src/components}/select/controller/controller-select.d.ts +0 -0
- package/dist/{components → src/components}/select/select-search.d.ts +0 -0
- package/dist/{components → src/components}/share-modal/redux/actionCreator.d.ts +0 -0
- package/dist/{components → src/components}/share-modal/redux/reducer.d.ts +0 -0
- package/dist/{components → src/components}/share-modal/redux/state.d.ts +0 -0
- package/dist/{components → src/components}/share-modal/share-modal-enhanced.d.ts +0 -0
- package/dist/{components → src/components}/share-modal/share-modal.d.ts +0 -0
- package/dist/{components → src/components}/sidebar/sidebar.d.ts +0 -0
- package/dist/{components → src/components}/snackbar/snackbar.d.ts +0 -0
- package/dist/{components → src/components}/sub-header-doc/sub-header-doc.d.ts +0 -0
- package/dist/{components → src/components}/tab-bar-ui/tab-bar-ui.d.ts +0 -0
- package/dist/{components → src/components}/tabs/tabs.d.ts +0 -0
- package/dist/{components → src/components}/text-area/text-area.d.ts +0 -0
- package/dist/{components → src/components}/time-range-picker/time-range-picker.d.ts +0 -0
- package/dist/{components → src/components}/title-dropdown-button/title-dropdown-button.d.ts +0 -0
- package/dist/{components → src/components}/toast/toast.d.ts +0 -0
- package/dist/{components → src/components}/toggle/toggle.d.ts +0 -0
- package/dist/{components → src/components}/toggle-switch/toggle-switch.d.ts +0 -0
- package/dist/{components → src/components}/tooltip/Tooltip.d.ts +0 -0
- package/dist/{components → src/components}/typography/typography.d.ts +0 -0
- package/dist/{components → src/components}/upload/file-confirmation.d.ts +0 -0
- package/dist/{components → src/components}/upload/upload.d.ts +0 -0
- package/dist/{components → src/components}/upload-excel/file-confirmation.d.ts +0 -0
- package/dist/{components → src/components}/upload-excel/upload-excel.d.ts +0 -0
- package/dist/{components → src/components}/user-dropdown/user-dropdown.d.ts +0 -0
- package/dist/{components → src/components}/value-field/value-field.d.ts +0 -0
- package/dist/{components → src/components}/view-modal/view-modal.d.ts +0 -0
- package/dist/{config → src/config}/index.d.ts +0 -0
- package/dist/{constants → src/constants}/action-bar.d.ts +0 -0
- package/dist/{constants → src/constants}/all-language.d.ts +0 -0
- package/dist/{constants → src/constants}/auth.d.ts +0 -0
- package/dist/{constants → src/constants}/common.d.ts +0 -0
- package/dist/{constants → src/constants}/defaultColumns.d.ts +0 -0
- package/dist/{constants → src/constants}/lang/ar.d.ts +0 -0
- package/dist/{constants → src/constants}/lang/en.d.ts +0 -0
- package/dist/{constants → src/constants}/lang/es.d.ts +0 -0
- package/dist/{constants → src/constants}/modules.d.ts +0 -0
- package/dist/{constants → src/constants}/mui.constants.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/index.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.accounting.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.crm.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.document.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.hrms.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.inventory.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.manufacturing.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.office.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.procurement.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.project.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.quotes.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.rental.d.ts +0 -0
- package/dist/{constants → src/constants}/pathnames/pathname.user.d.ts +0 -0
- package/dist/{constants → src/constants}/resource-lang.d.ts +0 -0
- package/dist/{constants → src/constants}/route-page-map.d.ts +0 -0
- package/dist/{constants → src/constants}/status.d.ts +0 -0
- package/dist/{contexts → src/contexts}/AuthContext.d.ts +0 -0
- package/dist/{contexts → src/contexts}/languageContext.d.ts +0 -0
- package/dist/{contexts → src/contexts}/page-context.d.ts +0 -0
- package/dist/{contexts → src/contexts}/permission-context.d.ts +0 -0
- package/dist/{hooks → src/hooks}/apiHelper.d.ts +0 -0
- package/dist/{hooks → src/hooks}/common.d.ts +0 -0
- package/dist/{hooks → src/hooks}/use-deep-memo.d.ts +0 -0
- package/dist/{hooks → src/hooks}/use-material-calculations.d.ts +0 -0
- package/dist/{hooks → src/hooks}/use-translations.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useCheckSkuAndName.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useDataFetcher.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useLanguageFallback.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useLocationFilter.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useReduxIntegration.d.ts +0 -0
- package/dist/{layout → src/layout}/fullScreen/fullScreen.d.ts +0 -0
- package/dist/{layout → src/layout}/sidebarScreen/sidebarScreen.d.ts +0 -0
- package/dist/{redux → src/redux}/actionCreator.d.ts +0 -0
- package/dist/{redux → src/redux}/apiConfig.d.ts +0 -0
- package/dist/{redux → src/redux}/hooks.d.ts +0 -0
- package/dist/{redux → src/redux}/module-reducer.d.ts +0 -0
- package/dist/{redux → src/redux}/slices/headerSlice.d.ts +0 -0
- package/dist/{redux → src/redux}/slices/index.d.ts +0 -0
- package/dist/{redux → src/redux}/slices/inventoryReportsTitleBarSlice.d.ts +0 -0
- package/dist/{redux → src/redux}/slices/reportsTitleBarSlice.d.ts +0 -0
- package/dist/{redux → src/redux}/slices/shareSlice.d.ts +0 -0
- package/dist/{redux → src/redux}/toolkit.d.ts +0 -0
- package/dist/{redux → src/redux}/types.d.ts +0 -0
- package/dist/{server.d.ts → src/server.d.ts} +0 -0
- package/dist/{styles → src/styles}/themes/index.d.ts +0 -0
- package/dist/{theme → src/theme}/color.d.ts +0 -0
- package/dist/{theme → src/theme}/theme-impl.d.ts +0 -0
- package/dist/{theme → src/theme}/themeSelector.d.ts +0 -0
- package/dist/{theme → src/theme}/themeWrapper.d.ts +0 -0
- package/dist/{theme → src/theme}/typography.d.ts +0 -0
- package/dist/{utils → src/utils}/api.d.ts +0 -0
- package/dist/{utils → src/utils}/calculation.d.ts +0 -0
- package/dist/{utils → src/utils}/color.d.ts +0 -0
- package/dist/{utils → src/utils}/common-utility.d.ts +1 -1
- /package/dist/{utils → src/utils}/common.d.ts +0 -0
- /package/dist/{utils → src/utils}/constant.d.ts +0 -0
- /package/dist/{utils → src/utils}/country.d.ts +0 -0
- /package/dist/{utils → src/utils}/date-range.d.ts +0 -0
- /package/dist/{utils → src/utils}/dateFormat.d.ts +0 -0
- /package/dist/{utils → src/utils}/dateValidation.d.ts +0 -0
- /package/dist/{utils → src/utils}/deformat-text.d.ts +0 -0
- /package/dist/{utils → src/utils}/export-filters.d.ts +0 -0
- /package/dist/{utils → src/utils}/fileSize.d.ts +0 -0
- /package/dist/{utils → src/utils}/form-builder-conversion.d.ts +0 -0
- /package/dist/{utils → src/utils}/form-builder-deconversion.d.ts +0 -0
- /package/dist/{utils → src/utils}/format-text.d.ts +0 -0
- /package/dist/{utils → src/utils}/i18n.d.ts +0 -0
- /package/dist/{utils → src/utils}/language.d.ts +0 -0
- /package/dist/{utils → src/utils}/menu-filter.d.ts +0 -0
- /package/dist/{utils → src/utils}/metaComponent.d.ts +0 -0
- /package/dist/{utils → src/utils}/migration-utils.d.ts +0 -0
- /package/dist/{utils → src/utils}/navigation-utils.d.ts +0 -0
- /package/dist/{utils → src/utils}/route-utils.d.ts +0 -0
- /package/dist/{utils → src/utils}/server.d.ts +0 -0
- /package/dist/{utils → src/utils}/setup.d.ts +0 -0
- /package/dist/{utils → src/utils}/translations.d.ts +0 -0
- /package/dist/{views → src/views}/404.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/accounting.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/crm.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/dashboard/dashboard.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/dashboard/redux/actionCreator.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/dashboard/redux/reducer.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/dashboard/redux/state.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/document.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/hrms.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/inventory.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/manufacturing.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/office.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/page-view/page-view.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/page-view/redux/actionCreator.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/page-view/redux/reducer.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/page-view/redux/state.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/page-view/utils/default-data.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/page-view/utils/local-data.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/procurement.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/project.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/purchase.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/quotes.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/rental.d.ts +0 -0
- /package/dist/{views → src/views}/afterAuth/user.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/change-password/change-password.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/activity-tag-data/activity-tag-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/calendar-data/calendar-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/drive-dashboard-data/drive-dashboard-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/gantt-data/gantt-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/grid-data/grid-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/index.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/kanbann-content/kanbann-raw.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/list-content/column-raw.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/list-content/list-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/multiline-data/multiline-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/share-modal-data/share-modal-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/shared-pages-data/shared-pages-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/tabs-data/tabs-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/user-dashboard-data/user-dashboard-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/user-dropdown-data/user-dropdown-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/components/user-profile-data/user-profile-data.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/forgot-password/forgot-password.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/landing/landing.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/login/index.d.ts +0 -0
- /package/dist/{views → src/views}/beforeAuth/reset-password/reset-password.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/custom-form.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/element-edit-forms/checkbox.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/element-edit-forms/column-width.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/element-edit-forms/field-select.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/element-edit-forms/index.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/element-edit-forms/section.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/element-edit-forms/select.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/element-edit-forms/table-form.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/element-edit-forms/text.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/field_properties.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/form-fields.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/index.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/redux/actionCreator.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/redux/state.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/types.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/utils/common.d.ts +0 -0
- /package/dist/{views → src/views}/form-builder/utils/index.d.ts +0 -0
- /package/dist/{views → src/views}/privateRoute.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/add-template/add-template.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/add-template/index.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/company-selection-modal/company-selection-modal.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/company-selection-modal/index.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/EditorCanvas.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/EditorHeader.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/EditorSection.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/EditorSidebar.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/SectionFlowEditor.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/SectionFormatPanel.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/controllers/AlignmentControl.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/controllers/ButtonControls.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/controllers/CodeControls.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/controllers/DividerControls.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/controllers/ImageControls.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/controllers/SignatureControls.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/controllers/TableControls.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/controllers/TextControls.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/controllers/border-control.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/components/index.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/edit-section-modal/edit-section-modal.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/edit-section-modal/index.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/index.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/routes.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/template-modal/html-thumbnail-preview.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/template-modal/index.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/template-modal/template-modal.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/template-name-modal/index.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/template-name-modal/template-name-modal.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/templates.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/types/editor.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/types/index.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/utils/common.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/utils/constant.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/utils/default-data.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/utils/index.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/utils/style-extractor.d.ts +0 -0
- /package/dist/{views → src/views}/template-editor/utils/types.d.ts +0 -0
|
@@ -1,1164 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React__default, { useState, useEffect, useCallback, cloneElement } from "react";
|
|
3
|
-
import { useMaterialReactTable, MaterialReactTable } from "../../../node_modules/material-react-table/dist/index.esm/index.esm.js";
|
|
4
|
-
import default_1$1 from "../../../node_modules/@mui/icons-material/ChevronRight/index.esm.js";
|
|
5
|
-
import default_1 from "../../../node_modules/@mui/icons-material/ChevronLeft/index.esm.js";
|
|
6
|
-
import Menu from "../../menu/menu/index.esm.js";
|
|
7
|
-
import { Typography } from "../../typography/typography/index.esm.js";
|
|
8
|
-
import SearchBar from "../../search-bar/search-bar/index.esm.js";
|
|
9
|
-
import { images } from "../../../images/index.esm.js";
|
|
10
|
-
/* empty css */
|
|
11
|
-
import InlineEditFields from "../components/inline-edit-fields/index.esm.js";
|
|
12
|
-
import Tooltip from "../../tooltip/Tooltip/index.esm.js";
|
|
13
|
-
import Button from "../../button/button/index.esm.js";
|
|
14
|
-
import default_1$2 from "../../../node_modules/@mui/icons-material/Add/index.esm.js";
|
|
15
|
-
import dayjs from "dayjs";
|
|
16
|
-
import * as Yup from "yup";
|
|
17
|
-
import ConfirmPopUp from "../../confirm-modal/confirm-modal/index.esm.js";
|
|
18
|
-
import { useTranslation } from "react-i18next";
|
|
19
|
-
import { enqueueSnackbar } from "../../../node_modules/notistack/notistack.esm/index.esm.js";
|
|
20
|
-
import { usePages } from "../../../hooks/use-pages/index.esm.js";
|
|
21
|
-
import { useNavigate } from "react-router-dom";
|
|
22
|
-
import { PathnameDocument } from "../../../constants/pathnames/pathname.document/index.esm.js";
|
|
23
|
-
import { PathnameAccounting } from "../../../constants/pathnames/pathname.accounting/index.esm.js";
|
|
24
|
-
import { PathnameInventory } from "../../../constants/pathnames/pathname.inventory/index.esm.js";
|
|
25
|
-
import { PathnameManufacturing } from "../../../constants/pathnames/pathname.manufacturing/index.esm.js";
|
|
26
|
-
import { PathnamePurchase } from "../../../constants/pathnames/pathname.procurement/index.esm.js";
|
|
27
|
-
import { PathnameCrm } from "../../../constants/pathnames/pathname.crm/index.esm.js";
|
|
28
|
-
import { PathnameUsers } from "../../../constants/pathnames/pathname.user/index.esm.js";
|
|
29
|
-
import { PathnameRental } from "../../../constants/pathnames/pathname.rental/index.esm.js";
|
|
30
|
-
import useDeepMemo from "../../../hooks/use-deep-memo/index.esm.js";
|
|
31
|
-
import Box from "../../../node_modules/@mui/material/Box/Box/index.esm.js";
|
|
32
|
-
import IconButton from "../../../node_modules/@mui/material/IconButton/IconButton/index.esm.js";
|
|
33
|
-
import styled from "../../../node_modules/@mui/material/styles/styled/index.esm.js";
|
|
34
|
-
import MenuItem from "../../../node_modules/@mui/material/MenuItem/MenuItem/index.esm.js";
|
|
35
|
-
import ListItemIcon from "../../../node_modules/@mui/material/ListItemIcon/ListItemIcon/index.esm.js";
|
|
36
|
-
import ListItemText from "../../../node_modules/@mui/material/ListItemText/ListItemText/index.esm.js";
|
|
37
|
-
import Divider from "../../../node_modules/@mui/material/Divider/Divider/index.esm.js";
|
|
38
|
-
import { Close } from "../../icons/close/index.esm.js";
|
|
39
|
-
import { ArrowUpDown } from "../../icons/arrow-up-down/index.esm.js";
|
|
40
|
-
import { RecgtangleIcon } from "../../icons/rectangle/index.esm.js";
|
|
41
|
-
import { CheckBoxIcon } from "../../icons/check-box/index.esm.js";
|
|
42
|
-
import { Trash } from "../../icons/trash/index.esm.js";
|
|
43
|
-
const TableWrapper = styled(Box)(({ theme: { palette } }) => {
|
|
44
|
-
var _a, _b, _c, _d;
|
|
45
|
-
return {
|
|
46
|
-
".MuiTableCell-root": {
|
|
47
|
-
border: "1px solid #efefef",
|
|
48
|
-
borderBottom: 0,
|
|
49
|
-
borderLeft: 0,
|
|
50
|
-
padding: "0.19rem 0.5rem",
|
|
51
|
-
lineHeight: "19px",
|
|
52
|
-
fontSize: "14px",
|
|
53
|
-
minHeight: 40
|
|
54
|
-
// '&:first-child': {
|
|
55
|
-
// borderLeft: '1px solid #efefef'
|
|
56
|
-
// },
|
|
57
|
-
// '&:last-child': {
|
|
58
|
-
// borderBottom: '1px solid #efefef'
|
|
59
|
-
// }
|
|
60
|
-
},
|
|
61
|
-
".MuiTableCell-head": {
|
|
62
|
-
backgroundColor: (_a = palette.theme) == null ? void 0 : _a.secondary[100]
|
|
63
|
-
},
|
|
64
|
-
".MuiTableContainer-root": {
|
|
65
|
-
maxHeight: "clamp(350px, 100vh - 200px, 9999px) !important"
|
|
66
|
-
},
|
|
67
|
-
".MuiPaper-root": {
|
|
68
|
-
boxShadow: "none"
|
|
69
|
-
},
|
|
70
|
-
".MuiPaginationItem-root": {
|
|
71
|
-
"&.Mui-selected": {
|
|
72
|
-
backgroundColor: (_b = palette == null ? void 0 : palette.theme) == null ? void 0 : _b.primary[700],
|
|
73
|
-
color: "white"
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
".MuiTableRow-root": {
|
|
77
|
-
"&.Mui-selected": {
|
|
78
|
-
backgroundColor: `${(_c = palette == null ? void 0 : palette.theme) == null ? void 0 : _c.primary[100]} !important`,
|
|
79
|
-
color: "white"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
".MuiCheckbox-indeterminate": {
|
|
83
|
-
color: `${(_d = palette == null ? void 0 : palette.theme) == null ? void 0 : _d.primary[700]} !important`,
|
|
84
|
-
"& svg": {
|
|
85
|
-
height: `20px !important`,
|
|
86
|
-
width: `20px !important`
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
});
|
|
91
|
-
const MaterialEditableTable = React__default.memo(({
|
|
92
|
-
enablePagination = false,
|
|
93
|
-
rows,
|
|
94
|
-
columns,
|
|
95
|
-
totalPages,
|
|
96
|
-
paginationModel,
|
|
97
|
-
columnOrder,
|
|
98
|
-
updateData,
|
|
99
|
-
handleColumnOrdering,
|
|
100
|
-
enableEditing,
|
|
101
|
-
enableColumnDragging,
|
|
102
|
-
states,
|
|
103
|
-
rowActionMenu,
|
|
104
|
-
destructiveActionMenu,
|
|
105
|
-
disableDefaultActionColumn,
|
|
106
|
-
enableRowSelection,
|
|
107
|
-
defaultActionColumnItems = [],
|
|
108
|
-
enableBottomToolbar,
|
|
109
|
-
SetSelectedRowId,
|
|
110
|
-
isResetRow,
|
|
111
|
-
onCreateRow,
|
|
112
|
-
onEditRow,
|
|
113
|
-
onDeleteRow,
|
|
114
|
-
editDisplayMode,
|
|
115
|
-
enableRowCreate,
|
|
116
|
-
onChangeRowField,
|
|
117
|
-
onSelectRow,
|
|
118
|
-
enableColumnResizing = true,
|
|
119
|
-
selectedRowIds = [],
|
|
120
|
-
onColumnVisibility,
|
|
121
|
-
onSortingChange,
|
|
122
|
-
getSelectedData,
|
|
123
|
-
disabledDefaultActionColumnIcon = false,
|
|
124
|
-
enableAddCustomField = true,
|
|
125
|
-
enableRowDragging = false,
|
|
126
|
-
handleColumnResizing = () => {
|
|
127
|
-
},
|
|
128
|
-
columnSizes = {},
|
|
129
|
-
// eslint-disable-next-line unused-imports/no-unused-vars, @typescript-eslint/no-unused-vars
|
|
130
|
-
// getRowId,
|
|
131
|
-
// onDelete,
|
|
132
|
-
// onUpdate,
|
|
133
|
-
...rest
|
|
134
|
-
}) => {
|
|
135
|
-
const { t } = useTranslation();
|
|
136
|
-
const { formData = null, updatePageInfo, activePage: aPage } = usePages();
|
|
137
|
-
const activePage = useDeepMemo(aPage);
|
|
138
|
-
const { pageNo } = paginationModel;
|
|
139
|
-
const [row, setRow] = useState({});
|
|
140
|
-
const [tableColumns, setTableColumns] = useState(columns);
|
|
141
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
142
|
-
const [popUpShow, setPopupShow] = useState(false);
|
|
143
|
-
const [rowAnchorEl, setRowAnchorEl] = useState(null);
|
|
144
|
-
const visibleColumns = tableColumns.filter((column) => column.visible);
|
|
145
|
-
const hiddenColumns = tableColumns.filter((column) => !column.visible);
|
|
146
|
-
const [filteredOptions, setFilteredOptions] = useState(hiddenColumns);
|
|
147
|
-
const [selectedRow, setSelectedRow] = useState(null);
|
|
148
|
-
const [validationErrors, setValidationErrors] = useState({});
|
|
149
|
-
const [validationSchema, setValidationSchema] = useState([]);
|
|
150
|
-
const [isCreatingRow, setIsCreatingRow] = useState(false);
|
|
151
|
-
const [isEditingRow, setIsEditingRow] = useState(false);
|
|
152
|
-
const [isDeletingRow, setIsDeletingRow] = useState(false);
|
|
153
|
-
const [rowToDelete, setRowToDelete] = useState(null);
|
|
154
|
-
const [rowSelection, setRowSelection] = useState({});
|
|
155
|
-
const [isChecked, setIsChecked] = useState(false);
|
|
156
|
-
const [sorting, setSorting] = useState([]);
|
|
157
|
-
const [disableNextEdit, setDisableNextEdit] = useState(false);
|
|
158
|
-
const [columnSizing, setColumnSizing] = useState(activePage.column_sizes);
|
|
159
|
-
const [columnSizingInfo, setColumnSizingInfo] = useState({
|
|
160
|
-
columnSizingStart: [],
|
|
161
|
-
deltaOffset: null,
|
|
162
|
-
deltaPercentage: null,
|
|
163
|
-
isResizingColumn: false,
|
|
164
|
-
startOffset: null,
|
|
165
|
-
startSize: null
|
|
166
|
-
});
|
|
167
|
-
useState(0);
|
|
168
|
-
const navigate = useNavigate();
|
|
169
|
-
const currentModule = location.pathname.split("/")[2];
|
|
170
|
-
let redirectionPath = "";
|
|
171
|
-
switch (currentModule) {
|
|
172
|
-
case "accounting":
|
|
173
|
-
redirectionPath = PathnameAccounting.CUSTOM_FORM;
|
|
174
|
-
break;
|
|
175
|
-
case "inventory":
|
|
176
|
-
redirectionPath = PathnameInventory.CUSTOM_FORM;
|
|
177
|
-
break;
|
|
178
|
-
case "manufacturing":
|
|
179
|
-
redirectionPath = PathnameManufacturing.CUSTOM_FORM;
|
|
180
|
-
break;
|
|
181
|
-
case "procurement":
|
|
182
|
-
redirectionPath = PathnamePurchase.CUSTOM_FORM;
|
|
183
|
-
break;
|
|
184
|
-
case "crm":
|
|
185
|
-
redirectionPath = PathnameCrm.CUSTOM_FORM;
|
|
186
|
-
break;
|
|
187
|
-
case "user":
|
|
188
|
-
redirectionPath = PathnameUsers.CUSTOM_FORM;
|
|
189
|
-
break;
|
|
190
|
-
case "rental":
|
|
191
|
-
redirectionPath = PathnameRental.CUSTOM_FORM;
|
|
192
|
-
break;
|
|
193
|
-
case "drive":
|
|
194
|
-
redirectionPath = PathnameDocument.ADD_CUSTOM_FIELDS;
|
|
195
|
-
break;
|
|
196
|
-
}
|
|
197
|
-
const path = `/dashboard/${currentModule}${redirectionPath}`;
|
|
198
|
-
const getValidationType = (column) => {
|
|
199
|
-
var _a;
|
|
200
|
-
switch (column.editVariant) {
|
|
201
|
-
case "select":
|
|
202
|
-
return ((_a = column == null ? void 0 : column.editProperties) == null ? void 0 : _a.is_multiple) ? Yup.array() : Yup.string();
|
|
203
|
-
case "number":
|
|
204
|
-
return Yup.number().nullable().transform((value, originalValue) => originalValue === "" ? null : value);
|
|
205
|
-
case "url":
|
|
206
|
-
return Yup.string().matches(
|
|
207
|
-
/^(https?:\/\/)?((([a-zA-Z0-9_-]+\.)+[a-zA-Z]{2,})|localhost)(:\d{2,5})?(\/[a-zA-Z0-9#_-]+\/?)*(\?[a-zA-Z0-9&=_-]+)?(#\S+)?$/,
|
|
208
|
-
{ excludeEmptyString: true, message: "Please enter valid URL." }
|
|
209
|
-
);
|
|
210
|
-
default:
|
|
211
|
-
return Yup.string();
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
const validationReducer = (validations, validation, column) => {
|
|
215
|
-
var _a;
|
|
216
|
-
let vld = validations;
|
|
217
|
-
switch (validation.type) {
|
|
218
|
-
case "required":
|
|
219
|
-
vld = validation.value ? validations.required(validation.msg_en).typeError(validation.msg_en) : ((_a = column == null ? void 0 : column.editProperties) == null ? void 0 : _a.is_multiple) ? validations.min(1, validation.msg_en) : validations;
|
|
220
|
-
break;
|
|
221
|
-
case "min":
|
|
222
|
-
vld = validations.min(validation.value, validation.msg_en);
|
|
223
|
-
break;
|
|
224
|
-
case "email":
|
|
225
|
-
vld = validations.email(validation.value, validation.msg_en);
|
|
226
|
-
break;
|
|
227
|
-
case "max":
|
|
228
|
-
vld = validations.max(validation.value, validation.msg_en);
|
|
229
|
-
break;
|
|
230
|
-
case "positive":
|
|
231
|
-
vld = validation.value === true ? validations.test("is-positive-number", "Value must be a positive number", (value) => !value || value >= 0) : validations;
|
|
232
|
-
break;
|
|
233
|
-
case "when":
|
|
234
|
-
return validations.when(validation.relation, {
|
|
235
|
-
is: (val) => val === validation.values,
|
|
236
|
-
then: () => {
|
|
237
|
-
var _a2;
|
|
238
|
-
return ((_a2 = validation == null ? void 0 : validation.thenValidations) == null ? void 0 : _a2.reduce(
|
|
239
|
-
(validations2, validation2) => validationReducer(validations2, validation2, column),
|
|
240
|
-
validations
|
|
241
|
-
)) || validations;
|
|
242
|
-
},
|
|
243
|
-
otherwise: () => {
|
|
244
|
-
var _a2;
|
|
245
|
-
return ((_a2 = validation == null ? void 0 : validation.otherWiseValidations) == null ? void 0 : _a2.reduce(
|
|
246
|
-
(validations2, validation2) => validationReducer(validations2, validation2, column),
|
|
247
|
-
validations
|
|
248
|
-
)) || validations;
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
default:
|
|
252
|
-
vld = validations;
|
|
253
|
-
break;
|
|
254
|
-
}
|
|
255
|
-
if (validation.type == "required" && validation.value && (!(column == null ? void 0 : column.editVariant) || (column == null ? void 0 : column.editVariant) == "text")) {
|
|
256
|
-
vld = validations.test("no-blank-spaces", "Blank space is not allowed", (value) => {
|
|
257
|
-
var _a2;
|
|
258
|
-
return value && ((_a2 = value.trim()) == null ? void 0 : _a2.length) > 0;
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
return vld;
|
|
262
|
-
};
|
|
263
|
-
const generateValidationSchema = (columns2) => {
|
|
264
|
-
const schema = {};
|
|
265
|
-
columns2.forEach((clm) => {
|
|
266
|
-
var _a, _b, _c;
|
|
267
|
-
if ((_b = (_a = clm == null ? void 0 : clm.editProperties) == null ? void 0 : _a.validations) == null ? void 0 : _b.length) {
|
|
268
|
-
const fieldValidations = (_c = clm == null ? void 0 : clm.editProperties) == null ? void 0 : _c.validations.reduce(
|
|
269
|
-
(validations, validation) => validationReducer(validations, validation, clm),
|
|
270
|
-
getValidationType(clm)
|
|
271
|
-
);
|
|
272
|
-
schema[clm.accessorKey] = fieldValidations;
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
return schema;
|
|
276
|
-
};
|
|
277
|
-
useEffect(() => {
|
|
278
|
-
setTableColumns(columns);
|
|
279
|
-
const schema = generateValidationSchema(columns);
|
|
280
|
-
setValidationSchema(Yup.object().shape(schema));
|
|
281
|
-
}, [columns]);
|
|
282
|
-
useEffect(() => {
|
|
283
|
-
if (!(columnSizingInfo == null ? void 0 : columnSizingInfo.isResizingColumn)) {
|
|
284
|
-
updatePageInfo({ column_sizes: { ...activePage.column_sizes, ...columnSizing } });
|
|
285
|
-
handleColumnResizing == null ? void 0 : handleColumnResizing(columnSizing);
|
|
286
|
-
}
|
|
287
|
-
}, [columnSizingInfo == null ? void 0 : columnSizingInfo.isResizingColumn, columnSizing]);
|
|
288
|
-
const handleHeaderClick = (event) => {
|
|
289
|
-
setAnchorEl(event.currentTarget);
|
|
290
|
-
};
|
|
291
|
-
const handleHeaderClose = () => {
|
|
292
|
-
setAnchorEl(null);
|
|
293
|
-
};
|
|
294
|
-
const handleVisibleColumn = (column) => {
|
|
295
|
-
const updatedColumns = tableColumns.map((col) => ({
|
|
296
|
-
...col,
|
|
297
|
-
visible: col.accessorKey === column.accessorKey ? false : col.visible
|
|
298
|
-
}));
|
|
299
|
-
setTableColumns(updatedColumns);
|
|
300
|
-
onColumnVisibility == null ? void 0 : onColumnVisibility(JSON.parse(JSON.stringify(updatedColumns)));
|
|
301
|
-
setFilteredOptions([...filteredOptions, column]);
|
|
302
|
-
setAnchorEl(null);
|
|
303
|
-
};
|
|
304
|
-
const handleAddButtonClick = () => {
|
|
305
|
-
setPopupShow(true);
|
|
306
|
-
};
|
|
307
|
-
const handleBackButtonClick = () => {
|
|
308
|
-
setPopupShow(false);
|
|
309
|
-
};
|
|
310
|
-
const handleAddColumn = (column) => {
|
|
311
|
-
const updatedColumns = tableColumns.map((col) => ({
|
|
312
|
-
...col,
|
|
313
|
-
visible: col.accessorKey === column.accessorKey ? true : col.visible
|
|
314
|
-
}));
|
|
315
|
-
onColumnVisibility == null ? void 0 : onColumnVisibility(JSON.parse(JSON.stringify(updatedColumns)));
|
|
316
|
-
setTableColumns(updatedColumns);
|
|
317
|
-
const updatedFilteredOptions = filteredOptions.filter(
|
|
318
|
-
(option) => option.accessorKey !== column.accessorKey
|
|
319
|
-
);
|
|
320
|
-
setFilteredOptions(updatedFilteredOptions);
|
|
321
|
-
setAnchorEl(null);
|
|
322
|
-
setPopupShow(false);
|
|
323
|
-
};
|
|
324
|
-
const handleSearchEvent = (searchQuery) => {
|
|
325
|
-
const filteredColumns = hiddenColumns.filter(
|
|
326
|
-
(option) => option.header.toLowerCase().includes(searchQuery.toLowerCase())
|
|
327
|
-
);
|
|
328
|
-
setFilteredOptions(filteredColumns);
|
|
329
|
-
};
|
|
330
|
-
const handleCustomAddColumn = () => {
|
|
331
|
-
navigate(path, { state: formData });
|
|
332
|
-
setAnchorEl(null);
|
|
333
|
-
setPopupShow(false);
|
|
334
|
-
};
|
|
335
|
-
const handleActionsClick = (event, data) => {
|
|
336
|
-
setRow(data);
|
|
337
|
-
setRowAnchorEl(event.currentTarget);
|
|
338
|
-
};
|
|
339
|
-
const handleActionsClose = () => {
|
|
340
|
-
setRowAnchorEl(null);
|
|
341
|
-
};
|
|
342
|
-
const formtValues = useCallback((values, cells) => {
|
|
343
|
-
const v = {};
|
|
344
|
-
Object.keys(values).forEach((vl) => {
|
|
345
|
-
const val = values[vl];
|
|
346
|
-
const cell = cells.find((c) => c.accessorKey == vl);
|
|
347
|
-
if (val) {
|
|
348
|
-
if (val instanceof File) {
|
|
349
|
-
v[vl] = val.name;
|
|
350
|
-
} else if (cell && (cell == null ? void 0 : cell.editVariant) == "date") {
|
|
351
|
-
v[vl] = dayjs(val).format((cell == null ? void 0 : cell.dateFormat) || "DD-MM-YYYY");
|
|
352
|
-
} else if (cell && (cell == null ? void 0 : cell.editVariant) == "select" && typeof val === "object" && val !== null) {
|
|
353
|
-
v[vl] = val.name || val.label || val.display_name || val.title || val.value || val.id || val;
|
|
354
|
-
} else if (cell && (cell == null ? void 0 : cell.editVariant) == "select" && typeof val === "string") {
|
|
355
|
-
v[vl] = val;
|
|
356
|
-
} else {
|
|
357
|
-
v[vl] = val;
|
|
358
|
-
}
|
|
359
|
-
} else {
|
|
360
|
-
v[vl] = val;
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
|
-
return v;
|
|
364
|
-
}, []);
|
|
365
|
-
const handleRowDelete = async () => {
|
|
366
|
-
setIsDeletingRow(true);
|
|
367
|
-
if (rowToDelete) {
|
|
368
|
-
await (onDeleteRow == null ? void 0 : onDeleteRow(rowToDelete));
|
|
369
|
-
setRowToDelete(null);
|
|
370
|
-
}
|
|
371
|
-
setIsDeletingRow(false);
|
|
372
|
-
};
|
|
373
|
-
const checkRequired = useCallback((editProperties) => {
|
|
374
|
-
var _a;
|
|
375
|
-
return (_a = editProperties == null ? void 0 : editProperties.validations) == null ? void 0 : _a.some((validation) => validation.type === "required");
|
|
376
|
-
}, []);
|
|
377
|
-
useEffect(() => {
|
|
378
|
-
const selectedRows = {};
|
|
379
|
-
if (!isChecked && selectedRowIds.length) {
|
|
380
|
-
rows.forEach((row2) => {
|
|
381
|
-
if (selectedRowIds.includes(row2.id)) {
|
|
382
|
-
selectedRows[row2.id] = true;
|
|
383
|
-
}
|
|
384
|
-
});
|
|
385
|
-
setRowSelection(selectedRows);
|
|
386
|
-
setIsChecked(true);
|
|
387
|
-
}
|
|
388
|
-
}, [rows, selectedRowIds]);
|
|
389
|
-
useEffect(() => {
|
|
390
|
-
if (onSortingChange instanceof Function) {
|
|
391
|
-
const sortingArray = Array.isArray(sorting) ? sorting : [];
|
|
392
|
-
onSortingChange(sortingArray[0] || null);
|
|
393
|
-
}
|
|
394
|
-
}, [sorting]);
|
|
395
|
-
const resetRowSelection = () => {
|
|
396
|
-
setRowSelection({});
|
|
397
|
-
setDisableNextEdit(false);
|
|
398
|
-
};
|
|
399
|
-
const getTextWidth = (text) => {
|
|
400
|
-
const canvas = document.createElement("canvas");
|
|
401
|
-
const ctx = canvas.getContext("2d");
|
|
402
|
-
if (!ctx) return 50;
|
|
403
|
-
return ctx.measureText(text).width + 5;
|
|
404
|
-
};
|
|
405
|
-
const handleSaveRow = useCallback(async (row2, values, tableInstance) => {
|
|
406
|
-
console.log("handleSaveRow", onEditRow);
|
|
407
|
-
try {
|
|
408
|
-
await validationSchema.validate(values, {
|
|
409
|
-
abortEarly: false
|
|
410
|
-
});
|
|
411
|
-
setValidationErrors({});
|
|
412
|
-
setIsEditingRow(true);
|
|
413
|
-
setDisableNextEdit(false);
|
|
414
|
-
const cells = row2.getAllCells().map((c) => c.column.columnDef);
|
|
415
|
-
row2._valuesCache = formtValues(values, cells);
|
|
416
|
-
const data = { row: row2, values, table: tableInstance };
|
|
417
|
-
if (onEditRow) {
|
|
418
|
-
await onEditRow(data, "edit");
|
|
419
|
-
}
|
|
420
|
-
setIsEditingRow(false);
|
|
421
|
-
tableInstance.setEditingRow(null);
|
|
422
|
-
} catch (err) {
|
|
423
|
-
console.log("handleSaveRow error", err);
|
|
424
|
-
setIsEditingRow(false);
|
|
425
|
-
if (err instanceof Yup.ValidationError) {
|
|
426
|
-
const errors = {};
|
|
427
|
-
err.inner.forEach((error) => {
|
|
428
|
-
if (error.path) {
|
|
429
|
-
errors[error.path] = error.message;
|
|
430
|
-
}
|
|
431
|
-
});
|
|
432
|
-
setValidationErrors(errors);
|
|
433
|
-
} else if (err instanceof Error) {
|
|
434
|
-
enqueueSnackbar(err.message, { variant: "error" });
|
|
435
|
-
} else {
|
|
436
|
-
enqueueSnackbar("Something went wrong", { variant: "error" });
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}, [validationSchema, onEditRow, formtValues]);
|
|
440
|
-
const table = useMaterialReactTable({
|
|
441
|
-
// options:{
|
|
442
|
-
// tableLayout: "auto", // 👈 important
|
|
443
|
-
// padding: "dense",
|
|
444
|
-
// },
|
|
445
|
-
// columns: visibleColumns,
|
|
446
|
-
defaultColumn: {
|
|
447
|
-
minSize: 0,
|
|
448
|
-
// 👈 remove default min width
|
|
449
|
-
size: void 0
|
|
450
|
-
// 👈 optional, default size
|
|
451
|
-
},
|
|
452
|
-
columns: [
|
|
453
|
-
...visibleColumns.map((c) => {
|
|
454
|
-
getTextWidth(c.header || "");
|
|
455
|
-
Math.max(
|
|
456
|
-
...rows.map((row2) => getTextWidth(String(row2[c.accessorKey] ?? "")))
|
|
457
|
-
);
|
|
458
|
-
return {
|
|
459
|
-
...c,
|
|
460
|
-
...editDisplayMode === "row" ? {
|
|
461
|
-
Edit: ({ cell, row: row2, table: table2, column }) => {
|
|
462
|
-
return /* @__PURE__ */ jsx(
|
|
463
|
-
InlineEditFields,
|
|
464
|
-
{
|
|
465
|
-
cell,
|
|
466
|
-
column,
|
|
467
|
-
col: c,
|
|
468
|
-
row: row2,
|
|
469
|
-
table: table2,
|
|
470
|
-
callback: (s) => console.log("Save", s),
|
|
471
|
-
errors: validationErrors,
|
|
472
|
-
validationSchema,
|
|
473
|
-
setValidationErrors,
|
|
474
|
-
onChangeRowField,
|
|
475
|
-
getSelectedData: (name, row3) => getSelectedData == null ? void 0 : getSelectedData(name, row3)
|
|
476
|
-
}
|
|
477
|
-
);
|
|
478
|
-
}
|
|
479
|
-
} : {},
|
|
480
|
-
Header: /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", children: [
|
|
481
|
-
c.header,
|
|
482
|
-
(c == null ? void 0 : c.required) || checkRequired(c == null ? void 0 : c.editProperties) && /* @__PURE__ */ jsx(Typography, { type: "s5", color: "theme.error.600", children: "*" })
|
|
483
|
-
] }),
|
|
484
|
-
enableColumnDragging: c.id !== "actions",
|
|
485
|
-
// cellStyle: { ...c.cellStyle, width: finalWidth },
|
|
486
|
-
// headerStyle: { ...c.headerStyle, width: finalWidth },
|
|
487
|
-
// size: finalWidth
|
|
488
|
-
size: void 0,
|
|
489
|
-
// minSize: 40,
|
|
490
|
-
maxSize: 800
|
|
491
|
-
};
|
|
492
|
-
}),
|
|
493
|
-
...!disableDefaultActionColumn ? [
|
|
494
|
-
{
|
|
495
|
-
id: "actions",
|
|
496
|
-
enableEditing: false,
|
|
497
|
-
size: (defaultActionColumnItems == null ? void 0 : defaultActionColumnItems.length) > 1 ? 80 : 50,
|
|
498
|
-
header: /* @__PURE__ */ jsx(IconButton, { size: "small", sx: { p: 0.5, "&:hover": { backgroundColor: "transparent" } }, onClick: handleHeaderClick, children: /* @__PURE__ */ jsx("img", { src: images.common.arrowIcon, alt: "Arrow Icon" }) }),
|
|
499
|
-
enableColumnDragging: false,
|
|
500
|
-
visible: true,
|
|
501
|
-
muiTableHeadCellProps: {
|
|
502
|
-
className: "pinned-column"
|
|
503
|
-
},
|
|
504
|
-
muiTableBodyCellProps: {
|
|
505
|
-
className: "pinned-column",
|
|
506
|
-
sx: {
|
|
507
|
-
whiteSpace: "pre-wrap"
|
|
508
|
-
}
|
|
509
|
-
},
|
|
510
|
-
Cell: (props) => (defaultActionColumnItems == null ? void 0 : defaultActionColumnItems.length) ? defaultActionColumnItems.map((item) => {
|
|
511
|
-
const updatedProps = {
|
|
512
|
-
...item.props,
|
|
513
|
-
onClick: () => item.props.onClick(props)
|
|
514
|
-
};
|
|
515
|
-
return cloneElement(item, updatedProps);
|
|
516
|
-
}) : !disabledDefaultActionColumnIcon && /* @__PURE__ */ jsx(
|
|
517
|
-
IconButton,
|
|
518
|
-
{
|
|
519
|
-
onClick: (e) => handleActionsClick(e, props.row.original),
|
|
520
|
-
disabled: !(rowActionMenu == null ? void 0 : rowActionMenu.length) && !(destructiveActionMenu == null ? void 0 : destructiveActionMenu.length),
|
|
521
|
-
children: /* @__PURE__ */ jsx("img", { src: images.more, alt: "More Icon" })
|
|
522
|
-
}
|
|
523
|
-
)
|
|
524
|
-
}
|
|
525
|
-
] : []
|
|
526
|
-
],
|
|
527
|
-
data: rows,
|
|
528
|
-
muiTablePaperProps: {
|
|
529
|
-
sx: {
|
|
530
|
-
tableLayout: "auto"
|
|
531
|
-
// lets columns shrink to fit content
|
|
532
|
-
}
|
|
533
|
-
},
|
|
534
|
-
columnResizeMode: "onChange",
|
|
535
|
-
onEditingRowSave: async (data) => {
|
|
536
|
-
await handleSaveRow(data.row, data.values, data.table);
|
|
537
|
-
},
|
|
538
|
-
onCreatingRowSave: async (data) => {
|
|
539
|
-
try {
|
|
540
|
-
await validationSchema.validate(data.values, {
|
|
541
|
-
abortEarly: false
|
|
542
|
-
});
|
|
543
|
-
setValidationErrors({});
|
|
544
|
-
setIsCreatingRow(true);
|
|
545
|
-
setDisableNextEdit(false);
|
|
546
|
-
const cells = data.row.getAllCells().map((c) => c.column.columnDef);
|
|
547
|
-
data.row._valuesCache = formtValues(data.values, cells);
|
|
548
|
-
if (onCreateRow) {
|
|
549
|
-
await onCreateRow(data);
|
|
550
|
-
}
|
|
551
|
-
setIsCreatingRow(false);
|
|
552
|
-
data.table.setCreatingRow(null);
|
|
553
|
-
} catch (err) {
|
|
554
|
-
setIsCreatingRow(false);
|
|
555
|
-
if (err instanceof Yup.ValidationError) {
|
|
556
|
-
const errors = {};
|
|
557
|
-
err.inner.forEach((error) => {
|
|
558
|
-
if (error.path) {
|
|
559
|
-
errors[error.path] = error.message;
|
|
560
|
-
}
|
|
561
|
-
});
|
|
562
|
-
setValidationErrors(errors);
|
|
563
|
-
} else if (err instanceof Error) {
|
|
564
|
-
enqueueSnackbar(err.message, { variant: "error" });
|
|
565
|
-
} else {
|
|
566
|
-
enqueueSnackbar("Something went wrong", { variant: "error" });
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
},
|
|
570
|
-
onCreatingRowCancel: () => resetRowSelection(),
|
|
571
|
-
onEditingRowCancel: () => {
|
|
572
|
-
console.log("onEditingRowCancel called");
|
|
573
|
-
setDisableNextEdit(false);
|
|
574
|
-
},
|
|
575
|
-
onSortingChange: (states == null ? void 0 : states.sorting) ? onSortingChange : setSorting,
|
|
576
|
-
displayColumnDefOptions: {
|
|
577
|
-
"mrt-row-actions": {
|
|
578
|
-
// size: onDeleteRow ? 80 : 50,
|
|
579
|
-
Header: /* @__PURE__ */ jsx(IconButton, { onClick: handleHeaderClick, size: "small", children: /* @__PURE__ */ jsx("img", { src: images.common.arrowIcon, alt: "Arrow Icon" }) }),
|
|
580
|
-
muiTableBodyCellProps: ({ row: row2, table: table2 }) => {
|
|
581
|
-
var _a, _b;
|
|
582
|
-
const isCreatingRow2 = ((_a = table2.getState().creatingRow) == null ? void 0 : _a.id) === row2.id;
|
|
583
|
-
const isEditingRow2 = ((_b = table2.getState().editingRow) == null ? void 0 : _b.id) === row2.id;
|
|
584
|
-
return {
|
|
585
|
-
sx: {
|
|
586
|
-
"& .MuiBox-root": {
|
|
587
|
-
gap: 0
|
|
588
|
-
},
|
|
589
|
-
backgroundColor: "#fff",
|
|
590
|
-
whiteSpace: "pre-wrap",
|
|
591
|
-
// Hide save button only when editing existing row (not in create mode or non-editable mode)
|
|
592
|
-
...isEditingRow2 && !isCreatingRow2 && {
|
|
593
|
-
"& .MuiBox-root > .MuiIconButton-root:first-of-type": {
|
|
594
|
-
display: "none !important"
|
|
595
|
-
},
|
|
596
|
-
// Also hide any save icon buttons by aria-label or title
|
|
597
|
-
'& button[aria-label*="Save"]': {
|
|
598
|
-
display: "none !important"
|
|
599
|
-
},
|
|
600
|
-
'& button[title*="Save"]': {
|
|
601
|
-
display: "none !important"
|
|
602
|
-
},
|
|
603
|
-
// Hide save icon by class or data attributes
|
|
604
|
-
'& .MuiIconButton-root[class*="save"]': {
|
|
605
|
-
display: "none !important"
|
|
606
|
-
},
|
|
607
|
-
'& .MuiIconButton-root[data-testid*="save"]': {
|
|
608
|
-
display: "none !important"
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
},
|
|
612
|
-
onKeyUp: (e) => console.log(e)
|
|
613
|
-
};
|
|
614
|
-
}
|
|
615
|
-
},
|
|
616
|
-
"mrt-row-expand": {
|
|
617
|
-
size: 70
|
|
618
|
-
// Set the size of the expand-collapse arrow column here
|
|
619
|
-
},
|
|
620
|
-
"mrt-row-select": {
|
|
621
|
-
size: 50
|
|
622
|
-
// Set the width of the checkbox column here
|
|
623
|
-
}
|
|
624
|
-
},
|
|
625
|
-
renderRowActions: ({ row: row2, table: table2 }) => /* @__PURE__ */ jsx(Fragment, { children: (rest == null ? void 0 : rest.enableExpanding) ? /* @__PURE__ */ jsx(Fragment, { children: (row2 == null ? void 0 : row2.parentId) && /* @__PURE__ */ jsx(Box, { sx: { display: "flex", gap: 0 }, children: onDeleteRow && /* @__PURE__ */ jsx(Tooltip, { title: "Delete", children: /* @__PURE__ */ jsx(IconButton, { disabled: disableNextEdit, onClick: () => setRowToDelete(row2), size: "small", children: /* @__PURE__ */ jsx(Trash, { fontSize: "small", sx: { color: "theme.secondary.1000" } }) }) }) }) }) : /* @__PURE__ */ jsx(Box, { sx: { display: "flex", gap: 0 }, children: onDeleteRow && /* @__PURE__ */ jsx(Tooltip, { title: "Delete", children: /* @__PURE__ */ jsx(IconButton, { disabled: disableNextEdit, onClick: () => setRowToDelete(row2), children: /* @__PURE__ */ jsx(Trash, { fontSize: "small", sx: { color: "theme.secondary.1000" } }) }) }) }) }),
|
|
626
|
-
...Boolean(enableRowCreate) && {
|
|
627
|
-
renderBottomToolbarCustomActions: ({ table: table2 }) => /* @__PURE__ */ jsx(
|
|
628
|
-
Button,
|
|
629
|
-
{
|
|
630
|
-
variant: "outlined",
|
|
631
|
-
startIcon: /* @__PURE__ */ jsx(default_1$2, {}),
|
|
632
|
-
className: "add-row-btn",
|
|
633
|
-
disabled: disableNextEdit,
|
|
634
|
-
onClick: () => {
|
|
635
|
-
table2.setCreatingRow(true);
|
|
636
|
-
setDisableNextEdit(true);
|
|
637
|
-
},
|
|
638
|
-
children: t("common.add")
|
|
639
|
-
}
|
|
640
|
-
)
|
|
641
|
-
},
|
|
642
|
-
onRowSelectionChange: setRowSelection,
|
|
643
|
-
enableColumnOrdering: true,
|
|
644
|
-
enableRowSelection: enableRowSelection ?? true,
|
|
645
|
-
enableEditing: enableEditing instanceof Function ? enableEditing() : enableEditing ?? true,
|
|
646
|
-
editDisplayMode: editDisplayMode ?? "row",
|
|
647
|
-
createDisplayMode: "row",
|
|
648
|
-
enableColumnResizing,
|
|
649
|
-
enableRowDragging,
|
|
650
|
-
enableTopToolbar: false,
|
|
651
|
-
enableColumnActions: false,
|
|
652
|
-
enableSorting: true,
|
|
653
|
-
enableGrouping: true,
|
|
654
|
-
enableBottomToolbar: enableBottomToolbar ?? false,
|
|
655
|
-
enableColumnDragging: enableColumnDragging ?? true,
|
|
656
|
-
enableStickyHeader: true,
|
|
657
|
-
enableSortingRemoval: false,
|
|
658
|
-
// column ordering
|
|
659
|
-
state: {
|
|
660
|
-
// columnOrder: (!columnOrder || columnOrder.length <= 1)
|
|
661
|
-
// ? [...internalColumnOrder]
|
|
662
|
-
// : [...columnOrder],
|
|
663
|
-
columnOrder,
|
|
664
|
-
columnPinning: { left: ["actions", "mrt-row-actions"] },
|
|
665
|
-
isSaving: isCreatingRow || isEditingRow,
|
|
666
|
-
showProgressBars: false,
|
|
667
|
-
rowSelection,
|
|
668
|
-
...states,
|
|
669
|
-
sorting: Array.isArray(states == null ? void 0 : states.sorting) ? states == null ? void 0 : states.sorting : Array.isArray(sorting) ? sorting : [],
|
|
670
|
-
columnSizing
|
|
671
|
-
},
|
|
672
|
-
getRowId: (row2) => row2 == null ? void 0 : row2.id,
|
|
673
|
-
// table.getState().editingRow
|
|
674
|
-
muiTableBodyRowProps: ({ row: row2, table: table2 }) => {
|
|
675
|
-
var _a, _b, _c, _d, _e;
|
|
676
|
-
const editingRowId = ((_b = (_a = table2.getState()) == null ? void 0 : _a.editingRow) == null ? void 0 : _b.id) || ((_d = (_c = table2.getState()) == null ? void 0 : _c.creatingRow) == null ? void 0 : _d.id) || null;
|
|
677
|
-
const isErrorRow = Boolean((_e = row2 == null ? void 0 : row2.original) == null ? void 0 : _e.has_error);
|
|
678
|
-
const isCurrentlyEditing = editingRowId === row2.id;
|
|
679
|
-
return {
|
|
680
|
-
onClick: () => {
|
|
681
|
-
setSelectedRow(row2.id);
|
|
682
|
-
console.log("Row clicked:", row2.id, "editingRowId:", editingRowId, "isCurrentlyEditing:", isCurrentlyEditing, "disableNextEdit:", disableNextEdit);
|
|
683
|
-
if (editingRowId && editingRowId !== row2.id) {
|
|
684
|
-
table2.setEditingRow(null);
|
|
685
|
-
setTimeout(() => {
|
|
686
|
-
table2.setEditingRow(row2);
|
|
687
|
-
setDisableNextEdit(true);
|
|
688
|
-
}, 100);
|
|
689
|
-
return;
|
|
690
|
-
}
|
|
691
|
-
if (!disableNextEdit && !isCurrentlyEditing && !editingRowId) {
|
|
692
|
-
console.log("Setting row as editable:", row2.id);
|
|
693
|
-
table2.setEditingRow(row2);
|
|
694
|
-
setDisableNextEdit(true);
|
|
695
|
-
} else {
|
|
696
|
-
console.log("Cannot edit row - conditions not met");
|
|
697
|
-
}
|
|
698
|
-
},
|
|
699
|
-
onKeyDown: (e) => {
|
|
700
|
-
if (isCurrentlyEditing) {
|
|
701
|
-
if (e.key === "Enter") {
|
|
702
|
-
e.preventDefault();
|
|
703
|
-
table2.setEditingRow(null);
|
|
704
|
-
} else if (e.key === "Escape") {
|
|
705
|
-
e.preventDefault();
|
|
706
|
-
console.log("Escape pressed, canceling edit for row:", row2.id);
|
|
707
|
-
table2.setEditingRow(null);
|
|
708
|
-
setDisableNextEdit(false);
|
|
709
|
-
handleSaveRow(row2, row2._valuesCache || row2.original, table2);
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
},
|
|
713
|
-
sx: {
|
|
714
|
-
cursor: "pointer",
|
|
715
|
-
// backgroundColor: !editingRowId
|
|
716
|
-
// ? (selectedRow === row.id
|
|
717
|
-
// ? '#e8e8e8'
|
|
718
|
-
// : (isErrorRow ? 'theme.error.100' : 'inherit'))
|
|
719
|
-
// : 'inherit',
|
|
720
|
-
backgroundColor: !editingRowId ? isErrorRow ? "theme.error.100" : "inherit" : "inherit",
|
|
721
|
-
"&:hover": {
|
|
722
|
-
backgroundColor: editingRowId ? "transparent" : isErrorRow ? "theme.error.200" : "#e8e8e8"
|
|
723
|
-
// Removes hover effect globally
|
|
724
|
-
},
|
|
725
|
-
"&:hover td:after": {
|
|
726
|
-
backgroundColor: "transparent"
|
|
727
|
-
// Removes the grey background applied via :after
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
};
|
|
731
|
-
},
|
|
732
|
-
onColumnOrderChange: (colOrder) => {
|
|
733
|
-
if (handleColumnOrdering) handleColumnOrdering(colOrder);
|
|
734
|
-
},
|
|
735
|
-
onColumnSizingChange: setColumnSizing,
|
|
736
|
-
onColumnSizingInfoChange: setColumnSizingInfo,
|
|
737
|
-
renderEmptyRowsFallback: () => /* @__PURE__ */ jsxs(Box, { className: "no-data", children: [
|
|
738
|
-
/* @__PURE__ */ jsx("img", { src: images.common.tableNoData }),
|
|
739
|
-
/* @__PURE__ */ jsx(Typography, { type: "s3", weight: "medium", color: "theme.secondary.1000", children: t("common.noData") })
|
|
740
|
-
] }),
|
|
741
|
-
// pagination
|
|
742
|
-
enablePagination,
|
|
743
|
-
paginationDisplayMode: "pages",
|
|
744
|
-
muiPaginationProps: {
|
|
745
|
-
shape: "rounded",
|
|
746
|
-
page: pageNo,
|
|
747
|
-
// current page number
|
|
748
|
-
count: totalPages,
|
|
749
|
-
// total pages
|
|
750
|
-
showRowsPerPage: false,
|
|
751
|
-
// Hide rows per page options
|
|
752
|
-
boundaryCount: 3
|
|
753
|
-
},
|
|
754
|
-
muiEditTextFieldProps: ({ row: row2, column }) => ({
|
|
755
|
-
InputProps: {
|
|
756
|
-
disableUnderline: true
|
|
757
|
-
},
|
|
758
|
-
onBlur: (e) => {
|
|
759
|
-
updateData(e.target.value, column, row2.id);
|
|
760
|
-
},
|
|
761
|
-
// onChange: (e) => {
|
|
762
|
-
// updateData(e.target.value, column, row.id);
|
|
763
|
-
// },
|
|
764
|
-
variant: "outlined",
|
|
765
|
-
sx: ({ palette }) => {
|
|
766
|
-
var _a;
|
|
767
|
-
return {
|
|
768
|
-
"& .MuiOutlinedInput-root": {
|
|
769
|
-
"& fieldset": {
|
|
770
|
-
borderColor: `${(_a = palette.theme) == null ? void 0 : _a.primary[700]} !important`
|
|
771
|
-
// backgroundColor: palette.theme?.primary[700]
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
};
|
|
775
|
-
}
|
|
776
|
-
}),
|
|
777
|
-
/* Table loader style */
|
|
778
|
-
muiCircularProgressProps: {
|
|
779
|
-
sx: {
|
|
780
|
-
color: "#289B64"
|
|
781
|
-
}
|
|
782
|
-
},
|
|
783
|
-
// Table header cell default styles
|
|
784
|
-
muiTableHeadCellProps: {
|
|
785
|
-
sx: {
|
|
786
|
-
lineHeight: "140%",
|
|
787
|
-
letterSpacing: "-0.28px",
|
|
788
|
-
fontWeight: "500",
|
|
789
|
-
fontSize: "0.875rem",
|
|
790
|
-
"& .Mui-TableHeadCell-Content": {
|
|
791
|
-
height: "100%"
|
|
792
|
-
},
|
|
793
|
-
"& .Mui-TableHeadCell-Content-Labels": {
|
|
794
|
-
width: "100%",
|
|
795
|
-
justifyContent: "space-between"
|
|
796
|
-
},
|
|
797
|
-
"&.pinned-column": {
|
|
798
|
-
backgroundColor: "#fff"
|
|
799
|
-
},
|
|
800
|
-
"& .Mui-TableHeadCell-ResizeHandle-Wrapper": {
|
|
801
|
-
padding: 0,
|
|
802
|
-
margin: 0,
|
|
803
|
-
right: "-5px",
|
|
804
|
-
opacity: 0
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
},
|
|
808
|
-
// Table body cell default styles
|
|
809
|
-
muiTableBodyProps: {
|
|
810
|
-
sx: {
|
|
811
|
-
zIndex: 500
|
|
812
|
-
}
|
|
813
|
-
},
|
|
814
|
-
muiTableHeadProps: {
|
|
815
|
-
sx: {
|
|
816
|
-
zIndex: 600
|
|
817
|
-
}
|
|
818
|
-
},
|
|
819
|
-
muiTableBodyCellProps: () => ({
|
|
820
|
-
sx: {
|
|
821
|
-
lineHeight: "140%",
|
|
822
|
-
letterSpacing: "-0.26px",
|
|
823
|
-
fontWeight: "400",
|
|
824
|
-
fontSize: "0.8125rem",
|
|
825
|
-
"&.pinned-column": {
|
|
826
|
-
backgroundColor: "#fff"
|
|
827
|
-
},
|
|
828
|
-
"&:hover": {
|
|
829
|
-
backgroundColor: "transparent"
|
|
830
|
-
// Removes hover effect globally
|
|
831
|
-
},
|
|
832
|
-
whiteSpace: "pre-wrap"
|
|
833
|
-
}
|
|
834
|
-
// onClick: () => {
|
|
835
|
-
// table.setEditingCell(cell); //set editing cell
|
|
836
|
-
// queueMicrotask(() => {
|
|
837
|
-
// const textField = table.refs.editInputRefs.current[column.id];
|
|
838
|
-
// if (textField) {
|
|
839
|
-
// textField.focus();
|
|
840
|
-
// textField.select?.();
|
|
841
|
-
// }
|
|
842
|
-
// });
|
|
843
|
-
// }
|
|
844
|
-
// onKeyDown: (event) => {
|
|
845
|
-
// if (event.key === 'Tab') {
|
|
846
|
-
// try {
|
|
847
|
-
// // if (column.columnDef.editVariant === 'select') {
|
|
848
|
-
// // table.refs.editInputRefs.current[column.id]?.node?.blur();
|
|
849
|
-
// // } else {
|
|
850
|
-
// // table.refs.editInputRefs.current[column.id].blur();
|
|
851
|
-
// // }
|
|
852
|
-
// const rowIdx = row.index;
|
|
853
|
-
// const colIdx = columns.findIndex(
|
|
854
|
-
// (col) => col.accessorKey === column.id
|
|
855
|
-
// );
|
|
856
|
-
// const newColIdx = colIdx + 1;
|
|
857
|
-
// const clm = columns[newColIdx];
|
|
858
|
-
// const nextCell = row
|
|
859
|
-
// .getAllCells()
|
|
860
|
-
// .find((cl) => (cl.id = `${rowIdx}_${clm.accessorKey}`));
|
|
861
|
-
// if (nextCell) {
|
|
862
|
-
// // updateData(event.target.value, column, row.id);
|
|
863
|
-
// table.setEditingCell(nextCell);
|
|
864
|
-
// queueMicrotask(() => {
|
|
865
|
-
// const textField = table.refs.editInputRefs.current[column.id];
|
|
866
|
-
// if (textField) {
|
|
867
|
-
// textField.focus();
|
|
868
|
-
// textField.select?.();
|
|
869
|
-
// }
|
|
870
|
-
// });
|
|
871
|
-
// }
|
|
872
|
-
// } catch (error) {
|
|
873
|
-
// }
|
|
874
|
-
// }
|
|
875
|
-
// },
|
|
876
|
-
// onBlur: () => {
|
|
877
|
-
// table.setEditingCell(null);
|
|
878
|
-
// }
|
|
879
|
-
}),
|
|
880
|
-
// Checkbox styling
|
|
881
|
-
muiSelectCheckboxProps: {
|
|
882
|
-
sx: {
|
|
883
|
-
color: "theme.secondary.300",
|
|
884
|
-
"&.Mui-checked": {
|
|
885
|
-
color: "theme.primary.600",
|
|
886
|
-
"&:hover": {
|
|
887
|
-
color: "theme.primary.500"
|
|
888
|
-
}
|
|
889
|
-
},
|
|
890
|
-
"&.Mui-disabled": {
|
|
891
|
-
color: "theme.secondary.200"
|
|
892
|
-
}
|
|
893
|
-
},
|
|
894
|
-
icon: /* @__PURE__ */ jsx(RecgtangleIcon, { sx: { width: 20, height: 20 } }),
|
|
895
|
-
checkedIcon: /* @__PURE__ */ jsx(CheckBoxIcon, { sx: { width: 20, height: 20 } })
|
|
896
|
-
},
|
|
897
|
-
muiSelectAllCheckboxProps: {
|
|
898
|
-
sx: {
|
|
899
|
-
color: "theme.secondary.300",
|
|
900
|
-
"&.Mui-checked": {
|
|
901
|
-
color: "theme.primary.600",
|
|
902
|
-
"&:hover": {
|
|
903
|
-
color: "theme.primary.500"
|
|
904
|
-
}
|
|
905
|
-
},
|
|
906
|
-
"&.Mui-disabled": {
|
|
907
|
-
color: "theme.secondary.600"
|
|
908
|
-
}
|
|
909
|
-
},
|
|
910
|
-
icon: /* @__PURE__ */ jsx(RecgtangleIcon, { sx: { width: 20, height: 20 } }),
|
|
911
|
-
checkedIcon: /* @__PURE__ */ jsx(CheckBoxIcon, { sx: { width: 20, height: 20 } })
|
|
912
|
-
},
|
|
913
|
-
muiBottomToolbarProps: {
|
|
914
|
-
sx: {
|
|
915
|
-
boxShadow: "none",
|
|
916
|
-
"& .MuiBox-root": {
|
|
917
|
-
paddingLeft: 0
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
},
|
|
921
|
-
layoutMode: "grid",
|
|
922
|
-
icons: {
|
|
923
|
-
DragHandleIcon: () => /* @__PURE__ */ jsx(RecgtangleIcon, { fontSize: "medium" }),
|
|
924
|
-
SortIcon: () => /* @__PURE__ */ jsx(ArrowUpDown, { fontSize: "medium" }),
|
|
925
|
-
ArrowDownwardIcon: () => /* @__PURE__ */ jsx(ArrowUpDown, { fontSize: "medium" }),
|
|
926
|
-
ArrowUpwardIcon: () => /* @__PURE__ */ jsx(ArrowUpDown, { fontSize: "medium" }),
|
|
927
|
-
ExpandMoreIcon: () => /* @__PURE__ */ jsx(ArrowUpDown, { fontSize: "medium" }),
|
|
928
|
-
ExpandLessIcon: () => /* @__PURE__ */ jsx(ArrowUpDown, { fontSize: "medium" }),
|
|
929
|
-
SyncAltIcon: () => /* @__PURE__ */ jsx(ArrowUpDown, { fontSize: "medium" }),
|
|
930
|
-
CancelIcon: (props) => /* @__PURE__ */ jsx(Close, { fontSize: "small", ...props, color: "theme.secondary.1000" })
|
|
931
|
-
},
|
|
932
|
-
...rest
|
|
933
|
-
});
|
|
934
|
-
useEffect(() => {
|
|
935
|
-
var _a, _b;
|
|
936
|
-
if (enableRowSelection) {
|
|
937
|
-
if ((_a = table == null ? void 0 : table.getSelectedRowModel()) == null ? void 0 : _a.rows) {
|
|
938
|
-
SetSelectedRowId == null ? void 0 : SetSelectedRowId((_b = table == null ? void 0 : table.getSelectedRowModel()) == null ? void 0 : _b.rows);
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
}, [enableRowSelection]);
|
|
942
|
-
useEffect(() => {
|
|
943
|
-
if (onSelectRow) {
|
|
944
|
-
if (rest == null ? void 0 : rest.enableExpanding) {
|
|
945
|
-
const selectedRowModels = [];
|
|
946
|
-
const selection = table.getState().rowSelection;
|
|
947
|
-
const traverseRows = (rows2, parentKey = "") => {
|
|
948
|
-
rows2.forEach((row2, index) => {
|
|
949
|
-
var _a;
|
|
950
|
-
const rowKey = parentKey ? `${parentKey}.${index}` : `${row2.id}`;
|
|
951
|
-
if (selection[rowKey]) {
|
|
952
|
-
selectedRowModels.push(row2);
|
|
953
|
-
}
|
|
954
|
-
if ((_a = row2.subRows) == null ? void 0 : _a.length) {
|
|
955
|
-
traverseRows(row2.subRows, rowKey);
|
|
956
|
-
}
|
|
957
|
-
});
|
|
958
|
-
};
|
|
959
|
-
traverseRows(table.getRowModel().rows);
|
|
960
|
-
onSelectRow(selectedRowModels, rowSelection);
|
|
961
|
-
} else {
|
|
962
|
-
onSelectRow(table.getSelectedRowModel().rows, rowSelection);
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
}, [rowSelection, table]);
|
|
966
|
-
useEffect(() => {
|
|
967
|
-
if (isResetRow) {
|
|
968
|
-
table == null ? void 0 : table.resetRowSelection();
|
|
969
|
-
}
|
|
970
|
-
}, [isResetRow, table]);
|
|
971
|
-
useEffect(() => {
|
|
972
|
-
if (!table) return;
|
|
973
|
-
let dropdownOpenTimer;
|
|
974
|
-
let saveTimer;
|
|
975
|
-
let lastDropdownClick = 0;
|
|
976
|
-
let isDropdownInteraction = false;
|
|
977
|
-
const handleMouseDown = (e) => {
|
|
978
|
-
const target = e.target;
|
|
979
|
-
const isDropdownElement = target.closest(
|
|
980
|
-
'.MuiSelect-root, .MuiMenuItem-root, .MuiPopover-root, .MuiList-root, .MuiMenu-list, .MuiModal-root, .MuiBackdrop-root, .MuiButtonBase-root, .MuiFormControl-root, .MuiInputBase-root, .MuiTextField-root, .MuiOutlinedInput-root, .MuiFilledInput-root, .MuiAutocomplete-popper, .MuiPickersPopper-root, [role="option"], [role="listbox"], [role="combobox"]'
|
|
981
|
-
);
|
|
982
|
-
if (isDropdownElement) {
|
|
983
|
-
isDropdownInteraction = true;
|
|
984
|
-
lastDropdownClick = Date.now();
|
|
985
|
-
if (saveTimer) {
|
|
986
|
-
clearTimeout(saveTimer);
|
|
987
|
-
}
|
|
988
|
-
if (dropdownOpenTimer) {
|
|
989
|
-
clearTimeout(dropdownOpenTimer);
|
|
990
|
-
}
|
|
991
|
-
dropdownOpenTimer = setTimeout(() => {
|
|
992
|
-
isDropdownInteraction = false;
|
|
993
|
-
}, 500);
|
|
994
|
-
}
|
|
995
|
-
};
|
|
996
|
-
const handleClick = (e) => {
|
|
997
|
-
var _a;
|
|
998
|
-
const editingRow = (_a = table.getState()) == null ? void 0 : _a.editingRow;
|
|
999
|
-
if (!editingRow) return;
|
|
1000
|
-
const target = e.target;
|
|
1001
|
-
const now = Date.now();
|
|
1002
|
-
if (isDropdownInteraction || now - lastDropdownClick < 300) {
|
|
1003
|
-
return;
|
|
1004
|
-
}
|
|
1005
|
-
const isInsideTable = target.closest(".MuiTableContainer-root, .MuiPaper-root, .MRT_Table");
|
|
1006
|
-
if (!isInsideTable) {
|
|
1007
|
-
if (saveTimer) {
|
|
1008
|
-
clearTimeout(saveTimer);
|
|
1009
|
-
}
|
|
1010
|
-
saveTimer = setTimeout(() => {
|
|
1011
|
-
var _a2;
|
|
1012
|
-
const currentEditingRow = (_a2 = table.getState()) == null ? void 0 : _a2.editingRow;
|
|
1013
|
-
if (currentEditingRow && !isDropdownInteraction) {
|
|
1014
|
-
handleSaveRow(currentEditingRow, currentEditingRow._valuesCache || currentEditingRow.original, table);
|
|
1015
|
-
}
|
|
1016
|
-
}, 200);
|
|
1017
|
-
}
|
|
1018
|
-
};
|
|
1019
|
-
document.addEventListener("mousedown", handleMouseDown, true);
|
|
1020
|
-
document.addEventListener("click", handleClick, true);
|
|
1021
|
-
return () => {
|
|
1022
|
-
document.removeEventListener("mousedown", handleMouseDown, true);
|
|
1023
|
-
document.removeEventListener("click", handleClick, true);
|
|
1024
|
-
if (dropdownOpenTimer) {
|
|
1025
|
-
clearTimeout(dropdownOpenTimer);
|
|
1026
|
-
}
|
|
1027
|
-
if (saveTimer) {
|
|
1028
|
-
clearTimeout(saveTimer);
|
|
1029
|
-
}
|
|
1030
|
-
};
|
|
1031
|
-
}, [table, handleSaveRow]);
|
|
1032
|
-
return /* @__PURE__ */ jsxs(TableWrapper, { className: "MRT-TableWrapper custom-table", children: [
|
|
1033
|
-
/* @__PURE__ */ jsx(MaterialReactTable, { table }),
|
|
1034
|
-
/* @__PURE__ */ jsx(
|
|
1035
|
-
Menu,
|
|
1036
|
-
{
|
|
1037
|
-
anchorEl,
|
|
1038
|
-
open: Boolean(anchorEl),
|
|
1039
|
-
onClose: handleHeaderClose,
|
|
1040
|
-
className: "add-role-drp",
|
|
1041
|
-
children: popUpShow ? /* @__PURE__ */ jsxs("div", { children: [
|
|
1042
|
-
/* @__PURE__ */ jsxs(
|
|
1043
|
-
MenuItem,
|
|
1044
|
-
{
|
|
1045
|
-
onClick: handleBackButtonClick,
|
|
1046
|
-
className: "role-drp-list add-column-title",
|
|
1047
|
-
children: [
|
|
1048
|
-
/* @__PURE__ */ jsx(ListItemIcon, { className: "add-icon", children: /* @__PURE__ */ jsx(default_1, {}) }),
|
|
1049
|
-
/* @__PURE__ */ jsx(ListItemText, { className: "title", children: t("common.addColumn_label") })
|
|
1050
|
-
]
|
|
1051
|
-
}
|
|
1052
|
-
),
|
|
1053
|
-
/* @__PURE__ */ jsx(Divider, { flexItem: true, sx: { mt: "0.25rem !important", mb: "0.25rem !important" } }),
|
|
1054
|
-
/* @__PURE__ */ jsx("div", { className: "searchbar-box-list", children: /* @__PURE__ */ jsx(
|
|
1055
|
-
SearchBar,
|
|
1056
|
-
{
|
|
1057
|
-
placeholder: "Search User",
|
|
1058
|
-
handleSearch: (e) => handleSearchEvent(e)
|
|
1059
|
-
}
|
|
1060
|
-
) }),
|
|
1061
|
-
/* @__PURE__ */ jsx("div", { className: "all-attribute-title", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", children: t("common.allAttributes_label") }) }),
|
|
1062
|
-
filteredOptions.map((column) => /* @__PURE__ */ jsx(
|
|
1063
|
-
MenuItem,
|
|
1064
|
-
{
|
|
1065
|
-
onClick: () => handleAddColumn(column),
|
|
1066
|
-
children: /* @__PURE__ */ jsx(Typography, { color: "theme.secondary.1000", type: "s3", children: column.header })
|
|
1067
|
-
},
|
|
1068
|
-
column.accessorKey
|
|
1069
|
-
)),
|
|
1070
|
-
/* @__PURE__ */ jsx(Divider, { flexItem: true, sx: { mt: "0.25rem !important", mb: "0.25rem !important" } }),
|
|
1071
|
-
enableAddCustomField && /* @__PURE__ */ jsxs(MenuItem, { onClick: handleCustomAddColumn, className: "role-drp-list", children: [
|
|
1072
|
-
/* @__PURE__ */ jsx(ListItemIcon, { className: "add-icon", children: /* @__PURE__ */ jsx("img", { src: images.common.addIcon, alt: "Add Icon" }) }),
|
|
1073
|
-
/* @__PURE__ */ jsx(ListItemText, { className: "title", children: t("common.addCustomField_label") })
|
|
1074
|
-
] })
|
|
1075
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1076
|
-
visibleColumns.map((column) => /* @__PURE__ */ jsxs(
|
|
1077
|
-
MenuItem,
|
|
1078
|
-
{
|
|
1079
|
-
onClick: () => handleVisibleColumn(column),
|
|
1080
|
-
className: "role-drp-list",
|
|
1081
|
-
children: [
|
|
1082
|
-
/* @__PURE__ */ jsx(ListItemIcon, { className: "add-icon", children: /* @__PURE__ */ jsx("img", { src: images.common.dotsIcon, alt: "Add Icon" }) }),
|
|
1083
|
-
/* @__PURE__ */ jsx(ListItemText, { className: "title", children: column.header }),
|
|
1084
|
-
/* @__PURE__ */ jsx(ListItemIcon, { className: "eye-icon", children: /* @__PURE__ */ jsx("img", { src: images.common.eyeIcon, alt: "Eye Icon" }) })
|
|
1085
|
-
]
|
|
1086
|
-
},
|
|
1087
|
-
column.accessorKey
|
|
1088
|
-
)),
|
|
1089
|
-
/* @__PURE__ */ jsx(Divider, { flexItem: true, sx: { mt: "0.25rem !important", mb: "0.25rem !important" } }),
|
|
1090
|
-
/* @__PURE__ */ jsxs(MenuItem, { onClick: handleAddButtonClick, className: "role-drp-list", children: [
|
|
1091
|
-
/* @__PURE__ */ jsx(ListItemIcon, { className: "add-icon", children: /* @__PURE__ */ jsx("img", { src: images.common.addIcon, alt: "Add Icon" }) }),
|
|
1092
|
-
/* @__PURE__ */ jsx(ListItemText, { className: "title", children: t("common.addColumn_label") }),
|
|
1093
|
-
/* @__PURE__ */ jsx(
|
|
1094
|
-
Typography,
|
|
1095
|
-
{
|
|
1096
|
-
variant: "body2",
|
|
1097
|
-
color: "text.secondary",
|
|
1098
|
-
className: "eye-icon",
|
|
1099
|
-
children: /* @__PURE__ */ jsx(default_1$1, { sx: { fontSize: "1.25rem !important" } })
|
|
1100
|
-
}
|
|
1101
|
-
)
|
|
1102
|
-
] })
|
|
1103
|
-
] })
|
|
1104
|
-
}
|
|
1105
|
-
),
|
|
1106
|
-
/* @__PURE__ */ jsxs(
|
|
1107
|
-
Menu,
|
|
1108
|
-
{
|
|
1109
|
-
anchorEl: rowAnchorEl,
|
|
1110
|
-
open: Boolean(rowAnchorEl),
|
|
1111
|
-
onClose: handleActionsClose,
|
|
1112
|
-
children: [
|
|
1113
|
-
rowActionMenu == null ? void 0 : rowActionMenu.map((option) => {
|
|
1114
|
-
return /* @__PURE__ */ jsxs(
|
|
1115
|
-
MenuItem,
|
|
1116
|
-
{
|
|
1117
|
-
onClick: async () => {
|
|
1118
|
-
await option.handleAction(row);
|
|
1119
|
-
setRowAnchorEl(null);
|
|
1120
|
-
},
|
|
1121
|
-
disabled: typeof option.disabled === "function" ? option.disabled(row) : Boolean(option.disabled),
|
|
1122
|
-
sx: { alignItems: "center", gap: 0.5 },
|
|
1123
|
-
children: [
|
|
1124
|
-
option == null ? void 0 : option.icon,
|
|
1125
|
-
/* @__PURE__ */ jsx(Typography, { type: "s4", color: "inherit", children: typeof option.label === "function" ? option.label(row) : option.label })
|
|
1126
|
-
]
|
|
1127
|
-
}
|
|
1128
|
-
);
|
|
1129
|
-
}),
|
|
1130
|
-
(destructiveActionMenu == null ? void 0 : destructiveActionMenu.length) > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1131
|
-
/* @__PURE__ */ jsx(Divider, { flexItem: true, sx: { mt: "0.25rem !important", mb: "0.25rem !important" } }),
|
|
1132
|
-
/* @__PURE__ */ jsx("div", { className: "dropdown-inner--DestructiveHeader", children: destructiveActionMenu == null ? void 0 : destructiveActionMenu.map((option) => /* @__PURE__ */ jsx(
|
|
1133
|
-
MenuItem,
|
|
1134
|
-
{
|
|
1135
|
-
onClick: () => {
|
|
1136
|
-
option.handleAction(row);
|
|
1137
|
-
setRowAnchorEl(null);
|
|
1138
|
-
},
|
|
1139
|
-
className: "dropdown-inner--DestructiveActions",
|
|
1140
|
-
disabled: typeof option.disabled === "function" ? option.disabled(row) : Boolean(option.disabled),
|
|
1141
|
-
children: /* @__PURE__ */ jsx(Typography, { type: "s4", color: "inherit", children: typeof option.label === "function" ? option.label(row) : option.label })
|
|
1142
|
-
}
|
|
1143
|
-
)) })
|
|
1144
|
-
] })
|
|
1145
|
-
]
|
|
1146
|
-
}
|
|
1147
|
-
),
|
|
1148
|
-
/* @__PURE__ */ jsx(
|
|
1149
|
-
ConfirmPopUp,
|
|
1150
|
-
{
|
|
1151
|
-
open: Boolean(rowToDelete),
|
|
1152
|
-
onClose: () => setRowToDelete(null),
|
|
1153
|
-
onConfirm: () => handleRowDelete(),
|
|
1154
|
-
title: "Delete Item",
|
|
1155
|
-
description: `Are you sure you want to delete entry ?`,
|
|
1156
|
-
loading: isDeletingRow
|
|
1157
|
-
}
|
|
1158
|
-
)
|
|
1159
|
-
] });
|
|
1160
|
-
});
|
|
1161
|
-
export {
|
|
1162
|
-
MaterialEditableTable as default
|
|
1163
|
-
};
|
|
1164
|
-
//# sourceMappingURL=index.esm.js.map
|