@dative-gpi/foundation-shared-components 0.0.190 → 0.0.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1098,14 +1098,9 @@ export default defineComponent({
|
|
|
1098
1098
|
emit("click:row", row.item);
|
|
1099
1099
|
}
|
|
1100
1100
|
},
|
|
1101
|
-
mobile: (event:
|
|
1101
|
+
mobile: (event: any, item: any) => {
|
|
1102
1102
|
if (props.itemTo && router) {
|
|
1103
|
-
|
|
1104
|
-
window.open(router.resolve(props.itemTo(item)).href, "_blank");
|
|
1105
|
-
}
|
|
1106
|
-
else {
|
|
1107
|
-
router.push(props.itemTo(item));
|
|
1108
|
-
}
|
|
1103
|
+
router.push(props.itemTo(item));
|
|
1109
1104
|
}
|
|
1110
1105
|
else {
|
|
1111
1106
|
emit("click:row", item);
|
package/components/map/FSMap.vue
CHANGED
|
@@ -97,25 +97,22 @@
|
|
|
97
97
|
import { computed, defineComponent, onMounted, type PropType, ref, watch } from "vue";
|
|
98
98
|
import { v4 as uuidv4 } from "uuid";
|
|
99
99
|
|
|
100
|
-
import { MarkerClusterGroup } from
|
|
101
|
-
import * as L from
|
|
102
|
-
|
|
103
|
-
import { useAddress } from "../../composables/useAddress";
|
|
104
|
-
|
|
105
|
-
import FSMapEditPointAddressOverlay from "./FSMapEditPointAddressOverlay.vue";
|
|
106
|
-
import FSButton from '../FSButton.vue';
|
|
107
|
-
import FSCard from '../FSCard.vue';
|
|
108
|
-
import FSChip from '../FSChip.vue';
|
|
109
|
-
import FSCol from '../FSCol.vue';
|
|
110
|
-
import FSRow from '../FSRow.vue';
|
|
111
|
-
|
|
100
|
+
import { MarkerClusterGroup } from "leaflet.markercluster";
|
|
101
|
+
import * as L from "leaflet";
|
|
112
102
|
|
|
113
103
|
import { type Address, type SiteInfos } from '@dative-gpi/foundation-shared-domain/models';
|
|
114
|
-
import { type LocationInfos } from '@dative-gpi/foundation-shared-domain/models';
|
|
115
104
|
|
|
116
|
-
import { ColorEnum, type MapLayer } from "../../models";
|
|
105
|
+
import { ColorEnum, type FSLocation, type MapLayer } from "../../models";
|
|
106
|
+
import { useAddress } from "../../composables/useAddress";
|
|
117
107
|
import { useColors } from "../../composables";
|
|
118
108
|
|
|
109
|
+
import FSMapEditPointAddressOverlay from "./FSMapEditPointAddressOverlay.vue";
|
|
110
|
+
import FSButton from "../FSButton.vue";
|
|
111
|
+
import FSCard from "../FSCard.vue";
|
|
112
|
+
import FSChip from "../FSChip.vue";
|
|
113
|
+
import FSCol from "../FSCol.vue";
|
|
114
|
+
import FSRow from "../FSRow.vue";
|
|
115
|
+
|
|
119
116
|
export default defineComponent({
|
|
120
117
|
name: "FSMap",
|
|
121
118
|
components: {
|
|
@@ -168,7 +165,7 @@ export default defineComponent({
|
|
|
168
165
|
default: null
|
|
169
166
|
},
|
|
170
167
|
modelValue: {
|
|
171
|
-
type: Array as PropType<
|
|
168
|
+
type: Array as PropType<FSLocation[]>,
|
|
172
169
|
required: false,
|
|
173
170
|
default: () => [],
|
|
174
171
|
},
|
|
@@ -188,7 +185,7 @@ export default defineComponent({
|
|
|
188
185
|
default: true
|
|
189
186
|
}
|
|
190
187
|
},
|
|
191
|
-
emits: [
|
|
188
|
+
emits: ["update:modelValue", "update:selectedLocationId", "update:selectedSiteId"],
|
|
192
189
|
setup(props, { emit }) {
|
|
193
190
|
const { reverseSearch } = useAddress();
|
|
194
191
|
const { getColors } = useColors();
|
|
@@ -348,7 +345,9 @@ export default defineComponent({
|
|
|
348
345
|
};
|
|
349
346
|
|
|
350
347
|
const onNewAddressEntered = (address: Address) => {
|
|
351
|
-
if (!props.selectedLocationId) {
|
|
348
|
+
if (!props.selectedLocationId) {
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
352
351
|
modifyLocationAddress(props.selectedLocationId, address);
|
|
353
352
|
map?.flyTo([address.latitude, address.longitude], map?.getZoom() ?? defaultZoom);
|
|
354
353
|
};
|
|
@@ -77,41 +77,39 @@
|
|
|
77
77
|
</template>
|
|
78
78
|
|
|
79
79
|
<script lang="ts">
|
|
80
|
-
import type
|
|
81
|
-
import { defineComponent, ref, watch } from "vue";
|
|
80
|
+
import { defineComponent, type PropType, ref, watch } from "vue";
|
|
82
81
|
|
|
83
|
-
import
|
|
84
|
-
import FSCol from '../FSCol.vue'
|
|
85
|
-
import FSRow from '../FSRow.vue'
|
|
86
|
-
import FSText from '../FSText.vue'
|
|
87
|
-
import FSButton from '../FSButton.vue'
|
|
88
|
-
import FSNumberField from '../fields/FSNumberField.vue'
|
|
89
|
-
import FSForm from '../FSForm.vue'
|
|
90
|
-
import FSAutoCompleteAddress from '../autocompletes/FSAutoCompleteAddress.vue'
|
|
91
|
-
|
|
92
|
-
import { Address } from "@dative-gpi/foundation-shared-domain/models/locations/address";
|
|
82
|
+
import { Address } from "@dative-gpi/foundation-shared-domain/models";
|
|
93
83
|
|
|
84
|
+
import FSAutoCompleteAddress from "../autocompletes/FSAutoCompleteAddress.vue";
|
|
85
|
+
import FSNumberField from "../fields/FSNumberField.vue";
|
|
86
|
+
import FSButton from "../FSButton.vue";
|
|
87
|
+
import FSCard from "../FSCard.vue";
|
|
88
|
+
import FSForm from "../FSForm.vue";
|
|
89
|
+
import FSText from "../FSText.vue";
|
|
90
|
+
import FSCol from "../FSCol.vue";
|
|
91
|
+
import FSRow from "../FSRow.vue";
|
|
94
92
|
|
|
95
93
|
export default defineComponent({
|
|
96
94
|
name: "FSMapEditPointAddressOverlay.vue",
|
|
97
95
|
components: {
|
|
96
|
+
FSAutoCompleteAddress,
|
|
97
|
+
FSNumberField,
|
|
98
|
+
FSButton,
|
|
98
99
|
FSCard,
|
|
99
|
-
|
|
100
|
-
FSRow,
|
|
100
|
+
FSForm,
|
|
101
101
|
FSText,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
FSAutoCompleteAddress,
|
|
105
|
-
FSForm
|
|
102
|
+
FSCol,
|
|
103
|
+
FSRow
|
|
106
104
|
},
|
|
107
105
|
props: {
|
|
108
106
|
modelValue: {
|
|
109
107
|
type: Object as PropType<Address>,
|
|
110
108
|
default: null,
|
|
111
109
|
required: false,
|
|
112
|
-
}
|
|
110
|
+
}
|
|
113
111
|
},
|
|
114
|
-
emits: [
|
|
112
|
+
emits: ["update:modelValue", "update:locationCoord", "submit", "cancel"],
|
|
115
113
|
setup(props, { emit }) {
|
|
116
114
|
const menuLocationCoord = ref(false);
|
|
117
115
|
|
|
@@ -128,7 +126,7 @@ export default defineComponent({
|
|
|
128
126
|
latitude: latitude.value,
|
|
129
127
|
longitude: longitude.value,
|
|
130
128
|
});
|
|
131
|
-
emit(
|
|
129
|
+
emit("update:locationCoord", newModelValue);
|
|
132
130
|
};
|
|
133
131
|
|
|
134
132
|
const onAddressFieldSubmit = (address: Address|null) => {
|
|
@@ -152,14 +150,14 @@ export default defineComponent({
|
|
|
152
150
|
});
|
|
153
151
|
|
|
154
152
|
return {
|
|
153
|
+
menuLocationCoord,
|
|
154
|
+
longitude,
|
|
155
|
+
latitude,
|
|
155
156
|
onAddressFieldSubmit,
|
|
156
157
|
onCoordinateChange,
|
|
157
158
|
onSubmit,
|
|
158
|
-
onCancel
|
|
159
|
-
latitude,
|
|
160
|
-
longitude,
|
|
161
|
-
menuLocationCoord,
|
|
159
|
+
onCancel
|
|
162
160
|
};
|
|
163
|
-
}
|
|
161
|
+
}
|
|
164
162
|
});
|
|
165
163
|
</script>
|
package/models/map.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Layer } from "leaflet";
|
|
2
|
+
|
|
3
|
+
import { type Address } from "@/shared/foundation-shared-domain";
|
|
2
4
|
|
|
3
5
|
export interface MapLayer {
|
|
4
|
-
name:string;
|
|
5
|
-
label:string;
|
|
6
|
+
name : string;
|
|
7
|
+
label: string;
|
|
6
8
|
layer: Layer;
|
|
7
9
|
}
|
|
10
|
+
|
|
11
|
+
export interface FSLocation {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
address: Address;
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.192",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "0.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "0.0.192",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.0.192",
|
|
15
15
|
"leaflet": "1.9.4",
|
|
16
16
|
"leaflet.markercluster": "1.5.3"
|
|
17
17
|
},
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "e87b84b757a4c7c46fbba96fd3d3620265768a9e"
|
|
39
39
|
}
|