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

heyui

Package Overview
Dependencies
Maintainers
1
Versions
487
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heyui - npm Package Compare versions

Comparing version 0.0.35 to 0.0.36

components/search/index.js

5

CHANGELOG.md

@@ -5,2 +5,7 @@ # Change Log

<a name="0.0.36"></a>
## [0.0.36](https://github.com/heyui/heyui/compare/v0.0.35...v0.0.36) (2017-05-10)
<a name="0.0.35"></a>

@@ -7,0 +12,0 @@ ## [0.0.35](https://github.com/heyui/heyui/compare/v0.0.34...v0.0.35) (2017-05-08)

4

index.js

@@ -41,3 +41,3 @@ // import Affix from './components/affix';

// import Transfer from './components/transfer';
// import Tree from './components/tree';
import Tree from './components/tree';
// import Upload from './components/upload';

@@ -138,3 +138,3 @@ import AutoComplete from './components/autocomplete';

// Transfer,
// Tree,
Tree,
// Upload

@@ -141,0 +141,0 @@ };

{
"name": "heyui",
"version": "0.0.35",
"version": "0.0.36",
"description": "A UI components Library.",

@@ -23,3 +23,3 @@ "main": "./build/heyui.js",

"manba": "0.0.19",
"hey-validator": "0.0.4"
"hey-validator": "0.0.5"
},

@@ -26,0 +26,0 @@ "devDependencies": {

@@ -9,2 +9,11 @@ import utils from './utils';

},
tree: {
configs: {},
default: {
titleName: 'title',
keyName: 'key',
parentName: 'parent',
childrenName: 'children',
}
},
autocomplete: {

@@ -11,0 +20,0 @@ configs: {},

@@ -179,15 +179,39 @@ import utils from 'hey-utils';

},
generateTree(data, isParent, parent = null) {
if (!this.isFunction(isParent)) {
log.error("generateTree:isParent必须为方法。");
toSimpleArray(data, key) {
let r = [];
if (this.isObject(data)) {
for (let d of Object.keys(data)) {
r.push(data[d][key]);
}
}
if (this.isArray(data)) {
for (let d of data) {
r.push(d[key]);
}
}
return r;
},
generateTree(data, param) {
if (!this.isArray(data)) {
log.error("generateTree:data必须为Array。");
return null;
}
let top = [];
let result = [];
let dataObj = this.toObject(data, param.keyName);
let parentObj = this.toObject(data, param.parentName);
for (let d of data) {
if (isParent(d, parent)) {
d.children = this.generateTree(data, isParent, d);
top.push(d);
let parentCode = d[param.parentName];
if (!utils.isNull(d[param.parentName]) && dataObj[parentCode]) {
let parent = dataObj[parentCode];
if (!utils.isArray(parent[param.childrenName])) {
parent[param.childrenName] = [];
}
parent[param.childrenName].push(d);
}
if (utils.isNull(parentCode) || utils.isNull(parentObj[parentCode])) {
result.push(d);
}
}
return top;
return result;
},

@@ -194,0 +218,0 @@ getValue(item, param) {

Sorry, the diff of this file is too big to display

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

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

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