aefis-core-ui 3.0.0-rc67 → 3.0.0-rc68

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.
@@ -8,7 +8,7 @@ import { useTheme, styled, alpha, createTheme as createTheme$1, ThemeProvider, u
8
8
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
9
9
  import { makeStyles, useTheme as useTheme$1, withStyles, createStyles, styled as styled$2 } from '@mui/styles';
10
10
  import clsx from 'clsx';
11
- import { AccountBalanceOutlined as AccountBalanceOutlined$1, AssignmentOutlined as AssignmentOutlined$1, BarChartOutlined as BarChartOutlined$1, BookOutlined as BookOutlined$1, BrushOutlined as BrushOutlined$1, CalendarMonthOutlined as CalendarMonthOutlined$1, Check as Check$1, CollectionsBookmarkOutlined as CollectionsBookmarkOutlined$1, ErrorOutlined as ErrorOutlined$1, ExploreOutlined as ExploreOutlined$1, InfoOutlined as InfoOutlined$1, KeyboardArrowRight as KeyboardArrowRight$1, MapOutlined as MapOutlined$1, PersonOutlined as PersonOutlined$1, SchoolOutlined as SchoolOutlined$1, Search as Search$1, ViewListOutlined as ViewListOutlined$1, WarningOutlined as WarningOutlined$1, WidgetsOutlined as WidgetsOutlined$1, AccountBalance as AccountBalance$1, AccountCircle as AccountCircle$1, AccountTreeOutlined, AccountTreeTwoTone, Add as Add$1, AddCircle as AddCircle$1, AddLocation, AddLocationOutlined, AddOutlined, AddTask, AddTaskOutlined, Apps, Archive, ArchiveOutlined, ArrowBack as ArrowBack$1, ArrowForward as ArrowForward$1, ArrowLeft, ArrowRight as ArrowRight$1, ArrowUpward as ArrowUpward$1, Article, ArticleOutlined as ArticleOutlined$1, Assignment, AssignmentLate, AssignmentLateOutlined, AssignmentTurnedIn, AssignmentTurnedInOutlined, AssignmentTwoTone, AttachFile, AutoAwesome, AutoAwesomeOutlined as AutoAwesomeOutlined$1, Balance, Book, Bookmark, BookmarkBorder, BookmarkAdd, BookmarkAddOutlined, BookTwoTone, BuildOutlined, BuildTwoTone, BusinessCenterOutlined, Campaign, CampaignOutlined, Calculate, CalculateTwoTone, CalculateOutlined as CalculateOutlined$1, CalendarMonth, Cancel as Cancel$1, Celebration, CelebrationOutlined, ChatOutlined, CheckBox, CheckBoxOutlined, CheckBoxOutlineBlank, CheckCircle as CheckCircle$1, CheckCircleOutlined, CheckOutlined as CheckOutlined$1, CircleTwoTone, Circle, CircleOutlined, Clear as Clear$1, Close as Close$1, CloudOutlined, CloudDownload, CloudDownloadOutlined, CloudUpload, CloudUploadOutlined, Comment, CommentOutlined as CommentOutlined$1, ContactMail as ContactMail$1, ContentCopy, ChromeReaderMode, ChromeReaderModeOutlined, Dataset, DatasetOutlined, DatasetTwoTone, Dashboard, DashboardOutlined, DashboardTwoTone, DashboardCustomize, DashboardCustomizeOutlined, DateRange, DateRangeOutlined, Delete as Delete$2, DeleteOutlined as DeleteOutlined$1, Description, DescriptionOutlined, DesktopMacOutlined, DeveloperBoard, DeveloperBoardOutlined, DeviceHub, DeviceHubOutlined, Diversity2, Diversity2Outlined, Diversity3, Diversity3Outlined, Done, Edit, EditOutlined as EditOutlined$1, EditNote, EditNoteOutlined, EditNoteTwoTone, EmailOutlined, EmojiObjects, EmojiObjectsOutlined, EmojiPeople, EmojiPeopleOutlined, EmojiEventsOutlined, Error as Error$2, ErrorOutline, Event as Event$1, EventOutlined as EventOutlined$1, EventRepeat, EventRepeatOutlined, ExpandLess as ExpandLess$1, ExpandMore as ExpandMore$1, Explore, ExploreTwoTone, Extension, ExtensionOutlined, Equalizer, EqualizerOutlined, Face, FaceOutlined, FileDownload, FileDownloadOutlined, FilterList as FilterList$1, FlightOutlined, Flight, FolderOutlined, FolderSpecial, FolderSpecialOutlined, FlagOutlined, Fullscreen, FullscreenExit, GetApp, GetAppOutlined as GetAppOutlined$1, GridView, GridViewOutlined, Group, GroupOutlined, Groups, GroupsOutlined, Help, HelpOutlined as HelpOutlined$1, HelpTwoTone, Hiking, History, HistoryOutlined, Home, HomeTwoTone, HomeOutlined, HomeWorkOutlined, ImageSearch, ImportExport, ImportExportOutlined, Info as Info$1, Insights, InsightsOutlined, Key, KeyOutlined, KeyboardArrowLeft as KeyboardArrowLeft$1, KeyboardArrowUp as KeyboardArrowUp$1, Lens, Lightbulb, LightbulbOutlined as LightbulbOutlined$1, Link, List as List$1, ListOutlined, ListAlt, ListAltOutlined, ListAltTwoTone, LocalOffer, LocalOfferOutlined as LocalOfferOutlined$1, LocalPhone, LocalPhoneOutlined as LocalPhoneOutlined$1, Login, Logout, LogoutOutlined as LogoutOutlined$1, LowPriority, LowPriorityOutlined, Map, Menu as Menu$1, MenuBookOutlined, Merge, MergeType, Message, MessageOutlined as MessageOutlined$1, MilitaryTechOutlined, MoreVert as MoreVert$1, MoreHoriz as MoreHoriz$1, MyLocation, MyLocationOutlined, Numbers, Notifications, NotificationsActive, Palette, PaletteOutlined, Person, PersonOutline, People, PeopleOutlined, Percent, PersonAddAltOutlined, PersonAddOutlined as PersonAddOutlined$1, PictureAsPdf, PictureAsPdfOutlined as PictureAsPdfOutlined$1, PieChart, PieChartOutlined, Place, PlaceOutlined, PlayArrow, PlayArrowOutlined, PolicyOutlined, Print, PrintOutlined as PrintOutlined$1, PrintTwoTone, PriorityHigh as PriorityHigh$1, Psychology, PsychologyOutlined, PublicOutlined, Publish, PublishOutlined, QuestionMarkOutlined, QueryStatsOutlined, QuestionAnswer, QuestionAnswerOutlined, RecordVoiceOverOutlined, Receipt, Refresh as Refresh$1, RestartAlt, RoomServiceOutlined, Rule, Save, SaveOutlined, Scale, ScaleOutlined, Schedule as Schedule$1, School, SchoolTwoTone, Science, ScienceOutlined, SearchOutlined, SentimentVeryDissatisfied, SentimentDissatisfied, SentimentNeutral, SentimentSatisfied, SentimentVerySatisfied, SentimentVeryDissatisfiedOutlined, SentimentDissatisfiedOutlined, SentimentNeutralOutlined, SentimentSatisfiedOutlined, SentimentVerySatisfiedOutlined, SentimentVeryDissatisfiedTwoTone, SentimentDissatisfiedTwoTone, SentimentNeutralTwoTone, SentimentSatisfiedTwoTone, SentimentVerySatisfiedTwoTone, Settings as Settings$1, SettingsOutlined, ShareOutlined, SkipPrevious, SkipNext, SmartToy, SmartToyOutlined, SpeakerNotesOutlined, SportsOutlined, StackedBarChart, StackedBarChartOutlined, Star as Star$1, StarBorder as StarBorder$1, SwapVert, TableView, TableViewOutlined, Tag, Task, TaskOutlined, TaskTwoTone, ThumbUp, ThumbUpOutlined, TipsAndUpdates, TipsAndUpdatesOutlined, TrendingDownOutlined, TrendingFlatOutlined, TrendingUpOutlined, Troubleshoot, TroubleshootOutlined, Tune as Tune$1, Verified, VerifiedOutlined, VerifiedUser, VerifiedUserOutlined, ViewList, Visibility, VisibilityOutlined as VisibilityOutlined$1, VisibilityOff, VisibilityOffOutlined, VolunteerActivism, VolunteerActivismOutlined, Warning, Web, WebOutlined, Widgets, Work, WorkOutlined, WorkOutline, WorkspacePremium, WorkspacePremiumOutlined } from '@mui/icons-material/';
11
+ import { AccountBalanceOutlined as AccountBalanceOutlined$1, AssignmentOutlined as AssignmentOutlined$1, BarChartOutlined as BarChartOutlined$1, BookOutlined as BookOutlined$1, BrushOutlined as BrushOutlined$1, CalendarMonthOutlined as CalendarMonthOutlined$1, Check as Check$1, CollectionsBookmarkOutlined as CollectionsBookmarkOutlined$1, ErrorOutlined as ErrorOutlined$1, ExploreOutlined as ExploreOutlined$1, InfoOutlined as InfoOutlined$1, KeyboardArrowRight as KeyboardArrowRight$1, MapOutlined as MapOutlined$1, PersonOutlined as PersonOutlined$1, SchoolOutlined as SchoolOutlined$1, Search as Search$1, ViewListOutlined as ViewListOutlined$1, WarningOutlined as WarningOutlined$1, WidgetsOutlined as WidgetsOutlined$1, AccountBalance as AccountBalance$1, AccountCircle as AccountCircle$1, AccountTreeOutlined, AccountTreeTwoTone, Add as Add$1, AddCircle as AddCircle$1, AddLocation, AddLocationOutlined, AddOutlined, AddTask, AddTaskOutlined, Apps, Archive, ArchiveOutlined, ArrowBack as ArrowBack$1, ArrowForward as ArrowForward$1, ArrowLeft, ArrowRight as ArrowRight$1, ArrowUpward as ArrowUpward$1, Article, ArticleOutlined, Assignment, AssignmentLate, AssignmentLateOutlined, AssignmentTurnedIn, AssignmentTurnedInOutlined, AssignmentTwoTone, AttachFile, AutoAwesome, AutoAwesomeOutlined as AutoAwesomeOutlined$1, Balance, Book, Bookmark, BookmarkBorder, BookmarkAdd, BookmarkAddOutlined, BookTwoTone, BuildOutlined, BuildTwoTone, BusinessCenterOutlined, Campaign, CampaignOutlined, Calculate, CalculateTwoTone, CalculateOutlined, CalendarMonth, Cancel as Cancel$1, Celebration, CelebrationOutlined, ChatOutlined, CheckBox, CheckBoxOutlined, CheckBoxOutlineBlank, CheckCircle as CheckCircle$1, CheckCircleOutlined, CheckOutlined as CheckOutlined$1, CircleTwoTone, Circle, CircleOutlined, Clear as Clear$1, Close as Close$1, CloudOutlined, CloudDownload, CloudDownloadOutlined, CloudUpload, CloudUploadOutlined, Comment, CommentOutlined as CommentOutlined$1, ContactMail as ContactMail$1, ContentCopy, ChromeReaderMode, ChromeReaderModeOutlined, Dataset, DatasetOutlined, DatasetTwoTone, Dashboard, DashboardOutlined, DashboardTwoTone, DashboardCustomize, DashboardCustomizeOutlined, DateRange, DateRangeOutlined, Delete as Delete$2, DeleteOutlined as DeleteOutlined$1, Description, DescriptionOutlined, DesktopMacOutlined, DeveloperBoard, DeveloperBoardOutlined, DeviceHub, DeviceHubOutlined, Diversity2, Diversity2Outlined, Diversity3, Diversity3Outlined, Done, Edit, EditOutlined as EditOutlined$1, EditNote, EditNoteOutlined, EditNoteTwoTone, EmailOutlined, EmojiObjects, EmojiObjectsOutlined, EmojiPeople, EmojiPeopleOutlined, EmojiEventsOutlined, Error as Error$2, ErrorOutline, Event as Event$1, EventOutlined as EventOutlined$1, EventRepeat, EventRepeatOutlined, ExpandLess as ExpandLess$1, ExpandMore as ExpandMore$1, Explore, ExploreTwoTone, Extension, ExtensionOutlined, Equalizer, EqualizerOutlined, Face, FaceOutlined, FileDownload, FileDownloadOutlined, FilterList as FilterList$1, FlightOutlined, Flight, FolderOutlined, FolderSpecial, FolderSpecialOutlined, FlagOutlined, Fullscreen, FullscreenExit, GetApp, GetAppOutlined, GridView, GridViewOutlined, Group, GroupOutlined, Groups, GroupsOutlined, Help, HelpOutlined as HelpOutlined$1, HelpTwoTone, Hiking, History, HistoryOutlined, Home, HomeTwoTone, HomeOutlined, HomeWorkOutlined, ImageSearch, ImportExport, ImportExportOutlined, Info as Info$1, Insights, InsightsOutlined, Key, KeyOutlined, KeyboardArrowLeft as KeyboardArrowLeft$1, KeyboardArrowUp as KeyboardArrowUp$1, Lens, Lightbulb, LightbulbOutlined as LightbulbOutlined$1, Link, List as List$1, ListOutlined, ListAlt, ListAltOutlined, ListAltTwoTone, LocalOffer, LocalOfferOutlined as LocalOfferOutlined$1, LocalPhone, LocalPhoneOutlined as LocalPhoneOutlined$1, Login, Logout, LogoutOutlined as LogoutOutlined$1, LowPriority, LowPriorityOutlined, Map, Menu as Menu$1, MenuBookOutlined, Merge, MergeType, Message, MessageOutlined as MessageOutlined$1, MilitaryTechOutlined, MoreVert as MoreVert$1, MoreHoriz as MoreHoriz$1, MyLocation, MyLocationOutlined, Numbers, Notifications, NotificationsActive, Palette, PaletteOutlined, Person, PersonOutline, People, PeopleOutlined, Percent, PersonAddAltOutlined, PersonAddOutlined as PersonAddOutlined$1, PictureAsPdf, PictureAsPdfOutlined, PieChart, PieChartOutlined, Place, PlaceOutlined, PlayArrow, PlayArrowOutlined, PolicyOutlined, Print, PrintOutlined, PrintTwoTone, PriorityHigh as PriorityHigh$1, Psychology, PsychologyOutlined, PublicOutlined, Publish, PublishOutlined, QuestionMarkOutlined, QueryStatsOutlined, QuestionAnswer, QuestionAnswerOutlined, RecordVoiceOverOutlined, Receipt, Refresh as Refresh$1, RestartAlt, RoomServiceOutlined, Rule, Save, SaveOutlined, Scale, ScaleOutlined, Schedule as Schedule$1, School, SchoolTwoTone, Science, ScienceOutlined, SearchOutlined, SentimentVeryDissatisfied, SentimentDissatisfied, SentimentNeutral, SentimentSatisfied, SentimentVerySatisfied, SentimentVeryDissatisfiedOutlined, SentimentDissatisfiedOutlined, SentimentNeutralOutlined, SentimentSatisfiedOutlined, SentimentVerySatisfiedOutlined, SentimentVeryDissatisfiedTwoTone, SentimentDissatisfiedTwoTone, SentimentNeutralTwoTone, SentimentSatisfiedTwoTone, SentimentVerySatisfiedTwoTone, Settings as Settings$1, SettingsOutlined, ShareOutlined, SkipPrevious, SkipNext, SmartToy, SmartToyOutlined, SpeakerNotesOutlined, SportsOutlined, StackedBarChart, StackedBarChartOutlined, Star as Star$1, StarBorder as StarBorder$1, SwapVert, TableView, TableViewOutlined, Tag, Task, TaskOutlined, TaskTwoTone, ThumbUp, ThumbUpOutlined, TipsAndUpdates, TipsAndUpdatesOutlined, TrendingDownOutlined, TrendingFlatOutlined, TrendingUpOutlined, Troubleshoot, TroubleshootOutlined, Tune as Tune$1, Verified, VerifiedOutlined, VerifiedUser, VerifiedUserOutlined, ViewList, Visibility, VisibilityOutlined as VisibilityOutlined$1, VisibilityOff, VisibilityOffOutlined, VolunteerActivism, VolunteerActivismOutlined, Warning, Web, WebOutlined, Widgets, Work, WorkOutlined, WorkOutline, WorkspacePremium, WorkspacePremiumOutlined } from '@mui/icons-material/';
12
12
  import { red, grey, green, orange, blue, yellow, indigo, purple, cyan, teal, lime, blueGrey, lightBlue, amber, deepOrange } from '@mui/material/colors';
13
13
  import { unstable_useForkRef, unstable_ownerDocument, elementAcceptingRef, exactProp, unstable_composeClasses, ponyfillGlobal } from '@mui/utils';
14
14
  import { Box as Box$3 } from '@mui/system';
@@ -204,7 +204,7 @@ const icons$1 = {
204
204
  ArrowRight: /*#__PURE__*/jsx(ArrowRight$1, {}),
205
205
  ArrowUpward: /*#__PURE__*/jsx(ArrowUpward$1, {}),
206
206
  Article: /*#__PURE__*/jsx(Article, {}),
207
- ArticleOutlined: /*#__PURE__*/jsx(ArticleOutlined$1, {}),
207
+ ArticleOutlined: /*#__PURE__*/jsx(ArticleOutlined, {}),
208
208
  Assignment: /*#__PURE__*/jsx(Assignment, {}),
209
209
  AssignmentOutlined: /*#__PURE__*/jsx(AssignmentOutlined$1, {}),
210
210
  AssignmentLate: /*#__PURE__*/jsx(AssignmentLate, {}),
@@ -232,7 +232,7 @@ const icons$1 = {
232
232
  CampaignOutlined: /*#__PURE__*/jsx(CampaignOutlined, {}),
233
233
  Calculate: /*#__PURE__*/jsx(Calculate, {}),
234
234
  CalculateTwoTone: /*#__PURE__*/jsx(CalculateTwoTone, {}),
235
- CalculateOutlined: /*#__PURE__*/jsx(CalculateOutlined$1, {}),
235
+ CalculateOutlined: /*#__PURE__*/jsx(CalculateOutlined, {}),
236
236
  CalendarMonth: /*#__PURE__*/jsx(CalendarMonth, {}),
237
237
  CalendarMonthOutlined: /*#__PURE__*/jsx(CalendarMonthOutlined$1, {}),
238
238
  Cancel: /*#__PURE__*/jsx(Cancel$1, {}),
@@ -331,7 +331,7 @@ const icons$1 = {
331
331
  Fullscreen: /*#__PURE__*/jsx(Fullscreen, {}),
332
332
  FullscreenExit: /*#__PURE__*/jsx(FullscreenExit, {}),
333
333
  GetApp: /*#__PURE__*/jsx(GetApp, {}),
334
- GetAppOutlined: /*#__PURE__*/jsx(GetAppOutlined$1, {}),
334
+ GetAppOutlined: /*#__PURE__*/jsx(GetAppOutlined, {}),
335
335
  GridView: /*#__PURE__*/jsx(GridView, {}),
336
336
  GridViewOutlined: /*#__PURE__*/jsx(GridViewOutlined, {}),
337
337
  Group: /*#__PURE__*/jsx(Group, {}),
@@ -405,7 +405,7 @@ const icons$1 = {
405
405
  PersonAddAltOutlined: /*#__PURE__*/jsx(PersonAddAltOutlined, {}),
406
406
  PersonAddOutlined: /*#__PURE__*/jsx(PersonAddOutlined$1, {}),
407
407
  PictureAsPdf: /*#__PURE__*/jsx(PictureAsPdf, {}),
408
- PictureAsPdfOutlined: /*#__PURE__*/jsx(PictureAsPdfOutlined$1, {}),
408
+ PictureAsPdfOutlined: /*#__PURE__*/jsx(PictureAsPdfOutlined, {}),
409
409
  PieChart: /*#__PURE__*/jsx(PieChart, {}),
410
410
  PieChartOutlined: /*#__PURE__*/jsx(PieChartOutlined, {}),
411
411
  Place: /*#__PURE__*/jsx(Place, {}),
@@ -414,7 +414,7 @@ const icons$1 = {
414
414
  PlayArrowOutlined: /*#__PURE__*/jsx(PlayArrowOutlined, {}),
415
415
  PolicyOutlined: /*#__PURE__*/jsx(PolicyOutlined, {}),
416
416
  Print: /*#__PURE__*/jsx(Print, {}),
417
- PrintOutlined: /*#__PURE__*/jsx(PrintOutlined$1, {}),
417
+ PrintOutlined: /*#__PURE__*/jsx(PrintOutlined, {}),
418
418
  PrintTwoTone: /*#__PURE__*/jsx(PrintTwoTone, {}),
419
419
  PriorityHigh: /*#__PURE__*/jsx(PriorityHigh$1, {}),
420
420
  Psychology: /*#__PURE__*/jsx(Psychology, {}),
@@ -540,9 +540,6 @@ const ArrowRight = props => {
540
540
  const ArrowUpward = props => {
541
541
  return /*#__PURE__*/jsx(ArrowUpward$1, _extends({}, props));
542
542
  };
543
- const ArticleOutlined = props => {
544
- return /*#__PURE__*/jsx(ArticleOutlined$1, _extends({}, props));
545
- };
546
543
  const AssignmentOutlined = props => {
547
544
  return /*#__PURE__*/jsx(AssignmentOutlined$1, _extends({}, props));
548
545
  };
@@ -558,9 +555,6 @@ const BookOutlined = props => {
558
555
  const BrushOutlined = props => {
559
556
  return /*#__PURE__*/jsx(BrushOutlined$1, _extends({}, props));
560
557
  };
561
- const CalculateOutlined = props => {
562
- return /*#__PURE__*/jsx(CalculateOutlined$1, _extends({}, props));
563
- };
564
558
  const CalendarMonthOutlined = props => {
565
559
  return /*#__PURE__*/jsx(CalendarMonthOutlined$1, _extends({}, props));
566
560
  };
@@ -621,9 +615,6 @@ const ExploreOutlined = props => {
621
615
  const FilterList = props => {
622
616
  return /*#__PURE__*/jsx(FilterList$1, _extends({}, props));
623
617
  };
624
- const GetAppOutlined = props => {
625
- return /*#__PURE__*/jsx(GetAppOutlined$1, _extends({}, props));
626
- };
627
618
  const HelpOutlined = props => {
628
619
  return /*#__PURE__*/jsx(HelpOutlined$1, _extends({}, props));
629
620
  };
@@ -675,12 +666,6 @@ const PersonAddOutlined = props => {
675
666
  const PersonOutlined = props => {
676
667
  return /*#__PURE__*/jsx(PersonOutlined$1, _extends({}, props));
677
668
  };
678
- const PictureAsPdfOutlined = props => {
679
- return /*#__PURE__*/jsx(PictureAsPdfOutlined$1, _extends({}, props));
680
- };
681
- const PrintOutlined = props => {
682
- return /*#__PURE__*/jsx(PrintOutlined$1, _extends({}, props));
683
- };
684
669
  const PriorityHigh = props => {
685
670
  return /*#__PURE__*/jsx(PriorityHigh$1, _extends({}, props));
686
671
  };
@@ -13365,167 +13350,6 @@ const useNotify = () => {
13365
13350
  };
13366
13351
  };
13367
13352
 
13368
- const hasOption = (optionType, options) => {
13369
- const array = options.filter(item => {
13370
- return item.type === optionType;
13371
- });
13372
- return array.length > 0;
13373
- };
13374
- const getOption = (optionType, options) => {
13375
- const array = options.filter(item => {
13376
- return item.type === optionType;
13377
- });
13378
- return array.length > 0 ? array[0] : {};
13379
- };
13380
-
13381
- /**
13382
- * Button to export to PDF or Print. **This button handles the actions itself. This should be updated!**
13383
- */
13384
- const ExportButton = props => {
13385
- var _props$options;
13386
- const [anchorEl, setAnchorEl] = useState(null);
13387
- const handleClick = event => {
13388
- setAnchorEl(event.currentTarget);
13389
- };
13390
- const handleClose = () => {
13391
- setAnchorEl(null);
13392
- };
13393
- const handleActionClick = (e, item) => {
13394
- setAnchorEl(null);
13395
- e.stopPropagation();
13396
- if (item.type === "pdf") {
13397
- setQueryStringValue("rf", "pdf");
13398
- if (props.forcePDFLandscape) {
13399
- setQueryStringValue("landscape", "true");
13400
- }
13401
- setTimeout(() => {
13402
- window.location.reload();
13403
- }, 500);
13404
- } else if (item.type === "print") {
13405
- setTimeout(function () {
13406
- window.print();
13407
- }, 500);
13408
- } else if (item.type === "excel" && item.url) {
13409
- window.open(item.url, "_blank");
13410
- } else if (item.type === "csv" && item.url) {
13411
- window.open(item.url, "_blank");
13412
- } else if (item.type === "word" && item.url) {
13413
- window.open(item.url, "_blank");
13414
- }
13415
- };
13416
- const actionsArray = [];
13417
- if (((_props$options = props.options) == null ? void 0 : _props$options.length) > 0) {
13418
- if (hasOption("print", props.options)) {
13419
- actionsArray.push({
13420
- type: "print",
13421
- text: "Print this page",
13422
- icon: /*#__PURE__*/jsx(PrintOutlined, {})
13423
- });
13424
- }
13425
- if (hasOption("pdf", props.options)) {
13426
- actionsArray.push({
13427
- type: "pdf",
13428
- text: "Export to PDF",
13429
- icon: /*#__PURE__*/jsx(PictureAsPdfOutlined, {})
13430
- });
13431
- }
13432
- if (hasOption("csv", props.options)) {
13433
- actionsArray.push({
13434
- type: "csv",
13435
- text: "Export to CSV",
13436
- icon: /*#__PURE__*/jsx(CalculateOutlined, {}),
13437
- url: getOption("csv", props.options).url
13438
- });
13439
- }
13440
- if (hasOption("excel", props.options)) {
13441
- actionsArray.push({
13442
- type: "excel",
13443
- text: "Export to Excel",
13444
- icon: /*#__PURE__*/jsx(CalculateOutlined, {}),
13445
- url: getOption("excel", props.options).url
13446
- });
13447
- }
13448
- if (hasOption("word", props.options)) {
13449
- actionsArray.push({
13450
- type: "pdf",
13451
- text: "Export to Word",
13452
- icon: /*#__PURE__*/jsx(ArticleOutlined, {}),
13453
- url: getOption("word", props.options).url
13454
- });
13455
- }
13456
- }
13457
- const a11yprops = {
13458
- "aria-controls": "aefis-export-menu",
13459
- "aria-label": "export options",
13460
- "aria-haspopup": true,
13461
- "aria-expanded": Boolean(anchorEl),
13462
- role: "button"
13463
- };
13464
- return /*#__PURE__*/jsxs(Fragment, {
13465
- children: [/*#__PURE__*/jsx(IconButton, _extends({
13466
- id: "aefis-export-button",
13467
- name: "export options",
13468
- showTooltip: true,
13469
- onClick: handleClick,
13470
- size: "small"
13471
- }, a11yprops, {
13472
- children: /*#__PURE__*/jsx(GetAppOutlined, {})
13473
- })), /*#__PURE__*/jsx(Menu$2, {
13474
- id: "aefis-export-menu",
13475
- anchorEl: anchorEl,
13476
- anchorOrigin: {
13477
- vertical: "bottom",
13478
- horizontal: "center"
13479
- },
13480
- transformOrigin: {
13481
- vertical: "top",
13482
- horizontal: "center"
13483
- },
13484
- MenuListProps: {
13485
- "aria-labelledby": "aefis-export-button"
13486
- },
13487
- sx: {
13488
- mt: 1
13489
- },
13490
- keepMounted: true,
13491
- open: Boolean(anchorEl),
13492
- onClose: handleClose,
13493
- children: actionsArray.map((item, index) => /*#__PURE__*/jsxs(MenuItem$1, {
13494
- onClick: e => handleActionClick(e, item),
13495
- children: [/*#__PURE__*/jsx(ListItemIcon, {
13496
- children: item.icon
13497
- }), /*#__PURE__*/jsx(Typography, {
13498
- variant: "inherit",
13499
- children: item.text
13500
- })]
13501
- }, index))
13502
- })]
13503
- });
13504
- };
13505
- ExportButton.defaultProps = {
13506
- forcePDFLandscape: false,
13507
- options: [{
13508
- type: "print"
13509
- }, {
13510
- type: "pdf"
13511
- }]
13512
- };
13513
- ExportButton.propTypes = {
13514
- /** Landscape or not */
13515
- forcePDFLandscape: PropTypes.bool,
13516
- /** List of Export options */
13517
- options: PropTypes.arrayOf(PropTypes.shape({
13518
- /** The type of export. */
13519
- type: PropTypes.oneOf(["pdf", "print", "csv", "excel", "word", "custom"]),
13520
- /** If type is "custom", the you can define the text to display. */
13521
- text: PropTypes.string,
13522
- /** If an icon is provided, the default is overridden. */
13523
- icon: PropTypes.any,
13524
- /** if a url is provided, the export is directed the url. */
13525
- url: PropTypes.string
13526
- }))
13527
- };
13528
-
13529
13353
  const a11yProps = item => {
13530
13354
  return {
13531
13355
  id: `titleActionHeaderButton-${item.name}`,
@@ -13626,14 +13450,18 @@ Actions.propTypes = {
13626
13450
  const _excluded$p = ["hasFilters", "size"];
13627
13451
  const RenderFilterButton = /*#__PURE__*/React__default.forwardRef(function RenderFilterButton(_ref, ref) {
13628
13452
  let {
13629
- hasFilters
13453
+ hasFilters,
13454
+ size
13630
13455
  } = _ref,
13631
13456
  props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
13632
13457
  return /*#__PURE__*/jsx(IconButton, _extends({
13458
+ style: {
13459
+ marginLeft: "8px"
13460
+ },
13633
13461
  name: "filter options",
13634
13462
  showTooltip: true
13635
13463
  }, props, {
13636
- size: props.size,
13464
+ size: size,
13637
13465
  ref: ref,
13638
13466
  children: /*#__PURE__*/jsx(Badge$1, {
13639
13467
  variant: "dot",
@@ -13654,20 +13482,20 @@ RenderFilterButton.propTypes = {
13654
13482
  disabled: PropTypes.bool,
13655
13483
  size: PropTypes.string
13656
13484
  };
13657
- const FilterButton = props => {
13658
- return props.disabled ? /*#__PURE__*/jsx(RenderFilterButton, _extends({}, props)) : /*#__PURE__*/jsx(RenderFilterButton, {
13659
- "aria-label": props.hasFilters ? `add or remove existing data filters` : `filter data`,
13660
- onClick: props.onClick,
13661
- disabled: props.disabled,
13662
- hasFilters: props.hasFilters,
13663
- size: props.size
13485
+ const FilterButton = ({
13486
+ onClick,
13487
+ hasFilters: _hasFilters = false,
13488
+ size: _size = "small",
13489
+ disabled: _disabled = false
13490
+ }) => {
13491
+ return /*#__PURE__*/jsx(RenderFilterButton, {
13492
+ "aria-label": _hasFilters ? `add or remove existing data filters` : `filter data`,
13493
+ onClick: onClick,
13494
+ disabled: _disabled,
13495
+ hasFilters: _hasFilters,
13496
+ size: _size
13664
13497
  });
13665
13498
  };
13666
- FilterButton.defaultProps = {
13667
- hasFilters: false,
13668
- disabled: false,
13669
- size: "small"
13670
- };
13671
13499
  FilterButton.propTypes = {
13672
13500
  onClick: PropTypes.func,
13673
13501
  hasFilters: PropTypes.bool,
@@ -14005,6 +13833,33 @@ Breadcrumbs$2.propTypes = {
14005
13833
  position: PropTypes.oneOf(["top", "bottom"])
14006
13834
  };
14007
13835
 
13836
+ const handleExportActionClick = (type, url) => {
13837
+ if (type === "pdf") {
13838
+ setQueryStringValue("rf", "pdf");
13839
+ if (props.forcePDFLandscape) {
13840
+ setQueryStringValue("landscape", "true");
13841
+ }
13842
+ setTimeout(() => {
13843
+ window.location.reload();
13844
+ }, 500);
13845
+ } else if (type === "print") {
13846
+ setTimeout(function () {
13847
+ window.print();
13848
+ }, 500);
13849
+ } else if (type === "excel" && url) {
13850
+ window.open(url, "_blank");
13851
+ } else if (type === "csv" && url) {
13852
+ window.open(item.url, "_blank");
13853
+ } else if (type === "word" && url) {
13854
+ window.open(item.url, "_blank");
13855
+ }
13856
+ };
13857
+ const getExportOption = (optionType, options) => {
13858
+ const array = options.filter(item => {
13859
+ return item.type === optionType;
13860
+ });
13861
+ return array.length > 0 ? array[0] : {};
13862
+ };
14008
13863
  const getPreDefinedFilters = filterSetConfiguration => {
14009
13864
  return filterSetConfiguration.filter(f => {
14010
13865
  return f.type === "preDefined";
@@ -14015,6 +13870,54 @@ const getUserDefinedFilters = filterSetConfiguration => {
14015
13870
  return f.type === "userDefined";
14016
13871
  });
14017
13872
  };
13873
+ const mergeExportOptions = (options, menuArray) => {
13874
+ const exportMenuArray = [];
13875
+ const hasExportOption = (optionType, options) => {
13876
+ const array = options.filter(item => {
13877
+ return item.type === optionType;
13878
+ });
13879
+ return array.length > 0;
13880
+ };
13881
+ if ((options == null ? void 0 : options.length) > 0) {
13882
+ if (hasExportOption("print", options)) {
13883
+ exportMenuArray.push({
13884
+ name: "Print this page",
13885
+ divider: menuArray.length > 0 ? true : false,
13886
+ onClick: () => handleExportActionClick("print")
13887
+ });
13888
+ }
13889
+ if (hasExportOption("pdf", options)) {
13890
+ exportMenuArray.push({
13891
+ name: "Export to PDF",
13892
+ divider: menuArray.length > 0 && exportMenuArray.length === 0 ? true : false,
13893
+ onClick: () => handleExportActionClick("pdf")
13894
+ });
13895
+ }
13896
+ if (hasExportOption("csv", options)) {
13897
+ exportMenuArray.push({
13898
+ name: "Export to CSV",
13899
+ divider: menuArray.length > 0 && exportMenuArray.length === 0 ? true : false,
13900
+ action: () => handleExportActionClick("csv", getExportOption("csv", options).url)
13901
+ });
13902
+ }
13903
+ if (hasExportOption("excel", options)) {
13904
+ exportMenuArray.push({
13905
+ name: "Export to Excel",
13906
+ divider: menuArray.length > 0 && exportMenuArray.length === 0 ? true : false,
13907
+ onClick: () => handleExportActionClick("excel", getExportOption("excel", options).url)
13908
+ });
13909
+ }
13910
+ if (hasExportOption("word", options)) {
13911
+ exportMenuArray.push({
13912
+ name: "Export to Word",
13913
+ divider: menuArray.length > 0 && exportMenuArray.length === 0 ? true : false,
13914
+ onClick: () => handleExportActionClick("word", getExportOption("word", options).url)
13915
+ });
13916
+ }
13917
+ }
13918
+ return exportMenuArray;
13919
+ };
13920
+
14018
13921
  const handlerActions = {
14019
13922
  CLICK: "CLICK",
14020
13923
  DELETE: "DELETE",
@@ -14093,6 +13996,14 @@ const TitleAndActionHeader = /*#__PURE__*/React__default.forwardRef(({
14093
13996
  preDefinedFilters,
14094
13997
  userDefinedFilters
14095
13998
  } = useGetFilters(filterSetsProp);
13999
+ const titleMenu = [];
14000
+ if ((menu == null ? void 0 : menu.length) > 0) {
14001
+ titleMenu.push(...menu);
14002
+ }
14003
+ if (_showExport && exportOptions) {
14004
+ const parsedExportOptions = mergeExportOptions(exportOptions, titleMenu);
14005
+ titleMenu.push(...parsedExportOptions);
14006
+ }
14096
14007
  const handleClose = event => {
14097
14008
  if (anchorRef.current && anchorRef.current.contains(event.target)) {
14098
14009
  return;
@@ -14166,7 +14077,7 @@ const TitleAndActionHeader = /*#__PURE__*/React__default.forwardRef(({
14166
14077
  const mainContainerStyle = {
14167
14078
  paddingBottom: _gutter ? breadcrumbs != null && breadcrumbs.length || subtitle ? 2 : 1 : 0
14168
14079
  };
14169
- const hasActions = additionalActions || actions || _showExport;
14080
+ const hasActions = additionalActions || actions || (titleMenu == null ? void 0 : titleMenu.length) > 0;
14170
14081
  useImperativeHandle(ref, () => ({
14171
14082
  resetTitle,
14172
14083
  setOpen,
@@ -14267,7 +14178,9 @@ const TitleAndActionHeader = /*#__PURE__*/React__default.forwardRef(({
14267
14178
  sx: {
14268
14179
  displayPrint: "none",
14269
14180
  height: "100%",
14270
- pt: "12px",
14181
+ display: "flex",
14182
+ alignItems: subtitle !== undefined ? "flex-start" : "center",
14183
+ mt: subtitle !== undefined ? 0.75 : 0,
14271
14184
  "& > *": {
14272
14185
  margin: 1
14273
14186
  }
@@ -14328,13 +14241,7 @@ const TitleAndActionHeader = /*#__PURE__*/React__default.forwardRef(({
14328
14241
  }), _additionalActionsPosition === "right" && /*#__PURE__*/jsx(ListItem, {
14329
14242
  display: "horizontal",
14330
14243
  children: additionalActions
14331
- }), _showExport && /*#__PURE__*/jsx(ListItem, {
14332
- display: "horizontal",
14333
- children: /*#__PURE__*/jsx(ExportButton, {
14334
- options: exportOptions,
14335
- forcePDFLandscape: forcePDFLandscape
14336
- })
14337
- }), menu && /*#__PURE__*/jsx(ListItem, {
14244
+ }), (titleMenu == null ? void 0 : titleMenu.length) > 0 && /*#__PURE__*/jsx(ListItem, {
14338
14245
  display: "horizontal",
14339
14246
  children: /*#__PURE__*/jsx(Box$2, {
14340
14247
  sx: {
@@ -14343,7 +14250,7 @@ const TitleAndActionHeader = /*#__PURE__*/React__default.forwardRef(({
14343
14250
  children: /*#__PURE__*/jsx(MenuButton, {
14344
14251
  name: `more options`,
14345
14252
  showTooltip: true,
14346
- menuConfiguration: menu,
14253
+ menuConfiguration: titleMenu,
14347
14254
  displayType: "icon",
14348
14255
  buttonSize: "small"
14349
14256
  })