New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cerebral/fluent

Package Overview
Dependencies
Maintainers
5
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cerebral/fluent - npm Package Compare versions

Comparing version

to
1.0.3-1523952156059

17

es/Computed.js
import { computed as mobxComputed } from 'mobx';
export class ComputedClass {
constructor(callback) {
var ComputedClass = /** @class */ (function () {
function ComputedClass(callback) {
this.callback = callback;
}
get() {
ComputedClass.prototype.get = function () {
var _this = this;
this.instance =
this.instance ||
mobxComputed(() => this.callback(this.getState().state, this.getState().root));
mobxComputed(function () {
return _this.callback(_this.getState().state, _this.getState().root);
});
return this.instance.get();
}
}
};
return ComputedClass;
}());
export { ComputedClass };
export function Computed(callback) {

@@ -14,0 +19,0 @@ return new ComputedClass(callback);

@@ -33,3 +33,3 @@ import Hoc from './Hoc';

to: function (passedComponent) {
var con = getConnector(connector, { stateLookup, signalsLookup });
var con = getConnector(connector, { stateLookup: stateLookup, signalsLookup: signalsLookup });
return connect(con, passedComponent);

@@ -39,3 +39,3 @@ },

var fakeProps = getFakeProps();
var con = getConnector(connector, { stateLookup, signalsLookup });
var con = getConnector(connector, { stateLookup: stateLookup, signalsLookup: signalsLookup });
return connect(con, passedComponent(fakeProps));

@@ -48,3 +48,3 @@ },

}
return { To };
return { To: To };
}

@@ -63,3 +63,3 @@ function getFakeProps() {

if (lookups) {
con = (x) => {
con = function (x) {
return connector({

@@ -66,0 +66,0 @@ state: x.state,

@@ -0,24 +1,39 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { throwError } from 'cerebral/internal';
class Container extends React.Component {
getChildContext() {
const controller = this.props.controller;
var Container = /** @class */ (function (_super) {
__extends(Container, _super);
function Container() {
return _super !== null && _super.apply(this, arguments) || this;
}
Container.prototype.getChildContext = function () {
var controller = this.props.controller;
if (!controller) {
throwError('You are not passing controller to Container');
}
return { controller };
}
render() {
return { controller: controller };
};
Container.prototype.render = function () {
return this.props.children;
}
}
Container.propTypes = {
controller: PropTypes.object.isRequired,
children: PropTypes.node.isRequired,
};
Container.childContextTypes = {
controller: PropTypes.object.isRequired,
};
};
Container.propTypes = {
controller: PropTypes.object.isRequired,
children: PropTypes.node.isRequired,
};
Container.childContextTypes = {
controller: PropTypes.object.isRequired,
};
return Container;
}(React.Component));
export default Container;
//# sourceMappingURL=Container.js.map

@@ -0,1 +1,11 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import * as React from 'react';

@@ -5,50 +15,55 @@ import { throwError } from 'cerebral/internal';

import * as PropTypes from 'prop-types';
class BaseComponent extends React.Component {
constructor(dependencies, props, controller, name) {
super(props);
var BaseComponent = /** @class */ (function (_super) {
__extends(BaseComponent, _super);
function BaseComponent(dependencies, props, controller, name) {
var _this = _super.call(this, props) || this;
if (!controller) {
throwError('Can not find controller, did you remember to use the Container component? Read more at: http://cerebraljs.com/docs/api/components.html#react');
}
this.onUpdate = this.onUpdate.bind(this);
this.view = new View({
dependencies,
props,
controller,
_this.onUpdate = _this.onUpdate.bind(_this);
_this.view = new View({
dependencies: dependencies,
props: props,
controller: controller,
displayName: name,
onUpdate: this.onUpdate,
onUpdate: _this.onUpdate,
});
return _this;
}
componentWillMount() {
BaseComponent.prototype.componentWillMount = function () {
this.view.mount();
}
shouldComponentUpdate() {
};
BaseComponent.prototype.shouldComponentUpdate = function () {
return false;
}
componentWillReceiveProps(nextProps) {
const hasUpdate = this.view.onPropsUpdate(this.props, nextProps);
};
BaseComponent.prototype.componentWillReceiveProps = function (nextProps) {
var hasUpdate = this.view.onPropsUpdate(this.props, nextProps);
if (hasUpdate) {
this.forceUpdate();
}
}
componentWillUnmount() {
};
BaseComponent.prototype.componentWillUnmount = function () {
this.view.unMount();
}
onUpdate() {
};
BaseComponent.prototype.onUpdate = function () {
this.forceUpdate();
}
}
};
return BaseComponent;
}(React.Component));
export default function HOC(dependencies, Component) {
return _a = class extends BaseComponent {
constructor(props, context) {
super(dependencies, props, context.controller, Component.displayName || Component.name);
return _a = /** @class */ (function (_super) {
__extends(class_1, _super);
function class_1(props, context) {
return _super.call(this, dependencies, props, context.controller, Component.displayName || Component.name) || this;
}
toJSON() {
class_1.prototype.toJSON = function () {
return this.view._displayName;
}
render() {
};
class_1.prototype.render = function () {
return React.createElement(Component, this.view.getProps(this.props));
}
},
_a.displayName = `CerebralWrapping_${Component.displayName ||
Component.name}`,
};
return class_1;
}(BaseComponent)),
_a.displayName = "CerebralWrapping_" + (Component.displayName ||
Component.name),
_a.contextTypes = {

@@ -55,0 +70,0 @@ controller: PropTypes.object,

@@ -0,1 +1,11 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { observable, untracked, transaction, extras, ObservableMap as MobxObservableMap, useStrict, } from 'mobx';

@@ -17,13 +27,14 @@ import { CreateModuleProvider } from './providers';

export { Module, Provider, CerebralError } from 'cerebral';
export class FluentController extends BaseControllerClass {
constructor(rootModule, options) {
super(rootModule, options, {
executeBranchWrapper: (cb) => {
extras.allowStateChanges(true, () => untracked(() => transaction(cb)));
var FluentController = /** @class */ (function (_super) {
__extends(FluentController, _super);
function FluentController(rootModule, options) {
var _this = _super.call(this, rootModule, options, {
executeBranchWrapper: function (cb) {
extras.allowStateChanges(true, function () { return untracked(function () { return transaction(cb); }); });
},
});
}) || this;
useStrict(typeof options.useStrict === 'undefined' ? true : options.useStrict);
this.state = this.model.state;
this.signals = extractModuleProp(this.module, 'signals', (signals, module) => {
return Object.keys(signals).reduce((runableSignals, key) => {
_this.state = _this.model.state;
_this.signals = extractModuleProp(_this.module, 'signals', function (signals, module) {
return Object.keys(signals).reduce(function (runableSignals, key) {
if ('run' in signals[key]) {

@@ -38,12 +49,13 @@ runableSignals[key] = signals[key].run;

});
this.contextProviders.module = CreateModuleProvider(this.model.state, this.devtools, this.model, options.useLegacyStateApi || false);
_this.contextProviders.module = CreateModuleProvider(_this.model.state, _this.devtools, _this.model, options.useLegacyStateApi || false);
return _this;
}
addModule(path, module) {
const pathArray = path.split('.');
const moduleKey = pathArray.pop();
FluentController.prototype.addModule = function (path, module) {
var pathArray = path.split('.');
var moduleKey = pathArray.pop();
if (!moduleKey) {
return throwError('Can not find module path to add module');
}
const parentModule = getModule(pathArray, this.module);
const newModule = module.create(this, pathArray.concat(moduleKey));
var parentModule = getModule(pathArray, this.module);
var newModule = module.create(this, pathArray.concat(moduleKey));
if (!parentModule.modules || !parentModule.modules[moduleKey]) {

@@ -56,7 +68,7 @@ return throwError('Can not find module path to add module');

}
updateIn(this.state, pathArray.concat(moduleKey), (parentState, key) => {
updateIn(this.state, pathArray.concat(moduleKey), function (parentState, key) {
parentState[key] = observable(newModule.state);
});
updateIn(this.signals, pathArray.concat(moduleKey), (parentState, key) => {
parentState[key] = Object.keys(newModule.signals).reduce((signals, key) => {
updateIn(this.signals, pathArray.concat(moduleKey), function (parentState, key) {
parentState[key] = Object.keys(newModule.signals).reduce(function (signals, key) {
signals[key] = newModule.signals[key];

@@ -67,4 +79,5 @@ return signals;

this.emit('moduleAdded', path.split('.'), newModule);
}
removeModule(path) {
};
FluentController.prototype.removeModule = function (path) {
var _this = this;
if (!path) {

@@ -74,25 +87,28 @@ console.warn('Controller.removeModule requires a Module Path');

}
const pathArray = path.split('.');
const moduleKey = pathArray.pop();
const parentModule = getModule(pathArray, this.module);
var pathArray = path.split('.');
var moduleKey = pathArray.pop();
var parentModule = getModule(pathArray, this.module);
if (!moduleKey || !parentModule || !parentModule.modules) {
return throwError('Module you are trying to remove does not exist');
}
const module = parentModule.modules[moduleKey];
var module = parentModule.modules[moduleKey];
if (module.providers) {
Object.keys(module.providers).forEach((provider) => {
delete this.contextProviders[provider];
Object.keys(module.providers).forEach(function (provider) {
delete _this.contextProviders[provider];
});
}
delete parentModule.modules[moduleKey];
updateIn(this.state, pathArray.concat(moduleKey), (parentState) => {
updateIn(this.state, pathArray.concat(moduleKey), function (parentState) {
delete parentState[moduleKey];
});
updateIn(this.signals, pathArray.concat(moduleKey), (parentSignals) => {
updateIn(this.signals, pathArray.concat(moduleKey), function (parentSignals) {
delete parentSignals[moduleKey];
});
this.emit('moduleRemoved', path, module);
}
}
export function Controller(rootModule, options = {}) {
};
return FluentController;
}(BaseControllerClass));
export { FluentController };
export function Controller(rootModule, options) {
if (options === void 0) { options = {}; }
options.Model = Model;

@@ -99,0 +115,0 @@ options.Model.useLegacyStateApi = options.useLegacyStateApi;

@@ -6,5 +6,5 @@ /* eslint-env mocha */

import * as assert from 'assert';
describe('Fluent', () => {
it('should instantiate with initial state', () => {
const rootModule = Module({
describe('Fluent', function () {
it('should instantiate with initial state', function () {
var rootModule = Module({
state: {

@@ -14,7 +14,7 @@ foo: 'bar',

});
const controller = Controller(rootModule);
var controller = Controller(rootModule);
assert.deepEqual(controller.state, { foo: 'bar' });
});
it('should expose traditional model API', () => {
const rootModule = Module({
it('should expose traditional model API', function () {
var rootModule = Module({
state: {

@@ -31,3 +31,4 @@ foo: 'bar',

test: [
function test({ state }) {
function test(_a) {
var state = _a.state;
state.set('foo', state.get('foo') + '2');

@@ -48,3 +49,3 @@ state.toggle('bool');

});
const controller = Controller(rootModule, {
var controller = Controller(rootModule, {
useLegacyStateApi: true,

@@ -55,3 +56,3 @@ });

assert.equal(controller.state.bool, false);
assert.deepEqual(controller.state.list.map((val) => val), [
assert.deepEqual(controller.state.list.map(function (val) { return val; }), [
'foo3',

@@ -64,4 +65,4 @@ 'baz',

});
it('should instantiate with observable maps', () => {
const rootModule = Module({
it('should instantiate with observable maps', function () {
var rootModule = Module({
state: {

@@ -73,7 +74,7 @@ map: Dictionary({

});
const controller = Controller(rootModule);
var controller = Controller(rootModule);
assert.deepEqual(controller.state.map.get('foo'), 'bar');
});
it('should not throw when trying to mutate state outside actions', () => {
const rootModule = Module({
it('should not throw when trying to mutate state outside actions', function () {
var rootModule = Module({
state: {

@@ -83,18 +84,21 @@ foo: 'bar',

});
const controller = Controller(rootModule, {
var controller = Controller(rootModule, {
useStrict: false,
});
autorun(() => {
autorun(function () {
return controller.state.foo;
});
assert.doesNotThrow(() => {
assert.doesNotThrow(function () {
controller.state.foo = 'bar2';
});
});
it('should allow state changes in actions', () => {
const SequenceWithProps = SequenceWithPropsFactory();
const sequence = SequenceWithProps((s) => s.action(function test({ state, props }) {
state.foo = 'bar2';
}));
const rootModule = Module({
it('should allow state changes in actions', function () {
var SequenceWithProps = SequenceWithPropsFactory();
var sequence = SequenceWithProps(function (s) {
return s.action(function test(_a) {
var state = _a.state, props = _a.props;
state.foo = 'bar2';
});
});
var rootModule = Module({
state: {

@@ -107,3 +111,3 @@ foo: 'bar',

});
const controller = Controller(rootModule);
var controller = Controller(rootModule);
controller.signals.test({

@@ -114,12 +118,15 @@ foo: 'bar',

});
it('should allow computed', () => {
const Sequence = SequenceFactory();
const signal = Sequence((s) => s.action(function test({ state }) {
state.foo = 'bar2';
}));
let hasUpdated = 0;
const computed = function getter(state, root) {
it('should allow computed', function () {
var Sequence = SequenceFactory();
var signal = Sequence(function (s) {
return s.action(function test(_a) {
var state = _a.state;
state.foo = 'bar2';
});
});
var hasUpdated = 0;
var computed = function getter(state, root) {
return state.foo.toUpperCase() + root.foo;
};
const rootModule = Module({
var rootModule = Module({
state: {

@@ -133,4 +140,4 @@ foo: 'bar',

});
const controller = Controller(rootModule);
autorun(() => {
var controller = Controller(rootModule);
autorun(function () {
controller.state.test.get();

@@ -143,9 +150,12 @@ hasUpdated++;

});
it('should allow getters', () => {
const Sequence = SequenceFactory();
const signal = Sequence((s) => s.action(function test({ state }) {
state.foo = 'bar2';
}));
let hasUpdated = 0;
const rootModule = Module({
it('should allow getters', function () {
var Sequence = SequenceFactory();
var signal = Sequence(function (s) {
return s.action(function test(_a) {
var state = _a.state;
state.foo = 'bar2';
});
});
var hasUpdated = 0;
var rootModule = Module({
state: {

@@ -161,4 +171,4 @@ foo: 'bar',

});
const controller = Controller(rootModule);
autorun(() => {
var controller = Controller(rootModule);
autorun(function () {
controller.state.test;

@@ -171,8 +181,11 @@ hasUpdated++;

});
it('should work with fluent api', () => {
const Sequence = SequenceFactory();
const sequence = Sequence((s) => s.action(function testAction({ state }) {
state.foo = 'bar2';
}));
const rootModule = Module({
it('should work with fluent api', function () {
var Sequence = SequenceFactory();
var sequence = Sequence(function (s) {
return s.action(function testAction(_a) {
var state = _a.state;
state.foo = 'bar2';
});
});
var rootModule = Module({
state: {

@@ -185,32 +198,41 @@ foo: 'bar',

});
const controller = Controller(rootModule);
var controller = Controller(rootModule);
controller.signals.test();
assert.equal(controller.state.foo, 'bar2');
});
it('should send debugging data on mutation methods', () => {
let actionCount = 0;
const Sequence = SequenceFactory();
const sequence = Sequence((s) => s
.action(function test({ state }) {
state._set = 'bar2';
})
.action(function test({ state }) {
state._push.push('bar2');
})
.action(function test({ state }) {
state._pop.pop();
})
.action(function test({ state }) {
state._shift.shift();
})
.action(function test({ state }) {
state._splice.splice(1, 0, 'baz');
})
.action(function test({ state }) {
state._unshift.unshift('bar');
})
.action(function test({ state }) {
state._observableMapSet.set('foo', 'bar');
}));
const rootModule = Module({
it('should send debugging data on mutation methods', function () {
var actionCount = 0;
var Sequence = SequenceFactory();
var sequence = Sequence(function (s) {
return s
.action(function test(_a) {
var state = _a.state;
state._set = 'bar2';
})
.action(function test(_a) {
var state = _a.state;
state._push.push('bar2');
})
.action(function test(_a) {
var state = _a.state;
state._pop.pop();
})
.action(function test(_a) {
var state = _a.state;
state._shift.shift();
})
.action(function test(_a) {
var state = _a.state;
state._splice.splice(1, 0, 'baz');
})
.action(function test(_a) {
var state = _a.state;
state._unshift.unshift('bar');
})
.action(function test(_a) {
var state = _a.state;
state._observableMapSet.set('foo', 'bar');
});
});
var rootModule = Module({
state: {

@@ -229,8 +251,8 @@ _set: 'foo',

});
const controller = Controller(rootModule, {
var controller = Controller(rootModule, {
devtools: {
init() { },
send() { },
updateComponentsMap() { },
sendExecutionData(data) {
init: function () { },
send: function () { },
updateComponentsMap: function () { },
sendExecutionData: function (data) {
switch (actionCount) {

@@ -301,9 +323,12 @@ case 0:

});
it('should update view on state changes', () => {
let hasUpdated = false;
const SequenceWithProps = SequenceWithPropsFactory();
const sequence = SequenceWithProps((s) => s.action(function test({ state, props }) {
state.foo = 'bar2';
}));
const rootModule = Module({
it('should update view on state changes', function () {
var hasUpdated = false;
var SequenceWithProps = SequenceWithPropsFactory();
var sequence = SequenceWithProps(function (s) {
return s.action(function test(_a) {
var state = _a.state, props = _a.props;
state.foo = 'bar2';
});
});
var rootModule = Module({
state: {

@@ -316,10 +341,10 @@ foo: 'bar',

});
const controller = Controller(rootModule);
const view = new View({
controller,
onUpdate() {
var controller = Controller(rootModule);
var view = new View({
controller: controller,
onUpdate: function () {
hasUpdated = true;
},
props: {},
dependencies() {
dependencies: function () {
return {

@@ -338,11 +363,14 @@ foo: controller.state.foo,

});
it('should handle nested map property', () => {
const Sequence = SequenceFactory();
const sequence = Sequence((s) => s.action(function test({ state }) {
const item = state.observableMapSet.get('item');
if (item) {
item.foo = 'string2';
}
}));
const rootModule = Module({
it('should handle nested map property', function () {
var Sequence = SequenceFactory();
var sequence = Sequence(function (s) {
return s.action(function test(_a) {
var state = _a.state;
var item = state.observableMapSet.get('item');
if (item) {
item.foo = 'string2';
}
});
});
var rootModule = Module({
state: {

@@ -359,8 +387,8 @@ observableMapSet: Dictionary({

});
const controller = Controller(rootModule, {
var controller = Controller(rootModule, {
devtools: {
init() { },
send() { },
updateComponentsMap() { },
sendExecutionData(data) {
init: function () { },
send: function () { },
updateComponentsMap: function () { },
sendExecutionData: function (data) {
assert.deepEqual(data, {

@@ -375,3 +403,3 @@ type: 'mutation',

controller.signals.test();
const item = controller.state.observableMapSet.get('item');
var item = controller.state.observableMapSet.get('item');
if (item) {

@@ -381,8 +409,11 @@ assert.equal(item.foo, 'string2');

});
it('should handle removing map property', () => {
const Sequence = SequenceFactory();
const sequence = Sequence((s) => s.action(function test({ state }) {
state.observableMapSet.delete('item');
}));
const rootModule = Module({
it('should handle removing map property', function () {
var Sequence = SequenceFactory();
var sequence = Sequence(function (s) {
return s.action(function test(_a) {
var state = _a.state;
state.observableMapSet.delete('item');
});
});
var rootModule = Module({
state: {

@@ -399,8 +430,8 @@ observableMapSet: Dictionary({

});
const controller = Controller(rootModule, {
var controller = Controller(rootModule, {
devtools: {
init() { },
send() { },
updateComponentsMap() { },
sendExecutionData(data) {
init: function () { },
send: function () { },
updateComponentsMap: function () { },
sendExecutionData: function (data) {
assert.deepEqual(data, {

@@ -417,11 +448,14 @@ type: 'mutation',

});
it('should handle reusing same proxy', () => {
let actionCount = 0;
const Sequence = SequenceFactory();
const sequence = Sequence((s) => s.action(function test({ state }) {
const foo = state.foo;
foo.bar.baz = 'mip2';
foo.bar2.baz2 = 'mip3';
}));
const rootModule = Module({
it('should handle reusing same proxy', function () {
var actionCount = 0;
var Sequence = SequenceFactory();
var sequence = Sequence(function (s) {
return s.action(function test(_a) {
var state = _a.state;
var foo = state.foo;
foo.bar.baz = 'mip2';
foo.bar2.baz2 = 'mip3';
});
});
var rootModule = Module({
state: {

@@ -441,8 +475,8 @@ foo: {

});
const controller = Controller(rootModule, {
var controller = Controller(rootModule, {
devtools: {
init() { },
send() { },
updateComponentsMap() { },
sendExecutionData(data) {
init: function () { },
send: function () { },
updateComponentsMap: function () { },
sendExecutionData: function (data) {
if (actionCount === 0) {

@@ -469,21 +503,24 @@ assert.deepEqual(data, {

});
it('should handle other map methods', () => {
let actionCount = 0;
const Sequence = SequenceFactory();
const sequence = Sequence((s) => s.action(function test({ state }) {
state.observableMapSet.has('item');
state.observableMapSet.keys();
state.observableMapSet.values();
state.observableMapSet.entries();
state.observableMapSet.forEach((item) => {
item.foo = 'miiip';
item.bar = 'mopmop';
it('should handle other map methods', function () {
var actionCount = 0;
var Sequence = SequenceFactory();
var sequence = Sequence(function (s) {
return s.action(function test(_a) {
var state = _a.state;
state.observableMapSet.has('item');
state.observableMapSet.keys();
state.observableMapSet.values();
state.observableMapSet.entries();
state.observableMapSet.forEach(function (item) {
item.foo = 'miiip';
item.bar = 'mopmop';
});
state.observableMapSet.size;
state.observableMapSet.set('item', { foo: 'foo2', bar: 'bar2' });
state.observableMapSet.clear();
state.observableMapSet.merge({ bar: 'baz' });
state.observableMapSet.replace({ baz: 'bop' });
});
state.observableMapSet.size;
state.observableMapSet.set('item', { foo: 'foo2', bar: 'bar2' });
state.observableMapSet.clear();
state.observableMapSet.merge({ bar: 'baz' });
state.observableMapSet.replace({ baz: 'bop' });
}));
const rootModule = Module({
});
var rootModule = Module({
state: {

@@ -501,8 +538,8 @@ observableMapSet: Dictionary({

});
const controller = Controller(rootModule, {
var controller = Controller(rootModule, {
devtools: {
init() { },
send() { },
updateComponentsMap() { },
sendExecutionData(data) {
init: function () { },
send: function () { },
updateComponentsMap: function () { },
sendExecutionData: function (data) {
switch (actionCount) {

@@ -560,3 +597,3 @@ case 0:

controller.signals.test();
const item = controller.state.observableMapSet.get('item');
var item = controller.state.observableMapSet.get('item');
if (item) {

@@ -568,28 +605,37 @@ assert.deepEqual(controller.state.observableMapSet.toJS(), {

});
it('should manage module state', () => {
let actionCount = 0;
const Sequence = SequenceFactory();
const sequence = Sequence((s) => s
.action(function test({ module }) {
module._set = 'bar2';
})
.action(function test({ module }) {
module._push.push('bar2');
})
.action(function test({ module }) {
module._pop.pop();
})
.action(function test({ module }) {
module._shift.shift();
})
.action(function test({ module }) {
module._splice.splice(1, 0, 'baz');
})
.action(function test({ module }) {
module._unshift.unshift('bar');
})
.action(function test({ module }) {
module._observableMapSet.set('foo', 'bar');
}));
const fooModule = Module({
it('should manage module state', function () {
var actionCount = 0;
var Sequence = SequenceFactory();
var sequence = Sequence(function (s) {
return s
.action(function test(_a) {
var module = _a.module;
module._set = 'bar2';
})
.action(function test(_a) {
var module = _a.module;
module._push.push('bar2');
})
.action(function test(_a) {
var module = _a.module;
module._pop.pop();
})
.action(function test(_a) {
var module = _a.module;
module._shift.shift();
})
.action(function test(_a) {
var module = _a.module;
module._splice.splice(1, 0, 'baz');
})
.action(function test(_a) {
var module = _a.module;
module._unshift.unshift('bar');
})
.action(function test(_a) {
var module = _a.module;
module._observableMapSet.set('foo', 'bar');
});
});
var fooModule = Module({
state: {

@@ -608,3 +654,3 @@ _set: 'foo',

});
const rootModule = Module({
var rootModule = Module({
modules: {

@@ -614,8 +660,8 @@ foo: fooModule,

});
const controller = Controller(rootModule, {
var controller = Controller(rootModule, {
devtools: {
init() { },
send() { },
updateComponentsMap() { },
sendExecutionData(data) {
init: function () { },
send: function () { },
updateComponentsMap: function () { },
sendExecutionData: function (data) {
switch (actionCount) {

@@ -686,27 +732,36 @@ case 0:

});
it('should manage module state without devtools', () => {
const Sequence = SequenceFactory();
const sequence = Sequence((s) => s
.action(function test({ module }) {
module._set = 'bar2';
})
.action(function test({ module }) {
module._push.push('bar2');
})
.action(function test({ module }) {
module._pop.pop();
})
.action(function test({ module }) {
module._shift.shift();
})
.action(function test({ module }) {
module._splice.splice(1, 0, 'baz');
})
.action(function test({ module }) {
module._unshift.unshift('bar');
})
.action(function test({ module }) {
module._observableMapSet.set('foo', 'bar');
}));
const fooModule = Module({
it('should manage module state without devtools', function () {
var Sequence = SequenceFactory();
var sequence = Sequence(function (s) {
return s
.action(function test(_a) {
var module = _a.module;
module._set = 'bar2';
})
.action(function test(_a) {
var module = _a.module;
module._push.push('bar2');
})
.action(function test(_a) {
var module = _a.module;
module._pop.pop();
})
.action(function test(_a) {
var module = _a.module;
module._shift.shift();
})
.action(function test(_a) {
var module = _a.module;
module._splice.splice(1, 0, 'baz');
})
.action(function test(_a) {
var module = _a.module;
module._unshift.unshift('bar');
})
.action(function test(_a) {
var module = _a.module;
module._observableMapSet.set('foo', 'bar');
});
});
var fooModule = Module({
state: {

@@ -725,3 +780,3 @@ _set: 'foo',

});
const rootModule = Module({
var rootModule = Module({
modules: {

@@ -731,3 +786,3 @@ foo: fooModule,

});
const controller = Controller(rootModule);
var controller = Controller(rootModule);
controller.signals.foo.test();

@@ -734,0 +789,0 @@ assert.equal(controller.state.foo._set, 'bar2');

@@ -0,1 +1,11 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { extractModuleProp, isObject, BaseModel } from 'cerebral/internal';

@@ -6,13 +16,17 @@ import { observable, isObservable, isObservableMap, extendObservable, ObservableMap, } from 'mobx';

import { CreateStateProvider } from './providers';
class Model extends BaseModel {
constructor(controller) {
super(controller);
this.state = extractModuleProp(controller.module, 'state', (state, module) => {
return this.observeState(state);
var Model = /** @class */ (function (_super) {
__extends(Model, _super);
function Model(controller) {
var _this = _super.call(this, controller) || this;
_this.state = extractModuleProp(controller.module, 'state', function (state, module) {
return _this.observeState(state);
});
this.StateProvider = (devtools) => CreateStateProvider(this.state, devtools, this, Model.useLegacyStateApi);
_this.StateProvider = function (devtools) {
return CreateStateProvider(_this.state, devtools, _this, Model.useLegacyStateApi);
};
return _this;
}
// Used by initial state changed
set(path, value) {
updateIn(this.state, path, (parentState, key) => {
Model.prototype.set = function (path, value) {
updateIn(this.state, path, function (parentState, key) {
if (isObservableMap(parentState)) {

@@ -25,16 +39,20 @@ parentState.set(key, value);

});
}
toggle(path) {
updateIn(this.state, path, (parentState, key) => {
};
Model.prototype.toggle = function (path) {
updateIn(this.state, path, function (parentState, key) {
parentState[key] = !parentState[key];
});
}
push(path, value) {
updateIn(this.state, path, (parentState, key) => {
};
Model.prototype.push = function (path, value) {
updateIn(this.state, path, function (parentState, key) {
parentState[key].push(value);
});
}
merge(path, mergeValue, ...values) {
const value = Object.assign(mergeValue, ...values);
updateIn(this.state, path, (parentState, key) => {
};
Model.prototype.merge = function (path, mergeValue) {
var values = [];
for (var _i = 2; _i < arguments.length; _i++) {
values[_i - 2] = arguments[_i];
}
var value = Object.assign.apply(Object, [mergeValue].concat(values));
updateIn(this.state, path, function (parentState, key) {
if (isObservableMap(parentState[key])) {

@@ -47,44 +65,50 @@ parentState[key].merge(value);

});
}
pop(path) {
updateIn(this.state, path, (parentState, key) => {
};
Model.prototype.pop = function (path) {
updateIn(this.state, path, function (parentState, key) {
parentState[key].pop();
});
}
shift(path) {
updateIn(this.state, path, (parentState, key) => {
};
Model.prototype.shift = function (path) {
updateIn(this.state, path, function (parentState, key) {
parentState[key].shift();
});
}
unshift(path, value) {
updateIn(this.state, path, (parentState, key) => {
};
Model.prototype.unshift = function (path, value) {
updateIn(this.state, path, function (parentState, key) {
parentState[key].unshift(value);
});
}
splice(path, ...args) {
updateIn(this.state, path, (parentState, key) => {
parentState[key].splice(...args);
};
Model.prototype.splice = function (path) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
updateIn(this.state, path, function (parentState, key) {
(_a = parentState[key]).splice.apply(_a, args);
var _a;
});
}
unset(path) {
const deleteKey = path.pop();
updateIn(this.state, path, (parentState, key) => {
};
Model.prototype.unset = function (path) {
var deleteKey = path.pop();
updateIn(this.state, path, function (parentState, key) {
parentState[key].delete(deleteKey);
});
}
concat(path, value) {
updateIn(this.state, path, (parentState, key) => {
};
Model.prototype.concat = function (path, value) {
updateIn(this.state, path, function (parentState, key) {
parentState[key] = parentState[key].concat(value);
});
}
increment(path, delta = 1) {
updateIn(this.state, path, (parentState, key) => {
};
Model.prototype.increment = function (path, delta) {
if (delta === void 0) { delta = 1; }
updateIn(this.state, path, function (parentState, key) {
parentState[key] += delta;
});
}
get(path) {
};
Model.prototype.get = function (path) {
if (!path) {
return this.state;
}
return path.reduce((currentState, key) => {
return path.reduce(function (currentState, key) {
if (currentState === undefined) {

@@ -98,6 +122,7 @@ return currentState;

}, this.state);
}
observeState(state) {
const root = observable({});
const extension = traverse(state, (parent, key, path) => {
};
Model.prototype.observeState = function (state) {
var _this = this;
var root = observable({});
var extension = traverse(state, function (parent, key, path) {
if (isObservable(parent[key])) {

@@ -111,4 +136,4 @@ return parent[key];

});
const extended = extendObservable(root, Object.keys(extension).reduce((root, key) => {
const propertyDescriptor = Object.getOwnPropertyDescriptor(extension, key);
var extended = extendObservable(root, Object.keys(extension).reduce(function (root, key) {
var propertyDescriptor = Object.getOwnPropertyDescriptor(extension, key);
if (propertyDescriptor && 'get' in propertyDescriptor) {

@@ -118,6 +143,6 @@ Object.defineProperty(root, key, propertyDescriptor);

else if (extension[key] instanceof ComputedClass) {
extension[key].getState = () => ({
extension[key].getState = function () { return ({
state: extended,
root: this.state,
});
root: _this.state,
}); };
root[key] = extension[key];

@@ -134,6 +159,7 @@ }

return extended;
}
}
Model.useLegacyStateApi = false;
};
Model.useLegacyStateApi = false;
return Model;
}(BaseModel));
export default Model;
//# sourceMappingURL=Model.js.map

@@ -1,11 +0,11 @@

const pathLambdaRegex = /function\s*\((\w)\)\s*{\s*return\s*\1[.]?([\w.[\]]+);?\s*}/g;
var pathLambdaRegex = /function\s*\((\w)\)\s*{\s*return\s*\1[.]?([\w.[\]]+);?\s*}/g;
export function cerebralPathFromFunction(func, args) {
pathLambdaRegex.lastIndex = 0;
const str = func.toString().replace(/"use strict";/, '');
let m;
var str = func.toString().replace(/"use strict";/, '');
var m;
if ((m = pathLambdaRegex.exec(str)) !== null) {
let output = m[2];
var output = m[2];
if (args.length > 0) {
for (let i = 0; i < args.length; i++) {
output = output.replace(`[${i}]`, `.${args[i]}`);
for (var i = 0; i < args.length; i++) {
output = output.replace("[" + i + "]", "." + args[i]);
}

@@ -25,12 +25,24 @@ }

export function pathFrom() {
return function (func, ...args) {
return function (func) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
return cerebralPathFromFunction(func, args);
};
}
export function pathFor(func, ...args) {
export function pathFor(func) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
return cerebralPathFromFunction(func, args);
}
export function combinePaths() {
return function (input, ...args) {
let currentPath = '';
return function (input) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
var currentPath = '';
if (typeof input === typeof Function) {

@@ -42,5 +54,9 @@ currentPath = cerebralPathFromFunction(input, args);

}
const withProvider = {
with: function (innerInput, ...innerArgs) {
return `${currentPath}.${cerebralPathFromFunction(innerInput, innerArgs)}`;
var withProvider = {
with: function (innerInput) {
var innerArgs = [];
for (var _i = 1; _i < arguments.length; _i++) {
innerArgs[_i - 1] = arguments[_i];
}
return currentPath + "." + cerebralPathFromFunction(innerInput, innerArgs);
},

@@ -47,0 +63,0 @@ };

import { Provider } from 'cerebral';
import { isObservable, isObservableMap } from 'mobx';
import { ComputedClass } from './Computed';
const mutationMethods = [
var mutationMethods = [
'concat',

@@ -13,6 +13,6 @@ 'pop',

function cleanPath(state, key, path) {
const pathCopy = key ? path.concat(key) : path.slice();
let isValid = false;
var pathCopy = key ? path.concat(key) : path.slice();
var isValid = false;
while (!isValid) {
const value = pathCopy.reduce((currentState, pathKey) => {
var value = pathCopy.reduce(function (currentState, pathKey) {
if (currentState === undefined) {

@@ -37,6 +37,7 @@ return;

}
function createValidator(state, execution, functionDetails, props, devtools, basePath = []) {
let path = basePath;
const validator = {
get(target, key) {
function createValidator(state, execution, functionDetails, props, devtools, basePath) {
if (basePath === void 0) { basePath = []; }
var path = basePath;
var validator = {
get: function (target, key) {
if (key === '$mobx') {

@@ -51,12 +52,20 @@ return target[key];

case 'forEach':
return (cb) => {
return target.keys().forEach((forEachKey, ...args) => {
return function (cb) {
return target.keys().forEach(function (forEachKey) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
path = cleanPath(state, forEachKey, path);
cb(new Proxy(target.get(forEachKey), validator), ...args);
cb.apply(void 0, [new Proxy(target.get(forEachKey), validator)].concat(args));
});
};
case 'entries': {
const originalFunc = target[key];
return (...args) => {
const value = originalFunc.apply(target, args);
var originalFunc_1 = target[key];
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var value = originalFunc_1.apply(target, args);
path = cleanPath(state, null, path);

@@ -67,6 +76,6 @@ return value;

case 'get': {
const originalFunc = target[key];
return (mapKey) => {
var originalFunc_2 = target[key];
return function (mapKey) {
path = cleanPath(state, mapKey, path);
const value = originalFunc.call(target, mapKey);
var value = originalFunc_2.call(target, mapKey);
return value !== null && typeof value === 'object'

@@ -78,4 +87,8 @@ ? new Proxy(value, validator)

case 'delete': {
const originalFunction = target[key];
return (...args) => {
var originalFunction_1 = target[key];
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
devtools.sendExecutionData({

@@ -87,8 +100,12 @@ type: 'mutation',

path = cleanPath(state, args[0], path);
return originalFunction.apply(target, args);
return originalFunction_1.apply(target, args);
};
}
case 'clear': {
const originalFunction = target[key];
return (...args) => {
var originalFunction_2 = target[key];
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
devtools.sendExecutionData({

@@ -100,8 +117,12 @@ type: 'mutation',

path = cleanPath(state, null, path);
return originalFunction.apply(target, args);
return originalFunction_2.apply(target, args);
};
}
case 'merge': {
const originalFunction = target[key];
return (...args) => {
var originalFunction_3 = target[key];
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
devtools.sendExecutionData({

@@ -113,8 +134,12 @@ type: 'mutation',

path = cleanPath(state, null, path);
return originalFunction.apply(target, args);
return originalFunction_3.apply(target, args);
};
}
case 'replace':
const originalFunction = target[key];
return (...args) => {
var originalFunction_4 = target[key];
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
devtools.sendExecutionData({

@@ -126,7 +151,11 @@ type: 'mutation',

path = cleanPath(state, null, path);
return originalFunction.apply(target, args);
return originalFunction_4.apply(target, args);
};
case 'set': {
const originalFunction = target[key];
return (...args) => {
var originalFunction_5 = target[key];
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
devtools.sendExecutionData({

@@ -138,3 +167,3 @@ type: 'mutation',

path = cleanPath(state, null, path);
return originalFunction.apply(target, args);
return originalFunction_5.apply(target, args);
};

@@ -156,11 +185,15 @@ }

mutationMethods.indexOf(key) >= 0) {
const originalFunction = target[key];
return (...args) => {
var originalFunction_6 = target[key];
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
devtools.sendExecutionData({
type: 'mutation',
method: basePath.length ? 'module.' + String(key) : key,
args: [basePath.concat(path), ...args],
args: [basePath.concat(path)].concat(args),
}, execution, functionDetails, props);
path = cleanPath(state, key, path);
return originalFunction.apply(target, args);
return originalFunction_6.apply(target, args);
};

@@ -171,3 +204,3 @@ }

},
set(target, key, value) {
set: function (target, key, value) {
path = cleanPath(state, key, path);

@@ -188,3 +221,3 @@ devtools.sendExecutionData({

}
const legacyApi = [
var legacyApi = [
'get',

@@ -205,6 +238,10 @@ 'set',

if (!devtools && useLegacyStateApi) {
legacyApi.forEach((method) => {
legacyApi.forEach(function (method) {
Object.defineProperty(state, method, {
value(path, ...args) {
return model[method](path.split('.'), ...args);
value: function (path) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
return model[method].apply(model, [path.split('.')].concat(args));
},

@@ -216,16 +253,22 @@ });

wrap: devtools
? (context) => {
? function (context) {
if (useLegacyStateApi) {
legacyApi.forEach((method) => {
legacyApi.forEach(function (method) {
Object.defineProperty(state, method, {
writable: true,
value(path, ...args) {
value: function (path) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
if (method !== 'get') {
devtools.sendExecutionData({
type: 'mutation',
method,
args: [path.split('.')].concat(args.map((value) => isObservable(value) ? value.value : value)),
method: method,
args: [path.split('.')].concat(args.map(function (value) {
return isObservable(value) ? value.value : value;
})),
}, context.execution, context.functionDetails, context.props);
}
return model[method](path.split('.'), ...args);
return model[method].apply(model, [path.split('.')].concat(args));
},

@@ -242,13 +285,17 @@ });

export function CreateModuleProvider(state, devtools, model, useLegacyStateApi) {
return Provider((context) => {
const signalPath = context.execution.name.split('.');
const modulePath = signalPath.splice(0, signalPath.length - 1);
const module = modulePath.reduce((currentModule, key) => {
return Provider(function (context) {
var signalPath = context.execution.name.split('.');
var modulePath = signalPath.splice(0, signalPath.length - 1);
var module = modulePath.reduce(function (currentModule, key) {
return currentModule[key];
}, context.state);
if (devtools && useLegacyStateApi) {
legacyApi.forEach((method) => {
legacyApi.forEach(function (method) {
Object.defineProperty(module, method, {
writable: true,
value(path, ...args) {
value: function (path) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
if (method !== 'get') {

@@ -258,6 +305,6 @@ devtools.sendExecutionData({

method: 'module.' + method,
args: [modulePath.concat(path.split('.'))].concat(args.map((value) => (isObservable(value) ? value.value : value))),
args: [modulePath.concat(path.split('.'))].concat(args.map(function (value) { return (isObservable(value) ? value.value : value); })),
}, context.execution, context.functionDetails, context.props);
}
return model[method](path.split('.'), ...args);
return model[method].apply(model, [path.split('.')].concat(args));
},

@@ -271,9 +318,13 @@ });

if (!devtools && useLegacyStateApi) {
legacyApi.forEach((method) => {
legacyApi.forEach(function (method) {
Object.defineProperty(module, method, {
writable: true,
value(path, ...args) {
const signalPath = this.context.execution.name.split('.');
const modulePath = signalPath.splice(0, signalPath.length - 1);
return model[method](modulePath.concat(path.split('.')), ...args);
value: function (path) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
var signalPath = this.context.execution.name.split('.');
var modulePath = signalPath.splice(0, signalPath.length - 1);
return model[method].apply(model, [modulePath.concat(path.split('.'))].concat(args));
},

@@ -280,0 +331,0 @@ });

@@ -5,5 +5,5 @@ import { isObservable, isObservableMap } from 'mobx';

export function updateIn(obj, path, cb) {
return path.reduce((currentValue, key, index) => {
return path.reduce(function (currentValue, key, index) {
if (index > 0 && currentValue === undefined) {
throwError(`You are setting to path "${path}", but it is not valid`);
throwError("You are setting to path \"" + path + "\", but it is not valid");
}

@@ -18,5 +18,6 @@ if (index === path.length - 1) {

}
export function traverse(obj, cb, path = []) {
return Object.keys(obj).reduce((newObj, key) => {
const propertyDescriptor = Object.getOwnPropertyDescriptor(obj, key);
export function traverse(obj, cb, path) {
if (path === void 0) { path = []; }
return Object.keys(obj).reduce(function (newObj, key) {
var propertyDescriptor = Object.getOwnPropertyDescriptor(obj, key);
if (propertyDescriptor && 'get' in propertyDescriptor) {

@@ -23,0 +24,0 @@ Object.defineProperty(newObj, key, propertyDescriptor);

import { Reaction } from 'mobx';
import { getChangedProps, throwError, isObject, noop } from 'cerebral/internal';
function autorun(view) {
const reaction = new Reaction(view.name || 'Autorun', function () {
var reaction = new Reaction(view.name || 'Autorun', function () {
this.track(view);

@@ -10,4 +10,5 @@ });

}
class View {
constructor({ dependencies, props, controller, displayName, onUpdate, }) {
var View = /** @class */ (function () {
function View(_a) {
var dependencies = _a.dependencies, props = _a.props, controller = _a.controller, displayName = _a.displayName, onUpdate = _a.onUpdate;
if (!dependencies) {

@@ -32,15 +33,16 @@ throwError('There is no reason to connect a component that has no dependencies');

}
registerAutorun() {
this.autorun = autorun(() => {
this.cerebralProps = this.dependencies({
state: this.controller.state,
signals: this.controller.signals,
props: this.props,
View.prototype.registerAutorun = function () {
var _this = this;
this.autorun = autorun(function () {
_this.cerebralProps = _this.dependencies({
state: _this.controller.state,
signals: _this.controller.signals,
props: _this.props,
});
if (this.isMounted) {
this.onUpdate();
if (_this.isMounted) {
_this.onUpdate();
}
});
}
mount() {
};
View.prototype.mount = function () {
this.registerAutorun();

@@ -54,4 +56,4 @@ this.isMounted = true;

}
}
onUpdate() {
};
View.prototype.onUpdate = function () {
if (this.isUnmounted) {

@@ -61,4 +63,4 @@ return;

this.updateComponent();
}
unMount() {
};
View.prototype.unMount = function () {
if (this.autorun) {

@@ -71,5 +73,5 @@ this.autorun();

this.isUnmounted = true;
}
onPropsUpdate(props, nextProps) {
const propsChanges = getChangedProps(props, nextProps);
};
View.prototype.onPropsUpdate = function (props, nextProps) {
var propsChanges = getChangedProps(props, nextProps);
if (propsChanges.length) {

@@ -82,5 +84,7 @@ this.props = nextProps;

return false;
}
getProps(props = {}, includeProps = true) {
const dependenciesProps = this.cerebralProps;
};
View.prototype.getProps = function (props, includeProps) {
if (props === void 0) { props = {}; }
if (includeProps === void 0) { includeProps = true; }
var dependenciesProps = this.cerebralProps;
if (this.controller.devtools &&

@@ -91,9 +95,10 @@ this.controller.devtools.bigComponentsWarning &&

this.controller.devtools.bigComponentsWarning) {
console.warn(`Component named ${this._displayName} has a lot of dependencies, consider refactoring or adjust this option in devtools`);
console.warn("Component named " + this._displayName + " has a lot of dependencies, consider refactoring or adjust this option in devtools");
this._hasWarnedBigComponent = true;
}
return Object.assign({}, includeProps ? props : {}, dependenciesProps);
}
}
};
return View;
}());
export default View;
//# sourceMappingURL=View.js.map
{
"name": "@cerebral/fluent",
"version": "1.0.2",
"version": "1.0.3-1523952156059",
"description": "Makes Cerebral typescript friendly",

@@ -30,3 +30,3 @@ "main": "index.js",

"dependencies": {
"cerebral": "^4.2.1",
"cerebral": "^4.2.2-1523952156059",
"mobx": "^3.4.1"

@@ -33,0 +33,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet