@angular-wave/angular.ts 0.7.5 → 0.7.8
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/raf-scheduler.d.ts +2 -2
- package/@types/animations/shared.d.ts +0 -1
- package/@types/core/compile/attributes.d.ts +3 -3
- package/@types/core/compile/compile.d.ts +1 -1
- package/@types/core/di/injector.d.ts +0 -1
- package/@types/core/di/internal-injector.d.ts +1 -0
- package/@types/core/di/ng-module.d.ts +5 -0
- package/@types/core/filter/filter.d.ts +11 -13
- package/@types/core/sanitize/sanitize-uri.d.ts +3 -6
- package/@types/core/scope/scope.d.ts +1 -3
- package/@types/directive/attrs/attrs.d.ts +7 -1
- package/@types/directive/events/events.d.ts +9 -3
- package/@types/directive/http/http.d.ts +6 -2
- package/@types/directive/include/include.d.ts +2 -2
- package/@types/directive/input/input.d.ts +2 -12
- package/@types/directive/messages/messages.d.ts +9 -48
- package/@types/directive/model/model.d.ts +3 -3
- package/@types/directive/options/options.d.ts +13 -20
- package/@types/directive/setter/setter.d.ts +2 -2
- package/@types/directive/switch/switch.d.ts +1 -0
- package/@types/directive/transclude/transclude.d.ts +10 -6
- package/@types/interface.d.ts +54 -18
- package/@types/router/common/glob.d.ts +5 -1
- package/@types/router/directives/view-directive.d.ts +2 -19
- package/@types/router/globals.d.ts +1 -2
- package/@types/router/state/state-registry.d.ts +1 -2
- package/@types/router/url/url-service.d.ts +7 -9
- package/@types/services/anchor-scroll.d.ts +1 -1
- package/@types/{core → services/exception}/exception-handler.d.ts +4 -4
- package/@types/{core/error-handler.d.ts → services/exception/interface.d.ts} +1 -1
- package/@types/services/http/http.d.ts +0 -2
- package/@types/services/http/interface.d.ts +2 -2
- package/@types/services/http-backend/http-backend.d.ts +13 -21
- package/@types/services/location/interface.d.ts +8 -0
- package/@types/{core → services}/location/location.d.ts +52 -12
- package/@types/{core → services}/sce/sce.d.ts +1 -1
- package/@types/services/template-cache/interface.d.ts +8 -2
- package/@types/services/template-cache/template-cache.d.ts +1 -1
- package/@types/services/template-request.d.ts +1 -1
- package/@types/shared/cache.d.ts +0 -2
- package/@types/shared/dom.d.ts +6 -0
- package/@types/shared/test-utils.d.ts +1 -0
- package/@types/shared/url-utils/interface.d.ts +47 -0
- package/@types/{core → shared}/url-utils/url-utils.d.ts +26 -13
- package/@types/shared/utils.d.ts +23 -0
- package/Makefile +3 -2
- package/dist/angular-ts.esm.js +1188 -1364
- package/dist/angular-ts.umd.js +1188 -1364
- package/dist/angular-ts.umd.min.js +1 -1
- package/docs/assets/scss/index.scss +12 -0
- package/docs/content/_index.md +15 -4
- package/docs/content/docs/directive/bind.md +72 -0
- package/docs/content/docs/directive/click.md +3 -0
- package/docs/content/docs/directive/dblclick.md +3 -0
- package/docs/content/docs/directive/get.md +203 -0
- package/docs/content/docs/directive/keydown.md +38 -0
- package/docs/content/docs/directive/keyup.md +38 -0
- package/docs/content/docs/directive/load.md +43 -0
- package/docs/content/docs/provider/templateCacheProvider.md +66 -1
- package/docs/content/docs/service/templateCache.md +2 -2
- package/docs/layouts/partials/hooks/head-end.html +1 -1
- package/docs/layouts/shortcodes/showcss.html +2 -0
- package/docs/static/examples/ng-bind/ng-bind.html +9 -0
- package/docs/static/examples/ng-keydown/ng-keydown.html +9 -0
- package/docs/static/examples/ng-keyup/ng-keyup.html +9 -0
- package/docs/static/examples/ng-load/ng-load.html +8 -0
- 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 +32 -0
- package/docs/static/typedoc/classes/TemplateCacheProvider.html +1 -1
- package/docs/static/typedoc/hierarchy.html +1 -1
- package/docs/static/typedoc/index.html +1 -1
- package/docs/static/typedoc/interfaces/Directive.html +5 -4
- package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +1 -1
- package/docs/static/typedoc/interfaces/HttpResponse.html +2 -3
- package/docs/static/typedoc/interfaces/Provider.html +15 -10
- package/docs/static/typedoc/interfaces/RequestConfig.html +1 -1
- package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +1 -1
- package/docs/static/typedoc/interfaces/TemplateCache.html +7 -0
- package/docs/static/typedoc/types/AnnotatedDirectiveFactory.html +1 -0
- package/docs/static/typedoc/types/DirectiveFactory.html +1 -2
- package/docs/static/typedoc/types/DirectiveFactoryFn.html +1 -0
- package/docs/static/typedoc/types/HttpResponseStatus.html +1 -0
- package/docs/static/typedoc/types/{TemplateCache.html → SwapModeType.html} +1 -1
- package/docs/static/typedoc/variables/SwapMode.html +11 -0
- package/legacy.d.ts +0 -14
- package/package.json +1 -3
- package/src/animations/animate-children-directive.js +2 -2
- package/src/animations/raf-scheduler.js +1 -1
- package/src/animations/shared.js +0 -9
- package/src/core/compile/attributes.js +1 -1
- package/src/core/compile/compile.js +3 -3
- package/src/core/di/injector.js +4 -17
- package/src/core/di/internal-injector.js +4 -1
- package/src/core/di/ng-module.js +12 -27
- package/src/core/filter/filter.js +28 -28
- package/src/core/parse/interpreter.js +32 -38
- package/src/core/sanitize/sanitize-uri.js +3 -3
- package/src/core/scope/scope.js +2 -7
- package/src/directive/attrs/attrs.js +7 -4
- package/src/directive/bind/bind.js +16 -4
- package/src/directive/bind/bind.spec.js +13 -0
- package/src/directive/events/events.js +7 -3
- package/src/directive/events/events.md +0 -41
- package/src/directive/http/delete.spec.js +2 -0
- package/src/directive/http/get.spec.js +280 -3
- package/src/directive/http/http.js +100 -12
- package/src/directive/http/http.test.js +2 -2
- package/src/directive/http/post.spec.js +2 -0
- package/src/directive/http/put.spec.js +2 -0
- package/src/directive/include/include.js +7 -7
- package/src/directive/input/input.js +6 -28
- package/src/directive/messages/messages.js +5 -1
- package/src/directive/model/model.js +1 -1
- package/src/directive/options/options.js +454 -464
- package/src/directive/repeat/repeat.js +175 -153
- package/src/directive/setter/setter.js +13 -15
- package/src/directive/setter/setter.spec.js +39 -16
- package/src/directive/switch/switch.js +1 -0
- package/src/directive/switch/switch.spec.js +1 -1
- package/src/directive/transclude/transclude.js +87 -89
- package/src/injection-tokens.js +1 -1
- package/src/interface.ts +68 -19
- package/src/loader.js +4 -9
- package/src/public.js +9 -15
- package/src/router/common/glob.js +5 -0
- package/src/router/directives/state-directives.js +4 -6
- package/src/router/directives/state-directives.spec.js +1 -1
- package/src/router/directives/view-directive.js +9 -1
- package/src/router/globals.js +0 -1
- package/src/router/state/state-registry.js +0 -1
- package/src/router/state-filters.js +2 -2
- package/src/router/url/url-service.js +5 -9
- package/src/services/anchor-scroll.html +0 -7
- package/src/services/anchor-scroll.js +2 -2
- package/src/{core → services/exception}/exception-handler.js +2 -2
- package/src/{core/error-handler.ts → services/exception/interface.ts} +1 -1
- package/src/services/http/http.js +2 -13
- package/src/services/http/interface.ts +2 -2
- package/src/services/http-backend/http-backend.js +4 -14
- package/src/services/http-backend/http-backend.spec.js +1 -4
- package/src/services/location/interface.ts +8 -0
- package/src/{core → services}/location/location.html +4 -1
- package/src/{core → services}/location/location.js +129 -27
- package/src/{core → services}/location/location.spec.js +2 -2
- package/src/{core → services}/location/location.test.js +1 -1
- package/src/{core → services}/sce/sce.html +1 -1
- package/src/{core → services}/sce/sce.js +9 -3
- package/src/{core → services}/sce/sce.spec.js +2 -3
- package/src/{core → services}/sce/sce.test.js +1 -1
- package/src/services/template-cache/interface.ts +8 -2
- package/src/services/template-cache/template-cache.js +3 -1
- package/src/services/template-cache/template-cache.spec.js +72 -0
- package/src/services/template-request.js +2 -1
- package/src/shared/cache.js +0 -2
- package/src/shared/dom.js +10 -0
- package/src/shared/test-utils.js +1 -0
- package/src/shared/url-utils/interface.ts +56 -0
- package/src/{core → shared}/url-utils/url-utils.html +4 -1
- package/src/{core → shared}/url-utils/url-utils.js +26 -23
- package/src/{core → shared}/url-utils/url-utils.spec.js +0 -8
- package/src/{core → shared}/url-utils/url-utils.test.js +1 -1
- package/src/shared/utils.js +47 -1
- package/utils/express.js +9 -1
- package/@types/core/task-tracker-factory.d.ts +0 -76
- package/@types/services/browser.d.ts +0 -101
- package/docs/static/typedoc/types/SwapInsertPosition.html +0 -2
- package/jsdoc.json +0 -22
- package/src/core/task-tracker-factory.js +0 -145
- package/src/services/browser.js +0 -212
- /package/src/{core → services}/location/location.md +0 -0
- /package/src/{core → services}/sce/sce.md +0 -0
- /package/src/{core → shared}/url-utils/url-utils.md +0 -0
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Service provider that creates a requestAnimationFrame-based scheduler.
|
|
7
|
-
* @
|
|
7
|
+
* @type {ServiceProvider}
|
|
8
8
|
*/
|
|
9
|
-
export class RafSchedulerProvider
|
|
9
|
+
export class RafSchedulerProvider {
|
|
10
10
|
/**
|
|
11
11
|
* Internal task queue, where each item is an array of functions to run.
|
|
12
12
|
* @type {Array<Array<() => void>>}
|
|
@@ -6,7 +6,7 @@ export class Attributes implements Record<string, any> {
|
|
|
6
6
|
/**
|
|
7
7
|
* @param {import('../scope/scope.js').Scope} $rootScope
|
|
8
8
|
* @param {*} $animate
|
|
9
|
-
* @param {import("
|
|
9
|
+
* @param {import("../../services/exception/exception-handler.js").ErrorHandler} $exceptionHandler
|
|
10
10
|
* @param {*} $sce
|
|
11
11
|
* @param {import("../../shared/noderef.js").NodeRef} [nodeRef]
|
|
12
12
|
* @param {Object} [attributesToCopy]
|
|
@@ -14,14 +14,14 @@ export class Attributes implements Record<string, any> {
|
|
|
14
14
|
constructor(
|
|
15
15
|
$rootScope: import("../scope/scope.js").Scope,
|
|
16
16
|
$animate: any,
|
|
17
|
-
$exceptionHandler: import("
|
|
17
|
+
$exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
|
|
18
18
|
$sce: any,
|
|
19
19
|
nodeRef?: import("../../shared/noderef.js").NodeRef,
|
|
20
20
|
attributesToCopy?: any,
|
|
21
21
|
);
|
|
22
22
|
$rootScope: import("../scope/scope.js").Scope;
|
|
23
23
|
$animate: any;
|
|
24
|
-
$exceptionHandler: import("
|
|
24
|
+
$exceptionHandler: import("../../services/exception/interface.ts").Interface;
|
|
25
25
|
$sce: any;
|
|
26
26
|
$attr: {};
|
|
27
27
|
/** @type {import("../../shared/noderef.js").NodeRef} */
|
|
@@ -123,7 +123,7 @@ export class CompileProvider {
|
|
|
123
123
|
| ((
|
|
124
124
|
$injector: import("../../core/di/internal-injector.js").InjectorService,
|
|
125
125
|
$interpolate: any,
|
|
126
|
-
$exceptionHandler: import("
|
|
126
|
+
$exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
|
|
127
127
|
$templateRequest: any,
|
|
128
128
|
$parse: import("../parse/interface.ts").ParseService,
|
|
129
129
|
$controller: any,
|
|
@@ -23,6 +23,7 @@ export class InjectorService extends AbstractInjector {
|
|
|
23
23
|
* @param {boolean} strictDi - Indicates if strict dependency injection is enforced.
|
|
24
24
|
*/
|
|
25
25
|
constructor(providerInjector: ProviderInjector, strictDi: boolean);
|
|
26
|
+
/** @type {ProviderInjector} */
|
|
26
27
|
providerInjector: ProviderInjector;
|
|
27
28
|
/**
|
|
28
29
|
*
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
/** @private */
|
|
1
2
|
export const INJECTOR_LITERAL: "$injector";
|
|
3
|
+
/** @private */
|
|
2
4
|
export const COMPILE_LITERAL: "$compileProvider";
|
|
5
|
+
/** @private */
|
|
3
6
|
export const ANIMATION_LITERAL: "$animateProvider";
|
|
7
|
+
/** @private */
|
|
4
8
|
export const FILTER_LITERAL: "$filterProvider";
|
|
9
|
+
/** @private */
|
|
5
10
|
export const CONTROLLER_LITERAL: "$controllerProvider";
|
|
6
11
|
/**
|
|
7
12
|
* Modules are collections of application configuration information for components:
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {import('../../interface.ts').Provider} $provide
|
|
3
|
-
*/
|
|
4
|
-
export function FilterProvider(
|
|
5
|
-
$provide: import("../../interface.ts").Provider,
|
|
6
|
-
): void;
|
|
7
1
|
export class FilterProvider {
|
|
2
|
+
static $inject: string[];
|
|
8
3
|
/**
|
|
9
4
|
* @param {import('../../interface.ts').Provider} $provide
|
|
10
5
|
*/
|
|
11
6
|
constructor($provide: import("../../interface.ts").Provider);
|
|
12
|
-
|
|
7
|
+
$provide: import("../../interface.ts").Provider;
|
|
8
|
+
/**
|
|
9
|
+
* @param {string|Record<string, import('../../interface.ts').FilterFactory>} name
|
|
10
|
+
* @param {import('../../interface.ts').FilterFactory} [factory]
|
|
11
|
+
* @return {import('../../interface.ts').Provider}
|
|
12
|
+
*/
|
|
13
|
+
register(
|
|
13
14
|
name: string | Record<string, import("../../interface.ts").FilterFactory>,
|
|
14
|
-
factory
|
|
15
|
-
)
|
|
15
|
+
factory?: import("../../interface.ts").FilterFactory,
|
|
16
|
+
): import("../../interface.ts").Provider;
|
|
16
17
|
$get: (
|
|
17
18
|
| string
|
|
18
19
|
| ((
|
|
19
20
|
$injector: import("../../core/di/internal-injector.js").InjectorService,
|
|
20
|
-
) => (
|
|
21
|
+
) => import("../../interface.ts").FilterFn)
|
|
21
22
|
)[];
|
|
22
23
|
}
|
|
23
|
-
export namespace FilterProvider {
|
|
24
|
-
let $inject: string[];
|
|
25
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @typedef {import('../../interface.ts').ServiceProvider} ServiceProvider
|
|
1
|
+
/** @typedef {import('../../interface.ts').ServiceProvider} ServiceProvider */
|
|
2
2
|
/**
|
|
3
3
|
* Private service to sanitize uris for links and images. Used by $compile.
|
|
4
4
|
* @implements {ServiceProvider}
|
|
@@ -33,11 +33,8 @@ export class SanitizeUriProvider implements ServiceProvider {
|
|
|
33
33
|
regexp?: RegExp | undefined,
|
|
34
34
|
): RegExp | SanitizeUriProvider;
|
|
35
35
|
/**
|
|
36
|
-
* @returns {import("./interface
|
|
36
|
+
* @returns {import("./interface").SanitizerFn}
|
|
37
37
|
*/
|
|
38
|
-
$get():
|
|
38
|
+
$get(): any;
|
|
39
39
|
}
|
|
40
|
-
/**
|
|
41
|
-
* }
|
|
42
|
-
*/
|
|
43
40
|
export type ServiceProvider = import("../../interface.ts").ServiceProvider;
|
|
@@ -25,7 +25,7 @@ export class RootScopeProvider {
|
|
|
25
25
|
$get: (
|
|
26
26
|
| string
|
|
27
27
|
| ((
|
|
28
|
-
exceptionHandler: import("
|
|
28
|
+
exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
|
|
29
29
|
parse: import("../parse/interface.ts").ParseService,
|
|
30
30
|
) => Scope)
|
|
31
31
|
)[];
|
|
@@ -150,7 +150,6 @@ export class Scope {
|
|
|
150
150
|
$destroy: any;
|
|
151
151
|
$eval: any;
|
|
152
152
|
$apply: any;
|
|
153
|
-
$evalAsync: any;
|
|
154
153
|
$postUpdate: any;
|
|
155
154
|
$isRoot: any;
|
|
156
155
|
$target: any;
|
|
@@ -185,7 +184,6 @@ export class Scope {
|
|
|
185
184
|
$newIsolate(instance: any): any;
|
|
186
185
|
$transcluded(parentInstance: any): any;
|
|
187
186
|
$eval(expr: any, locals: any): any;
|
|
188
|
-
$evalAsync(expr: any, locals: any): Promise<any>;
|
|
189
187
|
/**
|
|
190
188
|
* @param {Object} newTarget
|
|
191
189
|
*/
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export const REGEX_STRING_REGEXP: RegExp;
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @type {Record<string, import("../../interface.js").DirectiveFactory>}
|
|
4
|
+
*/
|
|
5
|
+
export const ngAttributeAliasDirectives: Record<
|
|
6
|
+
string,
|
|
7
|
+
import("../../interface.js").DirectiveFactory
|
|
8
|
+
>;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
3
|
* @param {import("../../core/parse/interface.ts").ParseService} $parse
|
|
4
|
-
* @param {import('../../
|
|
4
|
+
* @param {import('../../services/exception/exception-handler.js').ErrorHandler} $exceptionHandler
|
|
5
5
|
* @param {string} directiveName
|
|
6
6
|
* @param {string} eventName
|
|
7
7
|
* @returns {import("../../interface.ts").Directive}
|
|
8
8
|
*/
|
|
9
9
|
export function createEventDirective(
|
|
10
10
|
$parse: import("../../core/parse/interface.ts").ParseService,
|
|
11
|
-
$exceptionHandler: import("../../
|
|
11
|
+
$exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
|
|
12
12
|
directiveName: string,
|
|
13
13
|
eventName: string,
|
|
14
14
|
): import("../../interface.ts").Directive;
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @type {Record<string, import("../../interface.js").DirectiveFactory>}
|
|
17
|
+
*/
|
|
18
|
+
export const ngEventDirectives: Record<
|
|
19
|
+
string,
|
|
20
|
+
import("../../interface.js").DirectiveFactory
|
|
21
|
+
>;
|
|
@@ -12,14 +12,14 @@ export function getEventNameForElement(element: Element): EventType;
|
|
|
12
12
|
* Handles DOM manipulation based on a swap strategy and server-rendered HTML.
|
|
13
13
|
*
|
|
14
14
|
* @param {string} html - The HTML string returned from the server.
|
|
15
|
-
* @param {import("../../interface.ts").
|
|
15
|
+
* @param {import("../../interface.ts").SwapModeType} swap
|
|
16
16
|
* @param {Element} target - The target DOM element to apply the swap to.
|
|
17
17
|
* @param {import('../../core/scope/scope.js').Scope} scope
|
|
18
18
|
* @param {import('../../core/compile/compile.js').CompileFn} $compile
|
|
19
19
|
*/
|
|
20
20
|
export function handleSwapResponse(
|
|
21
21
|
html: string,
|
|
22
|
-
swap: import("../../interface.ts").
|
|
22
|
+
swap: import("../../interface.ts").SwapModeType,
|
|
23
23
|
target: Element,
|
|
24
24
|
scope: import("../../core/scope/scope.js").Scope,
|
|
25
25
|
$compile: import("../../core/compile/compile.js").CompileFn,
|
|
@@ -35,8 +35,12 @@ export function createHttpDirective(
|
|
|
35
35
|
method: "get" | "delete" | "post" | "put",
|
|
36
36
|
attrName: string,
|
|
37
37
|
): import("../../interface.ts").DirectiveFactory;
|
|
38
|
+
/** @type {import('../../interface.ts').DirectiveFactory} */
|
|
38
39
|
export const ngGetDirective: import("../../interface.ts").DirectiveFactory;
|
|
40
|
+
/** @type {import('../../interface.ts').DirectiveFactory} */
|
|
39
41
|
export const ngDeleteDirective: import("../../interface.ts").DirectiveFactory;
|
|
42
|
+
/** @type {import('../../interface.ts').DirectiveFactory} */
|
|
40
43
|
export const ngPostDirective: import("../../interface.ts").DirectiveFactory;
|
|
44
|
+
/** @type {import('../../interface.ts').DirectiveFactory} */
|
|
41
45
|
export const ngPutDirective: import("../../interface.ts").DirectiveFactory;
|
|
42
46
|
export type EventType = "click" | "change" | "submit";
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* @param {*} $templateRequest
|
|
4
4
|
* @param {import("../../services/anchor-scroll.js").AnchorScrollFunction} $anchorScroll
|
|
5
5
|
* @param {*} $animate
|
|
6
|
-
* @param {import('../../
|
|
6
|
+
* @param {import('../../services/exception/interface.ts').Interface} $exceptionHandler
|
|
7
7
|
* @returns {import('../../interface.js').Directive}
|
|
8
8
|
*/
|
|
9
9
|
export function ngIncludeDirective(
|
|
10
10
|
$templateRequest: any,
|
|
11
11
|
$anchorScroll: import("../../services/anchor-scroll.js").AnchorScrollFunction,
|
|
12
12
|
$animate: any,
|
|
13
|
-
$exceptionHandler: import("../../
|
|
13
|
+
$exceptionHandler: import("../../services/exception/interface.ts").Interface,
|
|
14
14
|
): import("../../interface.js").Directive;
|
|
15
15
|
export namespace ngIncludeDirective {
|
|
16
16
|
let $inject: string[];
|
|
@@ -12,7 +12,6 @@ export function createDateInputType(
|
|
|
12
12
|
element: any,
|
|
13
13
|
attr: any,
|
|
14
14
|
ctrl: any,
|
|
15
|
-
$browser: any,
|
|
16
15
|
$filter: any,
|
|
17
16
|
$parse: any,
|
|
18
17
|
) => void;
|
|
@@ -36,7 +35,6 @@ export function numberInputType(
|
|
|
36
35
|
element: any,
|
|
37
36
|
attr: any,
|
|
38
37
|
ctrl: any,
|
|
39
|
-
$browser: any,
|
|
40
38
|
$filter: any,
|
|
41
39
|
$parse: any,
|
|
42
40
|
): void;
|
|
@@ -47,22 +45,14 @@ export function rangeInputType(
|
|
|
47
45
|
ctrl: any,
|
|
48
46
|
): void;
|
|
49
47
|
/**
|
|
50
|
-
* @param {import('../../services/browser').Browser} $browser
|
|
51
48
|
* @param {*} $filter
|
|
52
49
|
* @param {*} $parse
|
|
53
|
-
* @returns
|
|
50
|
+
* @returns {import('../../interface.ts').Directive}
|
|
54
51
|
*/
|
|
55
52
|
export function inputDirective(
|
|
56
|
-
$browser: any,
|
|
57
53
|
$filter: any,
|
|
58
54
|
$parse: any,
|
|
59
|
-
):
|
|
60
|
-
restrict: string;
|
|
61
|
-
require: string[];
|
|
62
|
-
link: {
|
|
63
|
-
pre(scope: any, element: any, attr: any, ctrls: any): void;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
55
|
+
): import("../../interface.ts").Directive;
|
|
66
56
|
export namespace inputDirective {
|
|
67
57
|
let $inject: string[];
|
|
68
58
|
}
|
|
@@ -18,54 +18,15 @@ export namespace ngMessagesIncludeDirective {
|
|
|
18
18
|
let $inject_1: string[];
|
|
19
19
|
export { $inject_1 as $inject };
|
|
20
20
|
}
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
attrs: any,
|
|
31
|
-
ngMessagesCtrl: any,
|
|
32
|
-
$transclude: any,
|
|
33
|
-
): void;
|
|
34
|
-
};
|
|
35
|
-
export namespace ngMessageDirective {
|
|
36
|
-
let $inject_2: string[];
|
|
37
|
-
export { $inject_2 as $inject };
|
|
38
|
-
}
|
|
39
|
-
export function ngMessageExpDirective($animate: any): {
|
|
40
|
-
restrict: string;
|
|
41
|
-
transclude: string;
|
|
42
|
-
priority: number;
|
|
43
|
-
terminal: boolean;
|
|
44
|
-
require: string;
|
|
45
|
-
link(
|
|
46
|
-
scope: any,
|
|
47
|
-
element: any,
|
|
48
|
-
attrs: any,
|
|
49
|
-
ngMessagesCtrl: any,
|
|
50
|
-
$transclude: any,
|
|
51
|
-
): void;
|
|
52
|
-
};
|
|
53
|
-
export namespace ngMessageExpDirective {}
|
|
54
|
-
export function ngMessageDefaultDirective($animate: any): {
|
|
55
|
-
restrict: string;
|
|
56
|
-
transclude: string;
|
|
57
|
-
priority: number;
|
|
58
|
-
terminal: boolean;
|
|
59
|
-
require: string;
|
|
60
|
-
link(
|
|
61
|
-
scope: any,
|
|
62
|
-
element: any,
|
|
63
|
-
attrs: any,
|
|
64
|
-
ngMessagesCtrl: any,
|
|
65
|
-
$transclude: any,
|
|
66
|
-
): void;
|
|
67
|
-
};
|
|
68
|
-
export namespace ngMessageDefaultDirective {}
|
|
21
|
+
export const ngMessageDirective: (
|
|
22
|
+
any: any,
|
|
23
|
+
) => import("../../interface.js").Directive;
|
|
24
|
+
export const ngMessageExpDirective: (
|
|
25
|
+
any: any,
|
|
26
|
+
) => import("../../interface.js").Directive;
|
|
27
|
+
export const ngMessageDefaultDirective: (
|
|
28
|
+
any: any,
|
|
29
|
+
) => import("../../interface.js").Directive;
|
|
69
30
|
declare class NgMessageCtrl {
|
|
70
31
|
/**
|
|
71
32
|
* @param {Element} $element
|
|
@@ -50,7 +50,7 @@ export class NgModelController {
|
|
|
50
50
|
static $inject: string[];
|
|
51
51
|
/**
|
|
52
52
|
* @param {import('../../core/scope/scope.js').Scope} $scope
|
|
53
|
-
* @param {import('../../
|
|
53
|
+
* @param {import('../../services/exception/exception-handler.js').ErrorHandler} $exceptionHandler
|
|
54
54
|
* @param {import('../../core/compile/attributes.js').Attributes} $attr
|
|
55
55
|
* @param {Element} $element
|
|
56
56
|
* @param {import("../../core/parse/interface.ts").ParseService} $parse
|
|
@@ -59,7 +59,7 @@ export class NgModelController {
|
|
|
59
59
|
*/
|
|
60
60
|
constructor(
|
|
61
61
|
$scope: import("../../core/scope/scope.js").Scope,
|
|
62
|
-
$exceptionHandler: import("../../
|
|
62
|
+
$exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
|
|
63
63
|
$attr: import("../../core/compile/attributes.js").Attributes,
|
|
64
64
|
$element: Element,
|
|
65
65
|
$parse: import("../../core/parse/interface.ts").ParseService,
|
|
@@ -141,7 +141,7 @@ export class NgModelController {
|
|
|
141
141
|
$$element: Element;
|
|
142
142
|
$$animate: any;
|
|
143
143
|
$$parse: import("../../core/parse/interface.ts").ParseService;
|
|
144
|
-
$$exceptionHandler: import("../../
|
|
144
|
+
$$exceptionHandler: import("../../services/exception/interface.ts").Interface;
|
|
145
145
|
$$hasNativeValidators: boolean;
|
|
146
146
|
$$classCache: {};
|
|
147
147
|
$$eventRemovers: Set<any>;
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
selectElement: HTMLSelectElement,
|
|
15
|
-
attr: import("../../core/compile/attributes.js").Attributes,
|
|
16
|
-
ctrls: any,
|
|
17
|
-
) => void;
|
|
18
|
-
};
|
|
19
|
-
})
|
|
20
|
-
)[];
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {import("../../core/compile/compile.js").CompileFn} $compile
|
|
4
|
+
* @param {import("../../core/parse/interface.ts").ParseService} $parse
|
|
5
|
+
* @returns {import("../../interface.ts").Directive}
|
|
6
|
+
*/
|
|
7
|
+
export function ngOptionsDirective(
|
|
8
|
+
$compile: import("../../core/compile/compile.js").CompileFn,
|
|
9
|
+
$parse: import("../../core/parse/interface.ts").ParseService,
|
|
10
|
+
): import("../../interface.ts").Directive;
|
|
11
|
+
export namespace ngOptionsDirective {
|
|
12
|
+
let $inject: string[];
|
|
13
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {import('../../core/parse/interface.ts').ParseService} $parse
|
|
3
3
|
* @param {import('../../services/log/interface.ts').LogService} $log
|
|
4
|
-
* @returns {import('
|
|
4
|
+
* @returns {import('interface.ts').Directive}
|
|
5
5
|
*/
|
|
6
6
|
export function ngSetterDirective(
|
|
7
7
|
$parse: import("../../core/parse/interface.ts").ParseService,
|
|
8
8
|
$log: import("../../services/log/interface.ts").LogService,
|
|
9
|
-
):
|
|
9
|
+
): any;
|
|
10
10
|
export namespace ngSetterDirective {
|
|
11
11
|
let $inject: string[];
|
|
12
12
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
)
|
|
1
|
+
/**
|
|
2
|
+
* @param {import("../../core/compile/compile.js").CompileFn} $compile
|
|
3
|
+
* @returns {import("../../interface.ts").Directive}
|
|
4
|
+
*/
|
|
5
|
+
export function ngTranscludeDirective(
|
|
6
|
+
$compile: import("../../core/compile/compile.js").CompileFn,
|
|
7
|
+
): import("../../interface.ts").Directive;
|
|
8
|
+
export namespace ngTranscludeDirective {
|
|
9
|
+
let $inject: string[];
|
|
10
|
+
}
|
package/@types/interface.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Attributes } from "./core/compile/attributes.js";
|
|
2
2
|
import { Scope } from "./core/scope/scope.js";
|
|
3
|
+
export * from "./core/di/ng-module.js";
|
|
3
4
|
export * from "./services/http/interface.ts";
|
|
4
5
|
export * from "./services/log/interface.ts";
|
|
5
6
|
export * from "./services/log/log.js";
|
|
@@ -57,42 +58,58 @@ export interface ServiceProvider {
|
|
|
57
58
|
* services, factories, constants, values, decorators, etc.
|
|
58
59
|
*/
|
|
59
60
|
export interface Provider {
|
|
61
|
+
/**
|
|
62
|
+
* Register a directive
|
|
63
|
+
* @param name - The name of the directive.
|
|
64
|
+
* @param provider - An object with a `$get` property that defines how the service is created.
|
|
65
|
+
*/
|
|
66
|
+
directive(name: string, directive: DirectiveFactory): Provider;
|
|
67
|
+
/**
|
|
68
|
+
* Register multiple directives
|
|
69
|
+
* @param obj
|
|
70
|
+
*/
|
|
71
|
+
directive(obj: Record<string, DirectiveFactory>): Provider;
|
|
60
72
|
/**
|
|
61
73
|
* Register a service provider.
|
|
62
74
|
* @param name - The name of the service.
|
|
63
75
|
* @param provider - An object with a `$get` property that defines how the service is created.
|
|
64
76
|
*/
|
|
65
|
-
provider(name: string, provider:
|
|
77
|
+
provider(name: string, provider: Function): Provider;
|
|
78
|
+
/**
|
|
79
|
+
* Register multiple service providers
|
|
80
|
+
* @param obj
|
|
81
|
+
*/
|
|
82
|
+
provider(obj: Record<string, Function>): Provider;
|
|
66
83
|
/**
|
|
67
84
|
* Register a factory function to create a service.
|
|
68
85
|
* @param name - The name of the service.
|
|
69
86
|
* @param factoryFn - A function (or annotated array) that returns the service instance.
|
|
70
87
|
*/
|
|
71
|
-
factory(name: string, factoryFn: Injectable):
|
|
88
|
+
factory(name: string, factoryFn: Injectable): Provider;
|
|
72
89
|
/**
|
|
73
90
|
* Register a constructor function to create a service.
|
|
74
91
|
* @param name - The name of the service.
|
|
75
92
|
* @param constructor - A class or function to instantiate.
|
|
76
93
|
*/
|
|
77
|
-
service(name: string, constructor: Injectable):
|
|
94
|
+
service(name: string, constructor: Injectable): Provider;
|
|
78
95
|
/**
|
|
79
96
|
* Register a fixed value as a service.
|
|
80
97
|
* @param name - The name of the service.
|
|
81
98
|
* @param val - The value to use.
|
|
82
99
|
*/
|
|
83
|
-
value(name: string, val: any):
|
|
100
|
+
value(name: string, val: any): Provider;
|
|
84
101
|
/**
|
|
85
102
|
* Register a constant value (available during config).
|
|
86
103
|
* @param name - The name of the constant.
|
|
87
104
|
* @param val - The constant value.
|
|
88
105
|
*/
|
|
89
|
-
constant(name: string, val: any):
|
|
106
|
+
constant(name: string, val: any): Provider;
|
|
90
107
|
/**
|
|
91
108
|
* Register a decorator function to modify or replace an existing service.
|
|
92
109
|
* @param name - The name of the service to decorate.
|
|
93
110
|
* @param fn - A function that takes `$delegate` and returns a decorated service.
|
|
94
111
|
*/
|
|
95
|
-
decorator(name: string, fn:
|
|
112
|
+
decorator(name: string, fn: Function): Provider;
|
|
96
113
|
}
|
|
97
114
|
/**
|
|
98
115
|
* A filter function takes an input and optional arguments, and returns a transformed value.
|
|
@@ -226,14 +243,16 @@ export interface Directive {
|
|
|
226
243
|
/** Template URL for loading from server */
|
|
227
244
|
templateUrl?: string | ((element: Element, attrs: Attributes) => string);
|
|
228
245
|
/** Enables transclusion or configures named slots */
|
|
229
|
-
transclude?: boolean |
|
|
246
|
+
transclude?: boolean | string | Record<string, string>;
|
|
230
247
|
/** Internal hook for directive compilation state */
|
|
231
248
|
$$addStateInfo?: (...args: any[]) => any;
|
|
249
|
+
count?: number;
|
|
232
250
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
export type
|
|
251
|
+
export type DirectiveFactoryFn = (
|
|
252
|
+
...args: any[]
|
|
253
|
+
) => Directive | DirectiveLinkFn;
|
|
254
|
+
export type AnnotatedDirectiveFactory = Array<string | DirectiveFactoryFn>;
|
|
255
|
+
export type DirectiveFactory = DirectiveFactoryFn | AnnotatedDirectiveFactory;
|
|
237
256
|
/**
|
|
238
257
|
* Represents advanced transclusion functions used in directives.
|
|
239
258
|
*/
|
|
@@ -316,10 +335,27 @@ export interface NgModelController {
|
|
|
316
335
|
/**
|
|
317
336
|
* Possible values for `data-swap` attribute
|
|
318
337
|
*/
|
|
319
|
-
export
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
338
|
+
export declare const SwapMode: {
|
|
339
|
+
/** (default) Replaces the contents inside the element */
|
|
340
|
+
readonly innerHTML: "innerHTML";
|
|
341
|
+
/** Replaces the entire element, including the tag itself */
|
|
342
|
+
readonly outerHTML: "outerHTML";
|
|
343
|
+
/** Inserts plain text (without parsing HTML) */
|
|
344
|
+
readonly textContent: "textContent";
|
|
345
|
+
/** Inserts HTML immediately before the element itself */
|
|
346
|
+
readonly beforebegin: "beforebegin";
|
|
347
|
+
/** Inserts HTML inside the element, before its first child */
|
|
348
|
+
readonly afterbegin: "afterbegin";
|
|
349
|
+
/** Inserts HTML inside the element, after its last child */
|
|
350
|
+
readonly beforeend: "beforeend";
|
|
351
|
+
/** Inserts HTML immediately after the element itself */
|
|
352
|
+
readonly afterend: "afterend";
|
|
353
|
+
/** Removes the element entirely */
|
|
354
|
+
readonly delete: "delete";
|
|
355
|
+
/** Performs no insertion (no-op) */
|
|
356
|
+
readonly none: "none";
|
|
357
|
+
};
|
|
358
|
+
/**
|
|
359
|
+
* Union type representing all possible DOM insertion modes.
|
|
360
|
+
*/
|
|
361
|
+
export type SwapModeType = keyof typeof SwapMode;
|
|
@@ -134,22 +134,5 @@ export namespace $ViewDirectiveFill {
|
|
|
134
134
|
* });
|
|
135
135
|
* ```
|
|
136
136
|
*/
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
| ((
|
|
140
|
-
$view: any,
|
|
141
|
-
$animate: any,
|
|
142
|
-
$ngViewScroll: any,
|
|
143
|
-
$interpolate: any,
|
|
144
|
-
) => {
|
|
145
|
-
count: number;
|
|
146
|
-
terminal: boolean;
|
|
147
|
-
priority: number;
|
|
148
|
-
transclude: string;
|
|
149
|
-
compile: (
|
|
150
|
-
_tElement: any,
|
|
151
|
-
_tAttrs: any,
|
|
152
|
-
$transclude: any,
|
|
153
|
-
) => (scope: any, $element: any, attrs: any) => void;
|
|
154
|
-
})
|
|
155
|
-
)[];
|
|
137
|
+
/** @type {import("../../interface.js").AnnotatedDirectiveFactory} */
|
|
138
|
+
export let ngView: import("../../interface.js").AnnotatedDirectiveFactory;
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* This is where we hold the global mutable state such as current state, current
|
|
6
6
|
* params, current transition, etc.
|
|
7
|
-
* @implements {ServiceProvider}
|
|
8
7
|
*/
|
|
9
|
-
export class RouterGlobals
|
|
8
|
+
export class RouterGlobals {
|
|
10
9
|
/**
|
|
11
10
|
* Current parameter values
|
|
12
11
|
*
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* This API is found at `$stateRegistry` ([[UIRouter.stateRegistry]])
|
|
6
6
|
*
|
|
7
|
-
* @implements {ServiceProvider}
|
|
8
7
|
*/
|
|
9
|
-
export class StateRegistryProvider
|
|
8
|
+
export class StateRegistryProvider {
|
|
10
9
|
static $inject: string[];
|
|
11
10
|
/**
|
|
12
11
|
* @param urlService
|