@angular-wave/angular.ts 0.8.0 → 0.8.2
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/compile/compile.d.ts +5 -2
- 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 +103 -103
- package/dist/angular-ts.umd.js +103 -103
- 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/assets/style.css +2 -9
- 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/angular.spec.js +4 -4
- package/src/core/compile/compile.js +1 -1
- 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/src/shared/min-err.spec.js +1 -1
- package/src/shared/url-utils/url-utils.spec.js +0 -1
- package/src/shared/utils.spec.js +4 -4
- package/tsconfig.json +1 -7
package/dist/angular-ts.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Version: 0.8.
|
|
1
|
+
/* Version: 0.8.2 - August 11, 2025 15:14:34 */
|
|
2
2
|
const VALID_CLASS = "ng-valid";
|
|
3
3
|
const INVALID_CLASS = "ng-invalid";
|
|
4
4
|
const PRISTINE_CLASS = "ng-pristine";
|
|
@@ -1810,11 +1810,11 @@ const $injectTokens = Object.freeze({
|
|
|
1810
1810
|
$interpolate: "$interpolate",
|
|
1811
1811
|
$location: "$location",
|
|
1812
1812
|
$log: "$log",
|
|
1813
|
-
$
|
|
1813
|
+
$viewScroll: "$viewScroll",
|
|
1814
1814
|
$parse: "$parse",
|
|
1815
1815
|
$rootScope: "$rootScope",
|
|
1816
1816
|
$rootElement: "$rootElement",
|
|
1817
|
-
$
|
|
1817
|
+
$router: "$router",
|
|
1818
1818
|
$sce: "$sce",
|
|
1819
1819
|
$sceDelegate: "$sceDelegate",
|
|
1820
1820
|
$state: "$state",
|
|
@@ -1868,7 +1868,7 @@ class NgModule {
|
|
|
1868
1868
|
/**
|
|
1869
1869
|
* @param {string} name - Name of the module
|
|
1870
1870
|
* @param {Array<string>} requires - List of modules which the injector will load before the current module
|
|
1871
|
-
* @param {
|
|
1871
|
+
* @param {import("../../interface.js").Injectable} [configFn]
|
|
1872
1872
|
*/
|
|
1873
1873
|
constructor(name, requires, configFn) {
|
|
1874
1874
|
assert(isString(name), "name required");
|
|
@@ -1894,7 +1894,7 @@ class NgModule {
|
|
|
1894
1894
|
/** @type {!Array<Array<*>>} */
|
|
1895
1895
|
this.configBlocks = [];
|
|
1896
1896
|
|
|
1897
|
-
/** @type {!Array.<
|
|
1897
|
+
/** @type {!Array.<import("../../interface.js").Injectable>} */
|
|
1898
1898
|
this.runBlocks = [];
|
|
1899
1899
|
|
|
1900
1900
|
if (configFn) {
|
|
@@ -1924,7 +1924,7 @@ class NgModule {
|
|
|
1924
1924
|
|
|
1925
1925
|
/**
|
|
1926
1926
|
*
|
|
1927
|
-
* @param {
|
|
1927
|
+
* @param {import("../../interface.js").Injectable} configFn
|
|
1928
1928
|
* @returns {NgModule}
|
|
1929
1929
|
*/
|
|
1930
1930
|
config(configFn) {
|
|
@@ -1933,7 +1933,7 @@ class NgModule {
|
|
|
1933
1933
|
}
|
|
1934
1934
|
|
|
1935
1935
|
/**
|
|
1936
|
-
* @param {
|
|
1936
|
+
* @param {import("../../interface.js").Injectable} block
|
|
1937
1937
|
* @returns {NgModule}
|
|
1938
1938
|
*/
|
|
1939
1939
|
run(block) {
|
|
@@ -1943,12 +1943,12 @@ class NgModule {
|
|
|
1943
1943
|
|
|
1944
1944
|
/**
|
|
1945
1945
|
* @param {string} name
|
|
1946
|
-
* @param {
|
|
1946
|
+
* @param {import("../../interface.js").ComponentOptions} options
|
|
1947
1947
|
* @returns {NgModule}
|
|
1948
1948
|
*/
|
|
1949
1949
|
component(name, options) {
|
|
1950
1950
|
if (options && isFunction(options)) {
|
|
1951
|
-
options
|
|
1951
|
+
options["$$moduleName"] = name;
|
|
1952
1952
|
}
|
|
1953
1953
|
this.invokeQueue.push([COMPILE_LITERAL, "component", [name, options]]);
|
|
1954
1954
|
return this;
|
|
@@ -1956,12 +1956,12 @@ class NgModule {
|
|
|
1956
1956
|
|
|
1957
1957
|
/**
|
|
1958
1958
|
* @param {string} name
|
|
1959
|
-
* @param {
|
|
1959
|
+
* @param {import("../../interface.js").Injectable} providerFunction
|
|
1960
1960
|
* @returns {NgModule}
|
|
1961
1961
|
*/
|
|
1962
1962
|
factory(name, providerFunction) {
|
|
1963
1963
|
if (providerFunction && isFunction(providerFunction)) {
|
|
1964
|
-
providerFunction
|
|
1964
|
+
providerFunction["$$moduleName"] = name;
|
|
1965
1965
|
}
|
|
1966
1966
|
this.invokeQueue.push([$injectTokens.$provide, "factory", [name, providerFunction]]);
|
|
1967
1967
|
return this;
|
|
@@ -1969,12 +1969,12 @@ class NgModule {
|
|
|
1969
1969
|
|
|
1970
1970
|
/**
|
|
1971
1971
|
* @param {string} name
|
|
1972
|
-
* @param {
|
|
1972
|
+
* @param {import("../../interface.js").Injectable} serviceFunction
|
|
1973
1973
|
* @returns {NgModule}
|
|
1974
1974
|
*/
|
|
1975
1975
|
service(name, serviceFunction) {
|
|
1976
1976
|
if (serviceFunction && isFunction(serviceFunction)) {
|
|
1977
|
-
serviceFunction
|
|
1977
|
+
serviceFunction["$$moduleName"] = name;
|
|
1978
1978
|
}
|
|
1979
1979
|
this.invokeQueue.push([$injectTokens.$provide, "service", [name, serviceFunction]]);
|
|
1980
1980
|
return this;
|
|
@@ -1982,12 +1982,12 @@ class NgModule {
|
|
|
1982
1982
|
|
|
1983
1983
|
/**
|
|
1984
1984
|
* @param {string} name
|
|
1985
|
-
* @param {
|
|
1985
|
+
* @param {import("../../interface.js").Injectable} providerType
|
|
1986
1986
|
* @returns {NgModule}
|
|
1987
1987
|
*/
|
|
1988
1988
|
provider(name, providerType) {
|
|
1989
1989
|
if (providerType && isFunction(providerType)) {
|
|
1990
|
-
providerType
|
|
1990
|
+
providerType["$$moduleName"] = name;
|
|
1991
1991
|
}
|
|
1992
1992
|
this.invokeQueue.push([$injectTokens.$provide, "provider", [name, providerType]]);
|
|
1993
1993
|
return this;
|
|
@@ -1995,12 +1995,12 @@ class NgModule {
|
|
|
1995
1995
|
|
|
1996
1996
|
/**
|
|
1997
1997
|
* @param {string} name
|
|
1998
|
-
* @param {
|
|
1998
|
+
* @param {import("../../interface.js").Injectable} decorFn
|
|
1999
1999
|
* @returns {NgModule}
|
|
2000
2000
|
*/
|
|
2001
2001
|
decorator(name, decorFn) {
|
|
2002
2002
|
if (decorFn && isFunction(decorFn)) {
|
|
2003
|
-
decorFn
|
|
2003
|
+
decorFn["$$moduleName"] = name;
|
|
2004
2004
|
}
|
|
2005
2005
|
this.configBlocks.push([$injectTokens.$provide, "decorator", [name, decorFn]]);
|
|
2006
2006
|
return this;
|
|
@@ -2008,12 +2008,12 @@ class NgModule {
|
|
|
2008
2008
|
|
|
2009
2009
|
/**
|
|
2010
2010
|
* @param {string} name
|
|
2011
|
-
* @param {
|
|
2011
|
+
* @param {import("../../interface.js").Injectable} directiveFactory
|
|
2012
2012
|
* @returns {NgModule}
|
|
2013
2013
|
*/
|
|
2014
2014
|
directive(name, directiveFactory) {
|
|
2015
2015
|
if (directiveFactory && isFunction(directiveFactory)) {
|
|
2016
|
-
directiveFactory
|
|
2016
|
+
directiveFactory["$$moduleName"] = name;
|
|
2017
2017
|
}
|
|
2018
2018
|
this.invokeQueue.push([
|
|
2019
2019
|
COMPILE_LITERAL,
|
|
@@ -2025,12 +2025,12 @@ class NgModule {
|
|
|
2025
2025
|
|
|
2026
2026
|
/**
|
|
2027
2027
|
* @param {string} name
|
|
2028
|
-
* @param {
|
|
2028
|
+
* @param {import("../../interface.js").Injectable} animationFactory
|
|
2029
2029
|
* @returns {NgModule}
|
|
2030
2030
|
*/
|
|
2031
2031
|
animation(name, animationFactory) {
|
|
2032
2032
|
if (animationFactory && isFunction(animationFactory)) {
|
|
2033
|
-
animationFactory
|
|
2033
|
+
animationFactory["$$moduleName"] = name;
|
|
2034
2034
|
}
|
|
2035
2035
|
this.invokeQueue.push([
|
|
2036
2036
|
ANIMATION_LITERAL,
|
|
@@ -2040,9 +2040,14 @@ class NgModule {
|
|
|
2040
2040
|
return this;
|
|
2041
2041
|
}
|
|
2042
2042
|
|
|
2043
|
+
/**
|
|
2044
|
+
* @param {string} name
|
|
2045
|
+
* @param {import("../../interface.js").Injectable} filterFn
|
|
2046
|
+
* @return {NgModule}
|
|
2047
|
+
*/
|
|
2043
2048
|
filter(name, filterFn) {
|
|
2044
2049
|
if (filterFn && isFunction(filterFn)) {
|
|
2045
|
-
filterFn
|
|
2050
|
+
filterFn["$$moduleName"] = name;
|
|
2046
2051
|
}
|
|
2047
2052
|
this.invokeQueue.push([FILTER_LITERAL, "register", [name, filterFn]]);
|
|
2048
2053
|
return this;
|
|
@@ -2050,12 +2055,12 @@ class NgModule {
|
|
|
2050
2055
|
|
|
2051
2056
|
/**
|
|
2052
2057
|
* @param {string} name
|
|
2053
|
-
* @param {
|
|
2058
|
+
* @param {import("../../interface.js").Injectable} ctlFn
|
|
2054
2059
|
* @returns {NgModule}
|
|
2055
2060
|
*/
|
|
2056
2061
|
controller(name, ctlFn) {
|
|
2057
2062
|
if (ctlFn && isFunction(ctlFn)) {
|
|
2058
|
-
ctlFn
|
|
2063
|
+
ctlFn["$$moduleName"] = name;
|
|
2059
2064
|
}
|
|
2060
2065
|
this.invokeQueue.push([CONTROLLER_LITERAL, "register", [name, ctlFn]]);
|
|
2061
2066
|
return this;
|
|
@@ -4708,7 +4713,7 @@ class CompileProvider {
|
|
|
4708
4713
|
/**
|
|
4709
4714
|
* @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
|
|
4710
4715
|
* or an object map of components where the keys are the names and the values are the component definition objects.
|
|
4711
|
-
* @param {
|
|
4716
|
+
* @param {import("../../interface.js").ComponentOptions} options Component definition object (a simplified
|
|
4712
4717
|
* {directive definition object}),
|
|
4713
4718
|
* with the following properties (all optional):
|
|
4714
4719
|
*
|
|
@@ -11966,7 +11971,7 @@ function ngRepeatDirective($animate) {
|
|
|
11966
11971
|
transclude: "element",
|
|
11967
11972
|
priority: 1000,
|
|
11968
11973
|
terminal: true,
|
|
11969
|
-
compile: ($element, $attr) => {
|
|
11974
|
+
compile: (_$element, $attr) => {
|
|
11970
11975
|
const expression = $attr["ngRepeat"];
|
|
11971
11976
|
const hasAnimate = !!$attr["animate"];
|
|
11972
11977
|
|
|
@@ -19082,8 +19087,15 @@ class Location {
|
|
|
19082
19087
|
*/
|
|
19083
19088
|
setUrl(url) {
|
|
19084
19089
|
const match = PATH_MATCH.exec(url);
|
|
19085
|
-
|
|
19086
|
-
if (match[
|
|
19090
|
+
|
|
19091
|
+
if (match[1] !== undefined || url === "") {
|
|
19092
|
+
this.setPath(match[1] || "");
|
|
19093
|
+
}
|
|
19094
|
+
|
|
19095
|
+
if (match[2] !== undefined || match[1] !== undefined || url === "") {
|
|
19096
|
+
this.setSearch(match[3] || "");
|
|
19097
|
+
}
|
|
19098
|
+
|
|
19087
19099
|
this.setHash(match[5] || "");
|
|
19088
19100
|
|
|
19089
19101
|
return this;
|
|
@@ -25495,20 +25507,6 @@ const parse = (name) =>
|
|
|
25495
25507
|
name.split(".").map((name) => (obj) => obj && obj[name]),
|
|
25496
25508
|
);
|
|
25497
25509
|
|
|
25498
|
-
/**
|
|
25499
|
-
* Given two functions that return truthy or falsey values, returns a function that returns truthy
|
|
25500
|
-
* if at least one of the functions returns truthy for the given arguments
|
|
25501
|
-
*/
|
|
25502
|
-
function or(fn1, fn2) {
|
|
25503
|
-
return (...args) => fn1.apply(null, args) || fn2.apply(null, args);
|
|
25504
|
-
}
|
|
25505
|
-
/**
|
|
25506
|
-
* Check if all the elements of an array match a predicate function
|
|
25507
|
-
*
|
|
25508
|
-
* @param fn1 a predicate function `fn1`
|
|
25509
|
-
* @returns a function which takes an array and returns true if `fn1` is true for all elements of the array
|
|
25510
|
-
*/
|
|
25511
|
-
const all = (fn1) => (arr) => arr.reduce((b, x) => b && !!fn1(x), true);
|
|
25512
25510
|
/** Given a class, returns a Predicate function that returns true if the object is of that class */
|
|
25513
25511
|
const is = (ctor) => (obj) =>
|
|
25514
25512
|
(obj != null && obj.constructor === ctor) || obj instanceof ctor;
|
|
@@ -25571,10 +25569,10 @@ function equals(o1, o2) {
|
|
|
25571
25569
|
t2 = typeof o2;
|
|
25572
25570
|
if (t1 !== t2 || t1 !== "object") return false;
|
|
25573
25571
|
const tup = [o1, o2];
|
|
25574
|
-
if (
|
|
25575
|
-
if (
|
|
25576
|
-
if (
|
|
25577
|
-
if (
|
|
25572
|
+
if (tup.every(Array.isArray)) return _arraysEq(o1, o2);
|
|
25573
|
+
if (tup.every(isDate)) return o1.getTime() === o2.getTime();
|
|
25574
|
+
if (tup.every(isRegExp)) return o1.toString() === o2.toString();
|
|
25575
|
+
if (tup.every(isFunction)) return true; // meh
|
|
25578
25576
|
if ([isFunction, Array.isArray, isDate, isRegExp].some((fn) => !!fn(tup))) {
|
|
25579
25577
|
return false;
|
|
25580
25578
|
}
|
|
@@ -26016,7 +26014,6 @@ class ParamType {
|
|
|
26016
26014
|
/**
|
|
26017
26015
|
* @param def A configuration object which contains the custom type definition. The object's
|
|
26018
26016
|
* properties will override the default methods and/or pattern in `ParamType`'s public interface.
|
|
26019
|
-
* @returns a new ParamType object
|
|
26020
26017
|
*/
|
|
26021
26018
|
constructor(def) {
|
|
26022
26019
|
this.pattern = /.*/;
|
|
@@ -26575,7 +26572,7 @@ class Queue {
|
|
|
26575
26572
|
* This is where we hold the global mutable state such as current state, current
|
|
26576
26573
|
* params, current transition, etc.
|
|
26577
26574
|
*/
|
|
26578
|
-
class
|
|
26575
|
+
class Router {
|
|
26579
26576
|
constructor() {
|
|
26580
26577
|
/**
|
|
26581
26578
|
* Current parameter values
|
|
@@ -27469,7 +27466,7 @@ class Param {
|
|
|
27469
27466
|
const normalized = this.type.$normalize(value);
|
|
27470
27467
|
if (!this.type.is(normalized)) return false;
|
|
27471
27468
|
// The value was of the correct type, but when encoded, did not match the ParamType's regexp
|
|
27472
|
-
const encoded = this.type.encode(normalized);
|
|
27469
|
+
const encoded = normalized; // this.type.encode(normalized);
|
|
27473
27470
|
return !(isString(encoded) && !this.type.pattern.exec(encoded));
|
|
27474
27471
|
}
|
|
27475
27472
|
toString() {
|
|
@@ -29556,11 +29553,11 @@ class Transition {
|
|
|
29556
29553
|
* encapsulates the "from state".
|
|
29557
29554
|
* @param {import('../state/target-state.js').TargetState} targetState The target state and parameters being transitioned to (also, the transition options)
|
|
29558
29555
|
* @param {import('../transition/transition-service.js').TransitionProvider} transitionService The [[TransitionService]] instance
|
|
29559
|
-
* @param {import('../
|
|
29556
|
+
* @param {import('../router.js').Router} globals
|
|
29560
29557
|
*/
|
|
29561
29558
|
constructor(fromPath, targetState, transitionService, globals) {
|
|
29562
29559
|
/**
|
|
29563
|
-
* @type {import('../
|
|
29560
|
+
* @type {import('../router.js').Router}
|
|
29564
29561
|
*/
|
|
29565
29562
|
this.globals = globals;
|
|
29566
29563
|
this.transitionService = transitionService;
|
|
@@ -30740,10 +30737,10 @@ let defaultTransOpts = {
|
|
|
30740
30737
|
* This API is located at `router.transitionService` ([[UIRouter.transitionService]])
|
|
30741
30738
|
*/
|
|
30742
30739
|
class TransitionProvider {
|
|
30743
|
-
/* @ignore */ static $inject = provider([$injectTokens.$
|
|
30740
|
+
/* @ignore */ static $inject = provider([$injectTokens.$router, $injectTokens.$view]);
|
|
30744
30741
|
|
|
30745
30742
|
/**
|
|
30746
|
-
* @param {import('../
|
|
30743
|
+
* @param {import('../router.js').Router} globals
|
|
30747
30744
|
* @param viewService
|
|
30748
30745
|
*/
|
|
30749
30746
|
constructor(globals, viewService) {
|
|
@@ -30990,7 +30987,7 @@ class StateProvider {
|
|
|
30990
30987
|
/**
|
|
30991
30988
|
* The latest successful state parameters
|
|
30992
30989
|
*
|
|
30993
|
-
* @deprecated This is a passthrough through to [[
|
|
30990
|
+
* @deprecated This is a passthrough through to [[Router.params]]
|
|
30994
30991
|
*/
|
|
30995
30992
|
get params() {
|
|
30996
30993
|
return this.globals.params;
|
|
@@ -30998,7 +30995,7 @@ class StateProvider {
|
|
|
30998
30995
|
/**
|
|
30999
30996
|
* The current [[StateDeclaration]]
|
|
31000
30997
|
*
|
|
31001
|
-
* @deprecated This is a passthrough through to [[
|
|
30998
|
+
* @deprecated This is a passthrough through to [[Router.current]]
|
|
31002
30999
|
*/
|
|
31003
31000
|
get current() {
|
|
31004
31001
|
return this.globals.current;
|
|
@@ -31006,21 +31003,18 @@ class StateProvider {
|
|
|
31006
31003
|
/**
|
|
31007
31004
|
* The current [[StateObject]] (an internal API)
|
|
31008
31005
|
*
|
|
31009
|
-
* @deprecated This is a passthrough through to [[
|
|
31006
|
+
* @deprecated This is a passthrough through to [[Router.$current]]
|
|
31010
31007
|
*/
|
|
31011
31008
|
get $current() {
|
|
31012
31009
|
return this.globals.$current;
|
|
31013
31010
|
}
|
|
31014
31011
|
|
|
31015
|
-
/* @ignore */ static $inject = [
|
|
31016
|
-
"$routerGlobalsProvider",
|
|
31017
|
-
"$transitionsProvider",
|
|
31018
|
-
];
|
|
31012
|
+
/* @ignore */ static $inject = ["$routerProvider", "$transitionsProvider"];
|
|
31019
31013
|
|
|
31020
31014
|
// Needs access to urlService, stateRegistry
|
|
31021
31015
|
/**
|
|
31022
31016
|
*
|
|
31023
|
-
* @param {import('../
|
|
31017
|
+
* @param {import('../router.js').Router} globals
|
|
31024
31018
|
* @param {*} transitionService
|
|
31025
31019
|
*/
|
|
31026
31020
|
constructor(globals, transitionService) {
|
|
@@ -31671,7 +31665,7 @@ class ViewScrollProvider {
|
|
|
31671
31665
|
}
|
|
31672
31666
|
|
|
31673
31667
|
$get = [
|
|
31674
|
-
|
|
31668
|
+
$injectTokens.$anchorScroll,
|
|
31675
31669
|
/**
|
|
31676
31670
|
* @param {import('../services/anchor-scroll.js').AnchorScrollObject} $anchorScroll
|
|
31677
31671
|
* @returns {import('../services/anchor-scroll.js').AnchorScrollObject|Function}
|
|
@@ -32014,13 +32008,6 @@ const defaultConfig = {
|
|
|
32014
32008
|
*
|
|
32015
32009
|
*/
|
|
32016
32010
|
class UrlMatcher {
|
|
32017
|
-
static encodeDashes(str) {
|
|
32018
|
-
// Replace dashes with encoded "\-"
|
|
32019
|
-
return encodeURIComponent(str).replace(
|
|
32020
|
-
/-/g,
|
|
32021
|
-
(c) => `%5C%${c.charCodeAt(0).toString(16).toUpperCase()}`,
|
|
32022
|
-
);
|
|
32023
|
-
}
|
|
32024
32011
|
/** @internal Given a matcher, return an array with the matcher's path segments and path params, in order */
|
|
32025
32012
|
static pathSegmentsAndParams(matcher) {
|
|
32026
32013
|
const staticSegments = matcher._segments;
|
|
@@ -32231,9 +32218,6 @@ class UrlMatcher {
|
|
|
32231
32218
|
return this.pattern;
|
|
32232
32219
|
}
|
|
32233
32220
|
_getDecodedParamValue(value, param) {
|
|
32234
|
-
if (isDefined(value)) {
|
|
32235
|
-
value = param.type.decode(value);
|
|
32236
|
-
}
|
|
32237
32221
|
return param.value(value);
|
|
32238
32222
|
}
|
|
32239
32223
|
/**
|
|
@@ -32424,7 +32408,7 @@ class UrlMatcher {
|
|
|
32424
32408
|
if (encoded == null) return acc;
|
|
32425
32409
|
// If this parameter value is an array, encode the value using encodeDashes
|
|
32426
32410
|
if (Array.isArray(encoded))
|
|
32427
|
-
return acc + map(encoded,
|
|
32411
|
+
return acc + map(encoded, encodeDashes).join("-");
|
|
32428
32412
|
// If the parameter type is "raw", then do not encodeURIComponent
|
|
32429
32413
|
if (param.raw) return acc + encoded;
|
|
32430
32414
|
// Encode the value
|
|
@@ -32454,6 +32438,14 @@ class UrlMatcher {
|
|
|
32454
32438
|
|
|
32455
32439
|
UrlMatcher.nameValidator = /^\w+([-.]+\w+)*(?:\[\])?$/;
|
|
32456
32440
|
|
|
32441
|
+
function encodeDashes(str) {
|
|
32442
|
+
// Replace dashes with encoded "\-"
|
|
32443
|
+
return encodeURIComponent(str).replace(
|
|
32444
|
+
/-/g,
|
|
32445
|
+
(c) => `%5C%${c.charCodeAt(0).toString(16).toUpperCase()}`,
|
|
32446
|
+
);
|
|
32447
|
+
}
|
|
32448
|
+
|
|
32457
32449
|
/** @typedef {import('./interface.js').StateDeclaration} StateDeclaration */
|
|
32458
32450
|
|
|
32459
32451
|
/**
|
|
@@ -32579,6 +32571,11 @@ StateObject.isState = (obj) => isObject(obj["__stateObjectCache"]);
|
|
|
32579
32571
|
* - [[StateObject]]
|
|
32580
32572
|
*/
|
|
32581
32573
|
class UrlRuleFactory {
|
|
32574
|
+
/**
|
|
32575
|
+
* @param {import('../url/url-service.js').UrlService} urlService
|
|
32576
|
+
* @param {import('../state/state-service.js').StateProvider} stateService
|
|
32577
|
+
* @param {import('../router.js').Router} routerGlobals
|
|
32578
|
+
*/
|
|
32582
32579
|
constructor(urlService, stateService, routerGlobals) {
|
|
32583
32580
|
this.urlService = urlService;
|
|
32584
32581
|
this.stateService = stateService;
|
|
@@ -32597,7 +32594,7 @@ class UrlRuleFactory {
|
|
|
32597
32594
|
[isString, (_what) => makeRule(this.urlService.compile(_what))],
|
|
32598
32595
|
[is(UrlMatcher), (_what) => this.fromUrlMatcher(_what, handler)],
|
|
32599
32596
|
[
|
|
32600
|
-
|
|
32597
|
+
(...args) => isState(...args) || isStateDeclaration(...args),
|
|
32601
32598
|
(_what) => this.fromState(_what, this.stateService, this.routerGlobals),
|
|
32602
32599
|
],
|
|
32603
32600
|
[is(RegExp), (_what) => this.fromRegExp(_what, handler)],
|
|
@@ -33158,7 +33155,7 @@ class UrlService {
|
|
|
33158
33155
|
static $inject = provider([
|
|
33159
33156
|
$injectTokens.$location,
|
|
33160
33157
|
$injectTokens.$state,
|
|
33161
|
-
$injectTokens.$
|
|
33158
|
+
$injectTokens.$router,
|
|
33162
33159
|
$injectTokens.$urlConfig,
|
|
33163
33160
|
]);
|
|
33164
33161
|
|
|
@@ -33168,7 +33165,7 @@ class UrlService {
|
|
|
33168
33165
|
/**
|
|
33169
33166
|
* @param {import("../../services/location/location").LocationProvider} $locationProvider
|
|
33170
33167
|
* @param {import("../../router/state/state-service.js").StateProvider} stateService
|
|
33171
|
-
* @param {import("
|
|
33168
|
+
* @param {import("../router.js").Router} globals
|
|
33172
33169
|
* @param {import("../../router/url/url-config.js").UrlConfigProvider} urlConfigProvider
|
|
33173
33170
|
*/
|
|
33174
33171
|
constructor($locationProvider, stateService, globals, urlConfigProvider) {
|
|
@@ -33311,7 +33308,10 @@ class UrlService {
|
|
|
33311
33308
|
* @return the url (after potentially being processed)
|
|
33312
33309
|
*/
|
|
33313
33310
|
url(newUrl, state) {
|
|
33314
|
-
if (isDefined(newUrl))
|
|
33311
|
+
if (isDefined(newUrl)) {
|
|
33312
|
+
const decodeUri = decodeURIComponent(newUrl);
|
|
33313
|
+
this.$location.setUrl(decodeUri);
|
|
33314
|
+
}
|
|
33315
33315
|
if (state) this.$location.setState(state);
|
|
33316
33316
|
return this.$location.getUrl();
|
|
33317
33317
|
}
|
|
@@ -34109,14 +34109,14 @@ class StateRegistryProvider {
|
|
|
34109
34109
|
/* @ignore */ static $inject = provider([
|
|
34110
34110
|
$injectTokens.$url,
|
|
34111
34111
|
$injectTokens.$state,
|
|
34112
|
-
$injectTokens.$
|
|
34112
|
+
$injectTokens.$router,
|
|
34113
34113
|
$injectTokens.$view,
|
|
34114
34114
|
]);
|
|
34115
34115
|
|
|
34116
34116
|
/**
|
|
34117
34117
|
* @param urlService
|
|
34118
34118
|
* @param stateService
|
|
34119
|
-
* @param {import('../
|
|
34119
|
+
* @param {import('../router.js').Router} globals
|
|
34120
34120
|
* @param viewService
|
|
34121
34121
|
*/
|
|
34122
34122
|
constructor(urlService, stateService, globals, viewService) {
|
|
@@ -34595,7 +34595,7 @@ function $StateRefDynamicDirective(
|
|
|
34595
34595
|
|
|
34596
34596
|
$StateRefActiveDirective.$inject = [
|
|
34597
34597
|
"$state",
|
|
34598
|
-
"$
|
|
34598
|
+
"$router",
|
|
34599
34599
|
"$interpolate",
|
|
34600
34600
|
"$stateRegistry",
|
|
34601
34601
|
"$transitions",
|
|
@@ -34603,7 +34603,7 @@ $StateRefActiveDirective.$inject = [
|
|
|
34603
34603
|
|
|
34604
34604
|
/**
|
|
34605
34605
|
* @param {*} $state
|
|
34606
|
-
* @param {import('../
|
|
34606
|
+
* @param {import('../router.js').Router} $router
|
|
34607
34607
|
* @param {*} $interpolate
|
|
34608
34608
|
* @param {*} $stateRegistry
|
|
34609
34609
|
* @param {*} $transitions
|
|
@@ -34611,7 +34611,7 @@ $StateRefActiveDirective.$inject = [
|
|
|
34611
34611
|
*/
|
|
34612
34612
|
function $StateRefActiveDirective(
|
|
34613
34613
|
$state,
|
|
34614
|
-
$
|
|
34614
|
+
$router,
|
|
34615
34615
|
$interpolate,
|
|
34616
34616
|
$stateRegistry,
|
|
34617
34617
|
$transitions,
|
|
@@ -34650,8 +34650,8 @@ function $StateRefActiveDirective(
|
|
|
34650
34650
|
trans.promise.then(update, () => {});
|
|
34651
34651
|
}
|
|
34652
34652
|
$scope.$on("$destroy", setupEventListeners());
|
|
34653
|
-
if ($
|
|
34654
|
-
updateAfterTransition($
|
|
34653
|
+
if ($router.transition) {
|
|
34654
|
+
updateAfterTransition($router.transition);
|
|
34655
34655
|
}
|
|
34656
34656
|
function setupEventListeners() {
|
|
34657
34657
|
const deregisterStatesChangedListener =
|
|
@@ -34753,7 +34753,7 @@ function $StateRefActiveDirective(
|
|
|
34753
34753
|
* The ng-view can be targeted in a View using the name ([[StateDeclaration.views]]).
|
|
34754
34754
|
*
|
|
34755
34755
|
* - `autoscroll`: an expression. When it evaluates to true, the `ng-view` will be scrolled into view when it is activated.
|
|
34756
|
-
* Uses [[$
|
|
34756
|
+
* Uses [[$viewScroll]] to do the scrolling.
|
|
34757
34757
|
*
|
|
34758
34758
|
* - `onload`: Expression to evaluate whenever the view updates.
|
|
34759
34759
|
*
|
|
@@ -34872,16 +34872,16 @@ function $StateRefActiveDirective(
|
|
|
34872
34872
|
let ngView = [
|
|
34873
34873
|
"$view",
|
|
34874
34874
|
"$animate",
|
|
34875
|
-
"$
|
|
34875
|
+
"$viewScroll",
|
|
34876
34876
|
"$interpolate",
|
|
34877
34877
|
/**
|
|
34878
34878
|
* @param {*} $view
|
|
34879
34879
|
* @param {*} $animate
|
|
34880
|
-
* @param {*} $
|
|
34880
|
+
* @param {*} $viewScroll
|
|
34881
34881
|
* @param {*} $interpolate
|
|
34882
34882
|
* @returns {import("../../interface.js").Directive}
|
|
34883
34883
|
*/
|
|
34884
|
-
function $ViewDirective($view, $animate, $
|
|
34884
|
+
function $ViewDirective($view, $animate, $viewScroll, $interpolate) {
|
|
34885
34885
|
function getRenderer() {
|
|
34886
34886
|
return {
|
|
34887
34887
|
enter: function (element, target, cb) {
|
|
@@ -35018,7 +35018,7 @@ let ngView = [
|
|
|
35018
35018
|
(isDefined(autoScrollExp) && !autoScrollExp) ||
|
|
35019
35019
|
scope.$eval(autoScrollExp)
|
|
35020
35020
|
) {
|
|
35021
|
-
$
|
|
35021
|
+
$viewScroll(clone);
|
|
35022
35022
|
}
|
|
35023
35023
|
});
|
|
35024
35024
|
cleanupLastView();
|
|
@@ -35763,7 +35763,7 @@ function registerNgModule(angular) {
|
|
|
35763
35763
|
$parse: ParseProvider,
|
|
35764
35764
|
$$rAFScheduler: RafSchedulerProvider,
|
|
35765
35765
|
$rootScope: RootScopeProvider,
|
|
35766
|
-
$
|
|
35766
|
+
$router: Router,
|
|
35767
35767
|
$sce: SceProvider,
|
|
35768
35768
|
$sceDelegate: SceDelegateProvider,
|
|
35769
35769
|
$templateCache: TemplateCacheProvider,
|
|
@@ -35772,7 +35772,7 @@ function registerNgModule(angular) {
|
|
|
35772
35772
|
$view: ViewService,
|
|
35773
35773
|
$transitions: TransitionProvider,
|
|
35774
35774
|
$state: StateProvider,
|
|
35775
|
-
$
|
|
35775
|
+
$viewScroll: ViewScrollProvider,
|
|
35776
35776
|
$templateFactory: TemplateFactoryProvider,
|
|
35777
35777
|
$url: UrlService,
|
|
35778
35778
|
$stateRegistry: StateRegistryProvider,
|
|
@@ -35782,9 +35782,9 @@ function registerNgModule(angular) {
|
|
|
35782
35782
|
],
|
|
35783
35783
|
)
|
|
35784
35784
|
.factory("$stateParams", [
|
|
35785
|
-
$injectTokens.$
|
|
35785
|
+
$injectTokens.$router,
|
|
35786
35786
|
/**
|
|
35787
|
-
* @param {import('./router/
|
|
35787
|
+
* @param {import('./router/router.js').Router} globals
|
|
35788
35788
|
* @returns {import('./router/params/state-params.js').StateParams }
|
|
35789
35789
|
*/
|
|
35790
35790
|
(globals) => globals.params,
|
|
@@ -35815,7 +35815,7 @@ class Angular {
|
|
|
35815
35815
|
/**
|
|
35816
35816
|
* @type {string} `version` from `package.json`
|
|
35817
35817
|
*/
|
|
35818
|
-
this.version = "0.8.
|
|
35818
|
+
this.version = "0.8.2"; //inserted via rollup plugin
|
|
35819
35819
|
|
|
35820
35820
|
/** @type {!Array<string|any>} */
|
|
35821
35821
|
this.bootsrappedModules = [];
|
|
@@ -35824,9 +35824,9 @@ class Angular {
|
|
|
35824
35824
|
this.getInjector = getInjector;
|
|
35825
35825
|
this.getScope = getScope;
|
|
35826
35826
|
this.errorHandlingConfig = errorHandlingConfig;
|
|
35827
|
+
this.$t = $injectTokens;
|
|
35827
35828
|
|
|
35828
35829
|
window["angular"] = this;
|
|
35829
|
-
this.$injectTokens = $injectTokens;
|
|
35830
35830
|
registerNgModule(this);
|
|
35831
35831
|
}
|
|
35832
35832
|
|
|
@@ -35903,14 +35903,14 @@ class Angular {
|
|
|
35903
35903
|
|
|
35904
35904
|
const injector = createInjector(this.bootsrappedModules, config.strictDi);
|
|
35905
35905
|
injector.invoke([
|
|
35906
|
-
|
|
35907
|
-
|
|
35908
|
-
|
|
35909
|
-
|
|
35906
|
+
$injectTokens.$rootScope,
|
|
35907
|
+
$injectTokens.$rootElement,
|
|
35908
|
+
$injectTokens.$compile,
|
|
35909
|
+
$injectTokens.$injector,
|
|
35910
35910
|
/**
|
|
35911
35911
|
* @param {import('./core/scope/scope.js').Scope} scope
|
|
35912
35912
|
* @param {Element} el
|
|
35913
|
-
* @param {
|
|
35913
|
+
* @param {import("./core/compile/compile.js").CompileFn} compile
|
|
35914
35914
|
* @param {import("./core/di/internal-injector.js").InjectorService} $injector
|
|
35915
35915
|
*/
|
|
35916
35916
|
(scope, el, compile, $injector) => {
|
|
@@ -35933,7 +35933,7 @@ class Angular {
|
|
|
35933
35933
|
}
|
|
35934
35934
|
|
|
35935
35935
|
$injector
|
|
35936
|
-
.get(
|
|
35936
|
+
.get($injectTokens.$stateRegistry)
|
|
35937
35937
|
.get()
|
|
35938
35938
|
.map((x) => x.$$state().resolvables)
|
|
35939
35939
|
.reduce(unnestR, [])
|
|
@@ -36038,7 +36038,7 @@ class Angular {
|
|
|
36038
36038
|
* @param {string} name The name of the module to create or retrieve.
|
|
36039
36039
|
* @param {Array.<string>} [requires] If specified then new module is being created. If
|
|
36040
36040
|
* unspecified then the module is being retrieved for further configuration.
|
|
36041
|
-
* @param {
|
|
36041
|
+
* @param {import("./interface.js").Injectable} [configFn] Optional configuration function for the module that gets
|
|
36042
36042
|
* passed to {@link NgModule.config NgModule.config()}.
|
|
36043
36043
|
* @returns {NgModule} A newly registered module.
|
|
36044
36044
|
*/
|
|
@@ -36055,7 +36055,7 @@ class Angular {
|
|
|
36055
36055
|
name,
|
|
36056
36056
|
);
|
|
36057
36057
|
}
|
|
36058
|
-
return new NgModule(name, requires,
|
|
36058
|
+
return new NgModule(name, requires, configFn);
|
|
36059
36059
|
});
|
|
36060
36060
|
}
|
|
36061
36061
|
}
|