Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (comp: AlloyComponent) => {
if (buttonType === 'custom') {
AlloyTriggers.emitWith(comp, formActionEvent, {
name,
value: { }
});
} else if (buttonType === 'submit') {
AlloyTriggers.emit(comp, formSubmitEvent);
} else if (buttonType === 'cancel') {
AlloyTriggers.emit(comp, formCancelEvent);
} else {
// tslint:disable-next-line:no-console
console.error('Unknown button type: ', buttonType);
}
};
};return (comp: AlloyComponent) => {
if (buttonType === 'custom') {
AlloyTriggers.emitWith(comp, formActionEvent, {
name,
value: { }
});
} else if (buttonType === 'submit') {
AlloyTriggers.emit(comp, formSubmitEvent);
} else if (buttonType === 'cancel') {
AlloyTriggers.emit(comp, formCancelEvent);
} else {
// tslint:disable-next-line:no-console
console.error('Unknown button type: ', buttonType);
}
};
}; () => AlloyTriggers.emit(colorBit, colorPickerCancelEvent),
(value) => { const emitEnable = (component) => AlloyTriggers.emit(component, ImageToolsEvents.external.enable()); const emitDisable = (component) => AlloyTriggers.emit(component, ImageToolsEvents.external.disable());
const emitEnable = (component) => AlloyTriggers.emit(component, ImageToolsEvents.external.enable());execute: (comp) => {
AlloyTriggers.emit(comp, formSubmitEvent);
return Option.some(true);
},
}),onSetValue: (comp, items) => {
setContents(comp, items);
if (spec.columns === 'auto') {
detectSize(comp, 5, 'tox-collection__item').each(({ numRows, numColumns }) => {
Keying.setGridSize(comp, numRows, numColumns);
});
}
AlloyTriggers.emit(comp, formResizeEvent);
}
}),Form.getField(rgbForm, 'hex').each((hexField) => {
AlloyTriggers.emit(hexField, NativeEvents.input());
});
});execute: (comp) => {
AlloyTriggers.emit(comp, formSubmitEvent);
return Option.some(true);
},
}),