@ancon/wildcat-utils 1.21.5 → 1.22.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/error/createCodedError.d.ts +11 -0
- package/error/createCodedError.js +1 -0
- package/error/createCodedError.mjs +17 -0
- package/error/index.d.ts +4 -0
- package/error/index.js +1 -0
- package/error/index.mjs +6 -0
- package/error/isCodedError.d.ts +7 -0
- package/error/isCodedError.js +1 -0
- package/error/isCodedError.mjs +6 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +48 -40
- package/inventory/getDetailedProductVariantStock.d.ts +2 -0
- package/inventory/getDetailedProductVariantStock.js +1 -0
- package/inventory/getDetailedProductVariantStock.mjs +8 -0
- package/inventory/index.d.ts +3 -1
- package/inventory/index.js +1 -1
- package/inventory/index.mjs +8 -4
- package/inventory/isDetailedProductOutOfStock.js +1 -1
- package/inventory/isDetailedProductOutOfStock.mjs +8 -6
- package/inventory/isDetailedProductOutletStockOutOfStock.d.ts +2 -0
- package/inventory/isDetailedProductOutletStockOutOfStock.js +1 -0
- package/inventory/isDetailedProductOutletStockOutOfStock.mjs +6 -0
- package/inventory/isDetailedProductVariantOutOfStocks.js +1 -1
- package/inventory/isDetailedProductVariantOutOfStocks.mjs +6 -6
- package/package.json +26 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ErrorCode } from '@ancon/wildcat-types';
|
|
2
|
+
/** Client-side generated error */
|
|
3
|
+
declare type CodedError = {
|
|
4
|
+
code: ErrorCode;
|
|
5
|
+
message?: string;
|
|
6
|
+
additionalData: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
/** Create a new client-side generated error */
|
|
9
|
+
declare function createCodedError(err: unknown, code?: ErrorCode, additionalData?: Record<string, unknown>): CodedError;
|
|
10
|
+
export type { CodedError };
|
|
11
|
+
export default createCodedError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(t){return t instanceof Error||typeof t=="object"&&!!(t!=null&&t.message)}function f(t){return typeof(t==null?void 0:t.message)=="string"}function c(t,o,e){if(i(t)){const s=t;return o&&(s.code=o),e&&(s.additionalData=e),s}const n=new Error("Unknown error");return f(t)?(t.message&&(n.message=t.message),n):(typeof t=="string"&&(n.message=t,o&&(n.code=o)),n)}module.exports=c;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function f(n) {
|
|
2
|
+
return n instanceof Error || typeof n == "object" && !!(n != null && n.message);
|
|
3
|
+
}
|
|
4
|
+
function i(n) {
|
|
5
|
+
return typeof (n == null ? void 0 : n.message) == "string";
|
|
6
|
+
}
|
|
7
|
+
function a(n, t, e) {
|
|
8
|
+
if (f(n)) {
|
|
9
|
+
const s = n;
|
|
10
|
+
return t && (s.code = t), e && (s.additionalData = e), s;
|
|
11
|
+
}
|
|
12
|
+
const o = new Error("Unknown error");
|
|
13
|
+
return i(n) ? (n.message && (o.message = n.message), o) : (typeof n == "string" && (o.message = n, t && (o.code = t)), o);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
a as default
|
|
17
|
+
};
|
package/error/index.d.ts
ADDED
package/error/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./createCodedError.js"),e=require("./isCodedError.js");exports.createCodedError=r;exports.isCodedError=e;
|
package/error/index.mjs
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ErrorCode } from '@ancon/wildcat-types';
|
|
2
|
+
import { CodedError } from './createCodedError';
|
|
3
|
+
/** Whether provided error is an `CodedError` */
|
|
4
|
+
declare function isCodedError(error: unknown): error is CodedError;
|
|
5
|
+
/** Whether provided error is an `CodedError` with the provided `code` */
|
|
6
|
+
declare function isCodedError(error: unknown, code: ErrorCode): error is CodedError;
|
|
7
|
+
export default isCodedError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(n,t){return t!=null?n instanceof Error&&n.code===t:n instanceof Error&&n.code!=null}module.exports=i;
|
package/index.d.ts
CHANGED
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"),i=require("./shared/generateId.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/enums.js"),r=require("./shared/isWithinFlag.js"),i=require("./shared/generateId.js"),o=require("./shared/wait.js"),n=require("./outlet/getListOutletOpeningHoursTable.js"),u=require("./outlet/getOutletTagInformation.js"),s=require("./outlet/getOutletAvailabilityInfo.js"),a=require("./outlet/getOutletOfflineOrderFormats.js"),c=require("./outlet/getOutletAvailableOrderFormats.js"),l=require("./outlet/getOutletFormattedDistance.js"),g=require("./outlet/isOutletAcceptingPreOrders.js"),d=require("./outlet/getOutletDeliveryFee.js"),q=require("./outlet/getOutletTodayOpeningTimes.js"),O=require("./outlet/getOutletOrderFormats.js"),_=require("./outlet/serviceDateTimesFromOpeningHours.js"),k=require("./versioning/isVersionALessThanB.js"),m=require("./versioning/cleanVersionString.js"),S=require("./api/getUrlAndParams.js"),y=require("./api/getEndpointWithVersion.js"),f=require("./api/generateBackoffWithEqualJitter.js"),p=require("./string/slugify.js"),P=require("./string/truncate.js"),h=require("./color/lighten.js"),T=require("./color/brighten.js"),v=require("./color/darken.js"),F=require("./color/isDarkBackground.js"),D=require("./user/getFullName.js"),I=require("./user/getFullAddressString.js"),C=require("./logger/Logger.js"),V=require("./logger/types.js"),b=require("./logger/sanitizeAsStringDict.js"),A=require("./printing/getPrinterType.js"),L=require("./printing/isValidPrinter.js"),B=require("./printing/isValidNetworkPrinter.js"),E=require("./printing/isValidStarCloudPrinter.js"),U=require("./printing/isTerminalPrinter.js"),W=require("./number/randomIntFromInterval.js"),M=require("./tables/decodeTableQRPayload.js"),H=require("./checkout/getCheckoutItemModifications.js"),N=require("./checkout/getCheckoutProductName.js"),t=require("./checkout/getCheckoutOrderStatusTexts.js"),R=require("./checkout/getCheckoutItemsMappedByTicketItemStatus.js"),w=require("./checkout/isCheckoutOrderSummary.js"),x=require("./currency/getFormattedCurrency.js"),z=require("./inventory/isDetailedProductOutOfStock.js"),J=require("./inventory/isDetailedProductVariantOutOfStocks.js"),K=require("./inventory/isMenuTreeProductOutOfStock.js"),Q=require("./inventory/isDetailedProductUpSellsOutOfStock.js"),j=require("./inventory/isUpSellProductOutStock.js"),G=require("./inventory/isDetailedProductOutletStockOutOfStock.js"),X=require("./inventory/getDetailedProductVariantStock.js"),Y=require("./signalr/createUseSignalRHook.js"),Z=require("./signalr/SignalR.js"),$=require("./error/createCodedError.js"),ee=require("./error/isCodedError.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");require("./currency/getFormattedCurrencyPostfix.js");require("react");require("react-redux");require("@microsoft/signalr");exports.DayOfWeek=e.DayOfWeek;exports.IntervalState=e.IntervalState;exports.IntervalType=e.IntervalType;exports.OrderFormat=e.OrderFormat;exports.isWithinFlag=r;exports.generateId=i;exports.wait=o;exports.getListOutletOpeningHoursTable=n;exports.getOutletTagInformation=u.default;exports.getOutletAvailabilityInfo=s.default;exports.getOutletOfflineOrderFormats=a;exports.getOutletAvailableOrderFormats=c;exports.getOutletFormattedDistance=l;exports.isOutletAcceptingPreOrders=g;exports.getOutletDeliveryFee=d;exports.getOutletTodayOpeningTimes=q;exports.getOutletOrderFormats=O;exports.serviceDateTimesFromOpeningHours=_;exports.isVersionALessThanB=k;exports.cleanVersionString=m;exports.getUrlAndParams=S;exports.getEndpointWithVersion=y;exports.generateBackoffWithEqualJitter=f;exports.slugify=p;exports.truncate=P;exports.lighten=h;exports.brighten=T;exports.darken=v;exports.isDarkBackground=F;exports.getFullName=D;exports.getFullAddressString=I;exports.Logger=C;exports.LogLevel=V.LogLevel;exports.sanitizeAsStringDict=b;exports.getPrinterType=A;exports.isValidPrinter=L;exports.isValidNetworkPrinter=B;exports.isValidStarCloudPrinter=E;exports.isTerminalPrinter=U;exports.randomIntFromInterval=W;exports.decodeTableQRPayload=M;exports.getCheckoutGroupedModifications=H;exports.getCheckoutProductName=N;exports.TranslationKey=t.TranslationKey;exports.getCheckoutOrderStatusTexts=t.default;exports.getCheckoutItemsMappedByTicketItemStatus=R;exports.isCheckoutOrderSummary=w;exports.getFormattedCurrency=x;exports.isDetailedProductOutOfStock=z;exports.isDetailedProductVariantOutOfStocks=J;exports.isMenuTreeProductOutOfStock=K;exports.isDetailedProductUpSellsOutOfStock=Q;exports.isUpSellProductOutOfStock=j;exports.isDetailedProductOutletStockOutOfStock=G;exports.getDetailedProductVariantStock=X;exports.createUseSignalRHook=Y;exports.SignalR=Z;exports.createCodedError=$;exports.isCodedError=ee;
|
package/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { DayOfWeek as
|
|
1
|
+
import { DayOfWeek as O, IntervalState as k, IntervalType as S, OrderFormat as P } from "./shared/enums.mjs";
|
|
2
2
|
import { default as y } from "./shared/isWithinFlag.mjs";
|
|
3
3
|
import { default as h } from "./shared/generateId.mjs";
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
4
|
+
import { default as C } from "./shared/wait.mjs";
|
|
5
|
+
import { default as v } from "./outlet/getListOutletOpeningHoursTable.mjs";
|
|
6
|
+
import { default as A } from "./outlet/getOutletTagInformation.mjs";
|
|
7
7
|
import { default as L } from "./outlet/getOutletAvailabilityInfo.mjs";
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
8
|
+
import { default as E } from "./outlet/getOutletOfflineOrderFormats.mjs";
|
|
9
|
+
import { default as W } from "./outlet/getOutletAvailableOrderFormats.mjs";
|
|
10
|
+
import { default as M } from "./outlet/getOutletFormattedDistance.mjs";
|
|
11
|
+
import { default as R } from "./outlet/isOutletAcceptingPreOrders.mjs";
|
|
12
12
|
import { default as q } from "./outlet/getOutletDeliveryFee.mjs";
|
|
13
13
|
import { default as G } from "./outlet/getOutletTodayOpeningTimes.mjs";
|
|
14
14
|
import { default as K } from "./outlet/getOutletOrderFormats.mjs";
|
|
@@ -19,23 +19,23 @@ import { default as tt } from "./api/getUrlAndParams.mjs";
|
|
|
19
19
|
import { default as rt } from "./api/getEndpointWithVersion.mjs";
|
|
20
20
|
import { default as at } from "./api/generateBackoffWithEqualJitter.mjs";
|
|
21
21
|
import { default as lt } from "./string/slugify.mjs";
|
|
22
|
-
import { default as
|
|
22
|
+
import { default as dt } from "./string/truncate.mjs";
|
|
23
23
|
import { default as mt } from "./color/lighten.mjs";
|
|
24
24
|
import { default as pt } from "./color/brighten.mjs";
|
|
25
25
|
import { default as nt } from "./color/darken.mjs";
|
|
26
|
-
import { default as
|
|
26
|
+
import { default as ct } from "./color/isDarkBackground.mjs";
|
|
27
27
|
import { default as kt } from "./user/getFullName.mjs";
|
|
28
28
|
import { default as Pt } from "./user/getFullAddressString.mjs";
|
|
29
29
|
import { default as yt } from "./logger/Logger.mjs";
|
|
30
30
|
import { LogLevel as ht } from "./logger/types.mjs";
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
31
|
+
import { default as Ct } from "./logger/sanitizeAsStringDict.mjs";
|
|
32
|
+
import { default as vt } from "./printing/getPrinterType.mjs";
|
|
33
|
+
import { default as At } from "./printing/isValidPrinter.mjs";
|
|
34
34
|
import { default as Lt } from "./printing/isValidNetworkPrinter.mjs";
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
35
|
+
import { default as Et } from "./printing/isValidStarCloudPrinter.mjs";
|
|
36
|
+
import { default as Wt } from "./printing/isTerminalPrinter.mjs";
|
|
37
|
+
import { default as Mt } from "./number/randomIntFromInterval.mjs";
|
|
38
|
+
import { default as Rt } from "./tables/decodeTableQRPayload.mjs";
|
|
39
39
|
import { default as qt } from "./checkout/getCheckoutItemModifications.mjs";
|
|
40
40
|
import { default as Gt } from "./checkout/getCheckoutProductName.mjs";
|
|
41
41
|
import { TranslationKey as Kt, default as Qt } from "./checkout/getCheckoutOrderStatusTexts.mjs";
|
|
@@ -46,9 +46,13 @@ import { default as ee } from "./inventory/isDetailedProductOutOfStock.mjs";
|
|
|
46
46
|
import { default as oe } from "./inventory/isDetailedProductVariantOutOfStocks.mjs";
|
|
47
47
|
import { default as fe } from "./inventory/isMenuTreeProductOutOfStock.mjs";
|
|
48
48
|
import { default as se } from "./inventory/isDetailedProductUpSellsOutOfStock.mjs";
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as ie } from "./
|
|
51
|
-
import { default as xe } from "./
|
|
49
|
+
import { default as ue } from "./inventory/isUpSellProductOutStock.mjs";
|
|
50
|
+
import { default as ie } from "./inventory/isDetailedProductOutletStockOutOfStock.mjs";
|
|
51
|
+
import { default as xe } from "./inventory/getDetailedProductVariantStock.mjs";
|
|
52
|
+
import { default as ge } from "./signalr/createUseSignalRHook.mjs";
|
|
53
|
+
import { default as Oe } from "./signalr/SignalR.mjs";
|
|
54
|
+
import { default as Se } from "./error/createCodedError.mjs";
|
|
55
|
+
import { default as Te } from "./error/isCodedError.mjs";
|
|
52
56
|
import "moment";
|
|
53
57
|
import "@ancon/wildcat-types";
|
|
54
58
|
import "./outlet/types.mjs";
|
|
@@ -65,59 +69,63 @@ import "react";
|
|
|
65
69
|
import "react-redux";
|
|
66
70
|
import "@microsoft/signalr";
|
|
67
71
|
export {
|
|
68
|
-
|
|
72
|
+
O as DayOfWeek,
|
|
69
73
|
k as IntervalState,
|
|
70
74
|
S as IntervalType,
|
|
71
75
|
ht as LogLevel,
|
|
72
76
|
yt as Logger,
|
|
73
77
|
P as OrderFormat,
|
|
74
|
-
|
|
78
|
+
Oe as SignalR,
|
|
75
79
|
Kt as TranslationKey,
|
|
76
80
|
pt as brighten,
|
|
77
81
|
_ as cleanVersionString,
|
|
78
|
-
|
|
82
|
+
Se as createCodedError,
|
|
83
|
+
ge as createUseSignalRHook,
|
|
79
84
|
nt as darken,
|
|
80
|
-
|
|
85
|
+
Rt as decodeTableQRPayload,
|
|
81
86
|
at as generateBackoffWithEqualJitter,
|
|
82
87
|
h as generateId,
|
|
83
88
|
qt as getCheckoutGroupedModifications,
|
|
84
89
|
Xt as getCheckoutItemsMappedByTicketItemStatus,
|
|
85
90
|
Qt as getCheckoutOrderStatusTexts,
|
|
86
91
|
Gt as getCheckoutProductName,
|
|
92
|
+
xe as getDetailedProductVariantStock,
|
|
87
93
|
rt as getEndpointWithVersion,
|
|
88
94
|
$t as getFormattedCurrency,
|
|
89
95
|
Pt as getFullAddressString,
|
|
90
96
|
kt as getFullName,
|
|
91
|
-
|
|
97
|
+
v as getListOutletOpeningHoursTable,
|
|
92
98
|
L as getOutletAvailabilityInfo,
|
|
93
|
-
|
|
99
|
+
W as getOutletAvailableOrderFormats,
|
|
94
100
|
q as getOutletDeliveryFee,
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
M as getOutletFormattedDistance,
|
|
102
|
+
E as getOutletOfflineOrderFormats,
|
|
97
103
|
K as getOutletOrderFormats,
|
|
98
|
-
|
|
104
|
+
A as getOutletTagInformation,
|
|
99
105
|
G as getOutletTodayOpeningTimes,
|
|
100
|
-
|
|
106
|
+
vt as getPrinterType,
|
|
101
107
|
tt as getUrlAndParams,
|
|
102
108
|
Zt as isCheckoutOrderSummary,
|
|
103
|
-
|
|
109
|
+
Te as isCodedError,
|
|
110
|
+
ct as isDarkBackground,
|
|
104
111
|
ee as isDetailedProductOutOfStock,
|
|
112
|
+
ie as isDetailedProductOutletStockOutOfStock,
|
|
105
113
|
se as isDetailedProductUpSellsOutOfStock,
|
|
106
114
|
oe as isDetailedProductVariantOutOfStocks,
|
|
107
115
|
fe as isMenuTreeProductOutOfStock,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
116
|
+
R as isOutletAcceptingPreOrders,
|
|
117
|
+
Wt as isTerminalPrinter,
|
|
118
|
+
ue as isUpSellProductOutOfStock,
|
|
111
119
|
Lt as isValidNetworkPrinter,
|
|
112
|
-
|
|
113
|
-
|
|
120
|
+
At as isValidPrinter,
|
|
121
|
+
Et as isValidStarCloudPrinter,
|
|
114
122
|
Y as isVersionALessThanB,
|
|
115
123
|
y as isWithinFlag,
|
|
116
124
|
mt as lighten,
|
|
117
|
-
|
|
118
|
-
|
|
125
|
+
Mt as randomIntFromInterval,
|
|
126
|
+
Ct as sanitizeAsStringDict,
|
|
119
127
|
j as serviceDateTimesFromOpeningHours,
|
|
120
128
|
lt as slugify,
|
|
121
|
-
|
|
122
|
-
|
|
129
|
+
dt as truncate,
|
|
130
|
+
C as wait
|
|
123
131
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function r(t,e){return t.outletStocks.find(o=>o.outletId===e)}module.exports=r;
|
package/inventory/index.d.ts
CHANGED
|
@@ -3,4 +3,6 @@ import isDetailedProductVariantOutOfStocks from './isDetailedProductVariantOutOf
|
|
|
3
3
|
import isMenuTreeProductOutOfStock from './isMenuTreeProductOutOfStock';
|
|
4
4
|
import isDetailedProductUpSellsOutOfStock from './isDetailedProductUpSellsOutOfStock';
|
|
5
5
|
import isUpSellProductOutOfStock from './isUpSellProductOutStock';
|
|
6
|
-
|
|
6
|
+
import isDetailedProductOutletStockOutOfStock from './isDetailedProductOutletStockOutOfStock';
|
|
7
|
+
import getDetailedProductVariantStock from './getDetailedProductVariantStock';
|
|
8
|
+
export { isDetailedProductOutOfStock, isDetailedProductVariantOutOfStocks, isMenuTreeProductOutOfStock, isDetailedProductUpSellsOutOfStock, isUpSellProductOutOfStock, isDetailedProductOutletStockOutOfStock, getDetailedProductVariantStock, };
|
package/inventory/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./isDetailedProductOutOfStock.js"),e=require("./isDetailedProductVariantOutOfStocks.js"),o=require("./isMenuTreeProductOutOfStock.js"),r=require("./isDetailedProductUpSellsOutOfStock.js"),i=require("./isUpSellProductOutStock.js");exports.isDetailedProductOutOfStock=t;exports.isDetailedProductVariantOutOfStocks=e;exports.isMenuTreeProductOutOfStock=o;exports.isDetailedProductUpSellsOutOfStock=r;exports.isUpSellProductOutOfStock=i;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./isDetailedProductOutOfStock.js"),e=require("./isDetailedProductVariantOutOfStocks.js"),o=require("./isMenuTreeProductOutOfStock.js"),r=require("./isDetailedProductUpSellsOutOfStock.js"),i=require("./isUpSellProductOutStock.js"),u=require("./isDetailedProductOutletStockOutOfStock.js"),c=require("./getDetailedProductVariantStock.js");exports.isDetailedProductOutOfStock=t;exports.isDetailedProductVariantOutOfStocks=e;exports.isMenuTreeProductOutOfStock=o;exports.isDetailedProductUpSellsOutOfStock=r;exports.isUpSellProductOutOfStock=i;exports.isDetailedProductOutletStockOutOfStock=u;exports.getDetailedProductVariantStock=c;
|
package/inventory/index.mjs
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { default as o } from "./isDetailedProductOutOfStock.mjs";
|
|
2
|
-
import { default as
|
|
2
|
+
import { default as a } from "./isDetailedProductVariantOutOfStocks.mjs";
|
|
3
3
|
import { default as f } from "./isMenuTreeProductOutOfStock.mjs";
|
|
4
4
|
import { default as l } from "./isDetailedProductUpSellsOutOfStock.mjs";
|
|
5
|
-
import { default as
|
|
5
|
+
import { default as s } from "./isUpSellProductOutStock.mjs";
|
|
6
|
+
import { default as O } from "./isDetailedProductOutletStockOutOfStock.mjs";
|
|
7
|
+
import { default as p } from "./getDetailedProductVariantStock.mjs";
|
|
6
8
|
export {
|
|
9
|
+
p as getDetailedProductVariantStock,
|
|
7
10
|
o as isDetailedProductOutOfStock,
|
|
11
|
+
O as isDetailedProductOutletStockOutOfStock,
|
|
8
12
|
l as isDetailedProductUpSellsOutOfStock,
|
|
9
|
-
|
|
13
|
+
a as isDetailedProductVariantOutOfStocks,
|
|
10
14
|
f as isMenuTreeProductOutOfStock,
|
|
11
|
-
|
|
15
|
+
s as isUpSellProductOutOfStock
|
|
12
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const u=require("./isDetailedProductVariantOutOfStocks.js");require("./getDetailedProductVariantStock.js");require("./isDetailedProductOutletStockOutOfStock.js");function O(i,e){var t;return((t=e||[])==null?void 0:t.length)>0&&(e==null?void 0:e.every(r=>u(r,i)))}module.exports=O;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import i from "./isDetailedProductVariantOutOfStocks.mjs";
|
|
2
|
+
import "./getDetailedProductVariantStock.mjs";
|
|
3
|
+
import "./isDetailedProductOutletStockOutOfStock.mjs";
|
|
4
|
+
function k(f, e) {
|
|
5
|
+
var t;
|
|
6
|
+
return ((t = e || []) == null ? void 0 : t.length) > 0 && (e == null ? void 0 : e.every(
|
|
7
|
+
(o) => i(o, f)
|
|
6
8
|
));
|
|
7
9
|
}
|
|
8
10
|
export {
|
|
9
|
-
|
|
11
|
+
k as default
|
|
10
12
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function r(s){return!!(s!=null&&s.stockProductId&&s.stockCount<=0)}module.exports=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function
|
|
1
|
+
"use strict";const o=require("./getDetailedProductVariantStock.js"),i=require("./isDetailedProductOutletStockOutOfStock.js");function c(t,e){const r=o(t,e);return i(r)}module.exports=c;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
);
|
|
5
|
-
return
|
|
1
|
+
import a from "./getDetailedProductVariantStock.mjs";
|
|
2
|
+
import i from "./isDetailedProductOutletStockOutOfStock.mjs";
|
|
3
|
+
function u(t, o) {
|
|
4
|
+
const r = a(t, o);
|
|
5
|
+
return i(r);
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
u as default
|
|
9
9
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancon/wildcat-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -96,11 +96,31 @@
|
|
|
96
96
|
"require": "./currency/index.js",
|
|
97
97
|
"types": "./currency/index.d.ts"
|
|
98
98
|
},
|
|
99
|
+
"./error/createCodedError": {
|
|
100
|
+
"import": "./error/createCodedError.mjs",
|
|
101
|
+
"require": "./error/createCodedError.js",
|
|
102
|
+
"types": "./error/createCodedError.d.ts"
|
|
103
|
+
},
|
|
104
|
+
"./error": {
|
|
105
|
+
"import": "./error/index.mjs",
|
|
106
|
+
"require": "./error/index.js",
|
|
107
|
+
"types": "./error/index.d.ts"
|
|
108
|
+
},
|
|
109
|
+
"./error/isCodedError": {
|
|
110
|
+
"import": "./error/isCodedError.mjs",
|
|
111
|
+
"require": "./error/isCodedError.js",
|
|
112
|
+
"types": "./error/isCodedError.d.ts"
|
|
113
|
+
},
|
|
99
114
|
".": {
|
|
100
115
|
"import": "./index.mjs",
|
|
101
116
|
"require": "./index.js",
|
|
102
117
|
"types": "./index.d.ts"
|
|
103
118
|
},
|
|
119
|
+
"./inventory/getDetailedProductVariantStock": {
|
|
120
|
+
"import": "./inventory/getDetailedProductVariantStock.mjs",
|
|
121
|
+
"require": "./inventory/getDetailedProductVariantStock.js",
|
|
122
|
+
"types": "./inventory/getDetailedProductVariantStock.d.ts"
|
|
123
|
+
},
|
|
104
124
|
"./inventory": {
|
|
105
125
|
"import": "./inventory/index.mjs",
|
|
106
126
|
"require": "./inventory/index.js",
|
|
@@ -111,6 +131,11 @@
|
|
|
111
131
|
"require": "./inventory/isDetailedProductOutOfStock.js",
|
|
112
132
|
"types": "./inventory/isDetailedProductOutOfStock.d.ts"
|
|
113
133
|
},
|
|
134
|
+
"./inventory/isDetailedProductOutletStockOutOfStock": {
|
|
135
|
+
"import": "./inventory/isDetailedProductOutletStockOutOfStock.mjs",
|
|
136
|
+
"require": "./inventory/isDetailedProductOutletStockOutOfStock.js",
|
|
137
|
+
"types": "./inventory/isDetailedProductOutletStockOutOfStock.d.ts"
|
|
138
|
+
},
|
|
114
139
|
"./inventory/isDetailedProductUpSellsOutOfStock": {
|
|
115
140
|
"import": "./inventory/isDetailedProductUpSellsOutOfStock.mjs",
|
|
116
141
|
"require": "./inventory/isDetailedProductUpSellsOutOfStock.js",
|