Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

motx

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

motx - npm Package Compare versions

Comparing version 3.1.3 to 3.1.4

2

dist/motx-vue.d.ts

@@ -12,5 +12,5 @@ import Motx, { MotXOptions } from './index';

constructor(options: MotXOptions);
protected install(Vue: any): void;
install(Vue: any): void;
protected connectState(targetObject: any, propName: any, statePath: any): any;
}
export {};

@@ -19,17 +19,15 @@ "use strict";

_this.connections = {};
if (options.hooks && options.hooks.didSetState) {
var didSetState_1 = _this.hooks.didSetState;
var connections_1 = _this.connections;
_this.hooks.didSetState = function (fieldName, newState, isolate, store) {
didSetState_1(fieldName, newState, isolate, store);
var cnns = connections_1[fieldName];
if (cnns && cnns.length) {
for (var i = 0, l = cnns.length; i < l; i++) {
if (cnns[i]) {
cnns[i].comp[cnns[i].propName] = _this.getState(cnns[i].statePath);
}
var didSetState = _this.hooks.didSetState;
var connections = _this.connections;
_this.hooks.didSetState = function (fieldName, newState, isolate, store) {
didSetState(fieldName, newState, isolate, store);
var cnns = connections[fieldName];
if (cnns && cnns.length) {
for (var i = 0, l = cnns.length; i < l; i++) {
if (cnns[i]) {
cnns[i].comp[cnns[i].propName] = _this.getState(cnns[i].statePath);
}
}
};
}
}
};
_this.options = tslib_1.__assign({}, options);

@@ -59,8 +57,11 @@ return _this;

for (var x in stateOption) {
tmp = [];
for (var i = 0, l = connections[stateOption[x]].length; i < l; i++) {
if (connections[stateOption[x]][i].comp !== this)
tmp.push(connections[stateOption[x]][i]);
if (stateOption[x]) {
tmp = [];
for (var i = 0, l = connections[stateOption[x]].length; i < l; i++) {
if (connections[stateOption[x]][i].comp !== this) {
tmp.push(connections[stateOption[x]][i]);
}
}
connections[stateOption[x]] = tmp;
}
connections[stateOption[x]] = tmp;
}

@@ -73,4 +74,5 @@ }

var connections = this.connections;
if (!statePath)
if (!statePath) {
throw '[tunk]:unknown module name:' + statePath;
}
connections[statePath] = connections[statePath] || [];

@@ -82,3 +84,3 @@ connections[statePath].push({

});
//返回组件默认数据
// 返回组件默认数据
return this.getState(statePath);

@@ -85,0 +87,0 @@ };

{
"name": "motx",
"version": "3.1.3",
"version": "3.1.4",
"description": "A lightweight application state transfer and storage tool based on the mediator pattern and provides efficient solutions to communication problems between multiple processes or closed modules",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc