sag_components 2.0.0-beta47 → 2.0.0-beta49

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.js CHANGED
@@ -9847,67 +9847,70 @@ const DropdownMain = styled__default["default"].div`
9847
9847
  `;
9848
9848
 
9849
9849
  /* eslint-disable react/prop-types */
9850
- const DropdownNew = ({
9851
- isMulti,
9852
- label,
9853
- labelEmptyValue,
9854
- options,
9855
- selectedValue,
9856
- placeHolder,
9857
- onChange,
9858
- required,
9859
- disabled,
9860
- width,
9861
- error,
9862
- errorMessage,
9863
- labelColor,
9864
- checkBoxColor,
9865
- xIconShow,
9866
- showLabelOnTop,
9867
- orderBy,
9868
- elementType
9869
- }) => /*#__PURE__*/React__default["default"].createElement(DropdownMain, {
9870
- className: "DropdownMain",
9871
- width: width
9872
- }, isMulti ? /*#__PURE__*/React__default["default"].createElement(DropdownMultiNew, {
9873
- className: "DropdownMultiNew",
9874
- placeHolder: placeHolder,
9875
- label: label,
9876
- labelEmptyValue: labelEmptyValue,
9877
- labelColor: labelColor,
9878
- checkBoxColor: checkBoxColor,
9879
- required: required,
9880
- options: options,
9881
- width: width,
9882
- disabled: disabled,
9883
- error: error,
9884
- errorMessage: errorMessage,
9885
- selectedValue: selectedValue,
9886
- xIconShow: xIconShow,
9887
- onChange: onChange,
9888
- showLabelOnTop: showLabelOnTop,
9889
- orderBy: orderBy,
9890
- elementType: elementType
9891
- }) : /*#__PURE__*/React__default["default"].createElement(DropdownSingleNew, {
9892
- className: "DropdownSingleNew",
9893
- placeHolder: placeHolder,
9894
- label: label,
9895
- labelEmptyValue: labelEmptyValue,
9896
- labelColor: labelColor,
9897
- checkBoxColor: checkBoxColor,
9898
- required: required,
9899
- options: options,
9900
- width: width,
9901
- disabled: disabled,
9902
- error: error,
9903
- errorMessage: errorMessage,
9904
- selectedValue: selectedValue,
9905
- xIconShow: xIconShow,
9906
- onChange: onChange,
9907
- showLabelOnTop: showLabelOnTop,
9908
- orderBy: orderBy,
9909
- elementType: elementType
9910
- }));
9850
+ const DropdownNew = _ref => {
9851
+ let {
9852
+ isMulti,
9853
+ label,
9854
+ labelEmptyValue,
9855
+ options,
9856
+ selectedValue,
9857
+ placeHolder,
9858
+ onChange,
9859
+ required,
9860
+ disabled,
9861
+ width,
9862
+ error,
9863
+ errorMessage,
9864
+ labelColor,
9865
+ checkBoxColor,
9866
+ xIconShow,
9867
+ showLabelOnTop,
9868
+ orderBy,
9869
+ elementType
9870
+ } = _ref;
9871
+ return /*#__PURE__*/React__default["default"].createElement(DropdownMain, {
9872
+ className: "DropdownMain",
9873
+ width: width
9874
+ }, isMulti ? /*#__PURE__*/React__default["default"].createElement(DropdownMultiNew, {
9875
+ className: "DropdownMultiNew",
9876
+ placeHolder: placeHolder,
9877
+ label: label,
9878
+ labelEmptyValue: labelEmptyValue,
9879
+ labelColor: labelColor,
9880
+ checkBoxColor: checkBoxColor,
9881
+ required: required,
9882
+ options: options,
9883
+ width: width,
9884
+ disabled: disabled,
9885
+ error: error,
9886
+ errorMessage: errorMessage,
9887
+ selectedValue: selectedValue,
9888
+ xIconShow: xIconShow,
9889
+ onChange: onChange,
9890
+ showLabelOnTop: showLabelOnTop,
9891
+ orderBy: orderBy,
9892
+ elementType: elementType
9893
+ }) : /*#__PURE__*/React__default["default"].createElement(DropdownSingleNew, {
9894
+ className: "DropdownSingleNew",
9895
+ placeHolder: placeHolder,
9896
+ label: label,
9897
+ labelEmptyValue: labelEmptyValue,
9898
+ labelColor: labelColor,
9899
+ checkBoxColor: checkBoxColor,
9900
+ required: required,
9901
+ options: options,
9902
+ width: width,
9903
+ disabled: disabled,
9904
+ error: error,
9905
+ errorMessage: errorMessage,
9906
+ selectedValue: selectedValue,
9907
+ xIconShow: xIconShow,
9908
+ onChange: onChange,
9909
+ showLabelOnTop: showLabelOnTop,
9910
+ orderBy: orderBy,
9911
+ elementType: elementType
9912
+ }));
9913
+ };
9911
9914
  DropdownNew.propTypes = {
9912
9915
  placeHolder: PropTypes.string,
9913
9916
  label: PropTypes.string,
@@ -10080,26 +10083,34 @@ const OptionsContainer$4 = styled__default["default"].div`
10080
10083
  padding-top: 8px;
10081
10084
  `;
10082
10085
 
10083
- const ChervronRightIcon = () => /*#__PURE__*/React__default["default"].createElement("svg", {
10084
- width: "8",
10085
- height: "13",
10086
+ const ChervronRightIcon = ({
10087
+ width = "8",
10088
+ height = "13",
10089
+ fill = "#777575"
10090
+ }) => /*#__PURE__*/React__default["default"].createElement("svg", {
10091
+ width: width,
10092
+ height: height,
10086
10093
  viewBox: "0 0 8 13",
10087
10094
  fill: "none",
10088
10095
  xmlns: "http://www.w3.org/2000/svg"
10089
10096
  }, /*#__PURE__*/React__default["default"].createElement("path", {
10090
10097
  d: "M7.33984 5.78516C7.58594 6.05859 7.58594 6.46875 7.33984 6.71484L2.08984 11.9648C1.81641 12.2383 1.40625 12.2383 1.16016 11.9648C0.886719 11.7188 0.886719 11.3086 1.16016 11.0625L5.94531 6.27734L1.16016 1.46484C0.886719 1.21875 0.886719 0.808594 1.16016 0.5625C1.40625 0.289062 1.81641 0.289062 2.0625 0.5625L7.33984 5.78516Z",
10091
- fill: "#777575"
10098
+ fill: fill
10092
10099
  }));
10093
10100
 
10094
- const ChervronLeftIcon = () => /*#__PURE__*/React__default["default"].createElement("svg", {
10095
- width: "7",
10096
- height: "13",
10101
+ const ChervronLeftIcon = ({
10102
+ width = 7,
10103
+ height = 13,
10104
+ fill = "#777575"
10105
+ }) => /*#__PURE__*/React__default["default"].createElement("svg", {
10106
+ width: width,
10107
+ height: height,
10097
10108
  viewBox: "0 0 7 13",
10098
10109
  fill: "none",
10099
10110
  xmlns: "http://www.w3.org/2000/svg"
10100
10111
  }, /*#__PURE__*/React__default["default"].createElement("path", {
10101
10112
  d: "M0.410156 5.78516L5.66016 0.5625C5.90625 0.289062 6.31641 0.289062 6.58984 0.5625C6.83594 0.808594 6.83594 1.21875 6.58984 1.46484L1.77734 6.25L6.5625 11.0625C6.83594 11.3086 6.83594 11.7188 6.5625 11.9648C6.31641 12.2383 5.90625 12.2383 5.66016 11.9648L0.410156 6.71484C0.136719 6.46875 0.136719 6.05859 0.410156 5.78516Z",
10102
- fill: "#777575"
10113
+ fill: fill
10103
10114
  }));
10104
10115
 
10105
10116
  /* eslint-disable react/prop-types */
@@ -10321,20 +10332,21 @@ const DatePicker = ({
10321
10332
  };
10322
10333
 
10323
10334
  /* eslint-disable import/no-extraneous-dependencies */
10324
- const RangePicker = ({
10325
- label,
10326
- onChange,
10327
- borderRadius,
10328
- required,
10329
- width,
10330
- height,
10331
- placeholder,
10332
- disabled,
10333
- borderColor,
10334
- borderColorFocus,
10335
- textColor,
10336
- selectedValue
10337
- }) => {
10335
+ const RangePicker = _ref => {
10336
+ let {
10337
+ label,
10338
+ onChange,
10339
+ borderRadius,
10340
+ required,
10341
+ width,
10342
+ height,
10343
+ placeholder,
10344
+ disabled,
10345
+ borderColor,
10346
+ borderColorFocus,
10347
+ textColor,
10348
+ selectedValue
10349
+ } = _ref;
10338
10350
  const [isFocused, setIsFocused] = React$1.useState(false);
10339
10351
  const [isOpen, setIsOpen] = React$1.useState(false);
10340
10352
  const [value, setValue] = React$1.useState(''); // Added value state
@@ -10766,22 +10778,23 @@ const QuarterPopupPicker = ({
10766
10778
  };
10767
10779
 
10768
10780
  /* eslint-disable import/no-extraneous-dependencies */
10769
- const QuarterPicker = ({
10770
- availableQuarters,
10771
- // ["Q1-2024"]
10772
- label,
10773
- onChange,
10774
- borderRadius,
10775
- required,
10776
- width,
10777
- height,
10778
- placeholder,
10779
- disabled,
10780
- borderColor,
10781
- borderColorFocus,
10782
- textColor,
10783
- selectedValue
10784
- }) => {
10781
+ const QuarterPicker = _ref => {
10782
+ let {
10783
+ availableQuarters,
10784
+ // ["Q1-2024"]
10785
+ label,
10786
+ onChange,
10787
+ borderRadius,
10788
+ required,
10789
+ width,
10790
+ height,
10791
+ placeholder,
10792
+ disabled,
10793
+ borderColor,
10794
+ borderColorFocus,
10795
+ textColor,
10796
+ selectedValue
10797
+ } = _ref;
10785
10798
  const [isFocused, setIsFocused] = React$1.useState(false);
10786
10799
  const [isOpen, setIsOpen] = React$1.useState(false);
10787
10800
  const [value, setValue] = React$1.useState('');
@@ -11220,21 +11233,22 @@ const MonthPopupPicker = ({
11220
11233
  };
11221
11234
 
11222
11235
  /* eslint-disable import/no-extraneous-dependencies */
11223
- const MonthPicker = ({
11224
- availableMonths,
11225
- label,
11226
- onChange,
11227
- borderRadius,
11228
- required,
11229
- width,
11230
- height,
11231
- placeholder,
11232
- disabled,
11233
- borderColor,
11234
- borderColorFocus,
11235
- textColor,
11236
- selectedValue
11237
- }) => {
11236
+ const MonthPicker = _ref => {
11237
+ let {
11238
+ availableMonths,
11239
+ label,
11240
+ onChange,
11241
+ borderRadius,
11242
+ required,
11243
+ width,
11244
+ height,
11245
+ placeholder,
11246
+ disabled,
11247
+ borderColor,
11248
+ borderColorFocus,
11249
+ textColor,
11250
+ selectedValue
11251
+ } = _ref;
11238
11252
  const [isFocused, setIsFocused] = React$1.useState(false);
11239
11253
  const [isOpen, setIsOpen] = React$1.useState(false);
11240
11254
  const [value, setValue] = React$1.useState('');
@@ -24459,21 +24473,22 @@ const DeleteIcon = styled__default["default"].div`
24459
24473
  position: absolute;
24460
24474
  `;
24461
24475
 
24462
- const QuickFilterDropdownSingle = ({
24463
- label,
24464
- hoverColor,
24465
- options,
24466
- selectedValue,
24467
- placeHolder,
24468
- onChange,
24469
- disabled,
24470
- width,
24471
- error,
24472
- errorMessage,
24473
- xIconShow,
24474
- labelColor,
24475
- showLabelOnTop
24476
- }) => {
24476
+ const QuickFilterDropdownSingle = _ref => {
24477
+ let {
24478
+ label,
24479
+ hoverColor,
24480
+ options,
24481
+ selectedValue,
24482
+ placeHolder,
24483
+ onChange,
24484
+ disabled,
24485
+ width,
24486
+ error,
24487
+ errorMessage,
24488
+ xIconShow,
24489
+ labelColor,
24490
+ showLabelOnTop
24491
+ } = _ref;
24477
24492
  const [isFocused, setIsFocused] = React$1.useState(false);
24478
24493
  const [showOptions, setShowOptions] = React$1.useState(false);
24479
24494
  const [inputValue, setInputValue] = React$1.useState("");
@@ -24871,23 +24886,24 @@ const IconContainer$1 = styled__default["default"].div`
24871
24886
  cursor: pointer;
24872
24887
  `;
24873
24888
 
24874
- const QuickFilterDropdownMultiSelection = ({
24875
- label,
24876
- labelEmptyValue,
24877
- options,
24878
- selectedValue,
24879
- placeHolder,
24880
- onChange,
24881
- required,
24882
- disabled,
24883
- width,
24884
- error,
24885
- errorMessage,
24886
- labelColor,
24887
- xIconShow,
24888
- checkBoxColor,
24889
- showLabelOnTop
24890
- }) => {
24889
+ const QuickFilterDropdownMultiSelection = _ref => {
24890
+ let {
24891
+ label,
24892
+ labelEmptyValue,
24893
+ options,
24894
+ selectedValue,
24895
+ placeHolder,
24896
+ onChange,
24897
+ required,
24898
+ disabled,
24899
+ width,
24900
+ error,
24901
+ errorMessage,
24902
+ labelColor,
24903
+ xIconShow,
24904
+ checkBoxColor,
24905
+ showLabelOnTop
24906
+ } = _ref;
24891
24907
  const [isFocused, setIsFocused] = React$1.useState(false);
24892
24908
  const [showOptions, setShowOptions] = React$1.useState(false);
24893
24909
  const [inputValue, setInputValue] = React$1.useState('');
@@ -25891,39 +25907,45 @@ const LegendWrapper = styled__default["default"].div`
25891
25907
  padding-top: 15px;
25892
25908
  `;
25893
25909
 
25894
- const LegendUnionIcon = ({
25895
- width = '18',
25896
- height = '5',
25897
- color = '#9CCB3B'
25898
- }) => /*#__PURE__*/React__default["default"].createElement("svg", {
25899
- width: width,
25900
- height: height,
25901
- viewBox: "0 0 18 5",
25902
- fill: "none",
25903
- xmlns: "http://www.w3.org/2000/svg"
25904
- }, /*#__PURE__*/React__default["default"].createElement("path", {
25905
- fillRule: "evenodd",
25906
- clipRule: "evenodd",
25907
- d: "M11.45 2H17C17.2761 2 17.5 2.22386 17.5 2.5C17.5 2.77614 17.2761 3 17 3H11.45C11.2184 4.14112 10.2095 5 9 5C7.79052 5 6.78164 4.14112 6.55001 3H1C0.723858 3 0.5 2.77614 0.5 2.5C0.5 2.22386 0.723858 2 1 2H6.55001C6.78164 0.85888 7.79052 0 9 0C10.2095 0 11.2184 0.85888 11.45 2Z",
25908
- fill: color
25909
- }));
25910
+ const LegendUnionIcon = _ref => {
25911
+ let {
25912
+ width = '18',
25913
+ height = '5',
25914
+ color = '#9CCB3B'
25915
+ } = _ref;
25916
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
25917
+ width: width,
25918
+ height: height,
25919
+ viewBox: "0 0 18 5",
25920
+ fill: "none",
25921
+ xmlns: "http://www.w3.org/2000/svg"
25922
+ }, /*#__PURE__*/React__default["default"].createElement("path", {
25923
+ fillRule: "evenodd",
25924
+ clipRule: "evenodd",
25925
+ d: "M11.45 2H17C17.2761 2 17.5 2.22386 17.5 2.5C17.5 2.77614 17.2761 3 17 3H11.45C11.2184 4.14112 10.2095 5 9 5C7.79052 5 6.78164 4.14112 6.55001 3H1C0.723858 3 0.5 2.77614 0.5 2.5C0.5 2.22386 0.723858 2 1 2H6.55001C6.78164 0.85888 7.79052 0 9 0C10.2095 0 11.2184 0.85888 11.45 2Z",
25926
+ fill: color
25927
+ }));
25928
+ };
25910
25929
 
25911
- const LegendLineIcon = ({
25912
- width = '19',
25913
- height = '3',
25914
- color = '#9CCB3B'
25915
- }) => /*#__PURE__*/React__default["default"].createElement("svg", {
25916
- width: width,
25917
- height: height,
25918
- viewBox: "0 0 19 3",
25919
- fill: "none",
25920
- xmlns: "http://www.w3.org/2000/svg"
25921
- }, /*#__PURE__*/React__default["default"].createElement("path", {
25922
- fillRule: "evenodd",
25923
- clipRule: "evenodd",
25924
- d: "M0 1.5C0 0.671573 0.671573 0 1.5 0H17.5C18.3284 0 19 0.671572 19 1.5C19 2.32843 18.3284 3 17.5 3H1.5C0.671575 3 0 2.32843 0 1.5Z",
25925
- fill: color
25926
- }));
25930
+ const LegendLineIcon = _ref => {
25931
+ let {
25932
+ width = '19',
25933
+ height = '3',
25934
+ color = '#9CCB3B'
25935
+ } = _ref;
25936
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
25937
+ width: width,
25938
+ height: height,
25939
+ viewBox: "0 0 19 3",
25940
+ fill: "none",
25941
+ xmlns: "http://www.w3.org/2000/svg"
25942
+ }, /*#__PURE__*/React__default["default"].createElement("path", {
25943
+ fillRule: "evenodd",
25944
+ clipRule: "evenodd",
25945
+ d: "M0 1.5C0 0.671573 0.671573 0 1.5 0H17.5C18.3284 0 19 0.671572 19 1.5C19 2.32843 18.3284 3 17.5 3H1.5C0.671575 3 0 2.32843 0 1.5Z",
25946
+ fill: color
25947
+ }));
25948
+ };
25927
25949
 
25928
25950
  const ControlsContainer$5 = styled__default["default"].div`
25929
25951
  position: relative;
@@ -26498,7 +26520,7 @@ const LegendTitle = styled__default["default"].h5`
26498
26520
  display: flex;
26499
26521
  justify-content: space-between;
26500
26522
  @media (max-width: 1536px) {
26501
- font-size: 0.6875em; /* 11px → 0.6875em */
26523
+ font-size: 0.75em; /* 11px → 0.6875em */
26502
26524
  }
26503
26525
  @media (max-width: 1366px) {
26504
26526
  font-size: 0.625em; /* 10px → 0.625em */
@@ -28852,7 +28874,6 @@ const scrollableStyles$2 = `
28852
28874
  }
28853
28875
  `;
28854
28876
  const DoubleBarSingleLineContainer = styled__default["default"].div`
28855
- position: relative;
28856
28877
  font-family: "Poppins", sans-serif;
28857
28878
  color: #212121;
28858
28879
  background-color: white;
@@ -28863,13 +28884,14 @@ const DoubleBarSingleLineContainer = styled__default["default"].div`
28863
28884
  ${scrollableStyles$2}
28864
28885
  `;
28865
28886
  const LegendContainer = styled__default["default"].div`
28866
- position: sticky;
28887
+ position: absolute;
28888
+ left: 0;
28867
28889
  text-align: center;
28868
- width: ${props => props.width};
28869
- bottom: calc(100% - ${props => props.height});
28890
+ width: ${props => `${props.width}px`};
28891
+ bottom: 20px;
28870
28892
  `;
28871
28893
  const Controls$1 = styled__default["default"].div`
28872
- height: 100%;
28894
+ height: calc(100% - 30px);
28873
28895
  display: flex;
28874
28896
  flex-direction: column;
28875
28897
  background-color: white;
@@ -28921,6 +28943,7 @@ const DoubleBarSingleLine = props => {
28921
28943
  width,
28922
28944
  height,
28923
28945
  title,
28946
+ hasScroll,
28924
28947
  dataState,
28925
28948
  data,
28926
28949
  lineChartValueType,
@@ -28932,6 +28955,14 @@ const DoubleBarSingleLine = props => {
28932
28955
  noDataText
28933
28956
  } = props;
28934
28957
  const [legendData, setLegendData] = React$1.useState([]);
28958
+ const containerRef = React$1.useRef(null); // Create a ref for the container
28959
+ const [containerWidth, setContainerWidth] = React$1.useState(0); // State to store the container's width
28960
+
28961
+ React$1.useEffect(() => {
28962
+ if (containerRef.current) {
28963
+ setContainerWidth(containerRef.current.offsetWidth); // Set the width of the container
28964
+ }
28965
+ }, [containerRef]);
28935
28966
  React$1.useEffect(() => {
28936
28967
  const newLegendData = dataState.map(item => ({
28937
28968
  title: item.name,
@@ -29074,16 +29105,17 @@ const DoubleBarSingleLine = props => {
29074
29105
  }, line))));
29075
29106
  };
29076
29107
  return /*#__PURE__*/React__default["default"].createElement(DoubleBarSingleLineContainer, {
29108
+ ref: containerRef,
29077
29109
  className: className,
29078
29110
  height: height,
29079
29111
  width: width,
29080
- hasScroll: data.length >= limitViewableItems
29112
+ hasScroll: hasScroll
29081
29113
  }, data.length === 0 ? /*#__PURE__*/React__default["default"].createElement(NoDataFoundMessage, {
29082
29114
  noDataText: noDataText
29083
29115
  }) : /*#__PURE__*/React__default["default"].createElement(Controls$1, {
29084
29116
  className: "Controls"
29085
- }, title !== '' && /*#__PURE__*/React__default["default"].createElement(Title$2, null, title), /*#__PURE__*/React__default["default"].createElement(ChartsWrapper, {
29086
- width: data.length >= limitViewableItems ? `${data.length * 178}px` : 'auto'
29117
+ }, title && title.trim() !== '' && /*#__PURE__*/React__default["default"].createElement(Title$2, null, title), /*#__PURE__*/React__default["default"].createElement(ChartsWrapper, {
29118
+ width: hasScroll ? `${data.length * 178}px` : 'auto'
29087
29119
  }, /*#__PURE__*/React__default["default"].createElement(LineChartWrapper, null, /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, null, /*#__PURE__*/React__default["default"].createElement(recharts.LineChart, {
29088
29120
  data: data,
29089
29121
  margin: {
@@ -29143,7 +29175,7 @@ const DoubleBarSingleLine = props => {
29143
29175
  dataKey: obj.key,
29144
29176
  content: CustomLabel
29145
29177
  }))))))), showLegend && /*#__PURE__*/React__default["default"].createElement(LegendContainer, {
29146
- width: width,
29178
+ width: containerWidth,
29147
29179
  height: height
29148
29180
  }, /*#__PURE__*/React__default["default"].createElement(PerformanceAnalyticsLegend, {
29149
29181
  legendData: legendData
@@ -30350,6 +30382,7 @@ exports.LinkButton = LinkButton;
30350
30382
  exports.LinnerDataBox = LinnerDataBox;
30351
30383
  exports.MarketShareDescription = MarketShareDescription;
30352
30384
  exports.OneColumnContainer = OneColumnContainer;
30385
+ exports.PerformanceAnalyticsLegend = PerformanceAnalyticsLegend;
30353
30386
  exports.PieChart = PieChart;
30354
30387
  exports.PopupCharts = PopupCharts;
30355
30388
  exports.QuickFilter = QuickFilter;