@erpsquad/common 1.8.41 → 1.8.42
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.esm10.js +3 -3
- package/dist/_virtual/index/index.esm11.js +3 -3
- package/dist/_virtual/index/index.esm2.js +4 -2
- package/dist/_virtual/index/index.esm2.js.map +1 -1
- package/dist/_virtual/index/index.esm3.js +2 -4
- package/dist/_virtual/index/index.esm3.js.map +1 -1
- package/dist/_virtual/index/index.esm4.js +1 -1
- package/dist/_virtual/index/index.esm5.js +3 -3
- package/dist/_virtual/index/index.esm6.js +3 -3
- package/dist/_virtual/index/index.esm7.js +3 -3
- package/dist/_virtual/index/index.esm8.js +3 -3
- package/dist/_virtual/index/index.esm9.js +3 -3
- package/dist/_virtual/index/index10.js +1 -1
- package/dist/_virtual/index/index11.js +1 -1
- package/dist/_virtual/index/index2.js +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/_virtual/index/index6.js +1 -1
- package/dist/_virtual/index/index7.js +1 -1
- package/dist/_virtual/index/index8.js +1 -1
- package/dist/_virtual/index/index9.js +1 -1
- package/dist/components/action-bar/action-bar/index.esm.js +2 -2
- package/dist/components/action-bar/action-bar/index.js +11 -11
- package/dist/components/approval-wrapper/approval-wrapper/index.esm.js +1 -1
- package/dist/components/approval-wrapper/approval-wrapper/index.esm.js.map +1 -1
- package/dist/components/approval-wrapper/approval-wrapper/index.js +4 -4
- package/dist/components/approval-wrapper/approval-wrapper/index.js.map +1 -1
- package/dist/components/change-user-password-modal/change-user-password-modal/index.esm.js +2 -2
- package/dist/components/change-user-password-modal/change-user-password-modal/index.js +3 -3
- package/dist/components/charts/line-chart/area-lineChart/index.esm.js +2 -2
- package/dist/components/charts/line-chart/area-lineChart/index.esm.js.map +1 -1
- package/dist/components/charts/line-chart/area-lineChart/index.js.map +1 -1
- package/dist/components/dynamic-layout-wrapper/dynamic-layout-wrapper/index.esm.js +107 -1
- package/dist/components/dynamic-layout-wrapper/dynamic-layout-wrapper/index.esm.js.map +1 -1
- package/dist/components/dynamic-layout-wrapper/dynamic-layout-wrapper/index.js +7 -4
- package/dist/components/dynamic-layout-wrapper/dynamic-layout-wrapper/index.js.map +1 -1
- package/dist/components/examples/FlexibleReduxExample/index.esm.js +154 -0
- package/dist/components/examples/FlexibleReduxExample/index.esm.js.map +1 -0
- package/dist/components/examples/FlexibleReduxExample/index.js +19 -0
- package/dist/components/examples/FlexibleReduxExample/index.js.map +1 -0
- package/dist/components/filter/filter/index.esm.js +2 -2
- package/dist/components/filter/filter/index.js +7 -7
- package/dist/components/footer/index.esm.js +71 -0
- package/dist/components/footer/index.esm.js.map +1 -0
- package/dist/components/footer/index.js +7 -0
- package/dist/components/footer/index.js.map +1 -0
- package/dist/components/form-control/form-builder/element-controller/index.esm.js +96 -0
- package/dist/components/form-control/form-builder/element-controller/index.esm.js.map +1 -0
- package/dist/components/form-control/form-builder/element-controller/index.js +7 -0
- package/dist/components/form-control/form-builder/element-controller/index.js.map +1 -0
- package/dist/components/form-control/form-builder/form-builder-element/table/index.esm.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/table/index.js +4 -4
- package/dist/components/form-control/form-builder/form-builder-element/table/index.js.map +1 -1
- package/dist/components/form-control/form-parser/data/index.esm.js +80 -0
- package/dist/components/form-control/form-parser/data/index.esm.js.map +1 -0
- package/dist/components/form-control/form-parser/data/index.js +2 -0
- package/dist/components/form-control/form-parser/data/index.js.map +1 -0
- package/dist/components/grid/custom-grid-card/custom-grid-card/index.esm.js +1 -1
- package/dist/components/grid/custom-grid-card/custom-grid-card/index.js +4 -4
- package/dist/components/header/components/notification-menu/notification-menu/index.esm.js +1 -1
- package/dist/components/header/components/notification-menu/notification-menu/index.js +28 -28
- package/dist/components/header/header/index.esm.js +1 -1
- package/dist/components/header/header/index.js +11 -11
- package/dist/components/header/header-enhanced/index.esm.js +405 -0
- package/dist/components/header/header-enhanced/index.esm.js.map +1 -0
- package/dist/components/header/header-enhanced/index.js +33 -0
- package/dist/components/header/header-enhanced/index.js.map +1 -0
- package/dist/components/header/redux/reducer/index.esm.js +6 -1
- package/dist/components/header/redux/reducer/index.esm.js.map +1 -1
- package/dist/components/header/redux/reducer/index.js +1 -1
- package/dist/components/header/redux/reducer/index.js.map +1 -1
- package/dist/components/header copy/index.esm.js +131 -0
- package/dist/components/header copy/index.esm.js.map +1 -0
- package/dist/components/header copy/index.js +11 -0
- package/dist/components/header copy/index.js.map +1 -0
- package/dist/components/icons/coupon/index.esm.js +29 -0
- package/dist/components/icons/coupon/index.esm.js.map +1 -0
- package/dist/components/icons/coupon/index.js +7 -0
- package/dist/components/icons/coupon/index.js.map +1 -0
- package/dist/components/icons/settings-fallback/index.esm.js +1 -1
- package/dist/components/icons/settings-fallback/index.js +2 -2
- package/dist/components/icons/settings-fallback/index.js.map +1 -1
- package/dist/components/icons/sort-arrow-icon/index.esm.js +4 -4
- package/dist/components/icons/sort-arrow-icon/index.esm.js.map +1 -1
- package/dist/components/icons/sort-arrow-icon/index.js +1 -1
- package/dist/components/icons/sort-arrow-icon/index.js.map +1 -1
- package/dist/components/index.d.ts +112 -277
- package/dist/components/index.esm.js +444 -603
- package/dist/components/index.esm.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/inventory-reports-title-bar/component/reportFilter/index.esm.js +400 -0
- package/dist/components/inventory-reports-title-bar/component/reportFilter/index.esm.js.map +1 -0
- package/dist/components/inventory-reports-title-bar/component/reportFilter/index.js +41 -0
- package/dist/components/inventory-reports-title-bar/component/reportFilter/index.js.map +1 -0
- package/dist/components/inventory-reports-title-bar/redux/reducer/index.esm.js +2 -0
- package/dist/components/inventory-reports-title-bar/redux/reducer/index.esm.js.map +1 -1
- package/dist/components/inventory-reports-title-bar/redux/reducer/index.js +1 -1
- package/dist/components/inventory-reports-title-bar/redux/reducer/index.js.map +1 -1
- package/dist/components/inventory-reports-title-bar/report-buttons/report-buttons/index.esm.js.map +1 -1
- package/dist/components/inventory-reports-title-bar/report-buttons/report-buttons/index.js.map +1 -1
- package/dist/components/listing/listing/index.esm.js +5 -5
- package/dist/components/listing/listing/index.esm.js.map +1 -1
- package/dist/components/listing/listing/index.js +5 -5
- package/dist/components/listing/listing/index.js.map +1 -1
- package/dist/components/material-editable-table/material-editable-table/index.esm.js +1 -1
- package/dist/components/material-editable-table/material-editable-table/index.js +2 -2
- package/dist/components/material-table/material-table/index.esm.js +4 -3
- package/dist/components/material-table/material-table/index.esm.js.map +1 -1
- package/dist/components/material-table/material-table/index.js +5 -5
- package/dist/components/material-table/material-table/index.js.map +1 -1
- package/dist/components/parties-modal/parties-modal/index.esm.js +1 -1
- package/dist/components/parties-modal/parties-modal/index.js +13 -13
- package/dist/components/parties-modal/parties-modal/index.js.map +1 -1
- package/dist/components/protected-route/index.esm.js +20 -0
- package/dist/components/protected-route/index.esm.js.map +1 -1
- package/dist/components/protected-route/index.js +2 -2
- package/dist/components/protected-route/index.js.map +1 -1
- package/dist/components/reports-title-bar/redux/reducer/index.esm.js +2 -0
- package/dist/components/reports-title-bar/redux/reducer/index.esm.js.map +1 -1
- package/dist/components/reports-title-bar/redux/reducer/index.js +1 -1
- package/dist/components/reports-title-bar/redux/reducer/index.js.map +1 -1
- package/dist/components/reports-title-bar/reports-title-bar/index.esm.js +1 -1
- package/dist/components/reports-title-bar/reports-title-bar/index.js +8 -8
- package/dist/components/rfq-response/item-response-details/index.esm.js +1 -1
- package/dist/components/rfq-response/item-response-details/index.js +1 -1
- package/dist/components/rfq-response/item-response-details/index.js.map +1 -1
- package/dist/components/schedule-report/schedule-report/index.esm.js +2 -2
- package/dist/components/schedule-report/schedule-report/index.js +5 -5
- package/dist/components/schedule-report/schedule-report/index.js.map +1 -1
- package/dist/components/schedule-report/utils/common/index.esm.js +1 -1
- package/dist/components/share-modal/redux/reducer/index.esm.js +2 -0
- package/dist/components/share-modal/redux/reducer/index.esm.js.map +1 -1
- package/dist/components/share-modal/redux/reducer/index.js +1 -1
- package/dist/components/share-modal/redux/reducer/index.js.map +1 -1
- package/dist/components/share-modal/share-modal-enhanced/index.esm.js +287 -0
- package/dist/components/share-modal/share-modal-enhanced/index.esm.js.map +1 -0
- package/dist/components/share-modal/share-modal-enhanced/index.js +24 -0
- package/dist/components/share-modal/share-modal-enhanced/index.js.map +1 -0
- package/dist/components/sidebar/sidebar/index.esm.js +2 -2
- package/dist/components/sidebar/sidebar/index.js +9 -9
- package/dist/components/upload-excel/upload-excel/index.esm.js +1 -1
- package/dist/components/upload-excel/upload-excel/index.js +5 -5
- package/dist/constants/index.d.ts +15 -15
- package/dist/constants/index.esm.js +104 -10
- package/dist/constants/index.esm.js.map +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/constants/pathnames/pathname.manufacturing/index.esm.js +6 -0
- package/dist/constants/pathnames/pathname.manufacturing/index.esm.js.map +1 -1
- package/dist/constants/pathnames/pathname.manufacturing/index.js +1 -1
- package/dist/constants/pathnames/pathname.manufacturing/index.js.map +1 -1
- package/dist/constants/pathnames/pathname.rental/index.esm.js +12 -1
- package/dist/constants/pathnames/pathname.rental/index.esm.js.map +1 -1
- package/dist/constants/pathnames/pathname.rental/index.js +1 -1
- package/dist/constants/pathnames/pathname.rental/index.js.map +1 -1
- package/dist/contexts/AuthContext/index.esm.js +1 -1
- 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/index.d.ts +5 -16
- package/dist/contexts/index.esm.js +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/hooks/apiHelper/index.esm.js +1 -1
- package/dist/hooks/apiHelper/index.esm.js.map +1 -1
- package/dist/hooks/apiHelper/index.js +1 -1
- package/dist/hooks/apiHelper/index.js.map +1 -1
- package/dist/hooks/index.d.ts +16 -26
- package/dist/hooks/index.esm.js +25 -18
- package/dist/hooks/index.esm.js.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-material-calculations/index.esm.js +0 -8
- package/dist/hooks/use-material-calculations/index.esm.js.map +1 -1
- package/dist/hooks/use-material-calculations/index.js +1 -1
- package/dist/hooks/use-material-calculations/index.js.map +1 -1
- package/dist/hooks/useDataFetcher/index.esm.js +3 -2
- package/dist/hooks/useDataFetcher/index.esm.js.map +1 -1
- package/dist/hooks/useDataFetcher/index.js +1 -1
- package/dist/hooks/useDataFetcher/index.js.map +1 -1
- package/dist/hooks/useLanguageFallback/index.esm.js +0 -5
- package/dist/hooks/useLanguageFallback/index.esm.js.map +1 -1
- package/dist/hooks/useLanguageFallback/index.js +1 -1
- package/dist/hooks/useLanguageFallback/index.js.map +1 -1
- package/dist/hooks/useLocationFilter/index.esm.js +0 -5
- package/dist/hooks/useLocationFilter/index.esm.js.map +1 -1
- package/dist/hooks/useLocationFilter/index.js +1 -1
- package/dist/hooks/useLocationFilter/index.js.map +1 -1
- package/dist/hooks/useReduxIntegration/index.esm.js +39 -0
- package/dist/hooks/useReduxIntegration/index.esm.js.map +1 -0
- package/dist/hooks/useReduxIntegration/index.js +2 -0
- package/dist/hooks/useReduxIntegration/index.js.map +1 -0
- package/dist/icons/index.d.ts +177 -94
- package/dist/icons/index.esm.js +80 -76
- package/dist/icons/index.esm.js.map +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.esm.js +640 -747
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/layout/index.d.ts +2 -3
- package/dist/layout/index.esm.js +1 -1
- package/dist/layout/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/@mui/icons-material/utils/createSvgIcon/index.esm.js +1 -1
- package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.js +1 -1
- package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.esm.js +2 -3
- package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.esm.js.map +1 -1
- package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.js +1 -1
- package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.js.map +1 -1
- package/dist/node_modules/@mui/material/NativeSelect/nativeSelectClasses/index.esm.js +1 -1
- package/dist/node_modules/@mui/material/NativeSelect/nativeSelectClasses/index.js +1 -1
- package/dist/node_modules/@mui/material/NativeSelect/nativeSelectClasses/index.js.map +1 -1
- package/dist/node_modules/@mui/material/OutlinedInput/outlinedInputClasses/index.esm.js +1 -1
- package/dist/node_modules/@mui/material/OutlinedInput/outlinedInputClasses/index.js +1 -1
- package/dist/node_modules/@mui/material/Popover/Popover/index.esm.js +1 -1
- package/dist/node_modules/@mui/material/Popover/Popover/index.js +1 -1
- package/dist/node_modules/@mui/material/Snackbar/Snackbar/index.esm.js +1 -1
- package/dist/node_modules/@mui/material/Snackbar/Snackbar/index.js +1 -1
- package/dist/node_modules/@mui/material/Tabs/Tabs/index.esm.js +1 -1
- package/dist/node_modules/@mui/material/Tabs/Tabs/index.js +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/node_modules/@mui/system/colorManipulator/index.js.map +1 -1
- package/dist/node_modules/@mui/system/createStyled/index.esm.js +6 -6
- package/dist/node_modules/@mui/system/createStyled/index.js +1 -1
- package/dist/node_modules/@mui/system/createStyled/index.js.map +1 -1
- package/dist/node_modules/@mui/system/esm/Container/createContainer/index.esm.js +1 -1
- package/dist/node_modules/@mui/system/esm/Container/createContainer/index.js +1 -1
- package/dist/node_modules/@mui/system/esm/Stack/createStack/index.esm.js +1 -1
- package/dist/node_modules/@mui/system/esm/Stack/createStack/index.js +2 -2
- package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.esm.js +1 -1
- package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.js +1 -1
- package/dist/node_modules/d3-axis/src/axis/index.esm.js +1 -5
- package/dist/node_modules/d3-axis/src/axis/index.esm.js.map +1 -1
- package/dist/node_modules/d3-axis/src/axis/index.js +1 -1
- package/dist/node_modules/d3-axis/src/axis/index.js.map +1 -1
- package/dist/node_modules/notistack/notistack.esm/index.esm.js +0 -3
- package/dist/node_modules/notistack/notistack.esm/index.esm.js.map +1 -1
- package/dist/node_modules/notistack/notistack.esm/index.js +1 -1
- package/dist/node_modules/notistack/notistack.esm/index.js.map +1 -1
- package/dist/node_modules/prop-types/checkPropTypes/index.esm.js +49 -56
- package/dist/node_modules/prop-types/checkPropTypes/index.esm.js.map +1 -1
- package/dist/node_modules/prop-types/checkPropTypes/index.js +1 -1
- package/dist/node_modules/prop-types/checkPropTypes/index.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.esm.js +2 -2
- package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.esm.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.js +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.js.map +1 -1
- package/dist/redux/hooks/index.esm.js +1 -1
- package/dist/redux/index.d.ts +8 -13
- package/dist/redux/index.esm.js +14 -30
- package/dist/redux/index.esm.js.map +1 -1
- package/dist/redux/index.js +1 -1
- package/dist/redux/slices/inventoryReportsTitleBarSlice/index.esm.js +0 -6
- package/dist/redux/slices/inventoryReportsTitleBarSlice/index.esm.js.map +1 -1
- package/dist/redux/slices/inventoryReportsTitleBarSlice/index.js +1 -1
- package/dist/redux/slices/inventoryReportsTitleBarSlice/index.js.map +1 -1
- package/dist/redux/slices/reportsTitleBarSlice/index.esm.js +1 -7
- package/dist/redux/slices/reportsTitleBarSlice/index.esm.js.map +1 -1
- package/dist/redux/slices/reportsTitleBarSlice/index.js +1 -1
- package/dist/redux/slices/reportsTitleBarSlice/index.js.map +1 -1
- package/dist/redux/slices/shareSlice/index.esm.js +1 -3
- package/dist/redux/slices/shareSlice/index.esm.js.map +1 -1
- package/dist/redux/slices/shareSlice/index.js +1 -1
- package/dist/redux/slices/shareSlice/index.js.map +1 -1
- package/dist/src/@types/index.d.ts +5 -0
- package/dist/src/assets/common-component/index.d.ts +1 -0
- package/dist/src/assets/dynamic-svg-icon/index.d.ts +2 -0
- package/dist/src/assets/index.d.ts +5 -0
- package/dist/src/assets/view-modal/index.d.ts +12 -0
- package/dist/src/components/Dashboard/index.d.ts +4 -0
- package/dist/src/components/accordion/index.d.ts +2 -0
- package/dist/src/components/action-bar/index.d.ts +2 -0
- package/dist/src/components/activity-tag/index.d.ts +2 -0
- package/dist/src/components/activityArea/index.d.ts +2 -0
- package/dist/src/components/activityLog/index.d.ts +2 -0
- package/dist/src/components/alert/index.d.ts +2 -0
- package/dist/src/components/appbar/index.d.ts +2 -0
- package/dist/src/components/approval-wrapper/index.d.ts +2 -0
- package/dist/src/components/avatar/index.d.ts +2 -0
- package/dist/src/components/board/index.d.ts +4 -0
- package/dist/src/components/bread-crumb/index.d.ts +2 -0
- package/dist/src/components/button/index.d.ts +2 -0
- package/dist/src/components/calculation-summary/components/index.d.ts +10 -0
- package/dist/src/components/calculation-summary/index.d.ts +3 -0
- package/dist/src/components/calendar/index.d.ts +2 -0
- package/dist/src/components/card-wrapper/index.d.ts +2 -0
- package/dist/src/components/change-user-password-modal/index.d.ts +2 -0
- package/dist/src/components/charts/bar-chart/index.d.ts +2 -0
- package/dist/src/components/charts/barChart/index.d.ts +2 -0
- package/dist/src/components/charts/barLineChart/index.d.ts +2 -0
- package/dist/src/components/charts/donut-chart/index.d.ts +2 -0
- package/dist/src/components/charts/donutChart/index.d.ts +2 -0
- package/dist/src/components/charts/groupBarChart/index.d.ts +2 -0
- package/dist/src/components/charts/index.d.ts +12 -0
- package/dist/src/components/charts/line-chart/area-lineChart.d.ts +2 -2
- package/dist/src/components/charts/line-chart/index.d.ts +6 -0
- package/dist/src/components/charts/multiLineChart/index.d.ts +2 -0
- package/dist/src/components/checkbox/index.d.ts +2 -0
- package/dist/src/components/chip/index.d.ts +2 -0
- package/dist/src/components/chip-generator/index.d.ts +2 -0
- package/dist/src/components/color-picker-input/index.d.ts +2 -0
- package/dist/src/components/confirm-modal/index.d.ts +3 -0
- package/dist/src/components/country-select/index.d.ts +2 -0
- package/dist/src/components/custom-snackbar/index.d.ts +2 -0
- package/dist/src/components/custom-toggle-switch/index.d.ts +2 -0
- package/dist/src/components/date-picker/index.d.ts +2 -0
- package/dist/src/components/date-range-picker/index.d.ts +2 -0
- package/dist/src/components/date-time-picker/index.d.ts +2 -0
- package/dist/src/components/dropdown-button/index.d.ts +2 -0
- package/dist/src/components/dynamic-layout-wrapper/index.d.ts +2 -0
- package/dist/src/components/editor/index.d.ts +2 -0
- package/dist/src/components/entity-view-wrapper/index.d.ts +2 -0
- package/dist/src/components/examples/index.d.ts +2 -0
- package/dist/src/components/expandable-summary-wrapper/index.d.ts +2 -0
- package/dist/src/components/fallback/index.d.ts +2 -0
- package/dist/src/components/filter/components/index.d.ts +16 -0
- package/dist/src/components/filter/index.d.ts +4 -0
- package/dist/src/components/footer/index.d.ts +2 -0
- package/dist/src/components/form-control/form-builder/form-builder-element/index.d.ts +25 -5
- package/dist/src/components/form-control/form-builder/form-builder-element/location-add-modal/index.d.ts +2 -0
- package/dist/src/components/form-control/form-builder/index.d.ts +3 -0
- package/dist/src/components/form-control/form-parser/index.d.ts +8 -0
- package/dist/src/components/form-control/index.d.ts +2 -2
- package/dist/src/components/form-header/index.d.ts +2 -0
- package/dist/src/components/gantt/index.d.ts +2 -0
- package/dist/src/components/grid/custom-grid-card/index.d.ts +2 -0
- package/dist/src/components/grid/grid-card/index.d.ts +2 -0
- package/dist/src/components/grid/grid-wrapper/index.d.ts +2 -0
- package/dist/src/components/grid/index.d.ts +3 -0
- package/dist/src/components/grid-fallback/index.d.ts +2 -0
- package/dist/src/components/header/components/index.d.ts +1 -0
- package/dist/src/components/header/components/notification-menu/index.d.ts +2 -0
- package/dist/src/components/header/index.d.ts +6 -0
- package/dist/src/components/header/redux/index.d.ts +5 -0
- package/dist/src/components/header-card/index.d.ts +2 -0
- package/dist/src/components/hr-line/index.d.ts +2 -0
- package/dist/src/components/icons/index.d.ts +163 -80
- package/dist/src/components/icons/sort-arrow-icon.d.ts +2 -2
- package/dist/src/components/index.d.ts +106 -123
- package/dist/src/components/info-card/index.d.ts +2 -0
- package/dist/src/components/inventory-reports-title-bar/component/index.d.ts +2 -0
- package/dist/src/components/inventory-reports-title-bar/index.d.ts +5 -0
- package/dist/src/components/inventory-reports-title-bar/redux/index.d.ts +5 -0
- package/dist/src/components/inventory-reports-title-bar/report-buttons/index.d.ts +2 -0
- package/dist/src/components/label-value/index.d.ts +2 -0
- package/dist/src/components/list/index.d.ts +2 -0
- package/dist/src/components/listing/index.d.ts +2 -2
- package/dist/src/components/loaders/index.d.ts +5 -1
- package/dist/src/components/material-editable-table/components/index.d.ts +8 -0
- package/dist/src/components/material-editable-table/index.d.ts +4 -0
- package/dist/src/components/material-table/components/index.d.ts +8 -0
- package/dist/src/components/material-table/index.d.ts +4 -0
- package/dist/src/components/material-table/material-table.d.ts +1 -1
- package/dist/src/components/menu/index.d.ts +2 -0
- package/dist/src/components/modal/index.d.ts +2 -0
- package/dist/src/components/module-button/index.d.ts +2 -0
- package/dist/src/components/mulitline/index.d.ts +2 -0
- package/dist/src/components/multi-select/index.d.ts +2 -0
- package/dist/src/components/page-navigator/components/index.d.ts +10 -0
- package/dist/src/components/page-navigator/index.d.ts +3 -0
- package/dist/src/components/pagination/index.d.ts +2 -0
- package/dist/src/components/parties-modal/index.d.ts +4 -0
- package/dist/src/components/parties-modal/utils/index.d.ts +1 -0
- package/dist/src/components/phone-input/index.d.ts +2 -0
- package/dist/src/components/providers/index.d.ts +2 -1
- package/dist/src/components/quick-approval-modal/index.d.ts +2 -0
- package/dist/src/components/radio/index.d.ts +2 -0
- package/dist/src/components/reports/dynamic-report/index.d.ts +3 -0
- package/dist/src/components/reports/index.d.ts +1 -0
- package/dist/src/components/reports-title-bar/index.d.ts +4 -0
- package/dist/src/components/reports-title-bar/redux/index.d.ts +5 -0
- package/dist/src/components/reports-title-bar/report-buttons/index.d.ts +2 -0
- package/dist/src/components/reset-password-modal/index.d.ts +2 -0
- package/dist/src/components/rfq-response/index.d.ts +2 -0
- package/dist/src/components/save-filter-modal/index.d.ts +2 -0
- package/dist/src/components/schedule-report/index.d.ts +6 -0
- package/dist/src/components/schedule-report/utils/index.d.ts +3 -0
- package/dist/src/components/search-bar/index.d.ts +2 -0
- package/dist/src/components/select/controller/index.d.ts +4 -0
- package/dist/src/components/select/index.d.ts +5 -0
- package/dist/src/components/share-modal/index.d.ts +5 -0
- package/dist/src/components/share-modal/redux/index.d.ts +5 -0
- package/dist/src/components/sidebar/index.d.ts +2 -0
- package/dist/src/components/snackbar/index.d.ts +2 -0
- package/dist/src/components/sub-header-doc/index.d.ts +2 -0
- package/dist/src/components/switches/index.d.ts +2 -0
- package/dist/src/components/tab-bar-ui/index.d.ts +2 -0
- package/dist/src/components/tabs/index.d.ts +2 -0
- package/dist/src/components/text-area/index.d.ts +2 -0
- package/dist/src/components/text-field/index.d.ts +2 -0
- package/dist/src/components/time-picker/index.d.ts +2 -0
- package/dist/src/components/time-range-picker/index.d.ts +2 -0
- package/dist/src/components/title-dropdown-button/index.d.ts +2 -0
- package/dist/src/components/toast/index.d.ts +2 -0
- package/dist/src/components/toggle/index.d.ts +2 -0
- package/dist/src/components/toggle-switch/index.d.ts +2 -0
- package/dist/src/components/tooltip/index.d.ts +2 -0
- package/dist/src/components/typography/index.d.ts +2 -0
- package/dist/src/components/upload/index.d.ts +4 -0
- package/dist/src/components/upload-excel/index.d.ts +4 -0
- package/dist/src/components/upload-media/index.d.ts +2 -0
- package/dist/src/components/user-dropdown/index.d.ts +2 -0
- package/dist/src/components/value-field/index.d.ts +2 -0
- package/dist/src/components/view-modal/index.d.ts +2 -0
- package/dist/src/constants/index.d.ts +5 -3
- package/dist/src/constants/lang/index.d.ts +6 -0
- package/dist/src/constants/pathnames/index.d.ts +13 -554
- package/dist/src/contexts/index.d.ts +5 -5
- package/dist/src/hooks/apiHelper.d.ts +1 -1
- package/dist/src/hooks/index.d.ts +15 -13
- package/dist/src/hooks/useDataFetcher.d.ts +2 -2
- package/dist/src/layout/fullScreen/index.d.ts +2 -0
- package/dist/src/layout/index.d.ts +2 -2
- package/dist/src/layout/sidebarScreen/index.d.ts +2 -0
- package/dist/src/redux/index.d.ts +5 -6
- package/dist/src/redux/slices/index.d.ts +8 -10
- package/dist/src/styles/index.d.ts +1 -2
- package/dist/src/theme/index.d.ts +7 -3
- package/dist/src/theme/types/index.d.ts +1 -0
- package/dist/src/utils/index.d.ts +12 -10
- package/dist/src/views/afterAuth/dashboard/index.d.ts +3 -0
- package/dist/src/views/afterAuth/dashboard/redux/index.d.ts +5 -0
- package/dist/src/views/afterAuth/index.d.ts +2 -0
- package/dist/src/views/afterAuth/page-view/index.d.ts +4 -0
- package/dist/src/views/afterAuth/page-view/redux/index.d.ts +5 -0
- package/dist/src/views/afterAuth/page-view/utils/index.d.ts +2 -0
- package/dist/src/views/beforeAuth/change-password/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/components/activity-tag-data/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/components/calendar-data/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/components/drive-dashboard-data/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/components/gantt-data/index.d.ts +2 -0
- package/dist/src/views/beforeAuth/components/grid-data/index.d.ts +2 -0
- package/dist/src/views/beforeAuth/components/index.d.ts +13 -2
- package/dist/src/views/beforeAuth/components/kanbann-content/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/components/list-content/index.d.ts +2 -0
- package/dist/src/views/beforeAuth/components/multiline-data/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/components/share-modal-data/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/components/shared-pages-data/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/components/tabs-data/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/components/user-dashboard-data/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/components/user-dropdown-data/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/forgot-password/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/index.d.ts +6 -0
- package/dist/src/views/beforeAuth/landing/index.d.ts +2 -0
- package/dist/src/views/beforeAuth/reset-password/index.d.ts +1 -0
- package/dist/src/views/form-builder/element-edit-forms/index.d.ts +7 -0
- package/dist/src/views/form-builder/index.d.ts +7 -31
- package/dist/src/views/form-builder/redux/index.d.ts +5 -0
- package/dist/src/views/form-builder/utils/index.d.ts +1 -2
- package/dist/src/views/index.d.ts +7 -2
- package/dist/src/views/template-editor/add-template/index.d.ts +1 -0
- package/dist/src/views/template-editor/company-selection-modal/index.d.ts +1 -0
- package/dist/src/views/template-editor/components/controllers/index.d.ts +18 -0
- package/dist/src/views/template-editor/components/index.d.ts +7 -9
- package/dist/src/views/template-editor/edit-section-modal/index.d.ts +1 -0
- package/dist/src/views/template-editor/index.d.ts +10 -10
- package/dist/src/views/template-editor/template-modal/index.d.ts +3 -1
- package/dist/src/views/template-editor/template-name-modal/index.d.ts +1 -0
- package/dist/src/views/template-editor/types/index.d.ts +1 -1
- package/dist/src/views/template-editor/utils/index.d.ts +3 -3
- package/dist/style.css +70 -90
- package/dist/styles/index.esm.js +4 -89
- package/dist/styles/index.esm.js.map +1 -1
- package/dist/styles/index.js +1 -1
- package/dist/styles/themes/index/index.esm.js +78 -0
- package/dist/styles/themes/index/index.esm.js.map +1 -0
- package/dist/styles/themes/index/index.js +2 -0
- package/dist/styles/themes/index/index.js.map +1 -0
- package/dist/theme/index.d.ts +7 -5
- package/dist/theme/index.esm.js +12 -5
- package/dist/theme/index.esm.js.map +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/theme-impl/index.esm.js +1 -1
- package/dist/theme/typography/index.esm.js +113 -0
- package/dist/theme/typography/index.esm.js.map +1 -0
- package/dist/theme/typography/index.js +2 -0
- package/dist/theme/typography/index.js.map +1 -0
- package/dist/utils/dateFormat/index.esm.js +7 -0
- package/dist/utils/dateFormat/index.esm.js.map +1 -1
- package/dist/utils/dateFormat/index.js +1 -1
- package/dist/utils/dateFormat/index.js.map +1 -1
- package/dist/utils/i18n/index.esm.js +37 -0
- package/dist/utils/i18n/index.esm.js.map +1 -0
- package/dist/utils/i18n/index.js +2 -0
- package/dist/utils/i18n/index.js.map +1 -0
- package/dist/utils/index.d.ts +34 -35
- package/dist/utils/index.esm.js +18 -73
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/metaComponent/index.esm.js +27 -0
- package/dist/utils/metaComponent/index.esm.js.map +1 -0
- package/dist/utils/metaComponent/index.js +6 -0
- package/dist/utils/metaComponent/index.js.map +1 -0
- package/dist/views/404/index.esm.js +31 -0
- package/dist/views/404/index.esm.js.map +1 -0
- package/dist/views/404/index.js +6 -0
- package/dist/views/404/index.js.map +1 -0
- package/dist/views/afterAuth/dashboard/dashboard/index.esm.js +76 -0
- package/dist/views/afterAuth/dashboard/dashboard/index.esm.js.map +1 -0
- package/dist/views/afterAuth/dashboard/dashboard/index.js +8 -0
- package/dist/views/afterAuth/dashboard/dashboard/index.js.map +1 -0
- package/dist/views/afterAuth/dashboard/redux/reducer/index.esm.js +0 -6
- package/dist/views/afterAuth/dashboard/redux/reducer/index.esm.js.map +1 -1
- package/dist/views/afterAuth/dashboard/redux/reducer/index.js +1 -1
- package/dist/views/afterAuth/dashboard/redux/reducer/index.js.map +1 -1
- package/dist/views/afterAuth/page-view/page-view/index.esm.js +100 -0
- package/dist/views/afterAuth/page-view/page-view/index.esm.js.map +1 -0
- package/dist/views/afterAuth/page-view/page-view/index.js +6 -0
- package/dist/views/afterAuth/page-view/page-view/index.js.map +1 -0
- package/dist/views/afterAuth/page-view/redux/actionCreator/index.esm.js +13 -0
- package/dist/views/afterAuth/page-view/redux/actionCreator/index.esm.js.map +1 -0
- package/dist/views/afterAuth/page-view/redux/actionCreator/index.js +2 -0
- package/dist/views/afterAuth/page-view/redux/actionCreator/index.js.map +1 -0
- package/dist/views/afterAuth/page-view/redux/reducer/index.esm.js +63 -0
- package/dist/views/afterAuth/page-view/redux/reducer/index.esm.js.map +1 -0
- package/dist/views/afterAuth/page-view/redux/reducer/index.js +2 -0
- package/dist/views/afterAuth/page-view/redux/reducer/index.js.map +1 -0
- package/dist/views/afterAuth/page-view/redux/state/index.esm.js +31 -0
- package/dist/views/afterAuth/page-view/redux/state/index.esm.js.map +1 -0
- package/dist/views/afterAuth/page-view/redux/state/index.js +2 -0
- package/dist/views/afterAuth/page-view/redux/state/index.js.map +1 -0
- package/dist/views/afterAuth/page-view/utils/default-data/index.esm.js +137 -0
- package/dist/views/afterAuth/page-view/utils/default-data/index.esm.js.map +1 -0
- package/dist/views/afterAuth/page-view/utils/default-data/index.js +2 -0
- package/dist/views/afterAuth/page-view/utils/default-data/index.js.map +1 -0
- package/dist/views/afterAuth/page-view/utils/local-data/index.esm.js +137 -0
- package/dist/views/afterAuth/page-view/utils/local-data/index.esm.js.map +1 -0
- package/dist/views/afterAuth/page-view/utils/local-data/index.js +2 -0
- package/dist/views/afterAuth/page-view/utils/local-data/index.js.map +1 -0
- package/dist/views/beforeAuth/change-password/change-password/index.esm.js +182 -0
- package/dist/views/beforeAuth/change-password/change-password/index.esm.js.map +1 -0
- package/dist/views/beforeAuth/change-password/change-password/index.js +17 -0
- package/dist/views/beforeAuth/change-password/change-password/index.js.map +1 -0
- package/dist/views/beforeAuth/forgot-password/forgot-password/index.esm.js +177 -0
- package/dist/views/beforeAuth/forgot-password/forgot-password/index.esm.js.map +1 -0
- package/dist/views/beforeAuth/forgot-password/forgot-password/index.js +16 -0
- package/dist/views/beforeAuth/forgot-password/forgot-password/index.js.map +1 -0
- package/dist/views/beforeAuth/landing/landing/index.esm.js +35 -0
- package/dist/views/beforeAuth/landing/landing/index.esm.js.map +1 -0
- package/dist/views/beforeAuth/landing/landing/index.js +8 -0
- package/dist/views/beforeAuth/landing/landing/index.js.map +1 -0
- package/dist/views/beforeAuth/login/index/index.esm.js +209 -0
- package/dist/views/beforeAuth/login/index/index.esm.js.map +1 -0
- package/dist/views/beforeAuth/login/index/index.js +20 -0
- package/dist/views/beforeAuth/login/index/index.js.map +1 -0
- package/dist/views/beforeAuth/reset-password/reset-password/index.esm.js +34 -0
- package/dist/views/beforeAuth/reset-password/reset-password/index.esm.js.map +1 -0
- package/dist/views/beforeAuth/reset-password/reset-password/index.js +2 -0
- package/dist/views/beforeAuth/reset-password/reset-password/index.js.map +1 -0
- package/dist/views/form-builder/custom-form/index.esm.js +2 -2
- package/dist/views/form-builder/custom-form/index.js +10 -10
- package/dist/views/form-builder/element-edit-forms/select/index.esm.js +1 -1
- package/dist/views/form-builder/element-edit-forms/select/index.js +8 -8
- package/dist/views/form-builder/redux/actionCreator/index.esm.js +1 -1
- package/dist/views/form-builder/redux/reducer/index.esm.js +6 -1
- 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.esm.js +139 -65
- package/dist/views/index.esm.js.map +1 -1
- package/dist/views/index.js +1 -1
- package/dist/views/privateRoute/index.esm.js +14 -0
- package/dist/views/privateRoute/index.esm.js.map +1 -0
- package/dist/views/privateRoute/index.js +2 -0
- package/dist/views/privateRoute/index.js.map +1 -0
- package/dist/views/template-editor/components/EditorHeader/index.esm.js +1 -1
- package/dist/views/template-editor/components/EditorHeader/index.js +3 -3
- package/dist/views/template-editor/components/EditorSection/index.esm.js +1 -1
- package/dist/views/template-editor/components/EditorSection/index.js +3 -3
- package/dist/views/template-editor/components/SectionFormatPanel/index.esm.js +1 -1
- package/dist/views/template-editor/components/SectionFormatPanel/index.js +3 -3
- package/dist/views/template-editor/components/controllers/TableControls/index.esm.js +1 -1
- package/dist/views/template-editor/components/controllers/TableControls/index.js +56 -56
- package/dist/views/template-editor/templates/index.esm.js +1 -1
- package/dist/views/template-editor/templates/index.js +3 -3
- package/dist/views/template-editor/templates/index.js.map +1 -1
- package/dist/views/template-editor/utils/default-data/index.esm.js +33 -0
- package/dist/views/template-editor/utils/default-data/index.esm.js.map +1 -0
- package/dist/views/template-editor/utils/default-data/index.js +2 -0
- package/dist/views/template-editor/utils/default-data/index.js.map +1 -0
- package/package.json +2 -2
- package/src/styles/index.ts +1 -146
- 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/activity-tag/activity-tag/index.esm.js +0 -154
- package/dist/components/activity-tag/activity-tag/index.esm.js.map +0 -1
- package/dist/components/activity-tag/activity-tag/index.js +0 -15
- package/dist/components/activity-tag/activity-tag/index.js.map +0 -1
- package/dist/components/activityLog/activity-log/index.esm.js +0 -104
- package/dist/components/activityLog/activity-log/index.esm.js.map +0 -1
- package/dist/components/activityLog/activity-log/index.js +0 -14
- package/dist/components/activityLog/activity-log/index.js.map +0 -1
- package/dist/components/button/button.scss/index.esm.js +0 -2
- package/dist/components/button/button.scss/index.esm.js.map +0 -1
- package/dist/components/button/button.scss/index.js +0 -2
- package/dist/components/button/button.scss/index.js.map +0 -1
- package/dist/components/charts/bar-chart/bar-chart/index.esm.js +0 -85
- package/dist/components/charts/bar-chart/bar-chart/index.esm.js.map +0 -1
- package/dist/components/charts/bar-chart/bar-chart/index.js +0 -2
- package/dist/components/charts/bar-chart/bar-chart/index.js.map +0 -1
- package/dist/components/charts/barChart/barChart/index.esm.js +0 -147
- package/dist/components/charts/barChart/barChart/index.esm.js.map +0 -1
- package/dist/components/charts/barChart/barChart/index.js +0 -2
- package/dist/components/charts/barChart/barChart/index.js.map +0 -1
- package/dist/components/charts/donut-chart/donut-chart/index.esm.js +0 -85
- package/dist/components/charts/donut-chart/donut-chart/index.esm.js.map +0 -1
- package/dist/components/charts/donut-chart/donut-chart/index.js +0 -6
- package/dist/components/charts/donut-chart/donut-chart/index.js.map +0 -1
- package/dist/components/charts/donutChart/DonutChart/index.esm.js +0 -96
- package/dist/components/charts/donutChart/DonutChart/index.esm.js.map +0 -1
- package/dist/components/charts/donutChart/DonutChart/index.js +0 -5
- package/dist/components/charts/donutChart/DonutChart/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/grid/grid-card/grid-card.scss/index.esm.js +0 -2
- package/dist/components/grid/grid-card/grid-card.scss/index.esm.js.map +0 -1
- package/dist/components/grid/grid-card/grid-card.scss/index.js +0 -2
- package/dist/components/grid/grid-card/grid-card.scss/index.js.map +0 -1
- package/dist/components/list/list.scss/index.esm.js +0 -2
- package/dist/components/list/list.scss/index.esm.js.map +0 -1
- package/dist/components/list/list.scss/index.js +0 -2
- package/dist/components/list/list.scss/index.js.map +0 -1
- 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/node_modules/@mui/lab/Timeline/Timeline/index.esm.js +0 -95
- package/dist/node_modules/@mui/lab/Timeline/Timeline/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/Timeline/Timeline/index.js +0 -3
- package/dist/node_modules/@mui/lab/Timeline/Timeline/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/Timeline/TimelineContext/index.esm.js +0 -10
- package/dist/node_modules/@mui/lab/Timeline/TimelineContext/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/Timeline/TimelineContext/index.js +0 -2
- package/dist/node_modules/@mui/lab/Timeline/TimelineContext/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/Timeline/timelineClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/lab/Timeline/timelineClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/Timeline/timelineClasses/index.js +0 -2
- package/dist/node_modules/@mui/lab/Timeline/timelineClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineConnector/TimelineConnector/index.esm.js +0 -76
- package/dist/node_modules/@mui/lab/TimelineConnector/TimelineConnector/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineConnector/TimelineConnector/index.js +0 -3
- package/dist/node_modules/@mui/lab/TimelineConnector/TimelineConnector/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineConnector/timelineConnectorClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/lab/TimelineConnector/timelineConnectorClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineConnector/timelineConnectorClasses/index.js +0 -2
- package/dist/node_modules/@mui/lab/TimelineConnector/timelineConnectorClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineContent/TimelineContent/index.esm.js +0 -91
- package/dist/node_modules/@mui/lab/TimelineContent/TimelineContent/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineContent/TimelineContent/index.js +0 -3
- package/dist/node_modules/@mui/lab/TimelineContent/TimelineContent/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineContent/timelineContentClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/lab/TimelineContent/timelineContentClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineContent/timelineContentClasses/index.js +0 -2
- package/dist/node_modules/@mui/lab/TimelineContent/timelineContentClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineDot/TimelineDot/index.esm.js +0 -118
- package/dist/node_modules/@mui/lab/TimelineDot/TimelineDot/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineDot/TimelineDot/index.js +0 -3
- package/dist/node_modules/@mui/lab/TimelineDot/TimelineDot/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineDot/timelineDotClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/lab/TimelineDot/timelineDotClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineDot/timelineDotClasses/index.js +0 -2
- package/dist/node_modules/@mui/lab/TimelineDot/timelineDotClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.esm.js +0 -128
- package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.js +0 -3
- package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineItem/timelineItemClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/lab/TimelineItem/timelineItemClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineItem/timelineItemClasses/index.js +0 -2
- package/dist/node_modules/@mui/lab/TimelineItem/timelineItemClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineOppositeContent/timelineOppositeContentClasses/index.esm.js +0 -6
- package/dist/node_modules/@mui/lab/TimelineOppositeContent/timelineOppositeContentClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineOppositeContent/timelineOppositeContentClasses/index.js +0 -2
- package/dist/node_modules/@mui/lab/TimelineOppositeContent/timelineOppositeContentClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineSeparator/TimelineSeparator/index.esm.js +0 -73
- package/dist/node_modules/@mui/lab/TimelineSeparator/TimelineSeparator/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineSeparator/TimelineSeparator/index.js +0 -3
- package/dist/node_modules/@mui/lab/TimelineSeparator/TimelineSeparator/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineSeparator/timelineSeparatorClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/lab/TimelineSeparator/timelineSeparatorClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/TimelineSeparator/timelineSeparatorClasses/index.js +0 -2
- package/dist/node_modules/@mui/lab/TimelineSeparator/timelineSeparatorClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/lab/internal/convertTimelinePositionToClass/index.esm.js +0 -8
- package/dist/node_modules/@mui/lab/internal/convertTimelinePositionToClass/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/lab/internal/convertTimelinePositionToClass/index.js +0 -2
- package/dist/node_modules/@mui/lab/internal/convertTimelinePositionToClass/index.js.map +0 -1
- package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.esm.js +0 -95
- package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.js +0 -3
- package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.js.map +0 -1
- package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.esm.js +0 -201
- package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.js +0 -3
- package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.js.map +0 -1
- package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.esm.js +0 -125
- package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.js +0 -4
- package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.js.map +0 -1
- package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.esm.js +0 -170
- package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.js +0 -3
- package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.js.map +0 -1
- package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.esm.js +0 -120
- package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.js +0 -3
- package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.js.map +0 -1
- package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/CardActions/CardActions/index.esm.js +0 -92
- package/dist/node_modules/@mui/material/CardActions/CardActions/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/CardActions/CardActions/index.js +0 -3
- package/dist/node_modules/@mui/material/CardActions/CardActions/index.js.map +0 -1
- package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.esm.js +0 -196
- package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.js +0 -2
- package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.js.map +0 -1
- package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.esm.js +0 -76
- package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.js +0 -3
- package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.js.map +0 -1
- package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Fab/Fab/index.esm.js +0 -231
- package/dist/node_modules/@mui/material/Fab/Fab/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Fab/Fab/index.js +0 -3
- package/dist/node_modules/@mui/material/Fab/Fab/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Fab/fabClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/Fab/fabClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Fab/fabClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/Fab/fabClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Hidden/Hidden/index.esm.js +0 -135
- package/dist/node_modules/@mui/material/Hidden/Hidden/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Hidden/Hidden/index.js +0 -2
- package/dist/node_modules/@mui/material/Hidden/Hidden/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.esm.js +0 -176
- package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.js +0 -3
- package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.esm.js +0 -119
- package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.js +0 -2
- package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Hidden/withWidth/index.esm.js +0 -92
- package/dist/node_modules/@mui/material/Hidden/withWidth/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Hidden/withWidth/index.js +0 -2
- package/dist/node_modules/@mui/material/Hidden/withWidth/index.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageList/ImageList/index.esm.js +0 -156
- package/dist/node_modules/@mui/material/ImageList/ImageList/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageList/ImageList/index.js +0 -3
- package/dist/node_modules/@mui/material/ImageList/ImageList/index.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.js +0 -2
- package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.esm.js +0 -173
- package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.js +0 -3
- package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.esm.js +0 -222
- package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.js +0 -3
- package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.esm.js +0 -216
- package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.js +0 -3
- package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.js.map +0 -1
- package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.esm.js +0 -126
- package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.js +0 -3
- package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.js.map +0 -1
- package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.esm.js +0 -55
- package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.js +0 -2
- package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Rating/Rating/index.esm.js +0 -638
- package/dist/node_modules/@mui/material/Rating/Rating/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Rating/Rating/index.js +0 -7
- package/dist/node_modules/@mui/material/Rating/Rating/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Rating/ratingClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/Rating/ratingClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Rating/ratingClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/Rating/ratingClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.esm.js +0 -105
- package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.js +0 -3
- package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.js.map +0 -1
- package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.esm.js +0 -453
- package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.js +0 -4
- package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.js.map +0 -1
- package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.esm.js +0 -245
- package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.js +0 -2
- package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.js.map +0 -1
- package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.esm.js +0 -137
- package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.js +0 -4
- package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.js.map +0 -1
- package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Step/Step/index.esm.js +0 -169
- package/dist/node_modules/@mui/material/Step/Step/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Step/Step/index.js +0 -3
- package/dist/node_modules/@mui/material/Step/Step/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Step/StepContext/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/Step/StepContext/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Step/StepContext/index.js +0 -2
- package/dist/node_modules/@mui/material/Step/StepContext/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Step/stepClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/Step/stepClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Step/stepClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/Step/stepClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/StepButton/StepButton/index.esm.js +0 -132
- package/dist/node_modules/@mui/material/StepButton/StepButton/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/StepButton/StepButton/index.js +0 -3
- package/dist/node_modules/@mui/material/StepButton/StepButton/index.js.map +0 -1
- package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.esm.js +0 -136
- package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.js +0 -3
- package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.js.map +0 -1
- package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/StepContent/StepContent/index.esm.js +0 -152
- package/dist/node_modules/@mui/material/StepContent/StepContent/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/StepContent/StepContent/index.js +0 -2
- package/dist/node_modules/@mui/material/StepContent/StepContent/index.js.map +0 -1
- package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.esm.js +0 -161
- package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.js +0 -2
- package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.js.map +0 -1
- package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.esm.js +0 -239
- package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.js +0 -3
- package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.js.map +0 -1
- package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Stepper/Stepper/index.esm.js +0 -155
- package/dist/node_modules/@mui/material/Stepper/Stepper/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Stepper/Stepper/index.js +0 -3
- package/dist/node_modules/@mui/material/Stepper/Stepper/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Stepper/StepperContext/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/Stepper/StepperContext/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Stepper/StepperContext/index.js +0 -2
- package/dist/node_modules/@mui/material/Stepper/StepperContext/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.esm.js +0 -10
- package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.esm.js +0 -82
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.js +0 -3
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.js.map +0 -1
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.esm.js +0 -538
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.js +0 -2
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.js.map +0 -1
- package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.esm.js +0 -443
- package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.js +0 -3
- package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.js.map +0 -1
- package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.esm.js +0 -179
- package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.js +0 -3
- package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.js.map +0 -1
- package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.esm.js +0 -11
- package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.js +0 -2
- package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.js.map +0 -1
- package/dist/node_modules/@mui/material/Zoom/Zoom/index.esm.js +0 -196
- package/dist/node_modules/@mui/material/Zoom/Zoom/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/Zoom/Zoom/index.js +0 -3
- package/dist/node_modules/@mui/material/Zoom/Zoom/index.js.map +0 -1
- package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.esm.js +0 -9
- package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.js +0 -2
- package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.js.map +0 -1
- package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.esm.js +0 -9
- package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.js +0 -2
- package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.js.map +0 -1
- package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.esm.js +0 -9
- package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.js +0 -2
- package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.js.map +0 -1
- package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.esm.js +0 -9
- package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.js +0 -2
- package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.js.map +0 -1
- package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.esm.js +0 -9
- package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.js +0 -2
- package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.js.map +0 -1
- package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.esm.js +0 -51
- package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.esm.js.map +0 -1
- package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.js +0 -2
- package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.js.map +0 -1
- package/dist/node_modules/d3-shape/src/arc/index.esm.js +0 -134
- package/dist/node_modules/d3-shape/src/arc/index.esm.js.map +0 -1
- package/dist/node_modules/d3-shape/src/arc/index.js +0 -2
- package/dist/node_modules/d3-shape/src/arc/index.js.map +0 -1
- package/dist/node_modules/d3-shape/src/descending/index.esm.js +0 -7
- package/dist/node_modules/d3-shape/src/descending/index.esm.js.map +0 -1
- package/dist/node_modules/d3-shape/src/descending/index.js +0 -2
- package/dist/node_modules/d3-shape/src/descending/index.js.map +0 -1
- package/dist/node_modules/d3-shape/src/identity/index.esm.js +0 -7
- package/dist/node_modules/d3-shape/src/identity/index.esm.js.map +0 -1
- package/dist/node_modules/d3-shape/src/identity/index.js +0 -2
- package/dist/node_modules/d3-shape/src/identity/index.js.map +0 -1
- package/dist/node_modules/d3-shape/src/math/index.esm.js +0 -33
- package/dist/node_modules/d3-shape/src/math/index.esm.js.map +0 -1
- package/dist/node_modules/d3-shape/src/math/index.js +0 -2
- package/dist/node_modules/d3-shape/src/math/index.js.map +0 -1
- package/dist/node_modules/d3-shape/src/pie/index.esm.js +0 -56
- package/dist/node_modules/d3-shape/src/pie/index.esm.js.map +0 -1
- package/dist/node_modules/d3-shape/src/pie/index.js +0 -2
- package/dist/node_modules/d3-shape/src/pie/index.js.map +0 -1
- package/dist/src/views/afterAuth/accounting.d.ts +0 -4
- package/dist/src/views/afterAuth/crm.d.ts +0 -4
- package/dist/src/views/afterAuth/document.d.ts +0 -4
- package/dist/src/views/afterAuth/hrms.d.ts +0 -4
- package/dist/src/views/afterAuth/inventory.d.ts +0 -4
- package/dist/src/views/afterAuth/manufacturing.d.ts +0 -4
- package/dist/src/views/afterAuth/office.d.ts +0 -4
- package/dist/src/views/afterAuth/procurement.d.ts +0 -4
- package/dist/src/views/afterAuth/project.d.ts +0 -4
- package/dist/src/views/afterAuth/purchase.d.ts +0 -4
- package/dist/src/views/afterAuth/quotes.d.ts +0 -4
- package/dist/src/views/afterAuth/rental.d.ts +0 -4
- package/dist/src/views/afterAuth/user.d.ts +0 -4
- package/dist/src/views/beforeAuth/components/user-profile-data/user-profile-data.d.ts +0 -9
- package/dist/styles/sass/_mixins.scss/index.esm.js +0 -2
- package/dist/styles/sass/_mixins.scss/index.esm.js.map +0 -1
- package/dist/styles/sass/_mixins.scss/index.js +0 -2
- package/dist/styles/sass/_mixins.scss/index.js.map +0 -1
- package/dist/styles/sass/_variables.scss/index.esm.js +0 -2
- package/dist/styles/sass/_variables.scss/index.esm.js.map +0 -1
- package/dist/styles/sass/_variables.scss/index.js +0 -2
- package/dist/styles/sass/_variables.scss/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/login/index.scss/index.esm.js +0 -2
- package/dist/views/beforeAuth/login/index.scss/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/login/index.scss/index.js +0 -2
- package/dist/views/beforeAuth/login/index.scss/index.js.map +0 -1
- package/dist/views/form-builder/index/index.esm.js +0 -32
- package/dist/views/form-builder/index/index.esm.js.map +0 -1
- package/dist/views/form-builder/index/index.js +0 -2
- package/dist/views/form-builder/index/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/hooks/use-material-calculations.ts"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport { useMemo } from 'react';\n\n// ==================== CONSTANTS ====================\nconst MATERIAL_CONSTANTS = {\n STEEL_DENSITY: 7.85,\n LENGTH_CONVERSION_FACTOR: 1000,\n TUBE_CALCULATION_FACTOR: 0.024662,\n COIL_WEIGHTS: {\n GI: 2879.95,\n HR: 2356.59,\n },\n} as const;\n\n// ==================== TYPES ====================\ntype SteelType = keyof typeof MATERIAL_CONSTANTS.COIL_WEIGHTS;\ntype TubeType = 'Round' | 'Square' | 'Rectangle';\n\ninterface BaseFormValues {\n // Board calculation fields\n face_width?: string | number;\n bending?: string | number;\n height?: string | number;\n total_width?: string | number;\n boards_thickness?: string | number;\n boards_length?: string | number;\n \n // Steel calculation fields\n steel_length?: string | number;\n steel_width?: string | number;\n steel_thickness?: string | number;\n steel_type?: SteelType;\n \n // Tube calculation fields\n tube_type?: TubeType;\n tube_od?: string | number;\n shape_width?: string | number;\n shape_height?: string | number;\n material_thickness?: string | number;\n material_length?: string | number;\n}\n\ninterface MaterialCalculations {\n totalWidth: number;\n materialUnit: number;\n boardsWeight: number;\n steelWeight: number;\n materialWeight: number;\n}\n\ninterface CalculationResult<T = number> {\n value: T;\n isValid: boolean;\n error?: string;\n}\n\n// ==================== UTILITY FUNCTIONS ====================\n/**\n * Safely parses a value to number with comprehensive validation\n */\nconst safeParseNumber = (value: string | number | undefined | null): CalculationResult<number> => {\n if (value === undefined || value === null || value === '') {\n return { value: 0, isValid: false, error: 'Empty value' };\n }\n \n const parsed = typeof value === 'string' ? parseFloat(value.trim()) : Number(value);\n \n if (isNaN(parsed)) {\n return { value: 0, isValid: false, error: 'Invalid number format' };\n }\n \n if (!isFinite(parsed)) {\n return { value: 0, isValid: false, error: 'Number is not finite' };\n }\n \n return { value: parsed, isValid: true };\n};\n\n/**\n * Validates that all provided values are positive numbers\n */\nconst validatePositiveNumbers = (...values: (string | number | undefined)[]): boolean => {\n return values.every(value => {\n const result = safeParseNumber(value);\n return result.isValid && result.value > 0;\n });\n};\n\n/**\n * Creates a memoization key from form values to optimize re-calculations\n */\nconst createMemoKey = (formValues: BaseFormValues | undefined): string => {\n if (!formValues) return 'empty';\n \n // Only include relevant fields to avoid unnecessary recalculations\n const relevantFields = [\n 'face_width', 'bending', 'height', 'total_width', 'boards_thickness', 'boards_length',\n 'steel_length', 'steel_width', 'steel_thickness', 'steel_type',\n 'tube_type', 'tube_od', 'shape_width', 'shape_height', 'material_thickness', 'material_length'\n ];\n \n return relevantFields\n .map(field => `${field}:${formValues[field as keyof BaseFormValues] ?? ''}`)\n .join('|');\n};\n\n// ==================== CALCULATION FUNCTIONS ====================\n/**\n * Calculates the total width for boards costing\n * Formula: ((height + bending) * 2) + face_width\n */\nconst calculateBoardsTotalWidth = (formValues: BaseFormValues): CalculationResult<number> => {\n const { face_width, bending, height } = formValues;\n \n if (!validatePositiveNumbers(face_width, bending, height)) {\n return { value: 0, isValid: false, error: 'Invalid input values for boards total width calculation' };\n }\n \n const faceWidthResult = safeParseNumber(face_width);\n const bendingResult = safeParseNumber(bending);\n const heightResult = safeParseNumber(height);\n \n if (![faceWidthResult, bendingResult, heightResult].every(r => r.isValid)) {\n return { value: 0, isValid: false, error: 'Failed to parse input values' };\n }\n \n const totalWidth = ((heightResult.value + bendingResult.value) * 2) + faceWidthResult.value;\n \n return { value: totalWidth, isValid: true };\n};\n\n/**\n * Calculates the weight of boards\n * Formula: (total_width * thickness * (length / 1000)) * 7.85\n */\nconst calculateBoardsWeight = (formValues: BaseFormValues): CalculationResult<number> => {\n const { total_width, boards_thickness, boards_length } = formValues;\n \n if (!validatePositiveNumbers(total_width, boards_thickness, boards_length)) {\n return { value: 0, isValid: false, error: 'Invalid input values for boards weight calculation' };\n }\n \n const totalWidthResult = safeParseNumber(total_width);\n const thicknessResult = safeParseNumber(boards_thickness);\n const lengthResult = safeParseNumber(boards_length);\n \n if (![totalWidthResult, thicknessResult, lengthResult].every(r => r.isValid)) {\n return { value: 0, isValid: false, error: 'Failed to parse input values' };\n }\n \n const weight = (totalWidthResult.value * thicknessResult.value * \n (lengthResult.value / MATERIAL_CONSTANTS.LENGTH_CONVERSION_FACTOR)) * \n MATERIAL_CONSTANTS.STEEL_DENSITY;\n \n return { value: weight, isValid: true };\n};\n\n/**\n * Calculates the weight of steel\n * Formula: (length * width * thickness * 7.85) / 1000\n */\nconst calculateSteelWeight = (formValues: BaseFormValues): CalculationResult<number> => {\n const { steel_length, steel_width, steel_thickness } = formValues;\n \n if (!validatePositiveNumbers(steel_length, steel_width, steel_thickness)) {\n return { value: 0, isValid: false, error: 'Invalid input values for steel weight calculation' };\n }\n \n const lengthResult = safeParseNumber(steel_length);\n const widthResult = safeParseNumber(steel_width);\n const thicknessResult = safeParseNumber(steel_thickness);\n \n if (![lengthResult, widthResult, thicknessResult].every(r => r.isValid)) {\n return { value: 0, isValid: false, error: 'Failed to parse input values' };\n }\n \n const weight = (lengthResult.value * widthResult.value * thicknessResult.value * \n MATERIAL_CONSTANTS.STEEL_DENSITY) / MATERIAL_CONSTANTS.LENGTH_CONVERSION_FACTOR;\n \n return { value: weight, isValid: true };\n};\n\n/**\n * Gets the material unit weight based on steel type\n */\nconst calculateMaterialUnit = (formValues: BaseFormValues): CalculationResult<number> => {\n const { steel_type } = formValues;\n \n if (!steel_type) {\n return { value: 0, isValid: false, error: 'Steel type not specified' };\n }\n \n if (!(steel_type in MATERIAL_CONSTANTS.COIL_WEIGHTS)) {\n return { value: 0, isValid: false, error: `Unsupported steel type: ${steel_type}` };\n }\n \n const weight = MATERIAL_CONSTANTS.COIL_WEIGHTS[steel_type];\n return { value: weight, isValid: true };\n};\n\n/**\n * Calculates material weight based on tube type and dimensions\n * Supports Round, Square, and Rectangle tube types\n */\nconst calculateTubeMaterialWeight = (formValues: BaseFormValues): CalculationResult<number> => {\n const { tube_type, tube_od, shape_width, shape_height, material_thickness, material_length } = formValues;\n \n if (!tube_type) {\n return { value: 0, isValid: false, error: 'Tube type not specified' };\n }\n \n const thicknessResult = safeParseNumber(material_thickness);\n const lengthResult = safeParseNumber(material_length);\n \n if (!thicknessResult.isValid || !lengthResult.isValid) {\n return { value: 0, isValid: false, error: 'Invalid thickness or length values' };\n }\n \n let weight = 0;\n \n switch (tube_type) {\n case 'Round': {\n const odResult = safeParseNumber(tube_od);\n if (!odResult.isValid || odResult.value <= thicknessResult.value) {\n return { value: 0, isValid: false, error: 'Invalid outer diameter for round tube' };\n }\n \n weight = (odResult.value - thicknessResult.value) * thicknessResult.value * \n MATERIAL_CONSTANTS.TUBE_CALCULATION_FACTOR * lengthResult.value;\n break;\n }\n \n case 'Square':\n case 'Rectangle': {\n const widthResult = safeParseNumber(shape_width);\n const heightResult = safeParseNumber(shape_height);\n \n if (!widthResult.isValid || !heightResult.isValid) {\n return { value: 0, isValid: false, error: 'Invalid width or height for rectangular tube' };\n }\n \n const perimeter = 2 * (widthResult.value + heightResult.value);\n weight = (((perimeter / Math.PI) - thicknessResult.value) * thicknessResult.value * \n MATERIAL_CONSTANTS.TUBE_CALCULATION_FACTOR) * lengthResult.value;\n break;\n }\n \n default:\n return { value: 0, isValid: false, error: `Unsupported tube type: ${tube_type}` };\n }\n \n return { value: Math.max(0, weight), isValid: true };\n};\n\n// ==================== MAIN HOOK ====================\n/**\n * Custom hook for optimized material calculations with comprehensive error handling\n * and performance optimization through memoization\n */\nexport const useMaterialCalculations = (formValues?: BaseFormValues): MaterialCalculations => {\n const calculations = useMemo(() => {\n if (!formValues) {\n return {\n totalWidth: 0,\n materialUnit: 0,\n boardsWeight: 0,\n steelWeight: 0,\n materialWeight: 0,\n };\n }\n \n // Calculate all values with error handling\n const totalWidthResult = calculateBoardsTotalWidth(formValues);\n const materialUnitResult = calculateMaterialUnit(formValues);\n const boardsWeightResult = calculateBoardsWeight(formValues);\n const steelWeightResult = calculateSteelWeight(formValues);\n const materialWeightResult = calculateTubeMaterialWeight(formValues);\n \n // Optional: Log errors in development\n if (process.env.NODE_ENV === 'development') {\n [totalWidthResult, materialUnitResult, boardsWeightResult, steelWeightResult, materialWeightResult]\n .filter(result => !result.isValid && result.error)\n .forEach(result => console.warn('Calculation warning:', result.error));\n }\n \n return {\n totalWidth: totalWidthResult.value,\n materialUnit: materialUnitResult.value,\n boardsWeight: boardsWeightResult.value,\n steelWeight: steelWeightResult.value,\n materialWeight: materialWeightResult.value,\n };\n }, [createMemoKey(formValues)]); // Optimized dependency to prevent unnecessary recalculations\n \n return calculations;\n};\n\n// ==================== ADDITIONAL UTILITIES ====================\n/**\n * Utility function to validate form values before calculations\n */\nexport const validateFormValues = (formValues: BaseFormValues): { isValid: boolean; errors: string[] } => {\n const errors: string[] = [];\n const { tube_type, steel_type } = formValues;\n \n // Validate steel type if provided\n if (steel_type && !(steel_type in MATERIAL_CONSTANTS.COIL_WEIGHTS)) {\n errors.push(`Invalid steel type: ${steel_type}`);\n }\n \n // Validate tube type if provided\n if (tube_type && !['Round', 'Square', 'Rectangle'].includes(tube_type)) {\n errors.push(`Invalid tube type: ${tube_type}`);\n }\n \n return { isValid: errors.length === 0, errors };\n};\n\n/**\n * Get available steel types for form validation\n */\nexport const getAvailableSteelTypes = (): SteelType[] => {\n return Object.keys(MATERIAL_CONSTANTS.COIL_WEIGHTS) as SteelType[];\n};\n\n/**\n * Get available tube types for form validation\n */\nexport const getAvailableTubeTypes = (): TubeType[] => {\n return ['Round', 'Square', 'Rectangle'];\n};\n\nexport default {\n useMaterialCalculations,\n validateFormValues,\n getAvailableSteelTypes,\n getAvailableTubeTypes,\n MATERIAL_CONSTANTS,\n};\nexport type {\n BaseFormValues,\n MaterialCalculations,\n SteelType,\n TubeType,\n CalculationResult,\n};"],"names":["MATERIAL_CONSTANTS","STEEL_DENSITY","LENGTH_CONVERSION_FACTOR","TUBE_CALCULATION_FACTOR","COIL_WEIGHTS","GI","HR","safeParseNumber","value","isValid","error","parsed","parseFloat","trim","Number","isNaN","isFinite","validatePositiveNumbers","values","every","result","createMemoKey","formValues","map","field","join","useMaterialCalculations","useMemo","totalWidth","materialUnit","boardsWeight","steelWeight","materialWeight","totalWidthResult","face_width","bending","height","faceWidthResult","bendingResult","heightResult","r","calculateBoardsTotalWidth","materialUnitResult","steel_type","calculateMaterialUnit","boardsWeightResult","total_width","boards_thickness","boards_length","thicknessResult","lengthResult","calculateBoardsWeight","steelWeightResult","steel_length","steel_width","steel_thickness","widthResult","calculateSteelWeight","materialWeightResult","tube_type","tube_od","shape_width","shape_height","material_thickness","material_length","weight","odResult","Math","PI","max","calculateTubeMaterialWeight","define_process_env_default","NODE_ENV","filter","forEach","validateFormValues","errors","push","includes","length","getAvailableSteelTypes","Object","keys","getAvailableTubeTypes","useMaterialCalculations$1"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/hooks/use-material-calculations.ts"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport { useMemo } from 'react';\n\n// ==================== CONSTANTS ====================\nconst MATERIAL_CONSTANTS = {\n STEEL_DENSITY: 7.85,\n LENGTH_CONVERSION_FACTOR: 1000,\n TUBE_CALCULATION_FACTOR: 0.024662,\n COIL_WEIGHTS: {\n GI: 2879.95,\n HR: 2356.59,\n },\n} as const;\n\n// ==================== TYPES ====================\ntype SteelType = keyof typeof MATERIAL_CONSTANTS.COIL_WEIGHTS;\ntype TubeType = 'Round' | 'Square' | 'Rectangle';\n\ninterface BaseFormValues {\n // Board calculation fields\n face_width?: string | number;\n bending?: string | number;\n height?: string | number;\n total_width?: string | number;\n boards_thickness?: string | number;\n boards_length?: string | number;\n \n // Steel calculation fields\n steel_length?: string | number;\n steel_width?: string | number;\n steel_thickness?: string | number;\n steel_type?: SteelType;\n \n // Tube calculation fields\n tube_type?: TubeType;\n tube_od?: string | number;\n shape_width?: string | number;\n shape_height?: string | number;\n material_thickness?: string | number;\n material_length?: string | number;\n}\n\ninterface MaterialCalculations {\n totalWidth: number;\n materialUnit: number;\n boardsWeight: number;\n steelWeight: number;\n materialWeight: number;\n}\n\ninterface CalculationResult<T = number> {\n value: T;\n isValid: boolean;\n error?: string;\n}\n\n// ==================== UTILITY FUNCTIONS ====================\n/**\n * Safely parses a value to number with comprehensive validation\n */\nconst safeParseNumber = (value: string | number | undefined | null): CalculationResult<number> => {\n if (value === undefined || value === null || value === '') {\n return { value: 0, isValid: false, error: 'Empty value' };\n }\n \n const parsed = typeof value === 'string' ? parseFloat(value.trim()) : Number(value);\n \n if (isNaN(parsed)) {\n return { value: 0, isValid: false, error: 'Invalid number format' };\n }\n \n if (!isFinite(parsed)) {\n return { value: 0, isValid: false, error: 'Number is not finite' };\n }\n \n return { value: parsed, isValid: true };\n};\n\n/**\n * Validates that all provided values are positive numbers\n */\nconst validatePositiveNumbers = (...values: (string | number | undefined)[]): boolean => {\n return values.every(value => {\n const result = safeParseNumber(value);\n return result.isValid && result.value > 0;\n });\n};\n\n/**\n * Creates a memoization key from form values to optimize re-calculations\n */\nconst createMemoKey = (formValues: BaseFormValues | undefined): string => {\n if (!formValues) return 'empty';\n \n // Only include relevant fields to avoid unnecessary recalculations\n const relevantFields = [\n 'face_width', 'bending', 'height', 'total_width', 'boards_thickness', 'boards_length',\n 'steel_length', 'steel_width', 'steel_thickness', 'steel_type',\n 'tube_type', 'tube_od', 'shape_width', 'shape_height', 'material_thickness', 'material_length'\n ];\n \n return relevantFields\n .map(field => `${field}:${formValues[field as keyof BaseFormValues] ?? ''}`)\n .join('|');\n};\n\n// ==================== CALCULATION FUNCTIONS ====================\n/**\n * Calculates the total width for boards costing\n * Formula: ((height + bending) * 2) + face_width\n */\nconst calculateBoardsTotalWidth = (formValues: BaseFormValues): CalculationResult<number> => {\n const { face_width, bending, height } = formValues;\n \n if (!validatePositiveNumbers(face_width, bending, height)) {\n return { value: 0, isValid: false, error: 'Invalid input values for boards total width calculation' };\n }\n \n const faceWidthResult = safeParseNumber(face_width);\n const bendingResult = safeParseNumber(bending);\n const heightResult = safeParseNumber(height);\n \n if (![faceWidthResult, bendingResult, heightResult].every(r => r.isValid)) {\n return { value: 0, isValid: false, error: 'Failed to parse input values' };\n }\n \n const totalWidth = ((heightResult.value + bendingResult.value) * 2) + faceWidthResult.value;\n \n return { value: totalWidth, isValid: true };\n};\n\n/**\n * Calculates the weight of boards\n * Formula: (total_width * thickness * (length / 1000)) * 7.85\n */\nconst calculateBoardsWeight = (formValues: BaseFormValues): CalculationResult<number> => {\n const { total_width, boards_thickness, boards_length } = formValues;\n \n if (!validatePositiveNumbers(total_width, boards_thickness, boards_length)) {\n return { value: 0, isValid: false, error: 'Invalid input values for boards weight calculation' };\n }\n \n const totalWidthResult = safeParseNumber(total_width);\n const thicknessResult = safeParseNumber(boards_thickness);\n const lengthResult = safeParseNumber(boards_length);\n \n if (![totalWidthResult, thicknessResult, lengthResult].every(r => r.isValid)) {\n return { value: 0, isValid: false, error: 'Failed to parse input values' };\n }\n \n const weight = (totalWidthResult.value * thicknessResult.value * \n (lengthResult.value / MATERIAL_CONSTANTS.LENGTH_CONVERSION_FACTOR)) * \n MATERIAL_CONSTANTS.STEEL_DENSITY;\n \n return { value: weight, isValid: true };\n};\n\n/**\n * Calculates the weight of steel\n * Formula: (length * width * thickness * 7.85) / 1000\n */\nconst calculateSteelWeight = (formValues: BaseFormValues): CalculationResult<number> => {\n const { steel_length, steel_width, steel_thickness } = formValues;\n \n if (!validatePositiveNumbers(steel_length, steel_width, steel_thickness)) {\n return { value: 0, isValid: false, error: 'Invalid input values for steel weight calculation' };\n }\n \n const lengthResult = safeParseNumber(steel_length);\n const widthResult = safeParseNumber(steel_width);\n const thicknessResult = safeParseNumber(steel_thickness);\n \n if (![lengthResult, widthResult, thicknessResult].every(r => r.isValid)) {\n return { value: 0, isValid: false, error: 'Failed to parse input values' };\n }\n \n const weight = (lengthResult.value * widthResult.value * thicknessResult.value * \n MATERIAL_CONSTANTS.STEEL_DENSITY) / MATERIAL_CONSTANTS.LENGTH_CONVERSION_FACTOR;\n \n return { value: weight, isValid: true };\n};\n\n/**\n * Gets the material unit weight based on steel type\n */\nconst calculateMaterialUnit = (formValues: BaseFormValues): CalculationResult<number> => {\n const { steel_type } = formValues;\n \n if (!steel_type) {\n return { value: 0, isValid: false, error: 'Steel type not specified' };\n }\n \n if (!(steel_type in MATERIAL_CONSTANTS.COIL_WEIGHTS)) {\n return { value: 0, isValid: false, error: `Unsupported steel type: ${steel_type}` };\n }\n \n const weight = MATERIAL_CONSTANTS.COIL_WEIGHTS[steel_type];\n return { value: weight, isValid: true };\n};\n\n/**\n * Calculates material weight based on tube type and dimensions\n * Supports Round, Square, and Rectangle tube types\n */\nconst calculateTubeMaterialWeight = (formValues: BaseFormValues): CalculationResult<number> => {\n const { tube_type, tube_od, shape_width, shape_height, material_thickness, material_length } = formValues;\n \n if (!tube_type) {\n return { value: 0, isValid: false, error: 'Tube type not specified' };\n }\n \n const thicknessResult = safeParseNumber(material_thickness);\n const lengthResult = safeParseNumber(material_length);\n \n if (!thicknessResult.isValid || !lengthResult.isValid) {\n return { value: 0, isValid: false, error: 'Invalid thickness or length values' };\n }\n \n let weight = 0;\n \n switch (tube_type) {\n case 'Round': {\n const odResult = safeParseNumber(tube_od);\n if (!odResult.isValid || odResult.value <= thicknessResult.value) {\n return { value: 0, isValid: false, error: 'Invalid outer diameter for round tube' };\n }\n \n weight = (odResult.value - thicknessResult.value) * thicknessResult.value * \n MATERIAL_CONSTANTS.TUBE_CALCULATION_FACTOR * lengthResult.value;\n break;\n }\n \n case 'Square':\n case 'Rectangle': {\n const widthResult = safeParseNumber(shape_width);\n const heightResult = safeParseNumber(shape_height);\n \n if (!widthResult.isValid || !heightResult.isValid) {\n return { value: 0, isValid: false, error: 'Invalid width or height for rectangular tube' };\n }\n \n const perimeter = 2 * (widthResult.value + heightResult.value);\n weight = (((perimeter / Math.PI) - thicknessResult.value) * thicknessResult.value * \n MATERIAL_CONSTANTS.TUBE_CALCULATION_FACTOR) * lengthResult.value;\n break;\n }\n \n default:\n return { value: 0, isValid: false, error: `Unsupported tube type: ${tube_type}` };\n }\n \n return { value: Math.max(0, weight), isValid: true };\n};\n\n// ==================== MAIN HOOK ====================\n/**\n * Custom hook for optimized material calculations with comprehensive error handling\n * and performance optimization through memoization\n */\nexport const useMaterialCalculations = (formValues?: BaseFormValues): MaterialCalculations => {\n const calculations = useMemo(() => {\n if (!formValues) {\n return {\n totalWidth: 0,\n materialUnit: 0,\n boardsWeight: 0,\n steelWeight: 0,\n materialWeight: 0,\n };\n }\n \n // Calculate all values with error handling\n const totalWidthResult = calculateBoardsTotalWidth(formValues);\n const materialUnitResult = calculateMaterialUnit(formValues);\n const boardsWeightResult = calculateBoardsWeight(formValues);\n const steelWeightResult = calculateSteelWeight(formValues);\n const materialWeightResult = calculateTubeMaterialWeight(formValues);\n \n // Optional: Log errors in development\n if (process.env.NODE_ENV === 'development') {\n [totalWidthResult, materialUnitResult, boardsWeightResult, steelWeightResult, materialWeightResult]\n .filter(result => !result.isValid && result.error)\n .forEach(result => console.warn('Calculation warning:', result.error));\n }\n \n return {\n totalWidth: totalWidthResult.value,\n materialUnit: materialUnitResult.value,\n boardsWeight: boardsWeightResult.value,\n steelWeight: steelWeightResult.value,\n materialWeight: materialWeightResult.value,\n };\n }, [createMemoKey(formValues)]); // Optimized dependency to prevent unnecessary recalculations\n \n return calculations;\n};\n\n// ==================== ADDITIONAL UTILITIES ====================\n/**\n * Utility function to validate form values before calculations\n */\nexport const validateFormValues = (formValues: BaseFormValues): { isValid: boolean; errors: string[] } => {\n const errors: string[] = [];\n const { tube_type, steel_type } = formValues;\n \n // Validate steel type if provided\n if (steel_type && !(steel_type in MATERIAL_CONSTANTS.COIL_WEIGHTS)) {\n errors.push(`Invalid steel type: ${steel_type}`);\n }\n \n // Validate tube type if provided\n if (tube_type && !['Round', 'Square', 'Rectangle'].includes(tube_type)) {\n errors.push(`Invalid tube type: ${tube_type}`);\n }\n \n return { isValid: errors.length === 0, errors };\n};\n\n/**\n * Get available steel types for form validation\n */\nexport const getAvailableSteelTypes = (): SteelType[] => {\n return Object.keys(MATERIAL_CONSTANTS.COIL_WEIGHTS) as SteelType[];\n};\n\n/**\n * Get available tube types for form validation\n */\nexport const getAvailableTubeTypes = (): TubeType[] => {\n return ['Round', 'Square', 'Rectangle'];\n};\n\nexport default {\n useMaterialCalculations,\n validateFormValues,\n getAvailableSteelTypes,\n getAvailableTubeTypes,\n MATERIAL_CONSTANTS,\n};\nexport type {\n BaseFormValues,\n MaterialCalculations,\n SteelType,\n TubeType,\n CalculationResult,\n};"],"names":["MATERIAL_CONSTANTS","STEEL_DENSITY","LENGTH_CONVERSION_FACTOR","TUBE_CALCULATION_FACTOR","COIL_WEIGHTS","GI","HR","safeParseNumber","value","isValid","error","parsed","parseFloat","trim","Number","isNaN","isFinite","validatePositiveNumbers","values","every","result","createMemoKey","formValues","map","field","join","Object","keys","useMemo","totalWidth","materialUnit","boardsWeight","steelWeight","materialWeight","totalWidthResult","face_width","bending","height","faceWidthResult","bendingResult","heightResult","r","calculateBoardsTotalWidth","materialUnitResult","steel_type","calculateMaterialUnit","boardsWeightResult","total_width","boards_thickness","boards_length","thicknessResult","lengthResult","calculateBoardsWeight","steelWeightResult","steel_length","steel_width","steel_thickness","widthResult","calculateSteelWeight","materialWeightResult","tube_type","tube_od","shape_width","shape_height","material_thickness","material_length","weight","odResult","Math","PI","max","calculateTubeMaterialWeight","define_process_env_default","NODE_ENV","filter","forEach","errors","push","includes","length"],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback } from "react";
|
|
2
2
|
import { useDispatch } from "react-redux";
|
|
3
3
|
import { usePages } from "../use-pages/index.esm.js";
|
|
4
|
-
const
|
|
4
|
+
const useDataFetcher = (cols, pagination, fetchAction, customeFilter = "", customDeps, showCreatedBy = true, customFields = []) => {
|
|
5
5
|
const { activePage } = usePages();
|
|
6
6
|
const dispatch = useDispatch();
|
|
7
7
|
const columns = Array.isArray(cols) ? cols : activePage == null ? void 0 : activePage.visible_columns;
|
|
@@ -54,6 +54,7 @@ const useGenericDataFetcher = (cols, pagination, fetchAction, customeFilter = ""
|
|
|
54
54
|
return fetchData;
|
|
55
55
|
};
|
|
56
56
|
export {
|
|
57
|
-
|
|
57
|
+
useDataFetcher as default,
|
|
58
|
+
useDataFetcher
|
|
58
59
|
};
|
|
59
60
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../../src/hooks/useDataFetcher.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { usePages } from './use-pages';\n\ninterface FilterParams {\n\tskip: number;\n\tlimit: number;\n\tsearch?: string;\n\tselect?: string;\n\torder?: string;\n\tfilters?: string;\n}\n\ninterface ActivePage {\n\tsort?: { id: string; desc: boolean };\n\tfilterQueryString?: string;\n\tsearch?: string;\n\tvisible_columns?: { visible: boolean; accessorKey: string }[];\n}\n\
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../src/hooks/useDataFetcher.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { usePages } from './use-pages';\n\ninterface FilterParams {\n\tskip: number;\n\tlimit: number;\n\tsearch?: string;\n\tselect?: string;\n\torder?: string;\n\tfilters?: string;\n}\n\ninterface ActivePage {\n\tsort?: { id: string; desc: boolean };\n\tfilterQueryString?: string;\n\tsearch?: string;\n\tvisible_columns?: { visible: boolean; accessorKey: string }[];\n}\n\nexport const useDataFetcher = (\n\tcols?: ActivePage,\n\tpagination: { skip: number; limit: number },\n\tfetchAction: (filters: FilterParams) => void,\n\tcustomeFilter: any = '',\n\tcustomDeps?: any[],\n\tshowCreatedBy: boolean = true,\n\tcustomFields?: any = []\n) => {\n\tconst { activePage } = usePages();\n\tconst dispatch = useDispatch();\n\tconst columns = Array.isArray(cols) ? cols : activePage?.visible_columns;\n\n\tconst getProcessedFilters = useCallback(() => {\n\t\tconst { filterQueryString } = activePage || {};\n\t\tconst queryString = filterQueryString?.replaceAll(/[()]/g, '') || '';\n\t\tconst extraQueryString = queryString.length ? `&${queryString}` : '';\n\t\tlet filters = customeFilter;\n\n\t\tif (extraQueryString) {\n\t\t\tfilters = filters\n\t\t\t\t? `(${filters}${extraQueryString})`\n\t\t\t\t: `(${extraQueryString})`;\n\t\t} else if (filters) {\n\t\t\tfilters = `(${filters})`;\n\t\t}\n\n\t\treturn filters || undefined;\n\t\t//eslint-disable-next-line\n\t}, [activePage.filterQueryString, customeFilter]);\n\n\tconst fetchData = useCallback(() => {\n\t\tconst { sort = null, search } = activePage;\n\t\tif (!Array.isArray(cols) && activePage?.visible_columns?.length == 0)\n\t\t\treturn;\n\t\tconst filters = getProcessedFilters();\n\t\tconst visibleColumns = columns?.filter((vc) => vc.visible);\n\n\t\tconst selectPayload =\n\t\t\tvisibleColumns?.length > 0\n\t\t\t\t? `[${visibleColumns?.map((item) =>\n\t\t\t\t\t\titem.accessorKey?.includes('.')\n\t\t\t\t\t\t\t? item.accessorKey.split('.')[0]\n\t\t\t\t\t\t\t: item.accessorKey\n\t\t\t\t\t)}${showCreatedBy ? ',created_at,created_by_data' : ''}${customFields?.length ? `,${customFields?.join(',')}` : ''}]`\n\t\t\t\t: undefined;\n\t\tconst payload: FilterParams = {\n\t\t\tskip: pagination.skip,\n\t\t\tlimit: pagination.limit,\n\t\t\tsearch,\n\t\t\tselect: selectPayload,\n\t\t\t...(sort && { order: `${sort.id}:${sort.desc ? -1 : 1}` }),\n\t\t\t...(filters && { filters })\n\t\t};\n\n\t\tdispatch(fetchAction(payload));\n\t\t//eslint-disable-next-line\n\t}, [\n\t\tcolumns,\n\t\tactivePage.sort,\n\t\tactivePage.filterQueryString,\n\t\tactivePage.search,\n\t\tpagination.skip,\n\t\t// activePage?.skip,\n\t\tpagination.limit,\n\t\tdispatch,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t...(customDeps || [])\n\t]);\n\n\treturn fetchData;\n};\n\nexport default useDataFetcher;\n"],"names":["_a"],"mappings":";;;AAoBO,MAAM,iBAAiB,CAC7B,MACA,YACA,aACA,gBAAqB,IACrB,YACA,gBAAyB,MACzB,eAAqB,CAAA,MACjB;AACJ,QAAM,EAAE,WAAA,IAAe,SAAA;AACvB,QAAM,WAAW,YAAA;AACjB,QAAM,UAAU,MAAM,QAAQ,IAAI,IAAI,OAAO,yCAAY;AAEzD,QAAM,sBAAsB,YAAY,MAAM;AAC7C,UAAM,EAAE,sBAAsB,cAAc,CAAA;AAC5C,UAAM,eAAc,uDAAmB,WAAW,SAAS,QAAO;AAClE,UAAM,mBAAmB,YAAY,SAAS,IAAI,WAAW,KAAK;AAClE,QAAI,UAAU;AAEd,QAAI,kBAAkB;AACrB,gBAAU,UACP,IAAI,OAAO,GAAG,gBAAgB,MAC9B,IAAI,gBAAgB;AAAA,IACxB,WAAW,SAAS;AACnB,gBAAU,IAAI,OAAO;AAAA,IACtB;AAEA,WAAO,WAAW;AAAA,EAEnB,GAAG,CAAC,WAAW,mBAAmB,aAAa,CAAC;AAEhD,QAAM,YAAY,YAAY,MAAM;;AACnC,UAAM,EAAE,OAAO,MAAM,OAAA,IAAW;AAChC,QAAI,CAAC,MAAM,QAAQ,IAAI,OAAK,8CAAY,oBAAZ,mBAA6B,WAAU;AAClE;AACD,UAAM,UAAU,oBAAA;AAChB,UAAM,iBAAiB,mCAAS,OAAO,CAAC,OAAO,GAAG;AAElD,UAAM,iBACL,iDAAgB,UAAS,IACtB,IAAI,iDAAgB;AAAA,MAAI,CAAC,SAAA;;AACzB,iBAAAA,MAAA,KAAK,gBAAL,gBAAAA,IAAkB,SAAS,QACxB,KAAK,YAAY,MAAM,GAAG,EAAE,CAAC,IAC7B,KAAK;AAAA;AAAA,KACR,GAAG,gBAAgB,gCAAgC,EAAE,IAAG,6CAAc,UAAS,IAAI,6CAAc,KAAK,IAAI,KAAK,EAAE,MACjH;AACJ,UAAM,UAAwB;AAAA,MAC7B,MAAM,WAAW;AAAA,MACjB,OAAO,WAAW;AAAA,MAClB;AAAA,MACA,QAAQ;AAAA,MACR,GAAI,QAAQ,EAAE,OAAO,GAAG,KAAK,EAAE,IAAI,KAAK,OAAO,KAAK,CAAC,GAAA;AAAA,MACrD,GAAI,WAAW,EAAE,QAAA;AAAA,IAAQ;AAG1B,aAAS,YAAY,OAAO,CAAC;AAAA,EAE9B,GAAG;AAAA,IACF;AAAA,IACA,WAAW;AAAA,IACX,WAAW;AAAA,IACX,WAAW;AAAA,IACX,WAAW;AAAA;AAAA,IAEX,WAAW;AAAA,IACX;AAAA;AAAA,IAEA,GAAI,cAAc,CAAA;AAAA,EAAC,CACnB;AAED,SAAO;AACR;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("react-redux"),l=require("../use-pages/index.js");
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("react-redux"),l=require("../use-pages/index.js");const i=(i,s,t,a="",u,n=!0,c=[])=>{const{activePage:o}=l.usePages(),d=r.useDispatch(),v=Array.isArray(i)?i:null==o?void 0:o.visible_columns,p=e.useCallback(()=>{const{filterQueryString:e}=o||{},r=(null==e?void 0:e.replaceAll(/[()]/g,""))||"",l=r.length?`&${r}`:"";let i=a;return l?i=i?`(${i}${l})`:`(${l})`:i&&(i=`(${i})`),i||void 0},[o.filterQueryString,a]);return e.useCallback(()=>{var e;const{sort:r=null,search:l}=o;if(!Array.isArray(i)&&0==(null==(e=null==o?void 0:o.visible_columns)?void 0:e.length))return;const a=p(),u=null==v?void 0:v.filter(e=>e.visible),y=(null==u?void 0:u.length)>0?`[${null==u?void 0:u.map(e=>{var r;return(null==(r=e.accessorKey)?void 0:r.includes("."))?e.accessorKey.split(".")[0]:e.accessorKey})}${n?",created_at,created_by_data":""}${(null==c?void 0:c.length)?`,${null==c?void 0:c.join(",")}`:""}]`:void 0,g={skip:s.skip,limit:s.limit,search:l,select:y,...r&&{order:`${r.id}:${r.desc?-1:1}`},...a&&{filters:a}};d(t(g))},[v,o.sort,o.filterQueryString,o.search,s.skip,s.limit,d,...u||[]])};exports.default=i,exports.useDataFetcher=i;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/hooks/useDataFetcher.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { usePages } from './use-pages';\n\ninterface FilterParams {\n\tskip: number;\n\tlimit: number;\n\tsearch?: string;\n\tselect?: string;\n\torder?: string;\n\tfilters?: string;\n}\n\ninterface ActivePage {\n\tsort?: { id: string; desc: boolean };\n\tfilterQueryString?: string;\n\tsearch?: string;\n\tvisible_columns?: { visible: boolean; accessorKey: string }[];\n}\n\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/hooks/useDataFetcher.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { usePages } from './use-pages';\n\ninterface FilterParams {\n\tskip: number;\n\tlimit: number;\n\tsearch?: string;\n\tselect?: string;\n\torder?: string;\n\tfilters?: string;\n}\n\ninterface ActivePage {\n\tsort?: { id: string; desc: boolean };\n\tfilterQueryString?: string;\n\tsearch?: string;\n\tvisible_columns?: { visible: boolean; accessorKey: string }[];\n}\n\nexport const useDataFetcher = (\n\tcols?: ActivePage,\n\tpagination: { skip: number; limit: number },\n\tfetchAction: (filters: FilterParams) => void,\n\tcustomeFilter: any = '',\n\tcustomDeps?: any[],\n\tshowCreatedBy: boolean = true,\n\tcustomFields?: any = []\n) => {\n\tconst { activePage } = usePages();\n\tconst dispatch = useDispatch();\n\tconst columns = Array.isArray(cols) ? cols : activePage?.visible_columns;\n\n\tconst getProcessedFilters = useCallback(() => {\n\t\tconst { filterQueryString } = activePage || {};\n\t\tconst queryString = filterQueryString?.replaceAll(/[()]/g, '') || '';\n\t\tconst extraQueryString = queryString.length ? `&${queryString}` : '';\n\t\tlet filters = customeFilter;\n\n\t\tif (extraQueryString) {\n\t\t\tfilters = filters\n\t\t\t\t? `(${filters}${extraQueryString})`\n\t\t\t\t: `(${extraQueryString})`;\n\t\t} else if (filters) {\n\t\t\tfilters = `(${filters})`;\n\t\t}\n\n\t\treturn filters || undefined;\n\t\t//eslint-disable-next-line\n\t}, [activePage.filterQueryString, customeFilter]);\n\n\tconst fetchData = useCallback(() => {\n\t\tconst { sort = null, search } = activePage;\n\t\tif (!Array.isArray(cols) && activePage?.visible_columns?.length == 0)\n\t\t\treturn;\n\t\tconst filters = getProcessedFilters();\n\t\tconst visibleColumns = columns?.filter((vc) => vc.visible);\n\n\t\tconst selectPayload =\n\t\t\tvisibleColumns?.length > 0\n\t\t\t\t? `[${visibleColumns?.map((item) =>\n\t\t\t\t\t\titem.accessorKey?.includes('.')\n\t\t\t\t\t\t\t? item.accessorKey.split('.')[0]\n\t\t\t\t\t\t\t: item.accessorKey\n\t\t\t\t\t)}${showCreatedBy ? ',created_at,created_by_data' : ''}${customFields?.length ? `,${customFields?.join(',')}` : ''}]`\n\t\t\t\t: undefined;\n\t\tconst payload: FilterParams = {\n\t\t\tskip: pagination.skip,\n\t\t\tlimit: pagination.limit,\n\t\t\tsearch,\n\t\t\tselect: selectPayload,\n\t\t\t...(sort && { order: `${sort.id}:${sort.desc ? -1 : 1}` }),\n\t\t\t...(filters && { filters })\n\t\t};\n\n\t\tdispatch(fetchAction(payload));\n\t\t//eslint-disable-next-line\n\t}, [\n\t\tcolumns,\n\t\tactivePage.sort,\n\t\tactivePage.filterQueryString,\n\t\tactivePage.search,\n\t\tpagination.skip,\n\t\t// activePage?.skip,\n\t\tpagination.limit,\n\t\tdispatch,\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t...(customDeps || [])\n\t]);\n\n\treturn fetchData;\n};\n\nexport default useDataFetcher;\n"],"names":["useDataFetcher","cols","pagination","fetchAction","customeFilter","customDeps","showCreatedBy","customFields","activePage","usePages","dispatch","useDispatch","columns","Array","isArray","visible_columns","getProcessedFilters","useCallback","filterQueryString","queryString","replaceAll","extraQueryString","length","filters","sort","search","_a","visibleColumns","filter","vc","visible","selectPayload","map","item","accessorKey","includes","split","join","payload","skip","limit","select","order","id","desc"],"mappings":"uJAoBO,MAAMA,EAAiB,CAC7BC,EACAC,EACAC,EACAC,EAAqB,GACrBC,EACAC,GAAyB,EACzBC,EAAqB,MAErB,MAAMC,WAAEA,GAAeC,aACjBC,EAAWC,EAAAA,cACXC,EAAUC,MAAMC,QAAQb,GAAQA,EAAO,MAAAO,OAAA,EAAAA,EAAYO,gBAEnDC,EAAsBC,EAAAA,YAAY,KACvC,MAAMC,kBAAEA,GAAsBV,GAAc,CAAA,EACtCW,GAAc,MAAAD,OAAA,EAAAA,EAAmBE,WAAW,QAAS,MAAO,GAC5DC,EAAmBF,EAAYG,OAAS,IAAIH,IAAgB,GAClE,IAAII,EAAUnB,EAUd,OARIiB,EACHE,EAAUA,EACP,IAAIA,IAAUF,KACd,IAAIA,KACGE,IACVA,EAAU,IAAIA,MAGRA,QAAW,GAEhB,CAACf,EAAWU,kBAAmBd,IAyClC,OAvCkBa,EAAAA,YAAY,WAC7B,MAAMO,KAAEA,EAAO,KAAAC,OAAMA,GAAWjB,EAChC,IAAKK,MAAMC,QAAQb,IAAgD,IAAvC,OAAAyB,EAAA,MAAAlB,OAAA,EAAAA,EAAYO,0BAAiBO,QACxD,OACD,MAAMC,EAAUP,IACVW,EAAiB,MAAAf,OAAA,EAAAA,EAASgB,OAAQC,GAAOA,EAAGC,SAE5CC,GACL,MAAAJ,OAAA,EAAAA,EAAgBL,QAAS,EACtB,IAAI,MAAAK,OAAA,EAAAA,EAAgBK,IAAKC,UACzB,OAAA,OAAAP,EAAAO,EAAKC,kBAAL,EAAAR,EAAkBS,SAAS,MACxBF,EAAKC,YAAYE,MAAM,KAAK,GAC5BH,EAAKC,gBACL5B,EAAgB,8BAAgC,MAAK,MAAAC,OAAA,EAAAA,EAAce,QAAS,IAAI,MAAAf,OAAA,EAAAA,EAAc8B,KAAK,OAAS,WAC/G,EACEC,EAAwB,CAC7BC,KAAMrC,EAAWqC,KACjBC,MAAOtC,EAAWsC,MAClBf,SACAgB,OAAQV,KACJP,GAAQ,CAAEkB,MAAO,GAAGlB,EAAKmB,MAAMnB,EAAKoB,MAAO,EAAK,QAChDrB,GAAW,CAAEA,YAGlBb,EAASP,EAAYmC,KAEnB,CACF1B,EACAJ,EAAWgB,KACXhB,EAAWU,kBACXV,EAAWiB,OACXvB,EAAWqC,KAEXrC,EAAWsC,MACX9B,KAEIL,GAAc"}
|
|
@@ -119,12 +119,7 @@ const useLanguageState = () => {
|
|
|
119
119
|
clearError
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
|
-
var useLanguageFallback$1 = {
|
|
123
|
-
useLanguageFallback,
|
|
124
|
-
useLanguageState
|
|
125
|
-
};
|
|
126
122
|
export {
|
|
127
|
-
useLanguageFallback$1 as default,
|
|
128
123
|
useLanguageFallback,
|
|
129
124
|
useLanguageState
|
|
130
125
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../../src/hooks/useLanguageFallback.ts"],"sourcesContent":["import { useState } from 'react';\nimport { DEFAULT_LANG } from '../constants/all-language';\n\ninterface ILanguage {\n label: string;\n code: string;\n direction: string;\n}\n\n// Configuration for fallback behavior\ninterface FallbackConfig {\n fallbackOrder?: string[];\n enableConsoleWarnings?: boolean;\n retryOnError?: boolean;\n maxRetries?: number;\n}\n\n// Updated fallback order with English first\nconst DEFAULT_FALLBACK_CONFIG: Required<FallbackConfig> = {\n fallbackOrder: ['en', 'en-US', DEFAULT_LANG], // English first\n enableConsoleWarnings: true,\n retryOnError: false,\n maxRetries: 3,\n};\n\nexport const useLanguageFallback = (config: FallbackConfig = {}) => {\n const finalConfig = { ...DEFAULT_FALLBACK_CONFIG, ...config };\n const [retryCount, setRetryCount] = useState(0);\n\n // Create English fallback language object\n const createEnglishFallback = (): ILanguage => ({\n code: 'en',\n label: 'English',\n direction: 'ltr'\n });\n\n // Find the best available language with fallback logic\n const findBestAvailableLanguage = (\n languages: ILanguage[], \n preferredCode?: string\n ): ILanguage | null => {\n if (!languages || languages.length === 0) {\n if (finalConfig.enableConsoleWarnings) {\n console.warn('No languages available for fallback selection, using English');\n }\n return createEnglishFallback();\n }\n\n // First try the preferred language if provided\n if (preferredCode) {\n const preferred = languages.find(lang => lang.code === preferredCode);\n if (preferred) return preferred;\n \n if (finalConfig.enableConsoleWarnings) {\n console.warn(`Preferred language \"${preferredCode}\" not found, trying fallbacks`);\n }\n }\n\n // Try fallback languages in order (English first)\n for (const fallbackCode of finalConfig.fallbackOrder) {\n const fallback = languages.find(lang => lang.code === fallbackCode);\n if (fallback) {\n if (finalConfig.enableConsoleWarnings && preferredCode && preferredCode !== fallbackCode) {\n console.warn(`Using fallback language: \"${fallbackCode}\" instead of \"${preferredCode}\"`);\n }\n return fallback;\n }\n }\n\n // If no fallbacks found, return English or first available language\n const englishLang = languages.find(lang => lang.code === 'en');\n if (englishLang) {\n if (finalConfig.enableConsoleWarnings) {\n console.warn('Using English as ultimate fallback');\n }\n return englishLang;\n }\n\n // Last resort - return first available language\n if (finalConfig.enableConsoleWarnings) {\n console.warn('No English fallback found, using first available language');\n }\n return languages[0] || createEnglishFallback();\n };\n\n // Create a fallback language object when API fails - always English\n const createEmergencyFallback = (): ILanguage => {\n return createEnglishFallback();\n };\n\n // Validate if a language code exists in the available languages\n const validateLanguageCode = (languages: ILanguage[], code: string): boolean => {\n return languages.some(lang => lang.code === code);\n };\n\n // Get saved language from localStorage with validation\n const getSavedLanguage = (languages: ILanguage[]): string | null => {\n const saved = localStorage.getItem('_language');\n if (!saved) return null;\n \n // Validate saved language exists in available languages\n if (validateLanguageCode(languages, saved)) {\n return saved;\n }\n \n if (finalConfig.enableConsoleWarnings) {\n console.warn(`Saved language \"${saved}\" is no longer available, will use English fallback`);\n }\n return null;\n };\n\n // Ensure English is always available in languages array\n const ensureEnglishAvailable = (languages: ILanguage[]): ILanguage[] => {\n const hasEnglish = languages.some(lang => lang.code === 'en');\n if (!hasEnglish) {\n return [createEnglishFallback(), ...languages];\n }\n return languages;\n };\n\n // Retry mechanism for failed language fetches\n const shouldRetry = (): boolean => {\n return finalConfig.retryOnError && retryCount < finalConfig.maxRetries;\n };\n\n const incrementRetry = () => {\n setRetryCount(prev => prev + 1);\n };\n\n const resetRetry = () => {\n setRetryCount(0);\n };\n\n return {\n findBestAvailableLanguage,\n createEmergencyFallback,\n createEnglishFallback,\n validateLanguageCode,\n getSavedLanguage,\n ensureEnglishAvailable,\n shouldRetry,\n incrementRetry,\n resetRetry,\n retryCount,\n config: finalConfig,\n };\n};\n\n// Additional utility hook for language state management\nexport const useLanguageState = () => {\n const [isInitialized, setIsInitialized] = useState(false);\n const [hasError, setHasError] = useState(false);\n const [errorMessage, setErrorMessage] = useState<string | null>(null);\n\n const markInitialized = () => setIsInitialized(true);\n const setError = (error: string) => {\n setHasError(true);\n setErrorMessage(error);\n };\n const clearError = () => {\n setHasError(false);\n setErrorMessage(null);\n };\n\n return {\n isInitialized,\n hasError,\n errorMessage,\n markInitialized,\n setError,\n clearError,\n };\n};\n\nexport default {\n useLanguageFallback,\n useLanguageState,\n};\n\nexport type { ILanguage, FallbackConfig };\n\n"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../src/hooks/useLanguageFallback.ts"],"sourcesContent":["import { useState } from 'react';\nimport { DEFAULT_LANG } from '../constants/all-language';\n\ninterface ILanguage {\n label: string;\n code: string;\n direction: string;\n}\n\n// Configuration for fallback behavior\ninterface FallbackConfig {\n fallbackOrder?: string[];\n enableConsoleWarnings?: boolean;\n retryOnError?: boolean;\n maxRetries?: number;\n}\n\n// Updated fallback order with English first\nconst DEFAULT_FALLBACK_CONFIG: Required<FallbackConfig> = {\n fallbackOrder: ['en', 'en-US', DEFAULT_LANG], // English first\n enableConsoleWarnings: true,\n retryOnError: false,\n maxRetries: 3,\n};\n\nexport const useLanguageFallback = (config: FallbackConfig = {}) => {\n const finalConfig = { ...DEFAULT_FALLBACK_CONFIG, ...config };\n const [retryCount, setRetryCount] = useState(0);\n\n // Create English fallback language object\n const createEnglishFallback = (): ILanguage => ({\n code: 'en',\n label: 'English',\n direction: 'ltr'\n });\n\n // Find the best available language with fallback logic\n const findBestAvailableLanguage = (\n languages: ILanguage[], \n preferredCode?: string\n ): ILanguage | null => {\n if (!languages || languages.length === 0) {\n if (finalConfig.enableConsoleWarnings) {\n console.warn('No languages available for fallback selection, using English');\n }\n return createEnglishFallback();\n }\n\n // First try the preferred language if provided\n if (preferredCode) {\n const preferred = languages.find(lang => lang.code === preferredCode);\n if (preferred) return preferred;\n \n if (finalConfig.enableConsoleWarnings) {\n console.warn(`Preferred language \"${preferredCode}\" not found, trying fallbacks`);\n }\n }\n\n // Try fallback languages in order (English first)\n for (const fallbackCode of finalConfig.fallbackOrder) {\n const fallback = languages.find(lang => lang.code === fallbackCode);\n if (fallback) {\n if (finalConfig.enableConsoleWarnings && preferredCode && preferredCode !== fallbackCode) {\n console.warn(`Using fallback language: \"${fallbackCode}\" instead of \"${preferredCode}\"`);\n }\n return fallback;\n }\n }\n\n // If no fallbacks found, return English or first available language\n const englishLang = languages.find(lang => lang.code === 'en');\n if (englishLang) {\n if (finalConfig.enableConsoleWarnings) {\n console.warn('Using English as ultimate fallback');\n }\n return englishLang;\n }\n\n // Last resort - return first available language\n if (finalConfig.enableConsoleWarnings) {\n console.warn('No English fallback found, using first available language');\n }\n return languages[0] || createEnglishFallback();\n };\n\n // Create a fallback language object when API fails - always English\n const createEmergencyFallback = (): ILanguage => {\n return createEnglishFallback();\n };\n\n // Validate if a language code exists in the available languages\n const validateLanguageCode = (languages: ILanguage[], code: string): boolean => {\n return languages.some(lang => lang.code === code);\n };\n\n // Get saved language from localStorage with validation\n const getSavedLanguage = (languages: ILanguage[]): string | null => {\n const saved = localStorage.getItem('_language');\n if (!saved) return null;\n \n // Validate saved language exists in available languages\n if (validateLanguageCode(languages, saved)) {\n return saved;\n }\n \n if (finalConfig.enableConsoleWarnings) {\n console.warn(`Saved language \"${saved}\" is no longer available, will use English fallback`);\n }\n return null;\n };\n\n // Ensure English is always available in languages array\n const ensureEnglishAvailable = (languages: ILanguage[]): ILanguage[] => {\n const hasEnglish = languages.some(lang => lang.code === 'en');\n if (!hasEnglish) {\n return [createEnglishFallback(), ...languages];\n }\n return languages;\n };\n\n // Retry mechanism for failed language fetches\n const shouldRetry = (): boolean => {\n return finalConfig.retryOnError && retryCount < finalConfig.maxRetries;\n };\n\n const incrementRetry = () => {\n setRetryCount(prev => prev + 1);\n };\n\n const resetRetry = () => {\n setRetryCount(0);\n };\n\n return {\n findBestAvailableLanguage,\n createEmergencyFallback,\n createEnglishFallback,\n validateLanguageCode,\n getSavedLanguage,\n ensureEnglishAvailable,\n shouldRetry,\n incrementRetry,\n resetRetry,\n retryCount,\n config: finalConfig,\n };\n};\n\n// Additional utility hook for language state management\nexport const useLanguageState = () => {\n const [isInitialized, setIsInitialized] = useState(false);\n const [hasError, setHasError] = useState(false);\n const [errorMessage, setErrorMessage] = useState<string | null>(null);\n\n const markInitialized = () => setIsInitialized(true);\n const setError = (error: string) => {\n setHasError(true);\n setErrorMessage(error);\n };\n const clearError = () => {\n setHasError(false);\n setErrorMessage(null);\n };\n\n return {\n isInitialized,\n hasError,\n errorMessage,\n markInitialized,\n setError,\n clearError,\n };\n};\n\nexport default {\n useLanguageFallback,\n useLanguageState,\n};\n\nexport type { ILanguage, FallbackConfig };\n\n"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");const n={fallbackOrder:["en","en-US",require("../../constants/all-language/index.js").DEFAULT_LANG],enableConsoleWarnings:!0,retryOnError:!1,maxRetries:3}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");const n={fallbackOrder:["en","en-US",require("../../constants/all-language/index.js").DEFAULT_LANG],enableConsoleWarnings:!0,retryOnError:!1,maxRetries:3};exports.useLanguageFallback=(r={})=>{const a={...n,...r},[l,t]=e.useState(0),o=(e,n)=>e.some(e=>e.code===n);return{findBestAvailableLanguage:(e,n)=>{if(!e||0===e.length)return a.enableConsoleWarnings,{code:"en",label:"English",direction:"ltr"};if(n){const r=e.find(e=>e.code===n);if(r)return r;a.enableConsoleWarnings}for(const l of a.fallbackOrder){const n=e.find(e=>e.code===l);if(n)return a.enableConsoleWarnings,n}const r=e.find(e=>"en"===e.code);return r?(a.enableConsoleWarnings,r):(a.enableConsoleWarnings,e[0]||{code:"en",label:"English",direction:"ltr"})},createEmergencyFallback:()=>({code:"en",label:"English",direction:"ltr"}),createEnglishFallback:()=>({code:"en",label:"English",direction:"ltr"}),validateLanguageCode:o,getSavedLanguage:e=>{const n=localStorage.getItem("_language");return n?o(e,n)?n:(a.enableConsoleWarnings,null):null},ensureEnglishAvailable:e=>e.some(e=>"en"===e.code)?e:[{code:"en",label:"English",direction:"ltr"},...e],shouldRetry:()=>a.retryOnError&&l<a.maxRetries,incrementRetry:()=>{t(e=>e+1)},resetRetry:()=>{t(0)},retryCount:l,config:a}},exports.useLanguageState=()=>{const[n,r]=e.useState(!1),[a,l]=e.useState(!1),[t,o]=e.useState(null);return{isInitialized:n,hasError:a,errorMessage:t,markInitialized:()=>r(!0),setError:e=>{l(!0),o(e)},clearError:()=>{l(!1),o(null)}}};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/hooks/useLanguageFallback.ts"],"sourcesContent":["import { useState } from 'react';\nimport { DEFAULT_LANG } from '../constants/all-language';\n\ninterface ILanguage {\n label: string;\n code: string;\n direction: string;\n}\n\n// Configuration for fallback behavior\ninterface FallbackConfig {\n fallbackOrder?: string[];\n enableConsoleWarnings?: boolean;\n retryOnError?: boolean;\n maxRetries?: number;\n}\n\n// Updated fallback order with English first\nconst DEFAULT_FALLBACK_CONFIG: Required<FallbackConfig> = {\n fallbackOrder: ['en', 'en-US', DEFAULT_LANG], // English first\n enableConsoleWarnings: true,\n retryOnError: false,\n maxRetries: 3,\n};\n\nexport const useLanguageFallback = (config: FallbackConfig = {}) => {\n const finalConfig = { ...DEFAULT_FALLBACK_CONFIG, ...config };\n const [retryCount, setRetryCount] = useState(0);\n\n // Create English fallback language object\n const createEnglishFallback = (): ILanguage => ({\n code: 'en',\n label: 'English',\n direction: 'ltr'\n });\n\n // Find the best available language with fallback logic\n const findBestAvailableLanguage = (\n languages: ILanguage[], \n preferredCode?: string\n ): ILanguage | null => {\n if (!languages || languages.length === 0) {\n if (finalConfig.enableConsoleWarnings) {\n console.warn('No languages available for fallback selection, using English');\n }\n return createEnglishFallback();\n }\n\n // First try the preferred language if provided\n if (preferredCode) {\n const preferred = languages.find(lang => lang.code === preferredCode);\n if (preferred) return preferred;\n \n if (finalConfig.enableConsoleWarnings) {\n console.warn(`Preferred language \"${preferredCode}\" not found, trying fallbacks`);\n }\n }\n\n // Try fallback languages in order (English first)\n for (const fallbackCode of finalConfig.fallbackOrder) {\n const fallback = languages.find(lang => lang.code === fallbackCode);\n if (fallback) {\n if (finalConfig.enableConsoleWarnings && preferredCode && preferredCode !== fallbackCode) {\n console.warn(`Using fallback language: \"${fallbackCode}\" instead of \"${preferredCode}\"`);\n }\n return fallback;\n }\n }\n\n // If no fallbacks found, return English or first available language\n const englishLang = languages.find(lang => lang.code === 'en');\n if (englishLang) {\n if (finalConfig.enableConsoleWarnings) {\n console.warn('Using English as ultimate fallback');\n }\n return englishLang;\n }\n\n // Last resort - return first available language\n if (finalConfig.enableConsoleWarnings) {\n console.warn('No English fallback found, using first available language');\n }\n return languages[0] || createEnglishFallback();\n };\n\n // Create a fallback language object when API fails - always English\n const createEmergencyFallback = (): ILanguage => {\n return createEnglishFallback();\n };\n\n // Validate if a language code exists in the available languages\n const validateLanguageCode = (languages: ILanguage[], code: string): boolean => {\n return languages.some(lang => lang.code === code);\n };\n\n // Get saved language from localStorage with validation\n const getSavedLanguage = (languages: ILanguage[]): string | null => {\n const saved = localStorage.getItem('_language');\n if (!saved) return null;\n \n // Validate saved language exists in available languages\n if (validateLanguageCode(languages, saved)) {\n return saved;\n }\n \n if (finalConfig.enableConsoleWarnings) {\n console.warn(`Saved language \"${saved}\" is no longer available, will use English fallback`);\n }\n return null;\n };\n\n // Ensure English is always available in languages array\n const ensureEnglishAvailable = (languages: ILanguage[]): ILanguage[] => {\n const hasEnglish = languages.some(lang => lang.code === 'en');\n if (!hasEnglish) {\n return [createEnglishFallback(), ...languages];\n }\n return languages;\n };\n\n // Retry mechanism for failed language fetches\n const shouldRetry = (): boolean => {\n return finalConfig.retryOnError && retryCount < finalConfig.maxRetries;\n };\n\n const incrementRetry = () => {\n setRetryCount(prev => prev + 1);\n };\n\n const resetRetry = () => {\n setRetryCount(0);\n };\n\n return {\n findBestAvailableLanguage,\n createEmergencyFallback,\n createEnglishFallback,\n validateLanguageCode,\n getSavedLanguage,\n ensureEnglishAvailable,\n shouldRetry,\n incrementRetry,\n resetRetry,\n retryCount,\n config: finalConfig,\n };\n};\n\n// Additional utility hook for language state management\nexport const useLanguageState = () => {\n const [isInitialized, setIsInitialized] = useState(false);\n const [hasError, setHasError] = useState(false);\n const [errorMessage, setErrorMessage] = useState<string | null>(null);\n\n const markInitialized = () => setIsInitialized(true);\n const setError = (error: string) => {\n setHasError(true);\n setErrorMessage(error);\n };\n const clearError = () => {\n setHasError(false);\n setErrorMessage(null);\n };\n\n return {\n isInitialized,\n hasError,\n errorMessage,\n markInitialized,\n setError,\n clearError,\n };\n};\n\nexport default {\n useLanguageFallback,\n useLanguageState,\n};\n\nexport type { ILanguage, FallbackConfig };\n\n"],"names":["DEFAULT_FALLBACK_CONFIG","fallbackOrder","enableConsoleWarnings","retryOnError","maxRetries","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/hooks/useLanguageFallback.ts"],"sourcesContent":["import { useState } from 'react';\nimport { DEFAULT_LANG } from '../constants/all-language';\n\ninterface ILanguage {\n label: string;\n code: string;\n direction: string;\n}\n\n// Configuration for fallback behavior\ninterface FallbackConfig {\n fallbackOrder?: string[];\n enableConsoleWarnings?: boolean;\n retryOnError?: boolean;\n maxRetries?: number;\n}\n\n// Updated fallback order with English first\nconst DEFAULT_FALLBACK_CONFIG: Required<FallbackConfig> = {\n fallbackOrder: ['en', 'en-US', DEFAULT_LANG], // English first\n enableConsoleWarnings: true,\n retryOnError: false,\n maxRetries: 3,\n};\n\nexport const useLanguageFallback = (config: FallbackConfig = {}) => {\n const finalConfig = { ...DEFAULT_FALLBACK_CONFIG, ...config };\n const [retryCount, setRetryCount] = useState(0);\n\n // Create English fallback language object\n const createEnglishFallback = (): ILanguage => ({\n code: 'en',\n label: 'English',\n direction: 'ltr'\n });\n\n // Find the best available language with fallback logic\n const findBestAvailableLanguage = (\n languages: ILanguage[], \n preferredCode?: string\n ): ILanguage | null => {\n if (!languages || languages.length === 0) {\n if (finalConfig.enableConsoleWarnings) {\n console.warn('No languages available for fallback selection, using English');\n }\n return createEnglishFallback();\n }\n\n // First try the preferred language if provided\n if (preferredCode) {\n const preferred = languages.find(lang => lang.code === preferredCode);\n if (preferred) return preferred;\n \n if (finalConfig.enableConsoleWarnings) {\n console.warn(`Preferred language \"${preferredCode}\" not found, trying fallbacks`);\n }\n }\n\n // Try fallback languages in order (English first)\n for (const fallbackCode of finalConfig.fallbackOrder) {\n const fallback = languages.find(lang => lang.code === fallbackCode);\n if (fallback) {\n if (finalConfig.enableConsoleWarnings && preferredCode && preferredCode !== fallbackCode) {\n console.warn(`Using fallback language: \"${fallbackCode}\" instead of \"${preferredCode}\"`);\n }\n return fallback;\n }\n }\n\n // If no fallbacks found, return English or first available language\n const englishLang = languages.find(lang => lang.code === 'en');\n if (englishLang) {\n if (finalConfig.enableConsoleWarnings) {\n console.warn('Using English as ultimate fallback');\n }\n return englishLang;\n }\n\n // Last resort - return first available language\n if (finalConfig.enableConsoleWarnings) {\n console.warn('No English fallback found, using first available language');\n }\n return languages[0] || createEnglishFallback();\n };\n\n // Create a fallback language object when API fails - always English\n const createEmergencyFallback = (): ILanguage => {\n return createEnglishFallback();\n };\n\n // Validate if a language code exists in the available languages\n const validateLanguageCode = (languages: ILanguage[], code: string): boolean => {\n return languages.some(lang => lang.code === code);\n };\n\n // Get saved language from localStorage with validation\n const getSavedLanguage = (languages: ILanguage[]): string | null => {\n const saved = localStorage.getItem('_language');\n if (!saved) return null;\n \n // Validate saved language exists in available languages\n if (validateLanguageCode(languages, saved)) {\n return saved;\n }\n \n if (finalConfig.enableConsoleWarnings) {\n console.warn(`Saved language \"${saved}\" is no longer available, will use English fallback`);\n }\n return null;\n };\n\n // Ensure English is always available in languages array\n const ensureEnglishAvailable = (languages: ILanguage[]): ILanguage[] => {\n const hasEnglish = languages.some(lang => lang.code === 'en');\n if (!hasEnglish) {\n return [createEnglishFallback(), ...languages];\n }\n return languages;\n };\n\n // Retry mechanism for failed language fetches\n const shouldRetry = (): boolean => {\n return finalConfig.retryOnError && retryCount < finalConfig.maxRetries;\n };\n\n const incrementRetry = () => {\n setRetryCount(prev => prev + 1);\n };\n\n const resetRetry = () => {\n setRetryCount(0);\n };\n\n return {\n findBestAvailableLanguage,\n createEmergencyFallback,\n createEnglishFallback,\n validateLanguageCode,\n getSavedLanguage,\n ensureEnglishAvailable,\n shouldRetry,\n incrementRetry,\n resetRetry,\n retryCount,\n config: finalConfig,\n };\n};\n\n// Additional utility hook for language state management\nexport const useLanguageState = () => {\n const [isInitialized, setIsInitialized] = useState(false);\n const [hasError, setHasError] = useState(false);\n const [errorMessage, setErrorMessage] = useState<string | null>(null);\n\n const markInitialized = () => setIsInitialized(true);\n const setError = (error: string) => {\n setHasError(true);\n setErrorMessage(error);\n };\n const clearError = () => {\n setHasError(false);\n setErrorMessage(null);\n };\n\n return {\n isInitialized,\n hasError,\n errorMessage,\n markInitialized,\n setError,\n clearError,\n };\n};\n\nexport default {\n useLanguageFallback,\n useLanguageState,\n};\n\nexport type { ILanguage, FallbackConfig };\n\n"],"names":["DEFAULT_FALLBACK_CONFIG","fallbackOrder","enableConsoleWarnings","retryOnError","maxRetries","config","finalConfig","retryCount","setRetryCount","useState","validateLanguageCode","languages","code","some","lang","findBestAvailableLanguage","preferredCode","length","label","direction","preferred","find","fallbackCode","fallback","englishLang","createEmergencyFallback","createEnglishFallback","getSavedLanguage","saved","localStorage","getItem","ensureEnglishAvailable","shouldRetry","incrementRetry","prev","resetRetry","isInitialized","setIsInitialized","hasError","setHasError","errorMessage","setErrorMessage","markInitialized","setError","error","clearError"],"mappings":"2FAkBA,MAAMA,EAAoD,CACxDC,cAAe,CAAC,KAAM,uEACtBC,uBAAuB,EACvBC,cAAc,EACdC,WAAY,+BAGqB,CAACC,EAAyB,MAC3D,MAAMC,EAAc,IAAKN,KAA4BK,IAC9CE,EAAYC,GAAiBC,EAAAA,SAAS,GAgEvCC,EAAuB,CAACC,EAAwBC,IAC7CD,EAAUE,KAAKC,GAAQA,EAAKF,OAASA,GAyC9C,MAAO,CACLG,0BAjGgC,CAChCJ,EACAK,KAEA,IAAKL,GAAkC,IAArBA,EAAUM,OAI1B,OAHIX,EAAYJ,sBAZU,CAC5BU,KAAM,KACNM,MAAO,UACPC,UAAW,OAgBX,GAAIH,EAAe,CACjB,MAAMI,EAAYT,EAAUU,KAAKP,GAAQA,EAAKF,OAASI,GACvD,GAAII,EAAW,OAAOA,EAElBd,EAAYJ,qBAGlB,CAGA,IAAA,MAAWoB,KAAgBhB,EAAYL,cAAe,CACpD,MAAMsB,EAAWZ,EAAUU,KAAKP,GAAQA,EAAKF,OAASU,GACtD,GAAIC,EAIF,OAHIjB,EAAYJ,sBAGTqB,CAEX,CAGA,MAAMC,EAAcb,EAAUU,KAAKP,GAAsB,OAAdA,EAAKF,MAChD,OAAIY,GACElB,EAAYJ,sBAGTsB,IAILlB,EAAYJ,sBAGTS,EAAU,IApDW,CAC5BC,KAAM,KACNM,MAAO,UACPC,UAAW,SAsGXM,wBAjD8B,KAxDF,CAC5Bb,KAAM,KACNM,MAAO,UACPC,UAAW,QAuGXO,sBA1G4B,KAAA,CAC5Bd,KAAM,KACNM,MAAO,UACPC,UAAW,QAwGXT,uBACAiB,iBA1CwBhB,IACxB,MAAMiB,EAAQC,aAAaC,QAAQ,aACnC,OAAKF,EAGDlB,EAAqBC,EAAWiB,GAC3BA,GAGLtB,EAAYJ,sBAGT,MAVY,MAyCnB6B,uBA3B8BpB,GACXA,EAAUE,KAAKC,GAAsB,OAAdA,EAAKF,MAIxCD,EAFE,CArFmB,CAC5BC,KAAM,KACNM,MAAO,UACPC,UAAW,UAkF2BR,GAyBtCqB,YAnBkB,IACX1B,EAAYH,cAAgBI,EAAaD,EAAYF,WAmB5D6B,eAhBqB,KACrBzB,EAAc0B,GAAQA,EAAO,IAgB7BC,WAbiB,KACjB3B,EAAc,IAadD,aACAF,OAAQC,6BAKoB,KAC9B,MAAO8B,EAAeC,GAAoB5B,EAAAA,UAAS,IAC5C6B,EAAUC,GAAe9B,EAAAA,UAAS,IAClC+B,EAAcC,GAAmBhC,EAAAA,SAAwB,MAYhE,MAAO,CACL2B,gBACAE,WACAE,eACAE,gBAdsB,IAAML,GAAiB,GAe7CM,SAdgBC,IAChBL,GAAY,GACZE,EAAgBG,IAahBC,WAXiB,KACjBN,GAAY,GACZE,EAAgB"}
|
|
@@ -38,12 +38,7 @@ const useMultipleLocationFilters = ({
|
|
|
38
38
|
};
|
|
39
39
|
}, [selectedCompany, setValue, fieldConfigs, resetValue, filterKey]);
|
|
40
40
|
};
|
|
41
|
-
var useLocationFilter$1 = {
|
|
42
|
-
useLocationFilter,
|
|
43
|
-
useMultipleLocationFilters
|
|
44
|
-
};
|
|
45
41
|
export {
|
|
46
|
-
useLocationFilter$1 as default,
|
|
47
42
|
useLocationFilter,
|
|
48
43
|
useMultipleLocationFilters
|
|
49
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../../src/hooks/useLocationFilter.tsx"],"sourcesContent":["import { useMemo } from 'react';\n\n\nexport const useLocationFilter = ({\n selectedCompany,\n setValue,\n fieldArrayName,\n locationFieldName,\n resetValue = null,\n filterKey = '&company_id.in',\n isDirty = false\n}) => {\n const locationFilter = useMemo(() => {\n const companyId = Array.isArray(selectedCompany) ? (selectedCompany?.length ? selectedCompany: 0) : (selectedCompany || 0);\n \n // Reset location value when company changes\n if (setValue && fieldArrayName && locationFieldName && isDirty) {\n setValue(`${fieldArrayName}.${locationFieldName}`, resetValue);\n }\n \n return {\n [filterKey]: companyId\n };\n }, [selectedCompany, setValue, fieldArrayName, locationFieldName, resetValue, filterKey,isDirty]);\n\n return locationFilter;\n};\n\n\nexport const useMultipleLocationFilters = ({\n selectedCompany,\n setValue,\n fieldConfigs,\n resetValue = undefined,\n filterKey = '&company_id.in'\n}) => {\n return useMemo(() => {\n const companyId = selectedCompany?.length > 0 ? selectedCompany : 0;\n \n // Reset all location fields\n fieldConfigs.forEach(({ fieldArrayName, locationFieldName }) => {\n if (setValue && fieldArrayName && locationFieldName) {\n setValue(`${fieldArrayName}.${locationFieldName}`, resetValue);\n }\n });\n \n return {\n [filterKey]: companyId\n };\n }, [selectedCompany, setValue, fieldConfigs, resetValue, filterKey]);\n};\n\nexport default {\n useLocationFilter,\n useMultipleLocationFilters\n}"],"names":[],"mappings":";AAGO,MAAM,oBAAoB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,UAAU;AACd,MAAM;AACF,QAAM,iBAAiB,QAAQ,MAAM;AACjC,UAAM,YAAY,MAAM,QAAQ,eAAe,KAAK,mDAAiB,UAAS,kBAAiB,IAAM,mBAAmB;AAGxH,QAAI,YAAY,kBAAkB,qBAAqB,SAAS;AAC5D,eAAS,GAAG,cAAc,IAAI,iBAAiB,IAAI,UAAU;AAAA,IACjE;AAEA,WAAO;AAAA,MACH,CAAC,SAAS,GAAG;AAAA,IAAA;AAAA,EAErB,GAAG,CAAC,iBAAiB,UAAU,gBAAgB,mBAAmB,YAAY,WAAU,OAAO,CAAC;AAEhG,SAAO;AACX;AAGO,MAAM,6BAA6B,CAAC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,YAAY;AAChB,MAAM;AACF,SAAO,QAAQ,MAAM;AACjB,UAAM,aAAY,mDAAiB,UAAS,IAAI,kBAAkB;AAGlE,iBAAa,QAAQ,CAAC,EAAE,gBAAgB,wBAAwB;AAC5D,UAAI,YAAY,kBAAkB,mBAAmB;AACjD,iBAAS,GAAG,cAAc,IAAI,iBAAiB,IAAI,UAAU;AAAA,MACjE;AAAA,IACJ,CAAC;AAED,WAAO;AAAA,MACH,CAAC,SAAS,GAAG;AAAA,IAAA;AAAA,EAErB,GAAG,CAAC,iBAAiB,UAAU,cAAc,YAAY,SAAS,CAAC;AACvE;
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../src/hooks/useLocationFilter.tsx"],"sourcesContent":["import { useMemo } from 'react';\n\n\nexport const useLocationFilter = ({\n selectedCompany,\n setValue,\n fieldArrayName,\n locationFieldName,\n resetValue = null,\n filterKey = '&company_id.in',\n isDirty = false\n}) => {\n const locationFilter = useMemo(() => {\n const companyId = Array.isArray(selectedCompany) ? (selectedCompany?.length ? selectedCompany: 0) : (selectedCompany || 0);\n \n // Reset location value when company changes\n if (setValue && fieldArrayName && locationFieldName && isDirty) {\n setValue(`${fieldArrayName}.${locationFieldName}`, resetValue);\n }\n \n return {\n [filterKey]: companyId\n };\n }, [selectedCompany, setValue, fieldArrayName, locationFieldName, resetValue, filterKey,isDirty]);\n\n return locationFilter;\n};\n\n\nexport const useMultipleLocationFilters = ({\n selectedCompany,\n setValue,\n fieldConfigs,\n resetValue = undefined,\n filterKey = '&company_id.in'\n}) => {\n return useMemo(() => {\n const companyId = selectedCompany?.length > 0 ? selectedCompany : 0;\n \n // Reset all location fields\n fieldConfigs.forEach(({ fieldArrayName, locationFieldName }) => {\n if (setValue && fieldArrayName && locationFieldName) {\n setValue(`${fieldArrayName}.${locationFieldName}`, resetValue);\n }\n });\n \n return {\n [filterKey]: companyId\n };\n }, [selectedCompany, setValue, fieldConfigs, resetValue, filterKey]);\n};\n\nexport default {\n useLocationFilter,\n useMultipleLocationFilters\n}"],"names":[],"mappings":";AAGO,MAAM,oBAAoB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,UAAU;AACd,MAAM;AACF,QAAM,iBAAiB,QAAQ,MAAM;AACjC,UAAM,YAAY,MAAM,QAAQ,eAAe,KAAK,mDAAiB,UAAS,kBAAiB,IAAM,mBAAmB;AAGxH,QAAI,YAAY,kBAAkB,qBAAqB,SAAS;AAC5D,eAAS,GAAG,cAAc,IAAI,iBAAiB,IAAI,UAAU;AAAA,IACjE;AAEA,WAAO;AAAA,MACH,CAAC,SAAS,GAAG;AAAA,IAAA;AAAA,EAErB,GAAG,CAAC,iBAAiB,UAAU,gBAAgB,mBAAmB,YAAY,WAAU,OAAO,CAAC;AAEhG,SAAO;AACX;AAGO,MAAM,6BAA6B,CAAC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,YAAY;AAChB,MAAM;AACF,SAAO,QAAQ,MAAM;AACjB,UAAM,aAAY,mDAAiB,UAAS,IAAI,kBAAkB;AAGlE,iBAAa,QAAQ,CAAC,EAAE,gBAAgB,wBAAwB;AAC5D,UAAI,YAAY,kBAAkB,mBAAmB;AACjD,iBAAS,GAAG,cAAc,IAAI,iBAAiB,IAAI,UAAU;AAAA,MACjE;AAAA,IACJ,CAAC;AAED,WAAO;AAAA,MACH,CAAC,SAAS,GAAG;AAAA,IAAA;AAAA,EAErB,GAAG,CAAC,iBAAiB,UAAU,cAAc,YAAY,SAAS,CAAC;AACvE;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useLocationFilter=({selectedCompany:r,setValue:t,fieldArrayName:l,locationFieldName:i,resetValue:o=null,filterKey:a="&company_id.in",isDirty:s=!1})=>e.useMemo(()=>{const e=Array.isArray(r)?(null==r?void 0:r.length)?r:0:r||0;return t&&l&&i&&s&&t(`${l}.${i}`,o),{[a]:e}},[r,t,l,i,o,a,s]),exports.useMultipleLocationFilters=({selectedCompany:r,setValue:t,fieldConfigs:l,resetValue:i,filterKey:o="&company_id.in"})=>e.useMemo(()=>{const e=(null==r?void 0:r.length)>0?r:0;return l.forEach(({fieldArrayName:e,locationFieldName:r})=>{t&&e&&r&&t(`${e}.${r}`,i)}),{[o]:e}},[r,t,l,i,o]);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/hooks/useLocationFilter.tsx"],"sourcesContent":["import { useMemo } from 'react';\n\n\nexport const useLocationFilter = ({\n selectedCompany,\n setValue,\n fieldArrayName,\n locationFieldName,\n resetValue = null,\n filterKey = '&company_id.in',\n isDirty = false\n}) => {\n const locationFilter = useMemo(() => {\n const companyId = Array.isArray(selectedCompany) ? (selectedCompany?.length ? selectedCompany: 0) : (selectedCompany || 0);\n \n // Reset location value when company changes\n if (setValue && fieldArrayName && locationFieldName && isDirty) {\n setValue(`${fieldArrayName}.${locationFieldName}`, resetValue);\n }\n \n return {\n [filterKey]: companyId\n };\n }, [selectedCompany, setValue, fieldArrayName, locationFieldName, resetValue, filterKey,isDirty]);\n\n return locationFilter;\n};\n\n\nexport const useMultipleLocationFilters = ({\n selectedCompany,\n setValue,\n fieldConfigs,\n resetValue = undefined,\n filterKey = '&company_id.in'\n}) => {\n return useMemo(() => {\n const companyId = selectedCompany?.length > 0 ? selectedCompany : 0;\n \n // Reset all location fields\n fieldConfigs.forEach(({ fieldArrayName, locationFieldName }) => {\n if (setValue && fieldArrayName && locationFieldName) {\n setValue(`${fieldArrayName}.${locationFieldName}`, resetValue);\n }\n });\n \n return {\n [filterKey]: companyId\n };\n }, [selectedCompany, setValue, fieldConfigs, resetValue, filterKey]);\n};\n\nexport default {\n useLocationFilter,\n useMultipleLocationFilters\n}"],"names":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/hooks/useLocationFilter.tsx"],"sourcesContent":["import { useMemo } from 'react';\n\n\nexport const useLocationFilter = ({\n selectedCompany,\n setValue,\n fieldArrayName,\n locationFieldName,\n resetValue = null,\n filterKey = '&company_id.in',\n isDirty = false\n}) => {\n const locationFilter = useMemo(() => {\n const companyId = Array.isArray(selectedCompany) ? (selectedCompany?.length ? selectedCompany: 0) : (selectedCompany || 0);\n \n // Reset location value when company changes\n if (setValue && fieldArrayName && locationFieldName && isDirty) {\n setValue(`${fieldArrayName}.${locationFieldName}`, resetValue);\n }\n \n return {\n [filterKey]: companyId\n };\n }, [selectedCompany, setValue, fieldArrayName, locationFieldName, resetValue, filterKey,isDirty]);\n\n return locationFilter;\n};\n\n\nexport const useMultipleLocationFilters = ({\n selectedCompany,\n setValue,\n fieldConfigs,\n resetValue = undefined,\n filterKey = '&company_id.in'\n}) => {\n return useMemo(() => {\n const companyId = selectedCompany?.length > 0 ? selectedCompany : 0;\n \n // Reset all location fields\n fieldConfigs.forEach(({ fieldArrayName, locationFieldName }) => {\n if (setValue && fieldArrayName && locationFieldName) {\n setValue(`${fieldArrayName}.${locationFieldName}`, resetValue);\n }\n });\n \n return {\n [filterKey]: companyId\n };\n }, [selectedCompany, setValue, fieldConfigs, resetValue, filterKey]);\n};\n\nexport default {\n useLocationFilter,\n useMultipleLocationFilters\n}"],"names":["selectedCompany","setValue","fieldArrayName","locationFieldName","resetValue","filterKey","isDirty","useMemo","companyId","Array","isArray","length","fieldConfigs","forEach"],"mappings":"qHAGiC,EAC7BA,kBACAC,WACAC,iBACAC,oBACAC,aAAa,KACbC,YAAY,iBACZC,WAAU,KAEaC,EAAAA,QAAQ,KAC3B,MAAMC,EAAYC,MAAMC,QAAQV,IAAoB,MAAAA,OAAA,EAAAA,EAAiBW,QAASX,EAAiB,EAAMA,GAAmB,EAOxH,OAJIC,GAAYC,GAAkBC,GAAqBG,GACnDL,EAAS,GAAGC,KAAkBC,IAAqBC,GAGhD,CACHC,CAACA,GAAYG,IAElB,CAACR,EAAiBC,EAAUC,EAAgBC,EAAmBC,EAAYC,EAAUC,uCAMlD,EACtCN,kBACAC,WACAW,eACAR,aACAC,YAAY,oBAELE,EAAAA,QAAQ,KACX,MAAMC,GAAY,MAAAR,OAAA,EAAAA,EAAiBW,QAAS,EAAIX,EAAkB,EASlE,OANAY,EAAaC,QAAQ,EAAGX,iBAAgBC,wBAChCF,GAAYC,GAAkBC,GAC9BF,EAAS,GAAGC,KAAkBC,IAAqBC,KAIpD,CACHC,CAACA,GAAYG,IAElB,CAACR,EAAiBC,EAAUW,EAAcR,EAAYC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useERPUI } from "../../components/providers/ERPUIProvider/index.esm.js";
|
|
2
|
+
const useReduxIntegration = () => {
|
|
3
|
+
const { useRedux, apiClient } = useERPUI();
|
|
4
|
+
const useConditionalRedux = (reduxHook, fallbackValue) => {
|
|
5
|
+
if (!useRedux) {
|
|
6
|
+
return fallbackValue;
|
|
7
|
+
}
|
|
8
|
+
try {
|
|
9
|
+
return reduxHook();
|
|
10
|
+
} catch (error) {
|
|
11
|
+
console.warn("Redux hook failed, falling back to default value:", error);
|
|
12
|
+
return fallbackValue;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const conditionalDispatch = (action) => {
|
|
16
|
+
if (!useRedux) {
|
|
17
|
+
console.warn("Redux not enabled, cannot dispatch action:", action);
|
|
18
|
+
return Promise.resolve();
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const { useAppDispatch } = require("../redux/hooks");
|
|
22
|
+
const dispatch = useAppDispatch();
|
|
23
|
+
return dispatch(action);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.error("Failed to dispatch Redux action:", error);
|
|
26
|
+
return Promise.reject(error);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
useRedux,
|
|
31
|
+
apiClient,
|
|
32
|
+
useConditionalRedux,
|
|
33
|
+
conditionalDispatch
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
useReduxIntegration
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../src/hooks/useReduxIntegration.ts"],"sourcesContent":["import { useERPUI } from '../components/providers/ERPUIProvider';\n\n/**\n * Hook to determine Redux integration status and provide conditional Redux usage\n */\nexport const useReduxIntegration = () => {\n const { useRedux, apiClient } = useERPUI();\n \n // Helper function to conditionally use Redux hooks\n const useConditionalRedux = <T>(\n reduxHook: () => T,\n fallbackValue: T\n ): T => {\n if (!useRedux) {\n return fallbackValue;\n }\n \n try {\n return reduxHook();\n } catch (error) {\n console.warn('Redux hook failed, falling back to default value:', error);\n return fallbackValue;\n }\n };\n \n // Helper function to conditionally dispatch Redux actions\n const conditionalDispatch = (action: any) => {\n if (!useRedux) {\n console.warn('Redux not enabled, cannot dispatch action:', action);\n return Promise.resolve();\n }\n \n try {\n const { useAppDispatch } = require('../redux/hooks');\n const dispatch = useAppDispatch();\n return dispatch(action);\n } catch (error) {\n console.error('Failed to dispatch Redux action:', error);\n return Promise.reject(error);\n }\n };\n \n return {\n useRedux,\n apiClient,\n useConditionalRedux,\n conditionalDispatch,\n };\n};"],"names":[],"mappings":";AAKO,MAAM,sBAAsB,MAAM;AACvC,QAAM,EAAE,UAAU,UAAA,IAAc,SAAA;AAGhC,QAAM,sBAAsB,CAC1B,WACA,kBACM;AACN,QAAI,CAAC,UAAU;AACb,aAAO;AAAA,IACT;AAEA,QAAI;AACF,aAAO,UAAA;AAAA,IACT,SAAS,OAAO;AACd,cAAQ,KAAK,qDAAqD,KAAK;AACvE,aAAO;AAAA,IACT;AAAA,EACF;AAGA,QAAM,sBAAsB,CAAC,WAAgB;AAC3C,QAAI,CAAC,UAAU;AACb,cAAQ,KAAK,8CAA8C,MAAM;AACjE,aAAO,QAAQ,QAAA;AAAA,IACjB;AAEA,QAAI;AACF,YAAM,EAAE,eAAA,IAAmB,QAAQ,gBAAgB;AACnD,YAAM,WAAW,eAAA;AACjB,aAAO,SAAS,MAAM;AAAA,IACxB,SAAS,OAAO;AACd,cAAQ,MAAM,oCAAoC,KAAK;AACvD,aAAO,QAAQ,OAAO,KAAK;AAAA,IAC7B;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../components/providers/ERPUIProvider/index.js");exports.useReduxIntegration=()=>{const{useRedux:r,apiClient:t}=e.useERPUI();return{useRedux:r,apiClient:t,useConditionalRedux:(e,t)=>{if(!r)return t;try{return e()}catch(u){return t}},conditionalDispatch:e=>{if(!r)return Promise.resolve();try{const{useAppDispatch:r}=require("../redux/hooks");return r()(e)}catch(t){return Promise.reject(t)}}}};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/hooks/useReduxIntegration.ts"],"sourcesContent":["import { useERPUI } from '../components/providers/ERPUIProvider';\n\n/**\n * Hook to determine Redux integration status and provide conditional Redux usage\n */\nexport const useReduxIntegration = () => {\n const { useRedux, apiClient } = useERPUI();\n \n // Helper function to conditionally use Redux hooks\n const useConditionalRedux = <T>(\n reduxHook: () => T,\n fallbackValue: T\n ): T => {\n if (!useRedux) {\n return fallbackValue;\n }\n \n try {\n return reduxHook();\n } catch (error) {\n console.warn('Redux hook failed, falling back to default value:', error);\n return fallbackValue;\n }\n };\n \n // Helper function to conditionally dispatch Redux actions\n const conditionalDispatch = (action: any) => {\n if (!useRedux) {\n console.warn('Redux not enabled, cannot dispatch action:', action);\n return Promise.resolve();\n }\n \n try {\n const { useAppDispatch } = require('../redux/hooks');\n const dispatch = useAppDispatch();\n return dispatch(action);\n } catch (error) {\n console.error('Failed to dispatch Redux action:', error);\n return Promise.reject(error);\n }\n };\n \n return {\n useRedux,\n apiClient,\n useConditionalRedux,\n conditionalDispatch,\n };\n};"],"names":["useRedux","apiClient","useERPUI","useConditionalRedux","reduxHook","fallbackValue","error","conditionalDispatch","action","Promise","resolve","useAppDispatch","require","dispatch","reject"],"mappings":"mKAKmC,KACjC,MAAMA,SAAEA,EAAAC,UAAUA,GAAcC,aAoChC,MAAO,CACLF,WACAC,YACAE,oBApC0B,CAC1BC,EACAC,KAEA,IAAKL,EACH,OAAOK,EAGT,IACE,OAAOD,GACT,OAASE,GAEP,OAAOD,CACT,GAwBAE,oBApB2BC,IAC3B,IAAKR,EAEH,OAAOS,QAAQC,UAGjB,IACE,MAAMC,eAAEA,GAAmBC,QAAQ,kBAEnC,OADiBD,GACVE,CAASL,EAClB,OAASF,GAEP,OAAOG,QAAQK,OAAOR,EACxB"}
|