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

@uirouter/core

Package Overview
Dependencies
Maintainers
4
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uirouter/core - npm Package Compare versions

Comparing version 6.0.1 to 6.0.2

lib-esm/common/safeConsole.d.ts

36

downstream_projects.json
{
"typescript2.2": "./test/typescript2.2",
"typescript2.3": "./test/typescript2.3",
"typescript2.4": "./test/typescript2.4",
"typescript2.5": "./test/typescript2.5",
"typescript2.6": "./test/typescript2.6",
"typescript2.7": "./test/typescript2.7",
"typescript2.8": "./test/typescript2.8",
"typescript3.0": "./test/typescript3.0",
"typescript3.1": "./test/typescript3.1",
"typescript3.2": "./test/typescript3.2",
"angular": "https://github.com/ui-router/angular.git",
"angularjs": "https://github.com/angular-ui/ui-router.git",
"react": "https://github.com/ui-router/react.git",
"sticky-states": "https://github.com/ui-router/sticky-states.git"
"angular": {
"angular": "https://github.com/ui-router/angular.git"
},
"angularjs": {
"angularjs": "https://github.com/angular-ui/ui-router.git"
},
"react": {
"react": "https://github.com/ui-router/react.git"
},
"other": {
"sticky-states": "https://github.com/ui-router/sticky-states.git",
"typescript2.2": "./test/typescript2.2",
"typescript2.3": "./test/typescript2.3",
"typescript2.4": "./test/typescript2.4",
"typescript2.5": "./test/typescript2.5",
"typescript2.6": "./test/typescript2.6",
"typescript2.7": "./test/typescript2.7",
"typescript2.8": "./test/typescript2.8",
"typescript3.0": "./test/typescript3.0",
"typescript3.1": "./test/typescript3.1",
"typescript3.2": "./test/typescript3.2"
}
}

@@ -8,4 +8,4 @@ import { StateObject } from '../state/stateObject';

<T, U>(target: T, source: U): T & U;
<T, U, V>(target: T, source1: U, source2: V): T & U & V;
<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
<T_1, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
<T_2, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
(target: object, ...sources: any[]): any;

@@ -12,0 +12,0 @@ };

@@ -0,1 +1,8 @@

var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
/**

@@ -138,3 +145,3 @@ * Random utility functions used in the UI-Router code

}
var defaultVals = extend.apply(void 0, [{}].concat(defaultsList.reverse()));
var defaultVals = extend.apply(void 0, __spreadArrays([{}], defaultsList.reverse()));
return extend(defaultVals, pick(opts || {}, Object.keys(defaultVals)));

@@ -141,0 +148,0 @@ }

@@ -47,4 +47,2 @@ /**

*
* Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function
*
* @param fn

@@ -51,0 +49,0 @@ * @returns {*|function(): (*|any)}

@@ -8,2 +8,9 @@ /**

*/ /** */
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
/**

@@ -47,4 +54,2 @@ * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.

*
* Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function
*
* @param fn

@@ -54,12 +59,9 @@ * @returns {*|function(): (*|any)}

export function curry(fn) {
var initial_args = [].slice.apply(arguments, [1]);
var func_args_length = fn.length;
function curried(args) {
if (args.length >= func_args_length)
return fn.apply(null, args);
return function () {
return curried(args.concat([].slice.apply(arguments)));
};
}
return curried(initial_args);
return function curried() {
if (arguments.length >= fn.length) {
return fn.apply(this, arguments);
}
var args = Array.prototype.slice.call(arguments);
return curried.bind.apply(curried, __spreadArrays([this], args));
};
}

@@ -66,0 +68,0 @@ /**

@@ -35,6 +35,6 @@ /**

*/
/* tslint:disable:no-console */
import { parse } from '../common/hof';
import { isFunction, isNumber } from '../common/predicates';
import { isNumber } from '../common/predicates';
import { stringify, functionToString, maxLength, padString } from './strings';
import { safeConsole } from './safeConsole';
/** @hidden */

@@ -57,6 +57,2 @@ function uiViewString(uiview) {

}
/** @hidden */
var consoleLog = Function.prototype.bind.call(console.log, console);
/** @hidden */
var consoletable = isFunction(console.table) ? console.table.bind(console) : consoleLog.bind(console);
/**

@@ -141,3 +137,3 @@ * Trace categories Enum

return;
console.log(transLbl(trans) + ": Started -> " + stringify(trans));
safeConsole.log(transLbl(trans) + ": Started -> " + stringify(trans));
};

@@ -148,3 +144,3 @@ /** @internalapi called by ui-router code */

return;
console.log(transLbl(trans) + ": Ignored <> " + stringify(trans));
safeConsole.log(transLbl(trans) + ": Ignored <> " + stringify(trans));
};

@@ -156,3 +152,3 @@ /** @internalapi called by ui-router code */

var event = parse('traceData.hookType')(options) || 'internal', context = parse('traceData.context.state.name')(options) || parse('traceData.context')(options) || 'unknown', name = functionToString(step.registeredHook.callback);
console.log(transLbl(trans) + ": Hook -> " + event + " context: " + context + ", " + maxLength(200, name));
safeConsole.log(transLbl(trans) + ": Hook -> " + event + " context: " + context + ", " + maxLength(200, name));
};

@@ -163,3 +159,3 @@ /** @internalapi called by ui-router code */

return;
console.log(transLbl(trans) + ": <- Hook returned: " + maxLength(200, stringify(hookResult)));
safeConsole.log(transLbl(trans) + ": <- Hook returned: " + maxLength(200, stringify(hookResult)));
};

@@ -170,3 +166,3 @@ /** @internalapi called by ui-router code */

return;
console.log(transLbl(trans) + ": Resolving " + path + " (" + when + ")");
safeConsole.log(transLbl(trans) + ": Resolving " + path + " (" + when + ")");
};

@@ -177,3 +173,3 @@ /** @internalapi called by ui-router code */

return;
console.log(transLbl(trans) + ": <- Resolved " + resolvable + " to: " + maxLength(200, stringify(resolvable.data)));
safeConsole.log(transLbl(trans) + ": <- Resolved " + resolvable + " to: " + maxLength(200, stringify(resolvable.data)));
};

@@ -184,3 +180,3 @@ /** @internalapi called by ui-router code */

return;
console.log(transLbl(trans) + ": <- Rejected " + stringify(trans) + ", reason: " + reason);
safeConsole.log(transLbl(trans) + ": <- Rejected " + stringify(trans) + ", reason: " + reason);
};

@@ -191,3 +187,3 @@ /** @internalapi called by ui-router code */

return;
console.log(transLbl(trans) + ": <- Success " + stringify(trans) + ", final state: " + finalState.name);
safeConsole.log(transLbl(trans) + ": <- Success " + stringify(trans) + ", final state: " + finalState.name);
};

@@ -199,3 +195,3 @@ /** @internalapi called by ui-router code */

return;
console.log("ui-view: " + padString(30, event) + " " + uiViewString(viewData) + extra);
safeConsole.log("ui-view: " + padString(30, event) + " " + uiViewString(viewData) + extra);
};

@@ -229,3 +225,3 @@ /** @internalapi called by ui-router code */

.sort(function (a, b) { return (a[uivheader] || '').localeCompare(b[uivheader] || ''); });
consoletable(mapping);
safeConsole.table(mapping);
};

@@ -236,3 +232,3 @@ /** @internalapi called by ui-router code */

return;
console.log("VIEWCONFIG: " + event + " " + viewConfigString(viewConfig));
safeConsole.log("VIEWCONFIG: " + event + " " + viewConfigString(viewConfig));
};

@@ -243,3 +239,3 @@ /** @internalapi called by ui-router code */

return;
console.log("VIEWCONFIG: " + event + " " + uiViewString(viewData));
safeConsole.log("VIEWCONFIG: " + event + " " + uiViewString(viewData));
};

@@ -246,0 +242,0 @@ return Trace;

@@ -98,3 +98,5 @@ /**

* // if no `wait` policy is defined on the state
* var myResolvablePolicy = { async: "RXWAIT" }
* import { RXWAIT } from '@uirouter/rx';
*
* var myResolvablePolicy = { async: RXWAIT }
* ```

@@ -158,7 +160,9 @@ */

* - The promise itself will be provided when the resolve is injected or bound elsewhere.
* - `RXWAIT`
* - When an Observable is returned from the resolveFn, wait until the Observable emits at least one item.
* - The Observable item will not be unwrapped.
* - The Observable stream itself will be provided when the resolve is injected or bound elsewhere.
* - {@link CustomAsyncPolicy}
* - You can define a custom function that will be called with the resolveFn value.
* - This function must return a promise.
* - The transition will wait for this promise before proceeding
*
* NOTE: The previous `RXWAIT` policy has become a CustomAsyncPolicy function exported in `@uirouter/rx` package.
*
* #### Example:

@@ -199,4 +203,3 @@ * The `Transition` will not wait for the resolve promise(s) from `main` to settle before continuing.

NOWAIT: string;
RXWAIT: string;
};
};

@@ -10,5 +10,4 @@ /** @internalapi */

NOWAIT: 'NOWAIT',
RXWAIT: 'RXWAIT',
},
};
//# sourceMappingURL=interface.js.map

@@ -74,3 +74,2 @@ /** @publicapi @module resolve */ /** */

var invokeResolveFn = function (resolvedDeps) { return _this.resolveFn.apply(null, resolvedDeps); };
// If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through.
var node = resolveContext.findNode(this);

@@ -77,0 +76,0 @@ var state = node && node.state;

@@ -286,3 +286,3 @@ /** @publicapi @module state */ /** */

* - `when`: (optional) defines when the resolve is fetched. Accepted values: "LAZY" or "EAGER"
* - `async`: (optional) if the transition waits for the resolve. Accepted values: "WAIT", "NOWAIT", "RXWAIT"
* - `async`: (optional) if the transition waits for the resolve. Accepted values: "WAIT", "NOWAIT", {@link CustomAsyncPolicy}
*

@@ -289,0 +289,0 @@ * See [[ResolvePolicy]] for more details.

/** @publicapi @module state */ /** */
import { isString } from '../common/predicates';
import { values } from '../common/common';
import { safeConsole } from '../common/safeConsole';
var StateMatcher = /** @class */ (function () {

@@ -28,4 +29,3 @@ function StateMatcher(_states) {

if (matches.length > 1) {
// tslint:disable-next-line:no-console
console.log("stateMatcher.find: Found multiple matches for " + name + " using glob: ", matches.map(function (match) { return match.name; }));
safeConsole.error("stateMatcher.find: Found multiple matches for " + name + " using glob: ", matches.map(function (match) { return match.name; }));
}

@@ -32,0 +32,0 @@ return matches[0];

@@ -26,3 +26,3 @@ import { HookResult, TransitionOptions } from '../transition/interface';

*/
transition: Transition;
get transition(): Transition;
/**

@@ -33,3 +33,3 @@ * The latest successful state parameters

*/
params: StateParams;
get params(): StateParams;
/**

@@ -40,3 +40,3 @@ * The current [[StateDeclaration]]

*/
current: StateDeclaration;
get current(): StateDeclaration;
/**

@@ -47,3 +47,3 @@ * The current [[StateObject]]

*/
$current: StateObject;
get $current(): StateObject;
/** @internalapi */

@@ -50,0 +50,0 @@ constructor(/** @hidden */ router: UIRouter);

@@ -333,2 +333,5 @@ /** @publicapi @module state */ /** */

return silentRejection(ref.error());
if (options.supercede === false && getCurrent()) {
return Rejection.ignored('Another transition is in progress and supercede has been set to false in TransitionOptions for the transition. So the transition was ignored in favour of the existing one in progress.').toPromise();
}
/**

@@ -335,0 +338,0 @@ * Special handling for Ignored, Aborted, and Redirected transitions

@@ -70,2 +70,14 @@ /** @publicapi @module transition */ /** */

custom?: any;
/**
* This option may be used to cancel the active transition (if one is active) in favour of the this one.
* This is the default behaviour or ui-router.
*
*
* - When `true`, the active transition will be canceled and new transition will begin.
* - when `false`, the transition will be canceled if a transition is already running. This can be useful in cases where
* you only want to navigate to a different state if you are not already navigating somewhere.
*
* @default `true`
*/
supercede?: boolean;
/** @internalapi */

@@ -72,0 +84,0 @@ reloadState?: StateObject;

@@ -33,2 +33,3 @@ /** @publicapi @module transition */ /** */

reload: false,
supercede: true,
custom: {},

@@ -35,0 +36,0 @@ current: function () { return null; },

@@ -71,3 +71,3 @@ import { UrlMatcher } from './urlMatcher';

/** @deprecated use [[UrlService.interceptDeferred]]*/
interceptDeferred: boolean;
get interceptDeferred(): boolean;
/** @deprecated use [[UrlService.match]]*/

@@ -74,0 +74,0 @@ match: (urlParts: UrlParts) => MatchResult;

@@ -8,4 +8,4 @@ import { StateObject } from '../state/stateObject';

<T, U>(target: T, source: U): T & U;
<T, U, V>(target: T, source1: U, source2: V): T & U & V;
<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
<T_1, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
<T_2, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
(target: object, ...sources: any[]): any;

@@ -12,0 +12,0 @@ };

"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -146,3 +153,3 @@ /**

}
var defaultVals = exports.extend.apply(void 0, [{}].concat(defaultsList.reverse()));
var defaultVals = exports.extend.apply(void 0, __spreadArrays([{}], defaultsList.reverse()));
return exports.extend(defaultVals, pick(opts || {}, Object.keys(defaultVals)));

@@ -149,0 +156,0 @@ }

@@ -47,4 +47,2 @@ /**

*
* Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function
*
* @param fn

@@ -51,0 +49,0 @@ * @returns {*|function(): (*|any)}

@@ -9,2 +9,9 @@ "use strict";

*/ /** */
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -49,4 +56,2 @@ /**

*
* Stolen from: http://stackoverflow.com/questions/4394747/javascript-curry-function
*
* @param fn

@@ -56,12 +61,9 @@ * @returns {*|function(): (*|any)}

function curry(fn) {
var initial_args = [].slice.apply(arguments, [1]);
var func_args_length = fn.length;
function curried(args) {
if (args.length >= func_args_length)
return fn.apply(null, args);
return function () {
return curried(args.concat([].slice.apply(arguments)));
};
}
return curried(initial_args);
return function curried() {
if (arguments.length >= fn.length) {
return fn.apply(this, arguments);
}
var args = Array.prototype.slice.call(arguments);
return curried.bind.apply(curried, __spreadArrays([this], args));
};
}

@@ -68,0 +70,0 @@ exports.curry = curry;

@@ -37,6 +37,6 @@ "use strict";

*/
/* tslint:disable:no-console */
var hof_1 = require("../common/hof");
var predicates_1 = require("../common/predicates");
var strings_1 = require("./strings");
var safeConsole_1 = require("./safeConsole");
/** @hidden */

@@ -59,6 +59,2 @@ function uiViewString(uiview) {

}
/** @hidden */
var consoleLog = Function.prototype.bind.call(console.log, console);
/** @hidden */
var consoletable = predicates_1.isFunction(console.table) ? console.table.bind(console) : consoleLog.bind(console);
/**

@@ -143,3 +139,3 @@ * Trace categories Enum

return;
console.log(transLbl(trans) + ": Started -> " + strings_1.stringify(trans));
safeConsole_1.safeConsole.log(transLbl(trans) + ": Started -> " + strings_1.stringify(trans));
};

@@ -150,3 +146,3 @@ /** @internalapi called by ui-router code */

return;
console.log(transLbl(trans) + ": Ignored <> " + strings_1.stringify(trans));
safeConsole_1.safeConsole.log(transLbl(trans) + ": Ignored <> " + strings_1.stringify(trans));
};

@@ -158,3 +154,3 @@ /** @internalapi called by ui-router code */

var event = hof_1.parse('traceData.hookType')(options) || 'internal', context = hof_1.parse('traceData.context.state.name')(options) || hof_1.parse('traceData.context')(options) || 'unknown', name = strings_1.functionToString(step.registeredHook.callback);
console.log(transLbl(trans) + ": Hook -> " + event + " context: " + context + ", " + strings_1.maxLength(200, name));
safeConsole_1.safeConsole.log(transLbl(trans) + ": Hook -> " + event + " context: " + context + ", " + strings_1.maxLength(200, name));
};

@@ -165,3 +161,3 @@ /** @internalapi called by ui-router code */

return;
console.log(transLbl(trans) + ": <- Hook returned: " + strings_1.maxLength(200, strings_1.stringify(hookResult)));
safeConsole_1.safeConsole.log(transLbl(trans) + ": <- Hook returned: " + strings_1.maxLength(200, strings_1.stringify(hookResult)));
};

@@ -172,3 +168,3 @@ /** @internalapi called by ui-router code */

return;
console.log(transLbl(trans) + ": Resolving " + path + " (" + when + ")");
safeConsole_1.safeConsole.log(transLbl(trans) + ": Resolving " + path + " (" + when + ")");
};

@@ -179,3 +175,3 @@ /** @internalapi called by ui-router code */

return;
console.log(transLbl(trans) + ": <- Resolved " + resolvable + " to: " + strings_1.maxLength(200, strings_1.stringify(resolvable.data)));
safeConsole_1.safeConsole.log(transLbl(trans) + ": <- Resolved " + resolvable + " to: " + strings_1.maxLength(200, strings_1.stringify(resolvable.data)));
};

@@ -186,3 +182,3 @@ /** @internalapi called by ui-router code */

return;
console.log(transLbl(trans) + ": <- Rejected " + strings_1.stringify(trans) + ", reason: " + reason);
safeConsole_1.safeConsole.log(transLbl(trans) + ": <- Rejected " + strings_1.stringify(trans) + ", reason: " + reason);
};

@@ -193,3 +189,3 @@ /** @internalapi called by ui-router code */

return;
console.log(transLbl(trans) + ": <- Success " + strings_1.stringify(trans) + ", final state: " + finalState.name);
safeConsole_1.safeConsole.log(transLbl(trans) + ": <- Success " + strings_1.stringify(trans) + ", final state: " + finalState.name);
};

@@ -201,3 +197,3 @@ /** @internalapi called by ui-router code */

return;
console.log("ui-view: " + strings_1.padString(30, event) + " " + uiViewString(viewData) + extra);
safeConsole_1.safeConsole.log("ui-view: " + strings_1.padString(30, event) + " " + uiViewString(viewData) + extra);
};

@@ -231,3 +227,3 @@ /** @internalapi called by ui-router code */

.sort(function (a, b) { return (a[uivheader] || '').localeCompare(b[uivheader] || ''); });
consoletable(mapping);
safeConsole_1.safeConsole.table(mapping);
};

@@ -238,3 +234,3 @@ /** @internalapi called by ui-router code */

return;
console.log("VIEWCONFIG: " + event + " " + viewConfigString(viewConfig));
safeConsole_1.safeConsole.log("VIEWCONFIG: " + event + " " + viewConfigString(viewConfig));
};

@@ -245,3 +241,3 @@ /** @internalapi called by ui-router code */

return;
console.log("VIEWCONFIG: " + event + " " + uiViewString(viewData));
safeConsole_1.safeConsole.log("VIEWCONFIG: " + event + " " + uiViewString(viewData));
};

@@ -248,0 +244,0 @@ return Trace;

@@ -98,3 +98,5 @@ /**

* // if no `wait` policy is defined on the state
* var myResolvablePolicy = { async: "RXWAIT" }
* import { RXWAIT } from '@uirouter/rx';
*
* var myResolvablePolicy = { async: RXWAIT }
* ```

@@ -158,7 +160,9 @@ */

* - The promise itself will be provided when the resolve is injected or bound elsewhere.
* - `RXWAIT`
* - When an Observable is returned from the resolveFn, wait until the Observable emits at least one item.
* - The Observable item will not be unwrapped.
* - The Observable stream itself will be provided when the resolve is injected or bound elsewhere.
* - {@link CustomAsyncPolicy}
* - You can define a custom function that will be called with the resolveFn value.
* - This function must return a promise.
* - The transition will wait for this promise before proceeding
*
* NOTE: The previous `RXWAIT` policy has become a CustomAsyncPolicy function exported in `@uirouter/rx` package.
*
* #### Example:

@@ -199,4 +203,3 @@ * The `Transition` will not wait for the resolve promise(s) from `main` to settle before continuing.

NOWAIT: string;
RXWAIT: string;
};
};

@@ -12,5 +12,4 @@ "use strict";

NOWAIT: 'NOWAIT',
RXWAIT: 'RXWAIT',
},
};
//# sourceMappingURL=interface.js.map

@@ -76,3 +76,2 @@ "use strict";

var invokeResolveFn = function (resolvedDeps) { return _this.resolveFn.apply(null, resolvedDeps); };
// If the resolve policy is RXWAIT, wait for the observable to emit something. otherwise pass through.
var node = resolveContext.findNode(this);

@@ -79,0 +78,0 @@ var state = node && node.state;

@@ -286,3 +286,3 @@ /** @publicapi @module state */ /** */

* - `when`: (optional) defines when the resolve is fetched. Accepted values: "LAZY" or "EAGER"
* - `async`: (optional) if the transition waits for the resolve. Accepted values: "WAIT", "NOWAIT", "RXWAIT"
* - `async`: (optional) if the transition waits for the resolve. Accepted values: "WAIT", "NOWAIT", {@link CustomAsyncPolicy}
*

@@ -289,0 +289,0 @@ * See [[ResolvePolicy]] for more details.

@@ -6,2 +6,3 @@ "use strict";

var common_1 = require("../common/common");
var safeConsole_1 = require("../common/safeConsole");
var StateMatcher = /** @class */ (function () {

@@ -31,4 +32,3 @@ function StateMatcher(_states) {

if (matches.length > 1) {
// tslint:disable-next-line:no-console
console.log("stateMatcher.find: Found multiple matches for " + name + " using glob: ", matches.map(function (match) { return match.name; }));
safeConsole_1.safeConsole.error("stateMatcher.find: Found multiple matches for " + name + " using glob: ", matches.map(function (match) { return match.name; }));
}

@@ -35,0 +35,0 @@ return matches[0];

@@ -26,3 +26,3 @@ import { HookResult, TransitionOptions } from '../transition/interface';

*/
transition: Transition;
get transition(): Transition;
/**

@@ -33,3 +33,3 @@ * The latest successful state parameters

*/
params: StateParams;
get params(): StateParams;
/**

@@ -40,3 +40,3 @@ * The current [[StateDeclaration]]

*/
current: StateDeclaration;
get current(): StateDeclaration;
/**

@@ -47,3 +47,3 @@ * The current [[StateObject]]

*/
$current: StateObject;
get $current(): StateObject;
/** @internalapi */

@@ -50,0 +50,0 @@ constructor(/** @hidden */ router: UIRouter);

@@ -335,2 +335,5 @@ "use strict";

return common_1.silentRejection(ref.error());
if (options.supercede === false && getCurrent()) {
return rejectFactory_1.Rejection.ignored('Another transition is in progress and supercede has been set to false in TransitionOptions for the transition. So the transition was ignored in favour of the existing one in progress.').toPromise();
}
/**

@@ -337,0 +340,0 @@ * Special handling for Ignored, Aborted, and Redirected transitions

@@ -70,2 +70,14 @@ /** @publicapi @module transition */ /** */

custom?: any;
/**
* This option may be used to cancel the active transition (if one is active) in favour of the this one.
* This is the default behaviour or ui-router.
*
*
* - When `true`, the active transition will be canceled and new transition will begin.
* - when `false`, the transition will be canceled if a transition is already running. This can be useful in cases where
* you only want to navigate to a different state if you are not already navigating somewhere.
*
* @default `true`
*/
supercede?: boolean;
/** @internalapi */

@@ -72,0 +84,0 @@ reloadState?: StateObject;

@@ -35,2 +35,3 @@ "use strict";

reload: false,
supercede: true,
custom: {},

@@ -37,0 +38,0 @@ current: function () { return null; },

@@ -71,3 +71,3 @@ import { UrlMatcher } from './urlMatcher';

/** @deprecated use [[UrlService.interceptDeferred]]*/
interceptDeferred: boolean;
get interceptDeferred(): boolean;
/** @deprecated use [[UrlService.match]]*/

@@ -74,0 +74,0 @@ match: (urlParts: UrlParts) => MatchResult;

{
"name": "@uirouter/core",
"description": "UI-Router Core: Framework agnostic, State-based routing for JavaScript Single Page Apps",
"version": "6.0.1",
"version": "6.0.2",
"scripts": {

@@ -71,5 +71,5 @@ "clean": "shx rm -rf lib lib-esm _bundles .cache _doc",

"@types/jquery": "^3.3.2",
"@uirouter/publish-scripts": "^2.3.26",
"@uirouter/publish-scripts": "^2.3.43",
"dts-downlevel": "^0.3.0",
"fork-ts-checker-webpack-plugin": "^1.3.7",
"fork-ts-checker-webpack-plugin": "^3.1.1",
"husky": "^3.0.0",

@@ -85,3 +85,3 @@ "jasmine-core": "^3.3.0",

"prettier": "^1.18.2",
"pretty-quick": "^1.11.1",
"pretty-quick": "^2.0.1",
"rollup": "^1.15.5",

@@ -92,3 +92,3 @@ "rollup-plugin-node-resolve": "^5.0.2",

"ts-loader": "^6.0.2",
"tslint": "^5.17.0",
"tslint": "^5.20.1",
"tslint-eslint-rules": "^5.3.1",

@@ -95,0 +95,0 @@ "typescript": "^3.5.2",

@@ -1,4 +0,4 @@

# UI-Router Core &nbsp;[![Build Status](https://travis-ci.org/ui-router/core.svg?branch=master)](https://travis-ci.org/ui-router/core)
# UI-Router Core &nbsp;[![Build Status](https://github.com/ui-router/core/workflows/CI:%20UIRouter%20Core/badge.svg)](https://github.com/ui-router/core/actions?query=workflow%3A%22CI:%20UIRouter%20Core%22)
UI-Router core provides client-side [Single Page Application](https://en.wikipedia.org/wiki/Single-page_application)
UI-Router core provides client-side [Single Page Application](https://en.wikipedia.org/wiki/Single-page_application)
routing for JavaScript.

@@ -8,3 +8,3 @@ This core is framework agnostic.

[UI-Router for Angular 1](//ui-router.github.io/ng1),
[UI-Router for Angular 2](//ui-router.github.io/ng2), and
[UI-Router for Angular 2](//ui-router.github.io/ng2), and
[UI-Router React](//ui-router.github.io/react).

@@ -14,9 +14,9 @@

Routing frameworks for SPAs update the browser's URL as the user navigates through the app. Conversely, this allows
changes to the browser's URL to drive navigation through the app, thus allowing the user to create a bookmark to a
Routing frameworks for SPAs update the browser's URL as the user navigates through the app. Conversely, this allows
changes to the browser's URL to drive navigation through the app, thus allowing the user to create a bookmark to a
location deep within the SPA.
UI-Router applications are modeled as a hierarchical tree of states. UI-Router provides a
[*state machine*](https://en.wikipedia.org/wiki/Finite-state_machine) to manage the transitions between those
application states in a transaction-like manner.
UI-Router applications are modeled as a hierarchical tree of states. UI-Router provides a
[_state machine_](https://en.wikipedia.org/wiki/Finite-state_machine) to manage the transitions between those
application states in a transaction-like manner.

@@ -38,3 +38,3 @@ ## Features

- Path, Query, and non-URL parameters
- Typed parameters
- Typed parameters
- Built in: `int`, `string`, `date`, `json`

@@ -41,0 +41,0 @@ - Custom: define your own encoding/decoding

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 too big to display

Sorry, the diff of this file is not supported yet

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

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