@woosmap/ui 4.145.1 → 4.145.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
Binary file
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@woosmap/ui",
|
|
3
|
-
"version": "4.145.
|
|
3
|
+
"version": "4.145.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/WebGeoServices/ui.git"
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"google-map-react": "^2.2.1",
|
|
21
21
|
"i18next": "^23.7.11",
|
|
22
22
|
"moment": "^2.29.4",
|
|
23
|
+
"numeral": "^2.0.6",
|
|
23
24
|
"perfect-scrollbar": "^1.5.5",
|
|
24
25
|
"prop-types": "^15.8.1",
|
|
25
26
|
"react": "^18.2.0",
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import PricingSlider from './PricingSlider';
|
|
3
4
|
import PricingData from './PricingData';
|
|
4
|
-
import Switch from '../Switch/Switch';
|
|
5
5
|
|
|
6
|
-
class PricingSimulator extends Component {
|
|
7
|
-
constructor(props) {
|
|
8
|
-
super(props);
|
|
9
|
-
const params = new URLSearchParams(window.location.search);
|
|
10
|
-
this.state = {
|
|
11
|
-
publicMode: params.get('public') !== 'false',
|
|
12
|
-
currency: params.get('currency') || '€',
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
6
|
|
|
7
|
+
class PricingSimulator extends Component {
|
|
16
8
|
render() {
|
|
17
|
-
const { publicMode, currency } = this.
|
|
9
|
+
const { publicMode, currency } = this.props;
|
|
18
10
|
return (
|
|
19
11
|
<div style={{ width: '100%', display: 'flex', flexDirection: 'column', overflowY: 'auto' }}>
|
|
20
|
-
<Switch
|
|
21
|
-
onChange={(checked) => this.setState({ publicMode: checked })}
|
|
22
|
-
checked={publicMode}
|
|
23
|
-
id="public_mode"
|
|
24
|
-
name="public_mode"
|
|
25
|
-
text="Public Mode"
|
|
26
|
-
/>
|
|
27
|
-
|
|
28
12
|
{Object.keys(PricingData).map((category) => (
|
|
29
13
|
<div style={{ border: '1px solid black' }}>
|
|
30
14
|
<h1>{category}</h1>
|
|
@@ -49,8 +33,8 @@ class PricingSimulator extends Component {
|
|
|
49
33
|
}
|
|
50
34
|
}
|
|
51
35
|
|
|
52
|
-
PricingSimulator.defaultProps = {};
|
|
36
|
+
PricingSimulator.defaultProps = { currency: '€', publicMode: true };
|
|
53
37
|
|
|
54
|
-
PricingSimulator.propTypes = {};
|
|
38
|
+
PricingSimulator.propTypes = { currency: PropTypes.string, publicMode: PropTypes.bool };
|
|
55
39
|
|
|
56
40
|
export default PricingSimulator;
|