Fixed bug caused due to outdated libraries

This commit is contained in:
2020-01-31 13:28:42 +05:30
parent ead25aa60f
commit 6ac43a14e7
17 changed files with 2310 additions and 890 deletions

3055
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -5,21 +5,21 @@
"homepage": "https://mohiit1502.github.io/PictureStory-v2",
"dependencies": {
"@svgr/webpack": "4.3.2",
"@typescript-eslint/eslint-plugin": "^2.2.0",
"@typescript-eslint/parser": "^2.2.0",
"autoprefixer": "^9.6.5",
"@typescript-eslint/eslint-plugin": "^2.14.0",
"@typescript-eslint/parser": "^2.14.0",
"autoprefixer": "^9.7.3",
"babel-eslint": "10.0.3",
"babel-jest": "^24.9.0",
"babel-plugin-named-asset-import": "^0.3.4",
"babel-preset-react-app": "^9.0.2",
"bootstrap": "^4.3.1",
"babel-plugin-named-asset-import": "^0.3.5",
"babel-preset-react-app": "^9.1.0",
"bootstrap": "^4.4.1",
"camelcase": "^5.2.0",
"case-sensitive-paths-webpack-plugin": "2.2.0",
"css-loader": "2.1.1",
"dotenv": "6.2.0",
"dotenv-expand": "5.1.0",
"eslint": "^6.1.0",
"eslint-config-react-app": "^5.0.2",
"eslint": "^6.8.0",
"eslint-config-react-app": "^5.1.0",
"eslint-loader": "3.0.2",
"eslint-plugin-flowtype": "3.13.0",
"eslint-plugin-import": "2.18.2",
@@ -38,7 +38,7 @@
"jest-watch-typeahead": "0.4.0",
"jquery": "^3.4.1",
"mini-css-extract-plugin": "0.8.0",
"node-sass": "^4.12.0",
"node-sass": "^4.13.0",
"optimize-css-assets-webpack-plugin": "5.0.3",
"pnp-webpack-plugin": "1.5.0",
"popper.js": "^1.16.0",
@@ -48,12 +48,12 @@
"postcss-preset-env": "6.7.0",
"postcss-safe-parser": "4.0.1",
"precss": "^4.0.0",
"react": "^16.10.2",
"react-app-polyfill": "^1.0.4",
"react": "^16.12.0",
"react-app-polyfill": "^1.0.5",
"react-dev-utils": "^9.1.0",
"react-dom": "^16.10.2",
"react-dom": "^16.12.0",
"react-loadable": "^5.5.0",
"react-redux": "^7.1.1",
"react-redux": "^7.1.3",
"react-router-dom": "^5.1.2",
"redux": "3.6.0",
"redux-actions": "2.6.1",
@@ -149,18 +149,18 @@
]
},
"devDependencies": {
"@babel/cli": "^7.6.4",
"@babel/core": "^7.6.0",
"@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",
"@babel/cli": "^7.7.7",
"@babel/core": "^7.7.7",
"@babel/plugin-transform-react-jsx": "^7.7.7",
"@babel/preset-env": "^7.7.7",
"@babel/preset-react": "^7.7.4",
"@material-ui/core": "^4.8.2",
"@material-ui/icons": "^4.5.1",
"babel-loader": "^8.0.6",
"body-parser": "^1.19.0",
"plop": "^2.5.2",
"webpack": "^4.41.0",
"webpack-cli": "^3.3.9"
"plop": "^2.5.3",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
},
"proxy": "http://localhost:3001"
}

View File

@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
const {{pascalCase name}} = props => {
return (
<div className={styles.root}>
<div className='c-{{pascalCase name}}'>
</div>
);
};

View File

@@ -11,10 +11,6 @@ const ChatCard = ({chat}) => {
);
};
ChatCard.defaultProps = {
};
ChatCard.propTypes = {
};

View File

@@ -25,7 +25,7 @@
}
&.pad {
padding: 0 15px 15px;
padding: 0 5px 15px 15px;
}
.flex {

View File

@@ -43,7 +43,7 @@ const Image = props => {
return window.btoa(binary);
};
console.log(img)
// console.log(img)
return (
<Card className={`${classes.card} c-Image`} onClick={() => props.updateBackgroundDispatcher(img)}>
<CardHeader avatar={<ImageHeader image={image.img} />} title={image.img.name} style={{textTransform: 'capitalize'}} />

View File

@@ -2,9 +2,10 @@ import React from 'react';
import {connect} from 'react-redux'
import PropTypes from 'prop-types'
import $ from 'jquery'
import {toggleChatView} from './../../../../pages/Home/actions'
import {toggleChatView, updateChatMessages} from './../../../../pages/Home/actions'
import CommandAndUserTools from './CommandAndUserTools/CommandAndUserTools';
import {Link} from 'react-router-dom';
import ChatMessage from './../../../../models/chatmessage.model'
class CommandPrompt extends React.Component {
@@ -17,6 +18,7 @@ class CommandPrompt extends React.Component {
this.showContextMenu = this.showContextMenu.bind(this)
this.initiateDomOpsOnEnter = this.initiateDomOpsOnEnter.bind(this)
this.toggleChatView = this.toggleChatView.bind(this)
this.executeCommand = this.executeCommand.bind(this)
this.timerId = 0
}
@@ -78,6 +80,8 @@ class CommandPrompt extends React.Component {
commandField.toggleClass('loading')
// this.domOpsService.hideNonCards();
let commandVal = commandField.val();
const message = new ChatMessage(commandVal, true)
this.props.dispatchMessage(message)
// console.log(commandVal)
if(!commandVal) {
// this.domOpsService.showEmptyCommandMessage(this.emptyCommandMessage);
@@ -134,10 +138,12 @@ class CommandPrompt extends React.Component {
}
CommandPrompt.props = {
dispatchMessage: PropTypes.func,
dispatchShowChatView: PropTypes.func
}
const mapDispatchToProps = {
dispatchMessage: (message) => updateChatMessages(message),
dispatchShowChatView: (chatView) => toggleChatView(chatView)
}

View File

@@ -5,6 +5,7 @@
@import 'styles/base/forms';
@import 'styles/base/general';
@import 'styles/base/lists';
@import 'styles/base/material';
@import 'styles/base/mixins';
@import 'styles/base/typography';
@import 'styles/components';

View File

@@ -0,0 +1,8 @@
export default class ChatMessage {
constructor(message, isUser) {
this.message = message;
this.isUser = isUser;
this.timeStamp = Date.now();
}
}

View File

@@ -8,6 +8,7 @@ export const UPDATE_BACKGROUND = 'UPDATE_BACKGROUND'
export const UPDATE_MODAL_STATE = 'UPDATE_MODAL_STATE'
export const UPDATE_UPLOAD_MODAL_STATE = 'UPDATE_UPLOAD_MODAL_STATE'
export const TOGGLE_CHAT_VIEW = 'TOGGLE_CHAT_VIEW'
export const UPDATE_CHAT_MESSAGES = 'UPDATE_CHAT_MESSAGES'
export const updateHomeDataState = (payload) => ({type: HOME_DATA_STATE_RECEIVED, payload})
const ds = new DataService()
@@ -71,4 +72,11 @@ export const toggleChatView = (chatView) => {
}
}
export const updateChatMessages = (message) => {
return {
type: UPDATE_CHAT_MESSAGES,
payload: message
}
}

View File

@@ -8,12 +8,14 @@ import {
UPDATE_BACKGROUND,
UPDATE_MODAL_STATE,
UPDATE_UPLOAD_MODAL_STATE,
TOGGLE_CHAT_VIEW
TOGGLE_CHAT_VIEW,
UPDATE_CHAT_MESSAGES
} from './actions'
const initialState = Immutable.Map({
formErrors: [],
formValues: []
formValues: [],
chatMessages: []
})
const reducer = (state = initialState, action) => {
@@ -27,6 +29,11 @@ const reducer = (state = initialState, action) => {
case UPDATE_UPLOAD_MODAL_STATE:
case TOGGLE_CHAT_VIEW:
return state.mergeDeep(action.payload)
case UPDATE_CHAT_MESSAGES:
console.log(...state.get('chatMessages'))
const chatMessages = [...state.get('chatMessages'), action.payload]
console.log(chatMessages)
return state.setIn('chatMessages', chatMessages)
default:
return state
}

View File

@@ -125,4 +125,4 @@ sub {
[hidden] {
display: none;
}
}

View File

@@ -0,0 +1,12 @@
.material-icons {
&.md-18 { font-size: 18px; }
&.md-24 { font-size: 24px; }
&.md-36 { font-size: 36px; }
&.md-48 { font-size: 48px; }
&.md-dark { color: rgba(0, 0, 0, 0.54); }
&.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); }
&.md-light { color: rgba(255, 255, 255, 1); }
&.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); }
&.orange600 { color: #FB8C00; }
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -2188,7 +2188,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -2209,12 +2210,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -2229,17 +2232,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -2356,7 +2362,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@@ -2368,6 +2375,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -2382,6 +2390,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -2389,12 +2398,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -2413,6 +2424,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -2493,7 +2505,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -2505,6 +2518,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@@ -2590,7 +2604,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -2626,6 +2641,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -2645,6 +2661,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -2688,12 +2705,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},