sag_components 1.0.629 → 1.0.630

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 (29) hide show
  1. package/.eslintrc.js +5 -1
  2. package/dist/Button.test.js +162 -0
  3. package/dist/LinkButton.test.js +150 -0
  4. package/dist/setupTests.js +3 -0
  5. package/dist/stories/CampaignTool/Card.stories.js +0 -1
  6. package/dist/stories/CampaignTool/PopupContent.stories.js +284 -0
  7. package/dist/stories/components/Button.js +163 -81
  8. package/dist/stories/components/Button.style.js +6 -3
  9. package/dist/stories/components/Datepicker.js +0 -4
  10. package/dist/stories/components/DropdownMulti.js +0 -2
  11. package/dist/stories/components/EventInfo.js +92 -0
  12. package/dist/stories/components/EventInfo.style.js +20 -0
  13. package/dist/stories/components/FilterButton.js +47 -0
  14. package/dist/stories/components/FilterButton.style.js +12 -0
  15. package/dist/stories/components/FilterPanel.js +27 -19
  16. package/dist/stories/components/LinkButton.js +161 -0
  17. package/dist/stories/components/LinkButton.style.js +14 -0
  18. package/dist/stories/components/MonthPopupPicker.js +0 -1
  19. package/dist/stories/components/PopupCharts.js +0 -1
  20. package/dist/stories/components/SagButton.js +0 -1
  21. package/dist/stories/components/Select.js +0 -1
  22. package/dist/stories/components/icons/BellIcon.js +3 -2
  23. package/dist/stories/components/icons/ExitIcon.js +3 -2
  24. package/dist/stories/components/icons/EyeIcon.js +4 -3
  25. package/dist/stories/components/icons/FlyIcon.js +3 -2
  26. package/dist/stories/components/icons/MaintenanceIcon.js +3 -2
  27. package/jest.config.js +7 -0
  28. package/package.json +7 -1
  29. package/dist/stories/components/TotalCostModal.js +0 -143
package/.eslintrc.js CHANGED
@@ -3,7 +3,7 @@ module.exports = {
3
3
  browser: true,
4
4
  es2021: true,
5
5
  },
6
- extends: 'airbnb',
6
+ extends: ['airbnb','eslint:recommended'],
7
7
  overrides: [
8
8
  {
9
9
  env: {
@@ -17,6 +17,10 @@ module.exports = {
17
17
  },
18
18
  },
19
19
  ],
20
+ plugins: [
21
+ 'react',
22
+ 'jest',
23
+ ],
20
24
  parserOptions: {
21
25
  ecmaVersion: 'latest',
22
26
  sourceType: 'module',
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _react = _interopRequireDefault(require("react"));
5
+ var _react2 = require("@testing-library/react");
6
+ var _Button = _interopRequireDefault(require("./stories/components/Button"));
7
+ require("@testing-library/jest-dom");
8
+ /* eslint-disable import/no-extraneous-dependencies */
9
+ /* eslint-disable import/no-unresolved */
10
+ /* eslint-disable no-undef */
11
+
12
+ test('Button Check text', () => {
13
+ (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Button.default, {
14
+ text: "test",
15
+ type: "primary",
16
+ size: "small",
17
+ disabled: false,
18
+ leftIcon: "none",
19
+ rightIcon: "none"
20
+ }));
21
+ const buttonElement = _react2.screen.getByText(/test/i);
22
+ expect(buttonElement).toBeInTheDocument();
23
+ });
24
+ test('Button Check type functionality: when "primary" type selected then background color must be specified as "rgb(146, 207, 23)" ', () => {
25
+ const {
26
+ container
27
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Button.default, {
28
+ text: "Button",
29
+ type: "primary",
30
+ size: "small",
31
+ disabled: false,
32
+ leftIcon: "none",
33
+ rightIcon: "none"
34
+ }));
35
+ const buttonElement = container.querySelector('.ButtonItem');
36
+ expect(buttonElement).toBeInTheDocument();
37
+ const computedStyles = getComputedStyle(buttonElement);
38
+ expect(computedStyles.getPropertyValue('background-color')).toBe('rgb(146, 207, 23)');
39
+ });
40
+ test('Button Check type functionality: when "secondary" type selected then background color must be specified as "rgb(232, 245, 235)" ', () => {
41
+ const {
42
+ container
43
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Button.default, {
44
+ text: "Button",
45
+ type: "secondary",
46
+ size: "small",
47
+ disabled: false,
48
+ leftIcon: "none",
49
+ rightIcon: "none"
50
+ }));
51
+ const buttonElement = container.querySelector('.ButtonItem');
52
+ expect(buttonElement).toBeInTheDocument();
53
+ const computedStyles = getComputedStyle(buttonElement);
54
+ expect(computedStyles.getPropertyValue('background-color')).toBe('rgb(232, 245, 235)');
55
+ });
56
+ test('Button Check disabled functionality: when disabled prop is true, button textColor should be "rgb(177, 177, 177)" ', () => {
57
+ const {
58
+ container
59
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Button.default, {
60
+ text: "Button",
61
+ type: "primary",
62
+ size: "small",
63
+ disabled: true,
64
+ leftIcon: "none",
65
+ rightIcon: "none"
66
+ }));
67
+ const buttonElement = container.querySelector('.ButtonItem');
68
+ expect(buttonElement).toBeInTheDocument();
69
+ const computedStyles = getComputedStyle(buttonElement);
70
+ expect(computedStyles.getPropertyValue('color')).toBe('rgb(177, 177, 177)');
71
+ });
72
+ test('Button Check leftIcon functionality: when "Filter" icons is specified as the leftIcon props, it should be rendered on the screen', () => {
73
+ const {
74
+ container
75
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Button.default, {
76
+ text: "Button",
77
+ type: "primary",
78
+ size: "small",
79
+ disabled: false,
80
+ leftIcon: "Filter",
81
+ rightIcon: "Exit"
82
+ }));
83
+ const elementFilter = container.querySelector('.FilterIcon');
84
+ expect(elementFilter).toBeInTheDocument();
85
+ });
86
+ test('Button Check rightIcon functionality: when "Exit" icons is specified as the rightIcon props, it should be rendered on the screen', () => {
87
+ const {
88
+ container
89
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Button.default, {
90
+ text: "Button",
91
+ type: "primary",
92
+ size: "small",
93
+ disabled: false,
94
+ leftIcon: "Filter",
95
+ rightIcon: "Exit"
96
+ }));
97
+ const elementExit = container.querySelector('.ExitIcon');
98
+ expect(elementExit).toBeInTheDocument();
99
+ });
100
+ 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', () => {
101
+ const {
102
+ container
103
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Button.default, {
104
+ text: "Button",
105
+ type: "primary",
106
+ size: "small",
107
+ disabled: false,
108
+ leftIcon: "Filter",
109
+ rightIcon: "Exit"
110
+ }));
111
+ const elementFilter = container.querySelector('.FilterIcon');
112
+ expect(elementFilter).toBeInTheDocument();
113
+ const elementExit = container.querySelector('.ExitIcon');
114
+ expect(elementExit).toBeInTheDocument();
115
+ });
116
+ test('Button Check small/medium functionality: when "small" the height must be "33px" ', () => {
117
+ const {
118
+ container
119
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Button.default, {
120
+ text: "Button",
121
+ type: "primary",
122
+ size: "small",
123
+ disabled: false,
124
+ leftIcon: "none",
125
+ rightIcon: "none"
126
+ }));
127
+ const elementButtonContainer = container.querySelector('.ButtonContainer');
128
+ expect(elementButtonContainer).toBeInTheDocument();
129
+ const computedStyle = getComputedStyle(elementButtonContainer);
130
+ expect(computedStyle.height).toBe('33px');
131
+ });
132
+ test('Button Check small/medium functionality: when "medium" the height must be "45px" ', () => {
133
+ const {
134
+ container
135
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Button.default, {
136
+ text: "Button",
137
+ type: "primary",
138
+ size: "medium",
139
+ disabled: false
140
+ }));
141
+ const elementButtonContainer = container.querySelector('.ButtonContainer');
142
+ expect(elementButtonContainer).toBeInTheDocument();
143
+ const computedStyle = getComputedStyle(elementButtonContainer);
144
+ expect(computedStyle.height).toBe('45px');
145
+ });
146
+ test('Button Check specific height and width functionality: when height = 100px and width = 200px it should override small/medium functionality ', () => {
147
+ const {
148
+ container
149
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Button.default, {
150
+ text: "Button",
151
+ type: "primary",
152
+ size: "small",
153
+ disabled: false,
154
+ height: "100px",
155
+ width: "200px"
156
+ }));
157
+ const elementButtonContainer = container.querySelector('.ButtonContainer');
158
+ expect(elementButtonContainer).toBeInTheDocument();
159
+ const computedStyle = getComputedStyle(elementButtonContainer);
160
+ expect(computedStyle.height).toBe('100px');
161
+ expect(computedStyle.width).toBe('200px');
162
+ });
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _react = _interopRequireDefault(require("react"));
5
+ var _react2 = require("@testing-library/react");
6
+ var _LinkButton = _interopRequireDefault(require("./stories/components/LinkButton"));
7
+ require("@testing-library/jest-dom");
8
+ /* eslint-disable import/no-extraneous-dependencies */
9
+ /* eslint-disable import/no-unresolved */
10
+ /* eslint-disable no-undef */
11
+
12
+ test('LinkButton Check text', () => {
13
+ (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
14
+ text: "test",
15
+ type: "secondary",
16
+ size: "small",
17
+ disabled: false
18
+ }));
19
+ const buttonElement = _react2.screen.getByText(/test/i);
20
+ expect(buttonElement).toBeInTheDocument();
21
+ });
22
+ test('LinkButton Check type functionality: when "primary" type selected then text color must be specified as "rgb(146, 207, 23)" ', () => {
23
+ const {
24
+ container
25
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
26
+ text: "LinkButton",
27
+ type: "primary",
28
+ size: "small",
29
+ disabled: false
30
+ }));
31
+ const buttonElement = container.querySelector('.LinkButtonItem');
32
+ expect(buttonElement).toBeInTheDocument();
33
+ const computedStyles = getComputedStyle(buttonElement);
34
+ expect(computedStyles.color).toBe('rgb(34, 158, 56)');
35
+ });
36
+ test('LinkButton Check type functionality: when "secondary" type selected then background color must be specified as "rgb(232, 245, 235)" ', () => {
37
+ const {
38
+ container
39
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
40
+ text: "LinkButton",
41
+ type: "secondary",
42
+ size: "small",
43
+ disabled: false
44
+ }));
45
+ const buttonElement = container.querySelector('.LinkButtonItem');
46
+ expect(buttonElement).toBeInTheDocument();
47
+ const computedStyles = getComputedStyle(buttonElement);
48
+ expect(computedStyles.color).toBe('rgb(33, 33, 33)');
49
+ });
50
+ test('LinkButton Check disabled functionality: when disabled prop is true, button textColor should be "rgb(177, 177, 177)" ', () => {
51
+ const {
52
+ container
53
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
54
+ text: "LinkButton",
55
+ type: "primary",
56
+ size: "small",
57
+ disabled: true
58
+ }));
59
+ const buttonElement = container.querySelector('.LinkButtonItem');
60
+ expect(buttonElement).toBeInTheDocument();
61
+ const computedStyles = getComputedStyle(buttonElement);
62
+ expect(computedStyles.color).toBe('rgb(177, 177, 177)');
63
+ });
64
+ 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', () => {
65
+ const {
66
+ container
67
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
68
+ text: "LinkButton",
69
+ type: "primary",
70
+ size: "small",
71
+ disabled: false,
72
+ leftIcon: "Filter",
73
+ rightIcon: "Exit"
74
+ }));
75
+ const elementFilter = container.querySelector('.FilterIcon');
76
+ expect(elementFilter).toBeInTheDocument();
77
+ const elementExit = container.querySelector('.ExitIcon');
78
+ expect(elementExit).toBeInTheDocument();
79
+ });
80
+ test('LinkButton Check rightIcon functionality: when "Exit" icons is specified as the rightIcon props, it should be rendered on the screen', () => {
81
+ const {
82
+ container
83
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
84
+ text: "LinkButton",
85
+ type: "primary",
86
+ size: "small",
87
+ disabled: false,
88
+ rightIcon: "Exit"
89
+ }));
90
+ const elementExit = container.querySelector('.ExitIcon');
91
+ expect(elementExit).toBeInTheDocument();
92
+ });
93
+ test('LinkButton Check leftIcon functionality: when "Filter" icons is specified as the leftIcon props, it should be rendered on the screen', () => {
94
+ const {
95
+ container
96
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
97
+ text: "LinkButton",
98
+ type: "primary",
99
+ size: "small",
100
+ disabled: false,
101
+ leftIcon: "Filter"
102
+ }));
103
+ const elementFilter = container.querySelector('.FilterIcon');
104
+ expect(elementFilter).toBeInTheDocument();
105
+ });
106
+ test('LinkButton Check small/medium functionality: when "small" the font-size must be "14px" ', () => {
107
+ const {
108
+ container
109
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
110
+ text: "LinkButton",
111
+ type: "primary",
112
+ size: "small",
113
+ disabled: false
114
+ }));
115
+ const elementLinkButtonContainer = container.querySelector('.LinkButtonItem');
116
+ expect(elementLinkButtonContainer).toBeInTheDocument();
117
+ const computedStyle = getComputedStyle(elementLinkButtonContainer);
118
+ expect(computedStyle.fontSize).toBe('14px');
119
+ });
120
+ test('LinkButton Check small/medium functionality: when "medium" the font-size must be "16px" ', () => {
121
+ const {
122
+ container
123
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
124
+ text: "LinkButton",
125
+ type: "primary",
126
+ size: "medium",
127
+ disabled: false
128
+ }));
129
+ const elementLinkButtonContainer = container.querySelector('.LinkButtonItem');
130
+ expect(elementLinkButtonContainer).toBeInTheDocument();
131
+ const computedStyle = getComputedStyle(elementLinkButtonContainer);
132
+ expect(computedStyle.fontSize).toBe('16px');
133
+ });
134
+ test('LinkButton Check specific height and width functionality: when height = 100px and width = 200px it should override small/medium functionality ', () => {
135
+ const {
136
+ container
137
+ } = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_LinkButton.default, {
138
+ text: "LinkButton",
139
+ type: "primary",
140
+ size: "small",
141
+ disabled: false,
142
+ height: "100px",
143
+ width: "200px"
144
+ }));
145
+ const elementLinkButtonContainer = container.querySelector('.LinkButtonContainer');
146
+ expect(elementLinkButtonContainer).toBeInTheDocument();
147
+ const computedStyle = getComputedStyle(elementLinkButtonContainer);
148
+ expect(computedStyle.height).toBe('100px');
149
+ expect(computedStyle.width).toBe('200px');
150
+ });
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ require("@testing-library/jest-dom");
@@ -85,7 +85,6 @@ var _default = exports.default = {
85
85
  // },
86
86
  }
87
87
  };
88
-
89
88
  const Template = args => /*#__PURE__*/_react.default.createElement(_Card.default, args);
90
89
  const SingleCard = exports.SingleCard = Template.bind({});
91
90
  _Card.default.args = {
@@ -0,0 +1,284 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = exports.ExamplePopupContent = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _PopupContent = _interopRequireDefault(require("../components/CampaignTool/PopupContent"));
10
+ const FieldsDataRow1 = [{
11
+ name: "FundationSource",
12
+ label: "Fundation Source",
13
+ disabled: false,
14
+ required: false,
15
+ inputType: "dropdown",
16
+ //aviliable values: textbox | dropdown | checkBox | datepicker
17
+ showInfo: true,
18
+ infoText: "This is one of the Popup content's fields",
19
+ placeHolder: "Select Source",
20
+ dropdownOptions: [{
21
+ value: 1,
22
+ label: "Source 1"
23
+ }, {
24
+ value: 2,
25
+ label: "Source 2"
26
+ }, {
27
+ value: 3,
28
+ label: "Source 3"
29
+ }],
30
+ dropdownDefaultValue: null
31
+ }, {
32
+ name: "Category",
33
+ label: "Category",
34
+ disabled: false,
35
+ required: false,
36
+ inputType: "dropdown",
37
+ //aviliable values: textbox | dropdown | checkBox | datepicker
38
+ showInfo: true,
39
+ infoText: "This is one of the Popup content's fields",
40
+ placeHolder: "Select Category",
41
+ dropdownOptions: [{
42
+ value: 1,
43
+ label: "Category 1"
44
+ }, {
45
+ value: 2,
46
+ label: "Category 2"
47
+ }, {
48
+ value: 3,
49
+ label: "Category 3"
50
+ }],
51
+ dropdownDefaultValue: null
52
+ }, {
53
+ name: "Supplier",
54
+ label: "Supplier",
55
+ disabled: false,
56
+ required: false,
57
+ inputType: "dropdown",
58
+ //aviliable values: textbox | dropdown | checkBox | datepicker
59
+ showInfo: true,
60
+ infoText: "This is one of the Popup content's fields",
61
+ placeHolder: "Select Supplier",
62
+ dropdownOptions: [{
63
+ value: 1,
64
+ label: "Supplier 1"
65
+ }, {
66
+ value: 2,
67
+ label: "Supplier 2"
68
+ }, {
69
+ value: 3,
70
+ label: "Supplier 3"
71
+ }],
72
+ dropdownDefaultValue: null
73
+ }, {
74
+ name: "ContactName",
75
+ label: "Contact Name",
76
+ disabled: false,
77
+ required: false,
78
+ inputType: "textbox",
79
+ //aviliable values: textbox | dropdown | checkBox | datepicker
80
+ showInfo: true,
81
+ infoText: "This is one of the Popup content's fields",
82
+ placeHolder: "Enter Contact Name",
83
+ dropdownOptions: null,
84
+ dropdownDefaultValue: null
85
+ }];
86
+ const FieldsDataRow2 = [{
87
+ name: "BrandName",
88
+ label: "Brand Name",
89
+ disabled: false,
90
+ required: false,
91
+ inputType: "dropdown",
92
+ //aviliable values: textbox | dropdown | checkBox | datepicker
93
+ showInfo: true,
94
+ infoText: "This is one of the Popup content's fields",
95
+ placeHolder: "Select Brand",
96
+ dropdownOptions: [{
97
+ value: 1,
98
+ label: "Brand 1"
99
+ }, {
100
+ value: 2,
101
+ label: "Brand 2"
102
+ }, {
103
+ value: 3,
104
+ label: "Brand 3"
105
+ }],
106
+ dropdownDefaultValue: null
107
+ }, {
108
+ name: "Budget",
109
+ label: "Budget",
110
+ disabled: false,
111
+ required: false,
112
+ inputType: "dropdown",
113
+ //aviliable values: textbox | dropdown | checkBox | datepicker
114
+ showInfo: true,
115
+ infoText: "This is one of the Popup content's fields",
116
+ placeHolder: "Select Budget",
117
+ dropdownOptions: [{
118
+ value: 1,
119
+ label: "Budget 1"
120
+ }, {
121
+ value: 2,
122
+ label: "Budget 2"
123
+ }, {
124
+ value: 3,
125
+ label: "Budget 3"
126
+ }],
127
+ dropdownDefaultValue: {
128
+ value: 1,
129
+ label: "Budget 1"
130
+ }
131
+ }, {
132
+ name: "CategoryManager",
133
+ label: "Category Manager",
134
+ disabled: false,
135
+ required: false,
136
+ inputType: "dropdown",
137
+ //aviliable values: textbox | dropdown | checkBox | datepicker
138
+ showInfo: true,
139
+ infoText: "This is one of the Popup content's fields",
140
+ placeHolder: "Select Category Manager",
141
+ dropdownOptions: [{
142
+ value: 1,
143
+ label: "Category Manager 1"
144
+ }, {
145
+ value: 2,
146
+ label: "Category Manager 2"
147
+ }, {
148
+ value: 3,
149
+ label: "Category Manager 3"
150
+ }],
151
+ dropdownDefaultValue: {
152
+ value: 3,
153
+ label: "Category Manager 3"
154
+ }
155
+ }, {
156
+ name: "ContactEmail",
157
+ label: "Contact Email",
158
+ disabled: false,
159
+ required: false,
160
+ inputType: "textbox",
161
+ //aviliable values: textbox | dropdown | checkBox | datepicker
162
+ showInfo: true,
163
+ infoText: "This is one of the Popup content's fields",
164
+ placeHolder: "Enter Contact Email",
165
+ dropdownOptions: null,
166
+ dropdownDefaultValue: null
167
+ }];
168
+ const FieldsDataRow3 = [{
169
+ name: "Broker",
170
+ label: "Broker",
171
+ disabled: false,
172
+ required: false,
173
+ inputType: "dropdown",
174
+ //aviliable values: textbox | dropdown | checkBox | datepicker
175
+ showInfo: true,
176
+ infoText: "This is one of the Popup content's fields",
177
+ placeHolder: "Select Broker",
178
+ dropdownOptions: [{
179
+ value: 1,
180
+ label: "Broker 1"
181
+ }, {
182
+ value: 2,
183
+ label: "Broker 2"
184
+ }, {
185
+ value: 3,
186
+ label: "Broker 3"
187
+ }],
188
+ dropdownDefaultValue: null
189
+ }, {
190
+ name: "SupplierOfferID",
191
+ label: "Supplier Offer ID",
192
+ disabled: false,
193
+ required: false,
194
+ inputType: "textbox",
195
+ //aviliable values: textbox | dropdown | checkBox | datepicker
196
+ showInfo: true,
197
+ infoText: "This is one of the Popup content's fields",
198
+ placeHolder: "Enter Supplier Offer ID",
199
+ dropdownOptions: null,
200
+ dropdownDefaultValue: null
201
+ }, {
202
+ name: "VendorID",
203
+ label: "Vendor ID",
204
+ disabled: false,
205
+ required: false,
206
+ inputType: "textbox",
207
+ //aviliable values: textbox | dropdown | checkBox | datepicker
208
+ showInfo: true,
209
+ infoText: "This is one of the Popup content's fields",
210
+ placeHolder: "Enter Vendor ID",
211
+ dropdownOptions: null,
212
+ dropdownDefaultValue: null
213
+ }, {
214
+ name: "ContactPhone",
215
+ label: "Contact Phone",
216
+ disabled: false,
217
+ required: true,
218
+ inputType: "textbox",
219
+ //aviliable values: textbox | dropdown | checkBox | datepicker
220
+ showInfo: true,
221
+ infoText: "This is one of the Popup content's fields",
222
+ placeHolder: "Enter Contact Phone",
223
+ dropdownOptions: null,
224
+ dropdownDefaultValue: null
225
+ }];
226
+ const RowsData1 = [{
227
+ fieldsArray: FieldsDataRow1
228
+ }, {
229
+ fieldsArray: FieldsDataRow2
230
+ }, {
231
+ fieldsArray: FieldsDataRow3
232
+ }];
233
+ var _default = exports.default = {
234
+ title: "Campaign Tool/PopupContent",
235
+ component: _PopupContent.default,
236
+ tags: ["autodocs"],
237
+ argTypes: {
238
+ FieldsData: {
239
+ name: "FieldsData",
240
+ control: {
241
+ type: "object"
242
+ },
243
+ description: " object: to fill kpi columns and buttons "
244
+ },
245
+ width: {
246
+ name: "width",
247
+ control: {
248
+ type: "text"
249
+ },
250
+ description: "width of the control (in px / %)"
251
+ },
252
+ height: {
253
+ name: "height",
254
+ control: {
255
+ type: "text"
256
+ },
257
+ description: "height of the control (in px / % )"
258
+ },
259
+ onClick: {
260
+ action: "onClick",
261
+ description: "onClick event - returns an object of check box {true/false} "
262
+ },
263
+ onChange: {
264
+ action: "onChange",
265
+ description: "onChange event "
266
+ },
267
+ borderColor: {
268
+ name: "borderColor",
269
+ description: "Sets the border color",
270
+ control: {
271
+ type: "color",
272
+ presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
273
+ }
274
+ }
275
+ }
276
+ };
277
+ const Template = args => /*#__PURE__*/_react.default.createElement(_PopupContent.default, args);
278
+ const ExamplePopupContent = exports.ExamplePopupContent = Template.bind({});
279
+ ExamplePopupContent.args = {
280
+ rowsData: RowsData1,
281
+ borderColor: "#066768",
282
+ width: "100%",
283
+ height: "100%"
284
+ };