ordering-ui-external 2.6.5 → 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.
Files changed (97) hide show
  1. package/_bundles/0.ordering-ui.ba64d5c9c7490676feb5.js +1 -0
  2. package/_bundles/{5.ordering-ui.80bc71775c11b08c37b2.js → 5.ordering-ui.ba64d5c9c7490676feb5.js} +1 -1
  3. package/_bundles/{7.ordering-ui.80bc71775c11b08c37b2.js → 7.ordering-ui.ba64d5c9c7490676feb5.js} +2 -2
  4. package/_bundles/ordering-ui.ba64d5c9c7490676feb5.js +2 -0
  5. package/_modules/components/LanguageSelector/index.js +1 -0
  6. package/_modules/components/OrderTypeSelectorHeader/index.js +3 -1
  7. package/_modules/components/SmartAppBanner/index.js +5 -2
  8. package/_modules/contexts/ThemeContext/index.js +1 -1
  9. package/_modules/styles/Select/index.js +14 -2
  10. package/_modules/styles/Selects/index.js +11 -8
  11. package/_modules/themes/callcenterOriginal/src/components/Orders/OrderMetaFields/index.js +1 -1
  12. package/_modules/themes/eight/src/components/AddressForm/index.js +4 -1
  13. package/_modules/themes/eight/src/components/SingleProductCard/index.js +1 -1
  14. package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +168 -0
  15. package/_modules/themes/five/src/components/BusinessBasicInformation/SearchComponent.js +39 -0
  16. package/_modules/themes/five/src/components/BusinessBasicInformation/SocialNetWork.js +19 -0
  17. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +35 -156
  18. package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +45 -35
  19. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +1 -1
  20. package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +1 -1
  21. package/_modules/themes/five/src/components/CardForm/index.js +16 -3
  22. package/_modules/themes/five/src/components/CardForm/styles.js +13 -9
  23. package/_modules/themes/five/src/components/CardFormCustom/cardUtils.js +102 -0
  24. package/_modules/themes/five/src/components/CardFormCustom/index.js +148 -0
  25. package/_modules/themes/five/src/components/CardFormCustom/styles.js +16 -0
  26. package/_modules/themes/five/src/components/CartPopover/styles.js +1 -1
  27. package/_modules/themes/five/src/components/Checkout/index.js +31 -22
  28. package/_modules/themes/five/src/components/LanguageSelector/index.js +4 -1
  29. package/_modules/themes/five/src/components/LoginForm/index.js +11 -8
  30. package/_modules/themes/five/src/components/Modal/styles.js +1 -1
  31. package/_modules/themes/five/src/components/OrderContextUI/index.js +13 -1
  32. package/_modules/themes/five/src/components/OrderDetails/OrderHistory.js +7 -3
  33. package/_modules/themes/five/src/components/OrderDetails/index.js +4 -2
  34. package/_modules/themes/five/src/components/PaymentOptionCard/index.js +84 -0
  35. package/_modules/themes/five/src/components/PaymentOptionStripe/index.js +48 -22
  36. package/_modules/themes/five/src/components/PaymentOptionStripe/styles.js +3 -1
  37. package/_modules/themes/five/src/components/PaymentOptions/index.js +46 -24
  38. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +1 -1
  39. package/_modules/themes/five/src/components/SearchProducts/styles.js +1 -1
  40. package/_modules/themes/five/src/components/UserDetails/index.js +1 -1
  41. package/_modules/themes/five/src/components/UserPopover/styles.js +1 -1
  42. package/_modules/themes/five/src/styles/Select/index.js +4 -2
  43. package/_modules/themes/five/src/styles/Selects/index.js +7 -4
  44. package/_modules/themes/four/src/components/LoginForm/index.js +1 -1
  45. package/_modules/themes/pwa/src/components/MomentPopover/styles.js +1 -1
  46. package/_modules/themes/seven/src/components/ProductForm/productForm.js +3 -1
  47. package/_modules/themes/six/src/components/BusinessesListing/index.js +1 -1
  48. package/index.html +1 -1
  49. package/package.json +4 -2
  50. package/src/components/LanguageSelector/index.js +1 -0
  51. package/src/components/OrderTypeSelectorHeader/index.js +3 -1
  52. package/src/components/SmartAppBanner/index.js +4 -2
  53. package/src/contexts/ThemeContext/index.js +1 -1
  54. package/src/styles/Select/index.js +11 -2
  55. package/src/styles/Selects/index.js +1 -1
  56. package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +230 -0
  57. package/src/themes/five/src/components/BusinessBasicInformation/SearchComponent.js +40 -0
  58. package/src/themes/five/src/components/BusinessBasicInformation/SocialNetWork.js +10 -0
  59. package/src/themes/five/src/components/BusinessBasicInformation/index.js +39 -247
  60. package/src/themes/five/src/components/BusinessBasicInformation/styles.js +14 -4
  61. package/src/themes/five/src/components/BusinessProductsCategories/index.js +1 -1
  62. package/src/themes/five/src/components/CardForm/index.js +25 -4
  63. package/src/themes/five/src/components/CardForm/styles.js +35 -0
  64. package/src/themes/five/src/components/CardFormCustom/cardUtils.js +111 -0
  65. package/src/themes/five/src/components/CardFormCustom/index.js +161 -0
  66. package/src/themes/five/src/components/CardFormCustom/styles.js +20 -0
  67. package/src/themes/five/src/components/CartPopover/styles.js +1 -1
  68. package/src/themes/five/src/components/Checkout/index.js +34 -25
  69. package/src/themes/five/src/components/LanguageSelector/index.js +2 -1
  70. package/src/themes/five/src/components/LoginForm/index.js +6 -4
  71. package/src/themes/five/src/components/Modal/styles.js +1 -0
  72. package/src/themes/five/src/components/OrderContextUI/index.js +10 -3
  73. package/src/themes/five/src/components/OrderDetails/OrderHistory.js +4 -3
  74. package/src/themes/five/src/components/OrderDetails/index.js +1 -1
  75. package/src/themes/five/src/components/PaymentOptionCard/index.js +70 -0
  76. package/src/themes/five/src/components/PaymentOptionStripe/index.js +46 -20
  77. package/src/themes/five/src/components/PaymentOptionStripe/styles.js +6 -1
  78. package/src/themes/five/src/components/PaymentOptions/index.js +28 -3
  79. package/src/themes/five/src/components/ProductForm/index.js +0 -1
  80. package/src/themes/five/src/components/RenderProductsLayout/index.js +1 -1
  81. package/src/themes/five/src/components/SearchProducts/styles.js +1 -1
  82. package/src/themes/five/src/components/UserDetails/index.js +1 -1
  83. package/src/themes/five/src/components/UserPopover/styles.js +1 -1
  84. package/src/themes/five/src/styles/Select/index.js +3 -2
  85. package/src/themes/five/src/styles/Selects/index.js +1 -1
  86. package/src/themes/pwa/src/components/MomentPopover/styles.js +4 -1
  87. package/template/theme.json +3 -1
  88. package/_bundles/0.ordering-ui.80bc71775c11b08c37b2.js +0 -1
  89. package/_bundles/ordering-ui.80bc71775c11b08c37b2.js +0 -2
  90. /package/_bundles/{1.ordering-ui.80bc71775c11b08c37b2.js → 1.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
  91. /package/_bundles/{2.ordering-ui.80bc71775c11b08c37b2.js → 2.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
  92. /package/_bundles/{4.ordering-ui.80bc71775c11b08c37b2.js → 4.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
  93. /package/_bundles/{6.ordering-ui.80bc71775c11b08c37b2.js → 6.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
  94. /package/_bundles/{7.ordering-ui.80bc71775c11b08c37b2.js.LICENSE.txt → 7.ordering-ui.ba64d5c9c7490676feb5.js.LICENSE.txt} +0 -0
  95. /package/_bundles/{8.ordering-ui.80bc71775c11b08c37b2.js → 8.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
  96. /package/_bundles/{9.ordering-ui.80bc71775c11b08c37b2.js → 9.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
  97. /package/_bundles/{ordering-ui.80bc71775c11b08c37b2.js.LICENSE.txt → ordering-ui.ba64d5c9c7490676feb5.js.LICENSE.txt} +0 -0
@@ -45,7 +45,7 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
45
45
  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); }
46
46
  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; }
47
47
  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; } }
48
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
48
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import { Tabs, Tab } from '../../styles/Tabs'
49
49
  var LoginFormUI = function LoginFormUI(props) {
50
50
  var _props$beforeElements, _props$beforeComponen, _theme$images, _theme$images$general, _theme$images2, _theme$images2$logos, _theme$defaultLanguag, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _theme$defaultLanguag2, _configs$facebook_log, _configs$facebook_log2, _configs$facebook_id, _configs$facebook_id2, _configs$apple_login_, _configs$twilio_servi, _configs$twilio_servi2, _theme$defaultLanguag3, _props$afterComponent, _props$afterElements;
51
51
  var useLoginByEmail = props.useLoginByEmail,
@@ -17,7 +17,7 @@ var HeaderItem = _styledComponents.default.div(_templateObject || (_templateObje
17
17
  return isBanner && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: #F8F9FA;\n border-radius: 7.6px;\n padding: 4px 8px;\n "])));
18
18
  });
19
19
  exports.HeaderItem = HeaderItem;
20
- var PopoverBody = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: #FFF;\n color: #333;\n padding: 15px;\n padding-top: 30px;\n border-radius: 10px;\n max-width: 500px;\n z-index: 1001;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 24px;\n #moment_control h1{\n margin-bottom: 30px;\n }\n"])));
20
+ var PopoverBody = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: #FFF;\n color: #333;\n padding: 15px;\n padding-top: 30px;\n border-radius: 10px;\n max-width: 500px;\n z-index: 10002;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 24px;\n #moment_control h1{\n margin-bottom: 30px;\n }\n @media (min-width: 576px) {\n z-index: 1001;\n }\n"])));
21
21
  exports.PopoverBody = PopoverBody;
22
22
  var PopoverArrow = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 0; \n height: 0; \n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 8px solid #FFF;\n top: -8px;\n"])));
23
23
  exports.PopoverArrow = PopoverArrow;
@@ -29,7 +29,9 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
29
29
  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); }
30
30
  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; }
31
31
  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; } }
32
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
32
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import { useOrder } from '../../contexts/OrderContext'
33
+ // import { useConfig } from '../../contexts/ConfigContext'
34
+ // import { useApi } from '../../contexts/ApiContext'
33
35
  var ProductForm = function ProductForm(props) {
34
36
  var _props$productCart, _orderState$carts, _cart$products, _cart$products2, _product$product, _product$product2, _product$product3, _product$product4;
35
37
  var UIComponent = props.UIComponent,
@@ -40,7 +40,7 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
40
40
  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); }
41
41
  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; }
42
42
  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; } }
43
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
43
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import { BusinessTypeFilter } from '../../../../../components/BusinessTypeFilter'
44
44
  var PIXELS_TO_SCROLL = 500;
45
45
  var BusinessesListingUI = function BusinessesListingUI(props) {
46
46
  var _businessesList$busin, _props$beforeElements, _props$beforeComponen, _businessesList$busin2, _configs$google_maps_, _businessesList$busin3, _orderState$options4, _orderState$options4$, _getCustomArray, _businessesList$busin4, _orderState$options5, _props$afterComponent, _props$afterElements;
package/index.html CHANGED
@@ -13,7 +13,7 @@
13
13
  <style type="text/css" id="styles"></style>
14
14
  <style>
15
15
  .pac-container {
16
- z-index: 10000 !important;
16
+ z-index: 100000 !important;
17
17
  }
18
18
  .smartbanner-show.smartbanner-margin-top{margin-top:80px}.smartbanner-show.smartbanner-margin-bottom{margin-bottom:80px}.smartbanner-show .smartbanner{display:block}.smartbanner{left:0;display:none;width:100%;height:80px;line-height:80px;font-family:Helvetica Neue,sans-serif;background:#f4f4f4;z-index:9998;-webkit-font-smoothing:antialiased;overflow:hidden;-webkit-text-size-adjust:none}.smartbanner-top{position:absolute;top:0}.smartbanner-bottom{position:fixed;bottom:0}.smartbanner-container{margin:0 auto;padding:0 5px}.smartbanner-close{display:inline-block;vertical-align:middle;margin:0 5px 0 0;font-family:ArialRoundedMTBold,Arial;font-size:20px;text-align:center;color:#888;text-decoration:none;border:0;border-radius:14px;padding:0 0 1px;background-color:transparent;-webkit-font-smoothing:subpixel-antialiased}.smartbanner-close:active,.smartbanner-close:hover{color:#aaa}.smartbanner-icon{width:57px;height:57px;margin-right:12px;background-size:cover;border-radius:10px}.smartbanner-icon,.smartbanner-info{display:inline-block;vertical-align:middle}.smartbanner-info{white-space:normal;width:calc(99% - 201px);font-size:11px;line-height:1.2em;font-weight:700}.smartbanner-wrapper{max-width:110px;display:inline-block;text-align:right;width:100%}.smartbanner-title{font-size:13px;line-height:18px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.smartbanner-description{max-height:40px;overflow:hidden}.smartbanner-author{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.smartbanner-author:empty+.smartbanner-description{max-height:50px}.smartbanner-button{margin:auto 0;height:24px;font-size:14px;line-height:24px;text-align:center;font-weight:700;color:#6a6a6a;text-transform:uppercase;text-decoration:none;display:inline-block;text-shadow:0 1px 0 hsla(0,0%,100%,.8)}.smartbanner-button:active,.smartbanner-button:hover{color:#aaa}.smartbanner-ios{background:#f2f2f2;box-shadow:0 1px 1px rgba(0,0,0,.2);line-height:80px}.smartbanner-ios .smartbanner-close{border:0;width:18px;height:18px;line-height:18px;font-family:Arial;color:#888;text-shadow:0 1px 0 #fff;-webkit-font-smoothing:none}.smartbanner-ios .smartbanner-close:active,.smartbanner-ios .smartbanner-close:hover{color:#888}.smartbanner-ios .smartbanner-icon{background-size:cover}.smartbanner-ios .smartbanner-info{color:#6a6a6a;text-shadow:0 1px 0 hsla(0,0%,100%,.8);font-weight:300}.smartbanner-ios .smartbanner-title{color:#4d4d4d;font-weight:500}.smartbanner-ios .smartbanner-button{padding:0 10px;font-size:15px;min-width:10%;font-weight:400;color:#0c71fd}.smartbanner-ios .smartbanner-button:active,.smartbanner-ios .smartbanner-button:hover{background:#f2f2f2}.smartbanner-android{background:#3d3d3d url("data:image/gif;base64,R0lGODlhCAAIAIABAFVVVf///yH5BAEHAAEALAAAAAAIAAgAAAINRG4XudroGJBRsYcxKAA7");box-shadow:inset 0 4px 0 #88b131;line-height:82px}.smartbanner-android .smartbanner-close{border:0;max-width:17px;width:100%;height:17px;line-height:17px;margin-right:7px;color:#b1b1b3;background:#1c1e21;text-shadow:0 1px 1px #000;text-decoration:none;box-shadow:inset 0 1px 2px rgba(0,0,0,.8),0 1px 1px hsla(0,0%,100%,.3);cursor:pointer}.smartbanner-android .smartbanner-close:active,.smartbanner-android .smartbanner-close:hover{color:#eee}.smartbanner-android .smartbanner-icon{background-color:transparent;box-shadow:none}.smartbanner-android .smartbanner-info{color:#ccc;text-shadow:0 1px 2px #000}.smartbanner-android .smartbanner-title{color:#fff;font-weight:700}.smartbanner-android .smartbanner-button{min-width:12%;color:#d1d1d1;font-weight:700;padding:0;background:none;border-radius:0;box-shadow:0 0 0 1px #333,0 0 0 2px #dddcdc}.smartbanner-android .smartbanner-button:active,.smartbanner-android .smartbanner-button:hover{background:none}.smartbanner-android .smartbanner-button-text{text-align:center;display:block;padding:0 10px;background:#42b6c9;background:linear-gradient(180deg,#42b6c9,#39a9bb);text-transform:none;text-shadow:none;box-shadow:none}.smartbanner-android .smartbanner-button-text:active,.smartbanner-android .smartbanner-button-text:hover{background:#2ac7e1}.smartbanner-kindle,.smartbanner-windows{background:#f4f4f4;background:linear-gradient(180deg,#f4f4f4,#cdcdcd);box-shadow:0 1px 2px rgba(0,0,0,.5);line-height:80px}.smartbanner-kindle .smartbanner-close,.smartbanner-windows .smartbanner-close{border:0;width:18px;height:18px;line-height:18px;color:#888;text-shadow:0 1px 0 #fff}.smartbanner-kindle .smartbanner-close:active,.smartbanner-kindle .smartbanner-close:hover,.smartbanner-windows .smartbanner-close:active,.smartbanner-windows .smartbanner-close:hover{color:#aaa}.smartbanner-kindle .smartbanner-icon,.smartbanner-windows .smartbanner-icon{background:rgba(0,0,0,.6);background-size:cover;box-shadow:0 1px 3px rgba(0,0,0,.3)}.smartbanner-kindle .smartbanner-info,.smartbanner-windows .smartbanner-info{color:#6a6a6a;text-shadow:0 1px 0 hsla(0,0%,100%,.8)}.smartbanner-kindle .smartbanner-title,.smartbanner-windows .smartbanner-title{color:#4d4d4d;font-weight:700}.smartbanner-kindle .smartbanner-button,.smartbanner-windows .smartbanner-button{padding:0 10px;min-width:10%;color:#6a6a6a;background:#efefef;background:linear-gradient(180deg,#efefef,#dcdcdc);border-radius:3px;box-shadow:inset 0 0 0 1px #bfbfbf,0 1px 0 hsla(0,0%,100%,.6),inset 0 2px 0 hsla(0,0%,100%,.7)}.smartbanner-kindle .smartbanner-button:active,.smartbanner-kindle .smartbanner-button:hover,.smartbanner-windows .smartbanner-button:active,.smartbanner-windows .smartbanner-button:hover{background:#dcdcdc;background:linear-gradient(180deg,#dcdcdc,#efefef)}
19
19
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "2.6.5",
3
+ "version": "2.6.8",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -87,10 +87,12 @@
87
87
  "lodash": "^4.17.19",
88
88
  "moment": "^2.29.4",
89
89
  "nanoid": "^4.0.0",
90
- "ordering-components-external": "2.7.3",
90
+ "ordering-components-external": "2.7.5",
91
+ "payment": "^2.4.6",
91
92
  "polished": "^3.6.6",
92
93
  "react-bootstrap-icons": "^1.7.2",
93
94
  "react-calendar": "^3.3.1",
95
+ "react-credit-cards-2": "^0.10.0",
94
96
  "react-datepicker": "^4.1.1",
95
97
  "react-helmet": "^6.1.0",
96
98
  "react-hook-form": "^6.8.1",
@@ -22,6 +22,7 @@ const LanguageSelectorUI = (props) => {
22
22
  return (
23
23
  _languages && _languages.length > 1 ? (
24
24
  <Select
25
+ zIndex={10002}
25
26
  options={languagesState?.loading ? defaultLanguages : _languages}
26
27
  defaultValue={languagesState?.loading ? defaultCurrentLanguage : currentLanguage}
27
28
  onChange={(languageId) => handleChangeLanguage(languageId)}
@@ -14,7 +14,8 @@ const OrderTypeSelectorHeaderUI = (props) => {
14
14
  typeSelected,
15
15
  defaultValue,
16
16
  configTypes,
17
- orderTypes
17
+ orderTypes,
18
+ autoCloseWhenScroll
18
19
  } = props
19
20
 
20
21
  const defaultType = configTypes?.includes(typeSelected) ? null : configTypes?.[0]
@@ -22,6 +23,7 @@ const OrderTypeSelectorHeaderUI = (props) => {
22
23
  return (
23
24
  <OrderTypeWrapper>
24
25
  <Select
26
+ autoCloseWhenScroll={autoCloseWhenScroll}
25
27
  options={configTypes
26
28
  ? orderTypes.filter(type => configTypes?.includes(type.value))
27
29
  : orderTypes
@@ -1,15 +1,17 @@
1
1
  import React from 'react'
2
2
  import { useLanguage, SmartAppBanner as SmartAppBannerController } from 'ordering-components-external'
3
3
  import SmartBanner from 'react-smartbanner'
4
+ import { useTheme } from 'styled-components'
4
5
 
5
6
  const SmartAppBanneUI = (props) => {
6
7
  const [, t] = useLanguage()
8
+ const theme = useTheme()
7
9
 
8
10
  return (
9
11
  <>
10
12
  <SmartBanner
11
- title={t('MOBILE_APPNAME', 'Ordering app')}
12
- author={t('MOBILE_APPNAME_AUTHOR', 'Ordering, Inc.')}
13
+ title={t('MOBILE_APPNAME', theme?.defaultLanguages?.MOBILE_APPNAME || 'Ordering app')}
14
+ author={t('MOBILE_APPNAME_AUTHOR', theme?.defaultLanguages?.MOBILE_APPNAME_AUTHOR || 'Ordering, Inc.')}
13
15
  daysHidden={7}
14
16
  daysReminder={15}
15
17
  button={t('VIEW', 'View')}
@@ -82,7 +82,7 @@ export const ThemeProvider = ({ children, ...props }) => {
82
82
  bottom: 0;
83
83
  left: 0;
84
84
  right: 0;
85
- z-index: 2000;
85
+ z-index: 20002;
86
86
  }
87
87
  .popup-component {
88
88
  background-color: rgba(0, 0, 0, 0.3);
@@ -18,7 +18,9 @@ export const Select = (props) => {
18
18
  defaultValue,
19
19
  onChange,
20
20
  notAsync,
21
- notReload
21
+ notReload,
22
+ autoCloseWhenScroll,
23
+ zIndex
22
24
  } = props
23
25
 
24
26
  const isHome = window.location.pathname === '/' || window.location.pathname === '/home'
@@ -49,9 +51,16 @@ export const Select = (props) => {
49
51
  }
50
52
 
51
53
  useEffect(() => {
54
+ const handleCloseSelect = () => setOpen(false)
52
55
  document.addEventListener('mouseup', closeSelect)
53
56
  document.addEventListener('keydown', handleKeyDown)
57
+ if (autoCloseWhenScroll) {
58
+ window.addEventListener('scroll', handleCloseSelect)
59
+ }
54
60
  return () => {
61
+ if (autoCloseWhenScroll) {
62
+ window.removeEventListener('scroll', handleCloseSelect)
63
+ }
55
64
  document.removeEventListener('mouseup', closeSelect)
56
65
  document.removeEventListener('keydown', handleKeyDown)
57
66
  }
@@ -100,7 +109,7 @@ export const Select = (props) => {
100
109
  </Selected>
101
110
  )}
102
111
  {open && options && (
103
- <Options id='list' position='right' ref={dropdownReference}>
112
+ <Options id='list' position='right' ref={dropdownReference} zIndex={zIndex}>
104
113
  {
105
114
  options.map(option => (
106
115
  <Option
@@ -37,7 +37,7 @@ export const Options = styled.div`
37
37
  position: absolute;
38
38
  background-color: #CCC;
39
39
  margin-top: 7px;
40
- z-index: 10000;
40
+ z-index: ${({ zIndex }) => zIndex || 10000};
41
41
  border-width: 1px;
42
42
  border-style: solid;
43
43
  border-color: #CCC;
@@ -0,0 +1,230 @@
1
+ import React from 'react'
2
+ import { BusinessDetail, BusinessInfo, BusinessInfoContainer, BusinessInfoContent, BusinessInfoItem, IconWrapper, RibbonBox, SocialList, TitleWrapper } from './styles'
3
+ import Skeleton from 'react-loading-skeleton'
4
+ import { convertHoursToMinutes, lightenDarkenColor, shape } from '../../../../../utils'
5
+ import { useWindowSize } from '../../../../../hooks/useWindowSize'
6
+ import { useTheme } from 'styled-components'
7
+ import { SocialNetWork } from './SocialNetWork'
8
+ import { StarFill, Facebook, Tiktok, Pinterest, Whatsapp, Instagram, Snapchat } from 'react-bootstrap-icons'
9
+ import { useConfig, useLanguage, useOrder, useUtils } from 'ordering-components-external'
10
+ import { SearchComponent } from './SearchComponent'
11
+
12
+ export const BusinessInfoComponent = (props) => {
13
+ const {
14
+ isChew,
15
+ loading,
16
+ business,
17
+ isInfoShrunken,
18
+ isCustomerMode,
19
+ setIsPreOrder,
20
+ setIsBusinessReviews,
21
+ categoryState,
22
+ searchValue,
23
+ errorQuantityProducts,
24
+ setOpenSearchProducts,
25
+ handleChangeSortBy,
26
+ sortByValue,
27
+ sortByOptions,
28
+ isCustomLayout
29
+ } = props
30
+ const theme = useTheme()
31
+ const [orderState] = useOrder()
32
+ const [{ parsePrice, parseDistance }] = useUtils()
33
+ const [{ configs }] = useConfig()
34
+ const [, t] = useLanguage()
35
+ const windowSize = useWindowSize()
36
+ const hideDeliveryFee = theme?.business_view?.components?.header?.components?.business?.components?.fee?.hidden
37
+ const hideTime = theme?.business_view?.components?.header?.components?.business?.components?.time?.hidden
38
+ const hideReviews = theme?.business_view?.components?.header?.components?.business?.components?.reviews?.hidden
39
+ const hideReviewsPopup = theme?.business_view?.components?.header?.components?.reviews?.hidden
40
+ const hideDistance = theme?.business_view?.components?.header?.components?.business?.components?.distance?.hidden
41
+ const hideCity = theme?.business_view?.components?.header?.components?.business?.components?.city?.hidden
42
+ const layoutsWithOldSearch = ['starbucks', 'old', 'floating']
43
+ const hideSearch = layoutsWithOldSearch.includes(theme?.business_view?.components?.product_search?.components?.layout?.type)
44
+ const isPreOrderSetting = configs?.preorder_status_enabled?.value === '1'
45
+
46
+ const searchComponentProps = {
47
+ setOpenSearchProducts,
48
+ handleChangeSortBy,
49
+ sortByValue,
50
+ sortByOptions
51
+ }
52
+
53
+ return (
54
+ <BusinessInfoContainer isChew={isChew} isFlexEnd={windowSize.width >= 768}>
55
+ <BusinessInfoContent>
56
+ <BusinessInfo className='info'>
57
+ <BusinessInfoItem isInfoShrunken={isInfoShrunken}>
58
+ {!loading ? (
59
+ <TitleWrapper isCustomLayout={isCustomLayout}>
60
+ <h2 className='bold' id='business_name'>{business?.name}</h2>
61
+ {business?.ribbon?.enabled && (
62
+ <RibbonBox
63
+ bgColor={business?.ribbon?.color}
64
+ colorText={lightenDarkenColor(business?.ribbon?.color)}
65
+ borderRibbon={lightenDarkenColor(business?.ribbon?.color)}
66
+ isRoundRect={business?.ribbon?.shape === shape?.rectangleRound}
67
+ isCapsule={business?.ribbon?.shape === shape?.capsuleShape}
68
+ >
69
+ {business?.ribbon?.text}
70
+ </RibbonBox>
71
+ )}
72
+ </TitleWrapper>
73
+ ) : (
74
+ <Skeleton width={isCustomerMode ? 100 : 150} height={isCustomerMode ? 35 : 'auto'} />
75
+ )}
76
+ {typeof hideCity !== 'undefined' && !hideCity && business?.city?.name && (
77
+ <>
78
+ {!loading ? (
79
+ <p className='type'>{business?.city?.name}</p>
80
+ ) : (
81
+ <Skeleton width={isCustomerMode ? 100 : 150} />
82
+ )}
83
+ </>
84
+ )}
85
+ {!loading ? (
86
+ <SocialList>
87
+ {business?.facebook_profile && (
88
+ <SocialNetWork
89
+ url={business?.facebook_profile}
90
+ icon={<Facebook />}
91
+ />
92
+ )}
93
+ {business?.instagram_profile && (
94
+ <SocialNetWork
95
+ url={business?.instagram_profile}
96
+ icon={<Instagram />}
97
+ />
98
+ )}
99
+ {business?.tiktok_profile && (
100
+ <SocialNetWork
101
+ url={business?.tiktok_profile}
102
+ icon={<Tiktok />}
103
+ />
104
+ )}
105
+ {business?.pinterest_profile && (
106
+ <SocialNetWork
107
+ url={business?.pinterest_profile}
108
+ icon={<Pinterest />}
109
+ />
110
+ )}
111
+ {business?.whatsapp_number && (
112
+ <SocialNetWork
113
+ url={business?.whatsapp_number}
114
+ icon={<Whatsapp />}
115
+ />
116
+ )}
117
+ {business?.snapchat_profile && (
118
+ <SocialNetWork
119
+ url={business?.snapchat_profile}
120
+ icon={<Snapchat />}
121
+ />
122
+ )}
123
+ </SocialList>
124
+ ) : (
125
+ <SocialList>
126
+ {[...Array(5).keys()].map(i => (
127
+ <IconWrapper isSkeleton key={i}>
128
+ <Skeleton width={27} height={27} />
129
+ </IconWrapper>
130
+ ))}
131
+ </SocialList>
132
+ )}
133
+ <BusinessDetail isSkeleton={loading}>
134
+ {orderState?.options.type === 1 && !hideDeliveryFee && (
135
+ <>
136
+ {!loading ? (
137
+ <>
138
+ <h5>
139
+ <span>{t('DELIVERY_FEE', 'Delivery fee')}</span>
140
+ {business && parsePrice(business?.delivery_price || 0)}
141
+ </h5>
142
+ <span className='dot'>•</span>
143
+ </>
144
+ ) : (
145
+ <Skeleton width={isCustomerMode ? 70 : 50} />
146
+ )}
147
+ </>
148
+ )}
149
+ {!hideTime && (
150
+ <>
151
+ {!loading ? (
152
+ <>
153
+ {orderState?.options?.type === 1 ? (
154
+ <>
155
+ <h5>
156
+ {convertHoursToMinutes(business?.delivery_time)}
157
+ </h5>
158
+ <span className='dot'>•</span>
159
+ </>
160
+ ) : (
161
+ <>
162
+ <h5>
163
+ {convertHoursToMinutes(business?.pickup_time)}
164
+ </h5>
165
+ <span className='dot'>•</span>
166
+ </>
167
+ )}
168
+ </>
169
+ ) : (
170
+ <Skeleton width={isCustomerMode ? 70 : 50} />
171
+ )}
172
+ </>
173
+ )}
174
+ {!hideDistance && (
175
+ <>
176
+ {!loading ? (
177
+ <>
178
+ <h5>
179
+ {parseDistance(business?.distance || 0)}
180
+ </h5>
181
+ <span className='dot'>•</span>
182
+ </>
183
+ ) : (
184
+ <Skeleton width={isCustomerMode ? 70 : 50} />
185
+ )}
186
+ </>
187
+ )}
188
+ {!hideReviews && (
189
+ <>
190
+ {!loading ? (
191
+ <div className='review'>
192
+ <StarFill className='start' />
193
+ <p>{business?.reviews?.total}</p>
194
+ </div>
195
+ ) : (
196
+ <Skeleton width={isCustomerMode ? 100 : 50} />
197
+ )}
198
+ </>
199
+ )}
200
+ </BusinessDetail>
201
+ {
202
+ !loading ? (
203
+ <div className='preorder-Reviews'>
204
+ {isPreOrderSetting && (
205
+ <>
206
+ <span onClick={() => setIsPreOrder(true)}>{t('PREORDER', 'Preorder')}</span>
207
+ <span className='dot'>•</span>
208
+ </>
209
+ )}
210
+ {business.reviews?.reviews && !hideReviewsPopup && <span onClick={() => setIsBusinessReviews(true)}>{t('REVIEWS', 'Reviews')}</span>}
211
+ </div>
212
+ ) : (
213
+ <Skeleton width={isCustomerMode ? 100 : 150} />
214
+ )
215
+ }
216
+ </BusinessInfoItem>
217
+ </BusinessInfo>
218
+ </BusinessInfoContent>
219
+ {!hideSearch &&
220
+ (categoryState?.products?.length !== 0 || searchValue) &&
221
+ !errorQuantityProducts &&
222
+ !isInfoShrunken &&
223
+ !business?.professionals?.length &&
224
+ // (categoryClicked || windowSize.width >= 993) &&
225
+ (
226
+ <SearchComponent {...searchComponentProps} />
227
+ )}
228
+ </BusinessInfoContainer>
229
+ )
230
+ }
@@ -0,0 +1,40 @@
1
+ import React from 'react'
2
+ import { SearchIconWrapper, SearchWrapper, WrapperSearch } from './styles'
3
+ import { Select } from '../../styles/Select'
4
+ import { useTheme } from 'styled-components'
5
+ import CgSearch from '@meronex/icons/cg/CgSearch'
6
+
7
+ export const SearchComponent = (props) => {
8
+ const {
9
+ setOpenSearchProducts,
10
+ handleChangeSortBy,
11
+ sortByValue,
12
+ sortByOptions,
13
+ isResponsive
14
+ } = props
15
+
16
+ const theme = useTheme()
17
+
18
+ const hideSort = theme?.business_view?.components?.header?.components?.business?.components?.sort?.hidden
19
+
20
+ return (
21
+ <WrapperSearch id='search-component' isResponsive={isResponsive}>
22
+ <SearchWrapper>
23
+ <SearchIconWrapper
24
+ onClick={() => setOpenSearchProducts(true)}
25
+ >
26
+ <CgSearch />
27
+ </SearchIconWrapper>
28
+ {!hideSort && (
29
+ <Select
30
+ notAsync
31
+ notReload
32
+ options={sortByOptions}
33
+ defaultValue={sortByValue}
34
+ onChange={(val) => handleChangeSortBy && handleChangeSortBy(val)}
35
+ />
36
+ )}
37
+ </SearchWrapper>
38
+ </WrapperSearch>
39
+ )
40
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react'
2
+ import { IconWrapper } from './styles'
3
+
4
+ export const SocialNetWork = ({ url, icon }) => {
5
+ return (
6
+ <IconWrapper href={url} target='_blank' rel='noopener noreferrer'>
7
+ {icon}
8
+ </IconWrapper>
9
+ )
10
+ }