Skip to content

Commit 98f96ac

Browse files
authored
Merge pull request #131 from Dataport/fix/remove-unused-props-and-attributes
Fix/remove unused props and attributes
2 parents 5e73c1a + cb5febc commit 98f96ac

File tree

62 files changed

+391
-474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+391
-474
lines changed

packages/clients/dish/src/plugins/Gfi/ActionButton.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@
1717

1818
<script lang="ts">
1919
import Vue from 'vue'
20+
import { mapGetters } from 'vuex'
2021
2122
export default Vue.extend({
2223
name: 'DishActionButton',
23-
props: {
24-
exportProperty: {
25-
type: String,
26-
default: '',
27-
},
24+
computed: {
25+
...mapGetters('plugin/gfi', ['exportProperty']),
2826
},
2927
})
3028
</script>

packages/clients/dish/src/plugins/Gfi/Content.vue

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<v-card class="dish-gfi-content">
33
<v-card-actions v-if="!hasWindowSize || !hasSmallWidth">
4-
<ActionButton :export-property="exportProperty"></ActionButton>
4+
<ActionButton></ActionButton>
55
<v-spacer></v-spacer>
66
<v-btn
77
icon
@@ -91,8 +91,7 @@
9191
</template>
9292

9393
<script lang="ts">
94-
import Vue, { PropType } from 'vue'
95-
import { GeoJsonProperties } from 'geojson'
94+
import Vue from 'vue'
9695
import { mapActions, mapMutations, mapGetters } from 'vuex'
9796
import ActionButton from './ActionButton.vue'
9897
@@ -101,20 +100,6 @@ type GfiIndexStep = -1 | 1
101100
export default Vue.extend({
102101
name: 'DishGfiContent',
103102
components: { ActionButton },
104-
props: {
105-
currentProperties: {
106-
type: Object as PropType<GeoJsonProperties>,
107-
required: true,
108-
},
109-
clientWidth: {
110-
type: Number,
111-
required: true,
112-
},
113-
exportProperty: {
114-
type: String,
115-
default: '',
116-
},
117-
},
118103
data: () => ({
119104
infoFields: [
120105
'Kreis',
@@ -127,8 +112,9 @@ export default Vue.extend({
127112
sachgesamtheitOpen: false,
128113
}),
129114
computed: {
130-
...mapGetters(['hasSmallWidth', 'hasWindowSize']),
115+
...mapGetters(['clientWidth', 'hasSmallWidth', 'hasWindowSize']),
131116
...mapGetters('plugin/gfi', [
117+
'currentProperties',
132118
'imageLoaded',
133119
'visibleWindowFeatureIndex',
134120
'windowFeatures',
@@ -173,7 +159,6 @@ export default Vue.extend({
173159
if (this.hasWindowSize && this.hasSmallWidth) {
174160
this.setMoveHandleActionButton({
175161
component: ActionButton,
176-
props: { exportProperty: this.exportProperty },
177162
})
178163
}
179164
},

packages/clients/meldemichel/src/mapConfigurations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
PinsConfiguration,
1010
ReverseGeocoderConfiguration,
1111
} from '@polar/lib-custom-types'
12+
import { MpApiParameters } from '@polar/plugin-address-search/src/types'
1213
import { MODE, SKAT, REPORT_STATUS } from './enums'
1314
import language from './language'
1415
import { MeldemichelCreateMapParams } from './types'
@@ -88,12 +89,11 @@ const commonAttributions: Partial<AttributionsConfiguration> = {
8889
const addressSearch: AddressSearchConfiguration = {
8990
searchMethods: [
9091
{
91-
// @ts-expect-error | missing field "epsg" filled later in process
9292
queryParameters: {
9393
searchAddress: true,
9494
searchStreets: true,
9595
searchHouseNumbers: true,
96-
},
96+
} as MpApiParameters,
9797
type: 'mpapi',
9898
url: 'https://geodienste.hamburg.de/HH_WFS_GAGES?service=WFS&request=GetFeature&version=2.0.0',
9999
},

packages/clients/meldemichel/src/plugins/Gfi/ActionButtons.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,11 @@ export default Vue.extend({
2929
name: 'MeldemichelGfiFeatureActionButtons',
3030
computed: {
3131
...mapGetters('plugin/gfi', [
32+
'showSwitchButtons',
3233
'visibleWindowFeatureIndex',
3334
'windowFeatures',
3435
]),
3536
...mapGetters(['hasSmallWidth', 'hasWindowSize']),
36-
/** only show switch buttons if multiple property sets are available */
37-
showSwitchButtons(): boolean {
38-
return this.windowFeatures.length > 1
39-
},
4037
showSmall(): boolean {
4138
return !this.hasWindowSize || !this.hasSmallWidth
4239
},

packages/clients/meldemichel/src/plugins/Gfi/Feature.vue

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,20 @@
4949
<script lang="ts">
5050
import Vue from 'vue'
5151
import { mapActions, mapGetters, mapMutations } from 'vuex'
52-
import { GeoJsonProperties } from 'geojson'
5352
import ActionButtons from './ActionButtons.vue'
5453
5554
export default Vue.extend({
5655
name: 'MeldemichelGfiFeature',
5756
components: {
5857
ActionButtons,
5958
},
60-
props: {
61-
clientWidth: {
62-
type: Number,
63-
required: true,
64-
},
65-
exportProperty: {
66-
type: String,
67-
default: '',
68-
},
69-
},
7059
data: () => ({
7160
infoFields: ['skat', 'start', 'statu'],
7261
}),
7362
computed: {
7463
...mapGetters(['hasSmallWidth', 'hasWindowSize']),
7564
...mapGetters('plugin/gfi', [
65+
'currentProperties',
7666
'imageLoaded',
7767
'visibleWindowFeatureIndex',
7868
'windowFeatures',
@@ -81,9 +71,6 @@ export default Vue.extend({
8171
displayImage(): boolean {
8272
return this.currentProperties.pic
8373
},
84-
currentProperties(): GeoJsonProperties {
85-
return { ...this.windowFeatures[this.visibleWindowFeatureIndex] }
86-
},
8774
},
8875
watch: {
8976
currentProperties(newProps: object) {

packages/clients/snowbox/src/addPlugins.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export const addPlugins = (core) => {
9090
),
9191
Legend({
9292
displayComponent: true,
93-
maxWidth: 500,
9493
layoutTag: NineLayoutTag.BOTTOM_RIGHT,
9594
}),
9695
Scale(

packages/components/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## unpublished
4+
5+
- Feature: Use newly added store parameter `deviceIsHorizontal` in place of computed value `isHorizontal`.
6+
37
## 2.1.1
48

59
- Fix: The GFI's new flag `userInteraction` on the close interaction is now filled and forwarded according to whether the close call was due to the user intentionally closing the GFI rather than opening a new GFI. This is required for a fix in the GFI plugin.

packages/components/MoveHandle.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ export default Vue.extend({
7474
timeoutReference: 0,
7575
}),
7676
computed: {
77-
...mapGetters(['hasSmallHeight', 'hasWindowSize']),
78-
isHorizontal() {
79-
return this.hasSmallHeight && this.hasWindowSize
80-
},
77+
...mapGetters(['deviceIsHorizontal', 'hasSmallHeight', 'hasWindowSize']),
8178
moveEventNames(): MoveEventNames {
8279
return this.touchDevice
8380
? { move: 'touchmove', end: 'touchend' }
@@ -86,7 +83,7 @@ export default Vue.extend({
8683
},
8784
watch: {
8885
// Fixes an issue if the orientation of a mobile device is changed while a plugin is open
89-
isHorizontal(newVal: boolean) {
86+
deviceIsHorizontal(newVal: boolean) {
9087
if (!newVal) {
9188
this.updateMaxHeight()
9289
}

packages/core/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## unpublished
44

55
- Feature: Add new state parameter `mapHasDimensions` to let plugins have a "hook" to react on when the map is ready.
6+
- Feature: Add `deviceIsHorizontal` as a getter to have a more central place to check if the device is in landscape mode.
7+
- Fix: Adjust documentation to properly describe optionality of configuration parameters.
68

79
## 1.4.1
810

packages/core/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ The mapConfiguration allows controlling many client instance details.
7272
| fieldName | type | description |
7373
| --------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
7474
| layerConf | LayerConf | Layer configuration as required by masterportalAPI. |
75-
| language | enum["de", "en"] | Initial language. Live changes not yet implemented, waiting for requirement. |
75+
| language | enum["de", "en"] | Initial language. |
7676
| <...masterportalAPI.fields> | various | The object is also used to initialize the masterportalAPI. Please refer to their documentation for options. |
77-
| <plugin.fields> | various | Many plugins added with `addPlugin` may respect additional configuration. Please see the respective plugin documentations. Global plugin parameters are described below. |
78-
| locales | LanguageOption[] | All locales in POLAR's plugins can be overridden to fit your needs.|
79-
| vuetify | object | You may add vuetify configuration here. |
77+
| <plugin.fields> | various? | Many plugins added with `addPlugin` may respect additional configuration. Please see the respective plugin documentations. Global plugin parameters are described below. |
78+
| locales | LanguageOption[]? | All locales in POLAR's plugins can be overridden to fit your needs.|
79+
| vuetify | object? | You may add vuetify configuration here. |
8080
| extendedMasterportalapiMarkers | extendedMasterportalapiMarkers? | Optional. If set, all configured visible vector layers' features can be hovered and selected by mouseover and click respectively. They are available as features in the store. Layers with `clusterDistance` will be clustered to a multi-marker that supports the same features. Please mind that this only works properly if you configure nothing but point marker vector layers styled by the masterportalAPI. |
8181
| stylePath | string? | If no link tag with `data-polar="true"` is found in the document, this path will be used to create the link node in the client itself. It defaults to `'./style.css'`. Please mind that `data-polar="true"` is deprecated since it potentially led to flashes of misstyled content. stylePath will replace that solution in the next major release. |
8282
| renderFaToLightDom | boolean? | POLAR requires FontAwesome in the Light/Root DOM due to an [unfixed bug in many browsers](https://bugs.chromium.org/p/chromium/issues/detail?id=336876). This value defaults to `true`. POLAR will, by default, just add the required CSS by itself. Should you have a version of Fontawesome already included, you can try to set this to `false` to check whether the versions are interoperable. |
@@ -213,7 +213,7 @@ Most plugins honor this additional field.
213213

214214
| fieldName | type | description |
215215
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
216-
| displayComponent | boolean | Optional field that allows hiding UI elements from the user. The store will still be initialized, allowing you to add your own UI elements and control the plugin's functionality via the Store. This may or may not make sense, depending on the plugin. |
216+
| displayComponent | boolean? | Optional field that allows hiding UI elements from the user. The store will still be initialized, allowing you to add your own UI elements and control the plugin's functionality via the Store. This may or may not make sense, depending on the plugin. Defaults to `false` , meaning the default UI is hidden. |
217217

218218
##### mapConfiguration.vuetify
219219

0 commit comments

Comments
 (0)