@angular-wave/angular.ts 0.0.43 → 0.0.45
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 +1 -1
- 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/directives/directives.test.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/shared/jqlite/jqlite.js +751 -699
- package/src/shared/jqlite/jqlite.spec.js +0 -8
- package/src/shared/utils.js +3 -3
- package/src/src.test.js +1 -1
- package/src/types.js +6 -6
- 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/shared/jqlite/jqlite.d.ts +46 -19
- package/types/shared/utils.d.ts +1 -1
- package/types/types.d.ts +5 -5
- package/types-back/index.d.ts +0 -24
|
@@ -1661,14 +1661,6 @@ describe("jqLite", () => {
|
|
|
1661
1661
|
},
|
|
1662
1662
|
);
|
|
1663
1663
|
});
|
|
1664
|
-
|
|
1665
|
-
it("should throw an error if a selector is passed", () => {
|
|
1666
|
-
const aElem = JQLite(a);
|
|
1667
|
-
aElem.on("click", () => {});
|
|
1668
|
-
expect(() => {
|
|
1669
|
-
aElem.off("click", () => {}, ".test");
|
|
1670
|
-
}).toThrow();
|
|
1671
|
-
});
|
|
1672
1664
|
});
|
|
1673
1665
|
|
|
1674
1666
|
describe("replaceWith", () => {
|
package/src/shared/utils.js
CHANGED
|
@@ -511,8 +511,8 @@ export function extend(dst) {
|
|
|
511
511
|
* @param {...Object} src Source object(s).
|
|
512
512
|
* @returns {Object} Reference to `dst`.
|
|
513
513
|
*/
|
|
514
|
-
export function merge(dst) {
|
|
515
|
-
return baseExtend(dst,
|
|
514
|
+
export function merge(dst, ...src) {
|
|
515
|
+
return baseExtend(dst, src, true);
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
export function toInt(str) {
|
|
@@ -1026,7 +1026,7 @@ export function parseKeyValue(keyValue) {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
1028
|
});
|
|
1029
|
-
return obj;
|
|
1029
|
+
return /** @type {Object.<string,boolean|Array>} */ (obj);
|
|
1030
1030
|
}
|
|
1031
1031
|
|
|
1032
1032
|
export function toKeyValue(obj) {
|
package/src/src.test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { test, expect } from "@playwright/test";
|
|
2
2
|
|
|
3
|
-
test("
|
|
3
|
+
test("src tests contain no errors", async ({ page }) => {
|
|
4
4
|
await page.goto("src/src.html");
|
|
5
5
|
await page.content();
|
|
6
6
|
await page.waitForTimeout(6000);
|
package/src/types.js
CHANGED
|
@@ -192,8 +192,8 @@
|
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
194
|
* @callback CloneAttachFunction
|
|
195
|
-
* @param {JQLite} [clonedElement]
|
|
196
|
-
* @param {Scope} [scope] // Let's hint but not force cloneAttachFn's signature
|
|
195
|
+
* @param {import('./shared/jqlite/jqlite').JQLite} [clonedElement]
|
|
196
|
+
* @param {import('./core/scope/scope').Scope} [scope] // Let's hint but not force cloneAttachFn's signature
|
|
197
197
|
* @returns {any}
|
|
198
198
|
*/
|
|
199
199
|
|
|
@@ -203,17 +203,17 @@
|
|
|
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
|
/**
|
|
216
|
-
* @typedef {function(CloneAttachFunction=, JQLite=, string=): import('./shared/jqlite/jqlite').JQLite} transcludeWithoutScope
|
|
216
|
+
* @typedef {function(CloneAttachFunction=, import('./shared/jqlite/jqlite').JQLite=, string=): import('./shared/jqlite/jqlite').JQLite} transcludeWithoutScope
|
|
217
217
|
*/
|
|
218
218
|
|
|
219
219
|
/**
|
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;
|
|
@@ -127,11 +127,17 @@ export class StateService {
|
|
|
127
127
|
*/
|
|
128
128
|
state(definition: angular.Ng1StateDeclaration): this;
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
130
|
+
* Handler for when [[transitionTo]] is called with an invalid state.
|
|
131
|
+
*
|
|
132
|
+
* Invokes the [[onInvalid]] callbacks, in natural order.
|
|
133
|
+
* Each callback's return value is checked in sequence until one of them returns an instance of TargetState.
|
|
134
|
+
* The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises.
|
|
131
135
|
*
|
|
132
|
-
*
|
|
136
|
+
* If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned.
|
|
137
|
+
*
|
|
138
|
+
* @internal
|
|
133
139
|
*/
|
|
134
|
-
|
|
140
|
+
_handleInvalidTargetState(fromPath: any, toState: any): any;
|
|
135
141
|
/**
|
|
136
142
|
* Registers an Invalid State handler
|
|
137
143
|
*
|
|
@@ -157,18 +163,6 @@ export class StateService {
|
|
|
157
163
|
* @returns a function which deregisters the callback
|
|
158
164
|
*/
|
|
159
165
|
onInvalid(callback: Function): any;
|
|
160
|
-
/**
|
|
161
|
-
* Handler for when [[transitionTo]] is called with an invalid state.
|
|
162
|
-
*
|
|
163
|
-
* Invokes the [[onInvalid]] callbacks, in natural order.
|
|
164
|
-
* Each callback's return value is checked in sequence until one of them returns an instance of TargetState.
|
|
165
|
-
* The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises.
|
|
166
|
-
*
|
|
167
|
-
* If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned.
|
|
168
|
-
*
|
|
169
|
-
* @internal
|
|
170
|
-
*/
|
|
171
|
-
_handleInvalidTargetState(fromPath: any, toState: any): any;
|
|
172
166
|
/**
|
|
173
167
|
* Reloads the current state
|
|
174
168
|
*
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts kebab-case to camelCase.
|
|
3
|
-
* @param {string} name Name to normalize
|
|
4
|
-
* @returns {string}
|
|
5
|
-
*/
|
|
6
|
-
export function kebabToCamel(name: string): string;
|
|
7
|
-
/**
|
|
8
|
-
* Converts sname to camelCase.
|
|
9
|
-
* @param {string} name
|
|
10
|
-
* @returns {string}
|
|
11
|
-
*/
|
|
12
|
-
export function snakeToCamel(name: string): string;
|
|
13
1
|
/**
|
|
14
2
|
* JQLite both a function and an array-like data structure for manipulation of DOM, linking elements to expando cache,
|
|
15
3
|
* and execution of chain functions.
|
|
@@ -61,10 +49,49 @@ export class JQLite {
|
|
|
61
49
|
* @returns {JQLite} The JQLite collection for chaining.
|
|
62
50
|
*/
|
|
63
51
|
on(type: string, fn: Function): JQLite;
|
|
52
|
+
/**
|
|
53
|
+
* Removes an event listener to each element in JQLite collection.
|
|
54
|
+
*
|
|
55
|
+
* @param {string} type - The event type(s) to remove listener from
|
|
56
|
+
* @param {Function} fn - The function to remove from event type.
|
|
57
|
+
* @returns {JQLite}
|
|
58
|
+
*/
|
|
59
|
+
off(type: string, fn: Function): JQLite;
|
|
60
|
+
/**
|
|
61
|
+
* Remove data by name from cache associated with each element in JQLite collection.
|
|
62
|
+
* @param {string} name - The key of the data associated with element
|
|
63
|
+
* @returns {JQLite}
|
|
64
|
+
*/
|
|
65
|
+
removeData(name: string): JQLite;
|
|
66
|
+
/**
|
|
67
|
+
* Gets or sets data on a parent element
|
|
68
|
+
* @param {string} name
|
|
69
|
+
* @param {any} value
|
|
70
|
+
* @returns {JQLite|any}
|
|
71
|
+
*/
|
|
72
|
+
inheritedData(name: string, value: any): JQLite | any;
|
|
73
|
+
/**
|
|
74
|
+
* Gets or sets innerHTML on the first element in JQLite collection
|
|
75
|
+
* @param {string} value
|
|
76
|
+
* @returns {JQLite|any|undefined}
|
|
77
|
+
*/
|
|
78
|
+
html(value: string): JQLite | any | undefined;
|
|
64
79
|
toString(): string;
|
|
65
80
|
eq(index: any): JQLite;
|
|
66
81
|
length: number;
|
|
67
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Converts kebab-case to camelCase.
|
|
85
|
+
* @param {string} name Name to normalize
|
|
86
|
+
* @returns {string}
|
|
87
|
+
*/
|
|
88
|
+
export function kebabToCamel(name: string): string;
|
|
89
|
+
/**
|
|
90
|
+
* Converts sname to camelCase.
|
|
91
|
+
* @param {string} name
|
|
92
|
+
* @returns {string}
|
|
93
|
+
*/
|
|
94
|
+
export function snakeToCamel(name: string): string;
|
|
68
95
|
/**
|
|
69
96
|
* Removes expando data from this element. If key is provided, only
|
|
70
97
|
* its field is removed. If data is empty, also removes `ExpandoStore`
|
|
@@ -105,13 +132,6 @@ export function getOrSetCacheData(element: Element, key: string | any, value?: a
|
|
|
105
132
|
* @param {boolean} keepData
|
|
106
133
|
*/
|
|
107
134
|
export function removeElement(element: Element, keepData?: boolean): void;
|
|
108
|
-
export function getBooleanAttrName(element: any, name: any): any;
|
|
109
|
-
/**
|
|
110
|
-
* Takes an array of elements, calls any `$destroy` event handlers, removes any data in cache, and finally removes any
|
|
111
|
-
* listeners.
|
|
112
|
-
* @param {NodeListOf<Element>} nodes
|
|
113
|
-
*/
|
|
114
|
-
export function cleanElementData(nodes: NodeListOf<Element>): void;
|
|
115
135
|
/**
|
|
116
136
|
* @param {string} elementStr
|
|
117
137
|
* @returns {string} Returns the string representation of the element.
|
|
@@ -123,4 +143,11 @@ export function startingTag(elementStr: string): string;
|
|
|
123
143
|
* @returns {JQLite} the inputted object or a JQLite collection containing the nodes
|
|
124
144
|
*/
|
|
125
145
|
export function getBlockNodes(nodes: any[]): JQLite;
|
|
146
|
+
export function getBooleanAttrName(element: any, name: any): any;
|
|
147
|
+
/**
|
|
148
|
+
* Takes an array of elements, calls any `$destroy` event handlers, removes any data in cache, and finally removes any
|
|
149
|
+
* listeners.
|
|
150
|
+
* @param {NodeListOf<Element>} nodes
|
|
151
|
+
*/
|
|
152
|
+
export function cleanElementData(nodes: NodeListOf<Element>): void;
|
|
126
153
|
export const BOOLEAN_ATTR: {};
|
package/types/shared/utils.d.ts
CHANGED
|
@@ -292,7 +292,7 @@ export function extend(dst: any, ...args: any[]): any;
|
|
|
292
292
|
* @param {...Object} src Source object(s).
|
|
293
293
|
* @returns {Object} Reference to `dst`.
|
|
294
294
|
*/
|
|
295
|
-
export function merge(dst: any, ...
|
|
295
|
+
export function merge(dst: any, ...src: any[]): any;
|
|
296
296
|
export function toInt(str: any): number;
|
|
297
297
|
export function isNumberNaN(num: any): boolean;
|
|
298
298
|
export function inherit(parent: any, extra: any): any;
|
package/types/types.d.ts
CHANGED
|
@@ -23,22 +23,22 @@ export type DirectiveCompileFn = (templateElement: TElement, templateAttributes:
|
|
|
23
23
|
* Link function for an AngularJS directive.
|
|
24
24
|
*/
|
|
25
25
|
export type DirectiveLinkFn = (scope: TScope, instanceElement: TElement, instanceAttributes: TAttributes, controller?: TController, transclude?: TranscludeFunction) => void;
|
|
26
|
-
export type CloneAttachFunction = (clonedElement?: JQLite, scope?: Scope) => any;
|
|
26
|
+
export type CloneAttachFunction = (clonedElement?: import("./shared/jqlite/jqlite").JQLite, scope?: import("./core/scope/scope").Scope) => any;
|
|
27
27
|
/**
|
|
28
28
|
* This corresponds to $transclude passed to controllers and to the transclude function passed to link functions.
|
|
29
29
|
* https://docs.angularjs.org/api/ng/service/$compile#-controller-
|
|
30
30
|
* http://teropa.info/blog/2015/06/09/transclusion.html
|
|
31
31
|
*/
|
|
32
32
|
export type TranscludeFunction = {
|
|
33
|
-
transcludeWithScope: (arg0: TScope, arg1: CloneAttachFunction, arg2: JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
|
|
34
|
-
transcludeWithoutScope: (arg0: CloneAttachFunction | undefined, arg1: JQLite | undefined, arg2: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
|
|
33
|
+
transcludeWithScope: (arg0: TScope, arg1: CloneAttachFunction, arg2: import("./shared/jqlite/jqlite").JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
|
|
34
|
+
transcludeWithoutScope: (arg0: CloneAttachFunction | undefined, arg1: import("./shared/jqlite/jqlite").JQLite | undefined, arg2: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
|
|
35
35
|
/**
|
|
36
36
|
* - Returns true if the specified slot contains content (i.e., one or more DOM nodes)
|
|
37
37
|
*/
|
|
38
38
|
isSlotFilled: (arg0: string) => boolean;
|
|
39
39
|
};
|
|
40
|
-
export type transcludeWithScope = (arg0: TScope, arg1: CloneAttachFunction, arg2: JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
|
|
41
|
-
export type transcludeWithoutScope = (arg0: CloneAttachFunction | undefined, arg1: JQLite | undefined, arg2: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
|
|
40
|
+
export type transcludeWithScope = (arg0: TScope, arg1: CloneAttachFunction, arg2: import("./shared/jqlite/jqlite").JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
|
|
41
|
+
export type transcludeWithoutScope = (arg0: CloneAttachFunction | undefined, arg1: import("./shared/jqlite/jqlite").JQLite | undefined, arg2: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
|
|
42
42
|
/**
|
|
43
43
|
* Represents the pre and post linking functions of a directive.
|
|
44
44
|
*/
|
package/types-back/index.d.ts
CHANGED
|
@@ -600,7 +600,6 @@ declare namespace angular {
|
|
|
600
600
|
* see https://docs.angularjs.org/api/ng/service/$filter
|
|
601
601
|
*/
|
|
602
602
|
interface IFilterService {
|
|
603
|
-
(name: "filter"): IFilterFilter;
|
|
604
603
|
(name: "currency"): IFilterCurrency;
|
|
605
604
|
(name: "number"): IFilterNumber;
|
|
606
605
|
(name: "date"): IFilterDate;
|
|
@@ -616,29 +615,6 @@ declare namespace angular {
|
|
|
616
615
|
<T>(name: string): T;
|
|
617
616
|
}
|
|
618
617
|
|
|
619
|
-
interface IFilterFilter {
|
|
620
|
-
<T>(
|
|
621
|
-
array: T[],
|
|
622
|
-
expression:
|
|
623
|
-
| string
|
|
624
|
-
| IFilterFilterPatternObject
|
|
625
|
-
| IFilterFilterPredicateFunc<T>,
|
|
626
|
-
comparator?: IFilterFilterComparatorFunc<T> | boolean,
|
|
627
|
-
): T[];
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
interface IFilterFilterPatternObject {
|
|
631
|
-
[name: string]: any;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
interface IFilterFilterPredicateFunc<T> {
|
|
635
|
-
(value: T, index: number, array: T[]): boolean;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
interface IFilterFilterComparatorFunc<T> {
|
|
639
|
-
(actual: T, expected: T): boolean;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
618
|
interface IFilterOrderByItem {
|
|
643
619
|
value: any;
|
|
644
620
|
type: string;
|