@artisan-commerce/analytics-rn 0.3.0-canary.78 → 0.3.0-canary.79

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.
@@ -6,6 +6,7 @@ var reactNativeFbsdkNext = require('react-native-fbsdk-next');
6
6
  var reactNative = require('react-native');
7
7
  var state = require('@artisan-commerce/state');
8
8
  var analytics = require('@segment/analytics-react-native');
9
+ var snakeCase = require('snake-case');
9
10
  var analytics$1 = require('@react-native-firebase/analytics');
10
11
  var shoppingCartCore = require('@artisan-commerce/shopping-cart-core');
11
12
  var products = require('@artisan-commerce/products');
@@ -17,7 +18,7 @@ var analytics__default$1 = /*#__PURE__*/_interopDefaultLegacy(analytics$1);
17
18
 
18
19
  var name = "@artisan-commerce/analytics-rn";
19
20
  var description = "Artisn commerce analytics react native library";
20
- var version = "0.3.0-canary.78";
21
+ var version = "0.3.0-canary.79";
21
22
  var main = "./dist/bundle.cjs.js";
22
23
  var module$1 = "./dist/bundle.esm.js";
23
24
  var types = "./dist/bundle.d.ts";
@@ -51,8 +52,8 @@ var dependencies = {
51
52
  "snake-case": "^3.0.4"
52
53
  };
53
54
  var devDependencies = {
54
- "@artisan-commerce/products": "0.9.0-canary.50",
55
- "@artisan-commerce/shopping-cart-core": "0.12.0-canary.73",
55
+ "@artisan-commerce/products": "0.9.0-canary.51",
56
+ "@artisan-commerce/shopping-cart-core": "0.12.0-canary.74",
56
57
  "@artisan-commerce/state": "0.3.0-canary.9",
57
58
  "@artisan-commerce/types": "0.14.0-canary.38",
58
59
  "@babel/core": "^7.13.15",
@@ -95,7 +96,7 @@ var nx = {
95
96
  }
96
97
  }
97
98
  };
98
- var gitHead = "8b7e9003491df2d60084bec12a957e6b14b5a0f9";
99
+ var gitHead = "e56ca351167870d88c10abeb0e84c3511d46ee45";
99
100
  var packageJSON = {
100
101
  name: name,
101
102
  description: description,
@@ -497,82 +498,6 @@ const initAnalytics = (config) => {
497
498
  });
498
499
  };
499
500
 
500
- /******************************************************************************
501
- Copyright (c) Microsoft Corporation.
502
-
503
- Permission to use, copy, modify, and/or distribute this software for any
504
- purpose with or without fee is hereby granted.
505
-
506
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
507
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
508
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
509
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
510
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
511
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
512
- PERFORMANCE OF THIS SOFTWARE.
513
- ***************************************************************************** */
514
-
515
- var __assign = function() {
516
- __assign = Object.assign || function __assign(t) {
517
- for (var s, i = 1, n = arguments.length; i < n; i++) {
518
- s = arguments[i];
519
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
520
- }
521
- return t;
522
- };
523
- return __assign.apply(this, arguments);
524
- };
525
-
526
- /**
527
- * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
528
- */
529
- /**
530
- * Lower case as a function.
531
- */
532
- function lowerCase(str) {
533
- return str.toLowerCase();
534
- }
535
-
536
- // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
537
- var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
538
- // Remove all non-word characters.
539
- var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
540
- /**
541
- * Normalize the string into something other libraries can manipulate easier.
542
- */
543
- function noCase(input, options) {
544
- if (options === void 0) { options = {}; }
545
- var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
546
- var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
547
- var start = 0;
548
- var end = result.length;
549
- // Trim the delimiter from around the output string.
550
- while (result.charAt(start) === "\0")
551
- start++;
552
- while (result.charAt(end - 1) === "\0")
553
- end--;
554
- // Transform each token independently.
555
- return result.slice(start, end).split("\0").map(transform).join(delimiter);
556
- }
557
- /**
558
- * Replace `re` in the input string with the replacement value.
559
- */
560
- function replace(input, re, value) {
561
- if (re instanceof RegExp)
562
- return input.replace(re, value);
563
- return re.reduce(function (input, re) { return input.replace(re, value); }, input);
564
- }
565
-
566
- function dotCase(input, options) {
567
- if (options === void 0) { options = {}; }
568
- return noCase(input, __assign({ delimiter: "." }, options));
569
- }
570
-
571
- function snakeCase(input, options) {
572
- if (options === void 0) { options = {}; }
573
- return dotCase(input, __assign({ delimiter: "_" }, options));
574
- }
575
-
576
501
  var __defProp$3X = Object.defineProperty;
577
502
  var __defProps$2n = Object.defineProperties;
578
503
  var __getOwnPropDescs$2n = Object.getOwnPropertyDescriptors;
@@ -595,7 +520,7 @@ var __spreadProps$2n = (a, b) => __defProps$2n(a, __getOwnPropDescs$2n(b));
595
520
  const eventParamsToSnakeCase = (params) => {
596
521
  return Object.entries(params).reduce((acc, params2) => {
597
522
  const [key, value] = params2;
598
- const newKey = snakeCase(key);
523
+ const newKey = snakeCase.snakeCase(key);
599
524
  return __spreadProps$2n(__spreadValues$3X({}, acc), {
600
525
  [newKey]: value
601
526
  });