@bento-core/paginated-table 1.0.1-ccdihub.67 → 1.0.1-ccdihub.69
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/ButtonView.js +2 -2
- package/dist/wrapper/components/DownloadManifestBtn.js +3 -1
- package/dist/wrapper/components/ReduxDownloadManifestBtn.js +16 -0
- package/package.json +1 -1
- package/src/wrapper/components/ButtonView.js +1 -1
- package/src/wrapper/components/DownloadManifestBtn.js +2 -0
- package/src/wrapper/components/ReduxDownloadManifestBtn.js +11 -0
|
@@ -7,14 +7,14 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _AddFiles = require("./AddFiles");
|
|
9
9
|
var _ReduxAddFile = _interopRequireDefault(require("./ReduxAddFile"));
|
|
10
|
-
var
|
|
10
|
+
var _ReduxDownloadManifestBtn = _interopRequireDefault(require("./ReduxDownloadManifestBtn"));
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
const ButtonView = props => {
|
|
13
13
|
const {
|
|
14
14
|
btnType
|
|
15
15
|
} = props;
|
|
16
16
|
if (_AddFiles.btnTypes.DOWNLOAD_MANIFEST === btnType) {
|
|
17
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_ReduxDownloadManifestBtn.default, props);
|
|
18
18
|
}
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ReduxAddFile.default, props));
|
|
20
20
|
};
|
|
@@ -21,11 +21,13 @@ const DownloadManifestView = props => {
|
|
|
21
21
|
const {
|
|
22
22
|
tooltipCofig,
|
|
23
23
|
clsName,
|
|
24
|
-
title
|
|
24
|
+
title,
|
|
25
|
+
cartFiles
|
|
25
26
|
} = props;
|
|
26
27
|
/**
|
|
27
28
|
* get cart state
|
|
28
29
|
*/
|
|
30
|
+
console.log('cartFiles:', cartFiles);
|
|
29
31
|
const cartContext = (0, _react.useContext)(_cart.CartContext);
|
|
30
32
|
const {
|
|
31
33
|
context
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactRedux = require("react-redux");
|
|
9
|
+
var _DownloadManifestBtn = _interopRequireDefault(require("./DownloadManifestBtn"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
const DownloadManifestRedux = props => /*#__PURE__*/_react.default.createElement(_DownloadManifestBtn.default, props);
|
|
12
|
+
const mapStateToProps = state => ({
|
|
13
|
+
cartFiles: state.cartReducer && state.cartReducer.filesId
|
|
14
|
+
});
|
|
15
|
+
var _default = (0, _reactRedux.connect)(mapStateToProps)(DownloadManifestRedux);
|
|
16
|
+
exports.default = _default;
|
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.69",
|
|
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",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { btnTypes } from './AddFiles';
|
|
3
3
|
import AddFileButtonView from './ReduxAddFile';
|
|
4
|
-
import DownloadManifestView from './
|
|
4
|
+
import DownloadManifestView from './ReduxDownloadManifestBtn';
|
|
5
5
|
|
|
6
6
|
const ButtonView = (props) => {
|
|
7
7
|
const {
|
|
@@ -12,10 +12,12 @@ const DownloadManifestView = (props) => {
|
|
|
12
12
|
tooltipCofig,
|
|
13
13
|
clsName,
|
|
14
14
|
title,
|
|
15
|
+
cartFiles,
|
|
15
16
|
} = props;
|
|
16
17
|
/**
|
|
17
18
|
* get cart state
|
|
18
19
|
*/
|
|
20
|
+
console.log('cartFiles:', cartFiles);
|
|
19
21
|
const cartContext = useContext(CartContext);
|
|
20
22
|
const { context } = cartContext;
|
|
21
23
|
const {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import DownloadManifestView from './DownloadManifestBtn';
|
|
4
|
+
|
|
5
|
+
const DownloadManifestRedux = (props) => <DownloadManifestView {...props} />;
|
|
6
|
+
|
|
7
|
+
const mapStateToProps = (state) => ({
|
|
8
|
+
cartFiles: state.cartReducer && state.cartReducer.filesId,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export default connect(mapStateToProps)(DownloadManifestRedux);
|