@erpsquad/common 1.8.46 → 1.8.48
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 +2 -4
- package/dist/_virtual/index/index.esm2.js.map +1 -1
- package/dist/_virtual/index/index.esm3.js +4 -2
- package/dist/_virtual/index/index.esm3.js.map +1 -1
- package/dist/_virtual/index/index.esm4.js +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/assets/index.d.ts +0 -1
- package/dist/components/activityLog/activity-log/index.esm.js +104 -0
- package/dist/components/activityLog/activity-log/index.esm.js.map +1 -0
- package/dist/components/activityLog/activity-log/index.js +14 -0
- package/dist/components/activityLog/activity-log/index.js.map +1 -0
- package/dist/components/charts/barChart/barChart/index.esm.js +148 -0
- package/dist/components/charts/barChart/barChart/index.esm.js.map +1 -0
- package/dist/components/charts/barChart/barChart/index.js +2 -0
- package/dist/components/charts/barChart/barChart/index.js.map +1 -0
- package/dist/components/charts/donut-chart/donut-chart/index.esm.js.map +1 -1
- package/dist/components/charts/donut-chart/donut-chart/index.js.map +1 -1
- package/dist/components/charts/donut-chart/donut-chart.d.ts +1 -2
- package/dist/components/charts/donutChart/DonutChart/index.esm.js +97 -0
- package/dist/components/charts/donutChart/DonutChart/index.esm.js.map +1 -0
- package/dist/components/charts/donutChart/DonutChart/index.js +5 -0
- package/dist/components/charts/donutChart/DonutChart/index.js.map +1 -0
- package/dist/components/charts/index.d.ts +11 -0
- package/dist/components/charts/line-chart/area-lineChart/index.esm.js +55 -0
- package/dist/components/charts/line-chart/area-lineChart/index.esm.js.map +1 -0
- package/dist/components/charts/line-chart/area-lineChart/index.js +2 -0
- package/dist/components/charts/line-chart/area-lineChart/index.js.map +1 -0
- package/dist/components/charts/line-chart/line-chart/index.esm.js +108 -0
- package/dist/components/charts/line-chart/line-chart/index.esm.js.map +1 -0
- package/dist/components/charts/line-chart/line-chart/index.js +2 -0
- package/dist/components/charts/line-chart/line-chart/index.js.map +1 -0
- package/dist/components/confirm-modal/confirm-modal/index.esm.js.map +1 -1
- package/dist/components/confirm-modal/confirm-modal/index.js.map +1 -1
- package/dist/components/confirm-modal/confirm-modal.d.ts +1 -2
- package/dist/components/confirm-modal/index.d.ts +1 -0
- package/dist/components/editor/custom-editor/index.esm.js +96 -67
- package/dist/components/editor/custom-editor/index.esm.js.map +1 -1
- package/dist/components/editor/custom-editor/index.js +3 -3
- package/dist/components/editor/custom-editor/index.js.map +1 -1
- package/dist/components/editor/custom-editor.d.ts +12 -8
- package/dist/components/footer/footer/index.esm.js +1 -1
- package/dist/components/footer/footer/index.js +2 -2
- package/dist/components/footer/footer/index.js.map +1 -1
- package/dist/components/form-control/form-parser/form-parser/index.esm.js +1 -1
- package/dist/components/form-control/form-parser/form-parser/index.js +4 -4
- package/dist/components/form-control/form-parser/form-parser/index.js.map +1 -1
- package/dist/components/grid/grid-card/grid-card/index.esm.js +4 -2
- package/dist/components/grid/grid-card/grid-card/index.esm.js.map +1 -1
- package/dist/components/grid/grid-card/grid-card/index.js +10 -11
- package/dist/components/grid/grid-card/grid-card/index.js.map +1 -1
- package/dist/components/grid/grid-card/grid-card.d.ts +10 -1
- package/dist/components/index.d.ts +294 -98
- package/dist/components/index.esm.js +582 -193
- 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.d.ts +3 -2
- package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.esm.js +1 -1
- package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.js +1 -1
- package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.js.map +1 -1
- package/dist/components/inventory-reports-title-bar/redux/reducer/index.esm.js +0 -2
- 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/list/list/index.esm.js +3 -2
- package/dist/components/list/list/index.esm.js.map +1 -1
- package/dist/components/list/list/index.js +2 -2
- package/dist/components/list/list/index.js.map +1 -1
- package/dist/components/list/list.d.ts +2 -1
- package/dist/components/listing/listing/index.esm.js +1 -1
- package/dist/components/listing/listing/index.js +1 -1
- package/dist/components/listing/listing/index.js.map +1 -1
- package/dist/components/material-table/aggregation-fns/index/index.esm.js +10 -0
- package/dist/components/material-table/aggregation-fns/index/index.esm.js.map +1 -1
- package/dist/components/material-table/aggregation-fns/index/index.js +1 -1
- package/dist/components/material-table/aggregation-fns/index/index.js.map +1 -1
- package/dist/components/material-table/components/number-aggregation/index.esm.js +134 -0
- package/dist/components/material-table/components/number-aggregation/index.esm.js.map +1 -0
- package/dist/components/material-table/components/number-aggregation/index.js +5 -0
- package/dist/components/material-table/components/number-aggregation/index.js.map +1 -0
- package/dist/components/module-button/module-button/index.esm.js +3 -2
- package/dist/components/module-button/module-button/index.esm.js.map +1 -1
- package/dist/components/module-button/module-button/index.js +4 -4
- package/dist/components/module-button/module-button/index.js.map +1 -1
- package/dist/components/module-button/module-button.d.ts +10 -1
- package/dist/components/mulitline/multiline/index.esm.js +3 -2
- package/dist/components/mulitline/multiline/index.esm.js.map +1 -1
- package/dist/components/mulitline/multiline/index.js +9 -9
- package/dist/components/mulitline/multiline/index.js.map +1 -1
- package/dist/components/mulitline/multiline.d.ts +2 -2
- package/dist/components/page-navigator/page-navigator/index.esm.js +4 -3
- package/dist/components/page-navigator/page-navigator/index.esm.js.map +1 -1
- package/dist/components/page-navigator/page-navigator/index.js +5 -5
- package/dist/components/page-navigator/page-navigator/index.js.map +1 -1
- package/dist/components/page-navigator/page-navigator.d.ts +3 -3
- package/dist/components/parties-modal/parties-modal/index.esm.js +4 -3
- package/dist/components/parties-modal/parties-modal/index.esm.js.map +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/parties-modal/parties-modal.d.ts +3 -3
- package/dist/components/reports-title-bar/report-buttons/report-buttons/index.esm.js +60 -0
- package/dist/components/reports-title-bar/report-buttons/report-buttons/index.esm.js.map +1 -0
- package/dist/components/reports-title-bar/report-buttons/report-buttons/index.js +2 -0
- package/dist/components/reports-title-bar/report-buttons/report-buttons/index.js.map +1 -0
- package/dist/components/reports-title-bar/reports-title-bar/index.esm.js +736 -0
- package/dist/components/reports-title-bar/reports-title-bar/index.esm.js.map +1 -0
- package/dist/components/reports-title-bar/reports-title-bar/index.js +39 -0
- package/dist/components/reports-title-bar/reports-title-bar/index.js.map +1 -0
- package/dist/components/rfq-response/item-response-details/index.esm.js +40 -48
- package/dist/components/rfq-response/item-response-details/index.esm.js.map +1 -1
- package/dist/components/rfq-response/item-response-details/index.js +4 -4
- package/dist/components/rfq-response/item-response-details/index.js.map +1 -1
- package/dist/components/rfq-response/item-response-details.d.ts +2 -1
- package/dist/components/schedule-report/utils/common/index.esm.js +1 -1
- package/dist/components/select/controller/chip-or-placeholder/index.esm.js +25 -0
- package/dist/components/select/controller/chip-or-placeholder/index.esm.js.map +1 -0
- package/dist/components/select/controller/chip-or-placeholder/index.js +2 -0
- package/dist/components/select/controller/chip-or-placeholder/index.js.map +1 -0
- package/dist/components/select/controller/controller-select/index.esm.js +165 -0
- package/dist/components/select/controller/controller-select/index.esm.js.map +1 -0
- package/dist/components/select/controller/controller-select/index.js +10 -0
- package/dist/components/select/controller/controller-select/index.js.map +1 -0
- package/dist/components/tab-bar-ui/tab-bar-ui/index.esm.js +4 -10
- package/dist/components/tab-bar-ui/tab-bar-ui/index.esm.js.map +1 -1
- package/dist/components/tab-bar-ui/tab-bar-ui/index.js +3 -3
- package/dist/components/tab-bar-ui/tab-bar-ui/index.js.map +1 -1
- package/dist/components/tab-bar-ui/tab-bar-ui.d.ts +3 -3
- package/dist/components/tabs/tabs/index.esm.js +3 -2
- package/dist/components/tabs/tabs/index.esm.js.map +1 -1
- package/dist/components/tabs/tabs/index.js +3 -3
- package/dist/components/tabs/tabs/index.js.map +1 -1
- package/dist/components/tabs/tabs.d.ts +2 -2
- package/dist/hooks/index.esm.js +4 -4
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-translations/index.esm.js +4 -3
- package/dist/hooks/use-translations/index.esm.js.map +1 -1
- package/dist/hooks/use-translations/index.js +1 -1
- package/dist/hooks/use-translations/index.js.map +1 -1
- package/dist/hooks/use-translations.d.ts +2 -1
- package/dist/hooks/useCheckSkuAndName/index.esm.js +5 -4
- package/dist/hooks/useCheckSkuAndName/index.esm.js.map +1 -1
- package/dist/hooks/useCheckSkuAndName/index.js +1 -1
- package/dist/hooks/useCheckSkuAndName/index.js.map +1 -1
- package/dist/hooks/useCheckSkuAndName.d.ts +4 -2
- package/dist/index.esm.js +696 -268
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/layout/fullScreen/fullScreen/index.esm.js +5 -3
- package/dist/layout/fullScreen/fullScreen/index.esm.js.map +1 -1
- package/dist/layout/fullScreen/fullScreen/index.js +3 -3
- package/dist/layout/fullScreen/fullScreen/index.js.map +1 -1
- package/dist/layout/fullScreen/fullScreen.d.ts +5 -1
- package/dist/layout/index.esm.js +4 -4
- package/dist/layout/index.js +1 -1
- package/dist/layout/sidebarScreen/sidebarScreen/index.esm.js +72 -50
- package/dist/layout/sidebarScreen/sidebarScreen/index.esm.js.map +1 -1
- package/dist/layout/sidebarScreen/sidebarScreen/index.js +4 -4
- package/dist/layout/sidebarScreen/sidebarScreen/index.js.map +1 -1
- package/dist/layout/sidebarScreen/sidebarScreen.d.ts +3 -3
- 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/esm/Remove/index.esm.js +9 -0
- package/dist/node_modules/@mui/icons-material/esm/Remove/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/icons-material/esm/Remove/index.js +2 -0
- package/dist/node_modules/@mui/icons-material/esm/Remove/index.js.map +1 -0
- 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/lab/TimelineItem/TimelineItem/index.esm.js +1 -1
- package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.js +2 -2
- package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.esm.js +95 -0
- package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.js +3 -0
- package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.js.map +1 -0
- package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.esm.js +3 -2
- 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/AvatarGroup/AvatarGroup/index.esm.js +201 -0
- package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.js +3 -0
- package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.js.map +1 -0
- package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.esm.js +125 -0
- package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.js +4 -0
- package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.js.map +1 -0
- package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.esm.js +170 -0
- package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.js +3 -0
- package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.js.map +1 -0
- package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.esm.js +120 -0
- package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.js +3 -0
- package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.js.map +1 -0
- package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/CardActions/CardActions/index.esm.js +92 -0
- package/dist/node_modules/@mui/material/CardActions/CardActions/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/CardActions/CardActions/index.js +3 -0
- package/dist/node_modules/@mui/material/CardActions/CardActions/index.js.map +1 -0
- package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.esm.js +196 -0
- package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.js +2 -0
- package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.js.map +1 -0
- package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.esm.js +76 -0
- package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.js +3 -0
- package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.js.map +1 -0
- package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Fab/Fab/index.esm.js +231 -0
- package/dist/node_modules/@mui/material/Fab/Fab/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Fab/Fab/index.js +3 -0
- package/dist/node_modules/@mui/material/Fab/Fab/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Fab/fabClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/Fab/fabClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Fab/fabClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/Fab/fabClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Hidden/Hidden/index.esm.js +135 -0
- package/dist/node_modules/@mui/material/Hidden/Hidden/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Hidden/Hidden/index.js +2 -0
- package/dist/node_modules/@mui/material/Hidden/Hidden/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.esm.js +176 -0
- package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.js +3 -0
- package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.esm.js +119 -0
- package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.js +2 -0
- package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Hidden/withWidth/index.esm.js +92 -0
- package/dist/node_modules/@mui/material/Hidden/withWidth/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Hidden/withWidth/index.js +2 -0
- package/dist/node_modules/@mui/material/Hidden/withWidth/index.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageList/ImageList/index.esm.js +156 -0
- package/dist/node_modules/@mui/material/ImageList/ImageList/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageList/ImageList/index.js +3 -0
- package/dist/node_modules/@mui/material/ImageList/ImageList/index.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.js +2 -0
- package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.esm.js +173 -0
- package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.js +3 -0
- package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.esm.js +222 -0
- package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.js +3 -0
- package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.esm.js +216 -0
- package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.js +3 -0
- package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.js.map +1 -0
- package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.esm.js +126 -0
- package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.js +3 -0
- package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.js.map +1 -0
- 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/NoSsr/NoSsr/index.esm.js +55 -0
- package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.js +2 -0
- package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.js.map +1 -0
- 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/Rating/Rating/index.esm.js +638 -0
- package/dist/node_modules/@mui/material/Rating/Rating/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Rating/Rating/index.js +7 -0
- package/dist/node_modules/@mui/material/Rating/Rating/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Rating/ratingClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/Rating/ratingClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Rating/ratingClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/Rating/ratingClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.esm.js +105 -0
- package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.js +3 -0
- package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.js.map +1 -0
- package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.js.map +1 -0
- 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/SpeedDial/SpeedDial/index.esm.js +453 -0
- package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.js +4 -0
- package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.js.map +1 -0
- package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.esm.js +245 -0
- package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.js +2 -0
- package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.js.map +1 -0
- package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.esm.js +137 -0
- package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.js +4 -0
- package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.js.map +1 -0
- package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Step/Step/index.esm.js +169 -0
- package/dist/node_modules/@mui/material/Step/Step/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Step/Step/index.js +3 -0
- package/dist/node_modules/@mui/material/Step/Step/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Step/StepContext/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/Step/StepContext/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Step/StepContext/index.js +2 -0
- package/dist/node_modules/@mui/material/Step/StepContext/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Step/stepClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/Step/stepClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Step/stepClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/Step/stepClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/StepButton/StepButton/index.esm.js +132 -0
- package/dist/node_modules/@mui/material/StepButton/StepButton/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/StepButton/StepButton/index.js +3 -0
- package/dist/node_modules/@mui/material/StepButton/StepButton/index.js.map +1 -0
- package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.esm.js +136 -0
- package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.js +3 -0
- package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.js.map +1 -0
- package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/StepContent/StepContent/index.esm.js +152 -0
- package/dist/node_modules/@mui/material/StepContent/StepContent/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/StepContent/StepContent/index.js +2 -0
- package/dist/node_modules/@mui/material/StepContent/StepContent/index.js.map +1 -0
- package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.esm.js +161 -0
- package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.js +2 -0
- package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.js.map +1 -0
- package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.esm.js +239 -0
- package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.js +3 -0
- package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.js.map +1 -0
- package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Stepper/Stepper/index.esm.js +155 -0
- package/dist/node_modules/@mui/material/Stepper/Stepper/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Stepper/Stepper/index.js +3 -0
- package/dist/node_modules/@mui/material/Stepper/Stepper/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Stepper/StepperContext/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/Stepper/StepperContext/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Stepper/StepperContext/index.js +2 -0
- package/dist/node_modules/@mui/material/Stepper/StepperContext/index.js.map +1 -0
- package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.esm.js +10 -0
- package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.js.map +1 -0
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.esm.js +82 -0
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.js +3 -0
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.js.map +1 -0
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.esm.js +538 -0
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.js +2 -0
- package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.js.map +1 -0
- package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.esm.js +443 -0
- package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.js +3 -0
- package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.js.map +1 -0
- package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.esm.js +179 -0
- package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.js +3 -0
- package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.js.map +1 -0
- package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.esm.js +11 -0
- package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.js +2 -0
- package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.js.map +1 -0
- 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/material/Zoom/Zoom/index.esm.js +196 -0
- package/dist/node_modules/@mui/material/Zoom/Zoom/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/Zoom/Zoom/index.js +3 -0
- package/dist/node_modules/@mui/material/Zoom/Zoom/index.js.map +1 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.esm.js +9 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.js +2 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.js.map +1 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.esm.js +9 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.js +2 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.js.map +1 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.esm.js +9 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.js +2 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.js.map +1 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.esm.js +9 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.js +2 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.js.map +1 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.esm.js +9 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.js +2 -0
- package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.js.map +1 -0
- package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.esm.js +51 -0
- package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.esm.js.map +1 -0
- package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.js +2 -0
- package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.js.map +1 -0
- 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/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 +5 -1
- 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/redux/hooks/index.esm.js +1 -1
- package/dist/src/assets/index.d.ts +0 -1
- package/dist/src/components/charts/donut-chart/donut-chart.d.ts +1 -2
- package/dist/src/components/charts/index.d.ts +11 -0
- package/dist/src/components/confirm-modal/confirm-modal.d.ts +1 -2
- package/dist/src/components/confirm-modal/index.d.ts +1 -0
- package/dist/src/components/editor/custom-editor.d.ts +12 -8
- package/dist/src/components/grid/grid-card/grid-card.d.ts +10 -1
- package/dist/src/components/index.d.ts +229 -94
- package/dist/src/components/inventory-reports-title-bar/component/reportFilter.d.ts +3 -2
- package/dist/src/components/list/list.d.ts +2 -1
- package/dist/src/components/module-button/module-button.d.ts +10 -1
- package/dist/src/components/mulitline/multiline.d.ts +2 -2
- package/dist/src/components/page-navigator/page-navigator.d.ts +3 -3
- package/dist/src/components/parties-modal/parties-modal.d.ts +3 -3
- package/dist/src/components/rfq-response/item-response-details.d.ts +2 -1
- package/dist/src/components/tab-bar-ui/tab-bar-ui.d.ts +3 -3
- package/dist/src/components/tabs/tabs.d.ts +2 -2
- package/dist/src/hooks/use-translations.d.ts +2 -1
- package/dist/src/hooks/useCheckSkuAndName.d.ts +4 -2
- package/dist/src/layout/fullScreen/fullScreen.d.ts +5 -1
- package/dist/src/layout/sidebarScreen/sidebarScreen.d.ts +3 -3
- package/dist/src/views/afterAuth/dashboard/dashboard.d.ts +2 -1
- package/dist/src/views/afterAuth/index.d.ts +1 -0
- package/dist/src/views/beforeAuth/index.d.ts +0 -1
- package/dist/src/views/form-builder/element-edit-forms/column-width.d.ts +5 -3
- package/dist/src/views/index.d.ts +1 -0
- package/dist/style.css +77 -71
- package/dist/utils/common/index.esm.js +1 -1
- package/dist/views/afterAuth/dashboard/dashboard/index.esm.js +5 -4
- package/dist/views/afterAuth/dashboard/dashboard/index.esm.js.map +1 -1
- package/dist/views/afterAuth/dashboard/dashboard/index.js +3 -3
- package/dist/views/afterAuth/dashboard/dashboard/index.js.map +1 -1
- package/dist/views/afterAuth/dashboard/dashboard.d.ts +2 -1
- 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/index.d.ts +1 -0
- package/dist/views/afterAuth/page-view/page-view/index.esm.js +101 -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/index.d.ts +0 -1
- package/dist/views/form-builder/custom-form/index.esm.js +1151 -0
- package/dist/views/form-builder/custom-form/index.esm.js.map +1 -0
- package/dist/views/form-builder/custom-form/index.js +30 -0
- package/dist/views/form-builder/custom-form/index.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/checkbox/index.esm.js +327 -0
- package/dist/views/form-builder/element-edit-forms/checkbox/index.esm.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/checkbox/index.js +30 -0
- package/dist/views/form-builder/element-edit-forms/checkbox/index.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/column-width/index.esm.js +93 -0
- package/dist/views/form-builder/element-edit-forms/column-width/index.esm.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/column-width/index.js +4 -0
- package/dist/views/form-builder/element-edit-forms/column-width/index.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/column-width.d.ts +5 -3
- package/dist/views/form-builder/element-edit-forms/field-select/index.esm.js +89 -0
- package/dist/views/form-builder/element-edit-forms/field-select/index.esm.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/field-select/index.js +3 -0
- package/dist/views/form-builder/element-edit-forms/field-select/index.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/section/index.esm.js +222 -0
- package/dist/views/form-builder/element-edit-forms/section/index.esm.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/section/index.js +15 -0
- package/dist/views/form-builder/element-edit-forms/section/index.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/select/index.esm.js +318 -0
- package/dist/views/form-builder/element-edit-forms/select/index.esm.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/select/index.js +25 -0
- package/dist/views/form-builder/element-edit-forms/select/index.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/table-form/index.esm.js +111 -0
- package/dist/views/form-builder/element-edit-forms/table-form/index.esm.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/table-form/index.js +5 -0
- package/dist/views/form-builder/element-edit-forms/table-form/index.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/text/index.esm.js +559 -0
- package/dist/views/form-builder/element-edit-forms/text/index.esm.js.map +1 -0
- package/dist/views/form-builder/element-edit-forms/text/index.js +31 -0
- package/dist/views/form-builder/element-edit-forms/text/index.js.map +1 -0
- package/dist/views/form-builder/field_properties/index.esm.js +216 -0
- package/dist/views/form-builder/field_properties/index.esm.js.map +1 -0
- package/dist/views/form-builder/field_properties/index.js +2 -0
- package/dist/views/form-builder/field_properties/index.js.map +1 -0
- package/dist/views/form-builder/form-fields/index.esm.js +355 -0
- package/dist/views/form-builder/form-fields/index.esm.js.map +1 -0
- package/dist/views/form-builder/form-fields/index.js +24 -0
- package/dist/views/form-builder/form-fields/index.js.map +1 -0
- 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/form-builder/utils/common/index.esm.js +285 -0
- package/dist/views/form-builder/utils/common/index.esm.js.map +1 -0
- package/dist/views/form-builder/utils/common/index.js +2 -0
- package/dist/views/form-builder/utils/common/index.js.map +1 -0
- package/dist/views/index.d.ts +1 -0
- package/dist/views/index.esm.js +94 -49
- package/dist/views/index.esm.js.map +1 -1
- package/dist/views/index.js +1 -1
- package/package.json +2 -1
- package/dist/components/examples/FlexibleReduxExample/index.esm.js +0 -154
- package/dist/components/examples/FlexibleReduxExample/index.esm.js.map +0 -1
- package/dist/components/examples/FlexibleReduxExample/index.js +0 -19
- package/dist/components/examples/FlexibleReduxExample/index.js.map +0 -1
- package/dist/components/footer/index.esm.js +0 -71
- package/dist/components/footer/index.esm.js.map +0 -1
- package/dist/components/footer/index.js +0 -7
- package/dist/components/footer/index.js.map +0 -1
- package/dist/components/header/header-enhanced/index.esm.js +0 -405
- package/dist/components/header/header-enhanced/index.esm.js.map +0 -1
- package/dist/components/header/header-enhanced/index.js +0 -33
- package/dist/components/header/header-enhanced/index.js.map +0 -1
- package/dist/components/header copy/index.esm.js +0 -131
- package/dist/components/header copy/index.esm.js.map +0 -1
- package/dist/components/header copy/index.js +0 -11
- package/dist/components/header copy/index.js.map +0 -1
- package/dist/components/inventory-reports-title-bar/component/reportFilter/index.esm.js +0 -400
- package/dist/components/inventory-reports-title-bar/component/reportFilter/index.esm.js.map +0 -1
- package/dist/components/inventory-reports-title-bar/component/reportFilter/index.js +0 -41
- package/dist/components/inventory-reports-title-bar/component/reportFilter/index.js.map +0 -1
- package/dist/components/share-modal/share-modal-enhanced/index.esm.js +0 -288
- package/dist/components/share-modal/share-modal-enhanced/index.esm.js.map +0 -1
- package/dist/components/share-modal/share-modal-enhanced/index.js +0 -24
- package/dist/components/share-modal/share-modal-enhanced/index.js.map +0 -1
- package/dist/views/beforeAuth/login/index/index.esm.js +0 -209
- package/dist/views/beforeAuth/login/index/index.esm.js.map +0 -1
- package/dist/views/beforeAuth/login/index/index.js +0 -20
- package/dist/views/beforeAuth/login/index/index.js.map +0 -1
|
@@ -17,6 +17,5 @@ interface ConfirmPopUpProps extends DialogProps {
|
|
|
17
17
|
loading?: boolean;
|
|
18
18
|
showAction?: boolean;
|
|
19
19
|
}
|
|
20
|
-
declare const ConfirmPopUp: (props: ConfirmPopUpProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export { ConfirmPopUp };
|
|
20
|
+
export declare const ConfirmPopUp: (props: ConfirmPopUpProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
21
|
export default ConfirmPopUp;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect, useMemo, useCallback } from "react";
|
|
2
|
+
import React__default, { useState, useEffect, useMemo, useCallback } from "react";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { CKEditor } from "../../../node_modules/@ckeditor/ckeditor5-react/dist/index/index.esm.js";
|
|
5
5
|
/* empty css */
|
|
@@ -64,7 +64,10 @@ function PasteImageUrlPlugin(editor) {
|
|
|
64
64
|
src: url
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
|
-
editor.model.insertContent(
|
|
67
|
+
editor.model.insertContent(
|
|
68
|
+
imageElement,
|
|
69
|
+
editor.model.document.selection
|
|
70
|
+
);
|
|
68
71
|
evt.stop();
|
|
69
72
|
}
|
|
70
73
|
}
|
|
@@ -166,7 +169,14 @@ const createEditorConfig = (customConfig = {}) => {
|
|
|
166
169
|
SimpleUploadAdapter,
|
|
167
170
|
LinkImage
|
|
168
171
|
],
|
|
169
|
-
balloonToolbar: [
|
|
172
|
+
balloonToolbar: [
|
|
173
|
+
"bold",
|
|
174
|
+
"italic",
|
|
175
|
+
"|",
|
|
176
|
+
"link",
|
|
177
|
+
"insertImage",
|
|
178
|
+
"uploadImage"
|
|
179
|
+
],
|
|
170
180
|
blockToolbar: [
|
|
171
181
|
"fontSize",
|
|
172
182
|
"fontColor",
|
|
@@ -328,14 +338,14 @@ const createEditorConfig = (customConfig = {}) => {
|
|
|
328
338
|
};
|
|
329
339
|
return { ...defaultConfig, ...customConfig };
|
|
330
340
|
};
|
|
331
|
-
|
|
332
|
-
editorRef,
|
|
341
|
+
const CustomEditor = ({
|
|
342
|
+
editorRef = React__default.createRef(),
|
|
333
343
|
data = "",
|
|
334
344
|
handleEditorReady,
|
|
335
345
|
onError,
|
|
336
346
|
config = {},
|
|
337
347
|
...rest
|
|
338
|
-
}) {
|
|
348
|
+
}) => {
|
|
339
349
|
const [isReady, setIsReady] = useState(false);
|
|
340
350
|
const [error, setError] = useState(null);
|
|
341
351
|
useEffect(() => {
|
|
@@ -349,73 +359,91 @@ function CustomEditor({
|
|
|
349
359
|
const uFiles = await uploadFiles([file], "document");
|
|
350
360
|
const payload = {
|
|
351
361
|
...getToken(),
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
+
title: file == null ? void 0 : file.name.split(".")[0],
|
|
363
|
+
path: "/",
|
|
364
|
+
is_private: true,
|
|
365
|
+
is_directory: false,
|
|
366
|
+
file_size: file.size,
|
|
367
|
+
is_child: false,
|
|
368
|
+
file_extension: file == null ? void 0 : file.name.split(".")[1],
|
|
369
|
+
type: "image",
|
|
370
|
+
mime_type: file.type,
|
|
371
|
+
url: `${"https://erpforce-dev.s3.eu-west-1.amazonaws.com/"}${uFiles[0]}`
|
|
362
372
|
};
|
|
363
373
|
await postV1Drive(payload);
|
|
364
374
|
return { url: payload.url };
|
|
365
375
|
};
|
|
366
|
-
const handleReady = useCallback(
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
376
|
+
const handleReady = useCallback(
|
|
377
|
+
(editor) => {
|
|
378
|
+
try {
|
|
379
|
+
handleEditorReady == null ? void 0 : handleEditorReady(editor);
|
|
380
|
+
editor.plugins.get("FileRepository").createUploadAdapter = (loader) => {
|
|
381
|
+
return new MyUploadAdapter(loader, myUploadFn);
|
|
382
|
+
};
|
|
383
|
+
} catch (err) {
|
|
384
|
+
console.error("Error in editor ready handler:", err);
|
|
385
|
+
setError(err);
|
|
386
|
+
onError == null ? void 0 : onError(err);
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
[handleEditorReady, onError]
|
|
390
|
+
);
|
|
391
|
+
const handleError = useCallback(
|
|
392
|
+
(error2, { willEditorRestart }) => {
|
|
393
|
+
console.error("CKEditor error:", error2);
|
|
394
|
+
if (!willEditorRestart) {
|
|
395
|
+
setError(error2);
|
|
396
|
+
onError == null ? void 0 : onError(error2);
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
[onError]
|
|
400
|
+
);
|
|
385
401
|
if (error) {
|
|
386
|
-
return /* @__PURE__ */ jsxs(
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
402
|
+
return /* @__PURE__ */ jsxs(
|
|
403
|
+
"div",
|
|
404
|
+
{
|
|
405
|
+
style: {
|
|
406
|
+
padding: "20px",
|
|
407
|
+
border: "1px solid #red",
|
|
408
|
+
borderRadius: "4px",
|
|
409
|
+
backgroundColor: "#fff5f5"
|
|
410
|
+
},
|
|
411
|
+
children: [
|
|
412
|
+
/* @__PURE__ */ jsxs("div", { style: { color: "#e53e3e", marginBottom: "10px" }, children: [
|
|
413
|
+
"Editor Error: ",
|
|
414
|
+
error.message
|
|
415
|
+
] }),
|
|
416
|
+
/* @__PURE__ */ jsx(
|
|
417
|
+
"button",
|
|
418
|
+
{
|
|
419
|
+
onClick: () => setError(null),
|
|
420
|
+
style: {
|
|
421
|
+
padding: "8px 16px",
|
|
422
|
+
backgroundColor: "#3182ce",
|
|
423
|
+
color: "white",
|
|
424
|
+
border: "none",
|
|
425
|
+
borderRadius: "4px"
|
|
426
|
+
},
|
|
427
|
+
children: "Retry"
|
|
428
|
+
}
|
|
429
|
+
)
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
);
|
|
411
433
|
}
|
|
412
434
|
if (!isReady) {
|
|
413
|
-
return /* @__PURE__ */ jsx(
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
435
|
+
return /* @__PURE__ */ jsx(
|
|
436
|
+
"div",
|
|
437
|
+
{
|
|
438
|
+
style: {
|
|
439
|
+
padding: "20px",
|
|
440
|
+
textAlign: "center",
|
|
441
|
+
border: "1px solid #dee2e6",
|
|
442
|
+
borderRadius: "4px"
|
|
443
|
+
},
|
|
444
|
+
children: "Loading editor..."
|
|
445
|
+
}
|
|
446
|
+
);
|
|
419
447
|
}
|
|
420
448
|
return /* @__PURE__ */ jsx("div", { ref: editorRef, className: "custom-editor-container", children: /* @__PURE__ */ jsx(
|
|
421
449
|
CKEditor,
|
|
@@ -428,8 +456,9 @@ function CustomEditor({
|
|
|
428
456
|
...rest
|
|
429
457
|
}
|
|
430
458
|
) });
|
|
431
|
-
}
|
|
459
|
+
};
|
|
432
460
|
export {
|
|
461
|
+
CustomEditor,
|
|
433
462
|
CustomEditor as default
|
|
434
463
|
};
|
|
435
464
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../../../src/components/editor/custom-editor.tsx"],"sourcesContent":["/* eslint-disable unused-imports/no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n// IsolatedEditor.js - This file should ONLY be imported via React.lazy()\nimport React, { useState, useEffect, useMemo, useCallback } from 'react';\nimport \"./custom-editor.css\"\n\n// Import ALL CKEditor dependencies in this file ONLY\n// Do NOT import these anywhere else in your application\nimport { CKEditor } from '@ckeditor/ckeditor5-react';\nimport {\n ClassicEditor,\n Alignment,\n AutoLink,\n Autosave,\n BalloonToolbar,\n BlockQuote,\n BlockToolbar,\n Bold,\n Code,\n CodeBlock,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontFamily,\n FontSize,\n Heading,\n Highlight,\n HorizontalLine,\n ImageEditing,\n ImageUtils,\n Indent,\n IndentBlock,\n Italic,\n Link,\n Paragraph,\n PlainTableOutput,\n RemoveFormat,\n Strikethrough,\n Subscript,\n Superscript,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n GeneralHtmlSupport,\n SourceEditing,\n // Image support\n Image,\n ImageBlock,\n ImageInline,\n ImageToolbar,\n ImageCaption,\n ImageStyle,\n ImageResize,\n ImageInsert,\n ImageInsertViaUrl,\n ImageUpload,\n ImageTextAlternative,\n SimpleUploadAdapter,\n LinkImage,\n ClipboardPipeline,\n AutoImage,\n} from 'ckeditor5';\n\nimport 'ckeditor5/ckeditor5.css';\nimport { postV1Drive } from '../../api-client/api.drive/api';\nimport { getToken, uploadFiles } from '../../utils/common';\n\nconst LICENSE_KEY = 'GPL';\n\n\nclass MyUploadAdapter {\n constructor(loader, uploadFn) {\n // The file loader instance to use during the upload\n this.loader = loader;\n this.uploadFn = uploadFn;\n }\n\n // Starts the upload process\n async upload() {\n const file = await this.loader.file;\n try {\n // 👇 Call your existing function\n const response = await this.uploadFn(file);\n\n // CKEditor expects this format:\n return {\n default: response.url // must return final image URL\n };\n } catch (error) {\n console.error(\"Upload failed\", error);\n throw error;\n }\n }\n\n // Optional abort support\n abort() {\n console.log(\"Upload aborted\");\n }\n}\n\nfunction PasteImageUrlPlugin(editor) {\n const clipboard = editor.plugins.get(ClipboardPipeline);\n\n clipboard.on('inputTransformation', (evt, data) => {\n const content = data.content.getChild(0);\n\n // Check if pasted content is plain text\n if (content && content.is('$textProxy')) {\n const url = content.data.trim();\n\n // Check if it looks like an image URL\n if (url.match(/\\.(jpeg|jpg|gif|png|webp|svg)$/i)) {\n const imageElement = editor.model.change(writer => {\n return writer.createElement('imageBlock', {\n src: url\n });\n });\n\n editor.model.insertContent(imageElement, editor.model.document.selection);\n evt.stop(); // prevent default plain text paste\n }\n }\n });\n}\n\n\n// Create the editor configuration\nconst createEditorConfig = (customConfig = {}) => {\n const defaultConfig = {\n extraPlugins: [ PasteImageUrlPlugin, AutoImage ],\n toolbar: {\n items: [\n 'sourceEditing',\n 'undo',\n 'redo',\n '|',\n 'heading',\n '|',\n 'fontSize',\n 'fontFamily',\n 'fontColor',\n 'fontBackgroundColor',\n '|',\n 'bold',\n 'italic',\n 'underline',\n 'strikethrough',\n 'subscript',\n 'superscript',\n 'code',\n 'removeFormat',\n '|',\n 'horizontalLine',\n 'link',\n 'insertImage', 'uploadImage',\n 'insertTable',\n 'highlight',\n 'blockQuote',\n 'codeBlock',\n '|',\n 'alignment',\n '|',\n 'outdent',\n 'indent',\n ],\n shouldNotGroupWhenFull: false\n },\n plugins: [\n Alignment,\n AutoLink,\n Autosave,\n BalloonToolbar,\n BlockQuote,\n BlockToolbar,\n Bold,\n Code,\n CodeBlock,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontFamily,\n FontSize,\n Heading,\n Highlight,\n HorizontalLine,\n ImageEditing,\n ImageUtils,\n Indent,\n IndentBlock,\n Italic,\n Link,\n Paragraph,\n PlainTableOutput,\n RemoveFormat,\n Strikethrough,\n Subscript,\n Superscript,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n GeneralHtmlSupport,\n SourceEditing,\n Image,\n ImageBlock,\n ImageCaption,\n ImageEditing,\n ImageInline,\n ImageInsert,\n ImageInsertViaUrl,\n ImageResize,\n ImageStyle,\n ImageTextAlternative,\n ImageToolbar,\n ImageUpload,\n ImageUtils,\n SimpleUploadAdapter,\n LinkImage\n ],\n balloonToolbar: ['bold', 'italic', '|', 'link', 'insertImage', 'uploadImage',],\n blockToolbar: [\n 'fontSize',\n 'fontColor',\n 'fontBackgroundColor',\n '|',\n 'bold',\n 'italic',\n '|',\n 'link',\n 'insertImage', 'uploadImage',\n 'insertTable',\n '|',\n 'outdent',\n 'indent'\n ],\n fontFamily: {\n supportAllValues: true\n },\n fontSize: {\n options: [10, 12, 14, 'default', 18, 20, 22],\n supportAllValues: true\n },\n heading: {\n options: [\n {\n model: 'paragraph',\n title: 'Paragraph',\n class: 'ck-heading_paragraph'\n },\n {\n model: 'heading1',\n view: 'h1',\n title: 'Heading 1',\n class: 'ck-heading_heading1'\n },\n {\n model: 'heading2',\n view: 'h2',\n title: 'Heading 2',\n class: 'ck-heading_heading2'\n },\n {\n model: 'heading3',\n view: 'h3',\n title: 'Heading 3',\n class: 'ck-heading_heading3'\n },\n {\n model: 'heading4',\n view: 'h4',\n title: 'Heading 4',\n class: 'ck-heading_heading4'\n }\n ]\n },\n licenseKey: LICENSE_KEY,\n link: {\n addTargetToExternalLinks: true,\n defaultProtocol: 'https://',\n decorators: {\n toggleDownloadable: {\n mode: 'manual',\n label: 'Downloadable',\n attributes: {\n download: 'file',\n }\n }\n }\n },\n menuBar: {\n isVisible: true\n },\n placeholder: 'Type or paste your content here!',\n table: {\n contentToolbar: [\n 'tableColumn', \n 'tableRow', \n 'mergeTableCells', \n 'tableProperties', \n 'tableCellProperties'\n ]\n },\n htmlSupport: {\n allow: [\n {\n name: /.*/,\n attributes: true,\n classes: true,\n styles: true\n }\n ]\n },\n image: {\n toolbar: [\n 'imageTextAlternative',\n 'toggleImageCaption',\n '|',\n 'imageStyle:inline',\n 'imageStyle:wrapText',\n 'imageStyle:breakText',\n '|',\n 'resizeImage',\n '|',\n 'linkImage'\n ],\n styles: {\n options: [\n 'inline',\n 'alignLeft',\n 'alignRight',\n 'alignCenter',\n 'alignBlockLeft',\n 'alignBlockRight',\n 'block',\n 'side'\n ]\n },\n resizeOptions: [\n {\n name: 'resizeImage:original',\n label: 'Original size',\n value: null\n },\n {\n name: 'resizeImage:25',\n label: '25%',\n value: '25'\n },\n {\n name: 'resizeImage:50',\n label: '50%',\n value: '50'\n },\n {\n name: 'resizeImage:75',\n label: '75%',\n value: '75'\n }\n ],\n insert: {\n integrations: ['insertImageViaUrl']\n }\n },\n simpleUpload: {\n uploadUrl: '/api/upload', // your upload API\n headers: {\n Authorization: 'Bearer <token>'\n }\n },\n autosave: {\n save() {\n return new Promise(resolve => {\n setTimeout(resolve, 1000);\n });\n }\n }\n };\n\n return { ...defaultConfig, ...customConfig };\n};\n\nexport default function CustomEditor({\n editorRef,\n data = '',\n handleEditorReady,\n onError,\n config = {},\n ...rest\n}) {\n const [isReady, setIsReady] = useState(false);\n const [error, setError] = useState(null);\n\n useEffect(() => {\n // Small delay to ensure DOM is ready\n const timer = setTimeout(() => setIsReady(true), 100);\n return () => clearTimeout(timer);\n }, []);\n\n const editorConfig = useMemo(() => {\n return createEditorConfig(config);\n }, [config]);\n\n const myUploadFn = async (file) => {\n // 👇 Your existing function here\n const uFiles = await uploadFiles([file], \"document\");\n const payload = {\n ...getToken(),\n \"title\": file?.name.split(\".\")[0],\n \"path\": \"/\",\n \"is_private\": true,\n \"is_directory\": false,\n \"file_size\": file.size,\n \"is_child\": false,\n \"file_extension\": file?.name.split(\".\")[1],\n \"type\": \"image\",\n \"mime_type\": file.type,\n \"url\": `${import.meta.env.VITE_S3_BUCKET_URL}${uFiles[0]}`\n }\n // Replace with your actual API endpoint\n \n // 👇 Call your existing function\n await postV1Drive(payload);\n return { url: payload.url };\n };\n\n const handleReady = useCallback((editor) => {\n try {\n handleEditorReady?.(editor);\n editor.plugins.get('FileRepository').createUploadAdapter = (loader) => {\n return new MyUploadAdapter(loader, myUploadFn);\n };\n } catch (err) {\n console.error('Error in editor ready handler:', err);\n setError(err);\n onError?.(err);\n }\n }, [handleEditorReady, onError]);\n\n const handleError = useCallback((error, { willEditorRestart }) => {\n console.error('CKEditor error:', error);\n if (!willEditorRestart) {\n setError(error);\n onError?.(error);\n }\n }, [onError]);\n\n if (error) {\n return (\n <div style={{\n padding: '20px',\n border: '1px solid #red',\n borderRadius: '4px',\n backgroundColor: '#fff5f5'\n }}>\n <div style={{ color: '#e53e3e', marginBottom: '10px' }}>\n Editor Error: {error.message}\n </div>\n <button \n onClick={() => setError(null)}\n style={{\n padding: '8px 16px',\n backgroundColor: '#3182ce',\n color: 'white',\n border: 'none',\n borderRadius: '4px'\n }}\n >\n Retry\n </button>\n </div>\n );\n }\n\n if (!isReady) {\n return (\n <div style={{\n padding: '20px',\n textAlign: 'center',\n border: '1px solid #dee2e6',\n borderRadius: '4px'\n }}>\n Loading editor...\n </div>\n );\n }\n\n return (\n <div ref={editorRef} className=\"custom-editor-container\">\n <CKEditor \n editor={ClassicEditor} \n config={editorConfig} \n data={data} \n onReady={handleReady}\n onError={handleError}\n {...rest}\n />\n </div>\n );\n}"],"names":["error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAM,cAAc;AAGpB,MAAM,gBAAgB;AAAA,EACpB,YAAY,QAAQ,UAAU;AAE5B,SAAK,SAAS;AACd,SAAK,WAAW;AAAA,EAClB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A,QACvC,MAAM;AAAA,MAAA,GACvB;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAAS,MAAM,SAAS,IAAI;AAAA,UAC5B,OAAO;AAAA,YACL,SAAS;AAAA,YACT,iBAAiB;AAAA,YACjB,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,cAAc;AAAA,UAAA;AAAA,UAEjB,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAED,GACF;AAAA,EAEJ;AAEA,MAAI,CAAC,SAAS;AACZ,WACE,oBAAC,SAAI,OAAO;AAAA,MACV,SAAS;AAAA,MACT,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,cAAc;AAAA,IAAA,GACb,UAAA,qBAEH;AAAA,EAEJ;AAEA,6BACG,OAAA,EAAI,KAAK,WAAW,WAAU,2BAC7B,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA,MACR,GAAG;AAAA,IAAA;AAAA,EAAA,GAER;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../../src/components/editor/custom-editor.tsx"],"sourcesContent":["/* eslint-disable unused-imports/no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n// IsolatedEditor.js - This file should ONLY be imported via React.lazy()\nimport React, { useState, useEffect, useMemo, useCallback } from 'react';\nimport './custom-editor.css';\n\n// Import ALL CKEditor dependencies in this file ONLY\n// Do NOT import these anywhere else in your application\nimport { CKEditor } from '@ckeditor/ckeditor5-react';\nimport {\n\tClassicEditor,\n\tAlignment,\n\tAutoLink,\n\tAutosave,\n\tBalloonToolbar,\n\tBlockQuote,\n\tBlockToolbar,\n\tBold,\n\tCode,\n\tCodeBlock,\n\tEssentials,\n\tFontBackgroundColor,\n\tFontColor,\n\tFontFamily,\n\tFontSize,\n\tHeading,\n\tHighlight,\n\tHorizontalLine,\n\tImageEditing,\n\tImageUtils,\n\tIndent,\n\tIndentBlock,\n\tItalic,\n\tLink,\n\tParagraph,\n\tPlainTableOutput,\n\tRemoveFormat,\n\tStrikethrough,\n\tSubscript,\n\tSuperscript,\n\tTable,\n\tTableCaption,\n\tTableCellProperties,\n\tTableColumnResize,\n\tTableProperties,\n\tTableToolbar,\n\tUnderline,\n\tGeneralHtmlSupport,\n\tSourceEditing,\n\t// Image support\n\tImage,\n\tImageBlock,\n\tImageInline,\n\tImageToolbar,\n\tImageCaption,\n\tImageStyle,\n\tImageResize,\n\tImageInsert,\n\tImageInsertViaUrl,\n\tImageUpload,\n\tImageTextAlternative,\n\tSimpleUploadAdapter,\n\tLinkImage,\n\tClipboardPipeline,\n\tAutoImage,\n EditorConfig\n} from 'ckeditor5';\n\nimport 'ckeditor5/ckeditor5.css';\nimport { postV1Drive } from '../../api-client/api.drive/api';\nimport { getToken, uploadFiles } from '../../utils/common';\n\nconst LICENSE_KEY = 'GPL';\n\nclass MyUploadAdapter {\n\tconstructor(loader, uploadFn) {\n\t\t// The file loader instance to use during the upload\n\t\tthis.loader = loader;\n\t\tthis.uploadFn = uploadFn;\n\t}\n\n\t// Starts the upload process\n\tasync upload() {\n\t\tconst file = await this.loader.file;\n\t\ttry {\n\t\t\t// 👇 Call your existing function\n\t\t\tconst response = await this.uploadFn(file);\n\n\t\t\t// CKEditor expects this format:\n\t\t\treturn {\n\t\t\t\tdefault: response.url // must return final image URL\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconsole.error('Upload failed', error);\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\t// Optional abort support\n\tabort() {\n\t\tconsole.log('Upload aborted');\n\t}\n}\n\nfunction PasteImageUrlPlugin(editor) {\n\tconst clipboard = editor.plugins.get(ClipboardPipeline);\n\n\tclipboard.on('inputTransformation', (evt, data) => {\n\t\tconst content = data.content.getChild(0);\n\n\t\t// Check if pasted content is plain text\n\t\tif (content && content.is('$textProxy')) {\n\t\t\tconst url = content.data.trim();\n\n\t\t\t// Check if it looks like an image URL\n\t\t\tif (url.match(/\\.(jpeg|jpg|gif|png|webp|svg)$/i)) {\n\t\t\t\tconst imageElement = editor.model.change((writer) => {\n\t\t\t\t\treturn writer.createElement('imageBlock', {\n\t\t\t\t\t\tsrc: url\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\teditor.model.insertContent(\n\t\t\t\t\timageElement,\n\t\t\t\t\teditor.model.document.selection\n\t\t\t\t);\n\t\t\t\tevt.stop(); // prevent default plain text paste\n\t\t\t}\n\t\t}\n\t});\n}\n\n// Create the editor configuration\nconst createEditorConfig = (customConfig = {}) => {\n\tconst defaultConfig = {\n\t\textraPlugins: [PasteImageUrlPlugin, AutoImage],\n\t\ttoolbar: {\n\t\t\titems: [\n\t\t\t\t'sourceEditing',\n\t\t\t\t'undo',\n\t\t\t\t'redo',\n\t\t\t\t'|',\n\t\t\t\t'heading',\n\t\t\t\t'|',\n\t\t\t\t'fontSize',\n\t\t\t\t'fontFamily',\n\t\t\t\t'fontColor',\n\t\t\t\t'fontBackgroundColor',\n\t\t\t\t'|',\n\t\t\t\t'bold',\n\t\t\t\t'italic',\n\t\t\t\t'underline',\n\t\t\t\t'strikethrough',\n\t\t\t\t'subscript',\n\t\t\t\t'superscript',\n\t\t\t\t'code',\n\t\t\t\t'removeFormat',\n\t\t\t\t'|',\n\t\t\t\t'horizontalLine',\n\t\t\t\t'link',\n\t\t\t\t'insertImage',\n\t\t\t\t'uploadImage',\n\t\t\t\t'insertTable',\n\t\t\t\t'highlight',\n\t\t\t\t'blockQuote',\n\t\t\t\t'codeBlock',\n\t\t\t\t'|',\n\t\t\t\t'alignment',\n\t\t\t\t'|',\n\t\t\t\t'outdent',\n\t\t\t\t'indent'\n\t\t\t],\n\t\t\tshouldNotGroupWhenFull: false\n\t\t},\n\t\tplugins: [\n\t\t\tAlignment,\n\t\t\tAutoLink,\n\t\t\tAutosave,\n\t\t\tBalloonToolbar,\n\t\t\tBlockQuote,\n\t\t\tBlockToolbar,\n\t\t\tBold,\n\t\t\tCode,\n\t\t\tCodeBlock,\n\t\t\tEssentials,\n\t\t\tFontBackgroundColor,\n\t\t\tFontColor,\n\t\t\tFontFamily,\n\t\t\tFontSize,\n\t\t\tHeading,\n\t\t\tHighlight,\n\t\t\tHorizontalLine,\n\t\t\tImageEditing,\n\t\t\tImageUtils,\n\t\t\tIndent,\n\t\t\tIndentBlock,\n\t\t\tItalic,\n\t\t\tLink,\n\t\t\tParagraph,\n\t\t\tPlainTableOutput,\n\t\t\tRemoveFormat,\n\t\t\tStrikethrough,\n\t\t\tSubscript,\n\t\t\tSuperscript,\n\t\t\tTable,\n\t\t\tTableCaption,\n\t\t\tTableCellProperties,\n\t\t\tTableColumnResize,\n\t\t\tTableProperties,\n\t\t\tTableToolbar,\n\t\t\tUnderline,\n\t\t\tGeneralHtmlSupport,\n\t\t\tSourceEditing,\n\t\t\tImage,\n\t\t\tImageBlock,\n\t\t\tImageCaption,\n\t\t\tImageEditing,\n\t\t\tImageInline,\n\t\t\tImageInsert,\n\t\t\tImageInsertViaUrl,\n\t\t\tImageResize,\n\t\t\tImageStyle,\n\t\t\tImageTextAlternative,\n\t\t\tImageToolbar,\n\t\t\tImageUpload,\n\t\t\tImageUtils,\n\t\t\tSimpleUploadAdapter,\n\t\t\tLinkImage\n\t\t],\n\t\tballoonToolbar: [\n\t\t\t'bold',\n\t\t\t'italic',\n\t\t\t'|',\n\t\t\t'link',\n\t\t\t'insertImage',\n\t\t\t'uploadImage'\n\t\t],\n\t\tblockToolbar: [\n\t\t\t'fontSize',\n\t\t\t'fontColor',\n\t\t\t'fontBackgroundColor',\n\t\t\t'|',\n\t\t\t'bold',\n\t\t\t'italic',\n\t\t\t'|',\n\t\t\t'link',\n\t\t\t'insertImage',\n\t\t\t'uploadImage',\n\t\t\t'insertTable',\n\t\t\t'|',\n\t\t\t'outdent',\n\t\t\t'indent'\n\t\t],\n\t\tfontFamily: {\n\t\t\tsupportAllValues: true\n\t\t},\n\t\tfontSize: {\n\t\t\toptions: [10, 12, 14, 'default', 18, 20, 22],\n\t\t\tsupportAllValues: true\n\t\t},\n\t\theading: {\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tmodel: 'paragraph',\n\t\t\t\t\ttitle: 'Paragraph',\n\t\t\t\t\tclass: 'ck-heading_paragraph'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodel: 'heading1',\n\t\t\t\t\tview: 'h1',\n\t\t\t\t\ttitle: 'Heading 1',\n\t\t\t\t\tclass: 'ck-heading_heading1'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodel: 'heading2',\n\t\t\t\t\tview: 'h2',\n\t\t\t\t\ttitle: 'Heading 2',\n\t\t\t\t\tclass: 'ck-heading_heading2'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodel: 'heading3',\n\t\t\t\t\tview: 'h3',\n\t\t\t\t\ttitle: 'Heading 3',\n\t\t\t\t\tclass: 'ck-heading_heading3'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodel: 'heading4',\n\t\t\t\t\tview: 'h4',\n\t\t\t\t\ttitle: 'Heading 4',\n\t\t\t\t\tclass: 'ck-heading_heading4'\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\tlicenseKey: LICENSE_KEY,\n\t\tlink: {\n\t\t\taddTargetToExternalLinks: true,\n\t\t\tdefaultProtocol: 'https://',\n\t\t\tdecorators: {\n\t\t\t\ttoggleDownloadable: {\n\t\t\t\t\tmode: 'manual',\n\t\t\t\t\tlabel: 'Downloadable',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tdownload: 'file'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmenuBar: {\n\t\t\tisVisible: true\n\t\t},\n\t\tplaceholder: 'Type or paste your content here!',\n\t\ttable: {\n\t\t\tcontentToolbar: [\n\t\t\t\t'tableColumn',\n\t\t\t\t'tableRow',\n\t\t\t\t'mergeTableCells',\n\t\t\t\t'tableProperties',\n\t\t\t\t'tableCellProperties'\n\t\t\t]\n\t\t},\n\t\thtmlSupport: {\n\t\t\tallow: [\n\t\t\t\t{\n\t\t\t\t\tname: /.*/,\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tclasses: true,\n\t\t\t\t\tstyles: true\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\timage: {\n\t\t\ttoolbar: [\n\t\t\t\t'imageTextAlternative',\n\t\t\t\t'toggleImageCaption',\n\t\t\t\t'|',\n\t\t\t\t'imageStyle:inline',\n\t\t\t\t'imageStyle:wrapText',\n\t\t\t\t'imageStyle:breakText',\n\t\t\t\t'|',\n\t\t\t\t'resizeImage',\n\t\t\t\t'|',\n\t\t\t\t'linkImage'\n\t\t\t],\n\t\t\tstyles: {\n\t\t\t\toptions: [\n\t\t\t\t\t'inline',\n\t\t\t\t\t'alignLeft',\n\t\t\t\t\t'alignRight',\n\t\t\t\t\t'alignCenter',\n\t\t\t\t\t'alignBlockLeft',\n\t\t\t\t\t'alignBlockRight',\n\t\t\t\t\t'block',\n\t\t\t\t\t'side'\n\t\t\t\t]\n\t\t\t},\n\t\t\tresizeOptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:original',\n\t\t\t\t\tlabel: 'Original size',\n\t\t\t\t\tvalue: null\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:25',\n\t\t\t\t\tlabel: '25%',\n\t\t\t\t\tvalue: '25'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:50',\n\t\t\t\t\tlabel: '50%',\n\t\t\t\t\tvalue: '50'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:75',\n\t\t\t\t\tlabel: '75%',\n\t\t\t\t\tvalue: '75'\n\t\t\t\t}\n\t\t\t],\n\t\t\tinsert: {\n\t\t\t\tintegrations: ['insertImageViaUrl']\n\t\t\t}\n\t\t},\n\t\tsimpleUpload: {\n\t\t\tuploadUrl: '/api/upload', // your upload API\n\t\t\theaders: {\n\t\t\t\tAuthorization: 'Bearer <token>'\n\t\t\t}\n\t\t},\n\t\tautosave: {\n\t\t\tsave() {\n\t\t\t\treturn new Promise((resolve) => {\n\t\t\t\t\tsetTimeout(resolve, 1000);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n\treturn { ...defaultConfig, ...customConfig };\n};\n\nexport interface CustomEditorProps {\n\teditorRef: React.RefObject<HTMLDivElement>;\n\tdata: string;\n\thandleEditorReady: (editor: ClassicEditor) => void;\n\tonError: (error: Error) => void;\n\tconfig: EditorConfig;\n\trest: any;\n}\nexport const CustomEditor = ({\n\teditorRef = React.createRef<HTMLDivElement>(),\n\tdata = '',\n\thandleEditorReady,\n\tonError,\n\tconfig = {},\n\t...rest\n}: CustomEditorProps) => {\n\tconst [isReady, setIsReady] = useState(false);\n\tconst [error, setError] = useState(null);\n\n\tuseEffect(() => {\n\t\t// Small delay to ensure DOM is ready\n\t\tconst timer = setTimeout(() => setIsReady(true), 100);\n\t\treturn () => clearTimeout(timer);\n\t}, []);\n\n\tconst editorConfig = useMemo(() => {\n\t\treturn createEditorConfig(config);\n\t}, [config]);\n\n\tconst myUploadFn = async (file) => {\n\t\t// 👇 Your existing function here\n\t\tconst uFiles = await uploadFiles([file], 'document');\n\t\tconst payload = {\n\t\t\t...getToken(),\n\t\t\ttitle: file?.name.split('.')[0],\n\t\t\tpath: '/',\n\t\t\tis_private: true,\n\t\t\tis_directory: false,\n\t\t\tfile_size: file.size,\n\t\t\tis_child: false,\n\t\t\tfile_extension: file?.name.split('.')[1],\n\t\t\ttype: 'image',\n\t\t\tmime_type: file.type,\n\t\t\turl: `${import.meta.env.VITE_S3_BUCKET_URL}${uFiles[0]}`\n\t\t};\n\t\t// Replace with your actual API endpoint\n\n\t\t// 👇 Call your existing function\n\t\tawait postV1Drive(payload);\n\t\treturn { url: payload.url };\n\t};\n\n\tconst handleReady = useCallback(\n\t\t(editor) => {\n\t\t\ttry {\n\t\t\t\thandleEditorReady?.(editor);\n\t\t\t\teditor.plugins.get('FileRepository').createUploadAdapter = (loader) => {\n\t\t\t\t\treturn new MyUploadAdapter(loader, myUploadFn);\n\t\t\t\t};\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error('Error in editor ready handler:', err);\n\t\t\t\tsetError(err);\n\t\t\t\tonError?.(err);\n\t\t\t}\n\t\t},\n\t\t[handleEditorReady, onError]\n\t);\n\n\tconst handleError = useCallback(\n\t\t(error, { willEditorRestart }) => {\n\t\t\tconsole.error('CKEditor error:', error);\n\t\t\tif (!willEditorRestart) {\n\t\t\t\tsetError(error);\n\t\t\t\tonError?.(error);\n\t\t\t}\n\t\t},\n\t\t[onError]\n\t);\n\n\tif (error) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tpadding: '20px',\n\t\t\t\t\tborder: '1px solid #red',\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\tbackgroundColor: '#fff5f5'\n\t\t\t\t}}>\n\t\t\t\t<div style={{ color: '#e53e3e', marginBottom: '10px' }}>\n\t\t\t\t\tEditor Error: {error.message}\n\t\t\t\t</div>\n\t\t\t\t<button\n\t\t\t\t\tonClick={() => setError(null)}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tpadding: '8px 16px',\n\t\t\t\t\t\tbackgroundColor: '#3182ce',\n\t\t\t\t\t\tcolor: 'white',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tborderRadius: '4px'\n\t\t\t\t\t}}>\n\t\t\t\t\tRetry\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (!isReady) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tpadding: '20px',\n\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\tborder: '1px solid #dee2e6',\n\t\t\t\t\tborderRadius: '4px'\n\t\t\t\t}}>\n\t\t\t\tLoading editor...\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div ref={editorRef} className='custom-editor-container'>\n\t\t\t<CKEditor\n\t\t\t\teditor={ClassicEditor}\n\t\t\t\tconfig={editorConfig}\n\t\t\t\tdata={data}\n\t\t\t\tonReady={handleReady}\n\t\t\t\tonError={handleError}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\nexport default CustomEditor;"],"names":["React","error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,MAAM,cAAc;AAEpB,MAAM,gBAAgB;AAAA,EACrB,YAAY,QAAQ,UAAU;AAE7B,SAAK,SAAS;AACd,SAAK,WAAW;AAAA,EACjB;AAAA;AAAA,EAGA,MAAM,SAAS;AACd,UAAM,OAAO,MAAM,KAAK,OAAO;AAC/B,QAAI;AAEH,YAAM,WAAW,MAAM,KAAK,SAAS,IAAI;AAGzC,aAAO;AAAA,QACN,SAAS,SAAS;AAAA;AAAA,MAAA;AAAA,IAEpB,SAAS,OAAO;AACf,cAAQ,MAAM,iBAAiB,KAAK;AACpC,YAAM;AAAA,IACP;AAAA,EACD;AAAA;AAAA,EAGA,QAAQ;AACP,YAAQ,IAAI,gBAAgB;AAAA,EAC7B;AACD;AAEA,SAAS,oBAAoB,QAAQ;AACpC,QAAM,YAAY,OAAO,QAAQ,IAAI,iBAAiB;AAEtD,YAAU,GAAG,uBAAuB,CAAC,KAAK,SAAS;AAClD,UAAM,UAAU,KAAK,QAAQ,SAAS,CAAC;AAGvC,QAAI,WAAW,QAAQ,GAAG,YAAY,GAAG;AACxC,YAAM,MAAM,QAAQ,KAAK,KAAA;AAGzB,UAAI,IAAI,MAAM,iCAAiC,GAAG;AACjD,cAAM,eAAe,OAAO,MAAM,OAAO,CAAC,WAAW;AACpD,iBAAO,OAAO,cAAc,cAAc;AAAA,YACzC,KAAK;AAAA,UAAA,CACL;AAAA,QACF,CAAC;AAED,eAAO,MAAM;AAAA,UACZ;AAAA,UACA,OAAO,MAAM,SAAS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R,GAAG;AAAA,IAAA;AAAA,EAAA,GAEN;AAEF;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react");;/* empty css */var o=;/* empty css */;/* empty css */var t=,/* empty css */
|
|
2
|
-
/* @__PURE__ */e.jsxs("div",{style:{color:"#e53e3e",marginBottom:"10px"},children:["Editor Error: ",
|
|
3
|
-
/* @__PURE__ */e.jsx("button",{onClick:()=>
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react");;/* empty css */var o=;/* empty css */;/* empty css */var t=,/* empty css */r=,/* empty css */d=,/* empty css */n=,/* empty css */l=,/* empty css */a=,/* empty css */s=,/* empty css */u=,/* empty css */c=,/* empty css */m=,/* empty css */g=,/* empty css */p=,/* empty css */k=,/* empty css */x=,/* empty css */h=,/* empty css */b=,/* empty css */f=,/* empty css */j=,/* empty css */I=,/* empty css */_=,/* empty css */v=,/* empty css */y=,/* empty css */q=,/* empty css */T=;/* empty css */function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var w=/* @__PURE__ */C(i);class z{constructor(e,i){this.loader=e,this.uploadFn=i}async upload(){const e=await this.loader.file;try{return{default:(await this.uploadFn(e)).url}}catch(i){throw i}}abort(){}}function B(e){e.plugins.get(T.ClipboardPipeline).on("inputTransformation",(i,o)=>{const t=o.content.getChild(0);if(t&&t.is("$textProxy")){const o=t.data.trim();if(o.match(/\.(jpeg|jpg|gif|png|webp|svg)$/i)){const t=e.model.change(e=>e.createElement("imageBlock",{src:o}));e.model.insertContent(t,e.model.document.selection),i.stop()}}})}const E=({editorRef:T=w.default.createRef(),data:C="",handleEditorReady:E,onError:S,config:R={},...F})=>{const[P,A]=i.useState(!1),[L,U]=i.useState(null);i.useEffect(()=>{const e=setTimeout(()=>A(!0),100);return()=>clearTimeout(e)},[]);const H=i.useMemo(()=>((e={})=>({extraPlugins:[B,b.AutoImage],toolbar:{items:["sourceEditing","undo","redo","|","heading","|","fontSize","fontFamily","fontColor","fontBackgroundColor","|","bold","italic","underline","strikethrough","subscript","superscript","code","removeFormat","|","horizontalLine","link","insertImage","uploadImage","insertTable","highlight","blockQuote","codeBlock","|","alignment","|","outdent","indent"],shouldNotGroupWhenFull:!1},plugins:[n.Alignment,l.AutoLink,a.Autosave,s.BalloonToolbar,u.BlockQuote,s.BlockToolbar,c.Bold,c.Code,m.CodeBlock,g.Essentials,p.FontBackgroundColor,p.FontColor,p.FontFamily,p.FontSize,k.Heading,x.Highlight,h.HorizontalLine,b.ImageEditing,b.ImageUtils,f.Indent,f.IndentBlock,c.Italic,l.Link,j.Paragraph,I.PlainTableOutput,_.RemoveFormat,c.Strikethrough,c.Subscript,c.Superscript,I.Table,I.TableCaption,I.TableCellProperties,I.TableColumnResize,I.TableProperties,I.TableToolbar,c.Underline,v.GeneralHtmlSupport,y.SourceEditing,b.Image,b.ImageBlock,b.ImageCaption,b.ImageEditing,b.ImageInline,b.ImageInsert,b.ImageInsertViaUrl,b.ImageResize,b.ImageStyle,b.ImageTextAlternative,b.ImageToolbar,b.ImageUpload,b.ImageUtils,q.SimpleUploadAdapter,l.LinkImage],balloonToolbar:["bold","italic","|","link","insertImage","uploadImage"],blockToolbar:["fontSize","fontColor","fontBackgroundColor","|","bold","italic","|","link","insertImage","uploadImage","insertTable","|","outdent","indent"],fontFamily:{supportAllValues:!0},fontSize:{options:[10,12,14,"default",18,20,22],supportAllValues:!0},heading:{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h1",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h2",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h3",title:"Heading 3",class:"ck-heading_heading3"},{model:"heading4",view:"h4",title:"Heading 4",class:"ck-heading_heading4"}]},licenseKey:"GPL",link:{addTargetToExternalLinks:!0,defaultProtocol:"https://",decorators:{toggleDownloadable:{mode:"manual",label:"Downloadable",attributes:{download:"file"}}}},menuBar:{isVisible:!0},placeholder:"Type or paste your content here!",table:{contentToolbar:["tableColumn","tableRow","mergeTableCells","tableProperties","tableCellProperties"]},htmlSupport:{allow:[{name:/.*/,attributes:!0,classes:!0,styles:!0}]},image:{toolbar:["imageTextAlternative","toggleImageCaption","|","imageStyle:inline","imageStyle:wrapText","imageStyle:breakText","|","resizeImage","|","linkImage"],styles:{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]},resizeOptions:[{name:"resizeImage:original",label:"Original size",value:null},{name:"resizeImage:25",label:"25%",value:"25"},{name:"resizeImage:50",label:"50%",value:"50"},{name:"resizeImage:75",label:"75%",value:"75"}],insert:{integrations:["insertImageViaUrl"]}},simpleUpload:{uploadUrl:"/api/upload",headers:{Authorization:"Bearer <token>"}},autosave:{save:()=>new Promise(e=>{setTimeout(e,1e3)})},...e}))(R),[R]),V=async e=>{const i=await r.uploadFiles([e],"document"),o={...r.getToken(),title:null==e?void 0:e.name.split(".")[0],path:"/",is_private:!0,is_directory:!1,file_size:e.size,is_child:!1,file_extension:null==e?void 0:e.name.split(".")[1],type:"image",mime_type:e.type,url:`https://erpforce-dev.s3.eu-west-1.amazonaws.com/${i[0]}`};return await t.postV1Drive(o),{url:o.url}},O=i.useCallback(e=>{try{null==E||E(e),e.plugins.get("FileRepository").createUploadAdapter=e=>new z(e,V)}catch(i){U(i),null==S||S(i)}},[E,S]),D=i.useCallback((e,{willEditorRestart:i})=>{i||(U(e),null==S||S(e))},[S]);return L?/* @__PURE__ */e.jsxs("div",{style:{padding:"20px",border:"1px solid #red",borderRadius:"4px",backgroundColor:"#fff5f5"},children:[
|
|
2
|
+
/* @__PURE__ */e.jsxs("div",{style:{color:"#e53e3e",marginBottom:"10px"},children:["Editor Error: ",L.message]}),
|
|
3
|
+
/* @__PURE__ */e.jsx("button",{onClick:()=>U(null),style:{padding:"8px 16px",backgroundColor:"#3182ce",color:"white",border:"none",borderRadius:"4px"},children:"Retry"})]}):P?/* @__PURE__ */e.jsx("div",{ref:T,className:"custom-editor-container",children:/* @__PURE__ */e.jsx(o.CKEditor,{editor:d.ClassicEditor,config:H,data:C,onReady:O,onError:D,...F})}):/* @__PURE__ */e.jsx("div",{style:{padding:"20px",textAlign:"center",border:"1px solid #dee2e6",borderRadius:"4px"},children:"Loading editor..."})};exports.CustomEditor=E,exports.default=E;
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/editor/custom-editor.tsx"],"sourcesContent":["/* eslint-disable unused-imports/no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n// IsolatedEditor.js - This file should ONLY be imported via React.lazy()\nimport React, { useState, useEffect, useMemo, useCallback } from 'react';\nimport \"./custom-editor.css\"\n\n// Import ALL CKEditor dependencies in this file ONLY\n// Do NOT import these anywhere else in your application\nimport { CKEditor } from '@ckeditor/ckeditor5-react';\nimport {\n ClassicEditor,\n Alignment,\n AutoLink,\n Autosave,\n BalloonToolbar,\n BlockQuote,\n BlockToolbar,\n Bold,\n Code,\n CodeBlock,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontFamily,\n FontSize,\n Heading,\n Highlight,\n HorizontalLine,\n ImageEditing,\n ImageUtils,\n Indent,\n IndentBlock,\n Italic,\n Link,\n Paragraph,\n PlainTableOutput,\n RemoveFormat,\n Strikethrough,\n Subscript,\n Superscript,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n GeneralHtmlSupport,\n SourceEditing,\n // Image support\n Image,\n ImageBlock,\n ImageInline,\n ImageToolbar,\n ImageCaption,\n ImageStyle,\n ImageResize,\n ImageInsert,\n ImageInsertViaUrl,\n ImageUpload,\n ImageTextAlternative,\n SimpleUploadAdapter,\n LinkImage,\n ClipboardPipeline,\n AutoImage,\n} from 'ckeditor5';\n\nimport 'ckeditor5/ckeditor5.css';\nimport { postV1Drive } from '../../api-client/api.drive/api';\nimport { getToken, uploadFiles } from '../../utils/common';\n\nconst LICENSE_KEY = 'GPL';\n\n\nclass MyUploadAdapter {\n constructor(loader, uploadFn) {\n // The file loader instance to use during the upload\n this.loader = loader;\n this.uploadFn = uploadFn;\n }\n\n // Starts the upload process\n async upload() {\n const file = await this.loader.file;\n try {\n // 👇 Call your existing function\n const response = await this.uploadFn(file);\n\n // CKEditor expects this format:\n return {\n default: response.url // must return final image URL\n };\n } catch (error) {\n console.error(\"Upload failed\", error);\n throw error;\n }\n }\n\n // Optional abort support\n abort() {\n console.log(\"Upload aborted\");\n }\n}\n\nfunction PasteImageUrlPlugin(editor) {\n const clipboard = editor.plugins.get(ClipboardPipeline);\n\n clipboard.on('inputTransformation', (evt, data) => {\n const content = data.content.getChild(0);\n\n // Check if pasted content is plain text\n if (content && content.is('$textProxy')) {\n const url = content.data.trim();\n\n // Check if it looks like an image URL\n if (url.match(/\\.(jpeg|jpg|gif|png|webp|svg)$/i)) {\n const imageElement = editor.model.change(writer => {\n return writer.createElement('imageBlock', {\n src: url\n });\n });\n\n editor.model.insertContent(imageElement, editor.model.document.selection);\n evt.stop(); // prevent default plain text paste\n }\n }\n });\n}\n\n\n// Create the editor configuration\nconst createEditorConfig = (customConfig = {}) => {\n const defaultConfig = {\n extraPlugins: [ PasteImageUrlPlugin, AutoImage ],\n toolbar: {\n items: [\n 'sourceEditing',\n 'undo',\n 'redo',\n '|',\n 'heading',\n '|',\n 'fontSize',\n 'fontFamily',\n 'fontColor',\n 'fontBackgroundColor',\n '|',\n 'bold',\n 'italic',\n 'underline',\n 'strikethrough',\n 'subscript',\n 'superscript',\n 'code',\n 'removeFormat',\n '|',\n 'horizontalLine',\n 'link',\n 'insertImage', 'uploadImage',\n 'insertTable',\n 'highlight',\n 'blockQuote',\n 'codeBlock',\n '|',\n 'alignment',\n '|',\n 'outdent',\n 'indent',\n ],\n shouldNotGroupWhenFull: false\n },\n plugins: [\n Alignment,\n AutoLink,\n Autosave,\n BalloonToolbar,\n BlockQuote,\n BlockToolbar,\n Bold,\n Code,\n CodeBlock,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontFamily,\n FontSize,\n Heading,\n Highlight,\n HorizontalLine,\n ImageEditing,\n ImageUtils,\n Indent,\n IndentBlock,\n Italic,\n Link,\n Paragraph,\n PlainTableOutput,\n RemoveFormat,\n Strikethrough,\n Subscript,\n Superscript,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n GeneralHtmlSupport,\n SourceEditing,\n Image,\n ImageBlock,\n ImageCaption,\n ImageEditing,\n ImageInline,\n ImageInsert,\n ImageInsertViaUrl,\n ImageResize,\n ImageStyle,\n ImageTextAlternative,\n ImageToolbar,\n ImageUpload,\n ImageUtils,\n SimpleUploadAdapter,\n LinkImage\n ],\n balloonToolbar: ['bold', 'italic', '|', 'link', 'insertImage', 'uploadImage',],\n blockToolbar: [\n 'fontSize',\n 'fontColor',\n 'fontBackgroundColor',\n '|',\n 'bold',\n 'italic',\n '|',\n 'link',\n 'insertImage', 'uploadImage',\n 'insertTable',\n '|',\n 'outdent',\n 'indent'\n ],\n fontFamily: {\n supportAllValues: true\n },\n fontSize: {\n options: [10, 12, 14, 'default', 18, 20, 22],\n supportAllValues: true\n },\n heading: {\n options: [\n {\n model: 'paragraph',\n title: 'Paragraph',\n class: 'ck-heading_paragraph'\n },\n {\n model: 'heading1',\n view: 'h1',\n title: 'Heading 1',\n class: 'ck-heading_heading1'\n },\n {\n model: 'heading2',\n view: 'h2',\n title: 'Heading 2',\n class: 'ck-heading_heading2'\n },\n {\n model: 'heading3',\n view: 'h3',\n title: 'Heading 3',\n class: 'ck-heading_heading3'\n },\n {\n model: 'heading4',\n view: 'h4',\n title: 'Heading 4',\n class: 'ck-heading_heading4'\n }\n ]\n },\n licenseKey: LICENSE_KEY,\n link: {\n addTargetToExternalLinks: true,\n defaultProtocol: 'https://',\n decorators: {\n toggleDownloadable: {\n mode: 'manual',\n label: 'Downloadable',\n attributes: {\n download: 'file',\n }\n }\n }\n },\n menuBar: {\n isVisible: true\n },\n placeholder: 'Type or paste your content here!',\n table: {\n contentToolbar: [\n 'tableColumn', \n 'tableRow', \n 'mergeTableCells', \n 'tableProperties', \n 'tableCellProperties'\n ]\n },\n htmlSupport: {\n allow: [\n {\n name: /.*/,\n attributes: true,\n classes: true,\n styles: true\n }\n ]\n },\n image: {\n toolbar: [\n 'imageTextAlternative',\n 'toggleImageCaption',\n '|',\n 'imageStyle:inline',\n 'imageStyle:wrapText',\n 'imageStyle:breakText',\n '|',\n 'resizeImage',\n '|',\n 'linkImage'\n ],\n styles: {\n options: [\n 'inline',\n 'alignLeft',\n 'alignRight',\n 'alignCenter',\n 'alignBlockLeft',\n 'alignBlockRight',\n 'block',\n 'side'\n ]\n },\n resizeOptions: [\n {\n name: 'resizeImage:original',\n label: 'Original size',\n value: null\n },\n {\n name: 'resizeImage:25',\n label: '25%',\n value: '25'\n },\n {\n name: 'resizeImage:50',\n label: '50%',\n value: '50'\n },\n {\n name: 'resizeImage:75',\n label: '75%',\n value: '75'\n }\n ],\n insert: {\n integrations: ['insertImageViaUrl']\n }\n },\n simpleUpload: {\n uploadUrl: '/api/upload', // your upload API\n headers: {\n Authorization: 'Bearer <token>'\n }\n },\n autosave: {\n save() {\n return new Promise(resolve => {\n setTimeout(resolve, 1000);\n });\n }\n }\n };\n\n return { ...defaultConfig, ...customConfig };\n};\n\nexport default function CustomEditor({\n editorRef,\n data = '',\n handleEditorReady,\n onError,\n config = {},\n ...rest\n}) {\n const [isReady, setIsReady] = useState(false);\n const [error, setError] = useState(null);\n\n useEffect(() => {\n // Small delay to ensure DOM is ready\n const timer = setTimeout(() => setIsReady(true), 100);\n return () => clearTimeout(timer);\n }, []);\n\n const editorConfig = useMemo(() => {\n return createEditorConfig(config);\n }, [config]);\n\n const myUploadFn = async (file) => {\n // 👇 Your existing function here\n const uFiles = await uploadFiles([file], \"document\");\n const payload = {\n ...getToken(),\n \"title\": file?.name.split(\".\")[0],\n \"path\": \"/\",\n \"is_private\": true,\n \"is_directory\": false,\n \"file_size\": file.size,\n \"is_child\": false,\n \"file_extension\": file?.name.split(\".\")[1],\n \"type\": \"image\",\n \"mime_type\": file.type,\n \"url\": `${import.meta.env.VITE_S3_BUCKET_URL}${uFiles[0]}`\n }\n // Replace with your actual API endpoint\n \n // 👇 Call your existing function\n await postV1Drive(payload);\n return { url: payload.url };\n };\n\n const handleReady = useCallback((editor) => {\n try {\n handleEditorReady?.(editor);\n editor.plugins.get('FileRepository').createUploadAdapter = (loader) => {\n return new MyUploadAdapter(loader, myUploadFn);\n };\n } catch (err) {\n console.error('Error in editor ready handler:', err);\n setError(err);\n onError?.(err);\n }\n }, [handleEditorReady, onError]);\n\n const handleError = useCallback((error, { willEditorRestart }) => {\n console.error('CKEditor error:', error);\n if (!willEditorRestart) {\n setError(error);\n onError?.(error);\n }\n }, [onError]);\n\n if (error) {\n return (\n <div style={{\n padding: '20px',\n border: '1px solid #red',\n borderRadius: '4px',\n backgroundColor: '#fff5f5'\n }}>\n <div style={{ color: '#e53e3e', marginBottom: '10px' }}>\n Editor Error: {error.message}\n </div>\n <button \n onClick={() => setError(null)}\n style={{\n padding: '8px 16px',\n backgroundColor: '#3182ce',\n color: 'white',\n border: 'none',\n borderRadius: '4px'\n }}\n >\n Retry\n </button>\n </div>\n );\n }\n\n if (!isReady) {\n return (\n <div style={{\n padding: '20px',\n textAlign: 'center',\n border: '1px solid #dee2e6',\n borderRadius: '4px'\n }}>\n Loading editor...\n </div>\n );\n }\n\n return (\n <div ref={editorRef} className=\"custom-editor-container\">\n <CKEditor \n editor={ClassicEditor} \n config={editorConfig} \n data={data} \n onReady={handleReady}\n onError={handleError}\n {...rest}\n />\n </div>\n );\n}"],"names":["MyUploadAdapter","constructor","loader","uploadFn","this","upload","file","default","url","error","abort","PasteImageUrlPlugin","editor","plugins","get","ClipboardPipeline","on","evt","data","content","getChild","is","trim","match","imageElement","model","change","writer","createElement","src","insertContent","document","selection","stop","editorRef","handleEditorReady","onError","config","rest","isReady","setIsReady","useState","setError","useEffect","timer","setTimeout","clearTimeout","editorConfig","useMemo","customConfig","extraPlugins","AutoImage","toolbar","items","shouldNotGroupWhenFull","Alignment","AutoLink","Autosave","BalloonToolbar","BlockQuote","BlockToolbar","Bold","Code","CodeBlock","Essentials","FontBackgroundColor","FontColor","FontFamily","FontSize","Heading","Highlight","HorizontalLine","ImageEditing","ImageUtils","Indent","IndentBlock","Italic","Link","Paragraph","PlainTableOutput","RemoveFormat","Strikethrough","Subscript","Superscript","Table","TableCaption","TableCellProperties","TableColumnResize","TableProperties","TableToolbar","Underline","GeneralHtmlSupport","SourceEditing","Image","ImageBlock","ImageCaption","ImageInline","ImageInsert","ImageInsertViaUrl","ImageResize","ImageStyle","ImageTextAlternative","ImageToolbar","ImageUpload","SimpleUploadAdapter","LinkImage","balloonToolbar","blockToolbar","fontFamily","supportAllValues","fontSize","options","heading","title","class","view","licenseKey","link","addTargetToExternalLinks","defaultProtocol","decorators","toggleDownloadable","mode","label","attributes","download","menuBar","isVisible","placeholder","table","contentToolbar","htmlSupport","allow","name","classes","styles","image","resizeOptions","value","insert","integrations","simpleUpload","uploadUrl","headers","Authorization","autosave","save","Promise","resolve","createEditorConfig","myUploadFn","async","uFiles","uploadFiles","payload","getToken","split","path","is_private","is_directory","file_size","size","is_child","file_extension","type","mime_type","postV1Drive","handleReady","useCallback","createUploadAdapter","err","handleError","willEditorRestart","jsxs","style","padding","border","borderRadius","backgroundColor","children","color","marginBottom","message","jsx","onClick","ref","className","CKEditor","ClassicEditor","onReady","textAlign"],"mappings":"ivEA0EA,MAAMA,EACJ,WAAAC,CAAYC,EAAQC,GAElBC,KAAKF,OAASA,EACdE,KAAKD,SAAWA,CAClB,CAGA,YAAME,GACJ,MAAMC,QAAaF,KAAKF,OAAOI,KAC/B,IAKE,MAAO,CACLC,eAJqBH,KAAKD,SAASG,IA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C,QAAQC,IAAI,kBAAkB2J,oBAAuBvK,GACnD,IAAIF,EAAgBE,EAAQoJ,EAEvC,OAASoB,GAEPhI,EAASgI,GACT,MAAAtI,GAAAA,EAAUsI,EACZ,GACC,CAACvI,EAAmBC,IAEjBuI,EAAcH,EAAAA,YAAY,CAAC/J,GAASmK,wBAEnCA,IACHlI,EAASjC,GACT,MAAA2B,GAAAA,EAAU3B,KAEX,CAAC2B,IAEJ,OAAI3B,iBAEAoK,EAAAA,KAAC,OAAIC,MAAO,CACVC,QAAS,OACTC,OAAQ,iBACRC,aAAc,MACdC,gBAAiB,WAEjBC,SAAA;eAAAN,OAAC,OAAIC,MAAO,CAAEM,MAAO,UAAWC,aAAc,QAAUF,SAAA,CAAA,iBACvC1K,EAAM6K;eAEvBC,EAAAA,IAAC,SAAA,CACCC,QAAS,IAAM9I,EAAS,MACxBoI,MAAO,CACLC,QAAS,WACTG,gBAAiB,UACjBE,MAAO,QACPJ,OAAQ,OACRC,aAAc,OAEjBE,SAAA,aAOF5I,uBAcF,MAAA,CAAIkJ,IAAKvJ,EAAWwJ,UAAU,0BAC7BP,wBAAAI,EAAAA,IAACI,EAAAA,SAAA,CACC/K,OAAQgL,EAAAA,cACRvJ,OAAQU,EACR7B,OACA2K,QAAStB,EACTnI,QAASuI,KACLrI,qBAnBNiJ,EAAAA,IAAC,OAAIT,MAAO,CACVC,QAAS,OACTe,UAAW,SACXd,OAAQ,oBACRC,aAAc,OACbE,SAAA,qBAkBT"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/editor/custom-editor.tsx"],"sourcesContent":["/* eslint-disable unused-imports/no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n// IsolatedEditor.js - This file should ONLY be imported via React.lazy()\nimport React, { useState, useEffect, useMemo, useCallback } from 'react';\nimport './custom-editor.css';\n\n// Import ALL CKEditor dependencies in this file ONLY\n// Do NOT import these anywhere else in your application\nimport { CKEditor } from '@ckeditor/ckeditor5-react';\nimport {\n\tClassicEditor,\n\tAlignment,\n\tAutoLink,\n\tAutosave,\n\tBalloonToolbar,\n\tBlockQuote,\n\tBlockToolbar,\n\tBold,\n\tCode,\n\tCodeBlock,\n\tEssentials,\n\tFontBackgroundColor,\n\tFontColor,\n\tFontFamily,\n\tFontSize,\n\tHeading,\n\tHighlight,\n\tHorizontalLine,\n\tImageEditing,\n\tImageUtils,\n\tIndent,\n\tIndentBlock,\n\tItalic,\n\tLink,\n\tParagraph,\n\tPlainTableOutput,\n\tRemoveFormat,\n\tStrikethrough,\n\tSubscript,\n\tSuperscript,\n\tTable,\n\tTableCaption,\n\tTableCellProperties,\n\tTableColumnResize,\n\tTableProperties,\n\tTableToolbar,\n\tUnderline,\n\tGeneralHtmlSupport,\n\tSourceEditing,\n\t// Image support\n\tImage,\n\tImageBlock,\n\tImageInline,\n\tImageToolbar,\n\tImageCaption,\n\tImageStyle,\n\tImageResize,\n\tImageInsert,\n\tImageInsertViaUrl,\n\tImageUpload,\n\tImageTextAlternative,\n\tSimpleUploadAdapter,\n\tLinkImage,\n\tClipboardPipeline,\n\tAutoImage,\n EditorConfig\n} from 'ckeditor5';\n\nimport 'ckeditor5/ckeditor5.css';\nimport { postV1Drive } from '../../api-client/api.drive/api';\nimport { getToken, uploadFiles } from '../../utils/common';\n\nconst LICENSE_KEY = 'GPL';\n\nclass MyUploadAdapter {\n\tconstructor(loader, uploadFn) {\n\t\t// The file loader instance to use during the upload\n\t\tthis.loader = loader;\n\t\tthis.uploadFn = uploadFn;\n\t}\n\n\t// Starts the upload process\n\tasync upload() {\n\t\tconst file = await this.loader.file;\n\t\ttry {\n\t\t\t// 👇 Call your existing function\n\t\t\tconst response = await this.uploadFn(file);\n\n\t\t\t// CKEditor expects this format:\n\t\t\treturn {\n\t\t\t\tdefault: response.url // must return final image URL\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconsole.error('Upload failed', error);\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\t// Optional abort support\n\tabort() {\n\t\tconsole.log('Upload aborted');\n\t}\n}\n\nfunction PasteImageUrlPlugin(editor) {\n\tconst clipboard = editor.plugins.get(ClipboardPipeline);\n\n\tclipboard.on('inputTransformation', (evt, data) => {\n\t\tconst content = data.content.getChild(0);\n\n\t\t// Check if pasted content is plain text\n\t\tif (content && content.is('$textProxy')) {\n\t\t\tconst url = content.data.trim();\n\n\t\t\t// Check if it looks like an image URL\n\t\t\tif (url.match(/\\.(jpeg|jpg|gif|png|webp|svg)$/i)) {\n\t\t\t\tconst imageElement = editor.model.change((writer) => {\n\t\t\t\t\treturn writer.createElement('imageBlock', {\n\t\t\t\t\t\tsrc: url\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\teditor.model.insertContent(\n\t\t\t\t\timageElement,\n\t\t\t\t\teditor.model.document.selection\n\t\t\t\t);\n\t\t\t\tevt.stop(); // prevent default plain text paste\n\t\t\t}\n\t\t}\n\t});\n}\n\n// Create the editor configuration\nconst createEditorConfig = (customConfig = {}) => {\n\tconst defaultConfig = {\n\t\textraPlugins: [PasteImageUrlPlugin, AutoImage],\n\t\ttoolbar: {\n\t\t\titems: [\n\t\t\t\t'sourceEditing',\n\t\t\t\t'undo',\n\t\t\t\t'redo',\n\t\t\t\t'|',\n\t\t\t\t'heading',\n\t\t\t\t'|',\n\t\t\t\t'fontSize',\n\t\t\t\t'fontFamily',\n\t\t\t\t'fontColor',\n\t\t\t\t'fontBackgroundColor',\n\t\t\t\t'|',\n\t\t\t\t'bold',\n\t\t\t\t'italic',\n\t\t\t\t'underline',\n\t\t\t\t'strikethrough',\n\t\t\t\t'subscript',\n\t\t\t\t'superscript',\n\t\t\t\t'code',\n\t\t\t\t'removeFormat',\n\t\t\t\t'|',\n\t\t\t\t'horizontalLine',\n\t\t\t\t'link',\n\t\t\t\t'insertImage',\n\t\t\t\t'uploadImage',\n\t\t\t\t'insertTable',\n\t\t\t\t'highlight',\n\t\t\t\t'blockQuote',\n\t\t\t\t'codeBlock',\n\t\t\t\t'|',\n\t\t\t\t'alignment',\n\t\t\t\t'|',\n\t\t\t\t'outdent',\n\t\t\t\t'indent'\n\t\t\t],\n\t\t\tshouldNotGroupWhenFull: false\n\t\t},\n\t\tplugins: [\n\t\t\tAlignment,\n\t\t\tAutoLink,\n\t\t\tAutosave,\n\t\t\tBalloonToolbar,\n\t\t\tBlockQuote,\n\t\t\tBlockToolbar,\n\t\t\tBold,\n\t\t\tCode,\n\t\t\tCodeBlock,\n\t\t\tEssentials,\n\t\t\tFontBackgroundColor,\n\t\t\tFontColor,\n\t\t\tFontFamily,\n\t\t\tFontSize,\n\t\t\tHeading,\n\t\t\tHighlight,\n\t\t\tHorizontalLine,\n\t\t\tImageEditing,\n\t\t\tImageUtils,\n\t\t\tIndent,\n\t\t\tIndentBlock,\n\t\t\tItalic,\n\t\t\tLink,\n\t\t\tParagraph,\n\t\t\tPlainTableOutput,\n\t\t\tRemoveFormat,\n\t\t\tStrikethrough,\n\t\t\tSubscript,\n\t\t\tSuperscript,\n\t\t\tTable,\n\t\t\tTableCaption,\n\t\t\tTableCellProperties,\n\t\t\tTableColumnResize,\n\t\t\tTableProperties,\n\t\t\tTableToolbar,\n\t\t\tUnderline,\n\t\t\tGeneralHtmlSupport,\n\t\t\tSourceEditing,\n\t\t\tImage,\n\t\t\tImageBlock,\n\t\t\tImageCaption,\n\t\t\tImageEditing,\n\t\t\tImageInline,\n\t\t\tImageInsert,\n\t\t\tImageInsertViaUrl,\n\t\t\tImageResize,\n\t\t\tImageStyle,\n\t\t\tImageTextAlternative,\n\t\t\tImageToolbar,\n\t\t\tImageUpload,\n\t\t\tImageUtils,\n\t\t\tSimpleUploadAdapter,\n\t\t\tLinkImage\n\t\t],\n\t\tballoonToolbar: [\n\t\t\t'bold',\n\t\t\t'italic',\n\t\t\t'|',\n\t\t\t'link',\n\t\t\t'insertImage',\n\t\t\t'uploadImage'\n\t\t],\n\t\tblockToolbar: [\n\t\t\t'fontSize',\n\t\t\t'fontColor',\n\t\t\t'fontBackgroundColor',\n\t\t\t'|',\n\t\t\t'bold',\n\t\t\t'italic',\n\t\t\t'|',\n\t\t\t'link',\n\t\t\t'insertImage',\n\t\t\t'uploadImage',\n\t\t\t'insertTable',\n\t\t\t'|',\n\t\t\t'outdent',\n\t\t\t'indent'\n\t\t],\n\t\tfontFamily: {\n\t\t\tsupportAllValues: true\n\t\t},\n\t\tfontSize: {\n\t\t\toptions: [10, 12, 14, 'default', 18, 20, 22],\n\t\t\tsupportAllValues: true\n\t\t},\n\t\theading: {\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tmodel: 'paragraph',\n\t\t\t\t\ttitle: 'Paragraph',\n\t\t\t\t\tclass: 'ck-heading_paragraph'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodel: 'heading1',\n\t\t\t\t\tview: 'h1',\n\t\t\t\t\ttitle: 'Heading 1',\n\t\t\t\t\tclass: 'ck-heading_heading1'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodel: 'heading2',\n\t\t\t\t\tview: 'h2',\n\t\t\t\t\ttitle: 'Heading 2',\n\t\t\t\t\tclass: 'ck-heading_heading2'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodel: 'heading3',\n\t\t\t\t\tview: 'h3',\n\t\t\t\t\ttitle: 'Heading 3',\n\t\t\t\t\tclass: 'ck-heading_heading3'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodel: 'heading4',\n\t\t\t\t\tview: 'h4',\n\t\t\t\t\ttitle: 'Heading 4',\n\t\t\t\t\tclass: 'ck-heading_heading4'\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\tlicenseKey: LICENSE_KEY,\n\t\tlink: {\n\t\t\taddTargetToExternalLinks: true,\n\t\t\tdefaultProtocol: 'https://',\n\t\t\tdecorators: {\n\t\t\t\ttoggleDownloadable: {\n\t\t\t\t\tmode: 'manual',\n\t\t\t\t\tlabel: 'Downloadable',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tdownload: 'file'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmenuBar: {\n\t\t\tisVisible: true\n\t\t},\n\t\tplaceholder: 'Type or paste your content here!',\n\t\ttable: {\n\t\t\tcontentToolbar: [\n\t\t\t\t'tableColumn',\n\t\t\t\t'tableRow',\n\t\t\t\t'mergeTableCells',\n\t\t\t\t'tableProperties',\n\t\t\t\t'tableCellProperties'\n\t\t\t]\n\t\t},\n\t\thtmlSupport: {\n\t\t\tallow: [\n\t\t\t\t{\n\t\t\t\t\tname: /.*/,\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tclasses: true,\n\t\t\t\t\tstyles: true\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\timage: {\n\t\t\ttoolbar: [\n\t\t\t\t'imageTextAlternative',\n\t\t\t\t'toggleImageCaption',\n\t\t\t\t'|',\n\t\t\t\t'imageStyle:inline',\n\t\t\t\t'imageStyle:wrapText',\n\t\t\t\t'imageStyle:breakText',\n\t\t\t\t'|',\n\t\t\t\t'resizeImage',\n\t\t\t\t'|',\n\t\t\t\t'linkImage'\n\t\t\t],\n\t\t\tstyles: {\n\t\t\t\toptions: [\n\t\t\t\t\t'inline',\n\t\t\t\t\t'alignLeft',\n\t\t\t\t\t'alignRight',\n\t\t\t\t\t'alignCenter',\n\t\t\t\t\t'alignBlockLeft',\n\t\t\t\t\t'alignBlockRight',\n\t\t\t\t\t'block',\n\t\t\t\t\t'side'\n\t\t\t\t]\n\t\t\t},\n\t\t\tresizeOptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:original',\n\t\t\t\t\tlabel: 'Original size',\n\t\t\t\t\tvalue: null\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:25',\n\t\t\t\t\tlabel: '25%',\n\t\t\t\t\tvalue: '25'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:50',\n\t\t\t\t\tlabel: '50%',\n\t\t\t\t\tvalue: '50'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'resizeImage:75',\n\t\t\t\t\tlabel: '75%',\n\t\t\t\t\tvalue: '75'\n\t\t\t\t}\n\t\t\t],\n\t\t\tinsert: {\n\t\t\t\tintegrations: ['insertImageViaUrl']\n\t\t\t}\n\t\t},\n\t\tsimpleUpload: {\n\t\t\tuploadUrl: '/api/upload', // your upload API\n\t\t\theaders: {\n\t\t\t\tAuthorization: 'Bearer <token>'\n\t\t\t}\n\t\t},\n\t\tautosave: {\n\t\t\tsave() {\n\t\t\t\treturn new Promise((resolve) => {\n\t\t\t\t\tsetTimeout(resolve, 1000);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\n\treturn { ...defaultConfig, ...customConfig };\n};\n\nexport interface CustomEditorProps {\n\teditorRef: React.RefObject<HTMLDivElement>;\n\tdata: string;\n\thandleEditorReady: (editor: ClassicEditor) => void;\n\tonError: (error: Error) => void;\n\tconfig: EditorConfig;\n\trest: any;\n}\nexport const CustomEditor = ({\n\teditorRef = React.createRef<HTMLDivElement>(),\n\tdata = '',\n\thandleEditorReady,\n\tonError,\n\tconfig = {},\n\t...rest\n}: CustomEditorProps) => {\n\tconst [isReady, setIsReady] = useState(false);\n\tconst [error, setError] = useState(null);\n\n\tuseEffect(() => {\n\t\t// Small delay to ensure DOM is ready\n\t\tconst timer = setTimeout(() => setIsReady(true), 100);\n\t\treturn () => clearTimeout(timer);\n\t}, []);\n\n\tconst editorConfig = useMemo(() => {\n\t\treturn createEditorConfig(config);\n\t}, [config]);\n\n\tconst myUploadFn = async (file) => {\n\t\t// 👇 Your existing function here\n\t\tconst uFiles = await uploadFiles([file], 'document');\n\t\tconst payload = {\n\t\t\t...getToken(),\n\t\t\ttitle: file?.name.split('.')[0],\n\t\t\tpath: '/',\n\t\t\tis_private: true,\n\t\t\tis_directory: false,\n\t\t\tfile_size: file.size,\n\t\t\tis_child: false,\n\t\t\tfile_extension: file?.name.split('.')[1],\n\t\t\ttype: 'image',\n\t\t\tmime_type: file.type,\n\t\t\turl: `${import.meta.env.VITE_S3_BUCKET_URL}${uFiles[0]}`\n\t\t};\n\t\t// Replace with your actual API endpoint\n\n\t\t// 👇 Call your existing function\n\t\tawait postV1Drive(payload);\n\t\treturn { url: payload.url };\n\t};\n\n\tconst handleReady = useCallback(\n\t\t(editor) => {\n\t\t\ttry {\n\t\t\t\thandleEditorReady?.(editor);\n\t\t\t\teditor.plugins.get('FileRepository').createUploadAdapter = (loader) => {\n\t\t\t\t\treturn new MyUploadAdapter(loader, myUploadFn);\n\t\t\t\t};\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error('Error in editor ready handler:', err);\n\t\t\t\tsetError(err);\n\t\t\t\tonError?.(err);\n\t\t\t}\n\t\t},\n\t\t[handleEditorReady, onError]\n\t);\n\n\tconst handleError = useCallback(\n\t\t(error, { willEditorRestart }) => {\n\t\t\tconsole.error('CKEditor error:', error);\n\t\t\tif (!willEditorRestart) {\n\t\t\t\tsetError(error);\n\t\t\t\tonError?.(error);\n\t\t\t}\n\t\t},\n\t\t[onError]\n\t);\n\n\tif (error) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tpadding: '20px',\n\t\t\t\t\tborder: '1px solid #red',\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\tbackgroundColor: '#fff5f5'\n\t\t\t\t}}>\n\t\t\t\t<div style={{ color: '#e53e3e', marginBottom: '10px' }}>\n\t\t\t\t\tEditor Error: {error.message}\n\t\t\t\t</div>\n\t\t\t\t<button\n\t\t\t\t\tonClick={() => setError(null)}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tpadding: '8px 16px',\n\t\t\t\t\t\tbackgroundColor: '#3182ce',\n\t\t\t\t\t\tcolor: 'white',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tborderRadius: '4px'\n\t\t\t\t\t}}>\n\t\t\t\t\tRetry\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (!isReady) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tpadding: '20px',\n\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\tborder: '1px solid #dee2e6',\n\t\t\t\t\tborderRadius: '4px'\n\t\t\t\t}}>\n\t\t\t\tLoading editor...\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div ref={editorRef} className='custom-editor-container'>\n\t\t\t<CKEditor\n\t\t\t\teditor={ClassicEditor}\n\t\t\t\tconfig={editorConfig}\n\t\t\t\tdata={data}\n\t\t\t\tonReady={handleReady}\n\t\t\t\tonError={handleError}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\nexport default CustomEditor;"],"names":["MyUploadAdapter","constructor","loader","uploadFn","this","upload","file","default","url","error","abort","PasteImageUrlPlugin","editor","plugins","get","ClipboardPipeline","on","evt","data","content","getChild","is","trim","match","imageElement","model","change","writer","createElement","src","insertContent","document","selection","stop","CustomEditor","editorRef","React","createRef","handleEditorReady","onError","config","rest","isReady","setIsReady","useState","setError","useEffect","timer","setTimeout","clearTimeout","editorConfig","useMemo","customConfig","extraPlugins","AutoImage","toolbar","items","shouldNotGroupWhenFull","Alignment","AutoLink","Autosave","BalloonToolbar","BlockQuote","BlockToolbar","Bold","Code","CodeBlock","Essentials","FontBackgroundColor","FontColor","FontFamily","FontSize","Heading","Highlight","HorizontalLine","ImageEditing","ImageUtils","Indent","IndentBlock","Italic","Link","Paragraph","PlainTableOutput","RemoveFormat","Strikethrough","Subscript","Superscript","Table","TableCaption","TableCellProperties","TableColumnResize","TableProperties","TableToolbar","Underline","GeneralHtmlSupport","SourceEditing","Image","ImageBlock","ImageCaption","ImageInline","ImageInsert","ImageInsertViaUrl","ImageResize","ImageStyle","ImageTextAlternative","ImageToolbar","ImageUpload","SimpleUploadAdapter","LinkImage","balloonToolbar","blockToolbar","fontFamily","supportAllValues","fontSize","options","heading","title","class","view","licenseKey","link","addTargetToExternalLinks","defaultProtocol","decorators","toggleDownloadable","mode","label","attributes","download","menuBar","isVisible","placeholder","table","contentToolbar","htmlSupport","allow","name","classes","styles","image","resizeOptions","value","insert","integrations","simpleUpload","uploadUrl","headers","Authorization","autosave","save","Promise","resolve","createEditorConfig","myUploadFn","async","uFiles","uploadFiles","payload","getToken","split","path","is_private","is_directory","file_size","size","is_child","file_extension","type","mime_type","postV1Drive","handleReady","useCallback","createUploadAdapter","err","handleError","willEditorRestart","jsxs","style","padding","border","borderRadius","backgroundColor","children","color","marginBottom","message","jsx","onClick","ref","className","CKEditor","ClassicEditor","onReady","textAlign"],"mappings":"m1EA0EA,MAAMA,EACL,WAAAC,CAAYC,EAAQC,GAEnBC,KAAKF,OAASA,EACdE,KAAKD,SAAWA,CACjB,CAGA,YAAME,GACL,MAAMC,QAAaF,KAAKF,OAAOI,KAC/B,IAKC,MAAO,CACNC,eAJsBH,KAAKD,SAASG,IAIlBE,IAEpB,OAASC,GAER,MAAMA,CACP,CACD,CAGA,KAAAC,GAEA,EAGD,SAASC,EAAoBC,GACVA,EAAOC,QAAQC,IAAIC,EAAAA,mBAE3BC,GAAG,sBAAuB,CAACC,EAAKC,KACzC,MAAMC,EAAUD,EAAKC,QAAQC,SAAS,GAGtC,GAAID,GAAWA,EAAQE,GAAG,cAAe,CACxC,MAAMb,EAAMW,EAAQD,KAAKI,OAGzB,GAAId,EAAIe,MAAM,mCAAoC,CACjD,MAAMC,EAAeZ,EAAOa,MAAMC,OAAQC,GAClCA,EAAOC,cAAc,aAAc,CACzCC,IAAKrB,KAIPI,EAAOa,MAAMK,cACZN,EACAZ,EAAOa,MAAMM,SAASC,WAEvBf,EAAIgB,MACL,CACD,GAEF,CAGA,MAkRaC,EAAe,EAC3BC,YAAYC,EAAAA,QAAMC,YAClBnB,OAAO,GACPoB,oBACAC,UACAC,SAAS,CAAA,KACNC,MAEH,MAAOC,EAASC,GAAcC,EAAAA,UAAS,IAChCnC,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,IAAKzJ,EAAW0J,UAAU,0BAC9BP,wBAAAI,EAAAA,IAACI,EAAAA,SAAA,CACAlL,OAAQmL,EAAAA,cACRvJ,OAAQU,EACRhC,OACA8K,QAAStB,EACTnI,QAASuI,KACLrI,qBApBLiJ,EAAAA,IAAC,MAAA,CACAT,MAAO,CACNC,QAAS,OACTe,UAAW,SACXd,OAAQ,oBACRC,aAAc,OACZE,SAAA"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ClassicEditor, EditorConfig } from 'ckeditor5';
|
|
1
3
|
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
4
|
+
export interface CustomEditorProps {
|
|
5
|
+
editorRef: React.RefObject<HTMLDivElement>;
|
|
6
|
+
data: string;
|
|
7
|
+
handleEditorReady: (editor: ClassicEditor) => void;
|
|
8
|
+
onError: (error: Error) => void;
|
|
9
|
+
config: EditorConfig;
|
|
10
|
+
rest: any;
|
|
11
|
+
}
|
|
12
|
+
export declare const CustomEditor: ({ editorRef, data, handleEditorReady, onError, config, ...rest }: CustomEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default CustomEditor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Pagination } from "../../pagination/pagination/index.esm.js";
|
|
3
|
-
import PageNavigator from "../../page-navigator/page-navigator/index.esm.js";
|
|
3
|
+
import { PageNavigator } from "../../page-navigator/page-navigator/index.esm.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import React__default, { useState, useEffect } from "react";
|
|
6
6
|
import Box from "../../../node_modules/@mui/material/Box/Box/index.esm.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=,/* empty css */t=;/* empty css */;/* empty css */var r=require("react"),n=;/* empty css */function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const s=/* @__PURE__ */o(r).default.memo(({pages:o,setPages:s,currentPage:i,setCurrentPage:
|
|
2
|
-
/* @__PURE__ */e.jsx(n.default,{children:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=,/* empty css */t=;/* empty css */;/* empty css */var r=require("react"),n=;/* empty css */function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const s=/* @__PURE__ */o(r).default.memo(({pages:o,setPages:s,currentPage:i,setCurrentPage:g,total:d,paginationModel:l,handlePaginationModel:u,sharedPages:c,resource:P,savePageConfiguration:f,handlePageDelete:p,enablePages:x,isPaginationDisplayed:v=!0,isPageSaving:j=!1})=>{const[w,m]=r.useState("true"===window.localStorage.getItem("_is_drawer_open"));return r.useEffect(()=>{const e=()=>{m("true"===window.localStorage.getItem("_is_drawer_open"))};window.addEventListener("storage",e);const a=setInterval(e,10);return()=>{window.removeEventListener("storage",e),clearInterval(a)}},[]),/* @__PURE__ */e.jsxs(n.default,{className:w?"footer--Container":"footer--drawerContainer",sx:{justifyContent:x?"space-between":"flex-end"},children:[Boolean(x)&&/* @__PURE__ */e.jsx(t.PageNavigator,{pages:o,setPages:s,currentPage:i,setCurrentPage:g,resource:P,sharedPages:c,handlePageDelete:p}),
|
|
2
|
+
/* @__PURE__ */e.jsx(n.default,{children:v&&/* @__PURE__ */e.jsx(a.Pagination,{paginationModel:l,handlePaginationModel:u,totalPages:d})})]})});exports.Footer=s,exports.default=s;
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/footer/footer.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable unused-imports/no-unused-vars */\nimport { Box } from \"@mui/material\";\nimport Pagination from \"../pagination/pagination\";\nimport PageNavigator from \"../page-navigator/page-navigator\";\nimport \"./footer.scss\";\nimport { IPaginationModel } from \"../../@types/pagination-model\";\nimport React, { useEffect, useState } from \"react\";\n\ninterface IFooter {\n pages: any;\n setPages: any;\n currentPage: string | number;\n setCurrentPage: any;\n total: number;\n paginationModel: IPaginationModel;\n handlePaginationModel: (model: IPaginationModel) => void;\n sharedPages: any;\n resource: string;\n savePageConfiguration: () => void;\n handlePageDelete: (pages: any[]) => void;\n enablePages: boolean\n isPaginationDisplayed?: boolean\n isPageSaving?: boolean\n}\n\nconst Footer = React.memo(({\n pages,\n setPages,\n currentPage,\n setCurrentPage,\n total, // total number of pages in footer pagination\n paginationModel,\n handlePaginationModel,\n sharedPages,\n resource,\n savePageConfiguration,\n handlePageDelete,\n enablePages,\n isPaginationDisplayed = true,\n isPageSaving = false\n}: IFooter) => {\n const [isDrawerOpen, setIsDrawerOpen] = useState(\n window.localStorage.getItem('_is_drawer_open') === 'true'\n );\n\n useEffect(() => {\n const handleStorageChange = () => {\n setIsDrawerOpen(window.localStorage.getItem('_is_drawer_open') === 'true');\n };\n\n window.addEventListener('storage', handleStorageChange);\n\n const interval = setInterval(handleStorageChange, 10); \n\n return () => {\n window.removeEventListener('storage', handleStorageChange);\n clearInterval(interval);\n };\n }, []);\n\n // useEffect(()=>{\n // handlePaginationModel({...paginationModel,pageNo:activePage?.pageNo})\n // //eslint-disable-next-line react-hooks/exhaustive-deps\n // },[activePage?.pageNo])\n\n return (\n <Box className={`${!isDrawerOpen?'footer--drawerContainer':'footer--Container'}`} sx={{justifyContent: enablePages? 'space-between': 'flex-end'}}>\n \n \n {Boolean(enablePages) && <PageNavigator\n pages={pages}\n setPages={setPages}\n currentPage={currentPage}\n setCurrentPage={setCurrentPage}\n resource={resource}\n sharedPages={sharedPages}\n handlePageDelete={handlePageDelete}\n />}\n <Box>\n {isPaginationDisplayed && (\n <Pagination\n paginationModel={paginationModel}\n handlePaginationModel={handlePaginationModel}\n totalPages={total}\n />\n )}\n </Box>\n </Box>\n );\n});\n\nexport { Footer };\nexport default Footer;\n"],"names":["Footer","React","memo","pages","setPages","currentPage","setCurrentPage","total","paginationModel","handlePaginationModel","sharedPages","resource","savePageConfiguration","handlePageDelete","enablePages","isPaginationDisplayed","isPageSaving","isDrawerOpen","setIsDrawerOpen","useState","window","localStorage","getItem","useEffect","handleStorageChange","addEventListener","interval","setInterval","removeEventListener","clearInterval","jsxs","Box","className","sx","justifyContent","children","Boolean","jsx","PageNavigator","Pagination","totalPages"],"mappings":"uZA0BA,MAAMA,sBAASC,QAAMC,KAAK,EACxBC,QACAC,WACAC,cACAC,iBACAC,QACAC,kBACAC,wBACAC,cACAC,WACAC,wBACAC,mBACAC,cACAC,yBAAwB,EACxBC,gBAAe,MAEd,MAAOC,EAAcC,GAAmBC,EAAAA,SACY,SAAnDC,OAAOC,aAAaC,QAAQ,oBAuB9B,OApBAC,EAAAA,UAAU,KACR,MAAMC,EAAsB,KAC1BN,EAAmE,SAAnDE,OAAOC,aAAaC,QAAQ,qBAG9CF,OAAOK,iBAAiB,UAAWD,GAEnC,MAAME,EAAWC,YAAYH,EAAqB,IAElD,MAAO,KACLJ,OAAOQ,oBAAoB,UAAWJ,GACtCK,cAAcH,KAEf,qBAQDI,KAACC,EAAAA,QAAA,CAAIC,UAAef,EAAuC,oBAA1B,0BAAiDgB,GAAI,CAACC,eAAgBpB,EAAa,gBAAiB,YAGhIqB,SAAA,CAAAC,QAAQtB,mBAAgBuB,EAAAA,IAACC,EAAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/footer/footer.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable unused-imports/no-unused-vars */\nimport { Box } from \"@mui/material\";\nimport Pagination from \"../pagination/pagination\";\nimport PageNavigator from \"../page-navigator/page-navigator\";\nimport \"./footer.scss\";\nimport { IPaginationModel } from \"../../@types/pagination-model\";\nimport React, { useEffect, useState } from \"react\";\n\ninterface IFooter {\n pages: any;\n setPages: any;\n currentPage: string | number;\n setCurrentPage: any;\n total: number;\n paginationModel: IPaginationModel;\n handlePaginationModel: (model: IPaginationModel) => void;\n sharedPages: any;\n resource: string;\n savePageConfiguration: () => void;\n handlePageDelete: (pages: any[]) => void;\n enablePages: boolean\n isPaginationDisplayed?: boolean\n isPageSaving?: boolean\n}\n\nconst Footer = React.memo(({\n pages,\n setPages,\n currentPage,\n setCurrentPage,\n total, // total number of pages in footer pagination\n paginationModel,\n handlePaginationModel,\n sharedPages,\n resource,\n savePageConfiguration,\n handlePageDelete,\n enablePages,\n isPaginationDisplayed = true,\n isPageSaving = false\n}: IFooter) => {\n const [isDrawerOpen, setIsDrawerOpen] = useState(\n window.localStorage.getItem('_is_drawer_open') === 'true'\n );\n\n useEffect(() => {\n const handleStorageChange = () => {\n setIsDrawerOpen(window.localStorage.getItem('_is_drawer_open') === 'true');\n };\n\n window.addEventListener('storage', handleStorageChange);\n\n const interval = setInterval(handleStorageChange, 10); \n\n return () => {\n window.removeEventListener('storage', handleStorageChange);\n clearInterval(interval);\n };\n }, []);\n\n // useEffect(()=>{\n // handlePaginationModel({...paginationModel,pageNo:activePage?.pageNo})\n // //eslint-disable-next-line react-hooks/exhaustive-deps\n // },[activePage?.pageNo])\n\n return (\n <Box className={`${!isDrawerOpen?'footer--drawerContainer':'footer--Container'}`} sx={{justifyContent: enablePages? 'space-between': 'flex-end'}}>\n \n \n {Boolean(enablePages) && <PageNavigator\n pages={pages}\n setPages={setPages}\n currentPage={currentPage}\n setCurrentPage={setCurrentPage}\n resource={resource}\n sharedPages={sharedPages}\n handlePageDelete={handlePageDelete}\n />}\n <Box>\n {isPaginationDisplayed && (\n <Pagination\n paginationModel={paginationModel}\n handlePaginationModel={handlePaginationModel}\n totalPages={total}\n />\n )}\n </Box>\n </Box>\n );\n});\n\nexport { Footer };\nexport default Footer;\n"],"names":["Footer","React","memo","pages","setPages","currentPage","setCurrentPage","total","paginationModel","handlePaginationModel","sharedPages","resource","savePageConfiguration","handlePageDelete","enablePages","isPaginationDisplayed","isPageSaving","isDrawerOpen","setIsDrawerOpen","useState","window","localStorage","getItem","useEffect","handleStorageChange","addEventListener","interval","setInterval","removeEventListener","clearInterval","jsxs","Box","className","sx","justifyContent","children","Boolean","jsx","PageNavigator","Pagination","totalPages"],"mappings":"uZA0BA,MAAMA,sBAASC,QAAMC,KAAK,EACxBC,QACAC,WACAC,cACAC,iBACAC,QACAC,kBACAC,wBACAC,cACAC,WACAC,wBACAC,mBACAC,cACAC,yBAAwB,EACxBC,gBAAe,MAEd,MAAOC,EAAcC,GAAmBC,EAAAA,SACY,SAAnDC,OAAOC,aAAaC,QAAQ,oBAuB9B,OApBAC,EAAAA,UAAU,KACR,MAAMC,EAAsB,KAC1BN,EAAmE,SAAnDE,OAAOC,aAAaC,QAAQ,qBAG9CF,OAAOK,iBAAiB,UAAWD,GAEnC,MAAME,EAAWC,YAAYH,EAAqB,IAElD,MAAO,KACLJ,OAAOQ,oBAAoB,UAAWJ,GACtCK,cAAcH,KAEf,qBAQDI,KAACC,EAAAA,QAAA,CAAIC,UAAef,EAAuC,oBAA1B,0BAAiDgB,GAAI,CAACC,eAAgBpB,EAAa,gBAAiB,YAGhIqB,SAAA,CAAAC,QAAQtB,mBAAgBuB,EAAAA,IAACC,EAAAA,cAAA,CACxBnC,QACAC,WACAC,cACAC,iBACAK,WACAD,cACAG;iBAEJwB,IAACN,EAAAA,SACEI,SAAApB,kBACCsB,EAAAA,IAACE,EAAAA,WAAA,CACC/B,kBACAC,wBACA+B,WAAYjC"}
|
|
@@ -3,7 +3,7 @@ import { useForm, useWatch, FormProvider } from "react-hook-form";
|
|
|
3
3
|
import { useState, useCallback, useEffect } from "react";
|
|
4
4
|
import { images } from "../../../../images/index.esm.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import TabBar from "../../../tabs/tabs/index.esm.js";
|
|
6
|
+
import { TabBar } from "../../../tabs/tabs/index.esm.js";
|
|
7
7
|
import { formBuilderDeConversion } from "../../../../utils/form-builder-deconversion/index.esm.js";
|
|
8
8
|
import { yupResolver as o } from "../../../../node_modules/@hookform/resolvers/yup/dist/yup/index.esm.js";
|
|
9
9
|
import * as Yup from "yup";
|