@woosmap/ui 4.164.3 → 4.164.5
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.
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import distanceImgSq from '../../images/products/product-distance-sq.png';
|
|
|
5
5
|
import mapImgSq from '../../images/products/product-map-sq.png';
|
|
6
6
|
import indoorImgSq from '../../images/products/product-indoor-sq.png';
|
|
7
7
|
// import geofencingImgSq from '../../images/products/product-geofencing-sq.png';
|
|
8
|
-
import transitImgSq from '../../images/products/product-transit-sq.png';
|
|
8
|
+
// import transitImgSq from '../../images/products/product-transit-sq.png';
|
|
9
9
|
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
|
|
@@ -20,7 +20,7 @@ const Pricing = {
|
|
|
20
20
|
publicTierCount: 2,
|
|
21
21
|
unit: "Monthly Requests",
|
|
22
22
|
description:
|
|
23
|
-
"Search for your points of interest by location, proxilmity to a route, by their characteristics with autocomplete capabilities
|
|
23
|
+
"Search for your points of interest by location, proxilmity to a route, by their characteristics with autocomplete capabilities",
|
|
24
24
|
pricing: [
|
|
25
25
|
[100000, 0.52],
|
|
26
26
|
[500000, 0.41],
|
|
@@ -54,7 +54,7 @@ const Pricing = {
|
|
|
54
54
|
publicTierCount: 2,
|
|
55
55
|
unit: "Monthly Requests",
|
|
56
56
|
description:
|
|
57
|
-
"
|
|
57
|
+
"Handle and maintain location data, ensuring accuracy and reliability",
|
|
58
58
|
pricing: [
|
|
59
59
|
[100000, 10.32],
|
|
60
60
|
[500000, 8.24],
|
|
@@ -95,9 +95,7 @@ const Pricing = {
|
|
|
95
95
|
unit: "Monthly Requests",
|
|
96
96
|
description:
|
|
97
97
|
"Get suggestions on addresses, localities, postcodes and more. Search on full words as well as substrings, with high flexibility on typos",
|
|
98
|
-
pricing: [
|
|
99
|
-
[50000000, 0],
|
|
100
|
-
],
|
|
98
|
+
pricing: [],
|
|
101
99
|
discountEligible: true,
|
|
102
100
|
},
|
|
103
101
|
'Details': {
|
|
@@ -119,7 +117,7 @@ const Pricing = {
|
|
|
119
117
|
},
|
|
120
118
|
'Details UK Addresses': {
|
|
121
119
|
defaultQueries: 0,
|
|
122
|
-
publicTierCount:
|
|
120
|
+
publicTierCount: 4, unit: "Monthly Requests",
|
|
123
121
|
description:
|
|
124
122
|
"Get details on Autocomplete suggestions on UK addresses benefiting from best available data on the market",
|
|
125
123
|
pricing: [
|
|
@@ -154,7 +152,7 @@ const Pricing = {
|
|
|
154
152
|
},
|
|
155
153
|
'Geocode/Reverse Geocode UK addresses': {
|
|
156
154
|
defaultQueries: 0,
|
|
157
|
-
publicTierCount:
|
|
155
|
+
publicTierCount: 4, unit: "Monthly Requests",
|
|
158
156
|
description:
|
|
159
157
|
"Geocoding/Reverse geocoding on localities, postcodes and UK addresses benefiting from best available data on the market",
|
|
160
158
|
pricing: [
|
|
@@ -200,11 +198,11 @@ const Pricing = {
|
|
|
200
198
|
},
|
|
201
199
|
},
|
|
202
200
|
},
|
|
203
|
-
'Map
|
|
201
|
+
'Map': {
|
|
204
202
|
image : mapImgSq,
|
|
205
203
|
description : "Display your data without compromising readability",
|
|
206
204
|
pricings: {
|
|
207
|
-
'
|
|
205
|
+
'Mapload': {
|
|
208
206
|
defaultQueries: 0,
|
|
209
207
|
publicTierCount: 2,
|
|
210
208
|
unit: "Monthly Requests",
|
|
@@ -346,6 +344,23 @@ const Pricing = {
|
|
|
346
344
|
],
|
|
347
345
|
discountEligible: false,
|
|
348
346
|
},
|
|
347
|
+
'Transit': {
|
|
348
|
+
defaultQueries: 0,
|
|
349
|
+
publicTierCount: 2,
|
|
350
|
+
unit: "Monthly Requests",
|
|
351
|
+
description:
|
|
352
|
+
"Get distance, duration, path and public transport details between an origin and a destination, based on public transportation",
|
|
353
|
+
pricing: [
|
|
354
|
+
[100000, 3.68],
|
|
355
|
+
[500000, 2.94],
|
|
356
|
+
[1000000, 2.76],
|
|
357
|
+
[5000000, 1.38],
|
|
358
|
+
[10000000, 0.35],
|
|
359
|
+
[20000000, 0.11],
|
|
360
|
+
[50000000, 0.04],
|
|
361
|
+
],
|
|
362
|
+
discountEligible: false,
|
|
363
|
+
},
|
|
349
364
|
},
|
|
350
365
|
},
|
|
351
366
|
Geolocation: {
|
|
@@ -405,29 +420,6 @@ const Pricing = {
|
|
|
405
420
|
},
|
|
406
421
|
},
|
|
407
422
|
},
|
|
408
|
-
'Transit': {
|
|
409
|
-
image : transitImgSq,
|
|
410
|
-
description : "Get time and path for travels using public transportation",
|
|
411
|
-
pricings: {
|
|
412
|
-
'Map': {
|
|
413
|
-
defaultQueries: 0,
|
|
414
|
-
publicTierCount: 2,
|
|
415
|
-
unit: "Monthly Requests",
|
|
416
|
-
description:
|
|
417
|
-
"Get distance, duration, path and public transport details between an origin and a destination, based on public transportation",
|
|
418
|
-
pricing: [
|
|
419
|
-
[100000, 2.58],
|
|
420
|
-
[500000, 2.06],
|
|
421
|
-
[1000000, 1.93],
|
|
422
|
-
[5000000, 0.97],
|
|
423
|
-
[10000000, 0.24],
|
|
424
|
-
[20000000, 0.07],
|
|
425
|
-
[50000000, 0.03],
|
|
426
|
-
],
|
|
427
|
-
discountEligible: false,
|
|
428
|
-
},
|
|
429
|
-
},
|
|
430
|
-
},
|
|
431
423
|
Indoor: {
|
|
432
424
|
image : indoorImgSq,
|
|
433
425
|
description : "Map private venues and propose indoor search and wayfinding",
|
|
@@ -13,7 +13,7 @@ class PricingSimulator extends Component {
|
|
|
13
13
|
sliders[category] = {};
|
|
14
14
|
}
|
|
15
15
|
sliders[category][pricingKey] = {
|
|
16
|
-
queries:
|
|
16
|
+
queries: 0,
|
|
17
17
|
amount: 0,
|
|
18
18
|
computedQueries: PricingData[category].pricings[pricingKey].defaultQueries || 0,
|
|
19
19
|
};
|
|
@@ -112,6 +112,7 @@ class PricingSimulator extends Component {
|
|
|
112
112
|
const productPricing = PricingData[category].pricings[pricingKey];
|
|
113
113
|
return (
|
|
114
114
|
<PricingSlider
|
|
115
|
+
id={this.getAnchor(`${category}_${pricingKey}`)}
|
|
115
116
|
productPricing={productPricing}
|
|
116
117
|
name={pricingKey}
|
|
117
118
|
key={`pricing_${pricingKey.replace(' ', '')}`}
|
|
@@ -35,13 +35,17 @@ class PricingSlider extends Component {
|
|
|
35
35
|
computeQueries = (valueNow) => {
|
|
36
36
|
const { productPricing, publicMode } = this.props;
|
|
37
37
|
const { pricing, publicTierCount } = productPricing;
|
|
38
|
-
|
|
38
|
+
if (pricing.length === 0) {
|
|
39
|
+
return valueNow;
|
|
40
|
+
}
|
|
41
|
+
const tierIndex = Math.min(Math.floor(valueNow / 100000), pricing.length - 1);
|
|
42
|
+
|
|
39
43
|
// eslint-disable-next-line prefer-destructuring
|
|
40
44
|
const tier = pricing[tierIndex][0];
|
|
41
|
-
const value = valueNow - tierIndex *
|
|
45
|
+
const value = valueNow - tierIndex * 100000;
|
|
42
46
|
|
|
43
47
|
const previousTier = pricing[tierIndex - 1] ? pricing[tierIndex - 1][0] : 0;
|
|
44
|
-
const newValue = ((tier - previousTier) * value) /
|
|
48
|
+
const newValue = ((tier - previousTier) * value) / 100000 + previousTier;
|
|
45
49
|
if (newValue > pricing[publicMode ? publicTierCount - 1 : pricing.length - 1][0]) {
|
|
46
50
|
return '∞';
|
|
47
51
|
}
|
|
@@ -58,7 +62,7 @@ class PricingSlider extends Component {
|
|
|
58
62
|
const tier = pricing[matchedTierIndex];
|
|
59
63
|
if (tier) {
|
|
60
64
|
const previousTier = matchedTierIndex > 0 ? pricing[matchedTierIndex - 1][0] : 0;
|
|
61
|
-
const queries = matchedTierIndex *
|
|
65
|
+
const queries = matchedTierIndex * 100000 + (100000 * (value - previousTier)) / tier[0];
|
|
62
66
|
this.onChange(queries);
|
|
63
67
|
}
|
|
64
68
|
};
|
|
@@ -80,11 +84,11 @@ class PricingSlider extends Component {
|
|
|
80
84
|
if (props.key === 0) {
|
|
81
85
|
value = 0;
|
|
82
86
|
} else {
|
|
83
|
-
const index = props.key /
|
|
87
|
+
const index = props.key / 100000 - 1;
|
|
84
88
|
if (index === displayedPricing.length - 1 && publicMode) {
|
|
85
89
|
value = '∞';
|
|
86
90
|
} else {
|
|
87
|
-
const tier = displayedPricing[props.key /
|
|
91
|
+
const tier = displayedPricing[props.key / 100000 - 1];
|
|
88
92
|
value = numeral(tier[0]).format('0.[0]a');
|
|
89
93
|
}
|
|
90
94
|
}
|
|
@@ -96,7 +100,7 @@ class PricingSlider extends Component {
|
|
|
96
100
|
);
|
|
97
101
|
};
|
|
98
102
|
|
|
99
|
-
getMarks = (displayedPricing) => [-1, ...displayedPricing.keys()].map((key) => (key + 1) *
|
|
103
|
+
getMarks = (displayedPricing) => [-1, ...displayedPricing.keys()].map((key) => (key + 1) * 100000);
|
|
100
104
|
|
|
101
105
|
getDisplayedPricing = () => {
|
|
102
106
|
const { productPricing, publicMode } = this.props;
|
|
@@ -132,7 +136,7 @@ class PricingSlider extends Component {
|
|
|
132
136
|
};
|
|
133
137
|
|
|
134
138
|
render() {
|
|
135
|
-
const { name, productPricing, currency, values } = this.props;
|
|
139
|
+
const { name, productPricing, currency, values, id } = this.props;
|
|
136
140
|
const { queries } = values;
|
|
137
141
|
const { displayedPricing, amount, formatedQueries, marks, computedQueries } = this.getDisplayedData(queries);
|
|
138
142
|
let displayedAmount = <span className="amount">{`0${currency}`}</span>;
|
|
@@ -140,11 +144,11 @@ class PricingSlider extends Component {
|
|
|
140
144
|
displayedAmount = this.contactSalesButton();
|
|
141
145
|
} else if (amount > 0) {
|
|
142
146
|
displayedAmount = <span className="amount">{`${parseInt(amount, 10)}${currency}`}</span>;
|
|
143
|
-
} else if (
|
|
147
|
+
} else if (displayedPricing.length === 0) {
|
|
144
148
|
displayedAmount = <span className="free-label">FREE</span>;
|
|
145
149
|
}
|
|
146
150
|
return (
|
|
147
|
-
<div className="pricing-slider__wrapper" id={
|
|
151
|
+
<div className="pricing-slider__wrapper" id={id}>
|
|
148
152
|
<div className="pricing-slider__info">
|
|
149
153
|
<h3>{name}</h3>
|
|
150
154
|
<p>{productPricing.description}</p>
|
|
@@ -170,7 +174,7 @@ class PricingSlider extends Component {
|
|
|
170
174
|
onChange={(_queries) => {
|
|
171
175
|
this.onChange(_queries);
|
|
172
176
|
}}
|
|
173
|
-
max={displayedPricing.length *
|
|
177
|
+
max={displayedPricing.length * 100000 || 50000000}
|
|
174
178
|
/>
|
|
175
179
|
<div className="pricing-slider__queries">
|
|
176
180
|
<div className="pricing-slider__queries__label">{productPricing.unit}</div>
|
|
@@ -192,6 +196,7 @@ PricingSlider.propTypes = {
|
|
|
192
196
|
defaultQueries: PropTypes.number,
|
|
193
197
|
onChange: PropTypes.func,
|
|
194
198
|
values: PropTypes.object.isRequired,
|
|
199
|
+
id: PropTypes.string.isRequired,
|
|
195
200
|
};
|
|
196
201
|
|
|
197
202
|
export default PricingSlider;
|