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

ember-ebau-gwr

v8.0.2

Published

Ember engine to integrate ebau-gwr into an ember app.

Downloads

574

Readme

ember-ebau-gwr

Ember Engine for the inosca/ebau-gwr backend.

Development

# start a local CORS proxy
pnpm proxy
# start dev server
pnpm start

Compatibility

  • Ember.js v4.12 or above
  • Ember CLI v4.12 or above
  • Node.js v18 or above

Installation

ember install ember-ebau-gwr

Usage

Mount the engine in your router file. You can specify a param in the url which will then be used to filter the gwr-links by their attribute local_id.

this.mount("ember-ebau-gwr", { as: "gwr", path: "gwr/:id" });

Enviroment configuration

In your config/environment.js you need to define the following option for changeset-validations. We use this feature to generate translated errors:

"changeset-validations": { rawOutput: true },

Important This currentlry has the limitation, that if your app uses changeset-validations itself, this option changes the behaviour in the whole app. Due to engine config restrictions, there is sadly currently no other way than maybe implementing something on build-pipeline level.

Styling

The engine uses the UI framework "UIkit" through ember-uikit. To enable the styling, add the following import to app/styles/app.scss:

@import "ember-uikit";
@import "ember-ebau-gwr";

Services

The engine takes following services as argument:

dependencies = {
  services: [
    "config",
    "intl",
    "notification",
    "dataImport",
    "store",
    "session",
  ],
};

config

The config service is used to pass config to the engine. The following properties can be configured:

| Name | Type | Description | | -------------------- | ---------------- | -------------------------------------------------------------------------------------------------- | | gwrAPI | URL Path | URL path to the gwr api proxy. Example: /housing-stat/regbl/api/ech0216/ | | isTestEnvironment | Boolean | Is the code deployed on staging or production | | cantonAbbreviation | String | BE, SZ,UR etc. | | importModels | [String] | A list of model names for which the import should be available. Example: ["project", "building"] | | authToken | String | The authentication toke from the host app. | | camacGroup | String\|Number | The current camac group of the user. | | pageSize | Number | The page size which the gwr api should return. | | modalContainer | CSS Selector | A CSS selector to render the modals in. |

All values should follow the officially used format.

dataImport

In the dataImport service the consuming application fetches and formats the data into the expected format. The format is the same data structure as the model properties which can be found in /addon/models.

The service should define a fetchProject: async () -> Promise<Object> function.

session

We expect a ember-simple-auth session service which has the data.authenticated.access_token set.

Contributing

See the Contributing guide for details.

License

This project is licensed under the AGPLv3.