sag_components 1.0.811 → 1.0.812

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.
@@ -64,7 +64,7 @@ const OneColumnContainer = props => {
64
64
  onClick: () => onBannerClick({
65
65
  eventName: 'onBannerClick'
66
66
  })
67
- }, /*#__PURE__*/_react.default.createElement(_ExportIcon.ExportIcon, null), "View By Banner")), !isLoading && !hover && children, !disableInfo && !isLoading && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_OneColumnContainer.IconContainer, {
67
+ }, /*#__PURE__*/_react.default.createElement(_ExportIcon.ExportIcon, null), "View By Banner")), !isLoading && !hover && /*#__PURE__*/_react.default.createElement(_OneColumnContainer.Content, null, children), !disableInfo && !isLoading && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_OneColumnContainer.IconContainer, {
68
68
  className: "IconContainer",
69
69
  onMouseEnter: () => setHover(true),
70
70
  onMouseLeave: () => setHover(false)
@@ -4,17 +4,18 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.StyledContainer = exports.OutBanner = exports.OneColumnContainerMainDiv = exports.LoadingDiv = exports.InfoTitleLabel = exports.InfoTextLabel = exports.InfoTextContainer = exports.IconContainer = exports.ColumnTitle = exports.BannerContainer = void 0;
7
+ exports.StyledContainer = exports.OutBanner = exports.OneColumnContainerMainDiv = exports.LoadingDiv = exports.InfoTitleLabel = exports.InfoTextLabel = exports.InfoTextContainer = exports.IconContainer = exports.Content = exports.ColumnTitle = exports.BannerContainer = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
9
9
  var _styledComponents = _interopRequireDefault(require("styled-components"));
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
10
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
11
11
  const StyledContainer = exports.StyledContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n width: ", ";\n height: ", ";\n overflow: ", ";\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n border-radius: 10px;\n background-color: white; \n box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);\n"])), props => props.width, props => props.height, props => props.overflow);
12
- const OneColumnContainerMainDiv = exports.OneColumnContainerMainDiv = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n /* align-items: flex-start; */\n justify-content: center; \n background-color: white;\n width: ", ";\n height: ", ";\n display: ", ";\n grid-template-columns: ", ";\n > * {\n box-sizing: border-box;\n }\n"])), props => props.width, props => props.height, props => props.display, props => props.gridTemplateColumns);
13
- const InfoTextContainer = exports.InfoTextContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n background: white;\n overflow: auto;\n padding: 20px;\n box-sizing: border-box;\n"])));
14
- const InfoTitleLabel = exports.InfoTitleLabel = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 600;\n color: black;\n margin: 0px 0px 10px 0px;\n font-size: 18px;\n line-height: 32px;\n"])));
15
- const InfoTextLabel = exports.InfoTextLabel = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: black;\n font-size: 14px;\n line-height: 20px;\n font-weight: 400;\n"])));
16
- const ColumnTitle = exports.ColumnTitle = _styledComponents.default.span(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: black;\n display: inline-block;\n font-size: 20px;\n font-weight: 500;\n padding: 20px 20px 0;\n"])));
17
- const IconContainer = exports.IconContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n width: 20px;\n height: 20px;\n top: 10px;\n right: 10px;\n position: absolute;\n"])));
18
- const LoadingDiv = exports.LoadingDiv = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n gap: 10px;\n"])));
19
- const BannerContainer = exports.BannerContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n z-index: 99;\n top: 18px;\n right: ", "; \n user-select: none;\n"])), props => props.right);
20
- const OutBanner = exports.OutBanner = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)([" \n display: flex;\n justify-content: flex-end;\n align-items: center; \n gap: 8px; \n font-size: 14px;\n font-weight: 400;\n color: ", ";\n cursor: pointer;\n @media (max-width: 1536px) {\n font-size: 13px;\n }\n > svg {\n width: 14px;\n height: 14px;\n @media (max-width: 1536px) {\n width: 13px;\n height: 13px;\n }\n @media (max-width: 1366px) {\n width: 12px;\n height: 12px;\n }\n }\n"])), props => props.textColor);
12
+ const OneColumnContainerMainDiv = exports.OneColumnContainerMainDiv = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n /* align-items: flex-start; */\n justify-content: center; \n background-color: white;\n width: ", ";\n height: ", ";\n display: ", ";\n grid-template-columns: ", ";\n"])), props => props.width, props => props.height, props => props.display, props => props.gridTemplateColumns);
13
+ const Content = exports.Content = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n box-sizing: border-box;\n"])));
14
+ const InfoTextContainer = exports.InfoTextContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n background: white;\n overflow: auto;\n padding: 20px;\n box-sizing: border-box;\n"])));
15
+ const InfoTitleLabel = exports.InfoTitleLabel = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 600;\n color: black;\n margin: 0px 0px 10px 0px;\n font-size: 18px;\n line-height: 32px;\n"])));
16
+ const InfoTextLabel = exports.InfoTextLabel = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: black;\n font-size: 14px;\n line-height: 20px;\n font-weight: 400;\n"])));
17
+ const ColumnTitle = exports.ColumnTitle = _styledComponents.default.span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n color: black;\n display: inline-block;\n font-size: 20px;\n font-weight: 500;\n padding: 20px 20px 0;\n"])));
18
+ const IconContainer = exports.IconContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n width: 20px;\n height: 20px;\n top: 10px;\n right: 10px;\n position: absolute;\n"])));
19
+ const LoadingDiv = exports.LoadingDiv = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n gap: 10px;\n"])));
20
+ const BannerContainer = exports.BannerContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n z-index: 99;\n top: 18px;\n right: ", "; \n user-select: none;\n"])), props => props.right);
21
+ const OutBanner = exports.OutBanner = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)([" \n display: flex;\n justify-content: flex-end;\n align-items: center; \n gap: 8px; \n font-size: 14px;\n font-weight: 400;\n color: ", ";\n cursor: pointer;\n @media (max-width: 1536px) {\n font-size: 13px;\n }\n > svg {\n width: 14px;\n height: 14px;\n @media (max-width: 1536px) {\n width: 13px;\n height: 13px;\n }\n @media (max-width: 1366px) {\n width: 12px;\n height: 12px;\n }\n }\n"])), props => props.textColor);
@@ -101,6 +101,7 @@ const PopupCharts = props => {
101
101
  const displayTotalHorizontalCharts = rowsData => /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.TotalHorizontalCharts, {
102
102
  currencySign: true,
103
103
  dotCut: true,
104
+ AvgROI: rowsData === null || rowsData === void 0 ? void 0 : rowsData.AvgROI,
104
105
  chartsData: rowsData === null || rowsData === void 0 ? void 0 : rowsData.chartsData,
105
106
  noDataText: rowsData.noDataText,
106
107
  title: rowsData.title,
@@ -11,6 +11,7 @@ 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"));
14
15
  var _ReportTable = require("./ReportTable.style");
15
16
  var _InfoIcon = require("./icons/InfoIcon");
16
17
  /* eslint-disable import/no-unresolved */
@@ -45,10 +46,10 @@ const ReportTable = props => {
45
46
  };
46
47
 
47
48
  // column heading - checkbox
48
- if (useCheckBoxes && !((_newTableData$columns = newTableData.columnsHeadings) !== null && _newTableData$columns !== void 0 && _newTableData$columns.some(item => item.label === 'checkbox' && item.key === 'checkbox'))) {
49
+ if (useCheckBoxes && !((_newTableData$columns = newTableData.columnsHeadings) !== null && _newTableData$columns !== void 0 && _newTableData$columns.some(item => item.label === "checkbox" && item.key === "checkbox"))) {
49
50
  newTableData.columnsHeadings.push({
50
- label: 'checkbox',
51
- key: 'checkbox'
51
+ label: "checkbox",
52
+ key: "checkbox"
52
53
  });
53
54
  }
54
55
 
@@ -58,21 +59,21 @@ const ReportTable = props => {
58
59
  });
59
60
 
60
61
  // column heading - select button
61
- if (useSelectButtons && !((_newTableData$columns2 = newTableData.columnsHeadings) !== null && _newTableData$columns2 !== void 0 && _newTableData$columns2.some(item => item.label === 'button' && item.key === 'button'))) {
62
+ if (useSelectButtons && !((_newTableData$columns2 = newTableData.columnsHeadings) !== null && _newTableData$columns2 !== void 0 && _newTableData$columns2.some(item => item.label === "button" && item.key === "button"))) {
62
63
  newTableData.columnsHeadings.push({
63
- label: 'button',
64
- key: 'button'
64
+ label: "button",
65
+ key: "button"
65
66
  });
66
67
  }
67
68
 
68
69
  // rowsValues
69
70
  const newRowValues = (_tableData$rowsValues = tableData.rowsValues) === null || _tableData$rowsValues === void 0 ? void 0 : _tableData$rowsValues.map(item => useCheckBoxes ? {
70
- checkbox: 'checkbox',
71
+ checkbox: "checkbox",
71
72
  ...item
72
73
  } : item);
73
74
  const newRowValuesStep2 = newRowValues === null || newRowValues === void 0 ? void 0 : newRowValues.map(item => useSelectButtons ? {
74
75
  ...item,
75
- button: 'button'
76
+ button: "button"
76
77
  } : item);
77
78
  const newRowValuesStep3 = newRowValuesStep2 === null || newRowValuesStep2 === void 0 ? void 0 : newRowValuesStep2.map(item => useCheckBoxes ? {
78
79
  ...item,
@@ -139,20 +140,14 @@ const ReportTable = props => {
139
140
  } = rest;
140
141
  onCheckRowClick(rest2);
141
142
  };
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
- })));
143
+ const displaySelectButton = rowData => /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
144
+ disabled: disableSelectButtons,
145
+ onClick: handleSelectButtonRowClick(rowData),
146
+ rightIcon: buttonIconName,
147
+ size: "medium",
148
+ text: buttonText || "Select",
149
+ textColor: selectTextColor
150
+ });
156
151
  const displayCheckBox = (rowData, isHeader) => /*#__PURE__*/_react.default.createElement(_ReportTable.SelectCheckboxContainer, {
157
152
  className: "SelectCheckboxContainer"
158
153
  }, /*#__PURE__*/_react.default.createElement(_ReportTable.SelectCheckboxSubContainer, {
@@ -189,13 +184,13 @@ const ReportTable = props => {
189
184
  className: "headerRow"
190
185
  }, FormattedTableData.columnsHeadings.map((headline, index) => {
191
186
  // eslint-disable-next-line react/no-array-index-key
192
- if (headline.label === 'checkbox') {
187
+ if (headline.label === "checkbox") {
193
188
  return /*#__PURE__*/_react.default.createElement(_ReportTable.Th, {
194
189
  key: index
195
190
  }, displayCheckBox(headline, true));
196
191
  }
197
192
  // eslint-disable-next-line react/no-array-index-key
198
- if (headline.label === 'button') {
193
+ if (headline.label === "button") {
199
194
  return /*#__PURE__*/_react.default.createElement(_ReportTable.Th, {
200
195
  key: index
201
196
  });
@@ -213,13 +208,13 @@ const ReportTable = props => {
213
208
  useColorLinearGradient: useColorLinearGradient
214
209
  }, Object.values(rowData).map((value, dataIndex) =>
215
210
  // eslint-disable-next-line no-nested-ternary
216
- value === 'checkbox' ?
211
+ value === "checkbox" ?
217
212
  /*#__PURE__*/
218
213
  // eslint-disable-next-line react/no-array-index-key
219
214
  _react.default.createElement(_ReportTable.Td, {
220
215
  className: "checkbox",
221
216
  key: index
222
- }, displayCheckBox(rowData, false)) : value === 'button' ?
217
+ }, displayCheckBox(rowData, false)) : value === "button" ?
223
218
  /*#__PURE__*/
224
219
  // eslint-disable-next-line react/no-array-index-key
225
220
  _react.default.createElement(_ReportTable.Td, {
@@ -233,47 +228,47 @@ const ReportTable = props => {
233
228
  key: dataIndex
234
229
  }, value))))))), !disableInfo ? /*#__PURE__*/_react.default.createElement(_ReportTable.InfoBlock, null, /*#__PURE__*/_react.default.createElement(_InfoIcon.InfoIcon, {
235
230
  color: "#1B30AA"
236
- }), /*#__PURE__*/_react.default.createElement(_ReportTable.InfoText, null, "Download table to get the full data")) : '');
231
+ }), /*#__PURE__*/_react.default.createElement(_ReportTable.InfoText, null, "Download table to get the full data")) : "");
237
232
  };
238
233
  exports.ReportTable = ReportTable;
239
234
  var _default = exports.default = ReportTable;
240
235
  ReportTable.defaultProps = {
241
- buttonText: 'Select',
242
- buttonIconName: 'duplicate',
236
+ buttonText: "Select",
237
+ buttonIconName: "select",
243
238
  tableData: {
244
239
  columnsHeadings: [{
245
- label: 'Event Name',
246
- key: 'eventName'
240
+ label: "Event Name",
241
+ key: "eventName"
247
242
  }, {
248
- label: 'Retailer',
249
- key: 'retailer'
243
+ label: "Retailer",
244
+ key: "retailer"
250
245
  }, {
251
- label: 'Total Cost',
252
- key: 'totalCost'
246
+ label: "Total Cost",
247
+ key: "totalCost"
253
248
  }, {
254
- label: 'Inc. Baseline Sales',
255
- key: 'incBaselineSales'
249
+ label: "Inc. Baseline Sales",
250
+ key: "incBaselineSales"
256
251
  }],
257
252
  rowsValues: [{
258
- retailer: 'Large Selling Event P2 2023',
259
- eventDescription: 'Food',
260
- totalCost: 'Food Lion',
261
- incBaselineSales: '50K'
253
+ retailer: "Large Selling Event P2 2023",
254
+ eventDescription: "Food",
255
+ totalCost: "Food Lion",
256
+ incBaselineSales: "50K"
262
257
  }, {
263
- retailer: 'Large Selling Event P2 2023',
264
- eventDescription: 'Food',
265
- totalCost: '$500K',
266
- incBaselineSales: '50K'
258
+ retailer: "Large Selling Event P2 2023",
259
+ eventDescription: "Food",
260
+ totalCost: "$500K",
261
+ incBaselineSales: "50K"
267
262
  }, {
268
- retailer: 'Large Selling Event P2 2023',
269
- eventDescription: 'Food',
270
- totalCost: '$500K',
271
- incBaselineSales: '50K'
263
+ retailer: "Large Selling Event P2 2023",
264
+ eventDescription: "Food",
265
+ totalCost: "$500K",
266
+ incBaselineSales: "50K"
272
267
  }, {
273
- retailer: 'Large Selling Event P2 2023',
274
- eventDescription: 'Food',
275
- totalCost: '$500K',
276
- incBaselineSales: '50K'
268
+ retailer: "Large Selling Event P2 2023",
269
+ eventDescription: "Food",
270
+ totalCost: "$500K",
271
+ incBaselineSales: "50K"
277
272
  }]
278
273
  },
279
274
  maxColumnsNumber: 4,
@@ -281,7 +276,7 @@ ReportTable.defaultProps = {
281
276
  useSelectButtons: false,
282
277
  disableSelectButtons: false,
283
278
  disableInfo: false,
284
- selectTextColor: '#229E38',
279
+ selectTextColor: "#229E38",
285
280
  onSelectRowClick: () => {},
286
281
  onCheckRowClick: () => {},
287
282
  onAllRowsCheckBoxClick: () => {},
@@ -21,6 +21,7 @@ const TotalHorizontalCharts = props => {
21
21
  title,
22
22
  value,
23
23
  dotCut,
24
+ AvgROI,
24
25
  currencySign,
25
26
  currencyType,
26
27
  width,
@@ -135,7 +136,7 @@ const TotalHorizontalCharts = props => {
135
136
  id: "FormattedValue"
136
137
  }, /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.CurrencySign, {
137
138
  id: "CurrencySign"
138
- }, currencySign ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ''), dotCut ? (0, _CommonFunctions.getFormattedValue)(value && Math.abs(value) > 0 && value % 1 !== 0 ? value === null || value === void 0 ? void 0 : value.toFixed(2) : value) : (0, _CommonFunctions.getNumberWithCommas)(value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ''))), /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.ChartWrapper, null, /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.ChartInner, {
139
+ }, currencySign ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : '', AvgROI ? 'AVG OF X ' : ''), dotCut ? (0, _CommonFunctions.getFormattedValue)(value && Math.abs(value) > 0 && value % 1 !== 0 ? value === null || value === void 0 ? void 0 : value.toFixed(2) : value) : (0, _CommonFunctions.getNumberWithCommas)(value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ''))), /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.ChartWrapper, null, /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.ChartInner, {
139
140
  ref: chartContainerRef
140
141
  }, /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
141
142
  height: heightChartContainer - 10,
@@ -196,6 +197,7 @@ TotalHorizontalCharts.defaultProps = {
196
197
  title: 'SALES',
197
198
  value: 0,
198
199
  dotCut: false,
200
+ AvgROI: false,
199
201
  currencySign: false,
200
202
  currencyType: 'USD',
201
203
  chartsData: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.811",
3
+ "version": "1.0.812",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1,284 +0,0 @@
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.ExamplePopupContent = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _PopupContent = _interopRequireDefault(require("../components/CampaignTool/PopupContent"));
10
- const FieldsDataRow1 = [{
11
- name: "FundationSource",
12
- label: "Fundation Source",
13
- disabled: false,
14
- required: false,
15
- inputType: "dropdown",
16
- //aviliable values: textbox | dropdown | checkBox | datepicker
17
- showInfo: true,
18
- infoText: "This is one of the Popup content's fields",
19
- placeHolder: "Select Source",
20
- dropdownOptions: [{
21
- value: 1,
22
- label: "Source 1"
23
- }, {
24
- value: 2,
25
- label: "Source 2"
26
- }, {
27
- value: 3,
28
- label: "Source 3"
29
- }],
30
- dropdownDefaultValue: null
31
- }, {
32
- name: "Category",
33
- label: "Category",
34
- disabled: false,
35
- required: false,
36
- inputType: "dropdown",
37
- //aviliable values: textbox | dropdown | checkBox | datepicker
38
- showInfo: true,
39
- infoText: "This is one of the Popup content's fields",
40
- placeHolder: "Select Category",
41
- dropdownOptions: [{
42
- value: 1,
43
- label: "Category 1"
44
- }, {
45
- value: 2,
46
- label: "Category 2"
47
- }, {
48
- value: 3,
49
- label: "Category 3"
50
- }],
51
- dropdownDefaultValue: null
52
- }, {
53
- name: "Supplier",
54
- label: "Supplier",
55
- disabled: false,
56
- required: false,
57
- inputType: "dropdown",
58
- //aviliable values: textbox | dropdown | checkBox | datepicker
59
- showInfo: true,
60
- infoText: "This is one of the Popup content's fields",
61
- placeHolder: "Select Supplier",
62
- dropdownOptions: [{
63
- value: 1,
64
- label: "Supplier 1"
65
- }, {
66
- value: 2,
67
- label: "Supplier 2"
68
- }, {
69
- value: 3,
70
- label: "Supplier 3"
71
- }],
72
- dropdownDefaultValue: null
73
- }, {
74
- name: "ContactName",
75
- label: "Contact Name",
76
- disabled: false,
77
- required: false,
78
- inputType: "textbox",
79
- //aviliable values: textbox | dropdown | checkBox | datepicker
80
- showInfo: true,
81
- infoText: "This is one of the Popup content's fields",
82
- placeHolder: "Enter Contact Name",
83
- dropdownOptions: null,
84
- dropdownDefaultValue: null
85
- }];
86
- const FieldsDataRow2 = [{
87
- name: "BrandName",
88
- label: "Brand Name",
89
- disabled: false,
90
- required: false,
91
- inputType: "dropdown",
92
- //aviliable values: textbox | dropdown | checkBox | datepicker
93
- showInfo: true,
94
- infoText: "This is one of the Popup content's fields",
95
- placeHolder: "Select Brand",
96
- dropdownOptions: [{
97
- value: 1,
98
- label: "Brand 1"
99
- }, {
100
- value: 2,
101
- label: "Brand 2"
102
- }, {
103
- value: 3,
104
- label: "Brand 3"
105
- }],
106
- dropdownDefaultValue: null
107
- }, {
108
- name: "Budget",
109
- label: "Budget",
110
- disabled: false,
111
- required: false,
112
- inputType: "dropdown",
113
- //aviliable values: textbox | dropdown | checkBox | datepicker
114
- showInfo: true,
115
- infoText: "This is one of the Popup content's fields",
116
- placeHolder: "Select Budget",
117
- dropdownOptions: [{
118
- value: 1,
119
- label: "Budget 1"
120
- }, {
121
- value: 2,
122
- label: "Budget 2"
123
- }, {
124
- value: 3,
125
- label: "Budget 3"
126
- }],
127
- dropdownDefaultValue: {
128
- value: 1,
129
- label: "Budget 1"
130
- }
131
- }, {
132
- name: "CategoryManager",
133
- label: "Category Manager",
134
- disabled: false,
135
- required: false,
136
- inputType: "dropdown",
137
- //aviliable values: textbox | dropdown | checkBox | datepicker
138
- showInfo: true,
139
- infoText: "This is one of the Popup content's fields",
140
- placeHolder: "Select Category Manager",
141
- dropdownOptions: [{
142
- value: 1,
143
- label: "Category Manager 1"
144
- }, {
145
- value: 2,
146
- label: "Category Manager 2"
147
- }, {
148
- value: 3,
149
- label: "Category Manager 3"
150
- }],
151
- dropdownDefaultValue: {
152
- value: 3,
153
- label: "Category Manager 3"
154
- }
155
- }, {
156
- name: "ContactEmail",
157
- label: "Contact Email",
158
- disabled: false,
159
- required: false,
160
- inputType: "textbox",
161
- //aviliable values: textbox | dropdown | checkBox | datepicker
162
- showInfo: true,
163
- infoText: "This is one of the Popup content's fields",
164
- placeHolder: "Enter Contact Email",
165
- dropdownOptions: null,
166
- dropdownDefaultValue: null
167
- }];
168
- const FieldsDataRow3 = [{
169
- name: "Broker",
170
- label: "Broker",
171
- disabled: false,
172
- required: false,
173
- inputType: "dropdown",
174
- //aviliable values: textbox | dropdown | checkBox | datepicker
175
- showInfo: true,
176
- infoText: "This is one of the Popup content's fields",
177
- placeHolder: "Select Broker",
178
- dropdownOptions: [{
179
- value: 1,
180
- label: "Broker 1"
181
- }, {
182
- value: 2,
183
- label: "Broker 2"
184
- }, {
185
- value: 3,
186
- label: "Broker 3"
187
- }],
188
- dropdownDefaultValue: null
189
- }, {
190
- name: "SupplierOfferID",
191
- label: "Supplier Offer ID",
192
- disabled: false,
193
- required: false,
194
- inputType: "textbox",
195
- //aviliable values: textbox | dropdown | checkBox | datepicker
196
- showInfo: true,
197
- infoText: "This is one of the Popup content's fields",
198
- placeHolder: "Enter Supplier Offer ID",
199
- dropdownOptions: null,
200
- dropdownDefaultValue: null
201
- }, {
202
- name: "VendorID",
203
- label: "Vendor ID",
204
- disabled: false,
205
- required: false,
206
- inputType: "textbox",
207
- //aviliable values: textbox | dropdown | checkBox | datepicker
208
- showInfo: true,
209
- infoText: "This is one of the Popup content's fields",
210
- placeHolder: "Enter Vendor ID",
211
- dropdownOptions: null,
212
- dropdownDefaultValue: null
213
- }, {
214
- name: "ContactPhone",
215
- label: "Contact Phone",
216
- disabled: false,
217
- required: true,
218
- inputType: "textbox",
219
- //aviliable values: textbox | dropdown | checkBox | datepicker
220
- showInfo: true,
221
- infoText: "This is one of the Popup content's fields",
222
- placeHolder: "Enter Contact Phone",
223
- dropdownOptions: null,
224
- dropdownDefaultValue: null
225
- }];
226
- const RowsData1 = [{
227
- fieldsArray: FieldsDataRow1
228
- }, {
229
- fieldsArray: FieldsDataRow2
230
- }, {
231
- fieldsArray: FieldsDataRow3
232
- }];
233
- var _default = exports.default = {
234
- title: "Campaign Tool/PopupContent",
235
- component: _PopupContent.default,
236
- tags: ["autodocs"],
237
- argTypes: {
238
- FieldsData: {
239
- name: "FieldsData",
240
- control: {
241
- type: "object"
242
- },
243
- description: " object: to fill kpi columns and buttons "
244
- },
245
- width: {
246
- name: "width",
247
- control: {
248
- type: "text"
249
- },
250
- description: "width of the control (in px / %)"
251
- },
252
- height: {
253
- name: "height",
254
- control: {
255
- type: "text"
256
- },
257
- description: "height of the control (in px / % )"
258
- },
259
- onClick: {
260
- action: "onClick",
261
- description: "onClick event - returns an object of check box {true/false} "
262
- },
263
- onChange: {
264
- action: "onChange",
265
- description: "onChange event "
266
- },
267
- borderColor: {
268
- name: "borderColor",
269
- description: "Sets the border color",
270
- control: {
271
- type: "color",
272
- presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
273
- }
274
- }
275
- }
276
- };
277
- const Template = args => /*#__PURE__*/_react.default.createElement(_PopupContent.default, args);
278
- const ExamplePopupContent = exports.ExamplePopupContent = Template.bind({});
279
- ExamplePopupContent.args = {
280
- rowsData: RowsData1,
281
- borderColor: "#066768",
282
- width: "100%",
283
- height: "100%"
284
- };
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _BannerEventBoxTest = require("./BannerEventBoxTest.style");
11
- var _BannerEventBox = _interopRequireDefault(require("./BannerEventBox"));
12
- const BannerEventBoxTest = props => {
13
- const {
14
- width,
15
- height
16
- } = props;
17
- return /*#__PURE__*/_react.default.createElement(_BannerEventBoxTest.MainContainer, {
18
- width: width,
19
- height: height
20
- }, /*#__PURE__*/_react.default.createElement(_BannerEventBox.default, {
21
- banner: "Stop&Shop"
22
- }), /*#__PURE__*/_react.default.createElement(_BannerEventBox.default, {
23
- banner: "Hannaford",
24
- data: [{
25
- name: 'asdf',
26
- items: ['coca', 'haim']
27
- }, {
28
- name: 'Brazxcvnds',
29
- items: ['coca', 'bola', 'spring', 'cola']
30
- }, {
31
- name: 'xcvb Lines',
32
- items: ['spring']
33
- }]
34
- }), /*#__PURE__*/_react.default.createElement(_BannerEventBox.default, {
35
- banner: "Giant Food"
36
- }));
37
- };
38
- BannerEventBoxTest.defaultProps = {
39
- width: 'auto',
40
- height: 'auto'
41
- };
42
- var _default = exports.default = BannerEventBoxTest;
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.MainContainer = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
9
- var _styledComponents = _interopRequireDefault(require("styled-components"));
10
- var _templateObject;
11
- const MainContainer = exports.MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: ", ";\n height: ", ";\n display: flex;\n gap: 20px;\n"])), props => props.width, props => props.height);