Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
}
});
module.exports = require('marko-widgets').defineComponent({
template: require('./template.marko'),
init: function() {
window.fooWidget = this;
}
});
require('./style.less');
module.exports = require('marko-widgets').defineComponent({
template: require('./template.marko'),
getInitialProps: function(input) {
var tabs = [];
var activeIndex = -1;
function addTab(tab) {
if (tab.active) {
activeIndex = tabs.length;
}
tabs.push(tab);
}
if (input.tabs) {
require('./style.less');
module.exports = require('marko-widgets').defineComponent({
template: require('./template.marko'),
getInitialState: function(input) {
return {
checked: input.checked === true,
checkboxClassName: input['class'] || input.checkboxClassName,
data: input.data
};
},
getTemplateData: function(state, input) {
var checked = state.checked;
var className = 'app-checkbox';
if (state.checkboxClassName) {
className += ' ' + state.checkboxClassName;
}