@ancon/wildcat-utils 1.51.0-check-optimizations.1 → 1.51.0-check-optimizations.3
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-5e6adb07.mjs → _baseIsEqual-4ee44a4c.mjs} +1 -1
- package/{_baseIsEqual-ad544573.js → _baseIsEqual-7e335f42.js} +1 -1
- package/_baseIteratee-374c60ca.js +1 -0
- package/{_baseIteratee-db1f278d.mjs → _baseIteratee-5fbe491c.mjs} +21 -20
- package/_getTag-3d3032da.js +1 -0
- package/{_getTag-fcc5160b.mjs → _getTag-ebc0f90e.mjs} +20 -24
- package/api/getMediaImageClosestSize.d.ts +2 -0
- package/api/getMediaImageClosestSize.js +1 -0
- package/api/getMediaImageClosestSize.mjs +31 -0
- package/api/index.d.ts +2 -1
- package/api/index.js +1 -1
- package/api/index.mjs +8 -6
- package/card/getPrepaidWalletScanReadingInfo.d.ts +7 -0
- package/card/getPrepaidWalletScanReadingInfo.js +1 -0
- package/card/getPrepaidWalletScanReadingInfo.mjs +32 -0
- package/card/getScannedWalletReadingInfo.d.ts +1 -0
- package/card/index.d.ts +2 -0
- package/card/index.js +1 -1
- package/card/index.mjs +7 -4
- package/check/getOrganizedCheckItemModifications.js +1 -1
- package/check/getOrganizedCheckItemModifications.mjs +65 -64
- package/check/index.js +1 -1
- package/check/index.mjs +9 -8
- package/checkout/getCheckoutOrderStatusTexts.js +1 -1
- package/checkout/getCheckoutOrderStatusTexts.mjs +7 -6
- package/checkout/index.js +1 -1
- package/checkout/index.mjs +61 -60
- package/checkout/isCheckoutItemsAreEqual.js +1 -1
- package/checkout/isCheckoutItemsAreEqual.mjs +8 -7
- package/hangfire/createHangfirePoller.d.ts +13 -2
- package/hangfire/createHangfirePoller.js +1 -1
- package/hangfire/createHangfirePoller.mjs +153 -87
- package/hangfire/createMakeHangfireRequest.d.ts +2 -0
- package/hangfire/createMakeHangfireRequest.js +1 -1
- package/hangfire/createMakeHangfireRequest.mjs +18 -17
- package/{identity-cf449299.mjs → identity-41198897.mjs} +1 -1
- package/{identity-2a048185.js → identity-58f9497d.js} +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +372 -365
- package/isObject-361bd834.js +1 -0
- package/isObject-b8638513.mjs +7 -0
- package/multilingual/createLocalizedCheckDetails.d.ts +16 -0
- package/multilingual/createLocalizedCheckDetails.js +1 -0
- package/multilingual/createLocalizedCheckDetails.mjs +53 -0
- package/multilingual/index.d.ts +2 -0
- package/multilingual/index.js +1 -0
- package/multilingual/index.mjs +5 -0
- package/order/getCheckOrderItemsMappedByTicketItemStatus.js +1 -1
- package/order/getCheckOrderItemsMappedByTicketItemStatus.mjs +7 -6
- package/order/getCheckOrderMinimumStatusTicketItem.js +1 -1
- package/order/getCheckOrderMinimumStatusTicketItem.mjs +20 -19
- package/order/index.js +1 -1
- package/order/index.mjs +11 -10
- package/outlet/getOutletCurrentClosingTimeText.js +1 -1
- package/outlet/getOutletCurrentClosingTimeText.mjs +10 -9
- package/outlet/getOutletTodayOpeningTimes.js +1 -1
- package/outlet/getOutletTodayOpeningTimes.mjs +7 -6
- package/outlet/index.d.ts +2 -1
- package/outlet/index.js +1 -1
- package/outlet/index.mjs +71 -68
- package/outlet/isOutletAcceptingPreOrdersWhenClosed.d.ts +2 -0
- package/outlet/isOutletAcceptingPreOrdersWhenClosed.js +1 -0
- package/outlet/isOutletAcceptingPreOrdersWhenClosed.mjs +14 -0
- package/outlet/serviceDateTimesFromOpeningHours.js +1 -1
- package/outlet/serviceDateTimesFromOpeningHours.mjs +29 -28
- package/package.json +26 -1
- package/preOrder/isGroupPreOrder.d.ts +6 -4
- package/preOrder/isGroupPreOrder.js +1 -1
- package/preOrder/isGroupPreOrder.mjs +4 -4
- package/preOrder/isPreOrderLink.d.ts +6 -4
- package/preOrder/isPreOrderLink.js +1 -1
- package/preOrder/isPreOrderLink.mjs +4 -4
- package/preOrder/isPreOrderSharable.d.ts +6 -4
- package/preOrder/isPreOrderSharable.js +1 -1
- package/preOrder/isPreOrderSharable.mjs +1 -1
- package/signalr/SignalR.js +1 -1
- package/signalr/SignalR.mjs +62 -62
- package/signalr/types.d.ts +2 -0
- package/_baseIteratee-ae97e42e.js +0 -1
- package/_getTag-d4cd1660.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function e(t){var c=typeof t;return t!=null&&(c=="object"||c=="function")}exports.isObject=e;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CheckDetails } from '@ancon/wildcat-types';
|
|
2
|
+
/**
|
|
3
|
+
* This creates localized check details by replacing following properties with localized values based on current app language.
|
|
4
|
+
* Affected properties on each check item (and its sub-items):
|
|
5
|
+
* - Product Name
|
|
6
|
+
* - Variant Name
|
|
7
|
+
* - Modification Name
|
|
8
|
+
* - Replacement Name
|
|
9
|
+
* - Add-on Product Name and Variant Name
|
|
10
|
+
*
|
|
11
|
+
* @param checkDetails - check details to be localized
|
|
12
|
+
* @param locale - locale to be used for localization
|
|
13
|
+
* @returns localized check details
|
|
14
|
+
*/
|
|
15
|
+
declare function createLocalizedCheckDetails(checkDetails: CheckDetails, locale: string): CheckDetails;
|
|
16
|
+
export default createLocalizedCheckDetails;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const l=require("@ancon/wildcat-types");function u(e){switch(e){case"sv":return l.IETFLanguageTag.Swedish;case"nb":return l.IETFLanguageTag.Norwegian;case"en":return l.IETFLanguageTag.English;default:return null}}function s(e,c){var i,o;const t=e,a=(i=e.localizedProductNames)==null?void 0:i[c],n=(o=e.localizedVariantNames)==null?void 0:o[c];return a&&(t.productName=a),n&&(t.variantName=n),t}function m(e,c){var i,o;const t=e,a=(i=e.localizedNames)==null?void 0:i[c],n=(o=e.localizedReplacementNames)==null?void 0:o[c];return a&&(t.name=a),n&&(t.replacementName=n),t}function z(e,c){const t=e;return t.product=s(e.product,c),t}function d(e,c){const t=e,{product:a,modifications:n,addOnProducts:i,subCheckItems:o}=e;return t.product=s(a,c),n.length&&(t.modifications=n.map(r=>m(r,c))),i!=null&&i.length&&(t.addOnProducts=i.map(r=>z(r,c))),o.length&&(t.subCheckItems=o.map(r=>d(r,c))),t}function f(e,c){const t=u(c);if(t){const a=e;return a.items=e.items.map(n=>d(n,t)),a}return e}module.exports=f;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { IETFLanguageTag as r } from "@ancon/wildcat-types";
|
|
2
|
+
function u(e) {
|
|
3
|
+
switch (e) {
|
|
4
|
+
case "sv":
|
|
5
|
+
return r.Swedish;
|
|
6
|
+
case "nb":
|
|
7
|
+
return r.Norwegian;
|
|
8
|
+
case "en":
|
|
9
|
+
return r.English;
|
|
10
|
+
default:
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function d(e, c) {
|
|
15
|
+
var i, n;
|
|
16
|
+
const t = e, a = (i = e.localizedProductNames) == null ? void 0 : i[c], o = (n = e.localizedVariantNames) == null ? void 0 : n[c];
|
|
17
|
+
return a && (t.productName = a), o && (t.variantName = o), t;
|
|
18
|
+
}
|
|
19
|
+
function m(e, c) {
|
|
20
|
+
var i, n;
|
|
21
|
+
const t = e, a = (i = e.localizedNames) == null ? void 0 : i[c], o = (n = e.localizedReplacementNames) == null ? void 0 : n[c];
|
|
22
|
+
return a && (t.name = a), o && (t.replacementName = o), t;
|
|
23
|
+
}
|
|
24
|
+
function f(e, c) {
|
|
25
|
+
const t = e;
|
|
26
|
+
return t.product = d(
|
|
27
|
+
e.product,
|
|
28
|
+
c
|
|
29
|
+
), t;
|
|
30
|
+
}
|
|
31
|
+
function s(e, c) {
|
|
32
|
+
const t = e, { product: a, modifications: o, addOnProducts: i, subCheckItems: n } = e;
|
|
33
|
+
return t.product = d(a, c), o.length && (t.modifications = o.map(
|
|
34
|
+
(l) => m(l, c)
|
|
35
|
+
)), i != null && i.length && (t.addOnProducts = i.map(
|
|
36
|
+
(l) => f(l, c)
|
|
37
|
+
)), n.length && (t.subCheckItems = n.map(
|
|
38
|
+
(l) => s(l, c)
|
|
39
|
+
)), t;
|
|
40
|
+
}
|
|
41
|
+
function p(e, c) {
|
|
42
|
+
const t = u(c);
|
|
43
|
+
if (t) {
|
|
44
|
+
const a = e;
|
|
45
|
+
return a.items = e.items.map(
|
|
46
|
+
(o) => s(o, t)
|
|
47
|
+
), a;
|
|
48
|
+
}
|
|
49
|
+
return e;
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
p as default
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./createLocalizedCheckDetails.js");require("@ancon/wildcat-types");exports.createLocalizedCheckDetails=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("@ancon/wildcat-types"),i=require("./getCheckOrderMinimumStatusTicketItem.js");require("./getMultiProductSubProductsTicketItems.js");require("../toString-b771abdf.js");require("../isObjectLike-963267e9.js");require("../_baseIteratee-
|
|
1
|
+
"use strict";const u=require("@ancon/wildcat-types"),i=require("./getCheckOrderMinimumStatusTicketItem.js");require("./getMultiProductSubProductsTicketItems.js");require("../toString-b771abdf.js");require("../isObjectLike-963267e9.js");require("../_baseIteratee-374c60ca.js");require("../_getTag-3d3032da.js");require("../isObject-361bd834.js");require("../_baseIsEqual-7e335f42.js");require("../identity-58f9497d.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;
|
|
@@ -3,11 +3,12 @@ import s from "./getCheckOrderMinimumStatusTicketItem.mjs";
|
|
|
3
3
|
import "./getMultiProductSubProductsTicketItems.mjs";
|
|
4
4
|
import "../toString-ce418705.mjs";
|
|
5
5
|
import "../isObjectLike-54341556.mjs";
|
|
6
|
-
import "../_baseIteratee-
|
|
7
|
-
import "../_getTag-
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
|
|
6
|
+
import "../_baseIteratee-5fbe491c.mjs";
|
|
7
|
+
import "../_getTag-ebc0f90e.mjs";
|
|
8
|
+
import "../isObject-b8638513.mjs";
|
|
9
|
+
import "../_baseIsEqual-4ee44a4c.mjs";
|
|
10
|
+
import "../identity-41198897.mjs";
|
|
11
|
+
function I(m) {
|
|
11
12
|
return m.reduce(
|
|
12
13
|
(t, e) => {
|
|
13
14
|
const r = s(e);
|
|
@@ -29,5 +30,5 @@ function y(m) {
|
|
|
29
30
|
);
|
|
30
31
|
}
|
|
31
32
|
export {
|
|
32
|
-
|
|
33
|
+
I as default
|
|
33
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const I=require("../toString-b771abdf.js"),g=require("../_baseIteratee-
|
|
1
|
+
"use strict";const I=require("../toString-b771abdf.js"),g=require("../_baseIteratee-374c60ca.js"),q=require("../identity-58f9497d.js"),P=require("./getMultiProductSubProductsTicketItems.js");require("../isObjectLike-963267e9.js");require("../_getTag-3d3032da.js");require("../isObject-361bd834.js");require("../_baseIsEqual-7e335f42.js");function f(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&&!I.isSymbol(e):n(e,o)))var o=e,i=c}return i}function b(t,s){return t<s}function a(t,s){return t&&t.length?f(t,g.baseIteratee(s),b):void 0}function S(t){return t&&t.length?f(t,q.identity,b):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:l,status:h}=i,d=[...e[l].map(k=>k.status)];c&&d.push(h);const m=S(d);return m!==void 0?{...i,status:m}:i});return a(o,"status")}return a(n,"status")}module.exports=T;
|
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import { i as k } from "../toString-ce418705.mjs";
|
|
2
|
-
import { b as I } from "../_baseIteratee-
|
|
3
|
-
import { i as g } from "../identity-
|
|
2
|
+
import { b as I } from "../_baseIteratee-5fbe491c.mjs";
|
|
3
|
+
import { i as g } from "../identity-41198897.mjs";
|
|
4
4
|
import P from "./getMultiProductSubProductsTicketItems.mjs";
|
|
5
5
|
import "../isObjectLike-54341556.mjs";
|
|
6
|
-
import "../_getTag-
|
|
7
|
-
import "../
|
|
8
|
-
|
|
6
|
+
import "../_getTag-ebc0f90e.mjs";
|
|
7
|
+
import "../isObject-b8638513.mjs";
|
|
8
|
+
import "../_baseIsEqual-4ee44a4c.mjs";
|
|
9
|
+
function f(t, i, n) {
|
|
9
10
|
for (var u = -1, m = t.length; ++u < m; ) {
|
|
10
|
-
var o = t[u], s =
|
|
11
|
+
var o = t[u], s = i(o);
|
|
11
12
|
if (s != null && (c === void 0 ? s === s && !k(s) : n(s, c)))
|
|
12
|
-
var c = s,
|
|
13
|
+
var c = s, e = o;
|
|
13
14
|
}
|
|
14
|
-
return
|
|
15
|
+
return e;
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
-
return t <
|
|
17
|
+
function p(t, i) {
|
|
18
|
+
return t < i;
|
|
18
19
|
}
|
|
19
|
-
function a(t,
|
|
20
|
-
return t && t.length ? f(t, I(
|
|
20
|
+
function a(t, i) {
|
|
21
|
+
return t && t.length ? f(t, I(i), p) : void 0;
|
|
21
22
|
}
|
|
22
23
|
function T(t) {
|
|
23
|
-
return t && t.length ? f(t, g,
|
|
24
|
+
return t && t.length ? f(t, g, p) : void 0;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
const { items:
|
|
26
|
+
function U(t) {
|
|
27
|
+
const { items: i, ticketItems: n, modifications: u } = t, m = i.length > 0, o = u.length > 0;
|
|
27
28
|
if (m) {
|
|
28
|
-
const s = P(t), c = n.map((
|
|
29
|
-
const { ticketId:
|
|
29
|
+
const s = P(t), c = n.map((e) => {
|
|
30
|
+
const { ticketId: l, status: b } = e, d = [...s[l].map(
|
|
30
31
|
(h) => h.status
|
|
31
32
|
)];
|
|
32
33
|
o && d.push(b);
|
|
33
34
|
const r = T(d);
|
|
34
|
-
return r !== void 0 ? { ...
|
|
35
|
+
return r !== void 0 ? { ...e, status: r } : e;
|
|
35
36
|
});
|
|
36
37
|
return a(
|
|
37
38
|
c,
|
|
@@ -41,5 +42,5 @@ function O(t) {
|
|
|
41
42
|
return a(n, "status");
|
|
42
43
|
}
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
+
U as default
|
|
45
46
|
};
|
package/order/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getCheckOrderItemsMappedByTicketItemStatus.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getCheckOrderItemsMappedByTicketItemStatus.js"),r=require("./getCheckOrderMinimumStatusTicketItem.js"),t=require("./getMultiProductSubProductsTicketItems.js");require("@ancon/wildcat-types");require("../toString-b771abdf.js");require("../isObjectLike-963267e9.js");require("../_baseIteratee-374c60ca.js");require("../_getTag-3d3032da.js");require("../isObject-361bd834.js");require("../_baseIsEqual-7e335f42.js");require("../identity-58f9497d.js");exports.getCheckOrderItemsMappedByTicketItemStatus=e;exports.getCheckOrderMinimumStatusTicketItem=r;exports.getMultiProductSubProductsTicketItems=t;
|
package/order/index.mjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
1
|
+
import { default as s } from "./getCheckOrderItemsMappedByTicketItemStatus.mjs";
|
|
2
|
+
import { default as f } from "./getCheckOrderMinimumStatusTicketItem.mjs";
|
|
3
|
+
import { default as l } from "./getMultiProductSubProductsTicketItems.mjs";
|
|
4
4
|
import "@ancon/wildcat-types";
|
|
5
5
|
import "../toString-ce418705.mjs";
|
|
6
6
|
import "../isObjectLike-54341556.mjs";
|
|
7
|
-
import "../_baseIteratee-
|
|
8
|
-
import "../_getTag-
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
7
|
+
import "../_baseIteratee-5fbe491c.mjs";
|
|
8
|
+
import "../_getTag-ebc0f90e.mjs";
|
|
9
|
+
import "../isObject-b8638513.mjs";
|
|
10
|
+
import "../_baseIsEqual-4ee44a4c.mjs";
|
|
11
|
+
import "../identity-41198897.mjs";
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
s as getCheckOrderItemsMappedByTicketItemStatus,
|
|
14
|
+
f as getCheckOrderMinimumStatusTicketItem,
|
|
15
|
+
l as getMultiProductSubProductsTicketItems
|
|
15
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("moment"),m=require("./getOutletTodayOpeningTimes.js");require("../_baseIteratee-
|
|
1
|
+
"use strict";const r=require("moment"),m=require("./getOutletTodayOpeningTimes.js");require("../_baseIteratee-374c60ca.js");require("../_getTag-3d3032da.js");require("../isObjectLike-963267e9.js");require("../isObject-361bd834.js");require("../_baseIsEqual-7e335f42.js");require("../identity-58f9497d.js");require("../toString-b771abdf.js");require("../noop-7ea3b37b.js");require("./getListOutletOpeningHoursTable.js");require("@ancon/wildcat-types");require("../shared/isWithinFlag.js");require("../shared/generateId.js");require("react");require("../time/getTimeSpanParts.js");require("../date/createLocalTimezoneMoment.js");require("../date/convertToLocalTimezone.js");require("../date/getTimezoneUtcOffsetDifference.js");function a(s,q){const o=r(),i=m(s);if(i){const u=i.reduce((e,t)=>{const d=r(t.start),n=r(t.end);return o.isBetween(d,n)&&(!e||n.isAfter(r(e.end)))?t:e},void 0);if(u){const e=r(u.end).calendar({sameDay:"LT",sameElse:"ddd LT"});return q("untilTime",{time:e})||""}}}module.exports=a;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import r from "moment";
|
|
2
2
|
import a from "./getOutletTodayOpeningTimes.mjs";
|
|
3
|
-
import "../_baseIteratee-
|
|
4
|
-
import "../_getTag-
|
|
3
|
+
import "../_baseIteratee-5fbe491c.mjs";
|
|
4
|
+
import "../_getTag-ebc0f90e.mjs";
|
|
5
5
|
import "../isObjectLike-54341556.mjs";
|
|
6
|
-
import "../
|
|
7
|
-
import "../
|
|
6
|
+
import "../isObject-b8638513.mjs";
|
|
7
|
+
import "../_baseIsEqual-4ee44a4c.mjs";
|
|
8
|
+
import "../identity-41198897.mjs";
|
|
8
9
|
import "../toString-ce418705.mjs";
|
|
9
10
|
import "../noop-378485d5.mjs";
|
|
10
11
|
import "./getListOutletOpeningHoursTable.mjs";
|
|
@@ -16,22 +17,22 @@ import "../time/getTimeSpanParts.mjs";
|
|
|
16
17
|
import "../date/createLocalTimezoneMoment.mjs";
|
|
17
18
|
import "../date/convertToLocalTimezone.mjs";
|
|
18
19
|
import "../date/getTimezoneUtcOffsetDifference.mjs";
|
|
19
|
-
function
|
|
20
|
-
const
|
|
20
|
+
function b(n, p) {
|
|
21
|
+
const s = r(), i = a(n);
|
|
21
22
|
if (i) {
|
|
22
23
|
const o = i.reduce((t, e) => {
|
|
23
24
|
const d = r(e.start), m = r(e.end);
|
|
24
|
-
return
|
|
25
|
+
return s.isBetween(d, m) && (!t || m.isAfter(r(t.end))) ? e : t;
|
|
25
26
|
}, void 0);
|
|
26
27
|
if (o) {
|
|
27
28
|
const t = r(o.end).calendar({
|
|
28
29
|
sameDay: "LT",
|
|
29
30
|
sameElse: "ddd LT"
|
|
30
31
|
});
|
|
31
|
-
return
|
|
32
|
+
return p("untilTime", { time: t }) || "";
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
b as default
|
|
37
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const I=require("moment"),b=require("../_baseIteratee-
|
|
1
|
+
"use strict";const I=require("moment"),b=require("../_baseIteratee-374c60ca.js"),q=require("../_baseIsEqual-7e335f42.js"),g=require("../_getTag-3d3032da.js"),T=require("../noop-7ea3b37b.js"),w=require("./getListOutletOpeningHoursTable.js");require("../isObject-361bd834.js");require("../identity-58f9497d.js");require("../isObjectLike-963267e9.js");require("../toString-b771abdf.js");require("@ancon/wildcat-types");require("../shared/isWithinFlag.js");require("../shared/generateId.js");require("react");require("../time/getTimeSpanParts.js");require("../date/createLocalTimezoneMoment.js");require("../date/convertToLocalTimezone.js");require("../date/getTimezoneUtcOffsetDifference.js");function p(e,n,t,r){for(var u=e.length,i=t+(r?1:-1);r?i--:++i<u;)if(n(e[i],i,e))return i;return-1}function O(e){return e!==e}function S(e,n,t){for(var r=t-1,u=e.length;++r<u;)if(e[r]===n)return r;return-1}function x(e,n,t){return n===n?S(e,n,t):p(e,O,t)}function _(e,n){var t=e==null?0:e.length;return!!t&&x(e,n,0)>-1}function a(e,n,t){for(var r=-1,u=e==null?0:e.length;++r<u;)if(t(n,e[r]))return!0;return!1}var A=1/0,H=g.Set&&1/q.setToArray(new g.Set([,-0]))[1]==A?function(e){return new g.Set(e)}:T.noop;const N=H;var W=200;function k(e,n,t){var r=-1,u=_,i=e.length,c=!0,o=[],s=o;if(t)c=!1,u=a;else if(i>=W){var h=n?null:N(e);if(h)return q.setToArray(h);c=!1,u=q.cacheHas,s=new q.SetCache}else s=n?[]:o;e:for(;++r<i;){var l=e[r],f=n?n(l):l;if(l=t||l!==0?l:0,c&&f===f){for(var d=s.length;d--;)if(s[d]===f)continue e;n&&s.push(f),o.push(l)}else u(s,f,t)||(s!==o&&s.push(f),o.push(l))}return o}function E(e,n){return e&&e.length?k(e,b.baseIteratee(n)):[]}function $(e){const n=w(e),r=I().isoWeekday(),u=n.reduce((i,{openingHours:c})=>{var s;const o=(s=c.find(h=>h.isoWeekday===r))==null?void 0:s.open;return o&&i.push(...o),i},[]);return u?E(u,i=>`${i.start}-${i.end}`):null}module.exports=$;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import d from "moment";
|
|
2
|
-
import { b as I } from "../_baseIteratee-
|
|
3
|
-
import { s as g, S as b, c as w } from "../_baseIsEqual-
|
|
4
|
-
import { S as m } from "../_getTag-
|
|
2
|
+
import { b as I } from "../_baseIteratee-5fbe491c.mjs";
|
|
3
|
+
import { s as g, S as b, c as w } from "../_baseIsEqual-4ee44a4c.mjs";
|
|
4
|
+
import { S as m } from "../_getTag-ebc0f90e.mjs";
|
|
5
5
|
import { n as a } from "../noop-378485d5.mjs";
|
|
6
6
|
import O from "./getListOutletOpeningHoursTable.mjs";
|
|
7
|
-
import "../
|
|
7
|
+
import "../isObject-b8638513.mjs";
|
|
8
|
+
import "../identity-41198897.mjs";
|
|
8
9
|
import "../isObjectLike-54341556.mjs";
|
|
9
10
|
import "../toString-ce418705.mjs";
|
|
10
11
|
import "@ancon/wildcat-types";
|
|
@@ -75,7 +76,7 @@ function C(n, t, e) {
|
|
|
75
76
|
function E(n, t) {
|
|
76
77
|
return n && n.length ? C(n, I(t)) : [];
|
|
77
78
|
}
|
|
78
|
-
function
|
|
79
|
+
function Q(n) {
|
|
79
80
|
const t = O(n), i = d().isoWeekday(), o = t.reduce(
|
|
80
81
|
(r, { openingHours: h }) => {
|
|
81
82
|
var s;
|
|
@@ -89,5 +90,5 @@ function P(n) {
|
|
|
89
90
|
return o ? E(o, (r) => `${r.start}-${r.end}`) : null;
|
|
90
91
|
}
|
|
91
92
|
export {
|
|
92
|
-
|
|
93
|
+
Q as default
|
|
93
94
|
};
|
package/outlet/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import getOutletOfflineOrderFormats from './getOutletOfflineOrderFormats';
|
|
|
5
5
|
import getOutletAvailableOrderFormats from './getOutletAvailableOrderFormats';
|
|
6
6
|
import getOutletFormattedDistance from './getOutletFormattedDistance';
|
|
7
7
|
import isOutletAcceptingPreOrders from './isOutletAcceptingPreOrders';
|
|
8
|
+
import isOutletAcceptingPreOrdersWhenClosed from './isOutletAcceptingPreOrdersWhenClosed';
|
|
8
9
|
import getOutletDeliveryFee from './getOutletDeliveryFee';
|
|
9
10
|
import getOutletTodayOpeningTimes from './getOutletTodayOpeningTimes';
|
|
10
11
|
import getOutletOrderFormats from './getOutletOrderFormats';
|
|
@@ -30,4 +31,4 @@ import isAOTippingEnabledForOrderFormat from './isAOTippingEnabledForOrderFormat
|
|
|
30
31
|
import isMenuTreeHierarchyProductAvailable from './isMenuTreeHierarchyProductAvailable';
|
|
31
32
|
import getOutletMenuProductsSortCriteria from './getOutletMenuProductsSortCriteria';
|
|
32
33
|
import getOutletNextServiceTimeOffset from './getOutletNextServiceTimeOffset';
|
|
33
|
-
export { getListOutletOpeningHoursTable, getOutletTagInformation, getOutletAvailabilityInfo, getOutletOfflineOrderFormats, getOutletAvailableOrderFormats, getOutletFormattedDistance, isOutletAcceptingPreOrders, getOutletDeliveryFee, getOutletTodayOpeningTimes, getOutletOrderFormats, serviceDateTimesFromOpeningHours, getPickerIntervalsForDay, getServiceIntervalRange, getServiceIntervalsForOrderFormat, getOutletFormattedAddress, getPartitionedOutletsList, getOutletPickerTimesForWeek, getOutletPickerTimesForDay, getOutletNextReadyToOrderTime, getOutletOrderPreparationTime, getStructuredOutletAddress, getOutletNextOpeningTimeText, getOutletCurrentClosingTimeText, getOutletNextOpeningTagInformation, getOutletCurrentAvailabilityInfo, getExpressAvailableOrderFormats, getExpressNextAvailabilityShiftTime, getOrderFormatAOTipSettings, isAOTippingEnabledForOrderFormat, isMenuTreeHierarchyProductAvailable, getOutletMenuProductsSortCriteria, getOutletNextServiceTimeOffset, };
|
|
34
|
+
export { getListOutletOpeningHoursTable, getOutletTagInformation, getOutletAvailabilityInfo, getOutletOfflineOrderFormats, getOutletAvailableOrderFormats, getOutletFormattedDistance, isOutletAcceptingPreOrders, isOutletAcceptingPreOrdersWhenClosed, getOutletDeliveryFee, getOutletTodayOpeningTimes, getOutletOrderFormats, serviceDateTimesFromOpeningHours, getPickerIntervalsForDay, getServiceIntervalRange, getServiceIntervalsForOrderFormat, getOutletFormattedAddress, getPartitionedOutletsList, getOutletPickerTimesForWeek, getOutletPickerTimesForDay, getOutletNextReadyToOrderTime, getOutletOrderPreparationTime, getStructuredOutletAddress, getOutletNextOpeningTimeText, getOutletCurrentClosingTimeText, getOutletNextOpeningTagInformation, getOutletCurrentAvailabilityInfo, getExpressAvailableOrderFormats, getExpressNextAvailabilityShiftTime, getOrderFormatAOTipSettings, isAOTippingEnabledForOrderFormat, isMenuTreeHierarchyProductAvailable, getOutletMenuProductsSortCriteria, getOutletNextServiceTimeOffset, };
|
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"),i=require("./getOutletOfflineOrderFormats.js"),u=require("./getOutletAvailableOrderFormats.js"),o=require("./getOutletFormattedDistance.js"),l=require("./isOutletAcceptingPreOrders.js"),s=require("./
|
|
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("./isOutletAcceptingPreOrdersWhenClosed.js"),n=require("./getOutletDeliveryFee.js"),O=require("./getOutletTodayOpeningTimes.js"),a=require("./getOutletOrderFormats.js"),g=require("./serviceDateTimesFromOpeningHours.js"),q=require("./getPickerIntervalsForDay.js"),c=require("./getServiceIntervalRange.js"),d=require("./getServiceIntervalsForOrderFormat.js"),m=require("./getOutletFormattedAddress.js"),T=require("./getPartitionedOutletsList.js"),_=require("./getOutletPickerTimesForWeek.js"),F=require("./getOutletPickerTimesForDay.js"),v=require("./getOutletOrderPrepTime.js"),p=require("./getStructuredOutletAddress.js"),A=require("./getOutletNextOpeningTimeText.js"),f=require("./getOutletCurrentClosingTimeText.js"),y=require("./getOutletNextReadyToOrderTime.js"),P=require("./getOutletNextOpeningTagInformation.js"),b=require("./getOutletCurrentAvailabilityInfo.js"),x=require("./getExpressAvailableOrderFormats.js"),S=require("./getExpressNextAvailabilityShiftTime.js"),I=require("./getOrderFormatAOTipSettings.js"),C=require("./isAOTippingEnabledForOrderFormat.js"),D=require("./isMenuTreeHierarchyProductAvailable.js"),N=require("./getOutletMenuProductsSortCriteria.js"),k=require("./getOutletNextServiceTimeOffset.js");require("moment");require("@ancon/wildcat-types");require("../shared/isWithinFlag.js");require("../shared/generateId.js");require("react");require("../time/getTimeSpanParts.js");require("../date/createLocalTimezoneMoment.js");require("../date/convertToLocalTimezone.js");require("../date/getTimezoneUtcOffsetDifference.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getTimezoneAdjustedServiceInterval.js");require("../date/convertToSpecificTimezone.js");require("./getServiceIntervalTimeSpanMoment.js");require("./searchNextOpeningMoment.js");require("../_baseIteratee-374c60ca.js");require("../_getTag-3d3032da.js");require("../isObjectLike-963267e9.js");require("../isObject-361bd834.js");require("../_baseIsEqual-7e335f42.js");require("../identity-58f9497d.js");require("../toString-b771abdf.js");require("../noop-7ea3b37b.js");require("../_baseSlice-e1b41ceb.js");require("../shared/constants.js");require("../time/toMinutes.js");require("../time/getNextTenthMinute.js");require("../string/truncate.js");require("./types.js");require("../date/isDSTShiftPresentInRange.js");require("./getSettingsForOrderFormat.js");require("./getServiceIntervalStart.js");require("./generatePickerTimesForDay.js");require("./getServiceIntervalEnd.js");require("./hoursAndMinutesToMinutes.js");require("./getExpressServiceIntervalStart.js");require("./getExpressServiceIntervalEnd.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.isOutletAcceptingPreOrdersWhenClosed=s;exports.getOutletDeliveryFee=n;exports.getOutletTodayOpeningTimes=O;exports.getOutletOrderFormats=a;exports.serviceDateTimesFromOpeningHours=g;exports.getPickerIntervalsForDay=q;exports.getServiceIntervalRange=c;exports.getServiceIntervalsForOrderFormat=d;exports.getOutletFormattedAddress=m;exports.getPartitionedOutletsList=T;exports.getOutletPickerTimesForWeek=_;exports.getOutletPickerTimesForDay=F;exports.getOutletOrderPreparationTime=v;exports.getStructuredOutletAddress=p;exports.getOutletNextOpeningTimeText=A;exports.getOutletCurrentClosingTimeText=f;exports.getOutletNextReadyToOrderTime=y;exports.getOutletNextOpeningTagInformation=P;exports.getOutletCurrentAvailabilityInfo=b;exports.getExpressAvailableOrderFormats=x;exports.getExpressNextAvailabilityShiftTime=S;exports.getOrderFormatAOTipSettings=I.default;exports.isAOTippingEnabledForOrderFormat=C;exports.isMenuTreeHierarchyProductAvailable=D;exports.getOutletMenuProductsSortCriteria=N;exports.getOutletNextServiceTimeOffset=k;
|
package/outlet/index.mjs
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as Ft } from "./
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as Nt } from "./
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as Ht } from "./
|
|
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
|
|
1
|
+
import { default as q } from "./getListOutletOpeningHoursTable.mjs";
|
|
2
|
+
import { default as z } from "./getOutletTagInformation.mjs";
|
|
3
|
+
import { default as G } from "./getOutletAvailabilityInfo.mjs";
|
|
4
|
+
import { default as K } from "./getOutletOfflineOrderFormats.mjs";
|
|
5
|
+
import { default as U } from "./getOutletAvailableOrderFormats.mjs";
|
|
6
|
+
import { default as X } from "./getOutletFormattedDistance.mjs";
|
|
7
|
+
import { default as Z } from "./isOutletAcceptingPreOrders.mjs";
|
|
8
|
+
import { default as $ } from "./isOutletAcceptingPreOrdersWhenClosed.mjs";
|
|
9
|
+
import { default as et } from "./getOutletDeliveryFee.mjs";
|
|
10
|
+
import { default as ot } from "./getOutletTodayOpeningTimes.mjs";
|
|
11
|
+
import { default as it } from "./getOutletOrderFormats.mjs";
|
|
12
|
+
import { default as pt } from "./serviceDateTimesFromOpeningHours.mjs";
|
|
13
|
+
import { default as ft } from "./getPickerIntervalsForDay.mjs";
|
|
14
|
+
import { default as ut } from "./getServiceIntervalRange.mjs";
|
|
15
|
+
import { default as Ot } from "./getServiceIntervalsForOrderFormat.mjs";
|
|
16
|
+
import { default as gt } from "./getOutletFormattedAddress.mjs";
|
|
17
|
+
import { default as Tt } from "./getPartitionedOutletsList.mjs";
|
|
18
|
+
import { default as Ft } from "./getOutletPickerTimesForWeek.mjs";
|
|
19
|
+
import { default as At } from "./getOutletPickerTimesForDay.mjs";
|
|
20
|
+
import { default as Pt } from "./getOutletOrderPrepTime.mjs";
|
|
21
|
+
import { default as It } from "./getStructuredOutletAddress.mjs";
|
|
22
|
+
import { default as Ct } from "./getOutletNextOpeningTimeText.mjs";
|
|
23
|
+
import { default as Nt } from "./getOutletCurrentClosingTimeText.mjs";
|
|
24
|
+
import { default as ht } from "./getOutletNextReadyToOrderTime.mjs";
|
|
25
|
+
import { default as Ht } from "./getOutletNextOpeningTagInformation.mjs";
|
|
26
|
+
import { default as Mt } from "./getOutletCurrentAvailabilityInfo.mjs";
|
|
27
|
+
import { default as Wt } from "./getExpressAvailableOrderFormats.mjs";
|
|
28
|
+
import { default as qt } from "./getExpressNextAvailabilityShiftTime.mjs";
|
|
29
|
+
import { default as zt } from "./getOrderFormatAOTipSettings.mjs";
|
|
30
|
+
import { default as Gt } from "./isAOTippingEnabledForOrderFormat.mjs";
|
|
31
|
+
import { default as Kt } from "./isMenuTreeHierarchyProductAvailable.mjs";
|
|
32
|
+
import { default as Ut } from "./getOutletMenuProductsSortCriteria.mjs";
|
|
33
|
+
import { default as Xt } from "./getOutletNextServiceTimeOffset.mjs";
|
|
33
34
|
import "moment";
|
|
34
35
|
import "@ancon/wildcat-types";
|
|
35
36
|
import "../shared/isWithinFlag.mjs";
|
|
@@ -45,11 +46,12 @@ import "./getTimezoneAdjustedServiceInterval.mjs";
|
|
|
45
46
|
import "../date/convertToSpecificTimezone.mjs";
|
|
46
47
|
import "./getServiceIntervalTimeSpanMoment.mjs";
|
|
47
48
|
import "./searchNextOpeningMoment.mjs";
|
|
48
|
-
import "../_baseIteratee-
|
|
49
|
-
import "../_getTag-
|
|
49
|
+
import "../_baseIteratee-5fbe491c.mjs";
|
|
50
|
+
import "../_getTag-ebc0f90e.mjs";
|
|
50
51
|
import "../isObjectLike-54341556.mjs";
|
|
51
|
-
import "../
|
|
52
|
-
import "../
|
|
52
|
+
import "../isObject-b8638513.mjs";
|
|
53
|
+
import "../_baseIsEqual-4ee44a4c.mjs";
|
|
54
|
+
import "../identity-41198897.mjs";
|
|
53
55
|
import "../toString-ce418705.mjs";
|
|
54
56
|
import "../noop-378485d5.mjs";
|
|
55
57
|
import "../_baseSlice-4d543985.mjs";
|
|
@@ -67,36 +69,37 @@ import "./hoursAndMinutesToMinutes.mjs";
|
|
|
67
69
|
import "./getExpressServiceIntervalStart.mjs";
|
|
68
70
|
import "./getExpressServiceIntervalEnd.mjs";
|
|
69
71
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
72
|
+
Wt as getExpressAvailableOrderFormats,
|
|
73
|
+
qt as getExpressNextAvailabilityShiftTime,
|
|
74
|
+
q as getListOutletOpeningHoursTable,
|
|
75
|
+
zt as getOrderFormatAOTipSettings,
|
|
76
|
+
G as getOutletAvailabilityInfo,
|
|
77
|
+
U as getOutletAvailableOrderFormats,
|
|
78
|
+
Mt as getOutletCurrentAvailabilityInfo,
|
|
79
|
+
Nt as getOutletCurrentClosingTimeText,
|
|
80
|
+
et as getOutletDeliveryFee,
|
|
81
|
+
gt as getOutletFormattedAddress,
|
|
82
|
+
X as getOutletFormattedDistance,
|
|
83
|
+
Ut as getOutletMenuProductsSortCriteria,
|
|
84
|
+
Ht as getOutletNextOpeningTagInformation,
|
|
85
|
+
Ct as getOutletNextOpeningTimeText,
|
|
86
|
+
ht as getOutletNextReadyToOrderTime,
|
|
87
|
+
Xt as getOutletNextServiceTimeOffset,
|
|
88
|
+
K as getOutletOfflineOrderFormats,
|
|
89
|
+
it as getOutletOrderFormats,
|
|
90
|
+
Pt as getOutletOrderPreparationTime,
|
|
91
|
+
At as getOutletPickerTimesForDay,
|
|
92
|
+
Ft as getOutletPickerTimesForWeek,
|
|
93
|
+
z as getOutletTagInformation,
|
|
94
|
+
ot as getOutletTodayOpeningTimes,
|
|
95
|
+
Tt as getPartitionedOutletsList,
|
|
96
|
+
ft as getPickerIntervalsForDay,
|
|
97
|
+
ut as getServiceIntervalRange,
|
|
98
|
+
Ot as getServiceIntervalsForOrderFormat,
|
|
99
|
+
It as getStructuredOutletAddress,
|
|
100
|
+
Gt as isAOTippingEnabledForOrderFormat,
|
|
101
|
+
Kt as isMenuTreeHierarchyProductAvailable,
|
|
102
|
+
Z as isOutletAcceptingPreOrders,
|
|
103
|
+
$ as isOutletAcceptingPreOrdersWhenClosed,
|
|
104
|
+
pt as serviceDateTimesFromOpeningHours
|
|
102
105
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("@ancon/wildcat-types"),n=require("./isOutletAcceptingPreOrders.js");function o(e){if(e){const{orderFormatSettings:t,state:r}=e,s=r===i.OutletState.Closed,c=n(t||[]);return s&&c}return!1}module.exports=o;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OutletState as i } from "@ancon/wildcat-types";
|
|
2
|
+
import n from "./isOutletAcceptingPreOrders.mjs";
|
|
3
|
+
function l(t) {
|
|
4
|
+
if (t) {
|
|
5
|
+
const { orderFormatSettings: e, state: r } = t, s = r === i.Closed, o = n(
|
|
6
|
+
e || []
|
|
7
|
+
);
|
|
8
|
+
return s && o;
|
|
9
|
+
}
|
|
10
|
+
return !1;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
l as default
|
|
14
|
+
};
|