@ancon/wildcat-utils 1.18.8 → 1.19.0
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/getCheckoutOrderStatusTexts.d.ts +38 -0
- package/checkout/getCheckoutOrderStatusTexts.js +1 -0
- package/checkout/getCheckoutOrderStatusTexts.mjs +128 -0
- package/checkout/index.d.ts +3 -1
- package/checkout/index.js +1 -1
- package/checkout/index.mjs +8 -4
- package/checkout/isCheckoutOrderSummary.d.ts +17 -0
- package/checkout/isCheckoutOrderSummary.js +1 -0
- package/checkout/isCheckoutOrderSummary.mjs +6 -0
- package/index.js +1 -1
- package/index.mjs +32 -28
- package/package.json +11 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CheckoutDetails, OrderFormat, TicketItemStatus, TicketStatus } from '@ancon/wildcat-types';
|
|
2
|
+
declare type CheckoutOrderSummaryItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
ticketItem: {
|
|
5
|
+
status: TicketItemStatus;
|
|
6
|
+
ticketItemId: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare type CheckoutOrderSummary = {
|
|
10
|
+
id: string;
|
|
11
|
+
summary: string;
|
|
12
|
+
orderFormat: OrderFormat;
|
|
13
|
+
status: TicketStatus;
|
|
14
|
+
items: CheckoutOrderSummaryItem[];
|
|
15
|
+
};
|
|
16
|
+
declare type Translation = {
|
|
17
|
+
title: string;
|
|
18
|
+
message?: string;
|
|
19
|
+
};
|
|
20
|
+
declare enum TranslationKey {
|
|
21
|
+
YourOrderIsBeingProcessed = "yourOrderIsBeingProcessed",
|
|
22
|
+
YourOrderWasCancelled = "yourOrderWasCancelled",
|
|
23
|
+
ProcessingPayment = "processingPayment",
|
|
24
|
+
YourOrderIsBeingPrepared = "yourOrderIsBeingPrepared",
|
|
25
|
+
YourOrderIsReadyToCollect = "yourOrderIsReadyToCollect",
|
|
26
|
+
YourOrderHasBeenCompleted = "yourOrderHasBeenCompleted",
|
|
27
|
+
YourOrderWillArriveAtYourTable = "yourOrderWillArriveAtYourTable",
|
|
28
|
+
ModifiedDeliveryStartTime = "modifiedDeliveryStartTime",
|
|
29
|
+
ModifiedPickUpTime = "modifiedPickUpTime",
|
|
30
|
+
YourOrderHasBeenAcceptedEstimatedTime = "yourOrderHasBeenAcceptedEstimatedTime",
|
|
31
|
+
YourOrderHasBeenAcceptedPickupTime = "yourOrderHasBeenAcceptedPickupTime",
|
|
32
|
+
YourOrderIsBeingDelivered = "yourOrderIsBeingDelivered",
|
|
33
|
+
YourOrderIsReady = "yourOrderIsReady",
|
|
34
|
+
DeliveryWasCompleted = "deliveryWasCompleted"
|
|
35
|
+
}
|
|
36
|
+
declare type TranslatedTexts = Record<TranslationKey, () => Translation>;
|
|
37
|
+
declare function getOrderStatusTexts(checkout: CheckoutDetails | CheckoutOrderSummary, texts?: TranslatedTexts): [Translation, TranslationKey];
|
|
38
|
+
export default getOrderStatusTexts;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("@ancon/wildcat-types"),l=require("./isCheckoutOrderSummary.js");function c(r){switch(r.status){case e.CheckoutStatus.Created:case e.CheckoutStatus.Ready:case e.CheckoutStatus.Processing:case e.CheckoutStatus.Authorized:return"yourOrderIsBeingProcessed";case e.CheckoutStatus.Canceled:return"yourOrderWasCancelled";case e.CheckoutStatus.Received:return"processingPayment";case e.CheckoutStatus.ReadyToCollect:return"yourOrderIsReadyToCollect";default:throw new Error(`Unhandled checkout status "${r.status}" in getTranslationKeyByCheckoutStatus()`)}}function y(r){switch(r.status){case e.TicketStatus.Pending:case e.TicketStatus.PendingAccept:return"processingPayment";case e.TicketStatus.Preparing:return"yourOrderIsBeingPrepared";case e.TicketStatus.Ready:return"yourOrderIsReadyToCollect";case e.TicketStatus.Closed:return"yourOrderHasBeenCompleted";case e.TicketStatus.Canceled:return"yourOrderWasCancelled";default:throw new Error(`Unhandled ticket status "${r.status}" in getTranslationKeyByTicketStatus()`)}}function m(r){if(l(r))return y(r);const t=c(r);if(t)return t;const s=r.status===e.CheckoutStatus.Captured,a=r.status===e.CheckoutStatus.InProgress,n=r.status===e.CheckoutStatus.Canceled,o=r.orderFormat===e.OrderFormat.TableOrder,i=r.orderFormat===e.OrderFormat.Delivery;if(s)return o?"yourOrderWillArriveAtYourTable":"yourOrderHasBeenAcceptedEstimatedTime";if(a)return i?"yourOrderIsBeingDelivered":"yourOrderHasBeenAcceptedEstimatedTime";if(n){const d=r.orderFormat===e.OrderFormat.EatIn,u=r.orderFormat===e.OrderFormat.TakeAway;if(d||u)return"yourOrderIsReady";if(i)return"deliveryWasCompleted";if(o)return"yourOrderWillArriveAtYourTable"}throw new Error("Could not resolve translation key in getTranslationKey()")}const g={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!"})};function p(r,t=g){const s=m(r),a=t[s]();if(!a)throw new Error("Could not resolve translation in getOrderStatusTexts()");return[a,s]}module.exports=p;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { CheckoutStatus as r, OrderFormat as i, TicketStatus as t } from "@ancon/wildcat-types";
|
|
2
|
+
import c from "./isCheckoutOrderSummary.mjs";
|
|
3
|
+
function m(e) {
|
|
4
|
+
switch (e.status) {
|
|
5
|
+
case r.Created:
|
|
6
|
+
case r.Ready:
|
|
7
|
+
case r.Processing:
|
|
8
|
+
case r.Authorized:
|
|
9
|
+
return "yourOrderIsBeingProcessed";
|
|
10
|
+
case r.Canceled:
|
|
11
|
+
return "yourOrderWasCancelled";
|
|
12
|
+
case r.Received:
|
|
13
|
+
return "processingPayment";
|
|
14
|
+
case r.ReadyToCollect:
|
|
15
|
+
return "yourOrderIsReadyToCollect";
|
|
16
|
+
default:
|
|
17
|
+
throw new Error(
|
|
18
|
+
`Unhandled checkout status "${e.status}" in getTranslationKeyByCheckoutStatus()`
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function g(e) {
|
|
23
|
+
switch (e.status) {
|
|
24
|
+
case t.Pending:
|
|
25
|
+
case t.PendingAccept:
|
|
26
|
+
return "processingPayment";
|
|
27
|
+
case t.Preparing:
|
|
28
|
+
return "yourOrderIsBeingPrepared";
|
|
29
|
+
case t.Ready:
|
|
30
|
+
return "yourOrderIsReadyToCollect";
|
|
31
|
+
case t.Closed:
|
|
32
|
+
return "yourOrderHasBeenCompleted";
|
|
33
|
+
case t.Canceled:
|
|
34
|
+
return "yourOrderWasCancelled";
|
|
35
|
+
default:
|
|
36
|
+
throw new Error(
|
|
37
|
+
`Unhandled ticket status "${e.status}" in getTranslationKeyByTicketStatus()`
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function p(e) {
|
|
42
|
+
if (c(e))
|
|
43
|
+
return g(e);
|
|
44
|
+
const s = m(e);
|
|
45
|
+
if (s)
|
|
46
|
+
return s;
|
|
47
|
+
const a = e.status === r.Captured, o = e.status === r.InProgress, l = e.status === r.Canceled, n = e.orderFormat === i.TableOrder, d = e.orderFormat === i.Delivery;
|
|
48
|
+
if (a)
|
|
49
|
+
return n ? "yourOrderWillArriveAtYourTable" : "yourOrderHasBeenAcceptedEstimatedTime";
|
|
50
|
+
if (o)
|
|
51
|
+
return d ? "yourOrderIsBeingDelivered" : "yourOrderHasBeenAcceptedEstimatedTime";
|
|
52
|
+
if (l) {
|
|
53
|
+
const u = e.orderFormat === i.EatIn, y = e.orderFormat === i.TakeAway;
|
|
54
|
+
if (u || y)
|
|
55
|
+
return "yourOrderIsReady";
|
|
56
|
+
if (d)
|
|
57
|
+
return "deliveryWasCompleted";
|
|
58
|
+
if (n)
|
|
59
|
+
return "yourOrderWillArriveAtYourTable";
|
|
60
|
+
}
|
|
61
|
+
throw new Error("Could not resolve translation key in getTranslationKey()");
|
|
62
|
+
}
|
|
63
|
+
const O = {
|
|
64
|
+
yourOrderIsBeingProcessed: () => ({
|
|
65
|
+
title: "Your order is being processed."
|
|
66
|
+
}),
|
|
67
|
+
yourOrderWasCancelled: () => ({
|
|
68
|
+
title: "Your order was canceled",
|
|
69
|
+
message: "Sorry. Your order could not go through."
|
|
70
|
+
}),
|
|
71
|
+
processingPayment: () => ({
|
|
72
|
+
title: "Processing payment",
|
|
73
|
+
message: "Please wait while your payment is being processed"
|
|
74
|
+
}),
|
|
75
|
+
yourOrderIsBeingPrepared: () => ({
|
|
76
|
+
title: "Your order is now being prepared!",
|
|
77
|
+
message: "We will let you know when it is ready for pickup."
|
|
78
|
+
}),
|
|
79
|
+
yourOrderIsReadyToCollect: () => ({
|
|
80
|
+
title: "Your order is ready to be collected!",
|
|
81
|
+
message: "Please go ahead and show this screen at the collection point"
|
|
82
|
+
}),
|
|
83
|
+
yourOrderHasBeenCompleted: () => ({
|
|
84
|
+
title: "Enjoy your meal!",
|
|
85
|
+
message: "Your order has been completed!"
|
|
86
|
+
}),
|
|
87
|
+
yourOrderWillArriveAtYourTable: () => ({
|
|
88
|
+
title: "Your order has been accepted!",
|
|
89
|
+
message: "It will arrive at your table shortly"
|
|
90
|
+
}),
|
|
91
|
+
modifiedDeliveryStartTime: () => ({
|
|
92
|
+
title: "Your delivery time was modified",
|
|
93
|
+
message: "Delivery will start at approximately 00:00."
|
|
94
|
+
}),
|
|
95
|
+
modifiedPickUpTime: () => ({
|
|
96
|
+
title: "Your pickup time was modified",
|
|
97
|
+
message: "Pickup time: 00:00"
|
|
98
|
+
}),
|
|
99
|
+
yourOrderHasBeenAcceptedEstimatedTime: () => ({
|
|
100
|
+
title: "Your order has been accepted",
|
|
101
|
+
message: "Estimated time: 00:00"
|
|
102
|
+
}),
|
|
103
|
+
yourOrderHasBeenAcceptedPickupTime: () => ({
|
|
104
|
+
title: "Your order has been accepted",
|
|
105
|
+
message: "Pickup time: 00:00"
|
|
106
|
+
}),
|
|
107
|
+
yourOrderIsBeingDelivered: () => ({
|
|
108
|
+
title: "Your order is being delivered",
|
|
109
|
+
message: "It will arrive at your door shortly. Enjoy your meal!"
|
|
110
|
+
}),
|
|
111
|
+
yourOrderIsReady: () => ({
|
|
112
|
+
title: "Your order is ready",
|
|
113
|
+
message: "Enjoy your meal!"
|
|
114
|
+
}),
|
|
115
|
+
deliveryWasCompleted: () => ({
|
|
116
|
+
title: "Your order was completed",
|
|
117
|
+
message: "Enjoy your meal!"
|
|
118
|
+
})
|
|
119
|
+
};
|
|
120
|
+
function w(e, s = O) {
|
|
121
|
+
const a = p(e), o = s[a]();
|
|
122
|
+
if (!o)
|
|
123
|
+
throw new Error("Could not resolve translation in getOrderStatusTexts()");
|
|
124
|
+
return [o, a];
|
|
125
|
+
}
|
|
126
|
+
export {
|
|
127
|
+
w as default
|
|
128
|
+
};
|
package/checkout/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import getCheckoutGroupedModifications from './getCheckoutItemModifications';
|
|
2
2
|
import getCheckoutProductName from './getCheckoutProductName';
|
|
3
|
-
|
|
3
|
+
import getCheckoutOrderStatusTexts from './getCheckoutOrderStatusTexts';
|
|
4
|
+
import isCheckoutOrderSummary from './isCheckoutOrderSummary';
|
|
5
|
+
export { getCheckoutGroupedModifications, getCheckoutProductName, getCheckoutOrderStatusTexts, isCheckoutOrderSummary, };
|
package/checkout/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getCheckoutItemModifications.js"),t=require("./getCheckoutProductName.js");require("@ancon/wildcat-types");require("../currency/getFormattedCurrency.js");require("../currency/getFormattedCurrencyPostfix.js");exports.getCheckoutGroupedModifications=e;exports.getCheckoutProductName=t;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getCheckoutItemModifications.js"),t=require("./getCheckoutProductName.js"),r=require("./getCheckoutOrderStatusTexts.js"),u=require("./isCheckoutOrderSummary.js");require("@ancon/wildcat-types");require("../currency/getFormattedCurrency.js");require("../currency/getFormattedCurrencyPostfix.js");exports.getCheckoutGroupedModifications=e;exports.getCheckoutProductName=t;exports.getCheckoutOrderStatusTexts=r;exports.isCheckoutOrderSummary=u;
|
package/checkout/index.mjs
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
1
|
+
import { default as u } from "./getCheckoutItemModifications.mjs";
|
|
2
|
+
import { default as d } from "./getCheckoutProductName.mjs";
|
|
3
|
+
import { default as p } from "./getCheckoutOrderStatusTexts.mjs";
|
|
4
|
+
import { default as i } from "./isCheckoutOrderSummary.mjs";
|
|
3
5
|
import "@ancon/wildcat-types";
|
|
4
6
|
import "../currency/getFormattedCurrency.mjs";
|
|
5
7
|
import "../currency/getFormattedCurrencyPostfix.mjs";
|
|
6
8
|
export {
|
|
7
|
-
|
|
8
|
-
p as
|
|
9
|
+
u as getCheckoutGroupedModifications,
|
|
10
|
+
p as getCheckoutOrderStatusTexts,
|
|
11
|
+
d as getCheckoutProductName,
|
|
12
|
+
i as isCheckoutOrderSummary
|
|
9
13
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OrderFormat, TicketItemStatus, TicketStatus } from '@ancon/wildcat-types';
|
|
2
|
+
declare type CheckoutOrderSummaryItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
ticketItem: {
|
|
5
|
+
status: TicketItemStatus;
|
|
6
|
+
ticketItemId: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare type CheckoutOrderSummary = {
|
|
10
|
+
id: string;
|
|
11
|
+
summary: string;
|
|
12
|
+
orderFormat: OrderFormat;
|
|
13
|
+
status: TicketStatus;
|
|
14
|
+
items: CheckoutOrderSummaryItem[];
|
|
15
|
+
};
|
|
16
|
+
declare function isCheckoutOrderSummary(checkout: unknown): checkout is CheckoutOrderSummary;
|
|
17
|
+
export default isCheckoutOrderSummary;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function s(r){return(r==null?void 0:r.summary)!=null}module.exports=s;
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/enums.js"),t=require("./shared/isWithinFlag.js"),r=require("./shared/generateId.js"),i=require("./outlet/getListOutletOpeningHoursTable.js"),n=require("./outlet/getOutletTagInformation.js"),o=require("./outlet/getOutletAvailabilityInfo.js"),u=require("./outlet/getOutletOfflineOrderFormats.js"),s=require("./outlet/getOutletAvailableOrderFormats.js"),a=require("./outlet/getOutletFormattedDistance.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/enums.js"),t=require("./shared/isWithinFlag.js"),r=require("./shared/generateId.js"),i=require("./outlet/getListOutletOpeningHoursTable.js"),n=require("./outlet/getOutletTagInformation.js"),o=require("./outlet/getOutletAvailabilityInfo.js"),u=require("./outlet/getOutletOfflineOrderFormats.js"),s=require("./outlet/getOutletAvailableOrderFormats.js"),a=require("./outlet/getOutletFormattedDistance.js"),c=require("./outlet/isOutletAcceptingPreOrders.js"),l=require("./outlet/getOutletDeliveryFee.js"),g=require("./outlet/getOutletTodayOpeningTimes.js"),d=require("./outlet/getOutletOrderFormats.js"),q=require("./outlet/serviceDateTimesFromOpeningHours.js"),O=require("./versioning/isVersionALessThanB.js"),_=require("./versioning/cleanVersionString.js"),m=require("./api/getUrlAndParams.js"),k=require("./api/getEndpointWithVersion.js"),f=require("./api/generateBackoffWithEqualJitter.js"),h=require("./string/slugify.js"),y=require("./string/truncate.js"),p=require("./color/lighten.js"),P=require("./color/brighten.js"),T=require("./color/darken.js"),F=require("./color/isDarkBackground.js"),v=require("./user/getFullName.js"),S=require("./user/getFullAddressString.js"),D=require("./logger/Logger.js"),I=require("./logger/types.js"),b=require("./logger/sanitizeAsStringDict.js"),A=require("./printing/getPrinterType.js"),V=require("./printing/isValidPrinter.js"),C=require("./printing/isValidNetworkPrinter.js"),L=require("./printing/isValidStarCloudPrinter.js"),W=require("./printing/isTerminalPrinter.js"),B=require("./number/randomIntFromInterval.js"),N=require("./tables/decodeTableQRPayload.js"),M=require("./checkout/getCheckoutItemModifications.js"),E=require("./checkout/getCheckoutProductName.js"),H=require("./checkout/getCheckoutOrderStatusTexts.js"),w=require("./checkout/isCheckoutOrderSummary.js"),x=require("./currency/getFormattedCurrency.js"),z=require("./inventory/isDetailedProductOutOfStock.js"),J=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=t;exports.generateId=r;exports.getListOutletOpeningHoursTable=i;exports.getOutletTagInformation=n.default;exports.getOutletAvailabilityInfo=o.default;exports.getOutletOfflineOrderFormats=u;exports.getOutletAvailableOrderFormats=s;exports.getOutletFormattedDistance=a;exports.isOutletAcceptingPreOrders=c;exports.getOutletDeliveryFee=l;exports.getOutletTodayOpeningTimes=g;exports.getOutletOrderFormats=d;exports.serviceDateTimesFromOpeningHours=q;exports.isVersionALessThanB=O;exports.cleanVersionString=_;exports.getUrlAndParams=m;exports.getEndpointWithVersion=k;exports.generateBackoffWithEqualJitter=f;exports.slugify=h;exports.truncate=y;exports.lighten=p;exports.brighten=P;exports.darken=T;exports.isDarkBackground=F;exports.getFullName=v;exports.getFullAddressString=S;exports.Logger=D;exports.LogLevel=I.LogLevel;exports.sanitizeAsStringDict=b;exports.getPrinterType=A;exports.isValidPrinter=V;exports.isValidNetworkPrinter=C;exports.isValidStarCloudPrinter=L;exports.isTerminalPrinter=W;exports.randomIntFromInterval=B;exports.decodeTableQRPayload=N;exports.getCheckoutGroupedModifications=M;exports.getCheckoutProductName=E;exports.getCheckoutOrderStatusTexts=H;exports.isCheckoutOrderSummary=w;exports.getFormattedCurrency=x;exports.isDetailedProductOutOfStock=z;exports.isDetailedProductVariantOutOfStocks=J;exports.isMenuTreeProductOutOfStock=Q;
|
package/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { DayOfWeek as x, IntervalState as g, IntervalType as O, OrderFormat as c } from "./shared/enums.mjs";
|
|
2
|
-
import { default as
|
|
2
|
+
import { default as F } from "./shared/isWithinFlag.mjs";
|
|
3
3
|
import { default as T } from "./shared/generateId.mjs";
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
4
|
+
import { default as y } from "./outlet/getListOutletOpeningHoursTable.mjs";
|
|
5
|
+
import { default as v } from "./outlet/getOutletTagInformation.mjs";
|
|
6
6
|
import { default as A } from "./outlet/getOutletAvailabilityInfo.mjs";
|
|
7
7
|
import { default as V } from "./outlet/getOutletOfflineOrderFormats.mjs";
|
|
8
|
-
import { default as
|
|
8
|
+
import { default as b } from "./outlet/getOutletAvailableOrderFormats.mjs";
|
|
9
9
|
import { default as W } from "./outlet/getOutletFormattedDistance.mjs";
|
|
10
10
|
import { default as N } from "./outlet/isOutletAcceptingPreOrders.mjs";
|
|
11
11
|
import { default as H } from "./outlet/getOutletDeliveryFee.mjs";
|
|
@@ -21,26 +21,28 @@ import { default as et } from "./string/slugify.mjs";
|
|
|
21
21
|
import { default as ot } from "./string/truncate.mjs";
|
|
22
22
|
import { default as ft } from "./color/lighten.mjs";
|
|
23
23
|
import { default as st } from "./color/brighten.mjs";
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
24
|
+
import { default as dt } from "./color/darken.mjs";
|
|
25
|
+
import { default as it } from "./color/isDarkBackground.mjs";
|
|
26
26
|
import { default as nt } from "./user/getFullName.mjs";
|
|
27
27
|
import { default as gt } from "./user/getFullAddressString.mjs";
|
|
28
28
|
import { default as ct } from "./logger/Logger.mjs";
|
|
29
|
-
import { LogLevel as
|
|
29
|
+
import { LogLevel as Ft } from "./logger/types.mjs";
|
|
30
30
|
import { default as Tt } from "./logger/sanitizeAsStringDict.mjs";
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
31
|
+
import { default as yt } from "./printing/getPrinterType.mjs";
|
|
32
|
+
import { default as vt } from "./printing/isValidPrinter.mjs";
|
|
33
33
|
import { default as At } from "./printing/isValidNetworkPrinter.mjs";
|
|
34
34
|
import { default as Vt } from "./printing/isValidStarCloudPrinter.mjs";
|
|
35
|
-
import { default as
|
|
35
|
+
import { default as bt } from "./printing/isTerminalPrinter.mjs";
|
|
36
36
|
import { default as Wt } from "./number/randomIntFromInterval.mjs";
|
|
37
37
|
import { default as Nt } from "./tables/decodeTableQRPayload.mjs";
|
|
38
38
|
import { default as Ht } from "./checkout/getCheckoutItemModifications.mjs";
|
|
39
39
|
import { default as qt } from "./checkout/getCheckoutProductName.mjs";
|
|
40
|
-
import { default as zt } from "./
|
|
41
|
-
import { default as Jt } from "./
|
|
42
|
-
import { default as Rt } from "./
|
|
43
|
-
import { default as jt } from "./inventory/
|
|
40
|
+
import { default as zt } from "./checkout/getCheckoutOrderStatusTexts.mjs";
|
|
41
|
+
import { default as Jt } from "./checkout/isCheckoutOrderSummary.mjs";
|
|
42
|
+
import { default as Rt } from "./currency/getFormattedCurrency.mjs";
|
|
43
|
+
import { default as jt } from "./inventory/isDetailedProductOutOfStock.mjs";
|
|
44
|
+
import { default as Xt } from "./inventory/isDetailedProductVariantOutOfStocks.mjs";
|
|
45
|
+
import { default as Zt } from "./inventory/isMenuTreeProductOutOfStock.mjs";
|
|
44
46
|
import "moment";
|
|
45
47
|
import "@ancon/wildcat-types";
|
|
46
48
|
import "./outlet/types.mjs";
|
|
@@ -57,43 +59,45 @@ export {
|
|
|
57
59
|
x as DayOfWeek,
|
|
58
60
|
g as IntervalState,
|
|
59
61
|
O as IntervalType,
|
|
60
|
-
|
|
62
|
+
Ft as LogLevel,
|
|
61
63
|
ct as Logger,
|
|
62
64
|
c as OrderFormat,
|
|
63
65
|
st as brighten,
|
|
64
66
|
j as cleanVersionString,
|
|
65
|
-
|
|
67
|
+
dt as darken,
|
|
66
68
|
Nt as decodeTableQRPayload,
|
|
67
69
|
$ as generateBackoffWithEqualJitter,
|
|
68
70
|
T as generateId,
|
|
69
71
|
Ht as getCheckoutGroupedModifications,
|
|
72
|
+
zt as getCheckoutOrderStatusTexts,
|
|
70
73
|
qt as getCheckoutProductName,
|
|
71
74
|
Z as getEndpointWithVersion,
|
|
72
|
-
|
|
75
|
+
Rt as getFormattedCurrency,
|
|
73
76
|
gt as getFullAddressString,
|
|
74
77
|
nt as getFullName,
|
|
75
|
-
|
|
78
|
+
y as getListOutletOpeningHoursTable,
|
|
76
79
|
A as getOutletAvailabilityInfo,
|
|
77
|
-
|
|
80
|
+
b as getOutletAvailableOrderFormats,
|
|
78
81
|
H as getOutletDeliveryFee,
|
|
79
82
|
W as getOutletFormattedDistance,
|
|
80
83
|
V as getOutletOfflineOrderFormats,
|
|
81
84
|
z as getOutletOrderFormats,
|
|
82
|
-
|
|
85
|
+
v as getOutletTagInformation,
|
|
83
86
|
q as getOutletTodayOpeningTimes,
|
|
84
|
-
|
|
87
|
+
yt as getPrinterType,
|
|
85
88
|
X as getUrlAndParams,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
Jt as isCheckoutOrderSummary,
|
|
90
|
+
it as isDarkBackground,
|
|
91
|
+
jt as isDetailedProductOutOfStock,
|
|
92
|
+
Xt as isDetailedProductVariantOutOfStocks,
|
|
93
|
+
Zt as isMenuTreeProductOutOfStock,
|
|
90
94
|
N as isOutletAcceptingPreOrders,
|
|
91
|
-
|
|
95
|
+
bt as isTerminalPrinter,
|
|
92
96
|
At as isValidNetworkPrinter,
|
|
93
|
-
|
|
97
|
+
vt as isValidPrinter,
|
|
94
98
|
Vt as isValidStarCloudPrinter,
|
|
95
99
|
R as isVersionALessThanB,
|
|
96
|
-
|
|
100
|
+
F as isWithinFlag,
|
|
97
101
|
ft as lighten,
|
|
98
102
|
Wt as randomIntFromInterval,
|
|
99
103
|
Tt as sanitizeAsStringDict,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancon/wildcat-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -31,6 +31,11 @@
|
|
|
31
31
|
"require": "./checkout/getCheckoutItemModifications.js",
|
|
32
32
|
"types": "./checkout/getCheckoutItemModifications.d.ts"
|
|
33
33
|
},
|
|
34
|
+
"./checkout/getCheckoutOrderStatusTexts": {
|
|
35
|
+
"import": "./checkout/getCheckoutOrderStatusTexts.mjs",
|
|
36
|
+
"require": "./checkout/getCheckoutOrderStatusTexts.js",
|
|
37
|
+
"types": "./checkout/getCheckoutOrderStatusTexts.d.ts"
|
|
38
|
+
},
|
|
34
39
|
"./checkout/getCheckoutProductName": {
|
|
35
40
|
"import": "./checkout/getCheckoutProductName.mjs",
|
|
36
41
|
"require": "./checkout/getCheckoutProductName.js",
|
|
@@ -41,6 +46,11 @@
|
|
|
41
46
|
"require": "./checkout/index.js",
|
|
42
47
|
"types": "./checkout/index.d.ts"
|
|
43
48
|
},
|
|
49
|
+
"./checkout/isCheckoutOrderSummary": {
|
|
50
|
+
"import": "./checkout/isCheckoutOrderSummary.mjs",
|
|
51
|
+
"require": "./checkout/isCheckoutOrderSummary.js",
|
|
52
|
+
"types": "./checkout/isCheckoutOrderSummary.d.ts"
|
|
53
|
+
},
|
|
44
54
|
"./color/brighten": {
|
|
45
55
|
"import": "./color/brighten.mjs",
|
|
46
56
|
"require": "./color/brighten.js",
|