@ancon/wildcat-utils 1.17.3 → 1.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.mjs +46 -44
- package/outlet/getOutletOrderFormats.d.ts +7 -0
- package/outlet/getOutletOrderFormats.js +1 -0
- package/outlet/getOutletOrderFormats.mjs +16 -0
- package/outlet/index.d.ts +2 -1
- package/outlet/index.js +1 -1
- package/outlet/index.mjs +2 -0
- package/package.json +6 -1
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/enums.js"),r=require("./shared/isWithinFlag.js"),t=require("./shared/generateId.js"),i=require("./outlet/getListOutletOpeningHoursTable.js"),n=require("./outlet/getOutletTagInformation.js"),o=require("./outlet/getOutletAvailabilityInfo.js"),s=require("./outlet/getOutletOfflineOrderFormats.js"),u=require("./outlet/getOutletAvailableOrderFormats.js"),l=require("./outlet/getOutletFormattedDistance.js"),a=require("./outlet/isOutletAcceptingPreOrders.js"),g=require("./outlet/getOutletDeliveryFee.js"),c=require("./outlet/getOutletTodayOpeningTimes.js"),q=require("./versioning/isVersionALessThanB.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/enums.js"),r=require("./shared/isWithinFlag.js"),t=require("./shared/generateId.js"),i=require("./outlet/getListOutletOpeningHoursTable.js"),n=require("./outlet/getOutletTagInformation.js"),o=require("./outlet/getOutletAvailabilityInfo.js"),s=require("./outlet/getOutletOfflineOrderFormats.js"),u=require("./outlet/getOutletAvailableOrderFormats.js"),l=require("./outlet/getOutletFormattedDistance.js"),a=require("./outlet/isOutletAcceptingPreOrders.js"),g=require("./outlet/getOutletDeliveryFee.js"),c=require("./outlet/getOutletTodayOpeningTimes.js"),q=require("./outlet/getOutletOrderFormats.js"),d=require("./versioning/isVersionALessThanB.js"),O=require("./versioning/cleanVersionString.js"),_=require("./api/getUrlAndParams.js"),m=require("./api/getEndpointWithVersion.js"),p=require("./api/generateBackoffWithEqualJitter.js"),F=require("./string/slugify.js"),f=require("./string/truncate.js"),v=require("./color/lighten.js"),y=require("./color/brighten.js"),T=require("./color/darken.js"),h=require("./color/isDarkBackground.js"),P=require("./user/getFullName.js"),A=require("./user/getFullAddressString.js"),I=require("./logger/Logger.js"),k=require("./logger/types.js"),S=require("./logger/sanitizeAsStringDict.js"),V=require("./printing/getPrinterType.js"),b=require("./printing/isValidPrinter.js"),D=require("./printing/isValidNetworkPrinter.js"),L=require("./printing/isValidStarCloudPrinter.js"),W=require("./printing/isTerminalPrinter.js"),B=require("./number/randomIntFromInterval.js");require("moment");require("@ancon/wildcat-types");require("./outlet/types.js");require("./outlet/constants.js");require("./outlet/getOutletCurrentActiveOperatingHour.js");require("./outlet/getMomentFromDateAndTimeString.js");require("./outlet/searchNextOpeningMoment.js");require("lodash");require("compare-versions");require("tinycolor2");require("@ancon/wildcat-printing");exports.DayOfWeek=e.DayOfWeek;exports.IntervalState=e.IntervalState;exports.IntervalType=e.IntervalType;exports.OrderFormat=e.OrderFormat;exports.isWithinFlag=r;exports.generateId=t;exports.getListOutletOpeningHoursTable=i;exports.getOutletTagInformation=n.default;exports.getOutletAvailabilityInfo=o.default;exports.getOutletOfflineOrderFormats=s;exports.getOutletAvailableOrderFormats=u;exports.getOutletFormattedDistance=l;exports.isOutletAcceptingPreOrders=a;exports.getOutletDeliveryFee=g;exports.getOutletTodayOpeningTimes=c;exports.getOutletOrderFormats=q;exports.isVersionALessThanB=d;exports.cleanVersionString=O;exports.getUrlAndParams=_;exports.getEndpointWithVersion=m;exports.generateBackoffWithEqualJitter=p;exports.slugify=F;exports.truncate=f;exports.lighten=v;exports.brighten=y;exports.darken=T;exports.isDarkBackground=h;exports.getFullName=P;exports.getFullAddressString=A;exports.Logger=I;exports.LogLevel=k.LogLevel;exports.sanitizeAsStringDict=S;exports.getPrinterType=V;exports.isValidPrinter=b;exports.isValidNetworkPrinter=D;exports.isValidStarCloudPrinter=L;exports.isTerminalPrinter=W;exports.randomIntFromInterval=B;
|
package/index.mjs
CHANGED
|
@@ -10,28 +10,29 @@ import { default as W } from "./outlet/getOutletFormattedDistance.mjs";
|
|
|
10
10
|
import { default as E } from "./outlet/isOutletAcceptingPreOrders.mjs";
|
|
11
11
|
import { default as q } from "./outlet/getOutletDeliveryFee.mjs";
|
|
12
12
|
import { default as z } from "./outlet/getOutletTodayOpeningTimes.mjs";
|
|
13
|
-
import { default as H } from "./
|
|
14
|
-
import { default as U } from "./versioning/
|
|
15
|
-
import { default as G } from "./
|
|
16
|
-
import { default as M } from "./api/
|
|
17
|
-
import { default as R } from "./api/
|
|
18
|
-
import { default as Y } from "./
|
|
19
|
-
import { default as _ } from "./string/
|
|
20
|
-
import { default as tt } from "./
|
|
21
|
-
import { default as rt } from "./color/
|
|
22
|
-
import { default as ot } from "./color/
|
|
23
|
-
import { default as lt } from "./color/
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as ut } from "./
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { default as ct } from "./
|
|
30
|
-
import { default as vt } from "./printing/
|
|
31
|
-
import { default as At } from "./printing/
|
|
32
|
-
import { default as Pt } from "./printing/
|
|
33
|
-
import { default as kt } from "./printing/
|
|
34
|
-
import { default as Dt } from "./
|
|
13
|
+
import { default as H } from "./outlet/getOutletOrderFormats.mjs";
|
|
14
|
+
import { default as U } from "./versioning/isVersionALessThanB.mjs";
|
|
15
|
+
import { default as G } from "./versioning/cleanVersionString.mjs";
|
|
16
|
+
import { default as M } from "./api/getUrlAndParams.mjs";
|
|
17
|
+
import { default as R } from "./api/getEndpointWithVersion.mjs";
|
|
18
|
+
import { default as Y } from "./api/generateBackoffWithEqualJitter.mjs";
|
|
19
|
+
import { default as _ } from "./string/slugify.mjs";
|
|
20
|
+
import { default as tt } from "./string/truncate.mjs";
|
|
21
|
+
import { default as rt } from "./color/lighten.mjs";
|
|
22
|
+
import { default as ot } from "./color/brighten.mjs";
|
|
23
|
+
import { default as lt } from "./color/darken.mjs";
|
|
24
|
+
import { default as it } from "./color/isDarkBackground.mjs";
|
|
25
|
+
import { default as dt } from "./user/getFullName.mjs";
|
|
26
|
+
import { default as ut } from "./user/getFullAddressString.mjs";
|
|
27
|
+
import { default as xt } from "./logger/Logger.mjs";
|
|
28
|
+
import { LogLevel as Ot } from "./logger/types.mjs";
|
|
29
|
+
import { default as ct } from "./logger/sanitizeAsStringDict.mjs";
|
|
30
|
+
import { default as vt } from "./printing/getPrinterType.mjs";
|
|
31
|
+
import { default as At } from "./printing/isValidPrinter.mjs";
|
|
32
|
+
import { default as Pt } from "./printing/isValidNetworkPrinter.mjs";
|
|
33
|
+
import { default as kt } from "./printing/isValidStarCloudPrinter.mjs";
|
|
34
|
+
import { default as Dt } from "./printing/isTerminalPrinter.mjs";
|
|
35
|
+
import { default as St } from "./number/randomIntFromInterval.mjs";
|
|
35
36
|
import "moment";
|
|
36
37
|
import "@ancon/wildcat-types";
|
|
37
38
|
import "./outlet/types.mjs";
|
|
@@ -47,38 +48,39 @@ export {
|
|
|
47
48
|
n as DayOfWeek,
|
|
48
49
|
x as IntervalState,
|
|
49
50
|
g as IntervalType,
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
Ot as LogLevel,
|
|
52
|
+
xt as Logger,
|
|
52
53
|
O as OrderFormat,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
ot as brighten,
|
|
55
|
+
G as cleanVersionString,
|
|
56
|
+
lt as darken,
|
|
57
|
+
Y as generateBackoffWithEqualJitter,
|
|
57
58
|
v as generateId,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
R as getEndpointWithVersion,
|
|
60
|
+
ut as getFullAddressString,
|
|
61
|
+
dt as getFullName,
|
|
61
62
|
A as getListOutletOpeningHoursTable,
|
|
62
63
|
k as getOutletAvailabilityInfo,
|
|
63
64
|
S as getOutletAvailableOrderFormats,
|
|
64
65
|
q as getOutletDeliveryFee,
|
|
65
66
|
W as getOutletFormattedDistance,
|
|
66
67
|
D as getOutletOfflineOrderFormats,
|
|
68
|
+
H as getOutletOrderFormats,
|
|
67
69
|
P as getOutletTagInformation,
|
|
68
70
|
z as getOutletTodayOpeningTimes,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
vt as getPrinterType,
|
|
72
|
+
M as getUrlAndParams,
|
|
73
|
+
it as isDarkBackground,
|
|
72
74
|
E as isOutletAcceptingPreOrders,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
Dt as isTerminalPrinter,
|
|
76
|
+
Pt as isValidNetworkPrinter,
|
|
77
|
+
At as isValidPrinter,
|
|
78
|
+
kt as isValidStarCloudPrinter,
|
|
79
|
+
U as isVersionALessThanB,
|
|
78
80
|
c as isWithinFlag,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
rt as lighten,
|
|
82
|
+
St as randomIntFromInterval,
|
|
83
|
+
ct as sanitizeAsStringDict,
|
|
84
|
+
_ as slugify,
|
|
85
|
+
tt as truncate
|
|
84
86
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OrderFormat, OutletLisItem } from '@ancon/wildcat-types';
|
|
2
|
+
/**
|
|
3
|
+
* Get outlet's available order formats - included pre-order formats
|
|
4
|
+
* @param outlet Outlet list item
|
|
5
|
+
* @returns Array of OrderFormat
|
|
6
|
+
*/
|
|
7
|
+
export default function getOutletOrderFormats(outlet: OutletLisItem): OrderFormat[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("@ancon/wildcat-types"),t=require("./isOutletAcceptingPreOrders.js"),s=require("./getOutletAvailableOrderFormats.js"),i=require("./getOutletOfflineOrderFormats.js");require("./constants.js");function o(r){return r.state===e.OutletState.Closed&&t(r.orderFormatSettings)?i(r.supportedOrderFormats,r.orderFormatSettings):s(r.supportedOrderFormats)}module.exports=o;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OutletState as e } from "@ancon/wildcat-types";
|
|
2
|
+
import t from "./isOutletAcceptingPreOrders.mjs";
|
|
3
|
+
import o from "./getOutletAvailableOrderFormats.mjs";
|
|
4
|
+
import s from "./getOutletOfflineOrderFormats.mjs";
|
|
5
|
+
import "./constants.mjs";
|
|
6
|
+
function p(r) {
|
|
7
|
+
return r.state === e.Closed && t(
|
|
8
|
+
r.orderFormatSettings
|
|
9
|
+
) ? s(
|
|
10
|
+
r.supportedOrderFormats,
|
|
11
|
+
r.orderFormatSettings
|
|
12
|
+
) : o(r.supportedOrderFormats);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
p as default
|
|
16
|
+
};
|
package/outlet/index.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ import getOutletFormattedDistance from './getOutletFormattedDistance';
|
|
|
7
7
|
import isOutletAcceptingPreOrders from './isOutletAcceptingPreOrders';
|
|
8
8
|
import getOutletDeliveryFee from './getOutletDeliveryFee';
|
|
9
9
|
import getOutletTodayOpeningTimes from './getOutletTodayOpeningTimes';
|
|
10
|
-
|
|
10
|
+
import getOutletOrderFormats from './getOutletOrderFormats';
|
|
11
|
+
export { getListOutletOpeningHoursTable, getOutletTagInformation, getOutletAvailabilityInfo, getOutletOfflineOrderFormats, getOutletAvailableOrderFormats, getOutletFormattedDistance, isOutletAcceptingPreOrders, getOutletDeliveryFee, getOutletTodayOpeningTimes, getOutletOrderFormats, };
|
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"),l=require("./getOutletFormattedDistance.js"),o=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"),l=require("./getOutletFormattedDistance.js"),o=require("./isOutletAcceptingPreOrders.js"),O=require("./getOutletDeliveryFee.js"),n=require("./getOutletTodayOpeningTimes.js"),a=require("./getOutletOrderFormats.js");require("moment");require("@ancon/wildcat-types");require("../shared/enums.js");require("../shared/isWithinFlag.js");require("../shared/generateId.js");require("./types.js");require("./constants.js");require("./getOutletCurrentActiveOperatingHour.js");require("./getMomentFromDateAndTimeString.js");require("./searchNextOpeningMoment.js");require("lodash");exports.getListOutletOpeningHoursTable=e;exports.getOutletTagInformation=t.default;exports.getOutletAvailabilityInfo=r.default;exports.getOutletOfflineOrderFormats=u;exports.getOutletAvailableOrderFormats=i;exports.getOutletFormattedDistance=l;exports.isOutletAcceptingPreOrders=o;exports.getOutletDeliveryFee=O;exports.getOutletTodayOpeningTimes=n;exports.getOutletOrderFormats=a;
|
package/outlet/index.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { default as A } from "./getOutletFormattedDistance.mjs";
|
|
|
7
7
|
import { default as I } from "./isOutletAcceptingPreOrders.mjs";
|
|
8
8
|
import { default as L } from "./getOutletDeliveryFee.mjs";
|
|
9
9
|
import { default as h } from "./getOutletTodayOpeningTimes.mjs";
|
|
10
|
+
import { default as k } from "./getOutletOrderFormats.mjs";
|
|
10
11
|
import "moment";
|
|
11
12
|
import "@ancon/wildcat-types";
|
|
12
13
|
import "../shared/enums.mjs";
|
|
@@ -25,6 +26,7 @@ export {
|
|
|
25
26
|
L as getOutletDeliveryFee,
|
|
26
27
|
A as getOutletFormattedDistance,
|
|
27
28
|
b as getOutletOfflineOrderFormats,
|
|
29
|
+
k as getOutletOrderFormats,
|
|
28
30
|
n as getOutletTagInformation,
|
|
29
31
|
h as getOutletTodayOpeningTimes,
|
|
30
32
|
I as isOutletAcceptingPreOrders
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancon/wildcat-utils",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -131,6 +131,11 @@
|
|
|
131
131
|
"require": "./outlet/getOutletOfflineOrderFormats.js",
|
|
132
132
|
"types": "./outlet/getOutletOfflineOrderFormats.d.ts"
|
|
133
133
|
},
|
|
134
|
+
"./outlet/getOutletOrderFormats": {
|
|
135
|
+
"import": "./outlet/getOutletOrderFormats.mjs",
|
|
136
|
+
"require": "./outlet/getOutletOrderFormats.js",
|
|
137
|
+
"types": "./outlet/getOutletOrderFormats.d.ts"
|
|
138
|
+
},
|
|
134
139
|
"./outlet/getOutletTagInformation": {
|
|
135
140
|
"import": "./outlet/getOutletTagInformation.mjs",
|
|
136
141
|
"require": "./outlet/getOutletTagInformation.js",
|