New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@revolugo/elements

Package Overview
Dependencies
Maintainers
0
Versions
2265
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@revolugo/elements

Revolugo Elements UI library

  • 5.26.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Revolugo Elements

Revolugo Elements UI library

How to use

Initialization

Include the Revolugo Elements tag in the head section of your page and edit the config to suit your needs.

N.B: The configuration options are explained below.

<script>
  ;(function (r, e, v, o, l, u, g) {
    r[l] = r[l] || {
      ready: function (y) {
        r[l]._ready = y
      },
    }
    ;(u = e.createElement(v)), (g = e.getElementsByTagName(v)[0])
    u.src = o + '?' + new Date().getTime()
    g.parentNode.insertBefore(u, g)
  })(
    window,
    document,
    'script',
    'https://cdn.jsdelivr.net/npm/@revolugo/elements',
    'RevolugoElements',
  )

  // Revolugo Elements configuration
  RevolugoElements.config = {
    apiEnvironment: 'LIVE',
    apiKey: 'my-api-key',
    locale: 'fr-FR',
    theme: { primary: '#007fff' },
  }
</script>

Using components

To use a Revolugo web component, include the corresponding tag in the body section of your page, and provide parameters in the tag attributes.

For example:

<revolugo-hotel-search
  check-in-date="2023-10-10"
  check-out-date="2023-10-11"
  latitude="48.85826"
  longitude="2.29452"
/>

Subscribing to events

Events will be published on an event bus by the Revolugo Elements library. Subscribing to them is easy:

// Define your callback in RevolugoElements.ready() so it will be called when the library is initialized.
RevolugoElements.ready(function () {
  RevolugoElements.eventBus.$on('hotel-offers:retrieved', function (payload) {
    console.log(payload)
  })
})

Configuration options

NameTypeRequirementDefaultDescription
apiEnvironmentstringOptionalLOCALThe Revolugo environment to use. Must be one of these: LIVE, SANDBOX, STAGING, LOCAL
apiKeystringMandatoryYour Revolugo API Key
localestringOptionalen-USThe language used in components. Must be en-US or fr-FR
themeobjectOptional{ primary: '#007fff', secondary: '#64B5F6', success: '#4CAF50' }Color theme for the components. All keys are optional

FAQs

Package last updated on 05 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc