diff --git a/client/package-lock.json b/client/package-lock.json
index 869ee02..2efa5e3 100644
--- a/client/package-lock.json
+++ b/client/package-lock.json
@@ -978,7 +978,8 @@
"@emotion/hash": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.7.3.tgz",
- "integrity": "sha512-14ZVlsB9akwvydAdaEnVnvqu6J2P6ySv39hYyl/aoB6w/V+bXX0tay8cF6paqbgZsN2n5Xh15uF4pE+GvE+itw=="
+ "integrity": "sha512-14ZVlsB9akwvydAdaEnVnvqu6J2P6ySv39hYyl/aoB6w/V+bXX0tay8cF6paqbgZsN2n5Xh15uF4pE+GvE+itw==",
+ "dev": true
},
"@hapi/address": {
"version": "2.1.2",
@@ -1202,6 +1203,7 @@
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.5.2.tgz",
"integrity": "sha512-yARw/hwavOXqljP+biDXHcmfbC63n8EkA8C10/tZt7KkBp7fs+7+z3BNR+ffotd8/uhirIC1jQWWKdLoUc34yA==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.4.4",
"@material-ui/styles": "^4.5.2",
@@ -1218,10 +1220,20 @@
"react-transition-group": "^4.3.0"
}
},
+ "@material-ui/icons": {
+ "version": "4.5.1",
+ "resolved": "https://registry.npmjs.org/@material-ui/icons/-/icons-4.5.1.tgz",
+ "integrity": "sha512-YZ/BgJbXX4a0gOuKWb30mBaHaoXRqPanlePam83JQPZ/y4kl+3aW0Wv9tlR70hB5EGAkEJGW5m4ktJwMgxQAeA==",
+ "dev": true,
+ "requires": {
+ "@babel/runtime": "^7.4.4"
+ }
+ },
"@material-ui/styles": {
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.5.2.tgz",
"integrity": "sha512-QUqPk4tdPiDLs/1flB6qdAqUrYSxHv4YLCgvFeZw9A9OK/lf8LFjciF/SsSIDOCwoV2kf3BiGTzWUGjb/TTgzA==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.4.4",
"@emotion/hash": "^0.7.1",
@@ -1245,6 +1257,7 @@
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/@material-ui/system/-/system-4.5.2.tgz",
"integrity": "sha512-h9RWvdM9XKlHHqwiuhyvWdobptQkHli+m2jJFs7i1AI/hmGsIc4reDmS7fInhETgt/Txx7uiAIznfRNIIVHmQw==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.4.4",
"@material-ui/utils": "^4.5.2",
@@ -1255,6 +1268,7 @@
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@material-ui/types/-/types-4.1.1.tgz",
"integrity": "sha512-AN+GZNXytX9yxGi0JOfxHrRTbhFybjUJ05rnsBVjcB+16e466Z0Xe5IxawuOayVZgTBNDxmPKo5j4V6OnMtaSQ==",
+ "dev": true,
"requires": {
"@types/react": "*"
}
@@ -1263,6 +1277,7 @@
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-4.5.2.tgz",
"integrity": "sha512-zhbNfHd1gLa8At6RPDG7uMZubHxbY+LtM6IkSfeWi6Lo4Ax80l62YaN1QmUpO1IvGCkn/j62tQX3yObiQZrJsQ==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.4.4",
"prop-types": "^15.7.2",
@@ -1549,7 +1564,8 @@
"@types/prop-types": {
"version": "15.7.3",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz",
- "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw=="
+ "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==",
+ "dev": true
},
"@types/q": {
"version": "1.5.2",
@@ -1560,6 +1576,7 @@
"version": "16.9.11",
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.11.tgz",
"integrity": "sha512-UBT4GZ3PokTXSWmdgC/GeCGEJXE5ofWyibCcecRLUVN2ZBpXQGVgQGtG2foS7CrTKFKlQVVswLvf7Js6XA/CVQ==",
+ "dev": true,
"requires": {
"@types/prop-types": "*",
"csstype": "^2.2.0"
@@ -1569,6 +1586,7 @@
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.2.3.tgz",
"integrity": "sha512-Hk8jiuT7iLOHrcjKP/ZVSyCNXK73wJAUz60xm0mVhiRujrdiI++j4duLiL282VGxwAgxetHQFfqA29LgEeSkFA==",
+ "dev": true,
"requires": {
"@types/react": "*"
}
@@ -3135,11 +3153,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -3152,15 +3172,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -3263,7 +3286,8 @@
},
"inherits": {
"version": "2.0.3",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -3273,6 +3297,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -3285,17 +3310,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -3312,6 +3340,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -3384,7 +3413,8 @@
},
"number-is-nan": {
"version": "1.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -3394,6 +3424,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -3499,6 +3530,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -3721,7 +3753,8 @@
"clsx": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/clsx/-/clsx-1.0.4.tgz",
- "integrity": "sha512-1mQ557MIZTrL/140j+JVdRM6e31/OA4vTYxXgqIIZlndyfjHpyawKZia1Im05Vp9BWmImkcNrNtFYQMyFcgJDg=="
+ "integrity": "sha512-1mQ557MIZTrL/140j+JVdRM6e31/OA4vTYxXgqIIZlndyfjHpyawKZia1Im05Vp9BWmImkcNrNtFYQMyFcgJDg==",
+ "dev": true
},
"co": {
"version": "4.6.0",
@@ -3957,7 +3990,8 @@
"convert-css-length": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/convert-css-length/-/convert-css-length-2.0.1.tgz",
- "integrity": "sha512-iGpbcvhLPRKUbBc0Quxx7w/bV14AC3ItuBEGMahA5WTYqB8lq9jH0kTXFheCBASsYnqeMFZhiTruNxr1N59Axg=="
+ "integrity": "sha512-iGpbcvhLPRKUbBc0Quxx7w/bV14AC3ItuBEGMahA5WTYqB8lq9jH0kTXFheCBASsYnqeMFZhiTruNxr1N59Axg==",
+ "dev": true
},
"convert-source-map": {
"version": "1.6.0",
@@ -4233,6 +4267,7 @@
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-2.0.7.tgz",
"integrity": "sha512-VS9Rjt79+p7M0WkPqcAza4Yq1ZHrsHrwf7hPL/bjQB+c1lwmAI+1FXxYTYt818D/50fFVflw0XKleiBN5RITkg==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.6.2",
"is-in-browser": "^1.0.2"
@@ -4242,6 +4277,7 @@
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.3.tgz",
"integrity": "sha512-kq6anf9JGjW8Nt5rYfEuGRaEAaH1mkv3Bbu6rYvLOpPh/RusSJXuKPEAoZ7L7gybZkchE8+NV5g9vKF4AGAtsA==",
+ "dev": true,
"requires": {
"regenerator-runtime": "^0.13.2"
}
@@ -4374,7 +4410,8 @@
"csstype": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.7.tgz",
- "integrity": "sha512-9Mcn9sFbGBAdmimWb2gLVDtFJzeKtDGIr76TUqmjZrw9LFXBMSU70lcs+C0/7fyCd6iBDqmksUcCOUIkisPHsQ=="
+ "integrity": "sha512-9Mcn9sFbGBAdmimWb2gLVDtFJzeKtDGIr76TUqmjZrw9LFXBMSU70lcs+C0/7fyCd6iBDqmksUcCOUIkisPHsQ==",
+ "dev": true
},
"currently-unhandled": {
"version": "0.4.1",
@@ -4714,6 +4751,7 @@
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.1.3.tgz",
"integrity": "sha512-nZD1OtwfWGRBWlpANxacBEZrEuLa16o1nh7YopFWeoF68Zt8GGEmzHu6Xv4F3XaFIC+YXtTLrzgqKxFgLEe4jw==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.6.3",
"csstype": "^2.6.7"
@@ -4723,6 +4761,7 @@
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.3.tgz",
"integrity": "sha512-kq6anf9JGjW8Nt5rYfEuGRaEAaH1mkv3Bbu6rYvLOpPh/RusSJXuKPEAoZ7L7gybZkchE8+NV5g9vKF4AGAtsA==",
+ "dev": true,
"requires": {
"regenerator-runtime": "^0.13.2"
}
@@ -6875,7 +6914,8 @@
"hyphenate-style-name": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.3.tgz",
- "integrity": "sha512-EcuixamT82oplpoJ2XU4pDtKGWQ7b00CD9f1ug9IaQ3p1bkHMiKCZ9ut9QDI6qsa6cpUuB+A/I+zLtdNK4n2DQ=="
+ "integrity": "sha512-EcuixamT82oplpoJ2XU4pDtKGWQ7b00CD9f1ug9IaQ3p1bkHMiKCZ9ut9QDI6qsa6cpUuB+A/I+zLtdNK4n2DQ==",
+ "dev": true
},
"iconv-lite": {
"version": "0.4.24",
@@ -7220,7 +7260,8 @@
"is-in-browser": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz",
- "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU="
+ "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU=",
+ "dev": true
},
"is-lower-case": {
"version": "1.1.3",
@@ -7872,7 +7913,6 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
- "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -8598,6 +8638,7 @@
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/jss/-/jss-10.0.0.tgz",
"integrity": "sha512-TPpDFsiBjuERiL+dFDq8QCdiF9oDasPcNqCKLGCo/qED3fNYOQ8PX2lZhknyTiAt3tZrfOFbb0lbQ9lTjPZxsQ==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.3.1",
"csstype": "^2.6.5",
@@ -8609,6 +8650,7 @@
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.0.0.tgz",
"integrity": "sha512-yALDL00+pPR4FJh+k07A8FeDvfoPPuXU48HLy63enAubcVd3DnS+2rgqPXglHDGixIDVkCSXecl/l5GAMjzIbA==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.3.1",
"hyphenate-style-name": "^1.0.3",
@@ -8619,6 +8661,7 @@
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.0.0.tgz",
"integrity": "sha512-sURozIOdCtGg9ap18erQ+ijndAfEGtTaetxfU3H4qwC18Bi+fdvjlY/ahKbuu0ASs7R/+WKCP7UaRZOjUDMcdQ==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.0.0"
@@ -8628,6 +8671,7 @@
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.0.0.tgz",
"integrity": "sha512-80ofWKSQUo62bxLtRoTNe0kFPtHgUbAJeOeR36WEGgWIBEsXLyXOnD5KNnjPqG4heuEkz9eSLccjYST50JnI7Q==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.0.0"
@@ -8637,6 +8681,7 @@
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.0.0.tgz",
"integrity": "sha512-waxxwl/po1hN3azTyixKnr8ReEqUv5WK7WsO+5AWB0bFndML5Yqnt8ARZ90HEg8/P6WlqE/AB2413TkCRZE8bA==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.0.0",
@@ -8647,6 +8692,7 @@
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.0.0.tgz",
"integrity": "sha512-41mf22CImjwNdtOG3r+cdC8+RhwNm616sjHx5YlqTwtSJLyLFinbQC/a4PIFk8xqf1qpFH1kEAIw+yx9HaqZ3g==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.0.0"
@@ -8656,6 +8702,7 @@
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.0.0.tgz",
"integrity": "sha512-Jw+BZ8JIw1f12V0SERqGlBT1JEPWax3vuZpMym54NAXpPb7R1LYHiCTIlaJUyqvIfEy3kiHMtgI+r2whGgRIxQ==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.0.0"
@@ -8665,6 +8712,7 @@
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.0.0.tgz",
"integrity": "sha512-qslqvL0MUbWuzXJWdUxpj6mdNUX8jr4FFTo3aZnAT65nmzWL7g8oTr9ZxmTXXgdp7ANhS1QWE7036/Q2isFBpw==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.3.1",
"css-vendor": "^2.0.6",
@@ -10139,7 +10187,8 @@
"normalize-scroll-left": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/normalize-scroll-left/-/normalize-scroll-left-0.2.0.tgz",
- "integrity": "sha512-t5oCENZJl8TGusJKoCJm7+asaSsPuNmK6+iEjrZ5TyBj2f02brCRsd4c83hwtu+e5d4LCSBZ0uoDlMjBo+A8yA=="
+ "integrity": "sha512-t5oCENZJl8TGusJKoCJm7+asaSsPuNmK6+iEjrZ5TyBj2f02brCRsd4c83hwtu+e5d4LCSBZ0uoDlMjBo+A8yA==",
+ "dev": true
},
"normalize-url": {
"version": "1.9.1",
@@ -12421,6 +12470,7 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.3.0.tgz",
"integrity": "sha512-1qRV1ZuVSdxPlPf4O8t7inxUGpdyO5zG9IoNfJxSO0ImU2A1YWkEQvFPuIPZmMLkg5hYs7vv5mMOyfgSkvAwvw==",
+ "dev": true,
"requires": {
"@babel/runtime": "^7.5.5",
"dom-helpers": "^5.0.1",
diff --git a/client/package.json b/client/package.json
index b5dd525..36460b1 100644
--- a/client/package.json
+++ b/client/package.json
@@ -3,7 +3,6 @@
"version": "0.1.0",
"private": true,
"dependencies": {
- "@material-ui/core": "^4.5.2",
"@svgr/webpack": "4.3.2",
"@typescript-eslint/eslint-plugin": "^2.2.0",
"@typescript-eslint/parser": "^2.2.0",
@@ -154,6 +153,8 @@
"@babel/plugin-transform-react-jsx": "^7.3.0",
"@babel/preset-env": "^7.6.3",
"@babel/preset-react": "^7.6.3",
+ "@material-ui/core": "^4.5.2",
+ "@material-ui/icons": "^4.5.1",
"babel-loader": "^8.0.6",
"body-parser": "^1.19.0",
"plop": "^2.5.2",
diff --git a/client/plop-templates/Component/Component.js.hbs b/client/plop-templates/Component/Component.js.hbs
index ba7645f..94e91f6 100644
--- a/client/plop-templates/Component/Component.js.hbs
+++ b/client/plop-templates/Component/Component.js.hbs
@@ -1,6 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
-import styles from './{{pascalCase name}}.module.css';
const {{pascalCase name}} = props => {
return (
diff --git a/client/public/images/cloud.svg b/client/public/images/cloud.svg
new file mode 100644
index 0000000..ade656f
--- /dev/null
+++ b/client/public/images/cloud.svg
@@ -0,0 +1,890 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ react-file-upload/baseline-cloud_upload-24px.svg at master · LukasMarx/react-file-upload · GitHub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Permalink
+
+
+
+
+
+
Join GitHub today
+
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
+
Sign up
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LukasMarx
+
+ init
+
+
+
+ 4f6903a
+ Feb 7, 2019
+
+
+
+
+
+
+ 1 contributor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1 lines (1 sloc)
+
+ 318 Bytes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Sorry, something went wrong.
Reload?
+
Sorry, we cannot display this file.
+
Sorry, this file is invalid so it cannot be displayed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ You can’t perform that action at this time.
+
+
+
+
+
+
+
+
+
+
+
+
+
You signed in with another tab or window. Reload to refresh your session.
+
You signed out in another tab or window. Reload to refresh your session.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/src/app/components/atoms/SelectOption/SelectOption.js b/client/src/app/components/atoms/SelectOption/SelectOption.js
index 850f099..ae304a0 100644
--- a/client/src/app/components/atoms/SelectOption/SelectOption.js
+++ b/client/src/app/components/atoms/SelectOption/SelectOption.js
@@ -1,5 +1,4 @@
import React from 'react';
-import PropTypes from 'prop-types';
import styles from './SelectOption.module.css';
const SelectOption = props => {
@@ -9,12 +8,4 @@ const SelectOption = props => {
);
};
-SelectOption.defaultProps = {
-
-};
-
-SelectOption.propTypes = {
-
-};
-
export default SelectOption;
\ No newline at end of file
diff --git a/client/src/app/components/index.js b/client/src/app/components/index.js
index 8bad1cc..84b3bd5 100644
--- a/client/src/app/components/index.js
+++ b/client/src/app/components/index.js
@@ -1,4 +1,11 @@
/* PLOP_INJECT_IMPORT */
+import Progress from './Progress';
+import Uploader from './Uploader';
+import Dropzone from './Dropzone';
+import StepProgressBar from './StepProgressBar';
+import UserTools from './UserTools';
+import ToolItem from './ToolItem';
+import CommandAndUserTools from './CommandAndUserTools';
import ImageViewerInner from './ImageViewerInner';
import ImageHeader from './ImageHeader';
import Image from './Image';
@@ -20,6 +27,13 @@ import PageLoader from './molecules/PageLoader';
export {
/* PLOP_INJECT_EXPORT */
+ Progress,
+ Uploader,
+ Dropzone,
+ StepProgressBar,
+ UserTools,
+ ToolItem,
+ CommandAndUserTools,
ImageViewerInner,
ImageHeader,
Image,
diff --git a/client/src/app/components/molecules/PrincipalContent/ImageContainer/Image/Image.js b/client/src/app/components/molecules/PrincipalContent/ImageContainer/Image/Image.js
index 0a84863..cb7d97e 100644
--- a/client/src/app/components/molecules/PrincipalContent/ImageContainer/Image/Image.js
+++ b/client/src/app/components/molecules/PrincipalContent/ImageContainer/Image/Image.js
@@ -29,7 +29,7 @@ const Image = props => {
return (
props.updateBackgroundDispatcher(image.imageUrl)}>
- } title={image.imageTitle} />
+ } title={image.imageTitle} style={{textTransform: 'capitalize'}} />
{
- return
+ const imageRenders = images.map((image, index) => {
+ return
})
return (
-
-
+
diff --git a/client/src/app/components/molecules/PrincipalContent/ImageViewer/ImageViewer.js b/client/src/app/components/molecules/PrincipalContent/ImageViewer/ImageViewer.js
index 7bc51be..09d2218 100644
--- a/client/src/app/components/molecules/PrincipalContent/ImageViewer/ImageViewer.js
+++ b/client/src/app/components/molecules/PrincipalContent/ImageViewer/ImageViewer.js
@@ -1,14 +1,13 @@
-import React, {useState} from 'react';
+import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import { createPropsSelector } from 'reselect-immutable-helpers';
import { makeStyles } from '@material-ui/core/styles';
import Modal from '@material-ui/core/Modal';
import Backdrop from '@material-ui/core/Backdrop';
-import {Fade, Zoom, Paper} from '@material-ui/core';
+import {Zoom, Paper} from '@material-ui/core';
import { updateModalState } from '../../../../pages/Home/actions';
import { getModalState, getBackgroundImage } from '../../../../pages/Home/selectors';
-import ImageViewerInner from './ImageViewerInner/ImageViewerInner';
const useStyles = makeStyles(theme => ({
modal: {
@@ -59,7 +58,7 @@ const ImageViewer = props => {
};
ImageViewer.propTypes = {
- handleClose: PropTypes.func,
+ handleCloseDispatcher: PropTypes.func,
modalState: PropTypes.bool,
selectedImage: PropTypes.string
};
diff --git a/client/src/app/components/molecules/PrincipalContent/PrincipalContent.js b/client/src/app/components/molecules/PrincipalContent/PrincipalContent.js
index 0d7c8c0..e6554b4 100644
--- a/client/src/app/components/molecules/PrincipalContent/PrincipalContent.js
+++ b/client/src/app/components/molecules/PrincipalContent/PrincipalContent.js
@@ -1,5 +1,4 @@
import React from 'react';
-import PropTypes from 'prop-types';
import ImageContainer from './ImageContainer';
import ImageViewer from './ImageViewer';
@@ -12,8 +11,4 @@ const PrincipalContent = props => {
);
};
-PrincipalContent.propTypes = {
-
-};
-
export default PrincipalContent;
\ No newline at end of file
diff --git a/client/src/app/components/molecules/SideBar/SideBar.jsx b/client/src/app/components/molecules/SideBar/SideBar.jsx
index 157547e..b5329ba 100644
--- a/client/src/app/components/molecules/SideBar/SideBar.jsx
+++ b/client/src/app/components/molecules/SideBar/SideBar.jsx
@@ -13,7 +13,7 @@ const SideBar = props => {
});
$('*').on('click', (e) => {
// e.stopPropagation();
- console.log($(e.target).closest('#sidebar'))
+ // console.log($(e.target).closest('#sidebar'))
if($(e.target).closest('#sidebar').length === 0) {
$('#sidebar').css('transform', 'translateX(0px)');
$('#sidebar').css('box-shadow', '');
@@ -23,18 +23,19 @@ const SideBar = props => {
})
const toggleSidebar = () => {
- $('#sidebar').toggleClass('active');
- $('.hideable').toggleClass('hide');
const position = $('#sidebar').css('transform').split(/[()]/)[1]
const currentX = +position.split(',')[4]
- console.log(currentX)
- console.log($('#sidebar').css('transform'))
- console.log($('#sidebar').css('transform').split(/[()]/))
if (currentX && currentX === 255) {
$('#sidebar').css('transform', 'translateX(85px)');
} else if (currentX && currentX === 85) {
$('#sidebar').css('transform', 'translateX(255px)');
}
+ $('#sidebar').toggleClass('active');
+ $('.hideable').toggleClass('hide');
+ // console.log(currentX)
+ // console.log($('#sidebar').css('transform'))
+ // console.log($('#sidebar').css('transform').split(/[()]/))
+ $('.triangle').addClass('animation');
}
const tabsData = [
diff --git a/client/src/app/components/molecules/SocialLogin/SocialLogin.jsx b/client/src/app/components/molecules/SocialLogin/SocialLogin.jsx
index eadb594..b80397f 100644
--- a/client/src/app/components/molecules/SocialLogin/SocialLogin.jsx
+++ b/client/src/app/components/molecules/SocialLogin/SocialLogin.jsx
@@ -26,7 +26,7 @@ class SocialLogin extends React.Component{
onSuccess(googleUser) {
console.log('Logged in as: ' + googleUser.getBasicProfile().getName());
- // this.props.history.push('/home')
+ this.props.history.push('/home')
}
onFailure(error) {
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/CommandAndUserTools.component.scss b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/CommandAndUserTools.component.scss
new file mode 100644
index 0000000..b93dbf6
--- /dev/null
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/CommandAndUserTools.component.scss
@@ -0,0 +1,10 @@
+.c-CommandAndUserTools {
+ .c-commandTools {
+ border-right: 1px solid $theme-supplementer
+ }
+
+ .c-accountTools {
+ right: 2%;
+ position: absolute;
+ }
+}
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/CommandAndUserTools.js b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/CommandAndUserTools.js
new file mode 100644
index 0000000..ece03d5
--- /dev/null
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/CommandAndUserTools.js
@@ -0,0 +1,165 @@
+import React from 'react';
+import $ from 'jquery'
+import PropTypes from 'prop-types';
+import ToolItem from './ToolItem/ToolItem';
+import UserTools from './UserTools/UserTools';
+
+class CommandAndUserTools extends React.Component {
+ constructor(props) {
+ super(props)
+ this.registerSpeechHandlers = this.registerSpeechHandlers.bind(this)
+ this.startSpeechRecognition = this.startSpeechRecognition.bind(this)
+ this.state = {
+ commandToolItemsData: [
+ {
+ id: 'btnFavorites',
+ icon: 'star_border',
+ iconHovered: 'star',
+ clickHandler: this.props.save
+ },
+ {
+ id: 'btnClearCommand',
+ icon: 'delete_outline',
+ iconHovered: 'delete',
+ clickHandler: this.props.reset
+ },
+ {
+ id: 'btnFireCommand',
+ icon: 'send',
+ iconHovered: 'send',
+ clickHandler: this.props.execute
+ },
+ {
+ id: 'btnSTTCommand',
+ icon: 'mic_none',
+ iconHovered: 'mic',
+ clickHandler: this.startSpeechRecognition
+ }
+ ]
+ }
+ }
+
+ componentDidMount() {
+ this.registerSpeechHandlers();
+ }
+
+ startSpeechRecognition() {
+ var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
+ if(isChrome) {
+ this.recognition.start();
+ } else {
+ // this.domOpsService.sho
+ }
+ }
+
+ registerSpeechHandlers() {
+ let SpeechRecognition
+ let instructions = $('#command')
+ try {
+ SpeechRecognition = window.SpeechRecognition || window.mozSpeechRecognition || window.msSpeechRecognition || window.webkitSpeechRecognition
+ // SpeechRecognition = ''
+ this.recognition = new SpeechRecognition()
+ }
+ catch(e) {
+ console.error(e);
+ $('.no-browser-support').show();
+ $('.app').hide();
+ }
+ this.recognition.onstart = function() {
+ instructions.val('Voice recognition activated. Try speaking into the microphone.');
+ }
+
+ this.recognition.onspeechend = function() {
+ instructions.val('You were quiet for a while so voice recognition turned itself off.');
+ }
+
+ this.recognition.onerror = function(event) {
+ if(event.error === 'no-speech') {
+ instructions.val('No speech was detected. Try again.');
+ };
+ }
+
+ this.recognition.onresult = function(event) {
+ let noteContent = "";
+ let current = event.resultIndex;
+ let transcript = event.results[current][0].transcript;
+ let mobileRepeatBug = (current === 1 && transcript === event.results[0][0].transcript);
+ if(!mobileRepeatBug) {
+ noteContent += transcript;
+ $('#command').val(noteContent);
+ }
+ }
+ }
+
+ // processRecastResponse(recastResponse: any) {
+ // let bodyRelevant: any;
+ // let intent: any = "";
+ // let assuredIntentFactor = 0.6;
+ // recastResponse.then((body) => {
+ // bodyRelevant = body.results;
+ // let intents = bodyRelevant ? bodyRelevant.intents : "";
+ // if(intents) {
+ // if(intents.length == 1) {
+ // intent = intents[0];
+ // } else if(intents.length > 1) {
+ // let reducer = (probableIntent, currIntent) => probableIntent.confidence >= currIntent.confidence ? probableIntent : currIntent;
+ // intent = intents.reduce(reducer, intents[0]);
+ // } else {
+ // this.domOpsService.showEmptyCommandMessage("Intent is either not Identified or is not supported, please try again with a different text.");
+ // return;
+ // }
+ // if (intent && intent.confidence > assuredIntentFactor) {
+ // let intentSlug = intent.slug;
+ // if (!Object.keys($config.intentSlugToOperations).includes(intentSlug)) {
+ // this.domOpsService.showEmptyCommandMessage("Intent is either not Identified or is not supported, please try again with a different text.");
+ // return;
+ // }
+ // // $(`#${$config.constants.hiddenIntentFieldId}`).val(intent);
+ // window.localStorage.setItem($config.constants.hiddenIntentFieldId, intentSlug);
+ // this.domOpsService.displayIntentBox(intentSlug);
+ // if (intentSlug == "resethistory") {
+ // let card = this.cardsService.getResponseCard($config.intentSlugToOperations.resethistory.cardTitle,
+ // $config.intentSlugToOperations.resethistory.cardMsg, {}, "response");
+ // card.insertionCounter = 0;
+ // let resetHistoryResponseAction = new ClearHistory(card);
+ // this.store.dispatch(resetHistoryResponseAction);
+ // return;
+ // }
+ // this.domOpsService.widgetIdentified.emit({widget: intentSlug, bodyRelevant: bodyRelevant});
+ // this.domOpsService.populateRecastData(intentSlug, bodyRelevant);
+ // // store.dispatch($config.intentSlugToOperations.addquery.action);
+ // } else {
+ // this.domOpsService.showEmptyCommandMessage("Couldn't conform with the required confidence level of the intent match, please try again.");
+ // }
+ // } else {
+ // this.domOpsService.showEmptyCommandMessage("There seems to be an error in the Recast Response, as intents are not returned.");
+ // return;
+ // }
+ // });
+
+ // }
+
+ render() {
+ const {commandToolItemsData} = this.state
+
+ const commandToolItems = commandToolItemsData && commandToolItemsData.map((toolData, index) => {
+ return
+ })
+ return (
+
+ );
+ }
+}
+
+CommandAndUserTools.propTypes = {
+ execute: PropTypes.func,
+ reset: PropTypes.func,
+ save: PropTypes.func
+};
+
+export default CommandAndUserTools;
\ No newline at end of file
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/CommandAndUserTools.test.js b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/CommandAndUserTools.test.js
new file mode 100644
index 0000000..7c021e1
--- /dev/null
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/CommandAndUserTools.test.js
@@ -0,0 +1,8 @@
+import React from 'react';
+import CommandAndUserTools from './CommandAndUserTools';
+
+describe('CommandAndUserTools', () => {
+ it('renders without error', () => {
+
+ });
+});
\ No newline at end of file
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/ToolItem/ToolItem.component.scss b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/ToolItem/ToolItem.component.scss
new file mode 100644
index 0000000..0721627
--- /dev/null
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/ToolItem/ToolItem.component.scss
@@ -0,0 +1,3 @@
+.c-ToolItem {
+
+}
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/ToolItem/ToolItem.js b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/ToolItem/ToolItem.js
new file mode 100644
index 0000000..0605187
--- /dev/null
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/ToolItem/ToolItem.js
@@ -0,0 +1,38 @@
+import React, {useState} from 'react';
+import PropTypes from 'prop-types';
+import $ from 'jquery'
+import {Link} from 'react-router-dom';
+
+const ToolItem = ({toolData}) => {
+
+ const [icon, setIcon] = useState(toolData.icon)
+
+ const toggleIcon = (event, toolData) => {
+ const iconTag = $(event.target).find('i').addBack('i')
+ const currentIcon = iconTag && iconTag[0] && iconTag[0].innerHTML
+ if (currentIcon === toolData.icon) {
+ setIcon(toolData.iconHovered)
+ } else {
+ setIcon(toolData.icon)
+ }
+ }
+
+ return (
+
+
+ toggleIcon(event, toolData)}
+ onMouseLeave={(event) => toggleIcon(event, toolData)}>
+ {icon}
+
+
+
+ );
+};
+
+ToolItem.propTypes = {
+ toolData: PropTypes.object
+};
+
+export default ToolItem;
\ No newline at end of file
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/ToolItem/ToolItem.test.js b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/ToolItem/ToolItem.test.js
new file mode 100644
index 0000000..5cf50fb
--- /dev/null
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/ToolItem/ToolItem.test.js
@@ -0,0 +1,8 @@
+import React from 'react';
+import ToolItem from './ToolItem';
+
+describe('ToolItem', () => {
+ it('renders without error', () => {
+
+ });
+});
\ No newline at end of file
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/ToolItem/index.js b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/ToolItem/index.js
new file mode 100644
index 0000000..c65c756
--- /dev/null
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/ToolItem/index.js
@@ -0,0 +1,3 @@
+import ToolItem from './ToolItem';
+
+export default ToolItem;
\ No newline at end of file
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/UserTools/UserTools.component.scss b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/UserTools/UserTools.component.scss
new file mode 100644
index 0000000..e79d81b
--- /dev/null
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/UserTools/UserTools.component.scss
@@ -0,0 +1,3 @@
+.c-UserTools {
+
+}
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/UserTools/UserTools.js b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/UserTools/UserTools.js
new file mode 100644
index 0000000..55b9b49
--- /dev/null
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/UserTools/UserTools.js
@@ -0,0 +1,168 @@
+import React from 'react';
+import {connect} from 'react-redux'
+import {makeStyles} from '@material-ui/core/styles';
+import {IconButton, Badge, MenuItem, Menu} from '@material-ui/core';
+import AccountCircle from '@material-ui/icons/AccountCircle';
+import MailIcon from '@material-ui/icons/Mail';
+import NotificationsIcon from '@material-ui/icons/Notifications';
+import MoreIcon from '@material-ui/icons/MoreVert';
+import {updateUploadModalState} from './../../../../../../pages/Home/actions'
+
+const useStyles = makeStyles(theme => ({
+ grow: {
+ flexGrow: 1,
+ },
+ menuButton: {
+ marginRight: theme.spacing(2),
+ },
+ sectionDesktop: {
+ display: 'none',
+ float: 'right',
+ [theme.breakpoints.up('md')]: {
+ display: 'flex',
+ },
+ },
+ sectionMobile: {
+ display: 'flex',
+ [theme.breakpoints.up('md')]: {
+ display: 'none',
+ },
+ },
+}));
+
+const UserTools = props => {
+
+ const classes = useStyles();
+ const [anchorEl, setAnchorEl] = React.useState(null);
+ const [mobileMoreAnchorEl, setMobileMoreAnchorEl] = React.useState(null);
+
+ const isMenuOpen = Boolean(anchorEl);
+ const isMobileMenuOpen = Boolean(mobileMoreAnchorEl);
+
+ const handleProfileMenuOpen = (event) => {
+ setAnchorEl(event.currentTarget);
+ };
+
+ const handleMobileMenuClose = () => {
+ setMobileMoreAnchorEl(null);
+ };
+
+ const handleMenuClose = (event, uploaderModalStateDispatcher) => {
+ setAnchorEl(null);
+ handleMobileMenuClose();
+ if (event.currentTarget.innerText === 'Upload Image/s') {
+ uploaderModalStateDispatcher(true)
+ }
+ };
+
+ const handleMobileMenuOpen = event => {
+ setMobileMoreAnchorEl(event.currentTarget);
+ };
+
+ const mobileMenuId = 'primary-search-account-menu-mobile';
+ const menuId = 'primary-search-account-menu';
+ const renderMenu = (
+
+ );
+
+ const renderMobileMenu = (
+
+ );
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {renderMobileMenu}
+ {renderMenu}
+
+ );
+};
+
+const mapDispatchToProps = {
+ uploaderModalStateDispatcher: (uploadModalOpened) => updateUploadModalState(uploadModalOpened)
+}
+
+export default connect(
+ null,
+ mapDispatchToProps
+)(UserTools)
\ No newline at end of file
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/UserTools/UserTools.test.js b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/UserTools/UserTools.test.js
new file mode 100644
index 0000000..42048cd
--- /dev/null
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/UserTools/UserTools.test.js
@@ -0,0 +1,8 @@
+import React from 'react';
+import UserTools from './UserTools';
+
+describe('UserTools', () => {
+ it('renders without error', () => {
+
+ });
+});
\ No newline at end of file
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/UserTools/index.js b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/UserTools/index.js
new file mode 100644
index 0000000..728ae2a
--- /dev/null
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/UserTools/index.js
@@ -0,0 +1,3 @@
+import UserTools from './UserTools';
+
+export default UserTools;
\ No newline at end of file
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/index.js b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/index.js
new file mode 100644
index 0000000..d4b8e1a
--- /dev/null
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandAndUserTools/index.js
@@ -0,0 +1,3 @@
+import CommandAndUserTools from './CommandAndUserTools';
+
+export default CommandAndUserTools;
\ No newline at end of file
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandPrompt.component.scss b/client/src/app/components/molecules/common/CommandPrompt/CommandPrompt.component.scss
index 5c9d4a3..20ba47f 100644
--- a/client/src/app/components/molecules/common/CommandPrompt/CommandPrompt.component.scss
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandPrompt.component.scss
@@ -10,9 +10,14 @@
transition: all 0.3s;
cursor: pointer;
}
+
+ .material-icons {
+ &.md-light{color:rgb(33, 37, 41)}
+ &.md-36{font-size:36px}
+ }
.navbar {
- padding: 15px 10px;
+ padding: 5px;
// background: #222;
background: rgba(120, 120, 120, 0.3);
border: none;
@@ -282,7 +287,7 @@
}
#command.form-control {
- width: 87%;
+ width: 45%;
}
#faux {
diff --git a/client/src/app/components/molecules/common/CommandPrompt/CommandPrompt.js b/client/src/app/components/molecules/common/CommandPrompt/CommandPrompt.js
index a26da37..d46f112 100644
--- a/client/src/app/components/molecules/common/CommandPrompt/CommandPrompt.js
+++ b/client/src/app/components/molecules/common/CommandPrompt/CommandPrompt.js
@@ -1,33 +1,35 @@
import React from 'react';
-import PropTypes from 'prop-types';
-import * as $ from 'jquery'
+import $ from 'jquery'
+import CommandAndUserTools from './CommandAndUserTools/CommandAndUserTools';
+import {Link} from 'react-router-dom';
class CommandPrompt extends React.Component {
constructor(props) {
super(props)
- this.registerSpeechHandlers = this.registerSpeechHandlers.bind(this)
this.registerMouseAndKeyboardHandlers = this.registerMouseAndKeyboardHandlers.bind(this)
this.showContextMenu = this.showContextMenu.bind(this)
this.initiateDomOpsOnEnter = this.initiateDomOpsOnEnter.bind(this)
- this.startSpeechRecognition = this.startSpeechRecognition.bind(this)
+ this.timerId = 0
}
componentDidMount() {
- this.registerSpeechHandlers();
this.registerMouseAndKeyboardHandlers();
}
- toggleClass(event) {
- $(event.target).toggleClass('fas');
- }
-
- initiateDomOpsOnEnter(event) {
+ initiateDomOpsOnEnter(event, func, delay) {
const code = (event.keyCode ? event.keyCode : event.which);
if (code === 13) {
- // this.domOpsService.hideNonCards();
- this.executeCommand();
+ func();
+ clearTimeout(this.timerId)
+ return
}
+ clearTimeout(this.timerId)
+ this.timerId = setTimeout(func, delay)
+ }
+
+ saveToFavorites() {
+
}
resetCommand() {
@@ -35,139 +37,17 @@ class CommandPrompt extends React.Component {
$('#command').focus();
}
- startSpeechRecognition() {
- var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
- if(isChrome) {
- this.recognition.start();
- } else {
- // this.domOpsService.sho
- }
- }
-
- registerSpeechHandlers() {
- let SpeechRecognition
- let instructions = $('#command')
- try {
- SpeechRecognition = window.SpeechRecognition || window.mozSpeechRecognition || window.msSpeechRecognition || window.webkitSpeechRecognition
- // SpeechRecognition = ''
- this.recognition = new SpeechRecognition()
- }
- catch(e) {
- console.error(e);
- $('.no-browser-support').show();
- $('.app').hide();
- }
- this.recognition.onstart = function() {
- instructions.val('Voice recognition activated. Try speaking into the microphone.');
- }
-
- this.recognition.onspeechend = function() {
- instructions.val('You were quiet for a while so voice recognition turned itself off.');
- }
-
- this.recognition.onerror = function(event) {
- if(event.error === 'no-speech') {
- instructions.val('No speech was detected. Try again.');
- };
- }
-
- this.recognition.onresult = function(event) {
- let noteContent = "";
- let current = event.resultIndex;
- let transcript = event.results[current][0].transcript;
- let mobileRepeatBug = (current === 1 && transcript === event.results[0][0].transcript);
- if(!mobileRepeatBug) {
- noteContent += transcript;
- $('#command').val(noteContent);
- }
- }
- }
-
registerMouseAndKeyboardHandlers() {
- $('#content nav div.collapse li a.nav-link i.far.fa-star').hover(() => {
- $('#content nav div.collapse li a.nav-link i.far.fa-star').toggleClass('fas');
- });
- $('#content nav div.collapse li a.nav-link i.far.fa-trash-alt').hover(() => {
- $('#content nav div.collapse li a.nav-link i.far.fa-trash-alt').toggleClass('fas');
- });
- $('#content nav div.collapse li a.nav-link i.far.fa-paper-plane').hover(() => {
- $('#content nav div.collapse li a.nav-link i.far.fa-paper-plane').toggleClass('fas');
- });
$('*').on('click', (event) => {
if(!this.contextMenuFirstDisplay) {
$("#inputSelectionContextMenu").removeClass("show").hide();
this.contextMenuDisplayed = false;
-// event.stopPropagation();
} else {
this.contextMenuFirstDisplay = false;
-// event.stopPropagation();
}
});
}
- executeCommand() {
- // this.domOpsService.hideNonCards();
- // let commandVal = this.command.nativeElement.value;
- // if(!commandVal) {
- // this.domOpsService.showEmptyCommandMessage(this.emptyCommandMessage);
- // } else {
- // let card = this.cardsService.getCommandCard($config.intentSlugToOperations.command.cardTitle, commandVal, {}, "command");
- // let commandAction = new Command(card);
- // this.store.dispatch(commandAction);
- // const text = { text: commandVal };
- // let recastResponse = this.recastOpsService.getRecastResponse(commandVal, text);
- // this.processRecastResponse(recastResponse);
- // }
- }
-
- // processRecastResponse(recastResponse: any) {
- // let bodyRelevant: any;
- // let intent: any = "";
- // let assuredIntentFactor = 0.6;
- // recastResponse.then((body) => {
- // bodyRelevant = body.results;
- // let intents = bodyRelevant ? bodyRelevant.intents : "";
- // if(intents) {
- // if(intents.length == 1) {
- // intent = intents[0];
- // } else if(intents.length > 1) {
- // let reducer = (probableIntent, currIntent) => probableIntent.confidence >= currIntent.confidence ? probableIntent : currIntent;
- // intent = intents.reduce(reducer, intents[0]);
- // } else {
- // this.domOpsService.showEmptyCommandMessage("Intent is either not Identified or is not supported, please try again with a different text.");
- // return;
- // }
- // if (intent && intent.confidence > assuredIntentFactor) {
- // let intentSlug = intent.slug;
- // if (!Object.keys($config.intentSlugToOperations).includes(intentSlug)) {
- // this.domOpsService.showEmptyCommandMessage("Intent is either not Identified or is not supported, please try again with a different text.");
- // return;
- // }
- // // $(`#${$config.constants.hiddenIntentFieldId}`).val(intent);
- // window.localStorage.setItem($config.constants.hiddenIntentFieldId, intentSlug);
- // this.domOpsService.displayIntentBox(intentSlug);
- // if (intentSlug == "resethistory") {
- // let card = this.cardsService.getResponseCard($config.intentSlugToOperations.resethistory.cardTitle,
- // $config.intentSlugToOperations.resethistory.cardMsg, {}, "response");
- // card.insertionCounter = 0;
- // let resetHistoryResponseAction = new ClearHistory(card);
- // this.store.dispatch(resetHistoryResponseAction);
- // return;
- // }
- // this.domOpsService.widgetIdentified.emit({widget: intentSlug, bodyRelevant: bodyRelevant});
- // this.domOpsService.populateRecastData(intentSlug, bodyRelevant);
- // // store.dispatch($config.intentSlugToOperations.addquery.action);
- // } else {
- // this.domOpsService.showEmptyCommandMessage("Couldn't conform with the required confidence level of the intent match, please try again.");
- // }
- // } else {
- // this.domOpsService.showEmptyCommandMessage("There seems to be an error in the Recast Response, as intents are not returned.");
- // return;
- // }
- // });
-
- // }
-
showContextMenu(event) {
if(this.contextMenuDisplayed === true) {
return;
@@ -186,6 +66,23 @@ class CommandPrompt extends React.Component {
}
}
+ executeCommand() {
+ alert('called')
+ // this.domOpsService.hideNonCards();
+ let commandVal = $('#command').val();
+ console.log(commandVal)
+ if(!commandVal) {
+ // this.domOpsService.showEmptyCommandMessage(this.emptyCommandMessage);
+ } else {
+ // let card = this.cardsService.getCommandCard($config.intentSlugToOperations.command.cardTitle, commandVal, {}, "command");
+ // let commandAction = new Command(card);
+ // this.store.dispatch(commandAction);
+ // const text = { text: commandVal };
+ // let recastResponse = this.recastOpsService.getRecastResponse(commandVal, text);
+ // this.processRecastResponse(recastResponse);
+ }
+ }
+
render() {
return (