aefis-core-ui 2.1.19 → 2.1.21

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.
@@ -4797,7 +4797,8 @@ const ListItem = props => {
4797
4797
  style: listItemStyle,
4798
4798
  disabled: props.disabled,
4799
4799
  dense: props.dense,
4800
- selected: props.selected
4800
+ selected: props.selected,
4801
+ component: "li"
4801
4802
  };
4802
4803
  if (props.display === "horizontal") {
4803
4804
  listItemArgs["sx"] = {
@@ -5285,7 +5286,8 @@ const useStyles$y = makeStyles(theme => ({
5285
5286
  root: {
5286
5287
  margin: 0,
5287
5288
  padding: theme.spacing(2),
5288
- position: "relative"
5289
+ position: "relative",
5290
+ minHeight: 60
5289
5291
  },
5290
5292
  closeButton: {
5291
5293
  position: "absolute",
@@ -13558,7 +13560,7 @@ const color = percent => {
13558
13560
  return percent ? dynamicSuccess[percent] : inProgress["default"];
13559
13561
  };
13560
13562
  const Chart = props => {
13561
- let bgColor = props.dynamicColor ? color(props.percentValue) : props.showComplete && props.percentValue === 100 ? goalMet["default"] : color();
13563
+ const bgColor = props.customSeriesColor || (props.dynamicColor ? color(props.percentValue) : props.showComplete && props.percentValue === 100 ? goalMet["default"] : color());
13562
13564
  const XSmallSlider = withStyles$1({
13563
13565
  root: {
13564
13566
  borderRadius: 10,
@@ -13639,7 +13641,8 @@ Chart.propTypes = {
13639
13641
  percentValue: PropTypes.number,
13640
13642
  showComplete: PropTypes.any,
13641
13643
  size: PropTypes.string,
13642
- label: PropTypes.string
13644
+ label: PropTypes.string,
13645
+ customSeriesColor: PropTypes.string
13643
13646
  };
13644
13647
  const SliderChart = props => {
13645
13648
  const classes = useStyles$a();
@@ -13669,7 +13672,7 @@ const SliderChart = props => {
13669
13672
  }), props.title && props.title !== "" && props.showTitle && /*#__PURE__*/jsx(Typography, {
13670
13673
  variant: "h3",
13671
13674
  sx: titleStyle,
13672
- component: "span",
13675
+ component: props.titleComponent,
13673
13676
  children: props.title
13674
13677
  }), /*#__PURE__*/jsxs(Box$1, {
13675
13678
  className: classes.chartContainer,
@@ -13690,17 +13693,22 @@ const SliderChart = props => {
13690
13693
  })]
13691
13694
  });
13692
13695
  };
13696
+ SliderChart.defaultProps = {
13697
+ titleComponent: "div"
13698
+ };
13693
13699
  SliderChart.propTypes = {
13694
13700
  dynamicColor: PropTypes.bool,
13695
13701
  height: PropTypes.any,
13696
13702
  percentValue: PropTypes.any,
13697
13703
  size: PropTypes.string,
13698
13704
  title: PropTypes.string,
13705
+ titleComponent: PropTypes.any,
13699
13706
  subtitle: PropTypes.string,
13700
13707
  width: PropTypes.any,
13701
13708
  color: PropTypes.any,
13702
13709
  description: PropTypes.string,
13703
- showTitle: PropTypes.bool
13710
+ showTitle: PropTypes.bool,
13711
+ customSeriesColor: PropTypes.string
13704
13712
  };
13705
13713
 
13706
13714
  const getPercent = (total, value, roundPercent) => {
@@ -13738,6 +13746,8 @@ ProgressChart.propTypes = {
13738
13746
  description: PropTypes.string,
13739
13747
  /** The title of the progress chart. */
13740
13748
  title: PropTypes.string,
13749
+ /** The component to use to render the title. Only available in slider charts. */
13750
+ titleComponent: PropTypes.string,
13741
13751
  /** The subtitle of the progress chart. */
13742
13752
  subtitle: PropTypes.string,
13743
13753
  /** For "circle" progress chart, the main display value. Default is the percentage. */
@@ -13755,7 +13765,9 @@ ProgressChart.propTypes = {
13755
13765
  /** Automatically round the percentage value. */
13756
13766
  roundPercent: PropTypes.bool,
13757
13767
  /** Even if title given, do not display it. */
13758
- showTitle: PropTypes.bool
13768
+ showTitle: PropTypes.bool,
13769
+ /** If provided, will override the color the the series of the chart. Only active for slider charts. */
13770
+ customSeriesColor: PropTypes.string
13759
13771
  };
13760
13772
 
13761
13773
  const sortObjectBy = (field, reverse, primer) => {
@@ -14621,36 +14633,7 @@ Header.propTypes = {
14621
14633
  allStepsCompleted: PropTypes.bool
14622
14634
  };
14623
14635
 
14624
- // Copyright (c) 2022 HelioCampus Inc., all rights reserved.
14625
14636
  const useStyles$5 = makeStyles(theme => ({
14626
- container: {
14627
- position: "absolute",
14628
- overflowY: "auto",
14629
- left: 0,
14630
- right: 0,
14631
- bottom: 64,
14632
- top: 178
14633
- },
14634
- tabBar: {
14635
- borderBottom: "1px solid rgba(0, 0, 0, 0.12)",
14636
- zIndex: 1,
14637
- background: "#ffffff",
14638
- padding: theme.spacing(2)
14639
- },
14640
- scrolledTabBar: {
14641
- zIndex: 1,
14642
- borderBottom: "none",
14643
- background: "#ffffff",
14644
- padding: theme.spacing(2),
14645
- boxShadow: "0px 2px 4px -4px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px -10px rgba(0,0,0,0.12)"
14646
- },
14647
- bottomBar: {
14648
- borderTop: "1px solid rgba(0, 0, 0, 0.12)"
14649
- },
14650
- scrolledBottomBar: {
14651
- borderTop: "none",
14652
- boxShadow: "0px -4px 8px -4px rgba(0,0,0,0.12)"
14653
- },
14654
14637
  buttonContainer: {
14655
14638
  marginLeft: "auto",
14656
14639
  display: "flex"
@@ -14663,7 +14646,7 @@ const useStyles$5 = makeStyles(theme => ({
14663
14646
  marginRight: 8
14664
14647
  }
14665
14648
  }));
14666
- const bottomBarStyle = {
14649
+ const bottomBarDefaultStyle = {
14667
14650
  background: "#ffffff",
14668
14651
  display: "flex",
14669
14652
  minHeight: 64,
@@ -14679,7 +14662,7 @@ const bottomBarStyle = {
14679
14662
  right: 0
14680
14663
  };
14681
14664
 
14682
- /** Component to display a "stepper" wizard panel for multiple step proceses with swipeable tabs. Designed to be display within a Drawer component. */
14665
+ /** Component to display a "stepper" wizard panel for multiple step processes with swipeable tabs. Designed to be display within a Drawer component. */
14683
14666
 
14684
14667
  const WizardPanel = props => {
14685
14668
  var _props$panels;
@@ -14711,9 +14694,34 @@ const WizardPanel = props => {
14711
14694
  props.onComplete && props.onComplete();
14712
14695
  };
14713
14696
  const theme = useTheme$1();
14697
+ const stepsContainer = {
14698
+ position: "absolute",
14699
+ overflowY: "auto",
14700
+ left: 0,
14701
+ right: 0,
14702
+ bottom: 64,
14703
+ top: 178
14704
+ };
14714
14705
  const containerStyle = {
14715
14706
  backgroundColor: props.cardContent ? "rgb(239, 242, 246)" : "rgb(255,255,255)"
14716
14707
  };
14708
+ const tabBarStyle = {
14709
+ borderBottom: "1px solid rgba(0, 0, 0, 0.12)",
14710
+ zIndex: 1,
14711
+ background: "#ffffff",
14712
+ padding: props.display === "drawer" ? 2 : "0px 0px 16px 0px"
14713
+ };
14714
+ const scrolledTabBarStyle = {
14715
+ zIndex: 1,
14716
+ borderBottom: "none",
14717
+ background: "#ffffff",
14718
+ padding: props.display === "drawer" ? 2 : "0px 0px 16px 0px",
14719
+ boxShadow: "0px 2px 4px -4px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px -10px rgba(0,0,0,0.12)"
14720
+ };
14721
+ const bottomBarStyle = _extends({}, bottomBarDefaultStyle, {
14722
+ borderTop: "none",
14723
+ boxShadow: props.display === "drawer" ? "0px -4px 8px -4px rgba(0,0,0,0.12)" : "none"
14724
+ });
14717
14725
  useEffect(() => {
14718
14726
  var _containerRef$current;
14719
14727
  (_containerRef$current = containerRef.current) == null ? void 0 : _containerRef$current.scrollTo == null ? void 0 : _containerRef$current.scrollTo({
@@ -14727,9 +14735,9 @@ const WizardPanel = props => {
14727
14735
  }, [props.completed]);
14728
14736
  return /*#__PURE__*/jsxs(Fragment, {
14729
14737
  children: [/*#__PURE__*/jsx(AppBar$1, {
14730
- position: "sticky",
14738
+ position: props.display === "drawer" ? "sticky" : "relative",
14731
14739
  component: "div",
14732
- className: scrollTrigger ? classes.scrolledTabBar : classes.tabBar,
14740
+ sx: scrollTrigger ? scrolledTabBarStyle : tabBarStyle,
14733
14741
  elevation: 0,
14734
14742
  color: "default",
14735
14743
  children: /*#__PURE__*/jsx(Header, {
@@ -14740,7 +14748,7 @@ const WizardPanel = props => {
14740
14748
  }), /*#__PURE__*/jsx(Box$1, {
14741
14749
  ref: containerRef,
14742
14750
  sx: containerStyle,
14743
- className: classes.container,
14751
+ style: props.display === "drawer" ? stepsContainer : undefined,
14744
14752
  children: /*#__PURE__*/jsx(SwipeableViews, {
14745
14753
  axis: theme.direction === "rtl" ? "x-reverse" : "x",
14746
14754
  index: activeStep,
@@ -14757,7 +14765,6 @@ const WizardPanel = props => {
14757
14765
  })
14758
14766
  }), /*#__PURE__*/jsx(Box$1, {
14759
14767
  style: bottomBarStyle,
14760
- className: classes.scrolledBottomBar,
14761
14768
  children: /*#__PURE__*/jsxs(Box$1, {
14762
14769
  className: classes.buttonContainer,
14763
14770
  children: [/*#__PURE__*/jsx(Button, {
@@ -14818,9 +14825,12 @@ WizardPanel.defaultProps = {
14818
14825
  completed: false,
14819
14826
  completeButtonText: "Finish",
14820
14827
  disableComplete: false,
14821
- completing: false
14828
+ completing: false,
14829
+ display: "drawer"
14822
14830
  };
14823
14831
  WizardPanel.propTypes = {
14832
+ /** Where to display the panel, a dialog or drawer. */
14833
+ display: PropTypes.oneOf(["drawer"], ["dialog"]),
14824
14834
  /** The data defining the wizard steps and content. */
14825
14835
  panels: PropTypes.arrayOf(PropTypes.shape({
14826
14836
  id: PropTypes.any.isRequired,