@ancon/wildcat-utils 1.25.3 → 1.25.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/index.js +1 -1
- package/index.mjs +111 -109
- package/logger/Logger.d.ts +1 -1
- package/logger/Logger.js +1 -1
- package/logger/Logger.mjs +9 -4
- package/logger/types.d.ts +2 -1
- package/outlet/constants.d.ts +5 -0
- package/outlet/constants.js +1 -1
- package/outlet/constants.mjs +8 -6
- package/outlet/getPartitionedOutletsList.d.ts +5 -0
- package/outlet/getPartitionedOutletsList.js +1 -0
- package/outlet/getPartitionedOutletsList.mjs +21 -0
- package/outlet/index.d.ts +2 -1
- package/outlet/index.js +1 -1
- package/outlet/index.mjs +8 -6
- package/package.json +6 -1
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"),i=require("./shared/generateId.js"),o=require("./shared/wait.js"),n=require("./outlet/getListOutletOpeningHoursTable.js"),u=require("./outlet/getOutletTagInformation.js"),s=require("./outlet/getOutletAvailabilityInfo.js"),a=require("./outlet/getOutletOfflineOrderFormats.js"),c=require("./outlet/getOutletAvailableOrderFormats.js"),l=require("./outlet/getOutletFormattedDistance.js"),g=require("./outlet/isOutletAcceptingPreOrders.js"),d=require("./outlet/getOutletDeliveryFee.js"),q=require("./outlet/getOutletTodayOpeningTimes.js"),O=require("./outlet/getOutletOrderFormats.js"),_=require("./outlet/serviceDateTimesFromOpeningHours.js"),k=require("./outlet/getPickerIntervalsForDay.js"),m=require("./outlet/getServiceIntervalRange.js"),S=require("./outlet/getServiceIntervalsForOrderFormat.js"),p=require("./outlet/getOutletFormattedAddress.js"),f=require("./versioning/isVersionALessThanB.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/enums.js"),t=require("./shared/isWithinFlag.js"),i=require("./shared/generateId.js"),o=require("./shared/wait.js"),n=require("./outlet/getListOutletOpeningHoursTable.js"),u=require("./outlet/getOutletTagInformation.js"),s=require("./outlet/getOutletAvailabilityInfo.js"),a=require("./outlet/getOutletOfflineOrderFormats.js"),c=require("./outlet/getOutletAvailableOrderFormats.js"),l=require("./outlet/getOutletFormattedDistance.js"),g=require("./outlet/isOutletAcceptingPreOrders.js"),d=require("./outlet/getOutletDeliveryFee.js"),q=require("./outlet/getOutletTodayOpeningTimes.js"),O=require("./outlet/getOutletOrderFormats.js"),_=require("./outlet/serviceDateTimesFromOpeningHours.js"),k=require("./outlet/getPickerIntervalsForDay.js"),m=require("./outlet/getServiceIntervalRange.js"),S=require("./outlet/getServiceIntervalsForOrderFormat.js"),p=require("./outlet/getOutletFormattedAddress.js"),f=require("./outlet/getPartitionedOutletsList.js"),P=require("./versioning/isVersionALessThanB.js"),y=require("./versioning/cleanVersionString.js"),v=require("./api/getUrlAndParams.js"),h=require("./api/getEndpointWithVersion.js"),F=require("./api/generateBackoffWithEqualJitter.js"),T=require("./api/isAcceptedResponse.js"),I=require("./api/isNoContentResponse.js"),D=require("./string/slugify.js"),C=require("./string/truncate.js"),A=require("./color/lighten.js"),b=require("./color/brighten.js"),R=require("./color/darken.js"),V=require("./color/isDarkBackground.js"),E=require("./user/getFullName.js"),L=require("./user/getFullAddressString.js"),H=require("./logger/Logger.js"),M=require("./logger/types.js"),N=require("./logger/sanitizeAsStringDict.js"),B=require("./printing/getPrinterType.js"),U=require("./printing/isValidPrinter.js"),W=require("./printing/isValidNetworkPrinter.js"),w=require("./printing/isValidStarCloudPrinter.js"),x=require("./printing/isTerminalPrinter.js"),z=require("./printing/isCloudPrintModeEnabled.js"),J=require("./number/randomIntFromInterval.js"),K=require("./tables/decodeTableQRPayload.js"),Q=require("./checkout/getCheckoutItemModifications.js"),j=require("./checkout/getCheckoutProductName.js"),r=require("./checkout/getCheckoutOrderStatusTexts.js"),G=require("./checkout/getCheckoutItemsMappedByTicketItemStatus.js"),X=require("./checkout/isCheckoutOrderSummary.js"),Y=require("./currency/getFormattedCurrency.js"),Z=require("./inventory/isDetailedProductOutOfStock.js"),$=require("./inventory/isDetailedProductVariantOutOfStocks.js"),ee=require("./inventory/isMenuTreeProductOutOfStock.js"),re=require("./inventory/isDetailedProductUpSellsOutOfStock.js"),te=require("./inventory/isUpSellProductOutStock.js"),ie=require("./inventory/isDetailedProductOutletStockOutOfStock.js"),oe=require("./inventory/getDetailedProductVariantStock.js"),ne=require("./signalr/createUseSignalRHook.js"),ue=require("./signalr/SignalR.js"),se=require("./error/createCodedError.js"),ae=require("./error/isCodedError.js"),ce=require("./error/isNetworkError.js"),le=require("./error/isLockedError.js"),ge=require("./hangfire/isHangfireResponse.js"),de=require("./hangfire/createHangfirePoller.js"),qe=require("./hangfire/createMakeHangfireRequest.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("./shared/constants.js");require("./time/toMinutes.js");require("./time/getNextTenthMinute.js");require("compare-versions");require("tinycolor2");require("@ancon/wildcat-printing");require("./currency/getFormattedCurrencyPostfix.js");require("react");require("react-redux");require("@microsoft/signalr");require("./index-4a932b99.js");require("./axios-5f25f7ff.js");exports.DayOfWeek=e.DayOfWeek;exports.IntervalState=e.IntervalState;exports.IntervalType=e.IntervalType;exports.OrderFormat=e.OrderFormat;exports.isWithinFlag=t;exports.generateId=i;exports.wait=o;exports.getListOutletOpeningHoursTable=n;exports.getOutletTagInformation=u.default;exports.getOutletAvailabilityInfo=s.default;exports.getOutletOfflineOrderFormats=a;exports.getOutletAvailableOrderFormats=c;exports.getOutletFormattedDistance=l;exports.isOutletAcceptingPreOrders=g;exports.getOutletDeliveryFee=d;exports.getOutletTodayOpeningTimes=q;exports.getOutletOrderFormats=O;exports.serviceDateTimesFromOpeningHours=_;exports.getPickerIntervalsForDay=k;exports.getServiceIntervalRange=m;exports.getServiceIntervalsForOrderFormat=S;exports.getOutletFormattedAddress=p;exports.getPartitionedOutletsList=f;exports.isVersionALessThanB=P;exports.cleanVersionString=y;exports.getUrlAndParams=v;exports.getEndpointWithVersion=h;exports.generateBackoffWithEqualJitter=F;exports.isAcceptedResponse=T;exports.isNoContentResponse=I;exports.slugify=D;exports.truncate=C;exports.lighten=A;exports.brighten=b;exports.darken=R;exports.isDarkBackground=V;exports.getFullName=E;exports.getFullAddressString=L;exports.Logger=H;exports.LogLevel=M.LogLevel;exports.sanitizeAsStringDict=N;exports.getPrinterType=B;exports.isValidPrinter=U;exports.isValidNetworkPrinter=W;exports.isValidStarCloudPrinter=w;exports.isTerminalPrinter=x;exports.isCloudPrintModeEnabled=z;exports.randomIntFromInterval=J;exports.decodeTableQRPayload=K;exports.getCheckoutGroupedModifications=Q;exports.getCheckoutProductName=j;exports.TranslationKey=r.TranslationKey;exports.getCheckoutOrderStatusTexts=r.default;exports.getCheckoutItemsMappedByTicketItemStatus=G;exports.isCheckoutOrderSummary=X;exports.getFormattedCurrency=Y;exports.isDetailedProductOutOfStock=Z;exports.isDetailedProductVariantOutOfStocks=$;exports.isMenuTreeProductOutOfStock=ee;exports.isDetailedProductUpSellsOutOfStock=re;exports.isUpSellProductOutOfStock=te;exports.isDetailedProductOutletStockOutOfStock=ie;exports.getDetailedProductVariantStock=oe;exports.createUseSignalRHook=ne;exports.SignalR=ue;exports.createCodedError=se;exports.isCodedError=ae;exports.isNetworkError=ce;exports.isLockedError=le;exports.isHangfireResponse=ge;exports.createHangfirePoller=de.default;exports.createMakeHangfireRequest=qe;
|
package/index.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import { DayOfWeek as T, IntervalState as v, IntervalType as y, OrderFormat as D
|
|
|
2
2
|
import { default as h } from "./shared/isWithinFlag.mjs";
|
|
3
3
|
import { default as A } from "./shared/generateId.mjs";
|
|
4
4
|
import { default as V } from "./shared/wait.mjs";
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
5
|
+
import { default as L } from "./outlet/getListOutletOpeningHoursTable.mjs";
|
|
6
|
+
import { default as H } from "./outlet/getOutletTagInformation.mjs";
|
|
7
7
|
import { default as N } from "./outlet/getOutletAvailabilityInfo.mjs";
|
|
8
8
|
import { default as U } from "./outlet/getOutletOfflineOrderFormats.mjs";
|
|
9
9
|
import { default as w } from "./outlet/getOutletAvailableOrderFormats.mjs";
|
|
@@ -13,58 +13,59 @@ import { default as Q } from "./outlet/getOutletDeliveryFee.mjs";
|
|
|
13
13
|
import { default as X } from "./outlet/getOutletTodayOpeningTimes.mjs";
|
|
14
14
|
import { default as Z } from "./outlet/getOutletOrderFormats.mjs";
|
|
15
15
|
import { default as $ } from "./outlet/serviceDateTimesFromOpeningHours.mjs";
|
|
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 { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as $
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import {
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
16
|
+
import { default as et } from "./outlet/getPickerIntervalsForDay.mjs";
|
|
17
|
+
import { default as ot } from "./outlet/getServiceIntervalRange.mjs";
|
|
18
|
+
import { default as ft } from "./outlet/getServiceIntervalsForOrderFormat.mjs";
|
|
19
|
+
import { default as lt } from "./outlet/getOutletFormattedAddress.mjs";
|
|
20
|
+
import { default as ut } from "./outlet/getPartitionedOutletsList.mjs";
|
|
21
|
+
import { default as mt } from "./versioning/isVersionALessThanB.mjs";
|
|
22
|
+
import { default as xt } from "./versioning/cleanVersionString.mjs";
|
|
23
|
+
import { default as gt } from "./api/getUrlAndParams.mjs";
|
|
24
|
+
import { default as Ot } from "./api/getEndpointWithVersion.mjs";
|
|
25
|
+
import { default as St } from "./api/generateBackoffWithEqualJitter.mjs";
|
|
26
|
+
import { default as Ft } from "./api/isAcceptedResponse.mjs";
|
|
27
|
+
import { default as vt } from "./api/isNoContentResponse.mjs";
|
|
28
|
+
import { default as Dt } from "./string/slugify.mjs";
|
|
29
|
+
import { default as ht } from "./string/truncate.mjs";
|
|
30
|
+
import { default as At } from "./color/lighten.mjs";
|
|
31
|
+
import { default as Vt } from "./color/brighten.mjs";
|
|
32
|
+
import { default as Lt } from "./color/darken.mjs";
|
|
33
|
+
import { default as Ht } from "./color/isDarkBackground.mjs";
|
|
34
|
+
import { default as Nt } from "./user/getFullName.mjs";
|
|
35
|
+
import { default as Ut } from "./user/getFullAddressString.mjs";
|
|
36
|
+
import { default as wt } from "./logger/Logger.mjs";
|
|
37
|
+
import { LogLevel as zt } from "./logger/types.mjs";
|
|
38
|
+
import { default as Jt } from "./logger/sanitizeAsStringDict.mjs";
|
|
39
|
+
import { default as Qt } from "./printing/getPrinterType.mjs";
|
|
40
|
+
import { default as Xt } from "./printing/isValidPrinter.mjs";
|
|
41
|
+
import { default as Zt } from "./printing/isValidNetworkPrinter.mjs";
|
|
42
|
+
import { default as $t } from "./printing/isValidStarCloudPrinter.mjs";
|
|
43
|
+
import { default as ee } from "./printing/isTerminalPrinter.mjs";
|
|
44
|
+
import { default as oe } from "./printing/isCloudPrintModeEnabled.mjs";
|
|
45
|
+
import { default as fe } from "./number/randomIntFromInterval.mjs";
|
|
46
|
+
import { default as le } from "./tables/decodeTableQRPayload.mjs";
|
|
47
|
+
import { default as ue } from "./checkout/getCheckoutItemModifications.mjs";
|
|
48
|
+
import { default as me } from "./checkout/getCheckoutProductName.mjs";
|
|
49
|
+
import { TranslationKey as xe, default as ne } from "./checkout/getCheckoutOrderStatusTexts.mjs";
|
|
50
|
+
import { default as ce } from "./checkout/getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
51
|
+
import { default as ke } from "./checkout/isCheckoutOrderSummary.mjs";
|
|
52
|
+
import { default as Pe } from "./currency/getFormattedCurrency.mjs";
|
|
53
|
+
import { default as Te } from "./inventory/isDetailedProductOutOfStock.mjs";
|
|
54
|
+
import { default as ye } from "./inventory/isDetailedProductVariantOutOfStocks.mjs";
|
|
55
|
+
import { default as Ie } from "./inventory/isMenuTreeProductOutOfStock.mjs";
|
|
56
|
+
import { default as Ce } from "./inventory/isDetailedProductUpSellsOutOfStock.mjs";
|
|
57
|
+
import { default as Re } from "./inventory/isUpSellProductOutStock.mjs";
|
|
58
|
+
import { default as Ee } from "./inventory/isDetailedProductOutletStockOutOfStock.mjs";
|
|
59
|
+
import { default as be } from "./inventory/getDetailedProductVariantStock.mjs";
|
|
60
|
+
import { default as Me } from "./signalr/createUseSignalRHook.mjs";
|
|
61
|
+
import { default as Be } from "./signalr/SignalR.mjs";
|
|
62
|
+
import { default as We } from "./error/createCodedError.mjs";
|
|
63
|
+
import { default as qe } from "./error/isCodedError.mjs";
|
|
64
|
+
import { default as Ge } from "./error/isNetworkError.mjs";
|
|
65
|
+
import { default as Ke } from "./error/isLockedError.mjs";
|
|
66
|
+
import { default as je } from "./hangfire/isHangfireResponse.mjs";
|
|
67
|
+
import { default as Ye } from "./hangfire/createHangfirePoller.mjs";
|
|
68
|
+
import { default as _e } from "./hangfire/createMakeHangfireRequest.mjs";
|
|
68
69
|
import "moment";
|
|
69
70
|
import "@ancon/wildcat-types";
|
|
70
71
|
import "./outlet/types.mjs";
|
|
@@ -89,72 +90,73 @@ export {
|
|
|
89
90
|
T as DayOfWeek,
|
|
90
91
|
v as IntervalState,
|
|
91
92
|
y as IntervalType,
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
zt as LogLevel,
|
|
94
|
+
wt as Logger,
|
|
94
95
|
D as OrderFormat,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
Be as SignalR,
|
|
97
|
+
xe as TranslationKey,
|
|
98
|
+
Vt as brighten,
|
|
99
|
+
xt as cleanVersionString,
|
|
100
|
+
We as createCodedError,
|
|
101
|
+
Ye as createHangfirePoller,
|
|
102
|
+
_e as createMakeHangfireRequest,
|
|
103
|
+
Me as createUseSignalRHook,
|
|
104
|
+
Lt as darken,
|
|
105
|
+
le as decodeTableQRPayload,
|
|
106
|
+
St as generateBackoffWithEqualJitter,
|
|
106
107
|
A as generateId,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
108
|
+
ue as getCheckoutGroupedModifications,
|
|
109
|
+
ce as getCheckoutItemsMappedByTicketItemStatus,
|
|
110
|
+
ne as getCheckoutOrderStatusTexts,
|
|
111
|
+
me as getCheckoutProductName,
|
|
112
|
+
be as getDetailedProductVariantStock,
|
|
113
|
+
Ot as getEndpointWithVersion,
|
|
114
|
+
Pe as getFormattedCurrency,
|
|
115
|
+
Ut as getFullAddressString,
|
|
116
|
+
Nt as getFullName,
|
|
117
|
+
L as getListOutletOpeningHoursTable,
|
|
117
118
|
N as getOutletAvailabilityInfo,
|
|
118
119
|
w as getOutletAvailableOrderFormats,
|
|
119
120
|
Q as getOutletDeliveryFee,
|
|
120
|
-
|
|
121
|
+
lt as getOutletFormattedAddress,
|
|
121
122
|
z as getOutletFormattedDistance,
|
|
122
123
|
U as getOutletOfflineOrderFormats,
|
|
123
124
|
Z as getOutletOrderFormats,
|
|
124
|
-
|
|
125
|
+
H as getOutletTagInformation,
|
|
125
126
|
X as getOutletTodayOpeningTimes,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
127
|
+
ut as getPartitionedOutletsList,
|
|
128
|
+
et as getPickerIntervalsForDay,
|
|
129
|
+
Qt as getPrinterType,
|
|
130
|
+
ot as getServiceIntervalRange,
|
|
131
|
+
ft as getServiceIntervalsForOrderFormat,
|
|
132
|
+
gt as getUrlAndParams,
|
|
133
|
+
Ft as isAcceptedResponse,
|
|
134
|
+
ke as isCheckoutOrderSummary,
|
|
135
|
+
oe as isCloudPrintModeEnabled,
|
|
136
|
+
qe as isCodedError,
|
|
137
|
+
Ht as isDarkBackground,
|
|
138
|
+
Te as isDetailedProductOutOfStock,
|
|
139
|
+
Ee as isDetailedProductOutletStockOutOfStock,
|
|
140
|
+
Ce as isDetailedProductUpSellsOutOfStock,
|
|
141
|
+
ye as isDetailedProductVariantOutOfStocks,
|
|
142
|
+
je as isHangfireResponse,
|
|
143
|
+
Ke as isLockedError,
|
|
144
|
+
Ie as isMenuTreeProductOutOfStock,
|
|
145
|
+
Ge as isNetworkError,
|
|
146
|
+
vt as isNoContentResponse,
|
|
145
147
|
J as isOutletAcceptingPreOrders,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
ee as isTerminalPrinter,
|
|
149
|
+
Re as isUpSellProductOutOfStock,
|
|
150
|
+
Zt as isValidNetworkPrinter,
|
|
151
|
+
Xt as isValidPrinter,
|
|
152
|
+
$t as isValidStarCloudPrinter,
|
|
153
|
+
mt as isVersionALessThanB,
|
|
152
154
|
h as isWithinFlag,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
At as lighten,
|
|
156
|
+
fe as randomIntFromInterval,
|
|
157
|
+
Jt as sanitizeAsStringDict,
|
|
156
158
|
$ as serviceDateTimesFromOpeningHours,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
Dt as slugify,
|
|
160
|
+
ht as truncate,
|
|
159
161
|
V as wait
|
|
160
162
|
};
|
package/logger/Logger.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ declare class Logger {
|
|
|
8
8
|
debug<T = unknown>(message: string, data?: T): void;
|
|
9
9
|
info<T = unknown>(message: string, data?: T): void;
|
|
10
10
|
warn<T = unknown>(message: string, data?: T): void;
|
|
11
|
-
error<T = unknown>(message: string, data?: T): void;
|
|
11
|
+
error<T = unknown, O = unknown>(message: string, data?: T, options?: O): void;
|
|
12
12
|
fatal<T = unknown>(message: string, data?: T): void;
|
|
13
13
|
}
|
|
14
14
|
export default Logger;
|
package/logger/Logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./types.js");class
|
|
1
|
+
"use strict";const i=require("./types.js");class g{constructor(e){this.logStrategy=e}sanitize(e){return this.logStrategy.sanitize?this.logStrategy.sanitize(e):e}setLogStrategy(e){this.logStrategy=e}verbose(e,t){this.logStrategy.execute(i.LogLevel.Verbose,e,this.sanitize(t))}debug(e,t){this.logStrategy.execute(i.LogLevel.Debug,e,this.sanitize(t))}info(e,t){this.logStrategy.execute(i.LogLevel.Information,e,this.sanitize(t))}warn(e,t){this.logStrategy.execute(i.LogLevel.Warning,e,this.sanitize(t))}error(e,t,s){this.logStrategy.execute(i.LogLevel.Error,e,this.sanitize(t),s)}fatal(e,t){this.logStrategy.execute(i.LogLevel.Fatal,e,this.sanitize(t))}}module.exports=g;
|
package/logger/Logger.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LogLevel as i } from "./types.mjs";
|
|
2
|
-
class
|
|
2
|
+
class g {
|
|
3
3
|
constructor(t) {
|
|
4
4
|
this.logStrategy = t;
|
|
5
5
|
}
|
|
@@ -25,13 +25,18 @@ class a {
|
|
|
25
25
|
warn(t, e) {
|
|
26
26
|
this.logStrategy.execute(i.Warning, t, this.sanitize(e));
|
|
27
27
|
}
|
|
28
|
-
error(t, e) {
|
|
29
|
-
this.logStrategy.execute(
|
|
28
|
+
error(t, e, s) {
|
|
29
|
+
this.logStrategy.execute(
|
|
30
|
+
i.Error,
|
|
31
|
+
t,
|
|
32
|
+
this.sanitize(e),
|
|
33
|
+
s
|
|
34
|
+
);
|
|
30
35
|
}
|
|
31
36
|
fatal(t, e) {
|
|
32
37
|
this.logStrategy.execute(i.Fatal, t, this.sanitize(e));
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
export {
|
|
36
|
-
|
|
41
|
+
g as default
|
|
37
42
|
};
|
package/logger/types.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export interface LogStrategy {
|
|
|
16
16
|
* @param logLevel `LogLevel`
|
|
17
17
|
* @param message Message string
|
|
18
18
|
* @param data Any additional data to log. Sanitized if `sanitize()` method is implemented.
|
|
19
|
+
* @param options Any additional options to use when error logging
|
|
19
20
|
*/
|
|
20
|
-
execute(logLevel: LogLevel, message: string, data?: unknown): void;
|
|
21
|
+
execute(logLevel: LogLevel, message: string, data?: unknown, options?: unknown): void;
|
|
21
22
|
}
|
package/outlet/constants.d.ts
CHANGED
|
@@ -3,3 +3,8 @@ export declare const OnlineOrderFormatsArray: OrderFormat[];
|
|
|
3
3
|
export declare const OutletMapKeyFormatter = "YYYY-MM-DD";
|
|
4
4
|
export declare const OutletTimelineDayCount = 7;
|
|
5
5
|
export declare const OutletClosingLabelThreshold = 60;
|
|
6
|
+
export declare enum OutletListSection {
|
|
7
|
+
PreOrder = "PreOrder",
|
|
8
|
+
OrderNow = "OrderNow",
|
|
9
|
+
Closed = "Closed"
|
|
10
|
+
}
|
package/outlet/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@ancon/wildcat-types"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@ancon/wildcat-types"),o=[e.OrderFormat.EatIn,e.OrderFormat.TakeAway,e.OrderFormat.Delivery,e.OrderFormat.TableOrder],a="YYYY-MM-DD",l=7,O=60;var t=(r=>(r.PreOrder="PreOrder",r.OrderNow="OrderNow",r.Closed="Closed",r))(t||{});exports.OnlineOrderFormatsArray=o;exports.OutletClosingLabelThreshold=O;exports.OutletListSection=t;exports.OutletMapKeyFormatter=a;exports.OutletTimelineDayCount=l;
|
package/outlet/constants.mjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { OrderFormat as e } from "@ancon/wildcat-types";
|
|
2
|
-
const
|
|
2
|
+
const t = [
|
|
3
3
|
e.EatIn,
|
|
4
4
|
e.TakeAway,
|
|
5
5
|
e.Delivery,
|
|
6
6
|
e.TableOrder
|
|
7
|
-
],
|
|
7
|
+
], d = "YYYY-MM-DD", l = 7, n = 60;
|
|
8
|
+
var o = /* @__PURE__ */ ((r) => (r.PreOrder = "PreOrder", r.OrderNow = "OrderNow", r.Closed = "Closed", r))(o || {});
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
o as
|
|
12
|
-
|
|
10
|
+
t as OnlineOrderFormatsArray,
|
|
11
|
+
n as OutletClosingLabelThreshold,
|
|
12
|
+
o as OutletListSection,
|
|
13
|
+
d as OutletMapKeyFormatter,
|
|
14
|
+
l as OutletTimelineDayCount
|
|
13
15
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("@ancon/wildcat-types"),o=require("./isOutletAcceptingPreOrders.js"),t=require("./constants.js");function u(s){return s.reduce((r,e)=>{const i=o(e.orderFormatSettings);return e.state===n.OutletState.Open?r[t.OutletListSection.OrderNow].push(e):i?r[t.OutletListSection.PreOrder].push(e):r[t.OutletListSection.Closed].push(e),r},{[t.OutletListSection.OrderNow]:[],[t.OutletListSection.PreOrder]:[],[t.OutletListSection.Closed]:[]})}module.exports=u;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OutletState as o } from "@ancon/wildcat-types";
|
|
2
|
+
import d from "./isOutletAcceptingPreOrders.mjs";
|
|
3
|
+
import { OutletListSection as e } from "./constants.mjs";
|
|
4
|
+
function f(s) {
|
|
5
|
+
return s.reduce(
|
|
6
|
+
(t, r) => {
|
|
7
|
+
const i = d(
|
|
8
|
+
r.orderFormatSettings
|
|
9
|
+
);
|
|
10
|
+
return r.state === o.Open ? t[e.OrderNow].push(r) : i ? t[e.PreOrder].push(r) : t[e.Closed].push(r), t;
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
[e.OrderNow]: [],
|
|
14
|
+
[e.PreOrder]: [],
|
|
15
|
+
[e.Closed]: []
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
f as default
|
|
21
|
+
};
|
package/outlet/index.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ import getPickerIntervalsForDay from './getPickerIntervalsForDay';
|
|
|
13
13
|
import getServiceIntervalRange from './getServiceIntervalRange';
|
|
14
14
|
import getServiceIntervalsForOrderFormat from './getServiceIntervalsForOrderFormat';
|
|
15
15
|
import getOutletFormattedAddress from './getOutletFormattedAddress';
|
|
16
|
-
|
|
16
|
+
import getPartitionedOutletsList from './getPartitionedOutletsList';
|
|
17
|
+
export { getListOutletOpeningHoursTable, getOutletTagInformation, getOutletAvailabilityInfo, getOutletOfflineOrderFormats, getOutletAvailableOrderFormats, getOutletFormattedDistance, isOutletAcceptingPreOrders, getOutletDeliveryFee, getOutletTodayOpeningTimes, getOutletOrderFormats, serviceDateTimesFromOpeningHours, getPickerIntervalsForDay, getServiceIntervalRange, getServiceIntervalsForOrderFormat, getOutletFormattedAddress, getPartitionedOutletsList, };
|
package/outlet/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getListOutletOpeningHoursTable.js"),t=require("./getOutletTagInformation.js"),r=require("./getOutletAvailabilityInfo.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getListOutletOpeningHoursTable.js"),t=require("./getOutletTagInformation.js"),r=require("./getOutletAvailabilityInfo.js"),i=require("./getOutletOfflineOrderFormats.js"),u=require("./getOutletAvailableOrderFormats.js"),o=require("./getOutletFormattedDistance.js"),l=require("./isOutletAcceptingPreOrders.js"),s=require("./getOutletDeliveryFee.js"),n=require("./getOutletTodayOpeningTimes.js"),a=require("./getOutletOrderFormats.js"),O=require("./serviceDateTimesFromOpeningHours.js"),g=require("./getPickerIntervalsForDay.js"),c=require("./getServiceIntervalRange.js"),q=require("./getServiceIntervalsForOrderFormat.js"),d=require("./getOutletFormattedAddress.js"),m=require("./getPartitionedOutletsList.js");require("moment");require("@ancon/wildcat-types");require("../shared/enums.js");require("../shared/isWithinFlag.js");require("../shared/generateId.js");require("./types.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");require("lodash");require("../shared/constants.js");require("../time/toMinutes.js");require("../time/getNextTenthMinute.js");exports.getListOutletOpeningHoursTable=e;exports.getOutletTagInformation=t.default;exports.getOutletAvailabilityInfo=r.default;exports.getOutletOfflineOrderFormats=i;exports.getOutletAvailableOrderFormats=u;exports.getOutletFormattedDistance=o;exports.isOutletAcceptingPreOrders=l;exports.getOutletDeliveryFee=s;exports.getOutletTodayOpeningTimes=n;exports.getOutletOrderFormats=a;exports.serviceDateTimesFromOpeningHours=O;exports.getPickerIntervalsForDay=g;exports.getServiceIntervalRange=c;exports.getServiceIntervalsForOrderFormat=q;exports.getOutletFormattedAddress=d;exports.getPartitionedOutletsList=m;
|
package/outlet/index.mjs
CHANGED
|
@@ -3,9 +3,9 @@ import { default as v } from "./getOutletTagInformation.mjs";
|
|
|
3
3
|
import { default as I } from "./getOutletAvailabilityInfo.mjs";
|
|
4
4
|
import { default as y } from "./getOutletOfflineOrderFormats.mjs";
|
|
5
5
|
import { default as D } from "./getOutletAvailableOrderFormats.mjs";
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
6
|
+
import { default as P } from "./getOutletFormattedDistance.mjs";
|
|
7
|
+
import { default as L } from "./isOutletAcceptingPreOrders.mjs";
|
|
8
|
+
import { default as k } from "./getOutletDeliveryFee.mjs";
|
|
9
9
|
import { default as h } from "./getOutletTodayOpeningTimes.mjs";
|
|
10
10
|
import { default as q } from "./getOutletOrderFormats.mjs";
|
|
11
11
|
import { default as z } from "./serviceDateTimesFromOpeningHours.mjs";
|
|
@@ -13,6 +13,7 @@ import { default as C } from "./getPickerIntervalsForDay.mjs";
|
|
|
13
13
|
import { default as G } from "./getServiceIntervalRange.mjs";
|
|
14
14
|
import { default as K } from "./getServiceIntervalsForOrderFormat.mjs";
|
|
15
15
|
import { default as N } from "./getOutletFormattedAddress.mjs";
|
|
16
|
+
import { default as U } from "./getPartitionedOutletsList.mjs";
|
|
16
17
|
import "moment";
|
|
17
18
|
import "@ancon/wildcat-types";
|
|
18
19
|
import "../shared/enums.mjs";
|
|
@@ -31,16 +32,17 @@ export {
|
|
|
31
32
|
x as getListOutletOpeningHoursTable,
|
|
32
33
|
I as getOutletAvailabilityInfo,
|
|
33
34
|
D as getOutletAvailableOrderFormats,
|
|
34
|
-
|
|
35
|
+
k as getOutletDeliveryFee,
|
|
35
36
|
N as getOutletFormattedAddress,
|
|
36
|
-
|
|
37
|
+
P as getOutletFormattedDistance,
|
|
37
38
|
y as getOutletOfflineOrderFormats,
|
|
38
39
|
q as getOutletOrderFormats,
|
|
39
40
|
v as getOutletTagInformation,
|
|
40
41
|
h as getOutletTodayOpeningTimes,
|
|
42
|
+
U as getPartitionedOutletsList,
|
|
41
43
|
C as getPickerIntervalsForDay,
|
|
42
44
|
G as getServiceIntervalRange,
|
|
43
45
|
K as getServiceIntervalsForOrderFormat,
|
|
44
|
-
|
|
46
|
+
L as isOutletAcceptingPreOrders,
|
|
45
47
|
z as serviceDateTimesFromOpeningHours
|
|
46
48
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancon/wildcat-utils",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -291,6 +291,11 @@
|
|
|
291
291
|
"require": "./outlet/getOutletTodayOpeningTimes.js",
|
|
292
292
|
"types": "./outlet/getOutletTodayOpeningTimes.d.ts"
|
|
293
293
|
},
|
|
294
|
+
"./outlet/getPartitionedOutletsList": {
|
|
295
|
+
"import": "./outlet/getPartitionedOutletsList.mjs",
|
|
296
|
+
"require": "./outlet/getPartitionedOutletsList.js",
|
|
297
|
+
"types": "./outlet/getPartitionedOutletsList.d.ts"
|
|
298
|
+
},
|
|
294
299
|
"./outlet/getPickerIntervalsForDay": {
|
|
295
300
|
"import": "./outlet/getPickerIntervalsForDay.mjs",
|
|
296
301
|
"require": "./outlet/getPickerIntervalsForDay.js",
|