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,290 @@
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.TotalCost5rows = exports.TotalCost3rows = exports.TotalCost = exports.SwitchersPatternPercent = exports.HideTitleAndValue = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _TotalDoughnutChart = require("./TotalDoughnutChart");
10
+ const arrLegendData = [{
11
+ name: 'Package Cost',
12
+ value: 30000,
13
+ color: '#85A1D2'
14
+ }, {
15
+ name: 'Redemption Cost',
16
+ value: 6500,
17
+ color: '#9AE6FF'
18
+ }];
19
+ const arrLegendDat3rows = [{
20
+ name: 'Package Cost',
21
+ value: 30000,
22
+ color: '#85A1D2'
23
+ }, {
24
+ name: 'Existing Redeemers',
25
+ value: 6500,
26
+ color: '#9AE6FF'
27
+ }, {
28
+ name: 'Others',
29
+ value: 20000,
30
+ color: '#FD5959'
31
+ }];
32
+ const arrLegendDat5rows = [{
33
+ name: 'Food Lion',
34
+ value: null,
35
+ color: '#066768'
36
+ }, {
37
+ name: 'Hannaford',
38
+ value: null,
39
+ color: '#82B3B4'
40
+ }, {
41
+ name: 'The Giant Company',
42
+ value: undefined,
43
+ color: '#90CE9C'
44
+ }
45
+ // { name: 'Giant Food', value: 200.68474, color: '#5FCC70' },
46
+ // { name: 'Stop&Shop', value: 250.9687458, color: '#229E38' },
47
+ ];
48
+ const arrLegendPercent = [{
49
+ color: '#066768',
50
+ name: 'None Switcher',
51
+ value: 40.3
52
+ }, {
53
+ color: '#82B3B4',
54
+ name: 'From Other Products',
55
+ value: 19.7
56
+ }, {
57
+ color: '#90CE9C',
58
+ name: 'From Other Supplier Brand',
59
+ value: 25.31111
60
+ }, {
61
+ color: '#5FCC70',
62
+ name: 'From other Suppliers',
63
+ value: 14.59999
64
+ }];
65
+ var _default = exports.default = {
66
+ title: 'SAG BI/TotalDoughnutChart',
67
+ component: _TotalDoughnutChart.TotalDoughnutChart,
68
+ tags: ['autodocs'],
69
+ id: 'TotalDoughnutChart',
70
+ parameters: {
71
+ design: {
72
+ type: 'figspec',
73
+ accessToken: 'figd_vlq2HLcwzTQLvrhLrFWY_Be8CqbuyKcltE9oyHnR'
74
+ }
75
+ },
76
+ argTypes: {
77
+ title: {
78
+ name: 'Title',
79
+ control: {
80
+ type: 'text'
81
+ },
82
+ description: 'title on top of the component'
83
+ },
84
+ value: {
85
+ name: 'Value',
86
+ control: {
87
+ type: 'number',
88
+ min: 0,
89
+ max: 100000000000000
90
+ },
91
+ description: 'value (total) '
92
+ },
93
+ addingBenchmark: {
94
+ name: 'Add Benchmark',
95
+ control: {
96
+ type: 'boolean'
97
+ },
98
+ description: 'true/false - Adding Benchmark'
99
+ },
100
+ dotCut: {
101
+ name: 'Dot Cut',
102
+ control: {
103
+ type: 'boolean'
104
+ },
105
+ description: 'true/false - format total value with dot cut'
106
+ },
107
+ currencySign: {
108
+ name: 'Currency',
109
+ control: {
110
+ type: 'boolean'
111
+ },
112
+ description: 'true/false - show/hide currency sign before total value'
113
+ },
114
+ currencyType: {
115
+ name: 'Currency Type',
116
+ options: ['USD', 'EUR', 'ILS', 'GBP', 'JPY'],
117
+ control: {
118
+ type: 'select'
119
+ }
120
+ },
121
+ width: {
122
+ name: 'width',
123
+ control: {
124
+ type: 'text'
125
+ },
126
+ description: 'width of the control (in px / %)'
127
+ },
128
+ height: {
129
+ name: 'height',
130
+ control: {
131
+ type: 'text'
132
+ },
133
+ description: 'height of the control (in px / %)'
134
+ },
135
+ textcolor: {
136
+ name: 'Text Color',
137
+ description: 'Sets the text color',
138
+ control: {
139
+ type: 'color',
140
+ presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
141
+ }
142
+ },
143
+ legendData: {
144
+ name: 'Legend Data',
145
+ description: 'array [] of objects: {displayName: string, value:number} to fill the pie chart, Please NOTE: the name have to be uniq '
146
+ },
147
+ itemsPercentagesValueAside: {
148
+ default: false,
149
+ name: 'Show Percentages value aside',
150
+ control: {
151
+ type: 'boolean'
152
+ },
153
+ description: 'true/false - Show Percentages value aside the item value'
154
+ },
155
+ itemsBoldedValues: {
156
+ default: true,
157
+ name: 'Items bolded values',
158
+ control: {
159
+ type: 'boolean'
160
+ },
161
+ description: 'true/false - Make the value text bolded'
162
+ },
163
+ itemsValuesSeparateLine: {
164
+ default: false,
165
+ name: 'Items values in a new line',
166
+ control: {
167
+ type: 'boolean'
168
+ },
169
+ description: 'true/false - Locate the value to a new line'
170
+ },
171
+ noDataText: {
172
+ name: 'No Data text',
173
+ control: {
174
+ type: 'text'
175
+ },
176
+ description: 'text to display when no data found'
177
+ },
178
+ isPercent: {
179
+ default: false,
180
+ name: 'isPercent',
181
+ control: {
182
+ type: 'boolean'
183
+ },
184
+ description: 'true/false - isPercent'
185
+ },
186
+ hideTitleAndValue: {
187
+ default: false,
188
+ name: 'hideTitleAndValue',
189
+ control: {
190
+ type: 'boolean'
191
+ },
192
+ description: 'true/false - isPercent'
193
+ },
194
+ textAfterValue: {
195
+ name: 'textAfterValue',
196
+ control: {
197
+ type: 'text'
198
+ },
199
+ description: 'text After Value'
200
+ }
201
+ }
202
+ };
203
+ const TotalCost = exports.TotalCost = {
204
+ args: {
205
+ title: 'Total Cost',
206
+ value: 36500,
207
+ addingBenchmark: false,
208
+ dotCut: true,
209
+ currencySign: true,
210
+ currencyType: 'USD',
211
+ legendData: arrLegendData,
212
+ textcolor: '#212121',
213
+ noDataText: 'The selected event is a TPR or has no offer, therefore there are no redemptions or redemption units to display.',
214
+ height: '100%',
215
+ width: '100%',
216
+ isPercent: false,
217
+ hideTitleAndValue: false,
218
+ textAfterValue: ''
219
+ }
220
+ };
221
+ const TotalCost3rows = exports.TotalCost3rows = {
222
+ args: {
223
+ title: 'Total Cost',
224
+ value: 56500,
225
+ addingBenchmark: false,
226
+ dotCut: true,
227
+ currencySign: true,
228
+ currencyType: 'USD',
229
+ legendData: arrLegendDat3rows,
230
+ textcolor: '#212121',
231
+ noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.',
232
+ hideTitleAndValue: false,
233
+ textAfterValue: ''
234
+ }
235
+ };
236
+ const TotalCost5rows = exports.TotalCost5rows = {
237
+ args: {
238
+ title: 'Total Cost',
239
+ value: 565.25487,
240
+ addingBenchmark: false,
241
+ dotCut: true,
242
+ currencySign: true,
243
+ currencyType: 'USD',
244
+ legendData: arrLegendDat5rows,
245
+ width: '360px',
246
+ height: '410px',
247
+ textcolor: '#212121',
248
+ noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.',
249
+ hideTitleAndValue: false,
250
+ textAfterValue: ''
251
+ }
252
+ };
253
+ const SwitchersPatternPercent = exports.SwitchersPatternPercent = {
254
+ args: {
255
+ title: 'Switchers Pattern',
256
+ value: 565000,
257
+ addingBenchmark: false,
258
+ dotCut: true,
259
+ currencySign: true,
260
+ currencyType: 'USD',
261
+ legendData: arrLegendPercent,
262
+ width: '360px',
263
+ height: '410px',
264
+ textcolor: '#212121',
265
+ noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.',
266
+ isPercent: true,
267
+ itemsValuesSeparateLine: true,
268
+ hideTitleAndValue: false,
269
+ textAfterValue: '30% out of $400K actual sales'
270
+ }
271
+ };
272
+ const HideTitleAndValue = exports.HideTitleAndValue = {
273
+ args: {
274
+ title: 'Switchers Pattern',
275
+ value: 565000,
276
+ addingBenchmark: false,
277
+ dotCut: true,
278
+ currencySign: true,
279
+ currencyType: 'USD',
280
+ legendData: arrLegendPercent,
281
+ width: '360px',
282
+ height: '210px',
283
+ textcolor: '#212121',
284
+ noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.',
285
+ isPercent: true,
286
+ itemsValuesSeparateLine: true,
287
+ hideTitleAndValue: true,
288
+ textAfterValue: ''
289
+ }
290
+ };
@@ -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.TooltipLabel = exports.TooltipDiv = exports.TitleAndValueContainer = exports.Title = exports.TextAfterValue = exports.LegendTitleAndFormatedValueContainer = exports.LegendTitle = exports.LegendFormattedValue = exports.LegendFormatedValueContainer = exports.LegendControlsContainer = exports.LegendContainer = exports.LegendColorRectangle = exports.FormattedValue = exports.DoughnutChartContainer = exports.DoughnutChartAndLegendContainer = exports.CurrencySignAndFormattedValueContainer = exports.CurrencySign = exports.ControlsContainer = exports.Controls = 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;
11
+ const scrollableStyles = "\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n width: 8px;\n }\n\n &::-webkit-scrollbar-track {\n background: #E8E8E8;\n border-radius: 5px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #D0D0D0;\n border-radius: 5px;\n }\n";
12
+ const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: ", ";\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n display: flex;\n align-items: center;\n @media (max-width: 1536px) {\n ", "\n }\n\n > * {\n box-sizing: border-box;\n }\n"])), props => props.rootFont, props => props.textColor, props => props.width, props => props.height, scrollableStyles);
13
+ const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: white;\n border-radius: 12px; \n"])));
14
+ const TooltipDiv = exports.TooltipDiv = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n background: white;\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n border-radius: 5px;\n padding: 6px 10px;\n margin: 0;\n"])));
15
+ const TooltipLabel = exports.TooltipLabel = _styledComponents.default.p(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: \"Poppins\", sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n width: max-content; // fit-content;\n line-height: normal;\n margin: 0;\n"])));
16
+ const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n padding: 0 20px;\n"])));
17
+ const Title = exports.Title = _styledComponents.default.h4(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n margin: 0;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
18
+ const CurrencySignAndFormattedValueContainer = exports.CurrencySignAndFormattedValueContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap: 5px;\n align-items: baseline;\n"])));
19
+ const CurrencySign = exports.CurrencySign = _styledComponents.default.span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 11px;\n }\n"])));
20
+ const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 40px;\n @media (max-width: 1536px) {\n font-size: 24px;\n }\n @media (max-width: 1366px) {\n font-size: 20px;\n }\n"])));
21
+ const TextAfterValue = exports.TextAfterValue = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)([" \n font-weight: 400;\n font-size: 12px;\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])));
22
+ const DoughnutChartAndLegendContainer = exports.DoughnutChartAndLegendContainer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n margin-top: auto;\n padding: 0 20px ;\n margin-bottom: 20px; \n"])));
23
+ const DoughnutChartContainer = exports.DoughnutChartContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center; \n min-width: 90px;\n min-height: 90px; \n"])));
24
+ const LegendContainer = exports.LegendContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 10px;\n display: flex;\n flex-direction: column;\n justify-content: space-evenly; \n"])));
25
+ const LegendControlsContainer = exports.LegendControlsContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 0.5rem;\n align-items: center;\n margin-bottom: 0.375rem;\n"])));
26
+ const LegendTitleAndFormatedValueContainer = exports.LegendTitleAndFormatedValueContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n flex-grow: 1;\n"])));
27
+ const LegendFormatedValueContainer = exports.LegendFormatedValueContainer = _styledComponents.default.div(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 0.875rem;\n"])));
28
+ const LegendColorRectangle = exports.LegendColorRectangle = _styledComponents.default.div(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n width: 0.875rem;\n min-width: 0.875rem;\n height: 0.875rem;\n border-radius: 2px;\n background: ", ";\n"])), props => props.color);
29
+ const LegendTitle = exports.LegendTitle = _styledComponents.default.h5(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 16px;\n gap: 5px;\n margin: 0;\n display: flex;\n justify-content: space-between;\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])));
30
+ const LegendFormattedValue = exports.LegendFormattedValue = _styledComponents.default.span(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n white-space: nowrap;\n"])));
@@ -0,0 +1,207 @@
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 = exports.TotalHorizontalCharts = void 0;
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _recharts = require("recharts");
11
+ var _TspanTooltip = _interopRequireDefault(require("../TspanTooltip/TspanTooltip"));
12
+ var _NoDataFoundMessage = require("../NoDataFoundMessage/NoDataFoundMessage");
13
+ var _CommonFunctions = require("../../utils/CommonFunctions");
14
+ var _TotalHorizontalCharts = require("./TotalHorizontalCharts.style");
15
+ const TotalHorizontalCharts = props => {
16
+ const {
17
+ title,
18
+ value,
19
+ dotCut,
20
+ currencySign,
21
+ currencyType,
22
+ width,
23
+ height,
24
+ rightGap,
25
+ textColor,
26
+ chartsData,
27
+ noDataText,
28
+ isDollar,
29
+ isPercentage,
30
+ showDollarSign
31
+ } = props;
32
+ const barBackgrounds = chartsData.map(bg => bg.color);
33
+ const [widthChartContainer, setWidthChartContainer] = (0, _react.useState)(0);
34
+ const [heightChartContainer, setHeightChartContainer] = (0, _react.useState)(0);
35
+ const chartContainerRef = (0, _react.useRef)();
36
+ const [showLegendTooltip, setShowLegendTooltip] = (0, _react.useState)(false);
37
+ const [tooltipText, setTooltipText] = (0, _react.useState)({
38
+ content: '',
39
+ clientX: 0,
40
+ clientY: 0
41
+ });
42
+ (0, _react.useEffect)(() => {
43
+ if (chartContainerRef.current) {
44
+ setWidthChartContainer(chartContainerRef.current.clientWidth);
45
+ setHeightChartContainer(chartContainerRef.current.clientHeight);
46
+ }
47
+ }, [width, height]);
48
+ const displayFormattedValue = value => {
49
+ if (!value) return '';
50
+ let formattedValue = '';
51
+ formattedValue = !isDollar ? ''.concat((0, _CommonFunctions.getFormattedValue)(value), isPercentage ? '%' : (0, _CommonFunctions.getFormattedUnits)(value)) : ''.concat(showDollarSign ? '$' : '', (0, _CommonFunctions.getFormattedValue)(value), (0, _CommonFunctions.getFormattedUnits)(value));
52
+ return formattedValue;
53
+ };
54
+ const CustomizedLabel = props => {
55
+ const {
56
+ x,
57
+ y,
58
+ width,
59
+ height,
60
+ stroke,
61
+ value
62
+ } = props;
63
+ return /*#__PURE__*/_react.default.createElement("text", {
64
+ x: x + (width <= 0 ? -12 : width) + 40,
65
+ y: y + 4,
66
+ dy: height / 2,
67
+ dx: -8,
68
+ fill: stroke,
69
+ fontSize: 12,
70
+ textAnchor: "middle"
71
+ }, displayFormattedValue(value));
72
+ };
73
+ const CustomizedTickBarChart = props => {
74
+ const {
75
+ x,
76
+ y,
77
+ height,
78
+ payload,
79
+ fill,
80
+ orientation,
81
+ stroke
82
+ } = props;
83
+ const handleMouseEnter = content => {
84
+ setTooltipText(prevState => ({
85
+ ...prevState,
86
+ content: content !== prevState.content ? content : prevState.content,
87
+ clientX: x / 1.2,
88
+ clientY: y - 20
89
+ }));
90
+ setShowLegendTooltip(true);
91
+ };
92
+ const handleMouseLeave = () => {
93
+ if (showLegendTooltip === false) return;
94
+ setTimeout(() => {
95
+ setShowLegendTooltip(false);
96
+ }, 1200);
97
+ };
98
+ if (chartsData && chartsData.length > 0 && payload) {
99
+ const chartsDataLabel = chartsData.filter(item => item.name === payload.value);
100
+ if (chartsDataLabel && chartsDataLabel.length > 0) {
101
+ return /*#__PURE__*/_react.default.createElement("g", {
102
+ onMouseEnter: () => handleMouseEnter(payload.value),
103
+ onMouseLeave: handleMouseLeave
104
+ }, /*#__PURE__*/_react.default.createElement("text", {
105
+ style: {
106
+ whiteSpace: 'nowrap'
107
+ },
108
+ width: "15px",
109
+ height: height,
110
+ x: 20,
111
+ y: y,
112
+ fontSize: 10,
113
+ orientation: orientation,
114
+ stroke: stroke,
115
+ textAnchor: "start"
116
+ // verticalAnchor="middle"
117
+ ,
118
+ fill: fill
119
+ }, payload.value.length > 11 ? "".concat(payload.value.slice(0, 11), "...") : payload.value));
120
+ }
121
+ return null;
122
+ }
123
+ return null;
124
+ };
125
+ return /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.ControlsContainer, {
126
+ height: height,
127
+ width: width,
128
+ textColor: textColor
129
+ }, (chartsData === null || chartsData === void 0 ? void 0 : chartsData.length) > 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.TitleAndValueContainer, {
130
+ id: "TitleAndValueContainer"
131
+ }, /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.Header, null, /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.Title, null, title), /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.FormattedValue, {
132
+ id: "FormattedValue"
133
+ }, /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.CurrencySign, {
134
+ id: "CurrencySign"
135
+ }, 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, {
136
+ ref: chartContainerRef
137
+ }, /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
138
+ height: heightChartContainer - 10,
139
+ width: widthChartContainer
140
+ }, /*#__PURE__*/_react.default.createElement(_recharts.ComposedChart, {
141
+ width: widthChartContainer * 0.4,
142
+ layout: "vertical",
143
+ data: chartsData,
144
+ margin: {
145
+ top: 10,
146
+ right: 20,
147
+ bottom: 50,
148
+ left: 10
149
+ }
150
+ }, /*#__PURE__*/_react.default.createElement(_recharts.XAxis, {
151
+ type: "number",
152
+ domain: [0, dataMax => dataMax * rightGap],
153
+ allowDataOverflow: true,
154
+ hide: true
155
+ }), /*#__PURE__*/_react.default.createElement(_recharts.YAxis, {
156
+ dataKey: "name",
157
+ type: "category",
158
+ width: widthChartContainer * 0.3,
159
+ tickLine: false,
160
+ interval: 0,
161
+ allowDataOverflow: true,
162
+ axisLine: false
163
+ // tick={{ fontSize: 12 }}
164
+ ,
165
+ tick: CustomizedTickBarChart
166
+ }), /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
167
+ dataKey: "value",
168
+ barSize: 20,
169
+ fill: "#8884d8",
170
+ barCategoryGap: 0,
171
+ barGap: 5
172
+ }, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
173
+ dataKey: "value",
174
+ content: CustomizedLabel
175
+ }), chartsData.map((entry, index) => /*#__PURE__*/_react.default.createElement(_recharts.Cell, {
176
+ key: "cell-".concat(index),
177
+ fill: barBackgrounds[index % 20]
178
+ }))), showLegendTooltip && /*#__PURE__*/_react.default.createElement(_TspanTooltip.default, {
179
+ direction: "top",
180
+ content: tooltipText.content,
181
+ top: tooltipText.clientY,
182
+ left: tooltipText.clientX,
183
+ style: {
184
+ pointerEvents: 'none'
185
+ }
186
+ })))))) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
187
+ noDataText: noDataText
188
+ }));
189
+ };
190
+ exports.TotalHorizontalCharts = TotalHorizontalCharts;
191
+ var _default = exports.default = TotalHorizontalCharts;
192
+ TotalHorizontalCharts.defaultProps = {
193
+ title: 'SALES',
194
+ value: 0,
195
+ dotCut: false,
196
+ currencySign: false,
197
+ currencyType: 'USD',
198
+ chartsData: [],
199
+ isDollar: true,
200
+ isPercentage: false,
201
+ showDollarSign: true,
202
+ width: '100%',
203
+ height: '100%',
204
+ rightGap: 1.25,
205
+ textColor: '#212121',
206
+ noDataText: 'No Data'
207
+ };
@@ -0,0 +1,158 @@
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.SalesGreenTheme = exports.SalesBlueTheme = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _TotalHorizontalCharts = _interopRequireDefault(require("./TotalHorizontalCharts"));
10
+ const chartsData1 = [{
11
+ name: 'MTN DEW GE-SODA',
12
+ value: 166898.22,
13
+ color: 'rgba(31, 118, 119, 0.6)'
14
+ }, {
15
+ name: 'CHEETOS GE-CHIPS, SNACKS',
16
+ value: 33380.98,
17
+ color: 'rgba(31, 118, 119, 0.9)'
18
+ }, {
19
+ name: 'CHEETOS SNACKING',
20
+ value: 12940.18,
21
+ color: 'rgba(31, 118, 119, 0.8)'
22
+ }, {
23
+ name: 'LAMB WESTON FF-POTATOES ONIONS',
24
+ value: -666828.24,
25
+ color: 'rgba(31, 118, 119, 0.7)'
26
+ }];
27
+ const chartsData2 = [{
28
+ name: 'Lysoe',
29
+ value: 52795.7313,
30
+ color: 'rgba(94, 101, 238, 0.1)'
31
+ }, {
32
+ name: 'Ensueno',
33
+ value: 29792.315,
34
+ color: 'rgba(94, 101, 238, 0.2)'
35
+ }, {
36
+ name: 'Starbucks Frappuccino',
37
+ value: 20,
38
+ color: 'rgba(94, 101, 238, 0.3)'
39
+ }, {
40
+ name: 'Pringles',
41
+ value: 15,
42
+ color: 'rgba(94, 101, 238, 0.4)'
43
+ }, {
44
+ name: 'Chunky Bowls',
45
+ value: 10,
46
+ color: 'rgba(94, 101, 238, 0.4)'
47
+ }];
48
+ var _default = exports.default = {
49
+ title: 'SAG BI/TotalHorizontalCharts',
50
+ component: _TotalHorizontalCharts.default,
51
+ tags: ['autodocs'],
52
+ parameters: {
53
+ design: {
54
+ type: 'figspec',
55
+ accessToken: 'figd_vlq2HLcwzTQLvrhLrFWY_Be8CqbuyKcltE9oyHnR'
56
+ }
57
+ },
58
+ argTypes: {
59
+ title: {
60
+ name: 'Title',
61
+ control: {
62
+ type: 'text'
63
+ },
64
+ description: 'title on top of the component'
65
+ },
66
+ value: {
67
+ name: 'Value',
68
+ control: {
69
+ type: 'number',
70
+ min: 0,
71
+ max: 100000000000000
72
+ },
73
+ description: 'value (total) '
74
+ },
75
+ dotCut: {
76
+ name: 'Dot Cut',
77
+ control: {
78
+ type: 'boolean'
79
+ },
80
+ description: 'true/false - format total value with dot cut'
81
+ },
82
+ currencySign: {
83
+ name: 'Currency',
84
+ control: {
85
+ type: 'boolean'
86
+ },
87
+ description: 'true/false - show/hide currency sign before total value'
88
+ },
89
+ currencyType: {
90
+ name: 'Currency Type',
91
+ options: ['USD', 'EUR', 'ILS', 'GBP', 'JPY'],
92
+ control: {
93
+ type: 'select'
94
+ }
95
+ },
96
+ width: {
97
+ name: 'width',
98
+ control: {
99
+ type: 'text'
100
+ },
101
+ description: 'width of the control (in px / %)'
102
+ },
103
+ height: {
104
+ name: 'height',
105
+ control: {
106
+ type: 'text'
107
+ },
108
+ description: 'height of the control (in px / %)'
109
+ },
110
+ textColor: {
111
+ name: 'Text Color',
112
+ description: 'Sets the text color',
113
+ control: {
114
+ type: 'color',
115
+ presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
116
+ }
117
+ },
118
+ chartsData: {
119
+ name: 'Legend Data',
120
+ description: 'array [] of objects: {displayName: string, value: number, color: string} to fill the pie chart, Please NOTE: the name have to be uniq '
121
+ },
122
+ noDataText: {
123
+ name: 'No Data text',
124
+ control: {
125
+ type: 'text'
126
+ },
127
+ description: 'text to display when no data found'
128
+ }
129
+ }
130
+ };
131
+ const SalesGreenTheme = exports.SalesGreenTheme = {
132
+ args: {
133
+ title: 'SALES',
134
+ value: 56500,
135
+ dotCut: true,
136
+ currencySign: true,
137
+ currencyType: 'USD',
138
+ chartsData: chartsData1,
139
+ textColor: '#212121',
140
+ noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.',
141
+ height: '240px',
142
+ width: '353px'
143
+ }
144
+ };
145
+ const SalesBlueTheme = exports.SalesBlueTheme = {
146
+ args: {
147
+ title: 'SALES',
148
+ value: 56500,
149
+ dotCut: true,
150
+ currencySign: true,
151
+ currencyType: 'USD',
152
+ chartsData: chartsData2,
153
+ textColor: '#212121',
154
+ noDataText: 'The selected event is a TPR or has no offer, therefore there is no redeemers data to display.',
155
+ height: '240px',
156
+ width: '100%'
157
+ }
158
+ };