@woosmap/ui 4.169.2 → 4.169.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woosmap/ui",
3
- "version": "4.169.2",
3
+ "version": "4.169.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -12,10 +12,11 @@ import indoorImgSq from '../../images/products/product-indoor-sq.png';
12
12
 
13
13
  const Pricing = {
14
14
  Stores: {
15
- image : storesImgSq,
16
- description : "A dedicated search engine for your own data",
15
+ image: storesImgSq,
16
+ description: "A dedicated search engine for your own data",
17
17
  pricings: {
18
18
  'Search': {
19
+ docLink: 'https://developers.woosmap.com',
19
20
  defaultQueries: 0,
20
21
  publicTierCount: 2,
21
22
  unit: "Monthly Requests",
@@ -33,6 +34,7 @@ const Pricing = {
33
34
  discountEligible: true,
34
35
  },
35
36
  'Mapping': {
37
+ docLink: 'https://developers.woosmap.com',
36
38
  defaultQueries: 0,
37
39
  publicTierCount: 2,
38
40
  unit: "Monthly Requests",
@@ -50,6 +52,7 @@ const Pricing = {
50
52
  discountEligible: true,
51
53
  },
52
54
  'Data Management': {
55
+ docLink: 'https://developers.woosmap.com',
53
56
  defaultQueries: 0,
54
57
  publicTierCount: 2,
55
58
  unit: "Monthly Requests",
@@ -67,6 +70,7 @@ const Pricing = {
67
70
  discountEligible: true,
68
71
  },
69
72
  'Mobile Search': {
73
+ docLink: 'https://developers.woosmap.com',
70
74
  defaultQueries: 0,
71
75
  publicTierCount: 2,
72
76
  unit: "Monthly Requests",
@@ -86,19 +90,21 @@ const Pricing = {
86
90
  },
87
91
  },
88
92
  Localities: {
89
- image : localitiesImgSq,
90
- description : "Find the right address and speed up the customer journey with autocompletion and geocode features",
93
+ image: localitiesImgSq,
94
+ description: "Find the right address and speed up the customer journey with autocompletion and geocode features",
91
95
  pricings: {
92
96
  'Autocomplete': {
97
+ docLink: 'https://developers.woosmap.com',
93
98
  defaultQueries: 1,
94
99
  publicTierCount: 1,
95
100
  unit: "Monthly Requests",
96
101
  description:
97
- "Get suggestions on addresses, localities, postcodes and more. Search on full words as well as substrings, with high flexibility on typos",
102
+ "Get suggestions for addresses, localities, postcodes and more with typo tolerance. Per terms, 'autocomplete' cannot be used alone, the 'details' endpoint is mandatory for detailed information.",
98
103
  pricing: [],
99
104
  discountEligible: true,
100
105
  },
101
106
  'Details': {
107
+ docLink: 'https://developers.woosmap.com',
102
108
  defaultQueries: 0,
103
109
  publicTierCount: 2,
104
110
  unit: "Monthly Requests",
@@ -116,6 +122,7 @@ const Pricing = {
116
122
  discountEligible: true,
117
123
  },
118
124
  'Details UK Addresses': {
125
+ docLink: 'https://developers.woosmap.com',
119
126
  defaultQueries: 0,
120
127
  publicTierCount: 4, unit: "Monthly Requests",
121
128
  description:
@@ -134,6 +141,7 @@ const Pricing = {
134
141
  discountEligible: false,
135
142
  },
136
143
  'Geocode/Reverse Geocode': {
144
+ docLink: 'https://developers.woosmap.com',
137
145
  defaultQueries: 0,
138
146
  publicTierCount: 2,
139
147
  unit: "Monthly Requests",
@@ -151,6 +159,7 @@ const Pricing = {
151
159
  discountEligible: true,
152
160
  },
153
161
  'Geocode/Reverse Geocode UK addresses': {
162
+ docLink: 'https://developers.woosmap.com',
154
163
  defaultQueries: 0,
155
164
  publicTierCount: 4, unit: "Monthly Requests",
156
165
  description:
@@ -169,6 +178,7 @@ const Pricing = {
169
178
  discountEligible: false,
170
179
  },
171
180
  'Nearby': {
181
+ docLink: 'https://developers.woosmap.com',
172
182
  defaultQueries: 0,
173
183
  publicTierCount: 2,
174
184
  unit: "Monthly Requests",
@@ -186,6 +196,7 @@ const Pricing = {
186
196
  discountEligible: true,
187
197
  },
188
198
  'what3words': {
199
+ docLink: 'https://developers.woosmap.com',
189
200
  defaultQueries: 0,
190
201
  publicTierCount: 1,
191
202
  unit: "Monthly Requests",
@@ -197,10 +208,11 @@ const Pricing = {
197
208
  },
198
209
  },
199
210
  'Map': {
200
- image : mapImgSq,
201
- description : "Display your data without compromising readability",
211
+ image: mapImgSq,
212
+ description: "Display your data without compromising readability",
202
213
  pricings: {
203
214
  'Mapload': {
215
+ docLink: 'https://developers.woosmap.com',
204
216
  defaultQueries: 0,
205
217
  publicTierCount: 2,
206
218
  unit: "Monthly Requests",
@@ -220,10 +232,11 @@ const Pricing = {
220
232
  },
221
233
  },
222
234
  Distance: {
223
- image : distanceImgSq,
224
- description : "Get distance or time for your routes worldwide with or without traffic",
235
+ image: distanceImgSq,
236
+ description: "Get distance or time for your routes worldwide with or without traffic",
225
237
  pricings: {
226
238
  'Route (/q)': {
239
+ docLink: 'https://developers.woosmap.com',
227
240
  defaultQueries: 0,
228
241
  publicTierCount: 2,
229
242
  unit: "Monthly Requests",
@@ -241,6 +254,7 @@ const Pricing = {
241
254
  discountEligible: true,
242
255
  },
243
256
  'Route with Traffic (/q)': {
257
+ docLink: 'https://developers.woosmap.com',
244
258
  defaultQueries: 0,
245
259
  publicTierCount: 2,
246
260
  unit: "Monthly Requests",
@@ -258,9 +272,10 @@ const Pricing = {
258
272
  discountEligible: false,
259
273
  },
260
274
  'Distance Matrix (/elt)': {
275
+ docLink: 'https://developers.woosmap.com',
261
276
  defaultQueries: 0,
262
277
  publicTierCount: 2,
263
- unit: "Monthly Elements",
278
+ unit: "Monthly Elements",
264
279
  description:
265
280
  "Get driving, cycling or walking route distance and duration for multiple Origins and Destinations",
266
281
  pricing: [
@@ -275,9 +290,10 @@ const Pricing = {
275
290
  discountEligible: true,
276
291
  },
277
292
  'Distance Matrix with Traffic (/elt)': {
293
+ docLink: 'https://developers.woosmap.com',
278
294
  defaultQueries: 0,
279
295
  publicTierCount: 2,
280
- unit: "Monthly Elements",
296
+ unit: "Monthly Elements",
281
297
  description:
282
298
  "Get driving, cycling or walking route distance and duration for multiple Origins and Destinations, including historical or real time traffic paterns",
283
299
  pricing: [
@@ -292,9 +308,10 @@ const Pricing = {
292
308
  discountEligible: false,
293
309
  },
294
310
  'Isochrone (/q)': {
311
+ docLink: 'https://developers.woosmap.com',
295
312
  defaultQueries: 0,
296
313
  publicTierCount: 2,
297
- unit: "Monthly Requests",
314
+ unit: "Monthly Requests",
298
315
  description:
299
316
  "Get isochrone computations to display on a map",
300
317
  pricing: [
@@ -309,9 +326,10 @@ const Pricing = {
309
326
  discountEligible: true,
310
327
  },
311
328
  'Distance Matrix on Mobile (/elt)': {
329
+ docLink: 'https://developers.woosmap.com',
312
330
  defaultQueries: 0,
313
331
  publicTierCount: 2,
314
- unit: "Monthly Elements",
332
+ unit: "Monthly Elements",
315
333
  description:
316
334
  "Get driving, cycling or walking route distance and duration for multiple Origins and Destinations on Mobile integrations",
317
335
  pricing: [
@@ -326,9 +344,10 @@ const Pricing = {
326
344
  discountEligible: true,
327
345
  },
328
346
  'Distance Matrix with Traffic on Mobile (/elt)': {
347
+ docLink: 'https://developers.woosmap.com',
329
348
  defaultQueries: 0,
330
349
  publicTierCount: 2,
331
- unit: "Monthly Elements",
350
+ unit: "Monthly Elements",
332
351
  description:
333
352
  "Get driving, cycling or walking route distance and duration for multiple Origins and Destinations, including historical or real time traffic paterns on Mobile integrations",
334
353
  pricing: [
@@ -343,9 +362,10 @@ const Pricing = {
343
362
  discountEligible: false,
344
363
  },
345
364
  'Transit': {
365
+ docLink: 'https://developers.woosmap.com',
346
366
  defaultQueries: 0,
347
367
  publicTierCount: 2,
348
- unit: "Monthly Requests",
368
+ unit: "Monthly Requests",
349
369
  description:
350
370
  "Get distance, duration, path and public transport details between an origin and a destination, based on public transportation",
351
371
  pricing: [
@@ -362,10 +382,11 @@ const Pricing = {
362
382
  },
363
383
  },
364
384
  Geolocation: {
365
- image : geolocationImgSq,
366
- description : "Automatic Geolocation based on IP addresses",
385
+ image: geolocationImgSq,
386
+ description: "Automatic Geolocation based on IP addresses",
367
387
  pricings: {
368
388
  'Position': {
389
+ docLink: 'https://developers.woosmap.com',
369
390
  defaultQueries: 0,
370
391
  publicTierCount: 2,
371
392
  unit: "Monthly Requests",
@@ -383,6 +404,7 @@ const Pricing = {
383
404
  discountEligible: false,
384
405
  },
385
406
  'Stores': {
407
+ docLink: 'https://developers.woosmap.com',
386
408
  defaultQueries: 0,
387
409
  publicTierCount: 2,
388
410
  unit: "Monthly Requests",
@@ -400,6 +422,7 @@ const Pricing = {
400
422
  discountEligible: false,
401
423
  },
402
424
  'Timezone': {
425
+ docLink: 'https://developers.woosmap.com',
403
426
  defaultQueries: 0,
404
427
  publicTierCount: 2,
405
428
  unit: "Monthly Requests",
@@ -419,10 +442,11 @@ const Pricing = {
419
442
  },
420
443
  },
421
444
  Indoor: {
422
- image : indoorImgSq,
423
- description : "Map private venues and propose indoor search and wayfinding",
445
+ image: indoorImgSq,
446
+ description: "Map private venues and propose indoor search and wayfinding",
424
447
  pricings: {
425
448
  'Search': {
449
+ docLink: 'https://developers.woosmap.com',
426
450
  defaultQueries: 0,
427
451
  publicTierCount: 2,
428
452
  unit: "Monthly Requests",
@@ -440,6 +464,7 @@ const Pricing = {
440
464
  discountEligible: true,
441
465
  },
442
466
  'Distance': {
467
+ docLink: 'https://developers.woosmap.com',
443
468
  defaultQueries: 0,
444
469
  publicTierCount: 2,
445
470
  unit: "Monthly Requests",
@@ -457,6 +482,7 @@ const Pricing = {
457
482
  discountEligible: true,
458
483
  },
459
484
  'Data Management': {
485
+ docLink: 'https://developers.woosmap.com',
460
486
  defaultQueries: 0,
461
487
  publicTierCount: 2,
462
488
  unit: "Monthly Requests",
@@ -474,6 +500,7 @@ const Pricing = {
474
500
  discountEligible: true,
475
501
  },
476
502
  'Mapping': {
503
+ docLink: 'https://developers.woosmap.com',
477
504
  defaultQueries: 0,
478
505
  publicTierCount: 2,
479
506
  unit: "Monthly Requests",
@@ -56,16 +56,19 @@ class PricingSimulator extends Component {
56
56
  const { currency } = this.props;
57
57
  const discount = currency === '£' ? 170 : 200;
58
58
  const total = notEligibleTotal + Math.max(eligibleTotal - discount, 0);
59
- return { total, notEligibleTotal, eligibleTotal, contactSale, discount };
59
+ const totalBeforeDiscount = notEligibleTotal + eligibleTotal;
60
+ return { total, notEligibleTotal, eligibleTotal, contactSale, discount, totalBeforeDiscount };
60
61
  };
61
62
 
62
- getAnchor = (string) => string.replaceAll(' ', '_').replaceAll('/', '_').toUpperCase();
63
+ getAnchor = (string) => string.replaceAll(' ', '_').replaceAll('/', '_').replaceAll("(", "").replaceAll(")", "").toUpperCase();
64
+
65
+ displayAmount = (amount, currency) => (currency === '€' ? `${amount}${currency}` : `${currency}${amount}`);
63
66
 
64
67
  render() {
65
68
  const { sliders } = this.state;
66
69
  const { publicMode, currency } = this.props;
67
- const { total, discount, contactSale } = this.computeTotal();
68
- let totalDisplayed = `${parseInt(total, 10)}${currency}`;
70
+ const { total, discount, contactSale, totalBeforeDiscount } = this.computeTotal();
71
+ let totalDisplayed = this.displayAmount(parseInt(total, 10), currency);
69
72
  if (contactSale) {
70
73
  totalDisplayed = <a href="/en/contact">Contact Sales</a>;
71
74
  }
@@ -81,10 +84,10 @@ class PricingSimulator extends Component {
81
84
  </ul>
82
85
  <div className="pricing-total">
83
86
  <div className="pricing-total__label">Monthly price</div>
84
- <div className="pricing-total__amount">{totalDisplayed}</div>
87
+ <div className="pricing-total__amount">{totalBeforeDiscount}</div>
85
88
  <div className="pricing-total__info">
86
89
  {!contactSale && (
87
- <span className="pricing-total__discount">{`(-${discount}${currency} Monthly Free Usage)`}</span>
90
+ <span className="pricing-total__discount">{`(-${discount}${currency} Monthly Free Usage)`} = {totalDisplayed}</span>
88
91
  )}
89
92
  </div>
90
93
  </div>
@@ -111,7 +114,7 @@ class PricingSimulator extends Component {
111
114
  const productPricing = PricingData[category].pricings[pricingKey];
112
115
  return (
113
116
  <PricingSlider
114
- id={this.getAnchor(`${category}_${pricingKey}`)}
117
+ id={this.getAnchor(`${category}-${pricingKey}`)}
115
118
  productPricing={productPricing}
116
119
  name={pricingKey}
117
120
  key={`pricing_${pricingKey.replace(' ', '')}`}
@@ -6,6 +6,8 @@ import { Input } from '@woosmap/ui';
6
6
  import discountCheck from '../../images/discount-check.png';
7
7
 
8
8
  class PricingSlider extends Component {
9
+ displayAmount = (amount, currency) => (currency === '€' ? `${amount}${currency}` : `${currency}${amount}`);
10
+
9
11
  computeAmount = (pricing, queries) => {
10
12
  const { currency } = this.props;
11
13
  const coef = currency === '$' ? 1.1 : 1;
@@ -146,11 +148,11 @@ class PricingSlider extends Component {
146
148
  const { displayedPricing, amount, formatedQueries, marks, computedQueries, aboveLastTier, discountEligible } =
147
149
  this.getDisplayedData(queries);
148
150
 
149
- let displayedAmount = <span className="amount">{`0${currency}`}</span>;
151
+ let displayedAmount = <span className="amount">{this.displayAmount(0, currency)}</span>;
150
152
  if (amount === '∞') {
151
153
  displayedAmount = this.contactSalesButton();
152
154
  } else if (amount > 0) {
153
- displayedAmount = <span className="amount">{`${parseInt(amount, 10)}${currency}`}</span>;
155
+ displayedAmount = <span className="amount">{this.displayAmount(parseInt(amount, 10), currency)}</span>;
154
156
  } else if (displayedPricing.length === 0) {
155
157
  displayedAmount = <span className="free-label">FREE</span>;
156
158
  }
@@ -167,6 +169,7 @@ class PricingSlider extends Component {
167
169
  </div>
168
170
  )}
169
171
  <p>{productPricing.description}</p>
172
+ <span><a href="{productPricing.docLink}">Doc</a></span>
170
173
  </div>
171
174
  <ReactSlider
172
175
  className="pricing-vertical-slider"