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

ovh-angular-mondial-relay

v4.1.1

Published

Display a map to select mondial relay

Downloads

13

Readme

Display a map to select mondial relay

githubbanner

Maintenance Chat on gitter Build Status

NPM

<mondial-relay data-ng-model="myRelay"></mondial-relay>

Installation

Bower

bower install ovh-angular-mondial-relay --save

NPM

npm install ovh-angular-mondial-relay --save

Howto's

Configuration

In your app.js, inject the module

angular.module("myModule", ["ovh-angular-mondial-relay"]);

In your index.html, inject scripts and styles

    <script src="bower_components/mondial-relay/dist/mondial-relay.min.js"></script>
    <link rel="stylesheet" href="bower_components/mondial-relay/dist/mondial-relay.min.css" />

Translations

Translations are available in xml files in folder https://github.com/ovh-ux/ovh-angular-mondial-relay/blob/master/src/mondial-relay/translations

The more convinent is to convert these files in json and provide partial translation files via mondialRelayProvider

Requests to API

You need 2 services to request API:

SupplyMondialRelay

angular.module("myApp").service("SupplyMondialRelay", function ($q) {
    return {
        Lexi: function () {
            return {
                search: function (filter) {
                    // perform the request here
                    return $q.when(response);
                }
            }
        }
    }
});

where filter is a json object containing:

  • address {String} (optional): i.e. : "route de gorrekear"
  • city {String} (optional if zipcode is specified): i.e. : "le folgoet"
  • country {String} (mendatory): i.e. : "fr"
  • zipcode {String} (optional if city is specified): i.e. : "29260"

where response is a json like:

{
  "status": "ok",
  "error": null,
  "result": {
    "referenceAddress": "Route de Gorrekear, 29260 Le Folgoët, France",
    "relayPoints": [
      {
        "country": "fr",
        "distance": 1477,
        "lat": 48.5720143,
        "lng": -4.3266499,
        "name": "VERT ANIS",
        "opening": {
          "sunday": null,
          "wednesday": [
            {
              "start": "0900",
              "end": "1200"
            },
            {
              "start": "1400",
              "end": "1900"
            }
          ]
        },
        "zipcode": "29260",
        "mapUrl": "https://ww2.mondialrelay.com/public/permanent/plan_relais.aspx?ens=BDOVHSAS11&num=043966&pays=FR&crc=79C55FC21A44C73C1D90749C2B510F34",
        "city": "LESNEVEN",
        "pictureUrl": "https://www.mondialrelay.fr/media/51887/encart-suivi-de-colis_899x160.jpg",
        "id": "043966",
        "address": "PLACE DE L EUROPE",
        "closing": null
      },
    ]
  }
}

User

angular.module("myApp").service("User", function ($q) {
    return {
        Lexi: function () {
            return {
                get: function (filter) {
                    // perform the request here
                    return $q.when({
                        country: "fr",      // country is mendatory
                        zip: "29260",       // zip or city can be provided
                        city: "Le Folgoët"
                    });
                }
            }
        }
    }
});

Get the sources

    git clone https://github.com/ovh-ux/ovh-angular-mondial-relay.git
    cd ovh-angular-mondial-relay
    npm install
    bower install

You've developed a new cool feature ? Fixed an annoying bug ? We'd be happy to hear from you !

Have a look in CONTRIBUTING.md

If you use literal text, you must declare it as a translation, only in the french translation file https://github.com/ovh-ux/ovh-angular-mondial-relay/blob/master/src/mondial-relay/translations/Messages_fr_FR.xml

Run the tests

npm test

Build the documentation

grunt ngdocs

Related links

  • Contribute: https://github.com/ovh-ux/ovh-angular-mondial-relay/blob/master/CONTRIBUTING.md
  • Report bugs: https://github.com/ovh-ux/ovh-angular-mondial-relay/issues
  • Get latest version: https://github.com/ovh-ux/ovh-angular-mondial-relay

License

See https://github.com/ovh/ovh-angular-mondial-relay/blob/master/LICENSE