@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.
- package/dist/bundle.cjs.js +6 -81
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +5 -80
- package/dist/bundle.esm.js.map +1 -1
- package/package.json +4 -4
package/dist/bundle.esm.js
CHANGED
|
@@ -2,13 +2,14 @@ import { Settings, AppEventsLogger } from 'react-native-fbsdk-next';
|
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
3
|
import { initState, getState as getState$1, setState as setState$1 } from '@artisan-commerce/state';
|
|
4
4
|
import analytics from '@segment/analytics-react-native';
|
|
5
|
+
import { snakeCase } from 'snake-case';
|
|
5
6
|
import analytics$1 from '@react-native-firebase/analytics';
|
|
6
7
|
import { getShoppingCartProducts, getShoppingCartTotal } from '@artisan-commerce/shopping-cart-core';
|
|
7
8
|
import { getProductTotals } from '@artisan-commerce/products';
|
|
8
9
|
|
|
9
10
|
var name = "@artisan-commerce/analytics-rn";
|
|
10
11
|
var description = "Artisn commerce analytics react native library";
|
|
11
|
-
var version = "0.3.0-canary.
|
|
12
|
+
var version = "0.3.0-canary.79";
|
|
12
13
|
var main = "./dist/bundle.cjs.js";
|
|
13
14
|
var module = "./dist/bundle.esm.js";
|
|
14
15
|
var types = "./dist/bundle.d.ts";
|
|
@@ -42,8 +43,8 @@ var dependencies = {
|
|
|
42
43
|
"snake-case": "^3.0.4"
|
|
43
44
|
};
|
|
44
45
|
var devDependencies = {
|
|
45
|
-
"@artisan-commerce/products": "0.9.0-canary.
|
|
46
|
-
"@artisan-commerce/shopping-cart-core": "0.12.0-canary.
|
|
46
|
+
"@artisan-commerce/products": "0.9.0-canary.51",
|
|
47
|
+
"@artisan-commerce/shopping-cart-core": "0.12.0-canary.74",
|
|
47
48
|
"@artisan-commerce/state": "0.3.0-canary.9",
|
|
48
49
|
"@artisan-commerce/types": "0.14.0-canary.38",
|
|
49
50
|
"@babel/core": "^7.13.15",
|
|
@@ -86,7 +87,7 @@ var nx = {
|
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
};
|
|
89
|
-
var gitHead = "
|
|
90
|
+
var gitHead = "e56ca351167870d88c10abeb0e84c3511d46ee45";
|
|
90
91
|
var packageJSON = {
|
|
91
92
|
name: name,
|
|
92
93
|
description: description,
|
|
@@ -488,82 +489,6 @@ const initAnalytics = (config) => {
|
|
|
488
489
|
});
|
|
489
490
|
};
|
|
490
491
|
|
|
491
|
-
/******************************************************************************
|
|
492
|
-
Copyright (c) Microsoft Corporation.
|
|
493
|
-
|
|
494
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
495
|
-
purpose with or without fee is hereby granted.
|
|
496
|
-
|
|
497
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
498
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
499
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
500
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
501
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
502
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
503
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
504
|
-
***************************************************************************** */
|
|
505
|
-
|
|
506
|
-
var __assign = function() {
|
|
507
|
-
__assign = Object.assign || function __assign(t) {
|
|
508
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
509
|
-
s = arguments[i];
|
|
510
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
511
|
-
}
|
|
512
|
-
return t;
|
|
513
|
-
};
|
|
514
|
-
return __assign.apply(this, arguments);
|
|
515
|
-
};
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
|
|
519
|
-
*/
|
|
520
|
-
/**
|
|
521
|
-
* Lower case as a function.
|
|
522
|
-
*/
|
|
523
|
-
function lowerCase(str) {
|
|
524
|
-
return str.toLowerCase();
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
// Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
|
|
528
|
-
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
|
|
529
|
-
// Remove all non-word characters.
|
|
530
|
-
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
|
|
531
|
-
/**
|
|
532
|
-
* Normalize the string into something other libraries can manipulate easier.
|
|
533
|
-
*/
|
|
534
|
-
function noCase(input, options) {
|
|
535
|
-
if (options === void 0) { options = {}; }
|
|
536
|
-
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;
|
|
537
|
-
var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
|
|
538
|
-
var start = 0;
|
|
539
|
-
var end = result.length;
|
|
540
|
-
// Trim the delimiter from around the output string.
|
|
541
|
-
while (result.charAt(start) === "\0")
|
|
542
|
-
start++;
|
|
543
|
-
while (result.charAt(end - 1) === "\0")
|
|
544
|
-
end--;
|
|
545
|
-
// Transform each token independently.
|
|
546
|
-
return result.slice(start, end).split("\0").map(transform).join(delimiter);
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* Replace `re` in the input string with the replacement value.
|
|
550
|
-
*/
|
|
551
|
-
function replace(input, re, value) {
|
|
552
|
-
if (re instanceof RegExp)
|
|
553
|
-
return input.replace(re, value);
|
|
554
|
-
return re.reduce(function (input, re) { return input.replace(re, value); }, input);
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
function dotCase(input, options) {
|
|
558
|
-
if (options === void 0) { options = {}; }
|
|
559
|
-
return noCase(input, __assign({ delimiter: "." }, options));
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
function snakeCase(input, options) {
|
|
563
|
-
if (options === void 0) { options = {}; }
|
|
564
|
-
return dotCase(input, __assign({ delimiter: "_" }, options));
|
|
565
|
-
}
|
|
566
|
-
|
|
567
492
|
var __defProp$3X = Object.defineProperty;
|
|
568
493
|
var __defProps$2n = Object.defineProperties;
|
|
569
494
|
var __getOwnPropDescs$2n = Object.getOwnPropertyDescriptors;
|