@commercelayer/react-components 2.41.0 → 2.42.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/dist/components/utils/BaseInput.d.ts +1 -1
- package/dist/react-components.cjs.development.js +6 -12
- package/dist/react-components.cjs.development.js.map +1 -1
- package/dist/react-components.cjs.production.min.js +1 -1
- package/dist/react-components.cjs.production.min.js.map +1 -1
- package/dist/react-components.esm.js +6 -12
- package/dist/react-components.esm.js.map +1 -1
- package/package.json +27 -27
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseInputComponentProps } from "../../typings/index";
|
|
3
3
|
export declare type BaseInputProps = BaseInputComponentProps & JSX.IntrinsicElements['input'] & JSX.IntrinsicElements['textarea'];
|
|
4
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<BaseInputProps, "children" | "form" | "list" | "name" | "onChange" | "placeholder" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "pattern" | "readOnly" | "required" | "size" | "src" | "step" | "type" | "value" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "
|
|
4
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<BaseInputProps, "children" | "form" | "list" | "color" | "hidden" | "name" | "onChange" | "placeholder" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "pattern" | "readOnly" | "required" | "size" | "src" | "step" | "type" | "value" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "cols" | "dirName" | "rows" | "wrap"> & React.RefAttributes<any>>;
|
|
5
5
|
export default _default;
|
|
@@ -3179,18 +3179,12 @@ function getStateOfCountry(country_code) {
|
|
|
3179
3179
|
var name = _ref2.name,
|
|
3180
3180
|
state_code = _ref2.state_code;
|
|
3181
3181
|
return {
|
|
3182
|
-
label: name,
|
|
3182
|
+
label: name.replace('Province of', ''),
|
|
3183
3183
|
value: state_code
|
|
3184
3184
|
};
|
|
3185
3185
|
});
|
|
3186
3186
|
}
|
|
3187
3187
|
function isValidState(state_code, country_code) {
|
|
3188
|
-
console.log("valid state", countriesStatesCitiesService.States.getStates({
|
|
3189
|
-
filters: {
|
|
3190
|
-
state_code: state_code,
|
|
3191
|
-
country_code: country_code
|
|
3192
|
-
}
|
|
3193
|
-
}));
|
|
3194
3188
|
return countriesStatesCitiesService.States.getStates({
|
|
3195
3189
|
filters: {
|
|
3196
3190
|
state_code: state_code,
|
|
@@ -3439,7 +3433,6 @@ var AddressStateSelector = function AddressStateSelector(props) {
|
|
|
3439
3433
|
}, [value, billingAddress, shippingAddress, addressErrors]);
|
|
3440
3434
|
var errorClassName = (billingAddress == null ? void 0 : billingAddress.errorClassName) || (shippingAddress == null ? void 0 : shippingAddress.errorClassName);
|
|
3441
3435
|
var classNameComputed = className + " " + (hasError ? errorClassName : '');
|
|
3442
|
-
console.log("!isEmptyStates(countryCode) || isValidState(countryCode, val)", !isEmptyStates(countryCode), isValidState(countryCode, val));
|
|
3443
3436
|
return !isEmptyStates(countryCode) ? /*#__PURE__*/React__default.createElement(BaseSelect$1, _extends({
|
|
3444
3437
|
className: classNameComputed,
|
|
3445
3438
|
ref: (billingAddress == null ? void 0 : billingAddress.validation) || (shippingAddress == null ? void 0 : shippingAddress.validation),
|
|
@@ -4302,7 +4295,9 @@ var CustomerInput = function CustomerInput(props) {
|
|
|
4302
4295
|
errorClassName = props.errorClassName,
|
|
4303
4296
|
p = _objectWithoutPropertiesLoose(props, _excluded$b);
|
|
4304
4297
|
|
|
4305
|
-
var _useRapidForm = useRapidForm(
|
|
4298
|
+
var _useRapidForm = useRapidForm({
|
|
4299
|
+
fieldEvent: 'blur'
|
|
4300
|
+
}),
|
|
4306
4301
|
validation = _useRapidForm.validation,
|
|
4307
4302
|
values = _useRapidForm.values,
|
|
4308
4303
|
errors = _useRapidForm.errors;
|
|
@@ -8535,6 +8530,7 @@ var StripePayment = function StripePayment(_ref3) {
|
|
|
8535
8530
|
var _require = require('@stripe/stripe-js'),
|
|
8536
8531
|
loadStripe = _require.loadStripe;
|
|
8537
8532
|
|
|
8533
|
+
setCustomerOrderParam('savePaymentSourceToCustomerWallet', 'false');
|
|
8538
8534
|
setIsLoaded(true);
|
|
8539
8535
|
stripe = loadStripe(publishableKey, {
|
|
8540
8536
|
locale: locale
|
|
@@ -8542,8 +8538,7 @@ var StripePayment = function StripePayment(_ref3) {
|
|
|
8542
8538
|
}
|
|
8543
8539
|
|
|
8544
8540
|
return function () {
|
|
8545
|
-
setIsLoaded(false);
|
|
8546
|
-
setCustomerOrderParam('savePaymentSourceToCustomerWallet', 'false');
|
|
8541
|
+
setIsLoaded(false); // setCustomerOrderParam('savePaymentSourceToCustomerWallet', 'false')
|
|
8547
8542
|
};
|
|
8548
8543
|
}, [show, publishableKey]);
|
|
8549
8544
|
return isLoaded && stripe ? /*#__PURE__*/React__default.createElement("div", _extends({
|
|
@@ -11042,7 +11037,6 @@ var ShippingAddressForm = function ShippingAddressForm(props) {
|
|
|
11042
11037
|
var _values$shipping_addr;
|
|
11043
11038
|
|
|
11044
11039
|
var countryCode = ((_values$shipping_addr = values['shipping_address_country_code']) == null ? void 0 : _values$shipping_addr.value) || values['country_code'];
|
|
11045
|
-
console.log("countryCode", countryCode, isEmptyStates(countryCode));
|
|
11046
11040
|
|
|
11047
11041
|
if (isEmptyStates(countryCode)) {
|
|
11048
11042
|
var k = formErrors.findIndex(function (_ref) {
|