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

apostrophe-schema-widgets

Package Overview
Dependencies
Maintainers
15
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apostrophe-schema-widgets - npm Package Compare versions

Comparing version 0.5.21 to 0.5.22

14

index.js

@@ -44,2 +44,6 @@ /* jshint node:true */

if (options.afterLoad) {
widget.afterLoad = options.afterLoad;
}
if (_.find(options.schema, function(field) {

@@ -98,4 +102,10 @@ return (field.name === 'content');

return self._schemas.join(req, options.schema, items, undefined, function(err) {
req.aposSchemaWidgetLoading = false;
return setImmediate(_.partial(callback, err));
if (err || typeof widget.afterLoad !== 'function'){
req.aposSchemaWidgetLoading = false;
return setImmediate(_.partial(callback, err));
}
return widget.afterLoad(req, items[0], function(err) {
req.aposSchemaWidgetLoading = false;
return setImmediate(_.partial(callback, err));
});
});

@@ -102,0 +112,0 @@ };

2

package.json
{
"name": "apostrophe-schema-widgets",
"version": "0.5.21",
"version": "0.5.22",
"description": "An easy form widget builder for the Apostrophe content management system",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -66,2 +66,3 @@ # apostrophe-schema-widgets

instructions: 'Click "add" to add your first link. Enter a label and paste a URL for each link.',
type: 'array',
schema: [

@@ -147,2 +148,12 @@ {

If you need to fetch more data that is dependent on all of the joins being hydrated,
you can execute custom code after the widget is finished loading in your `index.js`:
```javascript
self.widgets.menuBuilder.afterLoad = function(req, item, callback) {
// Fetch more data
return callback(null);
}
```
You also have `afterConvertFields` available to you for treating fields after they are sanitized. You can use it in `index.js` like this:

@@ -156,2 +167,1 @@

```
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