@artisan-commerce/analytics-web 0.2.0-canary.74 → 0.2.0-canary.76

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.d.ts CHANGED
@@ -474,14 +474,14 @@ declare namespace Fbq {
474
474
  /**
475
475
  * Analytics providers configurable options.
476
476
  *
477
- * @typedef ArtisnPlatform
477
+ * @typedef AnalyticsProvidersConfigs
478
478
  * @since 0.1.0
479
479
  */
480
480
  declare type AnalyticsProvidersConfigs = Partial<GoogleAnalyticsProviderConfig> | Partial<FacebookPixelProviderConfig>;
481
481
  /**
482
482
  * Analytics event metadata to be included in every sent event.
483
483
  *
484
- * @interface ArtisnPlatform
484
+ * @interface AnalyticsMeta
485
485
  * @since 0.1.0
486
486
  * @property {number} accountId the id of the account it is running on
487
487
  * @property {number} vendorId the id of the active vendor
@@ -1,10 +1,11 @@
1
1
  import { initState, getState as getState$1, setState as setState$1 } from '@artisan-commerce/state';
2
- import { getShoppingCartProducts, getShoppingCartTotal } from '@artisan-commerce/shopping-cart';
2
+ import { snakeCase } from 'snake-case';
3
+ import { getShoppingCartProducts, getShoppingCartTotal } from '@artisan-commerce/shopping-cart-core';
3
4
  import { getProductTotals } from '@artisan-commerce/products';
4
5
 
5
6
  var name = "@artisan-commerce/analytics-web";
6
7
  var description = "Artisn commerce analytics web library";
7
- var version = "0.2.0-canary.73";
8
+ var version = "0.2.0-canary.75";
8
9
  var main = "./dist/bundle.cjs.js";
9
10
  var module = "./dist/bundle.esm.js";
10
11
  var types = "./dist/bundle.d.ts";
@@ -37,14 +38,14 @@ var dependencies = {
37
38
  "snake-case": "^3.0.4"
38
39
  };
39
40
  var devDependencies = {
40
- "@artisan-commerce/products": "0.9.0-canary.47",
41
- "@artisan-commerce/shopping-cart": "0.12.0-canary.70",
41
+ "@artisan-commerce/shopping-cart-core": "^0.12.0-canary.70",
42
+ "@artisan-commerce/products": "0.9.0-canary.49",
42
43
  "@artisan-commerce/state": "0.3.0-canary.8",
43
44
  "@artisan-commerce/types": "0.14.0-canary.37"
44
45
  };
45
46
  var peerDependencies = {
47
+ "@artisan-commerce/shopping-cart-core": "*",
46
48
  "@artisan-commerce/products": "*",
47
- "@artisan-commerce/shopping-cart": "*",
48
49
  "@artisan-commerce/state": "*"
49
50
  };
50
51
  var nx = {
@@ -613,82 +614,6 @@ const initAnalytics = (config) => {
613
614
  setState({ initialized: true });
614
615
  };
615
616
 
616
- /******************************************************************************
617
- Copyright (c) Microsoft Corporation.
618
-
619
- Permission to use, copy, modify, and/or distribute this software for any
620
- purpose with or without fee is hereby granted.
621
-
622
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
623
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
624
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
625
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
626
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
627
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
628
- PERFORMANCE OF THIS SOFTWARE.
629
- ***************************************************************************** */
630
-
631
- var __assign = function() {
632
- __assign = Object.assign || function __assign(t) {
633
- for (var s, i = 1, n = arguments.length; i < n; i++) {
634
- s = arguments[i];
635
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
636
- }
637
- return t;
638
- };
639
- return __assign.apply(this, arguments);
640
- };
641
-
642
- /**
643
- * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
644
- */
645
- /**
646
- * Lower case as a function.
647
- */
648
- function lowerCase(str) {
649
- return str.toLowerCase();
650
- }
651
-
652
- // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
653
- var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
654
- // Remove all non-word characters.
655
- var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
656
- /**
657
- * Normalize the string into something other libraries can manipulate easier.
658
- */
659
- function noCase(input, options) {
660
- if (options === void 0) { options = {}; }
661
- 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;
662
- var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
663
- var start = 0;
664
- var end = result.length;
665
- // Trim the delimiter from around the output string.
666
- while (result.charAt(start) === "\0")
667
- start++;
668
- while (result.charAt(end - 1) === "\0")
669
- end--;
670
- // Transform each token independently.
671
- return result.slice(start, end).split("\0").map(transform).join(delimiter);
672
- }
673
- /**
674
- * Replace `re` in the input string with the replacement value.
675
- */
676
- function replace(input, re, value) {
677
- if (re instanceof RegExp)
678
- return input.replace(re, value);
679
- return re.reduce(function (input, re) { return input.replace(re, value); }, input);
680
- }
681
-
682
- function dotCase(input, options) {
683
- if (options === void 0) { options = {}; }
684
- return noCase(input, __assign({ delimiter: "." }, options));
685
- }
686
-
687
- function snakeCase(input, options) {
688
- if (options === void 0) { options = {}; }
689
- return dotCase(input, __assign({ delimiter: "_" }, options));
690
- }
691
-
692
617
  var __defProp$3X = Object.defineProperty;
693
618
  var __defProps$2s = Object.defineProperties;
694
619
  var __getOwnPropDescs$2s = Object.getOwnPropertyDescriptors;