@bento-core/table 1.0.1-ccdihub.92 → 1.0.1-ccdihub.94

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.
@@ -30,7 +30,8 @@ const defaultTheme = () => ({
30
30
  MuiList: {
31
31
  root: {
32
32
  '&.viewColumnList': {
33
- padding: '8px 20px 8px 20px'
33
+ padding: '8px 20px 8px 20px',
34
+ bottom: '5px'
34
35
  }
35
36
  }
36
37
  },
@@ -52,7 +53,10 @@ const defaultTheme = () => ({
52
53
  MuiCheckbox: {
53
54
  root: {
54
55
  '&.checkBox': {
55
- padding: '5px 5px 5px 0px'
56
+ padding: '0px 5px 0px 0px',
57
+ position: 'absolute',
58
+ top: '0px',
59
+ left: '-10px'
56
60
  }
57
61
  }
58
62
  },
@@ -115,7 +115,7 @@ const DownloadButton = _ref => {
115
115
  width: '48px',
116
116
  height: '36px',
117
117
  paddingLeft: '5px',
118
- border: " ".concat(listDisplay === 'none' ? '0.75px solid #606060' : '1.5px solid #5666BD'),
118
+ border: "".concat(listDisplay === 'none' ? '0.75px solid #606060' : '1.5px solid #5666BD'),
119
119
  borderRadius: '5px',
120
120
  display: 'inline-block',
121
121
  position: 'relative',
@@ -126,7 +126,7 @@ const DownloadButton = _ref => {
126
126
  position: 'absolute',
127
127
  width: '60px',
128
128
  top: '38px',
129
- right: '0.5px',
129
+ left: '-13.5px',
130
130
  overflow: 'auto',
131
131
  zIndex: '5',
132
132
  border: '1.5px solid #5666BD',
@@ -146,7 +146,9 @@ const DownloadButton = _ref => {
146
146
  },
147
147
  arrowdownIcon: {
148
148
  fill: '#606060',
149
- marginTop: '2px'
149
+ marginTop: '2px',
150
+ width: '20px',
151
+ height: '20px'
150
152
  },
151
153
  arrowdownIconDisabled: {
152
154
  marginLeft: '5px',
@@ -14,6 +14,11 @@ var _Hidden_Column = _interopRequireDefault(require("./assets/Hidden_Column.svg"
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
21
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
17
22
  const ManageColumnView = _ref => {
18
23
  let {
19
24
  table,
@@ -44,7 +49,6 @@ const ManageColumnView = _ref => {
44
49
  const useOutsideAlerter = ref => {
45
50
  (0, _react.useEffect)(() => {
46
51
  function handleClickOutside(event) {
47
- console.log(event.target);
48
52
  if (!(event.target.getAttribute('id') && event.target.getAttribute('id').includes('dropdownListItem')) && !(event.target.getAttribute('class') && event.target.getAttribute('class').includes('MuiFormControlLabel'))) {
49
53
  setListDisplay('none');
50
54
  }
@@ -86,16 +90,42 @@ const ManageColumnView = _ref => {
86
90
  position: 'absolute',
87
91
  width: '230px',
88
92
  marginTop: '38px',
89
- marginLeft: '-187px',
90
- overflow: 'auto',
91
- zIndex: '5',
93
+ marginLeft: '-188px',
94
+ zIndex: '11',
92
95
  border: '1.5px solid #5666BD',
93
96
  borderRadius: '5px',
94
97
  background: '#ffffff',
95
98
  display: listDisplay
96
99
  };
100
+ const titleStyle = {
101
+ fontFamily: 'Poppins',
102
+ fontWeight: '400',
103
+ fontSize: '14px',
104
+ display: 'flex',
105
+ position: 'relative',
106
+ top: '15px',
107
+ left: '1px',
108
+ color: '#000000'
109
+ };
110
+ const textStyle = {
111
+ fontFamily: 'Poppins',
112
+ fontSize: '14px',
113
+ fontWeight: '400',
114
+ lineHeight: '1.2'
115
+ };
116
+ const dividerStyle = {
117
+ backgroundColor: '#375F9A',
118
+ marginTop: '5px',
119
+ marginBottom: '5px',
120
+ width: '110%',
121
+ position: 'relative',
122
+ right: '10px',
123
+ height: '0.5px'
124
+ };
97
125
  const arrowdownIcon = {
98
- fill: '#606060'
126
+ fill: '#606060',
127
+ width: '20px',
128
+ height: '20px'
99
129
  };
100
130
  return /*#__PURE__*/_react.default.createElement("div", {
101
131
  style: columnDropdown
@@ -120,15 +150,19 @@ const ManageColumnView = _ref => {
120
150
  style: dropdownList
121
151
  }, /*#__PURE__*/_react.default.createElement(_core.Typography, {
122
152
  variant: "caption",
123
- className: "viewColumnText"
153
+ className: "viewColumnText",
154
+ style: titleStyle
124
155
  }, manageViewColumns.title), /*#__PURE__*/_react.default.createElement(_core.IconButton, {
125
156
  onClick: handleClose,
126
157
  className: "closeIcon",
127
158
  style: {
128
- float: 'right'
159
+ float: 'right',
160
+ bottom: '20px',
161
+ scale: '0.75'
129
162
  }
130
163
  }, /*#__PURE__*/_react.default.createElement(_icons.Close, null)), /*#__PURE__*/_react.default.createElement(_core.List, {
131
- className: "viewColumnList"
164
+ className: "viewColumnList",
165
+ id: "dropdownListItemTitle"
132
166
  }, viewColumns.map((column, index) => /*#__PURE__*/_react.default.createElement(_core.ListItem, {
133
167
  width: 1,
134
168
  className: "viewColumnListItem",
@@ -147,7 +181,7 @@ const ManageColumnView = _ref => {
147
181
  checkedIcon: /*#__PURE__*/_react.default.createElement(_icons.CheckBox, {
148
182
  style: {
149
183
  fontSize: 18,
150
- color: column.hideable ? 'rgba(11, 53, 86, 1)' : 'rgba(11, 53, 86, 0.38)'
184
+ color: column.hideable ? 'rgba(109, 95, 91, 1)' : 'rgba(109, 95, 91, 0.38)'
151
185
  },
152
186
  className: "checkBoxIcon"
153
187
  }),
@@ -157,17 +191,23 @@ const ManageColumnView = _ref => {
157
191
  disabled: !column.hideable
158
192
  }),
159
193
  disabled: !column.hideable,
160
- label: column.header,
161
- id: "dropdownListItem-".concat(index, "-label")
162
- }))), /*#__PURE__*/_react.default.createElement(_core.Divider, {
194
+ label: /*#__PURE__*/_react.default.createElement(_core.Typography, {
195
+ id: "dropdownListItemLabel-".concat(index),
196
+ style: textStyle
197
+ }, column.header),
198
+ id: "dropdownListItem-".concat(index, "-label"),
199
+ className: "formControlLabel",
163
200
  style: {
164
- color: '#375F9A',
165
- marginTop: '5px',
166
- marginBottom: '5px'
201
+ marginLeft: '13px'
167
202
  }
203
+ }))), /*#__PURE__*/_react.default.createElement(_core.Divider, {
204
+ style: dividerStyle
168
205
  }), /*#__PURE__*/_react.default.createElement(_core.ListItem, {
169
206
  width: 1,
170
- className: "viewColumnListItem"
207
+ className: "viewColumnListItem",
208
+ style: {
209
+ height: '20px'
210
+ }
171
211
  }, /*#__PURE__*/_react.default.createElement(_core.FormControlLabel, {
172
212
  control: /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
173
213
  icon: /*#__PURE__*/_react.default.createElement(_icons.CheckBoxOutlineBlank, {
@@ -182,7 +222,7 @@ const ManageColumnView = _ref => {
182
222
  checkedIcon: /*#__PURE__*/_react.default.createElement(_icons.CheckBox, {
183
223
  style: {
184
224
  fontSize: 18,
185
- color: 'rgba(11, 53, 86, 1)'
225
+ color: 'rgba(109, 95, 91, 1)'
186
226
  },
187
227
  className: "checkBoxIcon"
188
228
  }),
@@ -190,7 +230,13 @@ const ManageColumnView = _ref => {
190
230
  color: "secondary",
191
231
  className: "checkBox"
192
232
  }),
193
- label: selectAll ? 'Deselect All' : 'Select All',
233
+ label: /*#__PURE__*/_react.default.createElement(_core.Typography, {
234
+ id: "dropdownListItem-all-label",
235
+ style: _objectSpread(_objectSpread({}, textStyle), {}, {
236
+ position: 'relative',
237
+ left: '25px'
238
+ })
239
+ }, selectAll ? 'Deselect All' : 'Select All'),
194
240
  id: "dropdownListItem-all-label"
195
241
  })))));
196
242
  };
@@ -224,6 +270,13 @@ const styles = () => ({
224
270
  label: {
225
271
  fontSize: '15px',
226
272
  marginLeft: '8px'
273
+ },
274
+ viewColumnListItem: {
275
+ height: '18px'
276
+ },
277
+ formControlLabel: {
278
+ marginLeft: '13px',
279
+ position: 'relative'
227
280
  }
228
281
  });
229
282
  var _default = (0, _core.withStyles)(styles)(ManageColumnView);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-ccdihub.92",
3
+ "version": "1.0.1-ccdihub.94",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "build": "npm run lint && cross-env-shell rm -rf dist && NODE_ENV=production BABEL_ENV=es babel src --out-dir dist --copy-files",
@@ -25,6 +25,7 @@ const defaultTheme = () => ({
25
25
  root: {
26
26
  '&.viewColumnList': {
27
27
  padding: '8px 20px 8px 20px',
28
+ bottom: '5px',
28
29
  },
29
30
  },
30
31
  },
@@ -46,7 +47,10 @@ const defaultTheme = () => ({
46
47
  MuiCheckbox: {
47
48
  root: {
48
49
  '&.checkBox': {
49
- padding: '5px 5px 5px 0px',
50
+ padding: '0px 5px 0px 0px',
51
+ position: 'absolute',
52
+ top: '0px',
53
+ left: '-10px',
50
54
  },
51
55
  },
52
56
  },
@@ -123,7 +123,7 @@ const DownloadButton = ({
123
123
  width: '48px',
124
124
  height: '36px',
125
125
  paddingLeft: '5px',
126
- border: ` ${listDisplay === 'none' ? '0.75px solid #606060' : '1.5px solid #5666BD'}`,
126
+ border: `${listDisplay === 'none' ? '0.75px solid #606060' : '1.5px solid #5666BD'}`,
127
127
  borderRadius: '5px',
128
128
  display: 'inline-block',
129
129
  position: 'relative',
@@ -134,7 +134,7 @@ const DownloadButton = ({
134
134
  position: 'absolute',
135
135
  width: '60px',
136
136
  top: '38px',
137
- right: '0.5px',
137
+ left: '-13.5px',
138
138
  overflow: 'auto',
139
139
  zIndex: '5',
140
140
  border: '1.5px solid #5666BD',
@@ -155,6 +155,8 @@ const DownloadButton = ({
155
155
  arrowdownIcon: {
156
156
  fill: '#606060',
157
157
  marginTop: '2px',
158
+ width: '20px',
159
+ height: '20px',
158
160
  },
159
161
  arrowdownIconDisabled: {
160
162
  marginLeft: '5px',
@@ -52,9 +52,8 @@ const ManageColumnView = ({
52
52
  const useOutsideAlerter = (ref) => {
53
53
  useEffect(() => {
54
54
  function handleClickOutside(event) {
55
- console.log(event.target);
56
55
  if (!(event.target.getAttribute('id') && event.target.getAttribute('id').includes('dropdownListItem'))
57
- && !(event.target.getAttribute('class') && event.target.getAttribute('class').includes('MuiFormControlLabel'))
56
+ && !(event.target.getAttribute('class') && event.target.getAttribute('class').includes('MuiFormControlLabel'))
58
57
  ) {
59
58
  setListDisplay('none');
60
59
  }
@@ -101,17 +100,46 @@ const ManageColumnView = ({
101
100
  position: 'absolute',
102
101
  width: '230px',
103
102
  marginTop: '38px',
104
- marginLeft: '-187px',
105
- overflow: 'auto',
106
- zIndex: '5',
103
+ marginLeft: '-188px',
104
+ zIndex: '11',
107
105
  border: '1.5px solid #5666BD',
108
106
  borderRadius: '5px',
109
107
  background: '#ffffff',
110
108
  display: listDisplay,
111
109
  };
112
110
 
111
+ const titleStyle = {
112
+ fontFamily: 'Poppins',
113
+ fontWeight: '400',
114
+ fontSize: '14px',
115
+ display: 'flex',
116
+ position: 'relative',
117
+ top: '15px',
118
+ left: '1px',
119
+ color: '#000000',
120
+ };
121
+
122
+ const textStyle = {
123
+ fontFamily: 'Poppins',
124
+ fontSize: '14px',
125
+ fontWeight: '400',
126
+ lineHeight: '1.2',
127
+ };
128
+
129
+ const dividerStyle = {
130
+ backgroundColor: '#375F9A',
131
+ marginTop: '5px',
132
+ marginBottom: '5px',
133
+ width: '110%',
134
+ position: 'relative',
135
+ right: '10px',
136
+ height: '0.5px',
137
+ };
138
+
113
139
  const arrowdownIcon = {
114
140
  fill: '#606060',
141
+ width: '20px',
142
+ height: '20px',
115
143
  };
116
144
  return (
117
145
  <div style={columnDropdown}>
@@ -125,17 +153,17 @@ const ManageColumnView = ({
125
153
  </IconButton>
126
154
  </Tooltip>
127
155
  <div style={dropdownList}>
128
- <Typography variant="caption" className="viewColumnText">
156
+ <Typography variant="caption" className="viewColumnText" style={titleStyle}>
129
157
  {manageViewColumns.title}
130
158
  </Typography>
131
159
  <IconButton
132
160
  onClick={handleClose}
133
161
  className="closeIcon"
134
- style={{ float: 'right' }}
162
+ style={{ float: 'right', bottom: '20px', scale: '0.75' }}
135
163
  >
136
164
  <Close />
137
165
  </IconButton>
138
- <List className="viewColumnList">
166
+ <List className="viewColumnList" id="dropdownListItemTitle">
139
167
  {viewColumns.map((column, index) => (
140
168
  <ListItem
141
169
  width={1}
@@ -158,7 +186,7 @@ const ManageColumnView = ({
158
186
  <CheckBoxIcon
159
187
  style={{
160
188
  fontSize: 18,
161
- color: column.hideable ? 'rgba(11, 53, 86, 1)' : 'rgba(11, 53, 86, 0.38)',
189
+ color: column.hideable ? 'rgba(109, 95, 91, 1)' : 'rgba(109, 95, 91, 0.38)',
162
190
  }}
163
191
  className="checkBoxIcon"
164
192
  />
@@ -170,15 +198,18 @@ const ManageColumnView = ({
170
198
  />
171
199
  )}
172
200
  disabled={!column.hideable}
173
- label={column.header}
201
+ label={<Typography id={`dropdownListItemLabel-${index}`} style={textStyle}>{column.header}</Typography>}
174
202
  id={`dropdownListItem-${index}-label`}
203
+ className="formControlLabel"
204
+ style={{ marginLeft: '13px' }}
175
205
  />
176
206
  </ListItem>
177
207
  ))}
178
- <Divider style={{ color: '#375F9A', marginTop: '5px', marginBottom: '5px' }} />
208
+ <Divider style={dividerStyle} />
179
209
  <ListItem
180
210
  width={1}
181
211
  className="viewColumnListItem"
212
+ style={{ height: '20px' }}
182
213
  >
183
214
  <FormControlLabel
184
215
  control={(
@@ -196,7 +227,7 @@ const ManageColumnView = ({
196
227
  <CheckBoxIcon
197
228
  style={{
198
229
  fontSize: 18,
199
- color: 'rgba(11, 53, 86, 1)',
230
+ color: 'rgba(109, 95, 91, 1)',
200
231
  }}
201
232
  className="checkBoxIcon"
202
233
  />
@@ -206,7 +237,11 @@ const ManageColumnView = ({
206
237
  className="checkBox"
207
238
  />
208
239
  )}
209
- label={selectAll ? 'Deselect All' : 'Select All'}
240
+ label={(
241
+ <Typography id="dropdownListItem-all-label" style={{ ...textStyle, position: 'relative', left: '25px' }}>
242
+ {selectAll ? 'Deselect All' : 'Select All'}
243
+ </Typography>
244
+ )}
210
245
  id="dropdownListItem-all-label"
211
246
  />
212
247
  </ListItem>
@@ -247,6 +282,13 @@ const styles = () => ({
247
282
  fontSize: '15px',
248
283
  marginLeft: '8px',
249
284
  },
285
+ viewColumnListItem: {
286
+ height: '18px',
287
+ },
288
+ formControlLabel: {
289
+ marginLeft: '13px',
290
+ position: 'relative',
291
+ },
250
292
  });
251
293
 
252
294
  export default withStyles(styles)(ManageColumnView);