@ancon/wildcat-utils 1.38.3 → 1.38.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/index.d.ts +2 -1
- package/checkout/index.js +1 -1
- package/checkout/index.mjs +17 -15
- package/checkout/isDeletingCheckoutAllowed.d.ts +5 -0
- package/checkout/isDeletingCheckoutAllowed.js +1 -0
- package/checkout/isDeletingCheckoutAllowed.mjs +14 -0
- package/index.js +1 -1
- package/index.mjs +168 -162
- package/outlet/getOutletCurrentAvailabilityInfo.d.ts +8 -0
- package/outlet/getOutletCurrentAvailabilityInfo.js +1 -0
- package/outlet/getOutletCurrentAvailabilityInfo.mjs +45 -0
- package/outlet/getOutletNextOpeningTagInformation.d.ts +8 -0
- package/outlet/getOutletNextOpeningTagInformation.js +1 -0
- package/outlet/getOutletNextOpeningTagInformation.mjs +26 -0
- package/outlet/getOutletNextOpeningTimeText.js +1 -1
- package/outlet/getOutletNextOpeningTimeText.mjs +11 -18
- package/outlet/index.d.ts +3 -1
- package/outlet/index.js +1 -1
- package/outlet/index.mjs +14 -10
- package/package.json +16 -1
package/checkout/index.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ import isPreOrderCheckout from './isPreOrderCheckout';
|
|
|
14
14
|
import isUpdatingCheckoutAllowed from './isUpdatingCheckoutAllowed';
|
|
15
15
|
import isCheckoutAlreadyPaidStatus from './isCheckoutAlreadyPaidStatus';
|
|
16
16
|
import getCheckoutPaymentErrorTranslationTexts, { CheckoutPaymentErrorTranslationKey } from './getCheckoutPaymentErrorTranslationTexts';
|
|
17
|
-
|
|
17
|
+
import isDeletingCheckoutAllowed from './isDeletingCheckoutAllowed';
|
|
18
|
+
export { TranslationKey, getCheckoutGroupedModifications, getCheckoutProductName, getCheckoutOrderStatusTexts, getCheckoutItemsMappedByTicketItemStatus, isCheckoutOrderSummary, buildCheckoutRequestItem, getCheckoutGrandTotalAmount, getCheckoutRequestItemFromCheckoutItem, isCheckoutItemsAreEqual, checkoutHasWallet, getWalletMetaFromCheckout, isPreOrderCheckout, isPreOrderServiceTime, isUpdatingCheckoutAllowed, isCheckoutAlreadyPaidStatus, CheckoutPaymentErrorTranslationKey, getCheckoutPaymentErrorTranslationTexts, isDeletingCheckoutAllowed, };
|
package/checkout/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./getCheckoutItemModifications.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./getCheckoutItemModifications.js"),o=require("./getCheckoutProductName.js"),e=require("./getCheckoutOrderStatusTexts.js"),u=require("./getCheckoutItemsMappedByTicketItemStatus.js"),c=require("./isCheckoutOrderSummary.js"),i=require("./buildCheckoutRequestItem.js"),s=require("./getCheckoutGrandTotalAmount.js"),k=require("./getCheckoutRequestItemFromCheckoutItem.js"),a=require("./isCheckoutItemsAreEqual.js"),h=require("./checkoutHasWallet.js"),n=require("./getWalletMetaFromCheckout.js"),l=require("./isPreOrderServiceTime.js"),C=require("./isPreOrderCheckout.js"),d=require("./isUpdatingCheckoutAllowed.js"),m=require("./isCheckoutAlreadyPaidStatus.js"),t=require("./getCheckoutPaymentErrorTranslationTexts.js"),q=require("./isDeletingCheckoutAllowed.js");require("@ancon/wildcat-types");require("../currency/getFormattedCurrency.js");require("../currency/getFormattedCurrencyPostfix.js");require("../_baseIsEqual-a66350f1.js");require("../isObjectLike-0cc89d64.js");require("axios");require("../error/isSerializedAPIError.js");exports.getCheckoutGroupedModifications=r;exports.getCheckoutProductName=o;exports.TranslationKey=e.TranslationKey;exports.getCheckoutOrderStatusTexts=e.default;exports.getCheckoutItemsMappedByTicketItemStatus=u;exports.isCheckoutOrderSummary=c;exports.buildCheckoutRequestItem=i;exports.getCheckoutGrandTotalAmount=s;exports.getCheckoutRequestItemFromCheckoutItem=k;exports.isCheckoutItemsAreEqual=a;exports.checkoutHasWallet=h;exports.getWalletMetaFromCheckout=n;exports.isPreOrderServiceTime=l;exports.isPreOrderCheckout=C;exports.isUpdatingCheckoutAllowed=d;exports.isCheckoutAlreadyPaidStatus=m;exports.CheckoutPaymentErrorTranslationKey=t.CheckoutPaymentErrorTranslationKey;exports.getCheckoutPaymentErrorTranslationTexts=t.default;exports.isDeletingCheckoutAllowed=q;
|
package/checkout/index.mjs
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { default as
|
|
1
|
+
import { default as l } from "./getCheckoutItemModifications.mjs";
|
|
2
2
|
import { default as p } from "./getCheckoutProductName.mjs";
|
|
3
3
|
import { TranslationKey as c, default as k } from "./getCheckoutOrderStatusTexts.mjs";
|
|
4
4
|
import { default as h } from "./getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
5
5
|
import { default as n } from "./isCheckoutOrderSummary.mjs";
|
|
6
6
|
import { default as T } from "./buildCheckoutRequestItem.mjs";
|
|
7
7
|
import { default as I } from "./getCheckoutGrandTotalAmount.mjs";
|
|
8
|
-
import { default as
|
|
8
|
+
import { default as A } from "./getCheckoutRequestItemFromCheckoutItem.mjs";
|
|
9
9
|
import { default as O } from "./isCheckoutItemsAreEqual.mjs";
|
|
10
10
|
import { default as E } from "./checkoutHasWallet.mjs";
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
11
|
+
import { default as w } from "./getWalletMetaFromCheckout.mjs";
|
|
12
|
+
import { default as G } from "./isPreOrderServiceTime.mjs";
|
|
13
|
+
import { default as R } from "./isPreOrderCheckout.mjs";
|
|
14
|
+
import { default as b } from "./isUpdatingCheckoutAllowed.mjs";
|
|
15
15
|
import { default as B } from "./isCheckoutAlreadyPaidStatus.mjs";
|
|
16
|
-
import { CheckoutPaymentErrorTranslationKey as
|
|
16
|
+
import { CheckoutPaymentErrorTranslationKey as H, default as N } from "./getCheckoutPaymentErrorTranslationTexts.mjs";
|
|
17
|
+
import { default as j } from "./isDeletingCheckoutAllowed.mjs";
|
|
17
18
|
import "@ancon/wildcat-types";
|
|
18
19
|
import "../currency/getFormattedCurrency.mjs";
|
|
19
20
|
import "../currency/getFormattedCurrencyPostfix.mjs";
|
|
@@ -22,22 +23,23 @@ import "../isObjectLike-7895e9dd.mjs";
|
|
|
22
23
|
import "axios";
|
|
23
24
|
import "../error/isSerializedAPIError.mjs";
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
+
H as CheckoutPaymentErrorTranslationKey,
|
|
26
27
|
c as TranslationKey,
|
|
27
28
|
T as buildCheckoutRequestItem,
|
|
28
29
|
E as checkoutHasWallet,
|
|
29
30
|
I as getCheckoutGrandTotalAmount,
|
|
30
|
-
|
|
31
|
+
l as getCheckoutGroupedModifications,
|
|
31
32
|
h as getCheckoutItemsMappedByTicketItemStatus,
|
|
32
33
|
k as getCheckoutOrderStatusTexts,
|
|
33
|
-
|
|
34
|
+
N as getCheckoutPaymentErrorTranslationTexts,
|
|
34
35
|
p as getCheckoutProductName,
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
A as getCheckoutRequestItemFromCheckoutItem,
|
|
37
|
+
w as getWalletMetaFromCheckout,
|
|
37
38
|
B as isCheckoutAlreadyPaidStatus,
|
|
38
39
|
O as isCheckoutItemsAreEqual,
|
|
39
40
|
n as isCheckoutOrderSummary,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
j as isDeletingCheckoutAllowed,
|
|
42
|
+
R as isPreOrderCheckout,
|
|
43
|
+
G as isPreOrderServiceTime,
|
|
44
|
+
b as isUpdatingCheckoutAllowed
|
|
43
45
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("@ancon/wildcat-types");function e(t){switch(t==null?void 0:t.status){case s.CheckoutStatus.Processing:case s.CheckoutStatus.Authorized:case s.CheckoutStatus.Captured:return!1;default:return!0}}module.exports=e;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CheckoutStatus as s } from "@ancon/wildcat-types";
|
|
2
|
+
function r(t) {
|
|
3
|
+
switch (t == null ? void 0 : t.status) {
|
|
4
|
+
case s.Processing:
|
|
5
|
+
case s.Authorized:
|
|
6
|
+
case s.Captured:
|
|
7
|
+
return !1;
|
|
8
|
+
default:
|
|
9
|
+
return !0;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
r as default
|
|
14
|
+
};
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./shared/isWithinFlag.js"),o=require("./shared/generateId.js"),i=require("./shared/wait.js"),u=require("./outlet/getListOutletOpeningHoursTable.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./shared/isWithinFlag.js"),o=require("./shared/generateId.js"),i=require("./shared/wait.js"),u=require("./outlet/getListOutletOpeningHoursTable.js"),n=require("./outlet/getOutletTagInformation.js"),s=require("./outlet/getOutletAvailabilityInfo.js"),c=require("./outlet/getOutletOfflineOrderFormats.js"),a=require("./outlet/getOutletAvailableOrderFormats.js"),l=require("./outlet/getOutletFormattedDistance.js"),d=require("./outlet/isOutletAcceptingPreOrders.js"),g=require("./outlet/getOutletDeliveryFee.js"),q=require("./outlet/getOutletTodayOpeningTimes.js"),_=require("./outlet/getOutletOrderFormats.js"),O=require("./outlet/serviceDateTimesFromOpeningHours.js"),k=require("./outlet/getPickerIntervalsForDay.js"),m=require("./outlet/getServiceIntervalRange.js"),h=require("./outlet/getServiceIntervalsForOrderFormat.js"),C=require("./outlet/getOutletFormattedAddress.js"),P=require("./outlet/getPartitionedOutletsList.js"),p=require("./outlet/getOutletPickerTimesForWeek.js"),S=require("./outlet/getOutletOrderPrepTime.js"),T=require("./outlet/getStructuredOutletAddress.js"),f=require("./outlet/getOutletNextOpeningTimeText.js"),y=require("./outlet/getOutletCurrentClosingTimeText.js"),A=require("./outlet/getOutletNextReadyToOrderTime.js"),F=require("./outlet/getOutletNextOpeningTagInformation.js"),I=require("./outlet/getOutletCurrentAvailabilityInfo.js"),v=require("./versioning/isVersionALessThanB.js"),E=require("./versioning/cleanVersionString.js"),R=require("./api/getUrlAndParams.js"),D=require("./api/getEndpointWithVersion.js"),b=require("./api/generateBackoffWithEqualJitter.js"),N=require("./api/isAcceptedResponse.js"),x=require("./api/isNoContentResponse.js"),V=require("./string/slugify.js"),M=require("./string/truncate.js"),H=require("./string/getRandomAlphaNumericCode.js"),L=require("./color/lighten.js"),W=require("./color/brighten.js"),w=require("./color/darken.js"),B=require("./color/isDarkBackground.js"),U=require("./user/getFullName.js"),G=require("./user/getFullAddressString.js"),z=require("./user/getCustomerAddressFromGeocoderResult.js"),K=require("./user/getFormattedPhoneNumber.js"),J=require("./user/getStructuredCustomerAddress.js"),Q=require("./logger/Logger.js"),j=require("./logger/types.js"),X=require("./logger/sanitizeAsStringDict.js"),Y=require("./logger/pascalCaseFormatter.js"),Z=require("./printing/getPrinterType.js"),$=require("./printing/isValidPrinter.js"),ee=require("./printing/isValidNetworkPrinter.js"),re=require("./printing/isValidStarCloudPrinter.js"),te=require("./printing/isTerminalPrinter.js"),oe=require("./printing/isCloudPrintModeEnabled.js"),ie=require("./number/randomIntFromInterval.js"),ue=require("./tables/decodeTableQRPayload.js"),ne=require("./checkout/getCheckoutItemModifications.js"),se=require("./checkout/getCheckoutProductName.js"),e=require("./checkout/getCheckoutOrderStatusTexts.js"),ce=require("./checkout/getCheckoutItemsMappedByTicketItemStatus.js"),ae=require("./checkout/isCheckoutOrderSummary.js"),le=require("./checkout/buildCheckoutRequestItem.js"),de=require("./checkout/getCheckoutGrandTotalAmount.js"),ge=require("./checkout/getCheckoutRequestItemFromCheckoutItem.js"),qe=require("./checkout/isCheckoutItemsAreEqual.js"),_e=require("./checkout/checkoutHasWallet.js"),Oe=require("./checkout/getWalletMetaFromCheckout.js"),ke=require("./checkout/isPreOrderServiceTime.js"),me=require("./checkout/isPreOrderCheckout.js"),he=require("./checkout/isUpdatingCheckoutAllowed.js"),Ce=require("./checkout/isCheckoutAlreadyPaidStatus.js"),r=require("./checkout/getCheckoutPaymentErrorTranslationTexts.js"),Pe=require("./checkout/isDeletingCheckoutAllowed.js"),pe=require("./currency/getFormattedCurrency.js"),Se=require("./inventory/isDetailedProductOutOfStock.js"),Te=require("./inventory/isDetailedProductVariantOutOfStocks.js"),fe=require("./inventory/isMenuTreeProductOutOfStock.js"),ye=require("./inventory/isDetailedProductUpSellsOutOfStock.js"),Ae=require("./inventory/isUpSellProductOutStock.js"),Fe=require("./inventory/isDetailedProductOutletStockOutOfStock.js"),Ie=require("./inventory/getDetailedProductVariantStock.js"),ve=require("./signalr/createUseSignalRHook.js"),Ee=require("./signalr/SignalR.js"),Re=require("./error/createCodedError.js"),De=require("./error/isCodedError.js"),be=require("./error/isNetworkError.js"),Ne=require("./error/isLockedError.js"),xe=require("./error/isNotFoundError.js"),Ve=require("./error/isAPIError.js"),Me=require("./error/isSerializedAPIError.js"),He=require("./error/isSerializedCodedError.js"),Le=require("./error/serializeError.js"),We=require("./error/getErrorCode.js"),we=require("./hangfire/isHangfireResponse.js"),Be=require("./hangfire/createHangfirePoller.js"),Ue=require("./hangfire/createMakeHangfireRequest.js"),Ge=require("./product/extractProductsFromMenuTree.js"),ze=require("./product/calculateIngredientsCost.js"),Ke=require("./product/calculateAddonGroupCost.js"),Je=require("./product/getAddonGroupInfoBySettings.js");require("moment");require("@ancon/wildcat-types");require("./outlet/constants.js");require("./outlet/getOutletCurrentActiveOperatingHour.js");require("./outlet/getMomentFromDateAndTimeString.js");require("./outlet/searchNextOpeningMoment.js");require("./_baseIsEqual-a66350f1.js");require("./isObjectLike-0cc89d64.js");require("./toString-c005c116.js");require("./noop-7ea3b37b.js");require("./shared/constants.js");require("./time/toMinutes.js");require("./time/getNextTenthMinute.js");require("./outlet/types.js");require("./outlet/getSettingsForOrderFormat.js");require("./outlet/getServiceIntervalStart.js");require("./outlet/getNextTenthMinute.js");require("./outlet/generatePickerTimesForDay.js");require("./outlet/getServiceIntervalEnd.js");require("./outlet/hoursAndMinutesToMinutes.js");require("compare-versions");require("tinycolor2");require("google-libphonenumber");require("@ancon/wildcat-printing");require("axios");require("./currency/getFormattedCurrencyPostfix.js");require("react");require("react-redux");require("@microsoft/signalr");exports.isWithinFlag=t;exports.generateId=o;exports.wait=i;exports.getListOutletOpeningHoursTable=u;exports.getOutletTagInformation=n.default;exports.getOutletAvailabilityInfo=s.default;exports.getOutletOfflineOrderFormats=c;exports.getOutletAvailableOrderFormats=a;exports.getOutletFormattedDistance=l;exports.isOutletAcceptingPreOrders=d;exports.getOutletDeliveryFee=g;exports.getOutletTodayOpeningTimes=q;exports.getOutletOrderFormats=_;exports.serviceDateTimesFromOpeningHours=O;exports.getPickerIntervalsForDay=k;exports.getServiceIntervalRange=m;exports.getServiceIntervalsForOrderFormat=h;exports.getOutletFormattedAddress=C;exports.getPartitionedOutletsList=P;exports.getOutletPickerTimesForWeek=p;exports.getOutletOrderPreparationTime=S;exports.getStructuredOutletAddress=T;exports.getOutletNextOpeningTimeText=f;exports.getOutletCurrentClosingTimeText=y;exports.getOutletNextReadyToOrderTime=A;exports.getOutletNextOpeningTagInformation=F;exports.getOutletCurrentAvailabilityInfo=I;exports.isVersionALessThanB=v;exports.cleanVersionString=E;exports.getUrlAndParams=R;exports.getEndpointWithVersion=D;exports.generateBackoffWithEqualJitter=b;exports.isAcceptedResponse=N;exports.isNoContentResponse=x;exports.slugify=V;exports.truncate=M;exports.getRandomAlphaNumericCode=H;exports.lighten=L;exports.brighten=W;exports.darken=w;exports.isDarkBackground=B;exports.getFullName=U;exports.getFullAddressString=G;exports.getCustomerAddressFromGeocoderResult=z;exports.getFormattedPhoneNumber=K;exports.getStructuredCustomerAddress=J;exports.Logger=Q;exports.LogLevel=j.LogLevel;exports.sanitizeAsStringDict=X;exports.pascalCaseFormatter=Y;exports.getPrinterType=Z;exports.isValidPrinter=$;exports.isValidNetworkPrinter=ee;exports.isValidStarCloudPrinter=re;exports.isTerminalPrinter=te;exports.isCloudPrintModeEnabled=oe;exports.randomIntFromInterval=ie;exports.decodeTableQRPayload=ue;exports.getCheckoutGroupedModifications=ne;exports.getCheckoutProductName=se;exports.TranslationKey=e.TranslationKey;exports.getCheckoutOrderStatusTexts=e.default;exports.getCheckoutItemsMappedByTicketItemStatus=ce;exports.isCheckoutOrderSummary=ae;exports.buildCheckoutRequestItem=le;exports.getCheckoutGrandTotalAmount=de;exports.getCheckoutRequestItemFromCheckoutItem=ge;exports.isCheckoutItemsAreEqual=qe;exports.checkoutHasWallet=_e;exports.getWalletMetaFromCheckout=Oe;exports.isPreOrderServiceTime=ke;exports.isPreOrderCheckout=me;exports.isUpdatingCheckoutAllowed=he;exports.isCheckoutAlreadyPaidStatus=Ce;exports.CheckoutPaymentErrorTranslationKey=r.CheckoutPaymentErrorTranslationKey;exports.getCheckoutPaymentErrorTranslationTexts=r.default;exports.isDeletingCheckoutAllowed=Pe;exports.getFormattedCurrency=pe;exports.isDetailedProductOutOfStock=Se;exports.isDetailedProductVariantOutOfStocks=Te;exports.isMenuTreeProductOutOfStock=fe;exports.isDetailedProductUpSellsOutOfStock=ye;exports.isUpSellProductOutOfStock=Ae;exports.isDetailedProductOutletStockOutOfStock=Fe;exports.getDetailedProductVariantStock=Ie;exports.createUseSignalRHook=ve;exports.SignalR=Ee;exports.createCodedError=Re;exports.isCodedError=De;exports.isNetworkError=be;exports.isLockedError=Ne;exports.isNotFoundError=xe;exports.isAPIError=Ve;exports.isSerializedAPIError=Me;exports.isSerializedCodedError=He;exports.serializeError=Le;exports.getErrorCode=We;exports.isHangfireResponse=we;exports.createHangfirePoller=Be.default;exports.createMakeHangfireRequest=Ue;exports.extractProductsFromMenuTree=Ge;exports.calculateIngredientsCost=ze;exports.calculateAddonGroupsCost=Ke;exports.getAddonGroupInfoBySettings=Je.default;
|
package/index.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import { default as b } from "./shared/generateId.mjs";
|
|
|
3
3
|
import { default as H } from "./shared/wait.mjs";
|
|
4
4
|
import { default as M } from "./outlet/getListOutletOpeningHoursTable.mjs";
|
|
5
5
|
import { default as q } from "./outlet/getOutletTagInformation.mjs";
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
6
|
+
import { default as B } from "./outlet/getOutletAvailabilityInfo.mjs";
|
|
7
|
+
import { default as U } from "./outlet/getOutletOfflineOrderFormats.mjs";
|
|
8
8
|
import { default as K } from "./outlet/getOutletAvailableOrderFormats.mjs";
|
|
9
9
|
import { default as Q } from "./outlet/getOutletFormattedDistance.mjs";
|
|
10
10
|
import { default as X } from "./outlet/isOutletAcceptingPreOrders.mjs";
|
|
@@ -13,90 +13,93 @@ import { default as $ } from "./outlet/getOutletTodayOpeningTimes.mjs";
|
|
|
13
13
|
import { default as te } from "./outlet/getOutletOrderFormats.mjs";
|
|
14
14
|
import { default as oe } from "./outlet/serviceDateTimesFromOpeningHours.mjs";
|
|
15
15
|
import { default as fe } from "./outlet/getPickerIntervalsForDay.mjs";
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
16
|
+
import { default as le } from "./outlet/getServiceIntervalRange.mjs";
|
|
17
|
+
import { default as de } from "./outlet/getServiceIntervalsForOrderFormat.mjs";
|
|
18
18
|
import { default as ie } from "./outlet/getOutletFormattedAddress.mjs";
|
|
19
19
|
import { default as xe } from "./outlet/getPartitionedOutletsList.mjs";
|
|
20
|
-
import { default as
|
|
20
|
+
import { default as ge } from "./outlet/getOutletPickerTimesForWeek.mjs";
|
|
21
21
|
import { default as Oe } from "./outlet/getOutletOrderPrepTime.mjs";
|
|
22
22
|
import { default as Ce } from "./outlet/getStructuredOutletAddress.mjs";
|
|
23
23
|
import { default as Se } from "./outlet/getOutletNextOpeningTimeText.mjs";
|
|
24
24
|
import { default as he } from "./outlet/getOutletCurrentClosingTimeText.mjs";
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as ye } from "./
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as De } from "./
|
|
29
|
-
import { default as be } from "./
|
|
30
|
-
import { default as He } from "./api/
|
|
31
|
-
import { default as Me } from "./api/
|
|
32
|
-
import { default as qe } from "./api/
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as Ke } from "./string/
|
|
36
|
-
import { default as Qe } from "./
|
|
37
|
-
import { default as Xe } from "./
|
|
38
|
-
import { default as Ze } from "./color/
|
|
39
|
-
import { default as $e } from "./color/
|
|
40
|
-
import { default as tt } from "./
|
|
41
|
-
import { default as ot } from "./
|
|
42
|
-
import { default as ft } from "./user/
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as it } from "./
|
|
46
|
-
import {
|
|
47
|
-
import { default as
|
|
48
|
-
import {
|
|
49
|
-
import { default as Ct } from "./
|
|
50
|
-
import { default as St } from "./
|
|
51
|
-
import { default as ht } from "./printing/
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as yt } from "./printing/
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as Dt } from "./
|
|
56
|
-
import { default as bt } from "./
|
|
57
|
-
import { default as Ht } from "./
|
|
58
|
-
import { default as Mt } from "./
|
|
59
|
-
import {
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as zt } from "./checkout/
|
|
62
|
-
import { default as Jt } from "./checkout/
|
|
63
|
-
import { default as jt } from "./checkout/
|
|
64
|
-
import { default as Yt } from "./checkout/
|
|
65
|
-
import { default as _t } from "./checkout/
|
|
66
|
-
import { default as er } from "./checkout/
|
|
67
|
-
import { default as rr } from "./checkout/
|
|
68
|
-
import { default as ar } from "./checkout/
|
|
69
|
-
import { default as sr } from "./checkout/
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as mr } from "./checkout/
|
|
72
|
-
import {
|
|
73
|
-
import { default as
|
|
74
|
-
import { default as Or } from "./
|
|
75
|
-
import { default as Cr } from "./
|
|
76
|
-
import { default as Sr } from "./
|
|
77
|
-
import { default as hr } from "./inventory/
|
|
78
|
-
import { default as
|
|
79
|
-
import { default as yr } from "./inventory/
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as Dr } from "./
|
|
82
|
-
import { default as br } from "./
|
|
83
|
-
import { default as Hr } from "./
|
|
84
|
-
import { default as Mr } from "./
|
|
85
|
-
import { default as qr } from "./
|
|
86
|
-
import { default as
|
|
87
|
-
import { default as
|
|
88
|
-
import { default as Kr } from "./error/
|
|
89
|
-
import { default as Qr } from "./error/
|
|
90
|
-
import { default as Xr } from "./error/
|
|
91
|
-
import { default as Zr } from "./error/
|
|
92
|
-
import { default as $r } from "./error/
|
|
93
|
-
import { default as to } from "./
|
|
94
|
-
import { default as oo } from "./
|
|
95
|
-
import { default as fo } from "./
|
|
96
|
-
import { default as
|
|
97
|
-
import { default as mo } from "./
|
|
98
|
-
import { default as po } from "./
|
|
99
|
-
import { default as no } from "./product/
|
|
25
|
+
import { default as Fe } from "./outlet/getOutletNextReadyToOrderTime.mjs";
|
|
26
|
+
import { default as ye } from "./outlet/getOutletNextOpeningTagInformation.mjs";
|
|
27
|
+
import { default as ve } from "./outlet/getOutletCurrentAvailabilityInfo.mjs";
|
|
28
|
+
import { default as De } from "./versioning/isVersionALessThanB.mjs";
|
|
29
|
+
import { default as be } from "./versioning/cleanVersionString.mjs";
|
|
30
|
+
import { default as He } from "./api/getUrlAndParams.mjs";
|
|
31
|
+
import { default as Me } from "./api/getEndpointWithVersion.mjs";
|
|
32
|
+
import { default as qe } from "./api/generateBackoffWithEqualJitter.mjs";
|
|
33
|
+
import { default as Be } from "./api/isAcceptedResponse.mjs";
|
|
34
|
+
import { default as Ue } from "./api/isNoContentResponse.mjs";
|
|
35
|
+
import { default as Ke } from "./string/slugify.mjs";
|
|
36
|
+
import { default as Qe } from "./string/truncate.mjs";
|
|
37
|
+
import { default as Xe } from "./string/getRandomAlphaNumericCode.mjs";
|
|
38
|
+
import { default as Ze } from "./color/lighten.mjs";
|
|
39
|
+
import { default as $e } from "./color/brighten.mjs";
|
|
40
|
+
import { default as tt } from "./color/darken.mjs";
|
|
41
|
+
import { default as ot } from "./color/isDarkBackground.mjs";
|
|
42
|
+
import { default as ft } from "./user/getFullName.mjs";
|
|
43
|
+
import { default as lt } from "./user/getFullAddressString.mjs";
|
|
44
|
+
import { default as dt } from "./user/getCustomerAddressFromGeocoderResult.mjs";
|
|
45
|
+
import { default as it } from "./user/getFormattedPhoneNumber.mjs";
|
|
46
|
+
import { default as xt } from "./user/getStructuredCustomerAddress.mjs";
|
|
47
|
+
import { default as gt } from "./logger/Logger.mjs";
|
|
48
|
+
import { LogLevel as Ot } from "./logger/types.mjs";
|
|
49
|
+
import { default as Ct } from "./logger/sanitizeAsStringDict.mjs";
|
|
50
|
+
import { default as St } from "./logger/pascalCaseFormatter.mjs";
|
|
51
|
+
import { default as ht } from "./printing/getPrinterType.mjs";
|
|
52
|
+
import { default as Ft } from "./printing/isValidPrinter.mjs";
|
|
53
|
+
import { default as yt } from "./printing/isValidNetworkPrinter.mjs";
|
|
54
|
+
import { default as vt } from "./printing/isValidStarCloudPrinter.mjs";
|
|
55
|
+
import { default as Dt } from "./printing/isTerminalPrinter.mjs";
|
|
56
|
+
import { default as bt } from "./printing/isCloudPrintModeEnabled.mjs";
|
|
57
|
+
import { default as Ht } from "./number/randomIntFromInterval.mjs";
|
|
58
|
+
import { default as Mt } from "./tables/decodeTableQRPayload.mjs";
|
|
59
|
+
import { default as qt } from "./checkout/getCheckoutItemModifications.mjs";
|
|
60
|
+
import { default as Bt } from "./checkout/getCheckoutProductName.mjs";
|
|
61
|
+
import { TranslationKey as Ut, default as zt } from "./checkout/getCheckoutOrderStatusTexts.mjs";
|
|
62
|
+
import { default as Jt } from "./checkout/getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
63
|
+
import { default as jt } from "./checkout/isCheckoutOrderSummary.mjs";
|
|
64
|
+
import { default as Yt } from "./checkout/buildCheckoutRequestItem.mjs";
|
|
65
|
+
import { default as _t } from "./checkout/getCheckoutGrandTotalAmount.mjs";
|
|
66
|
+
import { default as er } from "./checkout/getCheckoutRequestItemFromCheckoutItem.mjs";
|
|
67
|
+
import { default as rr } from "./checkout/isCheckoutItemsAreEqual.mjs";
|
|
68
|
+
import { default as ar } from "./checkout/checkoutHasWallet.mjs";
|
|
69
|
+
import { default as sr } from "./checkout/getWalletMetaFromCheckout.mjs";
|
|
70
|
+
import { default as ur } from "./checkout/isPreOrderServiceTime.mjs";
|
|
71
|
+
import { default as mr } from "./checkout/isPreOrderCheckout.mjs";
|
|
72
|
+
import { default as pr } from "./checkout/isUpdatingCheckoutAllowed.mjs";
|
|
73
|
+
import { default as nr } from "./checkout/isCheckoutAlreadyPaidStatus.mjs";
|
|
74
|
+
import { CheckoutPaymentErrorTranslationKey as cr, default as Or } from "./checkout/getCheckoutPaymentErrorTranslationTexts.mjs";
|
|
75
|
+
import { default as Cr } from "./checkout/isDeletingCheckoutAllowed.mjs";
|
|
76
|
+
import { default as Sr } from "./currency/getFormattedCurrency.mjs";
|
|
77
|
+
import { default as hr } from "./inventory/isDetailedProductOutOfStock.mjs";
|
|
78
|
+
import { default as Fr } from "./inventory/isDetailedProductVariantOutOfStocks.mjs";
|
|
79
|
+
import { default as yr } from "./inventory/isMenuTreeProductOutOfStock.mjs";
|
|
80
|
+
import { default as vr } from "./inventory/isDetailedProductUpSellsOutOfStock.mjs";
|
|
81
|
+
import { default as Dr } from "./inventory/isUpSellProductOutStock.mjs";
|
|
82
|
+
import { default as br } from "./inventory/isDetailedProductOutletStockOutOfStock.mjs";
|
|
83
|
+
import { default as Hr } from "./inventory/getDetailedProductVariantStock.mjs";
|
|
84
|
+
import { default as Mr } from "./signalr/createUseSignalRHook.mjs";
|
|
85
|
+
import { default as qr } from "./signalr/SignalR.mjs";
|
|
86
|
+
import { default as Br } from "./error/createCodedError.mjs";
|
|
87
|
+
import { default as Ur } from "./error/isCodedError.mjs";
|
|
88
|
+
import { default as Kr } from "./error/isNetworkError.mjs";
|
|
89
|
+
import { default as Qr } from "./error/isLockedError.mjs";
|
|
90
|
+
import { default as Xr } from "./error/isNotFoundError.mjs";
|
|
91
|
+
import { default as Zr } from "./error/isAPIError.mjs";
|
|
92
|
+
import { default as $r } from "./error/isSerializedAPIError.mjs";
|
|
93
|
+
import { default as to } from "./error/isSerializedCodedError.mjs";
|
|
94
|
+
import { default as oo } from "./error/serializeError.mjs";
|
|
95
|
+
import { default as fo } from "./error/getErrorCode.mjs";
|
|
96
|
+
import { default as lo } from "./hangfire/isHangfireResponse.mjs";
|
|
97
|
+
import { default as mo } from "./hangfire/createHangfirePoller.mjs";
|
|
98
|
+
import { default as po } from "./hangfire/createMakeHangfireRequest.mjs";
|
|
99
|
+
import { default as no } from "./product/extractProductsFromMenuTree.mjs";
|
|
100
|
+
import { default as co } from "./product/calculateIngredientsCost.mjs";
|
|
101
|
+
import { default as ko } from "./product/calculateAddonGroupCost.mjs";
|
|
102
|
+
import { default as Po } from "./product/getAddonGroupInfoBySettings.mjs";
|
|
100
103
|
import "moment";
|
|
101
104
|
import "@ancon/wildcat-types";
|
|
102
105
|
import "./outlet/constants.mjs";
|
|
@@ -127,105 +130,108 @@ import "react";
|
|
|
127
130
|
import "react-redux";
|
|
128
131
|
import "@microsoft/signalr";
|
|
129
132
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
133
|
+
cr as CheckoutPaymentErrorTranslationKey,
|
|
134
|
+
Ot as LogLevel,
|
|
135
|
+
gt as Logger,
|
|
136
|
+
qr as SignalR,
|
|
137
|
+
Ut as TranslationKey,
|
|
138
|
+
$e as brighten,
|
|
139
|
+
Yt as buildCheckoutRequestItem,
|
|
140
|
+
ko as calculateAddonGroupsCost,
|
|
141
|
+
co as calculateIngredientsCost,
|
|
142
|
+
ar as checkoutHasWallet,
|
|
143
|
+
be as cleanVersionString,
|
|
144
|
+
Br as createCodedError,
|
|
145
|
+
mo as createHangfirePoller,
|
|
146
|
+
po as createMakeHangfireRequest,
|
|
147
|
+
Mr as createUseSignalRHook,
|
|
148
|
+
tt as darken,
|
|
149
|
+
Mt as decodeTableQRPayload,
|
|
150
|
+
no as extractProductsFromMenuTree,
|
|
151
|
+
qe as generateBackoffWithEqualJitter,
|
|
149
152
|
b as generateId,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
153
|
+
Po as getAddonGroupInfoBySettings,
|
|
154
|
+
_t as getCheckoutGrandTotalAmount,
|
|
155
|
+
qt as getCheckoutGroupedModifications,
|
|
156
|
+
Jt as getCheckoutItemsMappedByTicketItemStatus,
|
|
157
|
+
zt as getCheckoutOrderStatusTexts,
|
|
158
|
+
Or as getCheckoutPaymentErrorTranslationTexts,
|
|
159
|
+
Bt as getCheckoutProductName,
|
|
160
|
+
er as getCheckoutRequestItemFromCheckoutItem,
|
|
161
|
+
dt as getCustomerAddressFromGeocoderResult,
|
|
162
|
+
Hr as getDetailedProductVariantStock,
|
|
163
|
+
Me as getEndpointWithVersion,
|
|
164
|
+
fo as getErrorCode,
|
|
165
|
+
Sr as getFormattedCurrency,
|
|
166
|
+
it as getFormattedPhoneNumber,
|
|
167
|
+
lt as getFullAddressString,
|
|
168
|
+
ft as getFullName,
|
|
166
169
|
M as getListOutletOpeningHoursTable,
|
|
167
|
-
|
|
170
|
+
B as getOutletAvailabilityInfo,
|
|
168
171
|
K as getOutletAvailableOrderFormats,
|
|
172
|
+
ve as getOutletCurrentAvailabilityInfo,
|
|
169
173
|
he as getOutletCurrentClosingTimeText,
|
|
170
174
|
Z as getOutletDeliveryFee,
|
|
171
175
|
ie as getOutletFormattedAddress,
|
|
172
176
|
Q as getOutletFormattedDistance,
|
|
177
|
+
ye as getOutletNextOpeningTagInformation,
|
|
173
178
|
Se as getOutletNextOpeningTimeText,
|
|
174
|
-
|
|
175
|
-
|
|
179
|
+
Fe as getOutletNextReadyToOrderTime,
|
|
180
|
+
U as getOutletOfflineOrderFormats,
|
|
176
181
|
te as getOutletOrderFormats,
|
|
177
182
|
Oe as getOutletOrderPreparationTime,
|
|
178
|
-
|
|
183
|
+
ge as getOutletPickerTimesForWeek,
|
|
179
184
|
q as getOutletTagInformation,
|
|
180
185
|
$ as getOutletTodayOpeningTimes,
|
|
181
186
|
xe as getPartitionedOutletsList,
|
|
182
187
|
fe as getPickerIntervalsForDay,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
+
ht as getPrinterType,
|
|
189
|
+
Xe as getRandomAlphaNumericCode,
|
|
190
|
+
le as getServiceIntervalRange,
|
|
191
|
+
de as getServiceIntervalsForOrderFormat,
|
|
192
|
+
xt as getStructuredCustomerAddress,
|
|
188
193
|
Ce as getStructuredOutletAddress,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
194
|
+
He as getUrlAndParams,
|
|
195
|
+
sr as getWalletMetaFromCheckout,
|
|
196
|
+
Zr as isAPIError,
|
|
197
|
+
Be as isAcceptedResponse,
|
|
198
|
+
nr as isCheckoutAlreadyPaidStatus,
|
|
199
|
+
rr as isCheckoutItemsAreEqual,
|
|
200
|
+
jt as isCheckoutOrderSummary,
|
|
201
|
+
bt as isCloudPrintModeEnabled,
|
|
202
|
+
Ur as isCodedError,
|
|
203
|
+
ot as isDarkBackground,
|
|
204
|
+
Cr as isDeletingCheckoutAllowed,
|
|
205
|
+
hr as isDetailedProductOutOfStock,
|
|
206
|
+
br as isDetailedProductOutletStockOutOfStock,
|
|
207
|
+
vr as isDetailedProductUpSellsOutOfStock,
|
|
208
|
+
Fr as isDetailedProductVariantOutOfStocks,
|
|
209
|
+
lo as isHangfireResponse,
|
|
210
|
+
Qr as isLockedError,
|
|
211
|
+
yr as isMenuTreeProductOutOfStock,
|
|
212
|
+
Kr as isNetworkError,
|
|
213
|
+
Ue as isNoContentResponse,
|
|
214
|
+
Xr as isNotFoundError,
|
|
209
215
|
X as isOutletAcceptingPreOrders,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
mr as isPreOrderCheckout,
|
|
217
|
+
ur as isPreOrderServiceTime,
|
|
218
|
+
$r as isSerializedAPIError,
|
|
219
|
+
to as isSerializedCodedError,
|
|
220
|
+
Dt as isTerminalPrinter,
|
|
221
|
+
Dr as isUpSellProductOutOfStock,
|
|
222
|
+
pr as isUpdatingCheckoutAllowed,
|
|
223
|
+
yt as isValidNetworkPrinter,
|
|
224
|
+
Ft as isValidPrinter,
|
|
225
|
+
vt as isValidStarCloudPrinter,
|
|
226
|
+
De as isVersionALessThanB,
|
|
221
227
|
D as isWithinFlag,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
228
|
+
Ze as lighten,
|
|
229
|
+
St as pascalCaseFormatter,
|
|
230
|
+
Ht as randomIntFromInterval,
|
|
231
|
+
Ct as sanitizeAsStringDict,
|
|
232
|
+
oo as serializeError,
|
|
227
233
|
oe as serviceDateTimesFromOpeningHours,
|
|
228
|
-
|
|
229
|
-
|
|
234
|
+
Ke as slugify,
|
|
235
|
+
Qe as truncate,
|
|
230
236
|
H as wait
|
|
231
237
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OutletListItem } from '@ancon/wildcat-types';
|
|
2
|
+
import { OutletAvailability } from './getOutletAvailabilityInfo';
|
|
3
|
+
/**
|
|
4
|
+
* Get the current availability information of an outlet.
|
|
5
|
+
* @param {OutletListItem} outletData
|
|
6
|
+
* @returns {OutletAvailability | null}
|
|
7
|
+
*/
|
|
8
|
+
export default function getOutletCurrentAvailabilityInfo(outletData: OutletListItem): OutletAvailability | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const T=require("@ancon/wildcat-types"),p=require("moment"),u=require("./getOutletTagInformation.js"),a=require("./getOutletAvailabilityInfo.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");function d(o,e){let{openingTime:i}=o,{closingTime:n}=o;return!!e.openingTime&&!!e.closingTime?(o.openingTime?o.openingTime.isBetween(e.openingTime,e.closingTime)&&(i=e.openingTime):i=e.openingTime,o.closingTime?o.closingTime.isBetween(e.openingTime,e.closingTime)&&(n=e.closingTime):n=e.closingTime):((!i&&e.openingTime||e.openingTime&&i&&e.openingTime.isBefore(i))&&(i=e.openingTime),!n&&e.closingTime?n=e.closingTime:e.closingTime&&n&&(e.closingTime.isBefore(n)||(n=e.closingTime))),{openingTime:i,closingTime:n}}function c(o){const{serviceDateTimes:e,state:i,timeZoneOffset:n}=o,l=p(),t=i===T.OutletState.Open,m=e.reduce((s,g)=>{const f=(g==null?void 0:g.intervals)||[],r=u.default(f,t,l,l,n);return s?s.openNow&&!r.openNow?s:{...d(s,r),openNow:s.openNow||r.openNow,openDuringSpecifiedTime:s.openDuringSpecifiedTime||r.openDuringSpecifiedTime}:r},void 0);return m?a.default(m,l,!1):null}module.exports=c;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { OutletState as p } from "@ancon/wildcat-types";
|
|
2
|
+
import T from "moment";
|
|
3
|
+
import a from "./getOutletTagInformation.mjs";
|
|
4
|
+
import d from "./getOutletAvailabilityInfo.mjs";
|
|
5
|
+
import "./constants.mjs";
|
|
6
|
+
import "./getOutletCurrentActiveOperatingHour.mjs";
|
|
7
|
+
import "./getMomentFromDateAndTimeString.mjs";
|
|
8
|
+
import "./searchNextOpeningMoment.mjs";
|
|
9
|
+
function u(o, i) {
|
|
10
|
+
let { openingTime: e } = o, { closingTime: n } = o;
|
|
11
|
+
return !!i.openingTime && !!i.closingTime ? (o.openingTime ? o.openingTime.isBetween(
|
|
12
|
+
i.openingTime,
|
|
13
|
+
i.closingTime
|
|
14
|
+
) && (e = i.openingTime) : e = i.openingTime, o.closingTime ? o.closingTime.isBetween(
|
|
15
|
+
i.openingTime,
|
|
16
|
+
i.closingTime
|
|
17
|
+
) && (n = i.closingTime) : n = i.closingTime) : ((!e && i.openingTime || i.openingTime && e && i.openingTime.isBefore(e)) && (e = i.openingTime), !n && i.closingTime ? n = i.closingTime : i.closingTime && n && (i.closingTime.isBefore(n) || (n = i.closingTime))), {
|
|
18
|
+
openingTime: e,
|
|
19
|
+
closingTime: n
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function b(o) {
|
|
23
|
+
const { serviceDateTimes: i, state: e, timeZoneOffset: n } = o, r = T(), m = e === p.Open, l = i.reduce((s, g) => {
|
|
24
|
+
const f = (g == null ? void 0 : g.intervals) || [], t = a(
|
|
25
|
+
f,
|
|
26
|
+
m,
|
|
27
|
+
r,
|
|
28
|
+
r,
|
|
29
|
+
n
|
|
30
|
+
);
|
|
31
|
+
return s ? s.openNow && !t.openNow ? s : {
|
|
32
|
+
...u(s, t),
|
|
33
|
+
openNow: s.openNow || t.openNow,
|
|
34
|
+
openDuringSpecifiedTime: s.openDuringSpecifiedTime || t.openDuringSpecifiedTime
|
|
35
|
+
} : t;
|
|
36
|
+
}, void 0);
|
|
37
|
+
return l ? d(
|
|
38
|
+
l,
|
|
39
|
+
r,
|
|
40
|
+
!1
|
|
41
|
+
) : null;
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
b as default
|
|
45
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OutletListItem } from '@ancon/wildcat-types';
|
|
2
|
+
import { OutletTagInformation } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Get the next opening time tag info of an outlet when outlet is closed.
|
|
5
|
+
* @param {OutletListItem} outletData
|
|
6
|
+
* @returns {OutletTagInformation | undefined}
|
|
7
|
+
*/
|
|
8
|
+
export default function getOutletNextOpeningTagInformation(outletData: OutletListItem): OutletTagInformation | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("@ancon/wildcat-types"),f=require("moment"),g=require("./getOutletTagInformation.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");function m(o){const i=f();return o.serviceDateTimes.reduce((e,r)=>{const t=(r==null?void 0:r.intervals)||[],n=g.default(t,o.state===u.OutletState.Open,i,i,o==null?void 0:o.timeZoneOffset);if(!e&&!n.openNow)return n;const s=(e==null?void 0:e.openingTime)&&n.openingTime&&n.openingTime.isBefore(e.openingTime);return!n.openNow&&s?n:e},void 0)}module.exports=m;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OutletState as p } from "@ancon/wildcat-types";
|
|
2
|
+
import f from "moment";
|
|
3
|
+
import g from "./getOutletTagInformation.mjs";
|
|
4
|
+
import "./constants.mjs";
|
|
5
|
+
import "./getOutletCurrentActiveOperatingHour.mjs";
|
|
6
|
+
import "./getMomentFromDateAndTimeString.mjs";
|
|
7
|
+
import "./searchNextOpeningMoment.mjs";
|
|
8
|
+
function N(e) {
|
|
9
|
+
const t = f();
|
|
10
|
+
return e.serviceDateTimes.reduce((n, i) => {
|
|
11
|
+
const r = (i == null ? void 0 : i.intervals) || [], o = g(
|
|
12
|
+
r,
|
|
13
|
+
e.state === p.Open,
|
|
14
|
+
t,
|
|
15
|
+
t,
|
|
16
|
+
e == null ? void 0 : e.timeZoneOffset
|
|
17
|
+
);
|
|
18
|
+
if (!n && !o.openNow)
|
|
19
|
+
return o;
|
|
20
|
+
const m = (n == null ? void 0 : n.openingTime) && o.openingTime && o.openingTime.isBefore(n.openingTime);
|
|
21
|
+
return !o.openNow && m ? o : n;
|
|
22
|
+
}, void 0);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
N as default
|
|
26
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("moment"),u=require("./getOutletNextOpeningTagInformation.js");require("@ancon/wildcat-types");require("./getOutletTagInformation.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");function a(n,r){const o=t(),e=u(n);if(e&&!e.openNow&&e.openingTime){const i=t(e.openingTime).utcOffset(o.utcOffset()).calendar({sameDay:"[Today] [at] LT",nextDay:"[Tomorrow] [at] LT",nextWeek:"ddd [at] LT"});return r("openingTime",{time:i})}return null}module.exports=a;
|
|
@@ -1,32 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import e from "moment";
|
|
2
|
+
import r from "./getOutletNextOpeningTagInformation.mjs";
|
|
3
|
+
import "@ancon/wildcat-types";
|
|
4
|
+
import "./getOutletTagInformation.mjs";
|
|
4
5
|
import "./constants.mjs";
|
|
5
6
|
import "./getOutletCurrentActiveOperatingHour.mjs";
|
|
6
7
|
import "./getMomentFromDateAndTimeString.mjs";
|
|
7
8
|
import "./searchNextOpeningMoment.mjs";
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
f,
|
|
13
|
-
e.state === s.Open,
|
|
14
|
-
t,
|
|
15
|
-
t,
|
|
16
|
-
e == null ? void 0 : e.timeZoneOffset
|
|
17
|
-
);
|
|
18
|
-
if (!i.openNow && i.openingTime) {
|
|
19
|
-
const o = m(i.openingTime).utcOffset(t.utcOffset()).calendar({
|
|
9
|
+
function s(o, n) {
|
|
10
|
+
const i = e(), t = r(o);
|
|
11
|
+
if (t && !t.openNow && t.openingTime) {
|
|
12
|
+
const m = e(t.openingTime).utcOffset(i.utcOffset()).calendar({
|
|
20
13
|
sameDay: "[Today] [at] LT",
|
|
21
14
|
nextDay: "[Tomorrow] [at] LT",
|
|
22
15
|
nextWeek: "ddd [at] LT"
|
|
23
16
|
});
|
|
24
|
-
return
|
|
25
|
-
time:
|
|
17
|
+
return n("openingTime", {
|
|
18
|
+
time: m
|
|
26
19
|
});
|
|
27
20
|
}
|
|
28
21
|
return null;
|
|
29
22
|
}
|
|
30
23
|
export {
|
|
31
|
-
|
|
24
|
+
s as default
|
|
32
25
|
};
|
package/outlet/index.d.ts
CHANGED
|
@@ -20,4 +20,6 @@ import getStructuredOutletAddress from './getStructuredOutletAddress';
|
|
|
20
20
|
import getOutletNextOpeningTimeText from './getOutletNextOpeningTimeText';
|
|
21
21
|
import getOutletCurrentClosingTimeText from './getOutletCurrentClosingTimeText';
|
|
22
22
|
import getOutletNextReadyToOrderTime from './getOutletNextReadyToOrderTime';
|
|
23
|
-
|
|
23
|
+
import getOutletNextOpeningTagInformation from './getOutletNextOpeningTagInformation';
|
|
24
|
+
import getOutletCurrentAvailabilityInfo from './getOutletCurrentAvailabilityInfo';
|
|
25
|
+
export { getListOutletOpeningHoursTable, getOutletTagInformation, getOutletAvailabilityInfo, getOutletOfflineOrderFormats, getOutletAvailableOrderFormats, getOutletFormattedDistance, isOutletAcceptingPreOrders, getOutletDeliveryFee, getOutletTodayOpeningTimes, getOutletOrderFormats, serviceDateTimesFromOpeningHours, getPickerIntervalsForDay, getServiceIntervalRange, getServiceIntervalsForOrderFormat, getOutletFormattedAddress, getPartitionedOutletsList, getOutletPickerTimesForWeek, getOutletNextReadyToOrderTime, getOutletOrderPreparationTime, getStructuredOutletAddress, getOutletNextOpeningTimeText, getOutletCurrentClosingTimeText, getOutletNextOpeningTagInformation, getOutletCurrentAvailabilityInfo, };
|
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"),u=require("./getOutletOfflineOrderFormats.js"),i=require("./getOutletAvailableOrderFormats.js"),o=require("./getOutletFormattedDistance.js"),l=require("./isOutletAcceptingPreOrders.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getListOutletOpeningHoursTable.js"),t=require("./getOutletTagInformation.js"),r=require("./getOutletAvailabilityInfo.js"),u=require("./getOutletOfflineOrderFormats.js"),i=require("./getOutletAvailableOrderFormats.js"),o=require("./getOutletFormattedDistance.js"),l=require("./isOutletAcceptingPreOrders.js"),n=require("./getOutletDeliveryFee.js"),s=require("./getOutletTodayOpeningTimes.js"),O=require("./getOutletOrderFormats.js"),g=require("./serviceDateTimesFromOpeningHours.js"),a=require("./getPickerIntervalsForDay.js"),q=require("./getServiceIntervalRange.js"),c=require("./getServiceIntervalsForOrderFormat.js"),d=require("./getOutletFormattedAddress.js"),m=require("./getPartitionedOutletsList.js"),T=require("./getOutletPickerTimesForWeek.js"),_=require("./getOutletOrderPrepTime.js"),F=require("./getStructuredOutletAddress.js"),v=require("./getOutletNextOpeningTimeText.js"),f=require("./getOutletCurrentClosingTimeText.js"),p=require("./getOutletNextReadyToOrderTime.js"),y=require("./getOutletNextOpeningTagInformation.js"),I=require("./getOutletCurrentAvailabilityInfo.js");require("moment");require("@ancon/wildcat-types");require("../shared/isWithinFlag.js");require("../shared/generateId.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");require("../_baseIsEqual-a66350f1.js");require("../isObjectLike-0cc89d64.js");require("../toString-c005c116.js");require("../noop-7ea3b37b.js");require("../shared/constants.js");require("../time/toMinutes.js");require("../time/getNextTenthMinute.js");require("./types.js");require("./getSettingsForOrderFormat.js");require("./getServiceIntervalStart.js");require("./getNextTenthMinute.js");require("./generatePickerTimesForDay.js");require("./getServiceIntervalEnd.js");require("./hoursAndMinutesToMinutes.js");exports.getListOutletOpeningHoursTable=e;exports.getOutletTagInformation=t.default;exports.getOutletAvailabilityInfo=r.default;exports.getOutletOfflineOrderFormats=u;exports.getOutletAvailableOrderFormats=i;exports.getOutletFormattedDistance=o;exports.isOutletAcceptingPreOrders=l;exports.getOutletDeliveryFee=n;exports.getOutletTodayOpeningTimes=s;exports.getOutletOrderFormats=O;exports.serviceDateTimesFromOpeningHours=g;exports.getPickerIntervalsForDay=a;exports.getServiceIntervalRange=q;exports.getServiceIntervalsForOrderFormat=c;exports.getOutletFormattedAddress=d;exports.getPartitionedOutletsList=m;exports.getOutletPickerTimesForWeek=T;exports.getOutletOrderPreparationTime=_;exports.getStructuredOutletAddress=F;exports.getOutletNextOpeningTimeText=v;exports.getOutletCurrentClosingTimeText=f;exports.getOutletNextReadyToOrderTime=p;exports.getOutletNextOpeningTagInformation=y;exports.getOutletCurrentAvailabilityInfo=I;
|
package/outlet/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as P } from "./getListOutletOpeningHoursTable.mjs";
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
2
|
+
import { default as D } from "./getOutletTagInformation.mjs";
|
|
3
|
+
import { default as C } from "./getOutletAvailabilityInfo.mjs";
|
|
4
|
+
import { default as S } from "./getOutletOfflineOrderFormats.mjs";
|
|
5
|
+
import { default as L } from "./getOutletAvailableOrderFormats.mjs";
|
|
6
6
|
import { default as W } from "./getOutletFormattedDistance.mjs";
|
|
7
7
|
import { default as j } from "./isOutletAcceptingPreOrders.mjs";
|
|
8
8
|
import { default as w } from "./getOutletDeliveryFee.mjs";
|
|
@@ -17,9 +17,11 @@ import { default as tt } from "./getPartitionedOutletsList.mjs";
|
|
|
17
17
|
import { default as rt } from "./getOutletPickerTimesForWeek.mjs";
|
|
18
18
|
import { default as at } from "./getOutletOrderPrepTime.mjs";
|
|
19
19
|
import { default as it } from "./getStructuredOutletAddress.mjs";
|
|
20
|
-
import { default as
|
|
20
|
+
import { default as ft } from "./getOutletNextOpeningTimeText.mjs";
|
|
21
21
|
import { default as ut } from "./getOutletCurrentClosingTimeText.mjs";
|
|
22
22
|
import { default as dt } from "./getOutletNextReadyToOrderTime.mjs";
|
|
23
|
+
import { default as gt } from "./getOutletNextOpeningTagInformation.mjs";
|
|
24
|
+
import { default as nt } from "./getOutletCurrentAvailabilityInfo.mjs";
|
|
23
25
|
import "moment";
|
|
24
26
|
import "@ancon/wildcat-types";
|
|
25
27
|
import "../shared/isWithinFlag.mjs";
|
|
@@ -44,19 +46,21 @@ import "./getServiceIntervalEnd.mjs";
|
|
|
44
46
|
import "./hoursAndMinutesToMinutes.mjs";
|
|
45
47
|
export {
|
|
46
48
|
P as getListOutletOpeningHoursTable,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
C as getOutletAvailabilityInfo,
|
|
50
|
+
L as getOutletAvailableOrderFormats,
|
|
51
|
+
nt as getOutletCurrentAvailabilityInfo,
|
|
49
52
|
ut as getOutletCurrentClosingTimeText,
|
|
50
53
|
w as getOutletDeliveryFee,
|
|
51
54
|
_ as getOutletFormattedAddress,
|
|
52
55
|
W as getOutletFormattedDistance,
|
|
53
|
-
|
|
56
|
+
gt as getOutletNextOpeningTagInformation,
|
|
57
|
+
ft as getOutletNextOpeningTimeText,
|
|
54
58
|
dt as getOutletNextReadyToOrderTime,
|
|
55
|
-
|
|
59
|
+
S as getOutletOfflineOrderFormats,
|
|
56
60
|
G as getOutletOrderFormats,
|
|
57
61
|
at as getOutletOrderPreparationTime,
|
|
58
62
|
rt as getOutletPickerTimesForWeek,
|
|
59
|
-
|
|
63
|
+
D as getOutletTagInformation,
|
|
60
64
|
B as getOutletTodayOpeningTimes,
|
|
61
65
|
tt as getPartitionedOutletsList,
|
|
62
66
|
Q as getPickerIntervalsForDay,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancon/wildcat-utils",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -131,6 +131,11 @@
|
|
|
131
131
|
"require": "./checkout/isCheckoutOrderSummary.js",
|
|
132
132
|
"types": "./checkout/isCheckoutOrderSummary.d.ts"
|
|
133
133
|
},
|
|
134
|
+
"./checkout/isDeletingCheckoutAllowed": {
|
|
135
|
+
"import": "./checkout/isDeletingCheckoutAllowed.mjs",
|
|
136
|
+
"require": "./checkout/isDeletingCheckoutAllowed.js",
|
|
137
|
+
"types": "./checkout/isDeletingCheckoutAllowed.d.ts"
|
|
138
|
+
},
|
|
134
139
|
"./checkout/isPreOrderCheckout": {
|
|
135
140
|
"import": "./checkout/isPreOrderCheckout.mjs",
|
|
136
141
|
"require": "./checkout/isPreOrderCheckout.js",
|
|
@@ -406,6 +411,11 @@
|
|
|
406
411
|
"require": "./outlet/getOutletCurrentActiveOperatingHour.js",
|
|
407
412
|
"types": "./outlet/getOutletCurrentActiveOperatingHour.d.ts"
|
|
408
413
|
},
|
|
414
|
+
"./outlet/getOutletCurrentAvailabilityInfo": {
|
|
415
|
+
"import": "./outlet/getOutletCurrentAvailabilityInfo.mjs",
|
|
416
|
+
"require": "./outlet/getOutletCurrentAvailabilityInfo.js",
|
|
417
|
+
"types": "./outlet/getOutletCurrentAvailabilityInfo.d.ts"
|
|
418
|
+
},
|
|
409
419
|
"./outlet/getOutletCurrentClosingTimeText": {
|
|
410
420
|
"import": "./outlet/getOutletCurrentClosingTimeText.mjs",
|
|
411
421
|
"require": "./outlet/getOutletCurrentClosingTimeText.js",
|
|
@@ -426,6 +436,11 @@
|
|
|
426
436
|
"require": "./outlet/getOutletFormattedDistance.js",
|
|
427
437
|
"types": "./outlet/getOutletFormattedDistance.d.ts"
|
|
428
438
|
},
|
|
439
|
+
"./outlet/getOutletNextOpeningTagInformation": {
|
|
440
|
+
"import": "./outlet/getOutletNextOpeningTagInformation.mjs",
|
|
441
|
+
"require": "./outlet/getOutletNextOpeningTagInformation.js",
|
|
442
|
+
"types": "./outlet/getOutletNextOpeningTagInformation.d.ts"
|
|
443
|
+
},
|
|
429
444
|
"./outlet/getOutletNextOpeningTimeText": {
|
|
430
445
|
"import": "./outlet/getOutletNextOpeningTimeText.mjs",
|
|
431
446
|
"require": "./outlet/getOutletNextOpeningTimeText.js",
|