Socket
Book a DemoInstallSign in
Socket

ember-ebau-gwr

Package Overview
Dependencies
Maintainers
4
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-ebau-gwr

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

8.0.3
latest
Source
npmnpm
Version published
Weekly downloads
97
-53.59%
Maintainers
4
Weekly downloads
 
Created
Source

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:

NameTypeDescription
gwrAPIURL PathURL path to the gwr api proxy. Example: /housing-stat/regbl/api/ech0216/
isTestEnvironmentBooleanIs the code deployed on staging or production
cantonAbbreviationStringBE, SZ,UR etc.
importModels[String]A list of model names for which the import should be available. Example: ["project", "building"]
authTokenStringThe authentication toke from the host app.
camacGroupString|NumberThe current camac group of the user.
pageSizeNumberThe page size which the gwr api should return.
modalContainerCSS SelectorA 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.

Keywords

ember-addon

FAQs

Package last updated on 03 Mar 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.