@angular-wave/angular.ts 0.8.0 → 0.8.1
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/@types/angular.d.ts +3 -3
- package/@types/core/di/ng-module.d.ts +61 -25
- package/@types/interface.d.ts +1 -1
- package/@types/router/directives/state-directives.d.ts +2 -2
- package/@types/router/directives/view-directive.d.ts +1 -1
- package/@types/router/params/param-type.d.ts +0 -1
- package/@types/router/{globals.d.ts → router.d.ts} +1 -1
- package/@types/router/state/state-registry.d.ts +2 -2
- package/@types/router/state/state-service.d.ts +6 -9
- package/@types/router/transition/transition-service.d.ts +3 -3
- package/@types/router/transition/transition.d.ts +4 -4
- package/@types/router/url/url-matcher.d.ts +0 -1
- package/@types/router/url/url-rule.d.ts +13 -4
- package/@types/router/url/url-service.d.ts +2 -2
- package/@types/shared/hof.d.ts +0 -6
- package/CHANGELOG.md +0 -72
- package/CONTRIBUTING.md +0 -1
- package/DEVELOPERS.md +0 -1
- package/TRIAGING.md +0 -1
- package/dist/angular-ts.esm.js +102 -102
- package/dist/angular-ts.umd.js +102 -102
- package/dist/angular-ts.umd.min.js +1 -1
- package/docs/layouts/shortcodes/version.html +1 -1
- package/docs/static/typedoc/assets/hierarchy.js +1 -1
- package/docs/static/typedoc/assets/navigation.js +1 -1
- package/docs/static/typedoc/assets/search.js +1 -1
- package/docs/static/typedoc/classes/NgModule.html +3 -3
- package/docs/static/typedoc/types/Injectable.html +4 -1
- package/docs/static/typedoc/types/InjectableFactory.html +1 -4
- package/package.json +2 -2
- package/src/angular.js +10 -10
- package/src/core/di/ng-module.js +26 -21
- package/src/core/parse/parse.spec.js +29 -30
- package/src/directive/events/event.spec.js +5 -5
- package/src/directive/messages/messages.md +0 -4
- package/src/directive/repeat/repeat.js +1 -1
- package/src/injection-tokens.js +2 -2
- package/src/interface.ts +1 -2
- package/src/ng.js +5 -5
- package/src/ng.spec.js +1 -1
- package/src/router/directives/state-directives.js +5 -5
- package/src/router/directives/state-directives.spec.js +2 -2
- package/src/router/directives/view-directive.js +5 -5
- package/src/router/directives/view-directive.spec.js +20 -20
- package/src/router/params/param-type.js +0 -1
- package/src/router/params/param.js +1 -1
- package/src/router/{globals.js → router.js} +1 -1
- package/src/router/services.spec.js +3 -3
- package/src/router/state/state-registry.js +2 -2
- package/src/router/state/state-service.js +5 -8
- package/src/router/template-factory.spec.js +6 -6
- package/src/router/transition/transition-service.js +2 -2
- package/src/router/transition/transition.js +2 -2
- package/src/router/url/url-matcher.js +9 -11
- package/src/router/url/url-rule.js +7 -2
- package/src/router/url/url-service.js +6 -3
- package/src/router/url/url-service.spec.js +6 -39
- package/src/router/view-scroll.js +3 -1
- package/src/router/view-scroll.spec.js +11 -11
- package/src/services/location/location.js +9 -2
- package/src/services/location/location.spec.js +6 -0
- package/src/shared/common.js +5 -5
- package/src/shared/hof.js +0 -14
package/dist/angular-ts.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Version: 0.8.
|
|
1
|
+
/* Version: 0.8.1 - August 7, 2025 18:30:07 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -1816,11 +1816,11 @@
|
|
|
1816
1816
|
$interpolate: "$interpolate",
|
|
1817
1817
|
$location: "$location",
|
|
1818
1818
|
$log: "$log",
|
|
1819
|
-
$
|
|
1819
|
+
$viewScroll: "$viewScroll",
|
|
1820
1820
|
$parse: "$parse",
|
|
1821
1821
|
$rootScope: "$rootScope",
|
|
1822
1822
|
$rootElement: "$rootElement",
|
|
1823
|
-
$
|
|
1823
|
+
$router: "$router",
|
|
1824
1824
|
$sce: "$sce",
|
|
1825
1825
|
$sceDelegate: "$sceDelegate",
|
|
1826
1826
|
$state: "$state",
|
|
@@ -1874,7 +1874,7 @@
|
|
|
1874
1874
|
/**
|
|
1875
1875
|
* @param {string} name - Name of the module
|
|
1876
1876
|
* @param {Array<string>} requires - List of modules which the injector will load before the current module
|
|
1877
|
-
* @param {
|
|
1877
|
+
* @param {import("../../interface.js").Injectable} [configFn]
|
|
1878
1878
|
*/
|
|
1879
1879
|
constructor(name, requires, configFn) {
|
|
1880
1880
|
assert(isString(name), "name required");
|
|
@@ -1900,7 +1900,7 @@
|
|
|
1900
1900
|
/** @type {!Array<Array<*>>} */
|
|
1901
1901
|
this.configBlocks = [];
|
|
1902
1902
|
|
|
1903
|
-
/** @type {!Array.<
|
|
1903
|
+
/** @type {!Array.<import("../../interface.js").Injectable>} */
|
|
1904
1904
|
this.runBlocks = [];
|
|
1905
1905
|
|
|
1906
1906
|
if (configFn) {
|
|
@@ -1930,7 +1930,7 @@
|
|
|
1930
1930
|
|
|
1931
1931
|
/**
|
|
1932
1932
|
*
|
|
1933
|
-
* @param {
|
|
1933
|
+
* @param {import("../../interface.js").Injectable} configFn
|
|
1934
1934
|
* @returns {NgModule}
|
|
1935
1935
|
*/
|
|
1936
1936
|
config(configFn) {
|
|
@@ -1939,7 +1939,7 @@
|
|
|
1939
1939
|
}
|
|
1940
1940
|
|
|
1941
1941
|
/**
|
|
1942
|
-
* @param {
|
|
1942
|
+
* @param {import("../../interface.js").Injectable} block
|
|
1943
1943
|
* @returns {NgModule}
|
|
1944
1944
|
*/
|
|
1945
1945
|
run(block) {
|
|
@@ -1949,12 +1949,12 @@
|
|
|
1949
1949
|
|
|
1950
1950
|
/**
|
|
1951
1951
|
* @param {string} name
|
|
1952
|
-
* @param {
|
|
1952
|
+
* @param {import("../../interface.js").Injectable} options
|
|
1953
1953
|
* @returns {NgModule}
|
|
1954
1954
|
*/
|
|
1955
1955
|
component(name, options) {
|
|
1956
1956
|
if (options && isFunction(options)) {
|
|
1957
|
-
options
|
|
1957
|
+
options["$$moduleName"] = name;
|
|
1958
1958
|
}
|
|
1959
1959
|
this.invokeQueue.push([COMPILE_LITERAL, "component", [name, options]]);
|
|
1960
1960
|
return this;
|
|
@@ -1962,12 +1962,12 @@
|
|
|
1962
1962
|
|
|
1963
1963
|
/**
|
|
1964
1964
|
* @param {string} name
|
|
1965
|
-
* @param {
|
|
1965
|
+
* @param {import("../../interface.js").Injectable} providerFunction
|
|
1966
1966
|
* @returns {NgModule}
|
|
1967
1967
|
*/
|
|
1968
1968
|
factory(name, providerFunction) {
|
|
1969
1969
|
if (providerFunction && isFunction(providerFunction)) {
|
|
1970
|
-
providerFunction
|
|
1970
|
+
providerFunction["$$moduleName"] = name;
|
|
1971
1971
|
}
|
|
1972
1972
|
this.invokeQueue.push([$injectTokens.$provide, "factory", [name, providerFunction]]);
|
|
1973
1973
|
return this;
|
|
@@ -1975,12 +1975,12 @@
|
|
|
1975
1975
|
|
|
1976
1976
|
/**
|
|
1977
1977
|
* @param {string} name
|
|
1978
|
-
* @param {
|
|
1978
|
+
* @param {import("../../interface.js").Injectable} serviceFunction
|
|
1979
1979
|
* @returns {NgModule}
|
|
1980
1980
|
*/
|
|
1981
1981
|
service(name, serviceFunction) {
|
|
1982
1982
|
if (serviceFunction && isFunction(serviceFunction)) {
|
|
1983
|
-
serviceFunction
|
|
1983
|
+
serviceFunction["$$moduleName"] = name;
|
|
1984
1984
|
}
|
|
1985
1985
|
this.invokeQueue.push([$injectTokens.$provide, "service", [name, serviceFunction]]);
|
|
1986
1986
|
return this;
|
|
@@ -1988,12 +1988,12 @@
|
|
|
1988
1988
|
|
|
1989
1989
|
/**
|
|
1990
1990
|
* @param {string} name
|
|
1991
|
-
* @param {
|
|
1991
|
+
* @param {import("../../interface.js").Injectable} providerType
|
|
1992
1992
|
* @returns {NgModule}
|
|
1993
1993
|
*/
|
|
1994
1994
|
provider(name, providerType) {
|
|
1995
1995
|
if (providerType && isFunction(providerType)) {
|
|
1996
|
-
providerType
|
|
1996
|
+
providerType["$$moduleName"] = name;
|
|
1997
1997
|
}
|
|
1998
1998
|
this.invokeQueue.push([$injectTokens.$provide, "provider", [name, providerType]]);
|
|
1999
1999
|
return this;
|
|
@@ -2001,12 +2001,12 @@
|
|
|
2001
2001
|
|
|
2002
2002
|
/**
|
|
2003
2003
|
* @param {string} name
|
|
2004
|
-
* @param {
|
|
2004
|
+
* @param {import("../../interface.js").Injectable} decorFn
|
|
2005
2005
|
* @returns {NgModule}
|
|
2006
2006
|
*/
|
|
2007
2007
|
decorator(name, decorFn) {
|
|
2008
2008
|
if (decorFn && isFunction(decorFn)) {
|
|
2009
|
-
decorFn
|
|
2009
|
+
decorFn["$$moduleName"] = name;
|
|
2010
2010
|
}
|
|
2011
2011
|
this.configBlocks.push([$injectTokens.$provide, "decorator", [name, decorFn]]);
|
|
2012
2012
|
return this;
|
|
@@ -2014,12 +2014,12 @@
|
|
|
2014
2014
|
|
|
2015
2015
|
/**
|
|
2016
2016
|
* @param {string} name
|
|
2017
|
-
* @param {
|
|
2017
|
+
* @param {import("../../interface.js").Injectable} directiveFactory
|
|
2018
2018
|
* @returns {NgModule}
|
|
2019
2019
|
*/
|
|
2020
2020
|
directive(name, directiveFactory) {
|
|
2021
2021
|
if (directiveFactory && isFunction(directiveFactory)) {
|
|
2022
|
-
directiveFactory
|
|
2022
|
+
directiveFactory["$$moduleName"] = name;
|
|
2023
2023
|
}
|
|
2024
2024
|
this.invokeQueue.push([
|
|
2025
2025
|
COMPILE_LITERAL,
|
|
@@ -2031,12 +2031,12 @@
|
|
|
2031
2031
|
|
|
2032
2032
|
/**
|
|
2033
2033
|
* @param {string} name
|
|
2034
|
-
* @param {
|
|
2034
|
+
* @param {import("../../interface.js").Injectable} animationFactory
|
|
2035
2035
|
* @returns {NgModule}
|
|
2036
2036
|
*/
|
|
2037
2037
|
animation(name, animationFactory) {
|
|
2038
2038
|
if (animationFactory && isFunction(animationFactory)) {
|
|
2039
|
-
animationFactory
|
|
2039
|
+
animationFactory["$$moduleName"] = name;
|
|
2040
2040
|
}
|
|
2041
2041
|
this.invokeQueue.push([
|
|
2042
2042
|
ANIMATION_LITERAL,
|
|
@@ -2046,9 +2046,14 @@
|
|
|
2046
2046
|
return this;
|
|
2047
2047
|
}
|
|
2048
2048
|
|
|
2049
|
+
/**
|
|
2050
|
+
* @param {string} name
|
|
2051
|
+
* @param {import("../../interface.js").Injectable} filterFn
|
|
2052
|
+
* @return {NgModule}
|
|
2053
|
+
*/
|
|
2049
2054
|
filter(name, filterFn) {
|
|
2050
2055
|
if (filterFn && isFunction(filterFn)) {
|
|
2051
|
-
filterFn
|
|
2056
|
+
filterFn["$$moduleName"] = name;
|
|
2052
2057
|
}
|
|
2053
2058
|
this.invokeQueue.push([FILTER_LITERAL, "register", [name, filterFn]]);
|
|
2054
2059
|
return this;
|
|
@@ -2056,12 +2061,12 @@
|
|
|
2056
2061
|
|
|
2057
2062
|
/**
|
|
2058
2063
|
* @param {string} name
|
|
2059
|
-
* @param {
|
|
2064
|
+
* @param {import("../../interface.js").Injectable} ctlFn
|
|
2060
2065
|
* @returns {NgModule}
|
|
2061
2066
|
*/
|
|
2062
2067
|
controller(name, ctlFn) {
|
|
2063
2068
|
if (ctlFn && isFunction(ctlFn)) {
|
|
2064
|
-
ctlFn
|
|
2069
|
+
ctlFn["$$moduleName"] = name;
|
|
2065
2070
|
}
|
|
2066
2071
|
this.invokeQueue.push([CONTROLLER_LITERAL, "register", [name, ctlFn]]);
|
|
2067
2072
|
return this;
|
|
@@ -11972,7 +11977,7 @@
|
|
|
11972
11977
|
transclude: "element",
|
|
11973
11978
|
priority: 1000,
|
|
11974
11979
|
terminal: true,
|
|
11975
|
-
compile: ($element, $attr) => {
|
|
11980
|
+
compile: (_$element, $attr) => {
|
|
11976
11981
|
const expression = $attr["ngRepeat"];
|
|
11977
11982
|
const hasAnimate = !!$attr["animate"];
|
|
11978
11983
|
|
|
@@ -19088,8 +19093,15 @@
|
|
|
19088
19093
|
*/
|
|
19089
19094
|
setUrl(url) {
|
|
19090
19095
|
const match = PATH_MATCH.exec(url);
|
|
19091
|
-
|
|
19092
|
-
if (match[
|
|
19096
|
+
|
|
19097
|
+
if (match[1] !== undefined || url === "") {
|
|
19098
|
+
this.setPath(match[1] || "");
|
|
19099
|
+
}
|
|
19100
|
+
|
|
19101
|
+
if (match[2] !== undefined || match[1] !== undefined || url === "") {
|
|
19102
|
+
this.setSearch(match[3] || "");
|
|
19103
|
+
}
|
|
19104
|
+
|
|
19093
19105
|
this.setHash(match[5] || "");
|
|
19094
19106
|
|
|
19095
19107
|
return this;
|
|
@@ -25501,20 +25513,6 @@
|
|
|
25501
25513
|
name.split(".").map((name) => (obj) => obj && obj[name]),
|
|
25502
25514
|
);
|
|
25503
25515
|
|
|
25504
|
-
/**
|
|
25505
|
-
* Given two functions that return truthy or falsey values, returns a function that returns truthy
|
|
25506
|
-
* if at least one of the functions returns truthy for the given arguments
|
|
25507
|
-
*/
|
|
25508
|
-
function or(fn1, fn2) {
|
|
25509
|
-
return (...args) => fn1.apply(null, args) || fn2.apply(null, args);
|
|
25510
|
-
}
|
|
25511
|
-
/**
|
|
25512
|
-
* Check if all the elements of an array match a predicate function
|
|
25513
|
-
*
|
|
25514
|
-
* @param fn1 a predicate function `fn1`
|
|
25515
|
-
* @returns a function which takes an array and returns true if `fn1` is true for all elements of the array
|
|
25516
|
-
*/
|
|
25517
|
-
const all = (fn1) => (arr) => arr.reduce((b, x) => b && !!fn1(x), true);
|
|
25518
25516
|
/** Given a class, returns a Predicate function that returns true if the object is of that class */
|
|
25519
25517
|
const is = (ctor) => (obj) =>
|
|
25520
25518
|
(obj != null && obj.constructor === ctor) || obj instanceof ctor;
|
|
@@ -25577,10 +25575,10 @@
|
|
|
25577
25575
|
t2 = typeof o2;
|
|
25578
25576
|
if (t1 !== t2 || t1 !== "object") return false;
|
|
25579
25577
|
const tup = [o1, o2];
|
|
25580
|
-
if (
|
|
25581
|
-
if (
|
|
25582
|
-
if (
|
|
25583
|
-
if (
|
|
25578
|
+
if (tup.every(Array.isArray)) return _arraysEq(o1, o2);
|
|
25579
|
+
if (tup.every(isDate)) return o1.getTime() === o2.getTime();
|
|
25580
|
+
if (tup.every(isRegExp)) return o1.toString() === o2.toString();
|
|
25581
|
+
if (tup.every(isFunction)) return true; // meh
|
|
25584
25582
|
if ([isFunction, Array.isArray, isDate, isRegExp].some((fn) => !!fn(tup))) {
|
|
25585
25583
|
return false;
|
|
25586
25584
|
}
|
|
@@ -26022,7 +26020,6 @@
|
|
|
26022
26020
|
/**
|
|
26023
26021
|
* @param def A configuration object which contains the custom type definition. The object's
|
|
26024
26022
|
* properties will override the default methods and/or pattern in `ParamType`'s public interface.
|
|
26025
|
-
* @returns a new ParamType object
|
|
26026
26023
|
*/
|
|
26027
26024
|
constructor(def) {
|
|
26028
26025
|
this.pattern = /.*/;
|
|
@@ -26581,7 +26578,7 @@
|
|
|
26581
26578
|
* This is where we hold the global mutable state such as current state, current
|
|
26582
26579
|
* params, current transition, etc.
|
|
26583
26580
|
*/
|
|
26584
|
-
class
|
|
26581
|
+
class Router {
|
|
26585
26582
|
constructor() {
|
|
26586
26583
|
/**
|
|
26587
26584
|
* Current parameter values
|
|
@@ -27475,7 +27472,7 @@
|
|
|
27475
27472
|
const normalized = this.type.$normalize(value);
|
|
27476
27473
|
if (!this.type.is(normalized)) return false;
|
|
27477
27474
|
// The value was of the correct type, but when encoded, did not match the ParamType's regexp
|
|
27478
|
-
const encoded = this.type.encode(normalized);
|
|
27475
|
+
const encoded = normalized; // this.type.encode(normalized);
|
|
27479
27476
|
return !(isString(encoded) && !this.type.pattern.exec(encoded));
|
|
27480
27477
|
}
|
|
27481
27478
|
toString() {
|
|
@@ -29562,11 +29559,11 @@
|
|
|
29562
29559
|
* encapsulates the "from state".
|
|
29563
29560
|
* @param {import('../state/target-state.js').TargetState} targetState The target state and parameters being transitioned to (also, the transition options)
|
|
29564
29561
|
* @param {import('../transition/transition-service.js').TransitionProvider} transitionService The [[TransitionService]] instance
|
|
29565
|
-
* @param {import('../
|
|
29562
|
+
* @param {import('../router.js').Router} globals
|
|
29566
29563
|
*/
|
|
29567
29564
|
constructor(fromPath, targetState, transitionService, globals) {
|
|
29568
29565
|
/**
|
|
29569
|
-
* @type {import('../
|
|
29566
|
+
* @type {import('../router.js').Router}
|
|
29570
29567
|
*/
|
|
29571
29568
|
this.globals = globals;
|
|
29572
29569
|
this.transitionService = transitionService;
|
|
@@ -30746,10 +30743,10 @@
|
|
|
30746
30743
|
* This API is located at `router.transitionService` ([[UIRouter.transitionService]])
|
|
30747
30744
|
*/
|
|
30748
30745
|
class TransitionProvider {
|
|
30749
|
-
/* @ignore */ static $inject = provider([$injectTokens.$
|
|
30746
|
+
/* @ignore */ static $inject = provider([$injectTokens.$router, $injectTokens.$view]);
|
|
30750
30747
|
|
|
30751
30748
|
/**
|
|
30752
|
-
* @param {import('../
|
|
30749
|
+
* @param {import('../router.js').Router} globals
|
|
30753
30750
|
* @param viewService
|
|
30754
30751
|
*/
|
|
30755
30752
|
constructor(globals, viewService) {
|
|
@@ -30996,7 +30993,7 @@
|
|
|
30996
30993
|
/**
|
|
30997
30994
|
* The latest successful state parameters
|
|
30998
30995
|
*
|
|
30999
|
-
* @deprecated This is a passthrough through to [[
|
|
30996
|
+
* @deprecated This is a passthrough through to [[Router.params]]
|
|
31000
30997
|
*/
|
|
31001
30998
|
get params() {
|
|
31002
30999
|
return this.globals.params;
|
|
@@ -31004,7 +31001,7 @@
|
|
|
31004
31001
|
/**
|
|
31005
31002
|
* The current [[StateDeclaration]]
|
|
31006
31003
|
*
|
|
31007
|
-
* @deprecated This is a passthrough through to [[
|
|
31004
|
+
* @deprecated This is a passthrough through to [[Router.current]]
|
|
31008
31005
|
*/
|
|
31009
31006
|
get current() {
|
|
31010
31007
|
return this.globals.current;
|
|
@@ -31012,21 +31009,18 @@
|
|
|
31012
31009
|
/**
|
|
31013
31010
|
* The current [[StateObject]] (an internal API)
|
|
31014
31011
|
*
|
|
31015
|
-
* @deprecated This is a passthrough through to [[
|
|
31012
|
+
* @deprecated This is a passthrough through to [[Router.$current]]
|
|
31016
31013
|
*/
|
|
31017
31014
|
get $current() {
|
|
31018
31015
|
return this.globals.$current;
|
|
31019
31016
|
}
|
|
31020
31017
|
|
|
31021
|
-
/* @ignore */ static $inject = [
|
|
31022
|
-
"$routerGlobalsProvider",
|
|
31023
|
-
"$transitionsProvider",
|
|
31024
|
-
];
|
|
31018
|
+
/* @ignore */ static $inject = ["$routerProvider", "$transitionsProvider"];
|
|
31025
31019
|
|
|
31026
31020
|
// Needs access to urlService, stateRegistry
|
|
31027
31021
|
/**
|
|
31028
31022
|
*
|
|
31029
|
-
* @param {import('../
|
|
31023
|
+
* @param {import('../router.js').Router} globals
|
|
31030
31024
|
* @param {*} transitionService
|
|
31031
31025
|
*/
|
|
31032
31026
|
constructor(globals, transitionService) {
|
|
@@ -31677,7 +31671,7 @@
|
|
|
31677
31671
|
}
|
|
31678
31672
|
|
|
31679
31673
|
$get = [
|
|
31680
|
-
|
|
31674
|
+
$injectTokens.$anchorScroll,
|
|
31681
31675
|
/**
|
|
31682
31676
|
* @param {import('../services/anchor-scroll.js').AnchorScrollObject} $anchorScroll
|
|
31683
31677
|
* @returns {import('../services/anchor-scroll.js').AnchorScrollObject|Function}
|
|
@@ -32020,13 +32014,6 @@
|
|
|
32020
32014
|
*
|
|
32021
32015
|
*/
|
|
32022
32016
|
class UrlMatcher {
|
|
32023
|
-
static encodeDashes(str) {
|
|
32024
|
-
// Replace dashes with encoded "\-"
|
|
32025
|
-
return encodeURIComponent(str).replace(
|
|
32026
|
-
/-/g,
|
|
32027
|
-
(c) => `%5C%${c.charCodeAt(0).toString(16).toUpperCase()}`,
|
|
32028
|
-
);
|
|
32029
|
-
}
|
|
32030
32017
|
/** @internal Given a matcher, return an array with the matcher's path segments and path params, in order */
|
|
32031
32018
|
static pathSegmentsAndParams(matcher) {
|
|
32032
32019
|
const staticSegments = matcher._segments;
|
|
@@ -32237,9 +32224,6 @@
|
|
|
32237
32224
|
return this.pattern;
|
|
32238
32225
|
}
|
|
32239
32226
|
_getDecodedParamValue(value, param) {
|
|
32240
|
-
if (isDefined(value)) {
|
|
32241
|
-
value = param.type.decode(value);
|
|
32242
|
-
}
|
|
32243
32227
|
return param.value(value);
|
|
32244
32228
|
}
|
|
32245
32229
|
/**
|
|
@@ -32430,7 +32414,7 @@
|
|
|
32430
32414
|
if (encoded == null) return acc;
|
|
32431
32415
|
// If this parameter value is an array, encode the value using encodeDashes
|
|
32432
32416
|
if (Array.isArray(encoded))
|
|
32433
|
-
return acc + map(encoded,
|
|
32417
|
+
return acc + map(encoded, encodeDashes).join("-");
|
|
32434
32418
|
// If the parameter type is "raw", then do not encodeURIComponent
|
|
32435
32419
|
if (param.raw) return acc + encoded;
|
|
32436
32420
|
// Encode the value
|
|
@@ -32460,6 +32444,14 @@
|
|
|
32460
32444
|
|
|
32461
32445
|
UrlMatcher.nameValidator = /^\w+([-.]+\w+)*(?:\[\])?$/;
|
|
32462
32446
|
|
|
32447
|
+
function encodeDashes(str) {
|
|
32448
|
+
// Replace dashes with encoded "\-"
|
|
32449
|
+
return encodeURIComponent(str).replace(
|
|
32450
|
+
/-/g,
|
|
32451
|
+
(c) => `%5C%${c.charCodeAt(0).toString(16).toUpperCase()}`,
|
|
32452
|
+
);
|
|
32453
|
+
}
|
|
32454
|
+
|
|
32463
32455
|
/** @typedef {import('./interface.js').StateDeclaration} StateDeclaration */
|
|
32464
32456
|
|
|
32465
32457
|
/**
|
|
@@ -32585,6 +32577,11 @@
|
|
|
32585
32577
|
* - [[StateObject]]
|
|
32586
32578
|
*/
|
|
32587
32579
|
class UrlRuleFactory {
|
|
32580
|
+
/**
|
|
32581
|
+
* @param {import('../url/url-service.js').UrlService} urlService
|
|
32582
|
+
* @param {import('../state/state-service.js').StateProvider} stateService
|
|
32583
|
+
* @param {import('../router.js').Router} routerGlobals
|
|
32584
|
+
*/
|
|
32588
32585
|
constructor(urlService, stateService, routerGlobals) {
|
|
32589
32586
|
this.urlService = urlService;
|
|
32590
32587
|
this.stateService = stateService;
|
|
@@ -32603,7 +32600,7 @@
|
|
|
32603
32600
|
[isString, (_what) => makeRule(this.urlService.compile(_what))],
|
|
32604
32601
|
[is(UrlMatcher), (_what) => this.fromUrlMatcher(_what, handler)],
|
|
32605
32602
|
[
|
|
32606
|
-
|
|
32603
|
+
(...args) => isState(...args) || isStateDeclaration(...args),
|
|
32607
32604
|
(_what) => this.fromState(_what, this.stateService, this.routerGlobals),
|
|
32608
32605
|
],
|
|
32609
32606
|
[is(RegExp), (_what) => this.fromRegExp(_what, handler)],
|
|
@@ -33164,7 +33161,7 @@
|
|
|
33164
33161
|
static $inject = provider([
|
|
33165
33162
|
$injectTokens.$location,
|
|
33166
33163
|
$injectTokens.$state,
|
|
33167
|
-
$injectTokens.$
|
|
33164
|
+
$injectTokens.$router,
|
|
33168
33165
|
$injectTokens.$urlConfig,
|
|
33169
33166
|
]);
|
|
33170
33167
|
|
|
@@ -33174,7 +33171,7 @@
|
|
|
33174
33171
|
/**
|
|
33175
33172
|
* @param {import("../../services/location/location").LocationProvider} $locationProvider
|
|
33176
33173
|
* @param {import("../../router/state/state-service.js").StateProvider} stateService
|
|
33177
|
-
* @param {import("
|
|
33174
|
+
* @param {import("../router.js").Router} globals
|
|
33178
33175
|
* @param {import("../../router/url/url-config.js").UrlConfigProvider} urlConfigProvider
|
|
33179
33176
|
*/
|
|
33180
33177
|
constructor($locationProvider, stateService, globals, urlConfigProvider) {
|
|
@@ -33317,7 +33314,10 @@
|
|
|
33317
33314
|
* @return the url (after potentially being processed)
|
|
33318
33315
|
*/
|
|
33319
33316
|
url(newUrl, state) {
|
|
33320
|
-
if (isDefined(newUrl))
|
|
33317
|
+
if (isDefined(newUrl)) {
|
|
33318
|
+
const decodeUri = decodeURIComponent(newUrl);
|
|
33319
|
+
this.$location.setUrl(decodeUri);
|
|
33320
|
+
}
|
|
33321
33321
|
if (state) this.$location.setState(state);
|
|
33322
33322
|
return this.$location.getUrl();
|
|
33323
33323
|
}
|
|
@@ -34115,14 +34115,14 @@
|
|
|
34115
34115
|
/* @ignore */ static $inject = provider([
|
|
34116
34116
|
$injectTokens.$url,
|
|
34117
34117
|
$injectTokens.$state,
|
|
34118
|
-
$injectTokens.$
|
|
34118
|
+
$injectTokens.$router,
|
|
34119
34119
|
$injectTokens.$view,
|
|
34120
34120
|
]);
|
|
34121
34121
|
|
|
34122
34122
|
/**
|
|
34123
34123
|
* @param urlService
|
|
34124
34124
|
* @param stateService
|
|
34125
|
-
* @param {import('../
|
|
34125
|
+
* @param {import('../router.js').Router} globals
|
|
34126
34126
|
* @param viewService
|
|
34127
34127
|
*/
|
|
34128
34128
|
constructor(urlService, stateService, globals, viewService) {
|
|
@@ -34601,7 +34601,7 @@
|
|
|
34601
34601
|
|
|
34602
34602
|
$StateRefActiveDirective.$inject = [
|
|
34603
34603
|
"$state",
|
|
34604
|
-
"$
|
|
34604
|
+
"$router",
|
|
34605
34605
|
"$interpolate",
|
|
34606
34606
|
"$stateRegistry",
|
|
34607
34607
|
"$transitions",
|
|
@@ -34609,7 +34609,7 @@
|
|
|
34609
34609
|
|
|
34610
34610
|
/**
|
|
34611
34611
|
* @param {*} $state
|
|
34612
|
-
* @param {import('../
|
|
34612
|
+
* @param {import('../router.js').Router} $router
|
|
34613
34613
|
* @param {*} $interpolate
|
|
34614
34614
|
* @param {*} $stateRegistry
|
|
34615
34615
|
* @param {*} $transitions
|
|
@@ -34617,7 +34617,7 @@
|
|
|
34617
34617
|
*/
|
|
34618
34618
|
function $StateRefActiveDirective(
|
|
34619
34619
|
$state,
|
|
34620
|
-
$
|
|
34620
|
+
$router,
|
|
34621
34621
|
$interpolate,
|
|
34622
34622
|
$stateRegistry,
|
|
34623
34623
|
$transitions,
|
|
@@ -34656,8 +34656,8 @@
|
|
|
34656
34656
|
trans.promise.then(update, () => {});
|
|
34657
34657
|
}
|
|
34658
34658
|
$scope.$on("$destroy", setupEventListeners());
|
|
34659
|
-
if ($
|
|
34660
|
-
updateAfterTransition($
|
|
34659
|
+
if ($router.transition) {
|
|
34660
|
+
updateAfterTransition($router.transition);
|
|
34661
34661
|
}
|
|
34662
34662
|
function setupEventListeners() {
|
|
34663
34663
|
const deregisterStatesChangedListener =
|
|
@@ -34759,7 +34759,7 @@
|
|
|
34759
34759
|
* The ng-view can be targeted in a View using the name ([[StateDeclaration.views]]).
|
|
34760
34760
|
*
|
|
34761
34761
|
* - `autoscroll`: an expression. When it evaluates to true, the `ng-view` will be scrolled into view when it is activated.
|
|
34762
|
-
* Uses [[$
|
|
34762
|
+
* Uses [[$viewScroll]] to do the scrolling.
|
|
34763
34763
|
*
|
|
34764
34764
|
* - `onload`: Expression to evaluate whenever the view updates.
|
|
34765
34765
|
*
|
|
@@ -34878,16 +34878,16 @@
|
|
|
34878
34878
|
let ngView = [
|
|
34879
34879
|
"$view",
|
|
34880
34880
|
"$animate",
|
|
34881
|
-
"$
|
|
34881
|
+
"$viewScroll",
|
|
34882
34882
|
"$interpolate",
|
|
34883
34883
|
/**
|
|
34884
34884
|
* @param {*} $view
|
|
34885
34885
|
* @param {*} $animate
|
|
34886
|
-
* @param {*} $
|
|
34886
|
+
* @param {*} $viewScroll
|
|
34887
34887
|
* @param {*} $interpolate
|
|
34888
34888
|
* @returns {import("../../interface.js").Directive}
|
|
34889
34889
|
*/
|
|
34890
|
-
function $ViewDirective($view, $animate, $
|
|
34890
|
+
function $ViewDirective($view, $animate, $viewScroll, $interpolate) {
|
|
34891
34891
|
function getRenderer() {
|
|
34892
34892
|
return {
|
|
34893
34893
|
enter: function (element, target, cb) {
|
|
@@ -35024,7 +35024,7 @@
|
|
|
35024
35024
|
(isDefined(autoScrollExp) && !autoScrollExp) ||
|
|
35025
35025
|
scope.$eval(autoScrollExp)
|
|
35026
35026
|
) {
|
|
35027
|
-
$
|
|
35027
|
+
$viewScroll(clone);
|
|
35028
35028
|
}
|
|
35029
35029
|
});
|
|
35030
35030
|
cleanupLastView();
|
|
@@ -35769,7 +35769,7 @@
|
|
|
35769
35769
|
$parse: ParseProvider,
|
|
35770
35770
|
$$rAFScheduler: RafSchedulerProvider,
|
|
35771
35771
|
$rootScope: RootScopeProvider,
|
|
35772
|
-
$
|
|
35772
|
+
$router: Router,
|
|
35773
35773
|
$sce: SceProvider,
|
|
35774
35774
|
$sceDelegate: SceDelegateProvider,
|
|
35775
35775
|
$templateCache: TemplateCacheProvider,
|
|
@@ -35778,7 +35778,7 @@
|
|
|
35778
35778
|
$view: ViewService,
|
|
35779
35779
|
$transitions: TransitionProvider,
|
|
35780
35780
|
$state: StateProvider,
|
|
35781
|
-
$
|
|
35781
|
+
$viewScroll: ViewScrollProvider,
|
|
35782
35782
|
$templateFactory: TemplateFactoryProvider,
|
|
35783
35783
|
$url: UrlService,
|
|
35784
35784
|
$stateRegistry: StateRegistryProvider,
|
|
@@ -35788,9 +35788,9 @@
|
|
|
35788
35788
|
],
|
|
35789
35789
|
)
|
|
35790
35790
|
.factory("$stateParams", [
|
|
35791
|
-
$injectTokens.$
|
|
35791
|
+
$injectTokens.$router,
|
|
35792
35792
|
/**
|
|
35793
|
-
* @param {import('./router/
|
|
35793
|
+
* @param {import('./router/router.js').Router} globals
|
|
35794
35794
|
* @returns {import('./router/params/state-params.js').StateParams }
|
|
35795
35795
|
*/
|
|
35796
35796
|
(globals) => globals.params,
|
|
@@ -35821,7 +35821,7 @@
|
|
|
35821
35821
|
/**
|
|
35822
35822
|
* @type {string} `version` from `package.json`
|
|
35823
35823
|
*/
|
|
35824
|
-
this.version = "0.8.
|
|
35824
|
+
this.version = "0.8.1"; //inserted via rollup plugin
|
|
35825
35825
|
|
|
35826
35826
|
/** @type {!Array<string|any>} */
|
|
35827
35827
|
this.bootsrappedModules = [];
|
|
@@ -35830,9 +35830,9 @@
|
|
|
35830
35830
|
this.getInjector = getInjector;
|
|
35831
35831
|
this.getScope = getScope;
|
|
35832
35832
|
this.errorHandlingConfig = errorHandlingConfig;
|
|
35833
|
+
this.$t = $injectTokens;
|
|
35833
35834
|
|
|
35834
35835
|
window["angular"] = this;
|
|
35835
|
-
this.$injectTokens = $injectTokens;
|
|
35836
35836
|
registerNgModule(this);
|
|
35837
35837
|
}
|
|
35838
35838
|
|
|
@@ -35909,14 +35909,14 @@
|
|
|
35909
35909
|
|
|
35910
35910
|
const injector = createInjector(this.bootsrappedModules, config.strictDi);
|
|
35911
35911
|
injector.invoke([
|
|
35912
|
-
|
|
35913
|
-
|
|
35914
|
-
|
|
35915
|
-
|
|
35912
|
+
$injectTokens.$rootScope,
|
|
35913
|
+
$injectTokens.$rootElement,
|
|
35914
|
+
$injectTokens.$compile,
|
|
35915
|
+
$injectTokens.$injector,
|
|
35916
35916
|
/**
|
|
35917
35917
|
* @param {import('./core/scope/scope.js').Scope} scope
|
|
35918
35918
|
* @param {Element} el
|
|
35919
|
-
* @param {
|
|
35919
|
+
* @param {import("./core/compile/compile.js").CompileFn} compile
|
|
35920
35920
|
* @param {import("./core/di/internal-injector.js").InjectorService} $injector
|
|
35921
35921
|
*/
|
|
35922
35922
|
(scope, el, compile, $injector) => {
|
|
@@ -35939,7 +35939,7 @@
|
|
|
35939
35939
|
}
|
|
35940
35940
|
|
|
35941
35941
|
$injector
|
|
35942
|
-
.get(
|
|
35942
|
+
.get($injectTokens.$stateRegistry)
|
|
35943
35943
|
.get()
|
|
35944
35944
|
.map((x) => x.$$state().resolvables)
|
|
35945
35945
|
.reduce(unnestR, [])
|
|
@@ -36044,7 +36044,7 @@
|
|
|
36044
36044
|
* @param {string} name The name of the module to create or retrieve.
|
|
36045
36045
|
* @param {Array.<string>} [requires] If specified then new module is being created. If
|
|
36046
36046
|
* unspecified then the module is being retrieved for further configuration.
|
|
36047
|
-
* @param {
|
|
36047
|
+
* @param {import("./interface.js").Injectable} [configFn] Optional configuration function for the module that gets
|
|
36048
36048
|
* passed to {@link NgModule.config NgModule.config()}.
|
|
36049
36049
|
* @returns {NgModule} A newly registered module.
|
|
36050
36050
|
*/
|
|
@@ -36061,7 +36061,7 @@
|
|
|
36061
36061
|
name,
|
|
36062
36062
|
);
|
|
36063
36063
|
}
|
|
36064
|
-
return new NgModule(name, requires,
|
|
36064
|
+
return new NgModule(name, requires, configFn);
|
|
36065
36065
|
});
|
|
36066
36066
|
}
|
|
36067
36067
|
}
|