@nuskin/shipping-address-form 1.6.0 → 1.7.1

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/README.md CHANGED
@@ -86,7 +86,7 @@ import {
86
86
  } from '@nuskin/shipping-address-form'
87
87
  ```
88
88
 
89
- `AddressLookup` accepts `onAddressSelect`, `country`, `language`, `address`, `requireValidation`,
89
+ `AddressLookup` accepts `onAddressSelect`, `country`, `language`, `address`, `entryMode`, `requireValidation`,
90
90
  `readOnlyView`, `showManualValidateButton`, `validationRequestId`, `strings`, `formDefinition`, and
91
91
  `deferFormLookup`. It supports Smarty autocomplete and validation for US and international
92
92
  addresses. `normalizeAddressForm`, `DEFAULT_ADDRESS_FORM`, and `SUPPORTED_COUNTRIES` are exported
@@ -217,6 +217,28 @@ When `true`, the wrapper renders in display-only mode:
217
217
 
218
218
  Readonly mode is intended for displaying an existing address without allowing edits or validation actions.
219
219
 
220
+ ### Address Entry and Validation
221
+
222
+ `entryMode` controls which address entry experience is available when the component initializes:
223
+
224
+ - `'both'` (default) starts with autocomplete and lets the user switch to manual entry.
225
+ - `'manual'` starts with manual entry and hides the mode switch.
226
+ - `'autocomplete'` starts with autocomplete and hides the mode switch.
227
+
228
+ `requireValidation` defaults to `true`. Set it to `false` when a market accepts manually entered
229
+ addresses without validation. `showManualValidateButton` defaults to `true` for `ShippingAddressForm`
230
+ and controls whether manual entry shows its Verify Address button. For example:
231
+
232
+ ```jsx
233
+ <ShippingAddressForm
234
+ entryMode="manual"
235
+ requireValidation={false}
236
+ showManualValidateButton={false}
237
+ />
238
+ ```
239
+
240
+ For standalone `AddressLookup`, `showManualValidateButton` defaults to `false`.
241
+
220
242
  ### `onAction`
221
243
 
222
244
  - Type: `(payload) => void`
@@ -408,10 +430,10 @@ Run the local test app:
408
430
  yarn dev
409
431
  ```
410
432
 
411
- The local test app supports readonly mode through query params:
433
+ The local test app supports entry configuration and readonly mode through query params:
412
434
 
413
435
  ```text
414
- ?country=US&language=en&type=shipping&readOnlyView=true
436
+ ?country=US&language=en&type=shipping&entryMode=manual&requireValidation=false&showManualValidateButton=false
415
437
  ```
416
438
 
417
439
  Build the package:
@@ -15,6 +15,7 @@ const AddressLookup = ({
15
15
  onAddressSelect,
16
16
  country = 'US',
17
17
  address = null,
18
+ entryMode = 'both',
18
19
  requireValidation = true,
19
20
  readOnlyView = false,
20
21
  showManualValidateButton = false,
@@ -30,6 +31,7 @@ const AddressLookup = ({
30
31
  children: isUS ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_SmartyUSResults.default, {
31
32
  onSelect: onAddressSelect,
32
33
  initialAddress: address,
34
+ entryMode: entryMode,
33
35
  requireValidation: requireValidation,
34
36
  readOnlyView: readOnlyView,
35
37
  showManualValidateButton: showManualValidateButton,
@@ -42,6 +44,7 @@ const AddressLookup = ({
42
44
  countryCode: country,
43
45
  onSelect: onAddressSelect,
44
46
  initialAddress: address,
47
+ entryMode: entryMode,
45
48
  requireValidation: requireValidation,
46
49
  readOnlyView: readOnlyView,
47
50
  showManualValidateButton: showManualValidateButton,
@@ -57,6 +60,7 @@ AddressLookup.propTypes = {
57
60
  onAddressSelect: _propTypes.default.func,
58
61
  country: _propTypes.default.string,
59
62
  address: _componentPropTypes.addressPropType,
63
+ entryMode: _propTypes.default.oneOf(['both', 'autocomplete', 'manual']),
60
64
  requireValidation: _propTypes.default.bool,
61
65
  readOnlyView: _propTypes.default.bool,
62
66
  showManualValidateButton: _propTypes.default.bool,
@@ -1 +1 @@
1
- {"version":3,"file":"AddressLookup.js","names":["_propTypes","_interopRequireDefault","require","_SmartyUSResults","_SmartyIntlResults","_componentPropTypes","_jsxRuntime","e","__esModule","default","AddressLookup","onAddressSelect","country","address","requireValidation","readOnlyView","showManualValidateButton","validationRequestId","language","strings","formDefinition","deferFormLookup","isUS","jsx","className","children","onSelect","initialAddress","countryCode","propTypes","PropTypes","func","string","addressPropType","bool","number","labelStringsPropType","formDefinitionPropType","_default","exports"],"sources":["../../src/addressLookup/AddressLookup.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport './styles/addressLookup.css';\nimport SmartyUSResults from './components/SmartyUSResults';\nimport SmartyIntlResults from './components/SmartyIntlResults';\nimport { addressPropType, formDefinitionPropType, labelStringsPropType } from './utils/componentPropTypes';\n\nconst AddressLookup = ({ \n onAddressSelect, \n country = 'US',\n address = null,\n requireValidation = true,\n readOnlyView = false,\n showManualValidateButton = false,\n validationRequestId = 0,\n language = 'en',\n strings = null,\n formDefinition = null,\n deferFormLookup = false\n}) => {\n const isUS = country === 'US';\n\n return (\n <div className='ns-address-lookup'>\n {isUS ? (\n <SmartyUSResults \n onSelect={onAddressSelect}\n initialAddress={address}\n requireValidation={requireValidation}\n readOnlyView={readOnlyView}\n showManualValidateButton={showManualValidateButton}\n validationRequestId={validationRequestId}\n language={language}\n strings={strings}\n formDefinition={formDefinition}\n deferFormLookup={deferFormLookup}\n />\n ) : (\n <SmartyIntlResults \n countryCode={country}\n onSelect={onAddressSelect}\n initialAddress={address}\n requireValidation={requireValidation}\n readOnlyView={readOnlyView}\n showManualValidateButton={showManualValidateButton}\n validationRequestId={validationRequestId}\n language={language}\n strings={strings}\n formDefinition={formDefinition}\n deferFormLookup={deferFormLookup}\n />\n )}\n </div>\n );\n};\n\nAddressLookup.propTypes = {\n onAddressSelect: PropTypes.func,\n country: PropTypes.string,\n address: addressPropType,\n requireValidation: PropTypes.bool,\n readOnlyView: PropTypes.bool,\n showManualValidateButton: PropTypes.bool,\n validationRequestId: PropTypes.number,\n language: PropTypes.string,\n strings: labelStringsPropType,\n formDefinition: formDefinitionPropType,\n deferFormLookup: PropTypes.bool\n};\n\nexport default AddressLookup;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACAA,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,kBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,mBA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AAmB,EAAEA,mBAAoB;MACzCC,QAAQ,EAAEA,QAAS;MACnBC,OAAO,EAAEA,OAAQ;MACjBC,cAAc,EAAEA,cAAe;MAC/BC,eAAe,EAAEA;IAAgB,CAClC;EACF,CACE,CAAC;AAEV,CAAC;AAEDX,aAAa,CAACmB,SAAS,GAAG;EACxBlB,eAAe,EAAEmB,kBAAS,CAACC,IAAI;EAC/BnB,OAAO,EAAEkB,kBAAS,CAACE,MAAM;EACzBnB,OAAO,EAAEoB,mCAAe;EACxBnB,iBAAiB,EAAEgB,kBAAS,CAACI,IAAI;EACjCnB,YAAY,EAAEe,kBAAS,CAACI,IAAI;EAC5BlB,wBAAwB,EAAEc,kBAAS,CAACI,IAAI;EACxCjB,mBAAmB,EAAEa,kBAAS,CAACK,MAAM;EACrCjB,QAAQ,EAAEY,kBAAS,CAACE,MAAM;EAC1Bb,OAAO,EAAEiB,wCAAoB;EAC7BhB,cAAc,EAAEiB,0CAAsB;EACtChB,eAAe,EAAES,kBAAS,CAACI;AAC7B,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAA9B,OAAA,GAEaC,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"AddressLookup.js","names":["_propTypes","_interopRequireDefault","require","_SmartyUSResults","_SmartyIntlResults","_componentPropTypes","_jsxRuntime","e","__esModule","default","AddressLookup","onAddressSelect","country","address","entryMode","requireValidation","readOnlyView","showManualValidateButton","validationRequestId","language","strings","formDefinition","deferFormLookup","isUS","jsx","className","children","onSelect","initialAddress","countryCode","propTypes","PropTypes","func","string","addressPropType","oneOf","bool","number","labelStringsPropType","formDefinitionPropType","_default","exports"],"sources":["../../src/addressLookup/AddressLookup.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport './styles/addressLookup.css';\nimport SmartyUSResults from './components/SmartyUSResults';\nimport SmartyIntlResults from './components/SmartyIntlResults';\nimport { addressPropType, formDefinitionPropType, labelStringsPropType } from './utils/componentPropTypes';\n\nconst AddressLookup = ({ \n onAddressSelect, \n country = 'US',\n address = null,\n entryMode = 'both',\n requireValidation = true,\n readOnlyView = false,\n showManualValidateButton = false,\n validationRequestId = 0,\n language = 'en',\n strings = null,\n formDefinition = null,\n deferFormLookup = false\n}) => {\n const isUS = country === 'US';\n\n return (\n <div className='ns-address-lookup'>\n {isUS ? (\n <SmartyUSResults \n onSelect={onAddressSelect}\n initialAddress={address}\n entryMode={entryMode}\n requireValidation={requireValidation}\n readOnlyView={readOnlyView}\n showManualValidateButton={showManualValidateButton}\n validationRequestId={validationRequestId}\n language={language}\n strings={strings}\n formDefinition={formDefinition}\n deferFormLookup={deferFormLookup}\n />\n ) : (\n <SmartyIntlResults \n countryCode={country}\n onSelect={onAddressSelect}\n initialAddress={address}\n entryMode={entryMode}\n requireValidation={requireValidation}\n readOnlyView={readOnlyView}\n showManualValidateButton={showManualValidateButton}\n validationRequestId={validationRequestId}\n language={language}\n strings={strings}\n formDefinition={formDefinition}\n deferFormLookup={deferFormLookup}\n />\n )}\n </div>\n );\n};\n\nAddressLookup.propTypes = {\n onAddressSelect: PropTypes.func,\n country: PropTypes.string,\n address: addressPropType,\n entryMode: PropTypes.oneOf(['both', 'autocomplete', 'manual']),\n requireValidation: PropTypes.bool,\n readOnlyView: PropTypes.bool,\n showManualValidateButton: PropTypes.bool,\n validationRequestId: PropTypes.number,\n language: PropTypes.string,\n strings: labelStringsPropType,\n formDefinition: formDefinitionPropType,\n deferFormLookup: PropTypes.bool\n};\n\nexport default AddressLookup;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACAA,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,kBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAA2G,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAA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;MACnBC,OAAO,EAAEA,OAAQ;MACjBC,cAAc,EAAEA,cAAe;MAC/BC,eAAe,EAAEA;IAAgB,CAClC;EACF,CACE,CAAC;AAEV,CAAC;AAEDZ,aAAa,CAACoB,SAAS,GAAG;EACxBnB,eAAe,EAAEoB,kBAAS,CAACC,IAAI;EAC/BpB,OAAO,EAAEmB,kBAAS,CAACE,MAAM;EACzBpB,OAAO,EAAEqB,mCAAe;EACxBpB,SAAS,EAAEiB,kBAAS,CAACI,KAAK,CAAC,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;EAC9DpB,iBAAiB,EAAEgB,kBAAS,CAACK,IAAI;EACjCpB,YAAY,EAAEe,kBAAS,CAACK,IAAI;EAC5BnB,wBAAwB,EAAEc,kBAAS,CAACK,IAAI;EACxClB,mBAAmB,EAAEa,kBAAS,CAACM,MAAM;EACrClB,QAAQ,EAAEY,kBAAS,CAACE,MAAM;EAC1Bb,OAAO,EAAEkB,wCAAoB;EAC7BjB,cAAc,EAAEkB,0CAAsB;EACtCjB,eAAe,EAAES,kBAAS,CAACK;AAC7B,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAhC,OAAA,GAEaC,aAAa","ignoreList":[]}
@@ -53,6 +53,7 @@ const SmartyIntlResults = ({
53
53
  countryCode,
54
54
  onSelect,
55
55
  initialAddress = null,
56
+ entryMode = 'both',
56
57
  requireValidation = true,
57
58
  readOnlyView = false,
58
59
  showManualValidateButton = false,
@@ -63,7 +64,7 @@ const SmartyIntlResults = ({
63
64
  deferFormLookup = false
64
65
  }) => {
65
66
  var _formDefinition$addre;
66
- const [mode, setMode] = (0, _react.useState)('autocomplete');
67
+ const [mode, setMode] = (0, _react.useState)(entryMode === 'manual' ? 'manual' : 'autocomplete');
67
68
  const [query, setQuery] = (0, _react.useState)('');
68
69
  const [selectedAddress, setSelectedAddress] = (0, _react.useState)(null);
69
70
  const [selectedIntlAddressId, setSelectedIntlAddressId] = (0, _react.useState)(null);
@@ -376,6 +377,22 @@ const SmartyIntlResults = ({
376
377
  document.removeEventListener('pointerdown', handleDocumentMouseDown);
377
378
  };
378
379
  }, [hasPendingLookupDraft, suggestions]);
380
+ (0, _react.useEffect)(() => {
381
+ if (isAutocompleteMode || !showValidationSuggestions || validationLoading || validationSuggestions.length === 0) {
382
+ return undefined;
383
+ }
384
+ const handleDocumentPointerDown = event => {
385
+ var _componentRef$current;
386
+ if ((_componentRef$current = componentRef.current) !== null && _componentRef$current !== void 0 && _componentRef$current.contains(event.target)) {
387
+ return;
388
+ }
389
+ setShowValidationSuggestions(false);
390
+ };
391
+ document.addEventListener('pointerdown', handleDocumentPointerDown);
392
+ return () => {
393
+ document.removeEventListener('pointerdown', handleDocumentPointerDown);
394
+ };
395
+ }, [isAutocompleteMode, showValidationSuggestions, validationLoading, validationSuggestions]);
379
396
  (0, _react.useEffect)(() => {
380
397
  if (selectedAddress) {
381
398
  const selectionKey = selectedAddress.address_id || `${selectedAddress.street || ''}|${selectedAddress.locality || ''}|${selectedAddress.postal_code || ''}`;
@@ -570,7 +587,7 @@ const SmartyIntlResults = ({
570
587
  }
571
588
  };
572
589
  const handleValidationSelect = validatedAddress => {
573
- var _validatedAddress$met, _validatedAddress$met2;
590
+ var _validatedAddress$met, _validatedAddress$met2, _validatedAddress$ana;
574
591
  clearServiceErrors({
575
592
  lookup: false,
576
593
  validation: true,
@@ -599,7 +616,8 @@ const SmartyIntlResults = ({
599
616
  latitude: (_validatedAddress$met = validatedAddress.metadata) === null || _validatedAddress$met === void 0 ? void 0 : _validatedAddress$met.latitude,
600
617
  longitude: (_validatedAddress$met2 = validatedAddress.metadata) === null || _validatedAddress$met2 === void 0 ? void 0 : _validatedAddress$met2.longitude
601
618
  };
602
- const normalizedFormData = buildTrackedAddress(updatedFormData, 'verified', 'smarty-intl');
619
+ const currentVerificationStatus = ((_validatedAddress$ana = validatedAddress.analysis) === null || _validatedAddress$ana === void 0 ? void 0 : _validatedAddress$ana.verification_status) === 'Verified' ? 'verified' : 'unverified';
620
+ const normalizedFormData = buildTrackedAddress(updatedFormData, currentVerificationStatus, 'smarty-intl');
603
621
  setShowValidationSuggestions(false);
604
622
  setValidationTriggerSource(null);
605
623
  setFormData(normalizedFormData);
@@ -607,7 +625,6 @@ const SmartyIntlResults = ({
607
625
  lastCommittedAddressRef.current = normalizedFormData;
608
626
  lookupDraftOriginalRef.current = normalizedFormData;
609
627
  setHasPendingLookupDraft(false);
610
- const currentVerificationStatus = 'verified';
611
628
  setVerificationStatus(currentVerificationStatus);
612
629
  autoApplyValidationStartedRef.current = false;
613
630
  if (pendingMapOpen) {
@@ -722,7 +739,7 @@ const SmartyIntlResults = ({
722
739
  color: "primary",
723
740
  size: "small",
724
741
  children: validationLoading ? 'Validating...' : 'Validate Address'
725
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
742
+ }), entryMode === 'both' && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
726
743
  type: "button",
727
744
  onClick: () => {
728
745
  setShowValidationSuggestions(false);
@@ -740,8 +757,8 @@ const SmartyIntlResults = ({
740
757
  });
741
758
  const getLookupInputElement = () => typeof document !== 'undefined' ? document.getElementById(getFieldId(lookupField)) : null;
742
759
  const getVisibleSuggestionButtons = () => {
743
- var _componentRef$current;
744
- return Array.from(((_componentRef$current = componentRef.current) === null || _componentRef$current === void 0 ? void 0 : _componentRef$current.querySelectorAll(LOOKUP_LIST_BUTTON_SELECTOR)) || []);
760
+ var _componentRef$current2;
761
+ return Array.from(((_componentRef$current2 = componentRef.current) === null || _componentRef$current2 === void 0 ? void 0 : _componentRef$current2.querySelectorAll(LOOKUP_LIST_BUTTON_SELECTOR)) || []);
745
762
  };
746
763
  const handleLookupInputKeyDown = event => {
747
764
  if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') {
@@ -821,25 +838,28 @@ const SmartyIntlResults = ({
821
838
  if (shouldShowValidationResults && validationSuggestions.length > 0) {
822
839
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
823
840
  className: "ns-address-lookup__list ns-address-lookup__list--validation-inline",
824
- children: validationSuggestions.map((suggestion, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
825
- className: ['ns-address-lookup__list-item', index < validationSuggestions.length - 1 ? 'ns-address-lookup__list-item--divided' : ''].filter(Boolean).join(' '),
826
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
827
- type: "button",
828
- onClick: () => handleValidationSelect(suggestion),
829
- onKeyDown: event => handleSuggestionButtonKeyDown(event, index),
830
- className: "ns-address-lookup__list-button",
831
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
832
- className: "ns-address-lookup__list-title",
833
- children: getIntlValidationSummaryTitle(suggestion)
834
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
835
- className: "ns-address-lookup__list-subtitle",
836
- children: suggestion.displayText
837
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
838
- className: "ns-address-lookup__list-subtitle",
839
- children: getIntlValidationSummaryMessage(suggestion)
840
- })]
841
- })
842
- }, getValidationSuggestionKey(suggestion)))
841
+ children: validationSuggestions.map((suggestion, index) => {
842
+ var _suggestion$validatio13;
843
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
844
+ className: ['ns-address-lookup__list-item', ((_suggestion$validatio13 = suggestion.validationSummary) === null || _suggestion$validatio13 === void 0 ? void 0 : _suggestion$validatio13.code) === 'not-verified' ? 'ns-address-lookup__list-item--not-verified' : '', index < validationSuggestions.length - 1 ? 'ns-address-lookup__list-item--divided' : ''].filter(Boolean).join(' '),
845
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
846
+ type: "button",
847
+ onClick: () => handleValidationSelect(suggestion),
848
+ onKeyDown: event => handleSuggestionButtonKeyDown(event, index),
849
+ className: "ns-address-lookup__list-button",
850
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
851
+ className: "ns-address-lookup__list-title",
852
+ children: getIntlValidationSummaryTitle(suggestion)
853
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
854
+ className: "ns-address-lookup__list-subtitle",
855
+ children: suggestion.displayText
856
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
857
+ className: "ns-address-lookup__list-subtitle",
858
+ children: getIntlValidationSummaryMessage(suggestion)
859
+ })]
860
+ })
861
+ }, getValidationSuggestionKey(suggestion));
862
+ })
843
863
  });
844
864
  }
845
865
  if (shouldShowNoResults) {
@@ -986,6 +1006,7 @@ SmartyIntlResults.propTypes = {
986
1006
  countryCode: _propTypes.default.string.isRequired,
987
1007
  onSelect: _propTypes.default.func,
988
1008
  initialAddress: _componentPropTypes.addressPropType,
1009
+ entryMode: _propTypes.default.oneOf(['both', 'autocomplete', 'manual']),
989
1010
  requireValidation: _propTypes.default.bool,
990
1011
  readOnlyView: _propTypes.default.bool,
991
1012
  showManualValidateButton: _propTypes.default.bool,