@aranova/tracking-react 0.12.1 → 0.12.2
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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{phone-utils-DXAki8pO.d.mts → phone-utils-Du-alwyM.d.mts} +7 -3
- package/dist/{phone-utils-DXAki8pO.d.ts → phone-utils-Du-alwyM.d.ts} +7 -3
- package/dist/phone.d.mts +1 -1
- package/dist/phone.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, CSSProperties, InputHTMLAttributes, ChangeEvent, FocusEvent } from 'react';
|
|
3
|
-
import { C as ConsentState, T as TrackingInstallSurface, a as TrackingEnvironment, b as TrackingClientContext, c as TrackingParams, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload, F as FormSubmitConfig, f as FormSubmitMetadata, G as GtagEnvironmentMap, P as PhoneConfig, g as ParsedPhone, h as PhoneDisplayFormat } from './phone-utils-
|
|
4
|
-
export { D as DEFAULT_PHONE_COUNTRY, J as JsonValue, i as TrackedField, j as TrackingInitConfig, k as formSubmitConfigSchema, l as formSubmitMetadataSchema, m as formatPhone, n as formatPhoneAsTyped, o as jsonValueSchema, p as parsePhone, q as phoneField, t as toE164 } from './phone-utils-
|
|
3
|
+
import { C as ConsentState, T as TrackingInstallSurface, a as TrackingEnvironment, b as TrackingClientContext, c as TrackingParams, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload, F as FormSubmitConfig, f as FormSubmitMetadata, G as GtagEnvironmentMap, P as PhoneConfig, g as ParsedPhone, h as PhoneDisplayFormat } from './phone-utils-Du-alwyM.mjs';
|
|
4
|
+
export { D as DEFAULT_PHONE_COUNTRY, J as JsonValue, i as TrackedField, j as TrackingInitConfig, k as formSubmitConfigSchema, l as formSubmitMetadataSchema, m as formatPhone, n as formatPhoneAsTyped, o as jsonValueSchema, p as parsePhone, q as phoneField, t as toE164 } from './phone-utils-Du-alwyM.mjs';
|
|
5
5
|
import * as src from 'src';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
export { AranovaApiError, BusinessConfig, BusinessConfigFeatures, BusinessConfigService, CompareTo, CurrencyRevenue, CustomerCurrencyDelta, CustomerCurrencyTotal, CustomerGetOptions, CustomerGetResult, CustomerKpis, CustomerKpisDeltas, CustomerKpisPrevious, CustomerListPage, CustomerListQuery, CustomerProfile, CustomerSegment, CustomerSegmentCount, CustomerSortField, CustomerSummary, CustomerSummaryQuery, DistinctCustomersByCurrency, Granularity, NAMED_RANGES, NamedRange, PublicServiceItem, SUPPORTED_CURRENCIES, Sale, SaleCursorPage, SaleFilters, SaleInput, SaleItem, SaleItemInput, SaleKeysetSortField, SaleListPage, SaleListQuery, SaleListQueryV2, SaleService, SaleServiceInput, SaleSortField, SaleSortOrder, SaleSummary, SaleSummaryPrevious, SaleSummaryQuery, SaleSummaryQueryV2, SaleSummaryV2, SaleUpdateInput, SalesBusinessClient, SalesCategoryBreakdown, SalesClient, SalesClientConfig, SalesCustomersClient, SalesServiceBreakdown, SalesTransportConfig, SalesTrendPoint, SummaryCurrencyDelta, SummaryDeltas, SummaryWindow, SupportedCurrency, TRACKING_RANGES, TrackingOverviewRange, createSalesClient, fetchServices, formatDateInTz, formatMoney, fromMinor, saleCreateSchema, saleItemSchema, saleServiceSchema, saleUpdateSchema, salesRequest, toMinor } from './sales.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, CSSProperties, InputHTMLAttributes, ChangeEvent, FocusEvent } from 'react';
|
|
3
|
-
import { C as ConsentState, T as TrackingInstallSurface, a as TrackingEnvironment, b as TrackingClientContext, c as TrackingParams, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload, F as FormSubmitConfig, f as FormSubmitMetadata, G as GtagEnvironmentMap, P as PhoneConfig, g as ParsedPhone, h as PhoneDisplayFormat } from './phone-utils-
|
|
4
|
-
export { D as DEFAULT_PHONE_COUNTRY, J as JsonValue, i as TrackedField, j as TrackingInitConfig, k as formSubmitConfigSchema, l as formSubmitMetadataSchema, m as formatPhone, n as formatPhoneAsTyped, o as jsonValueSchema, p as parsePhone, q as phoneField, t as toE164 } from './phone-utils-
|
|
3
|
+
import { C as ConsentState, T as TrackingInstallSurface, a as TrackingEnvironment, b as TrackingClientContext, c as TrackingParams, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload, F as FormSubmitConfig, f as FormSubmitMetadata, G as GtagEnvironmentMap, P as PhoneConfig, g as ParsedPhone, h as PhoneDisplayFormat } from './phone-utils-Du-alwyM.js';
|
|
4
|
+
export { D as DEFAULT_PHONE_COUNTRY, J as JsonValue, i as TrackedField, j as TrackingInitConfig, k as formSubmitConfigSchema, l as formSubmitMetadataSchema, m as formatPhone, n as formatPhoneAsTyped, o as jsonValueSchema, p as parsePhone, q as phoneField, t as toE164 } from './phone-utils-Du-alwyM.js';
|
|
5
5
|
import * as src from 'src';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
export { AranovaApiError, BusinessConfig, BusinessConfigFeatures, BusinessConfigService, CompareTo, CurrencyRevenue, CustomerCurrencyDelta, CustomerCurrencyTotal, CustomerGetOptions, CustomerGetResult, CustomerKpis, CustomerKpisDeltas, CustomerKpisPrevious, CustomerListPage, CustomerListQuery, CustomerProfile, CustomerSegment, CustomerSegmentCount, CustomerSortField, CustomerSummary, CustomerSummaryQuery, DistinctCustomersByCurrency, Granularity, NAMED_RANGES, NamedRange, PublicServiceItem, SUPPORTED_CURRENCIES, Sale, SaleCursorPage, SaleFilters, SaleInput, SaleItem, SaleItemInput, SaleKeysetSortField, SaleListPage, SaleListQuery, SaleListQueryV2, SaleService, SaleServiceInput, SaleSortField, SaleSortOrder, SaleSummary, SaleSummaryPrevious, SaleSummaryQuery, SaleSummaryQueryV2, SaleSummaryV2, SaleUpdateInput, SalesBusinessClient, SalesCategoryBreakdown, SalesClient, SalesClientConfig, SalesCustomersClient, SalesServiceBreakdown, SalesTransportConfig, SalesTrendPoint, SummaryCurrencyDelta, SummaryDeltas, SummaryWindow, SupportedCurrency, TRACKING_RANGES, TrackingOverviewRange, createSalesClient, fetchServices, formatDateInTz, formatMoney, fromMinor, saleCreateSchema, saleItemSchema, saleServiceSchema, saleUpdateSchema, salesRequest, toMinor } from './sales.js';
|
package/dist/index.js
CHANGED
|
@@ -200,7 +200,9 @@ function bootstrapGoogleAdsTracking(gtagId) {
|
|
|
200
200
|
}
|
|
201
201
|
function bootstrapMultipleGtags(gtagIds) {
|
|
202
202
|
if (typeof window === "undefined" || typeof document === "undefined") return;
|
|
203
|
-
const ids = Object.values(gtagIds).filter(
|
|
203
|
+
const ids = Object.values(gtagIds).filter(
|
|
204
|
+
(id) => typeof id === "string" && isValidGtagId(id)
|
|
205
|
+
);
|
|
204
206
|
if (ids.length === 0) return;
|
|
205
207
|
applyDefaultConsentState();
|
|
206
208
|
loadGtagScript(ids[0]);
|
|
@@ -1916,7 +1918,7 @@ function GoogleAdsTracking(props) {
|
|
|
1916
1918
|
var import_react5 = require("react");
|
|
1917
1919
|
|
|
1918
1920
|
// package.json
|
|
1919
|
-
var version = "0.12.
|
|
1921
|
+
var version = "0.12.2";
|
|
1920
1922
|
|
|
1921
1923
|
// ../tracking-core/src/phone-react.tsx
|
|
1922
1924
|
var import_react4 = require("react");
|
|
@@ -2032,7 +2034,9 @@ function createTracking(options) {
|
|
|
2032
2034
|
}
|
|
2033
2035
|
const TrackingContext = (0, import_react5.createContext)(null);
|
|
2034
2036
|
function TrackingProvider({ gtagId, gtagIds, children }) {
|
|
2035
|
-
const resolvedGtagIds = gtagIds
|
|
2037
|
+
const resolvedGtagIds = gtagIds ? Object.fromEntries(
|
|
2038
|
+
Object.entries(gtagIds).filter((e) => e[1] != null)
|
|
2039
|
+
) : gtagId ? { default: gtagId } : void 0;
|
|
2036
2040
|
const client = (0, import_react5.useMemo)(
|
|
2037
2041
|
() => createTypedClient(
|
|
2038
2042
|
getOrCreateTrackingClient({
|