@kiva/kv-shop 1.1.2 → 1.1.4
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/basket.cjs +3 -1
- package/dist/basket.d.ts +2 -1
- package/dist/basket.js +3 -1
- package/dist/basketItems.cjs +1 -1
- package/dist/basketItems.js +2 -2
- package/dist/{chunk-NEYLLDXO.js → chunk-F6QCMBHV.js} +2 -1
- package/dist/{chunk-SFN7S4NC.js → chunk-KSEC5YWO.js} +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -2
- package/package.json +7 -4
package/dist/basket.cjs
CHANGED
|
@@ -20,12 +20,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var basket_exports = {};
|
|
21
21
|
__export(basket_exports, {
|
|
22
22
|
getBasketID: () => getBasketID,
|
|
23
|
+
getCookieValue: () => getCookieValue,
|
|
23
24
|
setBasketID: () => setBasketID
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(basket_exports);
|
|
26
27
|
var getCookieValue = (name) => {
|
|
27
28
|
if (typeof document !== void 0) {
|
|
28
|
-
return document.cookie.match(`(^|;)\\s*${name}\\s*=\\s*([^;]+)`)?.pop() || "";
|
|
29
|
+
return decodeURIComponent(document.cookie.match(`(^|;)\\s*${name}\\s*=\\s*([^;]+)`)?.pop() || "");
|
|
29
30
|
}
|
|
30
31
|
};
|
|
31
32
|
function getBasketID() {
|
|
@@ -36,5 +37,6 @@ function setBasketID(basketId) {
|
|
|
36
37
|
// Annotate the CommonJS export names for ESM import in node:
|
|
37
38
|
0 && (module.exports = {
|
|
38
39
|
getBasketID,
|
|
40
|
+
getCookieValue,
|
|
39
41
|
setBasketID
|
|
40
42
|
});
|
package/dist/basket.d.ts
CHANGED
package/dist/basket.js
CHANGED
package/dist/basketItems.cjs
CHANGED
|
@@ -38,7 +38,7 @@ var import_numeral = __toESM(require("numeral"), 1);
|
|
|
38
38
|
// src/basket.ts
|
|
39
39
|
var getCookieValue = (name) => {
|
|
40
40
|
if (typeof document !== void 0) {
|
|
41
|
-
return document.cookie.match(`(^|;)\\s*${name}\\s*=\\s*([^;]+)`)?.pop() || "";
|
|
41
|
+
return decodeURIComponent(document.cookie.match(`(^|;)\\s*${name}\\s*=\\s*([^;]+)`)?.pop() || "");
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
function getBasketID() {
|
package/dist/basketItems.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/basket.ts
|
|
2
2
|
var getCookieValue = (name) => {
|
|
3
3
|
if (typeof document !== void 0) {
|
|
4
|
-
return document.cookie.match(`(^|;)\\s*${name}\\s*=\\s*([^;]+)`)?.pop() || "";
|
|
4
|
+
return decodeURIComponent(document.cookie.match(`(^|;)\\s*${name}\\s*=\\s*([^;]+)`)?.pop() || "");
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
7
|
function getBasketID() {
|
|
@@ -11,6 +11,7 @@ function setBasketID(basketId) {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export {
|
|
14
|
+
getCookieValue,
|
|
14
15
|
getBasketID,
|
|
15
16
|
setBasketID
|
|
16
17
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -36,6 +36,7 @@ __export(src_exports, {
|
|
|
36
36
|
executeOneTimeCheckout: () => executeOneTimeCheckout,
|
|
37
37
|
getBasketID: () => getBasketID,
|
|
38
38
|
getClientToken: () => getClientToken,
|
|
39
|
+
getCookieValue: () => getCookieValue,
|
|
39
40
|
parseShopError: () => parseShopError,
|
|
40
41
|
setBasketID: () => setBasketID,
|
|
41
42
|
setTipDonation: () => setTipDonation,
|
|
@@ -47,7 +48,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
47
48
|
// src/basket.ts
|
|
48
49
|
var getCookieValue = (name) => {
|
|
49
50
|
if (typeof document !== void 0) {
|
|
50
|
-
return document.cookie.match(`(^|;)\\s*${name}\\s*=\\s*([^;]+)`)?.pop() || "";
|
|
51
|
+
return decodeURIComponent(document.cookie.match(`(^|;)\\s*${name}\\s*=\\s*([^;]+)`)?.pop() || "");
|
|
51
52
|
}
|
|
52
53
|
};
|
|
53
54
|
function getBasketID() {
|
|
@@ -401,6 +402,7 @@ function useBraintreeDropIn() {
|
|
|
401
402
|
executeOneTimeCheckout,
|
|
402
403
|
getBasketID,
|
|
403
404
|
getClientToken,
|
|
405
|
+
getCookieValue,
|
|
404
406
|
parseShopError,
|
|
405
407
|
setBasketID,
|
|
406
408
|
setTipDonation,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { getBasketID, setBasketID } from './basket.js';
|
|
1
|
+
export { getBasketID, getCookieValue, setBasketID } from './basket.js';
|
|
2
2
|
export { SetTipDonationOptions, setTipDonation } from './basketItems.js';
|
|
3
3
|
export { OneTimeCheckoutOptions, WaitOnTransactionOptions, executeOneTimeCheckout, waitOnTransaction } from './oneTimeCheckout.js';
|
|
4
4
|
export { ShopError, ShopErrorOptions, parseShopError } from './shopError.js';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setTipDonation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KSEC5YWO.js";
|
|
4
4
|
import {
|
|
5
5
|
getBasketID,
|
|
6
|
+
getCookieValue,
|
|
6
7
|
setBasketID
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-F6QCMBHV.js";
|
|
8
9
|
import {
|
|
9
10
|
executeOneTimeCheckout,
|
|
10
11
|
waitOnTransaction
|
|
@@ -30,6 +31,7 @@ export {
|
|
|
30
31
|
executeOneTimeCheckout,
|
|
31
32
|
getBasketID,
|
|
32
33
|
getClientToken,
|
|
34
|
+
getCookieValue,
|
|
33
35
|
parseShopError,
|
|
34
36
|
setBasketID,
|
|
35
37
|
setTipDonation,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-shop",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -19,15 +19,18 @@
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "tsup src
|
|
22
|
+
"build": "tsup src/*.ts --format cjs,esm --dts --clean && cp -R src/components/ dist/components/",
|
|
23
23
|
"lint": "eslint --ext .ts,.vue ./src",
|
|
24
|
-
"test": "
|
|
24
|
+
"test": "jest"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.7",
|
|
28
28
|
"@typescript-eslint/parser": "^5.59.7",
|
|
29
29
|
"@vue/eslint-config-typescript": "^11.0.3",
|
|
30
30
|
"eslint-plugin-vue": "^9.14.0",
|
|
31
|
+
"jest": "^29.5.0",
|
|
32
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
33
|
+
"ts-jest": "^29.1.0",
|
|
31
34
|
"tsup": "^6.7.0",
|
|
32
35
|
"typescript": "^5.0.4",
|
|
33
36
|
"vue": "2.6",
|
|
@@ -50,5 +53,5 @@
|
|
|
50
53
|
"optional": true
|
|
51
54
|
}
|
|
52
55
|
},
|
|
53
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "2ad76dbc917ebd7ce1ef1278f8ce6164b8acfc57"
|
|
54
57
|
}
|