commercelayer
Advanced tools
Comparing version 1.9.1 to 1.9.2
{ | ||
"name": "commercelayer", | ||
"version": "1.9.1", | ||
"version": "1.9.2", | ||
"description": "The Official Commerce Layer JS library", | ||
@@ -28,3 +28,3 @@ "main": "./src/main.js", | ||
"dependencies": { | ||
"@commercelayer/sdk": "^1.5.1", | ||
"@commercelayer/sdk": "^1.6.2", | ||
"js-cookie": "^2.2.0", | ||
@@ -31,0 +31,0 @@ "lodash": "^4.17.11" |
@@ -24,3 +24,3 @@ const config = require('./config') | ||
clsdk.listSkus(qf.build()) | ||
clsdk.allSkus(qf.build()) | ||
.then(data => { | ||
@@ -38,12 +38,3 @@ | ||
ui.updatePrices(data.get(skuAttributes)) | ||
let pageCount = data.dataset.meta.page_count; | ||
if (pageCount > 1) { | ||
for (p=2; p<=pageCount; p++) { | ||
qf.pageNumber(p) | ||
clsdk.listSkus(qf) | ||
.then(data => ui.updatePrices(data.get(skuAttributes))) | ||
} | ||
} | ||
document.dispatchEvent(new Event('clayer-prices-ready')) | ||
} | ||
@@ -74,16 +65,6 @@ ) | ||
clsdk.listSkus(qf.build()) | ||
clsdk.allSkus(qf.build()) | ||
.then(data => { | ||
ui.updateVariants(data.get(skuAttributes)) | ||
let pageCount = data.dataset.meta.page_count; | ||
if (pageCount > 1) { | ||
for (p=2; p<=pageCount; p++) { | ||
qf.pageNumber(p) | ||
clsdk.listSkus(qf) | ||
.then(data => ui.updateVariants(data.get(skuAttributes))) | ||
} | ||
} | ||
document.dispatchEvent(new Event('clayer-variants-ready')) | ||
} | ||
@@ -114,16 +95,6 @@ ) | ||
clsdk.listSkus(qf.build()) | ||
clsdk.allSkus(qf.build()) | ||
.then(data => { | ||
ui.updateAddToBags(data.get(skuAttributes)) | ||
let pageCount = data.dataset.meta.page_count; | ||
if (pageCount > 1) { | ||
for (p=2; p<=pageCount; p++) { | ||
qf.pageNumber(p) | ||
clsdk.listSkus(qf) | ||
.then(data => ui.updateAddToBags(data.get(skuAttributes))) | ||
} | ||
} | ||
document.dispatchEvent(new Event('clayer-add-to-bags-ready')) | ||
} | ||
@@ -159,2 +130,3 @@ ) | ||
} | ||
document.dispatchEvent(new Event('clayer-variant-selected')) | ||
}) | ||
@@ -197,2 +169,3 @@ }, | ||
} | ||
document.dispatchEvent(new Event('clayer-order-ready')) | ||
return response; | ||
@@ -243,2 +216,6 @@ } | ||
}) | ||
.then(function(response) { | ||
document.dispatchEvent(new Event('clayer-line-item-created')) | ||
return response | ||
}) | ||
}, | ||
@@ -248,4 +225,5 @@ | ||
return clsdk.deleteLineItem(lineItemId) | ||
.then(function() { | ||
return true | ||
.then(function(response) { | ||
document.dispatchEvent(new Event('clayer-line-item-deleted')) | ||
return response | ||
}) | ||
@@ -262,2 +240,6 @@ }, | ||
}) | ||
.then(function(response) { | ||
document.dispatchEvent(new Event('clayer-line-item-updated')) | ||
return response | ||
}) | ||
}, | ||
@@ -264,0 +246,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
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
328363
2136
Updated@commercelayer/sdk@^1.6.2