@truedat/dd 4.53.1 → 4.53.2
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/CHANGELOG.md +6 -0
- package/package.json +6 -6
- package/src/components/StructureGrantCart.js +21 -19
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "4.53.
|
|
3
|
+
"version": "4.53.2",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@testing-library/jest-dom": "^5.16.4",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "4.53.
|
|
37
|
+
"@truedat/test": "4.53.2",
|
|
38
38
|
"babel-jest": "^28.1.0",
|
|
39
39
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
40
40
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -88,9 +88,9 @@
|
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"@apollo/client": "^3.6.4",
|
|
91
|
-
"@truedat/auth": "4.53.
|
|
92
|
-
"@truedat/core": "4.53.
|
|
93
|
-
"@truedat/df": "4.53.
|
|
91
|
+
"@truedat/auth": "4.53.2",
|
|
92
|
+
"@truedat/core": "4.53.2",
|
|
93
|
+
"@truedat/df": "4.53.2",
|
|
94
94
|
"lodash": "^4.17.21",
|
|
95
95
|
"path-to-regexp": "^1.7.0",
|
|
96
96
|
"prop-types": "^15.8.1",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"react-dom": ">= 16.8.6 < 17",
|
|
113
113
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "e29af66624aad6ecce065ced88c8cc2e320d67e2"
|
|
116
116
|
}
|
|
@@ -3,7 +3,6 @@ import _ from "lodash/fp";
|
|
|
3
3
|
import React, { useState, useEffect } from "react";
|
|
4
4
|
import { Link, useLocation, useHistory } from "react-router-dom";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
6
|
-
import { bindActionCreators } from "redux";
|
|
7
6
|
import { connect } from "react-redux";
|
|
8
7
|
import { useIntl } from "react-intl";
|
|
9
8
|
import {
|
|
@@ -16,9 +15,10 @@ import {
|
|
|
16
15
|
Grid,
|
|
17
16
|
Form,
|
|
18
17
|
} from "semantic-ui-react";
|
|
18
|
+
import { Loading } from "@truedat/core/components";
|
|
19
|
+
import { useOperators } from "@truedat/core/hooks";
|
|
19
20
|
import { GRANTS_REQUESTS_CHECKOUT, STRUCTURES } from "@truedat/core/routes";
|
|
20
21
|
import { FiltersGrid } from "@truedat/dq/components/ruleImplementationForm/FiltersGrid";
|
|
21
|
-
import { getRuleImplementationOperators } from "@truedat/dq/selectors/getRuleImplementationOperators";
|
|
22
22
|
import {
|
|
23
23
|
removeGrantRequestFromCart,
|
|
24
24
|
updateGrantRequestFilter,
|
|
@@ -142,22 +142,24 @@ StructureGrantCart.propTypes = {
|
|
|
142
142
|
updateGrantRequestFilter: PropTypes.func,
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
-
const
|
|
146
|
-
const {
|
|
147
|
-
return
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
authorized: _.pathOr(false, "request_grant")(userPermissions),
|
|
151
|
-
typeOperators: getRuleImplementationOperators(state),
|
|
152
|
-
};
|
|
145
|
+
export const StructureGrantCartLoader = (props) => {
|
|
146
|
+
const { data, error, loading } = useOperators();
|
|
147
|
+
if (error) return null;
|
|
148
|
+
if (loading) return <Loading />;
|
|
149
|
+
return <StructureGrantCart typeOperators={data} {...props} />;
|
|
153
150
|
};
|
|
154
|
-
const mapDispatchToProps = (dispatch) =>
|
|
155
|
-
bindActionCreators(
|
|
156
|
-
{
|
|
157
|
-
removeGrantRequestFromCart,
|
|
158
|
-
updateGrantRequestFilter,
|
|
159
|
-
},
|
|
160
|
-
dispatch
|
|
161
|
-
);
|
|
162
151
|
|
|
163
|
-
export
|
|
152
|
+
export const mapStateToProps = ({
|
|
153
|
+
structure,
|
|
154
|
+
grantRequestsCart,
|
|
155
|
+
userPermissions,
|
|
156
|
+
}) => ({
|
|
157
|
+
structure,
|
|
158
|
+
grantRequestsCart,
|
|
159
|
+
authorized: _.pathOr(false, "request_grant")(userPermissions),
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
export default connect(mapStateToProps, {
|
|
163
|
+
removeGrantRequestFromCart,
|
|
164
|
+
updateGrantRequestFilter,
|
|
165
|
+
})(StructureGrantCartLoader);
|