UNPKG

@evan.network/ui-angular-core

Version:

The angular-core operates as an global and central library for the evan.network Angular 5 frontend development. Using this project you will be able to to the following things:

96 lines (95 loc) 3.96 kB
import { AnimationEntryMetadata } from 'angular-libs'; /** * Defines an AnimationDefinition that specifies the transition that should be * build. * * @class AnimationDefinition (name) */ declare class AnimationDefinition { type: string; from: string; direction: string; to: string; constructor(from: any, direction: any, to: any, type: any); } /** * Generates an slide animation for angular animate. * * @param {number} translateEnter From translateDirection on enter * @param {number} translateEnterTo To translateDirection on enter * @param {number} translateLeave From translateDirection on leave * @param {number} translateLeaveTo To translateDirection on leave * @param {string} translateDirection translateX / translateY * @return {Array<any>} The side slide animation. */ declare function getSideSlideAnimation(translateEnter: number, translateEnterTo: number, translateLeave: number, translateLeaveTo: number, translateDirection: string): Array<any>; declare const animations: { /** * Generate up animation (from bottom to top) * * @param {string} from The from state (/parent) * @param {string} to The to state (/parent/child) * @param {string} direction <= | => * @return {AnimationEntryMetadata} Transition including it's slideanimation */ up: (from: string, to: string, direction: string) => any; /** * Generate down animation (from top to bottom) * * @param {string} from The from state (/parent) * @param {string} to The to state (/parent/child) * @param {string} direction <= | => * @return {AnimationEntryMetadata} Transition including it's slideanimation */ down: (from: string, to: string, direction: string) => any; /** * Generate forward animation (from left to right) * * @param {string} from The from state (/parent) * @param {string} to The to state (/parent/child) * @param {string} direction <= | => * @return {AnimationEntryMetadata} Transition including it's slideanimation */ right: (from: string, to: string, direction: string) => any; /** * Generate backward animation (from right to left) * * @param {string} from The from state (/parent/child) * @param {string} to The to state (/parent) * @param {string} direction <= | => * @return {AnimationEntryMetadata} Transition including it's slideanimation */ left: (from: string, to: string, direction: string) => any; /** * Disable animation * * @param {string} from The from state (/parent/child) * @param {string} to The to state (/parent) * @param {string} direction <= | => * @return {AnimationEntryMetadata} Transition including it's slideanimation */ none: (from: string, to: string, direction: string) => any; }; /** * Create a transition for several an router-outlet to get swiping animations between routing changes. * * - Create Transition to swipe everything to the right * @Component({ * ... * animations: [ * createRouterTransition([ * new AnimationDefinition('component1', '=>', 'component2', 'right'), * new AnimationDefinition('component2', '=>', 'component1', 'left'), * ]) * ] * }) * * <div evan-content [@routerTransition]="o?.activatedRouteData?.state"> * <router-outlet #o="outlet"></router-outlet> * </div> * * @param {Array<AnimationDefinition>} animationDefinitions The animation definitions * @return {AnimationEntryMetadata} the animation */ declare const createRouterTransition: AnimationEntryMetadata; export { AnimationDefinition, createRouterTransition, animations, getSideSlideAnimation, };