Socket
Socket
Sign inDemoInstall

ember-ebau-gwr

Package Overview
Dependencies
28
Maintainers
4
Versions
87
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ember-ebau-gwr

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


Version published
Maintainers
4
Created

Changelog

Source

7.5.5 (2024-03-19)

Bug Fixes

  • projects: fix detection of active project id (c9df3d4)

Readme

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.4 or above
  • Ember CLI v4.4 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

FAQs

Last updated on 19 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc