aefis-core-ui 2.1.11 → 2.1.13

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.
@@ -8690,7 +8690,7 @@ const FilterPanel = props => {
8690
8690
  onApplyFilters: handleApplyFilters,
8691
8691
  manualFilters: onApplyFilters ? true : false
8692
8692
  };
8693
- if (!(configuration.length > 0)) {
8693
+ if (!(configuration.length > 0 || search)) {
8694
8694
  return null;
8695
8695
  }
8696
8696
  return /*#__PURE__*/jsxs("div", {
@@ -10477,7 +10477,7 @@ const useIsError = status => {
10477
10477
  return isError;
10478
10478
  };
10479
10479
  const RichDataTable = /*#__PURE__*/forwardRef(function RichDatatable(props, ref) {
10480
- var _props$rowActions, _props$dataTableProps, _props$dataTableProps2;
10480
+ var _props$filterPanelCon, _props$rowActions, _props$dataTableProps, _props$dataTableProps2;
10481
10481
  const didMount = useDidMount();
10482
10482
  const DataTableRef = useRef();
10483
10483
  const [currentSelection, setCurrentSelection] = useState(() => {
@@ -10717,6 +10717,7 @@ const RichDataTable = /*#__PURE__*/forwardRef(function RichDatatable(props, ref)
10717
10717
  toggleDrawer,
10718
10718
  clearSelections: () => DataTableRef.current.clearSelections()
10719
10719
  }));
10720
+ const isFilterPanelEnabled = ((_props$filterPanelCon = props.filterPanelConfig) == null ? void 0 : _props$filterPanelCon.length) > 0 || props.showFilterPanelSearch;
10720
10721
  return /*#__PURE__*/jsxs("div", {
10721
10722
  "aria-live": "polite",
10722
10723
  children: [/*#__PURE__*/jsx(TitleAndActionHeader, _extends({
@@ -10724,7 +10725,7 @@ const RichDataTable = /*#__PURE__*/forwardRef(function RichDatatable(props, ref)
10724
10725
  showExport: props.showExportButton,
10725
10726
  exportOptions: props.exportOptions,
10726
10727
  actions: props.actions && props.actions.length > 0 || props.addAction ? updateActions(props.actions, handleDrawerOpen, enableTableRowAction, selectedRowCount, Add) : undefined,
10727
- onFilterClick: props.filterPanelConfig && props.filterPanelConfig.length > 0 ? handleFilterClick : undefined,
10728
+ onFilterClick: isFilterPanelEnabled ? handleFilterClick : undefined,
10728
10729
  hasFilters: filterPanelState.filterCount > 0 || filterPanelState.sortCount > 0,
10729
10730
  disableFilterButton: isFetching
10730
10731
  }, props.titleAndActionHeaderProps)), /*#__PURE__*/jsx(DataTable, _extends({}, props, {
@@ -14541,7 +14542,7 @@ const QontoStepIcon = props => {
14541
14542
  } = props;
14542
14543
  return /*#__PURE__*/jsx(QontoStepIconRoot, {
14543
14544
  ownerstate: {
14544
- active
14545
+ active: active
14545
14546
  },
14546
14547
  className: props.className,
14547
14548
  children: props.completed ? /*#__PURE__*/jsx(CheckCircle, {
@@ -14562,18 +14563,36 @@ QontoStepIcon.propTypes = {
14562
14563
  completed: PropTypes.bool
14563
14564
  };
14564
14565
  const Header = props => {
14565
- const activeStep = props.allStepsCompleted ? props.data.length : props.activeStep;
14566
- return /*#__PURE__*/jsx(Stepper, {
14567
- activeStep: activeStep,
14566
+ const currentActiveStep = props.allStepsCompleted ? props.data.length : props.activeStep;
14567
+ const a11yProps = {
14568
+ role: "list",
14569
+ "aria-label": "progress"
14570
+ };
14571
+ const stepA11lyProps = (current, activeStep) => {
14572
+ const a11y = {};
14573
+ if (current === activeStep) {
14574
+ a11y["aria-current"] = "step";
14575
+ }
14576
+ return a11y;
14577
+ };
14578
+ return /*#__PURE__*/jsx(Stepper, _extends({
14579
+ component: "ol"
14580
+ }, a11yProps, {
14581
+ activeStep: currentActiveStep,
14568
14582
  alternativeLabel: true,
14569
14583
  connector: /*#__PURE__*/jsx(QontoConnector, {}),
14570
- children: props.data.map(step => /*#__PURE__*/jsx(Step, {
14571
- children: /*#__PURE__*/jsx(StepLabel, {
14572
- StepIconComponent: QontoStepIcon,
14573
- children: step.title
14574
- })
14575
- }, `wizardHeaderStep-${step.id}`))
14576
- });
14584
+ sx: {
14585
+ listStyle: "none"
14586
+ },
14587
+ children: props.data.map((step, index) => /*#__PURE__*/createElement(Step, _extends({}, stepA11lyProps(index, currentActiveStep), {
14588
+ ariaCurrent: true,
14589
+ component: "li",
14590
+ key: `wizardHeaderStep-${step.id}`
14591
+ }), /*#__PURE__*/jsx(StepLabel, {
14592
+ StepIconComponent: QontoStepIcon,
14593
+ children: step.title
14594
+ })))
14595
+ }));
14577
14596
  };
14578
14597
  Header.defaultProps = {
14579
14598
  allStepsCompleted: false