@angular-wave/angular.ts 0.4.4 → 0.4.5

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.
Files changed (120) hide show
  1. package/dist/angular-ts.esm.js +2 -2
  2. package/dist/angular-ts.umd.js +2 -12
  3. package/index.html +3 -74
  4. package/package.json +1 -1
  5. package/src/angular.spec.js +5 -0
  6. package/src/animations/animate-css.js +13 -5
  7. package/src/animations/animate-queue.js +21 -22
  8. package/src/animations/animate-runner.js +8 -4
  9. package/src/animations/animate.md +1 -1
  10. package/src/animations/animate.spec.js +21 -0
  11. package/src/animations/animation.js +1 -1
  12. package/src/binding.spec.js +1 -0
  13. package/src/core/compile/compile.js +26 -25
  14. package/src/core/compile/compile.spec.js +266 -17
  15. package/src/core/controller/controller.js +0 -2
  16. package/src/core/di/injector.md +1 -1
  17. package/src/core/di/injector.spec.js +2 -0
  18. package/src/core/di/internal-injector.js +1 -2
  19. package/src/core/interpolate/interpolate.js +3 -16
  20. package/src/core/interpolate/interpolate.spec.js +16 -70
  21. package/src/core/interval/interval-factory.js +50 -0
  22. package/src/core/interval/interval.html +18 -0
  23. package/src/core/interval/interval.js +77 -0
  24. package/src/core/interval/interval.md +123 -0
  25. package/src/core/interval/interval.spec.js +280 -0
  26. package/src/core/interval/interval.test.js +1 -1
  27. package/src/core/location/location.js +47 -39
  28. package/src/core/location/location.spec.js +27 -27
  29. package/src/core/on.spec.js +7 -0
  30. package/src/core/parse/interpreter.js +7 -10
  31. package/src/core/parse/parse.js +5 -26
  32. package/src/core/parse/parse.spec.js +91 -95
  33. package/src/core/prop.spec.js +60 -4
  34. package/src/core/q/q.html +18 -0
  35. package/src/core/q/q.js +472 -0
  36. package/src/core/q/q.md +211 -0
  37. package/src/core/q/q.spec.js +2748 -0
  38. package/src/core/q/q.test.js +12 -0
  39. package/src/core/sce/sce.spec.js +8 -0
  40. package/src/core/{model/model.html → scope/scope.html} +1 -1
  41. package/src/core/scope/scope.js +16 -15
  42. package/src/core/scope/scope.spec.js +1959 -24
  43. package/src/core/scope/scope.test.js +12 -0
  44. package/src/core/timeout/timeout.html +18 -0
  45. package/src/core/timeout/timeout.js +109 -0
  46. package/src/core/timeout/timeout.spec.js +354 -0
  47. package/src/core/timeout/timout.test.js +12 -0
  48. package/src/core/url-utils/url-utils.spec.js +1 -1
  49. package/src/directive/aria/aria.js +6 -3
  50. package/src/directive/aria/aria.spec.js +87 -0
  51. package/src/directive/attrs/attrs.spec.js +5 -0
  52. package/src/directive/attrs/boolean.spec.js +15 -0
  53. package/src/directive/attrs/element-style.spec.js +8 -0
  54. package/src/directive/attrs/src.spec.js +7 -0
  55. package/src/directive/bind/bind.spec.js +33 -0
  56. package/src/directive/bind/bing-html.spec.js +3 -0
  57. package/src/directive/class/class.js +3 -3
  58. package/src/directive/class/class.spec.js +75 -9
  59. package/src/directive/controller/controller.spec.js +13 -0
  60. package/src/directive/events/click.spec.js +3 -0
  61. package/src/directive/events/event.spec.js +6 -0
  62. package/src/directive/form/form.js +3 -2
  63. package/src/directive/form/form.spec.js +65 -0
  64. package/src/directive/if/if.spec.js +4 -0
  65. package/src/directive/include/include.spec.js +59 -8
  66. package/src/directive/init/init.js +2 -6
  67. package/src/directive/init/init.spec.js +2 -0
  68. package/src/directive/input/input.spec.js +136 -0
  69. package/src/directive/messages/messages.spec.js +35 -4
  70. package/src/directive/model/model.js +25 -18
  71. package/src/directive/model/model.spec.js +49 -2
  72. package/src/directive/model-options/model-options.spec.js +6 -0
  73. package/src/directive/non-bindable/non-bindable.spec.js +1 -0
  74. package/src/directive/observe/observe.js +1 -0
  75. package/src/directive/observe/observe.spec.js +1 -0
  76. package/src/directive/options/options.spec.js +34 -0
  77. package/src/directive/ref/href.spec.js +15 -0
  78. package/src/directive/repeat/repeat.spec.js +135 -8
  79. package/src/directive/script/script.spec.js +2 -0
  80. package/src/directive/select/select.js +3 -3
  81. package/src/directive/select/select.spec.js +96 -0
  82. package/src/directive/show-hide/show-hide.js +2 -2
  83. package/src/directive/show-hide/show-hide.spec.js +19 -8
  84. package/src/directive/style/style.spec.js +7 -0
  85. package/src/directive/switch/switch.spec.js +5 -5
  86. package/src/directive/validators/validators.spec.js +1 -0
  87. package/src/loader.js +1 -0
  88. package/src/public.js +10 -2
  89. package/src/router/common/coreservices.js +2 -0
  90. package/src/router/directives/state-directives.js +14 -6
  91. package/src/router/directives/state-directives.spec.js +83 -0
  92. package/src/router/directives/view-directive.js +13 -4
  93. package/src/router/directives/view-directive.spec.js +71 -25
  94. package/src/router/hooks/lazy-load.js +2 -2
  95. package/src/router/hooks/views.js +5 -3
  96. package/src/router/resolve/resolvable.js +6 -3
  97. package/src/router/resolve/resolve-context.js +2 -2
  98. package/src/router/state/state-service.js +4 -4
  99. package/src/router/state/state.spec.js +5 -2
  100. package/src/router/state/state.test.js +1 -1
  101. package/src/router/state/views.js +10 -7
  102. package/src/router/template-factory.js +6 -3
  103. package/src/router/template-factory.spec.js +4 -0
  104. package/src/router/transition/transition-hook.js +1 -1
  105. package/src/router/transition/transition.js +1 -1
  106. package/src/router/view-hook.spec.js +2 -2
  107. package/src/router/view-scroll.js +6 -4
  108. package/src/services/browser.js +5 -8
  109. package/src/services/http/http.js +9 -6
  110. package/src/services/http/http.spec.js +31 -30
  111. package/src/services/http/template-request.spec.js +10 -0
  112. package/src/services/http-backend/http-backend.spec.js +3 -3
  113. package/src/services/template-request.js +4 -2
  114. package/src/shared/common.js +2 -1
  115. package/types/core/location/location.d.ts +36 -31
  116. package/types/core/parse/parse.d.ts +0 -26
  117. package/types/core/scope/scope.d.ts +11 -11
  118. package/src/core/model/model.js +0 -944
  119. package/src/core/model/model.spec.js +0 -3012
  120. 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 {};