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

src/location/locationConfig.ts

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

4-
import { UIRouter, is, BrowserLocationConfig } from "ui-router-core";
4+
import { UIRouter, is, BrowserLocationConfig } from "@uirouter/core";
55
import { LocationStrategy, PathLocationStrategy } from "@angular/common";
66

77
export class Ng2LocationConfig extends BrowserLocationConfig {

src/location/locationService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @module ng2 */
22
/** */
3-
import { BaseLocationServices, parseUrl, UIRouter } from 'ui-router-core';
3+
import { BaseLocationServices, parseUrl, UIRouter } from '@uirouter/core';
44
import { LocationStrategy } from '@angular/common';
55

66
/** A `LocationServices` that delegates to the Angular LocationStrategy */

src/providers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ import { Injector, Provider } from "@angular/core";
8989
import {
9090
UIRouter, PathNode, StateRegistry, StateService, TransitionService, UrlMatcherFactory, UrlRouter, ViewService,
9191
UrlService, UIRouterGlobals, services, Resolvable, NATIVE_INJECTOR_TOKEN
92-
} from "ui-router-core";
92+
} from "@uirouter/core";
9393
import { UIView, ParentUIViewInject } from "./directives/uiView";
9494
import { ng2ViewsBuilder, Ng2ViewConfig } from "./statebuilders/views";
9595
import { Ng2ViewDeclaration } from "./interface";
9696
import { applyRootModuleConfig, applyModuleConfig } from "./uiRouterConfig";
9797
import { RootModule, StatesModule, UIROUTER_ROOT_MODULE, UIROUTER_MODULE_TOKEN } from "./uiRouterNgModule";
98-
import { servicesPlugin, ServicesPlugin } from "ui-router-core";
98+
import { servicesPlugin, ServicesPlugin } from "@uirouter/core";
9999
import { ng2LazyLoadBuilder } from "./statebuilders/lazyLoad";
100100
import { UIRouterRx } from "ui-router-rx";
101101
import { LocationStrategy } from "@angular/common";

src/statebuilders/lazyLoad.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @module ng2 */
22
/** */
3-
import { LazyLoadResult, Transition, StateDeclaration } from "ui-router-core"; // has or is using
4-
import { BuilderFunction, StateObject } from "ui-router-core";
3+
import { LazyLoadResult, Transition, StateDeclaration } from "@uirouter/core"; // has or is using
4+
import { BuilderFunction, StateObject } from "@uirouter/core";
55
import { loadNgModule } from "../lazyLoad/lazyLoadNgModule";
66

77
/**

src/statebuilders/views.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/** @module ng2 */ /** */
2-
import {StateObject} from "ui-router-core";
3-
import {PathNode} from "ui-router-core";
4-
import {pick, forEach} from "ui-router-core";
5-
import {ViewConfig} from "ui-router-core";
2+
import {StateObject} from "@uirouter/core";
3+
import {PathNode} from "@uirouter/core";
4+
import {pick, forEach} from "@uirouter/core";
5+
import {ViewConfig} from "@uirouter/core";
66
import {Ng2ViewDeclaration} from "../interface";
7-
import {services} from "ui-router-core";
8-
import {ViewService} from "ui-router-core";
7+
import {services} from "@uirouter/core";
8+
import {ViewService} from "@uirouter/core";
99

1010
/**
1111
* This is a [[StateBuilder.builder]] function for Angular `views`.

src/uiRouterConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/** @module ng2 */ /** */
2-
import { UIRouter, isFunction, StateObject } from "ui-router-core";
2+
import { UIRouter, isFunction, StateObject } from "@uirouter/core";
33
import {StatesModule, RootModule} from "./uiRouterNgModule";
44
import {Injector} from "@angular/core";
5-
import {isDefined} from "ui-router-core";
5+
import {isDefined} from "@uirouter/core";
66

77
export function applyModuleConfig(uiRouter: UIRouter, injector: Injector, module: StatesModule = {}): StateObject[] {
88
if (isFunction(module.config)) {

src/uiRouterNgModule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { CommonModule, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from "@angular/common";
88
import { _UIROUTER_DIRECTIVES } from "./directives/directives";
99
import { UIView } from "./directives/uiView";
10-
import { UrlRuleHandlerFn, TargetState, TargetStateDef, UIRouter } from "ui-router-core";
10+
import { UrlRuleHandlerFn, TargetState, TargetStateDef, UIRouter } from "@uirouter/core";
1111
import { _UIROUTER_INSTANCE_PROVIDERS, _UIROUTER_SERVICE_PROVIDERS } from "./providers";
1212

1313
import { ROUTES } from "@angular/router/src/router_config_loader";

test/matchers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// <reference path='../typings/jasmine/jasmine.d.ts' />
2-
import {equals} from "ui-router-core";
2+
import {equals} from "@uirouter/core";
33
declare var testablePromise;
44

55
beforeEach(function() {

test/ngModule/lazyModule.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { async, inject, TestBed } from '@angular/core/testing';
22
import { UIRouterModule } from '../../src/uiRouterNgModule';
33
import { UIView } from '../../src/directives/uiView';
4-
import { memoryLocationPlugin, UIRouter } from 'ui-router-core';
4+
import { memoryLocationPlugin, UIRouter } from '@uirouter/core';
55
import { NgModuleFactoryLoader, SystemJsNgModuleLoader } from '@angular/core';
66

77
declare var System;

test/testUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { forEach, map, omit, pick } from 'ui-router-core';
1+
import { forEach, map, omit, pick } from '@uirouter/core';
22
import { TestBed } from '@angular/core/testing';
33
let stateProps = ["resolve", "resolvePolicy", "data", "template", "templateUrl", "url", "name", "params"];
44

0 commit comments

Comments
 (0)