ordering-components-external 13.2.10 → 13.2.12
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-component.1c87dfe9715d20320107.js → 7.ordering-component.42ec5fef3ccdf425c509.js} +1 -1
- package/_bundles/{ordering-component.1c87dfe9715d20320107.js → ordering-component.42ec5fef3ccdf425c509.js} +2 -2
- package/_modules/constants/code-numbers.js +4 -0
- package/_modules/contexts/OrderContext/index.js +0 -6
- package/package.json +1 -1
- package/src/constants/code-numbers.js +1 -0
- package/src/contexts/OrderContext/index.js +0 -6
- /package/_bundles/{0.ordering-component.1c87dfe9715d20320107.js → 0.ordering-component.42ec5fef3ccdf425c509.js} +0 -0
- /package/_bundles/{1.ordering-component.1c87dfe9715d20320107.js → 1.ordering-component.42ec5fef3ccdf425c509.js} +0 -0
- /package/_bundles/{2.ordering-component.1c87dfe9715d20320107.js → 2.ordering-component.42ec5fef3ccdf425c509.js} +0 -0
- /package/_bundles/{4.ordering-component.1c87dfe9715d20320107.js → 4.ordering-component.42ec5fef3ccdf425c509.js} +0 -0
- /package/_bundles/{5.ordering-component.1c87dfe9715d20320107.js → 5.ordering-component.42ec5fef3ccdf425c509.js} +0 -0
- /package/_bundles/{6.ordering-component.1c87dfe9715d20320107.js → 6.ordering-component.42ec5fef3ccdf425c509.js} +0 -0
- /package/_bundles/{7.ordering-component.1c87dfe9715d20320107.js.LICENSE.txt → 7.ordering-component.42ec5fef3ccdf425c509.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-component.1c87dfe9715d20320107.js → 8.ordering-component.42ec5fef3ccdf425c509.js} +0 -0
- /package/_bundles/{ordering-component.1c87dfe9715d20320107.js.LICENSE.txt → ordering-component.42ec5fef3ccdf425c509.js.LICENSE.txt} +0 -0
|
@@ -593,7 +593,6 @@ var OrderProvider = exports.OrderProvider = function OrderProvider(_ref) {
|
|
|
593
593
|
options = {};
|
|
594
594
|
state.loading = true;
|
|
595
595
|
options.headers = {
|
|
596
|
-
'X-App-X': ordering.appId,
|
|
597
596
|
'X-Socket-Id-X': socket === null || socket === void 0 ? void 0 : socket.getId()
|
|
598
597
|
};
|
|
599
598
|
countryCode = changes !== null && changes !== void 0 && changes.country_code && (changes === null || changes === void 0 ? void 0 : changes.country_code) !== (state === null || state === void 0 || (_state$options11 = state.options) === null || _state$options11 === void 0 || (_state$options11 = _state$options11.address) === null || _state$options11 === void 0 ? void 0 : _state$options11.country_code) ? changes === null || changes === void 0 ? void 0 : changes.country_code : (_ref8 = countryCodeFromLocalStorage !== null && countryCodeFromLocalStorage !== void 0 ? countryCodeFromLocalStorage : changes === null || changes === void 0 ? void 0 : changes.country_code) !== null && _ref8 !== void 0 ? _ref8 : state === null || state === void 0 || (_state$options12 = state.options) === null || _state$options12 === void 0 || (_state$options12 = _state$options12.address) === null || _state$options12 === void 0 ? void 0 : _state$options12.country_code;
|
|
@@ -906,7 +905,6 @@ var OrderProvider = exports.OrderProvider = function OrderProvider(_ref) {
|
|
|
906
905
|
_context9.next = 12;
|
|
907
906
|
return ordering.setAccessToken(session.token).carts().removeProduct(body, {
|
|
908
907
|
headers: {
|
|
909
|
-
'X-App-X': ordering.appId,
|
|
910
908
|
'X-Socket-Id-X': socket === null || socket === void 0 ? void 0 : socket.getId(),
|
|
911
909
|
'X-Country-Code-X': countryCode
|
|
912
910
|
}
|
|
@@ -1198,7 +1196,6 @@ var OrderProvider = exports.OrderProvider = function OrderProvider(_ref) {
|
|
|
1198
1196
|
_context12.next = 29;
|
|
1199
1197
|
return ordering.setAccessToken(session.token).carts().applyCoupon(body, {
|
|
1200
1198
|
headers: {
|
|
1201
|
-
'X-App-X': ordering.appId,
|
|
1202
1199
|
'X-Socket-Id-X': socket === null || socket === void 0 ? void 0 : socket.getId(),
|
|
1203
1200
|
'X-Country-Code-X': countryCode
|
|
1204
1201
|
}
|
|
@@ -1824,7 +1821,6 @@ var OrderProvider = exports.OrderProvider = function OrderProvider(_ref) {
|
|
|
1824
1821
|
_context19.next = 13;
|
|
1825
1822
|
return ordering.setAccessToken(session.token).carts(cardId).confirmWithData(body, {
|
|
1826
1823
|
headers: {
|
|
1827
|
-
'X-App-X': ordering.appId,
|
|
1828
1824
|
'X-Socket-Id-X': socket === null || socket === void 0 ? void 0 : socket.getId(),
|
|
1829
1825
|
'X-Country-Code-X': countryCode
|
|
1830
1826
|
}
|
|
@@ -1837,7 +1833,6 @@ var OrderProvider = exports.OrderProvider = function OrderProvider(_ref) {
|
|
|
1837
1833
|
_context19.next = 18;
|
|
1838
1834
|
return ordering.setAccessToken(session.token).carts(cardId).confirm(body, {
|
|
1839
1835
|
headers: {
|
|
1840
|
-
'X-App-X': ordering.appId,
|
|
1841
1836
|
'X-Socket-Id-X': socket === null || socket === void 0 ? void 0 : socket.getId(),
|
|
1842
1837
|
'X-Country-Code-X': countryCode
|
|
1843
1838
|
}
|
|
@@ -1998,7 +1993,6 @@ var OrderProvider = exports.OrderProvider = function OrderProvider(_ref) {
|
|
|
1998
1993
|
} : null;
|
|
1999
1994
|
options = {
|
|
2000
1995
|
headers: {
|
|
2001
|
-
'X-App-X': ordering.appId,
|
|
2002
1996
|
'X-Socket-Id-X': socket === null || socket === void 0 ? void 0 : socket.getId(),
|
|
2003
1997
|
'X-Country-Code-X': countryCode
|
|
2004
1998
|
}
|
package/package.json
CHANGED
|
@@ -187,6 +187,7 @@ export const CODES = [
|
|
|
187
187
|
{ countryCode: 'SI', phoneCode: '963', countryName: 'Syria' },
|
|
188
188
|
{ countryCode: 'TW', phoneCode: '886', countryName: 'Taiwan' },
|
|
189
189
|
{ countryCode: 'TJ', phoneCode: '7', countryName: 'Tajikst' },
|
|
190
|
+
{ countryCode: 'TZ', phoneCode: '255', countryName: 'Tanzania' },
|
|
190
191
|
{ countryCode: 'TH', phoneCode: '66', countryName: 'Thailand' },
|
|
191
192
|
{ countryCode: 'TG', phoneCode: '228', countryName: 'Togo' },
|
|
192
193
|
{ countryCode: 'TO', phoneCode: '676', countryName: 'Tonga' },
|
|
@@ -354,7 +354,6 @@ export const OrderProvider = ({ Alert, children, strategy, isAlsea, isDisableToa
|
|
|
354
354
|
const options = {}
|
|
355
355
|
state.loading = true
|
|
356
356
|
options.headers = {
|
|
357
|
-
'X-App-X': ordering.appId,
|
|
358
357
|
'X-Socket-Id-X': socket?.getId()
|
|
359
358
|
}
|
|
360
359
|
const countryCode = changes?.country_code && changes?.country_code !== state?.options?.address?.country_code
|
|
@@ -551,7 +550,6 @@ export const OrderProvider = ({ Alert, children, strategy, isAlsea, isDisableToa
|
|
|
551
550
|
}
|
|
552
551
|
const { content: { error, result } } = await ordering.setAccessToken(session.token).carts().removeProduct(body, {
|
|
553
552
|
headers: {
|
|
554
|
-
'X-App-X': ordering.appId,
|
|
555
553
|
'X-Socket-Id-X': socket?.getId(),
|
|
556
554
|
'X-Country-Code-X': countryCode
|
|
557
555
|
}
|
|
@@ -699,7 +697,6 @@ export const OrderProvider = ({ Alert, children, strategy, isAlsea, isDisableToa
|
|
|
699
697
|
.carts()
|
|
700
698
|
.applyCoupon(body, {
|
|
701
699
|
headers: {
|
|
702
|
-
'X-App-X': ordering.appId,
|
|
703
700
|
'X-Socket-Id-X': socket?.getId(),
|
|
704
701
|
'X-Country-Code-X': countryCode
|
|
705
702
|
}
|
|
@@ -1018,7 +1015,6 @@ export const OrderProvider = ({ Alert, children, strategy, isAlsea, isDisableToa
|
|
|
1018
1015
|
if (body.user_id === userCustomerId || data) {
|
|
1019
1016
|
fetchurl = await ordering.setAccessToken(session.token).carts(cardId).confirmWithData(body, {
|
|
1020
1017
|
headers: {
|
|
1021
|
-
'X-App-X': ordering.appId,
|
|
1022
1018
|
'X-Socket-Id-X': socket?.getId(),
|
|
1023
1019
|
'X-Country-Code-X': countryCode
|
|
1024
1020
|
}
|
|
@@ -1026,7 +1022,6 @@ export const OrderProvider = ({ Alert, children, strategy, isAlsea, isDisableToa
|
|
|
1026
1022
|
} else {
|
|
1027
1023
|
fetchurl = await ordering.setAccessToken(session.token).carts(cardId).confirm(body, {
|
|
1028
1024
|
headers: {
|
|
1029
|
-
'X-App-X': ordering.appId,
|
|
1030
1025
|
'X-Socket-Id-X': socket?.getId(),
|
|
1031
1026
|
'X-Country-Code-X': countryCode
|
|
1032
1027
|
}
|
|
@@ -1109,7 +1104,6 @@ export const OrderProvider = ({ Alert, children, strategy, isAlsea, isDisableToa
|
|
|
1109
1104
|
: null
|
|
1110
1105
|
const options = {
|
|
1111
1106
|
headers: {
|
|
1112
|
-
'X-App-X': ordering.appId,
|
|
1113
1107
|
'X-Socket-Id-X': socket?.getId(),
|
|
1114
1108
|
'X-Country-Code-X': countryCode
|
|
1115
1109
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|