Skip to content

Commit 470ff5b

Browse files
wawyedchristopherthielen
authored andcommitted
Update to uirouter/core
1 parent 409c177 commit 470ff5b

20 files changed

+37
-36
lines changed

config/_karma.base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var config = {
3939
configFile: 'config/system.config.js',
4040
files: [
4141
'src/**/*.ts',
42-
'node_modules/ui-router-core/lib/**/*'
42+
'node_modules/@uirouter/core/lib/**/*'
4343
]
4444
},
4545
exclude: []

config/system.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ System.config({
1313
'ui-router-ng2': 'src/index.ts'
1414
},
1515
map: {
16-
'ui-router-core': 'node_modules/ui-router-core/lib',
16+
'@uirouter/core': 'node_modules/@uirouter/core/lib',
1717
},
1818
packages: {
1919
'src': { defaultExtension: 'ts' },
2020

21-
'ui-router-core': { main: 'index.js', defaultExtension: 'js' },
21+
'@uirouter/core': { main: 'index.js', defaultExtension: 'js' },
2222
'@angular/core': { main: 'index.js', defaultExtension: 'js' },
2323
'@angular/compiler': { main: 'index.js', defaultExtension: 'js' },
2424
'@angular/common': { main: 'index.js', defaultExtension: 'js' },

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"module": "lib/index.js",
4747
"typings": "lib/index.d.ts",
4848
"dependencies": {
49-
"ui-router-core": "=5.0.0-pre.1",
49+
"@uirouter/core": "5.0.0",
5050
"ui-router-rx": "=0.2.1"
5151
},
5252
"peerDependencies": {
@@ -97,7 +97,7 @@
9797
"typedoc-plugin-external-module-name": "^1.0.2",
9898
"typedoc-plugin-internal-external": "^1.0.0",
9999
"typedoc-plugin-ui-router": "^1.0.0",
100-
"typescript": "~2.0.3",
100+
"typescript": "^2.1.4",
101101
"ui-router-typedoc-themes": "^1.0.0",
102102
"webpack": "^2.2.0",
103103
"webpack-dev-server": "2.2.0",

rollup.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ function onwarn(warning) {
4141
}
4242

4343
function isExternal(id) {
44-
// ui-router-core and ui-router-rx should be external
44+
// @uirouter/core and ui-router-rx should be external
4545
// All rxjs and @angular/* should be external
4646
// except for @angular/router/src/router_config_loader
4747
let externals = [
48-
/^ui-router-(core|rx)/,
48+
/^ui-router-rx/,
49+
/^@uirouter\/core/,
4950
/^rxjs/,
5051
/^@angular\/(?!router\/src\/router_config_loader)/,
5152
];
@@ -94,7 +95,7 @@ const CONFIG = {
9495
'rxjs/operator/filter': 'Rx.Observable.prototype',
9596
'rxjs/operator/concatMap': 'Rx.Observable.prototype',
9697

97-
'ui-router-core': 'ui-router-core',
98+
'@uirouter/core': '@uirouter/core',
9899
'ui-router-rx': 'ui-router-rx',
99100
'@angular/core': 'ng.core',
100101
'@angular/common': 'ng.common',

src/directives/uiSref.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @ng2api @module directives */
22
/** */
3-
import { UIRouter, UIRouterGlobals, extend, Obj, TransitionOptions, TargetState } from "ui-router-core";
3+
import { UIRouter, UIRouterGlobals, extend, Obj, TransitionOptions, TargetState } from "@uirouter/core";
44
import { Directive, Inject, Input, Optional, ElementRef, Renderer } from "@angular/core";
55
import { UIView, ParentUIViewInject } from "./uiView";
66
import { ReplaySubject } from "rxjs/ReplaySubject";

src/directives/uiSrefStatus.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import { Directive, Output, EventEmitter, ContentChildren, QueryList } from '@angular/core';
44
import { UISref } from './uiSref';
55
import {
6-
PathNode, Transition, TargetState, StateObject, anyTrueR, tail, unnestR, Predicate, UIRouterGlobals, Param, PathFactory
7-
} from 'ui-router-core';
6+
PathNode, Transition, TargetState, StateObject, anyTrueR, tail, unnestR, Predicate, UIRouterGlobals, Param, PathUtils
7+
} from '@uirouter/core';
88

99
import { Subscription } from 'rxjs/Subscription';
1010
import { Observable } from 'rxjs/Observable';
@@ -55,15 +55,15 @@ const pathMatches = (target: TargetState): Predicate<PathNode[]> => {
5555
if (!target.exists()) return () => false;
5656
let state: StateObject = target.$state();
5757
let targetParamVals = target.params();
58-
let targetPath: PathNode[] = PathFactory.buildPath(target);
58+
let targetPath: PathNode[] = PathUtils.buildPath(target);
5959
let paramSchema: Param[] = targetPath.map(node => node.paramSchema)
6060
.reduce(unnestR, [])
6161
.filter((param: Param) => targetParamVals.hasOwnProperty(param.id));
6262

6363
return (path: PathNode[]) => {
6464
let tailNode = tail(path);
6565
if (!tailNode || tailNode.state !== state) return false;
66-
let paramValues = PathFactory.paramValues(path);
66+
let paramValues = PathUtils.paramValues(path);
6767
return Param.equals(paramSchema, paramValues, targetParamVals);
6868
};
6969
};
@@ -76,7 +76,7 @@ const pathMatches = (target: TargetState): Predicate<PathNode[]> => {
7676
* @internalapi
7777
*/
7878
function spreadToSubPaths(basePath: PathNode[], appendPath: PathNode[]): PathNode[][] {
79-
return appendPath.map(node => basePath.concat(PathFactory.subPath(appendPath, n => n.state === node.state)));
79+
return appendPath.map(node => basePath.concat(PathUtils.subPath(appendPath, n => n.state === node.state)));
8080
}
8181

8282
/**

src/directives/uiView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { reflector } from '../private_import_core';
88
import {
99
UIRouter, isFunction, Transition, parse, TransitionHookFn, StateDeclaration, inArray, trace, ViewContext, ViewConfig,
1010
ActiveUIView, ResolveContext, NATIVE_INJECTOR_TOKEN, flattenR
11-
} from 'ui-router-core';
11+
} from '@uirouter/core';
1212
import { Ng2ViewConfig } from '../statebuilders/views';
1313
import { MergeInjector } from '../mergeInjector';
1414

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ export * from "./statebuilders/views";
1010
export * from "./statebuilders/lazyLoad";
1111
export * from "./lazyLoad/lazyLoadNgModule";
1212

13-
export * from "ui-router-core";
13+
export * from "@uirouter/core";

src/interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @ng2api @module state */
22
/** */
33

4-
import { StateDeclaration, _ViewDeclaration, Transition, HookResult } from "ui-router-core";
4+
import { StateDeclaration, _ViewDeclaration, Transition, HookResult } from "@uirouter/core";
55
import { Type, Component } from "@angular/core";
66
import { NgModuleToLoad } from "./lazyLoad/lazyLoadNgModule";
77

src/lazyLoad/lazyLoadNgModule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { NgModuleRef, Injector, NgModuleFactory, Type, Compiler, NgModuleFactory
44
import {
55
Transition, LazyLoadResult, UIRouter, Resolvable, NATIVE_INJECTOR_TOKEN, isString, unnestR, inArray, StateObject,
66
uniqR
7-
} from "ui-router-core";
7+
} from "@uirouter/core";
88
import { RootModule, UIROUTER_ROOT_MODULE, UIROUTER_MODULE_TOKEN, StatesModule } from "../uiRouterNgModule";
99
import { applyModuleConfig } from "../uiRouterConfig";
1010

0 commit comments

Comments
 (0)