7.5.5 • Published 1 month ago

ember-ebau-gwr v7.5.5

Weekly downloads
118
License
AGPL-3.0
Repository
github
Last release
1 month ago

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.

7.5.5

1 month ago

7.5.4

1 month ago

7.5.3

1 month ago

7.5.2

1 month ago

7.5.1

2 months ago

7.5.0

2 months ago

7.4.6

3 months ago

7.4.5

3 months ago

7.4.4

5 months ago

7.4.3

7 months ago

7.4.2

8 months ago

7.4.1

8 months ago

7.4.0

8 months ago

7.3.0

9 months ago

7.1.0

10 months ago

7.2.1

10 months ago

7.2.0

10 months ago

6.4.1

1 year ago

7.0.0

1 year ago

6.4.0

1 year ago

6.3.5

1 year ago

6.3.2

1 year ago

6.3.4

1 year ago

6.3.3

1 year ago

6.1.0

2 years ago

6.3.0

1 year ago

6.3.1

1 year ago

6.2.0

2 years ago

6.0.4

2 years ago

4.0.7

2 years ago

5.0.4

2 years ago

5.0.3

2 years ago

5.0.2

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

6.0.3

2 years ago

6.0.2

2 years ago

4.0.5

2 years ago

4.0.6

2 years ago

4.0.4

2 years ago

3.4.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.0.3

2 years ago

4.0.2

2 years ago

3.3.0

2 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.1.1

3 years ago

3.1.0

3 years ago

3.0.0

3 years ago

2.7.1

3 years ago

2.7.0

3 years ago

2.6.0

3 years ago

2.5.1

3 years ago

2.5.0

3 years ago

2.4.1

3 years ago

2.4.0

3 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

1.10.2

3 years ago

1.10.1

3 years ago

1.10.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.9.0

3 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago