UNPKG

react-microspreadsheet

Version:

A pluggable spreadsheet component.

40 lines (27 loc) 1.12 kB
// Generated by CoffeeScript 1.8.0 var EventEmitter, Store, dispatcher, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; EventEmitter = require('wolfy-eventemitter'); if (EventEmitter.EventEmitter) { EventEmitter = EventEmitter.EventEmitter; } dispatcher = require('./dispatcher'); Store = (function(_super) { __extends(Store, _super); function Store() { return Store.__super__.constructor.apply(this, arguments); } Store.prototype.construct = function() {}; Store.prototype.registerCallback = function(event, fn) { return dispatcher.on(event, fn); }; Store.prototype.triggerCallback = function(event) { return dispatcher.emit(event, arguments[1], arguments[2]); }; Store.prototype.changed = function() { return this.emit('CHANGE'); }; return Store; })(EventEmitter); module.exports = Store;