sag_components 2.0.0-beta73 → 2.0.0-beta75
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.esm.js +24 -38
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +24 -38
- package/dist/index.js.map +1 -1
- package/dist/types/components/MonthPicker/MonthPicker.d.ts +2 -1
- package/dist/types/components/MonthPicker/MonthPopupPicker.d.ts +2 -1
- package/dist/types/components/MonthPicker/MonthPopupPicker.style.d.ts +7 -0
- package/dist/types/components/QuarterPicker/QuarterPicker.d.ts +2 -1
- package/dist/types/components/QuarterPicker/QuarterPopupPicker.d.ts +2 -1
- package/dist/types/components/QuarterPicker/QuarterPopupPicker.style.d.ts +6 -0
- package/dist/types/components/QuickFilter/QuickFilter.stories.d.ts +154 -99
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3739,7 +3739,7 @@ display: flex;
|
|
|
3739
3739
|
flex-direction: row;
|
|
3740
3740
|
|
|
3741
3741
|
`;
|
|
3742
|
-
styled.div`
|
|
3742
|
+
const TabActionLine = styled.div`
|
|
3743
3743
|
margin-left: auto;
|
|
3744
3744
|
display: flex;
|
|
3745
3745
|
align-items: center;
|
|
@@ -3842,6 +3842,7 @@ const TabMenu = props => {
|
|
|
3842
3842
|
showLabel,
|
|
3843
3843
|
showSearchInput,
|
|
3844
3844
|
showViewOptionsButton,
|
|
3845
|
+
headlineContent,
|
|
3845
3846
|
setTopRightButton,
|
|
3846
3847
|
buttonHoverColor,
|
|
3847
3848
|
disabledButton,
|
|
@@ -3888,7 +3889,7 @@ const TabMenu = props => {
|
|
|
3888
3889
|
color: color,
|
|
3889
3890
|
width: `${100 / tabs.length}%`,
|
|
3890
3891
|
role: "presentation"
|
|
3891
|
-
}))), setTopRightButton && /*#__PURE__*/React$1.createElement(Button, {
|
|
3892
|
+
}))), headlineContent && /*#__PURE__*/React$1.createElement(TabActionLine, null, headlineContent), setTopRightButton && /*#__PURE__*/React$1.createElement(Button, {
|
|
3892
3893
|
text: rightButtonText,
|
|
3893
3894
|
rightIcon: rightButtonIcon,
|
|
3894
3895
|
size: "small",
|
|
@@ -10232,18 +10233,12 @@ const OptionsContainer$3 = styled.div`
|
|
|
10232
10233
|
padding-top: 8px;
|
|
10233
10234
|
`;
|
|
10234
10235
|
|
|
10235
|
-
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
10236
|
-
// import ChervronRightIcon from './icons/ChervronRightIcon';
|
|
10237
|
-
// import ChervronLeftIcon from './icons/ChervronLeftIcon';
|
|
10238
|
-
|
|
10239
|
-
// Styled components for the date picker
|
|
10240
10236
|
const DatePickerContainer$2 = styled.div`
|
|
10241
10237
|
position: relative;
|
|
10242
10238
|
`;
|
|
10243
10239
|
const DatePickerPopup$1 = styled.div`
|
|
10244
10240
|
position: absolute;
|
|
10245
10241
|
width: auto;
|
|
10246
|
-
// margin: 5px;
|
|
10247
10242
|
height: 120px;
|
|
10248
10243
|
top: 100%;
|
|
10249
10244
|
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.15);
|
|
@@ -10259,21 +10254,10 @@ const DatePickerHeader$1 = styled.div`
|
|
|
10259
10254
|
justify-content: space-between;
|
|
10260
10255
|
margin-bottom: 10px;
|
|
10261
10256
|
`;
|
|
10262
|
-
|
|
10263
|
-
// const NavDiv = styled.div`
|
|
10264
|
-
// width: 80px;
|
|
10265
|
-
// height: 30px;
|
|
10266
|
-
// display: flex;
|
|
10267
|
-
// padding: 5px;
|
|
10268
|
-
// justify-content: space-around;
|
|
10269
|
-
// `;
|
|
10270
|
-
|
|
10271
10257
|
const DatePickerSelect$1 = styled.select`
|
|
10272
10258
|
padding: 4px;
|
|
10273
10259
|
border: none;
|
|
10274
|
-
font-family: Poppins;
|
|
10275
10260
|
font-size: 12px;
|
|
10276
|
-
font-style: normal;
|
|
10277
10261
|
font-weight: 400;
|
|
10278
10262
|
cursor: pointer;
|
|
10279
10263
|
|
|
@@ -10295,7 +10279,6 @@ const DateCell$1 = styled.div`
|
|
|
10295
10279
|
width: 100%;
|
|
10296
10280
|
aspect-ratio: 1 / 1;
|
|
10297
10281
|
/* height: 32px; */
|
|
10298
|
-
font-family: Poppins;
|
|
10299
10282
|
border-radius: 4px;
|
|
10300
10283
|
font-size: 12px;
|
|
10301
10284
|
font-style: normal;
|
|
@@ -10327,6 +10310,7 @@ const DateCell$1 = styled.div`
|
|
|
10327
10310
|
color: #ccc;
|
|
10328
10311
|
}
|
|
10329
10312
|
`;
|
|
10313
|
+
|
|
10330
10314
|
const generateYearsArray$1 = (startYear, endDate) => {
|
|
10331
10315
|
const years = [];
|
|
10332
10316
|
const endYear = endDate.getFullYear();
|
|
@@ -10335,14 +10319,14 @@ const generateYearsArray$1 = (startYear, endDate) => {
|
|
|
10335
10319
|
}
|
|
10336
10320
|
return years;
|
|
10337
10321
|
};
|
|
10338
|
-
const years$1 = generateYearsArray$1(2022, new Date());
|
|
10339
10322
|
const QuarterPopupPicker = ({
|
|
10340
10323
|
isOpen,
|
|
10341
10324
|
onChangeDate,
|
|
10342
10325
|
value,
|
|
10343
10326
|
setValue,
|
|
10344
10327
|
startDateValue,
|
|
10345
|
-
availableQuarters
|
|
10328
|
+
availableQuarters,
|
|
10329
|
+
startYear = 2022
|
|
10346
10330
|
}) => {
|
|
10347
10331
|
const [selectedQuarter, setSelectedQuarter] = useState(null);
|
|
10348
10332
|
const [currentStartDate, setCurrentStartDate] = useState(new Date(new Date().getFullYear(), 0, 1));
|
|
@@ -10386,7 +10370,7 @@ const QuarterPopupPicker = ({
|
|
|
10386
10370
|
setSelectedQuarter(null);
|
|
10387
10371
|
setValue('');
|
|
10388
10372
|
}
|
|
10389
|
-
},
|
|
10373
|
+
}, generateYearsArray$1(startYear, new Date()).map(year => /*#__PURE__*/React$1.createElement("option", {
|
|
10390
10374
|
key: `${year}`,
|
|
10391
10375
|
value: `${year}`
|
|
10392
10376
|
}, year))))), /*#__PURE__*/React$1.createElement(DatePickerCalendar$1, null, dates.map(date => {
|
|
@@ -10428,7 +10412,8 @@ const QuarterPicker = _ref => {
|
|
|
10428
10412
|
borderColor,
|
|
10429
10413
|
borderColorFocus,
|
|
10430
10414
|
textColor,
|
|
10431
|
-
selectedValue
|
|
10415
|
+
selectedValue,
|
|
10416
|
+
startYear
|
|
10432
10417
|
} = _ref;
|
|
10433
10418
|
const [isFocused, setIsFocused] = useState(false);
|
|
10434
10419
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -10547,7 +10532,8 @@ const QuarterPicker = _ref => {
|
|
|
10547
10532
|
value: value,
|
|
10548
10533
|
setValue: setValue,
|
|
10549
10534
|
startDateValue: startDateValue,
|
|
10550
|
-
availableQuarters: availableQuarters
|
|
10535
|
+
availableQuarters: availableQuarters,
|
|
10536
|
+
startYear: startYear
|
|
10551
10537
|
})));
|
|
10552
10538
|
};
|
|
10553
10539
|
QuarterPicker.propTypes = {
|
|
@@ -10674,16 +10660,12 @@ const OptionsContainer$2 = styled.div`
|
|
|
10674
10660
|
padding-top: 8px;
|
|
10675
10661
|
`;
|
|
10676
10662
|
|
|
10677
|
-
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
10678
|
-
|
|
10679
|
-
// Styled components for the date picker
|
|
10680
10663
|
const DatePickerContainer$1 = styled.div`
|
|
10681
10664
|
position: relative;
|
|
10682
10665
|
`;
|
|
10683
10666
|
const DatePickerPopup = styled.div`
|
|
10684
10667
|
position: absolute;
|
|
10685
10668
|
width: auto;
|
|
10686
|
-
// margin: 5px;
|
|
10687
10669
|
height: 250px;
|
|
10688
10670
|
top: 100%;
|
|
10689
10671
|
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.15);
|
|
@@ -10709,9 +10691,7 @@ styled.div`
|
|
|
10709
10691
|
const DatePickerSelect = styled.select`
|
|
10710
10692
|
padding: 4px;
|
|
10711
10693
|
border: none;
|
|
10712
|
-
font-family: Poppins;
|
|
10713
10694
|
font-size: 12px;
|
|
10714
|
-
font-style: normal;
|
|
10715
10695
|
font-weight: 400;
|
|
10716
10696
|
cursor: pointer;
|
|
10717
10697
|
|
|
@@ -10733,7 +10713,6 @@ const DateCell = styled.div`
|
|
|
10733
10713
|
width: 100%;
|
|
10734
10714
|
aspect-ratio: 1 / 1;
|
|
10735
10715
|
/* height: 32px; */
|
|
10736
|
-
font-family: Poppins;
|
|
10737
10716
|
border-radius: 4px;
|
|
10738
10717
|
font-size: 12px;
|
|
10739
10718
|
font-style: normal;
|
|
@@ -10764,6 +10743,7 @@ const DateCell = styled.div`
|
|
|
10764
10743
|
color: #ccc;
|
|
10765
10744
|
}
|
|
10766
10745
|
`;
|
|
10746
|
+
|
|
10767
10747
|
const generateYearsArray = (startYear, endDate) => {
|
|
10768
10748
|
const years = [];
|
|
10769
10749
|
const endYear = endDate.getFullYear();
|
|
@@ -10772,14 +10752,14 @@ const generateYearsArray = (startYear, endDate) => {
|
|
|
10772
10752
|
}
|
|
10773
10753
|
return years;
|
|
10774
10754
|
};
|
|
10775
|
-
const years = generateYearsArray(2022, new Date());
|
|
10776
10755
|
const MonthPopupPicker = ({
|
|
10777
10756
|
isOpen,
|
|
10778
10757
|
onChangeDate,
|
|
10779
10758
|
value,
|
|
10780
10759
|
setValue,
|
|
10781
10760
|
startDateValue,
|
|
10782
|
-
availableMonths
|
|
10761
|
+
availableMonths,
|
|
10762
|
+
startYear = 2022
|
|
10783
10763
|
}) => {
|
|
10784
10764
|
const [selectedMonth, setSelectedMonth] = useState(null);
|
|
10785
10765
|
const [currentStartDate, setCurrentStartDate] = useState(new Date(new Date().getFullYear(), 0, 1));
|
|
@@ -10817,7 +10797,7 @@ const MonthPopupPicker = ({
|
|
|
10817
10797
|
setSelectedMonth(null);
|
|
10818
10798
|
setValue('');
|
|
10819
10799
|
}
|
|
10820
|
-
},
|
|
10800
|
+
}, generateYearsArray(startYear, new Date()).map(year => /*#__PURE__*/React$1.createElement("option", {
|
|
10821
10801
|
key: `${year}`,
|
|
10822
10802
|
value: `${year}`
|
|
10823
10803
|
}, year))))), /*#__PURE__*/React$1.createElement(DatePickerCalendar, null, dates.map(date => {
|
|
@@ -10825,7 +10805,7 @@ const MonthPopupPicker = ({
|
|
|
10825
10805
|
month: 'short'
|
|
10826
10806
|
})} ${date.getFullYear()}`;
|
|
10827
10807
|
const isAvailableMonth = availableMonths.includes(monthYear);
|
|
10828
|
-
const isDisabled = !isAvailableMonth || date.getMonth() === 0 && date.getFullYear() ===
|
|
10808
|
+
const isDisabled = !isAvailableMonth || date.getMonth() === 0 && date.getFullYear() === startYear;
|
|
10829
10809
|
return /*#__PURE__*/React$1.createElement(DateCell, {
|
|
10830
10810
|
key: date.toISOString()
|
|
10831
10811
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -10890,7 +10870,8 @@ const MonthPicker = _ref => {
|
|
|
10890
10870
|
borderColor,
|
|
10891
10871
|
borderColorFocus,
|
|
10892
10872
|
textColor,
|
|
10893
|
-
selectedValue
|
|
10873
|
+
selectedValue,
|
|
10874
|
+
startYear
|
|
10894
10875
|
} = _ref;
|
|
10895
10876
|
const [isFocused, setIsFocused] = useState(false);
|
|
10896
10877
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -11008,7 +10989,8 @@ const MonthPicker = _ref => {
|
|
|
11008
10989
|
value: value,
|
|
11009
10990
|
setValue: setValue,
|
|
11010
10991
|
startDateValue: startDateValue,
|
|
11011
|
-
availableMonths: availableMonths
|
|
10992
|
+
availableMonths: availableMonths,
|
|
10993
|
+
startYear: startYear
|
|
11012
10994
|
})));
|
|
11013
10995
|
};
|
|
11014
10996
|
MonthPicker.propTypes = {
|
|
@@ -11131,6 +11113,8 @@ const FilterPanel = props => {
|
|
|
11131
11113
|
availableQuarters,
|
|
11132
11114
|
availableMonths,
|
|
11133
11115
|
availableYears,
|
|
11116
|
+
monthStartYear,
|
|
11117
|
+
quarterStartYear,
|
|
11134
11118
|
fieldsData,
|
|
11135
11119
|
borderColor,
|
|
11136
11120
|
okButtonBackgroundColor,
|
|
@@ -11367,6 +11351,7 @@ const FilterPanel = props => {
|
|
|
11367
11351
|
case 'month':
|
|
11368
11352
|
content = /*#__PURE__*/React$1.createElement(MonthPicker, {
|
|
11369
11353
|
availableMonths: availableMonths,
|
|
11354
|
+
startYear: monthStartYear,
|
|
11370
11355
|
name: ''.concat(item.name, '_Month'),
|
|
11371
11356
|
borderColor: "#E7E7E7",
|
|
11372
11357
|
borderColorFocus: borderColor,
|
|
@@ -11401,6 +11386,7 @@ const FilterPanel = props => {
|
|
|
11401
11386
|
case 'quarter':
|
|
11402
11387
|
content = /*#__PURE__*/React$1.createElement(QuarterPicker, {
|
|
11403
11388
|
availableQuarters: availableQuarters,
|
|
11389
|
+
startYear: quarterStartYear,
|
|
11404
11390
|
className: "QuarterPicker",
|
|
11405
11391
|
name: ''.concat(item.name, '_Quarter'),
|
|
11406
11392
|
borderColor: "#E7E7E7",
|