Skip to content

Commit

Permalink
Merge branch main into feature/packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
dopenguin committed Jul 5, 2024
2 parents d58dc09 + b42cbf6 commit 6efc4c4
Show file tree
Hide file tree
Showing 130 changed files with 10,527 additions and 7,076 deletions.
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config: Config.InitialOptions = {
},
testEnvironment: 'jsdom',
transform: {
'^[^.]+.vue$': 'vue-jest',
'^[^.]+.vue$': '@vue/vue2-jest',
'^.+\\.tsx?$': 'ts-jest',
'^.*\\.js$': 'babel-jest',
},
Expand Down
13,675 changes: 7,170 additions & 6,505 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"snowbox": "concurrently \"nx dev @polar/client-snowbox\" \"npm:nx:watch\"",
"snowbox:build": "nx build @polar/client-snowbox",
"snowbox:build:serve": "http-server packages/clients/snowbox -o /dist/index.html",
"textLocator:build": "lerna run build --scope @polar/client-text-locator --stream",
"textLocator:build:serve": "http-server ./packages/clients/textLocator -o /dist/index.html",
"textLocator:dev": "cd packages/clients/textLocator/ && vite --host",
"pages:build": "rimraf ./pages/docs && npm run generic:build && bash ./scripts/buildPages.sh",
"pages:build:serve": "http-server pages -o index.html",
"clean": "nx reset && rimraf --glob packages/**/{.cache,dist,docs} && rimraf --glob {.cache,dist} && node ./scripts/clean",
Expand All @@ -37,6 +40,7 @@
"docs:meldemichel": "node ./scripts/makeDocs ./packages/clients/meldemichel && npm run meldemichel:build && cp -r ./packages/clients/meldemichel/dist ./packages/clients/meldemichel/example ./packages/clients/meldemichel/docs",
"docs:sbom": "npx @cyclonedx/cyclonedx-npm --output-file sbom.json",
"docs:snowbox": "node ./scripts/makeDocs ./packages/clients/snowbox",
"docs:textLocator": "node ./scripts/makeDocs ./packages/clients/textLocator && npm run textLocator:build && cp -r ./packages/clients/textLocator/dist ./packages/clients/textLocator/docs",
"nx:watch": "nx watch --all -- nx bundle %NX_PROJECT_NAME%",
"lint": "npx eslint . --cache --ext .js,.ts,.vue",
"lint:ci": "npx eslint . --ext .js,.ts,.vue",
Expand Down Expand Up @@ -66,6 +70,7 @@
"@typescript-eslint/eslint-plugin": "^5.9.0",
"@typescript-eslint/parser": "^5.9.0",
"@vitejs/plugin-vue2": "^2.2.0",
"@vue/vue2-jest": "^28.1.0",
"@vue/test-utils": "^1.2.2",
"babel-core": "^7.0.0-bridge.0",
"cesium": "^1.62.0",
Expand Down Expand Up @@ -106,7 +111,6 @@
"typescript": "^5.3.3",
"vite": "^5.1.3",
"vite-plugin-commonjs": "^0.6.2",
"vue-jest": "^3.0.7",
"vue-template-compiler": "^2.7.16"
}
}
2 changes: 2 additions & 0 deletions packages/clients/afm/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This is a default compilation of POLAR feature packages for online services. This document and its child documents describe the setup.

For all additional details, check the [full documentation](https://dataport.github.io/polar/docs/afm/client-afm.html).

## Requirements

To understand this document, programming knowledge (preferably in JavaScript) are required. This is a technical document describing how to integrate the map client with its programmatic API.
Expand Down
8 changes: 3 additions & 5 deletions packages/clients/dish/src/plugins/Gfi/ActionButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@

<script lang="ts">
import Vue from 'vue'
import { mapGetters } from 'vuex'
export default Vue.extend({
name: 'DishActionButton',
props: {
exportProperty: {
type: String,
default: '',
},
computed: {
...mapGetters('plugin/gfi', ['exportProperty']),
},
})
</script>
Expand Down
23 changes: 4 additions & 19 deletions packages/clients/dish/src/plugins/Gfi/Content.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<v-card class="dish-gfi-content">
<v-card-actions v-if="!hasWindowSize || !hasSmallWidth">
<ActionButton :export-property="exportProperty"></ActionButton>
<ActionButton></ActionButton>
<v-spacer></v-spacer>
<v-btn
icon
Expand Down Expand Up @@ -91,8 +91,7 @@
</template>

<script lang="ts">
import Vue, { PropType } from 'vue'
import { GeoJsonProperties } from 'geojson'
import Vue from 'vue'
import { mapActions, mapMutations, mapGetters } from 'vuex'
import ActionButton from './ActionButton.vue'
Expand All @@ -101,20 +100,6 @@ type GfiIndexStep = -1 | 1
export default Vue.extend({
name: 'DishGfiContent',
components: { ActionButton },
props: {
currentProperties: {
type: Object as PropType<GeoJsonProperties>,
required: true,
},
clientWidth: {
type: Number,
required: true,
},
exportProperty: {
type: String,
default: '',
},
},
data: () => ({
infoFields: [
'Kreis',
Expand All @@ -127,8 +112,9 @@ export default Vue.extend({
sachgesamtheitOpen: false,
}),
computed: {
...mapGetters(['hasSmallWidth', 'hasWindowSize']),
...mapGetters(['clientWidth', 'hasSmallWidth', 'hasWindowSize']),
...mapGetters('plugin/gfi', [
'currentProperties',
'imageLoaded',
'visibleWindowFeatureIndex',
'windowFeatures',
Expand Down Expand Up @@ -173,7 +159,6 @@ export default Vue.extend({
if (this.hasWindowSize && this.hasSmallWidth) {
this.setMoveHandleActionButton({
component: ActionButton,
props: { exportProperty: this.exportProperty },
})
}
},
Expand Down
6 changes: 4 additions & 2 deletions packages/clients/generic/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ For all additional details, check the [full documentation](https://dataport.gith

For the development test deployments and example configurations, [see here](https://dataport.github.io/polar#plugin-gallery).

For a minimum working example, [see here](https://github.com/dopenguin/polar-fossgis-2024).

## Basic usage

The NPM package `@polar/client-generic` can be installed via NPM or downloaded from the [release page](https://github.com/Dataport/polar/releases). When using `import mapClient from '@polar/client-generic'`, the object `mapClient` contains a method `createMap`. This is the main method required to get the client up and running. Should you use another import method, check the package's `dist` folder for available files.
Expand All @@ -15,8 +17,8 @@ The method expects a single object with the following parameters.
| fieldName | type | description |
| - | - | - |
| containerId | string | ID of the container the map is supposed to render itself to. |
| services | object[] \| string | Either a link to a service registry or an array containing service description objects. For more details, see the startup section on [POLAR documentation](https://dataport.github.io/polar/documentation.html#configuration). |
| mapConfiguration | object | See full documentation for all possible configuration options. |
| services | object[] \| string | Either a link to a service registry or an array containing service description objects. For more details, see the startup section on [POLAR documentation](https://dataport.github.io/polar/documentation.html#configuration). This parameter can be seen as an accessible version of `mapConfiguration.layerConf`. |
| mapConfiguration | object | See [documentation of `@polar/core`](https://dataport.github.io/polar/docs/generic/core.html) for all possible configuration options. |
| enabledPlugins | string[]? | This is a client-specific field. Since the `@polar/client-generic` client contains all existing plugins, they are activated by strings. The strings match their package names: `'address-search' \| 'attributions' \| 'draw'* \| 'export' \| 'filter'* \| 'fullscreen'* \| 'geo-location'* \| 'gfi'* \| 'icon-menu' \| 'layer-chooser'* \| 'legend' \| 'loading-indicator' \| 'pins' \| 'reverse-geocoder' \| 'scale' \| 'toast' \| 'zoom'*`. The plugins marked with * are nested in the `'icon-menu'` in this pre-layouting, hence they depend upon it being active, too. |
| modifyLayerConfiguration | ((layerConf: object[]) => object[])? | Defaults to identity function. This function is applied to the loaded layer configuration before usage. That is, the `services` can be modified by this to e.g. set parameters not supported by the service register, add additional layers, and so on. |

Expand Down
11 changes: 11 additions & 0 deletions packages/clients/meldemichel/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@

- Chore: Import newly exposed style paths of `@polar/core` as well as all plugin packages.

## 1.1.2

- Chore: Fix bugs via dependency updates.
- resolve filter bugs for features of unknown filter categories; they were sometimes visible

## 1.1.1

- Chore: Fix bugs via dependency updates.
- restore Safari 15 compatibility
- resolve time filter bugs where selected time frame was applied incorrectly

## 1.1.0

- Change: The search now no longer focuses on the first result after a successful search.
Expand Down
6 changes: 3 additions & 3 deletions packages/clients/meldemichel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polar/client-meldemichel",
"version": "1.1.0",
"version": "1.1.2",
"description": "Client Meldemichel",
"license": "EUPL-1.2",
"type": "module",
Expand Down Expand Up @@ -29,9 +29,9 @@
"@polar/lib-invisible-style": "1.1.0-alpha.1",
"@polar/plugin-address-search": "^1.2.1",
"@polar/plugin-attributions": "^1.1.0",
"@polar/plugin-filter": "^1.0.0",
"@polar/plugin-filter": "^1.1.2",
"@polar/plugin-fullscreen": "^1.1.0",
"@polar/plugin-geo-location": "^1.2.0",
"@polar/plugin-geo-location": "^1.3.1",
"@polar/plugin-gfi": "^1.1.0",
"@polar/plugin-icon-menu": "^1.1.0",
"@polar/plugin-layer-chooser": "^1.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/clients/meldemichel/src/mapConfigurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
PinsConfiguration,
ReverseGeocoderConfiguration,
} from '@polar/lib-custom-types'
import { MpApiParameters } from '@polar/plugin-address-search/src/types'
import { MODE, SKAT, REPORT_STATUS } from './enums'
import language from './language'
import { MeldemichelCreateMapParams } from './types'
Expand Down Expand Up @@ -88,12 +89,11 @@ const commonAttributions: Partial<AttributionsConfiguration> = {
const addressSearch: AddressSearchConfiguration = {
searchMethods: [
{
// @ts-expect-error | missing field "epsg" filled later in process
queryParameters: {
searchAddress: true,
searchStreets: true,
searchHouseNumbers: true,
},
} as MpApiParameters,
type: 'mpapi',
url: 'https://geodienste.hamburg.de/HH_WFS_GAGES?service=WFS&request=GetFeature&version=2.0.0',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,11 @@ export default Vue.extend({
name: 'MeldemichelGfiFeatureActionButtons',
computed: {
...mapGetters('plugin/gfi', [
'showSwitchButtons',
'visibleWindowFeatureIndex',
'windowFeatures',
]),
...mapGetters(['hasSmallWidth', 'hasWindowSize']),
/** only show switch buttons if multiple property sets are available */
showSwitchButtons(): boolean {
return this.windowFeatures.length > 1
},
showSmall(): boolean {
return !this.hasWindowSize || !this.hasSmallWidth
},
Expand Down
15 changes: 1 addition & 14 deletions packages/clients/meldemichel/src/plugins/Gfi/Feature.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,20 @@
<script lang="ts">
import Vue from 'vue'
import { mapActions, mapGetters, mapMutations } from 'vuex'
import { GeoJsonProperties } from 'geojson'
import ActionButtons from './ActionButtons.vue'
export default Vue.extend({
name: 'MeldemichelGfiFeature',
components: {
ActionButtons,
},
props: {
clientWidth: {
type: Number,
required: true,
},
exportProperty: {
type: String,
default: '',
},
},
data: () => ({
infoFields: ['skat', 'start', 'statu'],
}),
computed: {
...mapGetters(['hasSmallWidth', 'hasWindowSize']),
...mapGetters('plugin/gfi', [
'currentProperties',
'imageLoaded',
'visibleWindowFeatureIndex',
'windowFeatures',
Expand All @@ -81,9 +71,6 @@ export default Vue.extend({
displayImage(): boolean {
return this.currentProperties.pic
},
currentProperties(): GeoJsonProperties {
return { ...this.windowFeatures[this.visibleWindowFeatureIndex] }
},
},
watch: {
currentProperties(newProps: object) {
Expand Down
2 changes: 2 additions & 0 deletions packages/clients/snowbox/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
This is an API file that is used as part of the generated documentation. It will appear as main document in the snowbox's documentation.

If the snowbox implemented any own features that are not derived from either core of plugins, this would be the place to document them. However, since that's not the case, it only features this introduction text and the link list below.

For all additional details, check the [full documentation](https://dataport.github.io/polar/docs/snowbox/client-snowbox.html).
1 change: 0 additions & 1 deletion packages/clients/snowbox/src/addPlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export const addPlugins = (core) => {
),
Legend({
displayComponent: true,
maxWidth: 500,
layoutTag: NineLayoutTag.BOTTOM_RIGHT,
}),
Scale(
Expand Down
7 changes: 7 additions & 0 deletions packages/clients/textLocator/API.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# TextLocator MapClient API 🗺️ `@polar/client-text-locator`

There is no API to this package; it is not configurable, but delivers a hostable website containing the client in question. All reconfiguration must be done in the source code and requires a new build.

When configuring before building, please mind that the `index.html` in the source folder contains configuration parameters that are later bundled.

For all additional details, check the [full documentation](https://dataport.github.io/polar/docs/textLocator/client-textLocator.html).
5 changes: 5 additions & 0 deletions packages/clients/textLocator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CHANGELOG

## unpublished

Initial release.
Loading

0 comments on commit 6efc4c4

Please sign in to comment.