ordering-ui-external 14.1.87 → 14.1.89
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.1ce4b8d73dd617e1f222.js → 0.ordering-ui.a7f706d20b2f005fe988.js} +1 -1
- package/_bundles/{1.ordering-ui.1ce4b8d73dd617e1f222.js → 1.ordering-ui.a7f706d20b2f005fe988.js} +1 -1
- package/_bundles/{2.ordering-ui.1ce4b8d73dd617e1f222.js → 2.ordering-ui.a7f706d20b2f005fe988.js} +1 -1
- package/_bundles/{4.ordering-ui.1ce4b8d73dd617e1f222.js → 4.ordering-ui.a7f706d20b2f005fe988.js} +1 -1
- package/_bundles/{5.ordering-ui.1ce4b8d73dd617e1f222.js → 5.ordering-ui.a7f706d20b2f005fe988.js} +1 -1
- package/_bundles/{6.ordering-ui.1ce4b8d73dd617e1f222.js → 6.ordering-ui.a7f706d20b2f005fe988.js} +1 -1
- package/_bundles/{7.ordering-ui.1ce4b8d73dd617e1f222.js → 7.ordering-ui.a7f706d20b2f005fe988.js} +2 -2
- package/_bundles/{8.ordering-ui.1ce4b8d73dd617e1f222.js → 8.ordering-ui.a7f706d20b2f005fe988.js} +1 -1
- package/_bundles/{9.ordering-ui.1ce4b8d73dd617e1f222.js → 9.ordering-ui.a7f706d20b2f005fe988.js} +1 -1
- package/_bundles/ordering-ui.a7f706d20b2f005fe988.js +2 -0
- package/_bundles/{ordering-ui.1ce4b8d73dd617e1f222.js.LICENSE.txt → ordering-ui.a7f706d20b2f005fe988.js.LICENSE.txt} +9 -0
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +12 -9
- package/package.json +2 -2
- package/src/themes/five/src/components/BusinessProductsListing/index.js +8 -4
- package/_bundles/ordering-ui.1ce4b8d73dd617e1f222.js +0 -2
- /package/_bundles/{7.ordering-ui.1ce4b8d73dd617e1f222.js.LICENSE.txt → 7.ordering-ui.a7f706d20b2f005fe988.js.LICENSE.txt} +0 -0
|
@@ -140,6 +140,15 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
140
140
|
* LICENSE file in the root directory of this source tree.
|
|
141
141
|
*/
|
|
142
142
|
|
|
143
|
+
/** @license React v16.14.0
|
|
144
|
+
* react-jsx-runtime.production.min.js
|
|
145
|
+
*
|
|
146
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the MIT license found in the
|
|
149
|
+
* LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/
|
|
151
|
+
|
|
143
152
|
//! moment.js
|
|
144
153
|
|
|
145
154
|
//! moment.js locale configuration
|
|
@@ -197,7 +197,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
197
197
|
};
|
|
198
198
|
var onProductClick = /*#__PURE__*/function () {
|
|
199
199
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(product) {
|
|
200
|
-
var _currentCart$products, isProductAddedToCart, productQuantity, minimumPerOrder, addCurrentProduct, updateCurrentProduct, cartData, _business$professiona,
|
|
200
|
+
var _currentCart$products, isProductAddedToCart, productQuantity, minimumPerOrder, addCurrentProduct, updateCurrentProduct, cartData, _product$category, _business$professiona, productSlug, categorySlug;
|
|
201
201
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
202
202
|
while (1) switch (_context.prev = _context.next) {
|
|
203
203
|
case 0:
|
|
@@ -236,15 +236,17 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
236
236
|
return addProduct(addCurrentProduct, cartData, isQuickAddProduct);
|
|
237
237
|
case 15:
|
|
238
238
|
setProductLoading(false);
|
|
239
|
-
_context.next =
|
|
239
|
+
_context.next = 24;
|
|
240
240
|
break;
|
|
241
241
|
case 18:
|
|
242
|
+
productSlug = (product === null || product === void 0 ? void 0 : product.slug) || (product === null || product === void 0 ? void 0 : product.id);
|
|
243
|
+
categorySlug = (product === null || product === void 0 || (_product$category = product.category) === null || _product$category === void 0 ? void 0 : _product$category.slug) || (product === null || product === void 0 ? void 0 : product.category_id);
|
|
242
244
|
if (!((product === null || product === void 0 ? void 0 : product.type) === 'service' && (business === null || business === void 0 || (_business$professiona = business.professionals) === null || _business$professiona === void 0 ? void 0 : _business$professiona.length) > 0)) {
|
|
243
245
|
if (site !== null && site !== void 0 && site.product_url_template) {
|
|
244
246
|
onProductRedirect({
|
|
245
247
|
slug: business === null || business === void 0 ? void 0 : business.slug,
|
|
246
|
-
product: site.product_url_template.includes('product_slug') ?
|
|
247
|
-
category: site.product_url_template.includes('category_slug') ?
|
|
248
|
+
product: site.product_url_template.includes('product_slug') ? productSlug : product.id,
|
|
249
|
+
category: site.product_url_template.includes('category_slug') ? categorySlug : product.category_id
|
|
248
250
|
});
|
|
249
251
|
} else {
|
|
250
252
|
onProductRedirect({
|
|
@@ -257,7 +259,7 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
257
259
|
setCurProduct(product);
|
|
258
260
|
setModalIsOpen(true);
|
|
259
261
|
events.emit('product_clicked', product);
|
|
260
|
-
case
|
|
262
|
+
case 24:
|
|
261
263
|
case "end":
|
|
262
264
|
return _context.stop();
|
|
263
265
|
}
|
|
@@ -268,14 +270,15 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
268
270
|
};
|
|
269
271
|
}();
|
|
270
272
|
var handleCustomProductBannerClick = function handleCustomProductBannerClick(product) {
|
|
271
|
-
var _business$professiona2;
|
|
273
|
+
var _product$category2, _business$professiona2;
|
|
274
|
+
var productSlug = (product === null || product === void 0 ? void 0 : product.slug) || (product === null || product === void 0 ? void 0 : product.id);
|
|
275
|
+
var categorySlug = (product === null || product === void 0 || (_product$category2 = product.category) === null || _product$category2 === void 0 ? void 0 : _product$category2.slug) || (product === null || product === void 0 ? void 0 : product.category_id);
|
|
272
276
|
if (!((product === null || product === void 0 ? void 0 : product.type) === 'service' && (business === null || business === void 0 || (_business$professiona2 = business.professionals) === null || _business$professiona2 === void 0 ? void 0 : _business$professiona2.length) > 0)) {
|
|
273
277
|
if (site !== null && site !== void 0 && site.product_url_template) {
|
|
274
|
-
var _product$category2;
|
|
275
278
|
onProductRedirect({
|
|
276
279
|
slug: business === null || business === void 0 ? void 0 : business.slug,
|
|
277
|
-
product: site.product_url_template.includes('product_slug') ?
|
|
278
|
-
category: site.product_url_template.includes('category_slug') ?
|
|
280
|
+
product: site.product_url_template.includes('product_slug') ? productSlug : product.id,
|
|
281
|
+
category: site.product_url_template.includes('category_slug') ? categorySlug : product.category_id
|
|
279
282
|
});
|
|
280
283
|
} else {
|
|
281
284
|
onProductRedirect({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.89",
|
|
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": "13.2.
|
|
91
|
+
"ordering-components-external": "13.2.22",
|
|
92
92
|
"payment": "^2.4.6",
|
|
93
93
|
"polished": "^3.6.6",
|
|
94
94
|
"react-bootstrap-icons": "^1.7.2",
|
|
@@ -165,12 +165,14 @@ const BusinessProductsListingUI = (props) => {
|
|
|
165
165
|
}
|
|
166
166
|
setProductLoading(false)
|
|
167
167
|
} else {
|
|
168
|
+
const productSlug = product?.slug || product?.id
|
|
169
|
+
const categorySlug = product?.category?.slug || product?.category_id
|
|
168
170
|
if (!((product?.type === 'service') && business?.professionals?.length > 0)) {
|
|
169
171
|
if (site?.product_url_template) {
|
|
170
172
|
onProductRedirect({
|
|
171
173
|
slug: business?.slug,
|
|
172
|
-
product: site.product_url_template.includes('product_slug') ?
|
|
173
|
-
category: site.product_url_template.includes('category_slug') ?
|
|
174
|
+
product: site.product_url_template.includes('product_slug') ? productSlug : product.id,
|
|
175
|
+
category: site.product_url_template.includes('category_slug') ? categorySlug : product.category_id
|
|
174
176
|
})
|
|
175
177
|
} else {
|
|
176
178
|
onProductRedirect({
|
|
@@ -187,12 +189,14 @@ const BusinessProductsListingUI = (props) => {
|
|
|
187
189
|
}
|
|
188
190
|
|
|
189
191
|
const handleCustomProductBannerClick = (product) => {
|
|
192
|
+
const productSlug = product?.slug || product?.id
|
|
193
|
+
const categorySlug = product?.category?.slug || product?.category_id
|
|
190
194
|
if (!((product?.type === 'service') && business?.professionals?.length > 0)) {
|
|
191
195
|
if (site?.product_url_template) {
|
|
192
196
|
onProductRedirect({
|
|
193
197
|
slug: business?.slug,
|
|
194
|
-
product: site.product_url_template.includes('product_slug') ?
|
|
195
|
-
category: site.product_url_template.includes('category_slug') ?
|
|
198
|
+
product: site.product_url_template.includes('product_slug') ? productSlug : product.id,
|
|
199
|
+
category: site.product_url_template.includes('category_slug') ? categorySlug : product.category_id
|
|
196
200
|
})
|
|
197
201
|
} else {
|
|
198
202
|
onProductRedirect({
|