Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vector tile layers, styling of layer control and simplify updates/usage #145

Merged
merged 35 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1d28eea
fix: show button for settings if layer has action; closes #135
boeckMt Aug 30, 2022
29df062
fix: Show layer expand icon only when the layer has some things to ex…
boeckMt Aug 30, 2022
32107d1
refactor: move style switcher into settings tab
boeckMt Aug 30, 2022
8ef1c3b
feat: Allow dynamic components for layer.description
boeckMt Aug 30, 2022
4fb1ab2
feat: Allow dynamic components for layer.description - set input
boeckMt Aug 30, 2022
49f5a1d
feat: adjust types to allow Dynamic components for layer description
boeckMt Sep 2, 2022
c6c437e
fix: Do not change the layer object binding in layerentry
boeckMt Sep 2, 2022
7d2e5c4
refactor: add example for layer.description as component
boeckMt Sep 2, 2022
3a57c9d
feat: use inputs.description if possible to generate abstract from dy…
boeckMt Sep 5, 2022
0bc0ca9
fix: Show layer expand icon if filtertype not Baselayers
boeckMt Sep 5, 2022
26f7e3e
fix: remove right border on tabsbody for layers inside a group
boeckMt Sep 5, 2022
6c2fd32
fix: Do not change the group object binding in
boeckMt Sep 5, 2022
78197b7
fix: toggle group tabs and show all settings
boeckMt Sep 5, 2022
0256c2d
feat: Allow Dynamic components for Group description
boeckMt Sep 5, 2022
39acc6b
feat: Allow legend on LayerGroup #138
boeckMt Sep 5, 2022
d7bf898
refactor: add example legend and description components for group
boeckMt Sep 5, 2022
54127fa
fix: style for group tabsbody and actions button position
boeckMt Sep 5, 2022
82943dc
refactor: set input on layer IDynamicComponent - no object change nee…
boeckMt Sep 5, 2022
c59066d
merge: main into layer-control-enhancements
boeckMt Sep 6, 2022
2f82a6f
fix: deprecated createComponent from componentFactory
boeckMt Sep 6, 2022
591eb78
fix: replace deprecated ComponentFactory
boeckMt Sep 20, 2022
41e8e98
Merge branch 'main' into fix-dynamic-component
boeckMt Sep 20, 2022
31fd76e
fix: set tile urls in map style source which is used in ol-mapbox-style
boeckMt Sep 20, 2022
bb6e79f
fix: prevent binding to the same element for duplicate IDs on multipl…
boeckMt Sep 22, 2022
4b3780e
refactor: update layer source in function
boeckMt Sep 22, 2022
98974b1
refactor: remove unused imports
boeckMt Sep 22, 2022
c782f0f
fix: test if layer has description on generate abstract
boeckMt Sep 22, 2022
7291677
fix: update vector tile style on layers and params or source on basel…
boeckMt Sep 22, 2022
0d2d292
refactor: add example to change vector tile style
boeckMt Sep 23, 2022
63c0421
docs: add more instructions to work with the library and a project si…
boeckMt Sep 23, 2022
693f82a
BREAKING CHANGE: remove class floating from clr-main-container
boeckMt Sep 23, 2022
8c2538b
BREAKING CHANGE: Package dependencies are set to allow Minor releases
boeckMt Sep 23, 2022
0b72ca6
Merge branch 'main' into fix-update-v-tile-layer
boeckMt Sep 23, 2022
9e4fd5c
pre-release fixing multiple layers with same id
MichaelLangbein Oct 5, 2022
e396aef
ci: changed action-name in package-pre-release.yml
MichaelLangbein Oct 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/package-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 16
- uses: ./.github/actions/build-test
- uses: ./.github/actions/build
- name: Archive dist artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Fix style: remove right border on tabsbody for layers inside a group.

* **@dlr-eoc/layer-control:**
- Do not use `<label for>` with `<input id>` to prevent binding to the same element for duplicate IDs.
- Do not change the group object binding in `layerentry-group` when creating a dynamic component from the group.
- Do not change the layer object binding in `layerentry` when creating a dynamic component from the layer.
- For Baselayers also show button to switch to the settings tab if layer has action [Issue #135](https://github.com/dlr-eoc/ukis-frontend-libraries/issues/135).
Expand All @@ -19,10 +20,14 @@
- Add missing time value in function `setMapState` on state initialization [Issue #133](https://github.com/dlr-eoc/ukis-frontend-libraries/issues/133).

* **@dlr-eoc/map-ol:**
- Update `TmsLayer` for vector tile style update.
- Update `Params` and `Source` for `baselayers`.
- Replace deprecated ComponentFactory in `createDynamicPopupComponent` [angular 45263](https://github.com/angular/angular/issues/45263).
- Set urls for vector tile layers after apply style to override them when tilejson is not provided. This is helpful to use `tms` services where no tilejson is available. Then set the url of the sourceId in your style file to `"url": ""` and add `"tiles": []`. This [skips the request](https://github.com/openlayers/ol-mapbox-style/blob/v8.2.1/src/util.js#L109) to tilejson.

### Breaking Changes
- Package dependencies are set to allow Minor releases (which normally shouldn't break anything but can sometimes be) to simplify updates and usage when creating new apps.
- Remove class `floating` from `clr-main-container`, this is now set on `content-container` e.g. in a route component `@HostBinding('class') class = 'content-container floating';`
- Update angular from `^13.3.5` to `^14.0.2` automatic migrations are made by ng update and forms use types now.

# [9.0.0](https://github.com/dlr-eoc/ukis-frontend-libraries/tree/v9.0.0) (2022-05-20) (Update dependencies and documentation)
Expand Down
4 changes: 3 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ There are two ways to include libraries in a frontend-project:
}
...
```

- add `frontend-libraries` to `.gitignore` so you do not commit it unintentionally to your code.
- temporarily add all missing dependencies from `frontend-libraries` in your project's package.json (so you have all dependencies installed which the project needs for the transpilation)
- check that the tsconfig file from your project is compatible with that of `frontend-libraries`
### 2nd method: build libraries and project side by side
- compile the library on changes and link the compiled library into the frontend-projects `node_modules/@dlr-eoc` directory.

Expand Down
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ukis-frontend-libraries",
"version": "9.0.0",
"version": "10.0.0-alpha.0",
"license": "Apache-2.0",
"author": "Team UKIS",
"bugs": {
Expand Down Expand Up @@ -43,23 +43,23 @@
"@angular/platform-browser": "^14.1.1",
"@angular/platform-browser-dynamic": "^14.1.1",
"@angular/router": "^14.1.1",
"@cds/core": "~6.1.0",
"@clr/angular": "~13.7.0",
"@clr/icons": "~13.0.2",
"@clr/ui": "~13.7.0",
"@cds/core": "^6.1.0",
"@clr/angular": "^13.7.0",
"@clr/icons": "^13.0.2",
"@clr/ui": "^13.7.0",
"@michaellangbein/jsonix": "3.0.1-SNAPSHOT-3",
"@schematics/angular": "^14.1.1",
"@webcomponents/webcomponentsjs": "^2.5.0",
"delaunator": "^5.0.0",
"luxon": "^2.5.0",
"md5": "^2.2.1",
"ogc-schemas": "^2.6.1",
"ol": "~6.14.1",
"ol": "^6.14.1",
"ol-mapbox-style": "^8.2.1",
"opensearch-browser": "^2.0.0-alpha.5",
"parse5-html-rewriting-stream": "^6.0.1",
"proj4": "^2.8.0",
"rxjs": "~6.6.7",
"rxjs": "^6.6.7",
"three": "^0.137.5",
"tslib": "^2.4.0",
"w3c-schemas": "^1.4.0",
Expand Down Expand Up @@ -93,30 +93,30 @@
"@compodoc/compodoc": "^1.1.19",
"@types/cpx": "^1.5.2",
"@types/geojson": "^7946.0.10",
"@types/jasmine": "~3.6.11",
"@types/jasminewd2": "~2.0.3",
"@types/jasmine": "^3.6.11",
"@types/jasminewd2": "^2.0.3",
"@types/node": "^14.18.23",
"@types/offscreencanvas": "^2019.7.0",
"codelyzer": "^6.0.2",
"cpx": "^1.5.0",
"jasmine": "^3.99.0",
"jasmine-core": "^3.99.1",
"jasmine-spec-reporter": "~5.0.0",
"jasmine-spec-reporter": "^5.0.0",
"jsonc-parser": "^3.1.0",
"karma": "^6.4.0",
"karma-chrome-launcher": "~3.1.1",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.2",
"karma-chrome-launcher": "^3.1.1",
"karma-coverage": "^2.0.3",
"karma-jasmine": "^4.0.2",
"karma-jasmine-html-reporter": "^1.6.0",
"karma-junit-reporter": "^1.2.0",
"minimist": "^1.2.0",
"ng-packagr": "^14.1.0",
"path-browserify": "^1.0.1",
"protractor": "~7.0.0",
"protractor": "^7.0.0",
"terser": "^5.14.2",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.6.4"
"ts-node": "^8.3.0",
"tslint": "^6.1.0",
"typescript": "^4.6.4"
},
"devDependenciesFromProjects": [
"@compodoc/compodoc",
Expand Down
6 changes: 3 additions & 3 deletions projects/core-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ It uses the angular components from Clarity to get a responsive navigation.
### For an application with routes:
Use a basic layout like the following, containing the router-outlet which then shows route components as the Clarity `content-container`.
```
<clr-main-container [ngClass]="{'floating':ui.floating}">
<clr-main-container>
<ukis-global-alert *ngIf="ui.alert" [(alert)]="ui.alert"></ukis-global-alert>
<ukis-global-progress *ngIf="ui.progress" [(progress)]="ui.progress"></ukis-global-progress>
<ukis-header [ukis-title]="title">
Expand All @@ -56,7 +56,7 @@ Use a basic layout like the following, containing the router-outlet which then s
### For an application without routes:
Replace the router-outlet with a view component which also adds the Clarity `content-container` class as HostBinding.
```
<clr-main-container [ngClass]="{'floating':ui.floating}">
<clr-main-container>
<ukis-global-alert *ngIf="ui.alert" [(alert)]="ui.alert"></ukis-global-alert>
<ukis-global-progress *ngIf="ui.progress" [(progress)]="ui.progress"></ukis-global-progress>
<ukis-header [ukis-title]="title">
Expand All @@ -66,7 +66,7 @@ Replace the router-outlet with a view component which also adds the Clarity `con
</clr-main-container>
```

- The css class `floating` on the `main-container` makes the [Clarity Vertical Nav](https://clarity.design/documentation/vertical-nav/collapsible-nav/normal) floating above the `content-container` so it takes less space. For this, however, you have to worry about the placement of the elements in the `content-container` if the `vertical-nav` is expanded.
- A css class `floating` on the `content-container` (which is mostly placed in your route components) makes the [Clarity Vertical Nav](https://clarity.design/documentation/vertical-nav/collapsible-nav/normal) floating above the `content-container` so it takes less space. For this, however, you have to worry about the placement of the elements in the `content-container` if the `vertical-nav` is expanded.
- The `global-alert` and `global-progress` can be activated with their responsible services which you can inject in your components.
- For more doku about the `ukis-header` [see the header README](src/lib/header/README.md)

Expand Down
4 changes: 2 additions & 2 deletions projects/core-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@angular-devkit/core": "0.0.0-PLACEHOLDER-VENDOR",
"@angular-devkit/schematics": "0.0.0-PLACEHOLDER-VENDOR",
"@schematics/angular": "0.0.0-PLACEHOLDER-VENDOR",
"parse5-html-rewriting-stream": "^6.0.1",
"parse5-html-rewriting-stream": "0.0.0-PLACEHOLDER-VENDOR",
"tslib": "0.0.0-PLACEHOLDER-VENDOR"
},
"peerDependencies": {
Expand All @@ -39,7 +39,7 @@
"cpx": "0.0.0-PLACEHOLDER-VENDOR",
"@types/cpx": "0.0.0-PLACEHOLDER-VENDOR",
"typescript": "0.0.0-PLACEHOLDER-VENDOR",
"jasmine": "^2.8.0",
"jasmine": "0.0.0-PLACEHOLDER-VENDOR",
"zone.js": "0.0.0-PLACEHOLDER-VENDOR",
"@angular/platform-browser-dynamic": "0.0.0-PLACEHOLDER-VENDOR",
"@angular-devkit/architect": "0.0.0-PLACEHOLDER-VENDOR"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<clr-main-container [ngClass]="{'floating':ui.floating}">
<clr-main-container>
<ukis-global-alert *ngIf="ui.alert" [(alert)]="ui.alert"></ukis-global-alert>
<ukis-global-progress *ngIf="ui.progress" [(progress)]="ui.progress"></ukis-global-progress>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { Router } from '@angular/router';
import { Subscription } from 'rxjs';

interface IUi {
floating: boolean;
flipped: boolean;
alert: null | IAlert;
progress: null | IProgress;
subs: Subscription[];
Expand All @@ -25,8 +23,6 @@ export class AppComponent {
shortTitle = '';

ui: IUi = {
floating: false,
flipped: false,
alert: null,
progress: null,
subs: []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<clr-main-container [ngClass]="{'floating':ui.floating}">
<clr-main-container>
<ukis-global-alert *ngIf="ui.alert" [(alert)]="ui.alert"></ukis-global-alert>
<ukis-global-progress *ngIf="ui.progress" [(progress)]="ui.progress"></ukis-global-progress>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { ProgressService, IProgress } from './components/global-progress/progres
import { Subscription } from 'rxjs';

interface IUi {
floating: boolean;
flipped: boolean;
alert: null | IAlert;
progress: null | IProgress;
subs: Subscription[];
Expand All @@ -24,8 +22,6 @@ export class AppComponent implements OnDestroy {
shortTitle = '';

ui: IUi = {
floating: false,
flipped: false,
alert: null,
progress: null,
subs: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,39 +95,37 @@

/** floating vertical nav only not mobile -------------------------- */
@media screen and (min-width: 768px) {
.floating {
.content-container {
display: block;
position: relative;

.content-area {
position: absolute;
width: 100%;
height: 100%;
}
.content-container.floating {
display: block;
position: relative;

.content-area {
position: absolute;
width: 100%;
height: 100%;
}

.clr-vertical-nav.right {
position: absolute;
margin: 0.5rem;
max-height: calc(100% - 2.5rem); //0.5 for map-controls
left: auto;
right: 0;
}
.clr-vertical-nav.right {
position: absolute;
margin: 0.5rem;
max-height: calc(100% - 2.5rem); //0.5 for map-controls
left: auto;
right: 0;
}

.clr-vertical-nav {
position: absolute;
margin: 0.5rem;
max-height: calc(100% - 2.5rem); //0.5 for map-controls
left: 0;
}
.clr-vertical-nav {
position: absolute;
margin: 0.5rem;
max-height: calc(100% - 2.5rem); //0.5 for map-controls
left: 0;
}

nav.sidenav {
position: absolute;
//right: 0;
left: 0;
height: calc(100vh - (24px * 2.5));
background: var(--clr-vertical-nav-bg-color, --fallback-color-no-clr);
}
nav.sidenav {
position: absolute;
//right: 0;
left: 0;
height: calc(100vh - (24px * 2.5));
background: var(--clr-vertical-nav-bg-color, --fallback-color-no-clr);
}
}
}
2 changes: 1 addition & 1 deletion projects/core-ui/src/lib/header/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For examples [see demo maps](../demo-maps/README.md)

#### in the app.component.html
```
<clr-main-container [ngClass]="{'floating':ui.floating}">
<clr-main-container>
...
<ukis-header [ukis-title]="title">
<a class="nav-link nav-text header-nav-el" routerLink="/{{route.path}}" routerLinkActive="active">{{route.data.title}}</a>
Expand Down
2 changes: 1 addition & 1 deletion projects/demo-auth/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<clr-main-container [ngClass]="{'floating':ui.floating}">
<clr-main-container>
<ukis-global-alert *ngIf="ui.alert" [(alert)]="ui.alert"></ukis-global-alert>
<ukis-global-progress *ngIf="ui.progress" [(progress)]="ui.progress"></ukis-global-progress>
<ukis-cookie-alert [alert-text]="'my alert text'" [privacy-link]="'link to privacy'"></ukis-cookie-alert>
Expand Down
Loading