@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
|
@@ -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=
|
|
360
|
-
placeholder=
|
|
361
|
-
value={
|
|
403
|
+
label={addressLine1}
|
|
404
|
+
placeholder={addressLine1PH}
|
|
405
|
+
value={shippingAddress}
|
|
362
406
|
onChange={() => {}}
|
|
363
407
|
/>
|
|
364
408
|
<Input
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
409
|
+
className="fullw"
|
|
410
|
+
label={stateRegion}
|
|
411
|
+
placeholder={stateRegionPH}
|
|
412
|
+
value={state}
|
|
368
413
|
onChange={() => {}}
|
|
369
414
|
/>
|
|
370
|
-
<Input label=
|
|
415
|
+
<Input label={townCity} value={locality} placeholder={townCityPH} onChange={() => {}} />
|
|
371
416
|
</div>
|
|
372
417
|
<div className="showcase-result-wrapper-col">
|
|
373
418
|
<Input
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
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=
|
|
383
|
-
placeholder=
|
|
426
|
+
label={codeName}
|
|
427
|
+
placeholder={codeNamePH}
|
|
384
428
|
value={postcode}
|
|
385
429
|
onChange={() => {}}
|
|
386
430
|
/>
|