sag_components 1.0.631 → 1.0.633

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.
@@ -16,7 +16,6 @@ var _QuarterPicker = _interopRequireDefault(require("./QuarterPicker"));
16
16
  var _MonthPicker = _interopRequireDefault(require("./MonthPicker"));
17
17
  var _Tooltip = _interopRequireDefault(require("./Tooltip"));
18
18
  var _FilterPanel = require("./FilterPanel.style");
19
- var _sass = require("sass");
20
19
  // eslint-disable-next-line import/no-extraneous-dependencies
21
20
 
22
21
  const FilterPanel = props => {
@@ -9,20 +9,29 @@ exports.default = void 0;
9
9
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _styledComponents = _interopRequireDefault(require("styled-components"));
12
- var _ChervronRightIcon = _interopRequireDefault(require("./icons/ChervronRightIcon"));
13
- var _ChervronLeftIcon = _interopRequireDefault(require("./icons/ChervronLeftIcon"));
14
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
12
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
15
13
  /* eslint-disable jsx-a11y/no-static-element-interactions */
16
14
  /* eslint-disable jsx-a11y/click-events-have-key-events */
17
15
  /* eslint-disable react/prop-types */
16
+ // import ChervronRightIcon from './icons/ChervronRightIcon';
17
+ // import ChervronLeftIcon from './icons/ChervronLeftIcon';
18
+
18
19
  // Styled components for the date picker
19
20
  const DatePickerContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n"])));
20
21
  const DatePickerPopup = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: auto;\n margin: 5px;\n height: 120px;\n top: calc(100% + 5px);\n box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.15);\n left: 0;\n background-color: #fff;\n border: 1px solid #ccc;\n border-radius: 4px;\n padding: 10px;\n z-index: 1000;\n"])));
21
22
  const DatePickerHeader = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n margin-bottom: 10px;\n"])));
22
- const NavDiv = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n width: 80px;\n height: 30px;\n display: flex;\n padding: 5px;\n justify-content: space-around;\n"])));
23
- const DatePickerSelect = _styledComponents.default.select(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n padding: 4px;\n border: none;\n font-family: Poppins;\n font-size: 12px; \n font-style: normal;\n font-weight: 400;\n cursor: pointer;\n\n &:focus {\n border: none;\n }\n"])));
24
- const DatePickerCalendar = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n width: 220px;\n height: 150px;\n row-gap: 30px;\n margin: 20px;\n column-gap: 30px;\n grid-template-columns: repeat(4, 1fr);\n grid-template-rows: repeat(4, 1fr);\n"])));
25
- const DateCell = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n aspect-ratio: 1 / 1;\n /* height: 32px; */\n font-family: Poppins;\n border-radius: 4px;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n transition: background-color 0.3s ease;\n\n &:hover {\n background: #f4faf5;\n }\n\n &.selected {\n background-color: #229e38;\n color: #fff;\n }\n &.startselected {\n border: 1px solid #229e38;\n }\n &.inrange {\n border-radius: 0px;\n background-color: #effef2;\n }\n\n &.disable {\n pointer-events: none;\n color: #ccc;\n }\n"])));
23
+
24
+ // const NavDiv = styled.div`
25
+ // width: 80px;
26
+ // height: 30px;
27
+ // display: flex;
28
+ // padding: 5px;
29
+ // justify-content: space-around;
30
+ // `;
31
+
32
+ const DatePickerSelect = _styledComponents.default.select(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n padding: 4px;\n border: none;\n font-family: Poppins;\n font-size: 12px; \n font-style: normal;\n font-weight: 400;\n cursor: pointer;\n\n &:focus {\n border: none;\n }\n"])));
33
+ const DatePickerCalendar = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n width: 220px;\n height: 150px;\n row-gap: 30px;\n margin: 20px;\n column-gap: 30px;\n grid-template-columns: repeat(4, 1fr);\n grid-template-rows: repeat(4, 1fr);\n"])));
34
+ const DateCell = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n aspect-ratio: 1 / 1;\n /* height: 32px; */\n font-family: Poppins;\n border-radius: 4px;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n transition: background-color 0.3s ease;\n\n &:hover {\n background: #f4faf5;\n }\n\n &.selected {\n background-color: #229e38;\n color: #fff;\n }\n &.startselected {\n border: 1px solid #229e38;\n }\n &.inrange {\n border-radius: 0px;\n background-color: #effef2;\n }\n\n &.disable {\n pointer-events: none;\n color: #ccc;\n }\n"])));
26
35
  const years = [2022, 2023, 2024];
27
36
  const QuarterPopupPicker = _ref => {
28
37
  let {
@@ -40,16 +49,19 @@ const QuarterPopupPicker = _ref => {
40
49
  setSelectedQuarter(date);
41
50
  onChangeDate("".concat(date, "-").concat(currentStartDate.getFullYear()));
42
51
  };
43
- const handlePrevMonth = () => {
44
- const prevDate = currentStartDate ? new Date(currentStartDate) : new Date();
45
- prevDate.setMonth(prevDate.getMonth() - 1);
46
- setCurrentStartDate(prevDate);
47
- };
48
- const handleNextMonth = () => {
49
- const nextDate = currentStartDate ? new Date(currentStartDate) : new Date();
50
- nextDate.setMonth(nextDate.getMonth() + 1);
51
- setCurrentStartDate(nextDate);
52
- };
52
+
53
+ // const handlePrevMonth = () => {
54
+ // const prevDate = currentStartDate ? new Date(currentStartDate) : new Date();
55
+ // prevDate.setMonth(prevDate.getMonth() - 1);
56
+ // setCurrentStartDate(prevDate);
57
+ // };
58
+
59
+ // const handleNextMonth = () => {
60
+ // const nextDate = currentStartDate ? new Date(currentStartDate) : new Date();
61
+ // nextDate.setMonth(nextDate.getMonth() + 1);
62
+ // setCurrentStartDate(nextDate);
63
+ // };
64
+
53
65
  (0, _react.useEffect)(() => {
54
66
  if (value === '' || value === undefined) {
55
67
  setSelectedQuarter(null);
@@ -76,11 +88,7 @@ const QuarterPopupPicker = _ref => {
76
88
  }, years.map(year => /*#__PURE__*/_react.default.createElement("option", {
77
89
  key: "".concat(year),
78
90
  value: "".concat(year)
79
- }, year)))), /*#__PURE__*/_react.default.createElement(NavDiv, null, /*#__PURE__*/_react.default.createElement("div", {
80
- onClick: handlePrevMonth
81
- }, /*#__PURE__*/_react.default.createElement(_ChervronLeftIcon.default, null)), /*#__PURE__*/_react.default.createElement("div", {
82
- onClick: handleNextMonth
83
- }, /*#__PURE__*/_react.default.createElement(_ChervronRightIcon.default, null)))), /*#__PURE__*/_react.default.createElement(DatePickerCalendar, null, dates.map(date => {
91
+ }, year))))), /*#__PURE__*/_react.default.createElement(DatePickerCalendar, null, dates.map(date => {
84
92
  if (selectedQuarter === date) {
85
93
  return /*#__PURE__*/_react.default.createElement(DateCell, {
86
94
  key: date,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.631",
3
+ "version": "1.0.633",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {