@angular-wave/angular.ts 0.0.42 → 0.0.44
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/README.md +4 -4
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/animations/module.js +1 -1
- package/src/exts/aria/aria.js +2 -130
- package/src/exts/aria/aria.md +145 -0
- package/src/exts/messages/messages.js +1 -1
- package/src/filters/filter.js +14 -2
- package/src/filters/filters.js +2 -2
- package/src/filters/limit-to.js +11 -4
- package/src/filters/order-by.js +0 -5
- package/src/index.js +2 -1
- package/src/injector.js +1 -1
- package/src/loader.js +60 -60
- package/src/public.js +1 -1
- package/src/router/index.js +1 -1
- package/src/router/params/param-type.js +3 -3
- package/src/router/services.spec.js +3 -3
- package/src/router/state/state-service.js +0 -8
- package/src/types.js +4 -4
- package/tsconfig.json +1 -1
- package/types/filters/filter.d.ts +2 -2
- package/types/filters/filters.d.ts +4 -4
- package/types/filters/limit-to.d.ts +2 -2
- package/types/filters/order-by.d.ts +1 -6
- package/types/public.d.ts +2 -2
- package/types/router/params/param-type.d.ts +3 -3
- package/types/router/state/state-service.d.ts +9 -15
- package/types/types.d.ts +4 -4
- package/types-back/index.d.ts +0 -24
package/src/loader.js
CHANGED
|
@@ -34,7 +34,7 @@ export const VERSION = "[VI]{version}[/VI]";
|
|
|
34
34
|
|
|
35
35
|
const ngMinErr = minErr("ng");
|
|
36
36
|
|
|
37
|
-
/** @type {Object.<string, import('./
|
|
37
|
+
/** @type {Object.<string, import('./types').Module>} */
|
|
38
38
|
const moduleCache = {};
|
|
39
39
|
|
|
40
40
|
/**
|
|
@@ -65,7 +65,7 @@ export class Angular {
|
|
|
65
65
|
/** @type {equals} */
|
|
66
66
|
this.equals = equals;
|
|
67
67
|
|
|
68
|
-
/** @type {import('./shared/jqlite/jqlite').JQLite} */
|
|
68
|
+
/** @type {typeof import('./shared/jqlite/jqlite').JQLite} */
|
|
69
69
|
this.element = JQLite;
|
|
70
70
|
|
|
71
71
|
/** @type {extend} */
|
|
@@ -283,8 +283,8 @@ export class Angular {
|
|
|
283
283
|
* All modules (AngularJS core or 3rd party) that should be available to an application must be
|
|
284
284
|
* registered using this mechanism.
|
|
285
285
|
*
|
|
286
|
-
* Passing one argument retrieves an existing {@link
|
|
287
|
-
* whereas passing more than one argument creates a new {@link
|
|
286
|
+
* Passing one argument retrieves an existing {@link import('./types').Module},
|
|
287
|
+
* whereas passing more than one argument creates a new {@link import('./types').Module}
|
|
288
288
|
*
|
|
289
289
|
*
|
|
290
290
|
* # Module
|
|
@@ -320,8 +320,8 @@ export class Angular {
|
|
|
320
320
|
* @param {!Array.<string>=} requires If specified then new module is being created. If
|
|
321
321
|
* unspecified then the module is being retrieved for further configuration.
|
|
322
322
|
* @param {Function=} configFn Optional configuration function for the module. Same as
|
|
323
|
-
* {@link
|
|
324
|
-
* @returns {
|
|
323
|
+
* {@link import('./types').Module#config Module#config()}.
|
|
324
|
+
* @returns {import('./types').Module} new module with the {@link import('./types').Module} api.
|
|
325
325
|
*/
|
|
326
326
|
module(name, requires, configFn) {
|
|
327
327
|
const $injectorMinErr = minErr("$injector");
|
|
@@ -360,7 +360,7 @@ export class Angular {
|
|
|
360
360
|
// eslint-disable-next-line no-use-before-define
|
|
361
361
|
const config = invokeLater("$injector", "invoke", "push", configBlocks);
|
|
362
362
|
|
|
363
|
-
/** @type {
|
|
363
|
+
/** @type {import('./types').Module} */
|
|
364
364
|
const moduleInstance = {
|
|
365
365
|
// Private state
|
|
366
366
|
|
|
@@ -370,11 +370,11 @@ export class Angular {
|
|
|
370
370
|
|
|
371
371
|
/**
|
|
372
372
|
* @ngdoc method
|
|
373
|
-
* @name
|
|
373
|
+
* @name import('./types').Module#info
|
|
374
374
|
* @module ng
|
|
375
375
|
*
|
|
376
376
|
* @param {Object=} value Information about the module
|
|
377
|
-
* @returns {Object|
|
|
377
|
+
* @returns {Object|import('./types').Module} The current info object for this module if called as a getter,
|
|
378
378
|
* or `this` if called as a setter.
|
|
379
379
|
*
|
|
380
380
|
* @description
|
|
@@ -414,7 +414,7 @@ export class Angular {
|
|
|
414
414
|
|
|
415
415
|
/**
|
|
416
416
|
* @ngdoc property
|
|
417
|
-
* @name
|
|
417
|
+
* @name import('./types').Module#requires
|
|
418
418
|
* @module ng
|
|
419
419
|
*
|
|
420
420
|
* @description
|
|
@@ -425,7 +425,7 @@ export class Angular {
|
|
|
425
425
|
|
|
426
426
|
/**
|
|
427
427
|
* @ngdoc property
|
|
428
|
-
* @name
|
|
428
|
+
* @name import('./types').Module#name
|
|
429
429
|
* @module ng
|
|
430
430
|
*
|
|
431
431
|
* @description
|
|
@@ -435,7 +435,7 @@ export class Angular {
|
|
|
435
435
|
|
|
436
436
|
/**
|
|
437
437
|
* @ngdoc method
|
|
438
|
-
* @name
|
|
438
|
+
* @name import('./types').Module#provider
|
|
439
439
|
* @module ng
|
|
440
440
|
* @param {string} name service name
|
|
441
441
|
* @param {Function} providerType Construction function for creating new instance of the
|
|
@@ -447,7 +447,7 @@ export class Angular {
|
|
|
447
447
|
|
|
448
448
|
/**
|
|
449
449
|
* @ngdoc method
|
|
450
|
-
* @name
|
|
450
|
+
* @name import('./types').Module#factory
|
|
451
451
|
* @module ng
|
|
452
452
|
* @param {string} name service name
|
|
453
453
|
* @param {Function} providerFunction Function for creating new instance of the service.
|
|
@@ -458,7 +458,7 @@ export class Angular {
|
|
|
458
458
|
|
|
459
459
|
/**
|
|
460
460
|
* @ngdoc method
|
|
461
|
-
* @name
|
|
461
|
+
* @name import('./types').Module#service
|
|
462
462
|
* @module ng
|
|
463
463
|
* @param {string} name service name
|
|
464
464
|
* @param {Function} constructor A constructor function that will be instantiated.
|
|
@@ -469,7 +469,7 @@ export class Angular {
|
|
|
469
469
|
|
|
470
470
|
/**
|
|
471
471
|
* @ngdoc method
|
|
472
|
-
* @name
|
|
472
|
+
* @name import('./types').Module#value
|
|
473
473
|
* @module ng
|
|
474
474
|
* @param {string} name service name
|
|
475
475
|
* @param {*} object Service instance object.
|
|
@@ -480,7 +480,7 @@ export class Angular {
|
|
|
480
480
|
|
|
481
481
|
/**
|
|
482
482
|
* @ngdoc method
|
|
483
|
-
* @name
|
|
483
|
+
* @name import('./types').Module#constant
|
|
484
484
|
* @module ng
|
|
485
485
|
* @param {string} name constant name
|
|
486
486
|
* @param {*} object Constant value.
|
|
@@ -492,7 +492,7 @@ export class Angular {
|
|
|
492
492
|
|
|
493
493
|
/**
|
|
494
494
|
* @ngdoc method
|
|
495
|
-
* @name
|
|
495
|
+
* @name import('./types').Module#decorator
|
|
496
496
|
* @module ng
|
|
497
497
|
* @param {string} name The name of the service to decorate.
|
|
498
498
|
* @param {Function} decorFn This function will be invoked when the service needs to be
|
|
@@ -508,7 +508,7 @@ export class Angular {
|
|
|
508
508
|
|
|
509
509
|
/**
|
|
510
510
|
* @ngdoc method
|
|
511
|
-
* @name
|
|
511
|
+
* @name import('./types').Module#animation
|
|
512
512
|
* @module ng
|
|
513
513
|
* @param {string} name animation name
|
|
514
514
|
* @param {Function} animationFactory Factory function for creating new instance of an
|
|
@@ -542,7 +542,7 @@ export class Angular {
|
|
|
542
542
|
|
|
543
543
|
/**
|
|
544
544
|
* @ngdoc method
|
|
545
|
-
* @name
|
|
545
|
+
* @name import('./types').Module#filter
|
|
546
546
|
* @module ng
|
|
547
547
|
* @param {string} name Filter name - this must be a valid AngularJS expression identifier
|
|
548
548
|
* @param {Function} filterFactory Factory function for creating new instance of filter.
|
|
@@ -560,7 +560,7 @@ export class Angular {
|
|
|
560
560
|
|
|
561
561
|
/**
|
|
562
562
|
* @ngdoc method
|
|
563
|
-
* @name
|
|
563
|
+
* @name import('./types').Module#controller
|
|
564
564
|
* @module ng
|
|
565
565
|
* @param {string|Object} name Controller name, or an object map of controllers where the
|
|
566
566
|
* keys are the names and the values are the constructors.
|
|
@@ -575,7 +575,7 @@ export class Angular {
|
|
|
575
575
|
|
|
576
576
|
/**
|
|
577
577
|
* @ngdoc method
|
|
578
|
-
* @name
|
|
578
|
+
* @name import('./types').Module#directive
|
|
579
579
|
* @module ng
|
|
580
580
|
* @param {string|Object} name Directive name, or an object map of directives where the
|
|
581
581
|
* keys are the names and the values are the factories.
|
|
@@ -588,7 +588,7 @@ export class Angular {
|
|
|
588
588
|
|
|
589
589
|
/**
|
|
590
590
|
* @ngdoc method
|
|
591
|
-
* @name
|
|
591
|
+
* @name import('./types').Module#component
|
|
592
592
|
* @module ng
|
|
593
593
|
* @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
|
|
594
594
|
* or an object map of components where the keys are the names and the values are the component definition objects.
|
|
@@ -602,17 +602,17 @@ export class Angular {
|
|
|
602
602
|
|
|
603
603
|
/**
|
|
604
604
|
* @ngdoc method
|
|
605
|
-
* @name
|
|
605
|
+
* @name import('./types').Module#config
|
|
606
606
|
* @module ng
|
|
607
607
|
* @param {Function} configFn Execute this function on module load. Useful for service
|
|
608
608
|
* configuration.
|
|
609
609
|
* @description
|
|
610
610
|
* Use this method to configure services by injecting their
|
|
611
|
-
* {@link
|
|
611
|
+
* {@link import('./types').Module#provider `providers`}, e.g. for adding routes to the
|
|
612
612
|
* {@link ngRoute.$routeProvider $routeProvider}.
|
|
613
613
|
*
|
|
614
|
-
* Note that you can only inject {@link
|
|
615
|
-
* {@link
|
|
614
|
+
* Note that you can only inject {@link import('./types').Module#provider `providers`} and
|
|
615
|
+
* {@link import('./types').Module#constant `constants`} into this function.
|
|
616
616
|
*
|
|
617
617
|
* For more about how to configure services, see
|
|
618
618
|
* {@link providers#provider-recipe Provider Recipe}.
|
|
@@ -621,7 +621,7 @@ export class Angular {
|
|
|
621
621
|
|
|
622
622
|
/**
|
|
623
623
|
* @ngdoc method
|
|
624
|
-
* @name
|
|
624
|
+
* @name import('./types').Module#run
|
|
625
625
|
* @module ng
|
|
626
626
|
* @param {Function} initializationFn Execute this function after injector creation.
|
|
627
627
|
* Useful for application initialization.
|
|
@@ -645,7 +645,7 @@ export class Angular {
|
|
|
645
645
|
* @param {string} provider
|
|
646
646
|
* @param {string} method
|
|
647
647
|
* @param {String=} insertMethod
|
|
648
|
-
* @returns {
|
|
648
|
+
* @returns {import('./types').Module}
|
|
649
649
|
*/
|
|
650
650
|
function invokeLater(provider, method, insertMethod, queue) {
|
|
651
651
|
if (!queue) queue = invokeQueue;
|
|
@@ -658,7 +658,7 @@ export class Angular {
|
|
|
658
658
|
/**
|
|
659
659
|
* @param {string} provider
|
|
660
660
|
* @param {string} method
|
|
661
|
-
* @returns {
|
|
661
|
+
* @returns {import('./types').Module}
|
|
662
662
|
*/
|
|
663
663
|
function invokeLaterAndSetModuleName(provider, method, queue) {
|
|
664
664
|
if (!queue) queue = invokeQueue;
|
|
@@ -695,7 +695,7 @@ export class Angular {
|
|
|
695
695
|
* @name ngApp
|
|
696
696
|
*
|
|
697
697
|
* @element ANY
|
|
698
|
-
* @param {
|
|
698
|
+
* @param {import('./types').Module} ngApp an optional application
|
|
699
699
|
* {@link angular.module module} name to load.
|
|
700
700
|
* @param {boolean=} ngStrictDi if this attribute is present on the app element, the injector will be
|
|
701
701
|
* created in "strict-di" mode. This means that the application will fail to invoke functions which
|
|
@@ -867,13 +867,13 @@ export function angularInit(element) {
|
|
|
867
867
|
// }
|
|
868
868
|
config.strictDi = getNgAttribute(appElement, "strict-di") !== null;
|
|
869
869
|
//TODO maybe angular should be initialized here?
|
|
870
|
-
window
|
|
870
|
+
window["angular"].bootstrap(appElement, module ? [module] : [], config);
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
873
|
|
|
874
874
|
/**
|
|
875
875
|
* @ngdoc type
|
|
876
|
-
* @name
|
|
876
|
+
* @name import('./types').Module
|
|
877
877
|
* @module ng
|
|
878
878
|
* @description
|
|
879
879
|
*
|
|
@@ -893,7 +893,7 @@ export function setupModuleLoader(window) {
|
|
|
893
893
|
angular.$$minErr = angular.$$minErr || minErr;
|
|
894
894
|
|
|
895
895
|
return ensure(angular, "module", () => {
|
|
896
|
-
/** @type {Object.<string,
|
|
896
|
+
/** @type {Object.<string, import('./types').Module>} */
|
|
897
897
|
const modules = {};
|
|
898
898
|
|
|
899
899
|
/**
|
|
@@ -907,8 +907,8 @@ export function setupModuleLoader(window) {
|
|
|
907
907
|
* All modules (AngularJS core or 3rd party) that should be available to an application must be
|
|
908
908
|
* registered using this mechanism.
|
|
909
909
|
*
|
|
910
|
-
* Passing one argument retrieves an existing {@link
|
|
911
|
-
* whereas passing more than one argument creates a new {@link
|
|
910
|
+
* Passing one argument retrieves an existing {@link import('./types').Module},
|
|
911
|
+
* whereas passing more than one argument creates a new {@link import('./types').Module}
|
|
912
912
|
*
|
|
913
913
|
*
|
|
914
914
|
* # Module
|
|
@@ -944,8 +944,8 @@ export function setupModuleLoader(window) {
|
|
|
944
944
|
* @param {!Array.<string>=} requires If specified then new module is being created. If
|
|
945
945
|
* unspecified then the module is being retrieved for further configuration.
|
|
946
946
|
* @param {Function=} configFn Optional configuration function for the module. Same as
|
|
947
|
-
* {@link
|
|
948
|
-
* @returns {
|
|
947
|
+
* {@link import('./types').Module#config Module#config()}.
|
|
948
|
+
* @returns {import('./types').Module} new module with the {@link import('./types').Module} api.
|
|
949
949
|
*/
|
|
950
950
|
return function module(name, requires, configFn) {
|
|
951
951
|
let info = {};
|
|
@@ -977,7 +977,7 @@ export function setupModuleLoader(window) {
|
|
|
977
977
|
// eslint-disable-next-line no-use-before-define
|
|
978
978
|
const config = invokeLater("$injector", "invoke", "push", configBlocks);
|
|
979
979
|
|
|
980
|
-
/** @type {
|
|
980
|
+
/** @type {import('./types').Module} */
|
|
981
981
|
const moduleInstance = {
|
|
982
982
|
// Private state
|
|
983
983
|
_invokeQueue: invokeQueue,
|
|
@@ -986,11 +986,11 @@ export function setupModuleLoader(window) {
|
|
|
986
986
|
|
|
987
987
|
/**
|
|
988
988
|
* @ngdoc method
|
|
989
|
-
* @name
|
|
989
|
+
* @name import('./types').Module#info
|
|
990
990
|
* @module ng
|
|
991
991
|
*
|
|
992
992
|
* @param {Object=} info Information about the module
|
|
993
|
-
* @returns {Object|Module} The current info object for this module if called as a getter,
|
|
993
|
+
* @returns {Object|import('./types').Module} The current info object for this module if called as a getter,
|
|
994
994
|
* or `this` if called as a setter.
|
|
995
995
|
*
|
|
996
996
|
* @description
|
|
@@ -1030,7 +1030,7 @@ export function setupModuleLoader(window) {
|
|
|
1030
1030
|
|
|
1031
1031
|
/**
|
|
1032
1032
|
* @ngdoc property
|
|
1033
|
-
* @name
|
|
1033
|
+
* @name import('./types').Module#requires
|
|
1034
1034
|
* @module ng
|
|
1035
1035
|
*
|
|
1036
1036
|
* @description
|
|
@@ -1041,7 +1041,7 @@ export function setupModuleLoader(window) {
|
|
|
1041
1041
|
|
|
1042
1042
|
/**
|
|
1043
1043
|
* @ngdoc property
|
|
1044
|
-
* @name
|
|
1044
|
+
* @name import('./types').Module#name
|
|
1045
1045
|
* @module ng
|
|
1046
1046
|
*
|
|
1047
1047
|
* @description
|
|
@@ -1051,7 +1051,7 @@ export function setupModuleLoader(window) {
|
|
|
1051
1051
|
|
|
1052
1052
|
/**
|
|
1053
1053
|
* @ngdoc method
|
|
1054
|
-
* @name
|
|
1054
|
+
* @name import('./types').Module#provider
|
|
1055
1055
|
* @module ng
|
|
1056
1056
|
* @param {string} name service name
|
|
1057
1057
|
* @param {Function} providerType Construction function for creating new instance of the
|
|
@@ -1063,7 +1063,7 @@ export function setupModuleLoader(window) {
|
|
|
1063
1063
|
|
|
1064
1064
|
/**
|
|
1065
1065
|
* @ngdoc method
|
|
1066
|
-
* @name
|
|
1066
|
+
* @name import('./types').Module#factory
|
|
1067
1067
|
* @module ng
|
|
1068
1068
|
* @param {string} name service name
|
|
1069
1069
|
* @param {Function} providerFunction Function for creating new instance of the service.
|
|
@@ -1074,7 +1074,7 @@ export function setupModuleLoader(window) {
|
|
|
1074
1074
|
|
|
1075
1075
|
/**
|
|
1076
1076
|
* @ngdoc method
|
|
1077
|
-
* @name
|
|
1077
|
+
* @name import('./types').Module#service
|
|
1078
1078
|
* @module ng
|
|
1079
1079
|
* @param {string} name service name
|
|
1080
1080
|
* @param {Function} constructor A constructor function that will be instantiated.
|
|
@@ -1085,7 +1085,7 @@ export function setupModuleLoader(window) {
|
|
|
1085
1085
|
|
|
1086
1086
|
/**
|
|
1087
1087
|
* @ngdoc method
|
|
1088
|
-
* @name
|
|
1088
|
+
* @name import('./types').Module#value
|
|
1089
1089
|
* @module ng
|
|
1090
1090
|
* @param {string} name service name
|
|
1091
1091
|
* @param {*} object Service instance object.
|
|
@@ -1096,7 +1096,7 @@ export function setupModuleLoader(window) {
|
|
|
1096
1096
|
|
|
1097
1097
|
/**
|
|
1098
1098
|
* @ngdoc method
|
|
1099
|
-
* @name
|
|
1099
|
+
* @name import('./types').Module#constant
|
|
1100
1100
|
* @module ng
|
|
1101
1101
|
* @param {string} name constant name
|
|
1102
1102
|
* @param {*} object Constant value.
|
|
@@ -1108,7 +1108,7 @@ export function setupModuleLoader(window) {
|
|
|
1108
1108
|
|
|
1109
1109
|
/**
|
|
1110
1110
|
* @ngdoc method
|
|
1111
|
-
* @name
|
|
1111
|
+
* @name import('./types').Module#decorator
|
|
1112
1112
|
* @module ng
|
|
1113
1113
|
* @param {string} name The name of the service to decorate.
|
|
1114
1114
|
* @param {Function} decorFn This function will be invoked when the service needs to be
|
|
@@ -1124,7 +1124,7 @@ export function setupModuleLoader(window) {
|
|
|
1124
1124
|
|
|
1125
1125
|
/**
|
|
1126
1126
|
* @ngdoc method
|
|
1127
|
-
* @name
|
|
1127
|
+
* @name import('./types').Module#animation
|
|
1128
1128
|
* @module ng
|
|
1129
1129
|
* @param {string} name animation name
|
|
1130
1130
|
* @param {Function} animationFactory Factory function for creating new instance of an
|
|
@@ -1161,7 +1161,7 @@ export function setupModuleLoader(window) {
|
|
|
1161
1161
|
|
|
1162
1162
|
/**
|
|
1163
1163
|
* @ngdoc method
|
|
1164
|
-
* @name
|
|
1164
|
+
* @name import('./types').Module#filter
|
|
1165
1165
|
* @module ng
|
|
1166
1166
|
* @param {string} name Filter name - this must be a valid AngularJS expression identifier
|
|
1167
1167
|
* @param {Function} filterFactory Factory function for creating new instance of filter.
|
|
@@ -1179,7 +1179,7 @@ export function setupModuleLoader(window) {
|
|
|
1179
1179
|
|
|
1180
1180
|
/**
|
|
1181
1181
|
* @ngdoc method
|
|
1182
|
-
* @name
|
|
1182
|
+
* @name import('./types').Module#controller
|
|
1183
1183
|
* @module ng
|
|
1184
1184
|
* @param {string|Object} name Controller name, or an object map of controllers where the
|
|
1185
1185
|
* keys are the names and the values are the constructors.
|
|
@@ -1194,7 +1194,7 @@ export function setupModuleLoader(window) {
|
|
|
1194
1194
|
|
|
1195
1195
|
/**
|
|
1196
1196
|
* @ngdoc method
|
|
1197
|
-
* @name
|
|
1197
|
+
* @name import('./types').Module#directive
|
|
1198
1198
|
* @module ng
|
|
1199
1199
|
* @param {string|Object} name Directive name, or an object map of directives where the
|
|
1200
1200
|
* keys are the names and the values are the factories.
|
|
@@ -1210,7 +1210,7 @@ export function setupModuleLoader(window) {
|
|
|
1210
1210
|
|
|
1211
1211
|
/**
|
|
1212
1212
|
* @ngdoc method
|
|
1213
|
-
* @name
|
|
1213
|
+
* @name import('./types').Module#component
|
|
1214
1214
|
* @module ng
|
|
1215
1215
|
* @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
|
|
1216
1216
|
* or an object map of components where the keys are the names and the values are the component definition objects.
|
|
@@ -1227,17 +1227,17 @@ export function setupModuleLoader(window) {
|
|
|
1227
1227
|
|
|
1228
1228
|
/**
|
|
1229
1229
|
* @ngdoc method
|
|
1230
|
-
* @name
|
|
1230
|
+
* @name import('./types').Module#config
|
|
1231
1231
|
* @module ng
|
|
1232
1232
|
* @param {Function} configFn Execute this function on module load. Useful for service
|
|
1233
1233
|
* configuration.
|
|
1234
1234
|
* @description
|
|
1235
1235
|
* Use this method to configure services by injecting their
|
|
1236
|
-
* {@link
|
|
1236
|
+
* {@link import('./types').Module#provider `providers`}, e.g. for adding routes to the
|
|
1237
1237
|
* {@link ngRoute.$routeProvider $routeProvider}.
|
|
1238
1238
|
*
|
|
1239
|
-
* Note that you can only inject {@link
|
|
1240
|
-
* {@link
|
|
1239
|
+
* Note that you can only inject {@link import('./types').Module#provider `providers`} and
|
|
1240
|
+
* {@link import('./types').Module#constant `constants`} into this function.
|
|
1241
1241
|
*
|
|
1242
1242
|
* For more about how to configure services, see
|
|
1243
1243
|
* {@link providers#provider-recipe Provider Recipe}.
|
|
@@ -1246,7 +1246,7 @@ export function setupModuleLoader(window) {
|
|
|
1246
1246
|
|
|
1247
1247
|
/**
|
|
1248
1248
|
* @ngdoc method
|
|
1249
|
-
* @name
|
|
1249
|
+
* @name import('./types').Module#run
|
|
1250
1250
|
* @module ng
|
|
1251
1251
|
* @param {Function} initializationFn Execute this function after injector creation.
|
|
1252
1252
|
* Useful for application initialization.
|
|
@@ -1270,7 +1270,7 @@ export function setupModuleLoader(window) {
|
|
|
1270
1270
|
* @param {string} provider
|
|
1271
1271
|
* @param {string} method
|
|
1272
1272
|
* @param {String=} insertMethod
|
|
1273
|
-
* @returns {
|
|
1273
|
+
* @returns {import('./types').Module}
|
|
1274
1274
|
*/
|
|
1275
1275
|
function invokeLater(provider, method, insertMethod, queue) {
|
|
1276
1276
|
if (!queue) queue = invokeQueue;
|
|
@@ -1283,7 +1283,7 @@ export function setupModuleLoader(window) {
|
|
|
1283
1283
|
/**
|
|
1284
1284
|
* @param {string} provider
|
|
1285
1285
|
* @param {string} method
|
|
1286
|
-
* @returns {
|
|
1286
|
+
* @returns {import('./types').Module}
|
|
1287
1287
|
*/
|
|
1288
1288
|
function invokeLaterAndSetModuleName(provider, method, queue) {
|
|
1289
1289
|
if (!queue) queue = invokeQueue;
|
package/src/public.js
CHANGED
|
@@ -107,7 +107,7 @@ import { VERSION } from "./loader";
|
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* Initializes `ng`, `animate`, `message`, `aria` and `router` modules.
|
|
110
|
-
* @returns {import('./
|
|
110
|
+
* @returns {import('./types').Module} `ng`module
|
|
111
111
|
*/
|
|
112
112
|
export function publishExternalAPI() {
|
|
113
113
|
const module = setupModuleLoader(window);
|
package/src/router/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import { UIRouterGlobals } from "./globals";
|
|
|
18
18
|
import { TransitionService } from "./transition/transition-service";
|
|
19
19
|
|
|
20
20
|
export function initRouter() {
|
|
21
|
-
window
|
|
21
|
+
window["angular"]
|
|
22
22
|
.module("ng.router", ["ng"])
|
|
23
23
|
.provider("$urlConfig", UrlConfigProvider)
|
|
24
24
|
.provider("$routerGlobals", UIRouterGlobals)
|
|
@@ -38,15 +38,15 @@ export class ParamType {
|
|
|
38
38
|
}
|
|
39
39
|
// consider these four methods to be "abstract methods" that should be overridden
|
|
40
40
|
/** @inheritdoc */
|
|
41
|
-
is(
|
|
41
|
+
is() {
|
|
42
42
|
return true;
|
|
43
43
|
}
|
|
44
44
|
/** @inheritdoc */
|
|
45
|
-
encode(val
|
|
45
|
+
encode(val) {
|
|
46
46
|
return val;
|
|
47
47
|
}
|
|
48
48
|
/** @inheritdoc */
|
|
49
|
-
decode(val
|
|
49
|
+
decode(val) {
|
|
50
50
|
return val;
|
|
51
51
|
}
|
|
52
52
|
/** @inheritdoc */
|
|
@@ -6,9 +6,9 @@ describe("router services", () => {
|
|
|
6
6
|
let $injector;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|
|
9
|
-
window
|
|
9
|
+
window["angular"] = new Angular();
|
|
10
10
|
publishExternalAPI();
|
|
11
|
-
let module = window
|
|
11
|
+
let module = window["angular"].module("defaultModule", ["ng.router"]);
|
|
12
12
|
module.config(
|
|
13
13
|
(
|
|
14
14
|
$urlServiceProvider,
|
|
@@ -27,7 +27,7 @@ describe("router services", () => {
|
|
|
27
27
|
},
|
|
28
28
|
);
|
|
29
29
|
|
|
30
|
-
$injector = window
|
|
30
|
+
$injector = window["angular"].bootstrap(document.getElementById("dummy"), [
|
|
31
31
|
"defaultModule",
|
|
32
32
|
]);
|
|
33
33
|
});
|
|
@@ -244,14 +244,6 @@ export class StateService {
|
|
|
244
244
|
}
|
|
245
245
|
return this;
|
|
246
246
|
}
|
|
247
|
-
/**
|
|
248
|
-
* Registers an invalid state handler
|
|
249
|
-
*
|
|
250
|
-
* This is a passthrough to [[StateService.onInvalid]] for ng1.
|
|
251
|
-
*/
|
|
252
|
-
onInvalid(callback) {
|
|
253
|
-
return this.onInvalid(callback);
|
|
254
|
-
}
|
|
255
247
|
|
|
256
248
|
/**
|
|
257
249
|
* Handler for when [[transitionTo]] is called with an invalid state.
|
package/src/types.js
CHANGED
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
194
|
* @callback CloneAttachFunction
|
|
195
|
-
* @param {JQLite} [clonedElement]
|
|
195
|
+
* @param {import('./shared/jqlite/jqlite').JQLite} [clonedElement]
|
|
196
196
|
* @param {Scope} [scope] // Let's hint but not force cloneAttachFn's signature
|
|
197
197
|
* @returns {any}
|
|
198
198
|
*/
|
|
@@ -203,13 +203,13 @@
|
|
|
203
203
|
* http://teropa.info/blog/2015/06/09/transclusion.html
|
|
204
204
|
*
|
|
205
205
|
* @typedef {Object} TranscludeFunction
|
|
206
|
-
* @property {function(TScope, CloneAttachFunction, JQLite=, string=): import('./shared/jqlite/jqlite').JQLite} transcludeWithScope
|
|
207
|
-
* @property {function(CloneAttachFunction=, JQLite=, string=): import('./shared/jqlite/jqlite').JQLite} transcludeWithoutScope
|
|
206
|
+
* @property {function(TScope, CloneAttachFunction, import('./shared/jqlite/jqlite').JQLite=, string=): import('./shared/jqlite/jqlite').JQLite} transcludeWithScope
|
|
207
|
+
* @property {function(CloneAttachFunction=, import('./shared/jqlite/jqlite').JQLite=, string=): import('./shared/jqlite/jqlite').JQLite} transcludeWithoutScope
|
|
208
208
|
* @property {function(string): boolean} isSlotFilled - Returns true if the specified slot contains content (i.e., one or more DOM nodes)
|
|
209
209
|
*/
|
|
210
210
|
|
|
211
211
|
/**
|
|
212
|
-
* @typedef {function(TScope, CloneAttachFunction, JQLite=, string=): import('./shared/jqlite/jqlite').JQLite} transcludeWithScope
|
|
212
|
+
* @typedef {function(TScope, CloneAttachFunction, import('./shared/jqlite/jqlite').JQLite=, string=): import('./shared/jqlite/jqlite').JQLite} transcludeWithScope
|
|
213
213
|
*/
|
|
214
214
|
|
|
215
215
|
/**
|
package/tsconfig.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @returns {
|
|
2
|
+
* @returns {function(Array, string|Object|function(any, number, []):[], function(any, any):boolean|boolean, string?): Array}
|
|
3
3
|
*/
|
|
4
|
-
export function filterFilter():
|
|
4
|
+
export function filterFilter(): (arg0: any[], arg1: string | any | ((arg0: any, arg1: number, arg2: []) => []), arg2: (arg0: any, arg1: any) => boolean | boolean, arg3: string | null) => any[];
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* }} pattern
|
|
14
14
|
* @param {string} groupSep The string to separate groups of number (e.g. `,`)
|
|
15
15
|
* @param {string} decimalSep The string to act as the decimal separator (e.g. `.`)
|
|
16
|
-
* @param {
|
|
16
|
+
* @param {any} fractionSize The size of the fractional part of the number
|
|
17
17
|
* @return {string} The number formatted as a string
|
|
18
18
|
*/
|
|
19
19
|
export function formatNumber(number: number, pattern: {
|
|
@@ -25,8 +25,8 @@ export function formatNumber(number: number, pattern: {
|
|
|
25
25
|
posPre: any;
|
|
26
26
|
negSuf: any;
|
|
27
27
|
posSuf: any;
|
|
28
|
-
}, groupSep: string, decimalSep: string, fractionSize:
|
|
28
|
+
}, groupSep: string, decimalSep: string, fractionSize: any): string;
|
|
29
29
|
/**
|
|
30
|
-
* @returns {
|
|
30
|
+
* @returns {function(Object, number?): Object}
|
|
31
31
|
*/
|
|
32
|
-
export function jsonFilter():
|
|
32
|
+
export function jsonFilter(): (arg0: any, arg1: number | null) => any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @returns {
|
|
2
|
+
* @returns {function(Array|ArrayLike|string|number, string|number, (string|number)?):Array|ArrayLike|string|number}
|
|
3
3
|
*/
|
|
4
|
-
export function limitToFilter():
|
|
4
|
+
export function limitToFilter(): (arg0: any[] | ArrayLike<any> | string | number, arg1: string | number, arg2: (string | number) | null) => any[] | ArrayLike<any> | string | number;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* @param {angular.IParseService} $parse
|
|
4
|
-
* @returns
|
|
5
|
-
*/
|
|
6
|
-
export function orderByFilter($parse: angular.IParseService): (array: any, sortPredicate: any, reverseOrder: any, compareFn: any) => any;
|
|
1
|
+
export function orderByFilter($parse: any): (array: any, sortPredicate: any, reverseOrder: any, compareFn: any) => any;
|
|
7
2
|
export namespace orderByFilter {
|
|
8
3
|
let $inject: string[];
|
|
9
4
|
}
|
package/types/public.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Initializes `ng`, `animate`, `message`, `aria` and `router` modules.
|
|
3
|
-
* @returns {import('./
|
|
3
|
+
* @returns {import('./types').Module} `ng`module
|
|
4
4
|
*/
|
|
5
|
-
export function publishExternalAPI(): import("./
|
|
5
|
+
export function publishExternalAPI(): import("./types").Module;
|
|
@@ -33,11 +33,11 @@ export class ParamType {
|
|
|
33
33
|
/** @inheritdoc */
|
|
34
34
|
inherit: boolean;
|
|
35
35
|
/** @inheritdoc */
|
|
36
|
-
is(
|
|
36
|
+
is(): boolean;
|
|
37
37
|
/** @inheritdoc */
|
|
38
|
-
encode(val: any
|
|
38
|
+
encode(val: any): any;
|
|
39
39
|
/** @inheritdoc */
|
|
40
|
-
decode(val: any
|
|
40
|
+
decode(val: any): any;
|
|
41
41
|
/** @inheritdoc */
|
|
42
42
|
equals(a: any, b: any): boolean;
|
|
43
43
|
$subPattern(): string;
|