Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Export a render(input, callback) method that can be used
// to render this UI component on the client or server
require("marko-widgets").renderable(exports, require("./renderer"));
// Export a render(input, callback) method that can be used
// to render this UI component on the client or server
require('marko-widgets').renderable(exports, require('./renderer'));
// Export a render(input, callback) method that can be used
// to render this UI component on the client or server
require('marko-widgets').renderable(exports, require('./renderer'));
// Export a render(input, callback) method that can be used
// to render this UI component on the client or server
require('marko-widgets').renderable(exports, require('./renderer'));
// Export a render(input, callback) method that can be used
// to render this UI component on the client or server
require('marko-widgets').renderable(exports, require('./renderer'));
htmlAttributes: input,
};
}
function handleClick() {
if (!this.state.disabled) {
// eslint-disable-next-line no-undef,no-alert
alert('button-click');
}
}
function getInitialBody(input) {
return input.body;
}
module.exports = markoWidgets.defineComponent({
template,
getInitialState,
getTemplateData,
getInitialBody,
handleClick,
});
module.exports = require('marko-widgets').defineComponent({
template: require.resolve('./template.marko'),
getTemplateData: function(state, input) {
return {
label: input.label
};
},
emitPressEvent: function() {
this.emit('press', { widget: this });
}
});
module.exports = require('marko-widgets').defineComponent({
template: require('./template.marko'),
getWidgetConfig: function() {
return {
name: 'app-foo'
};
},
init: function(widgetConfig) {
this.widgetConfig = widgetConfig;
window.fooWidget = this;
}
});
var barRenderer = require('./components/app-bar/renderer').render;
module.exports = require('marko-widgets').defineComponent({
template: require('./template.marko'),
getTemplateData: function(input, out) {
return {
barRenderer: barRenderer,
barWidgetId: 'myBar'
};
}
});
module.exports = require('marko-widgets').defineComponent({
template: require('./template.marko'),
init: function() {
window.bazWidget = this;
}
});