diff --git a/README.md b/README.md index 68006a1..af12918 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![Release Version](https://img.shields.io/github/tag/topcoder-platform/topcoder-payment-tool.svg) Based on -[`topcoder-react-starter`](https://www.npmjs.com/package/topcoder-react-starter). +[`topcoder-react-starter`](https://github.com/topcoder-platform/topcoder-react-starter). To install, test, and run in development mode: ```bash diff --git a/__tests__/shared/__snapshots__/index.jsx.snap b/__tests__/shared/__snapshots__/index.jsx.snap index 39b6cee..0ff3283 100644 --- a/__tests__/shared/__snapshots__/index.jsx.snap +++ b/__tests__/shared/__snapshots__/index.jsx.snap @@ -7,6 +7,7 @@ exports[`Matches shallow snapshot 1`] = ` title="Topcoder Payment Tool" /> + `; @@ -17,6 +18,7 @@ exports[`Matches shallow snapshot in dev mode 1`] = ` title="Topcoder Payment Tool" /> + `; diff --git a/__tests__/shared/reducers/__snapshots__/index.js.snap b/__tests__/shared/reducers/__snapshots__/index.js.snap index 2c995f0..7791d76 100644 --- a/__tests__/shared/reducers/__snapshots__/index.js.snap +++ b/__tests__/shared/reducers/__snapshots__/index.js.snap @@ -64,6 +64,14 @@ Object { "sandbox": Object { "payments": Object { "editor": Object { + "challengeTechnologyTags": Array [], + "copilot": "", + "copilotInputKeyword": "", + "copilotInputPopupVisible": false, + "copilotInputSelected": Object {}, + "copilotPaymentAmount": 0, + "copilotSuggestions": Array [], + "getCopilotSuggestionsForKeyword": "", "getMemberSuggestionsForKeyword": "", "memberInputKeyword": "", "memberInputPopupVisible": false, @@ -76,8 +84,11 @@ Object { "paymentTitle": "", "selectedBillingAccountId": 0, "selectedProjectId": 0, + "submissionGuidelines": "", + "technologyTags": Array [], }, "listing": Object { + "hasActiveBillingAccount": true, "selectedProjectId": 0, }, }, diff --git a/package-lock.json b/package-lock.json index 961e34a..8cade82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -176,6 +176,29 @@ "integrity": "sha512-LAQ1d4OPfSJ/BMbI2DuizmYrrkD9JMaTdi2hQTlI53lQ4kRQPyZQRS4CYQ7O66bnBBnP/oYdRxbk++X0xuFU6A==", "dev": true }, + "@types/invariant": { + "version": "2.2.29", + "resolved": "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.29.tgz", + "integrity": "sha512-lRVw09gOvgviOfeUrKc/pmTiRZ7g7oDOU6OAutyuSHpm1/o2RaBQvRhgK8QEdu+FFuw/wnWb29A/iuxv9i8OpQ==" + }, + "@types/lodash": { + "version": "4.14.116", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.116.tgz", + "integrity": "sha512-lRnAtKnxMXcYYXqOiotTmJd74uawNWuPnsnPrrO7HiFuE3npE2iQhfABatbYDyxTNqZNuXzcKGhw37R7RjBFLg==" + }, + "@types/node": { + "version": "8.10.26", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.26.tgz", + "integrity": "sha512-opk6bLLErLSwyVVJeSH5Ek7ZWOBSsN0JrvXTNVGLXLAXKB9xlTYajrplR44xVyMrmbut94H6uJ9jqzM/12jxkA==" + }, + "@types/redux": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@types/redux/-/redux-3.6.0.tgz", + "integrity": "sha1-8evh5UEVGAcuT9/KXHbhbnTBOZo=", + "requires": { + "redux": "3.7.2" + } + }, "@webassemblyjs/ast": { "version": "1.5.12", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.5.12.tgz", @@ -711,7 +734,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, "requires": { "sprintf-js": "1.0.3" } @@ -994,6 +1016,11 @@ } } }, + "autobind-decorator": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/autobind-decorator/-/autobind-decorator-2.1.0.tgz", + "integrity": "sha512-bgyxeRi1R2Q8kWpHsb1c+lXCulbIAHsyZRddaS+agAUX3hFUVZMociwvRgeZi1zWvfqEEjybSv4zxWvFV8ydQQ==" + }, "autoprefixer": { "version": "8.6.4", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.6.4.tgz", @@ -3170,13 +3197,13 @@ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.14.tgz", "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", "requires": { - "mime-db": "1.35.0" + "mime-db": "1.36.0" }, "dependencies": { "mime-db": { - "version": "1.35.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", - "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==" + "version": "1.36.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==" } } }, @@ -4218,6 +4245,11 @@ } } }, + "disposables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/disposables/-/disposables-1.0.2.tgz", + "integrity": "sha1-NsamdEdfVaLWkTVnpgFETkh7S24=" + }, "dmd": { "version": "3.0.12", "resolved": "https://registry.npmjs.org/dmd/-/dmd-3.0.12.tgz", @@ -4238,6 +4270,32 @@ "walk-back": "3.0.0" } }, + "dnd-core": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-3.0.2.tgz", + "integrity": "sha1-6UdXdiBTHH7jelGM1d3hfQ798PM=", + "requires": { + "@types/invariant": "2.2.29", + "@types/lodash": "4.14.116", + "@types/node": "8.10.26", + "@types/redux": "3.6.0", + "asap": "2.0.6", + "invariant": "2.2.4", + "lodash": "4.17.10", + "redux": "4.0.0" + }, + "dependencies": { + "redux": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.0.tgz", + "integrity": "sha512-NnnHF0h0WVE/hXyrB6OlX67LYRuaf/rJcbWvnHHEPCF/Xa/AZpwhs/20WyqzQae5x4SD2F9nPObgBh2rxAgLiA==", + "requires": { + "loose-envify": "1.3.1", + "symbol-observable": "1.2.0" + } + } + } + }, "dns-prefetch-control": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/dns-prefetch-control/-/dns-prefetch-control-0.1.0.tgz", @@ -4432,8 +4490,7 @@ "entities": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", - "dev": true + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" }, "errno": { "version": "0.1.7", @@ -12064,6 +12121,14 @@ "type-check": "0.3.2" } }, + "linkify-it": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.0.3.tgz", + "integrity": "sha1-2UpGSPmxwXnWT6lykSaL22zpQ08=", + "requires": { + "uc.micro": "1.0.5" + } + }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -12436,6 +12501,18 @@ "integrity": "sha512-lbRZ2mE3Q9RtLjxZBZ9+IMl68DKIXaVAhwvwn9pmjnPLS0h/6kyBMgNhqi1xFJ/2yv6cSyv0jbiZavZv93JkkA==", "dev": true }, + "markdown-it": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", + "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", + "requires": { + "argparse": "1.0.10", + "entities": "1.1.1", + "linkify-it": "2.0.3", + "mdurl": "1.0.1", + "uc.micro": "1.0.5" + } + }, "markdown-table": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.2.tgz", @@ -12486,6 +12563,11 @@ "unist-util-visit": "1.4.0" } }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -12904,9 +12986,9 @@ } }, "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==" + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.6.tgz", + "integrity": "sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw==" }, "node-gyp": { "version": "3.7.0", @@ -21670,6 +21752,38 @@ "react-portal": "3.2.0" } }, + "react-dnd": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-3.0.2.tgz", + "integrity": "sha1-sMI9jYKWn1t740y8T4T6H/xcfdw=", + "requires": { + "disposables": "1.0.2", + "dnd-core": "3.0.2", + "hoist-non-react-statics": "2.5.5", + "invariant": "2.2.4", + "lodash": "4.17.10", + "prop-types": "15.6.2", + "shallowequal": "1.0.2" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", + "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" + } + } + }, + "react-dnd-html5-backend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-3.0.2.tgz", + "integrity": "sha1-hxcv1L6Q5FNTEZtA4Q9ZHd+GYe0=", + "requires": { + "autobind-decorator": "2.1.0", + "dnd-core": "3.0.2", + "lodash": "4.17.10", + "shallowequal": "1.0.2" + } + }, "react-dock": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/react-dock/-/react-dock-0.2.4.tgz", @@ -21855,6 +21969,37 @@ "shallowequal": "1.0.2" } }, + "react-tag-input": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/react-tag-input/-/react-tag-input-5.1.2.tgz", + "integrity": "sha512-a8dX4cWGt37W5PaN5lbKDan4p/8xTuDvuBjSHscKBnXRC1qRo6eE5Bzl/GfnbL8/zWidP1C/1bdL1ZuyJHGJuA==", + "requires": { + "core-js": "2.5.5", + "lodash": "4.17.5", + "prop-types": "15.6.1", + "react": "16.4.1", + "react-dnd": "3.0.2", + "react-dnd-html5-backend": "3.0.2", + "react-dom": "16.4.1" + }, + "dependencies": { + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "prop-types": { + "version": "15.6.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.1.tgz", + "integrity": "sha512-4ec7bY1Y66LymSUOH/zARVYObB23AT2h8cf6e/O6ZALB/N0sqZFEx7rq6EYPX2MkOdKORuooI/H5k9TlR4q7kQ==", + "requires": { + "fbjs": "0.8.16", + "loose-envify": "1.3.1", + "object-assign": "4.1.1" + } + } + } + }, "react-test-renderer": { "version": "16.4.1", "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.4.1.tgz", @@ -23257,8 +23402,7 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "sshpk": { "version": "1.14.2", @@ -23941,7 +24085,7 @@ } }, "tc-accounts": { - "version": "git+https://github.com/appirio-tech/accounts-app.git#96ed18e75d5840cef68db1c52baf281278c85f18", + "version": "git+https://github.com/appirio-tech/accounts-app.git#8012065d69de2093e12cc5b3e67b83aa9253a1c4", "requires": { "@uirouter/angularjs": "1.0.18", "angucomplete-alt": "2.5.0", @@ -32682,9 +32826,9 @@ } }, "topcoder-react-lib": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/topcoder-react-lib/-/topcoder-react-lib-0.4.7.tgz", - "integrity": "sha512-b0E7gkVMCbl6ZPvriPsje/HK0CPuaEIt5KUWJM5IgK+PkmoRPK7f70jL1Dv2Bch8vGJyDbasy50G5G8x7xSwcA==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/topcoder-react-lib/-/topcoder-react-lib-0.6.0.tgz", + "integrity": "sha512-hyxnHKG2c8sjpeCvF3xpkeuxQO5toNR2lxBHvCAR0ZP0pa7XP6RbX7BAQuVTBwhyvyOW75Xkb5Br8UolZ/xwKg==", "requires": { "auth0-js": "6.8.4", "isomorphic-fetch": "2.2.1", @@ -32700,7 +32844,7 @@ "redux-actions": "2.4.0", "tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#96ed18e75d5840cef68db1c52baf281278c85f18", "to-capital-case": "1.0.0", - "topcoder-react-utils": "0.7.5" + "topcoder-react-utils": "0.7.8" }, "dependencies": { "tc-accounts": { @@ -36179,9 +36323,11 @@ "are-we-there-yet": { "version": "1.1.4", "bundled": true, + "dev": true, + "optional": true, "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.6" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "balanced-match": { @@ -36228,6 +36374,8 @@ "debug": { "version": "2.6.9", "bundled": true, + "dev": true, + "optional": true, "requires": { "ms": "2.0.0" } @@ -36253,8 +36401,10 @@ "fs-minipass": { "version": "1.2.5", "bundled": true, + "dev": true, + "optional": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "fs.realpath": { @@ -36266,27 +36416,31 @@ "gauge": { "version": "2.7.4", "bundled": true, + "dev": true, + "optional": true, "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" } }, "glob": { "version": "7.1.2", "bundled": true, + "dev": true, + "optional": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "has-unicode": { @@ -36298,23 +36452,29 @@ "iconv-lite": { "version": "0.4.21", "bundled": true, + "dev": true, + "optional": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": "^2.1.0" } }, "ignore-walk": { "version": "3.0.1", "bundled": true, + "dev": true, + "optional": true, "requires": { - "minimatch": "3.0.4" + "minimatch": "^3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, + "dev": true, + "optional": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -36331,8 +36491,9 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "isarray": { @@ -36351,41 +36512,50 @@ }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, + "dev": true, "requires": { - "safe-buffer": "5.1.1", - "yallist": "3.0.2" + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" } }, "minizlib": { "version": "1.1.0", "bundled": true, + "dev": true, + "optional": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "mkdirp": { "version": "0.5.1", "bundled": true, + "dev": true, "requires": { "minimist": "0.0.8" } }, "ms": { "version": "2.0.0", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "needle": { "version": "2.2.0", "bundled": true, + "dev": true, + "optional": true, "requires": { - "debug": "2.6.9", - "iconv-lite": "0.4.21", - "sax": "1.2.4" + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" } }, "node-pre-gyp": { @@ -36407,190 +36577,245 @@ "nopt": { "version": "4.0.1", "bundled": true, + "dev": true, + "optional": true, "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.5" + "abbrev": "1", + "osenv": "^0.1.4" } }, "npm-bundled": { "version": "1.0.3", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "npm-packlist": { "version": "1.1.10", "bundled": true, + "dev": true, + "optional": true, "requires": { - "ignore-walk": "3.0.1", - "npm-bundled": "1.0.3" + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" } }, "npmlog": { "version": "4.1.2", "bundled": true, + "dev": true, + "optional": true, "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "dev": true }, "object-assign": { "version": "4.1.1", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "once": { "version": "1.4.0", "bundled": true, + "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-homedir": { "version": "1.0.2", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "osenv": { "version": "0.1.5", "bundled": true, + "dev": true, + "optional": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { "version": "1.0.1", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "rc": { "version": "1.2.7", "bundled": true, + "dev": true, + "optional": true, "requires": { - "deep-extend": "0.5.1", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true + "bundled": true, + "dev": true, + "optional": true } } }, "readable-stream": { "version": "2.3.6", "bundled": true, + "dev": true, + "optional": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "rimraf": { "version": "2.6.2", "bundled": true, + "dev": true, + "optional": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-buffer": { "version": "5.1.1", - "bundled": true + "bundled": true, + "dev": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "sax": { "version": "1.2.4", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "semver": { "version": "5.5.0", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "string-width": { "version": "1.0.2", "bundled": true, + "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { "version": "1.1.1", "bundled": true, + "dev": true, + "optional": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, + "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-json-comments": { "version": "2.0.1", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "tar": { "version": "4.4.1", "bundled": true, + "dev": true, + "optional": true, "requires": { - "chownr": "1.0.1", - "fs-minipass": "1.2.5", - "minipass": "2.2.4", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "safe-buffer": "5.1.1", - "yallist": "3.0.2" + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" } }, "util-deprecate": { "version": "1.0.2", - "bundled": true + "bundled": true, + "dev": true, + "optional": true }, "wide-align": { "version": "1.1.2", "bundled": true, + "dev": true, + "optional": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2" } }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "dev": true }, "yallist": { "version": "3.0.2", - "bundled": true + "bundled": true, + "dev": true } } }, @@ -41801,20 +42026,21 @@ } }, "topcoder-react-ui-kit": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/topcoder-react-ui-kit/-/topcoder-react-ui-kit-0.5.2.tgz", - "integrity": "sha512-Wm9or44wPTYQTHpsB6LsiOkoJKlZOUniuExqzqvt7+5bkSlHSESN7wJJypHilghrT2ojhEp9IFdz0W1o9BGOeg==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/topcoder-react-ui-kit/-/topcoder-react-ui-kit-0.5.5.tgz", + "integrity": "sha512-aejaEDyblnkTqFdYgUdxe4rPoQ3UOYXBVwHirHuumPHJrkkol9aYwe7ZcBypfdfQSWrXcQqA0EeV9HN32pPUKQ==", "requires": { + "prop-types": "15.6.2", "react": "16.4.1", "react-css-super-themr": "2.2.0", "react-dom": "16.4.1", - "topcoder-react-utils": "0.7.5" + "topcoder-react-utils": "0.7.8" } }, "topcoder-react-utils": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/topcoder-react-utils/-/topcoder-react-utils-0.7.5.tgz", - "integrity": "sha512-/jolO/UUCC/FL/MniBMFi9d7Wc1KbzwvgT5STGs4T+7u7R26bQugGPpGVISEPuglsmW0Xybh6iRi+pT/muOkbg==", + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/topcoder-react-utils/-/topcoder-react-utils-0.7.8.tgz", + "integrity": "sha512-/QW4HMCce2Bc7RZ82d26Wzyit6kyrv2wuLwpzUttWwKbufg85uOx/f188Qu7yzas7Y+D85Rk6PCWiw/V88sRyQ==", "requires": { "babel-runtime": "6.26.0", "body-parser": "1.18.3", @@ -41828,7 +42054,7 @@ "lodash": "4.17.10", "moment": "2.22.2", "morgan": "1.9.0", - "node-forge": "0.7.5", + "node-forge": "0.7.6", "prop-types": "15.6.2", "raf": "3.4.0", "react": "16.4.1", @@ -41988,6 +42214,11 @@ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz", "integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g==" }, + "uc.micro": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.5.tgz", + "integrity": "sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg==" + }, "uglify-js": { "version": "2.8.29", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", diff --git a/package.json b/package.json index f2a8b08..89c29e2 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "i": "^0.3.6", "isomorphic-fetch": "^2.2.1", "lodash": "^4.17.10", + "markdown-it": "^8.4.2", "moment": "^2.22.2", "moment-timezone": "^0.5.21", "npm": "^6.1.0", @@ -51,14 +52,15 @@ "react-redux": "^5.0.7", "react-router-dom": "^4.3.1", "react-select": "^1.1.0", + "react-tag-input": "^5.1.2", "redux": "^3.7.2", "redux-actions": "^2.4.0", "shortid": "^2.2.8", "slick-carousel": "^1.8.1", "tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev", - "topcoder-react-lib": "^0.4.7", - "topcoder-react-ui-kit": "^0.5.2", - "topcoder-react-utils": "^0.7.5" + "topcoder-react-lib": "^0.6.0", + "topcoder-react-ui-kit": "^0.5.5", + "topcoder-react-utils": "^0.7.8" }, "devDependencies": { "autoprefixer": "^8.6.4", diff --git a/src/shared/App.jsx b/src/shared/App.jsx index a6539b1..263ce1b 100644 --- a/src/shared/App.jsx +++ b/src/shared/App.jsx @@ -2,6 +2,7 @@ * Root component of the app. */ +import ErrorMessage from 'containers/ErrorMessage'; import React from 'react'; import Routes from 'routes'; @@ -19,6 +20,7 @@ export default function Application() { description="Topcoder Payment Tool" /> + { isomorphy.isDevBuild() ? : undefined } ); diff --git a/src/shared/actions/page/sandbox/payments/editor.js b/src/shared/actions/page/sandbox/payments/editor.js index 7826624..c24c6f8 100644 --- a/src/shared/actions/page/sandbox/payments/editor.js +++ b/src/shared/actions/page/sandbox/payments/editor.js @@ -6,6 +6,7 @@ import { createActions } from 'redux-actions'; import { services } from 'topcoder-react-lib'; const getMembersService = services.members.getService; +const getChallengeService = services.challenge.getService; export const STATE = { NEW_PAYMENT: 'NEW_PAYMENT', @@ -33,6 +34,10 @@ function getMemberSuggestionsDone(keyword, tokenV3) { return getMembersService(tokenV3).getMemberSuggestions(keyword); } +function loadTechnologyTags(tokenV3) { + return getChallengeService(tokenV3).getChallengeTags(); +} + /** * Payload creator for the action that sets the member input search popup to visible * @param {Boolean} Visible @@ -60,6 +65,51 @@ function setMemberInputSelected(member) { return member; } +/** + * Payload creator for the action that starts Copilot suggestion API call + * @param {String} keyword Partial name/keyword + * @return {String} Payload. + */ +function getCopilotSuggestionsInit(keyword) { + return keyword; +} + +/** + * Payload creator for the action that finishes Copilot suggestion API call + * @param {String} keyword Partial name/keyword + * @return {Promise} Payload. + */ +function getCopilotSuggestionsDone(keyword, tokenV3) { + return getMembersService(tokenV3).getMemberSuggestions(keyword); +} + +/** + * Payload creator for the action that sets the Copilot input search popup to visible + * @param {Boolean} Visible + * @return {Boolean} Payload. + */ +function setCopilotInputPopupVisible(visible) { + return visible; +} + +/** + * Payload creator for the action that sets the keyword/partial name that the user is typing + * @param {String} keyword Partial Copilot name + * @return {String} Payload. + */ +function setCopilotInputKeyword(keyword) { + return keyword; +} + +/** + * Payload creator for the action that sets the currently selected Copilot on the CopilotInput + * @param {String} keyword Partial Copilot name + * @return {String} Payload. + */ +function setCopilotInputSelected(copilot) { + return copilot; +} + /** * Payload creator for the action that selects the specified billing account. * @param {Number} accountId @@ -105,6 +155,24 @@ function setPaymentAssignee(username) { return username; } +/** + * Payload creator for the action that sets the payment amount for copilot. + * @param {Number} amount Payment amount in USD. + * @return {Number} + */ +function setCopilotPaymentAmount(amount) { + return amount; +} + +/** + * Payload creator for the action that sets the copilot + * @param {String} copilot_username + * @return {String} + */ +function setCopilot(copilot) { + return copilot; +} + /** * Payload creator for the action that sets the payment description. * @param {String} description @@ -114,6 +182,15 @@ function setPaymentDescription(description) { return description; } +/** + * Payload creator for the action that sets the submission guidelines. + * @param {String} guidelines + * @return {String} Action payload. + */ +function setSubmissionGuidelines(guidelines) { + return guidelines; +} + /** * Payload creator for the action that sets the payment title. * @param {String} title @@ -123,6 +200,14 @@ function setPaymentTitle(title) { return title; } +function addTechnologyTag(tag) { + return tag; +} + +function removeTechnologyTag(i) { + return i; +} + export default createActions({ PAGE: { SANDBOX: { @@ -133,13 +218,24 @@ export default createActions({ SET_MEMBER_INPUT_POPUP_VISIBLE: setMemberInputPopupVisible, SET_MEMBER_INPUT_KEYWORD: setMemberInputKeyword, SET_MEMBER_INPUT_SELECTED: setMemberInputSelected, + GET_COPILOT_SUGGESTIONS_INIT: getCopilotSuggestionsInit, + GET_COPILOT_SUGGESTIONS_DONE: getCopilotSuggestionsDone, + SET_COPILOT_INPUT_POPUP_VISIBLE: setCopilotInputPopupVisible, + SET_COPILOT_INPUT_KEYWORD: setCopilotInputKeyword, + SET_COPILOT_INPUT_SELECTED: setCopilotInputSelected, SELECT_BILLING_ACCOUNT: selectBillingAccount, SELECT_PROJECT: selectProject, SET_PAGE_STATE: setPageState, SET_PAYMENT_AMOUNT: setPaymentAmount, SET_PAYMENT_ASSIGNEE: setPaymentAssignee, + SET_COPILOT_PAYMENT_AMOUNT: setCopilotPaymentAmount, + SET_COPILOT: setCopilot, SET_PAYMENT_DESCRIPTION: setPaymentDescription, SET_PAYMENT_TITLE: setPaymentTitle, + SET_SUBMISSION_GUIDELINES: setSubmissionGuidelines, + GET_TECHNOLOGY_TAGS: loadTechnologyTags, + ADD_TECHNOLOGY_TAG: addTechnologyTag, + REMOVE_TECHNOLOGY_TAG: removeTechnologyTag, }, }, }, diff --git a/src/shared/actions/page/sandbox/payments/listing.js b/src/shared/actions/page/sandbox/payments/listing.js index 4c3201b..be40758 100644 --- a/src/shared/actions/page/sandbox/payments/listing.js +++ b/src/shared/actions/page/sandbox/payments/listing.js @@ -13,12 +13,17 @@ function selectProject(projectId) { return projectId; } +function toggleProjects(toggle) { + return toggle; +} + export default createActions({ PAGE: { SANDBOX: { PAYMENTS: { LISTING: { SELECT_PROJECT: selectProject, + TOGGLE_PROJECTS: toggleProjects, }, }, }, diff --git a/src/shared/components/MemberSearchInput/style.scss b/src/shared/components/MemberSearchInput/style.scss index d83efe9..5915176 100644 --- a/src/shared/components/MemberSearchInput/style.scss +++ b/src/shared/components/MemberSearchInput/style.scss @@ -40,6 +40,7 @@ padding: 10px 0; max-height: 210px; overflow: auto; + z-index: 3; .Avatar { height: 30px; diff --git a/src/shared/components/sandbox/payments/Confirmation/index.jsx b/src/shared/components/sandbox/payments/Confirmation/index.jsx index ec8fd43..f3afae1 100644 --- a/src/shared/components/sandbox/payments/Confirmation/index.jsx +++ b/src/shared/components/sandbox/payments/Confirmation/index.jsx @@ -12,7 +12,10 @@ import './style.scss'; export default function Confirmation({ amount, assignee, + copilot, + copilotFee, resetPaymentData, + paymentTitle, }) { return ( @@ -28,32 +31,30 @@ Payment Completed

- -$ - {amount} - - {' '} -paid to - {' '} - - {assignee} - -

-

-Develop a new project submit button logic for the main page. + ${amount} paid to ‌ + {assignee}

+ { + copilot && copilotFee ? ( +

+ ${copilotFee} paid to ‌ + {copilot} as copilot +

+ ) : null + } +

{paymentTitle}

-Ok, done for now + Ok, done for now
@@ -62,8 +63,16 @@ Ok, done for now ); } +Confirmation.defaultProps = { + copilot: '', + copilotFee: 0, +}; + Confirmation.propTypes = { amount: PT.number.isRequired, assignee: PT.string.isRequired, + copilot: PT.string, + copilotFee: PT.number, + paymentTitle: PT.string.isRequired, resetPaymentData: PT.func.isRequired, }; diff --git a/src/shared/components/sandbox/payments/Confirmation/style.scss b/src/shared/components/sandbox/payments/Confirmation/style.scss index 3da207c..dcdf841 100644 --- a/src/shared/components/sandbox/payments/Confirmation/style.scss +++ b/src/shared/components/sandbox/payments/Confirmation/style.scss @@ -16,6 +16,11 @@ text-align: center; } +.description-title { + color: $tc-black; + text-align: center; +} + .card { box-sizing: border-box; padding: 50px; @@ -48,7 +53,7 @@ box-sizing: border-box; background: rgba(255, 255, 255, 0.9); border-radius: 6px; - height: 100px; + min-height: 100px; padding: 15px; .user { diff --git a/src/shared/components/sandbox/payments/Editor/index.jsx b/src/shared/components/sandbox/payments/Editor/index.jsx index 912f8a1..bb2db6e 100644 --- a/src/shared/components/sandbox/payments/Editor/index.jsx +++ b/src/shared/components/sandbox/payments/Editor/index.jsx @@ -9,7 +9,7 @@ import PT from 'prop-types'; import React from 'react'; import Select from 'components/Select'; import { PrimaryButton } from 'topcoder-react-ui-kit'; - +import { WithContext as ReactTags } from 'react-tag-input'; import MemberSearchInput from 'components/MemberSearchInput'; import Background from '../Background'; @@ -26,10 +26,20 @@ export default function Editor({ setMemberInputKeyword, memberInputSelected, setMemberInputSelected, + copilotSuggestions, + getCopilotSuggestions, + copilotInputPopupVisible, + setCopilotInputPopupVisible, + copilotInputKeyword, + setCopilotInputKeyword, + copilotInputSelected, + setCopilotInputSelected, makePayment, neu, paymentAmount, paymentAssignee, + copilotPaymentAmount, + copilot, paymentDescription, paymentTitle, projectDetails, @@ -38,14 +48,98 @@ export default function Editor({ selectedProjectId, selectProject, setPaymentAmount, + setCopilotPaymentAmount, setPaymentAssignee, + setCopilot, setPaymentDescription, setPaymentTitle, + setSubmissionGuidelines, + submissionGuidelines, + technologyTags, + addTechnologyTag, + removeTechnologyTag, + challengeTechnologyTags, + memberTasks, }) { let winner; + let challengeCopilot; + let techTags = ( +
+ +Tags + + ({ ...t, id: `${t.id}` }))} + labelField="name" + handleDelete={removeTechnologyTag} + handleAddition={addTechnologyTag} + delimiters={[188, 13]} + /> +
+ ); + let description = ( +