sag_components 1.0.86-7.7 → 1.0.86-7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button.test.js +10 -10
- package/dist/LinkButton.test.js +10 -10
- package/dist/SingleBar.test.js +85 -37
- package/dist/index.js +1 -1
- package/dist/setupTests.js +15 -1
- package/dist/stories/components/AttachedFile/AttachedFile.js +1 -1
- package/dist/stories/components/AttachedFile/AttachedFile.style.js +40 -6
- package/dist/stories/components/AttachedFile.js +1 -1
- package/dist/stories/components/AttachedFile.style.js +40 -6
- package/dist/stories/components/AutocompleteField.style.js +47 -7
- package/dist/stories/components/BannerEventBox/BannerEventBox.js +33 -23
- package/dist/stories/components/BannerEventBox/BannerEventBox.style.js +71 -15
- package/dist/stories/components/BannerEventBox.style.js +66 -14
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.js +10 -5
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.style.js +182 -16
- package/dist/stories/components/BannerEventBoxList.js +2 -1
- package/dist/stories/components/BannerEventBoxList.style.js +174 -15
- package/dist/stories/components/BannersDropdown/BannersDropdown.style.js +91 -10
- package/dist/stories/components/BannersDropdown.style.js +91 -10
- package/dist/stories/components/BarChart/BarChart.js +5 -3
- package/dist/stories/components/BarChart/BarChart.stories.js +29 -20
- package/dist/stories/components/BarChart/BarChart.style.js +52 -10
- package/dist/stories/components/BarChart.js +2 -2
- package/dist/stories/components/BarChart.style.js +52 -10
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.js +53 -44
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.stories.js +166 -40
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.style.js +72 -11
- package/dist/stories/components/BarChartTwoRows.js +2 -2
- package/dist/stories/components/BarChartTwoRows.style.js +53 -10
- package/dist/stories/components/BarChartWithAreaChart.js +20 -14
- package/dist/stories/components/BarChartWithAreaChart.style.js +59 -11
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.js +7 -3
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.style.js +88 -13
- package/dist/stories/components/BarChartsByWeeks.js +7 -3
- package/dist/stories/components/BarChartsByWeeks.style.js +88 -13
- package/dist/stories/components/Benchmark/Benchmark.style.js +53 -7
- package/dist/stories/components/Benchmark.style.js +53 -7
- package/dist/stories/components/Button/Button.js +1 -1
- package/dist/stories/components/Button/Button.style.js +82 -7
- package/dist/stories/components/Button.js +1 -1
- package/dist/stories/components/Button.style.js +82 -7
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.style.js +40 -7
- package/dist/stories/components/CampaignTool/CampaignDemoReport.style.js +40 -7
- package/dist/stories/components/CampaignTool/Card.style.js +58 -10
- package/dist/stories/components/CampaignTool/MultipleCard.style.js +6 -3
- package/dist/stories/components/CampaignTool/PageFilterBar.style.js +14 -4
- package/dist/stories/components/CampaignTool/Popup.style.js +114 -16
- package/dist/stories/components/CampaignTool/PopupContent.style.js +64 -11
- package/dist/stories/components/CampaignTool/Table.js +2 -2
- package/dist/stories/components/CampaignTool/Table.style.js +79 -9
- package/dist/stories/components/Card/Card.style.js +57 -10
- package/dist/stories/components/CheckBox/CheckBox.style.js +28 -6
- package/dist/stories/components/CheckBox.style.js +28 -6
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.style.js +31 -6
- package/dist/stories/components/CheckBoxButton.style.js +31 -6
- package/dist/stories/components/CodeEditor/CodeEditor.style.js +4 -3
- package/dist/stories/components/CodeEditor.style.js +4 -3
- package/dist/stories/components/CollapseData/CollapseData.js +5 -5
- package/dist/stories/components/CollapseData/CollapseData.style.js +119 -13
- package/dist/stories/components/CollapseData.js +5 -5
- package/dist/stories/components/CollapseData.style.js +119 -13
- package/dist/stories/components/CollapseHeader/CollapseHeader.js +2 -1
- package/dist/stories/components/CollapseHeader/CollapseHeader.style.js +192 -27
- package/dist/stories/components/CollapseHeader.js +64 -48
- package/dist/stories/components/CollapseHeader.style.js +192 -27
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.style.js +53 -9
- package/dist/stories/components/CollapseMenuItem.style.js +53 -9
- package/dist/stories/components/CommonFunctions.js +1 -1
- package/dist/stories/components/Datepicker/Datepicker.style.js +9 -3
- package/dist/stories/components/Datepicker.style.js +9 -3
- package/dist/stories/components/DownloadProgress/DownloadProgress.style.js +43 -6
- package/dist/stories/components/DownloadProgress.style.js +43 -6
- package/dist/stories/components/Dropdown/Dropdown.style.js +9 -3
- package/dist/stories/components/Dropdown.style.js +9 -3
- package/dist/stories/components/DropdownMulti/DropdownMulti.js +290 -0
- package/dist/stories/components/DropdownMulti/DropdownMulti.stories.js +220 -0
- package/dist/stories/components/DropdownMulti/DropdownMulti.style.js +11 -0
- package/dist/stories/components/DropdownMulti.js +1 -1
- package/dist/stories/components/DropdownMulti.style.js +9 -3
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.js +49 -36
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.style.js +204 -16
- package/dist/stories/components/DropdownMultiNew.js +1 -1
- package/dist/stories/components/DropdownMultiNew.style.js +193 -16
- package/dist/stories/components/DropdownNew/DropdownNew.js +21 -11
- package/dist/stories/components/DropdownNew/DropdownNew.stories.js +18 -9
- package/dist/stories/components/DropdownNew/DropdownNew.style.js +13 -3
- package/dist/stories/components/DropdownNew.style.js +14 -3
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.js +30 -10
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.style.js +175 -14
- package/dist/stories/components/DropdownSingleNew.style.js +162 -14
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.style.js +86 -10
- package/dist/stories/components/EventDetailsCard.style.js +86 -10
- package/dist/stories/components/EventList/EventList.style.js +30 -6
- package/dist/stories/components/EventList.style.js +30 -6
- package/dist/stories/components/EventListItem/EventListItem.style.js +39 -6
- package/dist/stories/components/EventListItem.style.js +39 -6
- package/dist/stories/components/FilterContainer/FilterContainer.style.js +22 -5
- package/dist/stories/components/FilterContainer.style.js +22 -5
- package/dist/stories/components/FilterPanel/FilterPanel.js +17 -17
- package/dist/stories/components/FilterPanel/FilterPanel.style.js +81 -13
- package/dist/stories/components/FilterPanel.js +17 -17
- package/dist/stories/components/FilterPanel.style.js +81 -13
- package/dist/stories/components/FormattedValue/FormattedValue.style.js +83 -10
- package/dist/stories/components/FormattedValue.style.js +83 -10
- package/dist/stories/components/IconButton/IconButton.style.js +56 -7
- package/dist/stories/components/IconButton.style.js +56 -7
- package/dist/stories/components/Input/Input.style.js +122 -9
- package/dist/stories/components/Input.style.js +123 -9
- package/dist/stories/components/InputOld/InputOld.style.js +61 -8
- package/dist/stories/components/InputOld.style.js +62 -8
- package/dist/stories/components/KpiFilter/KpiFilter.js +18 -1
- package/dist/stories/components/KpiFilter/KpiFilter.style.js +124 -18
- package/dist/stories/components/KpiFilter.style.js +124 -18
- package/dist/stories/components/LinkButton/LinkButton.style.js +45 -6
- package/dist/stories/components/LinkButton.style.js +45 -6
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.js +4 -2
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.stories.js +32 -10
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.style.js +60 -14
- package/dist/stories/components/LinnerDataBox.js +1 -1
- package/dist/stories/components/LinnerDataBox.style.js +60 -14
- package/dist/stories/components/ListBox/ListBox.style.js +40 -6
- package/dist/stories/components/ListBox.style.js +40 -6
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.stories.js +17 -3
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.style.js +207 -19
- package/dist/stories/components/MarketShareDescription.style.js +207 -19
- package/dist/stories/components/Modal/Modal.style.js +56 -8
- package/dist/stories/components/Modal/ModalTotalBenchmark.js +6 -6
- package/dist/stories/components/Modal.style.js +56 -8
- package/dist/stories/components/ModalTotalBenchmark.js +6 -6
- package/dist/stories/components/MonthPicker/MonthPicker.js +2 -2
- package/dist/stories/components/MonthPicker/MonthPicker.style.js +95 -10
- package/dist/stories/components/MonthPicker/MonthPopupPicker.js +91 -13
- package/dist/stories/components/MonthPicker.js +2 -2
- package/dist/stories/components/MonthPicker.style.js +96 -10
- package/dist/stories/components/MonthPopupPicker.js +92 -13
- package/dist/stories/components/MultipleCard/MultipleCard.style.js +5 -3
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.style.js +31 -5
- package/dist/stories/components/NoDataFoundMessage.style.js +31 -5
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.style.js +99 -12
- package/dist/stories/components/OneColumnContainer.style.js +99 -12
- package/dist/stories/components/PageFilterBar/PageFilterBar.style.js +14 -4
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.js +16 -9
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.style.js +136 -17
- package/dist/stories/components/PerformanceAnalytics.js +16 -9
- package/dist/stories/components/PerformanceAnalytics.style.js +136 -17
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.js +14 -13
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.style.js +55 -8
- package/dist/stories/components/PerformanceAnalyticsLegend.js +1 -1
- package/dist/stories/components/PerformanceAnalyticsLegend.style.js +55 -8
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.js +12 -5
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.style.js +108 -15
- package/dist/stories/components/PerformanceAnalyticsOneColumn.js +12 -5
- package/dist/stories/components/PerformanceAnalyticsOneColumn.style.js +108 -15
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.js +1 -1
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.style.js +81 -12
- package/dist/stories/components/PerformanceAnalyticsTotals.js +1 -1
- package/dist/stories/components/PerformanceAnalyticsTotals.style.js +81 -12
- package/dist/stories/components/Popup/Popup.style.js +114 -16
- package/dist/stories/components/PopupCharts/PopupCharts.style.js +100 -15
- package/dist/stories/components/PopupCharts.style.js +100 -15
- package/dist/stories/components/PopupContent/PopupContent.style.js +64 -11
- package/dist/stories/components/ProductsVariety/ProductsVariety.style.js +78 -12
- package/dist/stories/components/ProductsVariety.style.js +78 -12
- package/dist/stories/components/ProgressBar/ProgressBar.style.js +15 -4
- package/dist/stories/components/ProgressBar.style.js +15 -4
- package/dist/stories/components/QuarterPicker/QuarterPicker.js +2 -2
- package/dist/stories/components/QuarterPicker/QuarterPicker.style.js +94 -10
- package/dist/stories/components/QuarterPicker/QuarterPopupPicker.js +85 -12
- package/dist/stories/components/QuarterPicker.js +2 -2
- package/dist/stories/components/QuarterPicker.style.js +95 -10
- package/dist/stories/components/QuarterPopupPicker.js +86 -12
- package/dist/stories/components/QuickFilter/QuickFilter.style.js +13 -3
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.js +2 -2
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.style.js +182 -16
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.js +1 -1
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.style.js +127 -15
- package/dist/stories/components/QuickFilter.style.js +13 -3
- package/dist/stories/components/QuickFilterDropdownMultiSelection.js +1 -1
- package/dist/stories/components/QuickFilterDropdownMultiSelection.style.js +182 -16
- package/dist/stories/components/QuickFilterDropdownSingle.style.js +127 -15
- package/dist/stories/components/RangeDatePicker.js +96 -12
- package/dist/stories/components/RangePicker/RangeDatePicker.js +95 -12
- package/dist/stories/components/RangePicker/RangePicker.js +2 -2
- package/dist/stories/components/RangePicker/RangePicker.style.js +99 -10
- package/dist/stories/components/RangePicker.js +2 -2
- package/dist/stories/components/RangePicker.style.js +100 -10
- package/dist/stories/components/ReportTable/ReportTable.style.js +123 -14
- package/dist/stories/components/ReportTable.style.js +123 -14
- package/dist/stories/components/SagButton/SagButton.style.js +39 -5
- package/dist/stories/components/SagButton.style.js +39 -5
- package/dist/stories/components/SagIconButton/SagIconButton.style.js +22 -4
- package/dist/stories/components/SagIconButton.style.js +22 -4
- package/dist/stories/components/SagInput/SagInput.style.js +33 -5
- package/dist/stories/components/SagInput.style.js +33 -5
- package/dist/stories/components/SalesAndROI/SalesAndROI.style.js +103 -11
- package/dist/stories/components/SalesAndROI.style.js +103 -11
- package/dist/stories/components/SearchInput/SearchInput.style.js +29 -4
- package/dist/stories/components/SearchInput.style.js +29 -4
- package/dist/stories/components/SegmentedButton/SegmentedButton.js +5 -5
- package/dist/stories/components/SegmentedButton/SegmentedButton.style.js +90 -9
- package/dist/stories/components/SegmentedButton.js +5 -5
- package/dist/stories/components/SegmentedButton.style.js +90 -9
- package/dist/stories/components/Select/Select.style.js +92 -9
- package/dist/stories/components/Select.style.js +93 -9
- package/dist/stories/components/SingleBarLineCharts.js +40 -21
- package/dist/stories/components/SingleBarLineCharts.style.js +94 -15
- package/dist/stories/components/TabMenu/TabMenu.js +19 -7
- package/dist/stories/components/TabMenu/TabMenu.style.js +105 -14
- package/dist/stories/components/TabMenu.js +19 -7
- package/dist/stories/components/TabMenu.style.js +105 -14
- package/dist/stories/components/Table/Table.js +2 -2
- package/dist/stories/components/Table/Table.style.js +78 -9
- package/dist/stories/components/TextField/TextField.style.js +10 -3
- package/dist/stories/components/TextField.style.js +10 -3
- package/dist/stories/components/TitleDescription/TitleDescription.style.js +214 -28
- package/dist/stories/components/TitleDescription.style.js +214 -28
- package/dist/stories/components/Tooltip/Tooltip.js +1 -1
- package/dist/stories/components/Tooltip/Tooltip.style.js +90 -5
- package/dist/stories/components/Tooltip.js +1 -1
- package/dist/stories/components/Tooltip.style.js +90 -5
- package/dist/stories/components/TopToggleList/TopToggleList.style.js +43 -8
- package/dist/stories/components/TopToggleList.style.js +43 -8
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.style.js +71 -11
- package/dist/stories/components/TotalBenchmark.style.js +71 -11
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.js +3 -3
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.style.js +163 -22
- package/dist/stories/components/TotalBenchmarkAreachart.js +3 -3
- package/dist/stories/components/TotalBenchmarkAreachart.style.js +163 -22
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.style.js +100 -16
- package/dist/stories/components/TotalBenchmarkArrows.style.js +100 -16
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.style.js +69 -12
- package/dist/stories/components/TotalBenchmarkBarchart.style.js +69 -12
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.js +3 -3
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.style.js +170 -22
- package/dist/stories/components/TotalDoughnutChart.js +3 -3
- package/dist/stories/components/TotalDoughnutChart.style.js +170 -22
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.js +47 -32
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.stories.js +52 -14
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.style.js +51 -13
- package/dist/stories/components/TotalHorizontalCharts.js +3 -3
- package/dist/stories/components/TotalHorizontalCharts.style.js +113 -12
- package/dist/stories/components/TspanTooltip/TspanTooltip.js +3 -3
- package/dist/stories/components/TspanTooltip/TspanTooltip.style.js +97 -5
- package/dist/stories/components/TspanTooltip.js +3 -3
- package/dist/stories/components/TspanTooltip.style.js +97 -5
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.js +6 -4
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.stories.js +88 -23
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.style.js +52 -10
- package/dist/stories/components/TwoBarCharts.js +2 -2
- package/dist/stories/components/TwoBarCharts.style.js +52 -10
- package/dist/stories/utils/CommonFunctions.js +13 -8
- package/dist/stories/utils/IconsHandler.style.js +8 -3
- package/package.json +1 -1
- package/dist/stories/components/HaiTooltip.js +0 -71
- package/dist/stories/components/HaiTooltip.style.js +0 -12
- package/dist/stories/components/Rbackup.js +0 -453
- package/dist/stories/components/TableTooltip.js +0 -71
- package/dist/stories/components/TableTooltip.style.js +0 -12
package/dist/Button.test.js
CHANGED
|
@@ -6,7 +6,7 @@ var _react2 = require("@testing-library/react");
|
|
|
6
6
|
var _Button = _interopRequireDefault(require("./stories/components/Button"));
|
|
7
7
|
require("@testing-library/jest-dom");
|
|
8
8
|
test('Button Check text', () => {
|
|
9
|
-
(0, _react2.render)(
|
|
9
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
10
10
|
text: "test",
|
|
11
11
|
type: "primary",
|
|
12
12
|
size: "small",
|
|
@@ -20,7 +20,7 @@ test('Button Check text', () => {
|
|
|
20
20
|
test('Button Check type functionality: when "primary" type selected then background color must be specified as "rgb(146, 207, 23)" ', () => {
|
|
21
21
|
const {
|
|
22
22
|
container
|
|
23
|
-
} = (0, _react2.render)(
|
|
23
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
24
24
|
text: "Button",
|
|
25
25
|
type: "primary",
|
|
26
26
|
size: "small",
|
|
@@ -36,7 +36,7 @@ test('Button Check type functionality: when "primary" type selected then backgro
|
|
|
36
36
|
test('Button Check type functionality: when "secondary" type selected then background color must be specified as "rgb(232, 245, 235)" ', () => {
|
|
37
37
|
const {
|
|
38
38
|
container
|
|
39
|
-
} = (0, _react2.render)(
|
|
39
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
40
40
|
text: "Button",
|
|
41
41
|
type: "secondary",
|
|
42
42
|
size: "small",
|
|
@@ -52,7 +52,7 @@ test('Button Check type functionality: when "secondary" type selected then backg
|
|
|
52
52
|
test('Button Check disabled functionality: when disabled prop is true, button textColor should be "rgb(177, 177, 177)" ', () => {
|
|
53
53
|
const {
|
|
54
54
|
container
|
|
55
|
-
} = (0, _react2.render)(
|
|
55
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
56
56
|
text: "Button",
|
|
57
57
|
type: "primary",
|
|
58
58
|
size: "small",
|
|
@@ -68,7 +68,7 @@ test('Button Check disabled functionality: when disabled prop is true, button te
|
|
|
68
68
|
test('Button Check leftIcon functionality: when "Filter" icons is specified as the leftIcon props, it should be rendered on the screen', () => {
|
|
69
69
|
const {
|
|
70
70
|
container
|
|
71
|
-
} = (0, _react2.render)(
|
|
71
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
72
72
|
text: "Button",
|
|
73
73
|
type: "primary",
|
|
74
74
|
size: "small",
|
|
@@ -82,7 +82,7 @@ test('Button Check leftIcon functionality: when "Filter" icons is specified as
|
|
|
82
82
|
test('Button Check rightIcon functionality: when "Exit" icons is specified as the rightIcon props, it should be rendered on the screen', () => {
|
|
83
83
|
const {
|
|
84
84
|
container
|
|
85
|
-
} = (0, _react2.render)(
|
|
85
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
86
86
|
text: "Button",
|
|
87
87
|
type: "primary",
|
|
88
88
|
size: "small",
|
|
@@ -96,7 +96,7 @@ test('Button Check rightIcon functionality: when "Exit" icons is specified as th
|
|
|
96
96
|
test('Button Check leftIcon and rightIcon functionality: when "Filter" and "Exit" icons is specified as the leftIcon and rightIcon props, it should be rendered on the screen', () => {
|
|
97
97
|
const {
|
|
98
98
|
container
|
|
99
|
-
} = (0, _react2.render)(
|
|
99
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
100
100
|
text: "Button",
|
|
101
101
|
type: "primary",
|
|
102
102
|
size: "small",
|
|
@@ -112,7 +112,7 @@ test('Button Check leftIcon and rightIcon functionality: when "Filter" and "Exit
|
|
|
112
112
|
test('Button Check small/medium functionality: when "small" the height must be "33px" ', () => {
|
|
113
113
|
const {
|
|
114
114
|
container
|
|
115
|
-
} = (0, _react2.render)(
|
|
115
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
116
116
|
text: "Button",
|
|
117
117
|
type: "primary",
|
|
118
118
|
size: "small",
|
|
@@ -128,7 +128,7 @@ test('Button Check small/medium functionality: when "small" the height must be "
|
|
|
128
128
|
test('Button Check small/medium functionality: when "medium" the height must be "45px" ', () => {
|
|
129
129
|
const {
|
|
130
130
|
container
|
|
131
|
-
} = (0, _react2.render)(
|
|
131
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
132
132
|
text: "Button",
|
|
133
133
|
type: "primary",
|
|
134
134
|
size: "medium",
|
|
@@ -142,7 +142,7 @@ test('Button Check small/medium functionality: when "medium" the height must be
|
|
|
142
142
|
test('Button Check specific height and width functionality: when height = 100px and width = 200px it should override small/medium functionality ', () => {
|
|
143
143
|
const {
|
|
144
144
|
container
|
|
145
|
-
} = (0, _react2.render)(
|
|
145
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
146
146
|
text: "Button",
|
|
147
147
|
type: "primary",
|
|
148
148
|
size: "small",
|
package/dist/LinkButton.test.js
CHANGED
|
@@ -6,7 +6,7 @@ var _react2 = require("@testing-library/react");
|
|
|
6
6
|
var _LinkButton = _interopRequireDefault(require("./stories/components/LinkButton"));
|
|
7
7
|
require("@testing-library/jest-dom");
|
|
8
8
|
test('LinkButton Check text', () => {
|
|
9
|
-
(0, _react2.render)(
|
|
9
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement(_LinkButton.default, {
|
|
10
10
|
text: "test",
|
|
11
11
|
type: "secondary",
|
|
12
12
|
size: "small",
|
|
@@ -18,7 +18,7 @@ test('LinkButton Check text', () => {
|
|
|
18
18
|
test('LinkButton Check type functionality: when "primary" type selected then text color must be specified as "rgb(146, 207, 23)" ', () => {
|
|
19
19
|
const {
|
|
20
20
|
container
|
|
21
|
-
} = (0, _react2.render)(
|
|
21
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_LinkButton.default, {
|
|
22
22
|
text: "LinkButton",
|
|
23
23
|
type: "primary",
|
|
24
24
|
size: "small",
|
|
@@ -32,7 +32,7 @@ test('LinkButton Check type functionality: when "primary" type selected then tex
|
|
|
32
32
|
test('LinkButton Check type functionality: when "secondary" type selected then background color must be specified as "rgb(232, 245, 235)" ', () => {
|
|
33
33
|
const {
|
|
34
34
|
container
|
|
35
|
-
} = (0, _react2.render)(
|
|
35
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_LinkButton.default, {
|
|
36
36
|
text: "LinkButton",
|
|
37
37
|
type: "secondary",
|
|
38
38
|
size: "small",
|
|
@@ -46,7 +46,7 @@ test('LinkButton Check type functionality: when "secondary" type selected then b
|
|
|
46
46
|
test('LinkButton Check disabled functionality: when disabled prop is true, button textColor should be "rgb(177, 177, 177)" ', () => {
|
|
47
47
|
const {
|
|
48
48
|
container
|
|
49
|
-
} = (0, _react2.render)(
|
|
49
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_LinkButton.default, {
|
|
50
50
|
text: "LinkButton",
|
|
51
51
|
type: "primary",
|
|
52
52
|
size: "small",
|
|
@@ -60,7 +60,7 @@ test('LinkButton Check disabled functionality: when disabled prop is true, butto
|
|
|
60
60
|
test('LinkButton Check leftIcon and rightIcon functionality: when "Filter" and "Exit" icons is specified as the leftIcon and rightIcon props, it should be rendered on the screen', () => {
|
|
61
61
|
const {
|
|
62
62
|
container
|
|
63
|
-
} = (0, _react2.render)(
|
|
63
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_LinkButton.default, {
|
|
64
64
|
text: "LinkButton",
|
|
65
65
|
type: "primary",
|
|
66
66
|
size: "small",
|
|
@@ -76,7 +76,7 @@ test('LinkButton Check leftIcon and rightIcon functionality: when "Filter" and "
|
|
|
76
76
|
test('LinkButton Check rightIcon functionality: when "Exit" icons is specified as the rightIcon props, it should be rendered on the screen', () => {
|
|
77
77
|
const {
|
|
78
78
|
container
|
|
79
|
-
} = (0, _react2.render)(
|
|
79
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_LinkButton.default, {
|
|
80
80
|
text: "LinkButton",
|
|
81
81
|
type: "primary",
|
|
82
82
|
size: "small",
|
|
@@ -89,7 +89,7 @@ test('LinkButton Check rightIcon functionality: when "Exit" icons is specified a
|
|
|
89
89
|
test('LinkButton Check leftIcon functionality: when "Filter" icons is specified as the leftIcon props, it should be rendered on the screen', () => {
|
|
90
90
|
const {
|
|
91
91
|
container
|
|
92
|
-
} = (0, _react2.render)(
|
|
92
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_LinkButton.default, {
|
|
93
93
|
text: "LinkButton",
|
|
94
94
|
type: "primary",
|
|
95
95
|
size: "small",
|
|
@@ -102,7 +102,7 @@ test('LinkButton Check leftIcon functionality: when "Filter" icons is specified
|
|
|
102
102
|
test('LinkButton Check small/medium functionality: when "small" the font-size must be "14px" ', () => {
|
|
103
103
|
const {
|
|
104
104
|
container
|
|
105
|
-
} = (0, _react2.render)(
|
|
105
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_LinkButton.default, {
|
|
106
106
|
text: "LinkButton",
|
|
107
107
|
type: "primary",
|
|
108
108
|
size: "small",
|
|
@@ -116,7 +116,7 @@ test('LinkButton Check small/medium functionality: when "small" the font-size mu
|
|
|
116
116
|
test('LinkButton Check small/medium functionality: when "medium" the font-size must be "16px" ', () => {
|
|
117
117
|
const {
|
|
118
118
|
container
|
|
119
|
-
} = (0, _react2.render)(
|
|
119
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_LinkButton.default, {
|
|
120
120
|
text: "LinkButton",
|
|
121
121
|
type: "primary",
|
|
122
122
|
size: "medium",
|
|
@@ -130,7 +130,7 @@ test('LinkButton Check small/medium functionality: when "medium" the font-size m
|
|
|
130
130
|
test('LinkButton Check specific height and width functionality: when height = 100px and width = 200px it should override small/medium functionality ', () => {
|
|
131
131
|
const {
|
|
132
132
|
container
|
|
133
|
-
} = (0, _react2.render)(
|
|
133
|
+
} = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_LinkButton.default, {
|
|
134
134
|
text: "LinkButton",
|
|
135
135
|
type: "primary",
|
|
136
136
|
size: "small",
|
package/dist/SingleBar.test.js
CHANGED
|
@@ -9,64 +9,112 @@ require("@testing-library/jest-dom");
|
|
|
9
9
|
/* eslint-disable import/no-unresolved */
|
|
10
10
|
/* eslint-disable no-undef */
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
12
|
+
const data = [{
|
|
13
|
+
retailer: 'Food Lion',
|
|
14
|
+
period: '15.01.24-31.01.24',
|
|
15
|
+
lineValue: 23.6,
|
|
16
|
+
barValue: 82.11,
|
|
17
|
+
secondBarValue: -138
|
|
18
|
+
}, {
|
|
19
|
+
retailer: 'Hannaford',
|
|
20
|
+
period: '02.01.24-15.01.24',
|
|
21
|
+
lineValue: -4.6,
|
|
22
|
+
barValue: -149.9,
|
|
23
|
+
secondBarValue: 51.94
|
|
24
|
+
}];
|
|
25
|
+
const totalsData1 = [{
|
|
26
|
+
value: 374,
|
|
27
|
+
sign: '$',
|
|
28
|
+
extraInfo: []
|
|
29
|
+
}, {
|
|
30
|
+
value: 1.6,
|
|
31
|
+
sign: '',
|
|
32
|
+
extraInfo: []
|
|
33
|
+
}];
|
|
34
|
+
const legendData1 = [{
|
|
35
|
+
iconColor: '#1F7677',
|
|
36
|
+
iconType: 'Square',
|
|
37
|
+
title: 'Dark Green'
|
|
38
|
+
}, {
|
|
39
|
+
iconColor: '#90CE9C',
|
|
40
|
+
iconType: 'Square',
|
|
41
|
+
title: 'Light Green'
|
|
42
|
+
}, {
|
|
43
|
+
iconColor: '#e89e68',
|
|
44
|
+
iconType: 'LegendUnionIcon',
|
|
45
|
+
title: 'Incremental Sales ROI'
|
|
46
|
+
}];
|
|
47
|
+
test('SingleBarLineCharts Check if title data is rendered', async () => {
|
|
48
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement(_SingleBarLineCharts.default, {
|
|
29
49
|
width: "100%",
|
|
30
50
|
height: "100%",
|
|
51
|
+
title: "Total Cost Sales",
|
|
52
|
+
data: data,
|
|
53
|
+
totalsData: totalsData1,
|
|
54
|
+
legendData: legendData1,
|
|
55
|
+
maxBarRange: 1.3,
|
|
56
|
+
lineRange: 3,
|
|
57
|
+
barSize: 60,
|
|
31
58
|
barChartColor: "#1F7677",
|
|
32
59
|
secondBarChartColor: "#90CE9C",
|
|
33
|
-
barChartHeight:
|
|
60
|
+
barChartHeight: 255,
|
|
34
61
|
tooltipBarchartLabel: "Label",
|
|
35
|
-
lineChartHeight:
|
|
62
|
+
lineChartHeight: 85,
|
|
63
|
+
isLineChartCurrency: false,
|
|
64
|
+
setLineChartTooltip: true,
|
|
36
65
|
lineChartColor: "#1F7677",
|
|
37
66
|
isLineChartPercent: false,
|
|
38
67
|
isLineChartBolded: false,
|
|
39
68
|
isTopBarPercent: true,
|
|
69
|
+
showSecondBar: true,
|
|
70
|
+
showPeriod: true,
|
|
40
71
|
currencySign: "\u20AC",
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
legendData: [],
|
|
44
|
-
noDataText: "No data"
|
|
72
|
+
noDataText: "No data",
|
|
73
|
+
currencySignLine: ""
|
|
45
74
|
}));
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
75
|
+
|
|
76
|
+
// Use findByText to handle async rendering
|
|
77
|
+
const titleElement = await _react2.screen.findByText(content => content.includes('Total Cost Sales'));
|
|
78
|
+
const total1Element = await _react2.screen.findByText(content => content.includes('374'));
|
|
79
|
+
const total2Element = await _react2.screen.findByText(content => content.includes('1.6'));
|
|
80
|
+
expect(titleElement).toBeInTheDocument();
|
|
81
|
+
expect(total1Element).toBeInTheDocument();
|
|
82
|
+
expect(total2Element).toBeInTheDocument();
|
|
50
83
|
});
|
|
51
|
-
test('SingleBarLineCharts Check if
|
|
52
|
-
(0, _react2.render)(
|
|
84
|
+
test('SingleBarLineCharts Check if legend data is rendered', async () => {
|
|
85
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement(_SingleBarLineCharts.default, {
|
|
53
86
|
width: "100%",
|
|
54
87
|
height: "100%",
|
|
88
|
+
title: "Total Cost Sales",
|
|
89
|
+
data: data,
|
|
90
|
+
totalsData: totalsData1,
|
|
91
|
+
legendData: legendData1,
|
|
92
|
+
maxBarRange: 1.3,
|
|
93
|
+
lineRange: 3,
|
|
94
|
+
barSize: 60,
|
|
55
95
|
barChartColor: "#1F7677",
|
|
56
96
|
secondBarChartColor: "#90CE9C",
|
|
57
|
-
barChartHeight:
|
|
97
|
+
barChartHeight: 255,
|
|
58
98
|
tooltipBarchartLabel: "Label",
|
|
59
|
-
lineChartHeight:
|
|
99
|
+
lineChartHeight: 85,
|
|
100
|
+
isLineChartCurrency: false,
|
|
101
|
+
setLineChartTooltip: true,
|
|
60
102
|
lineChartColor: "#1F7677",
|
|
61
103
|
isLineChartPercent: false,
|
|
62
104
|
isLineChartBolded: false,
|
|
63
105
|
isTopBarPercent: true,
|
|
106
|
+
showSecondBar: true,
|
|
107
|
+
showPeriod: true,
|
|
64
108
|
currencySign: "\u20AC",
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
legendData: [],
|
|
68
|
-
noDataText: "No data"
|
|
109
|
+
noDataText: "No data",
|
|
110
|
+
currencySignLine: ""
|
|
69
111
|
}));
|
|
70
|
-
|
|
71
|
-
|
|
112
|
+
|
|
113
|
+
// Use findByText to handle async rendering
|
|
114
|
+
const legend1Element = await _react2.screen.findByText(content => content.includes('Dark Green'));
|
|
115
|
+
const legend2Element = await _react2.screen.findByText(content => content.includes('Light Green'));
|
|
116
|
+
const legend3Element = await _react2.screen.findByText(content => content.includes('Incremental Sales ROI'));
|
|
117
|
+
expect(legend1Element).toBeInTheDocument();
|
|
118
|
+
expect(legend2Element).toBeInTheDocument();
|
|
119
|
+
expect(legend3Element).toBeInTheDocument();
|
|
72
120
|
});
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var _client = _interopRequireDefault(require("react-dom/client"));
|
|
|
6
6
|
require("./index.css");
|
|
7
7
|
var _App = _interopRequireDefault(require("./App"));
|
|
8
8
|
const root = _client.default.createRoot(document.getElementById('root'));
|
|
9
|
-
root.render(
|
|
9
|
+
root.render(/*#__PURE__*/_react.default.createElement(_react.default.StrictMode, null, /*#__PURE__*/_react.default.createElement(_App.default, null)));
|
|
10
10
|
|
|
11
11
|
// If you want to start measuring performance in your app, pass a function
|
|
12
12
|
// to log results (for example: reportWebVitals(console.log))
|
package/dist/setupTests.js
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("@testing-library/jest-dom");
|
|
3
|
+
require("@testing-library/jest-dom");
|
|
4
|
+
// src/setupTests.js
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
7
|
+
|
|
8
|
+
global.ResizeObserver = class {
|
|
9
|
+
// eslint-disable-next-line class-methods-use-this
|
|
10
|
+
observe() {}
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line class-methods-use-this
|
|
13
|
+
unobserve() {}
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line class-methods-use-this
|
|
16
|
+
disconnect() {}
|
|
17
|
+
};
|
|
@@ -33,7 +33,7 @@ const AttachedFile = props => {
|
|
|
33
33
|
onRemoveFile(fileToRemove);
|
|
34
34
|
};
|
|
35
35
|
return /*#__PURE__*/_react.default.createElement(_AttachedFile.AttachedFileContainer, null, selectedFiles.map(file => /*#__PURE__*/_react.default.createElement(_AttachedFile.UploadedFile, {
|
|
36
|
-
key:
|
|
36
|
+
key: `${file.name}_${file.lastModified}`
|
|
37
37
|
}, /*#__PURE__*/_react.default.createElement(_FileIcon.default, null), /*#__PURE__*/_react.default.createElement("span", null, file.name), /*#__PURE__*/_react.default.createElement(_AttachedFile.RemoveButton, {
|
|
38
38
|
onClick: () => handleRemoveFile(file)
|
|
39
39
|
}, /*#__PURE__*/_react.default.createElement(_CloseIcon.default, null)))), /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
|
|
@@ -5,10 +5,44 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.UploadedFile = exports.RemoveButton = exports.InputLabel = exports.AttachedFileContainer = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const AttachedFileContainer = exports.AttachedFileContainer = _styledComponents.default.div`
|
|
10
|
+
font-family: 'Poppins';
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
`;
|
|
14
|
+
const InputLabel = exports.InputLabel = _styledComponents.default.label`
|
|
15
|
+
display: flex;
|
|
16
|
+
gap: 8px;
|
|
17
|
+
align-items: center;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
> span {
|
|
20
|
+
color: ${props => props.inputColor};
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
const UploadedFile = exports.UploadedFile = _styledComponents.default.div`
|
|
24
|
+
display: flex;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
align-items: center;
|
|
27
|
+
color: #A4A4A4;
|
|
28
|
+
max-width: 220px;
|
|
29
|
+
padding: 2px 8px;
|
|
30
|
+
margin-bottom: 10px;
|
|
31
|
+
> span {
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
}
|
|
36
|
+
> svg {
|
|
37
|
+
min-width: 12px;
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
const RemoveButton = exports.RemoveButton = _styledComponents.default.button`
|
|
41
|
+
border: none;
|
|
42
|
+
background: none;
|
|
43
|
+
padding: 0;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
margin-left: auto;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
`;
|
|
@@ -32,7 +32,7 @@ const AttachedFile = props => {
|
|
|
32
32
|
onRemoveFile(fileToRemove);
|
|
33
33
|
};
|
|
34
34
|
return /*#__PURE__*/_react.default.createElement(_AttachedFile.AttachedFileContainer, null, selectedFiles.map(file => /*#__PURE__*/_react.default.createElement(_AttachedFile.UploadedFile, {
|
|
35
|
-
key:
|
|
35
|
+
key: `${file.name}_${file.lastModified}`
|
|
36
36
|
}, /*#__PURE__*/_react.default.createElement(_FileIcon.default, null), /*#__PURE__*/_react.default.createElement("span", null, file.name), /*#__PURE__*/_react.default.createElement(_AttachedFile.RemoveButton, {
|
|
37
37
|
onClick: () => handleRemoveFile(file)
|
|
38
38
|
}, /*#__PURE__*/_react.default.createElement(_CloseIcon.default, null)))), /*#__PURE__*/_react.default.createElement(_AttachedFile.InputLabel, {
|
|
@@ -5,10 +5,44 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.UploadedFile = exports.RemoveButton = exports.InputLabel = exports.AttachedFileContainer = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const AttachedFileContainer = exports.AttachedFileContainer = _styledComponents.default.div`
|
|
10
|
+
font-family: 'Poppins';
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
`;
|
|
14
|
+
const InputLabel = exports.InputLabel = _styledComponents.default.label`
|
|
15
|
+
display: flex;
|
|
16
|
+
gap: 8px;
|
|
17
|
+
align-items: center;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
> span {
|
|
20
|
+
color: ${props => props.inputColor};
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
const UploadedFile = exports.UploadedFile = _styledComponents.default.div`
|
|
24
|
+
display: flex;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
align-items: center;
|
|
27
|
+
color: #A4A4A4;
|
|
28
|
+
max-width: 220px;
|
|
29
|
+
padding: 2px 8px;
|
|
30
|
+
margin-bottom: 10px;
|
|
31
|
+
> span {
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
}
|
|
36
|
+
> svg {
|
|
37
|
+
min-width: 12px;
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
const RemoveButton = exports.RemoveButton = _styledComponents.default.button`
|
|
41
|
+
border: none;
|
|
42
|
+
background: none;
|
|
43
|
+
padding: 0;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
margin-left: auto;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
`;
|
|
@@ -5,11 +5,51 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.AutocompleteOptions = exports.AutocompleteOption = exports.AutocompleteLabel = exports.AutocompleteInput = exports.AutocompleteContainer = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
9
|
+
const AutocompleteContainer = exports.AutocompleteContainer = _styledComponents.default.div`
|
|
10
|
+
font-family: "Poppins", sans-serif;
|
|
11
|
+
position: relative;
|
|
12
|
+
margin: 20px;
|
|
13
|
+
`;
|
|
14
|
+
const AutocompleteInput = exports.AutocompleteInput = _styledComponents.default.input`
|
|
15
|
+
width: 100%;
|
|
16
|
+
padding: 10px;
|
|
17
|
+
font-size: 16px;
|
|
18
|
+
border: 1px solid #ccc;
|
|
19
|
+
border-radius: 4px;
|
|
20
|
+
|
|
21
|
+
&:focus + label {
|
|
22
|
+
top: -10px;
|
|
23
|
+
font-size: 12px;
|
|
24
|
+
color: #007bff;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
const AutocompleteLabel = exports.AutocompleteLabel = _styledComponents.default.label`
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 12px;
|
|
30
|
+
left: 10px;
|
|
31
|
+
transition: .2s ease;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
color: #555;
|
|
35
|
+
background-color: white;
|
|
36
|
+
`;
|
|
37
|
+
const AutocompleteOptions = exports.AutocompleteOptions = _styledComponents.default.div`
|
|
38
|
+
position: absolute;
|
|
39
|
+
width: 100%;
|
|
40
|
+
max-height: 150px;
|
|
41
|
+
overflow-y: auto;
|
|
42
|
+
border: 1px solid #ccc;
|
|
43
|
+
border-top: none;
|
|
44
|
+
border-bottom-left-radius: 4px;
|
|
45
|
+
border-bottom-right-radius: 4px;
|
|
46
|
+
background-color: #fff;
|
|
47
|
+
z-index: 1;
|
|
48
|
+
`;
|
|
49
|
+
const AutocompleteOption = exports.AutocompleteOption = _styledComponents.default.div`
|
|
50
|
+
padding: 10px;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
&:hover {
|
|
53
|
+
background-color: #f0f0f0;
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
@@ -12,6 +12,7 @@ var _TheGiantCompanyNewIcon = require("../../icons/TheGiantCompanyNewIcon");
|
|
|
12
12
|
var _StopAndShopNewIcon = require("../../icons/StopAndShopNewIcon");
|
|
13
13
|
var _GiantFoodIcon_new = require("../../icons/GiantFoodIcon_new");
|
|
14
14
|
var _HannafordIcon_new = require("../../icons/HannafordIcon_new");
|
|
15
|
+
var _Button = require("../Button/Button");
|
|
15
16
|
const BannerEventBox = props => {
|
|
16
17
|
const {
|
|
17
18
|
width,
|
|
@@ -20,34 +21,36 @@ const BannerEventBox = props => {
|
|
|
20
21
|
description,
|
|
21
22
|
dates,
|
|
22
23
|
data,
|
|
23
|
-
onInfoClick
|
|
24
|
+
onInfoClick,
|
|
25
|
+
buttonText,
|
|
26
|
+
disabled
|
|
24
27
|
} = props;
|
|
25
28
|
const formatedBanners = () => {
|
|
26
29
|
switch (banner) {
|
|
27
|
-
case
|
|
30
|
+
case "Stop&Shop":
|
|
28
31
|
return {
|
|
29
32
|
icon: /*#__PURE__*/_react.default.createElement(_StopAndShopNewIcon.StopAndShopNewIcon, null),
|
|
30
|
-
name:
|
|
33
|
+
name: "Stop&Shop"
|
|
31
34
|
};
|
|
32
|
-
case
|
|
35
|
+
case "Food Lion":
|
|
33
36
|
return {
|
|
34
37
|
icon: /*#__PURE__*/_react.default.createElement(_FoodLionNewIcon.FoodLionNewIcon, null),
|
|
35
|
-
name:
|
|
38
|
+
name: "Food Lion"
|
|
36
39
|
};
|
|
37
|
-
case
|
|
40
|
+
case "Giant Food":
|
|
38
41
|
return {
|
|
39
42
|
icon: /*#__PURE__*/_react.default.createElement(_GiantFoodIcon_new.GiantFoodNewIcon, null),
|
|
40
|
-
name:
|
|
43
|
+
name: "Giant Food"
|
|
41
44
|
};
|
|
42
|
-
case
|
|
45
|
+
case "The Giant Company":
|
|
43
46
|
return {
|
|
44
47
|
icon: /*#__PURE__*/_react.default.createElement(_TheGiantCompanyNewIcon.TheGiantCompanyIcon, null),
|
|
45
|
-
name:
|
|
48
|
+
name: "The Giant Company"
|
|
46
49
|
};
|
|
47
|
-
case
|
|
50
|
+
case "Hannaford":
|
|
48
51
|
return {
|
|
49
52
|
icon: /*#__PURE__*/_react.default.createElement(_HannafordIcon_new.HannafordNewIcon, null),
|
|
50
|
-
name:
|
|
53
|
+
name: "Hannaford"
|
|
51
54
|
};
|
|
52
55
|
default:
|
|
53
56
|
return null;
|
|
@@ -59,29 +62,36 @@ const BannerEventBox = props => {
|
|
|
59
62
|
return /*#__PURE__*/_react.default.createElement(_BannerEventBox.MainContainer, {
|
|
60
63
|
height: height,
|
|
61
64
|
width: width
|
|
62
|
-
}, /*#__PURE__*/_react.default.createElement(_BannerEventBox.TitleWrapper, null, formatedBanners(banner).icon, "|", /*#__PURE__*/_react.default.createElement(_BannerEventBox.CardTitle, null, formatedBanners(banner).name)), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Block, null, /*#__PURE__*/_react.default.createElement(_BannerEventBox.Headline, null, "Event Description"), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Text, null, description)), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Block, null, /*#__PURE__*/_react.default.createElement(_BannerEventBox.Headline, null, "Event Dates:"), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Text, null, dates.join(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(_BannerEventBox.TitleWrapper, null, formatedBanners(banner).icon, "|", /*#__PURE__*/_react.default.createElement(_BannerEventBox.CardTitle, null, formatedBanners(banner).name)), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Block, null, /*#__PURE__*/_react.default.createElement(_BannerEventBox.Headline, null, "Event Description"), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Text, null, description)), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Block, null, /*#__PURE__*/_react.default.createElement(_BannerEventBox.Headline, null, "Event Dates:"), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Text, null, dates.join(" - "))), /*#__PURE__*/_react.default.createElement(_BannerEventBox.ButtonWrap, null, /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
66
|
+
leftIcon: "Eye",
|
|
67
|
+
onClick: () => onInfoClickHandler(banner),
|
|
68
|
+
text: buttonText,
|
|
69
|
+
type: "secondary",
|
|
70
|
+
disabled: disabled
|
|
71
|
+
})), /*#__PURE__*/_react.default.createElement(_BannerEventBox.DetailsWrapper, null, data === null || data === void 0 ? void 0 : data.map((item, index) => item && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
65
72
|
key: item.name
|
|
66
73
|
}, /*#__PURE__*/_react.default.createElement(_BannerEventBox.KeyBlock, null, /*#__PURE__*/_react.default.createElement(_BannerEventBox.Key, null, item.name), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Count, null, item.items)), index !== data.length - 1 && /*#__PURE__*/_react.default.createElement(_BannerEventBox.Seperator, null)))));
|
|
67
74
|
};
|
|
68
75
|
exports.BannerEventBox = BannerEventBox;
|
|
69
76
|
var _default = exports.default = BannerEventBox;
|
|
70
77
|
BannerEventBox.defaultProps = {
|
|
71
|
-
width:
|
|
72
|
-
height:
|
|
73
|
-
banner:
|
|
74
|
-
description:
|
|
75
|
-
dates: [
|
|
78
|
+
width: "auto",
|
|
79
|
+
height: "auto",
|
|
80
|
+
banner: "Food Lion",
|
|
81
|
+
description: "Dreft Portable Pretreater Pen",
|
|
82
|
+
dates: ["2021-06-01", "2021-06-30"],
|
|
83
|
+
buttonText: "View Creative",
|
|
76
84
|
data: [{
|
|
77
|
-
name:
|
|
85
|
+
name: "Supplier",
|
|
78
86
|
items: 7
|
|
79
87
|
}, {
|
|
80
|
-
name:
|
|
88
|
+
name: "Brands",
|
|
81
89
|
items: 8
|
|
82
90
|
}, {
|
|
83
|
-
name:
|
|
91
|
+
name: "Product Lines",
|
|
84
92
|
items: 9
|
|
85
93
|
}],
|
|
86
|
-
onInfoClick: () => {}
|
|
94
|
+
onInfoClick: () => {},
|
|
95
|
+
disabled: false,
|
|
96
|
+
buttonText: "View creative"
|
|
87
97
|
};
|