@angular-wave/angular.ts 0.3.1 → 0.4.1
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/.github/workflows/ci.yml +57 -0
- 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/core/compile/attributes.js +1 -1
- package/src/core/compile/compile.js +1 -1
- package/src/core/compile/compile.test.js +1 -1
- package/src/core/exception-handler.js +1 -5
- package/src/core/interpolate/interpolate.js +33 -26
- package/src/core/interval/interval-factory.js +6 -22
- package/src/core/interval/interval.spec.js +0 -25
- package/src/core/q/q.js +0 -27
- package/src/core/q/q.spec.js +0 -44
- package/src/core/scope/scope.js +35 -42
- package/src/core/scope/scope.spec.js +71 -13
- package/src/core/timeout/timeout.js +2 -6
- package/src/directive/attrs/attrs.js +1 -1
- package/src/directive/input/input.spec.js +0 -1
- package/src/directive/observe/observe.html +18 -0
- package/src/directive/observe/observe.js +37 -0
- package/src/directive/observe/observe.spec.js +92 -0
- package/src/directive/observe/observe.test.js +9 -0
- package/src/directive/observe/test.html +197 -0
- package/src/public.js +7 -6
- package/src/router/state/state-service.js +3 -3
- package/src/router/view-scroll.js +13 -8
- package/src/services/log.js +0 -6
- package/types/core/compile/attributes.d.ts +3 -3
- package/types/core/compile/compile.d.ts +1 -1
- package/types/core/exception-handler.d.ts +2 -2
- package/types/core/interpolate/interpolate.d.ts +7 -4
- package/types/core/interval/interval-factory.d.ts +1 -1
- package/types/core/q/q.d.ts +0 -5
- package/types/core/scope/scope.d.ts +11 -2
- package/types/core/timeout/timeout.d.ts +2 -2
- package/types/directive/observe/observe.d.ts +4 -0
- package/types/router/state/state-service.d.ts +1 -1
- package/types/router/view-scroll.d.ts +3 -3
- package/types/services/log.d.ts +0 -5
- package/.github/workflows/lint.yml +0 -19
- package/.github/workflows/playwright.yml +0 -27
- package/.github/workflows/types.yml +0 -19
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export class ViewScrollProvider {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.enabled = false;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
useAnchorScroll() {
|
|
7
|
+
this.enabled = true;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
$get = [
|
|
7
11
|
"$anchorScroll",
|
|
8
12
|
"$timeout",
|
|
9
13
|
/**
|
|
@@ -12,15 +16,16 @@ export function $ViewScrollProvider() {
|
|
|
12
16
|
* @returns {import('../services/anchor-scroll').AnchorScrollObject|Function}
|
|
13
17
|
*/
|
|
14
18
|
($anchorScroll, $timeout) => {
|
|
15
|
-
if (
|
|
19
|
+
if (this.enabled) {
|
|
16
20
|
return $anchorScroll;
|
|
17
21
|
}
|
|
18
22
|
/**
|
|
19
23
|
* @param {import('../shared/jqlite/jqlite').JQLite} $element
|
|
24
|
+
* @returns {import('../core/q/q').QPromise<any>}
|
|
20
25
|
*/
|
|
21
26
|
return function ($element) {
|
|
22
27
|
return $timeout(
|
|
23
|
-
|
|
28
|
+
() => {
|
|
24
29
|
$element[0].scrollIntoView();
|
|
25
30
|
},
|
|
26
31
|
0,
|
package/src/services/log.js
CHANGED
|
@@ -30,12 +30,6 @@ export let LogService = {
|
|
|
30
30
|
warn: undefined,
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* @typedef {import('../types').ServiceProvider} LogProvider
|
|
35
|
-
* @property {function(): boolean} debugEnabled - Function to get the current debug state.
|
|
36
|
-
* @property {function(boolean): angular.LogProvider} debugEnabled - Function to enable or disable debug.
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
33
|
/**
|
|
40
34
|
* @type {LogProvider}
|
|
41
35
|
* Use the `$logProvider` to configure how the application logs messages
|
|
@@ -9,15 +9,15 @@ export class Attributes {
|
|
|
9
9
|
/**
|
|
10
10
|
* @param {import('../scope/scope').Scope} $rootScope
|
|
11
11
|
* @param {*} $animate
|
|
12
|
-
* @param {import("../exception-handler").
|
|
12
|
+
* @param {import("../exception-handler").ErrorHandler} $exceptionHandler
|
|
13
13
|
* @param {*} $sce
|
|
14
14
|
* @param {import('../../shared/jqlite/jqlite').JQLite} [element]
|
|
15
15
|
* @param {*} [attributesToCopy]
|
|
16
16
|
*/
|
|
17
|
-
constructor($rootScope: import("../scope/scope").Scope, $animate: any, $exceptionHandler: import("../exception-handler").
|
|
17
|
+
constructor($rootScope: import("../scope/scope").Scope, $animate: any, $exceptionHandler: import("../exception-handler").ErrorHandler, $sce: any, element?: import("../../shared/jqlite/jqlite").JQLite, attributesToCopy?: any);
|
|
18
18
|
$rootScope: import("../scope/scope").Scope;
|
|
19
19
|
$animate: any;
|
|
20
|
-
$exceptionHandler: import("../exception-handler").
|
|
20
|
+
$exceptionHandler: import("../exception-handler").ErrorHandler;
|
|
21
21
|
$sce: any;
|
|
22
22
|
$attr: {};
|
|
23
23
|
$$element: import("../../shared/jqlite/jqlite").JQLite;
|
|
@@ -99,7 +99,7 @@ export class CompileProvider {
|
|
|
99
99
|
* @returns {object} `this` for chaining
|
|
100
100
|
*/
|
|
101
101
|
addPropertySecurityContext: (elementName: string, propertyName: string, ctx: string) => object;
|
|
102
|
-
$get: (string | (($injector: import("../../core/di/internal-injector").InjectorService, $interpolate: any, $exceptionHandler: import("../exception-handler").
|
|
102
|
+
$get: (string | (($injector: import("../../core/di/internal-injector").InjectorService, $interpolate: any, $exceptionHandler: import("../exception-handler").ErrorHandler, $templateRequest: any, $parse: import("../parser/parse").ParseService, $controller: any, $rootScope: import("../scope/scope").Scope, $sce: any, $animate: any) => ($compileNodes: string | NodeList, transcludeFn: any, maxPriority: any, ignoreDirective: any, previousCompileContext: any) => (scope: any, cloneConnectFn: any, options: any) => JQLite))[];
|
|
103
103
|
}
|
|
104
104
|
export namespace CompileProvider {
|
|
105
105
|
let $inject: string[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @constructor
|
|
3
|
-
* @this {
|
|
3
|
+
* @this {import('../types').ServiceProvider}
|
|
4
4
|
*/
|
|
5
|
-
export function ExceptionHandlerProvider(this:
|
|
5
|
+
export function ExceptionHandlerProvider(this: any): void;
|
|
6
6
|
export class ExceptionHandlerProvider {
|
|
7
7
|
$get: (string | (($log: import("../services/log").LogService) => ErrorHandler))[];
|
|
8
8
|
}
|
|
@@ -10,23 +10,26 @@
|
|
|
10
10
|
* security bugs!
|
|
11
11
|
* </div>
|
|
12
12
|
*/
|
|
13
|
-
export function InterpolateProvider(): void;
|
|
14
13
|
export class InterpolateProvider {
|
|
14
|
+
/** @type {string} */
|
|
15
|
+
start: string;
|
|
16
|
+
/** @type {string} */
|
|
17
|
+
end: string;
|
|
15
18
|
/**
|
|
16
19
|
* Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
|
|
17
20
|
*
|
|
18
21
|
* @param {string=} value new value to set the starting symbol to.
|
|
19
22
|
* @returns {string|InterpolateProvider} Returns the symbol when used as getter and self if used as setter.
|
|
20
23
|
*/
|
|
21
|
-
startSymbol
|
|
24
|
+
startSymbol(value?: string | undefined): string | InterpolateProvider;
|
|
22
25
|
/**
|
|
23
26
|
* Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
|
|
24
27
|
*
|
|
25
28
|
* @param {string=} value new value to set the ending symbol to.
|
|
26
29
|
* @returns {string|InterpolateProvider} Returns the symbol when used as getter and self if used as setter.
|
|
27
30
|
*/
|
|
28
|
-
endSymbol
|
|
29
|
-
$get: (string | (($parse: import("../parser/parse").ParseService, $
|
|
31
|
+
endSymbol(value?: string | undefined): string | InterpolateProvider;
|
|
32
|
+
$get: (string | (($parse: import("../parser/parse").ParseService, $sce: any) => {
|
|
30
33
|
(text: string, mustHaveExpression?: boolean | undefined, trustedContext?: string | undefined, allOrNothing?: boolean | undefined): Function;
|
|
31
34
|
/**
|
|
32
35
|
* Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export function $IntervalFactoryProvider(): void;
|
|
2
2
|
export class $IntervalFactoryProvider {
|
|
3
|
-
$get: (string | (($
|
|
3
|
+
$get: (string | (($q: any, $rootScope: import("../scope/scope").Scope) => (setIntervalFn: any, clearIntervalFn: any) => (fn: any, delay: any, count: any, ...args: any[]) => any))[];
|
|
4
4
|
}
|
package/types/core/q/q.d.ts
CHANGED
|
@@ -52,11 +52,6 @@ export class $QProvider {
|
|
|
52
52
|
*/
|
|
53
53
|
errorOnUnhandledRejections(value?: boolean | undefined): boolean | $QProvider;
|
|
54
54
|
}
|
|
55
|
-
export class $$QProvider {
|
|
56
|
-
errorOn: boolean;
|
|
57
|
-
$get: (string | (($exceptionHandler: any) => any))[];
|
|
58
|
-
errorOnUnhandledRejections(value: any): boolean | this;
|
|
59
|
-
}
|
|
60
55
|
export type QService = {
|
|
61
56
|
defer: () => Deferred<any>;
|
|
62
57
|
all: (arg0: any | null) => QPromise<any>;
|
|
@@ -73,6 +73,7 @@ export const $$applyAsyncQueue: Function[];
|
|
|
73
73
|
*
|
|
74
74
|
*/
|
|
75
75
|
export class RootScopeProvider {
|
|
76
|
+
rootScope: Scope;
|
|
76
77
|
$get: (string | ((exceptionHandler: import("../exception-handler").ErrorHandler, parse: import("../parser/parse").ParseService, browser: import("../../services/browser").Browser) => Scope))[];
|
|
77
78
|
}
|
|
78
79
|
/**
|
|
@@ -100,6 +101,14 @@ export class RootScopeProvider {
|
|
|
100
101
|
* to construct.
|
|
101
102
|
*/
|
|
102
103
|
export class Scope {
|
|
104
|
+
/**
|
|
105
|
+
* @param {boolean} [root=false] - Indicates if this scope is the root scope.
|
|
106
|
+
*/
|
|
107
|
+
constructor(root?: boolean);
|
|
108
|
+
/**
|
|
109
|
+
* @type {boolean}
|
|
110
|
+
*/
|
|
111
|
+
isRoot: boolean;
|
|
103
112
|
/**
|
|
104
113
|
* @type {number} Unique scope ID (monotonically increasing) useful for debugging.
|
|
105
114
|
*/
|
|
@@ -142,8 +151,8 @@ export class Scope {
|
|
|
142
151
|
$$destroyed: boolean;
|
|
143
152
|
/** @type {boolean} */
|
|
144
153
|
$$suspended: boolean;
|
|
145
|
-
/** @type {
|
|
146
|
-
$$listeners:
|
|
154
|
+
/** @type {Map<String, Function[]>} */
|
|
155
|
+
$$listeners: Map<string, Function[]>;
|
|
147
156
|
/** @type {object} */
|
|
148
157
|
$$listenerCount: object;
|
|
149
158
|
/** @type {number} */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export class TimeoutProvider {
|
|
2
|
-
$get: (string | (($rootScope: import("../scope/scope").Scope, $browser: import("../../services/browser").Browser, $q: any,
|
|
3
|
-
(fn?: (() => any) | undefined, delay?: number | undefined, invokeApply?: boolean
|
|
2
|
+
$get: (string | (($rootScope: import("../scope/scope").Scope, $browser: import("../../services/browser").Browser, $q: any, $exceptionHandler: import("../exception-handler").ErrorHandler) => {
|
|
3
|
+
(fn?: (() => any) | undefined, delay?: number | undefined, invokeApply?: boolean, ...args: any[]): import("../q/q").QPromise<any>;
|
|
4
4
|
/**
|
|
5
5
|
* Cancels a task associated with the `promise`. As a result of this, the promise will be
|
|
6
6
|
* resolved with a rejection.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
useAnchorScroll
|
|
1
|
+
export class ViewScrollProvider {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
useAnchorScroll(): void;
|
|
4
4
|
$get: (string | (($anchorScroll: import("../services/anchor-scroll").AnchorScrollObject, $timeout: any) => import("../services/anchor-scroll").AnchorScrollObject | Function))[];
|
|
5
5
|
}
|
package/types/services/log.d.ts
CHANGED
|
@@ -35,11 +35,6 @@ export type LogService = {
|
|
|
35
35
|
* @type {LogService}
|
|
36
36
|
*/
|
|
37
37
|
export let LogService: LogService;
|
|
38
|
-
/**
|
|
39
|
-
* @typedef {import('../types').ServiceProvider} LogProvider
|
|
40
|
-
* @property {function(): boolean} debugEnabled - Function to get the current debug state.
|
|
41
|
-
* @property {function(boolean): angular.LogProvider} debugEnabled - Function to enable or disable debug.
|
|
42
|
-
*/
|
|
43
38
|
/**
|
|
44
39
|
* @type {LogProvider}
|
|
45
40
|
* Use the `$logProvider` to configure how the application logs messages
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: Lint check
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches: [ main, master ]
|
|
5
|
-
pull_request:
|
|
6
|
-
branches: [ main, master ]
|
|
7
|
-
jobs:
|
|
8
|
-
test:
|
|
9
|
-
timeout-minutes: 60
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v4
|
|
13
|
-
- uses: actions/setup-node@v4
|
|
14
|
-
with:
|
|
15
|
-
node-version: lts/*
|
|
16
|
-
- name: Install dependencies
|
|
17
|
-
run: npm ci
|
|
18
|
-
- name: Run lint check
|
|
19
|
-
run: ./node_modules/.bin/eslint ./src
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
name: Playwright Tests
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches: [ main, master ]
|
|
5
|
-
pull_request:
|
|
6
|
-
branches: [ main, master ]
|
|
7
|
-
jobs:
|
|
8
|
-
test:
|
|
9
|
-
timeout-minutes: 60
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v4
|
|
13
|
-
- uses: actions/setup-node@v4
|
|
14
|
-
with:
|
|
15
|
-
node-version: lts/*
|
|
16
|
-
- name: Install dependencies
|
|
17
|
-
run: npm ci
|
|
18
|
-
- name: Install Playwright Browsers
|
|
19
|
-
run: npx playwright install --with-deps
|
|
20
|
-
- name: Run Playwright tests
|
|
21
|
-
run: npx playwright test
|
|
22
|
-
- uses: actions/upload-artifact@v4
|
|
23
|
-
if: always()
|
|
24
|
-
with:
|
|
25
|
-
name: playwright-report
|
|
26
|
-
path: playwright-report/
|
|
27
|
-
retention-days: 30
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: TypeScript check
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches: [ main, master ]
|
|
5
|
-
pull_request:
|
|
6
|
-
branches: [ main, master ]
|
|
7
|
-
jobs:
|
|
8
|
-
test:
|
|
9
|
-
timeout-minutes: 60
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v4
|
|
13
|
-
- uses: actions/setup-node@v4
|
|
14
|
-
with:
|
|
15
|
-
node-version: lts/*
|
|
16
|
-
- name: Install dependencies
|
|
17
|
-
run: npm ci
|
|
18
|
-
- name: Run TypeScript check
|
|
19
|
-
run: ./node_modules/.bin/tsc
|