Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Jan 23, 2023
1 parent 1f9f750 commit 2c179d0
Show file tree
Hide file tree
Showing 22 changed files with 108 additions and 111 deletions.
6 changes: 3 additions & 3 deletions actions/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ReducerIndex from '../reducers/index';
import searchReducer from '../reducers/search';
ReducerIndex.register("search", searchReducer);

import uuid from 'uuid';
import {v1 as uuidv1} from 'uuid';
import axios from 'axios';

export const SEARCH_CHANGE = 'SEARCH_CHANGE';
Expand Down Expand Up @@ -42,7 +42,7 @@ export function changeSearch(text, providers) {

export function startSearch(text, searchParams, providers, startup = false) {
return (dispatch) => {
const reqId = uuid.v1();
const reqId = uuidv1();
const providerKeys = Object.keys(providers);
dispatch({
type: SEARCH_SET_REQUEST,
Expand All @@ -67,7 +67,7 @@ export function startSearch(text, searchParams, providers, startup = false) {
export function searchMore(moreItem, text, providers) {
return (dispatch) => {
if (moreItem.provider && providers[moreItem.provider].getMoreResults) {
const reqId = uuid.v1();
const reqId = uuidv1();
dispatch({
type: SEARCH_SET_REQUEST,
id: reqId,
Expand Down
6 changes: 3 additions & 3 deletions components/AttributeForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import isEmpty from 'lodash.isempty';
import clone from 'clone';
import uuid from 'uuid';
import {v1 as uuidv1} from 'uuid';
import {setEditContext, clearEditContext, getFeatureTemplate} from '../actions/editing';
import {setCurrentTaskBlocked} from '../actions/task';
import {LayerRole, refreshLayer} from '../actions/layers';
Expand Down Expand Up @@ -385,7 +385,7 @@ class AttributeForm extends React.Component {
relationValues[datasetname].features[index].properties[field] = "";
} else if (element.type === "hidden" && element.value.startsWith("data:")) {
const type = element.value.match(/image\/\w+/);
relationUploads[name] = new File([this.dataUriToBlob(element.value)], uuid.v1() + ".jpg", {type: type});
relationUploads[name] = new File([this.dataUriToBlob(element.value)], uuidv1() + ".jpg", {type: type});
relationValues[datasetname].features[index].properties[field] = "";
}
} else {
Expand All @@ -405,7 +405,7 @@ class AttributeForm extends React.Component {
feature.properties[name] = "";
} else if (element.type === "hidden" && element.value.startsWith("data:")) {
const type = element.value.match(/image\/\w+/);
featureUploads[name] = new File([this.dataUriToBlob(element.value)], uuid.v1() + ".jpg", {type: type});
featureUploads[name] = new File([this.dataUriToBlob(element.value)], uuidv1() + ".jpg", {type: type});
feature.properties[name] = "";
}
}
Expand Down
6 changes: 3 additions & 3 deletions components/EditUploadField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import mime from 'mime-to-extensions';
import Icon from './Icon';
import uuid from 'uuid';
import {v1 as uuidv1} from 'uuid';
import ModalDialog from './ModalDialog';
import ButtonBar from './widgets/ButtonBar';
import ConfigUtils from '../utils/ConfigUtils';
Expand Down Expand Up @@ -152,7 +152,7 @@ export default class EditUploadField extends React.Component {
const imageData = canvas.toDataURL("image/jpeg");
this.setState({imageData: imageData});
this.props.updateField(this.props.fieldId, '');
this.props.updateFile(this.props.fieldId, new File([this.dataUriToBlob(imageData)], uuid.v1() + ".jpg", {type: "image/jpeg"}));
this.props.updateFile(this.props.fieldId, new File([this.dataUriToBlob(imageData)], uuidv1() + ".jpg", {type: "image/jpeg"}));
}
this.disableCamera();
}
Expand All @@ -166,7 +166,7 @@ export default class EditUploadField extends React.Component {
showImageEditor(imageData, (newImageData) => {
this.setState({imageData: newImageData});
this.props.updateField(this.props.fieldId, '');
this.props.updateFile(this.props.fieldId, new File([this.dataUriToBlob(newImageData)], uuid.v1() + ".jpg", {type: "image/jpeg"}));
this.props.updateFile(this.props.fieldId, new File([this.dataUriToBlob(newImageData)], uuidv1() + ".jpg", {type: "image/jpeg"}));
});
} else if (action === "Clear") {
this.clearImage();
Expand Down
14 changes: 6 additions & 8 deletions components/IdentifyViewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import isEmpty from 'lodash.isempty';
import FileSaver from 'file-saver';
import ReactHtmlParser from 'react-html-parser';
import {convertNodeToElement} from 'react-html-parser';
import htmlReactParser, {domToReact} from 'html-react-parser';
import clone from 'clone';
import ConfigUtils from '../utils/ConfigUtils';
import {LayerRole, addLayerFeatures, removeLayer} from '../actions/layers';
Expand Down Expand Up @@ -591,18 +590,17 @@ class IdentifyViewer extends React.Component {
}
parsedContent = (text) => {
text = text.replace('&#10;', '<br />');
return ReactHtmlParser(text, {transform: (node, index) => {
const options = {replace: (node) => {
if (node.name === "a") {
return (
<a href={node.attribs.href} key={"a" + index} onClick={node.attribs.onclick ? (ev) => this.evalOnClick(ev, node.attribs.onclick) : this.attributeLinkClicked} target={node.attribs.target || "_blank"}>
{node.children.map((child, idx) => (
<React.Fragment key={"f" + idx}>{convertNodeToElement(child, idx)}</React.Fragment>)
)}
<a href={node.attribs.href} onClick={node.attribs.onclick ? (ev) => this.evalOnClick(ev, node.attribs.onclick) : this.attributeLinkClicked} target={node.attribs.target || "_blank"}>
{domToReact(node.children, options)}
</a>
);
}
return undefined;
}});
}};
return htmlReactParser(text, options);
}
evalOnClick = (ev, onclick) => {
eval(onclick);
Expand Down
4 changes: 2 additions & 2 deletions components/QtDesignerForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {connect} from 'react-redux';
import PropTypes from 'prop-types';
import axios from 'axios';
import xml2js from 'xml2js';
import uuid from 'uuid';
import {v1 as uuidv1} from 'uuid';
import isEmpty from 'lodash.isempty';
import ButtonBar from './widgets/ButtonBar';
import TextInput from './widgets/TextInput';
Expand Down Expand Up @@ -615,7 +615,7 @@ class QtDesignerForm extends React.Component {
explicitArray: false,
mergeAttrs: true
};
const loadingReqId = uuid.v1();
const loadingReqId = uuidv1();
this.setState({loading: true, loadingReqId: loadingReqId});
xml2js.parseString(data, options, (err, json) => {
const relationTables = {};
Expand Down
4 changes: 2 additions & 2 deletions components/ResizeableWindow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import PropTypes from 'prop-types';
import classnames from 'classnames';
import {connect} from 'react-redux';
import {Rnd} from 'react-rnd';
import uuid from 'uuid';
import {v1 as uuidv1} from 'uuid';
import {raiseWindow, registerWindow, unregisterWindow} from '../actions/windows';
import ConfigUtils from '../utils/ConfigUtils';
import LocaleUtils from '../utils/LocaleUtils';
Expand Down Expand Up @@ -87,7 +87,7 @@ class ResizeableWindow extends React.Component {
}
this.dragShield = null;
this.titlebar = null;
this.id = uuid.v1();
this.id = uuidv1();
}
computeInitialX = (x) => {
return x >= 0 ? x : window.innerWidth - Math.abs(x);
Expand Down
4 changes: 2 additions & 2 deletions components/SearchBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {connect} from 'react-redux';
import {createSelector} from 'reselect';
import isEmpty from 'lodash.isempty';
import axios from 'axios';
import uuid from 'uuid';
import {v1 as uuidv1} from 'uuid';
import {SearchResultType} from '../actions/search';
import {logAction} from '../actions/logging';
import {panTo, zoomToExtent, zoomToPoint} from '../actions/map';
Expand Down Expand Up @@ -419,7 +419,7 @@ class SearchBox extends React.Component {
this.setState({searchResults: {}});
return;
}
const searchSession = uuid.v1();
const searchSession = uuidv1();
this.setState({searchResults: {query_text: searchText}, searchSession: searchSession, pendingSearches: Object.keys(this.props.searchProviders).concat(["__fulltext"])});
// Fulltext search
if (this.props.theme.searchProviders.find(entry => entry.provider === "solr")) {
Expand Down
4 changes: 2 additions & 2 deletions components/widgets/SuggestionInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import React from 'react';
import PropTypes from 'prop-types';
import uuid from 'uuid';
import {v1 as uuidv1} from 'uuid';
import './style/SuggestionInput.css';


Expand All @@ -25,7 +25,7 @@ export default class SuggestionInput extends React.Component {
}
constructor(props) {
super(props);
this.datalistid = uuid.v1();
this.datalistid = uuidv1();
}
render() {
return (
Expand Down
4 changes: 2 additions & 2 deletions components/widgets/VectorLayerPicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import React from 'react';
import PropTypes from 'prop-types';
import uuid from 'uuid';
import {v1 as uuidv4} from 'uuid';
import Icon from '../../components/Icon';
import LocaleUtils from '../../utils/LocaleUtils';

Expand Down Expand Up @@ -37,7 +37,7 @@ export default class VectorLayerPicker extends React.Component {
const name = prompt(message);
if (name) {
const layer = {
id: uuid.v4(),
id: uuidv4(),
title: name,
type: 'vector'
};
Expand Down
92 changes: 47 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,76 +7,78 @@
"repository": "[email protected]:qgis/qwc2.git",
"dependencies": {
"@turf/buffer": "6.5.0",
"@turf/helpers": "^6.5.0",
"any-date-parser": "^1.5.2",
"axios": "0.23.0",
"buffer": "^6.0.3",
"chartist": "0.10.1",
"@turf/helpers": "6.5.0",
"any-date-parser": "1.5.3",
"axios": "1.2.3",
"buffer": "6.0.3",
"chartist": "0.11.4",
"chartist-plugin-axistitle": "0.0.7",
"classnames": "2.3.1",
"classnames": "2.3.2",
"clone": "2.1.2",
"core-js": "3.19.0",
"core-js": "3.27.2",
"country-language": "0.1.7",
"dayjs": "^1.11.0",
"dayjs": "1.11.7",
"deepcopy": "2.1.0",
"deepmerge": "4.2.2",
"diacritics": "1.3.0",
"fast-xml-parser": "3.21.0",
"fast-xml-parser": "4.0.14",
"file-saver": "2.0.5",
"flat": "5.0.2",
"form-data-entries": "1.0.4",
"geojson-bounding-box": "0.2.0",
"ismobilejs": "1.1.1",
"jszip": "3.7.1",
"jszip": "3.10.1",
"lodash.isempty": "4.4.0",
"lodash.isequal": "4.5.0",
"lodash.omit": "4.5.0",
"lodash.pickby": "4.6.0",
"lodash.sortby": "4.7.0",
"mime-to-extensions": "1.0.2",
"mousetrap": "1.6.5",
"ol": "6.9.0",
"painterro": "^1.2.78",
"path-browserify": "^1.0.1",
"proj4": "2.7.5",
"prop-types": "15.7.2",
"qrcode.react": "1.0.1",
"randomcolor": "^0.6.2",
"react": "17.0.2",
"ol": "7.2.2",
"painterro": "1.2.78",
"path-browserify": "1.0.1",
"proj4": "2.8.1",
"prop-types": "15.8.1",
"qrcode.react": "3.1.0",
"randomcolor": "0.6.2",
"react": "18.2.0",
"react-chartist": "0.14.4",
"react-contenteditable": "^3.3.6",
"react-copy-to-clipboard": "5.0.4",
"react-dom": "17.0.2",
"react-html-parser": "2.0.2",
"react-intl": "5.21.0",
"react-contenteditable": "3.3.6",
"react-copy-to-clipboard": "5.1.0",
"react-dom": "18.2.0",
"html-react-parser": "3.0.8",
"react-intl": "6.2.5",
"react-numeric-input2": "3.1.0",
"react-redux": "7.2.5",
"react-rnd": "10.1.10",
"react-share": "4.4.0",
"react-redux": "8.0.5",
"react-rnd": "10.4.1",
"react-share": "4.4.1",
"react-sortablejs": "1.5.1",
"react-swipeable": "6.2.0",
"redux": "4.1.1",
"react-swipeable": "7.0.0",
"redux": "4.2.0",
"redux-logger": "3.0.6",
"redux-thunk": "2.3.0",
"regenerator-runtime": "0.13.9",
"reselect": "4.0.0",
"redux-thunk": "2.4.2",
"regenerator-runtime": "0.13.11",
"reselect": "4.1.7",
"sortablejs": "1.14.0",
"stream-browserify": "^3.0.0",
"timers-browserify": "^2.0.12"
"stream-browserify": "3.0.0",
"timers-browserify": "2.0.12",
"url": "0.11.0",
"uuid": "8.3.2"
},
"devDependencies": {
"@babel/core": "7.15.8",
"@babel/eslint-parser": "7.15.8",
"@babel/plugin-proposal-class-properties": "7.14.5",
"@babel/plugin-proposal-object-rest-spread": "7.15.6",
"@babel/preset-env": "7.15.8",
"@babel/preset-react": "7.14.5",
"@redux-devtools/core": "3.9.0",
"@redux-devtools/dock-monitor": "1.4.0",
"@redux-devtools/log-monitor": "2.3.0",
"@types/react": "17.0.32",
"@vusion/webfonts-generator": "0.7.3",
"mkdirp": "1.0.4",
"@babel/core": "7.20.12",
"@babel/eslint-parser": "7.19.1",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
"@babel/preset-env": "7.20.2",
"@babel/preset-react": "7.18.6",
"@redux-devtools/core": "3.13.1",
"@redux-devtools/dock-monitor": "3.0.1",
"@redux-devtools/log-monitor": "4.0.2",
"@types/react": "18.0.27",
"@vusion/webfonts-generator": "0.8.0",
"mkdirp": "2.1.3",
"object-path": "0.11.8",
"redux-immutable-state-invariant": "2.1.0",
"xml2js": "0.4.23"
Expand Down
4 changes: 2 additions & 2 deletions plugins/Editing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import isEmpty from 'lodash.isempty';
import isEqual from 'lodash.isequal';
import uuid from 'uuid';
import {v1 as uuidv1} from 'uuid';
import {setEditContext, clearEditContext, getFeatureTemplate} from '../actions/editing';
import {setCurrentTask, setCurrentTaskBlocked} from '../actions/task';
import {LayerRole, addLayerFeatures, removeLayer, refreshLayer, changeLayerProperty} from '../actions/layers';
Expand Down Expand Up @@ -354,7 +354,7 @@ class Editing extends React.Component {
const editFeature = {
type: "Feature",
geometry: geometry,
id: uuid.v1()
id: uuidv1()
};
this.props.setEditContext('Editing', {action: "Draw", feature: editFeature, changed: true});
this.setState({drawPick: false, drawPickResults: null});
Expand Down
15 changes: 6 additions & 9 deletions plugins/MapTip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import axios from 'axios';
import isEmpty from 'lodash.isempty';
import ReactHtmlParser from 'react-html-parser';
import {convertNodeToElement} from 'react-html-parser';
import htmlReactParser, {domToReact} from 'html-react-parser';
import {showIframeDialog} from '../actions/windows';
import ConfigUtils from '../utils/ConfigUtils';
import IdentifyUtils from '../utils/IdentifyUtils';
Expand Down Expand Up @@ -148,18 +146,17 @@ class MapTip extends React.Component {
return null;
}
parsedContent = (text) => {
return ReactHtmlParser(text, {transform: (node, index) => {
const options = {replace: (node) => {
if (node.name === "a") {
return (
<a href={node.attribs.href} key={"a" + index} onClick={node.attribs.onclick ? (ev) => this.evalOnClick(ev, node.attribs.onclick) : this.attributeLinkClicked} target={node.attribs.target || "_blank"}>
{node.children.map((child, idx) => (
<React.Fragment key={"f" + idx}>{convertNodeToElement(child, idx)}</React.Fragment>)
)}
<a href={node.attribs.href} onClick={node.attribs.onclick ? (ev) => this.evalOnClick(ev, node.attribs.onclick) : this.attributeLinkClicked} target={node.attribs.target || "_blank"}>
{domToReact(node.children, options)}
</a>
);
}
return undefined;
}});
}};
return htmlReactParser(text, options);
}
evalOnClick = (ev, onclick) => {
eval(onclick);
Expand Down
Loading

0 comments on commit 2c179d0

Please sign in to comment.