Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dotdev/next-components

Package Overview
Dependencies
Maintainers
7
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotdev/next-components - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

1

dist/helpers/cart.d.ts

@@ -16,2 +16,3 @@ export declare class Cart {

private getLocationFromPostcode;
getProductRecommendations: (id: number, limit: number) => Promise<void>;
toggleFreeShipping: (event: any) => void;

@@ -18,0 +19,0 @@ toggleUpsells: (event: any) => void;

@@ -286,2 +286,39 @@ "use strict";

}); };
this.getProductRecommendations = function (id, limit) { return __awaiter(_this, void 0, void 0, function () {
var _this = this;
return __generator(this, function (_a) {
try {
fetch("/recommendations/products.json?product_id=" + id + "&limit=" + (limit ? limit : 4), {
credentials: "same-origin",
headers: {
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/json;"
},
method: "GET"
})
.then(function (response) { return response.json(); })
.then(function (_a) {
var products = _a.products;
if (products.length > 0) {
_this.context.update({
recommedations: products,
message: "PRODUCT_RECOMMENDATIONS_SUCCESS"
});
}
else {
_this.context.update({
message: "PRODUCT_RECOMMENDATIONS_NOTFOUND"
});
}
});
}
catch (err) {
this.context.update({
message: "PRODUCT_RECOMMENDATIONS_FAILED",
error: err.message
});
}
return [2 /*return*/];
});
}); };
this.toggleFreeShipping = function (event) { };

@@ -288,0 +325,0 @@ this.toggleUpsells = function (event) { };

2

package.json
{
"name": "@dotdev/next-components",
"version": "0.2.5",
"version": "0.2.6",
"license": "UNLICENSED",

@@ -5,0 +5,0 @@ "description": "Common components for Next projects",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc