ordering-ui-external 7.0.1 → 7.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_modules/themes/five/src/components/Checkout/index.js +3 -2
- package/_modules/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +2 -2
- package/_modules/themes/five/src/components/LastOrders/index.js +2 -1
- package/_modules/themes/five/src/components/OrderProgress/index.js +1 -0
- package/package.json +2 -2
- package/src/themes/five/src/components/Checkout/index.js +2 -1
- package/src/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +2 -2
- package/src/themes/five/src/components/LastOrders/index.js +2 -1
- package/src/themes/five/src/components/OrderProgress/index.js +1 -0
|
@@ -62,7 +62,7 @@ var mapConfigs = {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
var CheckoutUI = function CheckoutUI(props) {
|
|
65
|
-
var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _cart$comment, _validationFields$fie7, _validationFields$fie8, _validationFields$fie9, _validationFields$fie10, _validationFields$fie11, _validationFields$fie12, _paymethodSelected$da, _paymethodSelected$da2, _cardList$cards, _cartState$cart, _validationFields$fie13, _validationFields$fie14, _validationFields$fie15, _validationFields$fie16, _validationFields$fie17, _validationFields$fie18, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _instructionsOptions$2, _theme$checkout, _theme$checkout$compo, _theme$checkout$compo2, _theme$checkout$compo3, _theme$checkout$compo4, _theme$checkout2, _theme$checkout2$comp, _theme$checkout2$comp2, _theme$checkout3, _theme$checkout3$comp, _theme$checkout3$comp2, _theme$checkout4, _theme$checkout4$comp, _theme$checkout4$comp2, _validationFields$fie19, _validationFields$fie20, _validationFields$fie21, _loyaltyPlansState$re, _creditPointPlan$busi, _options$address, _businessDetails$busi3, _theme$images, _theme$images$dummies, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$busi8, _businessDetails$busi9, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi10, _businessDetails$busi11, _businessDetails$busi12, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cartState$cart$spot_, _cartState$cart2, _cart$business3, _cart$products2, _ref, _creditPointPlanOnBus, _configs$driver_tip_t3, _configs$driver_tip_u2, _configs$driver_tip_t4, _validationFields$fie30, _validationFields$fie31, _validationFields$fie32, _validationFields$fie33, _validationFields$fie34, _validationFields$fie35, _customerState$user3;
|
|
65
|
+
var _businessDetails$busi, _businessDetails$busi2, _configs$table_numer_, _businessConfigs$find, _businessConfigs$find2, _configs$cash_wallet, _configs$wallet_enabl, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _validationFields$fie, _validationFields$fie2, _validationFields$fie3, _validationFields$fie4, _validationFields$fie5, _validationFields$fie6, _cart$comment, _validationFields$fie7, _validationFields$fie8, _validationFields$fie9, _validationFields$fie10, _validationFields$fie11, _validationFields$fie12, _paymethodSelected$da, _paymethodSelected$da2, _paymethodSelected$da3, _cardList$cards, _cartState$cart, _validationFields$fie13, _validationFields$fie14, _validationFields$fie15, _validationFields$fie16, _validationFields$fie17, _validationFields$fie18, _configs$driver_tip_o, _configs$driver_tip_o2, _configs$driver_tip_o3, _instructionsOptions$, _instructionsOptions$2, _theme$checkout, _theme$checkout$compo, _theme$checkout$compo2, _theme$checkout$compo3, _theme$checkout$compo4, _theme$checkout2, _theme$checkout2$comp, _theme$checkout2$comp2, _theme$checkout3, _theme$checkout3$comp, _theme$checkout3$comp2, _theme$checkout4, _theme$checkout4$comp, _theme$checkout4$comp2, _validationFields$fie19, _validationFields$fie20, _validationFields$fie21, _loyaltyPlansState$re, _creditPointPlan$busi, _options$address, _businessDetails$busi3, _theme$images, _theme$images$dummies, _configs$google_maps_, _customerState$user, _customerState$user2, _Object$values, _businessDetails$busi4, _businessDetails$busi5, _businessDetails$busi6, _businessDetails$busi7, _businessDetails$busi8, _businessDetails$busi9, _businessDetails$erro, _businessDetails$erro2, _businessDetails$busi10, _businessDetails$busi11, _businessDetails$busi12, _configs$driver_tip_t, _configs$driver_tip_u, _configs$driver_tip_t2, _cartState$cart$spot_, _cartState$cart2, _cart$business3, _cart$products2, _ref, _creditPointPlanOnBus, _configs$driver_tip_t3, _configs$driver_tip_u2, _configs$driver_tip_t4, _validationFields$fie30, _validationFields$fie31, _validationFields$fie32, _validationFields$fie33, _validationFields$fie34, _validationFields$fie35, _customerState$user3;
|
|
66
66
|
var cart = props.cart,
|
|
67
67
|
errors = props.errors,
|
|
68
68
|
placing = props.placing,
|
|
@@ -190,7 +190,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
190
190
|
// const [hasBusinessPlaces, setHasBusinessPlaces] = useState(null)
|
|
191
191
|
|
|
192
192
|
var validateCommentsCartField = (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie = validationFields.fields) === null || _validationFields$fie === void 0 ? void 0 : (_validationFields$fie2 = _validationFields$fie.checkout) === null || _validationFields$fie2 === void 0 ? void 0 : (_validationFields$fie3 = _validationFields$fie2.comments) === null || _validationFields$fie3 === void 0 ? void 0 : _validationFields$fie3.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie4 = validationFields.fields) === null || _validationFields$fie4 === void 0 ? void 0 : (_validationFields$fie5 = _validationFields$fie4.checkout) === null || _validationFields$fie5 === void 0 ? void 0 : (_validationFields$fie6 = _validationFields$fie5.comments) === null || _validationFields$fie6 === void 0 ? void 0 : _validationFields$fie6.required) && ((cart === null || cart === void 0 ? void 0 : cart.comment) === null || (cart === null || cart === void 0 ? void 0 : (_cart$comment = cart.comment) === null || _cart$comment === void 0 ? void 0 : _cart$comment.trim().length) === 0);
|
|
193
|
-
var validateZipcodeCard = (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie7 = validationFields.fields) === null || _validationFields$fie7 === void 0 ? void 0 : (_validationFields$fie8 = _validationFields$fie7.card) === null || _validationFields$fie8 === void 0 ? void 0 : (_validationFields$fie9 = _validationFields$fie8.zipcode) === null || _validationFields$fie9 === void 0 ? void 0 : _validationFields$fie9.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie10 = validationFields.fields) === null || _validationFields$fie10 === void 0 ? void 0 : (_validationFields$fie11 = _validationFields$fie10.card) === null || _validationFields$fie11 === void 0 ? void 0 : (_validationFields$fie12 = _validationFields$fie11.zipcode) === null || _validationFields$fie12 === void 0 ? void 0 : _validationFields$fie12.required) && !(paymethodSelected !== null && paymethodSelected !== void 0 && (_paymethodSelected$
|
|
193
|
+
var validateZipcodeCard = (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie7 = validationFields.fields) === null || _validationFields$fie7 === void 0 ? void 0 : (_validationFields$fie8 = _validationFields$fie7.card) === null || _validationFields$fie8 === void 0 ? void 0 : (_validationFields$fie9 = _validationFields$fie8.zipcode) === null || _validationFields$fie9 === void 0 ? void 0 : _validationFields$fie9.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie10 = validationFields.fields) === null || _validationFields$fie10 === void 0 ? void 0 : (_validationFields$fie11 = _validationFields$fie10.card) === null || _validationFields$fie11 === void 0 ? void 0 : (_validationFields$fie12 = _validationFields$fie11.zipcode) === null || _validationFields$fie12 === void 0 ? void 0 : _validationFields$fie12.required) && (paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) === 'stripe' && (paymethodSelected === null || paymethodSelected === void 0 ? void 0 : (_paymethodSelected$da = paymethodSelected.data) === null || _paymethodSelected$da === void 0 ? void 0 : _paymethodSelected$da.card) && !(paymethodSelected !== null && paymethodSelected !== void 0 && (_paymethodSelected$da2 = paymethodSelected.data) !== null && _paymethodSelected$da2 !== void 0 && (_paymethodSelected$da3 = _paymethodSelected$da2.card) !== null && _paymethodSelected$da3 !== void 0 && _paymethodSelected$da3.zipcode);
|
|
194
194
|
var isDisablePlaceOrderButton = !(cart !== null && cart !== void 0 && cart.valid) || !paymethodSelected && (cart === null || cart === void 0 ? void 0 : cart.balance) > 0 || cardsMethods.includes(paymethodSelected === null || paymethodSelected === void 0 ? void 0 : paymethodSelected.gateway) && (cardList === null || cardList === void 0 ? void 0 : (_cardList$cards = cardList.cards) === null || _cardList$cards === void 0 ? void 0 : _cardList$cards.length) === 0 || placing || errorCash || loading || isTableNumberEnabled === '1' && (options === null || options === void 0 ? void 0 : options.type) === 3 && !(cartState !== null && cartState !== void 0 && (_cartState$cart = cartState.cart) !== null && _cartState$cart !== void 0 && _cartState$cart.spot_number || cart !== null && cart !== void 0 && cart.spot_number || placeSpotNumber) || !(cart !== null && cart !== void 0 && cart.valid_maximum) || !(cart !== null && cart !== void 0 && cart.valid_minimum) && !((cart === null || cart === void 0 ? void 0 : cart.discount_type) === 1 && (cart === null || cart === void 0 ? void 0 : cart.discount_rate) === 100) ||
|
|
195
195
|
// (((placeSpotTypes.includes(options?.type) && !cart?.place) && hasBusinessPlaces)) ||
|
|
196
196
|
options.type === 1 && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie13 = validationFields.fields) === null || _validationFields$fie13 === void 0 ? void 0 : (_validationFields$fie14 = _validationFields$fie13.checkout) === null || _validationFields$fie14 === void 0 ? void 0 : (_validationFields$fie15 = _validationFields$fie14.driver_tip) === null || _validationFields$fie15 === void 0 ? void 0 : _validationFields$fie15.enabled) && (validationFields === null || validationFields === void 0 ? void 0 : (_validationFields$fie16 = validationFields.fields) === null || _validationFields$fie16 === void 0 ? void 0 : (_validationFields$fie17 = _validationFields$fie16.checkout) === null || _validationFields$fie17 === void 0 ? void 0 : (_validationFields$fie18 = _validationFields$fie17.driver_tip) === null || _validationFields$fie18 === void 0 ? void 0 : _validationFields$fie18.required) && Number(cart === null || cart === void 0 ? void 0 : cart.driver_tip) <= 0 || validateCommentsCartField || validateZipcodeCard;
|
|
@@ -597,6 +597,7 @@ var CheckoutUI = function CheckoutUI(props) {
|
|
|
597
597
|
requiredFields: requiredFields,
|
|
598
598
|
setIsSuccess: setIsSuccess,
|
|
599
599
|
isCheckout: true,
|
|
600
|
+
isCheckoutPlace: true,
|
|
600
601
|
isEdit: true,
|
|
601
602
|
isModal: true,
|
|
602
603
|
handlePlaceOrderAsGuest: handlePlaceOrderAsGuest,
|
|
@@ -58,7 +58,7 @@ var RedeemGiftCardUI = function RedeemGiftCardUI(props) {
|
|
|
58
58
|
string = string.replace(/-/g, '');
|
|
59
59
|
if (!string) return;
|
|
60
60
|
var codeSlices = string.match(/.{1,4}/g);
|
|
61
|
-
string = codeSlices.join('-');
|
|
61
|
+
string = codeSlices.join('-').toUpperCase();
|
|
62
62
|
codeRef.current.value = string;
|
|
63
63
|
};
|
|
64
64
|
(0, _react.useEffect)(function () {
|
|
@@ -92,7 +92,7 @@ var RedeemGiftCardUI = function RedeemGiftCardUI(props) {
|
|
|
92
92
|
autoComplete: "off",
|
|
93
93
|
ref: codeRef,
|
|
94
94
|
onChange: function onChange(e) {
|
|
95
|
-
_onChange(e.target.value);
|
|
95
|
+
_onChange(e.target.value.toUpperCase());
|
|
96
96
|
handleChangeCode(e);
|
|
97
97
|
}
|
|
98
98
|
});
|
|
@@ -89,7 +89,8 @@ var LastOrders = function LastOrders(props) {
|
|
|
89
89
|
initialPage: 1,
|
|
90
90
|
pageSize: 1,
|
|
91
91
|
controlType: 'infinity'
|
|
92
|
-
}
|
|
92
|
+
},
|
|
93
|
+
noGiftCardOrders: true
|
|
93
94
|
});
|
|
94
95
|
return /*#__PURE__*/_react.default.createElement(_orderingComponentsExternal.OrderList, lastOrdersProps);
|
|
95
96
|
};
|
|
@@ -117,6 +117,7 @@ var OrderProgress = function OrderProgress(props) {
|
|
|
117
117
|
UIComponent: OrderProgressUI,
|
|
118
118
|
orderStatus: [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23],
|
|
119
119
|
useDefualtSessionManager: true,
|
|
120
|
+
noGiftCardOrders: true,
|
|
120
121
|
paginationSettings: {
|
|
121
122
|
initialPage: 1,
|
|
122
123
|
pageSize: 10,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.4",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"lodash": "^4.17.19",
|
|
88
88
|
"moment": "^2.29.4",
|
|
89
89
|
"nanoid": "^4.0.0",
|
|
90
|
-
"ordering-components-external": "6.0.
|
|
90
|
+
"ordering-components-external": "6.0.1",
|
|
91
91
|
"payment": "^2.4.6",
|
|
92
92
|
"polished": "^3.6.6",
|
|
93
93
|
"react-bootstrap-icons": "^1.7.2",
|
|
@@ -147,7 +147,7 @@ const CheckoutUI = (props) => {
|
|
|
147
147
|
const validateCommentsCartField = validationFields?.fields?.checkout?.comments?.enabled && validationFields?.fields?.checkout?.comments?.required && (cart?.comment === null || cart?.comment?.trim().length === 0)
|
|
148
148
|
|
|
149
149
|
const validateZipcodeCard =
|
|
150
|
-
validationFields?.fields?.card?.zipcode?.enabled && validationFields?.fields?.card?.zipcode?.required && !paymethodSelected?.data?.card?.zipcode
|
|
150
|
+
validationFields?.fields?.card?.zipcode?.enabled && validationFields?.fields?.card?.zipcode?.required && paymethodSelected?.gateway === 'stripe' && paymethodSelected?.data?.card && !paymethodSelected?.data?.card?.zipcode
|
|
151
151
|
|
|
152
152
|
const isDisablePlaceOrderButton = !cart?.valid ||
|
|
153
153
|
(!paymethodSelected && cart?.balance > 0) ||
|
|
@@ -730,6 +730,7 @@ const CheckoutUI = (props) => {
|
|
|
730
730
|
requiredFields={requiredFields}
|
|
731
731
|
setIsSuccess={setIsSuccess}
|
|
732
732
|
isCheckout
|
|
733
|
+
isCheckoutPlace
|
|
733
734
|
isEdit
|
|
734
735
|
isModal
|
|
735
736
|
handlePlaceOrderAsGuest={handlePlaceOrderAsGuest}
|
|
@@ -35,7 +35,7 @@ const RedeemGiftCardUI = (props) => {
|
|
|
35
35
|
string = string.replace(/-/g, '')
|
|
36
36
|
if (!string) return
|
|
37
37
|
const codeSlices = string.match(/.{1,4}/g)
|
|
38
|
-
string = codeSlices.join('-')
|
|
38
|
+
string = codeSlices.join('-').toUpperCase()
|
|
39
39
|
codeRef.current.value = string
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -73,7 +73,7 @@ const RedeemGiftCardUI = (props) => {
|
|
|
73
73
|
autoComplete='off'
|
|
74
74
|
ref={codeRef}
|
|
75
75
|
onChange={e => {
|
|
76
|
-
onChange(e.target.value)
|
|
76
|
+
onChange((e.target.value).toUpperCase())
|
|
77
77
|
handleChangeCode(e)
|
|
78
78
|
}}
|
|
79
79
|
/>
|
|
@@ -137,6 +137,7 @@ export const OrderProgress = (props) => {
|
|
|
137
137
|
UIComponent: OrderProgressUI,
|
|
138
138
|
orderStatus: [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23],
|
|
139
139
|
useDefualtSessionManager: true,
|
|
140
|
+
noGiftCardOrders: true,
|
|
140
141
|
paginationSettings: {
|
|
141
142
|
initialPage: 1,
|
|
142
143
|
pageSize: 10,
|