Skip to content

Commit

Permalink
Merge branch 'main' into update/masterportalapi
Browse files Browse the repository at this point in the history
  • Loading branch information
dopenguin authored Aug 1, 2024
2 parents 6c92de4 + 4a5733f commit e319823
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 12 deletions.
1 change: 1 addition & 0 deletions packages/clients/afm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Feature: This client now supports the `@polar/core`'s field `stylePath`. The usage is documented in the API.md file.
- Feature: Update icon of `layerChooser` in `iconMenu` to `fa-layer-group` to clear-up the content hidden behind the menu button.
- Chore: Change value of `pins.movable` configuration to `'drag'` as using a boolean has been deprecated in a future release.

## 1.0.1

Expand Down
2 changes: 1 addition & 1 deletion packages/clients/afm/example/polar-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const mapConfiguration = {
},
pins: {
toZoomLevel: 9,
movable: true,
movable: 'drag',
appearOnClick: {
show: true,
atZoomLevel: 3,
Expand Down
1 change: 1 addition & 0 deletions packages/clients/dish/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## unpublished

- Feature: If a user is geolocated outside of the map's extent, the client will inform the user of why geolocation did not take effect via a textbox.
- Chore: Change value of `pins.movable` configuration to `'drag'` as using a boolean has been deprecated in a future release.

## 1.1.1

Expand Down
2 changes: 1 addition & 1 deletion packages/clients/dish/src/mapConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export const mapConfiguration = {
},
pins: {
toZoomLevel: 7,
movable: true,
movable: 'drag',
style: {
fill: shBlue,
},
Expand Down
4 changes: 4 additions & 0 deletions packages/clients/meldemichel/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## unpublished

- Chore: Change value of `pins.movable` configuration to `'drag'` as using a boolean has been deprecated in a future release.

## 1.1.2

- Chore: Fix bugs via dependency updates.
Expand Down
2 changes: 1 addition & 1 deletion packages/clients/meldemichel/src/mapConfigurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const addressSearch: AddressSearchConfiguration = {

const commonPins: Partial<PinsConfiguration> = {
toZoomLevel: 7,
movable: true,
movable: 'drag',
style: {
fill: hamburgRed,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/clients/snowbox/src/mapConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const mapConfiguration = {
pins: {
boundaryLayerId: hamburgBorder,
toZoomLevel: 9,
movable: true,
movable: 'drag',
appearOnClick: {
show: true,
atZoomLevel: 0,
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/Attributions/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## unpublished

- Feature: Add new option `'footer'` to configuration parameter `renderType` that changes the attributions to be displayed as a small version of the information box that is always visible.
- Refactor: Replace redundant props with computed properties.

## 1.2.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<template>
<v-scroll-x-reverse-transition>
<v-card dense filled :width="width" :color="color" :max-width="maxWidth">
<v-card-title>
<v-card
:class="renderType === 'footer' ? 'polar-plugin-attributions-footer' : ''"
dense
filled
:width="width"
:color="color"
:max-width="maxWidth"
>
<v-card-title v-if="renderType !== 'footer'">
{{ $t('common:plugins.attributions.title') }}
</v-card-title>
<!-- NOTE: The usage of v-html is considered unsafe as it
Expand Down Expand Up @@ -48,7 +55,9 @@ export default Vue.extend({
return this.renderType === 'independent'
},
color() {
return this.renderIndependently ? '#ffffffdd' : ''
return this.renderType === 'independent' || this.renderType === 'footer'
? '#ffffffdd'
: ''
},
maxWidth() {
return this.renderIndependently
Expand Down Expand Up @@ -76,4 +85,13 @@ export default Vue.extend({
})
</script>

<style scoped lang="scss"></style>
<style scoped lang="scss">
.polar-plugin-attributions-footer {
margin: 4px;
}
.polar-plugin-attributions-footer .v-card__text {
font-size: 0.8rem;
padding: 2px;
line-height: 1.1;
}
</style>
2 changes: 1 addition & 1 deletion packages/plugins/Attributions/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface AttributionsGetters extends AttributionsState {
listenToChanges: string[]
mapInfo: string[]
initiallyOpen: boolean
renderType: 'independent' | 'iconMenu'
renderType: 'independent' | 'iconMenu' | 'footer'
staticAttributions: string[]
windowWidth: number
}
1 change: 1 addition & 0 deletions packages/plugins/Export/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Fix: PDF export with download:false now works correctly.
- Fix: Adjust documentation to properly describe optionality of configuration parameters.
- Fix: Disable map interactions during the export process so potential interaction features won't be exported.
- Chore: Update dependencies to latest versions.

## 1.2.0
Expand Down
8 changes: 8 additions & 0 deletions packages/plugins/Export/src/store/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const actions: PolarActionTree<ExportState, ExportGetters> = {
// Screenshot canvas
const CANVAS_ID = 'export-canvas'

map.getInteractions().forEach((interaction) => {
interaction.setActive(false)
})

map.once('postrender', function () {

Check warning on line 32 in packages/plugins/Export/src/store/actions.ts

View workflow job for this annotation

GitHub Actions / lint-test

Function has too many lines (83). Maximum allowed is 50
// Map properties
const size = map.getSize()
Expand Down Expand Up @@ -102,6 +106,10 @@ const actions: PolarActionTree<ExportState, ExportGetters> = {
}
}

map.getInteractions().forEach((interaction) => {
interaction.setActive(true)
})

commit('setExportedMap', src)
})
map.renderSync()
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/Pins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The usage of `displayComponent` has no influence on the creation of Pins on the
| boundaryOnError | ('strict' \| 'permissive')? | If the boundary layer check does not work due to loading or configuration errors, style `'strict'` will disable the pins feature, and style `'permissive'` will act as if no boundaryLayerId was set. Defaults to `'permissive'`. |
| coordinateSource | string? | The pins plugin may react to changes in other plugins. This specifies the path to such store positions. The position must, when subscribed to, return a GeoJSON feature. Please mind that, when referencing another plugin, that plugin must be in `addPlugins` before this one. |
| initial | initial? | Configuration options for setting an initial pin. |
| movable | boolean? \| 'drag' \| 'click' \| 'none' | Whether a user may drag and re-click the pin (`drag` or `true`), only re-click it (`click`) or may only be placed programmatically (`none` or `false`). Defaults to 'none'. **Using a boolean for this configuration has been deprecated and will be removed in the next major release.** |
| movable | boolean \| 'drag' \| 'click' \| 'none'? | Whether a user may drag and re-click the pin (`drag` or `true`), only re-click it (`click`) or may only be placed programmatically (`none` or `false`). Defaults to 'none'. **Using a boolean for this configuration has been deprecated and will be removed in the next major release.** |
| style | style? | Display style configuration. |
| toastAction | string? | If `boundaryLayerId` is set, and the pin is moved or created outside the boundary, this string will be used as action to send a toast information to the user. If no toast information is desired, leave this field undefined; for testing purposes, you can still find information in the console. |
| toZoomLevel | number? | Zoom level to use on outside input by e.g. address search. Defaults to `0`. |
Expand Down
1 change: 1 addition & 0 deletions packages/types/custom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Feature: Add `afterResultComponent` to `AddressSearchConfiguration` for custom search result suffixes.
- Feature: Add `mapHasDimensions` to `CoreState` and `CoreGetters`.
- Feature: Add new getter `deviceIsHorizontal` to `CoreGetters`.
- Feature: Add `footer` to `RenderType` as an option to display attributions in a footer.
- Fix: Add `string` as option for `SearchType` since arbitrary strings can be registered.
- Fix: Remove unused parameters `proxyUrl` and `loadingStrategy` from `LayerConfigurationOptions`.
- Fix: Properly document optional parameters of interfaces `AddressSearchConfiguration`, `FeatureList`, `FilterConfigurationTime`, `FilterConfigurationTimeOption`, `GeoLocationConfiguration`, `LayerConfigurationOptionLayers` and `PinsConfiguration`
Expand Down
2 changes: 1 addition & 1 deletion packages/types/custom/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface PluginOptions {
layoutTag?: string // TODO: Might it be useful to move declaration of NineLayoutTag here?
}

export type RenderType = 'iconMenu' | 'independent'
export type RenderType = 'iconMenu' | 'independent' | 'footer'

/** Possible search methods by type */
export type SearchType = 'bkg' | 'gazetteer' | 'wfs' | 'mpapi' | string
Expand Down
2 changes: 1 addition & 1 deletion pages/examples/address.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
pins: {
coordinateSource: 'plugin/addressSearch/chosenAddress',
toZoomLevel: 7,
movable: true,
movable: 'drag',
},
reverseGeocoder: {
url: 'https://geodienste.hamburg.de/HH_WPS',
Expand Down

0 comments on commit e319823

Please sign in to comment.