aefis-core-ui 2.2.1-rc4 → 2.2.3-rc4
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.modern.js +53 -43
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -4807,7 +4807,8 @@ const ListItem = props => {
|
|
|
4807
4807
|
style: listItemStyle,
|
|
4808
4808
|
disabled: props.disabled,
|
|
4809
4809
|
dense: props.dense,
|
|
4810
|
-
selected: props.selected
|
|
4810
|
+
selected: props.selected,
|
|
4811
|
+
component: "li"
|
|
4811
4812
|
};
|
|
4812
4813
|
if (props.display === "horizontal") {
|
|
4813
4814
|
listItemArgs["sx"] = {
|
|
@@ -5295,7 +5296,8 @@ const useStyles$y = makeStyles(theme => ({
|
|
|
5295
5296
|
root: {
|
|
5296
5297
|
margin: 0,
|
|
5297
5298
|
padding: theme.spacing(2),
|
|
5298
|
-
position: "relative"
|
|
5299
|
+
position: "relative",
|
|
5300
|
+
minHeight: 60
|
|
5299
5301
|
},
|
|
5300
5302
|
closeButton: {
|
|
5301
5303
|
position: "absolute",
|
|
@@ -13573,7 +13575,7 @@ const color = percent => {
|
|
|
13573
13575
|
return percent ? dynamicSuccess[percent] : inProgress["default"];
|
|
13574
13576
|
};
|
|
13575
13577
|
const Chart = props => {
|
|
13576
|
-
|
|
13578
|
+
const bgColor = props.customSeriesColor || (props.dynamicColor ? color(props.percentValue) : props.showComplete && props.percentValue === 100 ? goalMet["default"] : color());
|
|
13577
13579
|
const XSmallSlider = withStyles$1({
|
|
13578
13580
|
root: {
|
|
13579
13581
|
borderRadius: 10,
|
|
@@ -13654,7 +13656,8 @@ Chart.propTypes = {
|
|
|
13654
13656
|
percentValue: PropTypes.number,
|
|
13655
13657
|
showComplete: PropTypes.any,
|
|
13656
13658
|
size: PropTypes.string,
|
|
13657
|
-
label: PropTypes.string
|
|
13659
|
+
label: PropTypes.string,
|
|
13660
|
+
customSeriesColor: PropTypes.string
|
|
13658
13661
|
};
|
|
13659
13662
|
const SliderChart = props => {
|
|
13660
13663
|
const classes = useStyles$a();
|
|
@@ -13684,7 +13687,7 @@ const SliderChart = props => {
|
|
|
13684
13687
|
}), props.title && props.title !== "" && props.showTitle && /*#__PURE__*/jsx(Typography, {
|
|
13685
13688
|
variant: "h3",
|
|
13686
13689
|
sx: titleStyle,
|
|
13687
|
-
component:
|
|
13690
|
+
component: props.titleComponent,
|
|
13688
13691
|
children: props.title
|
|
13689
13692
|
}), /*#__PURE__*/jsxs(Box$1, {
|
|
13690
13693
|
className: classes.chartContainer,
|
|
@@ -13705,17 +13708,22 @@ const SliderChart = props => {
|
|
|
13705
13708
|
})]
|
|
13706
13709
|
});
|
|
13707
13710
|
};
|
|
13711
|
+
SliderChart.defaultProps = {
|
|
13712
|
+
titleComponent: "div"
|
|
13713
|
+
};
|
|
13708
13714
|
SliderChart.propTypes = {
|
|
13709
13715
|
dynamicColor: PropTypes.bool,
|
|
13710
13716
|
height: PropTypes.any,
|
|
13711
13717
|
percentValue: PropTypes.any,
|
|
13712
13718
|
size: PropTypes.string,
|
|
13713
13719
|
title: PropTypes.string,
|
|
13720
|
+
titleComponent: PropTypes.any,
|
|
13714
13721
|
subtitle: PropTypes.string,
|
|
13715
13722
|
width: PropTypes.any,
|
|
13716
13723
|
color: PropTypes.any,
|
|
13717
13724
|
description: PropTypes.string,
|
|
13718
|
-
showTitle: PropTypes.bool
|
|
13725
|
+
showTitle: PropTypes.bool,
|
|
13726
|
+
customSeriesColor: PropTypes.string
|
|
13719
13727
|
};
|
|
13720
13728
|
|
|
13721
13729
|
const getPercent = (total, value, roundPercent) => {
|
|
@@ -13753,6 +13761,8 @@ ProgressChart.propTypes = {
|
|
|
13753
13761
|
description: PropTypes.string,
|
|
13754
13762
|
/** The title of the progress chart. */
|
|
13755
13763
|
title: PropTypes.string,
|
|
13764
|
+
/** The component to use to render the title. Only available in slider charts. */
|
|
13765
|
+
titleComponent: PropTypes.string,
|
|
13756
13766
|
/** The subtitle of the progress chart. */
|
|
13757
13767
|
subtitle: PropTypes.string,
|
|
13758
13768
|
/** For "circle" progress chart, the main display value. Default is the percentage. */
|
|
@@ -13770,7 +13780,9 @@ ProgressChart.propTypes = {
|
|
|
13770
13780
|
/** Automatically round the percentage value. */
|
|
13771
13781
|
roundPercent: PropTypes.bool,
|
|
13772
13782
|
/** Even if title given, do not display it. */
|
|
13773
|
-
showTitle: PropTypes.bool
|
|
13783
|
+
showTitle: PropTypes.bool,
|
|
13784
|
+
/** If provided, will override the color the the series of the chart. Only active for slider charts. */
|
|
13785
|
+
customSeriesColor: PropTypes.string
|
|
13774
13786
|
};
|
|
13775
13787
|
|
|
13776
13788
|
const sortObjectBy = (field, reverse, primer) => {
|
|
@@ -14647,36 +14659,7 @@ Header.propTypes = {
|
|
|
14647
14659
|
allStepsCompleted: PropTypes.bool
|
|
14648
14660
|
};
|
|
14649
14661
|
|
|
14650
|
-
// Copyright (c) 2022 HelioCampus Inc., all rights reserved.
|
|
14651
14662
|
const useStyles$5 = makeStyles(theme => ({
|
|
14652
|
-
container: {
|
|
14653
|
-
position: "absolute",
|
|
14654
|
-
overflowY: "auto",
|
|
14655
|
-
left: 0,
|
|
14656
|
-
right: 0,
|
|
14657
|
-
bottom: 64,
|
|
14658
|
-
top: 178
|
|
14659
|
-
},
|
|
14660
|
-
tabBar: {
|
|
14661
|
-
borderBottom: "1px solid rgba(0, 0, 0, 0.12)",
|
|
14662
|
-
zIndex: 1,
|
|
14663
|
-
background: "#ffffff",
|
|
14664
|
-
padding: theme.spacing(2)
|
|
14665
|
-
},
|
|
14666
|
-
scrolledTabBar: {
|
|
14667
|
-
zIndex: 1,
|
|
14668
|
-
borderBottom: "none",
|
|
14669
|
-
background: "#ffffff",
|
|
14670
|
-
padding: theme.spacing(2),
|
|
14671
|
-
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)"
|
|
14672
|
-
},
|
|
14673
|
-
bottomBar: {
|
|
14674
|
-
borderTop: "1px solid rgba(0, 0, 0, 0.12)"
|
|
14675
|
-
},
|
|
14676
|
-
scrolledBottomBar: {
|
|
14677
|
-
borderTop: "none",
|
|
14678
|
-
boxShadow: "0px -4px 8px -4px rgba(0,0,0,0.12)"
|
|
14679
|
-
},
|
|
14680
14663
|
buttonContainer: {
|
|
14681
14664
|
marginLeft: "auto",
|
|
14682
14665
|
display: "flex"
|
|
@@ -14689,7 +14672,7 @@ const useStyles$5 = makeStyles(theme => ({
|
|
|
14689
14672
|
marginRight: 8
|
|
14690
14673
|
}
|
|
14691
14674
|
}));
|
|
14692
|
-
const
|
|
14675
|
+
const bottomBarDefaultStyle = {
|
|
14693
14676
|
background: "#ffffff",
|
|
14694
14677
|
display: "flex",
|
|
14695
14678
|
minHeight: 64,
|
|
@@ -14705,7 +14688,7 @@ const bottomBarStyle = {
|
|
|
14705
14688
|
right: 0
|
|
14706
14689
|
};
|
|
14707
14690
|
|
|
14708
|
-
/** Component to display a "stepper" wizard panel for multiple step
|
|
14691
|
+
/** Component to display a "stepper" wizard panel for multiple step processes with swipeable tabs. Designed to be display within a Drawer component. */
|
|
14709
14692
|
|
|
14710
14693
|
const WizardPanel = props => {
|
|
14711
14694
|
var _props$panels;
|
|
@@ -14737,9 +14720,34 @@ const WizardPanel = props => {
|
|
|
14737
14720
|
props.onComplete && props.onComplete();
|
|
14738
14721
|
};
|
|
14739
14722
|
const theme = useTheme$1();
|
|
14723
|
+
const stepsContainer = {
|
|
14724
|
+
position: "absolute",
|
|
14725
|
+
overflowY: "auto",
|
|
14726
|
+
left: 0,
|
|
14727
|
+
right: 0,
|
|
14728
|
+
bottom: 64,
|
|
14729
|
+
top: 178
|
|
14730
|
+
};
|
|
14740
14731
|
const containerStyle = {
|
|
14741
14732
|
backgroundColor: props.cardContent ? "rgb(239, 242, 246)" : "rgb(255,255,255)"
|
|
14742
14733
|
};
|
|
14734
|
+
const tabBarStyle = {
|
|
14735
|
+
borderBottom: "1px solid rgba(0, 0, 0, 0.12)",
|
|
14736
|
+
zIndex: 1,
|
|
14737
|
+
background: "#ffffff",
|
|
14738
|
+
padding: props.display === "drawer" ? 2 : "0px 0px 16px 0px"
|
|
14739
|
+
};
|
|
14740
|
+
const scrolledTabBarStyle = {
|
|
14741
|
+
zIndex: 1,
|
|
14742
|
+
borderBottom: "none",
|
|
14743
|
+
background: "#ffffff",
|
|
14744
|
+
padding: props.display === "drawer" ? 2 : "0px 0px 16px 0px",
|
|
14745
|
+
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)"
|
|
14746
|
+
};
|
|
14747
|
+
const bottomBarStyle = _extends({}, bottomBarDefaultStyle, {
|
|
14748
|
+
borderTop: "none",
|
|
14749
|
+
boxShadow: props.display === "drawer" ? "0px -4px 8px -4px rgba(0,0,0,0.12)" : "none"
|
|
14750
|
+
});
|
|
14743
14751
|
useEffect(() => {
|
|
14744
14752
|
var _containerRef$current;
|
|
14745
14753
|
(_containerRef$current = containerRef.current) == null ? void 0 : _containerRef$current.scrollTo == null ? void 0 : _containerRef$current.scrollTo({
|
|
@@ -14753,9 +14761,9 @@ const WizardPanel = props => {
|
|
|
14753
14761
|
}, [props.completed]);
|
|
14754
14762
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
14755
14763
|
children: [/*#__PURE__*/jsx(AppBar$1, {
|
|
14756
|
-
position: "sticky",
|
|
14764
|
+
position: props.display === "drawer" ? "sticky" : "relative",
|
|
14757
14765
|
component: "div",
|
|
14758
|
-
|
|
14766
|
+
sx: scrollTrigger ? scrolledTabBarStyle : tabBarStyle,
|
|
14759
14767
|
elevation: 0,
|
|
14760
14768
|
color: "default",
|
|
14761
14769
|
children: /*#__PURE__*/jsx(Header, {
|
|
@@ -14766,7 +14774,7 @@ const WizardPanel = props => {
|
|
|
14766
14774
|
}), /*#__PURE__*/jsx(Box$1, {
|
|
14767
14775
|
ref: containerRef,
|
|
14768
14776
|
sx: containerStyle,
|
|
14769
|
-
|
|
14777
|
+
style: props.display === "drawer" ? stepsContainer : undefined,
|
|
14770
14778
|
children: /*#__PURE__*/jsx(SwipeableViews, {
|
|
14771
14779
|
axis: theme.direction === "rtl" ? "x-reverse" : "x",
|
|
14772
14780
|
index: activeStep,
|
|
@@ -14783,7 +14791,6 @@ const WizardPanel = props => {
|
|
|
14783
14791
|
})
|
|
14784
14792
|
}), /*#__PURE__*/jsx(Box$1, {
|
|
14785
14793
|
style: bottomBarStyle,
|
|
14786
|
-
className: classes.scrolledBottomBar,
|
|
14787
14794
|
children: /*#__PURE__*/jsxs(Box$1, {
|
|
14788
14795
|
className: classes.buttonContainer,
|
|
14789
14796
|
children: [/*#__PURE__*/jsx(Button, {
|
|
@@ -14844,9 +14851,12 @@ WizardPanel.defaultProps = {
|
|
|
14844
14851
|
completed: false,
|
|
14845
14852
|
completeButtonText: "Finish",
|
|
14846
14853
|
disableComplete: false,
|
|
14847
|
-
completing: false
|
|
14854
|
+
completing: false,
|
|
14855
|
+
display: "drawer"
|
|
14848
14856
|
};
|
|
14849
14857
|
WizardPanel.propTypes = {
|
|
14858
|
+
/** Where to display the panel, a dialog or drawer. */
|
|
14859
|
+
display: PropTypes.oneOf(["drawer"], ["dialog"]),
|
|
14850
14860
|
/** The data defining the wizard steps and content. */
|
|
14851
14861
|
panels: PropTypes.arrayOf(PropTypes.shape({
|
|
14852
14862
|
id: PropTypes.any.isRequired,
|