npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@hemanthm/vue-place-autocomplete

v0.5.5

Published

From https://github.com/actengage/vue-place-autocomplete with patches from https://github.com/CSalih/vue-place-autocomplete

Downloads

345

Readme

Google Place Autocomplete

From https://github.com/actengage/vue-place-autocomplete with patches from https://github.com/CSalih/vue-place-autocomplete

This Vue component incorporates full support the Google Places and Geocoder API's a single input field. The goal is provide the most native and seamlessly integrated solution possible.

Features

  • Built for Bootstrap 4
  • Works just like a native input field
  • Full support for keyboard accessibility and shortcuts
  • Fully customizable markup and extensible JS
  • Full support for Google Places and Geocoder API's
  • Use multiple instances on the same page
  • Easily auto-fill additional input fields with address component

Installation

NPM

npm install vue-place-autocomplete --save

// ES6 Usage
import Vue from 'vue';
import VuePlaceAutocomplete from 'vue-place-autocomplete';

Vue.use(VuePlaceAutocomplete);

CDN

https://www.jsdelivr.com/package/npm/vue-place-autocomplete

Default Usage

The default usage extends the InputField from vue-interface, so all the properties are inherited.

<div v-if="field1" class="alert alert-info">
    Current Value: {{field1}}
</div>

<place-autocomplete-field v-model="field1" placeholder="Enter an an address, zipcode, or location" label="Address" name="field1" api-key="AIzaSyAhSv9zWvisiTXRPRw6K8AE0DCmrRMpQcU"></place-autocomplete-field>

Basic Usage

Autofill fields

Sometimes you may need to autofill address components into other input fields...

<place-autocomplete-field
    v-model="field2"
    label="Address"
    name="field2"
    api-key="AIzaSyAhSv9zWvisiTXRPRw6K8AE0DCmrRMpQcU"
    placeholder="Enter an an address, zipcode, or location"
    v-place-autofill:street="street"
    v-place-autofill:city="city"
    v-place-autofill:state="state"
    v-place-autofill:zipcode="zip"
    v-place-autofill:country="country">
</place-autocomplete-field>

<div class="card w-30">
    <div class="card-body">
        <p><b class="card-title">Enter an address above and watch the fields below get auto-filled...</b></p>

        <p>
            <label>Street</label><br>
            <input name="street" v-model="street" class="form-control"/>
        </p>
        <p>
            <label>Addr2</label><br>
            <input name="addr2" v-model="addr2" class="form-control"/>
        </p>
        <p>
            <label>City</label><br>
            <input name="city" v-model="city" class="form-control"/>
        </p>
        <p>
            <label>State</label><br>
            <input name="state" v-model="state" class="form-control"/>
        </p>
        <p>
            <label>Zip</label><br>
            <input name="zip" v-model="zip" class="form-control"/>
        </p>
        <p>
            <label>United States</label><br>
            <input name="country" v-model="country" class="form-control"/>
        </p>
    </div>
</div>

Autofill Usage

Build Commands

npm run dev

Start the Rollup build process and watch the source files and trigger livereload when a file changes.

npm run commit

Makes a GIT commit with the current version from package.json. (This command is called automatically in the npm run release command.)

npm run release-patch

Compiles the latest source files, makes an incremental version bump (1.0.x) to package.json, then makes a commit with new version, and finally publishes the latest build to NPM.

npm run release-minor

Compiles the latest source files, makes a minor version bump (1.x.0) to package.json, then makes a commit with new version, and finally publishes the latest build to NPM.

npm run release-major

Compiles the latest source files, makes a major version bump (x.1.0) to package.json, then makes a commit with new version, and finally publishes the latest build to NPM.

npm run release

Compiles the latest source files for release, runs the uglification process, makes the commit, and published the package. This command is called automatically uses any of the other npm run release-{type} commands.

npm run uglify

Rund the uglify library over the compiled source to create a {package-name}.min.js file that Gzip and minifies that library.