sag_components 1.0.642 → 1.0.643
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/.history/.env_20231001120549 +0 -0
- package/.history/.env_20231001120613 +1 -0
- package/.history/.env_20231003143620 +1 -0
- package/.history/.eslintrc_20230928112617.js +26 -0
- package/.history/.eslintrc_20230928130534.js +27 -0
- package/.history/.eslintrc_20230928133400.js +28 -0
- package/.history/.eslintrc_20230928133404.js +28 -0
- package/.history/.eslintrc_20230928133416.js +28 -0
- package/.history/.eslintrc_20230928133419.js +28 -0
- package/.history/.eslintrc_20230928133432.js +28 -0
- package/.history/.eslintrc_20230928133439.js +28 -0
- package/.history/.eslintrc_20230928133458.js +29 -0
- package/.history/.eslintrc_20230928133500.js +28 -0
- package/.history/.eslintrc_20230928134009.js +28 -0
- package/.history/.eslintrc_20230928135318.js +34 -0
- package/.history/.eslintrc_20230928135321.js +34 -0
- package/.history/.eslintrc_20230928135323.js +34 -0
- package/.history/.eslintrc_20230928135332.js +34 -0
- package/.history/.eslintrc_20230928135333.js +34 -0
- package/.history/.eslintrc_20230928135352.js +29 -0
- package/.history/.eslintrc_20230928135353.js +29 -0
- package/.history/.eslintrc_20230928135355.js +29 -0
- package/.history/.eslintrc_20230928135408.js +29 -0
- package/.history/.eslintrc_20230928135538.js +30 -0
- package/.history/.eslintrc_20230928135539.js +30 -0
- package/.history/.eslintrc_20230928135543.js +30 -0
- package/.history/.gitignore_20230921093332 +119 -0
- package/.history/.gitignore_20230921111638 +120 -0
- package/.history/.gitignore_20230921111650 +120 -0
- package/.history/.gitignore_20230921111810 +121 -0
- package/.history/package-lock_20231114111138.json +47810 -0
- package/.history/package-lock_20231114111158.json +47802 -0
- package/.history/package_20231029152422.json +82 -0
- package/.history/package_20231029153420.json +82 -0
- package/.history/package_20231029154416.json +82 -0
- package/.history/package_20231030094127.json +82 -0
- package/.history/package_20231030114707.json +82 -0
- package/.history/package_20231030130704.json +82 -0
- package/.history/package_20231030132422.json +82 -0
- package/.history/package_20231030134051.json +82 -0
- package/.history/package_20231030142913.json +82 -0
- package/.history/package_20231030143556.json +82 -0
- package/.history/package_20231030144210.json +82 -0
- package/.history/package_20231101113942.json +82 -0
- package/.history/package_20231101114544.json +82 -0
- package/.history/package_20231101151518.json +82 -0
- package/.history/package_20231101154501.json +82 -0
- package/.history/package_20231101155811.json +82 -0
- package/.history/package_20231101160235.json +82 -0
- package/.history/package_20231101160406.json +82 -0
- package/.history/package_20231101161325.json +82 -0
- package/.history/package_20231101161333.json +82 -0
- package/.history/package_20231102123623.json +82 -0
- package/.history/package_20231102125741.json +82 -0
- package/.history/package_20231102130857.json +82 -0
- package/.history/package_20231102132227.json +82 -0
- package/.history/package_20231102142340.json +82 -0
- package/.history/package_20231102143256.json +82 -0
- package/.history/package_20231105153539.json +82 -0
- package/.history/package_20231105154332.json +82 -0
- package/.history/package_20231105171201.json +82 -0
- package/.history/package_20231106123849.json +82 -0
- package/.history/package_20231107170638.json +82 -0
- package/.history/package_20231109103647.json +82 -0
- package/.history/package_20231109103911.json +82 -0
- package/.history/package_20231109105426.json +82 -0
- package/.history/package_20231109132014.json +82 -0
- package/.history/package_20231109132115.json +82 -0
- package/.history/package_20231114100517.json +82 -0
- package/.history/package_20231114100859.json +82 -0
- package/.history/package_20231114101553.json +82 -0
- package/.history/package_20231114102545.json +82 -0
- package/.history/package_20231114111208.json +83 -0
- package/.history/package_20231114111515.json +83 -0
- package/.history/package_20231114112931.json +83 -0
- package/.history/package_20231114113014.json +83 -0
- package/.history/package_20231114113155.json +83 -0
- package/.history/package_20231114124318.json +83 -0
- package/.history/package_20231114125107.json +83 -0
- package/.history/package_20231114125510.json +83 -0
- package/.history/package_20231114132634.json +83 -0
- package/.history/package_20231116165815.json +83 -0
- package/.history/package_20231116165916.json +83 -0
- package/.history/package_20231119113637.json +83 -0
- package/.history/package_20231120100907.json +83 -0
- package/.history/package_20231121151523.json +77 -0
- package/.history/package_20231121155513.json +77 -0
- package/.history/package_20231121162434.json +77 -0
- package/.history/package_20231122100718.json +77 -0
- package/.history/package_20231128125149.json +82 -0
- package/.history/package_20231128125208.json +82 -0
- package/dist/stories/CampaignTool/Card.stories.js +1 -0
- package/dist/stories/CampaignTool/PopupContent.stories.js +284 -0
- package/dist/stories/components/BarChartsByWeeks.js +33 -2
- package/dist/stories/components/CampaignTool/CampaignDemoReport.js +48 -0
- package/dist/stories/components/CampaignTool/CampaignDemoReport.style.js +15 -0
- package/dist/stories/components/Datepicker.js +4 -0
- package/dist/stories/components/DropdownMulti.js +2 -0
- package/dist/stories/components/FilterButton.js +53 -0
- package/dist/stories/components/FilterButton.style.js +12 -0
- package/dist/stories/components/MonthPopupPicker.js +1 -0
- package/dist/stories/components/PopupCharts.js +1 -0
- package/dist/stories/components/QuarterPopupPicker.js +0 -1
- package/dist/stories/components/SagButton.js +1 -0
- package/dist/stories/components/Select.js +1 -0
- package/dist/stories/components/icons/ShoutIcon.js +27 -0
- package/package.json +1 -1
- package/dist/stories/components/TotalCostModal.js +0 -143
|
@@ -86,6 +86,7 @@ const DropdownMulti = props => {
|
|
|
86
86
|
// marginRight: '10px',
|
|
87
87
|
// },
|
|
88
88
|
},
|
|
89
|
+
|
|
89
90
|
'& .MuiAutocomplete-inputRoot': {
|
|
90
91
|
paddingLeft: '10px !important',
|
|
91
92
|
borderRadius: '12px',
|
|
@@ -233,6 +234,7 @@ const DropdownMulti = props => {
|
|
|
233
234
|
// </>
|
|
234
235
|
// ),
|
|
235
236
|
},
|
|
237
|
+
|
|
236
238
|
onKeyDown: event => {
|
|
237
239
|
if (!isInputAllowed(event.key)) {
|
|
238
240
|
event.preventDefault();
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.FilterButton = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _FilterButton = require("./FilterButton.style");
|
|
10
|
+
var _FilterIcon = require("./icons/FilterIcon");
|
|
11
|
+
const FilterButton = props => {
|
|
12
|
+
const {
|
|
13
|
+
color,
|
|
14
|
+
activeColor,
|
|
15
|
+
height,
|
|
16
|
+
buttonText,
|
|
17
|
+
iconWidth,
|
|
18
|
+
iconHeight,
|
|
19
|
+
disabled,
|
|
20
|
+
openState,
|
|
21
|
+
onButtonClick
|
|
22
|
+
} = props;
|
|
23
|
+
const [activeState, setActiveState] = (0, _react.useState)(openState);
|
|
24
|
+
const onClickHandler = event => {
|
|
25
|
+
onButtonClick(event);
|
|
26
|
+
setActiveState(!activeState);
|
|
27
|
+
};
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_FilterButton.FilterButtonWrapper, {
|
|
29
|
+
height: height,
|
|
30
|
+
color: activeState ? activeColor : color,
|
|
31
|
+
disabled: disabled,
|
|
32
|
+
onClick: event => {
|
|
33
|
+
onClickHandler(event);
|
|
34
|
+
}
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(_FilterIcon.FilterIcon, {
|
|
36
|
+
width: iconWidth,
|
|
37
|
+
height: iconHeight,
|
|
38
|
+
color: activeState ? activeColor : color
|
|
39
|
+
}), /*#__PURE__*/_react.default.createElement(_FilterButton.SpanText, null, buttonText));
|
|
40
|
+
};
|
|
41
|
+
exports.FilterButton = FilterButton;
|
|
42
|
+
var _default = exports.default = FilterButton;
|
|
43
|
+
FilterButton.defaultProps = {
|
|
44
|
+
buttonText: 'Filter',
|
|
45
|
+
height: '40px',
|
|
46
|
+
color: '#212121',
|
|
47
|
+
activeColor: '#229E38',
|
|
48
|
+
iconHeight: 12,
|
|
49
|
+
iconWidth: 12,
|
|
50
|
+
openState: false,
|
|
51
|
+
disabled: false,
|
|
52
|
+
onButtonClick: () => {}
|
|
53
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SpanText = exports.FilterButtonWrapper = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
+
var _templateObject, _templateObject2;
|
|
11
|
+
const FilterButtonWrapper = exports.FilterButtonWrapper = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", ";\n font-size: 14px;\n font-weight: 400;\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: center;\n padding: 8px 18px;\n color: ", ";\n border-radius: 8px;\n border: 1px solid ", ";\n background: transparent;\n transition: box-shadow 0.3s ease;\n &:hover, &:focus {\n cursor: pointer;\n box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);\n }\n"])), props => props.height, props => props.color, props => props.color);
|
|
12
|
+
const SpanText = exports.SpanText = _styledComponents.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n"])));
|
|
@@ -96,6 +96,7 @@ const PopupCharts = props => {
|
|
|
96
96
|
width: "100%",
|
|
97
97
|
xselectedColor: rowsData === null || rowsData === void 0 ? void 0 : rowsData.xselectedColor // "#C7E7CD"
|
|
98
98
|
});
|
|
99
|
+
|
|
99
100
|
const displayTotalHorizontalCharts = rowsData => /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.TotalHorizontalCharts, {
|
|
100
101
|
currencySign: true,
|
|
101
102
|
dotCut: true,
|
|
@@ -15,7 +15,6 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
15
15
|
/* eslint-disable react/prop-types */
|
|
16
16
|
// import ChervronRightIcon from './icons/ChervronRightIcon';
|
|
17
17
|
// import ChervronLeftIcon from './icons/ChervronLeftIcon';
|
|
18
|
-
|
|
19
18
|
// Styled components for the date picker
|
|
20
19
|
const DatePickerContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n"])));
|
|
21
20
|
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"])));
|
|
@@ -31,6 +31,7 @@ const SagButton = props => {
|
|
|
31
31
|
// Add any logic you want to execute after the transition is complete
|
|
32
32
|
}, 300); // Adjust the transition duration (in milliseconds) as needed
|
|
33
33
|
};
|
|
34
|
+
|
|
34
35
|
return /*#__PURE__*/_react.default.createElement(_SagButton.ButtonContainer, {
|
|
35
36
|
id: "ButtonContainer"
|
|
36
37
|
}, /*#__PURE__*/_react.default.createElement(_SagButton.Button, {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.ShoutIcon = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
const ShoutIcon = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
width = '16',
|
|
12
|
+
height = '17',
|
|
13
|
+
fill = '#1B30AA'
|
|
14
|
+
} = _ref;
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
16
|
+
width: width,
|
|
17
|
+
height: height,
|
|
18
|
+
viewBox: "0 0 16 17",
|
|
19
|
+
fill: "none",
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
22
|
+
d: "M15 2V6.625C15.5625 6.90625 16 7.65625 16 8.5C16 9.375 15.5625 10.125 15 10.4062V15C15 15.4062 14.75 15.7812 14.375 15.9375C14 16.0938 13.5625 16 13.2812 15.7188L11.9062 14.3438C10.4062 12.8438 8.375 12 6.25 12H6V16C6 16.5625 5.53125 17 5 17H3C2.4375 17 2 16.5625 2 16V12C0.875 12 0 11.125 0 10V7C0 5.90625 0.875 5 2 5H5H6H6.25C8.375 5 10.4062 4.15625 11.9062 2.65625L13.2812 1.3125C13.5625 1.03125 14 0.9375 14.375 1.09375C14.75 1.25 15 1.625 15 2ZM13 4.40625C11.1562 6.09375 8.75 7 6.25 7H6V10H6.25C8.75 10 11.1562 10.9375 13 12.625V8.5V4.40625Z",
|
|
23
|
+
fill: fill
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
exports.ShoutIcon = ShoutIcon;
|
|
27
|
+
var _default = exports.default = ShoutIcon;
|
package/package.json
CHANGED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _Modal = _interopRequireDefault(require("./Modal"));
|
|
12
|
-
var _CodeEditor = _interopRequireDefault(require("./CodeEditor"));
|
|
13
|
-
var _TextField = _interopRequireDefault(require("./TextField"));
|
|
14
|
-
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
15
|
-
var _reactHookForm = require("react-hook-form");
|
|
16
|
-
var _Modal2 = require("./Modal.style");
|
|
17
|
-
var TotalCostModal = function TotalCostModal(_ref) {
|
|
18
|
-
var title = _ref.title,
|
|
19
|
-
isModalOpen = _ref.isModalOpen,
|
|
20
|
-
setModalOpen = _ref.setModalOpen,
|
|
21
|
-
setResult = _ref.setResult;
|
|
22
|
-
var _useState = (0, _react.useState)([{
|
|
23
|
-
id: "title",
|
|
24
|
-
label: "Title",
|
|
25
|
-
type: "text"
|
|
26
|
-
}, {
|
|
27
|
-
id: "dotCut",
|
|
28
|
-
label: "Do Cut",
|
|
29
|
-
type: "select",
|
|
30
|
-
options: ["true", "false"]
|
|
31
|
-
}, {
|
|
32
|
-
id: "currency",
|
|
33
|
-
label: "Currency",
|
|
34
|
-
type: "select",
|
|
35
|
-
options: ["true", "false"]
|
|
36
|
-
}, {
|
|
37
|
-
id: "currencyType",
|
|
38
|
-
label: "Currency Type",
|
|
39
|
-
type: "select",
|
|
40
|
-
options: ["USD", "EUR", "ILS", "GBP", "JPY"]
|
|
41
|
-
}, {
|
|
42
|
-
id: "width",
|
|
43
|
-
label: "Width",
|
|
44
|
-
type: "text"
|
|
45
|
-
}, {
|
|
46
|
-
id: "height",
|
|
47
|
-
label: "Height",
|
|
48
|
-
type: "text"
|
|
49
|
-
}, {
|
|
50
|
-
id: "textColor",
|
|
51
|
-
label: "Text Color",
|
|
52
|
-
type: "text"
|
|
53
|
-
}, {
|
|
54
|
-
id: "noDataText",
|
|
55
|
-
label: "No Data Text",
|
|
56
|
-
type: "text"
|
|
57
|
-
}]),
|
|
58
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
59
|
-
params = _useState2[0],
|
|
60
|
-
setParams = _useState2[1];
|
|
61
|
-
var _useState3 = (0, _react.useState)("Select PACKAGE_COST,REDEMPTION_COST,(PACKAGE_COST+REDEMPTION_COST) AS TOTAL_COST,from FACT_EVENT_MEASURES A INNER JOIN DIM_EVENTS B ON A.EVENT_CODE = B.EVENT_CODE"),
|
|
62
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
63
|
-
code = _useState4[0],
|
|
64
|
-
setCode = _useState4[1];
|
|
65
|
-
var _useForm = (0, _reactHookForm.useForm)(),
|
|
66
|
-
register = _useForm.register,
|
|
67
|
-
handleSubmit = _useForm.handleSubmit,
|
|
68
|
-
watch = _useForm.watch,
|
|
69
|
-
control = _useForm.control,
|
|
70
|
-
errors = _useForm.formState.errors;
|
|
71
|
-
var onSubmit = function onSubmit(data) {
|
|
72
|
-
return setResult(data);
|
|
73
|
-
};
|
|
74
|
-
return /*#__PURE__*/_react.default.createElement("form", {
|
|
75
|
-
onSubmit: handleSubmit(onSubmit)
|
|
76
|
-
}, /*#__PURE__*/_react.default.createElement(_Modal.default, {
|
|
77
|
-
isOpen: isModalOpen,
|
|
78
|
-
onClose: function onClose() {
|
|
79
|
-
return setModalOpen(false);
|
|
80
|
-
}
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement("h2", null, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
82
|
-
style: {
|
|
83
|
-
gap: "10px",
|
|
84
|
-
display: "grid"
|
|
85
|
-
}
|
|
86
|
-
}, /*#__PURE__*/_react.default.createElement(_CodeEditor.default, {
|
|
87
|
-
value: code,
|
|
88
|
-
onChange: setCode
|
|
89
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
-
style: {
|
|
91
|
-
gap: "10px",
|
|
92
|
-
display: "grid",
|
|
93
|
-
gridTemplateColumns: "auto auto auto"
|
|
94
|
-
}
|
|
95
|
-
}, params.map(function (item) {
|
|
96
|
-
if (item.type === "text") {
|
|
97
|
-
return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
98
|
-
control: control,
|
|
99
|
-
name: item.id,
|
|
100
|
-
render: function render(_ref2) {
|
|
101
|
-
var field = _ref2.field;
|
|
102
|
-
return /*#__PURE__*/_react.default.createElement(_TextField.default, Object.assign({}, field, {
|
|
103
|
-
allowedInput: "all",
|
|
104
|
-
height: "100%",
|
|
105
|
-
label: item.label,
|
|
106
|
-
multiline: true,
|
|
107
|
-
placeHolder: "Type...",
|
|
108
|
-
shape: "round",
|
|
109
|
-
size: "small",
|
|
110
|
-
width: "300px"
|
|
111
|
-
}));
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
} else {
|
|
115
|
-
return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
116
|
-
control: control,
|
|
117
|
-
name: item.id,
|
|
118
|
-
render: function render(_ref3) {
|
|
119
|
-
var field = _ref3.field;
|
|
120
|
-
return /*#__PURE__*/_react.default.createElement(_Dropdown.default, Object.assign({}, field, {
|
|
121
|
-
allowedInput: "all",
|
|
122
|
-
labelColor: "#1B30AA",
|
|
123
|
-
limitTagsOnMultiSelect: 0,
|
|
124
|
-
onInputChange: function onInputChange(e) {
|
|
125
|
-
var _e$inputValue;
|
|
126
|
-
console.log("e", e);
|
|
127
|
-
field.onChange((_e$inputValue = e === null || e === void 0 ? void 0 : e.inputValue) !== null && _e$inputValue !== void 0 ? _e$inputValue : "");
|
|
128
|
-
},
|
|
129
|
-
options: item.options,
|
|
130
|
-
placeHolder: "Type...",
|
|
131
|
-
shape: "round",
|
|
132
|
-
size: "small",
|
|
133
|
-
text: item.label,
|
|
134
|
-
width: "300px"
|
|
135
|
-
}));
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
}))), /*#__PURE__*/_react.default.createElement(_Modal2.SubmitButton, {
|
|
140
|
-
type: "submit"
|
|
141
|
-
})));
|
|
142
|
-
};
|
|
143
|
-
var _default = exports.default = TotalCostModal;
|