This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

perf(frontend): Update and remove dependencies

style(frontend): apply eslint checkstyle

https://zanata.atlassian.net/browse/ZNTA-1197
  • Loading branch information...
aeng committed Jun 24, 2016
1 parent fbd9e43 commit 04655da2a609f1d92a0222b724d6de07a811b300
Showing with 1,373 additions and 1,656 deletions.
  1. +748 −1,179 frontend/src/main/web/npm-shrinkwrap.json
  2. +56 −63 frontend/src/main/web/package.json
  3. +0 −1 frontend/src/main/web/src/actions/common.js
  4. +5 −5 frontend/src/main/web/src/actions/explore.js
  5. +9 −7 frontend/src/main/web/src/actions/glossary.js
  6. +8 −2 frontend/src/main/web/src/components/EditableText.js
  7. +2 −2 frontend/src/main/web/src/components/Header.jsx
  8. +6 −2 frontend/src/main/web/src/components/Heading.jsx
  9. +2 −1 frontend/src/main/web/src/components/Icon/index.jsx
  10. +2 −1 frontend/src/main/web/src/components/Link.jsx
  11. +1 −1 frontend/src/main/web/src/components/LoaderText/index.jsx
  12. +1 −1 frontend/src/main/web/src/components/Modal/index.jsx
  13. +3 −5 frontend/src/main/web/src/components/Nav.jsx
  14. +11 −7 frontend/src/main/web/src/components/Notification.js
  15. +3 −2 frontend/src/main/web/src/components/Overlay/index.jsx
  16. +6 −1 frontend/src/main/web/src/components/Page.jsx
  17. +3 −2 frontend/src/main/web/src/components/Row.js
  18. +6 −1 frontend/src/main/web/src/components/ScrollView.jsx
  19. +3 −2 frontend/src/main/web/src/components/TableCell.js
  20. +4 −2 frontend/src/main/web/src/components/TableRow.js
  21. +5 −8 frontend/src/main/web/src/components/TextInput.jsx
  22. +1 −1 frontend/src/main/web/src/components/Tooltip/index.jsx
  23. +8 −4 frontend/src/main/web/src/components/View.jsx
  24. +9 −4 frontend/src/main/web/src/containers/App.js
  25. +8 −11 frontend/src/main/web/src/containers/Explore/GroupTeaser.jsx
  26. +7 −10 frontend/src/main/web/src/containers/Explore/ProjectTeaser.jsx
  27. +6 −4 frontend/src/main/web/src/containers/Explore/TeaserList.jsx
  28. +6 −3 frontend/src/main/web/src/containers/Explore/TeaserListHeader.jsx
  29. +12 −19 frontend/src/main/web/src/containers/Explore/UserTeaser.jsx
  30. +19 −11 frontend/src/main/web/src/containers/Explore/index.js
  31. +2 −0 frontend/src/main/web/src/containers/Glossary/DeleteAllEntriesModal.jsx
  32. +6 −2 frontend/src/main/web/src/containers/Glossary/DeleteEntryModal.jsx
  33. +37 −36 frontend/src/main/web/src/containers/Glossary/Entry.js
  34. +29 −30 frontend/src/main/web/src/containers/Glossary/EntryModal.js
  35. +24 −5 frontend/src/main/web/src/containers/Glossary/ExportModal.js
  36. +21 −6 frontend/src/main/web/src/containers/Glossary/ImportModal.js
  37. +11 −2 frontend/src/main/web/src/containers/Glossary/NewEntryModal.js
  38. +21 −10 frontend/src/main/web/src/containers/Glossary/ViewHeader.js
  39. +29 −11 frontend/src/main/web/src/containers/Glossary/index.js
  40. +2 −6 frontend/src/main/web/src/containers/Root.js
  41. +7 −7 frontend/src/main/web/src/containers/UserProfile/CalendarMonthMatrix.jsx
  42. +5 −5 frontend/src/main/web/src/containers/UserProfile/CalendarPeriodHeading.jsx
  43. +26 −16 frontend/src/main/web/src/containers/UserProfile/CategoryItemMatrix.jsx
  44. +48 −39 frontend/src/main/web/src/containers/UserProfile/CategoryMatrixTable.jsx
  45. +2 −0 frontend/src/main/web/src/containers/UserProfile/ContentStateFilter.jsx
  46. +3 −2 frontend/src/main/web/src/containers/UserProfile/ContributionChart.jsx
  47. +16 −17 frontend/src/main/web/src/containers/UserProfile/DayMatrix.jsx
  48. +1 −1 frontend/src/main/web/src/containers/UserProfile/FilterableMatrixTable.jsx
  49. +14 −1 frontend/src/main/web/src/containers/UserProfile/RecentContributions.jsx
  50. +6 −7 frontend/src/main/web/src/containers/UserProfile/index.jsx
  51. +1 −1 frontend/src/main/web/src/index.js
  52. +1 −1 frontend/src/main/web/src/legacy.js
  53. +5 −5 frontend/src/main/web/src/reducers/common.js
  54. +10 −10 frontend/src/main/web/src/reducers/explore.js
  55. +59 −60 frontend/src/main/web/src/reducers/glossary.js
  56. +8 −1 frontend/src/main/web/src/reducers/profile.js
  57. +2 −2 frontend/src/main/web/src/utils/DateHelper.js
  58. +10 −11 frontend/src/main/web/src/utils/GlossaryHelper.js
  59. +7 −0 frontend/src/main/web/webpack.config.js

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -23,78 +23,71 @@
},
"license": "LGPL",
"devDependencies": {
"atomic-loader": "^0.1.3",
"autoprefixer-loader": "^3.2.0",
"babel-core": "^6.7.2",
"babel-eslint": "^6.0.0",
"atomic-loader": "0.2.2",
"autoprefixer-loader": "3.2.0",
"babel-core": "6.9.1",
"babel-eslint": "6.1.0",
"babel-jest": "^6.0.1",
"babel-loader": "^6.2.1",
"babel-loader": "6.2.4",
"babel-plugin-lodash": "2.1.0",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-preset-react-hmre": "^1.1.1",
"babel-preset-stage-0": "^6.3.13",
"css-loader": "^0.16.0",
"eslint": "^2.4.0",
"eslint-config-standard": "^5.1.0",
"eslint-config-standard-react": "^2.3.0",
"eslint-config-zanata": "^2.0.1",
"eslint-loader": "^1.3.0",
"eslint-plugin-promise": "^1.1.0",
"eslint-plugin-react": "^4.2.3",
"eslint-plugin-standard": "^1.3.2",
"extract-text-webpack-plugin": "^0.9.1",
"babel-preset-es2015": "6.9.0",
"babel-preset-react": "6.5.0",
"babel-preset-react-hmre": "1.1.1",
"babel-preset-stage-0": "6.5.0",
"css-loader": "0.23.1",
"eslint": "2.13.1",
"eslint-config-standard": "5.3.1",
"eslint-config-standard-react": "2.5.0",
"eslint-config-zanata": "2.0.1",
"eslint-loader": "1.3.0",
"eslint-plugin-promise": "1.3.2",
"eslint-plugin-react": "4.2.3",
"eslint-plugin-standard": "1.3.2",
"extract-text-webpack-plugin": "1.0.1",
"jest-cli": "github:jamedranoa/jest",
"jsonfile": "^2.2.3",
"node-sass": "^3.4.2",
"node-sass-json-importer": "^1.0.6",
"jsonfile": "2.3.1",
"node-sass": "3.8.0",
"node-sass-json-importer": "2.1.1",
"react-addons-test-utils": "^0.14.7",
"react-styleguidist": "^2.0.1",
"react-transform-hmr": "^1.0.4",
"style-loader": "^0.12.3",
"svg-sprite": "^1.2.19",
"webpack": "^1.12.8",
"webpack-dev-middleware": "^1.5.1",
"webpack-dev-server": "^1.14.1"
"react-styleguidist": "2.3.1",
"react-transform-hmr": "1.0.4",
"style-loader": "0.13.1",
"svg-sprite": "1.3.1",
"webpack": "1.13.0",
"webpack-dev-middleware": "1.6.1",
"webpack-dev-server": "1.14.1"
},
"dependencies": {
"babel-polyfill": "^6.5.0",
"chart.js": "git://github.com/huangp/Chart.js.git",
"classnames": "^2.1.3",
"defined": "^1.0.0",
"dom-helpers": "^2.4.0",
"file-saver": "^1.3.0",
"fixed-data-table": "^0.5.0",
"flat": "^1.6.0",
"history": "^2.0.0",
"immutable": "^3.7.6",
"isomorphic-fetch": "^2.2.1",
"keymirror": "^0.1.1",
"babel-polyfill": "6.9.1",
"chart.js": "1.1.1",
"classnames": "2.2.5",
"defined": "1.0.0",
"dom-helpers": "2.4.0",
"file-saver": "1.3.0",
"flat": "2.0.1",
"lodash": "4.13.1",
"moment": "^2.12.0",
"moment-range": "^2.2.0",
"normalizr": "^2.0.0",
"react": "^0.14.7",
"react-a11y": "^0.2.8",
"react-addons-pure-render-mixin": "^0.14.6",
"moment": "2.13.0",
"moment-range": "2.2.0",
"normalizr": "2.1.0",
"react": "0.14.8",
"react-chartjs": "^0.4.0",
"react-dom": "^0.14.6",
"react-helmet": "^2.3.1",
"react-list": "^0.7.13",
"react-overlays": "^0.6.0",
"react-prop-types": "^0.3.0",
"react-redux": "^4.4.0",
"react-router": "^2.0.0-rc6",
"react-router-redux": "^3.0.0",
"react-dom": "0.14.8",
"react-helmet": "3.1.0",
"react-list": "0.7.19",
"react-overlays": "0.6.3",
"react-prop-types": "0.3.2",
"react-redux": "4.4.5",
"react-router": "2.4.0",
"react-router-redux": "3.0.0",
"react-select": "^1.0.0-beta10",
"react-textarea-autosize": "^3.3.0",
"redux": "3.3.1",
"redux-actions": "^0.9.1",
"redux-api-middleware": "^1.0.0-beta3",
"redux-logger": "^2.5.0",
"redux-thunk": "^1.0.3",
"warning": "^2.1.0",
"webfontloader": "^1.6.21"
"react-textarea-autosize": "4.0.3",
"redux": "3.5.2",
"redux-actions": "0.10.0",
"redux-api-middleware": "1.0.2",
"redux-logger": "2.6.1",
"redux-thunk": "1.0.3",
"warning": "3.0.0",
"webfontloader": "1.6.24"
},
"jest": {
"scriptPreprocessor": "./node_modules/babel-jest",
@@ -1,5 +1,4 @@
import { createAction } from 'redux-actions'
import { CALL_API } from 'redux-api-middleware'
export const CLEAR_MESSAGE = 'CLEAR_MESSAGE'
export const clearMessage = createAction(CLEAR_MESSAGE)
@@ -1,6 +1,4 @@
import { CALL_API } from 'redux-api-middleware'
import { normalize } from 'normalizr'
import { SEARCH_RESULTS } from '../schemas'
import { replaceRouteQuery } from '../utils/RoutingHelpers'
import { getJsonHeaders, buildAPIRequest } from './common'
import { isEmpty, includes, clamp } from 'lodash'
@@ -27,7 +25,7 @@ const getEndpoint = (type, page, searchText) => {
return window.config.baseUrl + window.config.apiRoot + '/search/' +
type + '?' +
'sizePerPage=' + SIZE_PER_PAGE +
'&page=' + (page ? page : '1') +
'&page=' + (page || '1') +
(searchText ? '&q=' + searchText : '')
}
@@ -66,8 +64,10 @@ const getSearchProjectResults = (dispatch, searchText, pages, callbacks) => {
}
}
const getSearchLanguageTeamResults = (dispatch, searchText, pages, callbacks) => {
const endpoint = getEndpoint('teams/language', pages.languageTeamPage, searchText)
const getSearchLanguageTeamResults = (dispatch, searchText,
pages, callbacks) => {
const endpoint =
getEndpoint('teams/language', pages.languageTeamPage, searchText)
const apiTypes = [
SEARCH_LANG_TEAM_REQUEST,
{
@@ -1,6 +1,6 @@
import { createAction } from 'redux-actions'
import { CALL_API } from 'redux-api-middleware'
import { isEmpty, cloneDeep, includes, clamp, debounce } from 'lodash'
import { cloneDeep, includes, debounce } from 'lodash'
import { saveAs } from 'file-saver'
import { normalize } from 'normalizr'
import { GLOSSARY_TERM_ARRAY } from '../schemas.js'
@@ -201,7 +201,8 @@ const createGlossaryTerm = (dispatch, term) => {
GLOSSARY_CREATE_FAILURE
]
return {
[CALL_API]: buildAPIRequest(endpoint, 'POST', headers, apiTypes, JSON.stringify(entryDTO))
[CALL_API]: buildAPIRequest(endpoint, 'POST', headers, apiTypes,
JSON.stringify(entryDTO))
}
}
@@ -232,7 +233,8 @@ const updateGlossaryTerm = (dispatch, term, needRefresh) => {
GLOSSARY_UPDATE_FAILURE
]
return {
[CALL_API]: buildAPIRequest(endpoint, 'POST', headers, apiTypes, JSON.stringify(entryDTO))
[CALL_API]: buildAPIRequest(endpoint, 'POST', headers, apiTypes,
JSON.stringify(entryDTO))
}
}
@@ -285,7 +287,8 @@ const deleteAllGlossaryEntry = (dispatch) => {
}
const glossaryExport = (type) => {
const endpoint = window.config.baseUrl + window.config.apiRoot + '/glossary/file?fileType=' + type
const endpoint = window.config.baseUrl + window.config.apiRoot +
'/glossary/file?fileType=' + type
let headers = getJsonHeaders()
headers['Content-Type'] = 'application/octet-stream'
const apiTypes = [
@@ -300,7 +303,8 @@ const glossaryExport = (type) => {
payload: (action, state, res) => {
return res.blob().then((blob) => {
const selectedType = state.glossary.exportFile.type.value
const fileName = 'glossary.' + (selectedType === 'po' ? 'zip' : selectedType)
const fileName = 'glossary.' +
(selectedType === 'po' ? 'zip' : selectedType)
saveAs(blob, fileName)
})
}
@@ -415,7 +419,6 @@ export const glossarySortColumn = (col) => {
const delayGetGlossaryTerm = debounce((dispatch, state) =>
dispatch(getGlossaryTerms(state)), 160)
export const glossaryGoFirstPage = (currentPage, totalPage) => {
return (dispatch, getState) => {
if (currentPage !== 1) {
@@ -454,4 +457,3 @@ export const glossaryGoLastPage = (currentPage, totalPage) => {
}
}
@@ -75,6 +75,7 @@ class EditableText extends Component {
!children && classes.text.placeholder
)
}
/* eslint-disable react/jsx-no-bind */
if (editable && editing) {
return (
<TextInput
@@ -88,10 +89,12 @@ class EditableText extends Component {
/>
)
}
/* eslint-enable react/jsx-no-bind */
const emptyText = editable ? placeholder : emptyReadOnlyText
const text = children || emptyText
return (
<Row theme={textStateClasses} align='start' onClick={::this.handleClick} title={title}>
<Row theme={textStateClasses} align='start'
onClick={::this.handleClick} title={title}>
{text}
</Row>
)
@@ -102,7 +105,10 @@ EditableText.propTypes = {
children: PropTypes.string,
editable: PropTypes.bool,
editing: PropTypes.bool,
placeholder: PropTypes.string
placeholder: PropTypes.string,
emptyReadOnlyText: PropTypes.string,
theme: PropTypes.object,
title: PropTypes.string
}
export default EditableText
@@ -1,8 +1,7 @@
import React, { PropTypes } from 'react'
import { merge } from 'lodash'
import { flattenThemeClasses } from '../utils/styleUtils'
import { Icon } from './'
import { View, Heading, Link } from './'
import { Icon, View, Heading, Link } from './'
const wrapperTheme = {
base: {
@@ -84,6 +83,7 @@ const Header = ({
}
Header.propTypes = {
children: PropTypes.node,
theme: PropTypes.object,
title: PropTypes.string,
icon: PropTypes.string,
@@ -1,4 +1,4 @@
import React from 'react'
import React, { PropTypes } from 'react'
import { flattenThemeClasses } from '../utils/styleUtils'
const classes = {
@@ -15,7 +15,6 @@ const classes = {
*/
const Heading = ({
children,
level,
theme,
...props
}) => {
@@ -25,4 +24,9 @@ const Heading = ({
</h1>
}
Heading.propTypes = {
children: PropTypes.node,
theme: PropTypes.object
}
export default Heading
@@ -103,7 +103,8 @@ Icon.propTypes = {
*/
size: PropTypes.oneOf(
['n2', 'n1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
)
),
theme: PropTypes.object
}
export default Icon
@@ -55,7 +55,8 @@ Link.propTypes = {
id: PropTypes.string,
theme: PropTypes.object,
link: PropTypes.string,
useHref: PropTypes.bool
useHref: PropTypes.bool,
children: PropTypes.node
}
export default Link
@@ -37,7 +37,7 @@ const LoaderText = ({
{loading
? <Base theme={themed.root}>
{loadingText} <Loader theme={themed.loader} size={size} />
</Base>
</Base>
: children
}
</Base>
@@ -88,7 +88,7 @@ const Modal = ({
theme={classes.closeButton}
type='muted'
onClick={onHide}>
<Icon name='cross' size='2' theme={classes.closeIcon}/>
<Icon name='cross' size='2' theme={classes.closeIcon} />
</ButtonLink>
) : undefined}
{children}
@@ -140,15 +140,14 @@ const Nav = ({
{items.map((item, itemId) => {
if (((item.auth === 'public') || (item.auth === auth) ||
(item.auth === 'loggedin' && admin)) && !item.more) {
let link = null
if (isJsfPage) {
//jsf pages
// jsf pages
link = links[item.link]
? (links.context + links[item.link])
: (links.context + item.link)
} else {
//react pages, /a/index.xhtml
// react pages, /a/index.xhtml
link = item.internalLink
? item.internalLink
: (links[item.link]
@@ -165,7 +164,7 @@ const Nav = ({
useHref={useHref}
icon={item.icon}
tooltip={item.tooltip}
title={item.title}/>
title={item.title} />
}
return null
})}
@@ -194,5 +193,4 @@ Nav.propTypes = {
isJsfPage: PropTypes.bool
}
export default Nav
Oops, something went wrong.

0 comments on commit 04655da

Please sign in to comment.