@loczer/storefront-sdk 0.237.0 → 0.239.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/dist/chunks/pkg/booking-engine/dist/models/{LocalizedString-D_TRgAdr.js → LocalizedString-JmOX62C3.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/models/{Product.shared-CWP_qule.js → Product.shared-C_HehlKK.js} +3 -3
- package/dist/chunks/pkg/booking-engine/dist/models/types-ynW5hdp8.js +8 -0
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-asset-BhIOL2rP.js → base-asset-CFAxfmRW.js} +3 -3
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-booking-BJXFzDM5.js → base-booking-CZOR9kya.js} +13 -12
- package/dist/chunks/pkg/booking-engine/dist/schemas/base-product-QYQBl0fQ.js +4 -0
- package/dist/chunks/pkg/booking-engine/dist/schemas/{booking-engine-configuration-LnrhShqm.js → booking-engine-configuration-CxKlxKCo.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/booking-reference-DLKcpIa4.js +13 -0
- package/dist/chunks/pkg/booking-engine/dist/schemas/{cart-inputs-3lBblkB0.js → cart-inputs-D1KobIdr.js} +4 -4
- package/dist/chunks/pkg/booking-engine/dist/schemas/{insurance-DXc34Bzy.js → insurance-B-Vmdlxo.js} +3 -3
- package/dist/chunks/pkg/booking-engine/dist/schemas/{product-id--yyUTH1Y.js → product-id-ChdStzgp.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/{public-booking-engine-configuration-CEM9mexX.js → public-booking-engine-configuration-BwWn9aK0.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas-lb2iTDMd.js +17 -0
- package/dist/components/Footer/businessHoursStatus.js +1 -1
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +38 -26
- package/dist/components/StorefrontCartPanel/index.d.ts +2 -1
- package/dist/components/StorefrontCartPanel/index.d.ts.map +1 -1
- package/dist/components/StorefrontCartPanel/index.js +24 -24
- package/dist/components/WhatsAppFloatingButton/WhatsAppFloatingButton.d.ts +4 -2
- package/dist/components/WhatsAppFloatingButton/WhatsAppFloatingButton.d.ts.map +1 -1
- package/dist/components/WhatsAppFloatingButton/WhatsAppFloatingButton.js +8 -8
- package/dist/i18n/en.d.ts +3 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +3 -0
- package/dist/i18n/fr.d.ts +3 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +3 -0
- package/dist/index.d.ts +33 -3
- package/dist/index.js +87 -86
- package/dist/lib/booking-period.js +1 -1
- package/dist/lib/booking.js +2 -2
- package/dist/lib/checkoutSubmit.d.ts.map +1 -1
- package/dist/lib/checkoutSubmit.js +45 -44
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +198 -184
- package/dist/pages/checkout/components/CheckoutLoadingSkeleton.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutLoadingSkeleton.js +10 -6
- package/dist/pages/checkout/components/CheckoutMobileSummaryDrawer.d.ts +13 -0
- package/dist/pages/checkout/components/CheckoutMobileSummaryDrawer.d.ts.map +1 -0
- package/dist/pages/checkout/components/CheckoutMobileSummaryDrawer.js +95 -0
- package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts +4 -1
- package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutSummaryColumn.js +22 -20
- package/dist/storefront.css +1 -1
- package/dist/storefrontSchemas.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/pkg/booking-engine/dist/models/types-rIp4ReXN.js +0 -8
- package/dist/chunks/pkg/booking-engine/dist/schemas/base-product-Bde9lJQD.js +0 -4
- package/dist/chunks/pkg/booking-engine/dist/schemas-JjiUWFIv.js +0 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nonEmptyKeySchema as e } from "./types-
|
|
1
|
+
import { nonEmptyKeySchema as e } from "./types-ynW5hdp8.js";
|
|
2
2
|
import { z as t } from "zod";
|
|
3
3
|
//#region ../booking-engine/dist/models/LocalizedString.js
|
|
4
4
|
var n = /^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/, r = /* @__PURE__ */ new Date("2025-01-01T00:00:00.000Z"), i = t.object({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { identifierSchema as e, isoDateTimeSchema as t } from "./types-
|
|
2
|
-
import { localizedStringArraySchema as n, localizedStringSchema as r } from "./LocalizedString-
|
|
1
|
+
import { identifierSchema as e, isoDateTimeSchema as t } from "./types-ynW5hdp8.js";
|
|
2
|
+
import { localizedStringArraySchema as n, localizedStringSchema as r } from "./LocalizedString-JmOX62C3.js";
|
|
3
3
|
import { moneyMinorSchema as i } from "../schemas/money-CVoCY4of.js";
|
|
4
4
|
import { priceSchema as a } from "./Price-DCAgqkKh.js";
|
|
5
|
-
import { productIdSchema as o } from "../schemas/product-id
|
|
5
|
+
import { productIdSchema as o } from "../schemas/product-id-ChdStzgp.js";
|
|
6
6
|
import { z as s } from "zod";
|
|
7
7
|
//#region ../booking-engine/dist/models/Product.shared.js
|
|
8
8
|
var c = s.enum([
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z as e } from "zod";
|
|
2
|
+
//#region ../booking-engine/dist/models/types.js
|
|
3
|
+
var t = e.string().min(1, "Identifier cannot be empty"), n = e.string().regex(/^[a-fA-F0-9]{24}$/, "Identifier must be a MongoDB ObjectId"), r = e.string().min(1, "Record key cannot be empty"), i = e.string().datetime({
|
|
4
|
+
offset: !0,
|
|
5
|
+
message: "Value must be an ISO-8601 timestamp"
|
|
6
|
+
}), a = e.record(r, e.union([e.boolean(), e.number()]));
|
|
7
|
+
//#endregion
|
|
8
|
+
export { a as booleanNumberRecordSchema, t as identifierSchema, i as isoDateTimeSchema, r as nonEmptyKeySchema, n as objectIdStringSchema };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { booleanNumberRecordSchema as e, identifierSchema as t, isoDateTimeSchema as n, objectIdStringSchema as r } from "../models/types-
|
|
2
|
-
import { productIdSchema as i } from "./product-id
|
|
3
|
-
import { productVariantIdentifierSchema as a } from "../models/Product.shared-
|
|
1
|
+
import { booleanNumberRecordSchema as e, identifierSchema as t, isoDateTimeSchema as n, objectIdStringSchema as r } from "../models/types-ynW5hdp8.js";
|
|
2
|
+
import { productIdSchema as i } from "./product-id-ChdStzgp.js";
|
|
3
|
+
import { productVariantIdentifierSchema as a } from "../models/Product.shared-C_HehlKK.js";
|
|
4
4
|
import { z as o } from "zod";
|
|
5
5
|
//#region ../booking-engine/dist/schemas/base-asset.js
|
|
6
6
|
var s = o.enum([
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { identifierSchema as e, isoDateTimeSchema as t, objectIdStringSchema as n
|
|
2
|
-
import { moneyMinorSchema as
|
|
3
|
-
import { productIdSchema as
|
|
4
|
-
import { productKindSchema as
|
|
1
|
+
import { identifierSchema as e, isoDateTimeSchema as t, objectIdStringSchema as n } from "../models/types-ynW5hdp8.js";
|
|
2
|
+
import { moneyMinorSchema as r } from "./money-CVoCY4of.js";
|
|
3
|
+
import { productIdSchema as i } from "./product-id-ChdStzgp.js";
|
|
4
|
+
import { productKindSchema as a } from "../models/Product.shared-C_HehlKK.js";
|
|
5
|
+
import { bookingReferenceSchema as o } from "./booking-reference-DLKcpIa4.js";
|
|
5
6
|
import { richTextSchema as s } from "./rich-text-DTRh7U3z.js";
|
|
6
|
-
import { cancellationPolicySchema as c } from "./booking-engine-configuration-
|
|
7
|
-
import { bookingInsuranceSnapshotSchema as l } from "./insurance-
|
|
7
|
+
import { cancellationPolicySchema as c } from "./booking-engine-configuration-CxKlxKCo.js";
|
|
8
|
+
import { bookingInsuranceSnapshotSchema as l } from "./insurance-B-Vmdlxo.js";
|
|
8
9
|
import { z as u } from "zod";
|
|
9
10
|
//#region ../booking-engine/dist/schemas/base-booking.js
|
|
10
11
|
var d = u.enum([
|
|
@@ -17,8 +18,8 @@ var d = u.enum([
|
|
|
17
18
|
"expired"
|
|
18
19
|
]), f = u.object({
|
|
19
20
|
_id: e,
|
|
20
|
-
productId:
|
|
21
|
-
kind:
|
|
21
|
+
productId: i,
|
|
22
|
+
kind: a,
|
|
22
23
|
qty: u.number().int().positive(),
|
|
23
24
|
productVariantId: e.optional()
|
|
24
25
|
}), p = u.object({
|
|
@@ -40,7 +41,7 @@ var d = u.enum([
|
|
|
40
41
|
message: s.optional()
|
|
41
42
|
}), m = u.object({
|
|
42
43
|
_id: n,
|
|
43
|
-
externalId:
|
|
44
|
+
externalId: o,
|
|
44
45
|
state: d,
|
|
45
46
|
shopId: e,
|
|
46
47
|
customer: p,
|
|
@@ -52,12 +53,12 @@ var d = u.enum([
|
|
|
52
53
|
items: u.array(f),
|
|
53
54
|
couponCode: u.string().min(1).optional(),
|
|
54
55
|
couponDiscountRate: u.number().min(0).max(1).optional(),
|
|
55
|
-
couponDiscountAmountUnits:
|
|
56
|
+
couponDiscountAmountUnits: r.optional(),
|
|
56
57
|
couponAutoApplied: u.boolean().optional(),
|
|
57
58
|
couponPriceRuleId: e.optional(),
|
|
58
|
-
lateReturnSurchargeUnits:
|
|
59
|
+
lateReturnSurchargeUnits: r.optional(),
|
|
59
60
|
insurance: l.optional(),
|
|
60
|
-
totalPriceUnits:
|
|
61
|
+
totalPriceUnits: r.optional(),
|
|
61
62
|
cancellationPolicySnapshot: c.optional(),
|
|
62
63
|
cancellationPolicyOverride: c.optional(),
|
|
63
64
|
createdAt: t,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { localizedStringSchema as e } from "../models/LocalizedString-
|
|
1
|
+
import { localizedStringSchema as e } from "../models/LocalizedString-JmOX62C3.js";
|
|
2
2
|
import { currencyCodeSchema as t } from "./money-CVoCY4of.js";
|
|
3
3
|
import { priceUnitSchema as n } from "../models/Price-DCAgqkKh.js";
|
|
4
4
|
import { shopConfigurationSchema as r } from "./shop-opening-hours-BlLD1gfz.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z as e } from "zod";
|
|
2
|
+
//#region ../booking-engine/dist/schemas/booking-reference.js
|
|
3
|
+
var t = 4, n = /^[0-9]{2}(?:0[1-9]|1[0-2])$/, r = /^[0-9A-HJKMNP-TV-Z]{3}-[0-9]{2}(?:0[1-9]|1[0-2])-(?!0+$)[0-9]{4,}$/, i = e.string().regex(n, "Booking reference period must use the YYMM format."), a = e.string().trim().regex(r, "Booking reference must use the PREFIX-YYMM-NNNN format.");
|
|
4
|
+
function o(e) {
|
|
5
|
+
let t = String(e.startYear % 100).padStart(2, "0"), n = String(e.startMonth).padStart(2, "0");
|
|
6
|
+
return i.parse(`${t}${n}`);
|
|
7
|
+
}
|
|
8
|
+
function s(e) {
|
|
9
|
+
let t = e.workspaceTrackingPrefix.trim().toUpperCase(), n = i.parse(e.startYearMonth), r = String(e.sequenceValue).padStart(4, "0");
|
|
10
|
+
return a.parse(`${t}-${n}-${r}`);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as BOOKING_REFERENCE_COUNTER_MIN_DIGITS, r as BOOKING_REFERENCE_REGEX, n as BOOKING_REFERENCE_YEAR_MONTH_REGEX, a as bookingReferenceSchema, i as bookingReferenceYearMonthSchema, s as formatBookingReference, o as formatBookingReferenceYearMonth };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { identifierSchema as e } from "../models/types-
|
|
1
|
+
import { identifierSchema as e } from "../models/types-ynW5hdp8.js";
|
|
2
2
|
import { moneyMinorSchema as t } from "./money-CVoCY4of.js";
|
|
3
|
-
import { productIdSchema as n } from "./product-id
|
|
4
|
-
import "../models/Product.shared-
|
|
3
|
+
import { productIdSchema as n } from "./product-id-ChdStzgp.js";
|
|
4
|
+
import "../models/Product.shared-C_HehlKK.js";
|
|
5
5
|
import { richTextSchema as r } from "./rich-text-DTRh7U3z.js";
|
|
6
6
|
import { isoDateSchema as i, timeOfDaySchema as a } from "./shop-opening-hours-BlLD1gfz.js";
|
|
7
|
-
import { fulfillmentModeSchema as o } from "./public-booking-engine-configuration-
|
|
7
|
+
import { fulfillmentModeSchema as o } from "./public-booking-engine-configuration-BwWn9aK0.js";
|
|
8
8
|
import { z as s } from "zod";
|
|
9
9
|
//#region ../booking-engine/dist/schemas/cart-inputs.js
|
|
10
10
|
var c = s.object({
|
package/dist/chunks/pkg/booking-engine/dist/schemas/{insurance-DXc34Bzy.js → insurance-B-Vmdlxo.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { identifierSchema as e, isoDateTimeSchema as t } from "../models/types-
|
|
1
|
+
import { identifierSchema as e, isoDateTimeSchema as t } from "../models/types-ynW5hdp8.js";
|
|
2
2
|
import { moneyMinorSchema as n } from "./money-CVoCY4of.js";
|
|
3
|
-
import { productIdSchema as r } from "./product-id
|
|
4
|
-
import { productKindSchema as i } from "../models/Product.shared-
|
|
3
|
+
import { productIdSchema as r } from "./product-id-ChdStzgp.js";
|
|
4
|
+
import { productKindSchema as i } from "../models/Product.shared-C_HehlKK.js";
|
|
5
5
|
import { z as a } from "zod";
|
|
6
6
|
//#region ../booking-engine/dist/schemas/insurance.js
|
|
7
7
|
var o = a.enum(["sharelock", "morio"]), s = a.enum(["storefront", "staff"]), c = a.object({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { timeOfDaySchema as e } from "./shop-opening-hours-BlLD1gfz.js";
|
|
2
|
-
import { bookingEngineConfigurationSchema as t, checkoutConfigurationSchema as n } from "./booking-engine-configuration-
|
|
2
|
+
import { bookingEngineConfigurationSchema as t, checkoutConfigurationSchema as n } from "./booking-engine-configuration-CxKlxKCo.js";
|
|
3
3
|
import { z as r } from "zod";
|
|
4
4
|
//#region ../booking-engine/dist/schemas/public-booking-engine-configuration.js
|
|
5
5
|
var i = r.enum(["pickup", "delivery"]), a = r.object({
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createLocalizedStringEntry as e, getLocalizedStringValue as t, localizedStringArraySchema as n, localizedStringEntrySchema as r, localizedStringSchema as i } from "./models/LocalizedString-JmOX62C3.js";
|
|
2
|
+
import { currencyCodeSchema as a, currencyMinorUnitDigits as o, majorToMinor as s, minorToMajor as c, moneyMinorSchema as l, signedMoneyMinorSchema as u } from "./schemas/money-CVoCY4of.js";
|
|
3
|
+
import { priceSchema as d, priceUnitSchema as f } from "./models/Price-DCAgqkKh.js";
|
|
4
|
+
import { productIdSchema as p } from "./schemas/product-id-ChdStzgp.js";
|
|
5
|
+
import { DEFAULT_PRODUCT_KIND as m, PRODUCT_VARIANT_CODE_IDENTIFIER_KIND as h, PRODUCT_VARIANT_CODE_MAX_LENGTH as g, accessoryProductSchema as _, bikeProductSchema as v, eBikeProductSchema as y, isProductVariantCodeIdentifierKind as b, productInsuranceSchema as x, productKindSchema as S, productSchema as C, productStorefrontDisplayModeSchema as w, productVariantAttributeSchema as T, productVariantCodeSchema as E, productVariantIdentifierSchema as D, productVariantSchema as O } from "./models/Product.shared-C_HehlKK.js";
|
|
6
|
+
import { BOOKING_REFERENCE_COUNTER_MIN_DIGITS as k, BOOKING_REFERENCE_REGEX as A, BOOKING_REFERENCE_YEAR_MONTH_REGEX as j, bookingReferenceSchema as M, bookingReferenceYearMonthSchema as N, formatBookingReference as P, formatBookingReferenceYearMonth as F } from "./schemas/booking-reference-DLKcpIa4.js";
|
|
7
|
+
import { richTextJsonDocSchema as I, richTextSchema as L, richTextVersionSchema as R } from "./schemas/rich-text-DTRh7U3z.js";
|
|
8
|
+
import { isoDateSchema as z, shopConfigurationSchema as B, shopExtraTimeSlotRuleSchema as V, shopOpeningDayIndexSchema as H, shopOpeningDaySchema as U, shopOpeningHoursOverrideSchema as W, shopOpeningHoursPeriodSchema as G, shopOpeningSlotSchema as K, timeOfDaySchema as q } from "./schemas/shop-opening-hours-BlLD1gfz.js";
|
|
9
|
+
import { DEFAULT_CANCELLATION_POLICY as J, DEFAULT_PAYMENT_POLICIES as Y, cancellationPolicySchema as X, cancellationPolicyTierSchema as Z, paymentPoliciesSchema as Q } from "./schemas/booking-engine-configuration-CxKlxKCo.js";
|
|
10
|
+
import { fulfillmentModeSchema as $, publicBookingEngineConfigurationSchema as ee, publicCheckoutConfigurationSchema as te, publicCheckoutDynamicOptionsSchema as ne } from "./schemas/public-booking-engine-configuration-BwWn9aK0.js";
|
|
11
|
+
import { DEFAULT_BOOKING_DELIVERY_OPTION as re, bookingCustomerInputSchema as ie, bookingDeliveryOptionSchema as ae, bookingScheduleInputSchema as oe, cartItemInputSchema as se, createBookingInputBaseSchema as ce, createBookingInputSchema as le, resolveBookingDeliveryOption as ue, validateBookingDeliveryAddress as de } from "./schemas/cart-inputs-D1KobIdr.js";
|
|
12
|
+
import { bookingInsuranceConsentSourceSchema as fe, bookingInsuranceItemSnapshotSchema as pe, bookingInsuranceSnapshotSchema as me, buildBookingInsuranceSnapshot as he, calculateInsuranceCalendarDays as ge, insuranceProviderSchema as _e } from "./schemas/insurance-B-Vmdlxo.js";
|
|
13
|
+
import { resolveOpeningHoursForDate as ve, resolveOpeningHoursPeriodForDate as ye } from "./utils/opening-hours-period-TCyLhzZw.js";
|
|
14
|
+
import "./schemas/base-product-QYQBl0fQ.js";
|
|
15
|
+
import { assetIdSchema as be, baseAssetSchema as xe, baseAssetStatusSchema as Se } from "./schemas/base-asset-CFAxfmRW.js";
|
|
16
|
+
import { baseBookingItemSchema as Ce, baseBookingSchema as we, baseBookingStateSchema as Te } from "./schemas/base-booking-CZOR9kya.js";
|
|
17
|
+
export { k as BOOKING_REFERENCE_COUNTER_MIN_DIGITS, A as BOOKING_REFERENCE_REGEX, j as BOOKING_REFERENCE_YEAR_MONTH_REGEX, re as DEFAULT_BOOKING_DELIVERY_OPTION, J as DEFAULT_CANCELLATION_POLICY, Y as DEFAULT_PAYMENT_POLICIES, m as DEFAULT_PRODUCT_KIND, h as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, g as PRODUCT_VARIANT_CODE_MAX_LENGTH, _ as accessoryProductSchema, be as assetIdSchema, xe as baseAssetSchema, Se as baseAssetStatusSchema, Ce as baseBookingItemSchema, we as baseBookingSchema, Te as baseBookingStateSchema, v as bikeProductSchema, ie as bookingCustomerInputSchema, ae as bookingDeliveryOptionSchema, fe as bookingInsuranceConsentSourceSchema, pe as bookingInsuranceItemSnapshotSchema, me as bookingInsuranceSnapshotSchema, M as bookingReferenceSchema, N as bookingReferenceYearMonthSchema, oe as bookingScheduleInputSchema, he as buildBookingInsuranceSnapshot, ge as calculateInsuranceCalendarDays, X as cancellationPolicySchema, Z as cancellationPolicyTierSchema, se as cartItemInputSchema, ce as createBookingInputBaseSchema, le as createBookingInputSchema, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, y as eBikeProductSchema, P as formatBookingReference, F as formatBookingReferenceYearMonth, $ as fulfillmentModeSchema, t as getLocalizedStringValue, _e as insuranceProviderSchema, b as isProductVariantCodeIdentifierKind, z as isoDateSchema, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, Q as paymentPoliciesSchema, d as priceSchema, f as priceUnitSchema, p as productIdSchema, x as productInsuranceSchema, S as productKindSchema, C as productSchema, w as productStorefrontDisplayModeSchema, T as productVariantAttributeSchema, E as productVariantCodeSchema, D as productVariantIdentifierSchema, O as productVariantSchema, ee as publicBookingEngineConfigurationSchema, te as publicCheckoutConfigurationSchema, ne as publicCheckoutDynamicOptionsSchema, ue as resolveBookingDeliveryOption, ve as resolveOpeningHoursForDate, ye as resolveOpeningHoursPeriodForDate, I as richTextJsonDocSchema, L as richTextSchema, R as richTextVersionSchema, B as shopConfigurationSchema, V as shopExtraTimeSlotRuleSchema, H as shopOpeningDayIndexSchema, U as shopOpeningDaySchema, W as shopOpeningHoursOverrideSchema, G as shopOpeningHoursPeriodSchema, K as shopOpeningSlotSchema, u as signedMoneyMinorSchema, q as timeOfDaySchema, de as validateBookingDeliveryAddress };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveOpeningHoursForDate as e } from "../../chunks/pkg/booking-engine/dist/utils/opening-hours-period-TCyLhzZw.js";
|
|
2
|
-
import "../../chunks/pkg/booking-engine/dist/schemas-
|
|
2
|
+
import "../../chunks/pkg/booking-engine/dist/schemas-lb2iTDMd.js";
|
|
3
3
|
import { businessDateStringToDate as t, calendarDateToBusinessDateString as n, instantToBusinessDateTimeParts as r, normalizeBusinessDateString as i, parseTimeToMinutes as a } from "../../lib/booking-period.js";
|
|
4
4
|
//#region src/components/Footer/businessHoursStatus.ts
|
|
5
5
|
var o = 370, s = (e, r) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAIvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAIvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAUtE,KAAK,WAAW,GAAG;IACjB,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;IACjD,kBAAkB,EAAE,6BAA6B,CAAA;CAClD,CAAA;AAED,wBAAgB,MAAM,CAAC,EACrB,uBAAuB,EACvB,kBAAkB,GACnB,EAAE,WAAW,2CA+Fb"}
|
|
@@ -17,54 +17,66 @@ import { Outlet as _, useLocation as v, useParams as y } from "@rpcbase/router";
|
|
|
17
17
|
import { useTranslation as b } from "react-i18next";
|
|
18
18
|
import { Toaster as x } from "sonner";
|
|
19
19
|
//#region src/components/Layout/index.tsx
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
var S = {
|
|
21
|
+
"--toast-close-button-start": "unset",
|
|
22
|
+
"--toast-close-button-end": "0",
|
|
23
|
+
"--toast-close-button-transform": "translate(35%, -35%)"
|
|
24
|
+
};
|
|
25
|
+
function C({ storefrontConfiguration: C, storefrontProducts: w }) {
|
|
26
|
+
let { storeSlug: T, referenceId: E } = y(), D = v(), { i18n: O } = b(), [k, A] = f(!1);
|
|
22
27
|
d(() => {
|
|
23
|
-
|
|
28
|
+
A(!0), document.documentElement.setAttribute("data-hydrated", "true");
|
|
24
29
|
}, []);
|
|
25
|
-
let
|
|
26
|
-
storefrontConfiguration:
|
|
27
|
-
language:
|
|
28
|
-
}),
|
|
30
|
+
let j = t({
|
|
31
|
+
storefrontConfiguration: C,
|
|
32
|
+
language: O.language
|
|
33
|
+
}), M = j?.href, N = typeof E == "string" && E.trim().length > 0, P = N && new URLSearchParams(D.search).get("pdf") === "1", F = /\/checkout\/?$/.test(D.pathname), I = !!(M && C?.content?.showWhatsappFloatingButton !== !1), L = F ? { bottom: I ? "calc(10rem + env(safe-area-inset-bottom))" : "calc(5.5rem + env(safe-area-inset-bottom))" } : void 0;
|
|
29
34
|
return /* @__PURE__ */ h(g, { children: [/* @__PURE__ */ m(x, {
|
|
30
35
|
id: l,
|
|
31
36
|
closeButton: !0,
|
|
37
|
+
className: F ? "lg:!bottom-6" : void 0,
|
|
38
|
+
mobileOffset: L,
|
|
39
|
+
offset: L,
|
|
32
40
|
position: "bottom-center",
|
|
41
|
+
style: S,
|
|
33
42
|
theme: "dark"
|
|
34
43
|
}), /* @__PURE__ */ m(u, { children: /* @__PURE__ */ m(e, {
|
|
35
|
-
storeSlug:
|
|
36
|
-
products:
|
|
44
|
+
storeSlug: T ?? "",
|
|
45
|
+
products: w,
|
|
37
46
|
children: /* @__PURE__ */ m("div", {
|
|
38
|
-
className: `loczer-storefront flex w-full min-w-0 flex-col overflow-x-clip bg-background text-foreground ${
|
|
39
|
-
children:
|
|
40
|
-
className: `flex-1 ${
|
|
47
|
+
className: `loczer-storefront flex w-full min-w-0 flex-col overflow-x-clip bg-background text-foreground ${N && !P ? "h-dvh overflow-hidden" : "min-h-screen"}`,
|
|
48
|
+
children: N ? /* @__PURE__ */ m("main", {
|
|
49
|
+
className: `flex-1 ${P ? "bg-white" : "overflow-hidden"}`,
|
|
41
50
|
children: /* @__PURE__ */ m(_, {})
|
|
42
51
|
}) : /* @__PURE__ */ h(p, { children: [
|
|
43
52
|
/* @__PURE__ */ m(r, {
|
|
44
|
-
storefrontConfiguration:
|
|
45
|
-
whatsappHref:
|
|
46
|
-
whatsappPhoneDisplay:
|
|
53
|
+
storefrontConfiguration: C,
|
|
54
|
+
whatsappHref: M,
|
|
55
|
+
whatsappPhoneDisplay: j?.phoneDisplay
|
|
47
56
|
}),
|
|
48
57
|
/* @__PURE__ */ m("main", {
|
|
49
58
|
className: "min-w-0 flex-1",
|
|
50
59
|
children: /* @__PURE__ */ m(_, {})
|
|
51
60
|
}),
|
|
52
61
|
/* @__PURE__ */ m(n, {
|
|
53
|
-
storeSlug:
|
|
54
|
-
shop:
|
|
55
|
-
whatsappHref:
|
|
56
|
-
whatsappPhoneDisplay:
|
|
57
|
-
openingHours:
|
|
58
|
-
openingHoursOverrides:
|
|
59
|
-
timeZone:
|
|
60
|
-
showInsuranceTerms: c(
|
|
62
|
+
storeSlug: T,
|
|
63
|
+
shop: C?.shop,
|
|
64
|
+
whatsappHref: M,
|
|
65
|
+
whatsappPhoneDisplay: j?.phoneDisplay,
|
|
66
|
+
openingHours: C?.bookingEngine.shop.openingHours,
|
|
67
|
+
openingHoursOverrides: C?.bookingEngine.shop.openingHoursOverrides,
|
|
68
|
+
timeZone: C?.bookingEngine.shop.timeZone,
|
|
69
|
+
showInsuranceTerms: c(C?.information?.insuranceTerms)
|
|
61
70
|
}),
|
|
62
71
|
/* @__PURE__ */ m(i, {}),
|
|
63
|
-
|
|
64
|
-
|
|
72
|
+
k ? /* @__PURE__ */ h(p, { children: [I ? /* @__PURE__ */ m(s, {
|
|
73
|
+
href: M,
|
|
74
|
+
avoidMobileBottomBar: F
|
|
75
|
+
}, F ? "checkout" : "default") : null, /* @__PURE__ */ m(a, {})] }) : null,
|
|
76
|
+
/* @__PURE__ */ m(o, { storefrontConfiguration: C })
|
|
65
77
|
] })
|
|
66
78
|
})
|
|
67
79
|
}) })] });
|
|
68
80
|
}
|
|
69
81
|
//#endregion
|
|
70
|
-
export {
|
|
82
|
+
export { C as Layout };
|
|
@@ -14,11 +14,12 @@ type StorefrontCartPanelProps = {
|
|
|
14
14
|
editable?: boolean;
|
|
15
15
|
summaryAddon?: ReactNode;
|
|
16
16
|
pricingSummary?: ReactNode;
|
|
17
|
+
presentation?: "card" | "flat";
|
|
17
18
|
stickyTopClassName?: string;
|
|
18
19
|
onQuantityChange?: (key: string, quantity: number) => void;
|
|
19
20
|
onRemove?: (key: string) => void;
|
|
20
21
|
onClear?: () => void;
|
|
21
22
|
};
|
|
22
|
-
export declare function StorefrontCartPanel({ lines, itemCount, baseUnitLabel, totalMinor, title, description, headerAddon, checkoutPath, showCheckoutAction, showClearAction, editable, summaryAddon, pricingSummary, stickyTopClassName, onQuantityChange, onRemove, onClear, }: StorefrontCartPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function StorefrontCartPanel({ lines, itemCount, baseUnitLabel, totalMinor, title, description, headerAddon, checkoutPath, showCheckoutAction, showClearAction, editable, summaryAddon, pricingSummary, presentation, stickyTopClassName, onQuantityChange, onRemove, onClear, }: StorefrontCartPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
export {};
|
|
24
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontCartPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAQtE,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,yBAAyB,EAAE,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1D,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,KAAK,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,kBAA0B,EAC1B,eAAuB,EACvB,QAAe,EACf,YAAY,EACZ,cAAc,EACd,kBAA6B,EAC7B,gBAAgB,EAChB,QAAQ,EACR,OAAO,GACR,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontCartPanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAQtE,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,yBAAyB,EAAE,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1D,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,KAAK,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,kBAA0B,EAC1B,eAAuB,EACvB,QAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAqB,EACrB,kBAA6B,EAC7B,gBAAgB,EAChB,QAAQ,EACR,OAAO,GACR,EAAE,wBAAwB,2CAoK1B"}
|
|
@@ -10,22 +10,22 @@ import { useTranslation as l } from "react-i18next";
|
|
|
10
10
|
import { cn as u } from "@rpcbase/ui";
|
|
11
11
|
import { ArrowRight as d, Trash2 as f } from "lucide-react";
|
|
12
12
|
//#region src/components/StorefrontCartPanel/index.tsx
|
|
13
|
-
function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _, description: v, headerAddon: y, checkoutPath: b, showCheckoutAction: x = !1, showClearAction: S = !1, editable: C = !0, summaryAddon: w, pricingSummary: T,
|
|
14
|
-
let { t:
|
|
15
|
-
return /* @__PURE__ */ s(i, {
|
|
16
|
-
className: u("sticky border-slate-200 bg-white shadow-sm", E),
|
|
13
|
+
function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _, description: v, headerAddon: y, checkoutPath: b, showCheckoutAction: x = !1, showClearAction: S = !1, editable: C = !0, summaryAddon: w, pricingSummary: T, presentation: E = "card", stickyTopClassName: D = "top-24", onQuantityChange: O, onRemove: k, onClear: A }) {
|
|
14
|
+
let { t: j, i18n: M } = l();
|
|
15
|
+
return /* @__PURE__ */ s(E === "flat" ? "div" : i, {
|
|
16
|
+
className: u(E === "flat" ? "flex flex-col bg-transparent" : "sticky border-slate-200 bg-white shadow-sm", E === "card" ? D : void 0),
|
|
17
17
|
children: [/* @__PURE__ */ s("div", {
|
|
18
|
-
className: "border-b border-slate-200 px-4 py-4",
|
|
18
|
+
className: u("border-b border-slate-200", E === "flat" ? "pb-4" : "px-4 py-4"),
|
|
19
19
|
children: [
|
|
20
20
|
/* @__PURE__ */ s("div", {
|
|
21
21
|
className: "flex items-center justify-between gap-3",
|
|
22
22
|
children: [/* @__PURE__ */ o("p", {
|
|
23
23
|
className: "text-sm font-semibold text-slate-950",
|
|
24
|
-
children: /* @__PURE__ */ o("span", { children: _ ??
|
|
24
|
+
children: /* @__PURE__ */ o("span", { children: _ ?? j("cart_title") })
|
|
25
25
|
}), /* @__PURE__ */ o(t, {
|
|
26
26
|
variant: "outline",
|
|
27
27
|
className: "border-slate-200 bg-white text-slate-700",
|
|
28
|
-
children: /* @__PURE__ */ o("span", { children:
|
|
28
|
+
children: /* @__PURE__ */ o("span", { children: j("cart_items_count", { count: m }) })
|
|
29
29
|
})]
|
|
30
30
|
}),
|
|
31
31
|
v ? /* @__PURE__ */ o("p", {
|
|
@@ -35,15 +35,15 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
35
35
|
y
|
|
36
36
|
]
|
|
37
37
|
}), /* @__PURE__ */ s("div", {
|
|
38
|
-
className: "grid gap-3 p-4",
|
|
38
|
+
className: u("grid gap-3", E === "flat" ? "pt-4" : "p-4"),
|
|
39
39
|
children: [
|
|
40
40
|
p.length === 0 ? /* @__PURE__ */ o("p", {
|
|
41
41
|
className: "text-sm text-slate-600",
|
|
42
|
-
children: /* @__PURE__ */ o("span", { children:
|
|
42
|
+
children: /* @__PURE__ */ o("span", { children: j("cart_empty") })
|
|
43
43
|
}) : /* @__PURE__ */ o("ul", {
|
|
44
44
|
className: "divide-y divide-slate-200",
|
|
45
45
|
children: p.map((i) => {
|
|
46
|
-
let c = e(i.unitPriceMinor,
|
|
46
|
+
let c = e(i.unitPriceMinor, M.language), l = i.insufficientCapacity === !0, u = i.availabilityIssue === "quantityUnavailable" ? j("availability_quantity_unavailable") : j("availability_out_of_stock");
|
|
47
47
|
return /* @__PURE__ */ s("li", {
|
|
48
48
|
className: "flex items-start justify-between gap-3 py-4 first:pt-0 last:pb-0",
|
|
49
49
|
children: [/* @__PURE__ */ s("div", {
|
|
@@ -55,7 +55,7 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
55
55
|
}),
|
|
56
56
|
i.productVariantLabel ? /* @__PURE__ */ o("p", {
|
|
57
57
|
className: "text-xs text-slate-600",
|
|
58
|
-
children: /* @__PURE__ */ o("span", { children: `${
|
|
58
|
+
children: /* @__PURE__ */ o("span", { children: `${j(i.productVariantIsSize ? "product_size_label" : "product_variant_label")}: ${i.productVariantLabel}` })
|
|
59
59
|
}) : null,
|
|
60
60
|
i.productVariantDescription ? /* @__PURE__ */ o("p", {
|
|
61
61
|
className: "text-xs text-slate-500",
|
|
@@ -64,7 +64,7 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
64
64
|
/* @__PURE__ */ o(a, { warning: i.productWarning }),
|
|
65
65
|
/* @__PURE__ */ o("p", {
|
|
66
66
|
className: "text-xs text-slate-600",
|
|
67
|
-
children: /* @__PURE__ */ o("span", { children:
|
|
67
|
+
children: /* @__PURE__ */ o("span", { children: j("cart_line_meta", {
|
|
68
68
|
quantity: i.quantity,
|
|
69
69
|
price: c,
|
|
70
70
|
unit: h
|
|
@@ -80,24 +80,24 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
80
80
|
]
|
|
81
81
|
}), C ? /* @__PURE__ */ s("div", {
|
|
82
82
|
className: "flex items-center gap-2",
|
|
83
|
-
children: [
|
|
83
|
+
children: [O ? /* @__PURE__ */ o(r, {
|
|
84
84
|
type: "number",
|
|
85
85
|
min: 1,
|
|
86
86
|
max: 99,
|
|
87
87
|
value: i.quantity,
|
|
88
88
|
onChange: (e) => {
|
|
89
89
|
let t = Number(e.target.value);
|
|
90
|
-
|
|
90
|
+
O(i.key, Number.isFinite(t) ? t : 0);
|
|
91
91
|
},
|
|
92
92
|
className: "h-9 w-16",
|
|
93
|
-
"aria-label":
|
|
94
|
-
}) : null,
|
|
93
|
+
"aria-label": j("quantity_label")
|
|
94
|
+
}) : null, k ? /* @__PURE__ */ o(n, {
|
|
95
95
|
type: "button",
|
|
96
96
|
variant: "ghost",
|
|
97
97
|
size: "icon",
|
|
98
98
|
className: "h-8 w-8 text-slate-500 hover:bg-slate-50 hover:text-slate-700",
|
|
99
|
-
onClick: () =>
|
|
100
|
-
"aria-label":
|
|
99
|
+
onClick: () => k(i.key),
|
|
100
|
+
"aria-label": j("remove_from_cart"),
|
|
101
101
|
children: /* @__PURE__ */ o(f, {
|
|
102
102
|
className: "h-4 w-4",
|
|
103
103
|
"aria-hidden": "true"
|
|
@@ -112,10 +112,10 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
112
112
|
className: "flex items-center justify-between gap-3 border-t border-slate-200 pt-3 text-sm",
|
|
113
113
|
children: [/* @__PURE__ */ o("p", {
|
|
114
114
|
className: "text-slate-700",
|
|
115
|
-
children: /* @__PURE__ */ o("span", { children:
|
|
115
|
+
children: /* @__PURE__ */ o("span", { children: j("cart_total") })
|
|
116
116
|
}), /* @__PURE__ */ o("p", {
|
|
117
117
|
className: "font-semibold text-slate-950",
|
|
118
|
-
children: /* @__PURE__ */ o("span", { children: e(g,
|
|
118
|
+
children: /* @__PURE__ */ o("span", { children: e(g, M.language) })
|
|
119
119
|
})]
|
|
120
120
|
}) : null),
|
|
121
121
|
/* @__PURE__ */ s("div", {
|
|
@@ -125,17 +125,17 @@ function p({ lines: p, itemCount: m, baseUnitLabel: h, totalMinor: g, title: _,
|
|
|
125
125
|
className: u(p.length > 0 ? "block" : "hidden"),
|
|
126
126
|
children: /* @__PURE__ */ s(n, {
|
|
127
127
|
className: "w-full gap-2",
|
|
128
|
-
children: [/* @__PURE__ */ o("span", { children:
|
|
128
|
+
children: [/* @__PURE__ */ o("span", { children: j("checkout_button") }), /* @__PURE__ */ o(d, {
|
|
129
129
|
className: "h-4 w-4",
|
|
130
130
|
"aria-hidden": "true"
|
|
131
131
|
})]
|
|
132
132
|
})
|
|
133
|
-
}) : null, S &&
|
|
133
|
+
}) : null, S && A ? /* @__PURE__ */ o(n, {
|
|
134
134
|
type: "button",
|
|
135
135
|
variant: "outline",
|
|
136
136
|
className: u(p.length > 0 ? "w-full gap-2" : "hidden"),
|
|
137
|
-
onClick:
|
|
138
|
-
children: /* @__PURE__ */ o("span", { children:
|
|
137
|
+
onClick: A,
|
|
138
|
+
children: /* @__PURE__ */ o("span", { children: j("cart_clear") })
|
|
139
139
|
}) : null]
|
|
140
140
|
})
|
|
141
141
|
]
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { WhatsAppFloatingButtonOptions } from './useWhatsAppFloatingButton';
|
|
2
|
-
type WhatsAppFloatingButtonProps = WhatsAppFloatingButtonOptions
|
|
3
|
-
|
|
2
|
+
type WhatsAppFloatingButtonProps = WhatsAppFloatingButtonOptions & {
|
|
3
|
+
avoidMobileBottomBar?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const WhatsAppFloatingButton: ({ avoidMobileBottomBar, ...options }: WhatsAppFloatingButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
6
|
export {};
|
|
5
7
|
//# sourceMappingURL=WhatsAppFloatingButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhatsAppFloatingButton.d.ts","sourceRoot":"","sources":["../../../src/components/WhatsAppFloatingButton/WhatsAppFloatingButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,6BAA6B,CAAA;AAGpC,KAAK,2BAA2B,GAAG,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"WhatsAppFloatingButton.d.ts","sourceRoot":"","sources":["../../../src/components/WhatsAppFloatingButton/WhatsAppFloatingButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,6BAA6B,CAAA;AAGpC,KAAK,2BAA2B,GAAG,6BAA6B,GAAG;IACjE,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B,CAAA;AAwBD,eAAO,MAAM,sBAAsB,GAAI,sCAGpC,2BAA2B,mDAiC7B,CAAA"}
|
|
@@ -36,22 +36,22 @@ function r({ className: e }) {
|
|
|
36
36
|
]
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
var i = (i) => {
|
|
40
|
-
let { href:
|
|
41
|
-
return typeof window > "u" || !
|
|
42
|
-
ref:
|
|
43
|
-
className: "fixed bottom-
|
|
39
|
+
var i = ({ avoidMobileBottomBar: i = !1, ...a }) => {
|
|
40
|
+
let { href: o, containerRef: s, bubbleRef: c, onLinkClick: l } = e(a);
|
|
41
|
+
return typeof window > "u" || !o ? null : /* @__PURE__ */ t("div", {
|
|
42
|
+
ref: s,
|
|
43
|
+
className: i ? "pointer-events-none fixed bottom-24 right-4 z-50 select-none lg:bottom-4" : "pointer-events-none fixed bottom-4 right-4 z-50 select-none",
|
|
44
44
|
children: /* @__PURE__ */ t("div", {
|
|
45
|
-
ref:
|
|
45
|
+
ref: c,
|
|
46
46
|
className: "pointer-events-auto",
|
|
47
47
|
style: { touchAction: "none" },
|
|
48
48
|
children: /* @__PURE__ */ n("a", {
|
|
49
|
-
href:
|
|
49
|
+
href: o,
|
|
50
50
|
target: "_blank",
|
|
51
51
|
rel: "nofollow noopener noreferrer",
|
|
52
52
|
className: "group inline-flex h-14 w-14 md:h-12 md:w-12 items-center justify-center rounded-full bg-[#25D366] hover:bg-[#1DA851] shadow-lg ring-1 ring-[#1DA851] transition-colors p-1",
|
|
53
53
|
"aria-label": "WhatsApp",
|
|
54
|
-
onClick:
|
|
54
|
+
onClick: l,
|
|
55
55
|
children: [/* @__PURE__ */ t(r, { className: "h-9 w-9 md:h-8 md:w-8" }), /* @__PURE__ */ t("span", {
|
|
56
56
|
className: "sr-only",
|
|
57
57
|
children: "WhatsApp"
|
package/dist/i18n/en.d.ts
CHANGED
|
@@ -207,6 +207,9 @@ export declare const storefront: {
|
|
|
207
207
|
checkout_booking_period_edit: string;
|
|
208
208
|
checkout_summary_title: string;
|
|
209
209
|
checkout_summary_description: string;
|
|
210
|
+
checkout_mobile_summary_button: string;
|
|
211
|
+
checkout_mobile_submit: string;
|
|
212
|
+
checkout_mobile_continue_to_payment: string;
|
|
210
213
|
checkout_booking_subtotal: string;
|
|
211
214
|
checkout_estimated_duration: string;
|
|
212
215
|
checkout_estimated_total: string;
|
package/dist/i18n/en.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAihBtB,CAAA"}
|
package/dist/i18n/en.js
CHANGED
|
@@ -208,6 +208,9 @@ var e = {
|
|
|
208
208
|
checkout_booking_period_edit: "Edit",
|
|
209
209
|
checkout_summary_title: "Summary",
|
|
210
210
|
checkout_summary_description: "Cart and pricing recap.",
|
|
211
|
+
checkout_mobile_summary_button: "View summary ({{count}})",
|
|
212
|
+
checkout_mobile_submit: "Send request",
|
|
213
|
+
checkout_mobile_continue_to_payment: "Continue to payment",
|
|
211
214
|
checkout_booking_subtotal: "Subtotal",
|
|
212
215
|
checkout_estimated_duration: "Estimated duration",
|
|
213
216
|
checkout_estimated_total: "Total",
|
package/dist/i18n/fr.d.ts
CHANGED
|
@@ -208,6 +208,9 @@ export declare const storefront: {
|
|
|
208
208
|
checkout_booking_period_edit: string;
|
|
209
209
|
checkout_summary_title: string;
|
|
210
210
|
checkout_summary_description: string;
|
|
211
|
+
checkout_mobile_summary_button: string;
|
|
212
|
+
checkout_mobile_submit: string;
|
|
213
|
+
checkout_mobile_continue_to_payment: string;
|
|
211
214
|
checkout_booking_subtotal: string;
|
|
212
215
|
checkout_estimated_duration: string;
|
|
213
216
|
checkout_estimated_total: string;
|
package/dist/i18n/fr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkhBtB,CAAA"}
|
package/dist/i18n/fr.js
CHANGED
|
@@ -209,6 +209,9 @@ var e = {
|
|
|
209
209
|
checkout_booking_period_edit: "Modifier",
|
|
210
210
|
checkout_summary_title: "Récapitulatif",
|
|
211
211
|
checkout_summary_description: "Panier et récap des montants.",
|
|
212
|
+
checkout_mobile_summary_button: "Voir le récapitulatif ({{count}})",
|
|
213
|
+
checkout_mobile_submit: "Envoyer la demande",
|
|
214
|
+
checkout_mobile_continue_to_payment: "Continuer au paiement",
|
|
212
215
|
checkout_booking_subtotal: "Sous-total",
|
|
213
216
|
checkout_estimated_duration: "Durée estimée",
|
|
214
217
|
checkout_estimated_total: "Total",
|