Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function jelloAnimation(options?: IAttentionSeekerAnimationOptions): AnimationTriggerMetadata {
return trigger((options && options.anchor) || 'jello', [
transition(
`0 ${(options && options.direction) || '<=>'} 1`,
[
...(options && options.animateChildren === 'before' ? [query('@*', animateChild(), { optional: true })] : []),
group([
style({ 'transform-origin': 'center' }),
useAnimation(jello),
...(!options || !options.animateChildren || options.animateChildren === 'together'
? [query('@*', animateChild(), { optional: true })]
: [])
]),
...(options && options.animateChildren === 'after' ? [query('@*', animateChild(), { optional: true })] : [])
],
{
params: {
delay: (options && options.delay) || 0,
duration: (options && options.duration) || DEFAULT_DURATION
}
}
)
]);
export function tadaAnimation(options?: IAttentionSeekerAnimationOptions): AnimationTriggerMetadata {
return trigger((options && options.anchor) || 'tada', [
transition(
`0 ${(options && options.direction) || '<=>'} 1`,
[
...(options && options.animateChildren === 'before' ? [query('@*', animateChild(), { optional: true })] : []),
group([
useAnimation(tada),
...(!options || !options.animateChildren || options.animateChildren === 'together'
? [query('@*', animateChild(), { optional: true })]
: [])
]),
...(options && options.animateChildren === 'after' ? [query('@*', animateChild(), { optional: true })] : [])
],
{
params: {
delay: (options && options.delay) || 0,
duration: (options && options.duration) || DEFAULT_DURATION
}
}
)
]);
}
display: 'none',
})),
state('0', style({
height: AUTO_STYLE,
display: AUTO_STYLE,
})),
transition('0 => 1', [
group([
query('@*', animateChild(), { optional: true }),
animate((collapseOptions.duration || 150) + 'ms ' +
(collapseOptions.delay || 0) + 'ms ' +
(collapseOptions.easeOnClose || 'ease-in')),
]),
]),
transition('1 => 0', [
group([
query('@*', animateChild(), { optional: true }),
animate((collapseOptions.duration || 150) + 'ms ' +
(collapseOptions.delay || 0) + 'ms ' +
(collapseOptions.easeOnOpen || 'ease-out')),
]),
]),
]);
}
//# sourceMappingURL=collapse.animation.js.map
export function bounceOnEnterAnimation(options?: IAnimationOptions): AnimationTriggerMetadata {
return trigger((options && options.anchor) || 'bounceOnEnter', [
transition(
':enter',
[
...(options && options.animateChildren === 'before' ? [query('@*', animateChild(), { optional: true })] : []),
style({ visibility: 'hidden' }),
group([
style({ 'transform-origin': 'center bottom' }),
useAnimation(bounce),
...(!options || !options.animateChildren || options.animateChildren === 'together'
? [query('@*', animateChild(), { optional: true })]
: [])
]),
...(options && options.animateChildren === 'after' ? [query('@*', animateChild(), { optional: true })] : [])
],
{
params: {
delay: (options && options.delay) || 0,
duration: (options && options.duration) || DEFAULT_DURATION
}
}
)
]);
export function zoomInLeftAnimation(options?: IAnimationOptions): AnimationTriggerMetadata {
return trigger((options && options.anchor) || 'zoomInLeft', [
transition(
'0 => 1',
[
...(options && options.animateChildren === 'before' ? [query('@*', animateChild(), { optional: true })] : []),
group([
useAnimation(zoomInLeft),
...(!options || !options.animateChildren || options.animateChildren === 'together'
? [query('@*', animateChild(), { optional: true })]
: [])
]),
...(options && options.animateChildren === 'after' ? [query('@*', animateChild(), { optional: true })] : [])
],
{
params: {
delay: (options && options.delay) || 0,
duration: (options && options.duration) || DEFAULT_DURATION
}
}
)
]);
}
export function fadeInDownAnimation(options?: IFadeInDownAnimationOptions): AnimationTriggerMetadata {
return trigger((options && options.anchor) || 'fadeInDown', [
transition(
'0 => 1',
[
...(options && options.animateChildren === 'before' ? [query('@*', animateChild(), { optional: true })] : []),
group([
useAnimation(fadeInDown),
...(!options || !options.animateChildren || options.animateChildren === 'together'
? [query('@*', animateChild(), { optional: true })]
: [])
]),
...(options && options.animateChildren === 'after' ? [query('@*', animateChild(), { optional: true })] : [])
],
{
params: {
delay: (options && options.delay) || 0,
duration: (options && options.duration) || DEFAULT_DURATION,
translate: (options && options.translate) || '100%'
}
}
)
]);
export function fadeInDownBigOnEnterAnimation(options?: IFadeInDownBigAnimationOptions): AnimationTriggerMetadata {
return trigger((options && options.anchor) || 'fadeInDownBigOnEnter', [
transition(
':enter',
[
style({ visibility: 'hidden' }),
...(options && options.animateChildren === 'before' ? [query('@*', animateChild(), { optional: true })] : []),
group([
useAnimation(fadeInDownBig),
...(!options || !options.animateChildren || options.animateChildren === 'together'
? [query('@*', animateChild(), { optional: true })]
: [])
]),
...(options && options.animateChildren === 'after' ? [query('@*', animateChild(), { optional: true })] : [])
],
{
params: {
delay: (options && options.delay) || 0,
duration: (options && options.duration) || DEFAULT_DURATION,
translate: (options && options.translate) || '2000px'
}
}
)
]);
export function fadeInRightBigOnEnterAnimation(options?: IFadeInRightBigAnimationOptions): AnimationTriggerMetadata {
return trigger((options && options.anchor) || 'fadeInRightBigOnEnter', [
transition(
':enter',
[
style({ visibility: 'hidden' }),
...(options && options.animateChildren === 'before' ? [query('@*', animateChild(), { optional: true })] : []),
group([
useAnimation(fadeInRightBig),
...(!options || !options.animateChildren || options.animateChildren === 'together'
? [query('@*', animateChild(), { optional: true })]
: [])
]),
...(options && options.animateChildren === 'after' ? [query('@*', animateChild(), { optional: true })] : [])
],
{
params: {
delay: (options && options.delay) || 0,
duration: (options && options.duration) || DEFAULT_DURATION,
translate: (options && options.translate) || '2000px'
}
}
)
]);
export function TdRotateAnimation(rotateOptions) {
if (rotateOptions === void 0) { rotateOptions = {}; }
return trigger(rotateOptions.anchor || 'tdRotate', [
state('0', style({
transform: 'rotate(0deg)',
})),
state('1', style({
transform: 'rotate(' + (rotateOptions.degrees || 180) + 'deg)',
})),
transition('0 <=> 1', [
group([
query('@*', animateChild(), { optional: true }),
animate((rotateOptions.duration || 250) + 'ms ' +
(rotateOptions.delay || 0) + 'ms ' +
(rotateOptions.ease || 'ease-in')),
]),
]),
]);
}
//# sourceMappingURL=rotate.animation.js.map
animateChild,
animation,
AnimationTriggerMetadata,
group,
keyframes,
query,
style,
transition,
trigger,
useAnimation
} from '@angular/animations';
import { IAnimationOptions } from '../common/interfaces';
const zoomOut = animation(
group([
animate(
'{{duration}}ms {{delay}}ms',
keyframes([
style({ opacity: 1, transform: 'scale3d(1, 1, 1)', easing: 'ease', offset: 0 }),
style({ opacity: 0, transform: 'scale3d(0.3, 0.3, 0.3)', easing: 'ease', offset: 0.5 }),
style({ opacity: 0, easing: 'ease', offset: 1 })
])
),
animate(
'{{duration}}ms {{delay}}ms',
keyframes([
style({ transform: 'scale3d(1, 1, 1)', easing: 'ease', offset: 0 }),
style({ transform: 'scale3d(0.3, 0.3, 0.3)', easing: 'ease', offset: 0.5 })
])
)
])