From 0eaa9dfd1f8e9cb9e4328b652f41d0a4c7f1c4d6 Mon Sep 17 00:00:00 2001 From: Darcy Date: Mon, 23 May 2016 16:32:30 -0400 Subject: [PATCH] fix some formatting and run the build --- dist/delorean.js | 14 ++++++++++++-- dist/delorean.min.js | 2 +- dist/delorean.min.js.map | 2 +- src/delorean.js | 5 ----- test/spec/core/fluxSpec.js | 12 ++++-------- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/dist/delorean.js b/dist/delorean.js index 8cbb97c..752397f 100644 --- a/dist/delorean.js +++ b/dist/delorean.js @@ -1,4 +1,4 @@ -/*! delorean - v0.9.6-0 - 2015-08-24 */ +/*! delorean - v0.9.8 - 2016-05-23 */ (function (DeLorean) { 'use strict'; @@ -99,7 +99,6 @@ DeLorean.EventEmitter.defaultMaxListeners = 50; this.listener = new DeLorean.EventEmitter(); this.stores = stores; - /* Stores should be listened for rollback events. */ __rollbackListener(Object.keys(stores).map(function (key) { return stores[key]; @@ -567,6 +566,17 @@ // ## Built-in React Mixin DeLorean.Flux.mixins = { + + // This mixin adds the this.trigger method to the component + // Components can then trigger actions in flux w/out watching stores and having their state + trigger: { + componentWillMount: function () { + this.__dispatcher = __findDispatcher(this); + }, + trigger: function () { + this.__dispatcher.emit.apply(this.__dispatcher, arguments); + } + }, // It should be inserted to the React components which // used in Flux. // Simply `mixin: [Flux.mixins.storeListener]` will work. diff --git a/dist/delorean.min.js b/dist/delorean.min.js index 6133c5e..5fcdd3e 100644 --- a/dist/delorean.min.js +++ b/dist/delorean.min.js @@ -1,2 +1,2 @@ -!function(DeLorean){"use strict";function a(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function b(a){return"action:"+a}function c(a){return"original:"+a}function d(a){if(null==DeLorean.dispatcher)throw'No dispatcher found. The DeLoreanJS mixin requires a "dispatcher" has been created using Flux.createDispatcher.';return DeLorean.dispatcher}function e(b){if(null===b||"object"!=typeof b)return b;var c=b.constructor();for(var d in b)a(b,d)&&(c[d]=e(b[d]));return c}function f(a,b){b=e(b);for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var Dispatcher,Store;if(Dispatcher=function(){function a(a){function b(){for(var b in a)a[b].listener.emit("__rollback")}for(var c in a)a[c].listener.on("rollback",b)}function Dispatcher(b){DeLorean.EventEmitter.defaultMaxListeners=50,this.listener=new DeLorean.EventEmitter,this.stores=b,a(Object.keys(b).map(function(a){return b[a]}))}return Dispatcher.prototype.dispatch=function(){var a,b,c,d=this;c=Array.prototype.slice.call(arguments),this.listener.emit.apply(this.listener,["dispatch"].concat(c)),a=function(){var a,b=[];for(var c in d.stores){if(a=d.stores[c],!a instanceof Store)throw"Given store is not a store instance";b.push(a)}return b}(),b=this.waitFor(a,c[0]);for(var e in d.stores)d.stores[e].dispatchAction.apply(d.stores[e],c);return b},Dispatcher.prototype.waitFor=function(a,b){var c,d=this;return c=function(){function c(a){return new DeLorean.Promise(function(c,d){a.listener.once("change",c),a.listener.once("rollback",d),a.listener.once("cleanup_"+b,function(){a.listener.removeListener("change",c),a.listener.removeListener("rollback",d)})})}var d,e=[];for(var f in a)a[f].actions&&null!=a[f].actions[b]&&(d=c(a[f]),e.push(d));return e}(),DeLorean.Promise.all(c).then(function(){d.listener.emit("change:all")})},Dispatcher.prototype.registerAction=function(a,b){if("function"!=typeof b)throw"Action callback should be a function.";this[a]=b.bind(this.stores)},Dispatcher.prototype.register=function(a){if("function"!=typeof a)throw"Global callback should be a function.";this.listener.on("dispatch",a)},Dispatcher.prototype.getStore=function(a){if(!this.stores[a])throw"Store "+a+" does not exist.";return this.stores[a].getState()},Dispatcher.prototype.on=function(){return this.listener.on.apply(this.listener,arguments)},Dispatcher.prototype.off=function(){return this.listener.removeListener.apply(this.listener,arguments)},Dispatcher.prototype.emit=function(){return this.listener.emit.apply(this.listener,arguments)},Dispatcher}(),Store=function(){function Store(a){this.state||(this.state={}),this.listener=new DeLorean.EventEmitter,this.bindActions(),this.buildScheme(),this.initialize.apply(this,arguments)}return Store.prototype.initialize=function(){},Store.prototype.get=function(a){return this.state[a]},Store.prototype.set=function(a,b){var c=[];if("object"==typeof a)for(var d in a)c.push(d),this.setValue(d,a[d]);else c.push(a),this.setValue(a,b);return this.recalculate(c),this.state[a]},Store.prototype.setValue=function(a,b){var d,e=this.scheme;return e&&this.scheme[a]?(d=e[a],this.state[a]="undefined"!=typeof b?b:d["default"],"function"==typeof d.calculate&&(this.state[c(a)]=b,this.state[a]=d.calculate.call(this,b))):null!=console&&console.warn("Scheme must include the key, "+a+", you are trying to set. "+a+" will NOT be set on the store."),this.state[a]},Store.prototype.formatScheme=function(a){var b,c,d,e={};for(var f in a)b=a[f],c=null,d=null,e[f]={"default":null},c=b&&"object"==typeof b?b["default"]:b,e[f]["default"]=c,b&&"function"==typeof b.calculate?(d=b.calculate,b.deps?e[f].deps=b.deps:e[f].deps=[]):"function"==typeof b&&(d=b),d&&(e[f].calculate=d);return e},Store.prototype.buildScheme=function(){var a,b,d,f,g,h,i=[];if("object"==typeof this.scheme){a=this.scheme=this.formatScheme(this.scheme),f=this.__dependencyMap={};for(b in a)d=a[b],this.state[b]=e(d["default"]);for(b in a)if(d=a[b],d.calculate){g=d.deps||[];for(var j=0;j0&&this.recalculate(h),this.listener.emit("change")},Store.prototype.getState=function(){return this.state},Store.prototype.clearState=function(){return this.state={},this},Store.prototype.resetState=function(){return this.buildScheme(),this.listener.emit("change"),this},Store.prototype.bindActions=function(){var c;this.emitChange=this.listener.emit.bind(this.listener,"change"),this.emitRollback=this.listener.emit.bind(this.listener,"rollback"),this.rollback=this.listener.on.bind(this.listener,"__rollback"),this.emit=this.listener.emit.bind(this.listener);for(var d in this.actions)if(a(this.actions,d)){if(c=this.actions[d],"function"!=typeof this[c])throw"Callback '"+c+"' defined for action '"+d+"' should be a method defined on the store!";this.listener.on(b(d),this[c].bind(this))}},Store.prototype.dispatchAction=function(a,c){this.listener.emit(b(a),c),this.listener.emit("cleanup_"+a)},Store.prototype.listenChanges=function(a){var b,c=this;return Object.observe?(b=Array.isArray(a)?Array.observe:Object.observe,void b(a,function(a){c.listener.emit("change",a)})):void console.error("Store#listenChanges method uses Object.observe, you should fire changes manually.")},Store.prototype.onChange=function(a){this.listener.on("change",a)},Store}(),DeLorean.Flux={createStore:function(a){if("object"!=typeof a)throw"Stores should be defined by passing the definition to the constructor";var b=function(){return Store.apply(this,arguments)},c=function(){this.constructor=b};return c.prototype=Store.prototype,b.prototype=new c,f(b.prototype,a),new b},createDispatcher:function(b){var c,d,e,f,g;"function"==typeof b.getStores&&(c=b.getStores()),d=new Dispatcher(c||{});for(var h in b)a(b,h)&&"getStores"!==h&&"viewTriggers"!==h&&"function"==typeof b[h]&&(e=b[h],d.registerAction(h,e.bind(d)));f=b.viewTriggers;for(var i in f)g=f[i],"function"==typeof d[g]?d.on(i,d[g]):null!=console&&console.warn(g+" should be a method defined on your dispatcher. The "+i+" trigger will not be bound to any method.");return null!=DeLorean.dispatcher&&null!=console&&console.warn("You are attempting to create more than one dispatcher. DeLorean is intended to be used with a single dispatcher. This latest dispatcher created will overwrite any previous versions."),DeLorean.dispatcher=d,d},define:function(a,b){DeLorean[a]=b}},DeLorean.Dispatcher=Dispatcher,DeLorean.Store=Store,DeLorean.Flux.mixins={storeListener:{trigger:function(){this.__dispatcher.emit.apply(this.__dispatcher,arguments)},componentDidMount:function(){function b(a,b){return function(){var a;e.isMounted()&&e.setState(e.getStoreStates()),e.storeDidChange&&(a=[b].concat(Array.prototype.slice.call(arguments,0)),e.storeDidChange.apply(e,a))}}var c,d,e=this;this.__changeHandlers={};for(d in this.__watchStores)a(this.stores,d)&&(c=this.stores[d],this.__changeHandlers[d]=b(c,d),c.onChange(this.__changeHandlers[d]))},componentWillUnmount:function(){for(var b in this.__changeHandlers)if(a(this.stores,b)){var c=this.stores[b];c.listener.removeListener("change",this.__changeHandlers[b])}},getInitialState:function(){var a,b=this;if(this.__dispatcher=d(this),this.storesDidChange&&this.__dispatcher.on("change:all",function(){b.storesDidChange()}),this.stores=this.__dispatcher.stores,this.__watchStores={},null!=this.watchStores)for(var c=0;c4&&console.warn('Your component is watching changes on all stores, you may want to define a "watchStores" property in order to only watch stores relevant to this component.');return this.getStoreStates()},getStoreStates:function(){var b={stores:{}};for(var c in this.__watchStores)a(this.stores,c)&&(b.stores[c]=this.__watchStores[c].getState());return b},getStore:function(a){if(null!=console&&"undefined"==typeof this.__watchStores[a]){var b;b="Attempt to getStore "+a+" failed. ",b+="undefined"==typeof this.stores[a]?"It is not defined on the dispatcher. ":"It is not being watched by the component. ",b+=null!=this.constructor&&null!=this.constructor.displayName?"Check the "+this.constructor.displayName+" component.":"",console.warn(b)}return this.state.stores[a]}}},"undefined"!=typeof module&&"undefined"!=typeof module.exports){var g=require("./requirements");for(var h in g)DeLorean.Flux.define(h,g[h]);module.exports=DeLorean}else"function"==typeof define&&define.amd?define(["./requirements.js"],function(a){for(var b in a)DeLorean.Flux.define(b,a[b]);return DeLorean}):window.DeLorean=DeLorean}({}),function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;ga||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},d.prototype.emit=function(a){var b,c,d,f,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||g(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],h(c))return!1;if(e(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(d=arguments.length,f=new Array(d-1),i=1;d>i;i++)f[i-1]=arguments[i];c.apply(this,f)}else if(g(c)){for(d=arguments.length,f=new Array(d-1),i=1;d>i;i++)f[i-1]=arguments[i];for(j=c.slice(),d=j.length,i=0;d>i;i++)j[i].apply(this,f)}return!0},d.prototype.addListener=function(a,b){var c;if(!e(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,e(b.listener)?b.listener:b),this._events[a]?g(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,g(this._events[a])&&!this._events[a].warned){var c;c=h(this._maxListeners)?d.defaultMaxListeners:this._maxListeners,c&&c>0&&this._events[a].length>c&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())}return this},d.prototype.on=d.prototype.addListener,d.prototype.once=function(a,b){function c(){this.removeListener(a,c),d||(d=!0,b.apply(this,arguments))}if(!e(b))throw TypeError("listener must be a function");var d=!1;return c.listener=b,this.on(a,c),this},d.prototype.removeListener=function(a,b){var c,d,f,h;if(!e(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,d=-1,c===b||e(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(g(c)){for(h=f;h-->0;)if(c[h]===b||c[h].listener&&c[h].listener===b){d=h;break}if(0>d)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(d,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},d.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],e(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},d.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?e(this._events[a])?[this._events[a]]:this._events[a].slice():[]},d.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?e(a._events[b])?1:a._events[b].length:0}},{}],12:[function(a,b,c){function d(){}var e=b.exports={};e.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=d,e.addListener=d,e.once=d,e.off=d,e.removeListener=d,e.removeAllListeners=d,e.emit=d,e.binding=function(a){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(a){throw new Error("process.chdir is not supported")}},{}],13:[function(a,b,c){var d;if("undefined"!=typeof b&&"undefined"!=typeof b.exports?b.exports=d={EventEmitter:a("events").EventEmitter,Promise:a("es6-promise").Promise}:"function"==typeof define&&define.amd?define(function(a,b,c){a("events"),a("es6-promise");return{EventEmitter:a("events").EventEmitter,Promise:a("es6-promise").Promise}}):window.DeLorean=DeLorean,"undefined"!=typeof DeLorean)for(var e in d)DeLorean.Flux.define(e,d[e])},{"es6-promise":1,events:11}]},{},[13]); +!function(DeLorean){"use strict";function a(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function b(a){return"action:"+a}function c(a){return"original:"+a}function d(a){if(null==DeLorean.dispatcher)throw'No dispatcher found. The DeLoreanJS mixin requires a "dispatcher" has been created using Flux.createDispatcher.';return DeLorean.dispatcher}function e(b){if(null===b||"object"!=typeof b)return b;var c=b.constructor();for(var d in b)a(b,d)&&(c[d]=e(b[d]));return c}function f(a,b){b=e(b);for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var Dispatcher,Store;if(Dispatcher=function(){function a(a){function b(){for(var b in a)a[b].listener.emit("__rollback")}for(var c in a)a[c].listener.on("rollback",b)}function Dispatcher(b){DeLorean.EventEmitter.defaultMaxListeners=50,this.listener=new DeLorean.EventEmitter,this.stores=b,a(Object.keys(b).map(function(a){return b[a]}))}return Dispatcher.prototype.dispatch=function(){var a,b,c,d=this;c=Array.prototype.slice.call(arguments),this.listener.emit.apply(this.listener,["dispatch"].concat(c)),a=function(){var a,b=[];for(var c in d.stores){if(a=d.stores[c],!a instanceof Store)throw"Given store is not a store instance";b.push(a)}return b}(),b=this.waitFor(a,c[0]);for(var e in d.stores)d.stores[e].dispatchAction.apply(d.stores[e],c);return b},Dispatcher.prototype.waitFor=function(a,b){var c,d=this;return c=function(){function c(a){return new DeLorean.Promise(function(c,d){a.listener.once("change",c),a.listener.once("rollback",d),a.listener.once("cleanup_"+b,function(){a.listener.removeListener("change",c),a.listener.removeListener("rollback",d)})})}var d,e=[];for(var f in a)a[f].actions&&null!=a[f].actions[b]&&(d=c(a[f]),e.push(d));return e}(),DeLorean.Promise.all(c).then(function(){d.listener.emit("change:all")})},Dispatcher.prototype.registerAction=function(a,b){if("function"!=typeof b)throw"Action callback should be a function.";this[a]=b.bind(this.stores)},Dispatcher.prototype.register=function(a){if("function"!=typeof a)throw"Global callback should be a function.";this.listener.on("dispatch",a)},Dispatcher.prototype.getStore=function(a){if(!this.stores[a])throw"Store "+a+" does not exist.";return this.stores[a].getState()},Dispatcher.prototype.on=function(){return this.listener.on.apply(this.listener,arguments)},Dispatcher.prototype.off=function(){return this.listener.removeListener.apply(this.listener,arguments)},Dispatcher.prototype.emit=function(){return this.listener.emit.apply(this.listener,arguments)},Dispatcher}(),Store=function(){function Store(a){this.state||(this.state={}),this.listener=new DeLorean.EventEmitter,this.bindActions(),this.buildScheme(),this.initialize.apply(this,arguments)}return Store.prototype.initialize=function(){},Store.prototype.get=function(a){return this.state[a]},Store.prototype.set=function(a,b){var c=[];if("object"==typeof a)for(var d in a)c.push(d),this.setValue(d,a[d]);else c.push(a),this.setValue(a,b);return this.recalculate(c),this.state[a]},Store.prototype.setValue=function(a,b){var d,e=this.scheme;return e&&this.scheme[a]?(d=e[a],this.state[a]="undefined"!=typeof b?b:d["default"],"function"==typeof d.calculate&&(this.state[c(a)]=b,this.state[a]=d.calculate.call(this,b))):null!=console&&console.warn("Scheme must include the key, "+a+", you are trying to set. "+a+" will NOT be set on the store."),this.state[a]},Store.prototype.formatScheme=function(a){var b,c,d,e={};for(var f in a)b=a[f],c=null,d=null,e[f]={"default":null},c=b&&"object"==typeof b?b["default"]:b,e[f]["default"]=c,b&&"function"==typeof b.calculate?(d=b.calculate,b.deps?e[f].deps=b.deps:e[f].deps=[]):"function"==typeof b&&(d=b),d&&(e[f].calculate=d);return e},Store.prototype.buildScheme=function(){var a,b,d,f,g,h,i=[];if("object"==typeof this.scheme){a=this.scheme=this.formatScheme(this.scheme),f=this.__dependencyMap={};for(b in a)d=a[b],this.state[b]=e(d["default"]);for(b in a)if(d=a[b],d.calculate){g=d.deps||[];for(var j=0;j0&&this.recalculate(h),this.listener.emit("change")},Store.prototype.getState=function(){return this.state},Store.prototype.clearState=function(){return this.state={},this},Store.prototype.resetState=function(){return this.buildScheme(),this.listener.emit("change"),this},Store.prototype.bindActions=function(){var c;this.emitChange=this.listener.emit.bind(this.listener,"change"),this.emitRollback=this.listener.emit.bind(this.listener,"rollback"),this.rollback=this.listener.on.bind(this.listener,"__rollback"),this.emit=this.listener.emit.bind(this.listener);for(var d in this.actions)if(a(this.actions,d)){if(c=this.actions[d],"function"!=typeof this[c])throw"Callback '"+c+"' defined for action '"+d+"' should be a method defined on the store!";this.listener.on(b(d),this[c].bind(this))}},Store.prototype.dispatchAction=function(a,c){this.listener.emit(b(a),c),this.listener.emit("cleanup_"+a)},Store.prototype.listenChanges=function(a){var b,c=this;return Object.observe?(b=Array.isArray(a)?Array.observe:Object.observe,void b(a,function(a){c.listener.emit("change",a)})):void console.error("Store#listenChanges method uses Object.observe, you should fire changes manually.")},Store.prototype.onChange=function(a){this.listener.on("change",a)},Store}(),DeLorean.Flux={createStore:function(a){if("object"!=typeof a)throw"Stores should be defined by passing the definition to the constructor";var b=function(){return Store.apply(this,arguments)},c=function(){this.constructor=b};return c.prototype=Store.prototype,b.prototype=new c,f(b.prototype,a),new b},createDispatcher:function(b){var c,d,e,f,g;"function"==typeof b.getStores&&(c=b.getStores()),d=new Dispatcher(c||{});for(var h in b)a(b,h)&&"getStores"!==h&&"viewTriggers"!==h&&"function"==typeof b[h]&&(e=b[h],d.registerAction(h,e.bind(d)));f=b.viewTriggers;for(var i in f)g=f[i],"function"==typeof d[g]?d.on(i,d[g]):null!=console&&console.warn(g+" should be a method defined on your dispatcher. The "+i+" trigger will not be bound to any method.");return null!=DeLorean.dispatcher&&null!=console&&console.warn("You are attempting to create more than one dispatcher. DeLorean is intended to be used with a single dispatcher. This latest dispatcher created will overwrite any previous versions."),DeLorean.dispatcher=d,d},define:function(a,b){DeLorean[a]=b}},DeLorean.Dispatcher=Dispatcher,DeLorean.Store=Store,DeLorean.Flux.mixins={trigger:{componentWillMount:function(){this.__dispatcher=d(this)},trigger:function(){this.__dispatcher.emit.apply(this.__dispatcher,arguments)}},storeListener:{trigger:function(){this.__dispatcher.emit.apply(this.__dispatcher,arguments)},componentDidMount:function(){function b(a,b){return function(){var a;e.isMounted()&&e.setState(e.getStoreStates()),e.storeDidChange&&(a=[b].concat(Array.prototype.slice.call(arguments,0)),e.storeDidChange.apply(e,a))}}var c,d,e=this;this.__changeHandlers={};for(d in this.__watchStores)a(this.stores,d)&&(c=this.stores[d],this.__changeHandlers[d]=b(c,d),c.onChange(this.__changeHandlers[d]))},componentWillUnmount:function(){for(var b in this.__changeHandlers)if(a(this.stores,b)){var c=this.stores[b];c.listener.removeListener("change",this.__changeHandlers[b])}},getInitialState:function(){var a,b=this;if(this.__dispatcher=d(this),this.storesDidChange&&this.__dispatcher.on("change:all",function(){b.storesDidChange()}),this.stores=this.__dispatcher.stores,this.__watchStores={},null!=this.watchStores)for(var c=0;c4&&console.warn('Your component is watching changes on all stores, you may want to define a "watchStores" property in order to only watch stores relevant to this component.');return this.getStoreStates()},getStoreStates:function(){var b={stores:{}};for(var c in this.__watchStores)a(this.stores,c)&&(b.stores[c]=this.__watchStores[c].getState());return b},getStore:function(a){if(null!=console&&"undefined"==typeof this.__watchStores[a]){var b;b="Attempt to getStore "+a+" failed. ",b+="undefined"==typeof this.stores[a]?"It is not defined on the dispatcher. ":"It is not being watched by the component. ",b+=null!=this.constructor&&null!=this.constructor.displayName?"Check the "+this.constructor.displayName+" component.":"",console.warn(b)}return this.state.stores[a]}}},"undefined"!=typeof module&&"undefined"!=typeof module.exports){var g=require("./requirements");for(var h in g)DeLorean.Flux.define(h,g[h]);module.exports=DeLorean}else"function"==typeof define&&define.amd?define(["./requirements.js"],function(a){for(var b in a)DeLorean.Flux.define(b,a[b]);return DeLorean}):window.DeLorean=DeLorean}({}),function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;ga||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},d.prototype.emit=function(a){var b,c,d,f,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||g(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],h(c))return!1;if(e(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(d=arguments.length,f=new Array(d-1),i=1;d>i;i++)f[i-1]=arguments[i];c.apply(this,f)}else if(g(c)){for(d=arguments.length,f=new Array(d-1),i=1;d>i;i++)f[i-1]=arguments[i];for(j=c.slice(),d=j.length,i=0;d>i;i++)j[i].apply(this,f)}return!0},d.prototype.addListener=function(a,b){var c;if(!e(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,e(b.listener)?b.listener:b),this._events[a]?g(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,g(this._events[a])&&!this._events[a].warned){var c;c=h(this._maxListeners)?d.defaultMaxListeners:this._maxListeners,c&&c>0&&this._events[a].length>c&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())}return this},d.prototype.on=d.prototype.addListener,d.prototype.once=function(a,b){function c(){this.removeListener(a,c),d||(d=!0,b.apply(this,arguments))}if(!e(b))throw TypeError("listener must be a function");var d=!1;return c.listener=b,this.on(a,c),this},d.prototype.removeListener=function(a,b){var c,d,f,h;if(!e(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,d=-1,c===b||e(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(g(c)){for(h=f;h-->0;)if(c[h]===b||c[h].listener&&c[h].listener===b){d=h;break}if(0>d)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(d,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},d.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],e(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},d.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?e(this._events[a])?[this._events[a]]:this._events[a].slice():[]},d.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?e(a._events[b])?1:a._events[b].length:0}},{}],12:[function(a,b,c){function d(){}var e=b.exports={};e.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=d,e.addListener=d,e.once=d,e.off=d,e.removeListener=d,e.removeAllListeners=d,e.emit=d,e.binding=function(a){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(a){throw new Error("process.chdir is not supported")}},{}],13:[function(a,b,c){var d;if("undefined"!=typeof b&&"undefined"!=typeof b.exports?b.exports=d={EventEmitter:a("events").EventEmitter,Promise:a("es6-promise").Promise}:"function"==typeof define&&define.amd?define(function(a,b,c){a("events"),a("es6-promise");return{EventEmitter:a("events").EventEmitter,Promise:a("es6-promise").Promise}}):window.DeLorean=DeLorean,"undefined"!=typeof DeLorean)for(var e in d)DeLorean.Flux.define(e,d[e])},{"es6-promise":1,events:11}]},{},[13]); //# sourceMappingURL=delorean.min.js.map \ No newline at end of file diff --git a/dist/delorean.min.js.map b/dist/delorean.min.js.map index c221f45..6ffd17c 100644 --- a/dist/delorean.min.js.map +++ b/dist/delorean.min.js.map @@ -1 +1 @@ -{"version":3,"file":"delorean.min.js","sources":["delorean.js"],"names":["DeLorean","__hasOwn","object","prop","Object","prototype","hasOwnProperty","call","__generateActionName","name","__generateOriginalName","__findDispatcher","view","dispatcher","__clone","obj","copy","constructor","attr","__extend","props","Dispatcher","Store","__rollbackListener","stores","__listener","i","listener","emit","j","on","EventEmitter","defaultMaxListeners","this","keys","map","key","dispatch","deferred","args","self","Array","slice","arguments","apply","concat","store","storeName","push","waitFor","dispatchAction","actionName","promises","__promiseGenerator","Promise","resolve","reject","once","removeListener","promise","__promises","actions","all","then","registerAction","action","callback","bind","register","getStore","getState","off","state","bindActions","buildScheme","initialize","get","arg","set","arg1","value","changedProps","keyName","setValue","recalculate","definition","scheme","calculate","console","warn","formatScheme","defaultValue","calculatedValue","formattedScheme","default","deps","dependencyMap","dependents","dep","__dependencyMap","length","didRun","d","indexOf","clearState","resetState","emitChange","emitRollback","rollback","data","listenChanges","observer","observe","isArray","changes","error","onChange","Flux","createStore","Child","Surrogate","createDispatcher","actionsToDispatch","actionsOfStores","triggers","triggerMethod","getStores","viewTriggers","triggerName","define","mixins","storeListener","trigger","__dispatcher","componentDidMount","__changeHandler","isMounted","setState","getStoreStates","storeDidChange","__changeHandlers","__watchStores","componentWillUnmount","getInitialState","storesDidChange","watchStores","message","displayName","module","exports","requirements","require","requirement","amd","window","e","t","n","r","s","o","u","a","Error","f",1,"polyfill","./promise/polyfill","./promise/promise",2,"TypeError","resolver","index","resolveAll","results","remaining","isFunction","./utils",3,"process","global","useNextTick","nextTick","flush","useMutationObserver","iterations","BrowserMutationObserver","node","document","createTextNode","characterData","useSetTimeout","local","setTimeout","queue","tuple","asap","scheduleFlush","browserGlobal","MutationObserver","WebKitMutationObserver","undefined","toString","JkpR2F",4,"configure","config","instrument",5,"es6PromiseSupport","RSVPPromise","./promise",6,"_subscribers","invokeResolver","resolvePromise","rejectPromise","reason","invokeCallback","settled","detail","succeeded","failed","hasCallback","handleThenable","FULFILLED","REJECTED","subscribe","parent","child","onFulfillment","onRejection","subscribers","publish","_detail","resolved","objectOrFunction","val","fulfill","_state","PENDING","SEALED","async","publishFulfillment","publishRejection","now","race","staticResolve","staticReject","thenPromise","callbacks","catch","./all","./asap","./config","./race","./reject","./resolve",7,8,9,10,"x","Date","getTime",11,"_events","_maxListeners","isNumber","isObject","isUndefined","setMaxListeners","isNaN","type","er","handler","len","listeners","addListener","m","newListener","warned","trace","g","fired","list","position","splice","removeAllListeners","ret","listenerCount","emitter",12,"noop","canSetImmediate","setImmediate","canPost","postMessage","addEventListener","ev","source","stopPropagation","fn","shift","title","browser","env","argv","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QmG,YAAce,EACtBlH,EAAQ1H,KAAO4O,EACflH,EAAQ5G,IAAM8N,EACdlH,EAAQzH,eAAiB2O,EACzBlH,EAAQ6G,mBAAqBK,EAC7BlH,EAAQvJ,KAAOyQ,EAEflH,EAAQiI,QAAU,SAAU3S,GACxB,KAAM,IAAI0J,OAAM,qCAIpBgB,EAAQkI,IAAM,WAAc,MAAO,KACnClI,EAAQmI,MAAQ,SAAUC,GACtB,KAAM,IAAIpJ,OAAM,wCAGdqJ,IAAI,SAASjK,EAAQH,EAAOC,GAKlC,GAAIC,EAiCJ,IA/BsB,mBAAXF,IAAoD,mBAAnBA,GAAOC,QACjDD,EAAOC,QAAUC,GAEfvH,aAAcwH,EAAQ,UAAUxH,aAEhCuB,QAASiG,EAAQ,eAAejG,SAEP,kBAAX2E,SAAyBA,OAAOwB,IAChDxB,OAAO,SAAUsB,EAASF,EAASD,GACpBG,EAAQ,UACPA,EAAQ,cAItB,QAEExH,aAAcwH,EAAQ,UAAUxH,aAEhCuB,QAASiG,EAAQ,eAAejG,WAIpCoG,OAAO1J,SAAWA,SASI,mBAAbA,UACT,IAAK,GAAIwJ,KAAeF,GACtBtJ,SAASqH,KAAKY,OAAOuB,EAAaF,EAAaE,MAIhDiK,cAAc,EAAEC,OAAS,UAAU"} \ No newline at end of file +{"version":3,"file":"delorean.min.js","sources":["delorean.js"],"names":["DeLorean","__hasOwn","object","prop","Object","prototype","hasOwnProperty","call","__generateActionName","name","__generateOriginalName","__findDispatcher","view","dispatcher","__clone","obj","copy","constructor","attr","__extend","props","Dispatcher","Store","__rollbackListener","stores","__listener","i","listener","emit","j","on","EventEmitter","defaultMaxListeners","this","keys","map","key","dispatch","deferred","args","self","Array","slice","arguments","apply","concat","store","storeName","push","waitFor","dispatchAction","actionName","promises","__promiseGenerator","Promise","resolve","reject","once","removeListener","promise","__promises","actions","all","then","registerAction","action","callback","bind","register","getStore","getState","off","state","bindActions","buildScheme","initialize","get","arg","set","arg1","value","changedProps","keyName","setValue","recalculate","definition","scheme","calculate","console","warn","formatScheme","defaultValue","calculatedValue","formattedScheme","default","deps","dependencyMap","dependents","dep","__dependencyMap","length","didRun","d","indexOf","clearState","resetState","emitChange","emitRollback","rollback","data","listenChanges","observer","observe","isArray","changes","error","onChange","Flux","createStore","Child","Surrogate","createDispatcher","actionsToDispatch","actionsOfStores","triggers","triggerMethod","getStores","viewTriggers","triggerName","define","mixins","trigger","componentWillMount","__dispatcher","storeListener","componentDidMount","__changeHandler","isMounted","setState","getStoreStates","storeDidChange","__changeHandlers","__watchStores","componentWillUnmount","getInitialState","storesDidChange","watchStores","message","displayName","module","exports","requirements","require","requirement","amd","window","e","t","n","r","s","o","u","a","Error","f",1,"polyfill","./promise/polyfill","./promise/promise",2,"TypeError","resolver","index","resolveAll","results","remaining","isFunction","./utils",3,"process","global","useNextTick","nextTick","flush","useMutationObserver","iterations","BrowserMutationObserver","node","document","createTextNode","characterData","useSetTimeout","local","setTimeout","queue","tuple","asap","scheduleFlush","browserGlobal","MutationObserver","WebKitMutationObserver","undefined","toString","JkpR2F",4,"configure","config","instrument",5,"es6PromiseSupport","RSVPPromise","./promise",6,"_subscribers","invokeResolver","resolvePromise","rejectPromise","reason","invokeCallback","settled","detail","succeeded","failed","hasCallback","handleThenable","FULFILLED","REJECTED","subscribe","parent","child","onFulfillment","onRejection","subscribers","publish","_detail","resolved","objectOrFunction","val","fulfill","_state","PENDING","SEALED","async","publishFulfillment","publishRejection","now","race","staticResolve","staticReject","thenPromise","callbacks","catch","./all","./asap","./config","./race","./reject","./resolve",7,8,9,10,"x","Date","getTime",11,"_events","_maxListeners","isNumber","isObject","isUndefined","setMaxListeners","isNaN","type","er","handler","len","listeners","addListener","m","newListener","warned","trace","g","fired","list","position","splice","removeAllListeners","ret","listenerCount","emitter",12,"noop","canSetImmediate","setImmediate","canPost","postMessage","addEventListener","ev","source","stopPropagation","fn","shift","title","browser","env","argv","binding","cwd","chdir","dir",13,"es6-promise","events"],"mappings":"CACA,SAAWA,U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SAAU,EAClB9H,EAAQ+H,OACR/H,EAAQgI,QAIRhI,EAAQtJ,GAAKwQ,EACblH,EAAQmG,YAAce,EACtBlH,EAAQ3H,KAAO6O,EACflH,EAAQ7G,IAAM+N,EACdlH,EAAQ1H,eAAiB4O,EACzBlH,EAAQ6G,mBAAqBK,EAC7BlH,EAAQxJ,KAAO0Q,EAEflH,EAAQiI,QAAU,SAAU5S,GACxB,KAAM,IAAI2J,OAAM,qCAIpBgB,EAAQkI,IAAM,WAAc,MAAO,KACnClI,EAAQmI,MAAQ,SAAUC,GACtB,KAAM,IAAIpJ,OAAM,wCAGdqJ,IAAI,SAASjK,EAAQH,EAAOC,GAKlC,GAAIC,EAiCJ,IA/BsB,mBAAXF,IAAoD,mBAAnBA,GAAOC,QACjDD,EAAOC,QAAUC,GAEfxH,aAAcyH,EAAQ,UAAUzH,aAEhCuB,QAASkG,EAAQ,eAAelG,SAEP,kBAAX2E,SAAyBA,OAAOyB,IAChDzB,OAAO,SAAUuB,EAASF,EAASD,GACpBG,EAAQ,UACPA,EAAQ,cAItB,QAEEzH,aAAcyH,EAAQ,UAAUzH,aAEhCuB,QAASkG,EAAQ,eAAelG,WAIpCqG,OAAO3J,SAAWA,SASI,mBAAbA,UACT,IAAK,GAAIyJ,KAAeF,GACtBvJ,SAASqH,KAAKY,OAAOwB,EAAaF,EAAaE,MAIhDiK,cAAc,EAAEC,OAAS,UAAU"} \ No newline at end of file diff --git a/src/delorean.js b/src/delorean.js index 2271bf2..a939cd3 100644 --- a/src/delorean.js +++ b/src/delorean.js @@ -98,7 +98,6 @@ DeLorean.EventEmitter.defaultMaxListeners = 50; this.listener = new DeLorean.EventEmitter(); this.stores = stores; - /* Stores should be listened for rollback events. */ __rollbackListener(Object.keys(stores).map(function (key) { return stores[key]; @@ -570,17 +569,13 @@ // This mixin adds the this.trigger method to the component // Components can then trigger actions in flux w/out watching stores and having their state trigger: { - componentWillMount: function () { this.__dispatcher = __findDispatcher(this); }, - trigger: function () { this.__dispatcher.emit.apply(this.__dispatcher, arguments); } - }, - // It should be inserted to the React components which // used in Flux. // Simply `mixin: [Flux.mixins.storeListener]` will work. diff --git a/test/spec/core/fluxSpec.js b/test/spec/core/fluxSpec.js index 34876a4..3292823 100644 --- a/test/spec/core/fluxSpec.js +++ b/test/spec/core/fluxSpec.js @@ -95,22 +95,18 @@ describe('Flux', function () { }); it('should cleanup unused events after firing an action handler', function () { - MyAppDispatcher.dispatch('noChange', 'someText') - MyAppDispatcher.dispatch('noChange', 'someText') - MyAppDispatcher.dispatch('noChange', 'someText') - MyAppDispatcher.dispatch('noChange', 'someText') - + MyAppDispatcher.dispatch('noChange', 'someText'); + MyAppDispatcher.dispatch('noChange', 'someText'); + MyAppDispatcher.dispatch('noChange', 'someText'); + MyAppDispatcher.dispatch('noChange', 'someText'); changeListenerCount = myStore.listener.listeners('change').length; rollbackListenerCount = myStore.listener.listeners('rollback').length; - // Note that the 'cleanup_{actionName}' event has not fired yet and removed the last 2 events (change & rolback), so there will be one remaining of each event at this point. // however, without the cleanup, there would be 4 of each after 4 calls expect(changeListenerCount).toEqual(1); expect(rollbackListenerCount).toEqual(1); - }); - it('dispatcher can listen events', function () { var spy = jasmine.createSpy('dispatcher listener'); MyAppDispatcher.on('hello', spy);