@ancon/wildcat-utils 1.51.0-check-optimizations.1 → 1.51.0-check-optimizations.3
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/{_baseIsEqual-5e6adb07.mjs → _baseIsEqual-4ee44a4c.mjs} +1 -1
- package/{_baseIsEqual-ad544573.js → _baseIsEqual-7e335f42.js} +1 -1
- package/_baseIteratee-374c60ca.js +1 -0
- package/{_baseIteratee-db1f278d.mjs → _baseIteratee-5fbe491c.mjs} +21 -20
- package/_getTag-3d3032da.js +1 -0
- package/{_getTag-fcc5160b.mjs → _getTag-ebc0f90e.mjs} +20 -24
- package/api/getMediaImageClosestSize.d.ts +2 -0
- package/api/getMediaImageClosestSize.js +1 -0
- package/api/getMediaImageClosestSize.mjs +31 -0
- package/api/index.d.ts +2 -1
- package/api/index.js +1 -1
- package/api/index.mjs +8 -6
- package/card/getPrepaidWalletScanReadingInfo.d.ts +7 -0
- package/card/getPrepaidWalletScanReadingInfo.js +1 -0
- package/card/getPrepaidWalletScanReadingInfo.mjs +32 -0
- package/card/getScannedWalletReadingInfo.d.ts +1 -0
- package/card/index.d.ts +2 -0
- package/card/index.js +1 -1
- package/card/index.mjs +7 -4
- package/check/getOrganizedCheckItemModifications.js +1 -1
- package/check/getOrganizedCheckItemModifications.mjs +65 -64
- package/check/index.js +1 -1
- package/check/index.mjs +9 -8
- package/checkout/getCheckoutOrderStatusTexts.js +1 -1
- package/checkout/getCheckoutOrderStatusTexts.mjs +7 -6
- package/checkout/index.js +1 -1
- package/checkout/index.mjs +61 -60
- package/checkout/isCheckoutItemsAreEqual.js +1 -1
- package/checkout/isCheckoutItemsAreEqual.mjs +8 -7
- package/hangfire/createHangfirePoller.d.ts +13 -2
- package/hangfire/createHangfirePoller.js +1 -1
- package/hangfire/createHangfirePoller.mjs +153 -87
- package/hangfire/createMakeHangfireRequest.d.ts +2 -0
- package/hangfire/createMakeHangfireRequest.js +1 -1
- package/hangfire/createMakeHangfireRequest.mjs +18 -17
- package/{identity-cf449299.mjs → identity-41198897.mjs} +1 -1
- package/{identity-2a048185.js → identity-58f9497d.js} +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +372 -365
- package/isObject-361bd834.js +1 -0
- package/isObject-b8638513.mjs +7 -0
- package/multilingual/createLocalizedCheckDetails.d.ts +16 -0
- package/multilingual/createLocalizedCheckDetails.js +1 -0
- package/multilingual/createLocalizedCheckDetails.mjs +53 -0
- package/multilingual/index.d.ts +2 -0
- package/multilingual/index.js +1 -0
- package/multilingual/index.mjs +5 -0
- package/order/getCheckOrderItemsMappedByTicketItemStatus.js +1 -1
- package/order/getCheckOrderItemsMappedByTicketItemStatus.mjs +7 -6
- package/order/getCheckOrderMinimumStatusTicketItem.js +1 -1
- package/order/getCheckOrderMinimumStatusTicketItem.mjs +20 -19
- package/order/index.js +1 -1
- package/order/index.mjs +11 -10
- package/outlet/getOutletCurrentClosingTimeText.js +1 -1
- package/outlet/getOutletCurrentClosingTimeText.mjs +10 -9
- package/outlet/getOutletTodayOpeningTimes.js +1 -1
- package/outlet/getOutletTodayOpeningTimes.mjs +7 -6
- package/outlet/index.d.ts +2 -1
- package/outlet/index.js +1 -1
- package/outlet/index.mjs +71 -68
- package/outlet/isOutletAcceptingPreOrdersWhenClosed.d.ts +2 -0
- package/outlet/isOutletAcceptingPreOrdersWhenClosed.js +1 -0
- package/outlet/isOutletAcceptingPreOrdersWhenClosed.mjs +14 -0
- package/outlet/serviceDateTimesFromOpeningHours.js +1 -1
- package/outlet/serviceDateTimesFromOpeningHours.mjs +29 -28
- package/package.json +26 -1
- package/preOrder/isGroupPreOrder.d.ts +6 -4
- package/preOrder/isGroupPreOrder.js +1 -1
- package/preOrder/isGroupPreOrder.mjs +4 -4
- package/preOrder/isPreOrderLink.d.ts +6 -4
- package/preOrder/isPreOrderLink.js +1 -1
- package/preOrder/isPreOrderLink.mjs +4 -4
- package/preOrder/isPreOrderSharable.d.ts +6 -4
- package/preOrder/isPreOrderSharable.js +1 -1
- package/preOrder/isPreOrderSharable.mjs +1 -1
- package/signalr/SignalR.js +1 -1
- package/signalr/SignalR.mjs +62 -62
- package/signalr/types.d.ts +2 -0
- package/_baseIteratee-ae97e42e.js +0 -1
- package/_getTag-d4cd1660.js +0 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { ModificationType as y } from "@ancon/wildcat-types";
|
|
2
2
|
import { i as F, a as q } from "../toString-ce418705.mjs";
|
|
3
|
-
import { i as x, b as E } from "../identity-
|
|
4
|
-
import { b as G } from "../_baseIteratee-
|
|
5
|
-
import { k as L,
|
|
3
|
+
import { i as x, b as E } from "../identity-41198897.mjs";
|
|
4
|
+
import { b as G } from "../_baseIteratee-5fbe491c.mjs";
|
|
5
|
+
import { k as L, m as P, u as Q } from "../_getTag-ebc0f90e.mjs";
|
|
6
6
|
import { a as $ } from "../isObjectLike-54341556.mjs";
|
|
7
7
|
import T from "./getUniqueCheckItemModificationId.mjs";
|
|
8
|
-
import "../_baseIsEqual-
|
|
8
|
+
import "../_baseIsEqual-4ee44a4c.mjs";
|
|
9
|
+
import "../isObject-b8638513.mjs";
|
|
9
10
|
function U(n) {
|
|
10
11
|
return function(i, t, o) {
|
|
11
|
-
for (var d = -1, r = Object(i),
|
|
12
|
-
var a =
|
|
12
|
+
for (var d = -1, r = Object(i), u = o(i), f = u.length; f--; ) {
|
|
13
|
+
var a = u[n ? f : ++d];
|
|
13
14
|
if (t(r[a], a, r) === !1)
|
|
14
15
|
break;
|
|
15
16
|
}
|
|
@@ -21,127 +22,127 @@ const z = Z;
|
|
|
21
22
|
function V(n, i) {
|
|
22
23
|
return n && z(n, i, L);
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
+
function H(n, i) {
|
|
25
26
|
return function(t, o) {
|
|
26
27
|
if (t == null)
|
|
27
28
|
return t;
|
|
28
29
|
if (!P(t))
|
|
29
30
|
return n(t, o);
|
|
30
|
-
for (var d = t.length, r = i ? d : -1,
|
|
31
|
+
for (var d = t.length, r = i ? d : -1, u = Object(t); (i ? r-- : ++r < d) && o(u[r], r, u) !== !1; )
|
|
31
32
|
;
|
|
32
33
|
return t;
|
|
33
34
|
};
|
|
34
35
|
}
|
|
35
|
-
var
|
|
36
|
-
const
|
|
37
|
-
function
|
|
36
|
+
var J = H(V);
|
|
37
|
+
const K = J;
|
|
38
|
+
function W(n, i) {
|
|
38
39
|
var t = -1, o = P(n) ? Array(n.length) : [];
|
|
39
|
-
return
|
|
40
|
-
o[++t] = i(d, r,
|
|
40
|
+
return K(n, function(d, r, u) {
|
|
41
|
+
o[++t] = i(d, r, u);
|
|
41
42
|
}), o;
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function X(n, i) {
|
|
44
45
|
var t = n.length;
|
|
45
46
|
for (n.sort(i); t--; )
|
|
46
47
|
n[t] = n[t].value;
|
|
47
48
|
return n;
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
+
function Y(n, i) {
|
|
50
51
|
if (n !== i) {
|
|
51
|
-
var t = n !== void 0, o = n === null, d = n === n, r = F(n),
|
|
52
|
-
if (!f && !
|
|
52
|
+
var t = n !== void 0, o = n === null, d = n === n, r = F(n), u = i !== void 0, f = i === null, a = i === i, e = F(i);
|
|
53
|
+
if (!f && !e && !r && n > i || r && u && a && !f && !e || o && u && a || !t && a || !d)
|
|
53
54
|
return 1;
|
|
54
|
-
if (!o && !r && !
|
|
55
|
+
if (!o && !r && !e && n < i || e && t && d && !o && !r || f && t && d || !u && d || !a)
|
|
55
56
|
return -1;
|
|
56
57
|
}
|
|
57
58
|
return 0;
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
-
for (var o = -1, d = n.criteria, r = i.criteria,
|
|
61
|
-
var a =
|
|
60
|
+
function _(n, i, t) {
|
|
61
|
+
for (var o = -1, d = n.criteria, r = i.criteria, u = d.length, f = t.length; ++o < u; ) {
|
|
62
|
+
var a = Y(d[o], r[o]);
|
|
62
63
|
if (a) {
|
|
63
64
|
if (o >= f)
|
|
64
65
|
return a;
|
|
65
|
-
var
|
|
66
|
-
return a * (
|
|
66
|
+
var e = t[o];
|
|
67
|
+
return a * (e == "desc" ? -1 : 1);
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
return n.index - i.index;
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
+
function j(n, i, t) {
|
|
72
73
|
i.length ? i = q(i, function(r) {
|
|
73
|
-
return $(r) ? function(
|
|
74
|
-
return E(
|
|
74
|
+
return $(r) ? function(u) {
|
|
75
|
+
return E(u, r.length === 1 ? r[0] : r);
|
|
75
76
|
} : r;
|
|
76
77
|
}) : i = [x];
|
|
77
78
|
var o = -1;
|
|
78
79
|
i = q(i, Q(G));
|
|
79
|
-
var d =
|
|
80
|
-
var a = q(i, function(
|
|
81
|
-
return
|
|
80
|
+
var d = W(n, function(r, u, f) {
|
|
81
|
+
var a = q(i, function(e) {
|
|
82
|
+
return e(r);
|
|
82
83
|
});
|
|
83
84
|
return { criteria: a, index: ++o, value: r };
|
|
84
85
|
});
|
|
85
|
-
return
|
|
86
|
-
return
|
|
86
|
+
return X(d, function(r, u) {
|
|
87
|
+
return _(r, u, t);
|
|
87
88
|
});
|
|
88
89
|
}
|
|
89
90
|
function C(n, i, t, o) {
|
|
90
|
-
return n == null ? [] : ($(i) || (i = i == null ? [] : [i]), t = o ? void 0 : t, $(t) || (t = t == null ? [] : [t]),
|
|
91
|
+
return n == null ? [] : ($(i) || (i = i == null ? [] : [i]), t = o ? void 0 : t, $(t) || (t = t == null ? [] : [t]), j(n, i, t));
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
+
function rn(n, i, t) {
|
|
93
94
|
const { add: o, replace: d, remove: r } = (i ?? []).reduce(
|
|
94
|
-
(a,
|
|
95
|
+
(a, e) => {
|
|
95
96
|
const {
|
|
96
97
|
modification: h,
|
|
97
|
-
position:
|
|
98
|
-
freeAmount:
|
|
98
|
+
position: c,
|
|
99
|
+
freeAmount: p,
|
|
99
100
|
name: m = "",
|
|
100
101
|
quantity: s,
|
|
101
102
|
cost: g,
|
|
102
103
|
replacementName: O
|
|
103
|
-
} =
|
|
104
|
-
if (
|
|
105
|
-
(
|
|
106
|
-
id: T(
|
|
104
|
+
} = e, A = g === 0;
|
|
105
|
+
if (e.modification === y.Add) {
|
|
106
|
+
(p > 0 || A) && a.add.push({
|
|
107
|
+
id: T(e, "-free"),
|
|
107
108
|
modificationType: h,
|
|
108
109
|
name: m,
|
|
109
|
-
freeAmount: A ? s :
|
|
110
|
-
quantity: A ? s :
|
|
110
|
+
freeAmount: A ? s : p,
|
|
111
|
+
quantity: A ? s : p,
|
|
111
112
|
currency: n,
|
|
112
|
-
position:
|
|
113
|
+
position: c,
|
|
113
114
|
cost: 0
|
|
114
115
|
});
|
|
115
|
-
const b = s -
|
|
116
|
+
const b = s - p;
|
|
116
117
|
b > 0 && !A && a.add.push({
|
|
117
|
-
id: T(
|
|
118
|
+
id: T(e),
|
|
118
119
|
modificationType: h,
|
|
119
120
|
name: m,
|
|
120
121
|
quantity: b,
|
|
121
122
|
freeAmount: 0,
|
|
122
123
|
currency: n,
|
|
123
|
-
position:
|
|
124
|
+
position: c,
|
|
124
125
|
cost: g * b
|
|
125
126
|
});
|
|
126
127
|
}
|
|
127
|
-
return
|
|
128
|
-
id: T(
|
|
128
|
+
return e.modification === y.Replace && a.replace.push({
|
|
129
|
+
id: T(e),
|
|
129
130
|
modificationType: h,
|
|
130
131
|
name: m,
|
|
131
132
|
replacementName: O,
|
|
132
|
-
freeAmount:
|
|
133
|
+
freeAmount: p,
|
|
133
134
|
quantity: s,
|
|
134
135
|
currency: n,
|
|
135
|
-
position:
|
|
136
|
+
position: c,
|
|
136
137
|
cost: g
|
|
137
|
-
}),
|
|
138
|
-
id: T(
|
|
138
|
+
}), e.modification === y.Remove && a.remove.push({
|
|
139
|
+
id: T(e),
|
|
139
140
|
modificationType: h,
|
|
140
141
|
name: m,
|
|
141
|
-
freeAmount:
|
|
142
|
+
freeAmount: p,
|
|
142
143
|
quantity: s,
|
|
143
144
|
currency: n,
|
|
144
|
-
position:
|
|
145
|
+
position: c,
|
|
145
146
|
cost: g
|
|
146
147
|
}), a;
|
|
147
148
|
},
|
|
@@ -150,33 +151,33 @@ function tn(n, i, t) {
|
|
|
150
151
|
replace: [],
|
|
151
152
|
remove: []
|
|
152
153
|
}
|
|
153
|
-
),
|
|
154
|
+
), u = (t ?? []).reduce((a, e) => {
|
|
154
155
|
const {
|
|
155
156
|
product: h,
|
|
156
|
-
freeAmount:
|
|
157
|
-
quantity:
|
|
157
|
+
freeAmount: c = 0,
|
|
158
|
+
quantity: p,
|
|
158
159
|
position: m,
|
|
159
160
|
addOnGroupId: s,
|
|
160
161
|
productPriceInclTax: g
|
|
161
|
-
} =
|
|
162
|
+
} = e, {
|
|
162
163
|
hasVariants: O,
|
|
163
164
|
variantName: A = "",
|
|
164
165
|
productName: b = "",
|
|
165
166
|
productId: w,
|
|
166
167
|
variantId: B
|
|
167
168
|
} = h ?? {}, M = g.unitPrice === 0;
|
|
168
|
-
(
|
|
169
|
+
(c > 0 || M) && a.push({
|
|
169
170
|
id: `${s}-${w}-free`,
|
|
170
171
|
modificationType: y.Add,
|
|
171
172
|
name: O ? A : b,
|
|
172
|
-
freeAmount: M ?
|
|
173
|
-
quantity: M ?
|
|
173
|
+
freeAmount: M ? p : c,
|
|
174
|
+
quantity: M ? p : c,
|
|
174
175
|
currency: n,
|
|
175
176
|
position: m,
|
|
176
177
|
cost: 0,
|
|
177
178
|
variantId: B
|
|
178
179
|
});
|
|
179
|
-
const k =
|
|
180
|
+
const k = p - c;
|
|
180
181
|
return k > 0 && !M && a.push({
|
|
181
182
|
id: `${s}-${w}`,
|
|
182
183
|
modificationType: y.Add,
|
|
@@ -190,11 +191,11 @@ function tn(n, i, t) {
|
|
|
190
191
|
}), a;
|
|
191
192
|
}, []);
|
|
192
193
|
return [
|
|
193
|
-
...C([...o, ...
|
|
194
|
+
...C([...o, ...u], ["position"], ["asc"]),
|
|
194
195
|
...C(d, ["position"], ["asc"]),
|
|
195
196
|
...C(r, ["position"], ["asc"])
|
|
196
197
|
];
|
|
197
198
|
}
|
|
198
199
|
export {
|
|
199
|
-
|
|
200
|
+
rn as default
|
|
200
201
|
};
|
package/check/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getOrganizedCheckItemModifications.js"),i=require("./getUniqueCheckItemModificationId.js");require("@ancon/wildcat-types");require("../toString-b771abdf.js");require("../isObjectLike-963267e9.js");require("../identity-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getOrganizedCheckItemModifications.js"),i=require("./getUniqueCheckItemModificationId.js");require("@ancon/wildcat-types");require("../toString-b771abdf.js");require("../isObjectLike-963267e9.js");require("../identity-58f9497d.js");require("../_getTag-3d3032da.js");require("../isObject-361bd834.js");require("../_baseIteratee-374c60ca.js");require("../_baseIsEqual-7e335f42.js");exports.getOrganizedCheckItemModifications=e;exports.getUniqueCheckItemModificationId=i;
|
package/check/index.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
1
|
+
import { default as c } from "./getOrganizedCheckItemModifications.mjs";
|
|
2
|
+
import { default as g } from "./getUniqueCheckItemModificationId.mjs";
|
|
3
3
|
import "@ancon/wildcat-types";
|
|
4
4
|
import "../toString-ce418705.mjs";
|
|
5
5
|
import "../isObjectLike-54341556.mjs";
|
|
6
|
-
import "../identity-
|
|
7
|
-
import "../_getTag-
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
6
|
+
import "../identity-41198897.mjs";
|
|
7
|
+
import "../_getTag-ebc0f90e.mjs";
|
|
8
|
+
import "../isObject-b8638513.mjs";
|
|
9
|
+
import "../_baseIteratee-5fbe491c.mjs";
|
|
10
|
+
import "../_baseIsEqual-4ee44a4c.mjs";
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
c as getOrganizedCheckItemModifications,
|
|
13
|
+
g as getUniqueCheckItemModificationId
|
|
13
14
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("@ancon/wildcat-types"),A=require("../order/getCheckOrderItemsMappedByTicketItemStatus.js"),B=require("./getCheckoutItemsMappedByTicketItemStatus.js"),k=require("./isWoltDeliveryInProgress.js");require("../order/getCheckOrderMinimumStatusTicketItem.js");require("../toString-b771abdf.js");require("../isObjectLike-963267e9.js");require("../_baseIteratee-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("@ancon/wildcat-types"),A=require("../order/getCheckOrderItemsMappedByTicketItemStatus.js"),B=require("./getCheckoutItemsMappedByTicketItemStatus.js"),k=require("./isWoltDeliveryInProgress.js");require("../order/getCheckOrderMinimumStatusTicketItem.js");require("../toString-b771abdf.js");require("../isObjectLike-963267e9.js");require("../_baseIteratee-374c60ca.js");require("../_getTag-3d3032da.js");require("../isObject-361bd834.js");require("../_baseIsEqual-7e335f42.js");require("../identity-58f9497d.js");require("../order/getMultiProductSubProductsTicketItems.js");var m=(e=>(e.OrderConfirmedHostWillApproveAndProcess="orderConfirmedHostWillApproveAndProcess",e.OrderConfirmedRestaurantAdminWillAcceptSoon="orderConfirmedRestaurantAdminWillAcceptSoon",e.YourOrderHasBeenApprovedByHost="yourOrderHasBeenApprovedByHost",e.OrderCanceledHostWillUpdateAndProcessAgain="orderCanceledHostWillUpdateAndProcessAgain",e.OrderCanceledYouCanManageYourOrderAgain="orderCanceledYouCanManageYourOrderAgain",e.YourOrderIsBeingProcessed="yourOrderIsBeingProcessed",e.YourOrderWasCancelled="yourOrderWasCancelled",e.ProcessingPayment="processingPayment",e.YourOrderIsBeingPrepared="yourOrderIsBeingPrepared",e.YourOrderIsReadyToCollect="yourOrderIsReadyToCollect",e.YourOrderIsReadyHostWillCollect="yourOrderIsReadyHostWillCollect",e.YourOrderIsBeingDelivered="yourOrderIsBeingDelivered",e.YourOrderIsReadyWillBringToYourTableSoon="yourOrderIsReadyWillBringToYourTableSoon",e.YourOrderHasBeenCompleted="yourOrderHasBeenCompleted",e.YourOrderWillArriveAtYourTable="yourOrderWillArriveAtYourTable",e.ModifiedDeliveryStartTime="modifiedDeliveryStartTime",e.ModifiedPickUpTime="modifiedPickUpTime",e.YourOrderHasBeenAcceptedEstimatedDeliveryStartTime="yourOrderHasBeenAcceptedEstimatedDeliveryStartTime",e.YourOrderIsBeingPreparedEstimatedDeliveryStartTime="yourOrderIsBeingPreparedEstimatedDeliveryStartTime",e.YourOrderHasBeenAcceptedEstimatedTime="yourOrderHasBeenAcceptedEstimatedTime",e.YourOrderHasBeenAcceptedPickupTime="yourOrderHasBeenAcceptedPickupTime",e.DeliveryWasCompleted="deliveryWasCompleted",e.OneItemIsReadyToCollect="oneItemIsReadyToCollect",e.OneItemIsReadyHostWillCollect="oneItemIsReadyHostWillCollect",e.MultipleItemsAreReadyToCollect="multipleItemsAreReadyToCollect",e.MultipleItemsAreReadyHostWillCollect="multipleItemsAreReadyHostWillCollect",e.EnjoyMealWhileOtherItemsBeingPrepared="enjoyMealWhileOtherItemsBeingPrepared",e.ThereWasAnError="thereWasAnError",e.YourOrderReadyToPickupFromLocker="yourOrderReadyToPickupFromLocker",e))(m||{});function v(e){switch(e){case t.CheckoutStatus.Error:return"thereWasAnError";case t.CheckoutStatus.Created:case t.CheckoutStatus.Ready:case t.CheckoutStatus.Processing:case t.CheckoutStatus.Authorized:return"yourOrderIsBeingProcessed";case t.CheckoutStatus.Canceled:return"yourOrderWasCancelled";case t.CheckoutStatus.Received:return"processingPayment";default:return null}}function T(e){switch(e){case t.TicketStatus.Pending:case t.TicketStatus.PendingAccept:return"yourOrderIsBeingProcessed";case t.TicketStatus.Preparing:return"yourOrderIsBeingPrepared";case t.TicketStatus.Ready:return"yourOrderIsReadyToCollect";case t.TicketStatus.Closed:return"yourOrderHasBeenCompleted";case t.TicketStatus.Canceled:return"yourOrderWasCancelled";default:throw new Error(`Unhandled ticket status "${e}" in getTranslationKeyByTicketStatus()`)}}function S(e){const{isHost:o,preOrderStatus:d,preOrderAttendeeStatus:l,preOrderCancelInfo:i}=e;if(l===t.AttendeePreOrderStatus.Confirmed)switch(d){case t.PreOrderStatus.Started:{const{cancelActor:a,canceledAt:r}=i??{};return!!a&&!!r?o?"orderCanceledYouCanManageYourOrderAgain":"orderCanceledHostWillUpdateAndProcessAgain":"orderConfirmedHostWillApproveAndProcess"}case t.PreOrderStatus.Waiting:return o?"orderConfirmedRestaurantAdminWillAcceptSoon":"yourOrderHasBeenApprovedByHost"}return null}function W(e,{checkoutStatus:o,ticketStatus:d,customersFetchTableOrders:l}){const i=(e==null?void 0:e.orderFormat)===t.OrderFormat.Delivery,a=(e==null?void 0:e.orderFormat)===t.OrderFormat.TakeAway,r=(e==null?void 0:e.orderFormat)===t.OrderFormat.TableOrder;if(i||a||r&&!l)return!1;const n=o!=null,s=d!=null;if(n){const u=o===t.CheckoutStatus.Captured,c=o===t.CheckoutStatus.InProgress;return u||c}if(s){const u=d===t.TicketStatus.Preparing,c=d===t.TicketStatus.Ready;return u||c}return!1}function H(e,{checkoutStatus:o,ticketStatus:d,customersFetchTableOrders:l,pickupTimeUpdated:i,preOrderOptions:a},r){const n=a&&!a.isHost;if(r&&W(e,{checkoutStatus:o,ticketStatus:d,customersFetchTableOrders:l})){if(r.ready>0)return r.ready<2?n?["oneItemIsReadyHostWillCollect"]:["oneItemIsReadyToCollect"]:n?r.ready===r.all?["yourOrderIsReadyHostWillCollect"]:["multipleItemsAreReadyHostWillCollect",{count:r.ready}]:["multipleItemsAreReadyToCollect",{count:r.ready}];if(r.done>0&&r.done<r.all)return["enjoyMealWhileOtherItemsBeingPrepared",{count:Math.max(0,r.all-r.done-r.ready)}]}if(d!=null)return[T(d)];if(a&&(o===t.CheckoutStatus.Created||o===t.CheckoutStatus.Authorized)){const C=S(a);if(C)return[C]}const s=(e==null?void 0:e.orderFormat)===t.OrderFormat.Delivery,u=v(o);if(u)return[u];const c=o===t.CheckoutStatus.Captured,f=o===t.CheckoutStatus.InProgress,h=o===t.CheckoutStatus.Done,I=o===t.CheckoutStatus.DeliveryInProgress,P=o===t.CheckoutStatus.ReadyToCollect,p=(e==null?void 0:e.orderFormat)===t.OrderFormat.EatIn,y=(e==null?void 0:e.orderFormat)===t.OrderFormat.TakeAway,O=(e==null?void 0:e.orderFormat)===t.OrderFormat.TableOrder,g=(e==null?void 0:e.orderFormat)===t.OrderFormat.BoxPickup;if(c){if(O&&!l)return["yourOrderWillArriveAtYourTable"];if(s)return i?["modifiedDeliveryStartTime"]:["yourOrderHasBeenAcceptedEstimatedDeliveryStartTime"];if(i)return["modifiedPickUpTime"];if(r&&n&&(p||y)){if(r.ready===r.all)return["yourOrderIsReadyHostWillCollect"];if(r.done===r.all)return["yourOrderHasBeenCompleted"]}return["yourOrderHasBeenAcceptedPickupTime"]}if(f){if(s)return i?["modifiedDeliveryStartTime"]:k(e)?["yourOrderIsBeingDelivered"]:["yourOrderIsBeingPreparedEstimatedDeliveryStartTime"];if(r&&(p||y)){if(r.ready===r.all)return["yourOrderIsReadyToCollect"];if(r.done===r.all)return["yourOrderHasBeenCompleted"]}if(O){if(r){if(r.ready===r.all)return l?["yourOrderIsReadyToCollect"]:["yourOrderWillArriveAtYourTable"];if(r.done===r.all)return l?["yourOrderHasBeenCompleted"]:["yourOrderWillArriveAtYourTable"]}return i?["modifiedPickUpTime"]:l?["yourOrderIsBeingPrepared"]:["yourOrderWillArriveAtYourTable"]}return i?["modifiedPickUpTime"]:["yourOrderIsBeingPrepared"]}if(h)return p||y?["yourOrderHasBeenCompleted"]:s?["deliveryWasCompleted"]:["yourOrderHasBeenCompleted"];if(I){if(g)switch(e==null?void 0:e.deliveryStatus){case t.CheckoutDeliveryStatus.PickedUp:return["yourOrderHasBeenCompleted"];case t.CheckoutDeliveryStatus.Delivered:return["yourOrderReadyToPickupFromLocker"];default:return["yourOrderIsBeingPrepared"]}if(s)return["yourOrderIsBeingDelivered"]}if(P)return s?["yourOrderIsBeingDelivered"]:g?["yourOrderReadyToPickupFromLocker"]:O&&!l?["yourOrderIsReadyWillBringToYourTableSoon"]:r&&n&&(p||y)&&r.done===r.all?["yourOrderHasBeenCompleted"]:["yourOrderIsReadyToCollect"];throw new Error("Could not resolve translation key in getTranslationKey()")}const Y={orderConfirmedHostWillApproveAndProcess:()=>({title:`Order confirmed!
|
|
2
2
|
The host will approve and process the pre-order.`,message:"Please contact the host if you want to edit your order."}),orderConfirmedRestaurantAdminWillAcceptSoon:()=>({title:`Order confirmed!
|
|
3
3
|
The restaurant admin will accept your pre-order soon.`}),yourOrderHasBeenApprovedByHost:()=>({title:"Your order has been approved by host!",message:"The restaurant admin will accept and process the pre-order"}),orderCanceledHostWillUpdateAndProcessAgain:()=>({title:`Order canceled!
|
|
4
4
|
The host will update and process the pre-order again.`,message:"Please contact the host if you want to edit your order."}),orderCanceledYouCanManageYourOrderAgain:()=>({title:`Order canceled!
|
|
@@ -5,10 +5,11 @@ import Y from "./isWoltDeliveryInProgress.mjs";
|
|
|
5
5
|
import "../order/getCheckOrderMinimumStatusTicketItem.mjs";
|
|
6
6
|
import "../toString-ce418705.mjs";
|
|
7
7
|
import "../isObjectLike-54341556.mjs";
|
|
8
|
-
import "../_baseIteratee-
|
|
9
|
-
import "../_getTag-
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
8
|
+
import "../_baseIteratee-5fbe491c.mjs";
|
|
9
|
+
import "../_getTag-ebc0f90e.mjs";
|
|
10
|
+
import "../isObject-b8638513.mjs";
|
|
11
|
+
import "../_baseIsEqual-4ee44a4c.mjs";
|
|
12
|
+
import "../identity-41198897.mjs";
|
|
12
13
|
import "../order/getMultiProductSubProductsTicketItems.mjs";
|
|
13
14
|
var R = /* @__PURE__ */ ((e) => (e.OrderConfirmedHostWillApproveAndProcess = "orderConfirmedHostWillApproveAndProcess", e.OrderConfirmedRestaurantAdminWillAcceptSoon = "orderConfirmedRestaurantAdminWillAcceptSoon", e.YourOrderHasBeenApprovedByHost = "yourOrderHasBeenApprovedByHost", e.OrderCanceledHostWillUpdateAndProcessAgain = "orderCanceledHostWillUpdateAndProcessAgain", e.OrderCanceledYouCanManageYourOrderAgain = "orderCanceledYouCanManageYourOrderAgain", e.YourOrderIsBeingProcessed = "yourOrderIsBeingProcessed", e.YourOrderWasCancelled = "yourOrderWasCancelled", e.ProcessingPayment = "processingPayment", e.YourOrderIsBeingPrepared = "yourOrderIsBeingPrepared", e.YourOrderIsReadyToCollect = "yourOrderIsReadyToCollect", e.YourOrderIsReadyHostWillCollect = "yourOrderIsReadyHostWillCollect", e.YourOrderIsBeingDelivered = "yourOrderIsBeingDelivered", e.YourOrderIsReadyWillBringToYourTableSoon = "yourOrderIsReadyWillBringToYourTableSoon", e.YourOrderHasBeenCompleted = "yourOrderHasBeenCompleted", e.YourOrderWillArriveAtYourTable = "yourOrderWillArriveAtYourTable", e.ModifiedDeliveryStartTime = "modifiedDeliveryStartTime", e.ModifiedPickUpTime = "modifiedPickUpTime", e.YourOrderHasBeenAcceptedEstimatedDeliveryStartTime = "yourOrderHasBeenAcceptedEstimatedDeliveryStartTime", e.YourOrderIsBeingPreparedEstimatedDeliveryStartTime = "yourOrderIsBeingPreparedEstimatedDeliveryStartTime", e.YourOrderHasBeenAcceptedEstimatedTime = "yourOrderHasBeenAcceptedEstimatedTime", e.YourOrderHasBeenAcceptedPickupTime = "yourOrderHasBeenAcceptedPickupTime", e.DeliveryWasCompleted = "deliveryWasCompleted", e.OneItemIsReadyToCollect = "oneItemIsReadyToCollect", e.OneItemIsReadyHostWillCollect = "oneItemIsReadyHostWillCollect", e.MultipleItemsAreReadyToCollect = "multipleItemsAreReadyToCollect", e.MultipleItemsAreReadyHostWillCollect = "multipleItemsAreReadyHostWillCollect", e.EnjoyMealWhileOtherItemsBeingPrepared = "enjoyMealWhileOtherItemsBeingPrepared", e.ThereWasAnError = "thereWasAnError", e.YourOrderReadyToPickupFromLocker = "yourOrderReadyToPickupFromLocker", e))(R || {});
|
|
14
15
|
function w(e) {
|
|
@@ -406,7 +407,7 @@ function M(e, t) {
|
|
|
406
407
|
done: i.done.length
|
|
407
408
|
};
|
|
408
409
|
}
|
|
409
|
-
function
|
|
410
|
+
function X(e, t, d = E) {
|
|
410
411
|
var c;
|
|
411
412
|
const { isSkipTicketStatus: l, isCheckOrder: i } = t;
|
|
412
413
|
let a;
|
|
@@ -421,5 +422,5 @@ function V(e, t, d = E) {
|
|
|
421
422
|
}
|
|
422
423
|
export {
|
|
423
424
|
R as TranslationKey,
|
|
424
|
-
|
|
425
|
+
X as default
|
|
425
426
|
};
|
package/checkout/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./getCheckoutItemModifications.js"),o=require("./getCheckoutProductName.js"),e=require("./getCheckoutOrderStatusTexts.js"),r=require("./getCheckoutItemsMappedByTicketItemStatus.js"),c=require("./isCheckoutOrderSummary.js"),i=require("./buildCheckoutRequestItem.js"),s=require("./getCheckoutGrandTotalAmount.js"),a=require("./getCheckoutRequestItemFromCheckoutItem.js"),k=require("./isCheckoutItemsAreEqual.js"),h=require("./checkoutHasWallet.js"),n=require("./getWalletMetaFromCheckout.js"),C=require("./isPreOrderServiceTime.js"),l=require("./isPreOrderCheckout.js"),q=require("./isUpdatingCheckoutAllowed.js"),d=require("./isCheckoutAlreadyPaidStatus.js"),t=require("./getCheckoutPaymentErrorTranslationTexts.js"),g=require("./isDeletingCheckoutAllowed.js"),m=require("./getTotalCheckoutItemsQuantity.js"),_=require("./getCheckoutPenguinLockersMetaData.js"),T=require("./getUniqueCheckoutPenguinDeliveryCodes.js"),p=require("./isWoltDeliveryInProgress.js"),y=require("./isWalletTopUpCheckoutItem.js"),I=require("./isWalletTopUpCheckout.js"),P=require("./getCheckoutWalletTopUpMetaData.js"),M=require("./isGiftCardCheckout.js"),D=require("./isGiftCardCheckoutItem.js"),G=require("./getCheckoutGiftCardMetaData.js"),f=require("./getCheckoutGuestGroupsMetaData.js");require("@ancon/wildcat-types");require("../currency/getFormattedCurrency.js");require("../currency/getFormattedCurrencyPostfix.js");require("../order/getCheckOrderItemsMappedByTicketItemStatus.js");require("../order/getCheckOrderMinimumStatusTicketItem.js");require("../toString-b771abdf.js");require("../isObjectLike-963267e9.js");require("../_baseIteratee-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./getCheckoutItemModifications.js"),o=require("./getCheckoutProductName.js"),e=require("./getCheckoutOrderStatusTexts.js"),r=require("./getCheckoutItemsMappedByTicketItemStatus.js"),c=require("./isCheckoutOrderSummary.js"),i=require("./buildCheckoutRequestItem.js"),s=require("./getCheckoutGrandTotalAmount.js"),a=require("./getCheckoutRequestItemFromCheckoutItem.js"),k=require("./isCheckoutItemsAreEqual.js"),h=require("./checkoutHasWallet.js"),n=require("./getWalletMetaFromCheckout.js"),C=require("./isPreOrderServiceTime.js"),l=require("./isPreOrderCheckout.js"),q=require("./isUpdatingCheckoutAllowed.js"),d=require("./isCheckoutAlreadyPaidStatus.js"),t=require("./getCheckoutPaymentErrorTranslationTexts.js"),g=require("./isDeletingCheckoutAllowed.js"),m=require("./getTotalCheckoutItemsQuantity.js"),_=require("./getCheckoutPenguinLockersMetaData.js"),T=require("./getUniqueCheckoutPenguinDeliveryCodes.js"),p=require("./isWoltDeliveryInProgress.js"),y=require("./isWalletTopUpCheckoutItem.js"),I=require("./isWalletTopUpCheckout.js"),P=require("./getCheckoutWalletTopUpMetaData.js"),M=require("./isGiftCardCheckout.js"),D=require("./isGiftCardCheckoutItem.js"),G=require("./getCheckoutGiftCardMetaData.js"),f=require("./getCheckoutGuestGroupsMetaData.js");require("@ancon/wildcat-types");require("../currency/getFormattedCurrency.js");require("../currency/getFormattedCurrencyPostfix.js");require("../order/getCheckOrderItemsMappedByTicketItemStatus.js");require("../order/getCheckOrderMinimumStatusTicketItem.js");require("../toString-b771abdf.js");require("../isObjectLike-963267e9.js");require("../_baseIteratee-374c60ca.js");require("../_getTag-3d3032da.js");require("../isObject-361bd834.js");require("../_baseIsEqual-7e335f42.js");require("../identity-58f9497d.js");require("../order/getMultiProductSubProductsTicketItems.js");require("axios");require("../error/isSerializedAPIError.js");exports.getCheckoutGroupedModifications=u.default;exports.getCheckoutProductName=o;exports.TranslationKey=e.TranslationKey;exports.getCheckoutOrderStatusTexts=e.default;exports.getCheckoutItemsMappedByTicketItemStatus=r;exports.isCheckoutOrderSummary=c;exports.buildCheckoutRequestItem=i;exports.getCheckoutGrandTotalAmount=s;exports.getCheckoutRequestItemFromCheckoutItem=a;exports.isCheckoutItemsAreEqual=k;exports.checkoutHasWallet=h;exports.getWalletMetaFromCheckout=n;exports.isPreOrderServiceTime=C;exports.isPreOrderCheckout=l;exports.isUpdatingCheckoutAllowed=q;exports.isCheckoutAlreadyPaidStatus=d;exports.CheckoutPaymentErrorTranslationKey=t.CheckoutPaymentErrorTranslationKey;exports.getCheckoutPaymentErrorTranslationTexts=t.default;exports.isDeletingCheckoutAllowed=g;exports.getTotalCheckoutItemsQuantity=m;exports.getCheckoutPenguinLockersMetaData=_;exports.getUniqueCheckoutPenguinDeliveryCodes=T;exports.isWoltDeliveryInProgress=p;exports.isWalletTopUpCheckoutItem=y;exports.isWalletTopUpCheckout=I;exports.getCheckoutWalletTopUpMetaData=P;exports.isGiftCardCheckout=M;exports.isGiftCardCheckoutItem=D;exports.getCheckoutGiftCardMetaData=G;exports.getCheckoutGuestGroupsMetaData=f;
|
package/checkout/index.mjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { TranslationKey as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { CheckoutPaymentErrorTranslationKey as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
1
|
+
import { default as h } from "./getCheckoutItemModifications.mjs";
|
|
2
|
+
import { default as g } from "./getCheckoutProductName.mjs";
|
|
3
|
+
import { TranslationKey as y, default as I } from "./getCheckoutOrderStatusTexts.mjs";
|
|
4
|
+
import { default as D } from "./getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
5
|
+
import { default as M } from "./isCheckoutOrderSummary.mjs";
|
|
6
|
+
import { default as A } from "./buildCheckoutRequestItem.mjs";
|
|
7
|
+
import { default as U } from "./getCheckoutGrandTotalAmount.mjs";
|
|
8
|
+
import { default as O } from "./getCheckoutRequestItemFromCheckoutItem.mjs";
|
|
9
|
+
import { default as E } from "./isCheckoutItemsAreEqual.mjs";
|
|
10
|
+
import { default as F } from "./checkoutHasWallet.mjs";
|
|
11
|
+
import { default as R } from "./getWalletMetaFromCheckout.mjs";
|
|
12
|
+
import { default as B } from "./isPreOrderServiceTime.mjs";
|
|
13
|
+
import { default as L } from "./isPreOrderCheckout.mjs";
|
|
14
|
+
import { default as Q } from "./isUpdatingCheckoutAllowed.mjs";
|
|
15
|
+
import { default as z } from "./isCheckoutAlreadyPaidStatus.mjs";
|
|
16
|
+
import { CheckoutPaymentErrorTranslationKey as V, default as X } from "./getCheckoutPaymentErrorTranslationTexts.mjs";
|
|
17
|
+
import { default as Z } from "./isDeletingCheckoutAllowed.mjs";
|
|
18
|
+
import { default as $ } from "./getTotalCheckoutItemsQuantity.mjs";
|
|
19
|
+
import { default as et } from "./getCheckoutPenguinLockersMetaData.mjs";
|
|
20
|
+
import { default as rt } from "./getUniqueCheckoutPenguinDeliveryCodes.mjs";
|
|
21
|
+
import { default as ut } from "./isWoltDeliveryInProgress.mjs";
|
|
22
22
|
import { default as st } from "./isWalletTopUpCheckoutItem.mjs";
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
23
|
+
import { default as lt } from "./isWalletTopUpCheckout.mjs";
|
|
24
|
+
import { default as it } from "./getCheckoutWalletTopUpMetaData.mjs";
|
|
25
|
+
import { default as ct } from "./isGiftCardCheckout.mjs";
|
|
26
|
+
import { default as kt } from "./isGiftCardCheckoutItem.mjs";
|
|
27
|
+
import { default as ht } from "./getCheckoutGiftCardMetaData.mjs";
|
|
28
|
+
import { default as gt } from "./getCheckoutGuestGroupsMetaData.mjs";
|
|
29
29
|
import "@ancon/wildcat-types";
|
|
30
30
|
import "../currency/getFormattedCurrency.mjs";
|
|
31
31
|
import "../currency/getFormattedCurrencyPostfix.mjs";
|
|
@@ -33,42 +33,43 @@ import "../order/getCheckOrderItemsMappedByTicketItemStatus.mjs";
|
|
|
33
33
|
import "../order/getCheckOrderMinimumStatusTicketItem.mjs";
|
|
34
34
|
import "../toString-ce418705.mjs";
|
|
35
35
|
import "../isObjectLike-54341556.mjs";
|
|
36
|
-
import "../_baseIteratee-
|
|
37
|
-
import "../_getTag-
|
|
38
|
-
import "../
|
|
39
|
-
import "../
|
|
36
|
+
import "../_baseIteratee-5fbe491c.mjs";
|
|
37
|
+
import "../_getTag-ebc0f90e.mjs";
|
|
38
|
+
import "../isObject-b8638513.mjs";
|
|
39
|
+
import "../_baseIsEqual-4ee44a4c.mjs";
|
|
40
|
+
import "../identity-41198897.mjs";
|
|
40
41
|
import "../order/getMultiProductSubProductsTicketItems.mjs";
|
|
41
42
|
import "axios";
|
|
42
43
|
import "../error/isSerializedAPIError.mjs";
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
45
|
+
V as CheckoutPaymentErrorTranslationKey,
|
|
46
|
+
y as TranslationKey,
|
|
47
|
+
A as buildCheckoutRequestItem,
|
|
48
|
+
F as checkoutHasWallet,
|
|
49
|
+
ht as getCheckoutGiftCardMetaData,
|
|
50
|
+
U as getCheckoutGrandTotalAmount,
|
|
51
|
+
h as getCheckoutGroupedModifications,
|
|
52
|
+
gt as getCheckoutGuestGroupsMetaData,
|
|
53
|
+
D as getCheckoutItemsMappedByTicketItemStatus,
|
|
54
|
+
I as getCheckoutOrderStatusTexts,
|
|
55
|
+
X as getCheckoutPaymentErrorTranslationTexts,
|
|
56
|
+
et as getCheckoutPenguinLockersMetaData,
|
|
57
|
+
g as getCheckoutProductName,
|
|
58
|
+
O as getCheckoutRequestItemFromCheckoutItem,
|
|
59
|
+
it as getCheckoutWalletTopUpMetaData,
|
|
60
|
+
$ as getTotalCheckoutItemsQuantity,
|
|
61
|
+
rt as getUniqueCheckoutPenguinDeliveryCodes,
|
|
62
|
+
R as getWalletMetaFromCheckout,
|
|
63
|
+
z as isCheckoutAlreadyPaidStatus,
|
|
64
|
+
E as isCheckoutItemsAreEqual,
|
|
65
|
+
M as isCheckoutOrderSummary,
|
|
66
|
+
Z as isDeletingCheckoutAllowed,
|
|
67
|
+
ct as isGiftCardCheckout,
|
|
68
|
+
kt as isGiftCardCheckoutItem,
|
|
69
|
+
L as isPreOrderCheckout,
|
|
70
|
+
B as isPreOrderServiceTime,
|
|
71
|
+
Q as isUpdatingCheckoutAllowed,
|
|
72
|
+
lt as isWalletTopUpCheckout,
|
|
72
73
|
st as isWalletTopUpCheckoutItem,
|
|
73
|
-
|
|
74
|
+
ut as isWoltDeliveryInProgress
|
|
74
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const s=require("../_baseIsEqual-7e335f42.js");require("../_getTag-3d3032da.js");require("../isObjectLike-963267e9.js");require("../isObject-361bd834.js");function n(r,d){return s.baseIsEqual(r,d)}function u(r){return Object.keys(r).forEach(d=>r[d]===void 0&&delete r[d]),r}function o(r,d){var a,e;return n({modifications:r.modifications.map(u),addOnProducts:((a=r.addOnProducts)==null?void 0:a.map(u))??[],variantId:r.variantId,upsellGroupId:r.upsellGroupId},{modifications:d.modifications.map(u),addOnProducts:((e=d.addOnProducts)==null?void 0:e.map(u))??[],variantId:d.variantId,upsellGroupId:d.upsellGroupId})}module.exports=o;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { b as
|
|
2
|
-
import "../_getTag-
|
|
1
|
+
import { b as t } from "../_baseIsEqual-4ee44a4c.mjs";
|
|
2
|
+
import "../_getTag-ebc0f90e.mjs";
|
|
3
3
|
import "../isObjectLike-54341556.mjs";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import "../isObject-b8638513.mjs";
|
|
5
|
+
function u(d, a) {
|
|
6
|
+
return t(d, a);
|
|
6
7
|
}
|
|
7
8
|
function r(d) {
|
|
8
9
|
return Object.keys(d).forEach((a) => d[a] === void 0 && delete d[a]), d;
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
+
function c(d, a) {
|
|
11
12
|
var o, n;
|
|
12
|
-
return
|
|
13
|
+
return u(
|
|
13
14
|
{
|
|
14
15
|
modifications: d.modifications.map(r),
|
|
15
16
|
addOnProducts: ((o = d.addOnProducts) == null ? void 0 : o.map(r)) ?? [],
|
|
@@ -25,5 +26,5 @@ function p(d, a) {
|
|
|
25
26
|
);
|
|
26
27
|
}
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
c as default
|
|
29
30
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { APIHeaders } from '@ancon/wildcat-types';
|
|
2
|
+
import type { Logger } from '../logger';
|
|
2
3
|
declare type HangfirePollerConfig = {
|
|
3
4
|
/** Poller interval in milliseconds */
|
|
4
5
|
pollerInterval: number;
|
|
@@ -6,6 +7,12 @@ declare type HangfirePollerConfig = {
|
|
|
6
7
|
maxGroupsSize: number;
|
|
7
8
|
/** Max number of simultaneous workers per group */
|
|
8
9
|
maxWorkersSize: number;
|
|
10
|
+
/**
|
|
11
|
+
* Max number of parallel workers across all enabled groups.
|
|
12
|
+
* When set, `disableWorkers()` is a no-op unless the total enabled worker
|
|
13
|
+
* count exceeds this limit.
|
|
14
|
+
*/
|
|
15
|
+
maxParallelWorkers?: number;
|
|
9
16
|
/** Successful response interceptor */
|
|
10
17
|
responseInterceptor?: (response: any) => any;
|
|
11
18
|
/** Failed response interceptor */
|
|
@@ -17,8 +24,10 @@ declare type HangfirePollerConfig = {
|
|
|
17
24
|
getIsNetworkOnline: () => boolean;
|
|
18
25
|
/** Async function returning any API headers for the request */
|
|
19
26
|
getRequestHeaders: () => Promise<APIHeaders>;
|
|
20
|
-
/**
|
|
27
|
+
/** Development debug logging callback */
|
|
21
28
|
debug: (...args: any[]) => void;
|
|
29
|
+
/** Optional logger implementation for real logs */
|
|
30
|
+
logger?: Logger;
|
|
22
31
|
};
|
|
23
32
|
declare class HangfirePoller {
|
|
24
33
|
/** Workers currently executing a request */
|
|
@@ -38,11 +47,13 @@ declare class HangfirePoller {
|
|
|
38
47
|
private waitForNetworkOnline;
|
|
39
48
|
private executeWorkerRequest;
|
|
40
49
|
private deleteWorker;
|
|
41
|
-
createWorker(groupId: string, { workerId, url, headers, onFinished, }: {
|
|
50
|
+
createWorker(groupId: string, { workerId, url, headers, onFinished, maxLifeTimeMillis, }: {
|
|
42
51
|
workerId: string;
|
|
43
52
|
url: string;
|
|
44
53
|
headers?: APIHeaders;
|
|
45
54
|
onFinished?: (forced: boolean) => void | Promise<void>;
|
|
55
|
+
/** Max lifetime in milliseconds. When exceeded the worker executes one final request and exits. */
|
|
56
|
+
maxLifeTimeMillis?: number;
|
|
46
57
|
}): Promise<unknown>;
|
|
47
58
|
/** Trigger a worker to execute immediately, ignoring busy state */
|
|
48
59
|
triggerWorker(workerId: string): void;
|