ordering-ui-external 2.6.7 → 2.6.8
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/_bundles/{0.ordering-ui.fd1dc326de89a8eb39f9.js → 0.ordering-ui.ba64d5c9c7490676feb5.js} +1 -1
- package/_bundles/{7.ordering-ui.fd1dc326de89a8eb39f9.js → 7.ordering-ui.ba64d5c9c7490676feb5.js} +1 -1
- package/_bundles/ordering-ui.ba64d5c9c7490676feb5.js +2 -0
- package/_modules/components/LanguageSelector/index.js +1 -0
- package/_modules/components/OrderTypeSelectorHeader/index.js +3 -1
- package/_modules/components/SmartAppBanner/index.js +5 -2
- package/_modules/contexts/ThemeContext/index.js +1 -1
- package/_modules/styles/Select/index.js +14 -2
- package/_modules/styles/Selects/index.js +11 -8
- package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +168 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/SearchComponent.js +39 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/SocialNetWork.js +19 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +35 -156
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +45 -35
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +1 -1
- package/_modules/themes/five/src/components/CardForm/index.js +16 -3
- package/_modules/themes/five/src/components/CardForm/styles.js +13 -9
- package/_modules/themes/five/src/components/CardFormCustom/cardUtils.js +102 -0
- package/_modules/themes/five/src/components/CardFormCustom/index.js +148 -0
- package/_modules/themes/five/src/components/CardFormCustom/styles.js +16 -0
- package/_modules/themes/five/src/components/CartPopover/styles.js +1 -1
- package/_modules/themes/five/src/components/Checkout/index.js +31 -22
- package/_modules/themes/five/src/components/LanguageSelector/index.js +4 -1
- package/_modules/themes/five/src/components/LoginForm/index.js +11 -8
- package/_modules/themes/five/src/components/Modal/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderContextUI/index.js +13 -1
- package/_modules/themes/five/src/components/OrderDetails/OrderHistory.js +7 -3
- package/_modules/themes/five/src/components/OrderDetails/index.js +4 -2
- package/_modules/themes/five/src/components/PaymentOptionCard/index.js +84 -0
- package/_modules/themes/five/src/components/PaymentOptionStripe/index.js +48 -22
- package/_modules/themes/five/src/components/PaymentOptionStripe/styles.js +3 -1
- package/_modules/themes/five/src/components/PaymentOptions/index.js +46 -24
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +1 -1
- package/_modules/themes/five/src/components/SearchProducts/styles.js +1 -1
- package/_modules/themes/five/src/components/UserDetails/index.js +1 -1
- package/_modules/themes/five/src/components/UserPopover/styles.js +1 -1
- package/_modules/themes/five/src/styles/Select/index.js +4 -2
- package/_modules/themes/five/src/styles/Selects/index.js +7 -4
- package/_modules/themes/pwa/src/components/MomentPopover/styles.js +1 -1
- package/index.html +1 -1
- package/package.json +4 -2
- package/src/components/LanguageSelector/index.js +1 -0
- package/src/components/OrderTypeSelectorHeader/index.js +3 -1
- package/src/components/SmartAppBanner/index.js +4 -2
- package/src/contexts/ThemeContext/index.js +1 -1
- package/src/styles/Select/index.js +11 -2
- package/src/styles/Selects/index.js +1 -1
- package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +230 -0
- package/src/themes/five/src/components/BusinessBasicInformation/SearchComponent.js +40 -0
- package/src/themes/five/src/components/BusinessBasicInformation/SocialNetWork.js +10 -0
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +39 -247
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +14 -4
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +1 -1
- package/src/themes/five/src/components/CardForm/index.js +25 -4
- package/src/themes/five/src/components/CardForm/styles.js +35 -0
- package/src/themes/five/src/components/CardFormCustom/cardUtils.js +111 -0
- package/src/themes/five/src/components/CardFormCustom/index.js +161 -0
- package/src/themes/five/src/components/CardFormCustom/styles.js +20 -0
- package/src/themes/five/src/components/CartPopover/styles.js +1 -1
- package/src/themes/five/src/components/Checkout/index.js +34 -25
- package/src/themes/five/src/components/LanguageSelector/index.js +2 -1
- package/src/themes/five/src/components/LoginForm/index.js +6 -4
- package/src/themes/five/src/components/Modal/styles.js +1 -0
- package/src/themes/five/src/components/OrderContextUI/index.js +10 -3
- package/src/themes/five/src/components/OrderDetails/OrderHistory.js +4 -3
- package/src/themes/five/src/components/OrderDetails/index.js +1 -1
- package/src/themes/five/src/components/PaymentOptionCard/index.js +70 -0
- package/src/themes/five/src/components/PaymentOptionStripe/index.js +46 -20
- package/src/themes/five/src/components/PaymentOptionStripe/styles.js +6 -1
- package/src/themes/five/src/components/PaymentOptions/index.js +28 -3
- package/src/themes/five/src/components/ProductForm/index.js +0 -1
- package/src/themes/five/src/components/RenderProductsLayout/index.js +1 -1
- package/src/themes/five/src/components/SearchProducts/styles.js +1 -1
- package/src/themes/five/src/components/UserDetails/index.js +1 -1
- package/src/themes/five/src/components/UserPopover/styles.js +1 -1
- package/src/themes/five/src/styles/Select/index.js +3 -2
- package/src/themes/five/src/styles/Selects/index.js +1 -1
- package/src/themes/pwa/src/components/MomentPopover/styles.js +4 -1
- package/template/theme.json +3 -1
- package/_bundles/ordering-ui.fd1dc326de89a8eb39f9.js +0 -2
- /package/_bundles/{1.ordering-ui.fd1dc326de89a8eb39f9.js → 1.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{2.ordering-ui.fd1dc326de89a8eb39f9.js → 2.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{4.ordering-ui.fd1dc326de89a8eb39f9.js → 4.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{5.ordering-ui.fd1dc326de89a8eb39f9.js → 5.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{6.ordering-ui.fd1dc326de89a8eb39f9.js → 6.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{7.ordering-ui.fd1dc326de89a8eb39f9.js.LICENSE.txt → 7.ordering-ui.ba64d5c9c7490676feb5.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.fd1dc326de89a8eb39f9.js → 8.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{9.ordering-ui.fd1dc326de89a8eb39f9.js → 9.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{ordering-ui.fd1dc326de89a8eb39f9.js.LICENSE.txt → ordering-ui.ba64d5c9c7490676feb5.js.LICENSE.txt} +0 -0
|
@@ -57,7 +57,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
57
57
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
58
58
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
59
59
|
var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
60
|
-
var _configs$google_maps_, _configs$powered_by_o, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$confirmation, _theme$confirmation$c, _theme$confirmation$c2, _theme$confirmation$c3, _theme$confirmation$c4, _theme$confirmation2, _theme$confirmation2$, _theme$confirmation2$2, _theme$confirmation2$3, _theme$confirmation2$4, _theme$confirmation3, _theme$confirmation3$, _theme$confirmation3$2, _theme$confirmation3$3, _theme$confirmation3$4, _theme$confirmation4, _theme$confirmation4$, _theme$confirmation4$2, _theme$confirmation4$3, _theme$confirmation4$4, _theme$confirmation5, _theme$confirmation5$, _theme$confirmation5$2, _theme$confirmation5$3, _theme$confirmation5$4, _theme$confirmation6, _theme$confirmation6$, _theme$confirmation6$2, _theme$confirmation6$3, _theme$confirmation6$4, _theme$confirmation7, _theme$confirmation7$, _theme$confirmation7$2, _theme$confirmation7$3, _theme$confirmation7$4, _theme$confirmation8, _theme$confirmation8$, _theme$confirmation8$2, _theme$confirmation8$3, _theme$confirmation8$4, _theme$confirmation9, _theme$confirmation9$, _theme$confirmation9$2, _theme$confirmation9$3, _theme$confirmation9$4, _theme$confirmation10, _theme$confirmation11, _theme$confirmation12, _theme$confirmation13, _theme$confirmation14, _theme$confirmation15, _theme$confirmation16, _theme$confirmation17, _theme$confirmation18, _theme$confirmation19, _theme$confirmation20, _theme$confirmation21, _theme$confirmation22, _theme$confirmation23, _theme$confirmation24, _theme$confirmation25, _theme$confirmation26, _theme$confirmation27, _theme$confirmation28, _theme$confirmation29, _theme$confirmation30, _theme$confirmation31, _theme$confirmation32, _theme$confirmation33, _theme$confirmation34, _theme$confirmation35, _theme$confirmation36, _theme$confirmation37, _theme$confirmation38, _theme$confirmation39, _theme$confirmation40, _theme$confirmation41, _theme$confirmation42, _theme$confirmation43, _theme$confirmation44, _theme$confirmation45, _theme$confirmation46, _theme$confirmation47, _theme$confirmation48, _theme$confirmation49, _order$driver, _order$driver2, _theme$images, _theme$images$dummies, _order$business2, _order$business3, _theme$images2, _theme$images2$dummie, _order$customer, _order$customer2, _theme$images3, _theme$images3$dummie, _order$driver3, _order$driver3$locati, _order$driver4, _order$driver4$locati, _order$driver4$locati2, _theme$defaultLanguag, _configs$guest_uuid_a, _order$business4, _order$business5, _orderTypes$find, _order$reporting_data, _getOrderStatus, _getOrderStatus2, _theme$defaultLanguag2, _order$business6, _order$business7, _order$business8, _order$business9, _order$business10, _order$place, _order$place2, _getOrderStatus3, _getOrderStatus4, _order$business12, _order$customer3, _order$customer4, _order$customer5, _order$customer6, _order$customer7, _order$customer8, _order$customer9, _order$customer10, _theme$defaultLanguag3, _order$driver5, _order$driver6, _order$driver7, _order$driver8, _order$driver9, _order$driver10, _order$driver11, _order$driver12, _order$driver13, _order$driver13$locat, _order$driver14, _configs$google_maps_2, _order$products$, _order$products$$gift, _order$products$2, _order$products$2$gif, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6;
|
|
60
|
+
var _configs$google_maps_, _configs$powered_by_o, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _theme$confirmation, _theme$confirmation$c, _theme$confirmation$c2, _theme$confirmation$c3, _theme$confirmation$c4, _theme$confirmation2, _theme$confirmation2$, _theme$confirmation2$2, _theme$confirmation2$3, _theme$confirmation2$4, _theme$confirmation3, _theme$confirmation3$, _theme$confirmation3$2, _theme$confirmation3$3, _theme$confirmation3$4, _theme$confirmation4, _theme$confirmation4$, _theme$confirmation4$2, _theme$confirmation4$3, _theme$confirmation4$4, _theme$confirmation5, _theme$confirmation5$, _theme$confirmation5$2, _theme$confirmation5$3, _theme$confirmation5$4, _theme$confirmation6, _theme$confirmation6$, _theme$confirmation6$2, _theme$confirmation6$3, _theme$confirmation6$4, _theme$confirmation7, _theme$confirmation7$, _theme$confirmation7$2, _theme$confirmation7$3, _theme$confirmation7$4, _theme$confirmation8, _theme$confirmation8$, _theme$confirmation8$2, _theme$confirmation8$3, _theme$confirmation8$4, _theme$confirmation9, _theme$confirmation9$, _theme$confirmation9$2, _theme$confirmation9$3, _theme$confirmation9$4, _theme$confirmation10, _theme$confirmation11, _theme$confirmation12, _theme$confirmation13, _theme$confirmation14, _theme$confirmation15, _theme$confirmation16, _theme$confirmation17, _theme$confirmation18, _theme$confirmation19, _theme$confirmation20, _theme$confirmation21, _theme$confirmation22, _theme$confirmation23, _theme$confirmation24, _theme$confirmation25, _theme$confirmation26, _theme$confirmation27, _theme$confirmation28, _theme$confirmation29, _theme$confirmation30, _theme$confirmation31, _theme$confirmation32, _theme$confirmation33, _theme$confirmation34, _theme$confirmation35, _theme$confirmation36, _theme$confirmation37, _theme$confirmation38, _theme$confirmation39, _theme$confirmation40, _theme$confirmation41, _theme$confirmation42, _theme$confirmation43, _theme$confirmation44, _theme$confirmation45, _theme$confirmation46, _theme$confirmation47, _theme$confirmation48, _theme$confirmation49, _order$driver, _order$driver2, _theme$images, _theme$images$dummies, _order$business2, _order$business3, _theme$images2, _theme$images2$dummie, _order$customer, _order$customer2, _theme$images3, _theme$images3$dummie, _order$driver3, _order$driver3$locati, _order$driver4, _order$driver4$locati, _order$driver4$locati2, _theme$defaultLanguag, _configs$guest_uuid_a, _order$business4, _order$business5, _orderTypes$find, _order$reporting_data, _configs$general_hour, _getOrderStatus, _getOrderStatus2, _theme$defaultLanguag2, _order$business6, _order$business7, _order$business8, _order$business9, _order$business10, _order$place, _order$place2, _getOrderStatus3, _getOrderStatus4, _order$business12, _order$customer3, _order$customer4, _order$customer5, _order$customer6, _order$customer7, _order$customer8, _order$customer9, _order$customer10, _theme$defaultLanguag3, _order$driver5, _order$driver6, _order$driver7, _order$driver8, _order$driver9, _order$driver10, _order$driver11, _order$driver12, _order$driver13, _order$driver13$locat, _order$driver14, _configs$google_maps_2, _order$products$, _order$products$$gift, _order$products$2, _order$products$2$gif, _theme$defaultLanguag4, _theme$defaultLanguag5, _theme$defaultLanguag6, _openTaxModal$data, _openTaxModal$data2, _openTaxModal$data3, _openTaxModal$data4, _openTaxModal$data$fi, _openTaxModal$data5, _openTaxModal$data6;
|
|
61
61
|
var userCustomerId = props.userCustomerId,
|
|
62
62
|
handleChangeOrderStatus = props.handleChangeOrderStatus,
|
|
63
63
|
handleBusinessRedirect = props.handleBusinessRedirect,
|
|
@@ -528,7 +528,9 @@ var OrderDetailsUI = function OrderDetailsUI(props) {
|
|
|
528
528
|
className: "date"
|
|
529
529
|
}, activeStatus.includes(order === null || order === void 0 ? void 0 : order.status) ? /*#__PURE__*/_react.default.createElement(_OrderEta.OrderEta, {
|
|
530
530
|
order: order
|
|
531
|
-
}) : parseDate(order === null || order === void 0 ? void 0 : (_order$reporting_data = order.reporting_data) === null || _order$reporting_data === void 0 ? void 0 : _order$reporting_data.at["status:".concat(order.status)]
|
|
531
|
+
}) : parseDate(order === null || order === void 0 ? void 0 : (_order$reporting_data = order.reporting_data) === null || _order$reporting_data === void 0 ? void 0 : _order$reporting_data.at["status:".concat(order.status)], {
|
|
532
|
+
outputFormat: "YYYY-MM-DD ".concat(configs === null || configs === void 0 ? void 0 : (_configs$general_hour = configs.general_hour_format) === null || _configs$general_hour === void 0 ? void 0 : _configs$general_hour.value)
|
|
533
|
+
})), (acceptedStatus.includes(parseInt(order === null || order === void 0 ? void 0 : order.status, 10)) || !isOriginalLayout) && !isGiftCardOrder && /*#__PURE__*/_react.default.createElement(_styles.ReOrder, null, /*#__PURE__*/_react.default.createElement(_Buttons.Button, {
|
|
532
534
|
color: "primary",
|
|
533
535
|
outline: true,
|
|
534
536
|
onClick: function onClick() {
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.PaymentOptionCard = void 0;
|
|
8
|
+
var _orderingComponentsExternal = require("ordering-components-external");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _CardFormCustom = require("../CardFormCustom");
|
|
11
|
+
var _Modal = _interopRequireDefault(require("../Modal"));
|
|
12
|
+
var _PaymentOptionStripe = require("../PaymentOptionStripe");
|
|
13
|
+
var _styles = require("../PaymentOptionStripe/styles");
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
+
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; }
|
|
20
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
21
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
22
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
+
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; }
|
|
26
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
27
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
|
+
var PaymentOptionCardUI = function PaymentOptionCardUI(props) {
|
|
29
|
+
var deleteCard = props.deleteCard,
|
|
30
|
+
cardsList = props.cardsList,
|
|
31
|
+
handleCardClick = props.handleCardClick,
|
|
32
|
+
handleNewCard = props.handleNewCard,
|
|
33
|
+
paymethodSelected = props.paymethodSelected,
|
|
34
|
+
cardSelected = props.cardSelected,
|
|
35
|
+
gateway = props.gateway,
|
|
36
|
+
paymethodsWithoutSaveCards = props.paymethodsWithoutSaveCards,
|
|
37
|
+
onSelectCard = props.onSelectCard;
|
|
38
|
+
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
39
|
+
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
40
|
+
t = _useLanguage2[1];
|
|
41
|
+
var _useSession = (0, _orderingComponentsExternal.useSession)(),
|
|
42
|
+
_useSession2 = _slicedToArray(_useSession, 1),
|
|
43
|
+
token = _useSession2[0].token;
|
|
44
|
+
var _useState = (0, _react.useState)(false),
|
|
45
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
+
addCardOpen = _useState2[0],
|
|
47
|
+
setAddCardOpen = _useState2[1];
|
|
48
|
+
(0, _react.useEffect)(function () {
|
|
49
|
+
var _cardsList$cards;
|
|
50
|
+
if ((cardsList === null || cardsList === void 0 ? void 0 : (_cardsList$cards = cardsList.cards) === null || _cardsList$cards === void 0 ? void 0 : _cardsList$cards.length) > 0) {
|
|
51
|
+
setAddCardOpen(true);
|
|
52
|
+
}
|
|
53
|
+
}, [cardsList === null || cardsList === void 0 ? void 0 : cardsList.cards]);
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_PaymentOptionStripe.PaymentOptionStripeUI, {
|
|
55
|
+
deleteCard: deleteCard,
|
|
56
|
+
cardsList: cardsList,
|
|
57
|
+
handleCardClick: handleCardClick,
|
|
58
|
+
handleNewCard: handleNewCard,
|
|
59
|
+
paymethodSelected: paymethodSelected,
|
|
60
|
+
cardSelected: cardSelected,
|
|
61
|
+
gateway: gateway,
|
|
62
|
+
onSelectCard: onSelectCard
|
|
63
|
+
}), token && !cardsList.loading && (!cardSelected || !paymethodsWithoutSaveCards.includes(gateway)) && /*#__PURE__*/_react.default.createElement(_styles.AddNewCard, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
64
|
+
onClick: function onClick() {
|
|
65
|
+
return setAddCardOpen(true);
|
|
66
|
+
}
|
|
67
|
+
}, t('ADD_NEW_CARD', 'Add new card'))), /*#__PURE__*/_react.default.createElement(_Modal.default, {
|
|
68
|
+
open: addCardOpen,
|
|
69
|
+
onClose: function onClose() {
|
|
70
|
+
return setAddCardOpen(false);
|
|
71
|
+
},
|
|
72
|
+
title: t('ADD_NEW_CARD', 'Add new card')
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_CardFormCustom.CardFormCustom, {
|
|
74
|
+
handleNewCard: handleNewCard,
|
|
75
|
+
setAddCardOpen: setAddCardOpen
|
|
76
|
+
})));
|
|
77
|
+
};
|
|
78
|
+
var PaymentOptionCard = function PaymentOptionCard(props) {
|
|
79
|
+
var paymentOptionStripeProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
80
|
+
UIComponent: PaymentOptionCardUI
|
|
81
|
+
});
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.PaymentOptionStripe, paymentOptionStripeProps);
|
|
83
|
+
};
|
|
84
|
+
exports.PaymentOptionCard = PaymentOptionCard;
|
|
@@ -4,11 +4,13 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.PaymentOptionStripe = exports.PaymentCard = void 0;
|
|
7
|
+
exports.PaymentOptionStripeUI = exports.PaymentOptionStripe = exports.PaymentCard = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
|
|
10
10
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
11
|
-
var
|
|
11
|
+
var _IosRadioButtonOn = _interopRequireDefault(require("@meronex/icons/ios/IosRadioButtonOn"));
|
|
12
|
+
var _IosRadioButtonOff = _interopRequireDefault(require("@meronex/icons/ios/IosRadioButtonOff"));
|
|
13
|
+
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
12
14
|
var _styledComponents = require("styled-components");
|
|
13
15
|
var _Modal = require("../Modal");
|
|
14
16
|
var _Confirm = require("../Confirm");
|
|
@@ -36,11 +38,14 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
36
38
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
37
39
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
38
40
|
var PaymentOptionStripeUI = function PaymentOptionStripeUI(props) {
|
|
39
|
-
var _props$beforeElements, _props$beforeComponen, _cardsList$error$, _cardsList$
|
|
41
|
+
var _props$beforeElements, _props$beforeComponen, _cardsList$error$, _cardsList$cards2, _props$afterComponent, _props$afterElements;
|
|
40
42
|
var deleteCard = props.deleteCard,
|
|
41
43
|
cardsList = props.cardsList,
|
|
42
44
|
_handleCardClick = props.handleCardClick,
|
|
43
|
-
handleNewCard = props.handleNewCard
|
|
45
|
+
handleNewCard = props.handleNewCard,
|
|
46
|
+
paymethodSelected = props.paymethodSelected,
|
|
47
|
+
cardSelected = props.cardSelected,
|
|
48
|
+
gateway = props.gateway;
|
|
44
49
|
var _useSession = (0, _orderingComponentsExternal.useSession)(),
|
|
45
50
|
_useSession2 = _slicedToArray(_useSession, 1),
|
|
46
51
|
token = _useSession2[0].token;
|
|
@@ -59,6 +64,7 @@ var PaymentOptionStripeUI = function PaymentOptionStripeUI(props) {
|
|
|
59
64
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
60
65
|
addCartOpen = _useState4[0],
|
|
61
66
|
setAddCardOpen = _useState4[1];
|
|
67
|
+
var paymethodsWithoutSaveCards = ['credomatic'];
|
|
62
68
|
var _handleNewCard = function _handleNewCard(card) {
|
|
63
69
|
setAddCardOpen(false);
|
|
64
70
|
handleNewCard(card);
|
|
@@ -75,6 +81,12 @@ var PaymentOptionStripeUI = function PaymentOptionStripeUI(props) {
|
|
|
75
81
|
}
|
|
76
82
|
});
|
|
77
83
|
};
|
|
84
|
+
(0, _react.useEffect)(function () {
|
|
85
|
+
var _cardsList$cards;
|
|
86
|
+
if (!(cardsList !== null && cardsList !== void 0 && cardsList.loading) && (cardsList === null || cardsList === void 0 ? void 0 : (_cardsList$cards = cardsList.cards) === null || _cardsList$cards === void 0 ? void 0 : _cardsList$cards.length) === 0 && !paymethodsWithoutSaveCards.includes(gateway)) {
|
|
87
|
+
setAddCardOpen(true);
|
|
88
|
+
}
|
|
89
|
+
}, [cardsList === null || cardsList === void 0 ? void 0 : cardsList.loading]);
|
|
78
90
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (_props$beforeElements = props.beforeElements) === null || _props$beforeElements === void 0 ? void 0 : _props$beforeElements.map(function (BeforeElement, i) {
|
|
79
91
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
80
92
|
key: i
|
|
@@ -85,7 +97,7 @@ var PaymentOptionStripeUI = function PaymentOptionStripeUI(props) {
|
|
|
85
97
|
}, props));
|
|
86
98
|
}), /*#__PURE__*/_react.default.createElement(_styles.OptionStripeContainer, null, !token && /*#__PURE__*/_react.default.createElement(_styles.WarningMessage, null, t('NEED_LOGIN_TO_USE', 'Sorry, you need to login to use this method')), token && !cardsList.loading && cardsList.cards && cardsList.cards.length === 0 && /*#__PURE__*/_react.default.createElement(_styles.CardItem, null, /*#__PURE__*/_react.default.createElement("span", null, t('NO_CARDS', 'No cards'))), token && cardsList.error && cardsList.error.length > 0 && /*#__PURE__*/_react.default.createElement(_NotFoundSource.NotFoundSource, {
|
|
87
99
|
content: (cardsList === null || cardsList === void 0 ? void 0 : (_cardsList$error$ = cardsList.error[0]) === null || _cardsList$error$ === void 0 ? void 0 : _cardsList$error$.message) || (cardsList === null || cardsList === void 0 ? void 0 : cardsList.error[0])
|
|
88
|
-
}), token && cardsList.cards && cardsList.cards.length > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, cardsList === null || cardsList === void 0 ? void 0 : (_cardsList$
|
|
100
|
+
}), token && cardsList.cards && cardsList.cards.length > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, cardsList === null || cardsList === void 0 ? void 0 : (_cardsList$cards2 = cardsList.cards) === null || _cardsList$cards2 === void 0 ? void 0 : _cardsList$cards2.map(function (card, i) {
|
|
89
101
|
return /*#__PURE__*/_react.default.createElement(PaymentCard, _extends({}, props, {
|
|
90
102
|
key: i,
|
|
91
103
|
handleCardClick: function handleCardClick() {
|
|
@@ -95,9 +107,12 @@ var PaymentOptionStripeUI = function PaymentOptionStripeUI(props) {
|
|
|
95
107
|
return _handleDeleteCard(card);
|
|
96
108
|
},
|
|
97
109
|
card: card,
|
|
98
|
-
defaultSelected: i === 0
|
|
110
|
+
defaultSelected: i === 0,
|
|
111
|
+
active: (paymethodSelected || (cardSelected === null || cardSelected === void 0 ? void 0 : cardSelected.id)) === card.id,
|
|
112
|
+
cardSelected: cardSelected,
|
|
113
|
+
paymethodSelected: paymethodSelected
|
|
99
114
|
}));
|
|
100
|
-
})), token && !cardsList.loading && /*#__PURE__*/_react.default.createElement(_styles.AddNewCard, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
115
|
+
})), token && !cardsList.loading && !paymethodsWithoutSaveCards.includes(gateway) && /*#__PURE__*/_react.default.createElement(_styles.AddNewCard, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
101
116
|
onClick: function onClick() {
|
|
102
117
|
return setAddCardOpen(true);
|
|
103
118
|
}
|
|
@@ -151,21 +166,21 @@ var PaymentOptionStripeUI = function PaymentOptionStripeUI(props) {
|
|
|
151
166
|
}, AfterElement);
|
|
152
167
|
}));
|
|
153
168
|
};
|
|
169
|
+
exports.PaymentOptionStripeUI = PaymentOptionStripeUI;
|
|
154
170
|
var PaymentCard = function PaymentCard(props) {
|
|
155
171
|
var handleDeleteCard = props.handleDeleteCard,
|
|
156
172
|
card = props.card,
|
|
157
173
|
handleCardClick = props.handleCardClick,
|
|
158
|
-
onSelectCard = props.onSelectCard
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
t = _useLanguage4[1];
|
|
162
|
-
var theme = (0, _styledComponents.useTheme)();
|
|
174
|
+
onSelectCard = props.onSelectCard,
|
|
175
|
+
active = props.active,
|
|
176
|
+
cardSelected = props.cardSelected;
|
|
163
177
|
var _useState5 = (0, _react.useState)(false),
|
|
164
178
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
165
179
|
isShowActions = _useState6[0],
|
|
166
180
|
setIsShowActions = _useState6[1];
|
|
167
181
|
var cardActionsRef = (0, _react.useRef)(null);
|
|
168
182
|
var actionWrapperRef = (0, _react.useRef)(null);
|
|
183
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
169
184
|
var handleClickOutside = function handleClickOutside(e) {
|
|
170
185
|
var _cardActionsRef$curre;
|
|
171
186
|
if (!isShowActions) return;
|
|
@@ -178,15 +193,26 @@ var PaymentCard = function PaymentCard(props) {
|
|
|
178
193
|
var _actionWrapperRef$cur;
|
|
179
194
|
if ((_actionWrapperRef$cur = actionWrapperRef.current) !== null && _actionWrapperRef$cur !== void 0 && _actionWrapperRef$cur.contains(e.target)) return;
|
|
180
195
|
handleCardClick(card);
|
|
181
|
-
onSelectCard({
|
|
196
|
+
onSelectCard && onSelectCard(_objectSpread(_objectSpread({}, cardSelected), {}, {
|
|
182
197
|
id: card.id,
|
|
183
198
|
type: 'card',
|
|
184
199
|
card: {
|
|
185
200
|
brand: card.brand,
|
|
186
201
|
last4: card.last4
|
|
187
202
|
}
|
|
188
|
-
});
|
|
203
|
+
}));
|
|
189
204
|
};
|
|
205
|
+
(0, _react.useEffect)(function () {
|
|
206
|
+
if (!cardSelected) return;
|
|
207
|
+
onSelectCard && onSelectCard(_objectSpread(_objectSpread({}, cardSelected), {}, {
|
|
208
|
+
id: cardSelected === null || cardSelected === void 0 ? void 0 : cardSelected.id,
|
|
209
|
+
type: 'card',
|
|
210
|
+
card: {
|
|
211
|
+
brand: cardSelected === null || cardSelected === void 0 ? void 0 : cardSelected.brand,
|
|
212
|
+
last4: cardSelected === null || cardSelected === void 0 ? void 0 : cardSelected.last4
|
|
213
|
+
}
|
|
214
|
+
}));
|
|
215
|
+
}, [cardSelected]);
|
|
190
216
|
(0, _react.useEffect)(function () {
|
|
191
217
|
window.addEventListener('click', handleClickOutside);
|
|
192
218
|
return function () {
|
|
@@ -196,21 +222,21 @@ var PaymentCard = function PaymentCard(props) {
|
|
|
196
222
|
return /*#__PURE__*/_react.default.createElement(_styles.CardItem, {
|
|
197
223
|
onClick: handleChangeDefaultCard,
|
|
198
224
|
isCursor: true
|
|
199
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.CardItemContent, null, /*#__PURE__*/_react.default.createElement("
|
|
225
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.CardItemContent, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
226
|
+
className: "checks"
|
|
227
|
+
}, active ? /*#__PURE__*/_react.default.createElement(_IosRadioButtonOn.default, null) : /*#__PURE__*/_react.default.createElement(_IosRadioButtonOff.default, null)), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("img", {
|
|
200
228
|
src: (0, _utils.getIconCard)(card === null || card === void 0 ? void 0 : card.brand),
|
|
201
229
|
alt: card === null || card === void 0 ? void 0 : card.brand
|
|
202
|
-
})), /*#__PURE__*/_react.default.createElement("span", null, card === null || card === void 0 ? void 0 : card.
|
|
230
|
+
})), /*#__PURE__*/_react.default.createElement("span", null, "XXXX-XXXX-XXXX-", card === null || card === void 0 ? void 0 : card.last4)), /*#__PURE__*/_react.default.createElement(_styles.CardItemActions, null, /*#__PURE__*/_react.default.createElement(_styles.CardItemActionsWrapper, {
|
|
203
231
|
ref: actionWrapperRef
|
|
204
232
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
205
233
|
ref: cardActionsRef
|
|
206
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
234
|
+
}, /*#__PURE__*/_react.default.createElement(_reactBootstrapIcons.Trash, {
|
|
235
|
+
color: theme.colors.lightGray,
|
|
207
236
|
onClick: function onClick() {
|
|
208
|
-
return
|
|
237
|
+
return handleDeleteCard();
|
|
209
238
|
}
|
|
210
|
-
}))
|
|
211
|
-
className: "delete",
|
|
212
|
-
onClick: handleDeleteCard
|
|
213
|
-
}, t('DELETE', 'Delete'))))));
|
|
239
|
+
})))));
|
|
214
240
|
};
|
|
215
241
|
exports.PaymentCard = PaymentCard;
|
|
216
242
|
var PaymentOptionStripe = function PaymentOptionStripe(props) {
|
|
@@ -22,7 +22,9 @@ var CardItem = _styledComponents.default.div(_templateObject4 || (_templateObjec
|
|
|
22
22
|
return isCursor && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n cursor: pointer;\n\n &:hover {\n background-color: #F8F9FA;\n }\n "])));
|
|
23
23
|
});
|
|
24
24
|
exports.CardItem = CardItem;
|
|
25
|
-
var CardItemContent = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n > div {\n display: flex;\n align-items: center;\n margin
|
|
25
|
+
var CardItemContent = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n \n .checks svg {\n color: ", ";\n font-size: 22px;\n }\n\n > div {\n display: flex;\n align-items: center;\n margin: 0 13px 0 5px;\n ", "\n\n img {\n width: 24px;\n height: 20px;\n }\n }\n\n span {\n font-size: 14px;\n color: ", ";\n }\n"])), function (props) {
|
|
26
|
+
return props.theme.colors.primary;
|
|
27
|
+
}, function (props) {
|
|
26
28
|
var _props$theme2;
|
|
27
29
|
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-left: 13px;\n margin-right: 0;\n "])));
|
|
28
30
|
}, function (props) {
|
|
@@ -8,6 +8,7 @@ exports.PaymentOptions = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
|
|
10
10
|
var _IosRadioButtonOn = _interopRequireDefault(require("@meronex/icons/ios/IosRadioButtonOn"));
|
|
11
|
+
var _BilStripe = _interopRequireDefault(require("@meronex/icons/bi/BilStripe"));
|
|
11
12
|
var _FaCcStripe = _interopRequireDefault(require("@meronex/icons/fa/FaCcStripe"));
|
|
12
13
|
var _FaStripeS = _interopRequireDefault(require("@meronex/icons/fa/FaStripeS"));
|
|
13
14
|
var _GrStripe = _interopRequireDefault(require("@meronex/icons/gr/GrStripe"));
|
|
@@ -19,6 +20,7 @@ var _Confirm = require("../Confirm");
|
|
|
19
20
|
var _PaymentOptionCash = require("../PaymentOptionCash");
|
|
20
21
|
var _PaymentOptionStripe = require("../PaymentOptionStripe");
|
|
21
22
|
var _PaymentOptionPaypal = require("../../../../../components/PaymentOptionPaypal");
|
|
23
|
+
var _PaymentOptionCard = require("../PaymentOptionCard");
|
|
22
24
|
var _StripeElementsForm = require("../StripeElementsForm");
|
|
23
25
|
var _StripeRedirectForm = require("../StripeRedirectForm");
|
|
24
26
|
var _NotFoundSource = require("../NotFoundSource");
|
|
@@ -58,6 +60,7 @@ var stripeRedirectOptions = [{
|
|
|
58
60
|
name: 'iDEAL',
|
|
59
61
|
value: 'ideal'
|
|
60
62
|
}];
|
|
63
|
+
var cardsPaymethods = ['credomatic'];
|
|
61
64
|
var getPayIcon = function getPayIcon(method) {
|
|
62
65
|
switch (method) {
|
|
63
66
|
case 1:
|
|
@@ -97,7 +100,7 @@ var paypalBtnStyle = {
|
|
|
97
100
|
size: 'responsive'
|
|
98
101
|
};
|
|
99
102
|
var PaymentOptionsUI = function PaymentOptionsUI(props) {
|
|
100
|
-
var _list$filter, _props$beforeElements, _props$beforeComponen, _paymethodsList$error, _cart$balance, _paymethodSelected$da2, _isOpenMethod$paymeth2, _isOpenMethod$paymeth3, _isOpenMethod$paymeth4, _isOpenMethod$paymeth5, _isOpenMethod$paymeth6,
|
|
103
|
+
var _list$filter, _props$beforeElements, _props$beforeComponen, _paymethodsList$error, _cart$balance, _paymethodSelected$da2, _isOpenMethod$paymeth2, _isOpenMethod$paymeth3, _isOpenMethod$paymeth4, _isOpenMethod$paymeth5, _paymethodSelected$da3, _isOpenMethod$paymeth6, _isOpenMethod$paymeth7, _isOpenMethod$paymeth8, _isOpenMethod$paymeth9, _isOpenMethod$paymeth10, _paymethodSelected$da4, _paymethodData$card, _paymethodData$card2, _paymethodData$card3, _isOpenMethod$paymeth11, _isOpenMethod$paymeth12, _isOpenMethod$paymeth13, _isOpenMethod$paymeth14, _isOpenMethod$paymeth15, _cart$balance2, _isOpenMethod$paymeth16, _isOpenMethod$paymeth17, _isOpenMethod$paymeth18, _isOpenMethod$paymeth19, _isOpenMethod$paymeth20, _isOpenMethod$paymeth21, _isOpenMethod$paymeth22, _isOpenMethod$paymeth23, _isOpenMethod$paymeth24, _isOpenMethod$paymeth25, _isOpenMethod$paymeth26, _isOpenMethod$paymeth27, _isOpenMethod$paymeth28, _isOpenMethod$paymeth29, _isOpenMethod$paymeth30, _isOpenMethod$paymeth31, _isOpenMethod$paymeth32, _isOpenMethod$paymeth33, _isOpenMethod$paymeth34, _isOpenMethod$paymeth35, _isOpenMethod$paymeth36, _isOpenMethod$paymeth37, _props$afterComponent, _props$afterElements;
|
|
101
104
|
var cart = props.cart,
|
|
102
105
|
errorCash = props.errorCash,
|
|
103
106
|
isLoading = props.isLoading,
|
|
@@ -115,7 +118,8 @@ var PaymentOptionsUI = function PaymentOptionsUI(props) {
|
|
|
115
118
|
setCreateOrder = props.setCreateOrder,
|
|
116
119
|
onPlaceOrderClick = props.onPlaceOrderClick,
|
|
117
120
|
handlePlaceOrder = props.handlePlaceOrder,
|
|
118
|
-
paymethods = props.paymethods
|
|
121
|
+
paymethods = props.paymethods,
|
|
122
|
+
setCardList = props.setCardList;
|
|
119
123
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
120
124
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
121
125
|
t = _useLanguage2[1];
|
|
@@ -245,17 +249,34 @@ var PaymentOptionsUI = function PaymentOptionsUI(props) {
|
|
|
245
249
|
defaultValue: paymethodSelected === null || paymethodSelected === void 0 ? void 0 : (_paymethodSelected$da2 = paymethodSelected.data) === null || _paymethodSelected$da2 === void 0 ? void 0 : _paymethodSelected$da2.cash,
|
|
246
250
|
onChangeData: handlePaymethodDataChange,
|
|
247
251
|
setErrorCash: props.setErrorCash
|
|
248
|
-
}), (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth2 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth2 === void 0 ? void 0 : _isOpenMethod$paymeth2.gateway) === 'stripe'
|
|
252
|
+
}), ((isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth2 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth2 === void 0 ? void 0 : _isOpenMethod$paymeth2.gateway) === 'stripe' || (paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) === 'stripe') && /*#__PURE__*/_react.default.createElement(_PaymentOptionStripe.PaymentOptionStripe, {
|
|
253
|
+
setCardList: setCardList,
|
|
249
254
|
paymethod: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : isOpenMethod.paymethod,
|
|
250
255
|
businessId: props.businessId,
|
|
251
|
-
publicKey: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
256
|
+
publicKey: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth3 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth3 === void 0 ? void 0 : (_isOpenMethod$paymeth4 = _isOpenMethod$paymeth3.credentials) === null || _isOpenMethod$paymeth4 === void 0 ? void 0 : _isOpenMethod$paymeth4.publishable,
|
|
252
257
|
onPaymentChange: onPaymentChange,
|
|
253
|
-
payType: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
258
|
+
payType: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth5 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth5 === void 0 ? void 0 : _isOpenMethod$paymeth5.name,
|
|
254
259
|
onSelectCard: handlePaymethodDataChange,
|
|
255
260
|
onCancel: function onCancel() {
|
|
256
261
|
return handlePaymethodClick(null);
|
|
257
|
-
}
|
|
258
|
-
|
|
262
|
+
},
|
|
263
|
+
paymethodSelected: paymethodSelected === null || paymethodSelected === void 0 ? void 0 : (_paymethodSelected$da3 = paymethodSelected.data) === null || _paymethodSelected$da3 === void 0 ? void 0 : _paymethodSelected$da3.id,
|
|
264
|
+
handlePaymentMethodClick: handlePaymentMethodClick
|
|
265
|
+
}), (cardsPaymethods.includes(isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth6 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth6 === void 0 ? void 0 : _isOpenMethod$paymeth6.gateway) || cardsPaymethods.includes(paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway)) && /*#__PURE__*/_react.default.createElement(_PaymentOptionCard.PaymentOptionCard, {
|
|
266
|
+
setCardList: setCardList,
|
|
267
|
+
paymethod: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : isOpenMethod.paymethod,
|
|
268
|
+
businessId: props.businessId,
|
|
269
|
+
publicKey: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth7 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth7 === void 0 ? void 0 : (_isOpenMethod$paymeth8 = _isOpenMethod$paymeth7.credentials) === null || _isOpenMethod$paymeth8 === void 0 ? void 0 : _isOpenMethod$paymeth8.publishable,
|
|
270
|
+
gateway: (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth9 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth9 === void 0 ? void 0 : _isOpenMethod$paymeth9.gateway) || (paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway),
|
|
271
|
+
onPaymentChange: onPaymentChange,
|
|
272
|
+
payType: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth10 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth10 === void 0 ? void 0 : _isOpenMethod$paymeth10.name,
|
|
273
|
+
onSelectCard: handlePaymethodDataChange,
|
|
274
|
+
onCancel: function onCancel() {
|
|
275
|
+
return handlePaymethodClick(null);
|
|
276
|
+
},
|
|
277
|
+
paymethodSelected: paymethodSelected === null || paymethodSelected === void 0 ? void 0 : (_paymethodSelected$da4 = paymethodSelected.data) === null || _paymethodSelected$da4 === void 0 ? void 0 : _paymethodSelected$da4.id,
|
|
278
|
+
handlePaymentMethodClick: handlePaymentMethodClick
|
|
279
|
+
}), stripeOptions.includes(paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) && (paymethodData === null || paymethodData === void 0 ? void 0 : paymethodData.card) && !isCustomerMode && (paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) !== 'stripe' && /*#__PURE__*/_react.default.createElement(_styles.PayCardSelected, null, /*#__PURE__*/_react.default.createElement(_styles.CardItemContent, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
259
280
|
className: "checks"
|
|
260
281
|
}, /*#__PURE__*/_react.default.createElement(_IosRadioButtonOn.default, null)), /*#__PURE__*/_react.default.createElement("span", {
|
|
261
282
|
className: "brand"
|
|
@@ -264,15 +285,15 @@ var PaymentOptionsUI = function PaymentOptionsUI(props) {
|
|
|
264
285
|
alt: paymethodData === null || paymethodData === void 0 ? void 0 : (_paymethodData$card2 = paymethodData.card) === null || _paymethodData$card2 === void 0 ? void 0 : _paymethodData$card2.brand
|
|
265
286
|
})), /*#__PURE__*/_react.default.createElement("span", null, "XXXX-XXXX-XXXX-", paymethodData === null || paymethodData === void 0 ? void 0 : (_paymethodData$card3 = paymethodData.card) === null || _paymethodData$card3 === void 0 ? void 0 : _paymethodData$card3.last4))), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
266
287
|
className: "modal-info",
|
|
267
|
-
open: (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
288
|
+
open: (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth11 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth11 === void 0 ? void 0 : _isOpenMethod$paymeth11.gateway) === 'paypal' && !paymethodData.id,
|
|
268
289
|
onClose: function onClose() {
|
|
269
290
|
return handlePaymethodClick(null);
|
|
270
291
|
},
|
|
271
292
|
title: t('PAY_WITH_PAYPAL', 'Pay with PayPal')
|
|
272
|
-
}, (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
273
|
-
clientId: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
293
|
+
}, (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth12 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth12 === void 0 ? void 0 : _isOpenMethod$paymeth12.gateway) === 'paypal' && /*#__PURE__*/_react.default.createElement(_PaymentOptionPaypal.PaymentOptionPaypal, {
|
|
294
|
+
clientId: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth13 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth13 === void 0 ? void 0 : (_isOpenMethod$paymeth14 = _isOpenMethod$paymeth13.credentials) === null || _isOpenMethod$paymeth14 === void 0 ? void 0 : _isOpenMethod$paymeth14.client_id,
|
|
274
295
|
body: {
|
|
275
|
-
paymethod_id: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
296
|
+
paymethod_id: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth15 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth15 === void 0 ? void 0 : _isOpenMethod$paymeth15.id,
|
|
276
297
|
amount: (_cart$balance2 = cart === null || cart === void 0 ? void 0 : cart.balance) !== null && _cart$balance2 !== void 0 ? _cart$balance2 : cart.total,
|
|
277
298
|
delivery_zone_id: cart.delivery_zone_id,
|
|
278
299
|
cartUuid: cart.uuid
|
|
@@ -284,34 +305,35 @@ var PaymentOptionsUI = function PaymentOptionsUI(props) {
|
|
|
284
305
|
}
|
|
285
306
|
})), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
286
307
|
title: t('SELECT_A_CARD', 'Select a card'),
|
|
287
|
-
open: (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
308
|
+
open: (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth16 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth16 === void 0 ? void 0 : _isOpenMethod$paymeth16.gateway) === 'stripe_connect' && !paymethodData.id,
|
|
288
309
|
className: "modal-info",
|
|
289
310
|
onClose: function onClose() {
|
|
290
311
|
return handlePaymethodClick(null);
|
|
291
312
|
}
|
|
292
|
-
}, (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
313
|
+
}, (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth17 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth17 === void 0 ? void 0 : _isOpenMethod$paymeth17.gateway) === 'stripe_connect' && /*#__PURE__*/_react.default.createElement(_PaymentOptionStripe.PaymentOptionStripe, {
|
|
293
314
|
paymethod: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : isOpenMethod.paymethod,
|
|
294
315
|
businessId: props.businessId,
|
|
295
|
-
publicKey: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
296
|
-
clientSecret: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
316
|
+
publicKey: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth18 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth18 === void 0 ? void 0 : (_isOpenMethod$paymeth19 = _isOpenMethod$paymeth18.credentials) === null || _isOpenMethod$paymeth19 === void 0 ? void 0 : (_isOpenMethod$paymeth20 = _isOpenMethod$paymeth19.stripe) === null || _isOpenMethod$paymeth20 === void 0 ? void 0 : _isOpenMethod$paymeth20.publishable,
|
|
317
|
+
clientSecret: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth21 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth21 === void 0 ? void 0 : (_isOpenMethod$paymeth22 = _isOpenMethod$paymeth21.credentials) === null || _isOpenMethod$paymeth22 === void 0 ? void 0 : _isOpenMethod$paymeth22.publishable,
|
|
297
318
|
payType: paymethodsList === null || paymethodsList === void 0 ? void 0 : paymethodsList.name,
|
|
298
319
|
onSelectCard: handlePaymethodDataChange,
|
|
299
320
|
onCancel: function onCancel() {
|
|
300
321
|
return handlePaymethodClick(null);
|
|
301
|
-
}
|
|
322
|
+
},
|
|
323
|
+
paymethodSelected: paymethodSelected
|
|
302
324
|
})), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
303
325
|
title: t('ADD_CARD', 'Add card'),
|
|
304
|
-
open: (stripeDirectMethods === null || stripeDirectMethods === void 0 ? void 0 : stripeDirectMethods.includes(isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
326
|
+
open: (stripeDirectMethods === null || stripeDirectMethods === void 0 ? void 0 : stripeDirectMethods.includes(isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth23 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth23 === void 0 ? void 0 : _isOpenMethod$paymeth23.gateway)) && !paymethodData.id,
|
|
305
327
|
className: "modal-info",
|
|
306
328
|
onClose: function onClose() {
|
|
307
329
|
return handlePaymethodClick(null);
|
|
308
330
|
}
|
|
309
|
-
}, !(isOpenMethod !== null && isOpenMethod !== void 0 && (_isOpenMethod$
|
|
331
|
+
}, !(isOpenMethod !== null && isOpenMethod !== void 0 && (_isOpenMethod$paymeth24 = isOpenMethod.paymethod) !== null && _isOpenMethod$paymeth24 !== void 0 && (_isOpenMethod$paymeth25 = _isOpenMethod$paymeth24.credentials) !== null && _isOpenMethod$paymeth25 !== void 0 && _isOpenMethod$paymeth25.publishable) && /*#__PURE__*/_react.default.createElement(_styles.Container, null, /*#__PURE__*/_react.default.createElement("p", null, t('ADD_PUBLISHABLE_KEY', 'Please add a publishable key'))), (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth26 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth26 === void 0 ? void 0 : (_isOpenMethod$paymeth27 = _isOpenMethod$paymeth26.credentials) === null || _isOpenMethod$paymeth27 === void 0 ? void 0 : _isOpenMethod$paymeth27.publishable) && (stripeDirectMethods === null || stripeDirectMethods === void 0 ? void 0 : stripeDirectMethods.includes(isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth28 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth28 === void 0 ? void 0 : _isOpenMethod$paymeth28.gateway)) && /*#__PURE__*/_react.default.createElement(_StripeElementsForm.StripeElementsForm, {
|
|
310
332
|
methodsPay: methodsPay,
|
|
311
|
-
paymethod: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
333
|
+
paymethod: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth29 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth29 === void 0 ? void 0 : _isOpenMethod$paymeth29.gateway,
|
|
312
334
|
businessId: props.businessId,
|
|
313
335
|
cart: cart,
|
|
314
|
-
publicKey: (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
336
|
+
publicKey: (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth30 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth30 === void 0 ? void 0 : (_isOpenMethod$paymeth31 = _isOpenMethod$paymeth30.credentials) === null || _isOpenMethod$paymeth31 === void 0 ? void 0 : _isOpenMethod$paymeth31.publishable) || (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth32 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth32 === void 0 ? void 0 : (_isOpenMethod$paymeth33 = _isOpenMethod$paymeth32.credentials) === null || _isOpenMethod$paymeth33 === void 0 ? void 0 : _isOpenMethod$paymeth33.publishable_key),
|
|
315
337
|
handleSource: handlePaymethodDataChange,
|
|
316
338
|
onCancel: function onCancel() {
|
|
317
339
|
return handlePaymethodClick(null);
|
|
@@ -319,7 +341,7 @@ var PaymentOptionsUI = function PaymentOptionsUI(props) {
|
|
|
319
341
|
handlePlaceOrder: handlePlaceOrder
|
|
320
342
|
})), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
321
343
|
title: t('STRIPE_REDIRECT', 'Stripe Redirect'),
|
|
322
|
-
open: (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
344
|
+
open: (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth34 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth34 === void 0 ? void 0 : _isOpenMethod$paymeth34.gateway) === 'stripe_redirect' && !paymethodData.type,
|
|
323
345
|
className: "modal-info",
|
|
324
346
|
onClose: function onClose() {
|
|
325
347
|
return handlePaymethodClick(null);
|
|
@@ -331,16 +353,16 @@ var PaymentOptionsUI = function PaymentOptionsUI(props) {
|
|
|
331
353
|
handleStripeRedirect: handlePaymethodDataChange
|
|
332
354
|
})), /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
333
355
|
title: t('SQUARE', 'Square'),
|
|
334
|
-
open: (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
356
|
+
open: (isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth35 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth35 === void 0 ? void 0 : _isOpenMethod$paymeth35.gateway) === 'square' && !paymethodData.token,
|
|
335
357
|
onClose: function onClose() {
|
|
336
358
|
return handlePaymethodClick(null);
|
|
337
359
|
}
|
|
338
360
|
}, /*#__PURE__*/_react.default.createElement(_PaymentOptionSquare.PaymentOptionSquare, {
|
|
339
361
|
businessId: props.businessId,
|
|
340
362
|
cartTotal: cart === null || cart === void 0 ? void 0 : cart.total,
|
|
341
|
-
data: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
363
|
+
data: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth36 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth36 === void 0 ? void 0 : _isOpenMethod$paymeth36.credentials,
|
|
342
364
|
body: {
|
|
343
|
-
paymethod_id: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$
|
|
365
|
+
paymethod_id: isOpenMethod === null || isOpenMethod === void 0 ? void 0 : (_isOpenMethod$paymeth37 = isOpenMethod.paymethod) === null || _isOpenMethod$paymeth37 === void 0 ? void 0 : _isOpenMethod$paymeth37.id,
|
|
344
366
|
amount: cart.total,
|
|
345
367
|
delivery_zone_id: cart.delivery_zone_id,
|
|
346
368
|
cartUuid: cart.uuid
|
|
@@ -157,7 +157,7 @@ var RenderProductsLayout = function RenderProductsLayout(props) {
|
|
|
157
157
|
actualSlug: businessState === null || businessState === void 0 ? void 0 : (_businessState$busine2 = businessState.business) === null || _businessState$busine2 === void 0 ? void 0 : _businessState$busine2.slug
|
|
158
158
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
159
159
|
className: "bp-list"
|
|
160
|
-
}, !
|
|
160
|
+
}, !useKioskApp && /*#__PURE__*/_react.default.createElement(BusinessBasicInformationComponent, _extends({}, props, {
|
|
161
161
|
businessState: businessState,
|
|
162
162
|
setOpenBusinessInformation: setOpenBusinessInformation,
|
|
163
163
|
openBusinessInformation: openBusinessInformation,
|
|
@@ -10,7 +10,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
10
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: fixed;\n left: 0px;\n top: 0px;\n width: 100vw;\n height: 100vh;\n z-index:
|
|
13
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: fixed;\n left: 0px;\n top: 0px;\n width: 100vw;\n height: 100vh;\n z-index: 10002;\n"])));
|
|
14
14
|
exports.Container = Container;
|
|
15
15
|
var BackDropContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: rgba(0,0,0,0.3);\n position: absolute;\n top: 0px;\n left: 0px;\n height: 100%;\n width: 100%;\n z-index: -1;\n"])));
|
|
16
16
|
exports.BackDropContainer = BackDropContainer;
|
|
@@ -181,7 +181,7 @@ var UserDetailsUI = function UserDetailsUI(props) {
|
|
|
181
181
|
}
|
|
182
182
|
}))), !isEdit ? /*#__PURE__*/_react.default.createElement(_styles.UserData, null, ((userData === null || userData === void 0 ? void 0 : userData.name) || (userData === null || userData === void 0 ? void 0 : userData.middle_name) || (userData === null || userData === void 0 ? void 0 : userData.lastname) || (userData === null || userData === void 0 ? void 0 : userData.second_lastname)) && /*#__PURE__*/_react.default.createElement(_styles.UserName, null, userData === null || userData === void 0 ? void 0 : userData.name, " ", userData === null || userData === void 0 ? void 0 : userData.middle_name, " ", userData === null || userData === void 0 ? void 0 : userData.lastname, " ", userData === null || userData === void 0 ? void 0 : userData.second_lastname), (userData === null || userData === void 0 ? void 0 : userData.email) && /*#__PURE__*/_react.default.createElement("p", null, userData === null || userData === void 0 ? void 0 : userData.email), ((userData === null || userData === void 0 ? void 0 : userData.cellphone) || (user === null || user === void 0 ? void 0 : user.cellphone)) && /*#__PURE__*/_react.default.createElement(_styles.PhoneContainer, null, /*#__PURE__*/_react.default.createElement(_styles.CountryFlag, null, (userData === null || userData === void 0 ? void 0 : userData.country_phone_code) && /*#__PURE__*/_react.default.createElement(_reactPhoneNumberInput.default, {
|
|
183
183
|
onChange: function onChange() {},
|
|
184
|
-
defaultCountry: (_parsePhoneNumber = (0, _libphonenumberJs.parsePhoneNumber)("+".concat(userData === null || userData === void 0 ? void 0 : (_userData$country_pho = userData.country_phone_code) === null || _userData$country_pho === void 0 ? void 0 : _userData$country_pho.replace('+', ''), " ").concat(userData === null || userData === void 0 ? void 0 : userData.cellphone))) === null || _parsePhoneNumber === void 0 ? void 0 : _parsePhoneNumber.country
|
|
184
|
+
defaultCountry: (_parsePhoneNumber = (0, _libphonenumberJs.parsePhoneNumber)("+".concat(userData === null || userData === void 0 ? void 0 : (_userData$country_pho = userData.country_phone_code) === null || _userData$country_pho === void 0 ? void 0 : _userData$country_pho.replace('+', ''), " ").concat(userData === null || userData === void 0 ? void 0 : userData.cellphone.replace("+".concat(userData === null || userData === void 0 ? void 0 : userData.country_phone_code), '')))) === null || _parsePhoneNumber === void 0 ? void 0 : _parsePhoneNumber.country
|
|
185
185
|
})), /*#__PURE__*/_react.default.createElement("p", null, userData === null || userData === void 0 ? void 0 : userData.cellphone))) : /*#__PURE__*/_react.default.createElement(_styles.SideForm, null, /*#__PURE__*/_react.default.createElement(_UserFormDetails.UserFormDetailsUI, _extends({}, props, {
|
|
186
186
|
userData: userData,
|
|
187
187
|
isCustomerMode: isCustomerMode,
|
|
@@ -24,7 +24,7 @@ var HeaderItem = _styledComponents.default.div(_templateObject || (_templateObje
|
|
|
24
24
|
return props.isChew ? props.theme.colors.backgroundPage : props.theme.colors.darkTextColor;
|
|
25
25
|
});
|
|
26
26
|
exports.HeaderItem = HeaderItem;
|
|
27
|
-
var PopoverBody = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: #FFF;\n color: #333;\n padding: 20px 15px;\n border-radius: 10px;\n max-width: 500px;\n min-width: 300px !important;\n z-index:
|
|
27
|
+
var PopoverBody = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: #FFF;\n color: #333;\n padding: 20px 15px;\n border-radius: 10px;\n max-width: 500px;\n min-width: 300px !important;\n z-index: 10002;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 24px;\n"])));
|
|
28
28
|
exports.PopoverBody = PopoverBody;
|
|
29
29
|
var PopoverList = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
|
|
30
30
|
exports.PopoverList = PopoverList;
|
|
@@ -28,7 +28,8 @@ var Select = function Select(props) {
|
|
|
28
28
|
notReload = props.notReload,
|
|
29
29
|
CustomArrow = props.CustomArrow,
|
|
30
30
|
isHomeStyle = props.isHomeStyle,
|
|
31
|
-
disableOneOption = props.disableOneOption
|
|
31
|
+
disableOneOption = props.disableOneOption,
|
|
32
|
+
zIndex = props.zIndex;
|
|
32
33
|
var isHome = window.location.pathname === '/' || window.location.pathname === '/home' || isHomeStyle;
|
|
33
34
|
var _useState = (0, _react.useState)(false),
|
|
34
35
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -106,7 +107,8 @@ var Select = function Select(props) {
|
|
|
106
107
|
id: "list",
|
|
107
108
|
position: "right",
|
|
108
109
|
ref: dropdownReference,
|
|
109
|
-
isHome: isHome
|
|
110
|
+
isHome: isHome,
|
|
111
|
+
zIndex: zIndex
|
|
110
112
|
}, options.map(function (option, i) {
|
|
111
113
|
return /*#__PURE__*/_react.default.createElement(_Selects.Option, {
|
|
112
114
|
id: "item",
|
|
@@ -21,14 +21,17 @@ var Option = _styledComponents.default.div(_templateObject || (_templateObject =
|
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
exports.Option = Option;
|
|
24
|
-
var Options = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n background-color: #CCC;\n margin-top: 7px;\n z-index:
|
|
25
|
-
var
|
|
24
|
+
var Options = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n background-color: #CCC;\n margin-top: 7px;\n z-index: ", ";\n border-width: 1px;\n border-style: solid;\n border-color: #CCC;\n border-radius: 15px;\n overflow: hidden;\n\n ", "\n ", "\n"])), function (_ref2) {
|
|
25
|
+
var zIndex = _ref2.zIndex;
|
|
26
|
+
return zIndex || 10002;
|
|
27
|
+
}, function (_ref3) {
|
|
28
|
+
var position = _ref3.position;
|
|
26
29
|
return (position === null || position === void 0 ? void 0 : position.toLowerCase()) === 'left' && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n left: 0;\n margin-left: -1px;\n ", "\n "])), function (props) {
|
|
27
30
|
var _props$theme2;
|
|
28
31
|
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: -1px;\n margin-left: 0px;\n right: 0;\n left: initial\n "])));
|
|
29
32
|
});
|
|
30
|
-
}, function (
|
|
31
|
-
var position =
|
|
33
|
+
}, function (_ref4) {
|
|
34
|
+
var position = _ref4.position;
|
|
32
35
|
return (position === null || position === void 0 ? void 0 : position.toLowerCase()) === 'right' && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n right: 0;\n margin-right: -1px;\n ", "\n "])), function (props) {
|
|
33
36
|
var _props$theme3;
|
|
34
37
|
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-left: -1px;\n margin-right: 0px;\n left: 0;\n right: initial;\n "])));
|