@bento-core/paginated-table 1.0.1-ccdihub.49 → 1.0.1-ccdihub.50
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/wrapper/components/AddAllFiles/AddAllView.js +11 -9
- package/dist/wrapper/components/AddFiles.js +5 -2
- package/dist/wrapper/components/ReduxAddFile.js +2 -1
- package/package.json +1 -1
- package/src/wrapper/components/AddAllFiles/AddAllView.js +10 -8
- package/src/wrapper/components/AddFiles.js +3 -0
- package/src/wrapper/components/ReduxAddFile.js +1 -0
|
@@ -54,7 +54,9 @@ const AddAllFilesComponent = props => {
|
|
|
54
54
|
setOpenSnackbar,
|
|
55
55
|
client,
|
|
56
56
|
tooltipCofig,
|
|
57
|
-
fileCount
|
|
57
|
+
fileCount,
|
|
58
|
+
cartCount,
|
|
59
|
+
cartFiles
|
|
58
60
|
} = props;
|
|
59
61
|
/**
|
|
60
62
|
* conditionally display dialog view
|
|
@@ -73,9 +75,11 @@ const AddAllFilesComponent = props => {
|
|
|
73
75
|
query: addFileQuery
|
|
74
76
|
});
|
|
75
77
|
if (fileCount <= 6000) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
console.log('!!!!!!!cartCount:', cartCount);
|
|
79
|
+
console.log('!!!!!!!!cartFiles:', cartFiles);
|
|
80
|
+
if (cartCount + fileCount <= 6000) {
|
|
81
|
+
fileIds().then(response => {
|
|
82
|
+
const data = response[responseKeys[0]];
|
|
79
83
|
const isArray = Array.isArray(data[0][responseKeys[1]]);
|
|
80
84
|
const ids = data.reduce((acc, id) => {
|
|
81
85
|
if (id && id[responseKeys[1]]) {
|
|
@@ -87,11 +91,9 @@ const AddAllFilesComponent = props => {
|
|
|
87
91
|
}, []);
|
|
88
92
|
setOpen(true);
|
|
89
93
|
setAddFilesId(ids);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return [];
|
|
94
|
-
});
|
|
94
|
+
return [];
|
|
95
|
+
});
|
|
96
|
+
}
|
|
95
97
|
} else {
|
|
96
98
|
setAlterDisplay(true);
|
|
97
99
|
}
|
|
@@ -28,7 +28,8 @@ const AddFilesView = props => {
|
|
|
28
28
|
const {
|
|
29
29
|
btnType,
|
|
30
30
|
count,
|
|
31
|
-
alertMessage
|
|
31
|
+
alertMessage,
|
|
32
|
+
cartFiles
|
|
32
33
|
} = props;
|
|
33
34
|
/**
|
|
34
35
|
* snackbar state
|
|
@@ -50,7 +51,9 @@ const AddFilesView = props => {
|
|
|
50
51
|
})), btnTypes.ADD_ALL_FILES === btnType && /*#__PURE__*/_react.default.createElement(_AddAllView.default, _extends({}, props, {
|
|
51
52
|
client: client,
|
|
52
53
|
setAlterDisplay: setAlterDisplay,
|
|
53
|
-
setOpenSnackbar: setOpenSnackbar
|
|
54
|
+
setOpenSnackbar: setOpenSnackbar,
|
|
55
|
+
cartCount: count,
|
|
56
|
+
cartFiles: cartFiles
|
|
54
57
|
})), /*#__PURE__*/_react.default.createElement(_Snackbar.default, {
|
|
55
58
|
open: openSnackbar,
|
|
56
59
|
count: count,
|
|
@@ -15,7 +15,8 @@ const AddFilesRedux = props => /*#__PURE__*/_react.default.createElement(_AddFil
|
|
|
15
15
|
* create query variable with actie filters
|
|
16
16
|
*/
|
|
17
17
|
const mapStateToProps = state => ({
|
|
18
|
-
count: state.cartReducer && state.cartReducer.count
|
|
18
|
+
count: state.cartReducer && state.cartReducer.count,
|
|
19
|
+
cartFiles: state.cartReducer && state.cartReducer.filesId
|
|
19
20
|
});
|
|
20
21
|
const mapDispatchToProps = dispatch => ({
|
|
21
22
|
addFiles: files => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bento-core/paginated-table",
|
|
3
|
-
"version": "1.0.1-ccdihub.
|
|
3
|
+
"version": "1.0.1-ccdihub.50",
|
|
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",
|
|
@@ -48,6 +48,8 @@ const AddAllFilesComponent = (props) => {
|
|
|
48
48
|
client,
|
|
49
49
|
tooltipCofig,
|
|
50
50
|
fileCount,
|
|
51
|
+
cartCount,
|
|
52
|
+
cartFiles,
|
|
51
53
|
} = props;
|
|
52
54
|
/**
|
|
53
55
|
* conditionally display dialog view
|
|
@@ -66,9 +68,11 @@ const AddAllFilesComponent = (props) => {
|
|
|
66
68
|
query: addFileQuery,
|
|
67
69
|
});
|
|
68
70
|
if (fileCount <= 6000) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
console.log('!!!!!!!cartCount:', cartCount);
|
|
72
|
+
console.log('!!!!!!!!cartFiles:', cartFiles);
|
|
73
|
+
if (cartCount + fileCount <= 6000) {
|
|
74
|
+
fileIds().then((response) => {
|
|
75
|
+
const data = response[responseKeys[0]];
|
|
72
76
|
const isArray = Array.isArray(data[0][responseKeys[1]]);
|
|
73
77
|
const ids = data.reduce((acc, id) => {
|
|
74
78
|
if (id && id[responseKeys[1]]) {
|
|
@@ -80,11 +84,9 @@ const AddAllFilesComponent = (props) => {
|
|
|
80
84
|
}, []);
|
|
81
85
|
setOpen(true);
|
|
82
86
|
setAddFilesId(ids);
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return [];
|
|
87
|
-
});
|
|
87
|
+
return [];
|
|
88
|
+
});
|
|
89
|
+
}
|
|
88
90
|
} else {
|
|
89
91
|
setAlterDisplay(true);
|
|
90
92
|
}
|
|
@@ -19,6 +19,7 @@ const AddFilesView = (props) => {
|
|
|
19
19
|
btnType,
|
|
20
20
|
count,
|
|
21
21
|
alertMessage,
|
|
22
|
+
cartFiles,
|
|
22
23
|
} = props;
|
|
23
24
|
/**
|
|
24
25
|
* snackbar state
|
|
@@ -53,6 +54,8 @@ const AddFilesView = (props) => {
|
|
|
53
54
|
client={client}
|
|
54
55
|
setAlterDisplay={setAlterDisplay}
|
|
55
56
|
setOpenSnackbar={setOpenSnackbar}
|
|
57
|
+
cartCount={count}
|
|
58
|
+
cartFiles={cartFiles}
|
|
56
59
|
/>
|
|
57
60
|
)
|
|
58
61
|
}
|
|
@@ -10,6 +10,7 @@ const AddFilesRedux = (props) => <AddFiles {...props} />;
|
|
|
10
10
|
*/
|
|
11
11
|
const mapStateToProps = (state) => ({
|
|
12
12
|
count: state.cartReducer && state.cartReducer.count,
|
|
13
|
+
cartFiles: state.cartReducer && state.cartReducer.filesId,
|
|
13
14
|
});
|
|
14
15
|
|
|
15
16
|
const mapDispatchToProps = (dispatch) => ({
|