Skip to content

Commit 99e08e4

Browse files
authored
Merge branch 'master' into fix-mobx-action-aot
2 parents ec47927 + 614a3ff commit 99e08e4

File tree

6 files changed

+17
-18
lines changed

6 files changed

+17
-18
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<a name="3.4.1"></a>
2+
# 3.4.1 (2017-29-04)
3+
* Fixed SystemJS errors
4+
15
<a name="3.4.0"></a>
26
# 3.4.0 (2017-28-04)
37
* Add animations

lib/components/tree.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { TreeViewportComponent } from './tree-viewport.component';
1010

1111
import { deprecatedSelector } from '../deprecated-selector';
1212

13-
const includes = require('lodash/includes');
14-
const pick = require('lodash/pick');
13+
import * as _ from 'lodash';
14+
const { includes, pick } = _;
1515

1616
@Component({
1717
selector: 'Tree, tree-root',

lib/models/tree-node.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { TreeOptions } from './tree-options.model';
44
import { ITreeNode } from '../defs/api';
55
import { TREE_EVENTS } from '../constants/events';
66

7-
const first = require('lodash/first');
8-
const last = require('lodash/last');
7+
import * as _ from 'lodash';
8+
const { first, last } = _;
99

1010
export class TreeNode implements ITreeNode {
1111
@computed get isHidden() { return this.treeModel.isHidden(this); };

lib/models/tree-options.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { TreeModel } from './tree.model';
33
import { KEYS } from '../constants/keys';
44
import { ITreeOptions } from '../defs/api';
55

6-
const defaultsDeep = require('lodash/defaultsDeep');
6+
import * as _ from 'lodash';
77

88
export interface IActionHandler {
99
(tree: TreeModel, node: TreeNode, $event: any, ...rest);
@@ -78,7 +78,7 @@ export class TreeOptions {
7878
actionMapping: IActionMapping;
7979

8080
constructor(private options: ITreeOptions = {}) {
81-
this.actionMapping = defaultsDeep({}, this.options.actionMapping, defaultActionMapping);
81+
this.actionMapping = _.defaultsDeep({}, this.options.actionMapping, defaultActionMapping);
8282
}
8383

8484
allowDrop(element, to): boolean {

lib/models/tree.model.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,10 @@ import { TreeVirtualScroll } from './tree-virtual-scroll.model';
66
import { ITreeModel } from '../defs/api';
77
import { TREE_EVENTS } from '../constants/events';
88

9-
const first = require('lodash/first');
10-
const last = require('lodash/last');
11-
const compact = require('lodash/compact');
12-
const find = require('lodash/find');
13-
const includes = require('lodash/includes');
14-
const remove = require('lodash/remove');
15-
const indexOf = require('lodash/indexOf');
16-
const pullAt = require('lodash/pullAt');
17-
const isString = require('lodash/isString');
18-
const isFunction = require('lodash/isFunction');
9+
import * as _ from 'lodash';
10+
11+
const { first, last, compact, find, includes,
12+
remove, indexOf, pullAt, isString, isFunction } = _;
1913

2014
@Injectable()
2115
export class TreeModel implements ITreeModel {

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-tree-component",
3-
"version": "3.4.0",
3+
"version": "3.4.1",
44
"description": "A simple yet powerful tree component for Angular2",
55
"author": "Adam Klein <adam@500tech.com>",
66
"homepage": "https://github.com/500tech/angular-tree-component",
@@ -63,6 +63,7 @@
6363
},
6464
"dependencies": {
6565
"lodash": "4.17.4",
66+
"lodash-es": "4.17.4",
6667
"mobx": "^3.1.0",
6768
"mobx-angular": "^1.5.0"
6869
},
@@ -76,7 +77,7 @@
7677
"@angular/platform-browser-dynamic": "^4.0.0",
7778
"@angular/platform-server": "^4.0.0",
7879
"@types/jasmine": "2.5.38",
79-
"@types/lodash": "4.14.62",
80+
"@types/lodash": "^4.14.62",
8081
"@types/node": "^6.0.38",
8182
"@types/rx": "2.5.34",
8283
"@types/webpack": "^1.12.29",

0 commit comments

Comments
 (0)