sag_components 1.0.999 → 1.0.1000
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/components/BarChart.js +12 -25
- package/dist/stories/components/CollapseHeader.js +10 -7
- package/dist/stories/components/DoublePanelDataRow.js +70 -0
- package/dist/stories/components/DoublePanelDataRow.style.js +66 -0
- package/package.json +1 -1
- package/dist/stories/CampaignTool/PopupContent.stories.js +0 -284
- package/dist/stories/components/BannerEventBoxTest.js +0 -42
- package/dist/stories/components/BannerEventBoxTest.style.js +0 -11
- package/dist/stories/components/EventInfo.js +0 -92
- package/dist/stories/components/EventInfo.style.js +0 -20
- package/dist/stories/components/FilterButton.js +0 -47
- package/dist/stories/components/FilterButton.style.js +0 -12
- package/dist/stories/components/NewInput.js +0 -33
- package/dist/stories/components/NewInput.style.js +0 -13
- package/dist/stories/components/icons/TheGiantCompanyIcon_old.js +0 -1831
|
@@ -37,25 +37,13 @@ const BarChart = props => {
|
|
|
37
37
|
referenceLinePoint,
|
|
38
38
|
referenceLineColor,
|
|
39
39
|
referenceLineDashed,
|
|
40
|
-
showCurrentCampaignStyle
|
|
41
|
-
isPercent
|
|
40
|
+
showCurrentCampaignStyle
|
|
42
41
|
} = props;
|
|
43
42
|
const controlsContainerRef = (0, _react.useRef)();
|
|
44
|
-
const
|
|
45
|
-
if (!
|
|
46
|
-
return barChartData === null || barChartData === void 0 ? void 0 : barChartData.every(item => !item.date);
|
|
47
|
-
};
|
|
48
|
-
const displayFormattedValue = function (value) {
|
|
49
|
-
let showFullNumber = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
50
|
-
if (value === undefined || value === null) return '';
|
|
43
|
+
const displayFormattedValue = value => {
|
|
44
|
+
if (!value) return '';
|
|
51
45
|
let formattedValue = '';
|
|
52
|
-
|
|
53
|
-
formattedValue = ''.concat(value.toFixed(1), '%');
|
|
54
|
-
} else if (isDollar) {
|
|
55
|
-
formattedValue = ''.concat(showDollarSign ? '$' : '', !showFullNumber ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value), !showFullNumber ? (0, _CommonFunctions.getFormattedUnits)(value) : '');
|
|
56
|
-
} else {
|
|
57
|
-
formattedValue = ''.concat(!showFullNumber ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value), !showFullNumber ? (0, _CommonFunctions.getFormattedUnits)(value) : '');
|
|
58
|
-
}
|
|
46
|
+
formattedValue = !isDollar ? ''.concat('', value.toFixed(1)) : ''.concat(showDollarSign ? '$' : '', (0, _CommonFunctions.getFormattedValue)(value), (0, _CommonFunctions.getFormattedUnits)(value));
|
|
59
47
|
return formattedValue;
|
|
60
48
|
};
|
|
61
49
|
|
|
@@ -70,7 +58,7 @@ const BarChart = props => {
|
|
|
70
58
|
if (!active || !payload || (payload === null || payload === void 0 ? void 0 : payload.length) === 0) return null;
|
|
71
59
|
let currentTooltipValue = 0;
|
|
72
60
|
if ((_payload$0$payload = payload[0].payload) !== null && _payload$0$payload !== void 0 && _payload$0$payload.value) currentTooltipValue = (_payload$0$payload2 = payload[0].payload) === null || _payload$0$payload2 === void 0 ? void 0 : _payload$0$payload2.value;
|
|
73
|
-
return /*#__PURE__*/_react.default.createElement(_BarChart.TooltipDiv, null, /*#__PURE__*/_react.default.createElement(_BarChart.TooltipTitle, null, `${label}`), /*#__PURE__*/_react.default.createElement(_BarChart.TooltipLabel, null, `${displayFormattedValue(currentTooltipValue
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(_BarChart.TooltipDiv, null, /*#__PURE__*/_react.default.createElement(_BarChart.TooltipTitle, null, `${label}`), /*#__PURE__*/_react.default.createElement(_BarChart.TooltipLabel, null, `${displayFormattedValue(currentTooltipValue)}`));
|
|
74
62
|
};
|
|
75
63
|
const CustomizedTickBarChart = props => {
|
|
76
64
|
const {
|
|
@@ -84,11 +72,11 @@ const BarChart = props => {
|
|
|
84
72
|
return /*#__PURE__*/_react.default.createElement("g", {
|
|
85
73
|
transform: `translate(${x},${y})`
|
|
86
74
|
}, showCurrentCampaignStyle && retailerData[0].isCurrent && /*#__PURE__*/_react.default.createElement("rect", {
|
|
87
|
-
x: -
|
|
75
|
+
x: -55 // Adjust this to position the background properly
|
|
88
76
|
,
|
|
89
|
-
y:
|
|
77
|
+
y: 35 // Adjust this for vertical alignment with your text
|
|
90
78
|
,
|
|
91
|
-
width:
|
|
79
|
+
width: 110 // Adjust width based on the text length
|
|
92
80
|
,
|
|
93
81
|
height: 22 // Adjust height based on font size
|
|
94
82
|
,
|
|
@@ -101,8 +89,8 @@ const BarChart = props => {
|
|
|
101
89
|
fill: "#212121"
|
|
102
90
|
}, /*#__PURE__*/_react.default.createElement(_BarChart.LabelBoldText, {
|
|
103
91
|
textAnchor: "middle",
|
|
104
|
-
x: 0,
|
|
105
|
-
dy:
|
|
92
|
+
x: "0",
|
|
93
|
+
dy: "50",
|
|
106
94
|
fontSize: showCurrentCampaignStyle ? 12 : 16,
|
|
107
95
|
fontWeight: showCurrentCampaignStyle ? 500 : 600
|
|
108
96
|
}, payload.value), /*#__PURE__*/_react.default.createElement(_BarChart.LabelText, {
|
|
@@ -174,7 +162,7 @@ const BarChart = props => {
|
|
|
174
162
|
dataKey: "title",
|
|
175
163
|
tick: CustomizedTickBarChart,
|
|
176
164
|
tickLine: false,
|
|
177
|
-
height:
|
|
165
|
+
height: 120,
|
|
178
166
|
stroke: "#D0D0D0",
|
|
179
167
|
domain: [0, 'auto'],
|
|
180
168
|
interval: 0
|
|
@@ -236,6 +224,5 @@ BarChart.defaultProps = {
|
|
|
236
224
|
referenceLineColor: '#212121',
|
|
237
225
|
referenceLineDashed: '5',
|
|
238
226
|
showCurrentCampaignStyle: false,
|
|
239
|
-
currentBarColor: '#90CE9C'
|
|
240
|
-
isPercent: false
|
|
227
|
+
currentBarColor: '#90CE9C'
|
|
241
228
|
};
|
|
@@ -12,9 +12,6 @@ var _GiantFoodIcon = require("./icons/GiantFoodIcon");
|
|
|
12
12
|
var _HannafordIcon = require("./icons/HannafordIcon");
|
|
13
13
|
var _StopAndShopIcon = require("./icons/StopAndShopIcon");
|
|
14
14
|
var _TheGiantCompanyIcon = require("./icons/TheGiantCompanyIcon");
|
|
15
|
-
var _ComboBoxArrowDownIcon = require("./icons/ComboBoxArrowDownIcon");
|
|
16
|
-
var _ComboBoxArrowUpIcon = require("./icons/ComboBoxArrowUpIcon");
|
|
17
|
-
var _ListBox = require("./ListBox");
|
|
18
15
|
var _CollapseHeader = require("./CollapseHeader.style");
|
|
19
16
|
const CollapseHeader = props => {
|
|
20
17
|
var _data$eventDescriptio, _data$objectivesDescr, _data$eventDatesValue, _data$eventDatesValue2;
|
|
@@ -24,7 +21,10 @@ const CollapseHeader = props => {
|
|
|
24
21
|
showPeriodIcon,
|
|
25
22
|
viewCreativeRetailersData,
|
|
26
23
|
data,
|
|
24
|
+
showViewCreativeButton,
|
|
27
25
|
viewCreativeOnClick,
|
|
26
|
+
descriptionTitle,
|
|
27
|
+
datesTitle,
|
|
28
28
|
width,
|
|
29
29
|
height,
|
|
30
30
|
textcolor,
|
|
@@ -140,7 +140,7 @@ const CollapseHeader = props => {
|
|
|
140
140
|
id: "EventNameViewCreativeSubContainer"
|
|
141
141
|
}, /*#__PURE__*/_react.default.createElement(_CollapseHeader.ViewCreativeButtonAndListBoxContainer, {
|
|
142
142
|
id: "ViewCreativeButtonAndListBoxContainer"
|
|
143
|
-
}, /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
143
|
+
}, showViewCreativeButton && /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
144
144
|
leftIcon: "Eye",
|
|
145
145
|
onClick: viewCreativeOnClickHandler,
|
|
146
146
|
text: buttonText,
|
|
@@ -193,7 +193,7 @@ const CollapseHeader = props => {
|
|
|
193
193
|
id: "ObjectivesDescription"
|
|
194
194
|
}, /*#__PURE__*/_react.default.createElement(_CollapseHeader.ObjectivesTitle, {
|
|
195
195
|
id: "ObjectivesTitle"
|
|
196
|
-
}, (data === null || data === void 0 ? void 0 : (_data$eventDescriptio = data.eventDescription) === null || _data$eventDescriptio === void 0 ? void 0 : _data$eventDescriptio.length) > 0 ?
|
|
196
|
+
}, (data === null || data === void 0 ? void 0 : (_data$eventDescriptio = data.eventDescription) === null || _data$eventDescriptio === void 0 ? void 0 : _data$eventDescriptio.length) > 0 ? descriptionTitle : ""), data.eventDescription))), /*#__PURE__*/_react.default.createElement(_CollapseHeader.ObjectiesAndPeriodsContainer, {
|
|
197
197
|
id: "ObjectiesAndPeriodsContainer"
|
|
198
198
|
}, /*#__PURE__*/_react.default.createElement(_CollapseHeader.ObjectiesContainer, {
|
|
199
199
|
id: "ObjectiesContainer",
|
|
@@ -208,7 +208,7 @@ const CollapseHeader = props => {
|
|
|
208
208
|
id: "SubLineContainer"
|
|
209
209
|
}, (data === null || data === void 0 ? void 0 : (_data$eventDatesValue = data.eventDatesValue) === null || _data$eventDatesValue === void 0 ? void 0 : _data$eventDatesValue.length) > 0 ? /*#__PURE__*/_react.default.createElement(_CollapseHeader.PeriodLabel, {
|
|
210
210
|
id: "PeriodLabel"
|
|
211
|
-
}, "
|
|
211
|
+
}, datesTitle, " ") : "", (data === null || data === void 0 ? void 0 : (_data$eventDatesValue2 = data.eventDatesValue) === null || _data$eventDatesValue2 === void 0 ? void 0 : _data$eventDatesValue2.length) > 0 ? /*#__PURE__*/_react.default.createElement(_CollapseHeader.PeriodValue, {
|
|
212
212
|
id: "PeriodValue"
|
|
213
213
|
}, data.eventDatesValue) : "")))));
|
|
214
214
|
};
|
|
@@ -242,11 +242,14 @@ CollapseHeader.defaultProps = {
|
|
|
242
242
|
supplier: "",
|
|
243
243
|
brand: ""
|
|
244
244
|
},
|
|
245
|
+
showViewCreativeButton: true,
|
|
245
246
|
viewCreativeOnClick: () => {},
|
|
246
247
|
width: "100%",
|
|
247
248
|
height: "100%",
|
|
248
249
|
textcolor: "#212121",
|
|
249
250
|
showDraft: false,
|
|
250
251
|
disabled: false,
|
|
251
|
-
buttonText: "View creative"
|
|
252
|
+
buttonText: "View creative",
|
|
253
|
+
descriptionTitle: "Event Description: ",
|
|
254
|
+
datesTitle: "Event Dates: "
|
|
252
255
|
};
|
|
@@ -0,0 +1,70 @@
|
|
|
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.DoublePanelDataRow = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _DoublePanelDataRow = require("./DoublePanelDataRow.style");
|
|
10
|
+
var _ArrowUpIcon = require("./icons/ArrowUpIcon");
|
|
11
|
+
var _ArrowDownIcon = require("./icons/ArrowDownIcon");
|
|
12
|
+
var _CommonFunctions = require("./CommonFunctions");
|
|
13
|
+
/* eslint-disable no-restricted-globals */
|
|
14
|
+
|
|
15
|
+
const DoublePanelDataRow = props => {
|
|
16
|
+
const {
|
|
17
|
+
width,
|
|
18
|
+
height,
|
|
19
|
+
data,
|
|
20
|
+
backgroundColor,
|
|
21
|
+
className,
|
|
22
|
+
customDataFormat,
|
|
23
|
+
showPercentChange
|
|
24
|
+
} = props;
|
|
25
|
+
const getArrowSign = arrowSign => {
|
|
26
|
+
if (!arrowSign) {
|
|
27
|
+
return '-';
|
|
28
|
+
}
|
|
29
|
+
if (arrowSign === 'up') {
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.PercentageChange, {
|
|
31
|
+
color: "#5FCC70",
|
|
32
|
+
value: 34 // TODO: when ready, replace with actual value
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_ArrowUpIcon.ArrowUpIcon, {
|
|
34
|
+
width: 12,
|
|
35
|
+
height: 12
|
|
36
|
+
}), ' ', "(+34K)");
|
|
37
|
+
}
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.PercentageChange, {
|
|
39
|
+
color: "#D23630",
|
|
40
|
+
value: 66 // TODO: when ready, replace with actual value
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement(_ArrowDownIcon.ArrowDownIcon, {
|
|
42
|
+
width: 12,
|
|
43
|
+
height: 12
|
|
44
|
+
}), ' ', "(-12K)");
|
|
45
|
+
};
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.LinnerContainer, {
|
|
47
|
+
className: className,
|
|
48
|
+
backgroundColor: backgroundColor,
|
|
49
|
+
width: width,
|
|
50
|
+
height: height,
|
|
51
|
+
customDataFormat: customDataFormat
|
|
52
|
+
}, data.map(item => /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.DataBox, {
|
|
53
|
+
className: "data-box-item"
|
|
54
|
+
}, item.title && /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.DataBoxTitle, {
|
|
55
|
+
className: "DataBoxTitle"
|
|
56
|
+
}, item.title), /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.CellItem, null, item.value !== null && item.value !== undefined && !isNaN(item.value) && item.value !== 'null' && item.value !== 'undefined' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, item.sign && /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.CellItemValueSign, null, item.sign), customDataFormat ? /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.BigValue, {
|
|
57
|
+
className: "DataBoxValue"
|
|
58
|
+
}, ''.concat((0, _CommonFunctions.formattedValue)(item.value), (0, _CommonFunctions.getFormattedUnits)(item.value)), item.isPercent && /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.CellItemValueSign, null, "%")) : /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.BigValue, null, ''.concat((0, _CommonFunctions.getFormattedValue)(item.value), (0, _CommonFunctions.getFormattedUnits)(item.value)), item.isPercent && /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.CellItemValueSign, null, "%")), showPercentChange && getArrowSign(item.value >= 0 ? 'up' : 'down')) : /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.CellItemNoValue, null, "N/A")), /*#__PURE__*/_react.default.createElement(_DoublePanelDataRow.ValueChange, null))));
|
|
59
|
+
};
|
|
60
|
+
exports.DoublePanelDataRow = DoublePanelDataRow;
|
|
61
|
+
var _default = exports.default = DoublePanelDataRow;
|
|
62
|
+
DoublePanelDataRow.defaultProps = {
|
|
63
|
+
className: '',
|
|
64
|
+
width: '100%',
|
|
65
|
+
height: 'auto',
|
|
66
|
+
data: [],
|
|
67
|
+
backgroundColor: '#FFFFFF',
|
|
68
|
+
customDataFormat: false,
|
|
69
|
+
showPercentChange: false
|
|
70
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ValueChange = exports.PercentageChange = exports.LinnerContainer = exports.DataBoxTitle = exports.DataBox = exports.CellItemValueSign = exports.CellItemNoValue = exports.CellItem = exports.BigValue = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
const LinnerContainer = exports.LinnerContainer = _styledComponents.default.div`
|
|
10
|
+
font-family: "Poppins", sans-serif;
|
|
11
|
+
display: grid;
|
|
12
|
+
gap: 48px 0;
|
|
13
|
+
grid-template-columns: repeat(5, 1fr);
|
|
14
|
+
grid-template-rows: auto auto;
|
|
15
|
+
width: ${props => props.width};
|
|
16
|
+
height: ${props => props.height};
|
|
17
|
+
background-color: ${props => props.backgroundColor};
|
|
18
|
+
padding: 50px 20px 20px;
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
`;
|
|
21
|
+
const DataBox = exports.DataBox = _styledComponents.default.div`
|
|
22
|
+
height: 100%;
|
|
23
|
+
padding: 0 40px;
|
|
24
|
+
border-left: 1px solid #d0d0d0;
|
|
25
|
+
&:nth-child(1),
|
|
26
|
+
&:nth-child(6) {
|
|
27
|
+
border-left: none;
|
|
28
|
+
padding-left: 0;
|
|
29
|
+
}
|
|
30
|
+
&:nth-child(5),
|
|
31
|
+
&:nth-child(10) {
|
|
32
|
+
padding-right: 0;
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
const CellItem = exports.CellItem = _styledComponents.default.div`
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
`;
|
|
39
|
+
const DataBoxTitle = exports.DataBoxTitle = _styledComponents.default.span`
|
|
40
|
+
font-size: 18px;
|
|
41
|
+
display: block;
|
|
42
|
+
margin: 0 0 12px;
|
|
43
|
+
`;
|
|
44
|
+
const BigValue = exports.BigValue = _styledComponents.default.span`
|
|
45
|
+
font-size: 40px;
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
margin-right: 5px;
|
|
48
|
+
`;
|
|
49
|
+
const CellItemValueSign = exports.CellItemValueSign = _styledComponents.default.span`
|
|
50
|
+
font-size: 16px;
|
|
51
|
+
font-weight: 400;
|
|
52
|
+
`;
|
|
53
|
+
const ValueChange = exports.ValueChange = _styledComponents.default.span`
|
|
54
|
+
font-size: 16px;
|
|
55
|
+
font-weight: 400;
|
|
56
|
+
`;
|
|
57
|
+
const CellItemNoValue = exports.CellItemNoValue = _styledComponents.default.span`
|
|
58
|
+
font-size: 40px;
|
|
59
|
+
font-weight: 500;
|
|
60
|
+
`;
|
|
61
|
+
const PercentageChange = exports.PercentageChange = _styledComponents.default.div`
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
font-size: 16px;
|
|
65
|
+
color: ${props => props.color};
|
|
66
|
+
`;
|
package/package.json
CHANGED
|
@@ -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);
|