@angular-wave/angular.ts 0.4.4 → 0.4.6
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/Makefile +1 -0
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -12
- package/index.html +3 -74
- package/package.json +1 -1
- package/src/angular.spec.js +5 -0
- package/src/animations/animate-css.js +13 -5
- package/src/animations/animate-queue.js +21 -22
- package/src/animations/animate-runner.js +8 -4
- package/src/animations/animate.md +1 -1
- package/src/animations/animate.spec.js +21 -0
- package/src/animations/animation.js +1 -1
- package/src/binding.spec.js +1 -0
- package/src/core/compile/compile.js +25 -27
- package/src/core/compile/compile.spec.js +266 -17
- package/src/core/controller/controller.js +0 -2
- package/src/core/di/injector.md +1 -1
- package/src/core/di/injector.spec.js +2 -0
- package/src/core/di/internal-injector.js +1 -2
- package/src/core/interpolate/interpolate.js +12 -28
- package/src/core/interpolate/interpolate.spec.js +16 -70
- package/src/core/interval/interval-factory.js +50 -0
- package/src/core/interval/interval.html +18 -0
- package/src/core/interval/interval.js +77 -0
- package/src/core/interval/interval.md +123 -0
- package/src/core/interval/interval.spec.js +280 -0
- package/src/core/interval/interval.test.js +1 -1
- package/src/core/location/location.js +53 -59
- package/src/core/location/location.spec.js +27 -27
- package/src/core/on.spec.js +7 -0
- package/src/core/parse/interpreter.js +7 -10
- package/src/core/parse/parse.js +5 -26
- package/src/core/parse/parse.spec.js +91 -95
- package/src/core/prop.spec.js +60 -4
- package/src/core/q/q.html +18 -0
- package/src/core/q/q.js +472 -0
- package/src/core/q/q.md +211 -0
- package/src/core/q/q.spec.js +2748 -0
- package/src/core/q/q.test.js +12 -0
- package/src/core/sce/sce.spec.js +8 -0
- package/src/core/{model/model.html → scope/scope.html} +1 -1
- package/src/core/scope/scope.js +16 -15
- package/src/core/scope/scope.spec.js +1959 -24
- package/src/core/scope/scope.test.js +12 -0
- package/src/core/timeout/timeout.html +18 -0
- package/src/core/timeout/timeout.js +109 -0
- package/src/core/timeout/timeout.spec.js +354 -0
- package/src/core/timeout/timout.test.js +12 -0
- package/src/core/url-utils/url-utils.spec.js +1 -1
- package/src/directive/aria/aria.js +6 -3
- package/src/directive/aria/aria.spec.js +87 -0
- package/src/directive/attrs/attrs.spec.js +5 -0
- package/src/directive/attrs/boolean.spec.js +15 -0
- package/src/directive/attrs/element-style.spec.js +8 -0
- package/src/directive/attrs/src.spec.js +7 -0
- package/src/directive/bind/bind.spec.js +33 -0
- package/src/directive/bind/bing-html.spec.js +3 -0
- package/src/directive/class/class.js +3 -3
- package/src/directive/class/class.spec.js +75 -9
- package/src/directive/controller/controller.spec.js +13 -0
- package/src/directive/events/click.spec.js +3 -0
- package/src/directive/events/event.spec.js +6 -0
- package/src/directive/events/events.html +1 -0
- package/src/directive/form/form.js +3 -2
- package/src/directive/form/form.spec.js +65 -0
- package/src/directive/if/if.spec.js +4 -0
- package/src/directive/include/include.spec.js +59 -8
- package/src/directive/init/init.js +2 -6
- package/src/directive/init/init.spec.js +2 -0
- package/src/directive/input/input.spec.js +136 -0
- package/src/directive/messages/messages.spec.js +35 -4
- package/src/directive/model/model.js +25 -18
- package/src/directive/model/model.spec.js +49 -2
- package/src/directive/model-options/model-options.spec.js +6 -0
- package/src/directive/non-bindable/non-bindable.spec.js +1 -0
- package/src/directive/observe/observe.js +5 -1
- package/src/directive/observe/observe.spec.js +22 -0
- package/src/directive/observe/test.html +3 -11
- package/src/directive/options/options.spec.js +34 -0
- package/src/directive/ref/href.spec.js +15 -0
- package/src/directive/repeat/repeat.spec.js +135 -8
- package/src/directive/script/script.spec.js +2 -0
- package/src/directive/select/select.js +3 -3
- package/src/directive/select/select.spec.js +96 -0
- package/src/directive/show-hide/show-hide.js +2 -2
- package/src/directive/show-hide/show-hide.spec.js +19 -8
- package/src/directive/style/style.spec.js +7 -0
- package/src/directive/switch/switch.spec.js +5 -5
- package/src/directive/validators/validators.spec.js +1 -0
- package/src/loader.js +1 -0
- package/src/public.js +10 -2
- package/src/router/common/coreservices.js +2 -0
- package/src/router/directives/state-directives.js +14 -6
- package/src/router/directives/state-directives.spec.js +83 -0
- package/src/router/directives/view-directive.js +13 -4
- package/src/router/directives/view-directive.spec.js +71 -25
- package/src/router/hooks/lazy-load.js +2 -2
- package/src/router/hooks/views.js +5 -3
- package/src/router/resolve/resolvable.js +6 -3
- package/src/router/resolve/resolve-context.js +2 -2
- package/src/router/state/state-service.js +4 -4
- package/src/router/state/state.spec.js +5 -2
- package/src/router/state/state.test.js +1 -1
- package/src/router/state/views.js +10 -7
- package/src/router/template-factory.js +6 -3
- package/src/router/template-factory.spec.js +4 -0
- package/src/router/transition/transition-hook.js +1 -1
- package/src/router/transition/transition.js +1 -1
- package/src/router/view-hook.spec.js +2 -2
- package/src/router/view-scroll.js +6 -4
- package/src/services/browser.js +5 -8
- package/src/services/http/http.js +9 -6
- package/src/services/http/http.spec.js +31 -30
- package/src/services/http/template-request.spec.js +10 -0
- package/src/services/http-backend/http-backend.spec.js +3 -3
- package/src/services/template-request.js +4 -2
- package/src/shared/common.js +2 -1
- package/types/core/location/location.d.ts +37 -34
- package/types/core/parse/parse.d.ts +0 -26
- package/types/core/scope/scope.d.ts +11 -11
- package/src/core/model/model.js +0 -944
- package/src/core/model/model.spec.js +0 -3012
- package/types/core/model/model.d.ts +0 -204
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a deep proxy for the target object, intercepting property changes
|
|
3
|
-
* and recursively applying proxies to nested objects.
|
|
4
|
-
*
|
|
5
|
-
* @param {Object} target - The object to be wrapped in a proxy.
|
|
6
|
-
* @param {Model} [context] - The context for the handler, used to track listeners.
|
|
7
|
-
* @returns {ProxyHandler<Object>} - A proxy that intercepts operations on the target object,
|
|
8
|
-
* or the original value if the target is not an object.
|
|
9
|
-
*/
|
|
10
|
-
export function createModel(target?: any, context?: Model): ProxyHandler<any>;
|
|
11
|
-
/**
|
|
12
|
-
* @typedef {Object} AsyncQueueTask
|
|
13
|
-
* @property {Model} handler
|
|
14
|
-
* @property {Function} fn
|
|
15
|
-
* @property {Object} locals
|
|
16
|
-
*/
|
|
17
|
-
export const $postUpdateQueue: any[];
|
|
18
|
-
/**
|
|
19
|
-
* @type {Function[]}
|
|
20
|
-
*/
|
|
21
|
-
export const $$applyAsyncQueue: Function[];
|
|
22
|
-
export class RootModelProvider {
|
|
23
|
-
rootModel: ProxyHandler<any>;
|
|
24
|
-
$get: (string | ((exceptionHandler: import("../exception-handler").ErrorHandler, parse: import("../parse/parse.js").ParseService) => ProxyHandler<any>))[];
|
|
25
|
-
}
|
|
26
|
-
export type ModelPhase = number;
|
|
27
|
-
export namespace ModelPhase {
|
|
28
|
-
let NONE: number;
|
|
29
|
-
let WATCH: number;
|
|
30
|
-
let DIGEST: number;
|
|
31
|
-
}
|
|
32
|
-
export type AsyncQueueTask = {
|
|
33
|
-
handler: Model;
|
|
34
|
-
fn: Function;
|
|
35
|
-
locals: any;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Listener function definition.
|
|
39
|
-
*/
|
|
40
|
-
export type Listener = {
|
|
41
|
-
/**
|
|
42
|
-
* - The original target object.
|
|
43
|
-
*/
|
|
44
|
-
originalTarget: any;
|
|
45
|
-
/**
|
|
46
|
-
* - The function invoked when changes are detected.
|
|
47
|
-
*/
|
|
48
|
-
listenerFn: ListenerFunction;
|
|
49
|
-
watchFn: import("../parse/parse.js").CompiledExpression;
|
|
50
|
-
id: number;
|
|
51
|
-
oneTime: boolean;
|
|
52
|
-
property: string;
|
|
53
|
-
/**
|
|
54
|
-
* - The optional context in which a property exists
|
|
55
|
-
*/
|
|
56
|
-
context?: any;
|
|
57
|
-
foreignListener?: ProxyConstructor;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Listener function type.
|
|
61
|
-
*/
|
|
62
|
-
export type ListenerFunction = (newValue: any, oldValue: any, originalTarget: any) => any;
|
|
63
|
-
/**
|
|
64
|
-
* Model class for the Proxy. It intercepts operations like property access (get)
|
|
65
|
-
* and property setting (set), and adds support for deep change tracking and
|
|
66
|
-
* observer-like behavior.
|
|
67
|
-
*/
|
|
68
|
-
declare class Model {
|
|
69
|
-
/**
|
|
70
|
-
* Initializes the handler with the target object and a context.
|
|
71
|
-
*
|
|
72
|
-
* @param {Object} target - The target object being proxied.
|
|
73
|
-
* @param {Model} [context] - The context containing listeners.
|
|
74
|
-
*/
|
|
75
|
-
constructor(target: any, context?: Model);
|
|
76
|
-
/** @type {Object} */
|
|
77
|
-
$target: any;
|
|
78
|
-
context: Model;
|
|
79
|
-
/** @type {Map<string, Array<Listener>>} Watch listeners */
|
|
80
|
-
listeners: Map<string, Array<Listener>>;
|
|
81
|
-
/** @type {Map<string, Array<Listener>>} Watch listeners from other proxies */
|
|
82
|
-
foreignListeners: Map<string, Array<Listener>>;
|
|
83
|
-
/** @type {WeakMap<Object, Array<string>>} */
|
|
84
|
-
objectListeners: WeakMap<any, Array<string>>;
|
|
85
|
-
/** @type {Map<Function, {oldValue: any, fn: Function}>} */
|
|
86
|
-
functionListeners: Map<Function, {
|
|
87
|
-
oldValue: any;
|
|
88
|
-
fn: Function;
|
|
89
|
-
}>;
|
|
90
|
-
/** @type {?number} */
|
|
91
|
-
listenerCache: number | null;
|
|
92
|
-
/** @type {Proxy} */
|
|
93
|
-
proxy: ProxyConstructor;
|
|
94
|
-
/**
|
|
95
|
-
* @type {Proxy[]}
|
|
96
|
-
*/
|
|
97
|
-
children: ProxyConstructor[];
|
|
98
|
-
/**
|
|
99
|
-
* @type {number} Unique model ID (monotonically increasing) useful for debugging.
|
|
100
|
-
*/
|
|
101
|
-
id: number;
|
|
102
|
-
/**
|
|
103
|
-
* @type {Model}
|
|
104
|
-
*/
|
|
105
|
-
$root: Model;
|
|
106
|
-
$parent: Model;
|
|
107
|
-
/** @type {number} */
|
|
108
|
-
$$watchersCount: number;
|
|
109
|
-
/** @type {AsyncQueueTask[]} */
|
|
110
|
-
$$asyncQueue: AsyncQueueTask[];
|
|
111
|
-
/** @type {Map<String, Function[]>} Event listeners */
|
|
112
|
-
$$listeners: Map<string, Function[]>;
|
|
113
|
-
filters: any[];
|
|
114
|
-
/** @type {ModelPhase} */
|
|
115
|
-
state: ModelPhase;
|
|
116
|
-
/**
|
|
117
|
-
* Intercepts and handles property assignments on the target object. If a new value is
|
|
118
|
-
* an object, it will be recursively proxied.
|
|
119
|
-
*
|
|
120
|
-
* @param {Object} target - The target object.
|
|
121
|
-
* @param {string} property - The name of the property being set.
|
|
122
|
-
* @param {*} value - The new value being assigned to the property.
|
|
123
|
-
* @returns {boolean} - Returns true to indicate success of the operation.
|
|
124
|
-
*/
|
|
125
|
-
set(target: any, property: string, value: any, proxy: any): boolean;
|
|
126
|
-
/**
|
|
127
|
-
* Intercepts property access on the target object. It checks for specific
|
|
128
|
-
* properties (`watch` and `sync`) and binds their methods. For other properties,
|
|
129
|
-
* it returns the value directly.
|
|
130
|
-
*
|
|
131
|
-
* @param {Object} target - The target object.
|
|
132
|
-
* @param {string|number|symbol} property - The name of the property being accessed.
|
|
133
|
-
* @param {Proxy} proxy - The proxy object being invoked
|
|
134
|
-
* @returns {*} - The value of the property or a method if accessing `watch` or `sync`.
|
|
135
|
-
*/
|
|
136
|
-
get(target: any, property: string | number | symbol, proxy: ProxyConstructor): any;
|
|
137
|
-
/**
|
|
138
|
-
* @private
|
|
139
|
-
* @param {Listener[]} listeners
|
|
140
|
-
* @param {*} oldValue
|
|
141
|
-
*/
|
|
142
|
-
private scheduleListener;
|
|
143
|
-
deleteProperty(target: any, property: any): boolean;
|
|
144
|
-
/**
|
|
145
|
-
* Registers a watcher for a property along with a listener function. The listener
|
|
146
|
-
* function is invoked when changes to that property are detected.
|
|
147
|
-
*
|
|
148
|
-
* @param {string} watchProp - An expression to be watched in the context of this model.
|
|
149
|
-
* @param {ListenerFunction} [listenerFn] - A function to execute when changes are detected on watched context.
|
|
150
|
-
*/
|
|
151
|
-
$watch(watchProp: string, listenerFn?: ListenerFunction): () => void;
|
|
152
|
-
$watchGroup(watchArray: any, listenerFn: any): void;
|
|
153
|
-
$watchCollection(watchProp: any, listenerFn: any): () => void;
|
|
154
|
-
$new(isIsolated: boolean, parent: any): any;
|
|
155
|
-
registerKey(key: any, listener: any): void;
|
|
156
|
-
registerForeignKey(key: any, listener: any): void;
|
|
157
|
-
deregisterKey(key: any, id: any): boolean;
|
|
158
|
-
deregisterForeignKey(key: any, id: any): boolean;
|
|
159
|
-
/**
|
|
160
|
-
* @deprecated
|
|
161
|
-
*/
|
|
162
|
-
$digest(): void;
|
|
163
|
-
$eval(expr: any, locals: any): any;
|
|
164
|
-
$evalAsync(expr: any, locals: any): Promise<any>;
|
|
165
|
-
$apply(expr: any): any;
|
|
166
|
-
$on(name: any, listener: any): () => void;
|
|
167
|
-
/**
|
|
168
|
-
* @param {string} name
|
|
169
|
-
* @param {...any} args
|
|
170
|
-
* @returns
|
|
171
|
-
*/
|
|
172
|
-
$emit(name: string, ...args: any[]): any;
|
|
173
|
-
/**
|
|
174
|
-
* @param {string} name
|
|
175
|
-
* @param {...any} args
|
|
176
|
-
* @returns
|
|
177
|
-
*/
|
|
178
|
-
$broadcast(name: string, ...args: any[]): any;
|
|
179
|
-
eventHelper({ name, event, broadcast }: {
|
|
180
|
-
name: any;
|
|
181
|
-
event: any;
|
|
182
|
-
broadcast: any;
|
|
183
|
-
}, ...args: any[]): any;
|
|
184
|
-
/**
|
|
185
|
-
* @private
|
|
186
|
-
* @returns {boolean}
|
|
187
|
-
*/
|
|
188
|
-
private isRoot;
|
|
189
|
-
$applyAsync(expr: any): Promise<any>;
|
|
190
|
-
$postUpdate(fn: any): void;
|
|
191
|
-
$destroy(): void;
|
|
192
|
-
/**
|
|
193
|
-
* @param {number} count
|
|
194
|
-
*/
|
|
195
|
-
incrementWatchersCount(count: number): void;
|
|
196
|
-
/**
|
|
197
|
-
* Invokes the registered listener function with watched property changes.
|
|
198
|
-
*
|
|
199
|
-
* @param {Listener} listener - The property path that was changed.
|
|
200
|
-
* @param {*} oldValue - The old value of the property.
|
|
201
|
-
*/
|
|
202
|
-
notifyListener(listener: Listener, oldValue: any): void;
|
|
203
|
-
}
|
|
204
|
-
export {};
|