@ancon/wildcat-utils 1.29.3 → 1.29.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.mjs +156 -151
- package/package.json +6 -1
- package/user/getFormattedPhoneNumber.mjs +8 -8
- package/user/getStructuredCustomerAddress.d.ts +10 -0
- package/user/getStructuredCustomerAddress.js +1 -0
- package/user/getStructuredCustomerAddress.mjs +23 -0
- package/user/index.d.ts +3 -1
- package/user/index.js +1 -1
- package/user/index.mjs +9 -4
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./shared/isWithinFlag.js"),r=require("./shared/generateId.js"),i=require("./shared/wait.js"),o=require("./outlet/getListOutletOpeningHoursTable.js"),u=require("./outlet/getOutletTagInformation.js"),n=require("./outlet/getOutletAvailabilityInfo.js"),s=require("./outlet/getOutletOfflineOrderFormats.js"),c=require("./outlet/getOutletAvailableOrderFormats.js"),a=require("./outlet/getOutletFormattedDistance.js"),l=require("./outlet/isOutletAcceptingPreOrders.js"),d=require("./outlet/getOutletDeliveryFee.js"),g=require("./outlet/getOutletTodayOpeningTimes.js"),q=require("./outlet/getOutletOrderFormats.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./shared/isWithinFlag.js"),r=require("./shared/generateId.js"),i=require("./shared/wait.js"),o=require("./outlet/getListOutletOpeningHoursTable.js"),u=require("./outlet/getOutletTagInformation.js"),n=require("./outlet/getOutletAvailabilityInfo.js"),s=require("./outlet/getOutletOfflineOrderFormats.js"),c=require("./outlet/getOutletAvailableOrderFormats.js"),a=require("./outlet/getOutletFormattedDistance.js"),l=require("./outlet/isOutletAcceptingPreOrders.js"),d=require("./outlet/getOutletDeliveryFee.js"),g=require("./outlet/getOutletTodayOpeningTimes.js"),q=require("./outlet/getOutletOrderFormats.js"),_=require("./outlet/serviceDateTimesFromOpeningHours.js"),O=require("./outlet/getPickerIntervalsForDay.js"),m=require("./outlet/getServiceIntervalRange.js"),k=require("./outlet/getServiceIntervalsForOrderFormat.js"),h=require("./outlet/getOutletFormattedAddress.js"),p=require("./outlet/getPartitionedOutletsList.js"),P=require("./outlet/getOutletPickerTimesForWeek.js"),S=require("./outlet/getOutletOrderPrepTime.js"),f=require("./versioning/isVersionALessThanB.js"),C=require("./versioning/cleanVersionString.js"),F=require("./api/getUrlAndParams.js"),T=require("./api/getEndpointWithVersion.js"),y=require("./api/generateBackoffWithEqualJitter.js"),v=require("./api/isAcceptedResponse.js"),I=require("./api/isNoContentResponse.js"),A=require("./string/slugify.js"),D=require("./string/truncate.js"),R=require("./color/lighten.js"),b=require("./color/brighten.js"),E=require("./color/darken.js"),V=require("./color/isDarkBackground.js"),L=require("./user/getFullName.js"),M=require("./user/getFullAddressString.js"),H=require("./user/getCustomerAddressFromGeocoderResult.js"),N=require("./user/getFormattedPhoneNumber.js"),B=require("./user/getStructuredCustomerAddress.js"),U=require("./logger/Logger.js"),W=require("./logger/types.js"),G=require("./logger/sanitizeAsStringDict.js"),w=require("./printing/getPrinterType.js"),x=require("./printing/isValidPrinter.js"),z=require("./printing/isValidNetworkPrinter.js"),J=require("./printing/isValidStarCloudPrinter.js"),K=require("./printing/isTerminalPrinter.js"),Q=require("./printing/isCloudPrintModeEnabled.js"),j=require("./number/randomIntFromInterval.js"),X=require("./tables/decodeTableQRPayload.js"),Y=require("./checkout/getCheckoutItemModifications.js"),Z=require("./checkout/getCheckoutProductName.js"),e=require("./checkout/getCheckoutOrderStatusTexts.js"),$=require("./checkout/getCheckoutItemsMappedByTicketItemStatus.js"),ee=require("./checkout/isCheckoutOrderSummary.js"),te=require("./checkout/buildCheckoutRequestItem.js"),re=require("./checkout/getCheckoutGrandTotalAmount.js"),ie=require("./checkout/getCheckoutRequestItemFromCheckoutItem.js"),oe=require("./checkout/isCheckoutItemsAreEqual.js"),ue=require("./currency/getFormattedCurrency.js"),ne=require("./inventory/isDetailedProductOutOfStock.js"),se=require("./inventory/isDetailedProductVariantOutOfStocks.js"),ce=require("./inventory/isMenuTreeProductOutOfStock.js"),ae=require("./inventory/isDetailedProductUpSellsOutOfStock.js"),le=require("./inventory/isUpSellProductOutStock.js"),de=require("./inventory/isDetailedProductOutletStockOutOfStock.js"),ge=require("./inventory/getDetailedProductVariantStock.js"),qe=require("./signalr/createUseSignalRHook.js"),_e=require("./signalr/SignalR.js"),Oe=require("./error/createCodedError.js"),me=require("./error/isCodedError.js"),ke=require("./error/isNetworkError.js"),he=require("./error/isLockedError.js"),pe=require("./hangfire/isHangfireResponse.js"),Pe=require("./hangfire/createHangfirePoller.js"),Se=require("./hangfire/createMakeHangfireRequest.js"),fe=require("./product/extractProductsFromMenuTree.js"),Ce=require("./product/calculateIngredientsCost.js"),Fe=require("./product/calculateAddonGroupCost.js");require("moment");require("@ancon/wildcat-types");require("./outlet/constants.js");require("./outlet/getOutletCurrentActiveOperatingHour.js");require("./outlet/getMomentFromDateAndTimeString.js");require("./outlet/searchNextOpeningMoment.js");require("lodash");require("./shared/constants.js");require("./time/toMinutes.js");require("./time/getNextTenthMinute.js");require("./outlet/types.js");require("./outlet/getSettingsForOrderFormat.js");require("./outlet/getServiceIntervalStart.js");require("./outlet/getNextTenthMinute.js");require("./outlet/generatePickerTimesForDay.js");require("./outlet/getServiceIntervalEnd.js");require("./outlet/hoursAndMinutesToMinutes.js");require("compare-versions");require("tinycolor2");require("google-libphonenumber");require("@ancon/wildcat-printing");require("./currency/getFormattedCurrencyPostfix.js");require("react");require("react-redux");require("@microsoft/signalr");require("./index-4a932b99.js");require("./axios-5f25f7ff.js");exports.isWithinFlag=t;exports.generateId=r;exports.wait=i;exports.getListOutletOpeningHoursTable=o;exports.getOutletTagInformation=u.default;exports.getOutletAvailabilityInfo=n.default;exports.getOutletOfflineOrderFormats=s;exports.getOutletAvailableOrderFormats=c;exports.getOutletFormattedDistance=a;exports.isOutletAcceptingPreOrders=l;exports.getOutletDeliveryFee=d;exports.getOutletTodayOpeningTimes=g;exports.getOutletOrderFormats=q;exports.serviceDateTimesFromOpeningHours=_;exports.getPickerIntervalsForDay=O;exports.getServiceIntervalRange=m;exports.getServiceIntervalsForOrderFormat=k;exports.getOutletFormattedAddress=h;exports.getPartitionedOutletsList=p;exports.getOutletPickerTimesForWeek=P;exports.getOutletOrderPreparationTime=S;exports.isVersionALessThanB=f;exports.cleanVersionString=C;exports.getUrlAndParams=F;exports.getEndpointWithVersion=T;exports.generateBackoffWithEqualJitter=y;exports.isAcceptedResponse=v;exports.isNoContentResponse=I;exports.slugify=A;exports.truncate=D;exports.lighten=R;exports.brighten=b;exports.darken=E;exports.isDarkBackground=V;exports.getFullName=L;exports.getFullAddressString=M;exports.getCustomerAddressFromGeocoderResult=H;exports.getFormattedPhoneNumber=N;exports.getStructuredCustomerAddress=B;exports.Logger=U;exports.LogLevel=W.LogLevel;exports.sanitizeAsStringDict=G;exports.getPrinterType=w;exports.isValidPrinter=x;exports.isValidNetworkPrinter=z;exports.isValidStarCloudPrinter=J;exports.isTerminalPrinter=K;exports.isCloudPrintModeEnabled=Q;exports.randomIntFromInterval=j;exports.decodeTableQRPayload=X;exports.getCheckoutGroupedModifications=Y;exports.getCheckoutProductName=Z;exports.TranslationKey=e.TranslationKey;exports.getCheckoutOrderStatusTexts=e.default;exports.getCheckoutItemsMappedByTicketItemStatus=$;exports.isCheckoutOrderSummary=ee;exports.buildCheckoutRequestItem=te;exports.getCheckoutGrandTotalAmount=re;exports.getCheckoutRequestItemFromCheckoutItem=ie;exports.isCheckoutItemsAreEqual=oe;exports.getFormattedCurrency=ue;exports.isDetailedProductOutOfStock=ne;exports.isDetailedProductVariantOutOfStocks=se;exports.isMenuTreeProductOutOfStock=ce;exports.isDetailedProductUpSellsOutOfStock=ae;exports.isUpSellProductOutOfStock=le;exports.isDetailedProductOutletStockOutOfStock=de;exports.getDetailedProductVariantStock=ge;exports.createUseSignalRHook=qe;exports.SignalR=_e;exports.createCodedError=Oe;exports.isCodedError=me;exports.isNetworkError=ke;exports.isLockedError=he;exports.isHangfireResponse=pe;exports.createHangfirePoller=Pe.default;exports.createMakeHangfireRequest=Se;exports.extractProductsFromMenuTree=fe;exports.calculateIngredientsCost=Ce;exports.calculateAddonGroupsCost=Fe;
|
package/index.mjs
CHANGED
|
@@ -1,80 +1,82 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
1
|
+
import { default as D } from "./shared/isWithinFlag.mjs";
|
|
2
|
+
import { default as b } from "./shared/generateId.mjs";
|
|
3
3
|
import { default as V } from "./shared/wait.mjs";
|
|
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
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
4
|
+
import { default as H } from "./outlet/getListOutletOpeningHoursTable.mjs";
|
|
5
|
+
import { default as N } from "./outlet/getOutletTagInformation.mjs";
|
|
6
|
+
import { default as B } from "./outlet/getOutletAvailabilityInfo.mjs";
|
|
7
|
+
import { default as U } from "./outlet/getOutletOfflineOrderFormats.mjs";
|
|
8
|
+
import { default as w } from "./outlet/getOutletAvailableOrderFormats.mjs";
|
|
9
|
+
import { default as J } from "./outlet/getOutletFormattedDistance.mjs";
|
|
10
|
+
import { default as Q } from "./outlet/isOutletAcceptingPreOrders.mjs";
|
|
11
|
+
import { default as X } from "./outlet/getOutletDeliveryFee.mjs";
|
|
12
|
+
import { default as Z } from "./outlet/getOutletTodayOpeningTimes.mjs";
|
|
13
|
+
import { default as $ } from "./outlet/getOutletOrderFormats.mjs";
|
|
14
|
+
import { default as et } from "./outlet/serviceDateTimesFromOpeningHours.mjs";
|
|
15
|
+
import { default as ot } from "./outlet/getPickerIntervalsForDay.mjs";
|
|
16
|
+
import { default as ft } from "./outlet/getServiceIntervalRange.mjs";
|
|
17
|
+
import { default as ut } from "./outlet/getServiceIntervalsForOrderFormat.mjs";
|
|
18
|
+
import { default as lt } from "./outlet/getOutletFormattedAddress.mjs";
|
|
19
|
+
import { default as it } from "./outlet/getPartitionedOutletsList.mjs";
|
|
20
|
+
import { default as xt } from "./outlet/getOutletPickerTimesForWeek.mjs";
|
|
21
|
+
import { default as ct } from "./outlet/getOutletOrderPrepTime.mjs";
|
|
22
|
+
import { default as Ot } from "./versioning/isVersionALessThanB.mjs";
|
|
23
|
+
import { default as Pt } from "./versioning/cleanVersionString.mjs";
|
|
24
|
+
import { default as Ct } from "./api/getUrlAndParams.mjs";
|
|
25
|
+
import { default as ht } from "./api/getEndpointWithVersion.mjs";
|
|
26
|
+
import { default as It } from "./api/generateBackoffWithEqualJitter.mjs";
|
|
27
|
+
import { default as vt } from "./api/isAcceptedResponse.mjs";
|
|
28
|
+
import { default as Dt } from "./api/isNoContentResponse.mjs";
|
|
29
|
+
import { default as bt } from "./string/slugify.mjs";
|
|
30
30
|
import { default as Vt } from "./string/truncate.mjs";
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import {
|
|
40
|
-
import { default as
|
|
41
|
-
import {
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import {
|
|
52
|
-
import { default as
|
|
53
|
-
import {
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as Ee } from "./checkout/
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as qe } from "./
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
73
|
-
import { default as
|
|
74
|
-
import { default as
|
|
75
|
-
import { default as
|
|
76
|
-
import { default as
|
|
77
|
-
import { default as
|
|
31
|
+
import { default as Ht } from "./color/lighten.mjs";
|
|
32
|
+
import { default as Nt } from "./color/brighten.mjs";
|
|
33
|
+
import { default as Bt } from "./color/darken.mjs";
|
|
34
|
+
import { default as Ut } from "./color/isDarkBackground.mjs";
|
|
35
|
+
import { default as wt } from "./user/getFullName.mjs";
|
|
36
|
+
import { default as Jt } from "./user/getFullAddressString.mjs";
|
|
37
|
+
import { default as Qt } from "./user/getCustomerAddressFromGeocoderResult.mjs";
|
|
38
|
+
import { default as Xt } from "./user/getFormattedPhoneNumber.mjs";
|
|
39
|
+
import { default as Zt } from "./user/getStructuredCustomerAddress.mjs";
|
|
40
|
+
import { default as $t } from "./logger/Logger.mjs";
|
|
41
|
+
import { LogLevel as ee } from "./logger/types.mjs";
|
|
42
|
+
import { default as oe } from "./logger/sanitizeAsStringDict.mjs";
|
|
43
|
+
import { default as fe } from "./printing/getPrinterType.mjs";
|
|
44
|
+
import { default as ue } from "./printing/isValidPrinter.mjs";
|
|
45
|
+
import { default as le } from "./printing/isValidNetworkPrinter.mjs";
|
|
46
|
+
import { default as ie } from "./printing/isValidStarCloudPrinter.mjs";
|
|
47
|
+
import { default as xe } from "./printing/isTerminalPrinter.mjs";
|
|
48
|
+
import { default as ce } from "./printing/isCloudPrintModeEnabled.mjs";
|
|
49
|
+
import { default as Oe } from "./number/randomIntFromInterval.mjs";
|
|
50
|
+
import { default as Pe } from "./tables/decodeTableQRPayload.mjs";
|
|
51
|
+
import { default as Ce } from "./checkout/getCheckoutItemModifications.mjs";
|
|
52
|
+
import { default as he } from "./checkout/getCheckoutProductName.mjs";
|
|
53
|
+
import { TranslationKey as Ie, default as Ae } from "./checkout/getCheckoutOrderStatusTexts.mjs";
|
|
54
|
+
import { default as ye } from "./checkout/getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
55
|
+
import { default as Re } from "./checkout/isCheckoutOrderSummary.mjs";
|
|
56
|
+
import { default as Ee } from "./checkout/buildCheckoutRequestItem.mjs";
|
|
57
|
+
import { default as Le } from "./checkout/getCheckoutGrandTotalAmount.mjs";
|
|
58
|
+
import { default as Me } from "./checkout/getCheckoutRequestItemFromCheckoutItem.mjs";
|
|
59
|
+
import { default as qe } from "./checkout/isCheckoutItemsAreEqual.mjs";
|
|
60
|
+
import { default as Ge } from "./currency/getFormattedCurrency.mjs";
|
|
61
|
+
import { default as We } from "./inventory/isDetailedProductOutOfStock.mjs";
|
|
62
|
+
import { default as ze } from "./inventory/isDetailedProductVariantOutOfStocks.mjs";
|
|
63
|
+
import { default as Ke } from "./inventory/isMenuTreeProductOutOfStock.mjs";
|
|
64
|
+
import { default as je } from "./inventory/isDetailedProductUpSellsOutOfStock.mjs";
|
|
65
|
+
import { default as Ye } from "./inventory/isUpSellProductOutStock.mjs";
|
|
66
|
+
import { default as _e } from "./inventory/isDetailedProductOutletStockOutOfStock.mjs";
|
|
67
|
+
import { default as tr } from "./inventory/getDetailedProductVariantStock.mjs";
|
|
68
|
+
import { default as rr } from "./signalr/createUseSignalRHook.mjs";
|
|
69
|
+
import { default as ar } from "./signalr/SignalR.mjs";
|
|
70
|
+
import { default as sr } from "./error/createCodedError.mjs";
|
|
71
|
+
import { default as dr } from "./error/isCodedError.mjs";
|
|
72
|
+
import { default as mr } from "./error/isNetworkError.mjs";
|
|
73
|
+
import { default as pr } from "./error/isLockedError.mjs";
|
|
74
|
+
import { default as nr } from "./hangfire/isHangfireResponse.mjs";
|
|
75
|
+
import { default as gr } from "./hangfire/createHangfirePoller.mjs";
|
|
76
|
+
import { default as kr } from "./hangfire/createMakeHangfireRequest.mjs";
|
|
77
|
+
import { default as Sr } from "./product/extractProductsFromMenuTree.mjs";
|
|
78
|
+
import { default as Fr } from "./product/calculateIngredientsCost.mjs";
|
|
79
|
+
import { default as Tr } from "./product/calculateAddonGroupCost.mjs";
|
|
78
80
|
import "moment";
|
|
79
81
|
import "@ancon/wildcat-types";
|
|
80
82
|
import "./outlet/constants.mjs";
|
|
@@ -94,6 +96,7 @@ import "./outlet/getServiceIntervalEnd.mjs";
|
|
|
94
96
|
import "./outlet/hoursAndMinutesToMinutes.mjs";
|
|
95
97
|
import "compare-versions";
|
|
96
98
|
import "tinycolor2";
|
|
99
|
+
import "google-libphonenumber";
|
|
97
100
|
import "@ancon/wildcat-printing";
|
|
98
101
|
import "./currency/getFormattedCurrencyPostfix.mjs";
|
|
99
102
|
import "react";
|
|
@@ -102,82 +105,84 @@ import "@microsoft/signalr";
|
|
|
102
105
|
import "./index-bc13ec04.mjs";
|
|
103
106
|
import "./axios-aa12e368.mjs";
|
|
104
107
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
108
|
+
ee as LogLevel,
|
|
109
|
+
$t as Logger,
|
|
110
|
+
ar as SignalR,
|
|
111
|
+
Ie as TranslationKey,
|
|
112
|
+
Nt as brighten,
|
|
113
|
+
Ee as buildCheckoutRequestItem,
|
|
114
|
+
Tr as calculateAddonGroupsCost,
|
|
115
|
+
Fr as calculateIngredientsCost,
|
|
116
|
+
Pt as cleanVersionString,
|
|
117
|
+
sr as createCodedError,
|
|
118
|
+
gr as createHangfirePoller,
|
|
119
|
+
kr as createMakeHangfireRequest,
|
|
120
|
+
rr as createUseSignalRHook,
|
|
121
|
+
Bt as darken,
|
|
122
|
+
Pe as decodeTableQRPayload,
|
|
123
|
+
Sr as extractProductsFromMenuTree,
|
|
124
|
+
It as generateBackoffWithEqualJitter,
|
|
125
|
+
b as generateId,
|
|
126
|
+
Le as getCheckoutGrandTotalAmount,
|
|
127
|
+
Ce as getCheckoutGroupedModifications,
|
|
128
|
+
ye as getCheckoutItemsMappedByTicketItemStatus,
|
|
129
|
+
Ae as getCheckoutOrderStatusTexts,
|
|
130
|
+
he as getCheckoutProductName,
|
|
131
|
+
Me as getCheckoutRequestItemFromCheckoutItem,
|
|
132
|
+
Qt as getCustomerAddressFromGeocoderResult,
|
|
133
|
+
tr as getDetailedProductVariantStock,
|
|
134
|
+
ht as getEndpointWithVersion,
|
|
135
|
+
Ge as getFormattedCurrency,
|
|
136
|
+
Xt as getFormattedPhoneNumber,
|
|
137
|
+
Jt as getFullAddressString,
|
|
138
|
+
wt as getFullName,
|
|
139
|
+
H as getListOutletOpeningHoursTable,
|
|
140
|
+
B as getOutletAvailabilityInfo,
|
|
141
|
+
w as getOutletAvailableOrderFormats,
|
|
142
|
+
X as getOutletDeliveryFee,
|
|
143
|
+
lt as getOutletFormattedAddress,
|
|
144
|
+
J as getOutletFormattedDistance,
|
|
145
|
+
U as getOutletOfflineOrderFormats,
|
|
146
|
+
$ as getOutletOrderFormats,
|
|
147
|
+
ct as getOutletOrderPreparationTime,
|
|
148
|
+
xt as getOutletPickerTimesForWeek,
|
|
149
|
+
N as getOutletTagInformation,
|
|
150
|
+
Z as getOutletTodayOpeningTimes,
|
|
151
|
+
it as getPartitionedOutletsList,
|
|
152
|
+
ot as getPickerIntervalsForDay,
|
|
153
|
+
fe as getPrinterType,
|
|
154
|
+
ft as getServiceIntervalRange,
|
|
155
|
+
ut as getServiceIntervalsForOrderFormat,
|
|
156
|
+
Zt as getStructuredCustomerAddress,
|
|
157
|
+
Ct as getUrlAndParams,
|
|
158
|
+
vt as isAcceptedResponse,
|
|
159
|
+
qe as isCheckoutItemsAreEqual,
|
|
160
|
+
Re as isCheckoutOrderSummary,
|
|
161
|
+
ce as isCloudPrintModeEnabled,
|
|
162
|
+
dr as isCodedError,
|
|
163
|
+
Ut as isDarkBackground,
|
|
164
|
+
We as isDetailedProductOutOfStock,
|
|
165
|
+
_e as isDetailedProductOutletStockOutOfStock,
|
|
166
|
+
je as isDetailedProductUpSellsOutOfStock,
|
|
167
|
+
ze as isDetailedProductVariantOutOfStocks,
|
|
168
|
+
nr as isHangfireResponse,
|
|
169
|
+
pr as isLockedError,
|
|
170
|
+
Ke as isMenuTreeProductOutOfStock,
|
|
171
|
+
mr as isNetworkError,
|
|
172
|
+
Dt as isNoContentResponse,
|
|
173
|
+
Q as isOutletAcceptingPreOrders,
|
|
174
|
+
xe as isTerminalPrinter,
|
|
175
|
+
Ye as isUpSellProductOutOfStock,
|
|
176
|
+
le as isValidNetworkPrinter,
|
|
177
|
+
ue as isValidPrinter,
|
|
178
|
+
ie as isValidStarCloudPrinter,
|
|
179
|
+
Ot as isVersionALessThanB,
|
|
180
|
+
D as isWithinFlag,
|
|
181
|
+
Ht as lighten,
|
|
182
|
+
Oe as randomIntFromInterval,
|
|
183
|
+
oe as sanitizeAsStringDict,
|
|
184
|
+
et as serviceDateTimesFromOpeningHours,
|
|
185
|
+
bt as slugify,
|
|
181
186
|
Vt as truncate,
|
|
182
187
|
V as wait
|
|
183
188
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancon/wildcat-utils",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -581,6 +581,11 @@
|
|
|
581
581
|
"require": "./user/getFullName.js",
|
|
582
582
|
"types": "./user/getFullName.d.ts"
|
|
583
583
|
},
|
|
584
|
+
"./user/getStructuredCustomerAddress": {
|
|
585
|
+
"import": "./user/getStructuredCustomerAddress.mjs",
|
|
586
|
+
"require": "./user/getStructuredCustomerAddress.js",
|
|
587
|
+
"types": "./user/getStructuredCustomerAddress.d.ts"
|
|
588
|
+
},
|
|
584
589
|
"./user": {
|
|
585
590
|
"import": "./user/index.mjs",
|
|
586
591
|
"require": "./user/index.js",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import t from "google-libphonenumber";
|
|
2
|
+
const e = t.PhoneNumberUtil.getInstance();
|
|
3
|
+
function a(o) {
|
|
4
|
+
const r = e.parse(o);
|
|
5
|
+
return e.format(
|
|
6
|
+
r,
|
|
7
|
+
t.PhoneNumberFormat.INTERNATIONAL
|
|
8
8
|
);
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
a as default
|
|
12
12
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CustomerAddress } from '@ancon/wildcat-types';
|
|
2
|
+
declare type CustomerAddressLine = {
|
|
3
|
+
line1: string;
|
|
4
|
+
line2: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Returns a structured address object with two lines for UI display
|
|
8
|
+
*/
|
|
9
|
+
export default function getStructuredCustomerAddress(address?: CustomerAddress | null): CustomerAddressLine;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(e){return e.filter(Boolean).join(", ")||""}function l(e){if(e){const{street:r,city:o,state:s,zipCode:c,country:u}=e,t=i([r||"",o||""]),n=i([s||"",c||"",u||""]);return{line1:t||n,line2:t?n:""}}return{line1:"",line2:""}}module.exports=l;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function i(e) {
|
|
2
|
+
return e.filter(Boolean).join(", ") || "";
|
|
3
|
+
}
|
|
4
|
+
function l(e) {
|
|
5
|
+
if (e) {
|
|
6
|
+
const { street: r, city: o, state: s, zipCode: u, country: c } = e, t = i([r || "", o || ""]), n = i([
|
|
7
|
+
s || "",
|
|
8
|
+
u || "",
|
|
9
|
+
c || ""
|
|
10
|
+
]);
|
|
11
|
+
return {
|
|
12
|
+
line1: t || n,
|
|
13
|
+
line2: t ? n : ""
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
line1: "",
|
|
18
|
+
line2: ""
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
l as default
|
|
23
|
+
};
|
package/user/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import getFullName from './getFullName';
|
|
2
2
|
import getFullAddressString from './getFullAddressString';
|
|
3
3
|
import getCustomerAddressFromGeocoderResult from './getCustomerAddressFromGeocoderResult';
|
|
4
|
-
|
|
4
|
+
import getFormattedPhoneNumber from './getFormattedPhoneNumber';
|
|
5
|
+
import getStructuredCustomerAddress from './getStructuredCustomerAddress';
|
|
6
|
+
export { getFullName, getFullAddressString, getCustomerAddressFromGeocoderResult, getFormattedPhoneNumber, getStructuredCustomerAddress, };
|
package/user/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getFullName.js"),r=require("./getFullAddressString.js"),t=require("./getCustomerAddressFromGeocoderResult.js");exports.getFullName=e;exports.getFullAddressString=r;exports.getCustomerAddressFromGeocoderResult=t;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getFullName.js"),r=require("./getFullAddressString.js"),t=require("./getCustomerAddressFromGeocoderResult.js"),s=require("./getFormattedPhoneNumber.js"),u=require("./getStructuredCustomerAddress.js");require("google-libphonenumber");exports.getFullName=e;exports.getFullAddressString=r;exports.getCustomerAddressFromGeocoderResult=t;exports.getFormattedPhoneNumber=s;exports.getStructuredCustomerAddress=u;
|
package/user/index.mjs
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { default as
|
|
1
|
+
import { default as o } from "./getFullName.mjs";
|
|
2
2
|
import { default as s } from "./getFullAddressString.mjs";
|
|
3
|
-
import { default as
|
|
3
|
+
import { default as a } from "./getCustomerAddressFromGeocoderResult.mjs";
|
|
4
|
+
import { default as f } from "./getFormattedPhoneNumber.mjs";
|
|
5
|
+
import { default as g } from "./getStructuredCustomerAddress.mjs";
|
|
6
|
+
import "google-libphonenumber";
|
|
4
7
|
export {
|
|
5
|
-
|
|
8
|
+
a as getCustomerAddressFromGeocoderResult,
|
|
9
|
+
f as getFormattedPhoneNumber,
|
|
6
10
|
s as getFullAddressString,
|
|
7
|
-
|
|
11
|
+
o as getFullName,
|
|
12
|
+
g as getStructuredCustomerAddress
|
|
8
13
|
};
|