@aranova/tracking-react 1.12.0 → 1.13.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 CHANGED
@@ -362,9 +362,11 @@ await submit({
362
362
  `[{ group, options }]` in order, so render one heading per group with its choices under it.
363
363
  - `useBookingSlots` / `bookableSlots(rules, { timeZone })` offer exactly the portal's start hours,
364
364
  judged by the shop's date. `useBookingSubmit` reuses one attempt key across a double-click or
365
- a retry, and sends the visit's `form_submit` once: don't send your own for this form. Add the
366
- form's own questions with `formSubmit.extraFields`; a name the booking already reports
367
- (`phone`, `email`, ...) is dropped.
365
+ a retry, and sends the visit's `form_submit` once: don't send your own for this form. It is a
366
+ typed `booking` submit (ADR-0024): every field carries its contract `role`, `service` is the
367
+ option keys, `preferred_date` is `YYYY-MM-DD`, `preferred_time` is
368
+ `{ start: "HH:00", end: null }`, and `drop_off` is `wait-for-it` / `drop-off`. Add the form's own questions with
369
+ `formSubmit.extraFields`; a name the booking already reports (`phone`, `email`, ...) is dropped.
368
370
  - Ask for the last name separately, and a mobile number (the shop's confirmation text goes to it).
369
371
  - Details after booking (when `booking.rules.vehicleDeferred`, for extra notes, or for the site's
370
372
  own "How did you hear about us?" answer):
@@ -297,6 +297,8 @@ declare class TrackingConfigRuntime {
297
297
  * link is safe to show stale. Same reference until the next adopt, for `useSyncExternalStore`.
298
298
  */
299
299
  integrations(): ConversionIntegrations | null;
300
+ /** The lead-form contracts, from the cached object like `integrations()`. */
301
+ leadForms(): LeadFormsConfig | null;
300
302
  private revalidateNow;
301
303
  private expireAuthority;
302
304
  private confirm;
@@ -297,6 +297,8 @@ declare class TrackingConfigRuntime {
297
297
  * link is safe to show stale. Same reference until the next adopt, for `useSyncExternalStore`.
298
298
  */
299
299
  integrations(): ConversionIntegrations | null;
300
+ /** The lead-form contracts, from the cached object like `integrations()`. */
301
+ leadForms(): LeadFormsConfig | null;
300
302
  private revalidateNow;
301
303
  private expireAuthority;
302
304
  private confirm;
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-BNiSqeF7.mjs';
4
- import { T as TrackingConfigReference, C as ConversionConfig, i as BookingOutcome, g as BookingInput, a as BookingDetailsInput, c as BookingDetailsOutcome, S as SalesBookingsClient, f as BookingFormSubmit, j as BookingSimulation } from './bookings-Lmi0o_PA.mjs';
5
- import { X as TriggerRegistryConfig, Z as TypedTrackingClient, a as BookingHandoffPrefill, b as BookingIntegration, B as BookableDay } from './ingest-typed-PKFEuJ8E.mjs';
4
+ import { T as TrackingConfigReference, C as ConversionConfig, i as BookingOutcome, g as BookingInput, a as BookingDetailsInput, c as BookingDetailsOutcome, S as SalesBookingsClient, f as BookingFormSubmit, j as BookingSimulation } from './bookings-CHpplXU7.mjs';
5
+ import { X as TriggerRegistryConfig, Z as TypedTrackingClient, a as BookingHandoffPrefill, b as BookingIntegration, B as BookableDay } from './ingest-typed-Ckt4R731.mjs';
6
6
  import { CountryCode } from 'libphonenumber-js';
7
7
  import './form-submit-CX-CxJjQ.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-D12FW8tT.js';
4
- import { T as TrackingConfigReference, C as ConversionConfig, i as BookingOutcome, g as BookingInput, a as BookingDetailsInput, c as BookingDetailsOutcome, S as SalesBookingsClient, f as BookingFormSubmit, j as BookingSimulation } from './bookings-v_ucn93l.js';
5
- import { X as TriggerRegistryConfig, Z as TypedTrackingClient, a as BookingHandoffPrefill, b as BookingIntegration, B as BookableDay } from './ingest-typed-B9I1c7jr.js';
4
+ import { T as TrackingConfigReference, C as ConversionConfig, i as BookingOutcome, g as BookingInput, a as BookingDetailsInput, c as BookingDetailsOutcome, S as SalesBookingsClient, f as BookingFormSubmit, j as BookingSimulation } from './bookings-C1HMPjQl.js';
5
+ import { X as TriggerRegistryConfig, Z as TypedTrackingClient, a as BookingHandoffPrefill, b as BookingIntegration, B as BookableDay } from './ingest-typed-sCDoPInT.js';
6
6
  import { CountryCode } from 'libphonenumber-js';
7
7
  import './form-submit-CX-CxJjQ.js';
8
8
  import 'zod/mini';
package/dist/client.js CHANGED
@@ -1614,6 +1614,10 @@ var TrackingConfigRuntime = class {
1614
1614
  integrations() {
1615
1615
  return this.current?.integrations ?? null;
1616
1616
  }
1617
+ /** The lead-form contracts, from the cached object like `integrations()`. */
1618
+ leadForms() {
1619
+ return this.current?.lead_forms ?? null;
1620
+ }
1617
1621
  async revalidateNow() {
1618
1622
  try {
1619
1623
  const headers = {};
@@ -4080,7 +4084,7 @@ function GoogleAdsTracking(props) {
4080
4084
  var import_react6 = require("react");
4081
4085
 
4082
4086
  // package.json
4083
- var version = "1.12.0";
4087
+ var version = "1.13.0";
4084
4088
 
4085
4089
  // ../tracking-core/src/phone-react.tsx
4086
4090
  var import_react5 = require("react");