@angular-wave/angular.ts 0.0.14 → 0.0.15
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/package.json +1 -1
- package/src/exts/messages.md +30 -30
- package/src/router/adapter/directives/stateDirectives.js +3 -4
- package/src/router/adapter/directives/viewDirective.js +2 -2
- package/src/router/adapter/services.js +4 -2
- package/src/router/adapter/statebuilders/onEnterExitRetain.js +1 -2
- package/src/router/adapter/statebuilders/views.js +4 -5
- package/src/router/core/common/common.js +10 -22
- package/src/router/core/params/param.js +5 -5
- package/src/router/core/params/paramType.js +3 -3
- package/src/router/core/params/paramTypes.js +6 -7
- package/src/router/core/params/stateParams.js +3 -3
- package/src/router/core/path/pathNode.js +2 -2
- package/src/router/core/path/pathUtils.js +4 -5
- package/src/router/core/resolve/resolvable.js +2 -2
- package/src/router/core/state/stateBuilder.js +1 -2
- package/src/router/core/state/stateService.js +2 -3
- package/src/router/core/state/targetState.js +8 -5
- package/src/router/core/transition/hookBuilder.js +2 -2
- package/src/router/core/transition/hookRegistry.js +2 -2
- package/src/router/core/transition/rejectFactory.js +2 -3
- package/src/router/core/transition/transition.js +5 -3
- package/src/router/core/url/urlMatcherFactory.js +2 -8
- package/src/router/core/url/urlRule.js +7 -4
- package/src/router/core/url/urlService.js +2 -2
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
extend,
|
|
3
|
-
forEach,
|
|
4
|
-
isDefined,
|
|
5
|
-
isFunction,
|
|
6
|
-
isObject,
|
|
7
|
-
} from "../../../core/utils";
|
|
1
|
+
import { forEach, isDefined, isFunction, isObject } from "../../../core/utils";
|
|
8
2
|
import { UrlMatcher } from "./urlMatcher";
|
|
9
3
|
import { DefType, Param } from "../params/param";
|
|
10
4
|
|
|
@@ -93,7 +87,7 @@ export class UrlMatcherFactory {
|
|
|
93
87
|
pattern,
|
|
94
88
|
urlConfig.paramTypes,
|
|
95
89
|
this.paramFactory,
|
|
96
|
-
|
|
90
|
+
Object.assign(globalConfig, config),
|
|
97
91
|
);
|
|
98
92
|
}
|
|
99
93
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UrlMatcher } from "./urlMatcher";
|
|
2
2
|
import { isString, isDefined, isFunction } from "../common/predicates";
|
|
3
|
-
import { identity
|
|
3
|
+
import { identity } from "../common/common";
|
|
4
4
|
import { is, or, pattern } from "../common/hof";
|
|
5
5
|
import { StateObject } from "../state/stateObject";
|
|
6
6
|
/**
|
|
@@ -95,7 +95,7 @@ export class UrlRuleFactory {
|
|
|
95
95
|
return matched.length / optional.length;
|
|
96
96
|
}
|
|
97
97
|
const details = { urlMatcher, matchPriority, type: "URLMATCHER" };
|
|
98
|
-
return
|
|
98
|
+
return Object.assign(new BaseUrlRule(matchUrlParamters, _handler), details);
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
101
|
* A UrlRule which matches a state by its url
|
|
@@ -130,7 +130,7 @@ export class UrlRuleFactory {
|
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
132
|
const details = { state, type: "STATE" };
|
|
133
|
-
return
|
|
133
|
+
return Object.assign(this.fromUrlMatcher(state.url, handler), details);
|
|
134
134
|
}
|
|
135
135
|
/**
|
|
136
136
|
* A UrlRule which matches based on a regular expression
|
|
@@ -181,7 +181,10 @@ export class UrlRuleFactory {
|
|
|
181
181
|
const _handler = isString(handler) ? redirectUrlTo : handler;
|
|
182
182
|
const matchParamsFromRegexp = (url) => regexp.exec(url.path);
|
|
183
183
|
const details = { regexp, type: "REGEXP" };
|
|
184
|
-
return
|
|
184
|
+
return Object.assign(
|
|
185
|
+
new BaseUrlRule(matchParamsFromRegexp, _handler),
|
|
186
|
+
details,
|
|
187
|
+
);
|
|
185
188
|
}
|
|
186
189
|
}
|
|
187
190
|
UrlRuleFactory.isUrlRule = (obj) =>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isString } from "../../../core/utils";
|
|
2
2
|
import { is, pattern } from "../common/hof";
|
|
3
3
|
import { UrlRules } from "./urlRules";
|
|
4
4
|
import { UrlConfig } from "./urlConfig";
|
|
@@ -243,7 +243,7 @@ export class UrlService {
|
|
|
243
243
|
* Return the result as a [[MatchResult]].
|
|
244
244
|
*/
|
|
245
245
|
match(url) {
|
|
246
|
-
url =
|
|
246
|
+
url = Object.assign({ path: "", search: {}, hash: "" }, url);
|
|
247
247
|
const rules = this.rules.rules();
|
|
248
248
|
// Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined
|
|
249
249
|
const checkRule = (rule) => {
|