@aranova/tracking-react 1.4.1 → 1.5.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/README.md +3 -0
- package/dist/{bookings-CqCuuyP6.d.mts → bookings-CGWiBxnC.d.mts} +4 -0
- package/dist/{bookings-DIu1ho6v.d.ts → bookings-aJuXoVwX.d.ts} +4 -0
- package/dist/client.d.mts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +15 -3
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +15 -3
- package/dist/client.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +25 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{ingest-typed-D7UZr0EM.d.mts → ingest-typed-CytXGVw4.d.mts} +16 -2
- package/dist/{ingest-typed-D2S3Kb8m.d.ts → ingest-typed-DpT-uFme.d.ts} +16 -2
- package/dist/{sales-CxJVthx_.d.mts → sales-BdU9BRdG.d.mts} +1 -1
- package/dist/{sales-hlcVTJSS.d.ts → sales-Dvh-tPsk.d.ts} +1 -1
- package/dist/sales.d.mts +2 -2
- package/dist/sales.d.ts +2 -2
- package/dist/sales.js +6 -1
- package/dist/sales.js.map +1 -1
- package/dist/sales.mjs +6 -1
- package/dist/sales.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -349,6 +349,9 @@ await submit({
|
|
|
349
349
|
outcome (`created`, `rejected`, `unknown`, `failed`) to exercise each screen. The production
|
|
350
350
|
API ignores it. Test locally against the local API **and** the local CDN; the SDK warns in the
|
|
351
351
|
console when the endpoint is localhost but the config comes from production.
|
|
352
|
+
- `booking.options` arrive grouped by the shop's service category: each has `group` (the heading,
|
|
353
|
+
or `null`) and an optional `description`. `groupBookingOptions(booking.options)` returns
|
|
354
|
+
`[{ group, options }]` in order, so render one heading per group with its choices under it.
|
|
352
355
|
- `useBookingSlots` / `bookableSlots(rules, { timeZone })` offer exactly the portal's start hours,
|
|
353
356
|
judged by the shop's date. `useBookingSubmit` reuses one attempt key across a double-click or
|
|
354
357
|
a retry, and sends the visit's `form_submit` once: don't send your own for this form.
|
|
@@ -69,6 +69,10 @@ interface BookingOptionConfig {
|
|
|
69
69
|
/** What the site posts in `services`. */
|
|
70
70
|
key: string;
|
|
71
71
|
label: string;
|
|
72
|
+
/** The shop's service category; options arrive grouped, each category in one run. */
|
|
73
|
+
group: string | null;
|
|
74
|
+
/** Optional helper text under the label. */
|
|
75
|
+
description: string | null;
|
|
72
76
|
}
|
|
73
77
|
/** Where a booking went; decided by the API. A real customer always gets `live`. */
|
|
74
78
|
declare const BOOKING_MODES: readonly ["live", "test", "simulated"];
|
|
@@ -69,6 +69,10 @@ interface BookingOptionConfig {
|
|
|
69
69
|
/** What the site posts in `services`. */
|
|
70
70
|
key: string;
|
|
71
71
|
label: string;
|
|
72
|
+
/** The shop's service category; options arrive grouped, each category in one run. */
|
|
73
|
+
group: string | null;
|
|
74
|
+
/** Optional helper text under the label. */
|
|
75
|
+
description: string | null;
|
|
72
76
|
}
|
|
73
77
|
/** Where a booking went; decided by the API. A real customer always gets `live`. */
|
|
74
78
|
declare const BOOKING_MODES: readonly ["live", "test", "simulated"];
|
package/dist/client.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, CSSProperties, InputHTMLAttributes, ChangeEvent, FocusEvent, AnchorHTMLAttributes } from 'react';
|
|
3
3
|
import { G as GtagEnvironmentMap, M as MetaPixelEnvironmentMap, h as ConsentState, f as ConsentChoiceState, g as ConsentSource, T as TrackingParams, b as TrackingEnvironment, j as PhoneConfig, P as ParsedPhone, k as PhoneDisplayFormat } from './phone-utils-CM8eUPz8.mjs';
|
|
4
|
-
import { T as TrackingConfigReference, C as ConversionConfig, d as BookingOutcome, b as BookingInput, S as SalesBookingsClient, a as BookingFormSubmit, e as BookingSimulation } from './bookings-
|
|
5
|
-
import {
|
|
4
|
+
import { T as TrackingConfigReference, C as ConversionConfig, d as BookingOutcome, b as BookingInput, S as SalesBookingsClient, a as BookingFormSubmit, e as BookingSimulation } from './bookings-CGWiBxnC.mjs';
|
|
5
|
+
import { X as TriggerRegistryConfig, Z as TypedTrackingClient, a as BookingHandoffPrefill, b as BookingIntegration, B as BookableDay } from './ingest-typed-CytXGVw4.mjs';
|
|
6
6
|
import { CountryCode } from 'libphonenumber-js';
|
|
7
7
|
import './form-submit-BLb28aCk.mjs';
|
|
8
8
|
import 'zod/mini';
|
package/dist/client.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, CSSProperties, InputHTMLAttributes, ChangeEvent, FocusEvent, AnchorHTMLAttributes } from 'react';
|
|
3
3
|
import { G as GtagEnvironmentMap, M as MetaPixelEnvironmentMap, h as ConsentState, f as ConsentChoiceState, g as ConsentSource, T as TrackingParams, b as TrackingEnvironment, j as PhoneConfig, P as ParsedPhone, k as PhoneDisplayFormat } from './phone-utils-l8ey3Zdm.js';
|
|
4
|
-
import { T as TrackingConfigReference, C as ConversionConfig, d as BookingOutcome, b as BookingInput, S as SalesBookingsClient, a as BookingFormSubmit, e as BookingSimulation } from './bookings-
|
|
5
|
-
import {
|
|
4
|
+
import { T as TrackingConfigReference, C as ConversionConfig, d as BookingOutcome, b as BookingInput, S as SalesBookingsClient, a as BookingFormSubmit, e as BookingSimulation } from './bookings-aJuXoVwX.js';
|
|
5
|
+
import { X as TriggerRegistryConfig, Z as TypedTrackingClient, a as BookingHandoffPrefill, b as BookingIntegration, B as BookableDay } from './ingest-typed-DpT-uFme.js';
|
|
6
6
|
import { CountryCode } from 'libphonenumber-js';
|
|
7
7
|
import './form-submit-BLb28aCk.js';
|
|
8
8
|
import 'zod/mini';
|
package/dist/client.js
CHANGED
|
@@ -1035,7 +1035,14 @@ function parseBookingOption(value) {
|
|
|
1035
1035
|
if (!value || typeof value !== "object") return [];
|
|
1036
1036
|
const o = value;
|
|
1037
1037
|
if (typeof o.key !== "string" || !o.key || typeof o.label !== "string") return [];
|
|
1038
|
-
return [
|
|
1038
|
+
return [
|
|
1039
|
+
{
|
|
1040
|
+
key: o.key,
|
|
1041
|
+
label: o.label,
|
|
1042
|
+
group: typeof o.group === "string" && o.group ? o.group : null,
|
|
1043
|
+
description: typeof o.description === "string" && o.description ? o.description : null
|
|
1044
|
+
}
|
|
1045
|
+
];
|
|
1039
1046
|
}
|
|
1040
1047
|
function parseIntegrations(value) {
|
|
1041
1048
|
if (!value || typeof value !== "object") return {};
|
|
@@ -1739,7 +1746,12 @@ function getBookingIntegration(integrations) {
|
|
|
1739
1746
|
timezone: booking.timezone,
|
|
1740
1747
|
configVersion: booking.config_version,
|
|
1741
1748
|
rules,
|
|
1742
|
-
options: booking.options.map((option) => ({
|
|
1749
|
+
options: booking.options.map((option) => ({
|
|
1750
|
+
key: option.key,
|
|
1751
|
+
label: option.label,
|
|
1752
|
+
group: option.group,
|
|
1753
|
+
description: option.description
|
|
1754
|
+
})),
|
|
1743
1755
|
mode: booking.mode ?? "live"
|
|
1744
1756
|
};
|
|
1745
1757
|
}
|
|
@@ -3973,7 +3985,7 @@ function GoogleAdsTracking(props) {
|
|
|
3973
3985
|
var import_react6 = require("react");
|
|
3974
3986
|
|
|
3975
3987
|
// package.json
|
|
3976
|
-
var version = "1.
|
|
3988
|
+
var version = "1.5.0";
|
|
3977
3989
|
|
|
3978
3990
|
// ../tracking-core/src/phone-react.tsx
|
|
3979
3991
|
var import_react5 = require("react");
|