Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/vreg/node_modules/bootstrap-vue/src/components/input-group/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/vreg/node_modules/bootstrap-vue/src/components/input-group/input-group.js
import { Vue, mergeData } from '../../vue'
import { NAME_INPUT_GROUP } from '../../constants/components'
import { PROP_TYPE_STRING } from '../../constants/props'
import { SLOT_NAME_APPEND, SLOT_NAME_DEFAULT, SLOT_NAME_PREPEND } from '../../constants/slots'
import { htmlOrText } from '../../utils/html'
import { hasNormalizedSlot, normalizeSlot } from '../../utils/normalize-slot'
import { makeProp, makePropsConfigurable } from '../../utils/props'
import { BInputGroupAppend } from './input-group-append'
import { BInputGroupPrepend } from './input-group-prepend'
import { BInputGroupText } from './input-group-text'

// --- Props ---

export const props = makePropsConfigurable(
  {
    append: makeProp(PROP_TYPE_STRING),
    appendHtml: makeProp(PROP_TYPE_STRING),
    id: makeProp(PROP_TYPE_STRING),
    prepend: makeProp(PROP_TYPE_STRING),
    prependHtml: makeProp(PROP_TYPE_STRING),
    size: makeProp(PROP_TYPE_STRING),
    tag: makeProp(PROP_TYPE_STRING, 'div')
  },
  NAME_INPUT_GROUP
)

// --- Main component ---

// @vue/component
export const BInputGroup = /*#__PURE__*/ Vue.extend({
  name: NAME_INPUT_GROUP,
  functional: true,
  props,
  render(h, { props, data, slots, scopedSlots }) {
    const { prepend, prependHtml, append, appendHtml, size } = props
    const $scopedSlots = scopedSlots || {}
    const $slots = slots()
    const slotScope = {}

    let $prepend = h()
    const hasPrependSlot = hasNormalizedSlot(SLOT_NAME_PREPEND, $scopedSlots, $slots)
    if (hasPrependSlot || prepend || prependHtml) {
      $prepend = h(BInputGroupPrepend, [
        hasPrependSlot
          ? normalizeSlot(SLOT_NAME_PREPEND, slotScope, $scopedSlots, $slots)
          : h(BInputGroupText, { domProps: htmlOrText(prependHtml, prepend) })
      ])
    }

    let $append = h()
    const hasAppendSlot = hasNormalizedSlot(SLOT_NAME_APPEND, $scopedSlots, $slots)
    if (hasAppendSlot || append || appendHtml) {
      $append = h(BInputGroupAppend, [
        hasAppendSlot
          ? normalizeSlot(SLOT_NAME_APPEND, slotScope, $scopedSlots, $slots)
          : h(BInputGroupText, { domProps: htmlOrText(appendHtml, append) })
      ])
    }

    return h(
      props.tag,
      mergeData(data, {
        staticClass: 'input-group',
        class: { [`input-group-${size}`]: size },
        attrs: {
          id: props.id || null,
          role: 'group'
        }
      }),
      [$prepend, normalizeSlot(SLOT_NAME_DEFAULT, slotScope, $scopedSlots, $slots), $append]
    )
  }
})

Spamworldpro Mini