@aranova/tracking-react 0.20.1 → 0.21.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/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +23 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -18
- package/dist/index.mjs.map +1 -1
- package/dist/{sales-DrH6dY5F.d.mts → sales-CBQJ2SBT.d.mts} +21 -19
- package/dist/{sales-DrH6dY5F.d.ts → sales-CBQJ2SBT.d.ts} +21 -19
- package/dist/sales.d.mts +1 -1
- package/dist/sales.d.ts +1 -1
- package/dist/sales.js +22 -17
- package/dist/sales.js.map +1 -1
- package/dist/sales.mjs +22 -17
- package/dist/sales.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,8 +2,8 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode, CSSProperties, InputHTMLAttributes, ChangeEvent, FocusEvent } from 'react';
|
|
3
3
|
import { T as TrackingParams, a as TrackingInstallSurface, b as TrackingEnvironment, c as TrackingClientContext, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload, F as FormSubmitConfig, f as FormSubmitMetadata, G as GtagEnvironmentMap, M as MetaPixelEnvironmentMap, C as ConsentState, g as ConsentChoiceState, h as ConsentSource, P as PhoneConfig, i as ParsedPhone, j as PhoneDisplayFormat } from './phone-utils-B2vHJkNz.mjs';
|
|
4
4
|
export { k as ConsentChoice, D as DEFAULT_DECLINE_TTL_DAYS, l as DEFAULT_PHONE_COUNTRY, J as JsonValue, S as SetConsentOptions, m as TrackedField, n as TrackingInitConfig, o as formSubmitConfigSchema, p as formSubmitMetadataSchema, q as formatPhone, r as formatPhoneAsTyped, s as getConsentChoice, t as getConsentState, u as jsonValueSchema, v as onConsentChange, w as optIn, x as optOut, y as parsePhone, z as phoneField, A as resetConsent, B as setConsentState, E as toE164 } from './phone-utils-B2vHJkNz.mjs';
|
|
5
|
-
import { T as TrackingConfigReference, C as ConversionConfig } from './sales-
|
|
6
|
-
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, c as CompareTo, d as ConversionConfigStore, e as ConversionUserData, f as CurrencyRevenue, g as CustomerCurrencyDelta, h as CustomerCurrencyTotal, i as CustomerGetOptions, j as CustomerGetResult, k as CustomerKpis, l as CustomerKpisDeltas, m as CustomerKpisPrevious, n as CustomerListPage, o as CustomerListQuery, p as CustomerProfile, q as CustomerSegment, r as CustomerSegmentCount, s as CustomerSortField, t as CustomerSummary, u as CustomerSummaryQuery, D as DistinctCustomersByCurrency, G as Granularity, N as NAMED_RANGES, v as NamedRange, P as PublicServiceItem, S as SUPPORTED_CURRENCIES, w as Sale, x as SaleCursorPage, y as SaleFilters, z as SaleInput, E as SaleItem, F as SaleItemInput, H as SaleKeysetSortField, I as SaleListPage, J as SaleListQuery, K as SaleListQueryV2, L as SaleService, M as SaleServiceInput, O as SaleSortField, Q as SaleSortOrder, R as SaleSummary, U as SaleSummaryPrevious, V as SaleSummaryQuery, W as SaleSummaryQueryV2, X as SaleSummaryV2, Y as SaleUpdateInput, Z as SalesBusinessClient, _ as SalesCategoryBreakdown, $ as SalesClient, a0 as SalesClientConfig, a1 as SalesCustomersClient, a2 as SalesServiceBreakdown, a3 as SalesTransportConfig, a4 as SalesTrendPoint, a5 as SummaryCurrencyDelta, a6 as SummaryDeltas, a7 as SummaryWindow, a8 as SupportedCurrency, a9 as TRACKING_RANGES, aa as TrackingOverviewRange, ab as clearStashedUserData, ac as createSalesClient, ad as fetchServices, ae as formatDateInTz, af as formatMoney, ag as fromMinor, ah as getTrackingConfigRuntime, ai as resolveConversionConfig, aj as saleCreateSchema, ak as saleItemSchema, al as saleServiceSchema, am as saleUpdateSchema, an as salesRequest, ao as stashUserData, ap as toMinor } from './sales-
|
|
5
|
+
import { T as TrackingConfigReference, C as ConversionConfig } from './sales-CBQJ2SBT.mjs';
|
|
6
|
+
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, c as CompareTo, d as ConversionConfigStore, e as ConversionUserData, f as CurrencyRevenue, g as CustomerCurrencyDelta, h as CustomerCurrencyTotal, i as CustomerGetOptions, j as CustomerGetResult, k as CustomerKpis, l as CustomerKpisDeltas, m as CustomerKpisPrevious, n as CustomerListPage, o as CustomerListQuery, p as CustomerProfile, q as CustomerSegment, r as CustomerSegmentCount, s as CustomerSortField, t as CustomerSummary, u as CustomerSummaryQuery, D as DistinctCustomersByCurrency, G as Granularity, N as NAMED_RANGES, v as NamedRange, P as PublicServiceItem, S as SUPPORTED_CURRENCIES, w as Sale, x as SaleCursorPage, y as SaleFilters, z as SaleInput, E as SaleItem, F as SaleItemInput, H as SaleKeysetSortField, I as SaleListPage, J as SaleListQuery, K as SaleListQueryV2, L as SaleService, M as SaleServiceInput, O as SaleSortField, Q as SaleSortOrder, R as SaleSummary, U as SaleSummaryPrevious, V as SaleSummaryQuery, W as SaleSummaryQueryV2, X as SaleSummaryV2, Y as SaleUpdateInput, Z as SalesBusinessClient, _ as SalesCategoryBreakdown, $ as SalesClient, a0 as SalesClientConfig, a1 as SalesCustomersClient, a2 as SalesServiceBreakdown, a3 as SalesTransportConfig, a4 as SalesTrendPoint, a5 as SummaryCurrencyDelta, a6 as SummaryDeltas, a7 as SummaryWindow, a8 as SupportedCurrency, a9 as TRACKING_RANGES, aa as TrackingOverviewRange, ab as clearStashedUserData, ac as createSalesClient, ad as fetchServices, ae as formatDateInTz, af as formatMoney, ag as fromMinor, ah as getTrackingConfigRuntime, ai as resolveConversionConfig, aj as saleCreateSchema, ak as saleItemSchema, al as saleServiceSchema, am as saleUpdateSchema, an as salesRequest, ao as stashUserData, ap as toMinor } from './sales-CBQJ2SBT.mjs';
|
|
7
7
|
import * as src from 'src';
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { CountryCode } from 'libphonenumber-js';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode, CSSProperties, InputHTMLAttributes, ChangeEvent, FocusEvent } from 'react';
|
|
3
3
|
import { T as TrackingParams, a as TrackingInstallSurface, b as TrackingEnvironment, c as TrackingClientContext, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload, F as FormSubmitConfig, f as FormSubmitMetadata, G as GtagEnvironmentMap, M as MetaPixelEnvironmentMap, C as ConsentState, g as ConsentChoiceState, h as ConsentSource, P as PhoneConfig, i as ParsedPhone, j as PhoneDisplayFormat } from './phone-utils-B2vHJkNz.js';
|
|
4
4
|
export { k as ConsentChoice, D as DEFAULT_DECLINE_TTL_DAYS, l as DEFAULT_PHONE_COUNTRY, J as JsonValue, S as SetConsentOptions, m as TrackedField, n as TrackingInitConfig, o as formSubmitConfigSchema, p as formSubmitMetadataSchema, q as formatPhone, r as formatPhoneAsTyped, s as getConsentChoice, t as getConsentState, u as jsonValueSchema, v as onConsentChange, w as optIn, x as optOut, y as parsePhone, z as phoneField, A as resetConsent, B as setConsentState, E as toE164 } from './phone-utils-B2vHJkNz.js';
|
|
5
|
-
import { T as TrackingConfigReference, C as ConversionConfig } from './sales-
|
|
6
|
-
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, c as CompareTo, d as ConversionConfigStore, e as ConversionUserData, f as CurrencyRevenue, g as CustomerCurrencyDelta, h as CustomerCurrencyTotal, i as CustomerGetOptions, j as CustomerGetResult, k as CustomerKpis, l as CustomerKpisDeltas, m as CustomerKpisPrevious, n as CustomerListPage, o as CustomerListQuery, p as CustomerProfile, q as CustomerSegment, r as CustomerSegmentCount, s as CustomerSortField, t as CustomerSummary, u as CustomerSummaryQuery, D as DistinctCustomersByCurrency, G as Granularity, N as NAMED_RANGES, v as NamedRange, P as PublicServiceItem, S as SUPPORTED_CURRENCIES, w as Sale, x as SaleCursorPage, y as SaleFilters, z as SaleInput, E as SaleItem, F as SaleItemInput, H as SaleKeysetSortField, I as SaleListPage, J as SaleListQuery, K as SaleListQueryV2, L as SaleService, M as SaleServiceInput, O as SaleSortField, Q as SaleSortOrder, R as SaleSummary, U as SaleSummaryPrevious, V as SaleSummaryQuery, W as SaleSummaryQueryV2, X as SaleSummaryV2, Y as SaleUpdateInput, Z as SalesBusinessClient, _ as SalesCategoryBreakdown, $ as SalesClient, a0 as SalesClientConfig, a1 as SalesCustomersClient, a2 as SalesServiceBreakdown, a3 as SalesTransportConfig, a4 as SalesTrendPoint, a5 as SummaryCurrencyDelta, a6 as SummaryDeltas, a7 as SummaryWindow, a8 as SupportedCurrency, a9 as TRACKING_RANGES, aa as TrackingOverviewRange, ab as clearStashedUserData, ac as createSalesClient, ad as fetchServices, ae as formatDateInTz, af as formatMoney, ag as fromMinor, ah as getTrackingConfigRuntime, ai as resolveConversionConfig, aj as saleCreateSchema, ak as saleItemSchema, al as saleServiceSchema, am as saleUpdateSchema, an as salesRequest, ao as stashUserData, ap as toMinor } from './sales-
|
|
5
|
+
import { T as TrackingConfigReference, C as ConversionConfig } from './sales-CBQJ2SBT.js';
|
|
6
|
+
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, c as CompareTo, d as ConversionConfigStore, e as ConversionUserData, f as CurrencyRevenue, g as CustomerCurrencyDelta, h as CustomerCurrencyTotal, i as CustomerGetOptions, j as CustomerGetResult, k as CustomerKpis, l as CustomerKpisDeltas, m as CustomerKpisPrevious, n as CustomerListPage, o as CustomerListQuery, p as CustomerProfile, q as CustomerSegment, r as CustomerSegmentCount, s as CustomerSortField, t as CustomerSummary, u as CustomerSummaryQuery, D as DistinctCustomersByCurrency, G as Granularity, N as NAMED_RANGES, v as NamedRange, P as PublicServiceItem, S as SUPPORTED_CURRENCIES, w as Sale, x as SaleCursorPage, y as SaleFilters, z as SaleInput, E as SaleItem, F as SaleItemInput, H as SaleKeysetSortField, I as SaleListPage, J as SaleListQuery, K as SaleListQueryV2, L as SaleService, M as SaleServiceInput, O as SaleSortField, Q as SaleSortOrder, R as SaleSummary, U as SaleSummaryPrevious, V as SaleSummaryQuery, W as SaleSummaryQueryV2, X as SaleSummaryV2, Y as SaleUpdateInput, Z as SalesBusinessClient, _ as SalesCategoryBreakdown, $ as SalesClient, a0 as SalesClientConfig, a1 as SalesCustomersClient, a2 as SalesServiceBreakdown, a3 as SalesTransportConfig, a4 as SalesTrendPoint, a5 as SummaryCurrencyDelta, a6 as SummaryDeltas, a7 as SummaryWindow, a8 as SupportedCurrency, a9 as TRACKING_RANGES, aa as TrackingOverviewRange, ab as clearStashedUserData, ac as createSalesClient, ad as fetchServices, ae as formatDateInTz, af as formatMoney, ag as fromMinor, ah as getTrackingConfigRuntime, ai as resolveConversionConfig, aj as saleCreateSchema, ak as saleItemSchema, al as saleServiceSchema, am as saleUpdateSchema, an as salesRequest, ao as stashUserData, ap as toMinor } from './sales-CBQJ2SBT.js';
|
|
7
7
|
import * as src from 'src';
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { CountryCode } from 'libphonenumber-js';
|
package/dist/index.js
CHANGED
|
@@ -1044,6 +1044,21 @@ function automaticThresholdMet(goal, eventType, metadata) {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
|
|
1047
|
+
// ../tracking-core/src/resources/intl/date.ts
|
|
1048
|
+
function formatDateInTz(iso, timeZone, opts, locale) {
|
|
1049
|
+
const date = new Date(iso);
|
|
1050
|
+
if (Number.isNaN(date.getTime())) return iso;
|
|
1051
|
+
return new Intl.DateTimeFormat(locale, {
|
|
1052
|
+
year: "numeric",
|
|
1053
|
+
month: "short",
|
|
1054
|
+
day: "2-digit",
|
|
1055
|
+
hour: "2-digit",
|
|
1056
|
+
minute: "2-digit",
|
|
1057
|
+
...opts,
|
|
1058
|
+
timeZone
|
|
1059
|
+
}).format(date);
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1047
1062
|
// ../tracking-core/src/resources/sales/money.ts
|
|
1048
1063
|
var MINOR_UNIT_EXPONENT = {
|
|
1049
1064
|
USD: 2,
|
|
@@ -1063,19 +1078,6 @@ function formatMoney(cents, currency, locale) {
|
|
|
1063
1078
|
fromMinor(cents, currency)
|
|
1064
1079
|
);
|
|
1065
1080
|
}
|
|
1066
|
-
function formatDateInTz(iso, timeZone, opts, locale) {
|
|
1067
|
-
const date = new Date(iso);
|
|
1068
|
-
if (Number.isNaN(date.getTime())) return iso;
|
|
1069
|
-
return new Intl.DateTimeFormat(locale, {
|
|
1070
|
-
year: "numeric",
|
|
1071
|
-
month: "short",
|
|
1072
|
-
day: "2-digit",
|
|
1073
|
-
hour: "2-digit",
|
|
1074
|
-
minute: "2-digit",
|
|
1075
|
-
...opts,
|
|
1076
|
-
timeZone
|
|
1077
|
-
}).format(date);
|
|
1078
|
-
}
|
|
1079
1081
|
|
|
1080
1082
|
// ../tracking-core/src/resources/tracking-config-runtime.ts
|
|
1081
1083
|
var CACHE_PREFIX2 = "_aranova_cfg_runtime_";
|
|
@@ -2951,7 +2953,7 @@ function attachPhoneClickCapture(client, config) {
|
|
|
2951
2953
|
};
|
|
2952
2954
|
}
|
|
2953
2955
|
|
|
2954
|
-
// ../tracking-core/src/resources/
|
|
2956
|
+
// ../tracking-core/src/resources/http/errors.ts
|
|
2955
2957
|
var AranovaApiError = class extends Error {
|
|
2956
2958
|
constructor(message, options) {
|
|
2957
2959
|
super(message);
|
|
@@ -2962,7 +2964,7 @@ var AranovaApiError = class extends Error {
|
|
|
2962
2964
|
}
|
|
2963
2965
|
};
|
|
2964
2966
|
|
|
2965
|
-
// ../tracking-core/src/resources/
|
|
2967
|
+
// ../tracking-core/src/resources/http/request.ts
|
|
2966
2968
|
function identityHeaders(config) {
|
|
2967
2969
|
const headers = { [API_KEY_HEADER]: config.apiKey };
|
|
2968
2970
|
if (config.sdkVersion) headers[SDK_VERSION_HEADER] = config.sdkVersion;
|
|
@@ -2974,8 +2976,8 @@ function identityHeaders(config) {
|
|
|
2974
2976
|
function joinUrl(endpoint, path) {
|
|
2975
2977
|
return `${endpoint.replace(/\/$/, "")}${path}`;
|
|
2976
2978
|
}
|
|
2977
|
-
async function
|
|
2978
|
-
const headers = identityHeaders(config);
|
|
2979
|
+
async function apiRequest(config, method, path, body, extraHeaders) {
|
|
2980
|
+
const headers = { ...identityHeaders(config), ...extraHeaders };
|
|
2979
2981
|
if (body !== void 0) headers["Content-Type"] = "application/json";
|
|
2980
2982
|
const response = await fetch(joinUrl(config.endpoint, path), {
|
|
2981
2983
|
method,
|
|
@@ -3004,6 +3006,9 @@ async function salesRequest(config, method, path, body) {
|
|
|
3004
3006
|
return await response.json();
|
|
3005
3007
|
}
|
|
3006
3008
|
|
|
3009
|
+
// ../tracking-core/src/resources/sales/transport.ts
|
|
3010
|
+
var salesRequest = apiRequest;
|
|
3011
|
+
|
|
3007
3012
|
// ../tracking-core/src/resources/sales/client.ts
|
|
3008
3013
|
function fireRecordedConversions(firing, input, recorded, sale, currency) {
|
|
3009
3014
|
if (!firing) return;
|
|
@@ -3632,7 +3637,7 @@ function GoogleAdsTracking(props) {
|
|
|
3632
3637
|
var import_react6 = require("react");
|
|
3633
3638
|
|
|
3634
3639
|
// package.json
|
|
3635
|
-
var version = "0.
|
|
3640
|
+
var version = "0.21.0";
|
|
3636
3641
|
|
|
3637
3642
|
// ../tracking-core/src/phone-react.tsx
|
|
3638
3643
|
var import_react5 = require("react");
|