sag_components 1.0.813 → 1.0.816
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/stories/CampaignTool/PopupContent.stories.js +284 -0
- package/dist/stories/components/BannerEventBoxTest.js +42 -0
- package/dist/stories/components/BannerEventBoxTest.style.js +11 -0
- package/dist/stories/components/EventInfo.js +92 -0
- package/dist/stories/components/EventInfo.style.js +20 -0
- package/dist/stories/components/FilterButton.js +47 -0
- package/dist/stories/components/FilterButton.style.js +12 -0
- package/dist/stories/components/NewInput.js +33 -0
- package/dist/stories/components/NewInput.style.js +13 -0
- package/dist/stories/components/ReportTable.js +54 -49
- package/dist/stories/components/TotalHorizontalCharts.js +1 -0
- package/dist/stories/components/TotalHorizontalCharts.style.js +1 -1
- package/dist/stories/components/icons/TheGiantCompanyIcon_old.js +1831 -0
- package/package.json +1 -1
|
@@ -11,7 +11,6 @@ var _ArrowSelectIcon = _interopRequireDefault(require("./icons/ArrowSelectIcon")
|
|
|
11
11
|
var _Duplicate = _interopRequireDefault(require("./icons/Duplicate"));
|
|
12
12
|
var _CheckBoxCheckedIcon = require("./icons/CheckBoxCheckedIcon");
|
|
13
13
|
var _CheckBoxNotCheckedIcon = require("./icons/CheckBoxNotCheckedIcon");
|
|
14
|
-
var _LinkButton = _interopRequireDefault(require("./LinkButton"));
|
|
15
14
|
var _ReportTable = require("./ReportTable.style");
|
|
16
15
|
var _InfoIcon = require("./icons/InfoIcon");
|
|
17
16
|
/* eslint-disable import/no-unresolved */
|
|
@@ -46,10 +45,10 @@ const ReportTable = props => {
|
|
|
46
45
|
};
|
|
47
46
|
|
|
48
47
|
// column heading - checkbox
|
|
49
|
-
if (useCheckBoxes && !((_newTableData$columns = newTableData.columnsHeadings) !== null && _newTableData$columns !== void 0 && _newTableData$columns.some(item => item.label ===
|
|
48
|
+
if (useCheckBoxes && !((_newTableData$columns = newTableData.columnsHeadings) !== null && _newTableData$columns !== void 0 && _newTableData$columns.some(item => item.label === 'checkbox' && item.key === 'checkbox'))) {
|
|
50
49
|
newTableData.columnsHeadings.push({
|
|
51
|
-
label:
|
|
52
|
-
key:
|
|
50
|
+
label: 'checkbox',
|
|
51
|
+
key: 'checkbox'
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
54
|
|
|
@@ -59,21 +58,21 @@ const ReportTable = props => {
|
|
|
59
58
|
});
|
|
60
59
|
|
|
61
60
|
// column heading - select button
|
|
62
|
-
if (useSelectButtons && !((_newTableData$columns2 = newTableData.columnsHeadings) !== null && _newTableData$columns2 !== void 0 && _newTableData$columns2.some(item => item.label ===
|
|
61
|
+
if (useSelectButtons && !((_newTableData$columns2 = newTableData.columnsHeadings) !== null && _newTableData$columns2 !== void 0 && _newTableData$columns2.some(item => item.label === 'button' && item.key === 'button'))) {
|
|
63
62
|
newTableData.columnsHeadings.push({
|
|
64
|
-
label:
|
|
65
|
-
key:
|
|
63
|
+
label: 'button',
|
|
64
|
+
key: 'button'
|
|
66
65
|
});
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
// rowsValues
|
|
70
69
|
const newRowValues = (_tableData$rowsValues = tableData.rowsValues) === null || _tableData$rowsValues === void 0 ? void 0 : _tableData$rowsValues.map(item => useCheckBoxes ? {
|
|
71
|
-
checkbox:
|
|
70
|
+
checkbox: 'checkbox',
|
|
72
71
|
...item
|
|
73
72
|
} : item);
|
|
74
73
|
const newRowValuesStep2 = newRowValues === null || newRowValues === void 0 ? void 0 : newRowValues.map(item => useSelectButtons ? {
|
|
75
74
|
...item,
|
|
76
|
-
button:
|
|
75
|
+
button: 'button'
|
|
77
76
|
} : item);
|
|
78
77
|
const newRowValuesStep3 = newRowValuesStep2 === null || newRowValuesStep2 === void 0 ? void 0 : newRowValuesStep2.map(item => useCheckBoxes ? {
|
|
79
78
|
...item,
|
|
@@ -140,14 +139,20 @@ const ReportTable = props => {
|
|
|
140
139
|
} = rest;
|
|
141
140
|
onCheckRowClick(rest2);
|
|
142
141
|
};
|
|
143
|
-
const displaySelectButton = rowData => /*#__PURE__*/_react.default.createElement(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
142
|
+
const displaySelectButton = rowData => /*#__PURE__*/_react.default.createElement(_ReportTable.SelectButtonContainer, {
|
|
143
|
+
className: "SelectButtonContainer"
|
|
144
|
+
}, /*#__PURE__*/_react.default.createElement(_ReportTable.SelectButtonSubContainer, {
|
|
145
|
+
className: "SelectButtonSubContainer",
|
|
146
|
+
selectTextColor: disableSelectButtons ? '#B1B1B1' : selectTextColor,
|
|
147
|
+
backgroundColor: disableSelectButtons ? '#E3E4E5' : '#ffffff',
|
|
148
|
+
cursor: disableSelectButtons ? 'default' : 'pointer',
|
|
149
|
+
onClick: () => disableSelectButtons ? null : handleSelectButtonRowClick(rowData)
|
|
150
|
+
}, buttonText || 'Select', ' ', buttonIconName === 'duplicate' ? /*#__PURE__*/_react.default.createElement(_Duplicate.default, {
|
|
151
|
+
color: disableSelectButtons ? '#B1B1B1' : selectTextColor
|
|
152
|
+
}) : /*#__PURE__*/_react.default.createElement(_ArrowSelectIcon.default, {
|
|
153
|
+
className: "ArrowSelectIcon",
|
|
154
|
+
color: disableSelectButtons ? '#B1B1B1' : selectTextColor
|
|
155
|
+
})));
|
|
151
156
|
const displayCheckBox = (rowData, isHeader) => /*#__PURE__*/_react.default.createElement(_ReportTable.SelectCheckboxContainer, {
|
|
152
157
|
className: "SelectCheckboxContainer"
|
|
153
158
|
}, /*#__PURE__*/_react.default.createElement(_ReportTable.SelectCheckboxSubContainer, {
|
|
@@ -184,13 +189,13 @@ const ReportTable = props => {
|
|
|
184
189
|
className: "headerRow"
|
|
185
190
|
}, FormattedTableData.columnsHeadings.map((headline, index) => {
|
|
186
191
|
// eslint-disable-next-line react/no-array-index-key
|
|
187
|
-
if (headline.label ===
|
|
192
|
+
if (headline.label === 'checkbox') {
|
|
188
193
|
return /*#__PURE__*/_react.default.createElement(_ReportTable.Th, {
|
|
189
194
|
key: index
|
|
190
195
|
}, displayCheckBox(headline, true));
|
|
191
196
|
}
|
|
192
197
|
// eslint-disable-next-line react/no-array-index-key
|
|
193
|
-
if (headline.label ===
|
|
198
|
+
if (headline.label === 'button') {
|
|
194
199
|
return /*#__PURE__*/_react.default.createElement(_ReportTable.Th, {
|
|
195
200
|
key: index
|
|
196
201
|
});
|
|
@@ -208,13 +213,13 @@ const ReportTable = props => {
|
|
|
208
213
|
useColorLinearGradient: useColorLinearGradient
|
|
209
214
|
}, Object.values(rowData).map((value, dataIndex) =>
|
|
210
215
|
// eslint-disable-next-line no-nested-ternary
|
|
211
|
-
value ===
|
|
216
|
+
value === 'checkbox' ?
|
|
212
217
|
/*#__PURE__*/
|
|
213
218
|
// eslint-disable-next-line react/no-array-index-key
|
|
214
219
|
_react.default.createElement(_ReportTable.Td, {
|
|
215
220
|
className: "checkbox",
|
|
216
221
|
key: index
|
|
217
|
-
}, displayCheckBox(rowData, false)) : value ===
|
|
222
|
+
}, displayCheckBox(rowData, false)) : value === 'button' ?
|
|
218
223
|
/*#__PURE__*/
|
|
219
224
|
// eslint-disable-next-line react/no-array-index-key
|
|
220
225
|
_react.default.createElement(_ReportTable.Td, {
|
|
@@ -228,47 +233,47 @@ const ReportTable = props => {
|
|
|
228
233
|
key: dataIndex
|
|
229
234
|
}, value))))))), !disableInfo ? /*#__PURE__*/_react.default.createElement(_ReportTable.InfoBlock, null, /*#__PURE__*/_react.default.createElement(_InfoIcon.InfoIcon, {
|
|
230
235
|
color: "#1B30AA"
|
|
231
|
-
}), /*#__PURE__*/_react.default.createElement(_ReportTable.InfoText, null, "Download table to get the full data")) :
|
|
236
|
+
}), /*#__PURE__*/_react.default.createElement(_ReportTable.InfoText, null, "Download table to get the full data")) : '');
|
|
232
237
|
};
|
|
233
238
|
exports.ReportTable = ReportTable;
|
|
234
239
|
var _default = exports.default = ReportTable;
|
|
235
240
|
ReportTable.defaultProps = {
|
|
236
|
-
buttonText:
|
|
237
|
-
buttonIconName:
|
|
241
|
+
buttonText: 'Select',
|
|
242
|
+
buttonIconName: 'duplicate',
|
|
238
243
|
tableData: {
|
|
239
244
|
columnsHeadings: [{
|
|
240
|
-
label:
|
|
241
|
-
key:
|
|
245
|
+
label: 'Event Name',
|
|
246
|
+
key: 'eventName'
|
|
242
247
|
}, {
|
|
243
|
-
label:
|
|
244
|
-
key:
|
|
248
|
+
label: 'Retailer',
|
|
249
|
+
key: 'retailer'
|
|
245
250
|
}, {
|
|
246
|
-
label:
|
|
247
|
-
key:
|
|
251
|
+
label: 'Total Cost',
|
|
252
|
+
key: 'totalCost'
|
|
248
253
|
}, {
|
|
249
|
-
label:
|
|
250
|
-
key:
|
|
254
|
+
label: 'Inc. Baseline Sales',
|
|
255
|
+
key: 'incBaselineSales'
|
|
251
256
|
}],
|
|
252
257
|
rowsValues: [{
|
|
253
|
-
retailer:
|
|
254
|
-
eventDescription:
|
|
255
|
-
totalCost:
|
|
256
|
-
incBaselineSales:
|
|
258
|
+
retailer: 'Large Selling Event P2 2023',
|
|
259
|
+
eventDescription: 'Food',
|
|
260
|
+
totalCost: 'Food Lion',
|
|
261
|
+
incBaselineSales: '50K'
|
|
257
262
|
}, {
|
|
258
|
-
retailer:
|
|
259
|
-
eventDescription:
|
|
260
|
-
totalCost:
|
|
261
|
-
incBaselineSales:
|
|
263
|
+
retailer: 'Large Selling Event P2 2023',
|
|
264
|
+
eventDescription: 'Food',
|
|
265
|
+
totalCost: '$500K',
|
|
266
|
+
incBaselineSales: '50K'
|
|
262
267
|
}, {
|
|
263
|
-
retailer:
|
|
264
|
-
eventDescription:
|
|
265
|
-
totalCost:
|
|
266
|
-
incBaselineSales:
|
|
268
|
+
retailer: 'Large Selling Event P2 2023',
|
|
269
|
+
eventDescription: 'Food',
|
|
270
|
+
totalCost: '$500K',
|
|
271
|
+
incBaselineSales: '50K'
|
|
267
272
|
}, {
|
|
268
|
-
retailer:
|
|
269
|
-
eventDescription:
|
|
270
|
-
totalCost:
|
|
271
|
-
incBaselineSales:
|
|
273
|
+
retailer: 'Large Selling Event P2 2023',
|
|
274
|
+
eventDescription: 'Food',
|
|
275
|
+
totalCost: '$500K',
|
|
276
|
+
incBaselineSales: '50K'
|
|
272
277
|
}]
|
|
273
278
|
},
|
|
274
279
|
maxColumnsNumber: 4,
|
|
@@ -276,7 +281,7 @@ ReportTable.defaultProps = {
|
|
|
276
281
|
useSelectButtons: false,
|
|
277
282
|
disableSelectButtons: false,
|
|
278
283
|
disableInfo: false,
|
|
279
|
-
selectTextColor:
|
|
284
|
+
selectTextColor: '#229E38',
|
|
280
285
|
onSelectRowClick: () => {},
|
|
281
286
|
onCheckRowClick: () => {},
|
|
282
287
|
onAllRowsCheckBoxClick: () => {},
|
|
@@ -188,6 +188,7 @@ const TotalHorizontalCharts = props => {
|
|
|
188
188
|
pointerEvents: 'none'
|
|
189
189
|
}
|
|
190
190
|
})))))) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
191
|
+
className: "TotalHorizontalCharts_NoDataFoundMessage",
|
|
191
192
|
noDataText: noDataText
|
|
192
193
|
}));
|
|
193
194
|
};
|
|
@@ -9,7 +9,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
11
11
|
const scrollableStyles = "\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n width: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #E8E8E8;\n border-radius: 5px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #D0D0D0;\n border-radius: 5px;\n }\n";
|
|
12
|
-
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n font-family: \"Poppins\", sans-serif; \n color: ", ";\n width: ", ";\n height: ", ";\n background-color: white;\n display: flex;\n flex-direction: column;\n .top {\n text-align: center;\n white-space: normal;\n &:before {\n display: none;\n }\n }\n"])), props => props.textColor, props => props.width, props => props.height);
|
|
12
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n font-family: \"Poppins\", sans-serif; \n color: ", ";\n width: ", ";\n height: ", ";\n background-color: white;\n display: flex;\n flex-direction: column;\n // justify-content: center;\n .top {\n text-align: center;\n white-space: normal;\n &:before {\n display: none;\n }\n }\n"])), props => props.textColor, props => props.width, props => props.height);
|
|
13
13
|
const ChartWrapper = exports.ChartWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n flex-grow: 1;\n width: 100%;\n ", "\n"])), scrollableStyles);
|
|
14
14
|
const ChartInner = exports.ChartInner = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n min-height: 120%;\n width: 90%;\n"])));
|
|
15
15
|
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n padding: 16px;\n"])));
|