How to use @dpc-sdp/ripple-global - 10 common examples

To help you get started, we’ve selected a few @dpc-sdp/ripple-global examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dpc-sdp / ripple / packages / components / Atoms / Link / Link.vue View on Github external
created: function () {
    if (!isAnchorLink(this.href) && isRelativeUrl(this.href)) {
      this.isNuxtLink = this.rplOptions.nuxt
    }
    // Set link target for non nuxt-links
    if (this.target.length === 0) {
      if (isExternalUrl(this.href, this.rplOptions.hostname)) {
        this.linkTarget = '_blank'
      }
    } else {
      this.linkTarget = this.target
    }
  }
}
github dpc-sdp / ripple / packages / ripple-nuxt-tide / lib / core / anchorlinks.js View on Github external
return this.getAnchorHeadings(html).reduce((result, item) => {
      // Ignore empty headings.
      if (this.textExists(item.text)) {
        result.push({
          text: item.text,
          url: '#' + getAnchorLinkName(item.text)
        })
      }
      return result
    }, [])
  },
github dpc-sdp / ripple / packages / components / Molecules / DocumentLink / DocumentLink.vue View on Github external
nameDecoded: function () {
      // TODO: This is a temporary fix.
      // In Markup component, We can't avoid taking HTML encoded link text from CMS and feeding them into the text icon.
      // We may just change all link text to HTML to solve this issue eventally.
      return decodeSpecialCharacters(this.name)
    },
    icon () {
github dpc-sdp / ripple / packages / components / Atoms / Link / TextLink.vue View on Github external
textDecoded: function () {
      // TODO: This is a temporary fix.
      // In Markup component, We can't avoid taking HTML encoded link text(especially for `"`) from CMS and feeding them into the text icon.
      // We may just change all link text to HTML to solve this issue eventally.
      return decodeSpecialCharacters(this.text)
    },
    iconSymbolFinal () {
github dpc-sdp / ripple / packages / components / Atoms / Link / Link.vue View on Github external
created: function () {
    if (!isAnchorLink(this.href) && isRelativeUrl(this.href)) {
      this.isNuxtLink = this.rplOptions.nuxt
    }
    // Set link target for non nuxt-links
    if (this.target.length === 0) {
      if (isExternalUrl(this.href, this.rplOptions.hostname)) {
        this.linkTarget = '_blank'
      }
    } else {
      this.linkTarget = this.target
    }
  }
}
github dpc-sdp / ripple / packages / components / Organisms / Grants / GrantsOverview.vue View on Github external
calcFunding (from, to) {
      if (from > 0 && to > 0) {
        if (from === to) {
          return formatMoney(from)
        } else {
          return `${formatMoney(from)} - ${formatMoney(to)}`
        }
      } else if (from === 0 && to > 0) {
        return `$0 - ${formatMoney(to)}`
      } else if (from > 0 && to === 0) {
        return formatMoney(from)
      } else {
        return null
      }
    },
    calcStatus (startDate, endDate, terms = this.statusTerms) {
github dpc-sdp / ripple / packages / components / Organisms / Grants / GrantsOverview.vue View on Github external
calcFunding (from, to) {
      if (from > 0 && to > 0) {
        if (from === to) {
          return formatMoney(from)
        } else {
          return `${formatMoney(from)} - ${formatMoney(to)}`
        }
      } else if (from === 0 && to > 0) {
        return `$0 - ${formatMoney(to)}`
      } else if (from > 0 && to === 0) {
        return formatMoney(from)
      } else {
        return null
      }
    },
    calcStatus (startDate, endDate, terms = this.statusTerms) {
github dpc-sdp / ripple / packages / Organisms / Grants / GrantsOverview.vue View on Github external
const calcFunding = (funding) => {
          if (funding.from > 0 && funding.to > 0) {
            if (funding.from === funding.to) {
              return formatMoney(funding.from)
            } else {
              return `${formatMoney(funding.from)} - ${formatMoney(funding.to)}`
            }
          } else if (funding.from === 0 && funding.to > 0) {
            return `$0 - ${formatMoney(funding.to)}`
          } else if (funding.from > 0 && funding.to === 0) {
            return formatMoney(funding.from)
          } else {
            return null
          }
        }
        const fundingLevel = calcFunding(this.funding)
github dpc-sdp / ripple / packages / Organisms / Grants / GrantsOverview.vue View on Github external
const calcFunding = (funding) => {
          if (funding.from > 0 && funding.to > 0) {
            if (funding.from === funding.to) {
              return formatMoney(funding.from)
            } else {
              return `${formatMoney(funding.from)} - ${formatMoney(funding.to)}`
            }
          } else if (funding.from === 0 && funding.to > 0) {
            return `$0 - ${formatMoney(funding.to)}`
          } else if (funding.from > 0 && funding.to === 0) {
            return formatMoney(funding.from)
          } else {
            return null
          }
        }
        const fundingLevel = calcFunding(this.funding)
github dpc-sdp / ripple / packages / components / Organisms / Grants / GrantsOverview.vue View on Github external
calcFunding (from, to) {
      if (from > 0 && to > 0) {
        if (from === to) {
          return formatMoney(from)
        } else {
          return `${formatMoney(from)} - ${formatMoney(to)}`
        }
      } else if (from === 0 && to > 0) {
        return `$0 - ${formatMoney(to)}`
      } else if (from > 0 && to === 0) {
        return formatMoney(from)
      } else {
        return null
      }
    },
    calcStatus (startDate, endDate, terms = this.statusTerms) {