diff --git a/client-admin/src/components/conversation-admin/comment-moderation/comment.js b/client-admin/src/components/conversation-admin/comment-moderation/comment.js index 659bc91eb..d6ef2131d 100644 --- a/client-admin/src/components/conversation-admin/comment-moderation/comment.js +++ b/client-admin/src/components/conversation-admin/comment-moderation/comment.js @@ -95,8 +95,4 @@ Comment.propTypes = { currentItem: PropTypes.bool } -export default connect((state) => { - return { - conversation: state.zid_metadata.zid_metadata - } -})(Comment) +export default connect((state) => ({ conversation: state.zid_metadata.zid_metadata }))(Comment) diff --git a/client-admin/src/components/conversation-admin/comment-moderation/moderate-comments-accepted.js b/client-admin/src/components/conversation-admin/comment-moderation/moderate-comments-accepted.js index dca84a5a9..fc9408273 100644 --- a/client-admin/src/components/conversation-admin/comment-moderation/moderate-comments-accepted.js +++ b/client-admin/src/components/conversation-admin/comment-moderation/moderate-comments-accepted.js @@ -73,8 +73,4 @@ ModerateCommentsAccepted.propTypes = { accepted_comments: PropTypes.arrayOf(PropTypes.object) } -const mapStateToProps = (state) => ({ - dispatch: state.mod_comments_accepted.dispatch, - accepted_comments: state.mod_comments_accepted.accepted_comments, -}); -export default connect(mapStateToProps)(ModerateCommentsAccepted) \ No newline at end of file +export default connect((state) => state.mod_comments_accepted)(ModerateCommentsAccepted) diff --git a/client-admin/src/components/conversation-admin/comment-moderation/moderate-comments-rejected.js b/client-admin/src/components/conversation-admin/comment-moderation/moderate-comments-rejected.js index 5b29681a0..60c88a273 100644 --- a/client-admin/src/components/conversation-admin/comment-moderation/moderate-comments-rejected.js +++ b/client-admin/src/components/conversation-admin/comment-moderation/moderate-comments-rejected.js @@ -73,8 +73,5 @@ ModerateCommentsRejected.propTypes = { dispatch: PropTypes.func, rejected_comments: PropTypes.arrayOf(PropTypes.object) } -const mapStateToProps = (state) => ({ - dispatch: state.mod_comments_rejected.dispatch, - rejected_comments: state.mod_comments_rejected.rejected_comments, -}); -export default connect(mapStateToProps)(ModerateCommentsRejected) + +export default connect((state) => state.mod_comments_rejected)(ModerateCommentsRejected) diff --git a/client-admin/src/components/conversation-admin/comment-moderation/moderate-comments-todo.js b/client-admin/src/components/conversation-admin/comment-moderation/moderate-comments-todo.js index 5a0073cd0..54578c101 100644 --- a/client-admin/src/components/conversation-admin/comment-moderation/moderate-comments-todo.js +++ b/client-admin/src/components/conversation-admin/comment-moderation/moderate-comments-todo.js @@ -90,9 +90,4 @@ ModerateCommentsTodo.propTypes = { unmoderated_comments: PropTypes.arrayOf(PropTypes.object) } -const mapStateToProps = (state) => ({ - dispatch: state.mod_comments_unmoderated.dispatch, - unmoderated_comments: state.mod_comments_unmoderated.unmoderated_comments, -}); - -export default connect(mapStateToProps)(ModerateCommentsTodo) \ No newline at end of file +export default connect((state) => state.mod_comments_unmoderated)(ModerateCommentsTodo) diff --git a/client-admin/src/components/conversation-admin/seed-tweet.js b/client-admin/src/components/conversation-admin/seed-tweet.js index bde75e479..9e0cd4fd2 100644 --- a/client-admin/src/components/conversation-admin/seed-tweet.js +++ b/client-admin/src/components/conversation-admin/seed-tweet.js @@ -22,7 +22,6 @@ const styles = { } @connect((state) => state.seed_comments_tweet) -@Radium class ModerateCommentsSeed extends React.Component { constructor(props) { super(props) @@ -134,6 +133,7 @@ ModerateCommentsSeed.propTypes = { }) } +ModerateCommentsSeed = Radium(ModerateCommentsSeed) export default ModerateCommentsSeed /* diff --git a/client-admin/src/components/landers/createuser.js b/client-admin/src/components/landers/createuser.js index 5fc58d344..179c3d956 100644 --- a/client-admin/src/components/landers/createuser.js +++ b/client-admin/src/components/landers/createuser.js @@ -12,7 +12,7 @@ import strings from '../../strings/strings' const fbAppId = process.env.FB_APP_ID -@connect((state) => state.signin) +// @connect((state) => state.signin) class Createuser extends React.Component { getDest() { return this.props.location.pathname.slice('/createuser'.length) @@ -224,5 +224,6 @@ class Createuser extends React.Component { ) } } +Createuser = connect((state) => state.signin)(Createuser) export default Createuser diff --git a/client-admin/src/components/landers/signin.js b/client-admin/src/components/landers/signin.js index e16bbf30a..7f0b1a04a 100644 --- a/client-admin/src/components/landers/signin.js +++ b/client-admin/src/components/landers/signin.js @@ -12,7 +12,7 @@ import strings from '../../strings/strings' const fbAppId = process.env.FB_APP_ID -@connect((state) => state.signin) +//@connect((state) => state.signin) class SignIn extends React.Component { // eslint-disable-next-line node/handle-callback-err static getDerivedStateFromError(error) { @@ -186,5 +186,5 @@ class SignIn extends React.Component { ) } } - +SignIn = connect((state) => state.signin)(SignIn) export default SignIn diff --git a/client-admin/src/components/landers/signout.js b/client-admin/src/components/landers/signout.js index 8f9f6c440..a43f2a2dd 100644 --- a/client-admin/src/components/landers/signout.js +++ b/client-admin/src/components/landers/signout.js @@ -8,7 +8,7 @@ import { Heading } from 'theme-ui' import { doSignout } from '../../actions' -@connect((state) => state.signout) +// @connect((state) => state.signout) class SignOut extends React.Component { componentDidMount() { this.props.dispatch(doSignout('/home')) @@ -29,4 +29,5 @@ SignOut.propTypes = { dispatch: PropTypes.func } +SignOut = connect((state) => state.signout)(SignOut) export default SignOut diff --git a/client-participation/vis2/components/curate.js b/client-participation/vis2/components/curate.js index aee626d62..d356d5a11 100644 --- a/client-participation/vis2/components/curate.js +++ b/client-participation/vis2/components/curate.js @@ -2,7 +2,7 @@ import _ from "lodash"; import React from "react"; import * as globals from "./globals"; -class Button extends React.Component { +export class Button extends React.Component { handleClick() { this.props.handleCurateButtonClick(this.props.identifier) @@ -29,7 +29,7 @@ class Button extends React.Component { } } -class Curate extends React.Component { +export class Curate extends React.Component { constructor(props) { super(props); diff --git a/client-participation/vis2/components/exploreTid.js b/client-participation/vis2/components/exploreTid.js index ddd2521e0..09839f8a1 100644 --- a/client-participation/vis2/components/exploreTid.js +++ b/client-participation/vis2/components/exploreTid.js @@ -6,7 +6,7 @@ import BarChart from "./barChart"; const checkmark = "M1299 813l-422 422q-19 19-45 19t-45-19l-294-294q-19-19-19-45t19-45l102-102q19-19 45-19t45 19l147 147 275-275q19-19 45-19t45 19l102 102q19 19 19 45t-19 45zm141 83q0-148-73-273t-198-198-273-73-273 73-198 198-73 273 73 273 198 198 273 73 273-73 198-198 73-273zm224 0q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"; const ban = "M1440 893q0-161-87-295l-754 753q137 89 297 89 111 0 211.5-43.5t173.5-116.5 116-174.5 43-212.5zm-999 299l755-754q-135-91-300-91-148 0-273 73t-198 199-73 274q0 162 89 299zm1223-299q0 157-61 300t-163.5 246-245 164-298.5 61-298.5-61-245-164-163.5-246-61-300 61-299.5 163.5-245.5 245-164 298.5-61 298.5 61 245 164 163.5 245.5 61 299.5z"; -const DataSentence = ({ math, selectedTidCuration, selectedComment, repfulFor, Strings }) => { +export const DataSentence = ({math, selectedTidCuration, selectedComment, repfulFor, Strings}) => { let markup = null; @@ -93,7 +93,7 @@ const DataSentence = ({ math, selectedTidCuration, selectedComment, repfulFor, S return markup; } -class ExploreTid extends React.Component { +export class ExploreTid extends React.Component { handleAgree() { this.props.onVoteClicked({ diff --git a/client-participation/vis2/components/graphComments.js b/client-participation/vis2/components/graphComments.js index 2613bccc7..0ab90297f 100644 --- a/client-participation/vis2/components/graphComments.js +++ b/client-participation/vis2/components/graphComments.js @@ -4,7 +4,7 @@ import * as globals from "./globals"; /* https://bl.ocks.org/mbostock/2206590 */ -class GraphComment extends React.Component { +export class GraphComment extends React.Component { getRectX() { let x = -7; @@ -54,7 +54,7 @@ class GraphComment extends React.Component { } } -class GraphComments extends React.Component { +export class GraphComments extends React.Component { drawComments() { let shouldShowOnlyOneGroup = _.isNumber(this.props.showOnlyGroup); diff --git a/client-participation/vis2/components/graphParticipants.js b/client-participation/vis2/components/graphParticipants.js index 7eb36895d..4008406f1 100644 --- a/client-participation/vis2/components/graphParticipants.js +++ b/client-participation/vis2/components/graphParticipants.js @@ -3,7 +3,7 @@ import _ from "lodash"; import * as globals from "./globals"; import {VictoryAnimation} from "victory-core"; -const Participant = ({ptpt, tweenX, tweenY}) => { +export const Participant = ({ptpt, tweenX, tweenY}) => { let picSize = ptpt.picture_size; return ( { ); } -const Bucket = ({pt}) => { +export const Bucket = ({pt}) => { return @@ -19,7 +19,7 @@ class Hull extends React.Component { } }; -class Hulls extends React.Component { +export class Hulls extends React.Component { render () { const line = d3.line(); // .curve(d3.curveBasis); return ( diff --git a/client-participation/vis2/components/hullLabels.js b/client-participation/vis2/components/hullLabels.js index 7ed00f4ba..0d62f258c 100644 --- a/client-participation/vis2/components/hullLabels.js +++ b/client-participation/vis2/components/hullLabels.js @@ -11,7 +11,7 @@ const getBackgroundRectWidth = (ptptCount) => { return width; } -const Users = ({selectedGroup}) => { +export const Users = ({selectedGroup}) => { return ( @@ -24,7 +24,7 @@ const Users = ({selectedGroup}) => { ) } -const Label = ({ptptCount, centroid, gid, selectedGroup, handleClick}) => { +export const Label = ({ptptCount, centroid, gid, selectedGroup, handleClick}) => { return ( { ) } -const HullLabels = ({groups, centroids, selectedGroup, handleClick}) => { +export const HullLabels = ({groups, centroids, selectedGroup, handleClick}) => { if (!centroids || !groups) { return null } diff --git a/client-participation/vis2/components/tidCarousel.js b/client-participation/vis2/components/tidCarousel.js index 3eb3532d9..f16693ece 100644 --- a/client-participation/vis2/components/tidCarousel.js +++ b/client-participation/vis2/components/tidCarousel.js @@ -2,7 +2,7 @@ import React from "react"; import * as globals from "./globals"; import _ from "lodash"; -class PaginateButton extends React.Component { +export class PaginateButton extends React.Component { render() { return ( @@ -27,7 +27,7 @@ class PaginateButton extends React.Component { } -class TidCarousel extends React.Component { +export class TidCarousel extends React.Component { constructor(props) { super(props); diff --git a/client-participation/vis2/vis2.js b/client-participation/vis2/vis2.js index 3418af01a..f1640824e 100644 --- a/client-participation/vis2/vis2.js +++ b/client-participation/vis2/vis2.js @@ -22,7 +22,7 @@ import ReactDOM from 'react-dom'; -class Root extends React.Component { +export class Root extends React.Component { render() { let comments = this.props.comments; diff --git a/client-report/package-lock.json b/client-report/package-lock.json index 403178bc9..03cd0b551 100644 --- a/client-report/package-lock.json +++ b/client-report/package-lock.json @@ -9,9 +9,15 @@ "version": "0.0.2", "dependencies": { "color": "~4.2.3", - "d3": "~7.9.0", + "d3-array": "^3.2.4", + "d3-axis": "^3.0.0", "d3-contour": "^4.0.2", + "d3-force": "^3.0.0", + "d3-geo": "^3.1.1", + "d3-scale": "^4.0.2", "d3-scale-chromatic": "~3.1.0", + "d3-selection": "^3.0.0", + "d3-shape": "^3.2.0", "d3-voronoi": "^1.1.4", "hull.js": "~0.2.11", "jquery": "~3.6.3", @@ -3475,50 +3481,11 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" }, - "node_modules/d3": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz", - "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==", - "dependencies": { - "d3-array": "3", - "d3-axis": "3", - "d3-brush": "3", - "d3-chord": "3", - "d3-color": "3", - "d3-contour": "4", - "d3-delaunay": "6", - "d3-dispatch": "3", - "d3-drag": "3", - "d3-dsv": "3", - "d3-ease": "3", - "d3-fetch": "3", - "d3-force": "3", - "d3-format": "3", - "d3-geo": "3", - "d3-hierarchy": "3", - "d3-interpolate": "3", - "d3-path": "3", - "d3-polygon": "3", - "d3-quadtree": "3", - "d3-random": "3", - "d3-scale": "4", - "d3-scale-chromatic": "3", - "d3-selection": "3", - "d3-shape": "3", - "d3-time": "3", - "d3-time-format": "4", - "d3-timer": "3", - "d3-transition": "3", - "d3-zoom": "3" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/d3-array": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "license": "ISC", "dependencies": { "internmap": "1 - 2" }, @@ -3530,32 +3497,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz", "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-brush": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz", - "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-drag": "2 - 3", - "d3-interpolate": "1 - 3", - "d3-selection": "3", - "d3-transition": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-chord": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz", - "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==", - "dependencies": { - "d3-path": "1 - 3" - }, + "license": "ISC", "engines": { "node": ">=12" } @@ -3579,17 +3521,6 @@ "node": ">=12" } }, - "node_modules/d3-delaunay": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz", - "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==", - "dependencies": { - "delaunator": "5" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/d3-dispatch": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", @@ -3598,84 +3529,11 @@ "node": ">=12" } }, - "node_modules/d3-drag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", - "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-selection": "3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-dsv": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", - "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==", - "dependencies": { - "commander": "7", - "iconv-lite": "0.6", - "rw": "1" - }, - "bin": { - "csv2json": "bin/dsv2json.js", - "csv2tsv": "bin/dsv2dsv.js", - "dsv2dsv": "bin/dsv2dsv.js", - "dsv2json": "bin/dsv2json.js", - "json2csv": "bin/json2dsv.js", - "json2dsv": "bin/json2dsv.js", - "json2tsv": "bin/json2dsv.js", - "tsv2csv": "bin/dsv2dsv.js", - "tsv2json": "bin/dsv2json.js" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-dsv/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/d3-dsv/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/d3-ease": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", - "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", - "engines": { - "node": ">=12" - } - }, - "node_modules/d3-fetch": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz", - "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==", - "dependencies": { - "d3-dsv": "1 - 3" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/d3-force": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz", "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==", + "license": "ISC", "dependencies": { "d3-dispatch": "1 - 3", "d3-quadtree": "1 - 3", @@ -3697,6 +3555,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz", "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==", + "license": "ISC", "dependencies": { "d3-array": "2.5.0 - 3" }, @@ -3704,14 +3563,6 @@ "node": ">=12" } }, - "node_modules/d3-hierarchy": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", - "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", - "engines": { - "node": ">=12" - } - }, "node_modules/d3-interpolate": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", @@ -3731,14 +3582,6 @@ "node": ">=12" } }, - "node_modules/d3-polygon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz", - "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==", - "engines": { - "node": ">=12" - } - }, "node_modules/d3-quadtree": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz", @@ -3747,18 +3590,11 @@ "node": ">=12" } }, - "node_modules/d3-random": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz", - "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==", - "engines": { - "node": ">=12" - } - }, "node_modules/d3-scale": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "license": "ISC", "dependencies": { "d3-array": "2.10.0 - 3", "d3-format": "1 - 3", @@ -3786,6 +3622,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", + "license": "ISC", "engines": { "node": ">=12" } @@ -3794,6 +3631,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", "dependencies": { "d3-path": "^3.1.0" }, @@ -3831,44 +3669,11 @@ "node": ">=12" } }, - "node_modules/d3-transition": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", - "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", - "dependencies": { - "d3-color": "1 - 3", - "d3-dispatch": "1 - 3", - "d3-ease": "1 - 3", - "d3-interpolate": "1 - 3", - "d3-timer": "1 - 3" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "d3-selection": "2 - 3" - } - }, "node_modules/d3-voronoi": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/d3-voronoi/-/d3-voronoi-1.1.4.tgz", "integrity": "sha512-dArJ32hchFsrQ8uMiTBLq256MpnZjeuBtdHpaDlYuQyjU0CVzCJl/BVW+SkszaAeH95D/8gxqAhgx0ouAWAfRg==" }, - "node_modules/d3-zoom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz", - "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==", - "dependencies": { - "d3-dispatch": "1 - 3", - "d3-drag": "2 - 3", - "d3-interpolate": "1 - 3", - "d3-selection": "2 - 3", - "d3-transition": "2 - 3" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -3946,14 +3751,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delaunator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.0.1.tgz", - "integrity": "sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==", - "dependencies": { - "robust-predicates": "^3.0.2" - } - }, "node_modules/depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -7691,11 +7488,6 @@ "node": ">=0.10.0" } }, - "node_modules/robust-predicates": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", - "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==" - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -7719,11 +7511,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/rw": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -7761,7 +7548,8 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "node_modules/scheduler": { "version": "0.20.2", diff --git a/client-report/package.json b/client-report/package.json index ed7b5492a..f15e720ff 100644 --- a/client-report/package.json +++ b/client-report/package.json @@ -33,9 +33,15 @@ }, "dependencies": { "color": "~4.2.3", - "d3": "~7.9.0", + "d3-array": "^3.2.4", + "d3-axis": "^3.0.0", "d3-contour": "^4.0.2", + "d3-force": "^3.0.0", + "d3-geo": "^3.1.1", + "d3-scale": "^4.0.2", "d3-scale-chromatic": "~3.1.0", + "d3-selection": "^3.0.0", + "d3-shape": "^3.2.0", "d3-voronoi": "^1.1.4", "hull.js": "~0.2.11", "jquery": "~3.6.3", diff --git a/client-report/src/COMPONENT_TEMPLATE.js b/client-report/src/COMPONENT_TEMPLATE.js index 5ff28037f..642348814 100644 --- a/client-report/src/COMPONENT_TEMPLATE.js +++ b/client-report/src/COMPONENT_TEMPLATE.js @@ -12,7 +12,6 @@ import PropTypes from "prop-types"; // @connect(state => { // return state.FOO; // }) -@Radium class ComponentName extends React.Component { constructor(props) { super(props); @@ -52,6 +51,7 @@ class ComponentName extends React.Component { } } +ComponentName = Radium(ComponentName); export default ComponentName; /* diff --git a/client-report/src/components/beeswarm/beeswarm.js b/client-report/src/components/beeswarm/beeswarm.js index ffaba7004..919d36934 100644 --- a/client-report/src/components/beeswarm/beeswarm.js +++ b/client-report/src/components/beeswarm/beeswarm.js @@ -4,9 +4,11 @@ import React from "react"; import CommentList from "../lists/commentList"; import * as globals from "../globals"; import _ from "lodash"; -import { scaleLinear, extent, forceSimulation, forceX, forceY, forceCollide } from 'd3' import { voronoi as d3voronoi } from "d3-voronoi"; +import { scaleLinear } from "d3-scale"; +import { extent } from "d3-array"; +import { forceCollide, forceSimulation, forceX, forceY } from "d3-force"; // import Flex from "../framework/flex" diff --git a/client-report/src/components/boxPlot/drawBoxPlot.js b/client-report/src/components/boxPlot/drawBoxPlot.js index d907e87b7..3a1649cfd 100644 --- a/client-report/src/components/boxPlot/drawBoxPlot.js +++ b/client-report/src/components/boxPlot/drawBoxPlot.js @@ -1,7 +1,9 @@ // Copyright (C) 2012-present, The Authors. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . import "./lib"; -import { select, scaleBand, axisBottom, scaleLinear, axisLeft } from "d3"; +import { select } from "d3-selection"; +import { scaleBand, scaleLinear } from "d3-scale"; +import { axisBottom, axisLeft } from "d3-axis"; import { polisBox } from "./lib"; /********************************************************************* diff --git a/client-report/src/components/boxPlot/lib.js b/client-report/src/components/boxPlot/lib.js index 1d98f3968..ded420a79 100644 --- a/client-report/src/components/boxPlot/lib.js +++ b/client-report/src/components/boxPlot/lib.js @@ -1,6 +1,8 @@ // Copyright (C) 2012-present, The Authors. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . -import { ascending, select, range, scaleLinear, quantile } from "d3"; +import { ascending, quantile, range } from "d3-array"; +import { scaleLinear } from "d3-scale"; +import { select } from "d3-selection"; function functor(v) { return typeof v === "function" ? v : function () { diff --git a/client-report/src/components/comment.js b/client-report/src/components/comment.js index 064802fce..782407e89 100644 --- a/client-report/src/components/comment.js +++ b/client-report/src/components/comment.js @@ -8,7 +8,6 @@ import Flex from "./flex"; import * as globals from "./globals"; import BarChart from "./barChart"; -@Radium class Comment extends React.Component { static propTypes = { dispatch: PropTypes.func, @@ -74,6 +73,7 @@ class Comment extends React.Component { } } + Comment = Radium(Comment); export default Comment; //

{this.props.comment.demographics.gender}

diff --git a/client-report/src/components/correlationMatrix/matrix.js b/client-report/src/components/correlationMatrix/matrix.js index 55c5bda3a..daa3a53bc 100644 --- a/client-report/src/components/correlationMatrix/matrix.js +++ b/client-report/src/components/correlationMatrix/matrix.js @@ -4,7 +4,8 @@ import React from "react"; import _ from "lodash"; import * as globals from "../globals"; -import { interpolatePuOr, scaleLinear } from "d3"; +import { interpolatePuOr } from "d3-scale-chromatic"; +import { scaleLinear } from "d3-scale"; var leftOffset = 34; var topOffset = 60; diff --git a/client-report/src/components/lists/commentList.js b/client-report/src/components/lists/commentList.js index 722eeaaf1..3c76b607f 100644 --- a/client-report/src/components/lists/commentList.js +++ b/client-report/src/components/lists/commentList.js @@ -4,7 +4,7 @@ import React from "react"; import _ from "lodash"; import * as globals from "../globals"; -const BarChartCompact = ({ comment, voteCounts, nMembers, voteColors }) => { +export const BarChartCompact = ({ comment, voteCounts, nMembers, voteColors }) => { if (!comment) return null; let w = 100; @@ -77,7 +77,7 @@ const BarChartCompact = ({ comment, voteCounts, nMembers, voteColors }) => { ); }; -const CommentRow = ({ comment, groups, voteColors }) => { +export const CommentRow = ({ comment, groups, voteColors }) => { if (!comment) { console.error("WHY IS THERE NO COMMENT 3452354235", comment); return null; diff --git a/client-report/src/components/participantsGraph/hull.js b/client-report/src/components/participantsGraph/hull.js index f8ffb7538..1f3b01ef2 100644 --- a/client-report/src/components/participantsGraph/hull.js +++ b/client-report/src/components/participantsGraph/hull.js @@ -2,7 +2,7 @@ import React from "react"; // import * as globals from "../globals"; -import { curveLinear, line } from "d3"; +import { curveLinear, line } from "d3-shape"; const Hull = ({hull}) => { const curveLine = line().curve(curveLinear); diff --git a/client-report/src/components/participantsGraph/participantsGraph.js b/client-report/src/components/participantsGraph/participantsGraph.js index d799e7aa0..08291d5e2 100644 --- a/client-report/src/components/participantsGraph/participantsGraph.js +++ b/client-report/src/components/participantsGraph/participantsGraph.js @@ -5,7 +5,8 @@ import _ from "lodash"; import * as globals from "../globals"; import graphUtil from "../../util/graphUtil"; import Axes from "../graphAxes"; -import { scaleSequential, geoPath } from 'd3' +import { scaleSequential } from "d3-scale"; +import { geoPath } from 'd3-geo'; import { contourDensity } from "d3-contour"; import { interpolateYlGnBu } from "d3-scale-chromatic"; // import GroupLabels from "./groupLabels"; diff --git a/client-report/src/util/graphUtil.js b/client-report/src/util/graphUtil.js index 95e7cc621..b7bbe4610 100644 --- a/client-report/src/util/graphUtil.js +++ b/client-report/src/util/graphUtil.js @@ -2,7 +2,7 @@ import * as globals from "../components/globals"; import createHull from "hull.js"; -import { scaleLinear } from 'd3' +import { scaleLinear } from "d3-scale"; const graphUtil = (comments, math, badTids) => {