@bento-core/paginated-table 1.0.1-ccdihub.95 → 1.0.1-ccdihub.96
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 +4 -3
- package/dist/wrapper/components/AddSelectedFiles/AddSelectedFilesController.js +4 -3
- package/package.json +2 -2
- package/src/wrapper/components/AddAllFiles/AddAllView.js +4 -3
- package/src/wrapper/components/AddSelectedFiles/AddSelectedFilesController.js +4 -3
|
@@ -82,8 +82,9 @@ const AddAllFilesComponent = props => {
|
|
|
82
82
|
variables: activeFilters,
|
|
83
83
|
query: addFileQuery
|
|
84
84
|
});
|
|
85
|
+
const upperLimit = 200000;
|
|
85
86
|
const cartCount = cartFiles.length;
|
|
86
|
-
if (fileCount <=
|
|
87
|
+
if (fileCount <= upperLimit && cartCount < upperLimit) {
|
|
87
88
|
fileIds().then(response => {
|
|
88
89
|
const data = response[responseKeys[0]];
|
|
89
90
|
if (data && data.length > 0) {
|
|
@@ -97,12 +98,12 @@ const AddAllFilesComponent = props => {
|
|
|
97
98
|
return acc;
|
|
98
99
|
}, []);
|
|
99
100
|
const ids = [...new Set(idsInitial)];
|
|
100
|
-
if (cartCount + ids.length <=
|
|
101
|
+
if (cartCount + ids.length <= upperLimit) {
|
|
101
102
|
setOpen(true);
|
|
102
103
|
setAddFilesId(ids);
|
|
103
104
|
} else {
|
|
104
105
|
const duplicate = checkDuplicate(cartFiles, ids);
|
|
105
|
-
if (cartCount + ids.length - duplicate <=
|
|
106
|
+
if (cartCount + ids.length - duplicate <= upperLimit) {
|
|
106
107
|
setOpen(true);
|
|
107
108
|
setAddFilesId(ids);
|
|
108
109
|
} else {
|
|
@@ -61,14 +61,15 @@ const AddSelectedFilesController = props => {
|
|
|
61
61
|
const idsInitial = response[responseKeys[0]] || [];
|
|
62
62
|
const ids = [...new Set(idsInitial)];
|
|
63
63
|
const fileCount = ids.length;
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
const upperLimit = 200000;
|
|
65
|
+
if (fileCount <= upperLimit && cartCount < upperLimit) {
|
|
66
|
+
if (cartCount + fileCount <= upperLimit) {
|
|
66
67
|
addFiles(ids);
|
|
67
68
|
setOpenSnackbar(true);
|
|
68
69
|
dispatch((0, _Actions.onRowSeclect)([]));
|
|
69
70
|
} else {
|
|
70
71
|
const duplicate = checkDuplicate(cartFiles, ids);
|
|
71
|
-
if (cartCount + fileCount - duplicate <=
|
|
72
|
+
if (cartCount + fileCount - duplicate <= upperLimit) {
|
|
72
73
|
addFiles(ids);
|
|
73
74
|
setOpenSnackbar(true);
|
|
74
75
|
dispatch((0, _Actions.onRowSeclect)([]));
|
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.96",
|
|
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",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@bento-core/cart": "1.0.1-ccdihub.7",
|
|
19
|
-
"@bento-core/table": "1.0.1-ccdihub.
|
|
19
|
+
"@bento-core/table": "1.0.1-ccdihub.73",
|
|
20
20
|
"@bento-core/tool-tip": "^1.0.0",
|
|
21
21
|
"@bento-core/util": "^1.0.0"
|
|
22
22
|
},
|
|
@@ -76,8 +76,9 @@ const AddAllFilesComponent = (props) => {
|
|
|
76
76
|
variables: activeFilters,
|
|
77
77
|
query: addFileQuery,
|
|
78
78
|
});
|
|
79
|
+
const upperLimit = 200000;
|
|
79
80
|
const cartCount = cartFiles.length;
|
|
80
|
-
if (fileCount <=
|
|
81
|
+
if (fileCount <= upperLimit && cartCount < upperLimit) {
|
|
81
82
|
fileIds().then((response) => {
|
|
82
83
|
const data = response[responseKeys[0]];
|
|
83
84
|
if (data && data.length > 0) {
|
|
@@ -91,12 +92,12 @@ const AddAllFilesComponent = (props) => {
|
|
|
91
92
|
return acc;
|
|
92
93
|
}, []);
|
|
93
94
|
const ids = [...new Set(idsInitial)];
|
|
94
|
-
if (cartCount + ids.length <=
|
|
95
|
+
if (cartCount + ids.length <= upperLimit) {
|
|
95
96
|
setOpen(true);
|
|
96
97
|
setAddFilesId(ids);
|
|
97
98
|
} else {
|
|
98
99
|
const duplicate = checkDuplicate(cartFiles, ids);
|
|
99
|
-
if (cartCount + ids.length - duplicate <=
|
|
100
|
+
if (cartCount + ids.length - duplicate <= upperLimit) {
|
|
100
101
|
setOpen(true);
|
|
101
102
|
setAddFilesId(ids);
|
|
102
103
|
} else {
|
|
@@ -52,14 +52,15 @@ const AddSelectedFilesController = (props) => {
|
|
|
52
52
|
const idsInitial = response[responseKeys[0]] || [];
|
|
53
53
|
const ids = [...new Set(idsInitial)];
|
|
54
54
|
const fileCount = ids.length;
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
const upperLimit = 200000;
|
|
56
|
+
if (fileCount <= upperLimit && cartCount < upperLimit) {
|
|
57
|
+
if (cartCount + fileCount <= upperLimit) {
|
|
57
58
|
addFiles(ids);
|
|
58
59
|
setOpenSnackbar(true);
|
|
59
60
|
dispatch(onRowSeclect([]));
|
|
60
61
|
} else {
|
|
61
62
|
const duplicate = checkDuplicate(cartFiles, ids);
|
|
62
|
-
if (cartCount + fileCount - duplicate <=
|
|
63
|
+
if (cartCount + fileCount - duplicate <= upperLimit) {
|
|
63
64
|
addFiles(ids);
|
|
64
65
|
setOpenSnackbar(true);
|
|
65
66
|
dispatch(onRowSeclect([]));
|