@angular-wave/angular.ts 0.0.22 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular-ts.esm.js +1 -1
- package/dist/angular-ts.umd.js +1 -1
- package/index.html +6 -2
- package/package.json +1 -1
- package/src/core/compile.js +2 -3
- package/src/core/parser/parse.js +2 -3
- package/src/filters/order-by.js +8 -8
- package/src/router/directives/{stateDirectives.js → state-directives.js} +1 -2
- package/src/router/directives/{viewDirective.js → view-directive.js} +4 -12
- package/src/router/globals.js +1 -1
- package/src/router/hooks/{ignoredTransition.js → ignored-transition.js} +1 -1
- package/src/router/hooks/{redirectTo.js → redirect-to.js} +1 -1
- package/src/router/hooks/resolve.js +1 -1
- package/src/router/index.js +6 -8
- package/src/router/params/{paramTypes.js → param-types.js} +3 -4
- package/src/router/params/param.js +1 -1
- package/src/router/path/{pathUtils.js → path-utils.js} +2 -2
- package/src/router/resolve/resolvable.js +2 -2
- package/src/router/resolve/{resolveContext.js → resolve-context.js} +1 -1
- package/src/router/router.js +8 -8
- package/src/router/services.js +3 -3
- package/src/router/state/{stateBuilder.js → state-builder.js} +2 -3
- package/src/router/state/{stateQueueManager.js → state-queue-manager.js} +2 -1
- package/src/router/state/{stateRegistry.js → state-registry.js} +3 -3
- package/src/router/state/{stateService.js → state-service.js} +7 -7
- package/src/router/state/views.js +1 -1
- package/src/router/{stateProvider.js → state-provider.js} +8 -0
- package/src/router/{templateFactory.js → template-factory.js} +93 -51
- package/src/router/transition/{hookBuilder.js → hook-builder.js} +3 -3
- package/src/router/transition/{transitionEventType.js → transition-event-type.js} +1 -1
- package/src/router/transition/{transitionHook.js → transition-hook.js} +2 -2
- package/src/router/transition/{transitionService.js → transition-service.js} +10 -10
- package/src/router/transition/transition.js +12 -9
- package/src/router/url/{urlConfig.js → url-config.js} +1 -1
- package/src/router/url/{urlMatcherFactory.js → url-matcher-factory.js} +1 -1
- package/src/router/url/{urlMatcher.js → url-matcher.js} +0 -2
- package/src/router/url/{urlRouter.js → url-router.js} +1 -1
- package/src/router/url/{urlRule.js → url-rule.js} +13 -5
- package/src/router/url/{urlRules.js → url-rules.js} +3 -3
- package/src/router/url/{urlService.js → url-service.js} +6 -6
- package/src/services/browser.js +3 -18
- package/src/shared/strings.js +2 -2
- package/test/router/ng-state-builder.spec.js +81 -0
- package/test/router/services.spec.js +0 -1
- package/test/router/state-directives.spec.js +867 -893
- package/test/router/template-factory.spec.js +146 -0
- package/test/router/url-matcher-factory.spec.js +1313 -0
- package/test/router/view-directive.spec.js +2013 -0
- package/test/router/view-hook.spec.js +217 -0
- package/test/router/view-scroll.spec.js +77 -0
- package/test/router/view.spec.js +117 -0
- package/test/test-utils.js +9 -0
- package/types/router/legacy/resolveService.d.ts +1 -1
- package/types/router/statebuilders/onEnterExitRetain.d.ts +1 -1
- package/types/router/statebuilders/views.d.ts +1 -2
- /package/src/router/hooks/{coreResolvables.js → core-resolvables.js} +0 -0
- /package/src/router/hooks/{invalidTransition.js → invalid-transition.js} +0 -0
- /package/src/router/hooks/{lazyLoad.js → lazy-load.js} +0 -0
- /package/src/router/hooks/{onEnterExitRetain.js → on-enter-exit-retain.js} +0 -0
- /package/src/router/hooks/{updateGlobals.js → update-globals.js} +0 -0
- /package/src/router/{locationServices.js → location-services.js} +0 -0
- /package/src/router/params/{paramType.js → param-type.js} +0 -0
- /package/src/router/params/{stateParams.js → state-params.js} +0 -0
- /package/src/router/path/{pathNode.js → path-node.js} +0 -0
- /package/src/router/state/{stateMatcher.js → state-matcher.js} +0 -0
- /package/src/router/state/{stateObject.js → state-object.js} +0 -0
- /package/src/router/state/{targetState.js → target-state.js} +0 -0
- /package/src/router/{stateFilters.js → state-filters.js} +0 -0
- /package/src/router/transition/{hookRegistry.js → hook-registry.js} +0 -0
- /package/src/router/transition/{rejectFactory.js → reject-factory.js} +0 -0
- /package/src/router/{viewScroll.js → view-scroll.js} +0 -0
package/index.html
CHANGED
|
@@ -103,8 +103,12 @@
|
|
|
103
103
|
<script type="module" src="test/router/state-directives.spec.js"></script>
|
|
104
104
|
<script type="module" src="test/router/state-filter.spec.js"></script>
|
|
105
105
|
<script type="module" src="test/router/state.spec.js"></script>
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
<script type="module" src="test/router/template-factory.spec.js"></script>
|
|
107
|
+
<script type="module" src="test/router/url-matcher-factory.spec.js"></script>
|
|
108
|
+
<script type="module" src="test/router/view-directive.spec.js"></script>
|
|
109
|
+
<script type="module" src="test/router/view-hook.spec.js"></script>
|
|
110
|
+
<script type="module" src="test/router/view-scroll.spec.js"></script>
|
|
111
|
+
<script type="module" src="test/router/view.spec.js"></script>
|
|
108
112
|
|
|
109
113
|
<!-- Run asyncs last to prevent digest polution-->
|
|
110
114
|
<script type="module" src="test/core/interval.spec.js"></script>
|
package/package.json
CHANGED
package/src/core/compile.js
CHANGED
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
assertNotHasOwnProperty,
|
|
7
7
|
createMap,
|
|
8
8
|
forEach,
|
|
9
|
-
identity,
|
|
10
9
|
isDefined,
|
|
11
10
|
isFunction,
|
|
12
11
|
isObject,
|
|
@@ -969,7 +968,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
|
969
968
|
const endSymbol = $interpolate.endSymbol();
|
|
970
969
|
const denormalizeTemplate =
|
|
971
970
|
startSymbol === "{{" && endSymbol === "}}"
|
|
972
|
-
?
|
|
971
|
+
? (x) => x
|
|
973
972
|
: function denormalizeTemplate(template) {
|
|
974
973
|
return template
|
|
975
974
|
.replace(/\{\{/g, startSymbol)
|
|
@@ -2902,7 +2901,7 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
|
2902
2901
|
const nodeName = nodeName_(node);
|
|
2903
2902
|
const trustedContext = getTrustedPropContext(nodeName, propName);
|
|
2904
2903
|
|
|
2905
|
-
let sanitizer =
|
|
2904
|
+
let sanitizer = (x) => x;
|
|
2906
2905
|
// Sanitize img[srcset] + source[srcset] values.
|
|
2907
2906
|
if (
|
|
2908
2907
|
propName === "srcset" &&
|
package/src/core/parser/parse.js
CHANGED
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
createMap,
|
|
3
3
|
csp,
|
|
4
4
|
forEach,
|
|
5
|
-
identity,
|
|
6
5
|
isDefined,
|
|
7
6
|
isFunction,
|
|
8
7
|
minErr,
|
|
@@ -2213,7 +2212,7 @@ export function $ParseProvider() {
|
|
|
2213
2212
|
var unwatch, lastValue;
|
|
2214
2213
|
|
|
2215
2214
|
var exp = parsedExpression.$$intercepted || parsedExpression;
|
|
2216
|
-
var post = parsedExpression.$$interceptor ||
|
|
2215
|
+
var post = parsedExpression.$$interceptor || ((x) => x);
|
|
2217
2216
|
|
|
2218
2217
|
var useInputs = parsedExpression.inputs && !exp.inputs;
|
|
2219
2218
|
|
|
@@ -2476,7 +2475,7 @@ export function oneTimeWatchDelegate(
|
|
|
2476
2475
|
let lastValue;
|
|
2477
2476
|
|
|
2478
2477
|
const exp = parsedExpression.$$intercepted || parsedExpression;
|
|
2479
|
-
const post = parsedExpression.$$interceptor ||
|
|
2478
|
+
const post = parsedExpression.$$interceptor || ((x) => x);
|
|
2480
2479
|
|
|
2481
2480
|
const useInputs = parsedExpression.inputs && !exp.inputs;
|
|
2482
2481
|
|
package/src/filters/order-by.js
CHANGED
|
@@ -12,7 +12,7 @@ orderByFilter.$inject = ["$parse"];
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
|
-
* @param {angular.
|
|
15
|
+
* @param {angular.IParseService} $parse
|
|
16
16
|
* @returns
|
|
17
17
|
*/
|
|
18
18
|
export function orderByFilter($parse) {
|
|
@@ -90,12 +90,12 @@ export function orderByFilter($parse) {
|
|
|
90
90
|
predicate = predicate.substring(1);
|
|
91
91
|
}
|
|
92
92
|
if (predicate !== "") {
|
|
93
|
-
|
|
94
|
-
if (
|
|
95
|
-
const key =
|
|
96
|
-
get =
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
let parsed = $parse(predicate);
|
|
94
|
+
if (parsed.constant) {
|
|
95
|
+
const key = parsed();
|
|
96
|
+
get = (value) => value[key];
|
|
97
|
+
} else {
|
|
98
|
+
get = parsed;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -130,7 +130,7 @@ export function orderByFilter($parse) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
function getPredicateValue(value, index) {
|
|
133
|
-
let type = typeof value;
|
|
133
|
+
/** @type {String} */ let type = typeof value;
|
|
134
134
|
if (value === null) {
|
|
135
135
|
type = "null";
|
|
136
136
|
} else if (type === "object") {
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
forEach,
|
|
10
10
|
tail,
|
|
11
11
|
unnestR,
|
|
12
|
-
identity,
|
|
13
12
|
uniqR,
|
|
14
13
|
inArray,
|
|
15
14
|
removeFrom,
|
|
@@ -642,7 +641,7 @@ export let uiSrefActiveDirective = [
|
|
|
642
641
|
}
|
|
643
642
|
// Update route state
|
|
644
643
|
function update() {
|
|
645
|
-
const splitClasses = (str) => str.split(/\s/).filter(
|
|
644
|
+
const splitClasses = (str) => str.split(/\s/).filter(Boolean);
|
|
646
645
|
const getClasses = (stateList) =>
|
|
647
646
|
stateList
|
|
648
647
|
.map((x) => x.activeClass)
|
|
@@ -3,7 +3,7 @@ import { isDefined, isFunction, isString } from "../../shared/utils";
|
|
|
3
3
|
import { kebobString } from "../../shared/strings";
|
|
4
4
|
|
|
5
5
|
import { parse } from "../../shared/hof";
|
|
6
|
-
import { ResolveContext } from "../resolve/
|
|
6
|
+
import { ResolveContext } from "../resolve/resolve-context";
|
|
7
7
|
import { trace } from "../common/trace";
|
|
8
8
|
import { getLocals } from "../services";
|
|
9
9
|
import { Ng1ViewConfig } from "../state/views";
|
|
@@ -143,18 +143,10 @@ export let uiView = [
|
|
|
143
143
|
function getRenderer() {
|
|
144
144
|
return {
|
|
145
145
|
enter: function (element, target, cb) {
|
|
146
|
-
|
|
147
|
-
//$animate.enter(element, null, target).then(cb);
|
|
148
|
-
// } else {
|
|
149
|
-
$animate.enter(element, null, target, cb);
|
|
150
|
-
// }
|
|
146
|
+
$animate.enter(element, null, target).then(cb);
|
|
151
147
|
},
|
|
152
148
|
leave: function (element, cb) {
|
|
153
|
-
|
|
154
|
-
//$animate.leave(element).then(cb);
|
|
155
|
-
// } else {
|
|
156
|
-
$animate.leave(element, cb);
|
|
157
|
-
// }
|
|
149
|
+
$animate.leave(element).then(cb);
|
|
158
150
|
},
|
|
159
151
|
};
|
|
160
152
|
}
|
|
@@ -273,7 +265,7 @@ export let uiView = [
|
|
|
273
265
|
const cloned = $transclude(newScope, function (clone) {
|
|
274
266
|
clone.data("$uiViewAnim", $uiViewAnim);
|
|
275
267
|
clone.data("$uiView", $uiViewData);
|
|
276
|
-
renderer.enter(clone, $element, function
|
|
268
|
+
renderer.enter(clone, $element, function () {
|
|
277
269
|
animEnter.resolve();
|
|
278
270
|
if (currentScope)
|
|
279
271
|
currentScope.$emit("$viewContentAnimationEnded");
|
package/src/router/globals.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isString, isFunction } from "../../shared/utils";
|
|
2
2
|
import { services } from "../common/coreservices";
|
|
3
|
-
import { TargetState } from "../state/
|
|
3
|
+
import { TargetState } from "../state/target-state";
|
|
4
4
|
/**
|
|
5
5
|
* A [[TransitionHookFn]] that redirects to a different state or params
|
|
6
6
|
*
|
package/src/router/index.js
CHANGED
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
runBlock,
|
|
7
7
|
watchDigests,
|
|
8
8
|
} from "./services";
|
|
9
|
-
import { TemplateFactory } from "./
|
|
9
|
+
import { TemplateFactory } from "./template-factory";
|
|
10
10
|
import { trace } from "./common/trace";
|
|
11
|
-
import { $ViewScrollProvider } from "./
|
|
12
|
-
import { $IsStateFilter, $IncludedByStateFilter } from "./
|
|
11
|
+
import { $ViewScrollProvider } from "./view-scroll";
|
|
12
|
+
import { $IsStateFilter, $IncludedByStateFilter } from "./state-filters";
|
|
13
13
|
import {
|
|
14
14
|
uiSrefActiveDirective,
|
|
15
15
|
uiStateDirective,
|
|
16
16
|
uiSrefDirective,
|
|
17
|
-
} from "./directives/
|
|
18
|
-
import { uiView, $ViewDirectiveFill } from "./directives/
|
|
17
|
+
} from "./directives/state-directives";
|
|
18
|
+
import { uiView, $ViewDirectiveFill } from "./directives/view-directive";
|
|
19
19
|
|
|
20
20
|
export function initRouter() {
|
|
21
21
|
window.angular
|
|
@@ -28,9 +28,7 @@ export function initRouter() {
|
|
|
28
28
|
return router.urlMatcherFactory;
|
|
29
29
|
},
|
|
30
30
|
])
|
|
31
|
-
.provider("$templateFactory",
|
|
32
|
-
return new TemplateFactory();
|
|
33
|
-
})
|
|
31
|
+
.provider("$templateFactory", TemplateFactory)
|
|
34
32
|
.provider("$stateRegistry", getProviderFor("stateRegistry"))
|
|
35
33
|
.provider("$routerGlobals", getProviderFor("globals"))
|
|
36
34
|
.provider("$transitions", getProviderFor("transitionService"))
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fromJson,
|
|
3
3
|
toJson,
|
|
4
|
-
identity,
|
|
5
4
|
equals,
|
|
6
5
|
inherit,
|
|
7
6
|
map,
|
|
@@ -11,7 +10,7 @@ import { isNullOrUndefined } from "../../shared/predicates";
|
|
|
11
10
|
import { isDefined } from "../../shared/utils";
|
|
12
11
|
import { is } from "../../shared/hof";
|
|
13
12
|
import { services } from "../common/coreservices";
|
|
14
|
-
import { ParamType } from "./
|
|
13
|
+
import { ParamType } from "./param-type";
|
|
15
14
|
/**
|
|
16
15
|
* A registry for parameter types.
|
|
17
16
|
*
|
|
@@ -153,8 +152,8 @@ function initDefaultTypes() {
|
|
|
153
152
|
}),
|
|
154
153
|
// does not encode/decode
|
|
155
154
|
any: makeDefaultType({
|
|
156
|
-
encode:
|
|
157
|
-
decode:
|
|
155
|
+
encode: (x) => x,
|
|
156
|
+
decode: (x) => x,
|
|
158
157
|
is: () => true,
|
|
159
158
|
equals: equals,
|
|
160
159
|
}),
|
|
@@ -3,7 +3,7 @@ import { prop } from "../../shared/hof";
|
|
|
3
3
|
import { isInjectable } from "../../shared/predicates";
|
|
4
4
|
import { isDefined, isUndefined, isString } from "../../shared/utils";
|
|
5
5
|
import { services } from "../common/coreservices";
|
|
6
|
-
import { ParamType } from "./
|
|
6
|
+
import { ParamType } from "./param-type";
|
|
7
7
|
const hasOwn = Object.prototype.hasOwnProperty;
|
|
8
8
|
const isShorthand = (cfg) =>
|
|
9
9
|
["value", "type", "squash", "array", "dynamic"].filter(hasOwn.bind(cfg || {}))
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
arrayTuples,
|
|
10
10
|
} from "../../shared/common";
|
|
11
11
|
import { prop, propEq } from "../../shared/hof";
|
|
12
|
-
import { TargetState } from "../state/
|
|
13
|
-
import { PathNode } from "./
|
|
12
|
+
import { TargetState } from "../state/target-state";
|
|
13
|
+
import { PathNode } from "./path-node";
|
|
14
14
|
/**
|
|
15
15
|
* This class contains functions which convert TargetStates, Nodes and paths from one type to another.
|
|
16
16
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isFunction, isObject } from "../../shared/utils";
|
|
2
2
|
import { services } from "../common/coreservices";
|
|
3
3
|
import { trace } from "../common/trace";
|
|
4
4
|
import { stringify } from "../../shared/strings";
|
|
@@ -87,7 +87,7 @@ export class Resolvable {
|
|
|
87
87
|
const node = resolveContext.findNode(this);
|
|
88
88
|
const state = node && node.state;
|
|
89
89
|
const asyncPolicy = this.getPolicy(state).async;
|
|
90
|
-
const customAsyncPolicy = isFunction(asyncPolicy) ? asyncPolicy :
|
|
90
|
+
const customAsyncPolicy = isFunction(asyncPolicy) ? asyncPolicy : (x) => x;
|
|
91
91
|
// After the final value has been resolved, update the state of the Resolvable
|
|
92
92
|
const applyResolvedValue = (resolvedValue) => {
|
|
93
93
|
this.data = resolvedValue;
|
|
@@ -3,7 +3,7 @@ import { propEq, not } from "../../shared/hof";
|
|
|
3
3
|
import { trace } from "../common/trace";
|
|
4
4
|
import { services } from "../common/coreservices";
|
|
5
5
|
import { Resolvable } from "./resolvable";
|
|
6
|
-
import { PathUtils } from "../path/
|
|
6
|
+
import { PathUtils } from "../path/path-utils";
|
|
7
7
|
import { stringify } from "../../shared/strings";
|
|
8
8
|
import { isUndefined } from "../../shared/utils";
|
|
9
9
|
|
package/src/router/router.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { UrlMatcherFactory } from "./url/
|
|
2
|
-
import { UrlRouter } from "./url/
|
|
3
|
-
import { TransitionService } from "./transition/
|
|
1
|
+
import { UrlMatcherFactory } from "./url/url-matcher-factory";
|
|
2
|
+
import { UrlRouter } from "./url/url-router";
|
|
3
|
+
import { TransitionService } from "./transition/transition-service";
|
|
4
4
|
import { ViewService } from "./view/view";
|
|
5
|
-
import { StateRegistry } from "./state/
|
|
6
|
-
import { StateService } from "./state/
|
|
5
|
+
import { StateRegistry } from "./state/state-registry";
|
|
6
|
+
import { StateService } from "./state/state-service";
|
|
7
7
|
import { UIRouterGlobals } from "./globals";
|
|
8
8
|
import { removeFrom } from "../shared/common";
|
|
9
9
|
import { isFunction } from "../shared/utils";
|
|
10
|
-
import { UrlService } from "./url/
|
|
10
|
+
import { UrlService } from "./url/url-service";
|
|
11
11
|
import { trace } from "./common/trace";
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -26,11 +26,11 @@ export class UIRouter {
|
|
|
26
26
|
/**
|
|
27
27
|
* Creates a new `UIRouter` object
|
|
28
28
|
*
|
|
29
|
-
* @param {import('./
|
|
29
|
+
* @param {import('./location-services').Ng1LocationServices} locationService
|
|
30
30
|
*/
|
|
31
31
|
constructor(locationService) {
|
|
32
32
|
/**
|
|
33
|
-
* @type {import('./
|
|
33
|
+
* @type {import('./location-services').Ng1LocationServices}
|
|
34
34
|
*/
|
|
35
35
|
this.locationService = locationService;
|
|
36
36
|
/** @type {number} */ this.$id = routerId++;
|
package/src/router/services.js
CHANGED
|
@@ -15,9 +15,9 @@ import { trace } from "./common/trace";
|
|
|
15
15
|
import { UIRouter } from "./router";
|
|
16
16
|
import { ng1ViewsBuilder, getNg1ViewConfigFactory } from "./state/views";
|
|
17
17
|
|
|
18
|
-
import { StateProvider } from "./
|
|
19
|
-
import { Ng1LocationServices } from "./
|
|
20
|
-
import { ResolveContext } from "./resolve/
|
|
18
|
+
import { StateProvider } from "./state-provider";
|
|
19
|
+
import { Ng1LocationServices } from "./location-services";
|
|
20
|
+
import { ResolveContext } from "./resolve/resolve-context";
|
|
21
21
|
|
|
22
22
|
export let router = null;
|
|
23
23
|
$routerProvider.$inject = ["$locationProvider"];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applyPairs,
|
|
3
|
-
identity,
|
|
4
3
|
inherit,
|
|
5
4
|
mapObj,
|
|
6
5
|
omit,
|
|
@@ -201,12 +200,12 @@ export function resolvablesBuilder(state) {
|
|
|
201
200
|
],
|
|
202
201
|
[
|
|
203
202
|
prop("useExisting"),
|
|
204
|
-
(p) => new Resolvable(getToken(p),
|
|
203
|
+
(p) => new Resolvable(getToken(p), (x) => x, [p.useExisting], p.policy),
|
|
205
204
|
],
|
|
206
205
|
]);
|
|
207
206
|
// prettier-ignore
|
|
208
207
|
const tuple2Resolvable = pattern([
|
|
209
|
-
[pipe(prop('val'), isString), (tuple) => new Resolvable(tuple.token,
|
|
208
|
+
[pipe(prop('val'), isString), (tuple) => new Resolvable(tuple.token, ((x) => x), [tuple.val], tuple.policy)],
|
|
210
209
|
[pipe(prop('val'), Array.isArray), (tuple) => new Resolvable(tuple.token, tail(tuple.val), tuple.val.slice(0, -1), tuple.policy)],
|
|
211
210
|
[pipe(prop('val'), isFunction), (tuple) => new Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy)],
|
|
212
211
|
]);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { inArray } from "../../shared/common";
|
|
2
2
|
import { prop } from "../../shared/hof";
|
|
3
3
|
import { isString } from "../../shared/utils";
|
|
4
|
-
import { StateObject } from "./
|
|
4
|
+
import { StateObject } from "./state-object";
|
|
5
|
+
|
|
5
6
|
export class StateQueueManager {
|
|
6
7
|
constructor(router, states, builder, listeners) {
|
|
7
8
|
this.router = router;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { StateMatcher } from "./
|
|
2
|
-
import { StateBuilder } from "./
|
|
3
|
-
import { StateQueueManager } from "./
|
|
1
|
+
import { StateMatcher } from "./state-matcher";
|
|
2
|
+
import { StateBuilder } from "./state-builder";
|
|
3
|
+
import { StateQueueManager } from "./state-queue-manager";
|
|
4
4
|
import { removeFrom } from "../../shared/common";
|
|
5
5
|
import { propEq } from "../../shared/hof";
|
|
6
6
|
/**
|
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
import { isDefined, isObject, isString } from "../../shared/utils";
|
|
10
10
|
import { Queue } from "../common/queue";
|
|
11
11
|
import { services } from "../common/coreservices";
|
|
12
|
-
import { PathUtils } from "../path/
|
|
13
|
-
import { PathNode } from "../path/
|
|
14
|
-
import { defaultTransOpts } from "../transition/
|
|
15
|
-
import { Rejection, RejectType } from "../transition/
|
|
16
|
-
import { TargetState } from "./
|
|
12
|
+
import { PathUtils } from "../path/path-utils";
|
|
13
|
+
import { PathNode } from "../path/path-node";
|
|
14
|
+
import { defaultTransOpts } from "../transition/transition-service";
|
|
15
|
+
import { Rejection, RejectType } from "../transition/reject-factory";
|
|
16
|
+
import { TargetState } from "./target-state";
|
|
17
17
|
import { Param } from "../params/param";
|
|
18
18
|
import { Glob } from "../common/glob";
|
|
19
|
-
import { ResolveContext } from "../resolve/
|
|
20
|
-
import { lazyLoadState } from "../hooks/
|
|
19
|
+
import { ResolveContext } from "../resolve/resolve-context";
|
|
20
|
+
import { lazyLoadState } from "../hooks/lazy-load";
|
|
21
21
|
import { not, val } from "../../shared/hof";
|
|
22
22
|
/**
|
|
23
23
|
* Provides services related to ui-router states.
|
|
@@ -4,7 +4,7 @@ import { isInjectable } from "../../shared/predicates";
|
|
|
4
4
|
import { services } from "../common/coreservices";
|
|
5
5
|
import { trace } from "../common/trace";
|
|
6
6
|
import { ViewService } from "../view/view";
|
|
7
|
-
import { ResolveContext } from "../resolve/
|
|
7
|
+
import { ResolveContext } from "../resolve/resolve-context";
|
|
8
8
|
import { Resolvable } from "../resolve/resolvable";
|
|
9
9
|
|
|
10
10
|
export function getNg1ViewConfigFactory() {
|
|
@@ -5,14 +5,20 @@ import { createProxyFunctions } from "../shared/common";
|
|
|
5
5
|
import { minErr } from "../shared/utils";
|
|
6
6
|
|
|
7
7
|
const err = minErr("$stateProvider");
|
|
8
|
+
// Right now this is a collection of all the properties we encounter in tests
|
|
8
9
|
const validKeys = [
|
|
9
10
|
"$$state",
|
|
10
11
|
"__stateObjectCache",
|
|
12
|
+
"abstract",
|
|
13
|
+
"bindings",
|
|
11
14
|
"controller",
|
|
15
|
+
"controllerAs",
|
|
12
16
|
"controllerProvider",
|
|
13
17
|
"component",
|
|
18
|
+
"componentProvider",
|
|
14
19
|
"data",
|
|
15
20
|
"includes",
|
|
21
|
+
"lazyLoad",
|
|
16
22
|
"name",
|
|
17
23
|
"navigable",
|
|
18
24
|
"onEnter",
|
|
@@ -21,8 +27,10 @@ const validKeys = [
|
|
|
21
27
|
"params",
|
|
22
28
|
"parent",
|
|
23
29
|
"path",
|
|
30
|
+
"redirectTo",
|
|
24
31
|
"reloadOnSearch",
|
|
25
32
|
"resolve",
|
|
33
|
+
"resolveAs",
|
|
26
34
|
"resolvables",
|
|
27
35
|
"self",
|
|
28
36
|
"template",
|