@rebuy/rebuy 2.30.0-rc.2 → 2.30.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -5
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +9 -5
- package/dist/index.mjs.map +2 -2
- package/dist/pricing/computeDisplayPrice.d.ts +11 -4
- package/dist/pricing/computeDisplayPrice.d.ts.map +1 -1
- package/dist/pricing/index.js +9 -8
- package/dist/pricing/index.js.map +2 -2
- package/dist/pricing/index.mjs +9 -8
- package/dist/pricing/index.mjs.map +2 -2
- package/dist/pricing/priceVariant.d.ts +4 -2
- package/dist/pricing/priceVariant.d.ts.map +1 -1
- package/dist/pricing/types.d.ts +4 -0
- package/dist/pricing/types.d.ts.map +1 -1
- package/dist/schema/checkout-and-beyond/index.js +4 -1
- package/dist/schema/checkout-and-beyond/index.js.map +2 -2
- package/dist/schema/checkout-and-beyond/index.mjs +4 -1
- package/dist/schema/checkout-and-beyond/index.mjs.map +2 -2
- package/dist/schema/widget-data.js +4 -1
- package/dist/schema/widget-data.js.map +2 -2
- package/dist/schema/widget-data.mjs +4 -1
- package/dist/schema/widget-data.mjs.map +2 -2
- package/dist/schema/widgets/checkout-and-beyond/progressBar.d.ts +3 -2
- package/dist/schema/widgets/checkout-and-beyond/progressBar.d.ts.map +1 -1
- package/dist/schema/widgets/checkout-and-beyond/quantity.d.ts +1 -1
- package/dist/schema/widgets/checkout-and-beyond/quantity.d.ts.map +1 -1
- package/dist/server/analytics.d.ts +12 -1
- package/dist/server/analytics.d.ts.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +139 -5
- package/dist/server/index.js.map +4 -4
- package/dist/server/index.mjs +139 -5
- package/dist/server/index.mjs.map +4 -4
- package/dist/server/requestSchemas.d.ts +226 -0
- package/dist/server/requestSchemas.d.ts.map +1 -0
- package/dist/server/shared.d.ts +5 -139
- package/dist/server/shared.d.ts.map +1 -1
- package/dist/transforms/index.js +9 -5
- package/dist/transforms/index.js.map +2 -2
- package/dist/transforms/index.mjs +9 -5
- package/dist/transforms/index.mjs.map +2 -2
- package/dist/transforms/offerV1/convertOfferToV2.d.ts.map +1 -1
- package/dist/transforms/offerV1/types.d.ts +5 -2
- package/dist/transforms/offerV1/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2336,6 +2336,8 @@ var CABProgressBarSection = import_zod23.z.lazy(
|
|
|
2336
2336
|
selectOptions: { ...GIFT_LABELS.selectOptions },
|
|
2337
2337
|
yourGift: { ...GIFT_LABELS.yourGift }
|
|
2338
2338
|
})),
|
|
2339
|
+
/** The bar's a11y label; the merchant names it in the editor, else this default (React parity). */
|
|
2340
|
+
name: import_zod23.z.string().default("Order progress"),
|
|
2339
2341
|
/**
|
|
2340
2342
|
* Bar fill color. An explicit (widget-authored) value is used verbatim; when absent the server
|
|
2341
2343
|
* fills it with the live shop theme's `buttonBackground` (React `useRebuyTheme` parity). Still
|
|
@@ -2377,7 +2379,8 @@ var CABQuantitySection = import_zod24.z.object({
|
|
|
2377
2379
|
inputType: import_zod24.z.enum(quantityInputs).default(QuantityInput.select),
|
|
2378
2380
|
max: import_zod24.z.number().min(1).max(100).default(10),
|
|
2379
2381
|
min: import_zod24.z.number().min(1).default(1),
|
|
2380
|
-
|
|
2382
|
+
/** The a11y label for the quantity control; the merchant names it in the editor, else this default. */
|
|
2383
|
+
name: import_zod24.z.string().default("Quantity"),
|
|
2381
2384
|
rule: CABRule.optional(),
|
|
2382
2385
|
sectionId: import_zod24.z.uuid().default(() => (0, import_uuid9.v7)()),
|
|
2383
2386
|
sectionType: import_zod24.z.literal(SectionType.quantity).default(SectionType.quantity)
|
|
@@ -4182,10 +4185,11 @@ var bannerMessageContent = (message) => {
|
|
|
4182
4185
|
return sanitized ? { ...OFFER_LABELS.addedToCartMessage, en: sanitized } : OFFER_LABELS.addedToCartMessage;
|
|
4183
4186
|
};
|
|
4184
4187
|
var coerceIntegrations = (integrations) => Object.fromEntries(
|
|
4185
|
-
Object.entries(integrations).map(([key, value]) =>
|
|
4186
|
-
key,
|
|
4187
|
-
typeof value === "
|
|
4188
|
-
|
|
4188
|
+
Object.entries(integrations).map(([key, value]) => {
|
|
4189
|
+
if (typeof value === "string") return [key, ["true", "yes"].includes(value.toLowerCase())];
|
|
4190
|
+
if (typeof value === "number") return [key, value === 1];
|
|
4191
|
+
return [key, value];
|
|
4192
|
+
})
|
|
4189
4193
|
);
|
|
4190
4194
|
var buildBanner = (language) => language?.successBannerEnabled ? [
|
|
4191
4195
|
{
|