sag_components 1.0.882 → 1.0.883

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.
Files changed (310) hide show
  1. package/dist/stories/components/AttachedFile/AttachedFile.js +62 -0
  2. package/dist/stories/components/AttachedFile/AttachedFile.stories.js +36 -0
  3. package/dist/stories/components/AttachedFile/AttachedFile.style.js +14 -0
  4. package/dist/stories/components/BannerEventBox/BannerEventBox.js +87 -0
  5. package/dist/stories/components/BannerEventBox/BannerEventBox.stories.js +58 -0
  6. package/dist/stories/components/BannerEventBox/BannerEventBox.style.js +22 -0
  7. package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.js +148 -0
  8. package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.stories.js +30 -0
  9. package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.style.js +22 -0
  10. package/dist/stories/components/BannersDropdown/BannersDropdown.js +115 -0
  11. package/dist/stories/components/BannersDropdown/BannersDropdown.stories.js +64 -0
  12. package/dist/stories/components/BannersDropdown/BannersDropdown.style.js +18 -0
  13. package/dist/stories/components/BarChart/BarChart.js +189 -0
  14. package/dist/stories/components/BarChart/BarChart.stories.js +144 -0
  15. package/dist/stories/components/BarChart/BarChart.style.js +18 -0
  16. package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.js +204 -0
  17. package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.stories.js +133 -0
  18. package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.style.js +18 -0
  19. package/dist/stories/components/BarChartWithAreaChart.js +241 -0
  20. package/dist/stories/components/BarChartWithAreaChart.style.js +64 -0
  21. package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.js +295 -0
  22. package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.stories.js +442 -0
  23. package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.style.js +21 -0
  24. package/dist/stories/components/Benchmark/Benchmark.js +130 -0
  25. package/dist/stories/components/Benchmark/Benchmark.stories.js +148 -0
  26. package/dist/stories/components/Benchmark/Benchmark.style.js +15 -0
  27. package/dist/stories/components/Button/Button.js +217 -0
  28. package/dist/stories/components/Button/Button.stories.js +269 -0
  29. package/dist/stories/components/Button/Button.style.js +15 -0
  30. package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.js +48 -0
  31. package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.stories.js +65 -0
  32. package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.style.js +15 -0
  33. package/dist/stories/components/Card/Card.js +72 -0
  34. package/dist/stories/components/Card/Card.stories.js +92 -0
  35. package/dist/stories/components/Card/Card.style.js +18 -0
  36. package/dist/stories/components/CheckBox/CheckBox.js +76 -0
  37. package/dist/stories/components/CheckBox/CheckBox.stories.js +107 -0
  38. package/dist/stories/components/CheckBox/CheckBox.style.js +14 -0
  39. package/dist/stories/components/CheckBoxButton/CheckBoxButton.js +69 -0
  40. package/dist/stories/components/CheckBoxButton/CheckBoxButton.stories.js +150 -0
  41. package/dist/stories/components/CheckBoxButton/CheckBoxButton.style.js +14 -0
  42. package/dist/stories/components/CodeEditor/CodeEditor.js +43 -0
  43. package/dist/stories/components/CodeEditor/CodeEditor.style.js +12 -0
  44. package/dist/stories/components/CollapseData/CollapseData.js +66 -0
  45. package/dist/stories/components/CollapseData/CollapseData.stories.js +125 -0
  46. package/dist/stories/components/CollapseData/CollapseData.style.js +21 -0
  47. package/dist/stories/components/CollapseHeader/CollapseHeader.js +267 -0
  48. package/dist/stories/components/CollapseHeader/CollapseHeader.stories.js +116 -0
  49. package/dist/stories/components/CollapseHeader/CollapseHeader.style.js +35 -0
  50. package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.js +61 -0
  51. package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.stories.js +161 -0
  52. package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.style.js +17 -0
  53. package/dist/stories/components/Datepicker/Datepicker.js +148 -0
  54. package/dist/stories/components/Datepicker/Datepicker.stories.js +86 -0
  55. package/dist/stories/components/Datepicker/Datepicker.style.js +13 -0
  56. package/dist/stories/components/DownloadProgress/DownloadProgress.js +97 -0
  57. package/dist/stories/components/DownloadProgress/DownloadProgress.stories.js +111 -0
  58. package/dist/stories/components/DownloadProgress/DownloadProgress.style.js +14 -0
  59. package/dist/stories/components/Dropdown/Dropdown.js +231 -0
  60. package/dist/stories/components/Dropdown/Dropdown.stories.js +323 -0
  61. package/dist/stories/components/Dropdown/Dropdown.style.js +11 -0
  62. package/dist/stories/components/DropdownMulti/DropdownMulti.js +290 -0
  63. package/dist/stories/components/DropdownMulti/DropdownMulti.stories.js +220 -0
  64. package/dist/stories/components/DropdownMulti/DropdownMulti.style.js +11 -0
  65. package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.js +279 -0
  66. package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.style.js +28 -0
  67. package/dist/stories/components/DropdownNew/DropdownNew.js +88 -0
  68. package/dist/stories/components/DropdownNew/DropdownNew.stories.js +407 -0
  69. package/dist/stories/components/DropdownNew/DropdownNew.style.js +11 -0
  70. package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.js +234 -0
  71. package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.style.js +26 -0
  72. package/dist/stories/components/EventDetailsCard/EventDetailsCard.js +144 -0
  73. package/dist/stories/components/EventDetailsCard/EventDetailsCard.stories.js +57 -0
  74. package/dist/stories/components/EventDetailsCard/EventDetailsCard.style.js +18 -0
  75. package/dist/stories/components/EventList/EventList.js +61 -0
  76. package/dist/stories/components/EventList/EventList.stories.js +84 -0
  77. package/dist/stories/components/EventList/EventList.style.js +14 -0
  78. package/dist/stories/components/EventListItem/EventListItem.js +50 -0
  79. package/dist/stories/components/EventListItem/EventListItem.stories.js +65 -0
  80. package/dist/stories/components/EventListItem/EventListItem.style.js +14 -0
  81. package/dist/stories/components/FilterContainer/FilterContainer.js +29 -0
  82. package/dist/stories/components/FilterContainer/FilterContainer.stories.js +23 -0
  83. package/dist/stories/components/FilterContainer/FilterContainer.style.js +13 -0
  84. package/dist/stories/components/FilterPanel/FilterPanel.js +566 -0
  85. package/dist/stories/components/FilterPanel/FilterPanel.stories.js +967 -0
  86. package/dist/stories/components/FilterPanel/FilterPanel.style.js +21 -0
  87. package/dist/stories/components/FormInput/FormInput.js +41 -0
  88. package/dist/stories/components/FormSelect/FormSelect.js +42 -0
  89. package/dist/stories/components/FormattedValue/FormattedValue.js +68 -0
  90. package/dist/stories/components/FormattedValue/FormattedValue.stories.js +189 -0
  91. package/dist/stories/components/FormattedValue/FormattedValue.style.js +18 -0
  92. package/dist/stories/components/IconButton/IconButton.js +147 -0
  93. package/dist/stories/components/IconButton/IconButton.stories.js +131 -0
  94. package/dist/stories/components/IconButton/IconButton.style.js +15 -0
  95. package/dist/stories/components/Input/Input.js +183 -0
  96. package/dist/stories/components/Input/Input.stories.js +434 -0
  97. package/dist/stories/components/Input/Input.style.js +17 -0
  98. package/dist/stories/components/InputOld/InputOld.js +90 -0
  99. package/dist/stories/components/InputOld/InputOld.stories.js +100 -0
  100. package/dist/stories/components/InputOld/InputOld.style.js +16 -0
  101. package/dist/stories/components/KpiFilter/KpiFilter.js +313 -0
  102. package/dist/stories/components/KpiFilter/KpiFilter.stories.js +380 -0
  103. package/dist/stories/components/KpiFilter/KpiFilter.style.js +26 -0
  104. package/dist/stories/components/LinkButton/LinkButton.js +207 -0
  105. package/dist/stories/components/LinkButton/LinkButton.stories.js +180 -0
  106. package/dist/stories/components/LinkButton/LinkButton.style.js +14 -0
  107. package/dist/stories/components/LinnerDataBox/LinnerDataBox.js +43 -0
  108. package/dist/stories/components/LinnerDataBox/LinnerDataBox.stories.js +56 -0
  109. package/dist/stories/components/LinnerDataBox/LinnerDataBox.style.js +22 -0
  110. package/dist/stories/components/ListBox/ListBox.js +82 -0
  111. package/dist/stories/components/ListBox/ListBox.stories.js +132 -0
  112. package/dist/stories/components/ListBox/ListBox.style.js +14 -0
  113. package/dist/stories/components/MarketShareDescription/MarketShareDescription.js +109 -0
  114. package/dist/stories/components/MarketShareDescription/MarketShareDescription.stories.js +184 -0
  115. package/dist/stories/components/MarketShareDescription/MarketShareDescription.style.js +27 -0
  116. package/dist/stories/components/Modal/Modal.js +21 -0
  117. package/dist/stories/components/Modal/Modal.style.js +17 -0
  118. package/dist/stories/components/Modal/ModalTotalBenchmark.js +224 -0
  119. package/dist/stories/components/Modal/ModalTotalCost.js +139 -0
  120. package/dist/stories/components/MonthPicker/MonthPicker.js +166 -0
  121. package/dist/stories/components/MonthPicker/MonthPicker.stories.js +140 -0
  122. package/dist/stories/components/MonthPicker/MonthPicker.style.js +18 -0
  123. package/dist/stories/components/MonthPicker/MonthPopupPicker.js +122 -0
  124. package/dist/stories/components/MultipleCard/MultipleCard.js +26 -0
  125. package/dist/stories/components/MultipleCard/MultipleCard.stories.js +33 -0
  126. package/dist/stories/components/{BannerEventBoxTest.style.js → MultipleCard/MultipleCard.style.js} +2 -2
  127. package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.js +30 -0
  128. package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.stories.js +66 -0
  129. package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.style.js +13 -0
  130. package/dist/stories/components/OneColumnContainer/OneColumnContainer.js +121 -0
  131. package/dist/stories/components/OneColumnContainer/OneColumnContainer.stories.js +119 -0
  132. package/dist/stories/components/OneColumnContainer/OneColumnContainer.style.js +20 -0
  133. package/dist/stories/components/PageFilterBar/PageFilterBar.js +23 -0
  134. package/dist/stories/components/PageFilterBar/PageFilterBar.stories.js +28 -0
  135. package/dist/stories/components/PageFilterBar/PageFilterBar.style.js +12 -0
  136. package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.js +431 -0
  137. package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.stories.js +258 -0
  138. package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.style.js +25 -0
  139. package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.js +58 -0
  140. package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.stories.js +86 -0
  141. package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.style.js +16 -0
  142. package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.js +315 -0
  143. package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.stories.js +231 -0
  144. package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.style.js +23 -0
  145. package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.js +70 -0
  146. package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.stories.js +100 -0
  147. package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.style.js +20 -0
  148. package/dist/stories/components/Popup/Popup.js +172 -0
  149. package/dist/stories/components/Popup/Popup.stories.js +704 -0
  150. package/dist/stories/components/Popup/Popup.style.js +24 -0
  151. package/dist/stories/components/PopupCharts/PopupCharts.js +244 -0
  152. package/dist/stories/components/PopupCharts/PopupCharts.stories.js +1203 -0
  153. package/dist/stories/components/PopupCharts/PopupCharts.style.js +23 -0
  154. package/dist/stories/components/PopupContent/PopupContent.js +111 -0
  155. package/dist/stories/components/PopupContent/PopupContent.style.js +21 -0
  156. package/dist/stories/components/PopupContent/PopupFieldsRules.js +168 -0
  157. package/dist/stories/components/ProductsVariety/ProductsVariety.js +94 -0
  158. package/dist/stories/components/ProductsVariety/ProductsVariety.stories.js +91 -0
  159. package/dist/stories/components/ProductsVariety/ProductsVariety.style.js +20 -0
  160. package/dist/stories/components/ProgressBar/ProgressBar.js +52 -0
  161. package/dist/stories/components/ProgressBar/ProgressBar.stories.js +72 -0
  162. package/dist/stories/components/ProgressBar/ProgressBar.style.js +13 -0
  163. package/dist/stories/components/QuarterPicker/QuarterPicker.js +165 -0
  164. package/dist/stories/components/QuarterPicker/QuarterPicker.stories.js +140 -0
  165. package/dist/stories/components/QuarterPicker/QuarterPicker.style.js +18 -0
  166. package/dist/stories/components/QuarterPicker/QuarterPopupPicker.js +109 -0
  167. package/dist/stories/components/QuickFilter/QuickFilter.js +77 -0
  168. package/dist/stories/components/QuickFilter/QuickFilter.stories.js +281 -0
  169. package/dist/stories/components/QuickFilter/QuickFilter.style.js +11 -0
  170. package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.js +299 -0
  171. package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.style.js +28 -0
  172. package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.js +230 -0
  173. package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.style.js +27 -0
  174. package/dist/stories/components/RangePicker/RangeDatePicker.js +146 -0
  175. package/dist/stories/components/RangePicker/RangePicker.js +176 -0
  176. package/dist/stories/components/RangePicker/RangePicker.stories.js +138 -0
  177. package/dist/stories/components/RangePicker/RangePicker.style.js +18 -0
  178. package/dist/stories/components/ReportTable/ReportTable.js +262 -0
  179. package/dist/stories/components/ReportTable/ReportTable.stories.js +151 -0
  180. package/dist/stories/components/ReportTable/ReportTable.style.js +22 -0
  181. package/dist/stories/components/SagButton/SagButton.js +68 -0
  182. package/dist/stories/components/SagButton/SagButton.stories.js +118 -0
  183. package/dist/stories/components/SagButton/SagButton.style.js +13 -0
  184. package/dist/stories/components/SagIconButton/SagIconButton.js +130 -0
  185. package/dist/stories/components/SagIconButton/SagIconButton.stories.js +123 -0
  186. package/dist/stories/components/SagIconButton/SagIconButton.style.js +12 -0
  187. package/dist/stories/components/SagInput/SagInput.js +53 -0
  188. package/dist/stories/components/SagInput/SagInput.stories.js +69 -0
  189. package/dist/stories/components/{NewInput.style.js → SagInput/SagInput.style.js} +2 -2
  190. package/dist/stories/components/SalesAndROI/SalesAndROI.js +89 -0
  191. package/dist/stories/components/SalesAndROI/SalesAndROI.stories.js +168 -0
  192. package/dist/stories/components/SalesAndROI/SalesAndROI.style.js +19 -0
  193. package/dist/stories/components/SearchInput/SearchInput.js +39 -0
  194. package/dist/stories/components/SearchInput/SearchInput.stories.js +44 -0
  195. package/dist/stories/components/SearchInput/SearchInput.style.js +12 -0
  196. package/dist/stories/components/SegmentedButton/SegmentedButton.js +122 -0
  197. package/dist/stories/components/SegmentedButton/SegmentedButton.stories.js +183 -0
  198. package/dist/stories/components/SegmentedButton/SegmentedButton.style.js +19 -0
  199. package/dist/stories/components/Select/Select.js +135 -0
  200. package/dist/stories/components/Select/Select.stories.js +200 -0
  201. package/dist/stories/components/Select/Select.style.js +19 -0
  202. package/dist/stories/components/TabMenu/TabMenu.js +202 -0
  203. package/dist/stories/components/TabMenu/TabMenu.stories.js +76 -0
  204. package/dist/stories/components/TabMenu/TabMenu.style.js +24 -0
  205. package/dist/stories/components/Table/Table.js +195 -0
  206. package/dist/stories/components/Table/Table.stories.js +104 -0
  207. package/dist/stories/components/Table/Table.style.js +17 -0
  208. package/dist/stories/components/TextField/TextField.js +209 -0
  209. package/dist/stories/components/TextField/TextField.stories.js +162 -0
  210. package/dist/stories/components/TextField/TextField.style.js +11 -0
  211. package/dist/stories/components/TitleDescription/TitleDescription.js +272 -0
  212. package/dist/stories/components/TitleDescription/TitleDescription.stories.js +117 -0
  213. package/dist/stories/components/TitleDescription/TitleDescription.style.js +36 -0
  214. package/dist/stories/components/Tooltip/Tooltip.js +31 -0
  215. package/dist/stories/components/Tooltip/Tooltip.style.js +18 -0
  216. package/dist/stories/components/TopToggleList/TopToggleList.js +46 -0
  217. package/dist/stories/components/TopToggleList/TopToggleList.stories.js +52 -0
  218. package/dist/stories/components/TopToggleList/TopToggleList.style.js +16 -0
  219. package/dist/stories/components/TotalBenchmark/TotalBenchmark.js +97 -0
  220. package/dist/stories/components/TotalBenchmark/TotalBenchmark.stories.js +138 -0
  221. package/dist/stories/components/TotalBenchmark/TotalBenchmark.style.js +21 -0
  222. package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.js +342 -0
  223. package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.stories.js +343 -0
  224. package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.style.js +30 -0
  225. package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.js +149 -0
  226. package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.stories.js +172 -0
  227. package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.style.js +24 -0
  228. package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.js +165 -0
  229. package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.stories.js +185 -0
  230. package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.style.js +20 -0
  231. package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.js +182 -0
  232. package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.stories.js +290 -0
  233. package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.style.js +30 -0
  234. package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.js +207 -0
  235. package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.stories.js +158 -0
  236. package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.style.js +20 -0
  237. package/dist/stories/components/TspanTooltip/TspanTooltip.js +16 -0
  238. package/dist/stories/components/TspanTooltip/TspanTooltip.style.js +13 -0
  239. package/dist/stories/components/TwoBarCharts/TwoBarCharts.js +202 -0
  240. package/dist/stories/components/TwoBarCharts/TwoBarCharts.stories.js +120 -0
  241. package/dist/stories/components/TwoBarCharts/TwoBarCharts.style.js +18 -0
  242. package/dist/stories/components/icons/FoodLionChartIcon.js +42 -0
  243. package/dist/stories/components/icons/GiantFoodChartIcon.js +40 -0
  244. package/dist/stories/components/icons/HannafordChartIcon.js +40 -0
  245. package/dist/stories/components/icons/StopAndShopChartIcon.js +42 -0
  246. package/dist/stories/components/icons/TheGiantCompanyChartIcon.js +40 -0
  247. package/dist/stories/icons/ArrowDownIcon.js +27 -0
  248. package/dist/stories/icons/ArrowDropDownIcon.js +27 -0
  249. package/dist/stories/icons/ArrowSelectIcon.js +27 -0
  250. package/dist/stories/icons/ArrowUpIcon.js +27 -0
  251. package/dist/stories/icons/AttachedIcon.js +27 -0
  252. package/dist/stories/icons/BellIcon.js +27 -0
  253. package/dist/stories/icons/Calendar.js +20 -0
  254. package/dist/stories/icons/CalendarIcon.js +27 -0
  255. package/dist/stories/icons/CalendarInOpen.js +26 -0
  256. package/dist/stories/icons/CheckBoxButtonCheckedIcon.js +28 -0
  257. package/dist/stories/icons/CheckBoxCheckedIcon.js +28 -0
  258. package/dist/stories/icons/CheckBoxNotCheckedIcon.js +28 -0
  259. package/dist/stories/icons/ChervronLeftIcon.js +20 -0
  260. package/dist/stories/icons/ChervronRightIcon.js +20 -0
  261. package/dist/stories/icons/ClockIcon.js +27 -0
  262. package/dist/stories/icons/CloseIcon.js +27 -0
  263. package/dist/stories/icons/CloseXIcon.js +27 -0
  264. package/dist/stories/icons/ComboBoxArrowDownIcon.js +28 -0
  265. package/dist/stories/icons/ComboBoxArrowUpIcon.js +28 -0
  266. package/dist/stories/icons/DocumentIcon.js +48 -0
  267. package/dist/stories/icons/DownloadIcon.js +27 -0
  268. package/dist/stories/icons/Duplicate.js +28 -0
  269. package/dist/stories/icons/ErrorIcon.js +27 -0
  270. package/dist/stories/icons/ExitIcon.js +28 -0
  271. package/dist/stories/icons/ExportIcon.js +28 -0
  272. package/dist/stories/icons/EyeIcon.js +28 -0
  273. package/dist/stories/icons/FileIcon.js +27 -0
  274. package/dist/stories/icons/FilterIcon.js +36 -0
  275. package/dist/stories/icons/FlyIcon.js +28 -0
  276. package/dist/stories/icons/FoodLionIcon.js +3076 -0
  277. package/dist/stories/icons/FoodLionNewIcon.js +39 -0
  278. package/dist/stories/icons/GiantFoodIcon.js +1976 -0
  279. package/dist/stories/icons/GiantFoodIcon_new.js +42 -0
  280. package/dist/stories/icons/HannafordIcon.js +5017 -0
  281. package/dist/stories/icons/HannafordIcon_new.js +41 -0
  282. package/dist/stories/icons/HannafordNewIcon.js +213 -0
  283. package/dist/stories/icons/InfoIcon.js +28 -0
  284. package/dist/stories/icons/LampIcon.js +27 -0
  285. package/dist/stories/icons/LegendLineIcon.js +29 -0
  286. package/dist/stories/icons/LegendUnionIcon.js +29 -0
  287. package/dist/stories/icons/MaintenanceIcon.js +28 -0
  288. package/dist/stories/icons/MenuItemClosedIcon.js +28 -0
  289. package/dist/stories/icons/MenuItemOpenIcon.js +28 -0
  290. package/dist/stories/icons/MenuItemRightIcon.js +28 -0
  291. package/dist/stories/icons/MenuItemUpIcon.js +28 -0
  292. package/dist/stories/icons/NoDataFoundIcon.js +86 -0
  293. package/dist/stories/icons/OptionsIcon.js +27 -0
  294. package/dist/stories/icons/SearchIcon.js +27 -0
  295. package/dist/stories/icons/ShoppingCartIcon.js +45 -0
  296. package/dist/stories/icons/ShoutIcon.js +27 -0
  297. package/dist/stories/icons/SpotlightProductIcon.js +28 -0
  298. package/dist/stories/icons/StopAndShopIcon.js +134 -0
  299. package/dist/stories/icons/StopAndShopNewIcon.js +41 -0
  300. package/dist/stories/icons/SucceededIcon.js +27 -0
  301. package/dist/stories/icons/TheGiantCompanyIcon.js +40 -0
  302. package/dist/stories/icons/TheGiantCompanyNewIcon.js +39 -0
  303. package/dist/stories/utils/CommonFunctions.js +78 -0
  304. package/package.json +1 -1
  305. package/dist/stories/CampaignTool/PopupContent.stories.js +0 -284
  306. package/dist/stories/components/BannerEventBoxTest.js +0 -42
  307. package/dist/stories/components/FilterButton.js +0 -53
  308. package/dist/stories/components/FilterButton.style.js +0 -12
  309. package/dist/stories/components/NewInput.js +0 -33
  310. package/dist/stories/components/icons/TheGiantCompanyIcon_old.js +0 -1831
@@ -0,0 +1,343 @@
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.SalesGrowthNegative = exports.SalesGrowth = exports.BetweenTwoYears = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _TotalBenchmarkAreachart = require("./TotalBenchmarkAreachart");
10
+ const arrData = [{
11
+ title: '202320',
12
+ value1: 542366,
13
+ value2: 247715
14
+ }, {
15
+ title: '202321',
16
+ value1: 699511,
17
+ value2: 252313
18
+ }, {
19
+ title: '202322',
20
+ value1: 403092,
21
+ value2: 260822
22
+ }, {
23
+ title: '202323',
24
+ value1: 396184,
25
+ value2: 264325
26
+ }, {
27
+ title: '202324',
28
+ value1: 415317,
29
+ value2: 269243
30
+ }, {
31
+ title: '202325',
32
+ value1: 568376,
33
+ value2: 269592
34
+ }, {
35
+ title: '202326',
36
+ value1: 1078121,
37
+ value2: 269949
38
+ }, {
39
+ title: '202327',
40
+ value1: 347930,
41
+ value2: 270735
42
+ }, {
43
+ title: '202328',
44
+ value1: 346258,
45
+ value2: 271200
46
+ }, {
47
+ title: '202329',
48
+ value1: 350184,
49
+ value2: 270324
50
+ }, {
51
+ title: '202330',
52
+ value1: 312790,
53
+ value2: 266821
54
+ }, {
55
+ title: '202331',
56
+ value1: 335076,
57
+ value2: 267064
58
+ }, {
59
+ title: '202332',
60
+ value1: 311037,
61
+ value2: 266821
62
+ }];
63
+ const arrDataBetweenTwoYears = [{
64
+ title: '202355',
65
+ value1: 542366,
66
+ value2: 247715
67
+ }, {
68
+ title: '202356',
69
+ value1: 699511,
70
+ value2: 252313
71
+ }, {
72
+ title: '202357',
73
+ value1: 403092,
74
+ value2: 260822
75
+ }, {
76
+ title: '202358',
77
+ value1: 396184,
78
+ value2: 264325
79
+ }, {
80
+ title: '202401',
81
+ value1: 415317,
82
+ value2: 269243
83
+ }, {
84
+ title: '202402',
85
+ value1: 568376,
86
+ value2: 269592
87
+ }, {
88
+ title: '202403',
89
+ value1: 1078121,
90
+ value2: 269949
91
+ }, {
92
+ title: '202404',
93
+ value1: 347930,
94
+ value2: 270735
95
+ }, {
96
+ title: '202405',
97
+ value1: 346258,
98
+ value2: 271200
99
+ }, {
100
+ title: '202406',
101
+ value1: 350184,
102
+ value2: 270324
103
+ }, {
104
+ title: '202407',
105
+ value1: 312790,
106
+ value2: 266821
107
+ }, {
108
+ title: '202408',
109
+ value1: 335076,
110
+ value2: 267064
111
+ }, {
112
+ title: '202409',
113
+ value1: 311037,
114
+ value2: 266821
115
+ }];
116
+ var _default = exports.default = {
117
+ title: 'SAG BI/TotalBenchmarkAreachart',
118
+ component: _TotalBenchmarkAreachart.TotalBenchmarkAreachart,
119
+ tags: ['autodocs'],
120
+ argTypes: {
121
+ title: {
122
+ name: 'title',
123
+ control: {
124
+ type: 'text'
125
+ },
126
+ description: 'title on top of the component'
127
+ },
128
+ value: {
129
+ name: 'value',
130
+ control: {
131
+ type: 'number',
132
+ min: 0,
133
+ max: 100000000000000
134
+ },
135
+ description: 'value (title) '
136
+ },
137
+ arrowSign: {
138
+ name: 'arrowSign',
139
+ options: ['up', 'down'],
140
+ control: {
141
+ type: 'radio'
142
+ }
143
+ },
144
+ addingBenchmark: {
145
+ name: 'Add Benchmark',
146
+ control: {
147
+ type: 'boolean'
148
+ },
149
+ description: 'true/false - Adding Benchmark'
150
+ },
151
+ benchmarkTotalValue: {
152
+ name: 'benchmarkTotalValue',
153
+ control: {
154
+ type: 'number',
155
+ min: 0,
156
+ max: 100000000000000
157
+ },
158
+ description: 'benchmarkTotalValue - set total value of the benchmark'
159
+ },
160
+ benchmarkValue: {
161
+ name: 'benchmarkValue',
162
+ control: {
163
+ type: 'number',
164
+ min: 0,
165
+ max: 100000000000000
166
+ },
167
+ description: 'benchmarkValue - set total value of the benchmark delimeter line'
168
+ },
169
+ width: {
170
+ name: 'width',
171
+ control: {
172
+ type: 'text'
173
+ },
174
+ description: 'width of the control (in px)'
175
+ },
176
+ height: {
177
+ name: 'height',
178
+ control: {
179
+ type: 'text'
180
+ },
181
+ description: 'height of the control (in px)'
182
+ },
183
+ textcolor: {
184
+ name: 'textcolor',
185
+ description: 'Sets the text color',
186
+ control: {
187
+ type: 'color',
188
+ presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
189
+ }
190
+ },
191
+ areaChart1Color: {
192
+ name: 'areaChart1Color',
193
+ description: 'Sets the area chart 1 color',
194
+ control: {
195
+ type: 'color',
196
+ presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
197
+ }
198
+ },
199
+ areaChart2Color: {
200
+ name: 'areaChart2Color',
201
+ description: 'Sets the area chart 2 color',
202
+ control: {
203
+ type: 'color',
204
+ presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
205
+ }
206
+ },
207
+ fillChartColor: {
208
+ name: 'fillChartColor',
209
+ description: 'Sets the area chart fill color',
210
+ control: {
211
+ type: 'color',
212
+ presetColors: ['rgba(34, 158, 56, 0.20)']
213
+ }
214
+ },
215
+ startOffset: {
216
+ name: 'startOffset',
217
+ control: {
218
+ type: 'text'
219
+ },
220
+ description: 'start offset of the control (in %)'
221
+ },
222
+ endOffset: {
223
+ name: 'endOffset',
224
+ control: {
225
+ type: 'text'
226
+ },
227
+ description: 'end offset of the control (in %)'
228
+ },
229
+ areaChartData: {
230
+ description: 'array [] of objects: {title: string, value:number } to fill the area data. '
231
+ },
232
+ opacity: {
233
+ name: 'opacity',
234
+ control: {
235
+ type: 'text'
236
+ },
237
+ description: 'opacity of the control'
238
+ },
239
+ noDataText: {
240
+ name: 'noDataText',
241
+ control: {
242
+ type: 'text'
243
+ },
244
+ description: 'text to display when no data found'
245
+ },
246
+ xselectedColor: {
247
+ name: 'xselectedColor',
248
+ description: 'Sets the xselectedColor fill color',
249
+ control: {
250
+ type: 'color',
251
+ presetColors: ['rgba(144, 206, 156, 0.50)']
252
+ }
253
+ },
254
+ startWeekRange: {
255
+ name: 'startWeekRange',
256
+ control: {
257
+ type: 'text'
258
+ },
259
+ description: 'startWeekRange, for example "W24" '
260
+ },
261
+ endWeekRange: {
262
+ name: 'endWeekRange',
263
+ control: {
264
+ type: 'text'
265
+ },
266
+ description: 'endWeekRange, for example "W31" '
267
+ }
268
+ }
269
+ };
270
+ const SalesGrowth = exports.SalesGrowth = {
271
+ args: {
272
+ title: 'Sales Growth',
273
+ value: 15,
274
+ arrowSign: 'up',
275
+ benchmarkTotalValue: 20,
276
+ benchmarkValue: 10,
277
+ areaChartData: arrData,
278
+ width: '250px',
279
+ height: '280px',
280
+ textcolor: '#000',
281
+ areaChart1Color: '#BD9EFF',
282
+ areaChart2Color: '#96B4FF',
283
+ // fillChartColor: "rgba(34, 158, 56, 0.20)",
284
+ startOffset: '17.04%',
285
+ endOffset: '17.04%',
286
+ opacity: '191',
287
+ noDataText: 'The selected event is a TPR or has no offer, therefore there are no redemptions or redemption units to display.',
288
+ xselectedColor: '#90CE9C',
289
+ // '#42977A',
290
+ fillChart1Color: 'rgba(34, 158, 56, 0.20)',
291
+ fillChart2Color: 'rgba(34, 158, 56, 0.20)',
292
+ startWeekRange: '202323',
293
+ endWeekRange: '202329'
294
+ }
295
+ };
296
+ const SalesGrowthNegative = exports.SalesGrowthNegative = {
297
+ args: {
298
+ title: 'Sales Growth',
299
+ value: 30,
300
+ arrowSign: 'down',
301
+ benchmarkTotalValue: 40,
302
+ benchmarkValue: 20,
303
+ areaChartData: arrData,
304
+ width: '250px',
305
+ height: '280px',
306
+ textcolor: '#000',
307
+ areaChart1Color: '#BD9EFF',
308
+ areaChart2Color: '#96B4FF',
309
+ startOffset: '17.04%',
310
+ opacity: '191',
311
+ endOffset: '17.04%',
312
+ noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.',
313
+ xselectedColor: '#96B4FF',
314
+ fillChart1Color: 'rgba(56, 172, 255, 0.20)',
315
+ fillChart2Color: 'rgba(212, 192, 255, 0.20)',
316
+ startWeekRange: '202323',
317
+ endWeekRange: '202329'
318
+ }
319
+ };
320
+ const BetweenTwoYears = exports.BetweenTwoYears = {
321
+ args: {
322
+ title: 'Sales Growth',
323
+ value: 30,
324
+ arrowSign: 'down',
325
+ benchmarkTotalValue: 40,
326
+ benchmarkValue: 20,
327
+ areaChartData: arrDataBetweenTwoYears,
328
+ width: '250px',
329
+ height: '280px',
330
+ textcolor: '#000',
331
+ areaChart1Color: '#BD9EFF',
332
+ areaChart2Color: '#96B4FF',
333
+ startOffset: '17.04%',
334
+ opacity: '191',
335
+ endOffset: '17.04%',
336
+ noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.',
337
+ xselectedColor: '#96B4FF',
338
+ fillChart1Color: 'rgba(56, 172, 255, 0.20)',
339
+ fillChart2Color: 'rgba(212, 192, 255, 0.20)',
340
+ startWeekRange: '202356',
341
+ endWeekRange: '202405'
342
+ }
343
+ };
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.ValueAndBenchmarkContainer = exports.TooltipTitle = exports.TooltipLabel = exports.TooltipDiv = exports.TitleAndValueContainer = exports.Title = exports.FormattedValueNoDataMessage = exports.FormattedValue = exports.EventWeeksLegendTitle = exports.EventWeeksLegendMainContainer = exports.EventWeeksLegendDataElementsContainer = exports.EventWeeksLegendDataElement = exports.EventWeeksLegendContainer = exports.EventWeeksLegendColorRectangle = exports.DetailsRowArrowContainer = exports.CurrencySign = exports.ControlsContainer = exports.Controls = exports.BenchmarkContainer = exports.AreaChartContainer = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
9
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
10
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
11
+ 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 border-radius: 12px;\n min-width: 250px;\n"])), props => props.textColor, props => props.width, props => props.height);
12
+ const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n /* justify-content: space-between; */\n background: #ffffff;\n border-radius: 12px;\n flex-basis: 100%;\n"])));
13
+ const AreaChartContainer = exports.AreaChartContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: auto;\n width: 100%; \n height: 50%;\n"])));
14
+ const TooltipDiv = exports.TooltipDiv = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 5px;\n background: #ffffff;\n border-radius: 5px;\n padding: 8px 12px;\n display: grid;\n"])));
15
+ const TooltipLabel = exports.TooltipLabel = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-size: 14px;\n font-weight: 400;\n line-height: normal;\n width: fit-content;\n"])));
16
+ const TooltipTitle = exports.TooltipTitle = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-size: 14px;\n font-weight: 600;\n line-height: normal;\n"])));
17
+ const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n padding: 0 1rem;\n"])));
18
+ const Title = exports.Title = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n"])));
19
+ const ValueAndBenchmarkContainer = exports.ValueAndBenchmarkContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: center;\n"])));
20
+ const DetailsRowArrowContainer = exports.DetailsRowArrowContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: flex-end;\n width: 22px;\n margin-right: 5px;\n @media (max-width: 1366px) {\n width: 12px;\n }\n @media (max-width: 1536px) {\n width: 14px;\n }\n"])));
21
+ const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 40px;\n @media (max-width: 1366px) {\n font-size: 20px;\n }\n @media (max-width: 1536px) {\n font-size: 24px;\n }\n"])));
22
+ const CurrencySign = exports.CurrencySign = _styledComponents.default.span(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n"])));
23
+ const FormattedValueNoDataMessage = exports.FormattedValueNoDataMessage = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.3rem;\n font-weight: 700;\n font-size: 16px;\n margin: 0;\n"])));
24
+ const BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 1.5rem;\n"])));
25
+ const EventWeeksLegendMainContainer = exports.EventWeeksLegendMainContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n flex-direction: column;\n margin-top: 2px;\n align-items: center;\n"])));
26
+ const EventWeeksLegendContainer = exports.EventWeeksLegendContainer = _styledComponents.default.div(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n flex-direction: row;\n margin-top: 2px;\n align-items: center;\n"])));
27
+ const EventWeeksLegendTitle = exports.EventWeeksLegendTitle = _styledComponents.default.h4(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 14px;\n line-height: 14px;\n margin: 0 0 0 5px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
28
+ const EventWeeksLegendColorRectangle = exports.EventWeeksLegendColorRectangle = _styledComponents.default.div(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n width: 0.4rem;\n min-width: 0.4rem;\n height: 0.4rem;\n border-radius: 2px;\n background: ", ";\n"])), props => props.color);
29
+ const EventWeeksLegendDataElementsContainer = exports.EventWeeksLegendDataElementsContainer = _styledComponents.default.div(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin: 0px;\n align-items: center;\n justify-content: space-around;\n width: 90%;\n"])));
30
+ const EventWeeksLegendDataElement = exports.EventWeeksLegendDataElement = _styledComponents.default.h4(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n font-weight: 400;\n font-size: 10px;\n line-height: 11px;\n margin: 0px;\n width: 100%;\n justify-content: center;\n align-content: center;\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n background: ", ";\n @media (max-width: 1536px) {\n font-size: 9px;\n }\n @media (max-width: 1366px) {\n font-size: 8px;\n }\n"])), props => props.borderLeftRadius, props => props.borderLeftRadius, props => props.borderRightRadius, props => props.borderRightRadius, props => props.color);
@@ -0,0 +1,149 @@
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.TotalBenchmarkArrows = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _ArrowUpIcon = require("../../icons/ArrowUpIcon");
10
+ var _ArrowDownIcon = require("../../icons/ArrowDownIcon");
11
+ var _NoDataFoundMessage = require("../NoDataFoundMessage/NoDataFoundMessage");
12
+ var _CommonFunctions = require("../../utils/CommonFunctions");
13
+ var _Benchmark = require("../Benchmark/Benchmark");
14
+ var _TotalBenchmarkArrows = require("./TotalBenchmarkArrows.style");
15
+ /* TotalBenchmarkArrows */
16
+ const TotalBenchmarkArrows = props => {
17
+ const {
18
+ title,
19
+ value,
20
+ addingBenchmark,
21
+ benchmarkTotalValue,
22
+ benchmarkValue,
23
+ detailsTitle,
24
+ detailsData,
25
+ dotCut,
26
+ width,
27
+ height,
28
+ textcolor,
29
+ noDataText
30
+ } = props;
31
+ const DEFAULT_ROOT_FONT = 16;
32
+ const DEFAULT_COMPONENT_WIDTH = 250;
33
+ const DEFAULT_COMPONENT_HEIGHT = 280;
34
+ const [rootFont, setRootFont] = (0, _react.useState)(DEFAULT_ROOT_FONT.toString().concat('', 'px'));
35
+ const [heightFactor, setHeightFactor] = (0, _react.useState)(1);
36
+ const controlsContainerRef = (0, _react.useRef)();
37
+ (0, _react.useEffect)(() => {
38
+ const {
39
+ offsetWidth
40
+ } = controlsContainerRef.current;
41
+ setRootFont(getRootFont(offsetWidth));
42
+ }, [width]);
43
+ (0, _react.useEffect)(() => {
44
+ const {
45
+ offsetHeight
46
+ } = controlsContainerRef.current;
47
+ const factor = offsetHeight / DEFAULT_COMPONENT_HEIGHT;
48
+ setHeightFactor(factor);
49
+ }, [height]);
50
+ const getRootFont = width => {
51
+ const relation = width.toString().replace('px', '').replace('%', '') / DEFAULT_COMPONENT_WIDTH;
52
+ const fontRoot = (DEFAULT_ROOT_FONT * relation).toString().concat('', 'px');
53
+ return fontRoot;
54
+ };
55
+ const getSizeFactor = () => rootFont.toString().replace('px', '') / DEFAULT_ROOT_FONT;
56
+ const getArrowSign = arrowSign => {
57
+ if (!arrowSign) {
58
+ return '';
59
+ }
60
+ if (arrowSign === 'up') {
61
+ return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.DetailsRowArrowContainer, {
62
+ id: "DetailsRowArrowContainer",
63
+ value: value,
64
+ height: 12 * getSizeFactor()
65
+ }, /*#__PURE__*/_react.default.createElement(_ArrowUpIcon.ArrowUpIcon, {
66
+ width: 12 * getSizeFactor(),
67
+ height: 12 * getSizeFactor()
68
+ }));
69
+ }
70
+ return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.DetailsRowArrowContainer, {
71
+ id: "DetailsRowArrowContainer",
72
+ value: value,
73
+ height: 12 * getSizeFactor()
74
+ }, /*#__PURE__*/_react.default.createElement(_ArrowDownIcon.ArrowDownIcon, {
75
+ width: 12 * getSizeFactor(),
76
+ height: 12 * getSizeFactor()
77
+ }));
78
+ };
79
+ return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.ControlsContainer, {
80
+ id: "ControlsContainer",
81
+ height: height,
82
+ width: width,
83
+ textcolor: textcolor,
84
+ ref: controlsContainerRef
85
+ }, (detailsData === null || detailsData === void 0 ? void 0 : detailsData.length) > 0 ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.Controls, {
86
+ id: "Controls"
87
+ }, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.Title, {
88
+ id: "Title"
89
+ }, title), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.ValueAndBenchmarkContainer, {
90
+ id: "ValueAndBenchmarkContainer"
91
+ }, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.FormattedValue, {
92
+ id: "FormattedValue"
93
+ }, value !== undefined && value != null && dotCut ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value), value !== undefined && value != null && dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ''), addingBenchmark && benchmarkTotalValue ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.BenchmarkContainer, {
94
+ id: "BenchmarkContainer"
95
+ }, /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
96
+ totalValue: benchmarkTotalValue,
97
+ currentValue: value !== null && value !== void 0 ? value : 0,
98
+ benchmarkValue: benchmarkValue !== null && benchmarkValue !== void 0 ? benchmarkValue : 0,
99
+ height: 12 * getSizeFactor(),
100
+ width: 85 * getSizeFactor(),
101
+ color: "#79DB95",
102
+ linearGradientColor: "#C3EFD0",
103
+ linearGradientUnderAvarageColor: "#FDB1B1",
104
+ underAvarageColor: "#FD5959",
105
+ backgroundColor: "#F2F2F2"
106
+ })) : ''), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.DetailsContainer, {
107
+ id: "DetailsContainer"
108
+ }, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.DetailsTitle, {
109
+ id: "DetailsTitle"
110
+ }, detailsTitle), detailsData.map(item => /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.DetailsRowContainer, {
111
+ id: "DetailsRowContainer",
112
+ key: item.title
113
+ }, item.value !== undefined && item.value != null ? getArrowSign(item.value >= 0 ? 'up' : 'down') : '', /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.DetailsRowFormattedValue, {
114
+ id: "DetailsRowFormattedValue"
115
+ }, item.value !== undefined && item.value != null ? Math.abs(item.value) : ''), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.DetailsRowPercentSign, {
116
+ id: "DetailsRowPercentSign"
117
+ }, item.value !== undefined && item.value != null ? ' % ' : ''), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.DetailsRowFormattedValueNoDataMessage, {
118
+ id: "DetailsRowFormattedValueNoDataMessage"
119
+ }, item.value === undefined || item.value === null ? 'No Data' : ''), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrows.DetailsRowTitle, {
120
+ id: "DetailsRowTitle"
121
+ }, item.title))))) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
122
+ noDataText: noDataText
123
+ }));
124
+ };
125
+ exports.TotalBenchmarkArrows = TotalBenchmarkArrows;
126
+ var _default = exports.default = TotalBenchmarkArrows;
127
+ TotalBenchmarkArrows.defaultProps = {
128
+ title: 'Title',
129
+ value: 100,
130
+ addingBenchmark: 200,
131
+ benchmarkTotalValue: 300,
132
+ benchmarkValue: 400,
133
+ detailsTitle: '',
134
+ detailsData: [{
135
+ title: 'Basket (Units) Change',
136
+ value: null
137
+ }, {
138
+ title: 'Basket ($) Change',
139
+ value: 30
140
+ }, {
141
+ title: 'Visits Change',
142
+ value: 30
143
+ }],
144
+ dotCut: true,
145
+ width: '250px',
146
+ height: '280px',
147
+ textcolor: '#212121',
148
+ noDataText: ''
149
+ };
@@ -0,0 +1,172 @@
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.LessAvarage = exports.GreaterAvarage = exports.DataWithNulls = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _TotalBenchmarkArrows = require("./TotalBenchmarkArrows");
10
+ const arrDetailsData = [{
11
+ title: 'Basket Change',
12
+ value: 16
13
+ }, {
14
+ title: 'Visits Change',
15
+ value: -5
16
+ }];
17
+ const arrDetailsDataUp = [{
18
+ title: 'Basket Change',
19
+ value: 50
20
+ }, {
21
+ title: 'Visits Change',
22
+ value: 30
23
+ }];
24
+ const arrDetailsDataWithNulls = [{
25
+ title: 'Basket (Units) Change',
26
+ value: null
27
+ }, {
28
+ title: 'Basket ($) Change',
29
+ value: 30
30
+ }, {
31
+ title: 'Visits Change',
32
+ value: 30
33
+ }];
34
+ var _default = exports.default = {
35
+ title: 'SAG BI/TotalBenchmarkArrows',
36
+ component: _TotalBenchmarkArrows.TotalBenchmarkArrows,
37
+ tags: ['autodocs'],
38
+ argTypes: {
39
+ dotCut: {
40
+ name: 'dotCut',
41
+ control: {
42
+ type: 'boolean'
43
+ },
44
+ description: 'true/false - format total value with dot cut'
45
+ },
46
+ title: {
47
+ name: 'title',
48
+ control: {
49
+ type: 'text'
50
+ },
51
+ description: 'title on top of the component'
52
+ },
53
+ value: {
54
+ name: 'value',
55
+ control: {
56
+ type: 'number',
57
+ min: 0,
58
+ max: 100000000000000
59
+ },
60
+ description: 'value (title) '
61
+ },
62
+ addingBenchmark: {
63
+ name: 'Add Benchmark',
64
+ control: {
65
+ type: 'boolean'
66
+ },
67
+ description: 'true/false - Adding Benchmark'
68
+ },
69
+ benchmarkTotalValue: {
70
+ name: 'benchmarkTotalValue',
71
+ control: {
72
+ type: 'number',
73
+ min: 0,
74
+ max: 100000000000000
75
+ },
76
+ description: 'benchmarkTotalValue - set total value of the benchmark'
77
+ },
78
+ benchmarkValue: {
79
+ name: 'benchmarkValue',
80
+ control: {
81
+ type: 'number',
82
+ min: 0,
83
+ max: 100000000000000
84
+ },
85
+ description: 'benchmarkValue - set total value of the benchmark delimeter line'
86
+ },
87
+ detailsTitle: {
88
+ name: 'detailsTitle',
89
+ control: {
90
+ type: 'text'
91
+ },
92
+ description: 'title on top of the details'
93
+ },
94
+ width: {
95
+ name: 'width',
96
+ control: {
97
+ type: 'text'
98
+ },
99
+ description: 'width of the control (in px)'
100
+ },
101
+ height: {
102
+ name: 'height',
103
+ control: {
104
+ type: 'text'
105
+ },
106
+ description: 'height of the control (in px)'
107
+ },
108
+ textcolor: {
109
+ name: 'textcolor',
110
+ description: 'Sets the text color',
111
+ control: {
112
+ type: 'color',
113
+ presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
114
+ }
115
+ },
116
+ detailsData: {
117
+ description: 'array [] of objects: {title: string, value:number } to fill the details data. value can be negative '
118
+ },
119
+ noDataText: {
120
+ name: 'noDataText',
121
+ control: {
122
+ type: 'text'
123
+ },
124
+ description: 'text to display when no data found'
125
+ }
126
+ }
127
+ };
128
+ const LessAvarage = exports.LessAvarage = {
129
+ args: {
130
+ title: 'New Repeaters',
131
+ value: 21500,
132
+ benchmarkTotalValue: 60000,
133
+ benchmarkValue: 30000,
134
+ detailsTitle: 'Existing Repeaters',
135
+ detailsData: arrDetailsData,
136
+ dotCut: true,
137
+ width: '310px',
138
+ height: '280px',
139
+ textcolor: '#212121',
140
+ noDataText: 'The selected event is a TPR or has no offer, therefore there are no redemptions or redemption units to display.'
141
+ }
142
+ };
143
+ const GreaterAvarage = exports.GreaterAvarage = {
144
+ args: {
145
+ title: 'New Repeaters',
146
+ value: 50500,
147
+ benchmarkTotalValue: 60000,
148
+ benchmarkValue: 30000,
149
+ detailsTitle: 'Existing Repeaters',
150
+ detailsData: arrDetailsDataUp,
151
+ dotCut: true,
152
+ width: '310px',
153
+ height: '280px',
154
+ textcolor: '#212121',
155
+ noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.'
156
+ }
157
+ };
158
+ const DataWithNulls = exports.DataWithNulls = {
159
+ args: {
160
+ title: 'New Repeaters',
161
+ value: 50500,
162
+ benchmarkTotalValue: 60000,
163
+ benchmarkValue: 30000,
164
+ detailsTitle: 'Existing Repeaters',
165
+ detailsData: arrDetailsDataWithNulls,
166
+ dotCut: true,
167
+ width: '310px',
168
+ height: '280px',
169
+ textcolor: '#212121',
170
+ noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.'
171
+ }
172
+ };