ordering-ui-external 10.4.0 → 10.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/{7.ordering-ui.487a31b3537d90f69a9d.js → 7.ordering-ui.62d46eec3c210c5257aa.js} +1 -1
- package/_bundles/{ordering-ui.487a31b3537d90f69a9d.js → ordering-ui.62d46eec3c210c5257aa.js} +2 -2
- package/_modules/themes/five/src/components/BusinessProductsList/index.js +35 -13
- package/_modules/themes/five/src/components/BusinessProductsList/styles.js +7 -3
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +3 -2
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +2 -2
- package/package.json +2 -2
- package/src/themes/five/src/components/BusinessProductsList/index.js +36 -3
- package/src/themes/five/src/components/BusinessProductsList/styles.js +20 -0
- package/src/themes/five/src/components/RenderProductsLayout/index.js +1 -0
- package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +2 -2
- package/template/pages/BusinessProductsList/index.js +2 -1
- /package/_bundles/{0.ordering-ui.487a31b3537d90f69a9d.js → 0.ordering-ui.62d46eec3c210c5257aa.js} +0 -0
- /package/_bundles/{1.ordering-ui.487a31b3537d90f69a9d.js → 1.ordering-ui.62d46eec3c210c5257aa.js} +0 -0
- /package/_bundles/{2.ordering-ui.487a31b3537d90f69a9d.js → 2.ordering-ui.62d46eec3c210c5257aa.js} +0 -0
- /package/_bundles/{4.ordering-ui.487a31b3537d90f69a9d.js → 4.ordering-ui.62d46eec3c210c5257aa.js} +0 -0
- /package/_bundles/{5.ordering-ui.487a31b3537d90f69a9d.js → 5.ordering-ui.62d46eec3c210c5257aa.js} +0 -0
- /package/_bundles/{6.ordering-ui.487a31b3537d90f69a9d.js → 6.ordering-ui.62d46eec3c210c5257aa.js} +0 -0
- /package/_bundles/{7.ordering-ui.487a31b3537d90f69a9d.js.LICENSE.txt → 7.ordering-ui.62d46eec3c210c5257aa.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.487a31b3537d90f69a9d.js → 8.ordering-ui.62d46eec3c210c5257aa.js} +0 -0
- /package/_bundles/{9.ordering-ui.487a31b3537d90f69a9d.js → 9.ordering-ui.62d46eec3c210c5257aa.js} +0 -0
- /package/_bundles/{ordering-ui.487a31b3537d90f69a9d.js.LICENSE.txt → ordering-ui.62d46eec3c210c5257aa.js.LICENSE.txt} +0 -0
|
@@ -34,7 +34,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
34
34
|
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; } }
|
|
35
35
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
36
|
var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
37
|
-
var _configs$use_parent_c, _configs$use_parent_c2, _categoryState$produc, _props$beforeElements, _props$beforeComponen, _category$subcategori2, _category$subcategori3, _category$subcategori4, _categoryState$produc2, _categoryState$produc3, _categoryState$produc4, _categoryState$produc9, _props$afterComponent, _props$afterElements;
|
|
37
|
+
var _configs$use_parent_c, _configs$use_parent_c2, _categoryState$produc, _props$beforeElements, _props$beforeComponen, _category$subcategori2, _category$subcategori3, _category$subcategori4, _headerRef$current, _categoryState$produc2, _categoryState$produc3, _categoryState$produc4, _categoryState$produc9, _props$afterComponent, _props$afterElements;
|
|
38
38
|
var errors = props.errors,
|
|
39
39
|
businessId = props.businessId,
|
|
40
40
|
isLazy = props.isLazy,
|
|
@@ -56,7 +56,8 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
56
56
|
onClickCategory = props.onClickCategory,
|
|
57
57
|
handleUpdateProducts = props.handleUpdateProducts,
|
|
58
58
|
isSearchMode = props.isSearchMode,
|
|
59
|
-
business = props.business
|
|
59
|
+
business = props.business,
|
|
60
|
+
previouslyProducts = props.previouslyProducts;
|
|
60
61
|
var _useLanguage = (0, _orderingComponentsExternal.useLanguage)(),
|
|
61
62
|
_useLanguage2 = _slicedToArray(_useLanguage, 2),
|
|
62
63
|
t = _useLanguage2[1];
|
|
@@ -180,12 +181,33 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
180
181
|
}, 0)
|
|
181
182
|
});
|
|
182
183
|
})));
|
|
183
|
-
}))), !(category !== null && category !== void 0 && category.id) &&
|
|
184
|
+
}))), !(category !== null && category !== void 0 && category.id) && (previouslyProducts === null || previouslyProducts === void 0 ? void 0 : previouslyProducts.length) > 0 && /*#__PURE__*/_react.default.createElement(_styles.WrapAllCategories, {
|
|
185
|
+
id: "previously_block"
|
|
186
|
+
}, /*#__PURE__*/_react.default.createElement("h3", null, t('ORDER_IT_AGAIN', 'Order it again')), /*#__PURE__*/_react.default.createElement(_styles.CategoryDescription, {
|
|
187
|
+
maxWidth: headerRef === null || headerRef === void 0 || (_headerRef$current = headerRef.current) === null || _headerRef$current === void 0 ? void 0 : _headerRef$current.clientWidth
|
|
188
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, t('ORDER_IT_AGAIN_DESC', 'Quickly add items from your past orders.'))), /*#__PURE__*/_react.default.createElement(_styles.PreviouslyOrderedContainer, null, /*#__PURE__*/_react.default.createElement(_styles.PreviouslyOrderedWrapper, null, /*#__PURE__*/_react.default.createElement(_AutoScroll.AutoScroll, {
|
|
189
|
+
scrollId: "previously_ordered"
|
|
190
|
+
}, previouslyProducts === null || previouslyProducts === void 0 ? void 0 : previouslyProducts.map(function (product, i) {
|
|
191
|
+
var _currentCart$products3;
|
|
192
|
+
return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
193
|
+
key: i,
|
|
194
|
+
isSoldOut: product.inventoried && !product.quantity,
|
|
195
|
+
product: product,
|
|
196
|
+
useKioskApp: useKioskApp,
|
|
197
|
+
businessId: businessId,
|
|
198
|
+
onProductClick: onProductClick,
|
|
199
|
+
isCartOnProductsList: isCartOnProductsList,
|
|
200
|
+
handleUpdateProducts: handleUpdateProducts,
|
|
201
|
+
productAddedToCartLength: currentCart === null || currentCart === void 0 || (_currentCart$products3 = currentCart.products) === null || _currentCart$products3 === void 0 ? void 0 : _currentCart$products3.reduce(function (productsLength, Cproduct) {
|
|
202
|
+
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
203
|
+
}, 0)
|
|
204
|
+
});
|
|
205
|
+
}))))), !(category !== null && category !== void 0 && category.id) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, featured && (categoryState === null || categoryState === void 0 || (_categoryState$produc2 = categoryState.products) === null || _categoryState$produc2 === void 0 ? void 0 : _categoryState$produc2.find(function (product) {
|
|
184
206
|
return product.featured;
|
|
185
207
|
})) && /*#__PURE__*/_react.default.createElement(_styles.WrapAllCategories, {
|
|
186
208
|
id: "categoryfeatured"
|
|
187
209
|
}, /*#__PURE__*/_react.default.createElement("h3", null, t('FEATURED', 'Featured')), /*#__PURE__*/_react.default.createElement(_styles.ProductsListing, null, (_categoryState$produc3 = categoryState.products) === null || _categoryState$produc3 === void 0 ? void 0 : _categoryState$produc3.map(function (product, i) {
|
|
188
|
-
var _currentCart$
|
|
210
|
+
var _currentCart$products4;
|
|
189
211
|
return product.featured && /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
190
212
|
key: i,
|
|
191
213
|
isSoldOut: product.inventoried && !product.quantity,
|
|
@@ -195,7 +217,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
195
217
|
onProductClick: onProductClick,
|
|
196
218
|
isCartOnProductsList: isCartOnProductsList,
|
|
197
219
|
handleUpdateProducts: handleUpdateProducts,
|
|
198
|
-
productAddedToCartLength: currentCart === null || currentCart === void 0 || (_currentCart$
|
|
220
|
+
productAddedToCartLength: currentCart === null || currentCart === void 0 || (_currentCart$products4 = currentCart.products) === null || _currentCart$products4 === void 0 ? void 0 : _currentCart$products4.reduce(function (productsLength, Cproduct) {
|
|
199
221
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
200
222
|
}, 0)
|
|
201
223
|
});
|
|
@@ -214,7 +236,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
214
236
|
})))), !(category !== null && category !== void 0 && category.id) && categories.filter(function (category) {
|
|
215
237
|
return (category === null || category === void 0 ? void 0 : category.id) !== null;
|
|
216
238
|
}).map(function (category, i, _categories) {
|
|
217
|
-
var _categoryState$produc5, _categoryState$produc6, _categoryState$produc7, _categoryState$produc8, _category$description, _category$description2, _category$subcategori5, _category$subcategori6, _category$ribbon, _category$ribbon2, _category$ribbon3, _category$ribbon4, _category$ribbon5, _headerRef$
|
|
239
|
+
var _categoryState$produc5, _categoryState$produc6, _categoryState$produc7, _categoryState$produc8, _category$description, _category$description2, _category$subcategori5, _category$subcategori6, _category$ribbon, _category$ribbon2, _category$ribbon3, _category$ribbon4, _category$ribbon5, _headerRef$current2, _category$description3, _category$subcategori7, _category$subcategori8, _products$filter, _category$subcategori9, _category$subcategori10;
|
|
218
240
|
var _products = !isUseParentCategory ? (_categoryState$produc5 = categoryState === null || categoryState === void 0 || (_categoryState$produc6 = categoryState.products) === null || _categoryState$produc6 === void 0 ? void 0 : _categoryState$produc6.filter(function (product) {
|
|
219
241
|
return (product === null || product === void 0 ? void 0 : product.category_id) === (category === null || category === void 0 ? void 0 : category.id);
|
|
220
242
|
})) !== null && _categoryState$produc5 !== void 0 ? _categoryState$produc5 : [] : (_categoryState$produc7 = categoryState === null || categoryState === void 0 || (_categoryState$produc8 = categoryState.products) === null || _categoryState$produc8 === void 0 ? void 0 : _categoryState$produc8.filter(function (product) {
|
|
@@ -254,7 +276,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
254
276
|
isRoundRect: (category === null || category === void 0 || (_category$ribbon3 = category.ribbon) === null || _category$ribbon3 === void 0 ? void 0 : _category$ribbon3.shape) === (_utils.shape === null || _utils.shape === void 0 ? void 0 : _utils.shape.rectangleRound),
|
|
255
277
|
isCapsule: (category === null || category === void 0 || (_category$ribbon4 = category.ribbon) === null || _category$ribbon4 === void 0 ? void 0 : _category$ribbon4.shape) === (_utils.shape === null || _utils.shape === void 0 ? void 0 : _utils.shape.capsuleShape)
|
|
256
278
|
}, category === null || category === void 0 || (_category$ribbon5 = category.ribbon) === null || _category$ribbon5 === void 0 ? void 0 : _category$ribbon5.text)), (category === null || category === void 0 ? void 0 : category.description) && /*#__PURE__*/_react.default.createElement(_styles.CategoryDescription, {
|
|
257
|
-
maxWidth: headerRef === null || headerRef === void 0 || (_headerRef$
|
|
279
|
+
maxWidth: headerRef === null || headerRef === void 0 || (_headerRef$current2 = headerRef.current) === null || _headerRef$current2 === void 0 ? void 0 : _headerRef$current2.clientWidth
|
|
258
280
|
}, /*#__PURE__*/_react.default.createElement("p", null, shortCategoryDescription), (category === null || category === void 0 || (_category$description3 = category.description) === null || _category$description3 === void 0 ? void 0 : _category$description3.length) > 200 && /*#__PURE__*/_react.default.createElement("span", {
|
|
259
281
|
onClick: function onClick() {
|
|
260
282
|
return setOpenDescription(category);
|
|
@@ -266,7 +288,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
266
288
|
}, isSearchMode && (category === null || category === void 0 || (_category$subcategori8 = category.subcategories) === null || _category$subcategori8 === void 0 ? void 0 : _category$subcategori8.length) > 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, products === null || products === void 0 || (_products$filter = products.filter(function (product, i) {
|
|
267
289
|
return i < 9 && (product === null || product === void 0 ? void 0 : product.category_id) === (category === null || category === void 0 ? void 0 : category.id) || (business === null || business === void 0 ? void 0 : business.food);
|
|
268
290
|
})) === null || _products$filter === void 0 ? void 0 : _products$filter.map(function (product, i) {
|
|
269
|
-
var _currentCart$
|
|
291
|
+
var _currentCart$products5;
|
|
270
292
|
return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
271
293
|
key: i,
|
|
272
294
|
isSoldOut: product.inventoried && !product.quantity,
|
|
@@ -276,7 +298,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
276
298
|
useKioskApp: useKioskApp,
|
|
277
299
|
isCartOnProductsList: isCartOnProductsList,
|
|
278
300
|
handleUpdateProducts: handleUpdateProducts,
|
|
279
|
-
productAddedToCartLength: currentCart === null || currentCart === void 0 || (_currentCart$
|
|
301
|
+
productAddedToCartLength: currentCart === null || currentCart === void 0 || (_currentCart$products5 = currentCart.products) === null || _currentCart$products5 === void 0 ? void 0 : _currentCart$products5.reduce(function (productsLength, Cproduct) {
|
|
280
302
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
281
303
|
}, 0)
|
|
282
304
|
});
|
|
@@ -295,7 +317,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
295
317
|
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, products.filter(function (_, i) {
|
|
296
318
|
return i < 9 || (business === null || business === void 0 ? void 0 : business.food);
|
|
297
319
|
}).map(function (product, i) {
|
|
298
|
-
var _currentCart$
|
|
320
|
+
var _currentCart$products6;
|
|
299
321
|
return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
300
322
|
key: i,
|
|
301
323
|
isSoldOut: product.inventoried && !product.quantity,
|
|
@@ -305,7 +327,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
305
327
|
useKioskApp: useKioskApp,
|
|
306
328
|
isCartOnProductsList: isCartOnProductsList,
|
|
307
329
|
handleUpdateProducts: handleUpdateProducts,
|
|
308
|
-
productAddedToCartLength: currentCart === null || currentCart === void 0 || (_currentCart$
|
|
330
|
+
productAddedToCartLength: currentCart === null || currentCart === void 0 || (_currentCart$products6 = currentCart.products) === null || _currentCart$products6 === void 0 ? void 0 : _currentCart$products6.reduce(function (productsLength, Cproduct) {
|
|
309
331
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
310
332
|
}, 0)
|
|
311
333
|
});
|
|
@@ -339,7 +361,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
339
361
|
}, products === null || products === void 0 || (_products$filter2 = products.filter(function (product) {
|
|
340
362
|
return (product === null || product === void 0 ? void 0 : product.category_id) === (subcategory === null || subcategory === void 0 ? void 0 : subcategory.id);
|
|
341
363
|
})) === null || _products$filter2 === void 0 ? void 0 : _products$filter2.map(function (product, i) {
|
|
342
|
-
var _currentCart$
|
|
364
|
+
var _currentCart$products7;
|
|
343
365
|
return /*#__PURE__*/_react.default.createElement(_SingleProductCard.SingleProductCard, {
|
|
344
366
|
key: i,
|
|
345
367
|
isSoldOut: product.inventoried && !product.quantity,
|
|
@@ -349,7 +371,7 @@ var BusinessProductsListUI = function BusinessProductsListUI(props) {
|
|
|
349
371
|
isCartOnProductsList: isCartOnProductsList,
|
|
350
372
|
handleUpdateProducts: handleUpdateProducts,
|
|
351
373
|
useKioskApp: useKioskApp,
|
|
352
|
-
productAddedToCartLength: currentCart === null || currentCart === void 0 || (_currentCart$
|
|
374
|
+
productAddedToCartLength: currentCart === null || currentCart === void 0 || (_currentCart$products7 = currentCart.products) === null || _currentCart$products7 === void 0 ? void 0 : _currentCart$products7.reduce(function (productsLength, Cproduct) {
|
|
353
375
|
return productsLength + ((Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.id) === (product === null || product === void 0 ? void 0 : product.id) ? Cproduct === null || Cproduct === void 0 ? void 0 : Cproduct.quantity : 0);
|
|
354
376
|
}, 0)
|
|
355
377
|
});
|
|
@@ -4,9 +4,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.WrapperNotFound = exports.WrapAllCategories = exports.SubcategorySearchContainer = exports.SubCategoriesInnerContainer = exports.SubCategoriesContainer = exports.RibbonBox = exports.ProductsListing = exports.ProductsContainer = exports.HeaderWrapper = exports.ErrorMessage = exports.DescriptionModalContainer = exports.DescriptionContainer = exports.ContainerButton = exports.CategoryDescription = void 0;
|
|
7
|
+
exports.WrapperNotFound = exports.WrapAllCategories = exports.SubcategorySearchContainer = exports.SubCategoriesInnerContainer = exports.SubCategoriesContainer = exports.RibbonBox = exports.ProductsListing = exports.ProductsContainer = exports.PreviouslyOrderedWrapper = exports.PreviouslyOrderedContainer = exports.HeaderWrapper = exports.ErrorMessage = exports.DescriptionModalContainer = exports.DescriptionContainer = exports.ContainerButton = exports.CategoryDescription = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22;
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
|
|
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) } })); }
|
|
@@ -76,4 +76,8 @@ var ContainerButton = _styledComponents.default.div(_templateObject20 || (_templ
|
|
|
76
76
|
});
|
|
77
77
|
exports.ContainerButton = ContainerButton;
|
|
78
78
|
var SubcategorySearchContainer = _styledComponents.default.div(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n margin-left: 30px;\n"])));
|
|
79
|
-
exports.SubcategorySearchContainer = SubcategorySearchContainer;
|
|
79
|
+
exports.SubcategorySearchContainer = SubcategorySearchContainer;
|
|
80
|
+
var PreviouslyOrderedContainer = _styledComponents.default.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n display: flex;\n overflow: scroll hidden;\n ::-webkit-scrollbar {\n width: 0px;\n height: 0px;\n }\n"])));
|
|
81
|
+
exports.PreviouslyOrderedContainer = PreviouslyOrderedContainer;
|
|
82
|
+
var PreviouslyOrderedWrapper = _styledComponents.default.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n display: flex;\n box-sizing: border-box;\n\n .product-card {\n width: 270px;\n max-width: 270px;\n }\n\n"])));
|
|
83
|
+
exports.PreviouslyOrderedWrapper = PreviouslyOrderedWrapper;
|
|
@@ -49,7 +49,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
49
49
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
50
50
|
var layoutOne = 'groceries';
|
|
51
51
|
var RenderProductsLayout = function RenderProductsLayout(props) {
|
|
52
|
-
var _configs$use_parent_c, _configs$use_parent_c2, _theme$business_view, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6, _theme$business_view$, _theme$business_view7, _theme$business_view8, _businessState$busine, _businessState$busine2, _businessState$busine3, _businessState$busine4, _business$previously_, _business$professiona, _business$categories, _theme$defaultLanguag, _theme$defaultLanguag2, _business$professiona2, _business$categories2, _theme$defaultLanguag4, _theme$defaultLanguag5, _business$professiona3, _currentCart$products, _business$professiona4, _business$categories3, _theme$defaultLanguag6, _theme$defaultLanguag7, _business$previously_2, _theme$defaultLanguag8, _theme$defaultLanguag9, _currentCart$products2, _currentCart$products3;
|
|
52
|
+
var _configs$use_parent_c, _configs$use_parent_c2, _theme$business_view, _theme$business_view2, _theme$business_view3, _theme$business_view4, _theme$business_view5, _theme$business_view6, _theme$business_view$, _theme$business_view7, _theme$business_view8, _businessState$busine, _businessState$busine2, _businessState$busine3, _businessState$busine4, _business$previously_, _business$professiona, _business$categories, _theme$defaultLanguag, _theme$defaultLanguag2, _business$professiona2, _business$categories2, _theme$defaultLanguag4, _theme$defaultLanguag5, _businessState$busine5, _business$professiona3, _currentCart$products, _business$professiona4, _business$categories3, _theme$defaultLanguag6, _theme$defaultLanguag7, _business$previously_2, _theme$defaultLanguag8, _theme$defaultLanguag9, _currentCart$products2, _currentCart$products3;
|
|
53
53
|
var errors = props.errors,
|
|
54
54
|
isError = props.isError,
|
|
55
55
|
isLoading = props.isLoading,
|
|
@@ -294,7 +294,8 @@ var RenderProductsLayout = function RenderProductsLayout(props) {
|
|
|
294
294
|
onClickCategory: onClickCategory,
|
|
295
295
|
handleUpdateProducts: handleUpdateProducts,
|
|
296
296
|
professionalSelected: professionalSelected,
|
|
297
|
-
handleChangeProfessionalSelected: handleChangeProfessionalSelected
|
|
297
|
+
handleChangeProfessionalSelected: handleChangeProfessionalSelected,
|
|
298
|
+
previouslyProducts: businessState === null || businessState === void 0 || (_businessState$busine5 = businessState.business) === null || _businessState$busine5 === void 0 ? void 0 : _businessState$busine5.previously_products
|
|
298
299
|
}))), windowSize.width >= 1000 && windowSize.height >= 600 && showCartOnProductList && /*#__PURE__*/_react.default.createElement(_styles.BusinessCartContainer, {
|
|
299
300
|
isProfessional: (business === null || business === void 0 || (_business$professiona3 = business.professionals) === null || _business$professiona3 === void 0 ? void 0 : _business$professiona3.length) > 0 && !useKioskApp
|
|
300
301
|
}, /*#__PURE__*/_react.default.createElement(_styles.BusinessCartContent, {
|
|
@@ -29,7 +29,7 @@ var CardContainer = _styledComponents.default.div(_templateObject || (_templateO
|
|
|
29
29
|
var productsRows = _ref4.productsRows;
|
|
30
30
|
return productsRows ? (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: ", ";\n margin: 10px 0;\n "])), function () {
|
|
31
31
|
return productsRows === 3 ? 'calc(33% - 20px)' : 'calc(50% - 20px)';
|
|
32
|
-
}) : (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 10px 0;\n @media (min-width: 576px) {\n margin: 10px;\n width: calc(100% - 20px);\n }\n ", "\n
|
|
32
|
+
}) : (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 10px 0;\n @media (min-width: 576px) {\n margin: 10px;\n width: calc(100% - 20px);\n }\n ", "\n\n "])), function (_ref5) {
|
|
33
33
|
var isCartOnProductsList = _ref5.isCartOnProductsList;
|
|
34
34
|
return isCartOnProductsList ? (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n @media (min-width: 993px) {\n width: calc(50% - 20px);\n margin: 10px 20px 10px 0px;\n ", "\n }\n "])), function (props) {
|
|
35
35
|
var _props$theme;
|
|
@@ -106,7 +106,7 @@ var PriceWrapper = _styledComponents.default.div(_templateObject27 || (_template
|
|
|
106
106
|
return isOffPrice && (0, _styledComponents.css)(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n min-width: 64px;\n "])));
|
|
107
107
|
});
|
|
108
108
|
exports.PriceWrapper = PriceWrapper;
|
|
109
|
-
var QuantityContainer = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n position: absolute;\n left: 100%;\n bottom:
|
|
109
|
+
var QuantityContainer = _styledComponents.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n position: absolute;\n left: 100%;\n bottom: 98%;\n width: 25px;\n height: 25px;\n text-align: center;\n border-radius: 50%;\n transform: translate(-20px, 50%);\n @media (min-width: 768px) {\n transform: translate(-50%, 50%);\n }\n"])), function (_ref14) {
|
|
110
110
|
var theme = _ref14.theme;
|
|
111
111
|
return theme.colors.primary;
|
|
112
112
|
}, function (_ref15) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "10.4.
|
|
3
|
+
"version": "10.4.1",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"lodash": "^4.17.19",
|
|
89
89
|
"moment": "^2.29.4",
|
|
90
90
|
"nanoid": "^4.0.0",
|
|
91
|
-
"ordering-components-external": "9.4.
|
|
91
|
+
"ordering-components-external": "9.4.2",
|
|
92
92
|
"payment": "^2.4.6",
|
|
93
93
|
"polished": "^3.6.6",
|
|
94
94
|
"react-bootstrap-icons": "^1.7.2",
|
|
@@ -22,7 +22,9 @@ import {
|
|
|
22
22
|
CategoryDescription,
|
|
23
23
|
DescriptionContainer,
|
|
24
24
|
SubcategorySearchContainer,
|
|
25
|
-
SubCategoriesInnerContainer
|
|
25
|
+
SubCategoriesInnerContainer,
|
|
26
|
+
PreviouslyOrderedContainer,
|
|
27
|
+
PreviouslyOrderedWrapper
|
|
26
28
|
} from './styles'
|
|
27
29
|
import { Button } from '../../styles/Buttons'
|
|
28
30
|
|
|
@@ -49,7 +51,8 @@ const BusinessProductsListUI = (props) => {
|
|
|
49
51
|
onClickCategory,
|
|
50
52
|
handleUpdateProducts,
|
|
51
53
|
isSearchMode,
|
|
52
|
-
business
|
|
54
|
+
business,
|
|
55
|
+
previouslyProducts
|
|
53
56
|
} = props
|
|
54
57
|
|
|
55
58
|
const [, t] = useLanguage()
|
|
@@ -171,7 +174,37 @@ const BusinessProductsListUI = (props) => {
|
|
|
171
174
|
))}
|
|
172
175
|
</>
|
|
173
176
|
)}
|
|
174
|
-
|
|
177
|
+
{
|
|
178
|
+
!category?.id && previouslyProducts?.length > 0 && (
|
|
179
|
+
<WrapAllCategories id='previously_block'>
|
|
180
|
+
<h3>{t('ORDER_IT_AGAIN', 'Order it again')}</h3>
|
|
181
|
+
<CategoryDescription maxWidth={headerRef?.current?.clientWidth}>
|
|
182
|
+
<p>
|
|
183
|
+
{t('ORDER_IT_AGAIN_DESC', 'Quickly add items from your past orders.')}
|
|
184
|
+
</p>
|
|
185
|
+
</CategoryDescription>
|
|
186
|
+
<PreviouslyOrderedContainer>
|
|
187
|
+
<PreviouslyOrderedWrapper>
|
|
188
|
+
<AutoScroll scrollId='previously_ordered'>
|
|
189
|
+
{previouslyProducts?.map((product, i) => (
|
|
190
|
+
<SingleProductCard
|
|
191
|
+
key={i}
|
|
192
|
+
isSoldOut={(product.inventoried && !product.quantity)}
|
|
193
|
+
product={product}
|
|
194
|
+
useKioskApp={useKioskApp}
|
|
195
|
+
businessId={businessId}
|
|
196
|
+
onProductClick={onProductClick}
|
|
197
|
+
isCartOnProductsList={isCartOnProductsList}
|
|
198
|
+
handleUpdateProducts={handleUpdateProducts}
|
|
199
|
+
productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
|
|
200
|
+
/>
|
|
201
|
+
))}
|
|
202
|
+
</AutoScroll>
|
|
203
|
+
</PreviouslyOrderedWrapper>
|
|
204
|
+
</PreviouslyOrderedContainer>
|
|
205
|
+
</WrapAllCategories>
|
|
206
|
+
)
|
|
207
|
+
}
|
|
175
208
|
{
|
|
176
209
|
!category?.id && (
|
|
177
210
|
<>
|
|
@@ -205,3 +205,23 @@ export const SubcategorySearchContainer = styled.div`
|
|
|
205
205
|
flex-direction: column;
|
|
206
206
|
margin-left: 30px;
|
|
207
207
|
`
|
|
208
|
+
|
|
209
|
+
export const PreviouslyOrderedContainer = styled.div`
|
|
210
|
+
display: flex;
|
|
211
|
+
overflow: scroll hidden;
|
|
212
|
+
::-webkit-scrollbar {
|
|
213
|
+
width: 0px;
|
|
214
|
+
height: 0px;
|
|
215
|
+
}
|
|
216
|
+
`
|
|
217
|
+
|
|
218
|
+
export const PreviouslyOrderedWrapper = styled.div`
|
|
219
|
+
display: flex;
|
|
220
|
+
box-sizing: border-box;
|
|
221
|
+
|
|
222
|
+
.product-card {
|
|
223
|
+
width: 270px;
|
|
224
|
+
max-width: 270px;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
`
|
|
@@ -337,6 +337,7 @@ export const RenderProductsLayout = (props) => {
|
|
|
337
337
|
handleUpdateProducts={handleUpdateProducts}
|
|
338
338
|
professionalSelected={professionalSelected}
|
|
339
339
|
handleChangeProfessionalSelected={handleChangeProfessionalSelected}
|
|
340
|
+
previouslyProducts={businessState?.business?.previously_products}
|
|
340
341
|
/>
|
|
341
342
|
</WrapContent>
|
|
342
343
|
</BusinessCategoryProductWrapper>
|
|
@@ -64,7 +64,7 @@ export const CardContainer = styled.div`
|
|
|
64
64
|
`}
|
|
65
65
|
}
|
|
66
66
|
`}
|
|
67
|
-
|
|
67
|
+
|
|
68
68
|
`}
|
|
69
69
|
`
|
|
70
70
|
|
|
@@ -237,7 +237,7 @@ export const QuantityContainer = styled.div`
|
|
|
237
237
|
color: ${({ theme }) => theme.colors.primaryContrast};
|
|
238
238
|
position: absolute;
|
|
239
239
|
left: 100%;
|
|
240
|
-
bottom:
|
|
240
|
+
bottom: 98%;
|
|
241
241
|
width: 25px;
|
|
242
242
|
height: 25px;
|
|
243
243
|
text-align: center;
|
|
@@ -136,7 +136,8 @@ export const BusinessProductsList = (props) => {
|
|
|
136
136
|
'whatsapp_number',
|
|
137
137
|
'snapchat_profile',
|
|
138
138
|
'previously_products',
|
|
139
|
-
'configs'
|
|
139
|
+
'configs',
|
|
140
|
+
'previously_products'
|
|
140
141
|
],
|
|
141
142
|
handleSearchRedirect: () => {
|
|
142
143
|
events.emit('go_to_page', { page: 'search' })
|
/package/_bundles/{0.ordering-ui.487a31b3537d90f69a9d.js → 0.ordering-ui.62d46eec3c210c5257aa.js}
RENAMED
|
File without changes
|
/package/_bundles/{1.ordering-ui.487a31b3537d90f69a9d.js → 1.ordering-ui.62d46eec3c210c5257aa.js}
RENAMED
|
File without changes
|
/package/_bundles/{2.ordering-ui.487a31b3537d90f69a9d.js → 2.ordering-ui.62d46eec3c210c5257aa.js}
RENAMED
|
File without changes
|
/package/_bundles/{4.ordering-ui.487a31b3537d90f69a9d.js → 4.ordering-ui.62d46eec3c210c5257aa.js}
RENAMED
|
File without changes
|
/package/_bundles/{5.ordering-ui.487a31b3537d90f69a9d.js → 5.ordering-ui.62d46eec3c210c5257aa.js}
RENAMED
|
File without changes
|
/package/_bundles/{6.ordering-ui.487a31b3537d90f69a9d.js → 6.ordering-ui.62d46eec3c210c5257aa.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/_bundles/{8.ordering-ui.487a31b3537d90f69a9d.js → 8.ordering-ui.62d46eec3c210c5257aa.js}
RENAMED
|
File without changes
|
/package/_bundles/{9.ordering-ui.487a31b3537d90f69a9d.js → 9.ordering-ui.62d46eec3c210c5257aa.js}
RENAMED
|
File without changes
|