@ancon/wildcat-utils 1.20.3 → 1.20.5
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/checkout/getCheckoutItemsMappedByTicketItemStatus.d.ts +0 -2
- package/checkout/getCheckoutOrderStatusTexts.d.ts +0 -2
- package/checkout/getCheckoutOrderStatusTexts.js +1 -1
- package/checkout/getCheckoutOrderStatusTexts.mjs +79 -55
- package/checkout/index.d.ts +2 -1
- package/checkout/index.js +1 -1
- package/checkout/index.mjs +9 -8
- package/index.js +1 -1
- package/index.mjs +88 -87
- package/package.json +1 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { CheckoutStatus, OrderFormat, TicketItemStatus, TicketStatus } from '@ancon/wildcat-types';
|
|
2
2
|
declare type CheckoutOrderSummaryItem = {
|
|
3
|
-
id: string;
|
|
4
3
|
ticketItem: {
|
|
5
4
|
status: TicketItemStatus;
|
|
6
|
-
ticketItemId: string;
|
|
7
5
|
};
|
|
8
6
|
};
|
|
9
7
|
declare type CheckoutSummary = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("@ancon/wildcat-types"),O=require("./getCheckoutItemsMappedByTicketItemStatus.js");var n=(e=>(e.YourOrderIsBeingProcessed="yourOrderIsBeingProcessed",e.YourOrderWasCancelled="yourOrderWasCancelled",e.ProcessingPayment="processingPayment",e.YourOrderIsBeingPrepared="yourOrderIsBeingPrepared",e.YourOrderIsReadyToCollect="yourOrderIsReadyToCollect",e.YourOrderHasBeenCompleted="yourOrderHasBeenCompleted",e.YourOrderWillArriveAtYourTable="yourOrderWillArriveAtYourTable",e.ModifiedDeliveryStartTime="modifiedDeliveryStartTime",e.ModifiedPickUpTime="modifiedPickUpTime",e.YourOrderHasBeenAcceptedEstimatedTime="yourOrderHasBeenAcceptedEstimatedTime",e.YourOrderHasBeenAcceptedPickupTime="yourOrderHasBeenAcceptedPickupTime",e.YourOrderIsBeingDelivered="yourOrderIsBeingDelivered",e.YourOrderIsReady="yourOrderIsReady",e.DeliveryWasCompleted="deliveryWasCompleted",e.OneItemIsReadyToCollect="oneItemIsReadyToCollect",e.MultipleItemsAreReadyToCollect="multipleItemsAreReadyToCollect",e.EnjoyMealWhileOtherItemsBeingPrepared="enjoyMealWhileOtherItemsBeingPrepared",e))(n||{});function C(e){switch(e){case r.CheckoutStatus.Created:case r.CheckoutStatus.Ready:case r.CheckoutStatus.Processing:case r.CheckoutStatus.Authorized:return"yourOrderIsBeingProcessed";case r.CheckoutStatus.Canceled:return"yourOrderWasCancelled";case r.CheckoutStatus.Received:return"processingPayment";case r.CheckoutStatus.ReadyToCollect:return"yourOrderIsReadyToCollect";default:return null}}function
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("@ancon/wildcat-types"),O=require("./getCheckoutItemsMappedByTicketItemStatus.js");var n=(e=>(e.YourOrderIsBeingProcessed="yourOrderIsBeingProcessed",e.YourOrderWasCancelled="yourOrderWasCancelled",e.ProcessingPayment="processingPayment",e.YourOrderIsBeingPrepared="yourOrderIsBeingPrepared",e.YourOrderIsReadyToCollect="yourOrderIsReadyToCollect",e.YourOrderHasBeenCompleted="yourOrderHasBeenCompleted",e.YourOrderWillArriveAtYourTable="yourOrderWillArriveAtYourTable",e.ModifiedDeliveryStartTime="modifiedDeliveryStartTime",e.ModifiedPickUpTime="modifiedPickUpTime",e.YourOrderHasBeenAcceptedEstimatedTime="yourOrderHasBeenAcceptedEstimatedTime",e.YourOrderHasBeenAcceptedPickupTime="yourOrderHasBeenAcceptedPickupTime",e.YourOrderIsBeingDelivered="yourOrderIsBeingDelivered",e.YourOrderIsReady="yourOrderIsReady",e.DeliveryWasCompleted="deliveryWasCompleted",e.OneItemIsReadyToCollect="oneItemIsReadyToCollect",e.MultipleItemsAreReadyToCollect="multipleItemsAreReadyToCollect",e.EnjoyMealWhileOtherItemsBeingPrepared="enjoyMealWhileOtherItemsBeingPrepared",e))(n||{});function C(e){switch(e){case r.CheckoutStatus.Created:case r.CheckoutStatus.Ready:case r.CheckoutStatus.Processing:case r.CheckoutStatus.Authorized:return"yourOrderIsBeingProcessed";case r.CheckoutStatus.Canceled:return"yourOrderWasCancelled";case r.CheckoutStatus.Received:return"processingPayment";case r.CheckoutStatus.ReadyToCollect:return"yourOrderIsReadyToCollect";default:return null}}function f(e){switch(e){case r.TicketStatus.Pending:case r.TicketStatus.PendingAccept:return"processingPayment";case r.TicketStatus.Preparing:return"yourOrderIsBeingPrepared";case r.TicketStatus.Ready:return"yourOrderIsReadyToCollect";case r.TicketStatus.Closed:return"yourOrderHasBeenCompleted";case r.TicketStatus.Canceled:return"yourOrderWasCancelled";default:throw new Error(`Unhandled ticket status "${e}" in getTranslationKeyByTicketStatus()`)}}function h({useMarkAsPickedUp:e,checkoutStatus:o,ticketStatus:a}){const i=o!=null,s=a!=null;if(i){const t=o===r.CheckoutStatus.Captured,d=o===r.CheckoutStatus.InProgress;return e&&(t||d)}if(s){const t=a===r.TicketStatus.Preparing,d=a===r.TicketStatus.Ready;return t||d}return!1}function I({orderFormat:e},{checkoutStatus:o,ticketStatus:a,useMarkAsPickedUp:i,pickupTimeUpdated:s},t){if(h({useMarkAsPickedUp:i,checkoutStatus:o,ticketStatus:a})){if(t.ready>0)return t.ready<2?["oneItemIsReadyToCollect"]:["multipleItemsAreReadyToCollect",{count:t.ready}];if(t.done>0&&t.done<t.all)return["enjoyMealWhileOtherItemsBeingPrepared",{count:Math.max(0,t.all-t.done-t.ready)}]}if(a!=null)return[f(a)];const d=C(o);if(d)return[d];const c=o===r.CheckoutStatus.Captured,y=o===r.CheckoutStatus.InProgress,m=o===r.CheckoutStatus.Done,u=e===r.OrderFormat.TableOrder,l=e===r.OrderFormat.Delivery;if(c)return u?["yourOrderWillArriveAtYourTable"]:s&&l?["modifiedDeliveryStartTime"]:s?["modifiedPickUpTime"]:i?["yourOrderHasBeenAcceptedPickupTime"]:["yourOrderHasBeenAcceptedEstimatedTime"];if(y)return s&&l?["modifiedDeliveryStartTime"]:l?["yourOrderIsBeingDelivered"]:s?["modifiedPickUpTime"]:i?["yourOrderIsBeingPrepared"]:["yourOrderIsBeingPrepared"];if(m){const p=e===r.OrderFormat.EatIn,g=e===r.OrderFormat.TakeAway;if(p||g)return i?["yourOrderHasBeenCompleted"]:["yourOrderIsReady"];if(l)return["deliveryWasCompleted"];if(u)return i?["yourOrderIsReadyToCollect"]:["yourOrderWillArriveAtYourTable"]}throw new Error("Could not resolve translation key in getTranslationKey()")}const T={yourOrderIsBeingProcessed:()=>({title:"Your order is being processed"}),yourOrderWasCancelled:()=>({title:"Your order was canceled",message:"Sorry. Your order could not go through."}),processingPayment:()=>({title:"Processing payment",message:"Please wait while your payment is being processed"}),yourOrderIsBeingPrepared:()=>({title:"Your order is now being prepared!",message:"We will let you know when it is ready for pickup."}),yourOrderIsReadyToCollect:()=>({title:"Your order is ready to be collected!",message:"Please go ahead and show this screen at the collection point"}),yourOrderHasBeenCompleted:()=>({title:"Enjoy your meal!",message:"Your order has been completed!"}),yourOrderWillArriveAtYourTable:()=>({title:"Your order has been accepted!",message:"It will arrive at your table shortly"}),modifiedDeliveryStartTime:()=>({title:"Your delivery time was modified",message:"Delivery will start at approximately 00:00."}),modifiedPickUpTime:()=>({title:"Your pickup time was modified",message:"Pickup time: 00:00"}),yourOrderHasBeenAcceptedEstimatedTime:()=>({title:"Your order has been accepted",message:"Estimated time: 00:00"}),yourOrderHasBeenAcceptedPickupTime:()=>({title:"Your order has been accepted",message:"Pickup time: 00:00"}),yourOrderIsBeingDelivered:()=>({title:"Your order is being delivered",message:"It will arrive at your door shortly. Enjoy your meal!"}),yourOrderIsReady:()=>({title:"Your order is ready",message:"Enjoy your meal!"}),deliveryWasCompleted:()=>({title:"Your order was completed",message:"Enjoy your meal!"}),oneItemIsReadyToCollect:()=>({title:"One item is ready to pick up!",message:"Please allow cashier or waiter to confirm that the prepared item has been successfully issued."}),multipleItemsAreReadyToCollect:()=>({title:"Multiple items are ready to pick up!",message:"Please allow cashier or waiter to confirm that the prepared items have been successfully issued."}),enjoyMealWhileOtherItemsBeingPrepared:({meta:e})=>({title:"Enjoy your meal while the rest of the items are being prepared!",message:`${e.count} more items are being prepared`})};function P(e,o,a=T){const i=O(e.items),[s,t]=I(e,o,{all:i.all.length,ready:i.ready.length,done:i.done.length}),d=a[s]({key:s,meta:t});if(!d)throw new Error("Could not resolve translation in getOrderStatusTexts()");return[d,s]}exports.TranslationKey=n;exports.default=P;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { CheckoutStatus as
|
|
2
|
-
import
|
|
3
|
-
var
|
|
1
|
+
import { CheckoutStatus as t, OrderFormat as u, TicketStatus as l } from "@ancon/wildcat-types";
|
|
2
|
+
import f from "./getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
3
|
+
var I = /* @__PURE__ */ ((e) => (e.YourOrderIsBeingProcessed = "yourOrderIsBeingProcessed", e.YourOrderWasCancelled = "yourOrderWasCancelled", e.ProcessingPayment = "processingPayment", e.YourOrderIsBeingPrepared = "yourOrderIsBeingPrepared", e.YourOrderIsReadyToCollect = "yourOrderIsReadyToCollect", e.YourOrderHasBeenCompleted = "yourOrderHasBeenCompleted", e.YourOrderWillArriveAtYourTable = "yourOrderWillArriveAtYourTable", e.ModifiedDeliveryStartTime = "modifiedDeliveryStartTime", e.ModifiedPickUpTime = "modifiedPickUpTime", e.YourOrderHasBeenAcceptedEstimatedTime = "yourOrderHasBeenAcceptedEstimatedTime", e.YourOrderHasBeenAcceptedPickupTime = "yourOrderHasBeenAcceptedPickupTime", e.YourOrderIsBeingDelivered = "yourOrderIsBeingDelivered", e.YourOrderIsReady = "yourOrderIsReady", e.DeliveryWasCompleted = "deliveryWasCompleted", e.OneItemIsReadyToCollect = "oneItemIsReadyToCollect", e.MultipleItemsAreReadyToCollect = "multipleItemsAreReadyToCollect", e.EnjoyMealWhileOtherItemsBeingPrepared = "enjoyMealWhileOtherItemsBeingPrepared", e))(I || {});
|
|
4
4
|
function C(e) {
|
|
5
5
|
switch (e) {
|
|
6
|
-
case
|
|
7
|
-
case
|
|
8
|
-
case
|
|
9
|
-
case
|
|
6
|
+
case t.Created:
|
|
7
|
+
case t.Ready:
|
|
8
|
+
case t.Processing:
|
|
9
|
+
case t.Authorized:
|
|
10
10
|
return "yourOrderIsBeingProcessed";
|
|
11
|
-
case
|
|
11
|
+
case t.Canceled:
|
|
12
12
|
return "yourOrderWasCancelled";
|
|
13
|
-
case
|
|
13
|
+
case t.Received:
|
|
14
14
|
return "processingPayment";
|
|
15
|
-
case
|
|
15
|
+
case t.ReadyToCollect:
|
|
16
16
|
return "yourOrderIsReadyToCollect";
|
|
17
17
|
default:
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function P(e) {
|
|
22
22
|
switch (e) {
|
|
23
|
-
case
|
|
24
|
-
case
|
|
23
|
+
case l.Pending:
|
|
24
|
+
case l.PendingAccept:
|
|
25
25
|
return "processingPayment";
|
|
26
|
-
case
|
|
26
|
+
case l.Preparing:
|
|
27
27
|
return "yourOrderIsBeingPrepared";
|
|
28
|
-
case
|
|
28
|
+
case l.Ready:
|
|
29
29
|
return "yourOrderIsReadyToCollect";
|
|
30
|
-
case
|
|
30
|
+
case l.Closed:
|
|
31
31
|
return "yourOrderHasBeenCompleted";
|
|
32
|
-
case
|
|
32
|
+
case l.Canceled:
|
|
33
33
|
return "yourOrderWasCancelled";
|
|
34
34
|
default:
|
|
35
35
|
throw new Error(
|
|
@@ -37,46 +37,68 @@ function T(e) {
|
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
function h({
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
function h({
|
|
41
|
+
useMarkAsPickedUp: e,
|
|
42
|
+
checkoutStatus: o,
|
|
43
|
+
ticketStatus: s
|
|
44
|
+
}) {
|
|
45
|
+
const i = o != null, d = s != null;
|
|
46
|
+
if (i) {
|
|
47
|
+
const r = o === t.Captured, a = o === t.InProgress;
|
|
48
|
+
return e && (r || a);
|
|
49
|
+
}
|
|
50
|
+
if (d) {
|
|
51
|
+
const r = s === l.Preparing, a = s === l.Ready;
|
|
52
|
+
return r || a;
|
|
53
|
+
}
|
|
54
|
+
return !1;
|
|
55
|
+
}
|
|
56
|
+
function B({ orderFormat: e }, {
|
|
57
|
+
checkoutStatus: o,
|
|
58
|
+
ticketStatus: s,
|
|
59
|
+
useMarkAsPickedUp: i,
|
|
60
|
+
pickupTimeUpdated: d
|
|
45
61
|
}, r) {
|
|
46
|
-
if (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
if (h({
|
|
63
|
+
useMarkAsPickedUp: i,
|
|
64
|
+
checkoutStatus: o,
|
|
65
|
+
ticketStatus: s
|
|
66
|
+
})) {
|
|
67
|
+
if (r.ready > 0)
|
|
68
|
+
return r.ready < 2 ? ["oneItemIsReadyToCollect"] : [
|
|
69
|
+
"multipleItemsAreReadyToCollect",
|
|
70
|
+
{ count: r.ready }
|
|
71
|
+
];
|
|
72
|
+
if (r.done > 0 && r.done < r.all)
|
|
73
|
+
return [
|
|
74
|
+
"enjoyMealWhileOtherItemsBeingPrepared",
|
|
75
|
+
{ count: Math.max(0, r.all - r.done - r.ready) }
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
if (s != null)
|
|
79
|
+
return [P(s)];
|
|
80
|
+
const a = C(o);
|
|
81
|
+
if (a)
|
|
82
|
+
return [a];
|
|
83
|
+
const y = o === t.Captured, m = o === t.InProgress, p = o === t.Done, c = e === u.TableOrder, n = e === u.Delivery;
|
|
62
84
|
if (y)
|
|
63
|
-
return c ? ["yourOrderWillArriveAtYourTable"] :
|
|
85
|
+
return c ? ["yourOrderWillArriveAtYourTable"] : d && n ? ["modifiedDeliveryStartTime"] : d ? ["modifiedPickUpTime"] : i ? ["yourOrderHasBeenAcceptedPickupTime"] : ["yourOrderHasBeenAcceptedEstimatedTime"];
|
|
64
86
|
if (m)
|
|
65
|
-
return
|
|
87
|
+
return d && n ? ["modifiedDeliveryStartTime"] : n ? ["yourOrderIsBeingDelivered"] : d ? ["modifiedPickUpTime"] : i ? ["yourOrderIsBeingPrepared"] : ["yourOrderIsBeingPrepared"];
|
|
66
88
|
if (p) {
|
|
67
89
|
const g = e === u.EatIn, O = e === u.TakeAway;
|
|
68
90
|
if (g || O)
|
|
69
|
-
return
|
|
91
|
+
return i ? ["yourOrderHasBeenCompleted"] : ["yourOrderIsReady"];
|
|
70
92
|
if (n)
|
|
71
93
|
return ["deliveryWasCompleted"];
|
|
72
94
|
if (c)
|
|
73
|
-
return
|
|
95
|
+
return i ? ["yourOrderIsReadyToCollect"] : ["yourOrderWillArriveAtYourTable"];
|
|
74
96
|
}
|
|
75
97
|
throw new Error("Could not resolve translation key in getTranslationKey()");
|
|
76
98
|
}
|
|
77
|
-
const
|
|
99
|
+
const T = {
|
|
78
100
|
yourOrderIsBeingProcessed: () => ({
|
|
79
|
-
title: "Your order is being processed
|
|
101
|
+
title: "Your order is being processed"
|
|
80
102
|
}),
|
|
81
103
|
yourOrderWasCancelled: () => ({
|
|
82
104
|
title: "Your order was canceled",
|
|
@@ -131,27 +153,29 @@ const B = {
|
|
|
131
153
|
message: "Enjoy your meal!"
|
|
132
154
|
}),
|
|
133
155
|
oneItemIsReadyToCollect: () => ({
|
|
134
|
-
title: "One item is ready to pick up!"
|
|
156
|
+
title: "One item is ready to pick up!",
|
|
157
|
+
message: "Please allow cashier or waiter to confirm that the prepared item has been successfully issued."
|
|
135
158
|
}),
|
|
136
159
|
multipleItemsAreReadyToCollect: () => ({
|
|
137
|
-
title: "Multiple items are ready to pick up!"
|
|
160
|
+
title: "Multiple items are ready to pick up!",
|
|
161
|
+
message: "Please allow cashier or waiter to confirm that the prepared items have been successfully issued."
|
|
138
162
|
}),
|
|
139
163
|
enjoyMealWhileOtherItemsBeingPrepared: ({ meta: e }) => ({
|
|
140
164
|
title: "Enjoy your meal while the rest of the items are being prepared!",
|
|
141
165
|
message: `${e.count} more items are being prepared`
|
|
142
166
|
})
|
|
143
167
|
};
|
|
144
|
-
function Y(e,
|
|
145
|
-
const
|
|
146
|
-
all:
|
|
147
|
-
ready:
|
|
148
|
-
done:
|
|
149
|
-
}),
|
|
150
|
-
if (!
|
|
168
|
+
function Y(e, o, s = T) {
|
|
169
|
+
const i = f(e.items), [d, r] = B(e, o, {
|
|
170
|
+
all: i.all.length,
|
|
171
|
+
ready: i.ready.length,
|
|
172
|
+
done: i.done.length
|
|
173
|
+
}), a = s[d]({ key: d, meta: r });
|
|
174
|
+
if (!a)
|
|
151
175
|
throw new Error("Could not resolve translation in getOrderStatusTexts()");
|
|
152
|
-
return [
|
|
176
|
+
return [a, d];
|
|
153
177
|
}
|
|
154
178
|
export {
|
|
155
|
-
|
|
179
|
+
I as TranslationKey,
|
|
156
180
|
Y as default
|
|
157
181
|
};
|
package/checkout/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import getCheckoutGroupedModifications from './getCheckoutItemModifications';
|
|
2
2
|
import getCheckoutProductName from './getCheckoutProductName';
|
|
3
3
|
import getCheckoutOrderStatusTexts, { TranslationKey } from './getCheckoutOrderStatusTexts';
|
|
4
|
+
import getCheckoutItemsMappedByTicketItemStatus from './getCheckoutItemsMappedByTicketItemStatus';
|
|
4
5
|
import isCheckoutOrderSummary from './isCheckoutOrderSummary';
|
|
5
|
-
export { TranslationKey, getCheckoutGroupedModifications, getCheckoutProductName, getCheckoutOrderStatusTexts, isCheckoutOrderSummary, };
|
|
6
|
+
export { TranslationKey, getCheckoutGroupedModifications, getCheckoutProductName, getCheckoutOrderStatusTexts, getCheckoutItemsMappedByTicketItemStatus, isCheckoutOrderSummary, };
|
package/checkout/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./getCheckoutItemModifications.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./getCheckoutItemModifications.js"),u=require("./getCheckoutProductName.js"),e=require("./getCheckoutOrderStatusTexts.js"),r=require("./getCheckoutItemsMappedByTicketItemStatus.js"),c=require("./isCheckoutOrderSummary.js");require("@ancon/wildcat-types");require("../currency/getFormattedCurrency.js");require("../currency/getFormattedCurrencyPostfix.js");exports.getCheckoutGroupedModifications=t;exports.getCheckoutProductName=u;exports.TranslationKey=e.TranslationKey;exports.getCheckoutOrderStatusTexts=e.default;exports.getCheckoutItemsMappedByTicketItemStatus=r;exports.isCheckoutOrderSummary=c;
|
package/checkout/index.mjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { TranslationKey as
|
|
1
|
+
import { default as u } from "./getCheckoutItemModifications.mjs";
|
|
2
|
+
import { default as s } from "./getCheckoutProductName.mjs";
|
|
3
|
+
import { TranslationKey as f, default as p } from "./getCheckoutOrderStatusTexts.mjs";
|
|
4
|
+
import { default as c } from "./getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
4
5
|
import { default as l } from "./isCheckoutOrderSummary.mjs";
|
|
5
6
|
import "@ancon/wildcat-types";
|
|
6
7
|
import "../currency/getFormattedCurrency.mjs";
|
|
7
8
|
import "../currency/getFormattedCurrencyPostfix.mjs";
|
|
8
|
-
import "./getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
9
9
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
f as TranslationKey,
|
|
11
|
+
u as getCheckoutGroupedModifications,
|
|
12
|
+
c as getCheckoutItemsMappedByTicketItemStatus,
|
|
13
|
+
p as getCheckoutOrderStatusTexts,
|
|
14
|
+
s as getCheckoutProductName,
|
|
14
15
|
l as isCheckoutOrderSummary
|
|
15
16
|
};
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/enums.js"),r=require("./shared/isWithinFlag.js"),i=require("./shared/generateId.js"),n=require("./outlet/getListOutletOpeningHoursTable.js"),o=require("./outlet/getOutletTagInformation.js"),u=require("./outlet/getOutletAvailabilityInfo.js"),s=require("./outlet/getOutletOfflineOrderFormats.js"),a=require("./outlet/getOutletAvailableOrderFormats.js"),c=require("./outlet/getOutletFormattedDistance.js"),l=require("./outlet/isOutletAcceptingPreOrders.js"),g=require("./outlet/getOutletDeliveryFee.js"),d=require("./outlet/getOutletTodayOpeningTimes.js"),q=require("./outlet/getOutletOrderFormats.js"),O=require("./outlet/serviceDateTimesFromOpeningHours.js"),_=require("./versioning/isVersionALessThanB.js"),m=require("./versioning/cleanVersionString.js"),k=require("./api/getUrlAndParams.js"),y=require("./api/getEndpointWithVersion.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/enums.js"),r=require("./shared/isWithinFlag.js"),i=require("./shared/generateId.js"),n=require("./outlet/getListOutletOpeningHoursTable.js"),o=require("./outlet/getOutletTagInformation.js"),u=require("./outlet/getOutletAvailabilityInfo.js"),s=require("./outlet/getOutletOfflineOrderFormats.js"),a=require("./outlet/getOutletAvailableOrderFormats.js"),c=require("./outlet/getOutletFormattedDistance.js"),l=require("./outlet/isOutletAcceptingPreOrders.js"),g=require("./outlet/getOutletDeliveryFee.js"),d=require("./outlet/getOutletTodayOpeningTimes.js"),q=require("./outlet/getOutletOrderFormats.js"),O=require("./outlet/serviceDateTimesFromOpeningHours.js"),_=require("./versioning/isVersionALessThanB.js"),m=require("./versioning/cleanVersionString.js"),k=require("./api/getUrlAndParams.js"),y=require("./api/getEndpointWithVersion.js"),h=require("./api/generateBackoffWithEqualJitter.js"),p=require("./string/slugify.js"),T=require("./string/truncate.js"),f=require("./color/lighten.js"),P=require("./color/brighten.js"),F=require("./color/darken.js"),S=require("./color/isDarkBackground.js"),v=require("./user/getFullName.js"),I=require("./user/getFullAddressString.js"),D=require("./logger/Logger.js"),b=require("./logger/types.js"),A=require("./logger/sanitizeAsStringDict.js"),C=require("./printing/getPrinterType.js"),V=require("./printing/isValidPrinter.js"),L=require("./printing/isValidNetworkPrinter.js"),B=require("./printing/isValidStarCloudPrinter.js"),W=require("./printing/isTerminalPrinter.js"),M=require("./number/randomIntFromInterval.js"),N=require("./tables/decodeTableQRPayload.js"),E=require("./checkout/getCheckoutItemModifications.js"),H=require("./checkout/getCheckoutProductName.js"),t=require("./checkout/getCheckoutOrderStatusTexts.js"),w=require("./checkout/getCheckoutItemsMappedByTicketItemStatus.js"),x=require("./checkout/isCheckoutOrderSummary.js"),z=require("./currency/getFormattedCurrency.js"),J=require("./inventory/isDetailedProductOutOfStock.js"),K=require("./inventory/isDetailedProductVariantOutOfStocks.js"),Q=require("./inventory/isMenuTreeProductOutOfStock.js");require("moment");require("@ancon/wildcat-types");require("./outlet/types.js");require("./outlet/constants.js");require("./outlet/getOutletCurrentActiveOperatingHour.js");require("./outlet/getMomentFromDateAndTimeString.js");require("./outlet/searchNextOpeningMoment.js");require("lodash");require("compare-versions");require("tinycolor2");require("@ancon/wildcat-printing");require("./currency/getFormattedCurrencyPostfix.js");exports.DayOfWeek=e.DayOfWeek;exports.IntervalState=e.IntervalState;exports.IntervalType=e.IntervalType;exports.OrderFormat=e.OrderFormat;exports.isWithinFlag=r;exports.generateId=i;exports.getListOutletOpeningHoursTable=n;exports.getOutletTagInformation=o.default;exports.getOutletAvailabilityInfo=u.default;exports.getOutletOfflineOrderFormats=s;exports.getOutletAvailableOrderFormats=a;exports.getOutletFormattedDistance=c;exports.isOutletAcceptingPreOrders=l;exports.getOutletDeliveryFee=g;exports.getOutletTodayOpeningTimes=d;exports.getOutletOrderFormats=q;exports.serviceDateTimesFromOpeningHours=O;exports.isVersionALessThanB=_;exports.cleanVersionString=m;exports.getUrlAndParams=k;exports.getEndpointWithVersion=y;exports.generateBackoffWithEqualJitter=h;exports.slugify=p;exports.truncate=T;exports.lighten=f;exports.brighten=P;exports.darken=F;exports.isDarkBackground=S;exports.getFullName=v;exports.getFullAddressString=I;exports.Logger=D;exports.LogLevel=b.LogLevel;exports.sanitizeAsStringDict=A;exports.getPrinterType=C;exports.isValidPrinter=V;exports.isValidNetworkPrinter=L;exports.isValidStarCloudPrinter=B;exports.isTerminalPrinter=W;exports.randomIntFromInterval=M;exports.decodeTableQRPayload=N;exports.getCheckoutGroupedModifications=E;exports.getCheckoutProductName=H;exports.TranslationKey=t.TranslationKey;exports.getCheckoutOrderStatusTexts=t.default;exports.getCheckoutItemsMappedByTicketItemStatus=w;exports.isCheckoutOrderSummary=x;exports.getFormattedCurrency=z;exports.isDetailedProductOutOfStock=J;exports.isDetailedProductVariantOutOfStocks=K;exports.isMenuTreeProductOutOfStock=Q;
|
package/index.mjs
CHANGED
|
@@ -1,48 +1,49 @@
|
|
|
1
|
-
import { DayOfWeek as
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
1
|
+
import { DayOfWeek as x, IntervalState as g, IntervalType as O, OrderFormat as c } from "./shared/enums.mjs";
|
|
2
|
+
import { default as T } from "./shared/isWithinFlag.mjs";
|
|
3
|
+
import { default as F } from "./shared/generateId.mjs";
|
|
4
|
+
import { default as h } from "./outlet/getListOutletOpeningHoursTable.mjs";
|
|
5
|
+
import { default as I } from "./outlet/getOutletTagInformation.mjs";
|
|
6
|
+
import { default as D } from "./outlet/getOutletAvailabilityInfo.mjs";
|
|
7
7
|
import { default as C } from "./outlet/getOutletOfflineOrderFormats.mjs";
|
|
8
|
-
import { default as
|
|
8
|
+
import { default as b } from "./outlet/getOutletAvailableOrderFormats.mjs";
|
|
9
9
|
import { default as B } from "./outlet/getOutletFormattedDistance.mjs";
|
|
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 { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { LogLevel as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
10
|
+
import { default as M } from "./outlet/isOutletAcceptingPreOrders.mjs";
|
|
11
|
+
import { default as E } from "./outlet/getOutletDeliveryFee.mjs";
|
|
12
|
+
import { default as q } from "./outlet/getOutletTodayOpeningTimes.mjs";
|
|
13
|
+
import { default as z } from "./outlet/getOutletOrderFormats.mjs";
|
|
14
|
+
import { default as J } from "./outlet/serviceDateTimesFromOpeningHours.mjs";
|
|
15
|
+
import { default as Q } from "./versioning/isVersionALessThanB.mjs";
|
|
16
|
+
import { default as U } from "./versioning/cleanVersionString.mjs";
|
|
17
|
+
import { default as X } from "./api/getUrlAndParams.mjs";
|
|
18
|
+
import { default as Z } from "./api/getEndpointWithVersion.mjs";
|
|
19
|
+
import { default as $ } from "./api/generateBackoffWithEqualJitter.mjs";
|
|
20
|
+
import { default as et } from "./string/slugify.mjs";
|
|
21
|
+
import { default as ot } from "./string/truncate.mjs";
|
|
22
|
+
import { default as ft } from "./color/lighten.mjs";
|
|
23
|
+
import { default as st } from "./color/brighten.mjs";
|
|
24
|
+
import { default as dt } from "./color/darken.mjs";
|
|
25
|
+
import { default as it } from "./color/isDarkBackground.mjs";
|
|
26
|
+
import { default as nt } from "./user/getFullName.mjs";
|
|
27
|
+
import { default as gt } from "./user/getFullAddressString.mjs";
|
|
28
|
+
import { default as ct } from "./logger/Logger.mjs";
|
|
29
|
+
import { LogLevel as Tt } from "./logger/types.mjs";
|
|
30
|
+
import { default as Ft } from "./logger/sanitizeAsStringDict.mjs";
|
|
31
|
+
import { default as ht } from "./printing/getPrinterType.mjs";
|
|
32
|
+
import { default as It } from "./printing/isValidPrinter.mjs";
|
|
33
|
+
import { default as Dt } from "./printing/isValidNetworkPrinter.mjs";
|
|
34
34
|
import { default as Ct } from "./printing/isValidStarCloudPrinter.mjs";
|
|
35
|
-
import { default as
|
|
35
|
+
import { default as bt } from "./printing/isTerminalPrinter.mjs";
|
|
36
36
|
import { default as Bt } from "./number/randomIntFromInterval.mjs";
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { TranslationKey as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
37
|
+
import { default as Mt } from "./tables/decodeTableQRPayload.mjs";
|
|
38
|
+
import { default as Et } from "./checkout/getCheckoutItemModifications.mjs";
|
|
39
|
+
import { default as qt } from "./checkout/getCheckoutProductName.mjs";
|
|
40
|
+
import { TranslationKey as zt, default as Gt } from "./checkout/getCheckoutOrderStatusTexts.mjs";
|
|
41
|
+
import { default as Kt } from "./checkout/getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
42
|
+
import { default as Rt } from "./checkout/isCheckoutOrderSummary.mjs";
|
|
43
|
+
import { default as jt } from "./currency/getFormattedCurrency.mjs";
|
|
44
|
+
import { default as Yt } from "./inventory/isDetailedProductOutOfStock.mjs";
|
|
45
|
+
import { default as _t } from "./inventory/isDetailedProductVariantOutOfStocks.mjs";
|
|
46
|
+
import { default as te } from "./inventory/isMenuTreeProductOutOfStock.mjs";
|
|
46
47
|
import "moment";
|
|
47
48
|
import "@ancon/wildcat-types";
|
|
48
49
|
import "./outlet/types.mjs";
|
|
@@ -55,55 +56,55 @@ import "compare-versions";
|
|
|
55
56
|
import "tinycolor2";
|
|
56
57
|
import "@ancon/wildcat-printing";
|
|
57
58
|
import "./currency/getFormattedCurrencyPostfix.mjs";
|
|
58
|
-
import "./checkout/getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
59
59
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
60
|
+
x as DayOfWeek,
|
|
61
|
+
g as IntervalState,
|
|
62
|
+
O as IntervalType,
|
|
63
|
+
Tt as LogLevel,
|
|
64
|
+
ct as Logger,
|
|
65
|
+
c as OrderFormat,
|
|
66
|
+
zt as TranslationKey,
|
|
67
|
+
st as brighten,
|
|
68
|
+
U as cleanVersionString,
|
|
69
|
+
dt as darken,
|
|
70
|
+
Mt as decodeTableQRPayload,
|
|
71
|
+
$ as generateBackoffWithEqualJitter,
|
|
72
|
+
F as generateId,
|
|
73
|
+
Et as getCheckoutGroupedModifications,
|
|
74
|
+
Kt as getCheckoutItemsMappedByTicketItemStatus,
|
|
75
|
+
Gt as getCheckoutOrderStatusTexts,
|
|
76
|
+
qt as getCheckoutProductName,
|
|
77
|
+
Z as getEndpointWithVersion,
|
|
78
|
+
jt as getFormattedCurrency,
|
|
79
|
+
gt as getFullAddressString,
|
|
80
|
+
nt as getFullName,
|
|
81
|
+
h as getListOutletOpeningHoursTable,
|
|
82
|
+
D as getOutletAvailabilityInfo,
|
|
83
|
+
b as getOutletAvailableOrderFormats,
|
|
84
|
+
E as getOutletDeliveryFee,
|
|
84
85
|
B as getOutletFormattedDistance,
|
|
85
86
|
C as getOutletOfflineOrderFormats,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
87
|
+
z as getOutletOrderFormats,
|
|
88
|
+
I as getOutletTagInformation,
|
|
89
|
+
q as getOutletTodayOpeningTimes,
|
|
90
|
+
ht as getPrinterType,
|
|
91
|
+
X as getUrlAndParams,
|
|
92
|
+
Rt as isCheckoutOrderSummary,
|
|
93
|
+
it as isDarkBackground,
|
|
94
|
+
Yt as isDetailedProductOutOfStock,
|
|
95
|
+
_t as isDetailedProductVariantOutOfStocks,
|
|
96
|
+
te as isMenuTreeProductOutOfStock,
|
|
97
|
+
M as isOutletAcceptingPreOrders,
|
|
98
|
+
bt as isTerminalPrinter,
|
|
99
|
+
Dt as isValidNetworkPrinter,
|
|
100
|
+
It as isValidPrinter,
|
|
100
101
|
Ct as isValidStarCloudPrinter,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
Q as isVersionALessThanB,
|
|
103
|
+
T as isWithinFlag,
|
|
104
|
+
ft as lighten,
|
|
104
105
|
Bt as randomIntFromInterval,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
Ft as sanitizeAsStringDict,
|
|
107
|
+
J as serviceDateTimesFromOpeningHours,
|
|
108
|
+
et as slugify,
|
|
109
|
+
ot as truncate
|
|
109
110
|
};
|