Home / File/ transition-group.ts — vue Source File

transition-group.ts — vue Source File

Architecture documentation for transition-group.ts, a typescript file in the vue codebase. 9 imports, 1 dependents.

File typescript WebPlatform RuntimeModules 9 imports 1 dependents 6 functions

Entity Profile

Dependency Diagram

graph LR
  7c91c607_f320_9fb6_0e00_4e5d50689bec["transition-group.ts"]
  b0a7d15f_5bac_dc6f_49fa_0554a1565637["transition.ts"]
  7c91c607_f320_9fb6_0e00_4e5d50689bec --> b0a7d15f_5bac_dc6f_49fa_0554a1565637
  b540b163_1630_f661_69e2_d6cd1c278184["extractTransitionData"]
  7c91c607_f320_9fb6_0e00_4e5d50689bec --> b540b163_1630_f661_69e2_d6cd1c278184
  02e43f4a_da65_7acd_5a98_0f017554a159["index"]
  7c91c607_f320_9fb6_0e00_4e5d50689bec --> 02e43f4a_da65_7acd_5a98_0f017554a159
  ff375e44_6e1c_0904_3edd_3b2f66d92dca["class-util"]
  7c91c607_f320_9fb6_0e00_4e5d50689bec --> ff375e44_6e1c_0904_3edd_3b2f66d92dca
  e6c67061_4b79_a1e0_e3f6_f14a5605d414["lifecycle"]
  7c91c607_f320_9fb6_0e00_4e5d50689bec --> e6c67061_4b79_a1e0_e3f6_f14a5605d414
  794bfc20_cc74_340b_dac6_a3f7ea5d55ce["transition-util"]
  7c91c607_f320_9fb6_0e00_4e5d50689bec --> 794bfc20_cc74_340b_dac6_a3f7ea5d55ce
  f6868225_acf7_afdc_ebd3_15704ddb6566["vnode"]
  7c91c607_f320_9fb6_0e00_4e5d50689bec --> f6868225_acf7_afdc_ebd3_15704ddb6566
  81ed4f13_7d68_6e21_7425_cf978f68576f["vnode"]
  7c91c607_f320_9fb6_0e00_4e5d50689bec --> 81ed4f13_7d68_6e21_7425_cf978f68576f
  96423614_f522_3ab1_46f2_474306df888a["create-component"]
  7c91c607_f320_9fb6_0e00_4e5d50689bec --> 96423614_f522_3ab1_46f2_474306df888a
  370f887a_671c_0a30_6345_0f97fc69bd9e["index.ts"]
  370f887a_671c_0a30_6345_0f97fc69bd9e --> 7c91c607_f320_9fb6_0e00_4e5d50689bec
  style 7c91c607_f320_9fb6_0e00_4e5d50689bec fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// Provides transition support for list items.
// supports move transitions using the FLIP technique.

// Because the vdom's children update algorithm is "unstable" - i.e.
// it doesn't guarantee the relative positioning of removed elements,
// we force transition-group to update its children into two passes:
// in the first pass, we remove all nodes that need to be removed,
// triggering their leaving transition; in the second pass, we insert/move
// into the final desired state. This way in the second pass removed
// nodes will remain where they should be.

import { warn, extend } from 'core/util/index'
import { addClass, removeClass } from 'web/runtime/class-util'
import { transitionProps, extractTransitionData } from './transition'
import { setActiveInstance } from 'core/instance/lifecycle'

import {
  hasTransition,
  getTransitionInfo,
  transitionEndEvent,
  addTransitionClass,
  removeTransitionClass
} from 'web/runtime/transition-util'
import VNode from 'core/vdom/vnode'
import { VNodeWithData } from 'types/vnode'
import { getComponentName } from 'core/vdom/create-component'

const props = extend(
  {
    tag: String,
    moveClass: String
  },
  transitionProps
)

delete props.mode

export default {
  props,

  beforeMount() {
    const update = this._update
    this._update = (vnode, hydrating) => {
      const restoreActiveInstance = setActiveInstance(this)
      // force removing pass
      this.__patch__(
        this._vnode,
        this.kept,
        false, // hydrating
        true // removeOnly (!important, avoids unnecessary moves)
      )
      this._vnode = this.kept
      restoreActiveInstance()
      update.call(this, vnode, hydrating)
    }
  },

  render(h: Function) {
    const tag: string = this.tag || this.$vnode.data.tag || 'span'
    const map: Record<string, any> = Object.create(null)
// ... (145 more lines)

Domain

Subdomains

Dependencies

Frequently Asked Questions

What does transition-group.ts do?
transition-group.ts is a source file in the vue codebase, written in typescript. It belongs to the WebPlatform domain, RuntimeModules subdomain.
What functions are defined in transition-group.ts?
transition-group.ts defines 6 function(s): applyTranslation, callPendingCbs, default.beforeMount, default.render, default.updated, recordPosition.
What does transition-group.ts depend on?
transition-group.ts imports 9 module(s): class-util, create-component, extractTransitionData, index, lifecycle, transition-util, transition.ts, vnode, and 1 more.
What files import transition-group.ts?
transition-group.ts is imported by 1 file(s): index.ts.
Where is transition-group.ts in the architecture?
transition-group.ts is located at src/platforms/web/runtime/components/transition-group.ts (domain: WebPlatform, subdomain: RuntimeModules, directory: src/platforms/web/runtime/components).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free