sag_components 1.0.596 → 1.0.598

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/dist/stories/components/BarChartsByWeeks.style.js +1 -1
  2. package/dist/stories/components/CollapseMenuItem.js +1 -1
  3. package/dist/stories/components/Dropdown.js +57 -53
  4. package/dist/stories/components/EventList.js +13 -14
  5. package/dist/stories/components/EventList.style.js +2 -2
  6. package/dist/stories/components/EventListItem.js +8 -9
  7. package/dist/stories/components/MonthPicker.js +114 -0
  8. package/dist/stories/components/MonthPicker.style.js +18 -0
  9. package/dist/stories/components/MonthPopupPicker.js +116 -0
  10. package/dist/stories/components/QuarterPicker.js +114 -0
  11. package/dist/stories/components/QuarterPicker.style.js +18 -0
  12. package/dist/stories/components/QuarterPopupPicker.js +93 -0
  13. package/dist/stories/components/RangeDatePicker.js +137 -0
  14. package/dist/stories/components/RangePicker.js +111 -0
  15. package/dist/stories/components/RangePicker.style.js +18 -0
  16. package/dist/stories/components/Select.js +67 -44
  17. package/dist/stories/components/Select.style.js +8 -5
  18. package/dist/stories/components/TabMenu.js +18 -9
  19. package/dist/stories/components/TotalCostModal.js +143 -0
  20. package/dist/stories/components/icons/Calendar.js +20 -0
  21. package/dist/stories/components/icons/CalendarInOpen.js +26 -0
  22. package/dist/stories/components/icons/ChervronLeftIcon.js +20 -0
  23. package/dist/stories/components/icons/ChervronRightIcon.js +20 -0
  24. package/package.json +8 -7
  25. package/dist/stories/CampaignTool/PopupContent.stories.js +0 -284
  26. package/dist/stories/components/EventInfo.js +0 -92
  27. package/dist/stories/components/EventInfo.style.js +0 -20
  28. package/dist/stories/components/FilterButton.js +0 -47
  29. package/dist/stories/components/FilterButton.style.js +0 -12
@@ -15,12 +15,16 @@ const TabMenu = props => {
15
15
  tabs,
16
16
  color,
17
17
  showActions,
18
+ showFilterButton,
19
+ showViewOptionsButton,
20
+ showSearchInput,
18
21
  showLabel,
19
22
  inputWidth,
20
23
  onTabChange,
21
24
  panelIsOpen,
22
25
  activeColor,
23
- onFilterButtonClick
26
+ onFilterButtonClick,
27
+ onSearchFieldTyping
24
28
  } = props;
25
29
  const [activeTab, setActiveTab] = (0, _react.useState)(0);
26
30
  const handleTabChange = index => {
@@ -47,19 +51,20 @@ const TabMenu = props => {
47
51
  role: "presentation"
48
52
  }))), showLabel && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_TabMenu.Label, null, /*#__PURE__*/_react.default.createElement("span", null, "Platform: "), "Total"), /*#__PURE__*/_react.default.createElement("span", {
49
53
  className: "separator"
50
- }, "|")), showActions && /*#__PURE__*/_react.default.createElement(_TabMenu.ActionsWrapper, null, /*#__PURE__*/_react.default.createElement(_SagIconButton.default, {
54
+ }, "|")), showActions && /*#__PURE__*/_react.default.createElement(_TabMenu.ActionsWrapper, null, showFilterButton && /*#__PURE__*/_react.default.createElement(_SagIconButton.default, {
51
55
  id: "filterButton",
52
56
  iconName: "Filter",
53
57
  buttonText: "Filter",
54
58
  openState: panelIsOpen,
55
59
  activeColor: activeColor,
56
60
  onButtonClick: onFilterButtonClick
57
- }), /*#__PURE__*/_react.default.createElement(_SagIconButton.default, {
58
- id: "viewOptionsButton",
59
- iconName: "Options",
60
- buttonText: "View Options"
61
- }), /*#__PURE__*/_react.default.createElement(_SearchInput.default, {
62
- width: inputWidth
61
+ }), showViewOptionsButton && /*#__PURE__*/_react.default.createElement(_SagIconButton.default, {
62
+ id: "viewIndicatorButton",
63
+ iconName: "ViewIndicator",
64
+ buttonText: "View Indicator"
65
+ }), showSearchInput && /*#__PURE__*/_react.default.createElement(_SearchInput.default, {
66
+ width: inputWidth,
67
+ onTyping: e => onSearchFieldTyping(e)
63
68
  })), /*#__PURE__*/_react.default.createElement(_TabMenu.Body, {
64
69
  id: "tabsBody"
65
70
  }, tabs[activeTab] && tabs[activeTab].content));
@@ -68,6 +73,9 @@ TabMenu.defaultProps = {
68
73
  color: '#229E38',
69
74
  showActions: true,
70
75
  showLabel: true,
76
+ showFilterButton: true,
77
+ showViewOptionsButton: true,
78
+ showSearchInput: true,
71
79
  inputWidth: '100%',
72
80
  tabs: [
73
81
  // { title: 'Tab 1', content: <ReportTable /> },
@@ -81,6 +89,7 @@ TabMenu.defaultProps = {
81
89
  onTabChange: () => {},
82
90
  panelIsOpen: false,
83
91
  activeColor: '#229E38',
84
- onFilterButtonClick: () => {}
92
+ onFilterButtonClick: () => {},
93
+ onSearchFieldTyping: () => {}
85
94
  };
86
95
  var _default = exports.default = TabMenu;
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var _Modal = _interopRequireDefault(require("./Modal"));
12
+ var _CodeEditor = _interopRequireDefault(require("./CodeEditor"));
13
+ var _TextField = _interopRequireDefault(require("./TextField"));
14
+ var _Dropdown = _interopRequireDefault(require("./Dropdown"));
15
+ var _reactHookForm = require("react-hook-form");
16
+ var _Modal2 = require("./Modal.style");
17
+ var TotalCostModal = function TotalCostModal(_ref) {
18
+ var title = _ref.title,
19
+ isModalOpen = _ref.isModalOpen,
20
+ setModalOpen = _ref.setModalOpen,
21
+ setResult = _ref.setResult;
22
+ var _useState = (0, _react.useState)([{
23
+ id: "title",
24
+ label: "Title",
25
+ type: "text"
26
+ }, {
27
+ id: "dotCut",
28
+ label: "Do Cut",
29
+ type: "select",
30
+ options: ["true", "false"]
31
+ }, {
32
+ id: "currency",
33
+ label: "Currency",
34
+ type: "select",
35
+ options: ["true", "false"]
36
+ }, {
37
+ id: "currencyType",
38
+ label: "Currency Type",
39
+ type: "select",
40
+ options: ["USD", "EUR", "ILS", "GBP", "JPY"]
41
+ }, {
42
+ id: "width",
43
+ label: "Width",
44
+ type: "text"
45
+ }, {
46
+ id: "height",
47
+ label: "Height",
48
+ type: "text"
49
+ }, {
50
+ id: "textColor",
51
+ label: "Text Color",
52
+ type: "text"
53
+ }, {
54
+ id: "noDataText",
55
+ label: "No Data Text",
56
+ type: "text"
57
+ }]),
58
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
59
+ params = _useState2[0],
60
+ setParams = _useState2[1];
61
+ var _useState3 = (0, _react.useState)("Select PACKAGE_COST,REDEMPTION_COST,(PACKAGE_COST+REDEMPTION_COST) AS TOTAL_COST,from FACT_EVENT_MEASURES A INNER JOIN DIM_EVENTS B ON A.EVENT_CODE = B.EVENT_CODE"),
62
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
63
+ code = _useState4[0],
64
+ setCode = _useState4[1];
65
+ var _useForm = (0, _reactHookForm.useForm)(),
66
+ register = _useForm.register,
67
+ handleSubmit = _useForm.handleSubmit,
68
+ watch = _useForm.watch,
69
+ control = _useForm.control,
70
+ errors = _useForm.formState.errors;
71
+ var onSubmit = function onSubmit(data) {
72
+ return setResult(data);
73
+ };
74
+ return /*#__PURE__*/_react.default.createElement("form", {
75
+ onSubmit: handleSubmit(onSubmit)
76
+ }, /*#__PURE__*/_react.default.createElement(_Modal.default, {
77
+ isOpen: isModalOpen,
78
+ onClose: function onClose() {
79
+ return setModalOpen(false);
80
+ }
81
+ }, /*#__PURE__*/_react.default.createElement("h2", null, title), /*#__PURE__*/_react.default.createElement("div", {
82
+ style: {
83
+ gap: "10px",
84
+ display: "grid"
85
+ }
86
+ }, /*#__PURE__*/_react.default.createElement(_CodeEditor.default, {
87
+ value: code,
88
+ onChange: setCode
89
+ }), /*#__PURE__*/_react.default.createElement("div", {
90
+ style: {
91
+ gap: "10px",
92
+ display: "grid",
93
+ gridTemplateColumns: "auto auto auto"
94
+ }
95
+ }, params.map(function (item) {
96
+ if (item.type === "text") {
97
+ return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
98
+ control: control,
99
+ name: item.id,
100
+ render: function render(_ref2) {
101
+ var field = _ref2.field;
102
+ return /*#__PURE__*/_react.default.createElement(_TextField.default, Object.assign({}, field, {
103
+ allowedInput: "all",
104
+ height: "100%",
105
+ label: item.label,
106
+ multiline: true,
107
+ placeHolder: "Type...",
108
+ shape: "round",
109
+ size: "small",
110
+ width: "300px"
111
+ }));
112
+ }
113
+ });
114
+ } else {
115
+ return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
116
+ control: control,
117
+ name: item.id,
118
+ render: function render(_ref3) {
119
+ var field = _ref3.field;
120
+ return /*#__PURE__*/_react.default.createElement(_Dropdown.default, Object.assign({}, field, {
121
+ allowedInput: "all",
122
+ labelColor: "#1B30AA",
123
+ limitTagsOnMultiSelect: 0,
124
+ onInputChange: function onInputChange(e) {
125
+ var _e$inputValue;
126
+ console.log("e", e);
127
+ field.onChange((_e$inputValue = e === null || e === void 0 ? void 0 : e.inputValue) !== null && _e$inputValue !== void 0 ? _e$inputValue : "");
128
+ },
129
+ options: item.options,
130
+ placeHolder: "Type...",
131
+ shape: "round",
132
+ size: "small",
133
+ text: item.label,
134
+ width: "300px"
135
+ }));
136
+ }
137
+ });
138
+ }
139
+ }))), /*#__PURE__*/_react.default.createElement(_Modal2.SubmitButton, {
140
+ type: "submit"
141
+ })));
142
+ };
143
+ var _default = exports.default = TotalCostModal;
@@ -0,0 +1,20 @@
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.Calendar = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ const Calendar = () => /*#__PURE__*/_react.default.createElement("svg", {
10
+ width: "11",
11
+ height: "12",
12
+ viewBox: "0 0 11 12",
13
+ fill: "none",
14
+ xmlns: "http://www.w3.org/2000/svg"
15
+ }, /*#__PURE__*/_react.default.createElement("path", {
16
+ d: "M2.625 0C2.8125 0 3 0.1875 3 0.375V1.5H7.5V0.375C7.5 0.1875 7.66406 0 7.875 0C8.0625 0 8.25 0.1875 8.25 0.375V1.5H9C9.82031 1.5 10.5 2.17969 10.5 3V3.75V4.5V10.5C10.5 11.3438 9.82031 12 9 12H1.5C0.65625 12 0 11.3438 0 10.5V4.5V3.75V3C0 2.17969 0.65625 1.5 1.5 1.5H2.25V0.375C2.25 0.1875 2.41406 0 2.625 0ZM9.75 4.5H0.75V10.5C0.75 10.9219 1.07812 11.25 1.5 11.25H9C9.39844 11.25 9.75 10.9219 9.75 10.5V4.5ZM9 2.25H1.5C1.07812 2.25 0.75 2.60156 0.75 3V3.75H9.75V3C9.75 2.60156 9.39844 2.25 9 2.25Z",
17
+ fill: "#568202"
18
+ }));
19
+ exports.Calendar = Calendar;
20
+ var _default = exports.default = Calendar;
@@ -0,0 +1,26 @@
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.CalendarInOpen = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ const CalendarInOpen = () => /*#__PURE__*/_react.default.createElement("svg", {
10
+ width: "21",
11
+ height: "21",
12
+ viewBox: "0 0 21 21",
13
+ fill: "none",
14
+ xmlns: "http://www.w3.org/2000/svg"
15
+ }, /*#__PURE__*/_react.default.createElement("rect", {
16
+ width: "21",
17
+ height: "21",
18
+ rx: "4",
19
+ fill: "#229E38",
20
+ fillOpacity: "0.1"
21
+ }), /*#__PURE__*/_react.default.createElement("path", {
22
+ d: "M7.625 5C7.8125 5 8 5.1875 8 5.375V6.5H12.5V5.375C12.5 5.1875 12.6641 5 12.875 5C13.0625 5 13.25 5.1875 13.25 5.375V6.5H14C14.8203 6.5 15.5 7.17969 15.5 8V8.75V9.5V15.5C15.5 16.3438 14.8203 17 14 17H6.5C5.65625 17 5 16.3438 5 15.5V9.5V8.75V8C5 7.17969 5.65625 6.5 6.5 6.5H7.25V5.375C7.25 5.1875 7.41406 5 7.625 5ZM14.75 9.5H5.75V15.5C5.75 15.9219 6.07812 16.25 6.5 16.25H14C14.3984 16.25 14.75 15.9219 14.75 15.5V9.5ZM14 7.25H6.5C6.07812 7.25 5.75 7.60156 5.75 8V8.75H14.75V8C14.75 7.60156 14.3984 7.25 14 7.25Z",
23
+ fill: "#066768"
24
+ }));
25
+ exports.CalendarInOpen = CalendarInOpen;
26
+ var _default = exports.default = CalendarInOpen;
@@ -0,0 +1,20 @@
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.ChervronLeftIcon = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ const ChervronLeftIcon = () => /*#__PURE__*/_react.default.createElement("svg", {
10
+ width: "7",
11
+ height: "13",
12
+ viewBox: "0 0 7 13",
13
+ fill: "none",
14
+ xmlns: "http://www.w3.org/2000/svg"
15
+ }, /*#__PURE__*/_react.default.createElement("path", {
16
+ d: "M0.410156 5.78516L5.66016 0.5625C5.90625 0.289062 6.31641 0.289062 6.58984 0.5625C6.83594 0.808594 6.83594 1.21875 6.58984 1.46484L1.77734 6.25L6.5625 11.0625C6.83594 11.3086 6.83594 11.7188 6.5625 11.9648C6.31641 12.2383 5.90625 12.2383 5.66016 11.9648L0.410156 6.71484C0.136719 6.46875 0.136719 6.05859 0.410156 5.78516Z",
17
+ fill: "#777575"
18
+ }));
19
+ exports.ChervronLeftIcon = ChervronLeftIcon;
20
+ var _default = exports.default = ChervronLeftIcon;
@@ -0,0 +1,20 @@
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.ChervronRightIcon = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ const ChervronRightIcon = () => /*#__PURE__*/_react.default.createElement("svg", {
10
+ width: "8",
11
+ height: "13",
12
+ viewBox: "0 0 8 13",
13
+ fill: "none",
14
+ xmlns: "http://www.w3.org/2000/svg"
15
+ }, /*#__PURE__*/_react.default.createElement("path", {
16
+ d: "M7.33984 5.78516C7.58594 6.05859 7.58594 6.46875 7.33984 6.71484L2.08984 11.9648C1.81641 12.2383 1.40625 12.2383 1.16016 11.9648C0.886719 11.7188 0.886719 11.3086 1.16016 11.0625L5.94531 6.27734L1.16016 1.46484C0.886719 1.21875 0.886719 0.808594 1.16016 0.5625C1.40625 0.289062 1.81641 0.289062 2.0625 0.5625L7.33984 5.78516Z",
17
+ fill: "#777575"
18
+ }));
19
+ exports.ChervronRightIcon = ChervronRightIcon;
20
+ var _default = exports.default = ChervronRightIcon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.596",
3
+ "version": "1.0.598",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -14,9 +14,9 @@
14
14
  "author": "SAG",
15
15
  "license": "ISC",
16
16
  "devDependencies": {
17
- "@babel/cli": "^7.24.1",
17
+ "@babel/cli": "^7.24.5",
18
18
  "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
19
- "@babel/preset-env": "^7.24.4",
19
+ "@babel/preset-env": "^7.24.5",
20
20
  "@babel/preset-react": "^7.24.1",
21
21
  "@babel/preset-typescript": "^7.24.1",
22
22
  "@storybook/addon-designs": "^7.0.9",
@@ -40,7 +40,7 @@
40
40
  "eslint-plugin-import": "^2.29.1",
41
41
  "eslint-plugin-jsx-a11y": "^6.8.0",
42
42
  "eslint-plugin-react": "^7.34.1",
43
- "eslint-plugin-react-hooks": "^4.6.0",
43
+ "eslint-plugin-react-hooks": "^4.6.2",
44
44
  "react-dom": "^18.2.0",
45
45
  "react-scripts": "^5.0.1",
46
46
  "sass": "^1.74.1",
@@ -50,11 +50,12 @@
50
50
  "dependencies": {
51
51
  "@emotion/react": "^11.11.4",
52
52
  "@emotion/styled": "^11.11.5",
53
- "@mui/icons-material": "^5.15.15",
54
- "@mui/material": "^5.15.15",
53
+ "@mui/icons-material": "^5.15.16",
54
+ "@mui/material": "^5.15.16",
55
55
  "@mui/x-date-pickers": "^6.18.6",
56
56
  "classnames": "^2.3.2",
57
57
  "dayjs": "^1.11.10",
58
+ "moment": "^2.30.1",
58
59
  "prop-types": "^15.8.1",
59
60
  "react": "^18.2.0",
60
61
  "react-ace": "^10.1.0",
@@ -64,7 +65,7 @@
64
65
  "react-loading-skeleton": "^3.3.1",
65
66
  "recharts": "^2.9.2",
66
67
  "storybook": "^7.4.6",
67
- "styled-components": "^6.1.8"
68
+ "styled-components": "^6.1.9"
68
69
  },
69
70
  "browserslist": {
70
71
  "production": [
@@ -1,284 +0,0 @@
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
- };