@angular-wave/angular.ts 0.0.51 → 0.0.53
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/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/animations/animate-children-directive.js +19 -99
- package/src/animations/animate-children-directive.md +80 -0
- package/src/animations/animate-css-driver.js +250 -256
- package/src/animations/animate-css.js +646 -875
- package/src/animations/animate-css.md +263 -0
- package/src/animations/animate-js-driver.js +54 -56
- package/src/animations/animate-js.js +303 -306
- package/src/animations/animate-queue.js +707 -716
- package/src/animations/animate-swap.js +30 -119
- package/src/animations/animate-swap.md +88 -0
- package/src/animations/animation.js +3 -3
- package/src/core/animate/animate-css.js +21 -6
- package/src/core/animate/animate-runner.js +147 -145
- package/src/core/animate/animate.js +572 -585
- package/src/core/animate/animate.spec.js +194 -286
- package/src/core/animate/anomate.md +13 -0
- package/src/core/animate/helpers.js +10 -0
- package/src/core/compile/compile.spec.js +5 -6
- package/src/core/core.html +0 -1
- package/src/directive/select/select.js +301 -305
- package/src/public.js +0 -1
- package/src/router/directives/state-directives.js +256 -574
- package/src/router/directives/state-directives.md +435 -0
- package/src/router/directives/view-directive.js +3 -3
- package/src/router/index.js +7 -7
- package/types/animations/animate-children-directive.d.ts +5 -80
- package/types/animations/animate-css-driver.d.ts +11 -0
- package/types/animations/animate-css.d.ts +8 -0
- package/types/animations/animate-js-driver.d.ts +8 -0
- package/types/animations/animate-js.d.ts +12 -0
- package/types/animations/animate-queue.d.ts +19 -0
- package/types/animations/animate-swap.d.ts +5 -89
- package/types/core/animate/animate-css.d.ts +1 -1
- package/types/core/animate/animate-runner.d.ts +32 -0
- package/types/core/animate/animate.d.ts +509 -0
- package/types/core/animate/helpers.d.ts +8 -0
- package/types/directive/select/select.d.ts +79 -0
- package/types/router/directives/state-directives.d.ts +31 -0
- package/src/core/document.spec.js +0 -52
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export function selectDirective(): {
|
|
2
|
+
restrict: string;
|
|
3
|
+
require: string[];
|
|
4
|
+
controller: typeof SelectController;
|
|
5
|
+
priority: number;
|
|
6
|
+
link: {
|
|
7
|
+
pre: (scope: any, element: any, attr: any, ctrls: any) => void;
|
|
8
|
+
post: (scope: any, element: any, attrs: any, ctrls: any) => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export const optionDirective: (string | (($interpolate: any) => {
|
|
12
|
+
restrict: string;
|
|
13
|
+
priority: number;
|
|
14
|
+
compile(element: any, attr: any): (scope: any, element: any, attr: any) => void;
|
|
15
|
+
}))[];
|
|
16
|
+
declare function SelectController($element: any, $scope: any): void;
|
|
17
|
+
declare class SelectController {
|
|
18
|
+
constructor($element: any, $scope: any);
|
|
19
|
+
selectValueMap: {};
|
|
20
|
+
ngModelCtrl: {
|
|
21
|
+
$setViewValue: () => void;
|
|
22
|
+
$render: () => void;
|
|
23
|
+
};
|
|
24
|
+
multiple: boolean;
|
|
25
|
+
unknownOption: JQLite;
|
|
26
|
+
hasEmptyOption: boolean;
|
|
27
|
+
emptyOption: any;
|
|
28
|
+
renderUnknownOption: (val: any) => void;
|
|
29
|
+
updateUnknownOption: (val: any) => void;
|
|
30
|
+
generateUnknownOptionValue: (val: any) => string;
|
|
31
|
+
removeUnknownOption: () => void;
|
|
32
|
+
selectEmptyOption: () => void;
|
|
33
|
+
unselectEmptyOption: () => void;
|
|
34
|
+
readValue: () => any;
|
|
35
|
+
writeValue: (value: any) => void;
|
|
36
|
+
addOption: (value: any, element: any) => void;
|
|
37
|
+
removeOption: (value: any) => void;
|
|
38
|
+
hasOption: (value: any) => boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @ngdoc method
|
|
41
|
+
* @name select.SelectController#$hasEmptyOption
|
|
42
|
+
*
|
|
43
|
+
* @description
|
|
44
|
+
*
|
|
45
|
+
* Returns `true` if the select element currently has an empty option
|
|
46
|
+
* element, i.e. an option that signifies that the select is empty / the selection is null.
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
$hasEmptyOption: () => boolean;
|
|
50
|
+
/**
|
|
51
|
+
* @ngdoc method
|
|
52
|
+
* @name select.SelectController#$isUnknownOptionSelected
|
|
53
|
+
*
|
|
54
|
+
* @description
|
|
55
|
+
*
|
|
56
|
+
* Returns `true` if the select element's unknown option is selected. The unknown option is added
|
|
57
|
+
* and automatically selected whenever the select model doesn't match any option.
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
$isUnknownOptionSelected: () => boolean;
|
|
61
|
+
/**
|
|
62
|
+
* @ngdoc method
|
|
63
|
+
* @name select.SelectController#$isEmptyOptionSelected
|
|
64
|
+
*
|
|
65
|
+
* @description
|
|
66
|
+
*
|
|
67
|
+
* Returns `true` if the select element has an empty option and this empty option is currently
|
|
68
|
+
* selected. Returns `false` if the select element has no empty option or it is not selected.
|
|
69
|
+
*
|
|
70
|
+
*/
|
|
71
|
+
$isEmptyOptionSelected: () => boolean;
|
|
72
|
+
selectUnknownOrEmptyOption: (value: any) => void;
|
|
73
|
+
registerOption: (optionScope: any, optionElement: any, optionAttrs: any, interpolateValueFn: any, interpolateTextFn: any) => void;
|
|
74
|
+
}
|
|
75
|
+
declare namespace SelectController {
|
|
76
|
+
let $inject: string[];
|
|
77
|
+
}
|
|
78
|
+
import { JQLite } from "../../shared/jqlite/jqlite";
|
|
79
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export function $StateRefDirective($stateService: any, $timeout: any, $stateRegistry: any, $transitions: any): {
|
|
2
|
+
restrict: string;
|
|
3
|
+
require: string[];
|
|
4
|
+
link: (scope: any, element: any, attrs: any, ngSrefActive: any) => void;
|
|
5
|
+
};
|
|
6
|
+
export namespace $StateRefDirective {
|
|
7
|
+
let $inject: string[];
|
|
8
|
+
}
|
|
9
|
+
export function $StateRefDynamicDirective($state: any, $timeout: any, $stateRegistry: any, $transitions: any): {
|
|
10
|
+
restrict: string;
|
|
11
|
+
require: string[];
|
|
12
|
+
link: (scope: any, element: any, attrs: any, ngSrefActive: any) => void;
|
|
13
|
+
};
|
|
14
|
+
export namespace $StateRefDynamicDirective {
|
|
15
|
+
let $inject_1: string[];
|
|
16
|
+
export { $inject_1 as $inject };
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @param {*} $state
|
|
21
|
+
* @param {*} $routerGlobals
|
|
22
|
+
* @param {*} $interpolate
|
|
23
|
+
* @param {*} $stateRegistry
|
|
24
|
+
* @param {*} $transitions
|
|
25
|
+
* @returns {import("../../types").Directive}
|
|
26
|
+
*/
|
|
27
|
+
export function $StateRefActiveDirective($state: any, $routerGlobals: any, $interpolate: any, $stateRegistry: any, $transitions: any): import("../../types").Directive;
|
|
28
|
+
export namespace $StateRefActiveDirective {
|
|
29
|
+
let $inject_2: string[];
|
|
30
|
+
export { $inject_2 as $inject };
|
|
31
|
+
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { publishExternalAPI } from "../public";
|
|
2
|
-
import { createInjector } from "../injector";
|
|
3
|
-
import { JQLite } from "../shared/jqlite/jqlite";
|
|
4
|
-
|
|
5
|
-
describe("$document", () => {
|
|
6
|
-
let $document, $httpBackend, $http, $$isDocumentHidden;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
publishExternalAPI();
|
|
10
|
-
var injector = createInjector(["ng"]);
|
|
11
|
-
$document = injector.get("$document");
|
|
12
|
-
$httpBackend = injector.get("$httpBackend");
|
|
13
|
-
$http = injector.get("$http");
|
|
14
|
-
$$isDocumentHidden = injector.get("$$isDocumentHidden");
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it("should inject $document", () => {
|
|
18
|
-
expect($document).toEqual(JQLite(window.document));
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
describe("$$isDocumentHidden", () => {
|
|
23
|
-
let $rootScope;
|
|
24
|
-
|
|
25
|
-
beforeEach(() => {
|
|
26
|
-
publishExternalAPI();
|
|
27
|
-
var injector = createInjector(["ng"]);
|
|
28
|
-
$rootScope = injector.get("$rootScope");
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it("should listen on the visibilitychange event", () => {
|
|
32
|
-
let doc;
|
|
33
|
-
|
|
34
|
-
const spy = spyOn(window.document, "addEventListener").and.callThrough();
|
|
35
|
-
|
|
36
|
-
() => {
|
|
37
|
-
expect(spy.calls.mostRecent().args[0]).toBe("visibilitychange");
|
|
38
|
-
expect(spy.calls.mostRecent().args[1]).toEqual(jasmine.any(Function));
|
|
39
|
-
expect($$isDocumentHidden()).toBeFalsy(); // undefined in browsers that don't support visibility
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it("should remove the listener when the $rootScope is destroyed", () => {
|
|
44
|
-
const spy = spyOn(window.document, "removeEventListener").and.callThrough();
|
|
45
|
-
|
|
46
|
-
() => {
|
|
47
|
-
$rootScope.$destroy();
|
|
48
|
-
expect(spy.calls.mostRecent().args[0]).toBe("visibilitychange");
|
|
49
|
-
expect(spy.calls.mostRecent().args[1]).toEqual(jasmine.any(Function));
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
});
|