source: trip-planner-front/node_modules/@angular/animations/esm2015/src/animation_metadata.js@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 88.6 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8/**
9 * Specifies automatic styling.
10 *
11 * @publicApi
12 */
13export const AUTO_STYLE = '*';
14/**
15 * Creates a named animation trigger, containing a list of `state()`
16 * and `transition()` entries to be evaluated when the expression
17 * bound to the trigger changes.
18 *
19 * @param name An identifying string.
20 * @param definitions An animation definition object, containing an array of `state()`
21 * and `transition()` declarations.
22 *
23 * @return An object that encapsulates the trigger data.
24 *
25 * @usageNotes
26 * Define an animation trigger in the `animations` section of `@Component` metadata.
27 * In the template, reference the trigger by name and bind it to a trigger expression that
28 * evaluates to a defined animation state, using the following format:
29 *
30 * `[@triggerName]="expression"`
31 *
32 * Animation trigger bindings convert all values to strings, and then match the
33 * previous and current values against any linked transitions.
34 * Booleans can be specified as `1` or `true` and `0` or `false`.
35 *
36 * ### Usage Example
37 *
38 * The following example creates an animation trigger reference based on the provided
39 * name value.
40 * The provided animation value is expected to be an array consisting of state and
41 * transition declarations.
42 *
43 * ```typescript
44 * @Component({
45 * selector: "my-component",
46 * templateUrl: "my-component-tpl.html",
47 * animations: [
48 * trigger("myAnimationTrigger", [
49 * state(...),
50 * state(...),
51 * transition(...),
52 * transition(...)
53 * ])
54 * ]
55 * })
56 * class MyComponent {
57 * myStatusExp = "something";
58 * }
59 * ```
60 *
61 * The template associated with this component makes use of the defined trigger
62 * by binding to an element within its template code.
63 *
64 * ```html
65 * <!-- somewhere inside of my-component-tpl.html -->
66 * <div [@myAnimationTrigger]="myStatusExp">...</div>
67 * ```
68 *
69 * ### Using an inline function
70 * The `transition` animation method also supports reading an inline function which can decide
71 * if its associated animation should be run.
72 *
73 * ```typescript
74 * // this method is run each time the `myAnimationTrigger` trigger value changes.
75 * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key:
76 string]: any}): boolean {
77 * // notice that `element` and `params` are also available here
78 * return toState == 'yes-please-animate';
79 * }
80 *
81 * @Component({
82 * selector: 'my-component',
83 * templateUrl: 'my-component-tpl.html',
84 * animations: [
85 * trigger('myAnimationTrigger', [
86 * transition(myInlineMatcherFn, [
87 * // the animation sequence code
88 * ]),
89 * ])
90 * ]
91 * })
92 * class MyComponent {
93 * myStatusExp = "yes-please-animate";
94 * }
95 * ```
96 *
97 * ### Disabling Animations
98 * When true, the special animation control binding `@.disabled` binding prevents
99 * all animations from rendering.
100 * Place the `@.disabled` binding on an element to disable
101 * animations on the element itself, as well as any inner animation triggers
102 * within the element.
103 *
104 * The following example shows how to use this feature:
105 *
106 * ```typescript
107 * @Component({
108 * selector: 'my-component',
109 * template: `
110 * <div [@.disabled]="isDisabled">
111 * <div [@childAnimation]="exp"></div>
112 * </div>
113 * `,
114 * animations: [
115 * trigger("childAnimation", [
116 * // ...
117 * ])
118 * ]
119 * })
120 * class MyComponent {
121 * isDisabled = true;
122 * exp = '...';
123 * }
124 * ```
125 *
126 * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating,
127 * along with any inner animations.
128 *
129 * ### Disable animations application-wide
130 * When an area of the template is set to have animations disabled,
131 * **all** inner components have their animations disabled as well.
132 * This means that you can disable all animations for an app
133 * by placing a host binding set on `@.disabled` on the topmost Angular component.
134 *
135 * ```typescript
136 * import {Component, HostBinding} from '@angular/core';
137 *
138 * @Component({
139 * selector: 'app-component',
140 * templateUrl: 'app.component.html',
141 * })
142 * class AppComponent {
143 * @HostBinding('@.disabled')
144 * public animationsDisabled = true;
145 * }
146 * ```
147 *
148 * ### Overriding disablement of inner animations
149 * Despite inner animations being disabled, a parent animation can `query()`
150 * for inner elements located in disabled areas of the template and still animate
151 * them if needed. This is also the case for when a sub animation is
152 * queried by a parent and then later animated using `animateChild()`.
153 *
154 * ### Detecting when an animation is disabled
155 * If a region of the DOM (or the entire application) has its animations disabled, the animation
156 * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides
157 * an instance of an `AnimationEvent`. If animations are disabled,
158 * the `.disabled` flag on the event is true.
159 *
160 * @publicApi
161 */
162export function trigger(name, definitions) {
163 return { type: 7 /* Trigger */, name, definitions, options: {} };
164}
165/**
166 * Defines an animation step that combines styling information with timing information.
167 *
168 * @param timings Sets `AnimateTimings` for the parent animation.
169 * A string in the format "duration [delay] [easing]".
170 * - Duration and delay are expressed as a number and optional time unit,
171 * such as "1s" or "10ms" for one second and 10 milliseconds, respectively.
172 * The default unit is milliseconds.
173 * - The easing value controls how the animation accelerates and decelerates
174 * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`,
175 * `ease-in-out`, or a `cubic-bezier()` function call.
176 * If not supplied, no easing is applied.
177 *
178 * For example, the string "1s 100ms ease-out" specifies a duration of
179 * 1000 milliseconds, and delay of 100 ms, and the "ease-out" easing style,
180 * which decelerates near the end of the duration.
181 * @param styles Sets AnimationStyles for the parent animation.
182 * A function call to either `style()` or `keyframes()`
183 * that returns a collection of CSS style entries to be applied to the parent animation.
184 * When null, uses the styles from the destination state.
185 * This is useful when describing an animation step that will complete an animation;
186 * see "Animating to the final state" in `transitions()`.
187 * @returns An object that encapsulates the animation step.
188 *
189 * @usageNotes
190 * Call within an animation `sequence()`, `{@link animations/group group()}`, or
191 * `transition()` call to specify an animation step
192 * that applies given style data to the parent animation for a given amount of time.
193 *
194 * ### Syntax Examples
195 * **Timing examples**
196 *
197 * The following examples show various `timings` specifications.
198 * - `animate(500)` : Duration is 500 milliseconds.
199 * - `animate("1s")` : Duration is 1000 milliseconds.
200 * - `animate("100ms 0.5s")` : Duration is 100 milliseconds, delay is 500 milliseconds.
201 * - `animate("5s ease-in")` : Duration is 5000 milliseconds, easing in.
202 * - `animate("5s 10ms cubic-bezier(.17,.67,.88,.1)")` : Duration is 5000 milliseconds, delay is 10
203 * milliseconds, easing according to a bezier curve.
204 *
205 * **Style examples**
206 *
207 * The following example calls `style()` to set a single CSS style.
208 * ```typescript
209 * animate(500, style({ background: "red" }))
210 * ```
211 * The following example calls `keyframes()` to set a CSS style
212 * to different values for successive keyframes.
213 * ```typescript
214 * animate(500, keyframes(
215 * [
216 * style({ background: "blue" }),
217 * style({ background: "red" })
218 * ])
219 * ```
220 *
221 * @publicApi
222 */
223export function animate(timings, styles = null) {
224 return { type: 4 /* Animate */, styles, timings };
225}
226/**
227 * @description Defines a list of animation steps to be run in parallel.
228 *
229 * @param steps An array of animation step objects.
230 * - When steps are defined by `style()` or `animate()`
231 * function calls, each call within the group is executed instantly.
232 * - To specify offset styles to be applied at a later time, define steps with
233 * `keyframes()`, or use `animate()` calls with a delay value.
234 * For example:
235 *
236 * ```typescript
237 * group([
238 * animate("1s", style({ background: "black" })),
239 * animate("2s", style({ color: "white" }))
240 * ])
241 * ```
242 *
243 * @param options An options object containing a delay and
244 * developer-defined parameters that provide styling defaults and
245 * can be overridden on invocation.
246 *
247 * @return An object that encapsulates the group data.
248 *
249 * @usageNotes
250 * Grouped animations are useful when a series of styles must be
251 * animated at different starting times and closed off at different ending times.
252 *
253 * When called within a `sequence()` or a
254 * `transition()` call, does not continue to the next
255 * instruction until all of the inner animation steps have completed.
256 *
257 * @publicApi
258 */
259export function group(steps, options = null) {
260 return { type: 3 /* Group */, steps, options };
261}
262/**
263 * Defines a list of animation steps to be run sequentially, one by one.
264 *
265 * @param steps An array of animation step objects.
266 * - Steps defined by `style()` calls apply the styling data immediately.
267 * - Steps defined by `animate()` calls apply the styling data over time
268 * as specified by the timing data.
269 *
270 * ```typescript
271 * sequence([
272 * style({ opacity: 0 }),
273 * animate("1s", style({ opacity: 1 }))
274 * ])
275 * ```
276 *
277 * @param options An options object containing a delay and
278 * developer-defined parameters that provide styling defaults and
279 * can be overridden on invocation.
280 *
281 * @return An object that encapsulates the sequence data.
282 *
283 * @usageNotes
284 * When you pass an array of steps to a
285 * `transition()` call, the steps run sequentially by default.
286 * Compare this to the `{@link animations/group group()}` call, which runs animation steps in
287 *parallel.
288 *
289 * When a sequence is used within a `{@link animations/group group()}` or a `transition()` call,
290 * execution continues to the next instruction only after each of the inner animation
291 * steps have completed.
292 *
293 * @publicApi
294 **/
295export function sequence(steps, options = null) {
296 return { type: 2 /* Sequence */, steps, options };
297}
298/**
299 * Declares a key/value object containing CSS properties/styles that
300 * can then be used for an animation `state`, within an animation `sequence`,
301 * or as styling data for calls to `animate()` and `keyframes()`.
302 *
303 * @param tokens A set of CSS styles or HTML styles associated with an animation state.
304 * The value can be any of the following:
305 * - A key-value style pair associating a CSS property with a value.
306 * - An array of key-value style pairs.
307 * - An asterisk (*), to use auto-styling, where styles are derived from the element
308 * being animated and applied to the animation when it starts.
309 *
310 * Auto-styling can be used to define a state that depends on layout or other
311 * environmental factors.
312 *
313 * @return An object that encapsulates the style data.
314 *
315 * @usageNotes
316 * The following examples create animation styles that collect a set of
317 * CSS property values:
318 *
319 * ```typescript
320 * // string values for CSS properties
321 * style({ background: "red", color: "blue" })
322 *
323 * // numerical pixel values
324 * style({ width: 100, height: 0 })
325 * ```
326 *
327 * The following example uses auto-styling to allow a component to animate from
328 * a height of 0 up to the height of the parent element:
329 *
330 * ```
331 * style({ height: 0 }),
332 * animate("1s", style({ height: "*" }))
333 * ```
334 *
335 * @publicApi
336 **/
337export function style(tokens) {
338 return { type: 6 /* Style */, styles: tokens, offset: null };
339}
340/**
341 * Declares an animation state within a trigger attached to an element.
342 *
343 * @param name One or more names for the defined state in a comma-separated string.
344 * The following reserved state names can be supplied to define a style for specific use
345 * cases:
346 *
347 * - `void` You can associate styles with this name to be used when
348 * the element is detached from the application. For example, when an `ngIf` evaluates
349 * to false, the state of the associated element is void.
350 * - `*` (asterisk) Indicates the default state. You can associate styles with this name
351 * to be used as the fallback when the state that is being animated is not declared
352 * within the trigger.
353 *
354 * @param styles A set of CSS styles associated with this state, created using the
355 * `style()` function.
356 * This set of styles persists on the element once the state has been reached.
357 * @param options Parameters that can be passed to the state when it is invoked.
358 * 0 or more key-value pairs.
359 * @return An object that encapsulates the new state data.
360 *
361 * @usageNotes
362 * Use the `trigger()` function to register states to an animation trigger.
363 * Use the `transition()` function to animate between states.
364 * When a state is active within a component, its associated styles persist on the element,
365 * even when the animation ends.
366 *
367 * @publicApi
368 **/
369export function state(name, styles, options) {
370 return { type: 0 /* State */, name, styles, options };
371}
372/**
373 * Defines a set of animation styles, associating each style with an optional `offset` value.
374 *
375 * @param steps A set of animation styles with optional offset data.
376 * The optional `offset` value for a style specifies a percentage of the total animation
377 * time at which that style is applied.
378 * @returns An object that encapsulates the keyframes data.
379 *
380 * @usageNotes
381 * Use with the `animate()` call. Instead of applying animations
382 * from the current state
383 * to the destination state, keyframes describe how each style entry is applied and at what point
384 * within the animation arc.
385 * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp).
386 *
387 * ### Usage
388 *
389 * In the following example, the offset values describe
390 * when each `backgroundColor` value is applied. The color is red at the start, and changes to
391 * blue when 20% of the total time has elapsed.
392 *
393 * ```typescript
394 * // the provided offset values
395 * animate("5s", keyframes([
396 * style({ backgroundColor: "red", offset: 0 }),
397 * style({ backgroundColor: "blue", offset: 0.2 }),
398 * style({ backgroundColor: "orange", offset: 0.3 }),
399 * style({ backgroundColor: "black", offset: 1 })
400 * ]))
401 * ```
402 *
403 * If there are no `offset` values specified in the style entries, the offsets
404 * are calculated automatically.
405 *
406 * ```typescript
407 * animate("5s", keyframes([
408 * style({ backgroundColor: "red" }) // offset = 0
409 * style({ backgroundColor: "blue" }) // offset = 0.33
410 * style({ backgroundColor: "orange" }) // offset = 0.66
411 * style({ backgroundColor: "black" }) // offset = 1
412 * ]))
413 *```
414
415 * @publicApi
416 */
417export function keyframes(steps) {
418 return { type: 5 /* Keyframes */, steps };
419}
420/**
421 * Declares an animation transition as a sequence of animation steps to run when a given
422 * condition is satisfied. The condition is a Boolean expression or function that compares
423 * the previous and current animation states, and returns true if this transition should occur.
424 * When the state criteria of a defined transition are met, the associated animation is
425 * triggered.
426 *
427 * @param stateChangeExpr A Boolean expression or function that compares the previous and current
428 * animation states, and returns true if this transition should occur. Note that "true" and "false"
429 * match 1 and 0, respectively. An expression is evaluated each time a state change occurs in the
430 * animation trigger element.
431 * The animation steps run when the expression evaluates to true.
432 *
433 * - A state-change string takes the form "state1 => state2", where each side is a defined animation
434 * state, or an asterix (*) to refer to a dynamic start or end state.
435 * - The expression string can contain multiple comma-separated statements;
436 * for example "state1 => state2, state3 => state4".
437 * - Special values `:enter` and `:leave` initiate a transition on the entry and exit states,
438 * equivalent to "void => *" and "* => void".
439 * - Special values `:increment` and `:decrement` initiate a transition when a numeric value has
440 * increased or decreased in value.
441 * - A function is executed each time a state change occurs in the animation trigger element.
442 * The animation steps run when the function returns true.
443 *
444 * @param steps One or more animation objects, as returned by the `animate()` or
445 * `sequence()` function, that form a transformation from one state to another.
446 * A sequence is used by default when you pass an array.
447 * @param options An options object that can contain a delay value for the start of the animation,
448 * and additional developer-defined parameters. Provided values for additional parameters are used
449 * as defaults, and override values can be passed to the caller on invocation.
450 * @returns An object that encapsulates the transition data.
451 *
452 * @usageNotes
453 * The template associated with a component binds an animation trigger to an element.
454 *
455 * ```HTML
456 * <!-- somewhere inside of my-component-tpl.html -->
457 * <div [@myAnimationTrigger]="myStatusExp">...</div>
458 * ```
459 *
460 * All transitions are defined within an animation trigger,
461 * along with named states that the transitions change to and from.
462 *
463 * ```typescript
464 * trigger("myAnimationTrigger", [
465 * // define states
466 * state("on", style({ background: "green" })),
467 * state("off", style({ background: "grey" })),
468 * ...]
469 * ```
470 *
471 * Note that when you call the `sequence()` function within a `{@link animations/group group()}`
472 * or a `transition()` call, execution does not continue to the next instruction
473 * until each of the inner animation steps have completed.
474 *
475 * ### Syntax examples
476 *
477 * The following examples define transitions between the two defined states (and default states),
478 * using various options:
479 *
480 * ```typescript
481 * // Transition occurs when the state value
482 * // bound to "myAnimationTrigger" changes from "on" to "off"
483 * transition("on => off", animate(500))
484 * // Run the same animation for both directions
485 * transition("on <=> off", animate(500))
486 * // Define multiple state-change pairs separated by commas
487 * transition("on => off, off => void", animate(500))
488 * ```
489 *
490 * ### Special values for state-change expressions
491 *
492 * - Catch-all state change for when an element is inserted into the page and the
493 * destination state is unknown:
494 *
495 * ```typescript
496 * transition("void => *", [
497 * style({ opacity: 0 }),
498 * animate(500)
499 * ])
500 * ```
501 *
502 * - Capture a state change between any states:
503 *
504 * `transition("* => *", animate("1s 0s"))`
505 *
506 * - Entry and exit transitions:
507 *
508 * ```typescript
509 * transition(":enter", [
510 * style({ opacity: 0 }),
511 * animate(500, style({ opacity: 1 }))
512 * ]),
513 * transition(":leave", [
514 * animate(500, style({ opacity: 0 }))
515 * ])
516 * ```
517 *
518 * - Use `:increment` and `:decrement` to initiate transitions:
519 *
520 * ```typescript
521 * transition(":increment", group([
522 * query(':enter', [
523 * style({ left: '100%' }),
524 * animate('0.5s ease-out', style('*'))
525 * ]),
526 * query(':leave', [
527 * animate('0.5s ease-out', style({ left: '-100%' }))
528 * ])
529 * ]))
530 *
531 * transition(":decrement", group([
532 * query(':enter', [
533 * style({ left: '100%' }),
534 * animate('0.5s ease-out', style('*'))
535 * ]),
536 * query(':leave', [
537 * animate('0.5s ease-out', style({ left: '-100%' }))
538 * ])
539 * ]))
540 * ```
541 *
542 * ### State-change functions
543 *
544 * Here is an example of a `fromState` specified as a state-change function that invokes an
545 * animation when true:
546 *
547 * ```typescript
548 * transition((fromState, toState) =>
549 * {
550 * return fromState == "off" && toState == "on";
551 * },
552 * animate("1s 0s"))
553 * ```
554 *
555 * ### Animating to the final state
556 *
557 * If the final step in a transition is a call to `animate()` that uses a timing value
558 * with no style data, that step is automatically considered the final animation arc,
559 * for the element to reach the final state. Angular automatically adds or removes
560 * CSS styles to ensure that the element is in the correct final state.
561 *
562 * The following example defines a transition that starts by hiding the element,
563 * then makes sure that it animates properly to whatever state is currently active for trigger:
564 *
565 * ```typescript
566 * transition("void => *", [
567 * style({ opacity: 0 }),
568 * animate(500)
569 * ])
570 * ```
571 * ### Boolean value matching
572 * If a trigger binding value is a Boolean, it can be matched using a transition expression
573 * that compares true and false or 1 and 0. For example:
574 *
575 * ```
576 * // in the template
577 * <div [@openClose]="open ? true : false">...</div>
578 * // in the component metadata
579 * trigger('openClose', [
580 * state('true', style({ height: '*' })),
581 * state('false', style({ height: '0px' })),
582 * transition('false <=> true', animate(500))
583 * ])
584 * ```
585 *
586 * @publicApi
587 **/
588export function transition(stateChangeExpr, steps, options = null) {
589 return { type: 1 /* Transition */, expr: stateChangeExpr, animation: steps, options };
590}
591/**
592 * Produces a reusable animation that can be invoked in another animation or sequence,
593 * by calling the `useAnimation()` function.
594 *
595 * @param steps One or more animation objects, as returned by the `animate()`
596 * or `sequence()` function, that form a transformation from one state to another.
597 * A sequence is used by default when you pass an array.
598 * @param options An options object that can contain a delay value for the start of the
599 * animation, and additional developer-defined parameters.
600 * Provided values for additional parameters are used as defaults,
601 * and override values can be passed to the caller on invocation.
602 * @returns An object that encapsulates the animation data.
603 *
604 * @usageNotes
605 * The following example defines a reusable animation, providing some default parameter
606 * values.
607 *
608 * ```typescript
609 * var fadeAnimation = animation([
610 * style({ opacity: '{{ start }}' }),
611 * animate('{{ time }}',
612 * style({ opacity: '{{ end }}'}))
613 * ],
614 * { params: { time: '1000ms', start: 0, end: 1 }});
615 * ```
616 *
617 * The following invokes the defined animation with a call to `useAnimation()`,
618 * passing in override parameter values.
619 *
620 * ```js
621 * useAnimation(fadeAnimation, {
622 * params: {
623 * time: '2s',
624 * start: 1,
625 * end: 0
626 * }
627 * })
628 * ```
629 *
630 * If any of the passed-in parameter values are missing from this call,
631 * the default values are used. If one or more parameter values are missing before a step is
632 * animated, `useAnimation()` throws an error.
633 *
634 * @publicApi
635 */
636export function animation(steps, options = null) {
637 return { type: 8 /* Reference */, animation: steps, options };
638}
639/**
640 * Executes a queried inner animation element within an animation sequence.
641 *
642 * @param options An options object that can contain a delay value for the start of the
643 * animation, and additional override values for developer-defined parameters.
644 * @return An object that encapsulates the child animation data.
645 *
646 * @usageNotes
647 * Each time an animation is triggered in Angular, the parent animation
648 * has priority and any child animations are blocked. In order
649 * for a child animation to run, the parent animation must query each of the elements
650 * containing child animations, and run them using this function.
651 *
652 * Note that this feature is designed to be used with `query()` and it will only work
653 * with animations that are assigned using the Angular animation library. CSS keyframes
654 * and transitions are not handled by this API.
655 *
656 * @publicApi
657 */
658export function animateChild(options = null) {
659 return { type: 9 /* AnimateChild */, options };
660}
661/**
662 * Starts a reusable animation that is created using the `animation()` function.
663 *
664 * @param animation The reusable animation to start.
665 * @param options An options object that can contain a delay value for the start of
666 * the animation, and additional override values for developer-defined parameters.
667 * @return An object that contains the animation parameters.
668 *
669 * @publicApi
670 */
671export function useAnimation(animation, options = null) {
672 return { type: 10 /* AnimateRef */, animation, options };
673}
674/**
675 * Finds one or more inner elements within the current element that is
676 * being animated within a sequence. Use with `animate()`.
677 *
678 * @param selector The element to query, or a set of elements that contain Angular-specific
679 * characteristics, specified with one or more of the following tokens.
680 * - `query(":enter")` or `query(":leave")` : Query for newly inserted/removed elements.
681 * - `query(":animating")` : Query all currently animating elements.
682 * - `query("@triggerName")` : Query elements that contain an animation trigger.
683 * - `query("@*")` : Query all elements that contain an animation triggers.
684 * - `query(":self")` : Include the current element into the animation sequence.
685 *
686 * @param animation One or more animation steps to apply to the queried element or elements.
687 * An array is treated as an animation sequence.
688 * @param options An options object. Use the 'limit' field to limit the total number of
689 * items to collect.
690 * @return An object that encapsulates the query data.
691 *
692 * @usageNotes
693 * Tokens can be merged into a combined query selector string. For example:
694 *
695 * ```typescript
696 * query(':self, .record:enter, .record:leave, @subTrigger', [...])
697 * ```
698 *
699 * The `query()` function collects multiple elements and works internally by using
700 * `element.querySelectorAll`. Use the `limit` field of an options object to limit
701 * the total number of items to be collected. For example:
702 *
703 * ```js
704 * query('div', [
705 * animate(...),
706 * animate(...)
707 * ], { limit: 1 })
708 * ```
709 *
710 * By default, throws an error when zero items are found. Set the
711 * `optional` flag to ignore this error. For example:
712 *
713 * ```js
714 * query('.some-element-that-may-not-be-there', [
715 * animate(...),
716 * animate(...)
717 * ], { optional: true })
718 * ```
719 *
720 * ### Usage Example
721 *
722 * The following example queries for inner elements and animates them
723 * individually using `animate()`.
724 *
725 * ```typescript
726 * @Component({
727 * selector: 'inner',
728 * template: `
729 * <div [@queryAnimation]="exp">
730 * <h1>Title</h1>
731 * <div class="content">
732 * Blah blah blah
733 * </div>
734 * </div>
735 * `,
736 * animations: [
737 * trigger('queryAnimation', [
738 * transition('* => goAnimate', [
739 * // hide the inner elements
740 * query('h1', style({ opacity: 0 })),
741 * query('.content', style({ opacity: 0 })),
742 *
743 * // animate the inner elements in, one by one
744 * query('h1', animate(1000, style({ opacity: 1 }))),
745 * query('.content', animate(1000, style({ opacity: 1 }))),
746 * ])
747 * ])
748 * ]
749 * })
750 * class Cmp {
751 * exp = '';
752 *
753 * goAnimate() {
754 * this.exp = 'goAnimate';
755 * }
756 * }
757 * ```
758 *
759 * @publicApi
760 */
761export function query(selector, animation, options = null) {
762 return { type: 11 /* Query */, selector, animation, options };
763}
764/**
765 * Use within an animation `query()` call to issue a timing gap after
766 * each queried item is animated.
767 *
768 * @param timings A delay value.
769 * @param animation One ore more animation steps.
770 * @returns An object that encapsulates the stagger data.
771 *
772 * @usageNotes
773 * In the following example, a container element wraps a list of items stamped out
774 * by an `ngFor`. The container element contains an animation trigger that will later be set
775 * to query for each of the inner items.
776 *
777 * Each time items are added, the opacity fade-in animation runs,
778 * and each removed item is faded out.
779 * When either of these animations occur, the stagger effect is
780 * applied after each item's animation is started.
781 *
782 * ```html
783 * <!-- list.component.html -->
784 * <button (click)="toggle()">Show / Hide Items</button>
785 * <hr />
786 * <div [@listAnimation]="items.length">
787 * <div *ngFor="let item of items">
788 * {{ item }}
789 * </div>
790 * </div>
791 * ```
792 *
793 * Here is the component code:
794 *
795 * ```typescript
796 * import {trigger, transition, style, animate, query, stagger} from '@angular/animations';
797 * @Component({
798 * templateUrl: 'list.component.html',
799 * animations: [
800 * trigger('listAnimation', [
801 * ...
802 * ])
803 * ]
804 * })
805 * class ListComponent {
806 * items = [];
807 *
808 * showItems() {
809 * this.items = [0,1,2,3,4];
810 * }
811 *
812 * hideItems() {
813 * this.items = [];
814 * }
815 *
816 * toggle() {
817 * this.items.length ? this.hideItems() : this.showItems();
818 * }
819 * }
820 * ```
821 *
822 * Here is the animation trigger code:
823 *
824 * ```typescript
825 * trigger('listAnimation', [
826 * transition('* => *', [ // each time the binding value changes
827 * query(':leave', [
828 * stagger(100, [
829 * animate('0.5s', style({ opacity: 0 }))
830 * ])
831 * ]),
832 * query(':enter', [
833 * style({ opacity: 0 }),
834 * stagger(100, [
835 * animate('0.5s', style({ opacity: 1 }))
836 * ])
837 * ])
838 * ])
839 * ])
840 * ```
841 *
842 * @publicApi
843 */
844export function stagger(timings, animation) {
845 return { type: 12 /* Stagger */, timings, animation };
846}
847//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5pbWF0aW9uX21ldGFkYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYW5pbWF0aW9ucy9zcmMvYW5pbWF0aW9uX21ldGFkYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQStKSDs7OztHQUlHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHLEdBQUcsQ0FBQztBQXlSOUI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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lcnkoJzplbnRlcicsIFtcbiAqICAgICAgIHN0eWxlKHsgb3BhY2l0eTogMCB9KSxcbiAqICAgICAgIHN0YWdnZXIoMTAwLCBbXG4gKiAgICAgICAgIGFuaW1hdGUoJzAuNXMnLCBzdHlsZSh7IG9wYWNpdHk6IDEgfSkpXG4gKiAgICAgICBdKVxuICogICAgIF0pXG4gKiAgIF0pXG4gKiBdKVxuICogYGBgXG4gKlxuICogQHB1YmxpY0FwaVxuICovXG5leHBvcnQgZnVuY3Rpb24gc3RhZ2dlcih0aW1pbmdzOiBzdHJpbmd8bnVtYmVyLCBhbmltYXRpb246IEFuaW1hdGlvbk1ldGFkYXRhfEFuaW1hdGlvbk1ldGFkYXRhW10pOlxuICAgIEFuaW1hdGlvblN0YWdnZXJNZXRhZGF0YSB7XG4gIHJldHVybiB7dHlwZTogQW5pbWF0aW9uTWV0YWRhdGFUeXBlLlN0YWdnZXIsIHRpbWluZ3MsIGFuaW1hdGlvbn07XG59XG4iXX0=
Note: See TracBrowser for help on using the repository browser.