@angular-wave/angular.ts 0.9.0 → 0.9.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/animations/animate-queue.d.ts +1 -1
- package/@types/core/scope/scope.d.ts +1 -4
- package/@types/interface.d.ts +18 -3
- package/@types/router/resolve/resolve-context.d.ts +0 -9
- package/@types/router/state/state-registry.d.ts +1 -2
- package/@types/router/state/state-service.d.ts +7 -1
- package/@types/router/transition/transition.d.ts +0 -65
- package/@types/shared/interface.d.ts +17 -0
- package/@types/shared/utils.d.ts +4 -19
- package/dist/angular-ts.esm.js +29 -152
- package/dist/angular-ts.umd.js +29 -152
- 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/main.js +2 -2
- package/docs/static/typedoc/assets/navigation.js +1 -1
- package/docs/static/typedoc/assets/search.js +1 -1
- package/docs/static/typedoc/classes/Location.html +20 -20
- package/docs/static/typedoc/classes/LocationProvider.html +5 -5
- package/docs/static/typedoc/classes/LogProvider.html +3 -3
- package/docs/static/typedoc/classes/PubSub.html +21 -21
- package/docs/static/typedoc/classes/PubSubProvider.html +1 -1
- package/docs/static/typedoc/classes/TemplateCacheProvider.html +2 -2
- package/docs/static/typedoc/hierarchy.html +1 -1
- package/docs/static/typedoc/index.html +1 -1
- package/docs/static/typedoc/interfaces/ChangesObject.html +3 -3
- package/docs/static/typedoc/interfaces/ComponentOptions.html +8 -8
- package/docs/static/typedoc/interfaces/Controller.html +6 -6
- package/docs/static/typedoc/interfaces/DefaultPorts.html +1 -1
- package/docs/static/typedoc/interfaces/Directive.html +18 -18
- package/docs/static/typedoc/interfaces/DirectivePrePost.html +1 -1
- package/docs/static/typedoc/interfaces/Html5Mode.html +1 -1
- package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +7 -7
- package/docs/static/typedoc/interfaces/HttpService.html +21 -21
- package/docs/static/typedoc/interfaces/LogService.html +6 -6
- package/docs/static/typedoc/interfaces/NgModelController.html +15 -15
- package/docs/static/typedoc/interfaces/NgModelOptions.html +8 -8
- package/docs/static/typedoc/interfaces/Provider.html +17 -17
- package/docs/static/typedoc/interfaces/RequestConfig.html +15 -15
- package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +11 -11
- package/docs/static/typedoc/interfaces/ServiceProvider.html +1 -1
- package/docs/static/typedoc/interfaces/TemplateCache.html +1 -1
- package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +4 -4
- package/docs/static/typedoc/interfaces/UrlParts.html +4 -4
- package/docs/static/typedoc/types/AnnotatedFactory.html +1 -1
- package/docs/static/typedoc/types/CloneAttachFunction.html +1 -1
- package/docs/static/typedoc/types/ControllerConstructor.html +1 -1
- package/docs/static/typedoc/types/DirectiveCompileFn.html +1 -1
- package/docs/static/typedoc/types/DirectiveController.html +1 -1
- package/docs/static/typedoc/types/DirectiveFactoryFn.html +1 -1
- package/docs/static/typedoc/types/DirectiveLinkFn.html +1 -1
- package/docs/static/typedoc/types/Expression.html +1 -1
- package/docs/static/typedoc/types/FilterFactory.html +1 -1
- package/docs/static/typedoc/types/FilterFn.html +1 -1
- package/docs/static/typedoc/types/Injectable.html +1 -1
- package/docs/static/typedoc/types/InjectableFactory.html +1 -1
- package/docs/static/typedoc/types/LogCall.html +1 -1
- package/docs/static/typedoc/types/LogServiceFactory.html +1 -1
- package/docs/static/typedoc/types/OnChangesObject.html +1 -1
- package/docs/static/typedoc/types/SwapModeType.html +1 -1
- package/docs/static/typedoc/types/TController.html +1 -1
- package/docs/static/typedoc/types/UrlChangeListener.html +4 -4
- package/docs/static/typedoc/variables/SwapMode.html +10 -10
- package/legacy.d.ts +0 -82
- package/package.json +2 -2
- package/src/animations/animate-js.js +2 -1
- package/src/animations/animate-queue.js +7 -6
- package/src/core/scope/scope.js +8 -10
- package/src/directive/http/form-router-test.html +44 -0
- package/src/directive/options/options-example.html +7 -3
- package/src/directive/options/options.js +1 -0
- package/src/directive/options/options.spec.js +117 -170
- package/src/interface.ts +21 -3
- package/src/router/directives/view-directive.js +0 -1
- package/src/router/resolve/resolve-context.js +0 -19
- package/src/router/state/state-registry.js +3 -10
- package/src/router/state/state-service.js +5 -5
- package/src/router/transition/transition.js +1 -86
- package/src/router/view-hook.spec.js +1 -1
- package/src/shared/interface.ts +19 -0
- package/src/shared/utils.js +3 -12
- package/tsconfig.types.json +2 -2
- package/@types/core/sanitize/interface.d.ts +0 -10
- package/@types/router/params/param-types.d.ts +0 -36
- package/@types/shared/test-utils.d.ts +0 -18
- package/docs/static/typedoc/classes/NgModule.html +0 -32
- package/src/router/params/README.md +0 -8
|
@@ -10,7 +10,7 @@ export class AnimateQueueProvider {
|
|
|
10
10
|
| string
|
|
11
11
|
| ((
|
|
12
12
|
$rootScope: import("../core/scope/scope.js").Scope,
|
|
13
|
-
$injector:
|
|
13
|
+
$injector: import("../core/di/internal-injector.js").InjectorService,
|
|
14
14
|
$$animation: any,
|
|
15
15
|
$$AnimateRunner: any,
|
|
16
16
|
$templateRequest: any,
|
|
@@ -16,10 +16,6 @@ export function createScope(target?: any, context?: Scope): Scope;
|
|
|
16
16
|
* @property {Object} locals
|
|
17
17
|
*/
|
|
18
18
|
export const $postUpdateQueue: any[];
|
|
19
|
-
/**
|
|
20
|
-
* @type {Function[]}
|
|
21
|
-
*/
|
|
22
|
-
export const $$applyAsyncQueue: Function[];
|
|
23
19
|
export class RootScopeProvider {
|
|
24
20
|
rootScope: Scope;
|
|
25
21
|
$get: (
|
|
@@ -57,6 +53,7 @@ export const NONSCOPE: "$nonscope";
|
|
|
57
53
|
* Scope class for the Proxy. It intercepts operations like property access (get)
|
|
58
54
|
* and property setting (set), and adds support for deep change tracking and
|
|
59
55
|
* observer-like behavior.
|
|
56
|
+
* @extends {Record<string, any>}
|
|
60
57
|
*/
|
|
61
58
|
export class Scope {
|
|
62
59
|
/**
|
package/@types/interface.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { Attributes } from "./core/compile/attributes.js";
|
|
2
|
-
import { Scope } from "./core/scope/scope.js";
|
|
3
|
-
export * from "./core/di/ng-module.js";
|
|
4
1
|
export * from "./services/http/interface.ts";
|
|
5
2
|
export * from "./services/log/interface.ts";
|
|
6
3
|
export * from "./services/log/log.js";
|
|
@@ -9,6 +6,24 @@ export * from "./services/location/location.js";
|
|
|
9
6
|
export * from "./services/pubsub/pubsub.js";
|
|
10
7
|
export * from "./services/template-cache/interface.ts";
|
|
11
8
|
export * from "./services/template-cache/template-cache.js";
|
|
9
|
+
export * from "./index.js";
|
|
10
|
+
import { Attributes } from "./core/compile/attributes.js";
|
|
11
|
+
import { Scope } from "./core/scope/scope.js";
|
|
12
|
+
import { NgModule } from "./core/di/ng-module.js";
|
|
13
|
+
import { PubSubProvider, PubSub } from "./services/pubsub/pubsub.js";
|
|
14
|
+
import type { ErrorHandlingConfig as iErrorHandlingConfig } from "./shared/interface.ts";
|
|
15
|
+
declare global {
|
|
16
|
+
interface Function {
|
|
17
|
+
$inject?: readonly string[] | undefined;
|
|
18
|
+
}
|
|
19
|
+
namespace ng {
|
|
20
|
+
type Scope = typeof Scope;
|
|
21
|
+
type NgModule = typeof NgModule;
|
|
22
|
+
type PubSubProvider = typeof PubSubProvider;
|
|
23
|
+
type PubSub = typeof PubSub;
|
|
24
|
+
type ErrorHandlingConfig = iErrorHandlingConfig;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
12
27
|
/**
|
|
13
28
|
* A JavaScript expression represented as a string, typically used in interpolation bindings.
|
|
14
29
|
*
|
|
@@ -80,8 +80,6 @@ export class ResolveContext {
|
|
|
80
80
|
* @returns {Promise<any>|any}
|
|
81
81
|
*/
|
|
82
82
|
resolvePath(when: string, trans: any): Promise<any> | any;
|
|
83
|
-
injector(): UIInjectorImpl;
|
|
84
|
-
_injector: UIInjectorImpl;
|
|
85
83
|
findNode(resolvable: any): undefined;
|
|
86
84
|
/**
|
|
87
85
|
* Gets the async dependencies of a Resolvable
|
|
@@ -93,10 +91,3 @@ export class ResolveContext {
|
|
|
93
91
|
getDependencies(resolvable: Resolvable): Resolvable[];
|
|
94
92
|
}
|
|
95
93
|
import { Resolvable } from "./resolvable.js";
|
|
96
|
-
declare class UIInjectorImpl {
|
|
97
|
-
native: any;
|
|
98
|
-
get(token: any): any;
|
|
99
|
-
getAsync(token: any): Promise<any>;
|
|
100
|
-
getNative(token: any): any;
|
|
101
|
-
}
|
|
102
|
-
export {};
|
|
@@ -27,8 +27,7 @@ export class StateRegistryProvider {
|
|
|
27
27
|
matcher: StateMatcher;
|
|
28
28
|
builder: StateBuilder;
|
|
29
29
|
stateQueue: StateQueueManager;
|
|
30
|
-
|
|
31
|
-
$get: import("../../interface.ts").AnnotatedFactory;
|
|
30
|
+
$get: (string | (($injector: any) => StateRegistryProvider))[];
|
|
32
31
|
/**
|
|
33
32
|
* This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,
|
|
34
33
|
* `onRetain` callback hooks on a [[StateDeclaration]].
|
|
@@ -9,8 +9,13 @@ export class StateProvider {
|
|
|
9
9
|
*
|
|
10
10
|
* @param {import('../router.js').Router} globals
|
|
11
11
|
* @param {*} transitionService
|
|
12
|
+
* @param {import('../../core/di/internal-injector.js').InjectorService} $injector
|
|
12
13
|
*/
|
|
13
|
-
constructor(
|
|
14
|
+
constructor(
|
|
15
|
+
globals: import("../router.js").Router,
|
|
16
|
+
transitionService: any,
|
|
17
|
+
$injector: import("../../core/di/internal-injector.js").InjectorService,
|
|
18
|
+
);
|
|
14
19
|
/**
|
|
15
20
|
* The latest successful state parameters
|
|
16
21
|
*
|
|
@@ -33,6 +38,7 @@ export class StateProvider {
|
|
|
33
38
|
urlService: any;
|
|
34
39
|
globals: import("../router.js").Router;
|
|
35
40
|
transitionService: any;
|
|
41
|
+
$injector: import("../../core/di/internal-injector.js").InjectorService;
|
|
36
42
|
invalidCallbacks: any[];
|
|
37
43
|
_defaultErrorHandler: ($error$: any) => never;
|
|
38
44
|
$get: () => this;
|
|
@@ -101,71 +101,6 @@ export class Transition implements IHookRegistry {
|
|
|
101
101
|
*/
|
|
102
102
|
is(compare: any): any;
|
|
103
103
|
params(pathname?: string): any;
|
|
104
|
-
paramsChanged(): any;
|
|
105
|
-
/**
|
|
106
|
-
* Creates a [[UIInjector]] Dependency Injector
|
|
107
|
-
*
|
|
108
|
-
* Returns a Dependency Injector for the Transition's target state (to state).
|
|
109
|
-
* The injector provides resolve values which the target state has access to.
|
|
110
|
-
*
|
|
111
|
-
* The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).
|
|
112
|
-
*
|
|
113
|
-
* #### Example:
|
|
114
|
-
* ```js
|
|
115
|
-
* .onEnter({ entering: 'myState' }, trans => {
|
|
116
|
-
* var myResolveValue = trans.injector().get('myResolve');
|
|
117
|
-
* // Inject a global service from the global/native injector (if it exists)
|
|
118
|
-
* var MyService = trans.injector().get('MyService');
|
|
119
|
-
* })
|
|
120
|
-
* ```
|
|
121
|
-
*
|
|
122
|
-
* In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.
|
|
123
|
-
* You can use [[UIInjector.getAsync]] to get a promise for the data.
|
|
124
|
-
* #### Example:
|
|
125
|
-
* ```js
|
|
126
|
-
* .onBefore({}, trans => {
|
|
127
|
-
* return trans.injector().getAsync('myResolve').then(myResolveValue =>
|
|
128
|
-
* return myResolveValue !== 'ABORT';
|
|
129
|
-
* });
|
|
130
|
-
* });
|
|
131
|
-
* ```
|
|
132
|
-
*
|
|
133
|
-
* If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.
|
|
134
|
-
* This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`.
|
|
135
|
-
* #### Example:
|
|
136
|
-
* ```js
|
|
137
|
-
* .onEnter({ to: 'foo.bar' }, trans => {
|
|
138
|
-
* // returns result of `foo` state's `myResolve` resolve
|
|
139
|
-
* // even though `foo.bar` also has a `myResolve` resolve
|
|
140
|
-
* var fooData = trans.injector('foo').get('myResolve');
|
|
141
|
-
* });
|
|
142
|
-
* ```
|
|
143
|
-
*
|
|
144
|
-
* If you need resolve data from the exiting states, pass `'from'` as `pathName`.
|
|
145
|
-
* The resolve data from the `from` path will be returned.
|
|
146
|
-
* #### Example:
|
|
147
|
-
* ```js
|
|
148
|
-
* .onExit({ exiting: 'foo.bar' }, trans => {
|
|
149
|
-
* // Gets the resolve value of `myResolve` from the state being exited
|
|
150
|
-
* var fooData = trans.injector(null, 'from').get('myResolve');
|
|
151
|
-
* });
|
|
152
|
-
* ```
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* @param state Limits the resolves provided to only the resolves the provided state has access to.
|
|
156
|
-
* @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.
|
|
157
|
-
*
|
|
158
|
-
* @returns a [[UIInjector]]
|
|
159
|
-
*/
|
|
160
|
-
injector(
|
|
161
|
-
state: any,
|
|
162
|
-
pathName?: string,
|
|
163
|
-
): {
|
|
164
|
-
native: any;
|
|
165
|
-
get(token: any): any;
|
|
166
|
-
getAsync(token: any): Promise<any>;
|
|
167
|
-
getNative(token: any): any;
|
|
168
|
-
};
|
|
169
104
|
/**
|
|
170
105
|
* Gets all available resolve tokens (keys)
|
|
171
106
|
*
|
|
@@ -1,2 +1,19 @@
|
|
|
1
1
|
export type Predicate<X> = (x?: X) => boolean;
|
|
2
2
|
export type PredicateBinary<X, Y> = (x?: X, y?: Y) => boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Error configuration object. May only contain the options that need to be updated.
|
|
5
|
+
*/
|
|
6
|
+
export interface ErrorHandlingConfig {
|
|
7
|
+
/**
|
|
8
|
+
* The max depth for stringifying objects.
|
|
9
|
+
* Setting to a non-positive or non-numeric value removes the max depth limit.
|
|
10
|
+
* Default: 5.
|
|
11
|
+
*/
|
|
12
|
+
objectMaxDepth?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Specifies whether the generated error URL will contain the parameters
|
|
15
|
+
* of the thrown error. Default: true.
|
|
16
|
+
* When used without argument, it returns the current value.
|
|
17
|
+
*/
|
|
18
|
+
urlErrorParamsEnabled?: boolean;
|
|
19
|
+
}
|
package/@types/shared/utils.d.ts
CHANGED
|
@@ -442,12 +442,12 @@ export function assertArgFn(
|
|
|
442
442
|
*
|
|
443
443
|
* Omitted or undefined options will leave the corresponding configuration values unchanged.
|
|
444
444
|
*
|
|
445
|
-
* @param {ErrorHandlingConfig} [config]
|
|
446
|
-
* @returns {ErrorHandlingConfig}
|
|
445
|
+
* @param {import("./interface.ts").ErrorHandlingConfig} [config]
|
|
446
|
+
* @returns {import("./interface.ts").ErrorHandlingConfig}
|
|
447
447
|
*/
|
|
448
448
|
export function errorHandlingConfig(
|
|
449
|
-
config?: ErrorHandlingConfig,
|
|
450
|
-
): ErrorHandlingConfig;
|
|
449
|
+
config?: import("./interface.ts").ErrorHandlingConfig,
|
|
450
|
+
): import("./interface.ts").ErrorHandlingConfig;
|
|
451
451
|
/**
|
|
452
452
|
* This object provides a utility for producing rich Error messages within
|
|
453
453
|
* AngularTS. It can be called as follows:
|
|
@@ -573,18 +573,3 @@ export function wait(t?: number): Promise<void>;
|
|
|
573
573
|
export function startsWith(str: string, search: string): boolean;
|
|
574
574
|
export const isProxySymbol: unique symbol;
|
|
575
575
|
export const ngAttrPrefixes: string[];
|
|
576
|
-
/**
|
|
577
|
-
* Error configuration object. May only contain the options that need to be updated.
|
|
578
|
-
*/
|
|
579
|
-
export type ErrorHandlingConfig = {
|
|
580
|
-
/**
|
|
581
|
-
* - The max depth for stringifying objects. Setting to a
|
|
582
|
-
* non-positive or non-numeric value removes the max depth limit. Default: 5.
|
|
583
|
-
*/
|
|
584
|
-
objectMaxDepth?: number | undefined;
|
|
585
|
-
/**
|
|
586
|
-
* - Specifies whether the generated error URL will
|
|
587
|
-
* contain the parameters of the thrown error. Default: true. When used without argument, it returns the current value.
|
|
588
|
-
*/
|
|
589
|
-
urlErrorParamsEnabled?: boolean | undefined;
|
|
590
|
-
};
|
package/dist/angular-ts.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Version: 0.9.
|
|
1
|
+
/* Version: 0.9.2 - October 9, 2025 19:13:01 */
|
|
2
2
|
const VALID_CLASS = "ng-valid";
|
|
3
3
|
const INVALID_CLASS = "ng-invalid";
|
|
4
4
|
const PRISTINE_CLASS = "ng-pristine";
|
|
@@ -906,16 +906,7 @@ function assertArgFn(arg, name, acceptArrayAnnotation) {
|
|
|
906
906
|
return arg;
|
|
907
907
|
}
|
|
908
908
|
|
|
909
|
-
/**
|
|
910
|
-
* @typedef {Object} ErrorHandlingConfig
|
|
911
|
-
* Error configuration object. May only contain the options that need to be updated.
|
|
912
|
-
* @property {number=} objectMaxDepth - The max depth for stringifying objects. Setting to a
|
|
913
|
-
* non-positive or non-numeric value removes the max depth limit. Default: 5.
|
|
914
|
-
* @property {boolean=} urlErrorParamsEnabled - Specifies whether the generated error URL will
|
|
915
|
-
* contain the parameters of the thrown error. Default: true. When used without argument, it returns the current value.
|
|
916
|
-
*/
|
|
917
|
-
|
|
918
|
-
/** @type {ErrorHandlingConfig} */
|
|
909
|
+
/** @type {import("./interface.js").ErrorHandlingConfig} */
|
|
919
910
|
const minErrConfig = {
|
|
920
911
|
objectMaxDepth: 5,
|
|
921
912
|
urlErrorParamsEnabled: true,
|
|
@@ -927,8 +918,8 @@ const minErrConfig = {
|
|
|
927
918
|
*
|
|
928
919
|
* Omitted or undefined options will leave the corresponding configuration values unchanged.
|
|
929
920
|
*
|
|
930
|
-
* @param {ErrorHandlingConfig} [config]
|
|
931
|
-
* @returns {ErrorHandlingConfig}
|
|
921
|
+
* @param {import("./interface.ts").ErrorHandlingConfig} [config]
|
|
922
|
+
* @returns {import("./interface.ts").ErrorHandlingConfig}
|
|
932
923
|
*/
|
|
933
924
|
function errorHandlingConfig(config) {
|
|
934
925
|
if (isObject(config)) {
|
|
@@ -12386,6 +12377,7 @@ const optGroupTemplate = document.createElement("optgroup");
|
|
|
12386
12377
|
|
|
12387
12378
|
const NG_OPTIONS_REGEXP =
|
|
12388
12379
|
/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/;
|
|
12380
|
+
|
|
12389
12381
|
// 1: value expression (valueFn)
|
|
12390
12382
|
// 2: label expression (displayFn)
|
|
12391
12383
|
// 3: group by expression (groupByFn)
|
|
@@ -20213,6 +20205,7 @@ const NONSCOPE = "$nonscope";
|
|
|
20213
20205
|
* Scope class for the Proxy. It intercepts operations like property access (get)
|
|
20214
20206
|
* and property setting (set), and adds support for deep change tracking and
|
|
20215
20207
|
* observer-like behavior.
|
|
20208
|
+
* @extends {Record<string, any>}
|
|
20216
20209
|
*/
|
|
20217
20210
|
class Scope {
|
|
20218
20211
|
/**
|
|
@@ -20628,6 +20621,7 @@ class Scope {
|
|
|
20628
20621
|
return true;
|
|
20629
20622
|
}
|
|
20630
20623
|
|
|
20624
|
+
/** @internal **/
|
|
20631
20625
|
#checkeListenersForAllKeys(value) {
|
|
20632
20626
|
if (isUndefined(value)) {
|
|
20633
20627
|
return;
|
|
@@ -20967,6 +20961,7 @@ class Scope {
|
|
|
20967
20961
|
return proxy;
|
|
20968
20962
|
}
|
|
20969
20963
|
|
|
20964
|
+
/** @internal **/
|
|
20970
20965
|
#registerKey(key, listener) {
|
|
20971
20966
|
if (this.watchers.has(key)) {
|
|
20972
20967
|
this.watchers.get(key).push(listener);
|
|
@@ -20975,6 +20970,7 @@ class Scope {
|
|
|
20975
20970
|
}
|
|
20976
20971
|
}
|
|
20977
20972
|
|
|
20973
|
+
/** @internal **/
|
|
20978
20974
|
#registerForeignKey(key, listener) {
|
|
20979
20975
|
if (this.foreignListeners.has(key)) {
|
|
20980
20976
|
this.foreignListeners.get(key).push(listener);
|
|
@@ -21106,7 +21102,8 @@ class Scope {
|
|
|
21106
21102
|
}
|
|
21107
21103
|
|
|
21108
21104
|
/**
|
|
21109
|
-
* @
|
|
21105
|
+
* @internal
|
|
21106
|
+
* @returns {any}
|
|
21110
21107
|
*/
|
|
21111
21108
|
#eventHelper({ name, event, broadcast }, ...args) {
|
|
21112
21109
|
if (!broadcast) {
|
|
@@ -21187,6 +21184,7 @@ class Scope {
|
|
|
21187
21184
|
}
|
|
21188
21185
|
|
|
21189
21186
|
/**
|
|
21187
|
+
* @internal
|
|
21190
21188
|
* @returns {boolean}
|
|
21191
21189
|
*/
|
|
21192
21190
|
#isRoot() {
|
|
@@ -21221,6 +21219,7 @@ class Scope {
|
|
|
21221
21219
|
}
|
|
21222
21220
|
|
|
21223
21221
|
/**
|
|
21222
|
+
* @internal
|
|
21224
21223
|
* @param {Listener} listener - The property path that was changed.
|
|
21225
21224
|
*/
|
|
21226
21225
|
#notifyListener(listener, target) {
|
|
@@ -23256,15 +23255,15 @@ function AnimateQueueProvider($animateProvider) {
|
|
|
23256
23255
|
});
|
|
23257
23256
|
|
|
23258
23257
|
this.$get = [
|
|
23259
|
-
|
|
23260
|
-
|
|
23261
|
-
|
|
23262
|
-
|
|
23263
|
-
|
|
23258
|
+
$injectTokens.$rootScope,
|
|
23259
|
+
$injectTokens.$injector,
|
|
23260
|
+
$injectTokens.$$animation,
|
|
23261
|
+
$injectTokens.$$AnimateRunner,
|
|
23262
|
+
$injectTokens.$templateRequest,
|
|
23264
23263
|
/**
|
|
23265
23264
|
*
|
|
23266
23265
|
* @param {import('../core/scope/scope.js').Scope} $rootScope
|
|
23267
|
-
* @param {
|
|
23266
|
+
* @param {import('../core/di/internal-injector.js').InjectorService} $injector
|
|
23268
23267
|
* @param {*} $$animation
|
|
23269
23268
|
* @param {*} $$AnimateRunner
|
|
23270
23269
|
* @param {*} $templateRequest
|
|
@@ -23977,7 +23976,7 @@ function AnimateQueueProvider($animateProvider) {
|
|
|
23977
23976
|
AnimateJsProvider.$inject = ["$animateProvider"];
|
|
23978
23977
|
function AnimateJsProvider($animateProvider) {
|
|
23979
23978
|
this.$get = [
|
|
23980
|
-
|
|
23979
|
+
$injectTokens.$injector,
|
|
23981
23980
|
"$$AnimateRunner",
|
|
23982
23981
|
/**
|
|
23983
23982
|
*
|
|
@@ -25835,20 +25834,6 @@ const anyTrueR = (memo, elem) => memo || elem;
|
|
|
25835
25834
|
* ```
|
|
25836
25835
|
*/
|
|
25837
25836
|
const unnestR = (memo, elem) => memo.concat(elem);
|
|
25838
|
-
/**
|
|
25839
|
-
* Reduce function which recursively un-nests all arrays
|
|
25840
|
-
*
|
|
25841
|
-
* @example
|
|
25842
|
-
* ```
|
|
25843
|
-
*
|
|
25844
|
-
* let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ];
|
|
25845
|
-
* input.reduce(unnestR, []) // [ "a", "b", "c", "d", "double, "nested" ]
|
|
25846
|
-
* ```
|
|
25847
|
-
*/
|
|
25848
|
-
const flattenR = (memo, elem) =>
|
|
25849
|
-
Array.isArray(elem)
|
|
25850
|
-
? memo.concat(elem.reduce(flattenR, []))
|
|
25851
|
-
: pushR(memo, elem);
|
|
25852
25837
|
/**
|
|
25853
25838
|
* Reduce function that pushes an object to an array, then returns the array.
|
|
25854
25839
|
* Mostly just for [[flattenR]] and [[uniqR]]
|
|
@@ -27949,10 +27934,6 @@ class ResolveContext {
|
|
|
27949
27934
|
return Promise.all(promises);
|
|
27950
27935
|
}
|
|
27951
27936
|
|
|
27952
|
-
injector() {
|
|
27953
|
-
return this._injector || (this._injector = new UIInjectorImpl());
|
|
27954
|
-
}
|
|
27955
|
-
|
|
27956
27937
|
findNode(resolvable) {
|
|
27957
27938
|
return find(this._path, (node) => node.resolvables.includes(resolvable));
|
|
27958
27939
|
}
|
|
@@ -27987,21 +27968,6 @@ class ResolveContext {
|
|
|
27987
27968
|
}
|
|
27988
27969
|
}
|
|
27989
27970
|
|
|
27990
|
-
class UIInjectorImpl {
|
|
27991
|
-
constructor() {
|
|
27992
|
-
this.native = window["angular"].$injector;
|
|
27993
|
-
}
|
|
27994
|
-
get(token) {
|
|
27995
|
-
return window["angular"].$injector.get(token);
|
|
27996
|
-
}
|
|
27997
|
-
getAsync(token) {
|
|
27998
|
-
return Promise.resolve(window["angular"].$injector.get(token));
|
|
27999
|
-
}
|
|
28000
|
-
getNative(token) {
|
|
28001
|
-
return window["angular"].$injector.get(token);
|
|
28002
|
-
}
|
|
28003
|
-
}
|
|
28004
|
-
|
|
28005
27971
|
function getViewConfigFactory() {
|
|
28006
27972
|
let templateFactory = null;
|
|
28007
27973
|
return (path, view) => {
|
|
@@ -29703,90 +29669,7 @@ class Transition {
|
|
|
29703
29669
|
.reduce((acc, obj) => ({ ...acc, ...obj }), {}),
|
|
29704
29670
|
);
|
|
29705
29671
|
}
|
|
29706
|
-
|
|
29707
|
-
const fromParams = this.params("from");
|
|
29708
|
-
const toParams = this.params("to");
|
|
29709
|
-
// All the parameters declared on both the "to" and "from" paths
|
|
29710
|
-
const allParamDescriptors = []
|
|
29711
|
-
.concat(this._treeChanges.to)
|
|
29712
|
-
.concat(this._treeChanges.from)
|
|
29713
|
-
.map((pathNode) => pathNode.paramSchema)
|
|
29714
|
-
.reduce(flattenR, [])
|
|
29715
|
-
.reduce(uniqR, []);
|
|
29716
|
-
const changedParamDescriptors = Param.changed(
|
|
29717
|
-
allParamDescriptors,
|
|
29718
|
-
fromParams,
|
|
29719
|
-
toParams,
|
|
29720
|
-
);
|
|
29721
|
-
return changedParamDescriptors.reduce((changedValues, descriptor) => {
|
|
29722
|
-
changedValues[descriptor.id] = toParams[descriptor.id];
|
|
29723
|
-
return changedValues;
|
|
29724
|
-
}, {});
|
|
29725
|
-
}
|
|
29726
|
-
/**
|
|
29727
|
-
* Creates a [[UIInjector]] Dependency Injector
|
|
29728
|
-
*
|
|
29729
|
-
* Returns a Dependency Injector for the Transition's target state (to state).
|
|
29730
|
-
* The injector provides resolve values which the target state has access to.
|
|
29731
|
-
*
|
|
29732
|
-
* The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).
|
|
29733
|
-
*
|
|
29734
|
-
* #### Example:
|
|
29735
|
-
* ```js
|
|
29736
|
-
* .onEnter({ entering: 'myState' }, trans => {
|
|
29737
|
-
* var myResolveValue = trans.injector().get('myResolve');
|
|
29738
|
-
* // Inject a global service from the global/native injector (if it exists)
|
|
29739
|
-
* var MyService = trans.injector().get('MyService');
|
|
29740
|
-
* })
|
|
29741
|
-
* ```
|
|
29742
|
-
*
|
|
29743
|
-
* In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.
|
|
29744
|
-
* You can use [[UIInjector.getAsync]] to get a promise for the data.
|
|
29745
|
-
* #### Example:
|
|
29746
|
-
* ```js
|
|
29747
|
-
* .onBefore({}, trans => {
|
|
29748
|
-
* return trans.injector().getAsync('myResolve').then(myResolveValue =>
|
|
29749
|
-
* return myResolveValue !== 'ABORT';
|
|
29750
|
-
* });
|
|
29751
|
-
* });
|
|
29752
|
-
* ```
|
|
29753
|
-
*
|
|
29754
|
-
* If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.
|
|
29755
|
-
* This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`.
|
|
29756
|
-
* #### Example:
|
|
29757
|
-
* ```js
|
|
29758
|
-
* .onEnter({ to: 'foo.bar' }, trans => {
|
|
29759
|
-
* // returns result of `foo` state's `myResolve` resolve
|
|
29760
|
-
* // even though `foo.bar` also has a `myResolve` resolve
|
|
29761
|
-
* var fooData = trans.injector('foo').get('myResolve');
|
|
29762
|
-
* });
|
|
29763
|
-
* ```
|
|
29764
|
-
*
|
|
29765
|
-
* If you need resolve data from the exiting states, pass `'from'` as `pathName`.
|
|
29766
|
-
* The resolve data from the `from` path will be returned.
|
|
29767
|
-
* #### Example:
|
|
29768
|
-
* ```js
|
|
29769
|
-
* .onExit({ exiting: 'foo.bar' }, trans => {
|
|
29770
|
-
* // Gets the resolve value of `myResolve` from the state being exited
|
|
29771
|
-
* var fooData = trans.injector(null, 'from').get('myResolve');
|
|
29772
|
-
* });
|
|
29773
|
-
* ```
|
|
29774
|
-
*
|
|
29775
|
-
*
|
|
29776
|
-
* @param state Limits the resolves provided to only the resolves the provided state has access to.
|
|
29777
|
-
* @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.
|
|
29778
|
-
*
|
|
29779
|
-
* @returns a [[UIInjector]]
|
|
29780
|
-
*/
|
|
29781
|
-
injector(state, pathName = "to") {
|
|
29782
|
-
let path = this._treeChanges[pathName];
|
|
29783
|
-
if (state)
|
|
29784
|
-
path = PathUtils.subPath(
|
|
29785
|
-
path,
|
|
29786
|
-
(node) => node.state === state || node.state.name === state,
|
|
29787
|
-
);
|
|
29788
|
-
return new ResolveContext(path).injector();
|
|
29789
|
-
}
|
|
29672
|
+
|
|
29790
29673
|
/**
|
|
29791
29674
|
* Gets all available resolve tokens (keys)
|
|
29792
29675
|
*
|
|
@@ -31019,19 +30902,20 @@ class StateProvider {
|
|
|
31019
30902
|
return this.globals.$current;
|
|
31020
30903
|
}
|
|
31021
30904
|
|
|
31022
|
-
|
|
30905
|
+
static $inject = ["$routerProvider", "$transitionsProvider"];
|
|
31023
30906
|
|
|
31024
|
-
// Needs access to urlService, stateRegistry
|
|
31025
30907
|
/**
|
|
31026
30908
|
*
|
|
31027
30909
|
* @param {import('../router.js').Router} globals
|
|
31028
30910
|
* @param {*} transitionService
|
|
30911
|
+
* @param {import('../../core/di/internal-injector.js').InjectorService} $injector
|
|
31029
30912
|
*/
|
|
31030
|
-
constructor(globals, transitionService) {
|
|
30913
|
+
constructor(globals, transitionService, $injector) {
|
|
31031
30914
|
this.stateRegistry = undefined;
|
|
31032
30915
|
this.urlService = undefined;
|
|
31033
30916
|
this.globals = globals;
|
|
31034
30917
|
this.transitionService = transitionService;
|
|
30918
|
+
this.$injector = $injector;
|
|
31035
30919
|
this.invalidCallbacks = [];
|
|
31036
30920
|
|
|
31037
30921
|
this._defaultErrorHandler = function $defaultErrorHandler($error$) {
|
|
@@ -31188,7 +31072,7 @@ class StateProvider {
|
|
|
31188
31072
|
const latest = latestThing();
|
|
31189
31073
|
/** @type {Queue<Function>} */
|
|
31190
31074
|
const callbackQueue = new Queue(this.invalidCallbacks.slice());
|
|
31191
|
-
const injector =
|
|
31075
|
+
const injector = this.$injector;
|
|
31192
31076
|
const checkForRedirect = (result) => {
|
|
31193
31077
|
if (!(result instanceof TargetState)) {
|
|
31194
31078
|
return;
|
|
@@ -34116,12 +34000,7 @@ class StateQueueManager {
|
|
|
34116
34000
|
*
|
|
34117
34001
|
*/
|
|
34118
34002
|
class StateRegistryProvider {
|
|
34119
|
-
|
|
34120
|
-
$injectTokens.$url,
|
|
34121
|
-
$injectTokens.$state,
|
|
34122
|
-
$injectTokens.$router,
|
|
34123
|
-
$injectTokens.$view,
|
|
34124
|
-
]);
|
|
34003
|
+
static $inject = provider([$injectTokens.$url, $injectTokens.$state, $injectTokens.$router, $injectTokens.$view]);
|
|
34125
34004
|
|
|
34126
34005
|
/**
|
|
34127
34006
|
* @param urlService
|
|
@@ -34160,11 +34039,9 @@ class StateRegistryProvider {
|
|
|
34160
34039
|
globals.current = globals.$current.self;
|
|
34161
34040
|
}
|
|
34162
34041
|
|
|
34163
|
-
/** @type {import('../../interface.ts').AnnotatedFactory} */
|
|
34164
34042
|
$get = [
|
|
34165
|
-
|
|
34043
|
+
$injectTokens.$injector,
|
|
34166
34044
|
/**
|
|
34167
|
-
*
|
|
34168
34045
|
* @param {import("../../core/di/internal-injector").InjectorService} $injector
|
|
34169
34046
|
* @returns {StateRegistryProvider}
|
|
34170
34047
|
*/
|
|
@@ -35825,7 +35702,7 @@ class Angular {
|
|
|
35825
35702
|
/**
|
|
35826
35703
|
* @type {string} `version` from `package.json`
|
|
35827
35704
|
*/
|
|
35828
|
-
this.version = "0.9.
|
|
35705
|
+
this.version = "0.9.2"; //inserted via rollup plugin
|
|
35829
35706
|
|
|
35830
35707
|
/** @type {!Array<string|any>} */
|
|
35831
35708
|
this.bootsrappedModules = [];
|