@bento-core/table 1.0.1-ccdihub.93 → 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: '
|
|
56
|
+
padding: '0px 5px 0px 0px',
|
|
57
|
+
position: 'absolute',
|
|
58
|
+
top: '0px',
|
|
59
|
+
left: '-10px'
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
},
|
|
@@ -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
|
}
|
|
@@ -87,7 +91,6 @@ const ManageColumnView = _ref => {
|
|
|
87
91
|
width: '230px',
|
|
88
92
|
marginTop: '38px',
|
|
89
93
|
marginLeft: '-188px',
|
|
90
|
-
overflow: 'auto',
|
|
91
94
|
zIndex: '11',
|
|
92
95
|
border: '1.5px solid #5666BD',
|
|
93
96
|
borderRadius: '5px',
|
|
@@ -107,7 +110,17 @@ const ManageColumnView = _ref => {
|
|
|
107
110
|
const textStyle = {
|
|
108
111
|
fontFamily: 'Poppins',
|
|
109
112
|
fontSize: '14px',
|
|
110
|
-
fontWeight: '400'
|
|
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'
|
|
111
124
|
};
|
|
112
125
|
const arrowdownIcon = {
|
|
113
126
|
fill: '#606060',
|
|
@@ -182,13 +195,13 @@ const ManageColumnView = _ref => {
|
|
|
182
195
|
id: "dropdownListItemLabel-".concat(index),
|
|
183
196
|
style: textStyle
|
|
184
197
|
}, column.header),
|
|
185
|
-
id: "dropdownListItem-".concat(index, "-label")
|
|
186
|
-
|
|
198
|
+
id: "dropdownListItem-".concat(index, "-label"),
|
|
199
|
+
className: "formControlLabel",
|
|
187
200
|
style: {
|
|
188
|
-
|
|
189
|
-
marginTop: '5px',
|
|
190
|
-
marginBottom: '5px'
|
|
201
|
+
marginLeft: '13px'
|
|
191
202
|
}
|
|
203
|
+
}))), /*#__PURE__*/_react.default.createElement(_core.Divider, {
|
|
204
|
+
style: dividerStyle
|
|
192
205
|
}), /*#__PURE__*/_react.default.createElement(_core.ListItem, {
|
|
193
206
|
width: 1,
|
|
194
207
|
className: "viewColumnListItem",
|
|
@@ -219,7 +232,10 @@ const ManageColumnView = _ref => {
|
|
|
219
232
|
}),
|
|
220
233
|
label: /*#__PURE__*/_react.default.createElement(_core.Typography, {
|
|
221
234
|
id: "dropdownListItem-all-label",
|
|
222
|
-
style: textStyle
|
|
235
|
+
style: _objectSpread(_objectSpread({}, textStyle), {}, {
|
|
236
|
+
position: 'relative',
|
|
237
|
+
left: '25px'
|
|
238
|
+
})
|
|
223
239
|
}, selectAll ? 'Deselect All' : 'Select All'),
|
|
224
240
|
id: "dropdownListItem-all-label"
|
|
225
241
|
})))));
|
|
@@ -254,6 +270,13 @@ const styles = () => ({
|
|
|
254
270
|
label: {
|
|
255
271
|
fontSize: '15px',
|
|
256
272
|
marginLeft: '8px'
|
|
273
|
+
},
|
|
274
|
+
viewColumnListItem: {
|
|
275
|
+
height: '18px'
|
|
276
|
+
},
|
|
277
|
+
formControlLabel: {
|
|
278
|
+
marginLeft: '13px',
|
|
279
|
+
position: 'relative'
|
|
257
280
|
}
|
|
258
281
|
});
|
|
259
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.
|
|
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",
|
package/src/DefaultThemConfig.js
CHANGED
|
@@ -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: '
|
|
50
|
+
padding: '0px 5px 0px 0px',
|
|
51
|
+
position: 'absolute',
|
|
52
|
+
top: '0px',
|
|
53
|
+
left: '-10px',
|
|
50
54
|
},
|
|
51
55
|
},
|
|
52
56
|
},
|
|
@@ -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
|
-
|
|
56
|
+
&& !(event.target.getAttribute('class') && event.target.getAttribute('class').includes('MuiFormControlLabel'))
|
|
58
57
|
) {
|
|
59
58
|
setListDisplay('none');
|
|
60
59
|
}
|
|
@@ -102,7 +101,6 @@ const ManageColumnView = ({
|
|
|
102
101
|
width: '230px',
|
|
103
102
|
marginTop: '38px',
|
|
104
103
|
marginLeft: '-188px',
|
|
105
|
-
overflow: 'auto',
|
|
106
104
|
zIndex: '11',
|
|
107
105
|
border: '1.5px solid #5666BD',
|
|
108
106
|
borderRadius: '5px',
|
|
@@ -125,6 +123,17 @@ const ManageColumnView = ({
|
|
|
125
123
|
fontFamily: 'Poppins',
|
|
126
124
|
fontSize: '14px',
|
|
127
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',
|
|
128
137
|
};
|
|
129
138
|
|
|
130
139
|
const arrowdownIcon = {
|
|
@@ -191,10 +200,12 @@ const ManageColumnView = ({
|
|
|
191
200
|
disabled={!column.hideable}
|
|
192
201
|
label={<Typography id={`dropdownListItemLabel-${index}`} style={textStyle}>{column.header}</Typography>}
|
|
193
202
|
id={`dropdownListItem-${index}-label`}
|
|
203
|
+
className="formControlLabel"
|
|
204
|
+
style={{ marginLeft: '13px' }}
|
|
194
205
|
/>
|
|
195
206
|
</ListItem>
|
|
196
207
|
))}
|
|
197
|
-
<Divider style={
|
|
208
|
+
<Divider style={dividerStyle} />
|
|
198
209
|
<ListItem
|
|
199
210
|
width={1}
|
|
200
211
|
className="viewColumnListItem"
|
|
@@ -227,7 +238,7 @@ const ManageColumnView = ({
|
|
|
227
238
|
/>
|
|
228
239
|
)}
|
|
229
240
|
label={(
|
|
230
|
-
<Typography id="dropdownListItem-all-label" style={textStyle}>
|
|
241
|
+
<Typography id="dropdownListItem-all-label" style={{ ...textStyle, position: 'relative', left: '25px' }}>
|
|
231
242
|
{selectAll ? 'Deselect All' : 'Select All'}
|
|
232
243
|
</Typography>
|
|
233
244
|
)}
|
|
@@ -271,6 +282,13 @@ const styles = () => ({
|
|
|
271
282
|
fontSize: '15px',
|
|
272
283
|
marginLeft: '8px',
|
|
273
284
|
},
|
|
285
|
+
viewColumnListItem: {
|
|
286
|
+
height: '18px',
|
|
287
|
+
},
|
|
288
|
+
formControlLabel: {
|
|
289
|
+
marginLeft: '13px',
|
|
290
|
+
position: 'relative',
|
|
291
|
+
},
|
|
274
292
|
});
|
|
275
293
|
|
|
276
294
|
export default withStyles(styles)(ManageColumnView);
|