@woosmap/ui 4.213.0 → 4.215.0

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.213.0",
3
+ "version": "4.215.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -350,37 +350,81 @@ export default class AutocompleteAddressDemo extends Component {
350
350
  default:
351
351
  break;
352
352
  }
353
+ console.log(`country: ${country}`);
353
354
  });
354
-
355
+ let addressLine1 = 'Address Line 1';
356
+ let addressLine1PH = 'Street address, PO box, company name';
357
+ let addressLine2 = 'Address Line 2';
358
+ let addressLine2PH = 'Apartment, suite, unit, building, floor';
359
+ let townCity = 'City / Locality';
360
+ let townCityPH = 'City or town';
361
+ let stateRegion = 'State / Province / Region';
362
+ let stateRegionPH = 'State, province or region';
363
+ let codeName = 'ZIP / Postal Code';
364
+ let codeNamePH = 'Postal code or ZIP';
365
+ if (country === 'United States') {
366
+ codeName = 'ZIP Code';
367
+ codeNamePH = '5-digit ZIP code';
368
+ addressLine1 = 'Street Address';
369
+ addressLine1PH = 'Street number and name';
370
+ addressLine2 = 'Apt / Suite / Unit';
371
+ addressLine2PH = 'Optional: Apt, Suite, Unit';
372
+ townCity = 'City';
373
+ townCityPH = 'City';
374
+ stateRegion = 'State';
375
+ stateRegionPH = 'State (e.g. CA)';
376
+ } else if (country === 'United Kingdom') {
377
+ codeName = 'Postcode';
378
+ codeNamePH = 'Postcode (e.g. SW1A 1AA)';
379
+ addressLine1 = 'Address Line 1';
380
+ addressLine1PH = 'House number and street name';
381
+ addressLine2 = 'Address Line 2';
382
+ addressLine2PH = 'Optional: Flat, Building, Floor';
383
+ townCity = 'Town / City';
384
+ townCityPH = 'Town or city';
385
+ stateRegion = 'County (optional)';
386
+ stateRegionPH = 'County (if applicable)';
387
+ } else if (country === 'Ireland') {
388
+ codeName = 'Eircode';
389
+ codeNamePH = 'Eircode';
390
+ addressLine1 = 'Address Line 1';
391
+ addressLine1PH = 'Street name and number';
392
+ addressLine2 = 'Address Line 2';
393
+ addressLine2PH = 'Optional: Apartment, Block, Floor';
394
+ townCity = 'Town / City';
395
+ townCityPH = 'Town or city';
396
+ stateRegion = 'County';
397
+ stateRegionPH = 'County';
398
+ }
355
399
  return (
356
400
  <>
357
401
  <div className="showcase-result-wrapper-col">
358
402
  <Input
359
- label="Apartment, unit, suite, or floor #"
360
- placeholder="Apartment, unit, suite, or floor #"
361
- value={shippingAddress2}
403
+ label={addressLine1}
404
+ placeholder={addressLine1PH}
405
+ value={shippingAddress}
362
406
  onChange={() => {}}
363
407
  />
364
408
  <Input
365
- label="Street number, street name"
366
- placeholder="Street number, street name"
367
- value={shippingAddress}
409
+ className="fullw"
410
+ label={stateRegion}
411
+ placeholder={stateRegionPH}
412
+ value={state}
368
413
  onChange={() => {}}
369
414
  />
370
- <Input label="City" value={locality} placeholder="City" onChange={() => {}} />
415
+ <Input label={townCity} value={locality} placeholder={townCityPH} onChange={() => {}} />
371
416
  </div>
372
417
  <div className="showcase-result-wrapper-col">
373
418
  <Input
374
- className="fullw"
375
- label="State/Province"
376
- placeholder="State/Province"
377
- value={state}
419
+ label={addressLine2}
420
+ placeholder={addressLine2PH}
421
+ value={shippingAddress2}
378
422
  onChange={() => {}}
379
423
  />
380
424
  <Input
381
425
  className="fullw"
382
- label="Postal code"
383
- placeholder="Postal code"
426
+ label={codeName}
427
+ placeholder={codeNamePH}
384
428
  value={postcode}
385
429
  onChange={() => {}}
386
430
  />