aefis-core-ui 3.0.0-rc110 → 3.0.0-rc113

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/index.d.ts CHANGED
@@ -131,7 +131,8 @@ import Widget from "./components/Widget/Widget";
131
131
  import TextTransition from "./components/TextTransition/TextTransition";
132
132
  import SurveyComments from "./components/SurveyComments/SurveyComments";
133
133
  import IconButton from "./components/IconButton/IconButton";
134
+ import FilterPanelWithTextSearch from "./components/FilterPanelWithTextSearch/FilterPanelWithTextSearch";
134
135
  import { useSelectFormState } from "./components/DynamicForm/store";
135
136
  import { useSetFormState } from "./components/DynamicForm/store";
136
137
  import useReadOnly from "./components/DynamicForm/hooks/useReadOnly/useReadOnly";
137
- export { EditableDatatable, UnstableDataTable, UnstableRichDataTable, Actions, ActionButtons, ActionMenuButton, Alert, AppToolbar, AssessmentPerformanceChart, AvatarBox, AvatarTitle, Breadcrumbs, BusinessObjectHeader, BusinessObject, businessObjectColor, businessObjectConfiguration, businessObjectIcon, businessObjectIconName, BusinessObjectCard, BusinessObjectCardSectionTitle, BusinessObjectCardEmptySection, BusinessObjectCardSection, BusinessObjectPanel, BusinessObjectPanelHeader, BusinessObjectPanelSection, BusinessObjectPanelSectionTitle, BusinessObjectPicker, BusinessObjectStatus, BusinessObjectStatusButton, Collapsible, CollapsibleProvider, useCollapsibleState, CollapsibleContent, CollapsibleContentContainer, CollapsibleContentButton, CollapsibleContentButtonContainer, withStatusButtonDataSource, BusinessObjectTable, Button, Footer, Chip, ChipList, ContactForm, ContentBox, ContentBoxHeader, CoreProvider, createEvent, createStore, CurriculumChart, dataSourceManager, getConfiguration, setDataSourceConfiguration, registerDataSource, registerDataSources, useDataSourceQuery, useDataSourceInfiniteQuery, useDataSourceMutation, filterSortData, getBaseUrl, getDataSourceUrl, DataTable, DateTitle, DynamicForm, DatePicker, DisplayInFrame, DocViewer, Drawer, EditableText, FilterPanel, FilterPanelFilterChips, FilterPanelMapFilters, FullPageViewer, http, Icon, Image, IsometricImage, List, ListItem, ListItemGroup, MenuButton, ModalDialog, Navigation, NavigationDrawer, Notification, OutcomeSpace, outcomeSpaceColor, outcomeSpaceTypeFromSource, PanelDrawer, ProgressChart, RichDataTable, RubricDistributionChart, RubricScoreSlider, RubricLegend, SaveModal, ScrollToTopButton, ScrollingContainer, SentimentScale, SkeletonContent, StatBoxes, StatRow, StatusMessage, SvgImage, SwipeableTabPanel, SwipeableTabPanelContent, TabPanels, template, TextBuilder, TextBuilderStore, Timeline, TitleAndActionHeader, TitleAndActionHeaderFilterButton, TitleAndDescription, useComponentWillMount, useDataSourceUrl, useDebounceCallback, useNotify, UserAvatar, WizardPanel, WizardCompletedItemList, useRefDimensions, createComponentEvent, DynamicFormBusinessObjectPickerField, UnstableScrollingContainer, UnstableAvatarTitle, Widget, TextTransition, SurveyComments, IconButton };
138
+ export { EditableDatatable, UnstableDataTable, UnstableRichDataTable, Actions, ActionButtons, ActionMenuButton, Alert, AppToolbar, AssessmentPerformanceChart, AvatarBox, AvatarTitle, Breadcrumbs, BusinessObjectHeader, BusinessObject, businessObjectColor, businessObjectConfiguration, businessObjectIcon, businessObjectIconName, BusinessObjectCard, BusinessObjectCardSectionTitle, BusinessObjectCardEmptySection, BusinessObjectCardSection, BusinessObjectPanel, BusinessObjectPanelHeader, BusinessObjectPanelSection, BusinessObjectPanelSectionTitle, BusinessObjectPicker, BusinessObjectStatus, BusinessObjectStatusButton, Collapsible, CollapsibleProvider, useCollapsibleState, CollapsibleContent, CollapsibleContentContainer, CollapsibleContentButton, CollapsibleContentButtonContainer, withStatusButtonDataSource, BusinessObjectTable, Button, Footer, Chip, ChipList, ContactForm, ContentBox, ContentBoxHeader, CoreProvider, createEvent, createStore, CurriculumChart, dataSourceManager, getConfiguration, setDataSourceConfiguration, registerDataSource, registerDataSources, useDataSourceQuery, useDataSourceInfiniteQuery, useDataSourceMutation, filterSortData, getBaseUrl, getDataSourceUrl, DataTable, DateTitle, DynamicForm, DatePicker, DisplayInFrame, DocViewer, Drawer, EditableText, FilterPanel, FilterPanelFilterChips, FilterPanelMapFilters, FullPageViewer, http, Icon, Image, IsometricImage, List, ListItem, ListItemGroup, MenuButton, ModalDialog, Navigation, NavigationDrawer, Notification, OutcomeSpace, outcomeSpaceColor, outcomeSpaceTypeFromSource, PanelDrawer, ProgressChart, RichDataTable, RubricDistributionChart, RubricScoreSlider, RubricLegend, SaveModal, ScrollToTopButton, ScrollingContainer, SentimentScale, SkeletonContent, StatBoxes, StatRow, StatusMessage, SvgImage, SwipeableTabPanel, SwipeableTabPanelContent, TabPanels, template, TextBuilder, TextBuilderStore, Timeline, TitleAndActionHeader, TitleAndActionHeaderFilterButton, TitleAndDescription, useComponentWillMount, useDataSourceUrl, useDebounceCallback, useNotify, UserAvatar, WizardPanel, WizardCompletedItemList, useRefDimensions, createComponentEvent, DynamicFormBusinessObjectPickerField, UnstableScrollingContainer, UnstableAvatarTitle, Widget, TextTransition, SurveyComments, IconButton, FilterPanelWithTextSearch };
@@ -81,6 +81,7 @@ import produce from 'immer';
81
81
  import { Scrollbars } from 'react-custom-scrollbars-2';
82
82
  import { useGridApiRef, DataGridPro } from '@mui/x-data-grid-pro/';
83
83
  import { GridColumnMenu, GridFooterContainer, GridPagination, GridActionsCellItem, GridRowModes } from '@mui/x-data-grid-pro';
84
+ import { Search as Search$3 } from '@mui/icons-material';
84
85
  import { MuiForm5 } from '@rjsf/material-ui';
85
86
  import isEmpty from 'lodash/isEmpty';
86
87
  import compose from 'lodash/fp/compose';
@@ -7646,7 +7647,7 @@ const Chip = ({
7646
7647
  color: colors["default"]
7647
7648
  }
7648
7649
  },
7649
- children: /*#__PURE__*/jsx(Cancel, {
7650
+ children: /*#__PURE__*/jsx(Close, {
7650
7651
  sx: {
7651
7652
  color: colors["dark"]
7652
7653
  }
@@ -13261,7 +13262,8 @@ const FilterPanel = /*#__PURE__*/React__default.forwardRef((props, ref) => {
13261
13262
  addFilter: filter => addFilter(filter),
13262
13263
  getFilters: () => filters,
13263
13264
  getSort: () => sort,
13264
- resetFilters: () => handleResetFilters()
13265
+ resetFilters: () => handleResetFilters(),
13266
+ setSearch: keyword => handleSearchChange(keyword)
13265
13267
  }));
13266
13268
  const handleButtonClick = event => {
13267
13269
  if (menuPosition) {
@@ -13288,7 +13290,14 @@ const FilterPanel = /*#__PURE__*/React__default.forwardRef((props, ref) => {
13288
13290
  const handleSearchChange = keyword => {
13289
13291
  if (panelSearch.includes(keyword)) return;
13290
13292
  setPanelSearch([...panelSearch, keyword]);
13291
- addFilter({
13293
+
13294
+ // addFilter({
13295
+ // index: -1,
13296
+ // type: "keyword",
13297
+ // id: keyword,
13298
+ // data: { id: keyword, name: keyword }
13299
+ // });
13300
+ const searchFilter = {
13292
13301
  index: -1,
13293
13302
  type: "keyword",
13294
13303
  id: keyword,
@@ -13296,7 +13305,13 @@ const FilterPanel = /*#__PURE__*/React__default.forwardRef((props, ref) => {
13296
13305
  id: keyword,
13297
13306
  name: keyword
13298
13307
  }
13299
- });
13308
+ };
13309
+ if (filters) {
13310
+ const newFilterArray = !filters.find(i => i.type === searchFilter.type && i.data.id === searchFilter.data.id) ? [...filters, searchFilter] : removeFilter(searchFilter);
13311
+ setFilters(newFilterArray);
13312
+ //TODO: maybe we can put onChange to under if statement.
13313
+ !onApplyFilters && (onChange == null ? void 0 : onChange(mapFilters(newFilterArray), newFilterArray));
13314
+ }
13300
13315
  if (onSearchChange && !onApplyFilters) {
13301
13316
  const newSearch = getSearchFilter(filters);
13302
13317
  newSearch.push(keyword);
@@ -25796,7 +25811,7 @@ const FilterChips = ({
25796
25811
  variant: "chip",
25797
25812
  size: "small",
25798
25813
  displayOptions: {
25799
- hasIcon: filter.type !== "keyword"
25814
+ hasIcon: false
25800
25815
  },
25801
25816
  type: filter.type || "businessObject",
25802
25817
  template: filter.template,
@@ -25874,7 +25889,7 @@ const FilterChipRow = _ref => {
25874
25889
  alignItems: "center"
25875
25890
  },
25876
25891
  children: /*#__PURE__*/jsxs(Box$2, {
25877
- sx: {
25892
+ sx: _extends({
25878
25893
  borderBottom: "1px solid #e0e0e0",
25879
25894
  borderTop: "1px solid #e0e0e0",
25880
25895
  width: "100%",
@@ -25882,7 +25897,7 @@ const FilterChipRow = _ref => {
25882
25897
  alignItems: "center",
25883
25898
  pl: 1,
25884
25899
  pr: 1
25885
- },
25900
+ }, props.filterChipsContainerSx || {}),
25886
25901
  children: [/*#__PURE__*/jsx(Box$2, {
25887
25902
  sx: {
25888
25903
  flexGrow: 1,
@@ -25908,7 +25923,8 @@ const FilterChipRow = _ref => {
25908
25923
  };
25909
25924
  FilterChipRow.propTypes = {
25910
25925
  onResetFiltersClick: PropTypes.func,
25911
- IconButtonProps: PropTypes.object
25926
+ IconButtonProps: PropTypes.object,
25927
+ filterChipsContainerSx: PropTypes.object
25912
25928
  };
25913
25929
 
25914
25930
  const _excluded$8 = ["status", "data", "isFetching", "fetchNextPage", "hasNextPage", "refetch"];
@@ -25951,7 +25967,7 @@ const initialFilterState = {
25951
25967
  sortQueryParams: null
25952
25968
  };
25953
25969
  const RichDataTable = /*#__PURE__*/forwardRef(function RichDatatable(props, ref) {
25954
- var _props$saveFilterName, _props$filterPanelCon, _props$data, _props$rowActions, _props$dataTableProps, _props$dataTableProps2, _ref2, _data$headers$records, _data$headers, _data$pages2, _data$pages2$;
25970
+ var _props$saveFilterName, _props$filterPanelCon, _filterPanelState$fil2, _props$data, _props$rowActions, _props$dataTableProps, _props$dataTableProps2, _ref2, _data$headers$records, _data$headers, _data$pages2, _data$pages2$;
25955
25971
  const didMount = useDidMount();
25956
25972
  const DataTableRef = useRef();
25957
25973
  const saveFilterName = props == null ? void 0 : (_props$saveFilterName = props.saveFilterName) == null ? void 0 : _props$saveFilterName.split == null ? void 0 : _props$saveFilterName.split(".");
@@ -26351,119 +26367,136 @@ const RichDataTable = /*#__PURE__*/forwardRef(function RichDatatable(props, ref)
26351
26367
  exportOptions: props.exportOptions || defaultExportOptions,
26352
26368
  isLoading: getFiltersQuery.status === "loading",
26353
26369
  actions: props.actions && props.actions.length > 0 || props.addAction ? updateActions(props.actions, handleDrawerOpen, enableTableRowAction, selectedRowCount, Add) : undefined,
26354
- onFilterClick: isFilterPanelEnabled ? handleFilterClick : undefined,
26370
+ onFilterClick: isFilterPanelEnabled && !props.showTextSearch ? handleFilterClick : undefined,
26355
26371
  hasFilters: isFilterSelected,
26356
26372
  disableFilterButton: isFetching,
26357
- slots: _extends({}, props.showBottomFilters && {
26358
- bottomPart: () => {
26359
- return /*#__PURE__*/jsx(AnimatePresence, {
26360
- children: isFilterSelected && /*#__PURE__*/jsx(motion.div, {
26361
- initial: {
26362
- opacity: 1,
26363
- height: 0
26364
- },
26365
- animate: {
26366
- opacity: 1,
26367
- height: "auto",
26368
- transition: {
26369
- height: {
26370
- duration: 0.4
26371
- },
26372
- opacity: {
26373
- duration: 0.25,
26374
- delay: 0.15
26375
- }
26376
- }
26377
- },
26378
- exit: {
26379
- opacity: 0,
26380
- height: 0,
26381
- transition: {
26382
- height: {
26383
- duration: 0.4
26384
- },
26385
- opacity: {
26386
- duration: 0.25
26387
- }
26388
- }
26389
- },
26390
- transition: {
26391
- duration: 0.2
26392
- },
26393
- children: /*#__PURE__*/jsx(FilterChipRow, {
26394
- sort: filterPanelState.sort,
26395
- onSortDelete: sortItem => {
26396
- var _filterPanelRef$curre;
26397
- (_filterPanelRef$curre = filterPanelRef.current) == null ? void 0 : _filterPanelRef$curre.removeSort == null ? void 0 : _filterPanelRef$curre.removeSort(sortItem);
26398
- const filteredSort = filterPanelState.sort.filter(f => f.label !== sortItem.label);
26399
- const newFilterPanelState = _extends({}, filterPanelState, {
26400
- sort: filteredSort,
26401
- sortCount: filteredSort.length || 0,
26402
- sortQueryParams: mapSort(filteredSort)
26403
- });
26404
- setFilterPanelState(newFilterPanelState);
26405
- sendFilterToServer(newFilterPanelState);
26406
- },
26407
- filters: filterPanelState.filterArray,
26408
- onFilterDelete: filter => {
26409
- var _filterPanelRef$curre2;
26410
- const removedFilterArray = filterPanelState.filterArray.filter(i => i.index !== filter.index || filter.id !== i.id);
26411
- let search = filterPanelState.searchText;
26412
- if ((filter == null ? void 0 : filter.type) === "keyword") {
26413
- search = filterPanelState.searchText.filter(s => s !== filter.id);
26414
- }
26415
- const newFilterPanelState = _extends({}, filterPanelState, {
26416
- filterCount: removedFilterArray.length,
26417
- filter: mapFilters(removedFilterArray),
26418
- filterArray: removedFilterArray,
26419
- searchText: search
26420
- });
26421
- setFilterPanelState(newFilterPanelState);
26422
- (_filterPanelRef$curre2 = filterPanelRef.current) == null ? void 0 : _filterPanelRef$curre2.removeFilter == null ? void 0 : _filterPanelRef$curre2.removeFilter(filter);
26423
- sendFilterToServer(newFilterPanelState);
26424
- },
26425
- onResetFiltersClick: filter => {
26426
- var _filterPanelRef$curre3;
26427
- setFilterPanelState(initialFilterState);
26428
- (_filterPanelRef$curre3 = filterPanelRef.current) == null ? void 0 : _filterPanelRef$curre3.resetFilters();
26429
- sendFilterToServer(initialFilterState);
26430
- }
26431
- })
26432
- }, "filterPanelFilter")
26433
- });
26434
- }
26435
- }, props.showTextSearch && {
26436
- titleRightEndAdornment: () => {
26437
- return /*#__PURE__*/jsx(Box$2, {
26438
- sx: {
26439
- pl: 2,
26440
- width: "20ch",
26441
- transition: "width .2s",
26442
- "&:focus-within": {
26443
- width: "30ch"
26444
- }
26445
- },
26446
- children: /*#__PURE__*/jsx(TextSearch$1, {
26447
- inputRef: textfieldRef,
26448
- InputProps: {
26449
- startAdornment: /*#__PURE__*/jsx(InputAdornment, {
26450
- position: "start",
26451
- children: /*#__PURE__*/jsx(Search, {
26452
- color: "textSecondary"
26453
- })
26454
- })
26455
- },
26456
- onChange: handleBottomTextSearch,
26457
- placeholder: "Type to search",
26458
- sx: {
26459
- width: "100%"
26460
- }
26373
+ menu: props.headerMenu
26374
+ }, props.titleAndActionHeaderProps)), props.showTextSearch && /*#__PURE__*/jsxs(Box$2, {
26375
+ sx: _extends({
26376
+ display: "flex",
26377
+ gap: 2
26378
+ }, filterPanelState.filterArray.length === 0 && {
26379
+ mb: 1
26380
+ }),
26381
+ inputRef: textfieldRef,
26382
+ children: [/*#__PURE__*/jsx(TextSearch$1, {
26383
+ InputProps: {
26384
+ startAdornment: /*#__PURE__*/jsx(InputAdornment, {
26385
+ position: "start",
26386
+ children: /*#__PURE__*/jsx(Search, {
26387
+ color: "textSecondary"
26461
26388
  })
26462
- });
26389
+ })
26390
+ },
26391
+ onChange: searchText => {
26392
+ handleBottomTextSearch(searchText);
26393
+ },
26394
+ placeholder: "Type to search",
26395
+ sx: {
26396
+ width: "100%"
26463
26397
  }
26464
- }),
26465
- menu: props.headerMenu
26466
- }, props.titleAndActionHeaderProps)), /*#__PURE__*/jsx(DataTable, _extends({}, props, {
26398
+ }), /*#__PURE__*/jsx(Button, {
26399
+ color: "primary",
26400
+ variant: "outlined",
26401
+ onClick: () => {
26402
+ handleFilterClick();
26403
+ },
26404
+ children: /*#__PURE__*/jsxs(Box$2, {
26405
+ sx: {
26406
+ display: "inline-flex",
26407
+ gap: 1
26408
+ },
26409
+ children: [/*#__PURE__*/jsx(Badge$1, {
26410
+ variant: "dot",
26411
+ badgeContent: "99",
26412
+ color: "secondary",
26413
+ anchorOrigin: {
26414
+ vertical: "top",
26415
+ horizontal: "right"
26416
+ },
26417
+ invisible: (filterPanelState == null ? void 0 : (_filterPanelState$fil2 = filterPanelState.filterArray) == null ? void 0 : _filterPanelState$fil2.length) == 0,
26418
+ children: /*#__PURE__*/jsx(FilterList, {})
26419
+ }), "Filter"]
26420
+ })
26421
+ })]
26422
+ }), props.showBottomFilters && /*#__PURE__*/jsx(AnimatePresence, {
26423
+ children: isFilterSelected && /*#__PURE__*/jsx(motion.div, {
26424
+ initial: {
26425
+ opacity: 1,
26426
+ height: 0
26427
+ },
26428
+ animate: {
26429
+ opacity: 1,
26430
+ height: "auto",
26431
+ transition: {
26432
+ height: {
26433
+ duration: 0.4
26434
+ },
26435
+ opacity: {
26436
+ duration: 0.25,
26437
+ delay: 0.15
26438
+ }
26439
+ }
26440
+ },
26441
+ exit: {
26442
+ opacity: 0,
26443
+ height: 0,
26444
+ transition: {
26445
+ height: {
26446
+ duration: 0.4
26447
+ },
26448
+ opacity: {
26449
+ duration: 0.25
26450
+ }
26451
+ }
26452
+ },
26453
+ transition: {
26454
+ duration: 0.2
26455
+ },
26456
+ children: /*#__PURE__*/jsx(FilterChipRow, {
26457
+ filterChipsContainerSx: {
26458
+ borderTop: "none"
26459
+ },
26460
+ sort: filterPanelState.sort,
26461
+ onSortDelete: sortItem => {
26462
+ var _filterPanelRef$curre;
26463
+ (_filterPanelRef$curre = filterPanelRef.current) == null ? void 0 : _filterPanelRef$curre.removeSort == null ? void 0 : _filterPanelRef$curre.removeSort(sortItem);
26464
+ const filteredSort = filterPanelState.sort.filter(f => f.label !== sortItem.label);
26465
+ const newFilterPanelState = _extends({}, filterPanelState, {
26466
+ sort: filteredSort,
26467
+ sortCount: filteredSort.length || 0,
26468
+ sortQueryParams: mapSort(filteredSort)
26469
+ });
26470
+ setFilterPanelState(newFilterPanelState);
26471
+ sendFilterToServer(newFilterPanelState);
26472
+ },
26473
+ filters: filterPanelState.filterArray,
26474
+ onFilterDelete: filter => {
26475
+ var _filterPanelRef$curre2;
26476
+ const removedFilterArray = filterPanelState.filterArray.filter(i => i.index !== filter.index || filter.id !== i.id);
26477
+ let search = filterPanelState.searchText;
26478
+ if ((filter == null ? void 0 : filter.type) === "keyword") {
26479
+ search = filterPanelState.searchText.filter(s => s !== filter.id);
26480
+ }
26481
+ const newFilterPanelState = _extends({}, filterPanelState, {
26482
+ filterCount: removedFilterArray.length,
26483
+ filter: mapFilters(removedFilterArray),
26484
+ filterArray: removedFilterArray,
26485
+ searchText: search
26486
+ });
26487
+ setFilterPanelState(newFilterPanelState);
26488
+ (_filterPanelRef$curre2 = filterPanelRef.current) == null ? void 0 : _filterPanelRef$curre2.removeFilter == null ? void 0 : _filterPanelRef$curre2.removeFilter(filter);
26489
+ sendFilterToServer(newFilterPanelState);
26490
+ },
26491
+ onResetFiltersClick: filter => {
26492
+ var _filterPanelRef$curre3;
26493
+ setFilterPanelState(initialFilterState);
26494
+ (_filterPanelRef$curre3 = filterPanelRef.current) == null ? void 0 : _filterPanelRef$curre3.resetFilters();
26495
+ sendFilterToServer(initialFilterState);
26496
+ }
26497
+ })
26498
+ }, "filterPanelFilter")
26499
+ }), /*#__PURE__*/jsx(DataTable, _extends({}, props, {
26467
26500
  tableRef: DataTableRef,
26468
26501
  name: props.name,
26469
26502
  columns: updateColumnDefaults(props.columns),
@@ -26757,6 +26790,158 @@ Widget.propTypes = {
26757
26790
  children: PropTypes.any
26758
26791
  };
26759
26792
 
26793
+ const FILTER_ROW_ANIMATE = {
26794
+ initial: {
26795
+ opacity: 0,
26796
+ height: 0
26797
+ },
26798
+ animate: {
26799
+ opacity: 1,
26800
+ height: "auto",
26801
+ transition: {
26802
+ height: {
26803
+ duration: 0.4
26804
+ },
26805
+ opacity: {
26806
+ duration: 0.1,
26807
+ delay: 0.15
26808
+ }
26809
+ }
26810
+ },
26811
+ exit: {
26812
+ opacity: 0,
26813
+ height: 0,
26814
+ transition: {
26815
+ height: {
26816
+ duration: 0.4
26817
+ },
26818
+ opacity: {
26819
+ duration: 0.1
26820
+ }
26821
+ }
26822
+ }
26823
+ };
26824
+ const FilterPanelWithTextSearch = ({
26825
+ drawerProps,
26826
+ filterPanelProps,
26827
+ textSearchProps
26828
+ }) => {
26829
+ const [drawerState, setDrawerState] = useState({
26830
+ open: false
26831
+ });
26832
+ const [filters, setFilters] = useState([]);
26833
+ const filterPanelRef = useRef();
26834
+ return /*#__PURE__*/jsxs(Box$2, {
26835
+ children: [/*#__PURE__*/jsxs(Box$2, {
26836
+ sx: {
26837
+ display: "flex",
26838
+ gap: 2
26839
+ },
26840
+ children: [/*#__PURE__*/jsx(TextSearch$1, _extends({
26841
+ InputProps: {
26842
+ startAdornment: /*#__PURE__*/jsx(InputAdornment, {
26843
+ position: "start",
26844
+ children: /*#__PURE__*/jsx(Search$3, {
26845
+ color: "textSecondary"
26846
+ })
26847
+ })
26848
+ },
26849
+ onChange: searchText => {
26850
+ var _filterPanelRef$curre;
26851
+ filterPanelRef == null ? void 0 : (_filterPanelRef$curre = filterPanelRef.current) == null ? void 0 : _filterPanelRef$curre.setSearch(searchText);
26852
+ },
26853
+ placeholder: "Type to search",
26854
+ sx: {
26855
+ width: "100%"
26856
+ }
26857
+ }, textSearchProps)), /*#__PURE__*/jsx(Button, {
26858
+ color: "primary",
26859
+ variant: "outlined",
26860
+ onClick: () => {
26861
+ setDrawerState(prev => _extends({}, prev, {
26862
+ open: true
26863
+ }));
26864
+ },
26865
+ children: /*#__PURE__*/jsxs(Box$2, {
26866
+ sx: {
26867
+ display: "inline-flex",
26868
+ gap: 1
26869
+ },
26870
+ children: [/*#__PURE__*/jsx(Badge$1, {
26871
+ variant: "dot",
26872
+ badgeContent: "99",
26873
+ color: "secondary",
26874
+ anchorOrigin: {
26875
+ vertical: "top",
26876
+ horizontal: "right"
26877
+ },
26878
+ invisible: !(filters != null && filters.length),
26879
+ children: /*#__PURE__*/jsx(FilterList, {})
26880
+ }), "Filter"]
26881
+ })
26882
+ })]
26883
+ }), /*#__PURE__*/jsx(Box$2, {
26884
+ children: /*#__PURE__*/jsx(AnimatePresence, {
26885
+ children: (filters == null ? void 0 : filters.length) > 0 && /*#__PURE__*/jsx(motion.div, {
26886
+ initial: FILTER_ROW_ANIMATE.initial,
26887
+ animate: FILTER_ROW_ANIMATE.animate,
26888
+ exit: FILTER_ROW_ANIMATE.exit,
26889
+ transition: {
26890
+ duration: 0.2
26891
+ },
26892
+ children: /*#__PURE__*/jsx(FilterChipRow, {
26893
+ filterChipsContainerSx: _extends({
26894
+ borderTop: "none",
26895
+ py: 1
26896
+ }, filters.length > 5 && {
26897
+ py: 1
26898
+ }),
26899
+ filters: filters,
26900
+ onFilterDelete: filter => {
26901
+ var _filterPanelRef$curre2;
26902
+ filterPanelRef == null ? void 0 : (_filterPanelRef$curre2 = filterPanelRef.current) == null ? void 0 : _filterPanelRef$curre2.removeFilter(filter);
26903
+ },
26904
+ onResetFiltersClick: () => {
26905
+ var _filterPanelRef$curre3;
26906
+ return filterPanelRef == null ? void 0 : (_filterPanelRef$curre3 = filterPanelRef.current) == null ? void 0 : _filterPanelRef$curre3.resetFilters();
26907
+ }
26908
+ })
26909
+ }, "filterPanelFilter")
26910
+ })
26911
+ }), /*#__PURE__*/jsx(Drawer$1, _extends({
26912
+ title: "Filter",
26913
+ drawerType: "temporary",
26914
+ formatContent: false,
26915
+ headerDivider: false,
26916
+ open: drawerState.open
26917
+ }, drawerProps, {
26918
+ handleDrawerClose: () => {
26919
+ setDrawerState(prev => _extends({}, prev, {
26920
+ open: false
26921
+ }));
26922
+ drawerProps == null ? void 0 : drawerProps.handleDrawerClose == null ? void 0 : drawerProps.handleDrawerClose();
26923
+ },
26924
+ children: /*#__PURE__*/jsx(Box$2, {
26925
+ sx: {
26926
+ p: 2
26927
+ },
26928
+ children: /*#__PURE__*/jsx(FilterPanel, _extends({}, filterPanelProps, {
26929
+ ref: filterPanelRef,
26930
+ onChange: (mappedFilters, filters) => {
26931
+ setFilters(filters);
26932
+ filterPanelProps == null ? void 0 : filterPanelProps.onChange == null ? void 0 : filterPanelProps.onChange(mappedFilters, filters);
26933
+ }
26934
+ }))
26935
+ })
26936
+ }))]
26937
+ });
26938
+ };
26939
+ FilterPanelWithTextSearch.propTypes = {
26940
+ filterPanelProps: FilterPanel.propTypes,
26941
+ drawerProps: Drawer$1.propTypes,
26942
+ textSearchProps: TextSearch$1.propTypes
26943
+ };
26944
+
26760
26945
  const moreThan = ruleValue => ({
26761
26946
  fieldValue
26762
26947
  }) => {
@@ -32268,5 +32453,5 @@ const DynamicFormHooks = {
32268
32453
  useReadOnly
32269
32454
  };
32270
32455
 
32271
- export { ActionButtons, ActionMenuButton, Actions$1 as Actions, Alert, AppToolbar, AssessmentPerformanceChart, AvatarBox, AvatarTitle$1 as AvatarTitle, Breadcrumbs$1 as Breadcrumbs, BusinessObject, BusinessObjectCard, EmptyCardSection as BusinessObjectCardEmptySection, CardSection as BusinessObjectCardSection, CardSectionTitle as BusinessObjectCardSectionTitle, BusinessObjectHeader, BusinessObjectPanel, Header$1 as BusinessObjectPanelHeader, Section as BusinessObjectPanelSection, SectionTitle as BusinessObjectPanelSectionTitle, BusinessObjectPicker$1 as BusinessObjectPicker, BusinessObjectStatus, BusinessObjectStatusButton, BusinessObjectTable, Button, Chip, ChipList, Collapsible, CollapsibleContent, CollapsibleContentButton, CollapsibleContentButtonContainer, CollapsibleContentContainer, CollapsibleProvider, ContactForm, ContentBox, ContentBoxHeader, CoreProvider, CurriculumChart, DataTable$1 as DataTable, DatePickerBase as DatePicker, DateTitle, DisplayInFrame, DocViewer, Drawer$1 as Drawer, DynamicForm$1 as DynamicForm, BusinessObjectPickerField$1 as DynamicFormBusinessObjectPickerField, DynamicFormHooks, EditableDatatable, EditableText, FilterPanel, FilterChips$3 as FilterPanelFilterChips, mapFilters as FilterPanelMapFilters, Footer, FullPageViewer, Icon$1 as Icon, IconButton, Image$1 as Image, IsometricImage, List, ListItem, ListItemGroup, MenuButton, ModalDialog, Navigation, NavigationDrawer, Notification, OutcomeSpace, PanelDrawer, ProgressChart, RichDataTable$1 as RichDataTable, RubricDistributionChart, RubricLegend, RubricScoreSlider, SaveModal, ScrollToTopButton, ScrollingContainer$1 as ScrollingContainer, SentimentScale, SkeletonContent, StatBoxes, StatRow, StatusMessage, SurveyComments, SvgImage, SwipeableTabPanel, Content as SwipeableTabPanelContent, TabPanels, TextBuilder$1 as TextBuilder, store as TextBuilderStore, TextTransition, Timeline, TitleAndActionHeader, FilterButton as TitleAndActionHeaderFilterButton, TitleAndDescription, AvatarTitle as UnstableAvatarTitle, DataTable as UnstableDataTable, RichDataTable as UnstableRichDataTable, ScrollingContainer as UnstableScrollingContainer, UserAvatar, Widget, CompletedItemList as WizardCompletedItemList, WizardPanel, businessObjectColor, businessObjectConfiguration, businessObjectIcon, businessObjectIconName, createComponentEvent, createEvent, createComponentStore as createStore, dataSourceManager, filterSortData, getBaseUrl, getConfiguration, getDataSourceUrl, http, outcomeSpaceColor, outcomeSpaceTypeFromSource, registerDataSource, registerDataSources, setDataSourceConfiguration, template, useCollapsibleState, useComponentWillMount, useDataSourceInfiniteQuery, useDataSourceMutation, useDataSourceQuery, useDataSourceUrl, useDebounceCallback, useNotify, useRefDimensions, withStatusButtonDataSource };
32456
+ export { ActionButtons, ActionMenuButton, Actions$1 as Actions, Alert, AppToolbar, AssessmentPerformanceChart, AvatarBox, AvatarTitle$1 as AvatarTitle, Breadcrumbs$1 as Breadcrumbs, BusinessObject, BusinessObjectCard, EmptyCardSection as BusinessObjectCardEmptySection, CardSection as BusinessObjectCardSection, CardSectionTitle as BusinessObjectCardSectionTitle, BusinessObjectHeader, BusinessObjectPanel, Header$1 as BusinessObjectPanelHeader, Section as BusinessObjectPanelSection, SectionTitle as BusinessObjectPanelSectionTitle, BusinessObjectPicker$1 as BusinessObjectPicker, BusinessObjectStatus, BusinessObjectStatusButton, BusinessObjectTable, Button, Chip, ChipList, Collapsible, CollapsibleContent, CollapsibleContentButton, CollapsibleContentButtonContainer, CollapsibleContentContainer, CollapsibleProvider, ContactForm, ContentBox, ContentBoxHeader, CoreProvider, CurriculumChart, DataTable$1 as DataTable, DatePickerBase as DatePicker, DateTitle, DisplayInFrame, DocViewer, Drawer$1 as Drawer, DynamicForm$1 as DynamicForm, BusinessObjectPickerField$1 as DynamicFormBusinessObjectPickerField, DynamicFormHooks, EditableDatatable, EditableText, FilterPanel, FilterChips$3 as FilterPanelFilterChips, mapFilters as FilterPanelMapFilters, FilterPanelWithTextSearch, Footer, FullPageViewer, Icon$1 as Icon, IconButton, Image$1 as Image, IsometricImage, List, ListItem, ListItemGroup, MenuButton, ModalDialog, Navigation, NavigationDrawer, Notification, OutcomeSpace, PanelDrawer, ProgressChart, RichDataTable$1 as RichDataTable, RubricDistributionChart, RubricLegend, RubricScoreSlider, SaveModal, ScrollToTopButton, ScrollingContainer$1 as ScrollingContainer, SentimentScale, SkeletonContent, StatBoxes, StatRow, StatusMessage, SurveyComments, SvgImage, SwipeableTabPanel, Content as SwipeableTabPanelContent, TabPanels, TextBuilder$1 as TextBuilder, store as TextBuilderStore, TextTransition, Timeline, TitleAndActionHeader, FilterButton as TitleAndActionHeaderFilterButton, TitleAndDescription, AvatarTitle as UnstableAvatarTitle, DataTable as UnstableDataTable, RichDataTable as UnstableRichDataTable, ScrollingContainer as UnstableScrollingContainer, UserAvatar, Widget, CompletedItemList as WizardCompletedItemList, WizardPanel, businessObjectColor, businessObjectConfiguration, businessObjectIcon, businessObjectIconName, createComponentEvent, createEvent, createComponentStore as createStore, dataSourceManager, filterSortData, getBaseUrl, getConfiguration, getDataSourceUrl, http, outcomeSpaceColor, outcomeSpaceTypeFromSource, registerDataSource, registerDataSources, setDataSourceConfiguration, template, useCollapsibleState, useComponentWillMount, useDataSourceInfiniteQuery, useDataSourceMutation, useDataSourceQuery, useDataSourceUrl, useDebounceCallback, useNotify, useRefDimensions, withStatusButtonDataSource };
32272
32457
  //# sourceMappingURL=index.modern.js.map