sag_components 1.0.196 → 1.0.198

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@ var _HannafordIcon = require("./icons/HannafordIcon");
16
16
  var _StopAndShopIcon = require("./icons/StopAndShopIcon");
17
17
  var _TheGiantCompanyIcon = require("./icons/TheGiantCompanyIcon");
18
18
  var _TitleDescriptionStyle = require("./TitleDescription.style.js");
19
- var _excluded = ["showRetailerIcon", "data", "infoButtonOnClick", "objectivesShowMoreOnClick", "viewCreativeOnClick", "downloadButtonOnClick", "width", "height", "textColor"];
19
+ var _excluded = ["showRetailerIcon", "data", "infoButtonOnClick", "objectivesShowMoreOnClick", "viewCreativeOnClick", "downloadButtonOnClick", "width", "height", "textColor", "disabled"];
20
20
  /*TitleDescription*/
21
21
  var TitleDescription = function TitleDescription(_ref) {
22
22
  var _ref$showRetailerIcon = _ref.showRetailerIcon,
@@ -32,6 +32,8 @@ var TitleDescription = function TitleDescription(_ref) {
32
32
  height = _ref$height === void 0 ? "100%" : _ref$height,
33
33
  _ref$textColor = _ref.textColor,
34
34
  textColor = _ref$textColor === void 0 ? "#212121" : _ref$textColor,
35
+ _ref$disabled = _ref.disabled,
36
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
35
37
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
36
38
  var getRetailerIcon = function getRetailerIcon(retailerName) {
37
39
  switch (retailerName) {
@@ -91,7 +93,8 @@ var TitleDescription = function TitleDescription(_ref) {
91
93
  id: "EventName"
92
94
  }, data.eventName, " "), /*#__PURE__*/_react.default.createElement(_TitleDescriptionStyle.ViewCreativeContainer, {
93
95
  onClick: viewCreativeOnClick,
94
- id: "ViewCreativeContainer"
96
+ id: "ViewCreativeContainer",
97
+ disabled: disabled
95
98
  }, /*#__PURE__*/_react.default.createElement(_EyeIcon.EyeIcon, {
96
99
  width: "12",
97
100
  height: "12"
@@ -129,6 +132,7 @@ var TitleDescription = function TitleDescription(_ref) {
129
132
  id: "ObjectivesTitle"
130
133
  }, "Objectives:", " "), data.objectivesDescription, /*#__PURE__*/_react.default.createElement(_TitleDescriptionStyle.ObjectivesShowMore, {
131
134
  id: "ObjectivesShowMore",
135
+ disabled: disabled,
132
136
  onClick: function onClick(event) {
133
137
  objectivesShowMoreOnClick({
134
138
  eventName: "objectivesShowMoreOnClick",
@@ -24,7 +24,11 @@ var EventNameViewCreativeSubContainer = _styledComponents.default.div(_templateO
24
24
  exports.EventNameViewCreativeSubContainer = EventNameViewCreativeSubContainer;
25
25
  var EventName = _styledComponents.default.h4(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 700;\n font-size: 1.2rem;\n margin: 0;\n"])));
26
26
  exports.EventName = EventName;
27
- var ViewCreativeContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 12px;\n border: 1px solid #ccc;\n margin-left: 10px;\n padding: 3px 10px;\n &:hover {\n cursor: pointer;\n }\n"])));
27
+ var ViewCreativeContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 12px;\n border: 1px solid #ccc;\n margin-left: 10px;\n padding: 3px 10px;\n color: ", ";\n &:hover {\n cursor: ", ";\n }\n"])), function (props) {
28
+ return props.disabled ? "#B1B1B1" : "#212121";
29
+ }, function (props) {
30
+ return !props.disabled ? "pointer" : "default";
31
+ });
28
32
  exports.ViewCreativeContainer = ViewCreativeContainer;
29
33
  var ViewCreativeTextField = _styledComponents.default.h4(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin: 0 5px;\n"])));
30
34
  exports.ViewCreativeTextField = ViewCreativeTextField;
@@ -32,7 +36,7 @@ var FilterValuesContainer = _styledComponents.default.div(_templateObject8 || (_
32
36
  exports.FilterValuesContainer = FilterValuesContainer;
33
37
  var FilterValue = _styledComponents.default.p(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n color: #1b30aa;\n margin: 0;\n"])));
34
38
  exports.FilterValue = FilterValue;
35
- var FieldsDelimiter = _styledComponents.default.p(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)([" \n color: #ccc;\n margin: 0;\n"])));
39
+ var FieldsDelimiter = _styledComponents.default.p(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n color: #ccc;\n margin: 0;\n"])));
36
40
  exports.FieldsDelimiter = FieldsDelimiter;
37
41
  var Retailer = _styledComponents.default.p(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n color: #1b30aa;\n margin: 0;\n margin-inline-end: 5px;\n"])));
38
42
  exports.Retailer = Retailer;
@@ -46,9 +50,13 @@ var ObjectiesAndPeriodsContainer = _styledComponents.default.div(_templateObject
46
50
  exports.ObjectiesAndPeriodsContainer = ObjectiesAndPeriodsContainer;
47
51
  var ObjectivesTitle = _styledComponents.default.strong(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)([""])));
48
52
  exports.ObjectivesTitle = ObjectivesTitle;
49
- var ObjectivesDescription = _styledComponents.default.p(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0; \n \n"])));
53
+ var ObjectivesDescription = _styledComponents.default.p(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n"])));
50
54
  exports.ObjectivesDescription = ObjectivesDescription;
51
- var ObjectivesShowMore = _styledComponents.default.a(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n color: #1b30aa;\n &:hover {\n cursor: pointer;\n }\n"])));
55
+ var ObjectivesShowMore = _styledComponents.default.a(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n &:hover {\n cursor: ", ";\n }\n"])), function (props) {
56
+ return props.disabled ? "#B1B1B1" : "#1b30aa";
57
+ }, function (props) {
58
+ return !props.disabled ? "pointer" : "default";
59
+ });
52
60
  exports.ObjectivesShowMore = ObjectivesShowMore;
53
61
  var BottonsContainer = _styledComponents.default.div(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n min-height: 1.5rem;\n"])));
54
62
  exports.BottonsContainer = BottonsContainer;
@@ -72,7 +72,7 @@ var TotalBenchmark = function TotalBenchmark(_ref) {
72
72
  }, dotCut ? (0, _CommonFunctions.getFormattedValue)(item.value) : (0, _CommonFunctions.getNumberWithCommas)(item.value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(item.value) : ""), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkStyle.BenchmarkContainer, {
73
73
  id: "BenchmarkContainer",
74
74
  width: width
75
- }, item.totalValue && /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
75
+ }, item.totalValue ? /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
76
76
  id: "Benchmark",
77
77
  totalValue: item.totalValue,
78
78
  currentValue: item.value,
@@ -87,7 +87,7 @@ var TotalBenchmark = function TotalBenchmark(_ref) {
87
87
  linearGradientUnderAvarageColor: "#FDB1B1",
88
88
  underAvarageColor: "#FD5959",
89
89
  backgroundColor: "#F2F2F2"
90
- })))));
90
+ }) : ""))));
91
91
  }) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
92
92
  noDataText: noDataText
93
93
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.196",
3
+ "version": "1.0.198",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {