@angular-wave/angular.ts 0.0.50 → 0.0.52
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 +3 -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/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/animations/shared.js +2 -1
- package/src/core/animate/animate-runner.js +147 -145
- package/src/core/animate/animate.js +568 -582
- package/src/core/animate/anomate.md +13 -0
- package/src/core/compile/compile.spec.js +5 -6
- package/src/core/core.html +0 -1
- package/src/core/parser/ast-type.js +21 -20
- package/src/core/parser/ast.js +34 -35
- package/src/core/parser/interpreter.js +405 -136
- package/src/core/parser/lexer.js +14 -13
- package/src/core/parser/parse.js +31 -45
- package/src/core/parser/parse.spec.js +429 -444
- package/src/core/parser/parser.js +17 -9
- package/src/directive/select/select.js +301 -305
- package/src/loader.js +5 -1
- 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/src/types.js +0 -13
- 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/animations/shared.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/parser/ast-type.d.ts +24 -20
- package/types/core/parser/ast.d.ts +13 -14
- package/types/core/parser/interpreter.d.ts +24 -19
- package/types/core/parser/lexer.d.ts +6 -2
- package/types/core/parser/parse.d.ts +44 -38
- package/types/core/parser/parser.d.ts +2 -10
- package/types/directive/select/select.d.ts +79 -0
- package/types/loader.d.ts +397 -0
- package/types/router/directives/state-directives.d.ts +31 -0
- package/types/types.d.ts +0 -1
- package/src/core/document.spec.js +0 -52
- package/src/core/parser/shared.js +0 -234
- package/types/core/parser/shared.d.ts +0 -35
|
@@ -5,363 +5,360 @@ import {
|
|
|
5
5
|
prepareAnimationOptions,
|
|
6
6
|
} from "./shared";
|
|
7
7
|
|
|
8
|
-
// TODO
|
|
9
|
-
// TODO
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
classes = null;
|
|
30
|
-
}
|
|
8
|
+
// TODO: use caching here to speed things up for detection
|
|
9
|
+
// TODO: add documentation
|
|
10
|
+
|
|
11
|
+
$$AnimateJsProvider.$inject = ["$animateProvider"];
|
|
12
|
+
export function $$AnimateJsProvider($animateProvider) {
|
|
13
|
+
this.$get = [
|
|
14
|
+
"$injector",
|
|
15
|
+
"$$AnimateRunner",
|
|
16
|
+
function ($injector, $$AnimateRunner) {
|
|
17
|
+
const applyAnimationClasses = applyAnimationClassesFactory();
|
|
18
|
+
// $animateJs(element, 'enter');
|
|
19
|
+
return function (element, event, classes, options) {
|
|
20
|
+
let animationClosed = false;
|
|
21
|
+
|
|
22
|
+
// the `classes` argument is optional and if it is not used
|
|
23
|
+
// then the classes will be resolved from the element's className
|
|
24
|
+
// property as well as options.addClass/options.removeClass.
|
|
25
|
+
if (arguments.length === 3 && isObject(classes)) {
|
|
26
|
+
options = classes;
|
|
27
|
+
classes = null;
|
|
28
|
+
}
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
if (options.removeClass) {
|
|
39
|
-
classes += ` ${options.removeClass}`;
|
|
40
|
-
}
|
|
30
|
+
options = prepareAnimationOptions(options);
|
|
31
|
+
if (!classes) {
|
|
32
|
+
classes = element.attr("class") || "";
|
|
33
|
+
if (options.addClass) {
|
|
34
|
+
classes += ` ${options.addClass}`;
|
|
41
35
|
}
|
|
36
|
+
if (options.removeClass) {
|
|
37
|
+
classes += ` ${options.removeClass}`;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
42
40
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
41
|
+
const classesToAdd = options.addClass;
|
|
42
|
+
const classesToRemove = options.removeClass;
|
|
43
|
+
|
|
44
|
+
// the lookupAnimations function returns a series of animation objects that are
|
|
45
|
+
// matched up with one or more of the CSS classes. These animation objects are
|
|
46
|
+
// defined via the module.animation factory function. If nothing is detected then
|
|
47
|
+
// we don't return anything which then makes $animation query the next driver.
|
|
48
|
+
const animations = lookupAnimations(classes);
|
|
49
|
+
let before;
|
|
50
|
+
let after;
|
|
51
|
+
if (animations.length) {
|
|
52
|
+
let afterFn;
|
|
53
|
+
let beforeFn;
|
|
54
|
+
if (event === "leave") {
|
|
55
|
+
beforeFn = "leave";
|
|
56
|
+
afterFn = "afterLeave"; // TODO(matsko): get rid of this
|
|
57
|
+
} else {
|
|
58
|
+
beforeFn = `before${event.charAt(0).toUpperCase()}${event.substr(1)}`;
|
|
59
|
+
afterFn = event;
|
|
60
|
+
}
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
element,
|
|
67
|
-
event,
|
|
68
|
-
options,
|
|
69
|
-
animations,
|
|
70
|
-
beforeFn,
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
after = packageAnimations(
|
|
62
|
+
if (event !== "enter" && event !== "move") {
|
|
63
|
+
before = packageAnimations(
|
|
74
64
|
element,
|
|
75
65
|
event,
|
|
76
66
|
options,
|
|
77
67
|
animations,
|
|
78
|
-
|
|
68
|
+
beforeFn,
|
|
79
69
|
);
|
|
80
70
|
}
|
|
71
|
+
after = packageAnimations(
|
|
72
|
+
element,
|
|
73
|
+
event,
|
|
74
|
+
options,
|
|
75
|
+
animations,
|
|
76
|
+
afterFn,
|
|
77
|
+
);
|
|
78
|
+
}
|
|
81
79
|
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
// no matching animations
|
|
81
|
+
if (!before && !after) return;
|
|
84
82
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
function applyOptions() {
|
|
84
|
+
options.domOperation();
|
|
85
|
+
applyAnimationClasses(element, options);
|
|
86
|
+
}
|
|
89
87
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
function close() {
|
|
89
|
+
animationClosed = true;
|
|
90
|
+
applyOptions();
|
|
91
|
+
applyAnimationStyles(element, options);
|
|
92
|
+
}
|
|
95
93
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return {
|
|
99
|
-
$$willAnimate: true,
|
|
100
|
-
end() {
|
|
101
|
-
if (runner) {
|
|
102
|
-
runner.end();
|
|
103
|
-
} else {
|
|
104
|
-
close();
|
|
105
|
-
runner = new $$AnimateRunner();
|
|
106
|
-
runner.complete(true);
|
|
107
|
-
}
|
|
108
|
-
return runner;
|
|
109
|
-
},
|
|
110
|
-
start() {
|
|
111
|
-
if (runner) {
|
|
112
|
-
return runner;
|
|
113
|
-
}
|
|
94
|
+
let runner;
|
|
114
95
|
|
|
96
|
+
return {
|
|
97
|
+
$$willAnimate: true,
|
|
98
|
+
end() {
|
|
99
|
+
if (runner) {
|
|
100
|
+
runner.end();
|
|
101
|
+
} else {
|
|
102
|
+
close();
|
|
115
103
|
runner = new $$AnimateRunner();
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
runner.complete(true);
|
|
105
|
+
}
|
|
106
|
+
return runner;
|
|
107
|
+
},
|
|
108
|
+
start() {
|
|
109
|
+
if (runner) {
|
|
110
|
+
return runner;
|
|
111
|
+
}
|
|
118
112
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
});
|
|
123
|
-
}
|
|
113
|
+
runner = new $$AnimateRunner();
|
|
114
|
+
let closeActiveAnimations;
|
|
115
|
+
const chain = [];
|
|
124
116
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
} else {
|
|
131
|
-
applyOptions();
|
|
132
|
-
}
|
|
117
|
+
if (before) {
|
|
118
|
+
chain.push((fn) => {
|
|
119
|
+
closeActiveAnimations = before(fn);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
133
122
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
123
|
+
if (chain.length) {
|
|
124
|
+
chain.push((fn) => {
|
|
125
|
+
applyOptions();
|
|
126
|
+
fn(true);
|
|
127
|
+
});
|
|
128
|
+
} else {
|
|
129
|
+
applyOptions();
|
|
130
|
+
}
|
|
139
131
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
cancel() {
|
|
145
|
-
endAnimations(true);
|
|
146
|
-
},
|
|
132
|
+
if (after) {
|
|
133
|
+
chain.push((fn) => {
|
|
134
|
+
closeActiveAnimations = after(fn);
|
|
147
135
|
});
|
|
136
|
+
}
|
|
148
137
|
|
|
149
|
-
|
|
150
|
-
|
|
138
|
+
runner.setHost({
|
|
139
|
+
end() {
|
|
140
|
+
endAnimations();
|
|
141
|
+
},
|
|
142
|
+
cancel() {
|
|
143
|
+
endAnimations(true);
|
|
144
|
+
},
|
|
145
|
+
});
|
|
151
146
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
runner.complete(success);
|
|
155
|
-
}
|
|
147
|
+
$$AnimateRunner.chain(chain, onComplete);
|
|
148
|
+
return runner;
|
|
156
149
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
};
|
|
150
|
+
function onComplete(success) {
|
|
151
|
+
close();
|
|
152
|
+
runner.complete(success);
|
|
153
|
+
}
|
|
165
154
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
155
|
+
function endAnimations(cancelled) {
|
|
156
|
+
if (!animationClosed) {
|
|
157
|
+
(closeActiveAnimations || (() => {}))(cancelled);
|
|
158
|
+
onComplete(cancelled);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
};
|
|
172
163
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
164
|
+
function executeAnimationFn(fn, element, event, options, onDone) {
|
|
165
|
+
let args;
|
|
166
|
+
switch (event) {
|
|
167
|
+
case "animate":
|
|
168
|
+
args = [element, options.from, options.to, onDone];
|
|
169
|
+
break;
|
|
176
170
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
171
|
+
case "setClass":
|
|
172
|
+
args = [element, classesToAdd, classesToRemove, onDone];
|
|
173
|
+
break;
|
|
180
174
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
175
|
+
case "addClass":
|
|
176
|
+
args = [element, classesToAdd, onDone];
|
|
177
|
+
break;
|
|
184
178
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
179
|
+
case "removeClass":
|
|
180
|
+
args = [element, classesToRemove, onDone];
|
|
181
|
+
break;
|
|
189
182
|
|
|
190
|
-
|
|
183
|
+
default:
|
|
184
|
+
args = [element, onDone];
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
191
187
|
|
|
192
|
-
|
|
193
|
-
if (value) {
|
|
194
|
-
if (isFunction(value.start)) {
|
|
195
|
-
value = value.start();
|
|
196
|
-
}
|
|
188
|
+
args.push(options);
|
|
197
189
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
return value;
|
|
203
|
-
}
|
|
190
|
+
let value = fn.apply(fn, args);
|
|
191
|
+
if (value) {
|
|
192
|
+
if (isFunction(value.start)) {
|
|
193
|
+
value = value.start();
|
|
204
194
|
}
|
|
205
195
|
|
|
206
|
-
|
|
196
|
+
if (value instanceof $$AnimateRunner) {
|
|
197
|
+
value.done(onDone);
|
|
198
|
+
} else if (isFunction(value)) {
|
|
199
|
+
// optional onEnd / onCancel callback
|
|
200
|
+
return value;
|
|
201
|
+
}
|
|
207
202
|
}
|
|
208
203
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
animation,
|
|
246
|
-
element,
|
|
247
|
-
event,
|
|
248
|
-
options,
|
|
249
|
-
(result) => {
|
|
250
|
-
const cancelled = result === false;
|
|
251
|
-
onAnimationComplete(cancelled);
|
|
252
|
-
},
|
|
253
|
-
);
|
|
254
|
-
|
|
255
|
-
return runner;
|
|
204
|
+
return () => {};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function groupEventedAnimations(
|
|
208
|
+
element,
|
|
209
|
+
event,
|
|
210
|
+
options,
|
|
211
|
+
animations,
|
|
212
|
+
fnName,
|
|
213
|
+
) {
|
|
214
|
+
const operations = [];
|
|
215
|
+
forEach(animations, (ani) => {
|
|
216
|
+
const animation = ani[fnName];
|
|
217
|
+
if (!animation) return;
|
|
218
|
+
|
|
219
|
+
// note that all of these animations will run in parallel
|
|
220
|
+
operations.push(() => {
|
|
221
|
+
let runner;
|
|
222
|
+
let endProgressCb;
|
|
223
|
+
|
|
224
|
+
let resolved = false;
|
|
225
|
+
const onAnimationComplete = function (rejected) {
|
|
226
|
+
if (!resolved) {
|
|
227
|
+
resolved = true;
|
|
228
|
+
(endProgressCb || (() => {}))(rejected);
|
|
229
|
+
runner.complete(!rejected);
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
runner = new $$AnimateRunner({
|
|
234
|
+
end() {
|
|
235
|
+
onAnimationComplete();
|
|
236
|
+
},
|
|
237
|
+
cancel() {
|
|
238
|
+
onAnimationComplete(true);
|
|
239
|
+
},
|
|
256
240
|
});
|
|
241
|
+
|
|
242
|
+
endProgressCb = executeAnimationFn(
|
|
243
|
+
animation,
|
|
244
|
+
element,
|
|
245
|
+
event,
|
|
246
|
+
options,
|
|
247
|
+
(result) => {
|
|
248
|
+
const cancelled = result === false;
|
|
249
|
+
onAnimationComplete(cancelled);
|
|
250
|
+
},
|
|
251
|
+
);
|
|
252
|
+
|
|
253
|
+
return runner;
|
|
257
254
|
});
|
|
255
|
+
});
|
|
258
256
|
|
|
259
|
-
|
|
260
|
-
|
|
257
|
+
return operations;
|
|
258
|
+
}
|
|
261
259
|
|
|
262
|
-
|
|
260
|
+
function packageAnimations(
|
|
261
|
+
element,
|
|
262
|
+
event,
|
|
263
|
+
options,
|
|
264
|
+
animations,
|
|
265
|
+
fnName,
|
|
266
|
+
) {
|
|
267
|
+
let operations = groupEventedAnimations(
|
|
263
268
|
element,
|
|
264
269
|
event,
|
|
265
270
|
options,
|
|
266
271
|
animations,
|
|
267
272
|
fnName,
|
|
268
|
-
)
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
element,
|
|
304
|
-
"addClass",
|
|
305
|
-
options,
|
|
306
|
-
animations,
|
|
307
|
-
"addClass",
|
|
308
|
-
);
|
|
309
|
-
}
|
|
273
|
+
);
|
|
274
|
+
if (operations.length === 0) {
|
|
275
|
+
let a;
|
|
276
|
+
let b;
|
|
277
|
+
if (fnName === "beforeSetClass") {
|
|
278
|
+
a = groupEventedAnimations(
|
|
279
|
+
element,
|
|
280
|
+
"removeClass",
|
|
281
|
+
options,
|
|
282
|
+
animations,
|
|
283
|
+
"beforeRemoveClass",
|
|
284
|
+
);
|
|
285
|
+
b = groupEventedAnimations(
|
|
286
|
+
element,
|
|
287
|
+
"addClass",
|
|
288
|
+
options,
|
|
289
|
+
animations,
|
|
290
|
+
"beforeAddClass",
|
|
291
|
+
);
|
|
292
|
+
} else if (fnName === "setClass") {
|
|
293
|
+
a = groupEventedAnimations(
|
|
294
|
+
element,
|
|
295
|
+
"removeClass",
|
|
296
|
+
options,
|
|
297
|
+
animations,
|
|
298
|
+
"removeClass",
|
|
299
|
+
);
|
|
300
|
+
b = groupEventedAnimations(
|
|
301
|
+
element,
|
|
302
|
+
"addClass",
|
|
303
|
+
options,
|
|
304
|
+
animations,
|
|
305
|
+
"addClass",
|
|
306
|
+
);
|
|
307
|
+
}
|
|
310
308
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
314
|
-
if (b) {
|
|
315
|
-
operations = operations.concat(b);
|
|
316
|
-
}
|
|
309
|
+
if (a) {
|
|
310
|
+
operations = operations.concat(a);
|
|
317
311
|
}
|
|
312
|
+
if (b) {
|
|
313
|
+
operations = operations.concat(b);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
318
316
|
|
|
319
|
-
|
|
317
|
+
if (operations.length === 0) return;
|
|
320
318
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
319
|
+
// TODO(matsko): add documentation
|
|
320
|
+
return function startAnimation(callback) {
|
|
321
|
+
const runners = [];
|
|
322
|
+
if (operations.length) {
|
|
323
|
+
forEach(operations, (animateFn) => {
|
|
324
|
+
runners.push(animateFn());
|
|
325
|
+
});
|
|
326
|
+
}
|
|
329
327
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
328
|
+
if (runners.length) {
|
|
329
|
+
$$AnimateRunner.all(runners, callback);
|
|
330
|
+
} else {
|
|
331
|
+
callback();
|
|
332
|
+
}
|
|
335
333
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
};
|
|
334
|
+
return function endFn(reject) {
|
|
335
|
+
forEach(runners, (runner) => {
|
|
336
|
+
if (reject) {
|
|
337
|
+
runner.cancel();
|
|
338
|
+
} else {
|
|
339
|
+
runner.end();
|
|
340
|
+
}
|
|
341
|
+
});
|
|
345
342
|
};
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
function lookupAnimations(classes) {
|
|
348
|
+
classes = Array.isArray(classes) ? classes : classes.split(" ");
|
|
349
|
+
const matches = [];
|
|
350
|
+
const flagMap = {};
|
|
351
|
+
for (let i = 0; i < classes.length; i++) {
|
|
352
|
+
const klass = classes[i];
|
|
353
|
+
const animationFactory =
|
|
354
|
+
$animateProvider.$$registeredAnimations[klass];
|
|
355
|
+
if (animationFactory && !flagMap[klass]) {
|
|
356
|
+
matches.push($injector.get(animationFactory));
|
|
357
|
+
flagMap[klass] = true;
|
|
346
358
|
}
|
|
347
|
-
};
|
|
348
|
-
|
|
349
|
-
function lookupAnimations(classes) {
|
|
350
|
-
classes = Array.isArray(classes) ? classes : classes.split(" ");
|
|
351
|
-
const matches = [];
|
|
352
|
-
const flagMap = {};
|
|
353
|
-
for (let i = 0; i < classes.length; i++) {
|
|
354
|
-
const klass = classes[i];
|
|
355
|
-
const animationFactory =
|
|
356
|
-
$animateProvider.$$registeredAnimations[klass];
|
|
357
|
-
if (animationFactory && !flagMap[klass]) {
|
|
358
|
-
matches.push($injector.get(animationFactory));
|
|
359
|
-
flagMap[klass] = true;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
return matches;
|
|
363
359
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
];
|
|
360
|
+
return matches;
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
];
|
|
364
|
+
}
|