merchi_cart 1.4.2 → 1.4.4
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/esm/CartProvider.js +32 -42
- package/esm/forms/InputsAddress.js +329 -74
- package/esm/styles/globals.css +37 -0
- package/esm/styles/globals.css.map +1 -1
- package/esm/utilities/address.js +101 -0
- package/lib/Cart.d.ts +9 -0
- package/lib/CartAlert.d.ts +2 -0
- package/lib/CartHeader.d.ts +2 -0
- package/lib/CartProvider.d.ts +236 -0
- package/lib/CartProvider.js +32 -42
- package/lib/CartTotals.d.ts +6 -0
- package/lib/buttons/Button.d.ts +10 -0
- package/lib/buttons/ButtonBack.d.ts +5 -0
- package/lib/buttons/ButtonClearCart.d.ts +2 -0
- package/lib/buttons/ButtonInvoiceDownload.d.ts +2 -0
- package/lib/buttons/ButtonNext.d.ts +2 -0
- package/lib/buttons/ButtonNextDynamic.d.ts +2 -0
- package/lib/buttons/ButtonOpenCartMerchiCartModal.d.ts +8 -0
- package/lib/buttons/ButtonPay.d.ts +6 -0
- package/lib/buttons/ButtonShipmentTabNext.d.ts +1 -0
- package/lib/buttons/index.d.ts +7 -0
- package/lib/components/Alert.d.ts +6 -0
- package/lib/components/CartBody.d.ts +6 -0
- package/lib/components/CartClient.d.ts +3 -0
- package/lib/components/CartFooter.d.ts +5 -0
- package/lib/components/CartItemRow.d.ts +6 -0
- package/lib/components/CartPaymentSettingsInvalid.d.ts +1 -0
- package/lib/components/CartShipment.d.ts +5 -0
- package/lib/components/CartTabContent.d.ts +5 -0
- package/lib/components/CartTabPanel.d.ts +6 -0
- package/lib/components/CartTableContainer.d.ts +5 -0
- package/lib/components/CartTitle.d.ts +1 -0
- package/lib/components/CartTotalsListGroup.d.ts +2 -0
- package/lib/components/Collapse.d.ts +2 -0
- package/lib/components/CustomCartProductForm.d.ts +18 -0
- package/lib/components/CustomerCheckoutMethodTabs.d.ts +5 -0
- package/lib/components/DiscountInputGroup.d.ts +1 -0
- package/lib/components/LoadingTemplate.d.ts +6 -0
- package/lib/components/NoCartItems.d.ts +2 -0
- package/lib/components/ShipmentGroupCard.d.ts +6 -0
- package/lib/components/Table.d.ts +6 -0
- package/lib/components/containers.d.ts +13 -0
- package/lib/components/index.d.ts +18 -0
- package/lib/components/product-form-sdk-externals.d.ts +46 -0
- package/lib/forms/FormNewCustomer.d.ts +3 -0
- package/lib/forms/FormReturningCustomer.d.ts +2 -0
- package/lib/forms/FormShipmentAddressAndNotes.d.ts +14 -0
- package/lib/forms/FormSquarePayment.d.ts +2 -0
- package/lib/forms/FormStripePayment.d.ts +2 -0
- package/lib/forms/FormWhatsappCustomer.d.ts +2 -0
- package/lib/forms/InputAcceptUserTermsAndConditions.d.ts +6 -0
- package/lib/forms/InputError.d.ts +8 -0
- package/lib/forms/InputSelect.d.ts +13 -0
- package/lib/forms/InputText.d.ts +11 -0
- package/lib/forms/InputsAddress.d.ts +10 -0
- package/lib/forms/InputsAddress.js +329 -71
- package/lib/forms/index.d.ts +8 -0
- package/lib/index.d.ts +13 -0
- package/lib/modals.d.ts +16 -0
- package/lib/panels/PanelCartItems.d.ts +2 -0
- package/lib/panels/PanelCartShipment.d.ts +2 -0
- package/lib/panels/PanelClearCart.d.ts +2 -0
- package/lib/panels/PanelClientCheckout.d.ts +2 -0
- package/lib/panels/PanelEditCartItem.d.ts +5 -0
- package/lib/panels/PanelPaymentSuccess.d.ts +2 -0
- package/lib/panels/index.d.ts +7 -0
- package/lib/square/SquareCard.d.ts +2 -0
- package/lib/stripe/LegacyStripeCardForm.d.ts +2 -0
- package/lib/stripe/StripeCardFields.d.ts +14 -0
- package/lib/stripe/StripeCardForm.d.ts +1 -0
- package/lib/stripe/StripePaymentButtons.d.ts +7 -0
- package/lib/stripe/actions.d.ts +4 -0
- package/lib/stripe/utils.d.ts +18 -0
- package/lib/styles/globals.css +37 -0
- package/lib/styles/globals.css.map +1 -1
- package/lib/tabs/CartNav.d.ts +2 -0
- package/lib/tabs/NavTab.d.ts +8 -0
- package/lib/types/index.d.ts +13 -0
- package/lib/utilities/address.d.ts +30 -0
- package/lib/utilities/address.js +103 -1
- package/lib/utilities/area.d.ts +77 -0
- package/lib/utilities/cart.d.ts +9 -0
- package/lib/utilities/company.d.ts +2 -0
- package/lib/utilities/cookie.d.ts +4 -0
- package/lib/utilities/currency.d.ts +5 -0
- package/lib/utilities/customForm.d.ts +17 -0
- package/lib/utilities/helpers.d.ts +24 -0
- package/lib/utilities/index.d.ts +14 -0
- package/lib/utilities/invoice.d.ts +3 -0
- package/lib/utilities/job.d.ts +1 -0
- package/lib/utilities/local_storage.d.ts +31 -0
- package/lib/utilities/product.d.ts +2 -0
- package/lib/utilities/shipment.d.ts +2 -0
- package/lib/utilities/tabs.d.ts +14 -0
- package/lib/utilities/user.d.ts +5 -0
- package/lib/utilities/variations.d.ts +18 -0
- package/package.json +4 -4
- package/src/CartProvider.tsx +7 -13
- package/src/forms/InputsAddress.tsx +305 -72
- package/src/styles/globals.scss +42 -0
- package/src/utilities/address.ts +99 -0
- package/esm/types/react-geosuggest/index.d.js +0 -0
- package/src/types/react-geosuggest/index.d.ts +0 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
2
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -10,20 +13,22 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
13
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
14
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import
|
|
14
|
-
import
|
|
16
|
+
import * as React from 'react';
|
|
17
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
18
|
+
import { debounce } from 'lodash';
|
|
19
|
+
import { Merchi } from 'merchi_sdk_ts';
|
|
15
20
|
import { CountryDropdown, RegionDropdown } from 'react-country-region-selector';
|
|
16
21
|
import { Controller } from 'react-hook-form';
|
|
17
22
|
import InputText from './InputText';
|
|
18
|
-
import { addressInOneLine,
|
|
23
|
+
import { addressInOneLine, googlePlacesResultAsNewAddress } from '../utilities/address';
|
|
19
24
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
20
|
-
import { faTimes, faEdit, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
|
|
21
|
-
import { useState } from 'react';
|
|
25
|
+
import { faSpinner, faTimes, faEdit, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
|
|
22
26
|
import { Collapse } from '../components';
|
|
23
27
|
import { useCartContext } from '../CartProvider';
|
|
24
28
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
29
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
30
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
31
|
+
var merchi = new Merchi();
|
|
27
32
|
export function InputsAddress(_ref) {
|
|
28
33
|
var _ref$defaultAddress = _ref.defaultAddress,
|
|
29
34
|
defaultAddress = _ref$defaultAddress === void 0 ? {} : _ref$defaultAddress,
|
|
@@ -34,43 +39,51 @@ export function InputsAddress(_ref) {
|
|
|
34
39
|
_ref$placeholder = _ref.placeholder,
|
|
35
40
|
placeholder = _ref$placeholder === void 0 ? 'Search your address' : _ref$placeholder,
|
|
36
41
|
updateAddress = _ref.updateAddress;
|
|
37
|
-
var geosuggestEl = useRef(null);
|
|
38
42
|
var _useCartContext = useCartContext(),
|
|
39
|
-
googlePlacesLoaded = _useCartContext.googlePlacesLoaded,
|
|
40
43
|
classNameCartFormGroup = _useCartContext.classNameCartFormGroup,
|
|
41
44
|
classNameCartFormInput = _useCartContext.classNameCartFormInput,
|
|
42
45
|
classNameCartRow = _useCartContext.classNameCartRow,
|
|
43
46
|
classNameCartRowColumn = _useCartContext.classNameCartRowColumn,
|
|
44
47
|
classNameCartGoogleSuggestList = _useCartContext.classNameCartGoogleSuggestList,
|
|
45
48
|
classNameCartGoogleSuggestListItem = _useCartContext.classNameCartGoogleSuggestListItem;
|
|
49
|
+
var _React$useState = React.useState(''),
|
|
50
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
51
|
+
inputValue = _React$useState2[0],
|
|
52
|
+
setInputValue = _React$useState2[1];
|
|
53
|
+
var _React$useState3 = React.useState([]),
|
|
54
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
55
|
+
suggestions = _React$useState4[0],
|
|
56
|
+
setSuggestions = _React$useState4[1];
|
|
57
|
+
var _React$useState5 = React.useState(false),
|
|
58
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
59
|
+
showSuggestions = _React$useState6[0],
|
|
60
|
+
setShowSuggestions = _React$useState6[1];
|
|
61
|
+
var _React$useState7 = React.useState(false),
|
|
62
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
63
|
+
loading = _React$useState8[0],
|
|
64
|
+
setLoading = _React$useState8[1];
|
|
65
|
+
var _React$useState9 = React.useState(-1),
|
|
66
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
67
|
+
selectedIndex = _React$useState10[0],
|
|
68
|
+
setSelectedIndex = _React$useState10[1];
|
|
69
|
+
var inputRef = React.useRef(null);
|
|
70
|
+
var suggestionsRef = React.useRef(null);
|
|
46
71
|
var control = hookForm.control,
|
|
47
72
|
_hookForm$formState = hookForm.formState,
|
|
48
73
|
errors = _hookForm$formState.errors,
|
|
49
74
|
isValid = _hookForm$formState.isValid,
|
|
50
75
|
submitCount = _hookForm$formState.submitCount,
|
|
51
76
|
setValue = hookForm.setValue,
|
|
52
|
-
getValues = hookForm.getValues
|
|
77
|
+
getValues = hookForm.getValues,
|
|
78
|
+
reset = hookForm.reset,
|
|
79
|
+
watch = hookForm.watch;
|
|
53
80
|
var inputName = function inputName(_name) {
|
|
54
81
|
return "".concat(name ? "".concat(name, ".") : '').concat(_name);
|
|
55
82
|
};
|
|
56
|
-
|
|
57
|
-
if (suggest) {
|
|
58
|
-
updateAddress(geoSuggestResultAsNewAddress(suggest));
|
|
59
|
-
} else {
|
|
60
|
-
updateAddress({
|
|
61
|
-
city: '',
|
|
62
|
-
country: '',
|
|
63
|
-
lineOne: '',
|
|
64
|
-
lineTwo: '',
|
|
65
|
-
postcode: '',
|
|
66
|
-
state: ''
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
geosuggestEl.current.blur();
|
|
70
|
-
}
|
|
83
|
+
var selectedCountry = watch(inputName('country'));
|
|
71
84
|
function onChangeCountryState() {
|
|
72
|
-
var
|
|
73
|
-
updateAddress(
|
|
85
|
+
var values = getValues();
|
|
86
|
+
updateAddress(name ? values[name] : values);
|
|
74
87
|
}
|
|
75
88
|
var _useState = useState(false),
|
|
76
89
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -84,11 +97,199 @@ export function InputsAddress(_ref) {
|
|
|
84
97
|
toggleAddressFieldsOpen();
|
|
85
98
|
}
|
|
86
99
|
}, [isValid, submitCount]);
|
|
100
|
+
useEffect(function () {
|
|
101
|
+
if (!(defaultAddress !== null && defaultAddress !== void 0 && defaultAddress.lineOne)) return;
|
|
102
|
+
var nextAddress = _objectSpread({}, defaultAddress);
|
|
103
|
+
setInputValue(addressInOneLine(nextAddress));
|
|
104
|
+
reset(name ? _objectSpread(_objectSpread({}, getValues()), {}, _defineProperty({}, name, nextAddress)) : _objectSpread(_objectSpread({}, getValues()), nextAddress), {
|
|
105
|
+
keepSubmitCount: true
|
|
106
|
+
});
|
|
107
|
+
}, [defaultAddress === null || defaultAddress === void 0 ? void 0 : defaultAddress.lineOne, defaultAddress === null || defaultAddress === void 0 ? void 0 : defaultAddress.city, defaultAddress === null || defaultAddress === void 0 ? void 0 : defaultAddress.postcode]);
|
|
108
|
+
function searchAddresses(_x) {
|
|
109
|
+
return _searchAddresses.apply(this, arguments);
|
|
110
|
+
}
|
|
111
|
+
function _searchAddresses() {
|
|
112
|
+
_searchAddresses = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(query) {
|
|
113
|
+
var response;
|
|
114
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
115
|
+
while (1) switch (_context.prev = _context.next) {
|
|
116
|
+
case 0:
|
|
117
|
+
if (query.trim()) {
|
|
118
|
+
_context.next = 4;
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
setSuggestions([]);
|
|
122
|
+
setShowSuggestions(false);
|
|
123
|
+
return _context.abrupt("return");
|
|
124
|
+
case 4:
|
|
125
|
+
setLoading(true);
|
|
126
|
+
_context.prev = 5;
|
|
127
|
+
_context.next = 8;
|
|
128
|
+
return merchi.authenticatedFetch('/addresses/place-search/', {
|
|
129
|
+
method: 'GET',
|
|
130
|
+
query: [['q', query]]
|
|
131
|
+
});
|
|
132
|
+
case 8:
|
|
133
|
+
response = _context.sent;
|
|
134
|
+
if (response.status === 'success') {
|
|
135
|
+
setSuggestions(response.results || []);
|
|
136
|
+
setShowSuggestions(true);
|
|
137
|
+
setSelectedIndex(-1);
|
|
138
|
+
}
|
|
139
|
+
_context.next = 17;
|
|
140
|
+
break;
|
|
141
|
+
case 12:
|
|
142
|
+
_context.prev = 12;
|
|
143
|
+
_context.t0 = _context["catch"](5);
|
|
144
|
+
console.error('Error searching addresses:', _context.t0);
|
|
145
|
+
setSuggestions([]);
|
|
146
|
+
setShowSuggestions(false);
|
|
147
|
+
case 17:
|
|
148
|
+
_context.prev = 17;
|
|
149
|
+
setLoading(false);
|
|
150
|
+
return _context.finish(17);
|
|
151
|
+
case 20:
|
|
152
|
+
case "end":
|
|
153
|
+
return _context.stop();
|
|
154
|
+
}
|
|
155
|
+
}, _callee, null, [[5, 12, 17, 20]]);
|
|
156
|
+
}));
|
|
157
|
+
return _searchAddresses.apply(this, arguments);
|
|
158
|
+
}
|
|
159
|
+
var debouncedSearch = useMemo(function () {
|
|
160
|
+
return debounce(searchAddresses, 500);
|
|
161
|
+
}, []);
|
|
162
|
+
useEffect(function () {
|
|
163
|
+
return function () {
|
|
164
|
+
return debouncedSearch.cancel();
|
|
165
|
+
};
|
|
166
|
+
}, [debouncedSearch]);
|
|
167
|
+
function handleInputChange(event) {
|
|
168
|
+
var value = event.target.value;
|
|
169
|
+
setInputValue(value);
|
|
170
|
+
debouncedSearch(value);
|
|
171
|
+
}
|
|
172
|
+
function handleSuggestionSelect(_x2) {
|
|
173
|
+
return _handleSuggestionSelect.apply(this, arguments);
|
|
174
|
+
}
|
|
175
|
+
function _handleSuggestionSelect() {
|
|
176
|
+
_handleSuggestionSelect = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(suggestion) {
|
|
177
|
+
var applyDescriptionOnly, response, parsedAddress;
|
|
178
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
179
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
180
|
+
case 0:
|
|
181
|
+
applyDescriptionOnly = function _applyDescriptionOnly() {
|
|
182
|
+
setInputValue(suggestion.description);
|
|
183
|
+
updateAddress({
|
|
184
|
+
city: '',
|
|
185
|
+
country: '',
|
|
186
|
+
lineOne: suggestion.description,
|
|
187
|
+
lineTwo: '',
|
|
188
|
+
postcode: '',
|
|
189
|
+
state: ''
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
setLoading(true);
|
|
193
|
+
_context2.prev = 2;
|
|
194
|
+
_context2.next = 5;
|
|
195
|
+
return merchi.authenticatedFetch('/addresses/place-details/', {
|
|
196
|
+
method: 'GET',
|
|
197
|
+
query: [['place_id', suggestion.placeId]]
|
|
198
|
+
});
|
|
199
|
+
case 5:
|
|
200
|
+
response = _context2.sent;
|
|
201
|
+
parsedAddress = response.status === 'success' ? googlePlacesResultAsNewAddress(response.result) : null;
|
|
202
|
+
if (parsedAddress) {
|
|
203
|
+
setInputValue(addressInOneLine(parsedAddress));
|
|
204
|
+
updateAddress(parsedAddress);
|
|
205
|
+
} else {
|
|
206
|
+
applyDescriptionOnly();
|
|
207
|
+
}
|
|
208
|
+
_context2.next = 14;
|
|
209
|
+
break;
|
|
210
|
+
case 10:
|
|
211
|
+
_context2.prev = 10;
|
|
212
|
+
_context2.t0 = _context2["catch"](2);
|
|
213
|
+
console.error('Error fetching place details:', _context2.t0);
|
|
214
|
+
applyDescriptionOnly();
|
|
215
|
+
case 14:
|
|
216
|
+
_context2.prev = 14;
|
|
217
|
+
setLoading(false);
|
|
218
|
+
setShowSuggestions(false);
|
|
219
|
+
setSuggestions([]);
|
|
220
|
+
setSelectedIndex(-1);
|
|
221
|
+
return _context2.finish(14);
|
|
222
|
+
case 20:
|
|
223
|
+
case "end":
|
|
224
|
+
return _context2.stop();
|
|
225
|
+
}
|
|
226
|
+
}, _callee2, null, [[2, 10, 14, 20]]);
|
|
227
|
+
}));
|
|
228
|
+
return _handleSuggestionSelect.apply(this, arguments);
|
|
229
|
+
}
|
|
230
|
+
function handleKeyDown(event) {
|
|
231
|
+
if (!showSuggestions || suggestions.length === 0) return;
|
|
232
|
+
switch (event.key) {
|
|
233
|
+
case 'ArrowDown':
|
|
234
|
+
event.preventDefault();
|
|
235
|
+
setSelectedIndex(function (prev) {
|
|
236
|
+
return prev < suggestions.length - 1 ? prev + 1 : 0;
|
|
237
|
+
});
|
|
238
|
+
break;
|
|
239
|
+
case 'ArrowUp':
|
|
240
|
+
event.preventDefault();
|
|
241
|
+
setSelectedIndex(function (prev) {
|
|
242
|
+
return prev > 0 ? prev - 1 : suggestions.length - 1;
|
|
243
|
+
});
|
|
244
|
+
break;
|
|
245
|
+
case 'Enter':
|
|
246
|
+
event.preventDefault();
|
|
247
|
+
if (selectedIndex >= 0 && selectedIndex < suggestions.length) {
|
|
248
|
+
handleSuggestionSelect(suggestions[selectedIndex]);
|
|
249
|
+
}
|
|
250
|
+
break;
|
|
251
|
+
case 'Escape':
|
|
252
|
+
setShowSuggestions(false);
|
|
253
|
+
setSelectedIndex(-1);
|
|
254
|
+
break;
|
|
255
|
+
default:
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
function handleInputBlur() {
|
|
260
|
+
setTimeout(function () {
|
|
261
|
+
var _suggestionsRef$curre;
|
|
262
|
+
if (!((_suggestionsRef$curre = suggestionsRef.current) !== null && _suggestionsRef$curre !== void 0 && _suggestionsRef$curre.contains(document.activeElement))) {
|
|
263
|
+
setShowSuggestions(false);
|
|
264
|
+
setSelectedIndex(-1);
|
|
265
|
+
}
|
|
266
|
+
}, 200);
|
|
267
|
+
}
|
|
268
|
+
function handleInputFocus() {
|
|
269
|
+
if (suggestions.length > 0) {
|
|
270
|
+
setShowSuggestions(true);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
function clearInput(e) {
|
|
274
|
+
e.preventDefault();
|
|
275
|
+
setInputValue('');
|
|
276
|
+
setSuggestions([]);
|
|
277
|
+
setShowSuggestions(false);
|
|
278
|
+
updateAddress({
|
|
279
|
+
city: '',
|
|
280
|
+
country: '',
|
|
281
|
+
lineOne: '',
|
|
282
|
+
lineTwo: '',
|
|
283
|
+
postcode: '',
|
|
284
|
+
state: ''
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
var hasErrors = !!Object.keys(errors || {}).length;
|
|
87
288
|
var addressForm = /*#__PURE__*/_jsxs(_Fragment, {
|
|
88
289
|
children: [/*#__PURE__*/_jsx(InputText, {
|
|
89
290
|
control: control,
|
|
90
291
|
label: "Address line one",
|
|
91
|
-
name: inputName(
|
|
292
|
+
name: inputName('lineOne'),
|
|
92
293
|
placeholder: "123 Fake st",
|
|
93
294
|
rules: {
|
|
94
295
|
required: 'Address line one is required.'
|
|
@@ -96,7 +297,7 @@ export function InputsAddress(_ref) {
|
|
|
96
297
|
}), /*#__PURE__*/_jsx(InputText, {
|
|
97
298
|
control: control,
|
|
98
299
|
label: "Continue address",
|
|
99
|
-
name: inputName(
|
|
300
|
+
name: inputName('lineTwo'),
|
|
100
301
|
placeholder: "Continue address..."
|
|
101
302
|
}), /*#__PURE__*/_jsxs("div", {
|
|
102
303
|
className: classNameCartRow,
|
|
@@ -105,7 +306,7 @@ export function InputsAddress(_ref) {
|
|
|
105
306
|
children: /*#__PURE__*/_jsx(InputText, {
|
|
106
307
|
control: control,
|
|
107
308
|
label: "City / Province",
|
|
108
|
-
name: inputName(
|
|
309
|
+
name: inputName('city'),
|
|
109
310
|
placeholder: "City",
|
|
110
311
|
rules: {
|
|
111
312
|
required: 'City / Province is required.'
|
|
@@ -116,7 +317,7 @@ export function InputsAddress(_ref) {
|
|
|
116
317
|
children: /*#__PURE__*/_jsx(InputText, {
|
|
117
318
|
control: control,
|
|
118
319
|
label: "Post / Zip code",
|
|
119
|
-
name: inputName(
|
|
320
|
+
name: inputName('postcode'),
|
|
120
321
|
placeholder: "90210"
|
|
121
322
|
})
|
|
122
323
|
})]
|
|
@@ -129,16 +330,16 @@ export function InputsAddress(_ref) {
|
|
|
129
330
|
children: [/*#__PURE__*/_jsx("label", {
|
|
130
331
|
children: "Country"
|
|
131
332
|
}), /*#__PURE__*/_jsx(Controller, {
|
|
132
|
-
name: inputName(
|
|
333
|
+
name: inputName('country'),
|
|
133
334
|
control: control,
|
|
134
335
|
defaultValue: defaultAddress && defaultAddress.country,
|
|
135
336
|
render: function render(_ref2) {
|
|
136
337
|
var field = _ref2.field;
|
|
137
338
|
return /*#__PURE__*/_jsx(CountryDropdown, _objectSpread(_objectSpread({}, field), {}, {
|
|
138
|
-
// value={defaultAddress && defaultAddress.country}
|
|
139
339
|
classes: classNameCartFormInput,
|
|
140
340
|
onChange: function onChange(val) {
|
|
141
|
-
setValue(inputName(
|
|
341
|
+
setValue(inputName('country'), val);
|
|
342
|
+
setValue(inputName('state'), '');
|
|
142
343
|
field.onChange(val);
|
|
143
344
|
onChangeCountryState();
|
|
144
345
|
},
|
|
@@ -154,18 +355,17 @@ export function InputsAddress(_ref) {
|
|
|
154
355
|
children: [/*#__PURE__*/_jsx("label", {
|
|
155
356
|
children: "State / Region"
|
|
156
357
|
}), /*#__PURE__*/_jsx(Controller, {
|
|
157
|
-
name: inputName(
|
|
358
|
+
name: inputName('state'),
|
|
158
359
|
control: control,
|
|
159
360
|
defaultValue: defaultAddress && defaultAddress.state,
|
|
160
361
|
render: function render(_ref3) {
|
|
161
362
|
var field = _ref3.field;
|
|
162
363
|
return /*#__PURE__*/_jsx(RegionDropdown, _objectSpread(_objectSpread({}, field), {}, {
|
|
163
|
-
// value={defaultAddress && defaultAddress.state}
|
|
164
364
|
countryValueType: "short",
|
|
165
|
-
country:
|
|
365
|
+
country: selectedCountry,
|
|
166
366
|
classes: classNameCartFormInput,
|
|
167
367
|
onChange: function onChange(val) {
|
|
168
|
-
setValue(inputName(
|
|
368
|
+
setValue(inputName('state'), val);
|
|
169
369
|
field.onChange(val);
|
|
170
370
|
onChangeCountryState();
|
|
171
371
|
},
|
|
@@ -177,48 +377,103 @@ export function InputsAddress(_ref) {
|
|
|
177
377
|
})]
|
|
178
378
|
})]
|
|
179
379
|
});
|
|
180
|
-
return /*#__PURE__*/
|
|
181
|
-
children:
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
children:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
380
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
381
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
382
|
+
className: classNameCartFormGroup,
|
|
383
|
+
children: [/*#__PURE__*/_jsx("label", {
|
|
384
|
+
children: labelGeoSuggest
|
|
385
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
386
|
+
className: "merchi-cart-address-search",
|
|
387
|
+
style: {
|
|
388
|
+
position: 'relative'
|
|
389
|
+
},
|
|
390
|
+
children: [/*#__PURE__*/_jsx("input", {
|
|
391
|
+
autoComplete: "new-password",
|
|
392
|
+
ref: inputRef,
|
|
393
|
+
type: "text",
|
|
394
|
+
name: "address-suggestion",
|
|
395
|
+
className: classNameCartFormInput,
|
|
396
|
+
placeholder: placeholder,
|
|
397
|
+
value: inputValue,
|
|
398
|
+
onChange: handleInputChange,
|
|
399
|
+
onKeyDown: handleKeyDown,
|
|
400
|
+
onBlur: handleInputBlur,
|
|
401
|
+
onFocus: handleInputFocus,
|
|
188
402
|
style: {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
403
|
+
paddingRight: loading || inputValue ? '40px' : undefined
|
|
404
|
+
}
|
|
405
|
+
}), loading && /*#__PURE__*/_jsx("div", {
|
|
406
|
+
className: "merchi-cart-address-search__spinner",
|
|
407
|
+
style: {
|
|
408
|
+
position: 'absolute',
|
|
409
|
+
right: '10px',
|
|
410
|
+
top: '50%',
|
|
411
|
+
transform: 'translateY(-50%)'
|
|
194
412
|
},
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
413
|
+
children: /*#__PURE__*/_jsx(FontAwesomeIcon, {
|
|
414
|
+
icon: faSpinner,
|
|
415
|
+
spin: true
|
|
416
|
+
})
|
|
417
|
+
}), inputValue && !loading && /*#__PURE__*/_jsx("button", {
|
|
418
|
+
type: "button",
|
|
419
|
+
className: "btn btn-sm merchi-cart-address-search__clear",
|
|
420
|
+
style: {
|
|
421
|
+
position: 'absolute',
|
|
422
|
+
right: '5px',
|
|
423
|
+
top: '50%',
|
|
424
|
+
transform: 'translateY(-50%)',
|
|
425
|
+
border: 'none',
|
|
426
|
+
background: 'transparent',
|
|
427
|
+
padding: '2px 5px'
|
|
428
|
+
},
|
|
429
|
+
onClick: clearInput,
|
|
430
|
+
children: /*#__PURE__*/_jsx(FontAwesomeIcon, {
|
|
431
|
+
icon: faTimes
|
|
432
|
+
})
|
|
433
|
+
}), showSuggestions && suggestions.length > 0 && /*#__PURE__*/_jsx("div", {
|
|
434
|
+
ref: suggestionsRef,
|
|
435
|
+
className: classNameCartGoogleSuggestList,
|
|
436
|
+
role: "listbox",
|
|
437
|
+
children: suggestions.map(function (suggestion, index) {
|
|
438
|
+
var _suggestion$structure, _suggestion$structure2;
|
|
439
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
440
|
+
className: "".concat(classNameCartGoogleSuggestListItem).concat(index === selectedIndex ? ' active' : ''),
|
|
441
|
+
role: "option",
|
|
442
|
+
onMouseDown: function onMouseDown(e) {
|
|
443
|
+
e.preventDefault();
|
|
444
|
+
handleSuggestionSelect(suggestion);
|
|
445
|
+
},
|
|
446
|
+
onMouseEnter: function onMouseEnter() {
|
|
447
|
+
return setSelectedIndex(index);
|
|
448
|
+
},
|
|
449
|
+
children: [/*#__PURE__*/_jsx("strong", {
|
|
450
|
+
children: ((_suggestion$structure = suggestion.structuredFormatting) === null || _suggestion$structure === void 0 ? void 0 : _suggestion$structure.main_text) || suggestion.description
|
|
451
|
+
}), ((_suggestion$structure2 = suggestion.structuredFormatting) === null || _suggestion$structure2 === void 0 ? void 0 : _suggestion$structure2.secondary_text) && /*#__PURE__*/_jsx("div", {
|
|
452
|
+
className: "text-muted small",
|
|
453
|
+
children: suggestion.structuredFormatting.secondary_text
|
|
454
|
+
})]
|
|
455
|
+
}, suggestion.placeId);
|
|
456
|
+
})
|
|
219
457
|
})]
|
|
220
458
|
})]
|
|
221
|
-
})
|
|
459
|
+
}), /*#__PURE__*/_jsx(Collapse, {
|
|
460
|
+
isOpen: addressFieldsOpen,
|
|
461
|
+
children: addressForm
|
|
462
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
463
|
+
className: "d-flex align-items-center",
|
|
464
|
+
children: [hasErrors && /*#__PURE__*/_jsxs("div", {
|
|
465
|
+
className: "text-danger",
|
|
466
|
+
children: [/*#__PURE__*/_jsx(FontAwesomeIcon, {
|
|
467
|
+
icon: faExclamationTriangle
|
|
468
|
+
}), " Invalid address!"]
|
|
469
|
+
}), /*#__PURE__*/_jsxs("a", {
|
|
470
|
+
className: "ml-auto btn btn-sm btn-link ".concat(hasErrors ? 'text-danger' : ''),
|
|
471
|
+
onClick: toggleAddressFieldsOpen,
|
|
472
|
+
children: [/*#__PURE__*/_jsx(FontAwesomeIcon, {
|
|
473
|
+
icon: addressFieldsOpen ? faTimes : faEdit
|
|
474
|
+
}), ' ', addressFieldsOpen ? 'Close' : 'Edit fields']
|
|
475
|
+
})]
|
|
476
|
+
})]
|
|
222
477
|
});
|
|
223
478
|
}
|
|
224
479
|
export default InputsAddress;
|
package/esm/styles/globals.css
CHANGED
|
@@ -423,4 +423,41 @@ button.merchi-nav-link {
|
|
|
423
423
|
background: #fff;
|
|
424
424
|
}
|
|
425
425
|
|
|
426
|
+
.merchi-cart-google-suggest-list {
|
|
427
|
+
position: absolute;
|
|
428
|
+
left: 0;
|
|
429
|
+
right: 0;
|
|
430
|
+
top: 100%;
|
|
431
|
+
z-index: 1050;
|
|
432
|
+
margin: 0.25rem 0 0;
|
|
433
|
+
padding: 0;
|
|
434
|
+
list-style: none;
|
|
435
|
+
background: #fff;
|
|
436
|
+
color: #18181b;
|
|
437
|
+
border: 1px solid #dee2e6;
|
|
438
|
+
border-radius: 0.375rem;
|
|
439
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
|
|
440
|
+
max-height: 280px;
|
|
441
|
+
overflow-y: auto;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.merchi-cart-google-suggest-list-item {
|
|
445
|
+
padding: 0.5rem 0.75rem;
|
|
446
|
+
cursor: pointer;
|
|
447
|
+
color: #18181b;
|
|
448
|
+
border-bottom: 1px solid #f4f4f5;
|
|
449
|
+
}
|
|
450
|
+
.merchi-cart-google-suggest-list-item strong {
|
|
451
|
+
color: #18181b;
|
|
452
|
+
}
|
|
453
|
+
.merchi-cart-google-suggest-list-item .text-muted {
|
|
454
|
+
color: #71717a !important;
|
|
455
|
+
}
|
|
456
|
+
.merchi-cart-google-suggest-list-item:last-child {
|
|
457
|
+
border-bottom: none;
|
|
458
|
+
}
|
|
459
|
+
.merchi-cart-google-suggest-list-item:hover, .merchi-cart-google-suggest-list-item.active {
|
|
460
|
+
background: #f4f4f5;
|
|
461
|
+
}
|
|
462
|
+
|
|
426
463
|
/*# sourceMappingURL=globals.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../src/styles/globals.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;AACA;EACE;EACA;;;AAGF;EACE;IACE;;EAGF;IACE;IACA;;EAGF;IACE;IACA;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;AAAA;EAEE;;;AAGF;EACE;EACA;EACA;;;AAKF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;AAAA;EAEE;;;AAGF;EACE;EACA;EACA;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;;;AAGF;AAAA;EAEE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AAEA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA","file":"globals.css"}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../src/styles/globals.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;AACA;EACE;EACA;;;AAGF;EACE;IACE;;EAGF;IACE;IACA;;EAGF;IACE;IACA;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;AAAA;EAEE;;;AAGF;EACE;EACA;EACA;;;AAKF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;AAAA;EAEE;;;AAGF;EACE;EACA;EACA;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;;;AAGF;AAAA;EAEE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AAEA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EAEE","file":"globals.css"}
|