@nuskin/mobile-cart
Advanced tools
Comparing version 3.0.2 to 3.0.3-test.0
@@ -8,9 +8,9 @@ "use strict"; | ||
var _nsLoginReactNative = require("@nuskin/ns-login-react-native"); | ||
var _utilsModule = require("@nuskin/utils-module"); | ||
var _asyncStorage = _interopRequireDefault(require("@react-native-async-storage/async-storage")); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _utilsModule = require("@nuskin/utils-module"); | ||
var _axiosUtil = require("@nuskin/axios-util"); | ||
var _featureFlags = require("@nuskin/feature-flags"); | ||
var _KrCartApi = _interopRequireDefault(require("./KrCartApi")); | ||
var _NsCartApi = _interopRequireDefault(require("./NsCartApi")); | ||
var _KrCartApi = _interopRequireDefault(require("./KrCartApi")); | ||
var _featureFlags = require("@nuskin/feature-flags"); | ||
var _axiosUtil = require("@nuskin/axios-util"); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -47,2 +47,3 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
const [itemCount, setItemCount] = (0, _react.useState)(0); | ||
const [error, setError] = (0, _react.useState)(); | ||
const [event, setEvent] = (0, _react.useState)({ | ||
@@ -218,2 +219,3 @@ eventId: '', | ||
console.log('addSkuToCart exception', err); | ||
setError(err); | ||
} | ||
@@ -544,3 +546,4 @@ } else { | ||
anonymousCartId, | ||
userInfo | ||
userInfo, | ||
error | ||
}; | ||
@@ -547,0 +550,0 @@ return /*#__PURE__*/_react.default.createElement(CartContext.Provider, { |
/* eslint-disable */ | ||
import { useAuthStore, getEquinoxUser } from '@nuskin/ns-login-react-native'; | ||
import { getEquinoxUser, useAuthStore } from '@nuskin/ns-login-react-native'; | ||
import { localization, useConfigurationStore } from '@nuskin/utils-module'; | ||
import AsyncStorage from '@react-native-async-storage/async-storage'; | ||
import React, { useContext, useEffect, useState } from 'react'; | ||
import { localization, useConfigurationStore } from '@nuskin/utils-module'; | ||
import { axios } from '@nuskin/axios-util'; | ||
import { useFeatureFlagStore } from '@nuskin/feature-flags'; | ||
import krCartUtil from './KrCartApi'; | ||
import nsCartUtil from './NsCartApi'; | ||
import krCartUtil from './KrCartApi'; | ||
import { useFeatureFlagStore } from '@nuskin/feature-flags'; | ||
import { axios } from '@nuskin/axios-util'; | ||
var ShoppingContextValue; | ||
@@ -37,2 +37,3 @@ (function (ShoppingContextValue) { | ||
const [itemCount, setItemCount] = useState(0); | ||
const [error, setError] = useState(); | ||
const [event, setEvent] = useState({ | ||
@@ -208,2 +209,3 @@ eventId: '', | ||
console.log('addSkuToCart exception', err); | ||
setError(err); | ||
} | ||
@@ -534,3 +536,4 @@ } else { | ||
anonymousCartId, | ||
userInfo | ||
userInfo, | ||
error | ||
}; | ||
@@ -537,0 +540,0 @@ return /*#__PURE__*/React.createElement(CartContext.Provider, { |
@@ -24,2 +24,3 @@ /// <reference types="react" /> | ||
userInfo: any; | ||
error: any; | ||
} | ||
@@ -26,0 +27,0 @@ export declare const CartProvider: ({ children }: { |
{ | ||
"name": "@nuskin/mobile-cart", | ||
"private": false, | ||
"version": "3.0.2", | ||
"version": "3.0.3-test.0", | ||
"repository": { | ||
@@ -14,3 +14,3 @@ "type": "git", | ||
"module": "lib/module/index.js", | ||
"types": "lib/typescript/src/index.d.ts", | ||
"types": "lib/typescript/index.d.ts", | ||
"files": [ | ||
@@ -26,3 +26,3 @@ "src", | ||
"scripts": { | ||
"prepare": "bob build", | ||
"prepare": "npx bob build", | ||
"clean": "rm -rf lib", | ||
@@ -144,8 +144,8 @@ "lint": "eslint \"**/*.{js,ts,tsx}\"", | ||
}, | ||
"commithash": "e977edd852806d9d224de9a914e6f75ec43b4364", | ||
"commithash": "44d05cdcda25a81ed33d82d93c0d578d9c24abf2", | ||
"author": { | ||
"name": "Treg Anderson", | ||
"email": "tsanderson@nuskin.com", | ||
"url": "https://code.tls.nuskin.io/tsanderson" | ||
"name": "Brian Alvis", | ||
"email": "balvis@nuskin.com", | ||
"url": "https://code.tls.nuskin.io/balvis" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
248945
3461
180
2