@ancon/wildcat-utils 1.43.0-timezone-refactor.7 → 1.43.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/_baseIsEqual-39cef2eb.mjs +530 -0
- package/_baseIsEqual-b3df9240.js +1 -0
- package/_baseIteratee-13e892b8.mjs +151 -0
- package/_baseIteratee-be26bb18.js +1 -0
- package/card/getScannedWalletReadingInfo.d.ts +2 -2
- package/card/getScannedWalletReadingInfo.js +1 -1
- package/card/getScannedWalletReadingInfo.mjs +6 -6
- package/checkout/getCheckoutOrderStatusTexts.js +1 -1
- package/checkout/getCheckoutOrderStatusTexts.mjs +5 -7
- package/checkout/getCheckoutPenguinLockersMetaData.js +1 -1
- package/checkout/getCheckoutPenguinLockersMetaData.mjs +2 -2
- package/checkout/index.js +1 -1
- package/checkout/index.mjs +47 -49
- package/checkout/isCheckoutItemsAreEqual.js +1 -1
- package/checkout/isCheckoutItemsAreEqual.mjs +13 -14
- package/currency/getFormattedCurrency.d.ts +15 -0
- package/currency/getFormattedCurrency.js +1 -1
- package/currency/getFormattedCurrency.mjs +25 -10
- package/error/isAPIError.d.ts +1 -1
- package/error/isAPIError.js +1 -1
- package/error/isAPIError.mjs +7 -7
- package/index.d.ts +1 -2
- package/index.js +1 -1
- package/index.mjs +237 -255
- package/license/getLicenseUIState.d.ts +1 -1
- package/license/getLicenseUIState.js +1 -1
- package/license/getLicenseUIState.mjs +30 -11
- package/logger/index.js +1 -1
- package/logger/index.mjs +7 -8
- package/logger/pascalCaseFormatter.js +1 -1
- package/logger/pascalCaseFormatter.mjs +27 -21
- package/order/getCheckOrderItemsMappedByTicketItemStatus.js +1 -1
- package/order/getCheckOrderItemsMappedByTicketItemStatus.mjs +13 -15
- package/order/getCheckOrderMinimumStatusTicketItem.js +1 -1
- package/order/getCheckOrderMinimumStatusTicketItem.mjs +17 -19
- package/order/index.js +1 -1
- package/order/index.mjs +9 -11
- package/outlet/constants.d.ts +1 -0
- package/outlet/constants.js +1 -1
- package/outlet/constants.mjs +4 -3
- package/outlet/getExpressAvailableOrderFormats.js +1 -1
- package/outlet/getExpressAvailableOrderFormats.mjs +26 -27
- package/outlet/getExpressNextAvailabilityShiftTime.d.ts +2 -2
- package/outlet/getExpressNextAvailabilityShiftTime.js +1 -1
- package/outlet/getExpressNextAvailabilityShiftTime.mjs +18 -19
- package/outlet/getExpressServiceIntervalEnd.d.ts +2 -2
- package/outlet/getExpressServiceIntervalEnd.js +1 -1
- package/outlet/getExpressServiceIntervalEnd.mjs +9 -7
- package/outlet/getExpressServiceIntervalStart.d.ts +2 -2
- package/outlet/getExpressServiceIntervalStart.js +1 -1
- package/outlet/getExpressServiceIntervalStart.mjs +9 -7
- package/outlet/getListOutletOpeningHoursTable.d.ts +1 -1
- package/outlet/getListOutletOpeningHoursTable.js +1 -1
- package/outlet/getListOutletOpeningHoursTable.mjs +150 -135
- package/outlet/getMomentFromDateAndTimeString.js +1 -1
- package/outlet/getMomentFromDateAndTimeString.mjs +1 -1
- package/outlet/getOutletActiveOpeningInterval.d.ts +2 -2
- package/outlet/getOutletActiveOpeningInterval.js +1 -1
- package/outlet/getOutletActiveOpeningInterval.mjs +12 -15
- package/outlet/getOutletAvailabilityInfo.js +1 -1
- package/outlet/getOutletAvailabilityInfo.mjs +25 -23
- package/outlet/getOutletCurrentActiveOperatingHour.js +1 -1
- package/outlet/getOutletCurrentActiveOperatingHour.mjs +15 -16
- package/outlet/getOutletCurrentAvailabilityInfo.js +1 -1
- package/outlet/getOutletCurrentAvailabilityInfo.mjs +26 -27
- package/outlet/getOutletCurrentClosingTimeText.js +1 -1
- package/outlet/getOutletCurrentClosingTimeText.mjs +10 -14
- package/outlet/getOutletDeliveryFee.js +1 -1
- package/outlet/getOutletDeliveryFee.mjs +5 -5
- package/outlet/getOutletFormattedAddress.d.ts +1 -9
- package/outlet/getOutletFormattedAddress.js +1 -1
- package/outlet/getOutletFormattedAddress.mjs +4 -9
- package/outlet/getOutletNextOpeningTagInformation.js +1 -1
- package/outlet/getOutletNextOpeningTagInformation.mjs +7 -8
- package/outlet/getOutletNextOpeningTimeText.js +1 -1
- package/outlet/getOutletNextOpeningTimeText.mjs +8 -10
- package/outlet/getOutletNextReadyToOrderTime.js +1 -1
- package/outlet/getOutletNextReadyToOrderTime.mjs +29 -21
- package/outlet/getOutletNextServiceTimeOffset.d.ts +11 -0
- package/outlet/getOutletNextServiceTimeOffset.js +1 -0
- package/outlet/getOutletNextServiceTimeOffset.mjs +10 -0
- package/outlet/getOutletPickerTimesForDay.js +1 -1
- package/outlet/getOutletPickerTimesForDay.mjs +38 -36
- package/outlet/getOutletPickerTimesForWeek.js +1 -1
- package/outlet/getOutletPickerTimesForWeek.mjs +2 -2
- package/outlet/getOutletTagInformation.d.ts +1 -1
- package/outlet/getOutletTagInformation.js +1 -1
- package/outlet/getOutletTagInformation.mjs +70 -69
- package/outlet/getOutletTodayOpeningTimes.js +1 -1
- package/outlet/getOutletTodayOpeningTimes.mjs +39 -43
- package/outlet/getPartitionedOutletsList.js +1 -1
- package/outlet/getPartitionedOutletsList.mjs +4 -4
- package/outlet/getPickerIntervalsForDay.js +1 -1
- package/outlet/getPickerIntervalsForDay.mjs +12 -20
- package/outlet/getServiceIntervalEnd.d.ts +1 -1
- package/outlet/getServiceIntervalEnd.js +1 -1
- package/outlet/getServiceIntervalEnd.mjs +10 -12
- package/outlet/getServiceIntervalRange.d.ts +2 -1
- package/outlet/getServiceIntervalRange.js +1 -1
- package/outlet/getServiceIntervalRange.mjs +12 -8
- package/outlet/getServiceIntervalStart.d.ts +1 -1
- package/outlet/getServiceIntervalStart.js +1 -1
- package/outlet/getServiceIntervalStart.mjs +7 -6
- package/outlet/getServiceIntervalsForOrderFormat.d.ts +8 -7
- package/outlet/getStructuredOutletAddress.js +1 -1
- package/outlet/getStructuredOutletAddress.mjs +7 -7
- package/outlet/index.d.ts +2 -1
- package/outlet/index.js +1 -1
- package/outlet/index.mjs +68 -71
- package/outlet/searchNextOpeningMoment.d.ts +1 -1
- package/outlet/searchNextOpeningMoment.js +1 -1
- package/outlet/searchNextOpeningMoment.mjs +56 -49
- package/outlet/serviceDateTimesFromOpeningHours.d.ts +5 -3
- package/outlet/serviceDateTimesFromOpeningHours.js +1 -1
- package/outlet/serviceDateTimesFromOpeningHours.mjs +27 -342
- package/outlet/types.d.ts +2 -0
- package/package.json +16 -21
- package/quantity/getFormattedQuantity.d.ts +24 -0
- package/quantity/getFormattedQuantity.js +1 -0
- package/quantity/getFormattedQuantity.mjs +30 -0
- package/quantity/index.d.ts +2 -0
- package/quantity/index.js +1 -0
- package/quantity/index.mjs +4 -0
- package/time/getEndTimeSpanOfTimePeriod.js +1 -1
- package/time/getEndTimeSpanOfTimePeriod.mjs +9 -5
- package/toString-425512fc.js +1 -0
- package/{toString-3b91b335.mjs → toString-e631a957.mjs} +11 -12
- package/_baseIsEqual-12d01a44.mjs +0 -169
- package/_baseIsEqual-bcac9024.js +0 -1
- package/_baseIteratee-075c204c.js +0 -1
- package/_baseIteratee-4c4d0995.mjs +0 -97
- package/_baseSlice-4d543985.mjs +0 -10
- package/_baseSlice-e1b41ceb.js +0 -1
- package/_getTag-4e44633b.mjs +0 -382
- package/_getTag-b8923c48.js +0 -1
- package/date/createLocalTimezoneDate.d.ts +0 -8
- package/date/createLocalTimezoneDate.js +0 -1
- package/date/createLocalTimezoneDate.mjs +0 -8
- package/date/createLocalTimezoneMoment.d.ts +0 -9
- package/date/createLocalTimezoneMoment.js +0 -1
- package/date/createLocalTimezoneMoment.mjs +0 -8
- package/date/getFormattedUTCDateTime.d.ts +0 -10
- package/date/getFormattedUTCDateTime.js +0 -1
- package/date/getFormattedUTCDateTime.mjs +0 -8
- package/date/index.d.ts +0 -4
- package/date/index.js +0 -1
- package/date/index.mjs +0 -9
- package/identity-1bae7cf8.js +0 -1
- package/identity-6eafe87b.mjs +0 -64
- package/toString-9eae9442.js +0 -1
|
@@ -1,21 +1,40 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from "moment";
|
|
2
2
|
import { LicenseStatus as r } from "@ancon/wildcat-types";
|
|
3
|
-
import { LicenseUIState as
|
|
4
|
-
function
|
|
3
|
+
import { LicenseUIState as n } from "./types.mjs";
|
|
4
|
+
function x(e) {
|
|
5
5
|
return (e & r.Terminated) === r.Terminated;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function p(e) {
|
|
8
8
|
return (e & r.Expired) === r.Expired;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function E(e) {
|
|
11
11
|
return (e & r.Extended) === r.Extended;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
13
|
+
function I(e, m, i, s, a = 0.25) {
|
|
14
|
+
if (s)
|
|
15
|
+
return n.Deleted;
|
|
16
|
+
if (x(e))
|
|
17
|
+
return n.Terminated;
|
|
18
|
+
if (p(e))
|
|
19
|
+
return n.Expired;
|
|
20
|
+
if (E(e))
|
|
21
|
+
return n.Extended;
|
|
22
|
+
if (i) {
|
|
23
|
+
const d = t(i), o = t(m);
|
|
24
|
+
if (o.isSameOrBefore(t())) {
|
|
25
|
+
const f = d.diff(t(), "day");
|
|
26
|
+
if (f >= 0) {
|
|
27
|
+
const u = d.diff(o, "day"), c = f / u;
|
|
28
|
+
if (a >= c)
|
|
29
|
+
return n.AboutToExpire;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return n.Valid;
|
|
15
34
|
}
|
|
16
35
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
36
|
+
I as default,
|
|
37
|
+
p as isLicenseExpired,
|
|
38
|
+
E as isLicenseExtended,
|
|
39
|
+
x as isLicenseTerminated
|
|
21
40
|
};
|
package/logger/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Logger.js"),r=require("./types.js"),t=require("./sanitizeAsStringDict.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Logger.js"),r=require("./types.js"),t=require("./sanitizeAsStringDict.js"),g=require("./pascalCaseFormatter.js");require("../string/truncate.js");require("../toString-425512fc.js");require("../isArray-640f9811.js");exports.Logger=e;exports.LogLevel=r.LogLevel;exports.sanitizeAsStringDict=t;exports.pascalCaseFormatter=g;
|
package/logger/index.mjs
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { default as
|
|
1
|
+
import { default as m } from "./Logger.mjs";
|
|
2
2
|
import { LogLevel as f } from "./types.mjs";
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
3
|
+
import { default as s } from "./sanitizeAsStringDict.mjs";
|
|
4
|
+
import { default as g } from "./pascalCaseFormatter.mjs";
|
|
5
5
|
import "../string/truncate.mjs";
|
|
6
|
-
import "../
|
|
7
|
-
import "../toString-3b91b335.mjs";
|
|
6
|
+
import "../toString-e631a957.mjs";
|
|
8
7
|
import "../isArray-0d9c7aaa.mjs";
|
|
9
8
|
export {
|
|
10
9
|
f as LogLevel,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
m as Logger,
|
|
11
|
+
g as pascalCaseFormatter,
|
|
12
|
+
s as sanitizeAsStringDict
|
|
14
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const m=require("../toString-425512fc.js");require("../isArray-640f9811.js");function R(r,e,u){var n=-1,o=r.length;e<0&&(e=-e>o?0:o+e),u=u>o?o:u,u<0&&(u+=o),o=e>u?0:u-e>>>0,e>>>=0;for(var f=Array(o);++n<o;)f[n]=r[n+e];return f}function v(r,e,u){var n=r.length;return u=u===void 0?n:u,!e&&u>=n?r:R(r,e,u)}var C="\\ud800-\\udfff",S="\\u0300-\\u036f",h="\\ufe20-\\ufe2f",A="\\u20d0-\\u20ff",$=S+h+A,j="\\ufe0e\\ufe0f",y="\\u200d",F=RegExp("["+y+C+$+j+"]");function i(r){return F.test(r)}function M(r){return r.split("")}var c="\\ud800-\\udfff",x="\\u0300-\\u036f",O="\\ufe20-\\ufe2f",U="\\u20d0-\\u20ff",k=x+O+U,q="\\ufe0e\\ufe0f",H="["+c+"]",s="["+k+"]",t="\\ud83c[\\udffb-\\udfff]",J="(?:"+s+"|"+t+")",l="[^"+c+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",T="\\u200d",b=J+"?",g="["+q+"]?",V="(?:"+T+"(?:"+[l,d,p].join("|")+")"+g+b+")*",w=g+b+V,E="(?:"+[l+s+"?",s,d,p,H].join("|")+")",W=RegExp(t+"(?="+t+")|"+E+w,"g");function Z(r){return r.match(W)||[]}function z(r){return i(r)?Z(r):M(r)}function K(r){return function(e){e=m.toString(e);var u=i(e)?z(e):void 0,n=u?u[0]:e.charAt(0),o=u?v(u,1).join(""):e.slice(1);return n[r]()+o}}var N=K("toUpperCase");const a=N;function P(r){return r[0]==="_"?a(r.slice(1)):a(r)}function _(r){return typeof r=="object"?Object.entries(r).reduce((e,[u,n])=>{const f=u.split(".").map(P).join(".");return e[f]=n,e},{}):r}module.exports=_;
|
|
@@ -1,42 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as g } from "../toString-3b91b335.mjs";
|
|
1
|
+
import { t as g } from "../toString-e631a957.mjs";
|
|
3
2
|
import "../isArray-0d9c7aaa.mjs";
|
|
4
|
-
function
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
function R(r, e, u) {
|
|
4
|
+
var f = -1, o = r.length;
|
|
5
|
+
e < 0 && (e = -e > o ? 0 : o + e), u = u > o ? o : u, u < 0 && (u += o), o = e > u ? 0 : u - e >>> 0, e >>>= 0;
|
|
6
|
+
for (var n = Array(o); ++f < o; )
|
|
7
|
+
n[f] = r[f + e];
|
|
8
|
+
return n;
|
|
9
|
+
}
|
|
10
|
+
function v(r, e, u) {
|
|
11
|
+
var f = r.length;
|
|
12
|
+
return u = u === void 0 ? f : u, !e && u >= f ? r : R(r, e, u);
|
|
13
|
+
}
|
|
14
|
+
var C = "\\ud800-\\udfff", h = "\\u0300-\\u036f", A = "\\ufe20-\\ufe2f", S = "\\u20d0-\\u20ff", $ = h + A + S, j = "\\ufe0e\\ufe0f", y = "\\u200d", F = RegExp("[" + y + C + $ + j + "]");
|
|
15
|
+
function i(r) {
|
|
10
16
|
return F.test(r);
|
|
11
17
|
}
|
|
12
18
|
function M(r) {
|
|
13
19
|
return r.split("");
|
|
14
20
|
}
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
return r.match(
|
|
21
|
+
var c = "\\ud800-\\udfff", x = "\\u0300-\\u036f", O = "\\ufe20-\\ufe2f", U = "\\u20d0-\\u20ff", k = x + O + U, H = "\\ufe0e\\ufe0f", J = "[" + c + "]", a = "[" + k + "]", s = "\\ud83c[\\udffb-\\udfff]", T = "(?:" + a + "|" + s + ")", l = "[^" + c + "]", d = "(?:\\ud83c[\\udde6-\\uddff]){2}", p = "[\\ud800-\\udbff][\\udc00-\\udfff]", V = "\\u200d", m = T + "?", b = "[" + H + "]?", w = "(?:" + V + "(?:" + [l, d, p].join("|") + ")" + b + m + ")*", E = b + m + w, W = "(?:" + [l + a + "?", a, d, p, J].join("|") + ")", Z = RegExp(s + "(?=" + s + ")|" + W + E, "g");
|
|
22
|
+
function q(r) {
|
|
23
|
+
return r.match(Z) || [];
|
|
18
24
|
}
|
|
19
25
|
function z(r) {
|
|
20
|
-
return
|
|
26
|
+
return i(r) ? q(r) : M(r);
|
|
21
27
|
}
|
|
22
28
|
function K(r) {
|
|
23
29
|
return function(e) {
|
|
24
30
|
e = g(e);
|
|
25
|
-
var
|
|
26
|
-
return
|
|
31
|
+
var u = i(e) ? z(e) : void 0, f = u ? u[0] : e.charAt(0), o = u ? v(u, 1).join("") : e.slice(1);
|
|
32
|
+
return f[r]() + o;
|
|
27
33
|
};
|
|
28
34
|
}
|
|
29
35
|
var N = K("toUpperCase");
|
|
30
|
-
const
|
|
36
|
+
const t = N;
|
|
31
37
|
function P(r) {
|
|
32
|
-
return r[0] === "_" ?
|
|
38
|
+
return r[0] === "_" ? t(r.slice(1)) : t(r);
|
|
33
39
|
}
|
|
34
|
-
function
|
|
35
|
-
return typeof r == "object" ? Object.entries(r).reduce((e, [
|
|
36
|
-
const
|
|
37
|
-
return e[
|
|
40
|
+
function D(r) {
|
|
41
|
+
return typeof r == "object" ? Object.entries(r).reduce((e, [u, f]) => {
|
|
42
|
+
const n = u.split(".").map(P).join(".");
|
|
43
|
+
return e[n] = f, e;
|
|
38
44
|
}, {}) : r;
|
|
39
45
|
}
|
|
40
46
|
export {
|
|
41
|
-
|
|
47
|
+
D as default
|
|
42
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("@ancon/wildcat-types"),i=require("./getCheckOrderMinimumStatusTicketItem.js");require("./getMultiProductSubProductsTicketItems.js");require("../toString-
|
|
1
|
+
"use strict";const u=require("@ancon/wildcat-types"),i=require("./getCheckOrderMinimumStatusTicketItem.js");require("./getMultiProductSubProductsTicketItems.js");require("../toString-425512fc.js");require("../isArray-640f9811.js");require("../_baseIteratee-be26bb18.js");require("../_baseIsEqual-b3df9240.js");function a(s){return s.reduce((e,t)=>{const r=i(t);switch(r==null?void 0:r.status){case u.TicketItemStatus.Ready:e.ready.push(t);break;case u.TicketItemStatus.Closed:e.done.push(t);break}return e},{all:s,ready:[],done:[]})}module.exports=a;
|
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
import { TicketItemStatus as
|
|
2
|
-
import
|
|
1
|
+
import { TicketItemStatus as a } from "@ancon/wildcat-types";
|
|
2
|
+
import m from "./getCheckOrderMinimumStatusTicketItem.mjs";
|
|
3
3
|
import "./getMultiProductSubProductsTicketItems.mjs";
|
|
4
|
-
import "../toString-
|
|
4
|
+
import "../toString-e631a957.mjs";
|
|
5
5
|
import "../isArray-0d9c7aaa.mjs";
|
|
6
|
-
import "../_baseIteratee-
|
|
7
|
-
import "../
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function y(m) {
|
|
11
|
-
return m.reduce(
|
|
6
|
+
import "../_baseIteratee-13e892b8.mjs";
|
|
7
|
+
import "../_baseIsEqual-39cef2eb.mjs";
|
|
8
|
+
function f(r) {
|
|
9
|
+
return r.reduce(
|
|
12
10
|
(t, e) => {
|
|
13
|
-
const
|
|
14
|
-
switch (
|
|
15
|
-
case
|
|
11
|
+
const s = m(e);
|
|
12
|
+
switch (s == null ? void 0 : s.status) {
|
|
13
|
+
case a.Ready:
|
|
16
14
|
t.ready.push(e);
|
|
17
15
|
break;
|
|
18
|
-
case
|
|
16
|
+
case a.Closed:
|
|
19
17
|
t.done.push(e);
|
|
20
18
|
break;
|
|
21
19
|
}
|
|
22
20
|
return t;
|
|
23
21
|
},
|
|
24
22
|
{
|
|
25
|
-
all:
|
|
23
|
+
all: r,
|
|
26
24
|
ready: [],
|
|
27
25
|
done: []
|
|
28
26
|
}
|
|
29
27
|
);
|
|
30
28
|
}
|
|
31
29
|
export {
|
|
32
|
-
|
|
30
|
+
f as default
|
|
33
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const g=require("../toString-425512fc.js"),f=require("../_baseIteratee-be26bb18.js"),P=require("./getMultiProductSubProductsTicketItems.js");require("../isArray-640f9811.js");require("../_baseIsEqual-b3df9240.js");function b(t,s,n){for(var u=-1,r=t.length;++u<r;){var c=t[u],e=s(c);if(e!=null&&(o===void 0?e===e&&!g.isSymbol(e):n(e,o)))var o=e,i=c}return i}function l(t,s){return t<s}function a(t,s){return t&&t.length?b(t,f.baseIteratee(s),l):void 0}function S(t){return t&&t.length?b(t,f.identity,l):void 0}function T(t){const{items:s,ticketItems:n,modifications:u}=t,r=s.length>0,c=u.length>0;if(r){const e=P(t),o=n.map(i=>{const{ticketId:h,status:k}=i,d=[...e[h].map(I=>I.status)];c&&d.push(k);const m=S(d);return m!==void 0?{...i,status:m}:i});return a(o,"status")}return a(n,"status")}module.exports=T;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { b as I } from "../_baseIteratee-
|
|
3
|
-
import { i as g } from "../identity-6eafe87b.mjs";
|
|
1
|
+
import { i as p } from "../toString-e631a957.mjs";
|
|
2
|
+
import { b as I, i as g } from "../_baseIteratee-13e892b8.mjs";
|
|
4
3
|
import P from "./getMultiProductSubProductsTicketItems.mjs";
|
|
5
4
|
import "../isArray-0d9c7aaa.mjs";
|
|
6
|
-
import "../
|
|
7
|
-
|
|
8
|
-
function f(t, e, n) {
|
|
5
|
+
import "../_baseIsEqual-39cef2eb.mjs";
|
|
6
|
+
function r(t, e, n) {
|
|
9
7
|
for (var u = -1, m = t.length; ++u < m; ) {
|
|
10
8
|
var o = t[u], s = e(o);
|
|
11
|
-
if (s != null && (c === void 0 ? s === s && !
|
|
9
|
+
if (s != null && (c === void 0 ? s === s && !p(s) : n(s, c)))
|
|
12
10
|
var c = s, i = o;
|
|
13
11
|
}
|
|
14
12
|
return i;
|
|
@@ -16,30 +14,30 @@ function f(t, e, n) {
|
|
|
16
14
|
function l(t, e) {
|
|
17
15
|
return t < e;
|
|
18
16
|
}
|
|
19
|
-
function
|
|
20
|
-
return t && t.length ?
|
|
17
|
+
function f(t, e) {
|
|
18
|
+
return t && t.length ? r(t, I(e), l) : void 0;
|
|
21
19
|
}
|
|
22
20
|
function T(t) {
|
|
23
|
-
return t && t.length ?
|
|
21
|
+
return t && t.length ? r(t, g, l) : void 0;
|
|
24
22
|
}
|
|
25
|
-
function
|
|
23
|
+
function E(t) {
|
|
26
24
|
const { items: e, ticketItems: n, modifications: u } = t, m = e.length > 0, o = u.length > 0;
|
|
27
25
|
if (m) {
|
|
28
26
|
const s = P(t), c = n.map((i) => {
|
|
29
|
-
const { ticketId:
|
|
30
|
-
(
|
|
27
|
+
const { ticketId: b, status: h } = i, d = [...s[b].map(
|
|
28
|
+
(k) => k.status
|
|
31
29
|
)];
|
|
32
|
-
o && d.push(
|
|
33
|
-
const
|
|
34
|
-
return
|
|
30
|
+
o && d.push(h);
|
|
31
|
+
const a = T(d);
|
|
32
|
+
return a !== void 0 ? { ...i, status: a } : i;
|
|
35
33
|
});
|
|
36
|
-
return
|
|
34
|
+
return f(
|
|
37
35
|
c,
|
|
38
36
|
"status"
|
|
39
37
|
);
|
|
40
38
|
}
|
|
41
|
-
return
|
|
39
|
+
return f(n, "status");
|
|
42
40
|
}
|
|
43
41
|
export {
|
|
44
|
-
|
|
42
|
+
E as default
|
|
45
43
|
};
|
package/order/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getCheckOrderItemsMappedByTicketItemStatus.js"),t=require("./getCheckOrderMinimumStatusTicketItem.js"),r=require("./getMultiProductSubProductsTicketItems.js");require("@ancon/wildcat-types");require("../toString-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getCheckOrderItemsMappedByTicketItemStatus.js"),t=require("./getCheckOrderMinimumStatusTicketItem.js"),r=require("./getMultiProductSubProductsTicketItems.js");require("@ancon/wildcat-types");require("../toString-425512fc.js");require("../isArray-640f9811.js");require("../_baseIteratee-be26bb18.js");require("../_baseIsEqual-b3df9240.js");exports.getCheckOrderItemsMappedByTicketItemStatus=e;exports.getCheckOrderMinimumStatusTicketItem=t;exports.getMultiProductSubProductsTicketItems=r;
|
package/order/index.mjs
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
1
|
+
import { default as u } from "./getCheckOrderItemsMappedByTicketItemStatus.mjs";
|
|
2
|
+
import { default as d } from "./getCheckOrderMinimumStatusTicketItem.mjs";
|
|
3
|
+
import { default as c } from "./getMultiProductSubProductsTicketItems.mjs";
|
|
4
4
|
import "@ancon/wildcat-types";
|
|
5
|
-
import "../toString-
|
|
5
|
+
import "../toString-e631a957.mjs";
|
|
6
6
|
import "../isArray-0d9c7aaa.mjs";
|
|
7
|
-
import "../_baseIteratee-
|
|
8
|
-
import "../
|
|
9
|
-
import "../_baseIsEqual-12d01a44.mjs";
|
|
10
|
-
import "../identity-6eafe87b.mjs";
|
|
7
|
+
import "../_baseIteratee-13e892b8.mjs";
|
|
8
|
+
import "../_baseIsEqual-39cef2eb.mjs";
|
|
11
9
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
u as getCheckOrderItemsMappedByTicketItemStatus,
|
|
11
|
+
d as getCheckOrderMinimumStatusTicketItem,
|
|
12
|
+
c as getMultiProductSubProductsTicketItems
|
|
15
13
|
};
|
package/outlet/constants.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ 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 const WoltMinimumScheduleDropOffTime: number;
|
package/outlet/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@ancon/wildcat-types"),r=[e.OrderFormat.EatIn,e.OrderFormat.TakeAway,e.OrderFormat.Delivery,e.OrderFormat.TableOrder,e.OrderFormat.BoxPickup],t="YYYY-MM-DD",o=7,a=60;exports.OnlineOrderFormatsArray=r;exports.OutletClosingLabelThreshold=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@ancon/wildcat-types"),r=[e.OrderFormat.EatIn,e.OrderFormat.TakeAway,e.OrderFormat.Delivery,e.OrderFormat.TableOrder,e.OrderFormat.BoxPickup],t="YYYY-MM-DD",o=7,l=60,a=1*60;exports.OnlineOrderFormatsArray=r;exports.OutletClosingLabelThreshold=l;exports.OutletMapKeyFormatter=t;exports.OutletTimelineDayCount=o;exports.WoltMinimumScheduleDropOffTime=a;
|
package/outlet/constants.mjs
CHANGED
|
@@ -5,10 +5,11 @@ const r = [
|
|
|
5
5
|
e.Delivery,
|
|
6
6
|
e.TableOrder,
|
|
7
7
|
e.BoxPickup
|
|
8
|
-
], o = "YYYY-MM-DD",
|
|
8
|
+
], o = "YYYY-MM-DD", l = 7, n = 60, a = 1 * 60;
|
|
9
9
|
export {
|
|
10
10
|
r as OnlineOrderFormatsArray,
|
|
11
|
-
|
|
11
|
+
n as OutletClosingLabelThreshold,
|
|
12
12
|
o as OutletMapKeyFormatter,
|
|
13
|
-
|
|
13
|
+
l as OutletTimelineDayCount,
|
|
14
|
+
a as WoltMinimumScheduleDropOffTime
|
|
14
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("@ancon/wildcat-types"),
|
|
1
|
+
"use strict";const r=require("@ancon/wildcat-types"),i=require("moment"),l=require("../shared/constants.js"),u=require("./getExpressServiceIntervalStart.js"),p=require("./getExpressServiceIntervalEnd.js");require("../time/getTimeSpanParts.js");const k=[r.OrderFormat.TakeAway,r.OrderFormat.EatIn];function E(c){var d;if(!((d=c.openingHours)!=null&&d.length))return[];const s=i(),{openingHours:m,supportedOrderFormats:f,timeZoneOffset:o}=c,y=[...m].reduce((t,e,g,O)=>{switch(e.type){case r.IntervalType.Exception:{const n=i(e.periodFrom),a=i(e.periodTo),F=u(n,e,o),T=p(a,e,o);if(s.isBetween(F,T,void 0,"[]"))return e.state===r.IntervalState.Closed?(O.splice(1),r.OrderFormat.None):e.orderFormat}break;case r.IntervalType.Interval:default:if(e.dayOfWeek===r.DayOfWeek.Everyday||e.dayOfWeek===l.DaysOfWeekMap[s.isoWeekday()]){const n=u(s,e,o),a=p(s,e,o);if(s.isBetween(n,a,void 0,"[]"))return t|e.orderFormat}break}return t},r.OrderFormat.None);return k.filter(t=>(y&t)===t&&(f&t)===t)}module.exports=E;
|
|
@@ -1,66 +1,65 @@
|
|
|
1
|
-
import { OrderFormat as s, DayOfWeek as g, IntervalType as
|
|
2
|
-
import
|
|
3
|
-
import { DaysOfWeekMap as
|
|
4
|
-
import d from "../date/createLocalTimezoneMoment.mjs";
|
|
1
|
+
import { OrderFormat as s, DayOfWeek as g, IntervalType as d, IntervalState as F } from "@ancon/wildcat-types";
|
|
2
|
+
import i from "moment";
|
|
3
|
+
import { DaysOfWeekMap as l } from "../shared/constants.mjs";
|
|
5
4
|
import f from "./getExpressServiceIntervalStart.mjs";
|
|
6
5
|
import c from "./getExpressServiceIntervalEnd.mjs";
|
|
7
6
|
import "../time/getTimeSpanParts.mjs";
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
var
|
|
11
|
-
if (!((
|
|
7
|
+
const x = [s.TakeAway, s.EatIn];
|
|
8
|
+
function h(m) {
|
|
9
|
+
var p;
|
|
10
|
+
if (!((p = m.openingHours) != null && p.length))
|
|
12
11
|
return [];
|
|
13
|
-
const
|
|
14
|
-
(
|
|
12
|
+
const r = i(), { openingHours: u, supportedOrderFormats: y, timeZoneOffset: o } = m, O = [...u].reduce(
|
|
13
|
+
(t, e, D, k) => {
|
|
15
14
|
switch (e.type) {
|
|
16
|
-
case
|
|
15
|
+
case d.Exception:
|
|
17
16
|
{
|
|
18
|
-
const a =
|
|
17
|
+
const a = i(e.periodFrom), n = i(e.periodTo), E = f(
|
|
19
18
|
a,
|
|
20
19
|
e,
|
|
21
20
|
o
|
|
22
|
-
),
|
|
21
|
+
), T = c(
|
|
23
22
|
n,
|
|
24
23
|
e,
|
|
25
24
|
o
|
|
26
25
|
);
|
|
27
|
-
if (
|
|
28
|
-
return e.state ===
|
|
26
|
+
if (r.isBetween(E, T, void 0, "[]"))
|
|
27
|
+
return e.state === F.Closed ? (k.splice(1), s.None) : e.orderFormat;
|
|
29
28
|
}
|
|
30
29
|
break;
|
|
31
|
-
case
|
|
30
|
+
case d.Interval:
|
|
32
31
|
default:
|
|
33
32
|
if (
|
|
34
33
|
// Every day in the week
|
|
35
34
|
e.dayOfWeek === g.Everyday || // Specific day in the week
|
|
36
|
-
e.dayOfWeek ===
|
|
35
|
+
e.dayOfWeek === l[r.isoWeekday()]
|
|
37
36
|
) {
|
|
38
37
|
const a = f(
|
|
39
|
-
|
|
38
|
+
r,
|
|
40
39
|
e,
|
|
41
40
|
o
|
|
42
41
|
), n = c(
|
|
43
|
-
|
|
42
|
+
r,
|
|
44
43
|
e,
|
|
45
44
|
o
|
|
46
45
|
);
|
|
47
|
-
if (
|
|
48
|
-
return
|
|
46
|
+
if (r.isBetween(a, n, void 0, "[]"))
|
|
47
|
+
return t | e.orderFormat;
|
|
49
48
|
}
|
|
50
49
|
break;
|
|
51
50
|
}
|
|
52
|
-
return
|
|
51
|
+
return t;
|
|
53
52
|
},
|
|
54
53
|
s.None
|
|
55
54
|
);
|
|
56
|
-
return
|
|
57
|
-
(
|
|
55
|
+
return x.filter(
|
|
56
|
+
(t) => (
|
|
58
57
|
// Check if the order format is available
|
|
59
|
-
(O &
|
|
60
|
-
(y &
|
|
58
|
+
(O & t) === t && // Check if the order format is supported by the outlet
|
|
59
|
+
(y & t) === t
|
|
61
60
|
)
|
|
62
61
|
);
|
|
63
62
|
}
|
|
64
63
|
export {
|
|
65
|
-
|
|
64
|
+
h as default
|
|
66
65
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpeningHours } from '@ancon/wildcat-types';
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
|
-
export default function getExpressNextAvailabilityShiftTime(openingHours: Array<
|
|
3
|
+
export default function getExpressNextAvailabilityShiftTime(openingHours: Array<OpeningHours>, timezoneOffset?: string): Moment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("@ancon/wildcat-types"),
|
|
1
|
+
"use strict";const o=require("@ancon/wildcat-types"),s=require("moment"),u=require("../shared/constants.js"),x=require("./getExpressServiceIntervalStart.js"),E=require("./getExpressServiceIntervalEnd.js");require("../time/getTimeSpanParts.js");function T(p,i){const t=s();let r=t.clone().add(1,"day").startOf("day");function n(e){const a=e.type===o.IntervalType.Exception,y=a?s(e.periodFrom):t,f=a?s(e.periodTo):t,c=x(y,e,i),d=E(f,e,i);c.isBetween(t,r)?r=c:d.isBetween(t,r)&&(r=d)}return p.forEach(e=>{switch(e.type){case o.IntervalType.Exception:n(e);break;case o.IntervalType.Interval:default:(e.dayOfWeek===o.DayOfWeek.Everyday||e.dayOfWeek===u.DaysOfWeekMap[t.isoWeekday()])&&n(e);break}}),r}module.exports=T;
|
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
import { DayOfWeek as y, IntervalType as r } from "@ancon/wildcat-types";
|
|
2
|
-
import
|
|
3
|
-
import { DaysOfWeekMap as
|
|
4
|
-
import
|
|
5
|
-
import k from "./
|
|
6
|
-
import S from "./getExpressServiceIntervalEnd.mjs";
|
|
2
|
+
import i from "moment";
|
|
3
|
+
import { DaysOfWeekMap as x } from "../shared/constants.mjs";
|
|
4
|
+
import E from "./getExpressServiceIntervalStart.mjs";
|
|
5
|
+
import k from "./getExpressServiceIntervalEnd.mjs";
|
|
7
6
|
import "../time/getTimeSpanParts.mjs";
|
|
8
|
-
function
|
|
9
|
-
const t =
|
|
7
|
+
function W(p, a) {
|
|
8
|
+
const t = i();
|
|
10
9
|
let o = t.clone().add(1, "day").startOf("day");
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
|
|
10
|
+
function s(e) {
|
|
11
|
+
const f = e.type === r.Exception, c = f ? i(e.periodFrom) : t, d = f ? i(e.periodTo) : t, m = E(
|
|
12
|
+
c,
|
|
14
13
|
e,
|
|
15
|
-
|
|
16
|
-
),
|
|
14
|
+
a
|
|
15
|
+
), n = k(
|
|
17
16
|
d,
|
|
18
17
|
e,
|
|
19
|
-
|
|
18
|
+
a
|
|
20
19
|
);
|
|
21
|
-
|
|
20
|
+
m.isBetween(t, o) ? o = m : n.isBetween(t, o) && (o = n);
|
|
22
21
|
}
|
|
23
|
-
return
|
|
22
|
+
return p.forEach((e) => {
|
|
24
23
|
switch (e.type) {
|
|
25
24
|
case r.Exception:
|
|
26
|
-
|
|
25
|
+
s(e);
|
|
27
26
|
break;
|
|
28
|
-
case r.
|
|
27
|
+
case r.Interval:
|
|
29
28
|
default:
|
|
30
29
|
// Every day in the week
|
|
31
30
|
(e.dayOfWeek === y.Everyday || // Specific day in the week
|
|
32
|
-
e.dayOfWeek ===
|
|
31
|
+
e.dayOfWeek === x[t.isoWeekday()]) && s(e);
|
|
33
32
|
break;
|
|
34
33
|
}
|
|
35
34
|
}), o;
|
|
36
35
|
}
|
|
37
36
|
export {
|
|
38
|
-
|
|
37
|
+
W as default
|
|
39
38
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpeningHours } from '@ancon/wildcat-types';
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
|
-
export default function getExpressServiceIntervalEnd(date: Moment, interval:
|
|
3
|
+
export default function getExpressServiceIntervalEnd(date: Moment, interval: OpeningHours, outletTimezoneOffset?: string): Moment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const n=require("../time/getTimeSpanParts.js");function d(e,s,u){const o=n(s.from),i=n(s.duration);let r=e.utcOffset();if(u){const c=n(u);r=c.hours*60+c.minutes}const t=e.clone().hour(o.hours).minute(o.minutes).second(0).millisecond(0),a=t.add(r,"minute").date()-e.date();return Math.abs(a)&&t.subtract(a,"day"),t.add(i.hours,"hour").add(i.minutes,"minute"),t}module.exports=d;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
function m(
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import n from "../time/getTimeSpanParts.mjs";
|
|
2
|
+
function m(e, s, o) {
|
|
3
|
+
const u = n(s.from), a = n(s.duration);
|
|
4
|
+
let r = e.utcOffset();
|
|
5
|
+
if (o) {
|
|
6
|
+
const i = n(o);
|
|
7
|
+
r = i.hours * 60 + i.minutes;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
const t = e.clone().hour(u.hours).minute(u.minutes).second(0).millisecond(0), d = t.add(r, "minute").date() - e.date();
|
|
10
|
+
return Math.abs(d) && t.subtract(d, "day"), t.add(a.hours, "hour").add(a.minutes, "minute"), t;
|
|
9
11
|
}
|
|
10
12
|
export {
|
|
11
13
|
m as default
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpeningHours } from '@ancon/wildcat-types';
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
|
-
export default function getExpressServiceIntervalStart(date: Moment, interval:
|
|
3
|
+
export default function getExpressServiceIntervalStart(date: Moment, interval: OpeningHours, outletTimezoneOffset?: string): Moment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const o=require("../time/getTimeSpanParts.js");function c(t,u,s){const r=o(u.from);let n=t.utcOffset();if(s){const i=o(s);n=i.hours*60+i.minutes}const e=t.clone().hour(r.hours).minute(r.minutes).second(0).millisecond(0),a=e.add(n,"minute").date()-t.date();return Math.abs(a)&&e.subtract(a,"day"),e}module.exports=c;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
function m(t,
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import u from "../time/getTimeSpanParts.mjs";
|
|
2
|
+
function m(t, i, s) {
|
|
3
|
+
const a = u(i.from);
|
|
4
|
+
let r = t.utcOffset();
|
|
5
|
+
if (s) {
|
|
6
|
+
const o = u(s);
|
|
7
|
+
r = o.hours * 60 + o.minutes;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
const e = t.clone().hour(a.hours).minute(a.minutes).second(0).millisecond(0), n = e.add(r, "minute").date() - t.date();
|
|
10
|
+
return Math.abs(n) && e.subtract(n, "day"), e;
|
|
9
11
|
}
|
|
10
12
|
export {
|
|
11
13
|
m as default
|
|
@@ -27,5 +27,5 @@ export declare type OpeningHoursTable = {
|
|
|
27
27
|
* @param nowISOString Optional ISO date string of current datetime
|
|
28
28
|
* @returns Opening hours table
|
|
29
29
|
*/
|
|
30
|
-
export default function getListOutletOpeningHoursTable(outlet: OutletListItem,
|
|
30
|
+
export default function getListOutletOpeningHoursTable(outlet: OutletListItem, nowISOString?: string): OpeningHoursTable[];
|
|
31
31
|
export {};
|