Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 8 additions & 68 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"prismjs": "1.25.0",
"prop-types": "15.7.2",
"qrcode": "1.4.4",
"query-string": "6.14.1",
"react": "16.14.0",
"react-ace": "9.4.3",
"react-dnd": "10.0.2",
Expand Down
19 changes: 9 additions & 10 deletions src/dashboard/Data/Browser/Browser.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import stringCompare from 'lib/stringCompare';
import styles from 'dashboard/Data/Browser/Browser.scss';
import subscribeTo from 'lib/subscribeTo';
import * as ColumnPreferences from 'lib/ColumnPreferences';
import * as queryString from 'query-string';
import { Helmet } from 'react-helmet';
import PropTypes from 'lib/PropTypes';
import ParseApp from 'lib/ParseApp';
Expand Down Expand Up @@ -213,9 +212,9 @@ class Browser extends DashboardView {
if (!props || !props.location || !props.location.search) {
return filters;
}
const query = queryString.parse(props.location.search);
if (query.filters) {
const queryFilters = JSON.parse(query.filters);
const query = new URLSearchParams(props.location.search);
if (query.has('filters')) {
const queryFilters = JSON.parse(query.get('filters'));
queryFilters.forEach((filter) => filters = filters.push(new Map(filter)));
}
return filters;
Expand Down Expand Up @@ -397,7 +396,7 @@ class Browser extends DashboardView {
if (name === 'objectId' || this.state.isUnique && name !== this.state.uniqueField) {
return;
}
if (!!required) {
if (required) {
requiredCols.push(name);
}
if (className === '_User' && (name === 'username' || name === 'password')) {
Expand All @@ -414,7 +413,7 @@ class Browser extends DashboardView {
for (let idx = 0; idx < requiredCols.length; idx++) {
const name = requiredCols[idx];
if (!obj.get(name)) {
this.showNote("Please enter all required fields", true);
this.showNote('Please enter all required fields', true);
this.setState({
markRequiredFieldRow: -1
});
Expand Down Expand Up @@ -452,7 +451,7 @@ class Browser extends DashboardView {
});
},
error => {
let msg = typeof error === "string" ? error : error.message;
let msg = typeof error === 'string' ? error : error.message;
if (msg) {
msg = msg[0].toUpperCase() + msg.substr(1);
}
Expand All @@ -472,7 +471,7 @@ class Browser extends DashboardView {
this.setState(state);
},
error => {
let msg = typeof error === "string" ? error : error.message;
let msg = typeof error === 'string' ? error : error.message;
if (msg) {
msg = msg[0].toUpperCase() + msg.substr(1);
}
Expand Down Expand Up @@ -501,7 +500,7 @@ class Browser extends DashboardView {
if (name === 'objectId' || this.state.isUnique && name !== this.state.uniqueField) {
return;
}
if (!!required) {
if (required) {
requiredCols.push(name);
}
if (className === '_User' && (name === 'username' || name === 'password')) {
Expand All @@ -518,7 +517,7 @@ class Browser extends DashboardView {
for (let idx = 0; idx < requiredCols.length; idx++) {
const name = requiredCols[idx];
if (!obj.get(name)) {
this.showNote("Please enter all required fields", true);
this.showNote('Please enter all required fields', true);
this.setState({
markRequiredFieldRow: rowIndex
});
Expand Down
7 changes: 3 additions & 4 deletions src/dashboard/Push/PushNew.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import Toggle from 'components/Toggle/Toggle.react';
import Toolbar from 'components/Toolbar/Toolbar.react';
import { Directions } from 'lib/Constants';
import { extractExpiration, extractPushTime } from 'lib/extractTime';
import * as queryString from 'query-string';

const PARSE_SERVER_SUPPORTS_AB_TESTING = false;

Expand Down Expand Up @@ -148,11 +147,11 @@ class PushNew extends DashboardView {
componentWillMount() {
this.props.schema.dispatch(SchemaStore.ActionTypes.FETCH);
let options = { xhrKey: XHR_KEY };
const query = queryString.parse(this.props.location.search);
if (query.audienceId) {
const query = new URLSearchParams(this.props.location.search);
if (query.has('audienceId')) {
options.limit = PushConstants.SHOW_MORE_LIMIT;
options.min = PushConstants.INITIAL_PAGE_SIZE;
this.setState({ initialAudienceId: query.audienceId });
this.setState({ initialAudienceId: query.get('audienceId') });
}
this.props.pushaudiences.dispatch(PushAudiencesStore.ActionTypes.FETCH,
options).then(() => {
Expand Down