@aranova/tracking-react 0.21.0 → 0.22.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 +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +59 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +59 -4
- package/dist/index.mjs.map +1 -1
- package/dist/{phone-utils-B2vHJkNz.d.mts → phone-utils-BhWfNuPS.d.mts} +8 -0
- package/dist/{phone-utils-B2vHJkNz.d.ts → phone-utils-BhWfNuPS.d.ts} +8 -0
- package/dist/phone.d.mts +1 -1
- package/dist/phone.d.ts +1 -1
- package/dist/sales.d.mts +1 -1
- package/dist/sales.d.ts +1 -1
- package/dist/sales.js +7 -0
- package/dist/sales.js.map +1 -1
- package/dist/sales.mjs +7 -0
- package/dist/sales.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/{sales-CBQJ2SBT.d.mts → sales-BhCYJqDy.d.mts} +4 -4
- package/dist/{sales-CBQJ2SBT.d.ts → sales-BhCYJqDy.d.ts} +4 -4
package/dist/sales.mjs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
// ../tracking-core/src/capabilities.ts
|
|
2
|
+
var registered = /* @__PURE__ */ new Set();
|
|
3
|
+
function registerCapability(capability) {
|
|
4
|
+
registered.add(capability);
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
// ../tracking-core/src/phone.ts
|
|
2
8
|
import { AsYouType, parsePhoneNumberFromString } from "libphonenumber-js";
|
|
3
9
|
var DEFAULT_PHONE_COUNTRY = "CA";
|
|
@@ -316,6 +322,7 @@ function fireRecordedConversions(firing, input, recorded, sale, currency) {
|
|
|
316
322
|
}
|
|
317
323
|
}
|
|
318
324
|
function createSalesClient(config) {
|
|
325
|
+
if (config.firing) registerCapability("conversion_goals_manual");
|
|
319
326
|
async function record(input) {
|
|
320
327
|
const currency = input.currency ?? config.defaultCurrency;
|
|
321
328
|
if (!currency) {
|