@dative-gpi/foundation-shared-components 1.0.145 → 1.0.147-maps

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.
@@ -30,6 +30,14 @@
30
30
  </FSRow>
31
31
  </FSCol>
32
32
  </slot>
33
+ <FSRow
34
+ v-if="$slots['top-right']"
35
+ class="fs-card-top-right"
36
+ >
37
+ <slot
38
+ name="top-right"
39
+ />
40
+ </FSRow>
33
41
  </div>
34
42
  </template>
35
43
 
@@ -99,6 +107,11 @@ export default defineComponent({
99
107
  type: Boolean,
100
108
  required: false,
101
109
  default: false
110
+ },
111
+ topRightPadding: {
112
+ type: [String, Number],
113
+ required: false,
114
+ default: "4px"
102
115
  }
103
116
  },
104
117
  setup(props) {
@@ -143,7 +156,8 @@ export default defineComponent({
143
156
  "--fs-card-width" : sizeToVar(props.width),
144
157
  "--fs-card-background-color": backgrounds.base,
145
158
  "--fs-card-border-color" : borderColor.value,
146
- "--fs-card-color" : darks.base
159
+ "--fs-card-color" : darks.base,
160
+ "--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
147
161
  }
148
162
  case "standard": return {
149
163
  "--fs-card-border-size" : props.border ? "1px" : "0",
@@ -154,7 +168,8 @@ export default defineComponent({
154
168
  "--fs-card-width" : sizeToVar(props.width),
155
169
  "--fs-card-background-color": colors.value.light,
156
170
  "--fs-card-border-color" : borderColor.value,
157
- "--fs-card-color" : colors.value.lightContrast!
171
+ "--fs-card-color" : colors.value.lightContrast!,
172
+ "--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
158
173
  }
159
174
  case "full": return {
160
175
  "--fs-card-border-size" : props.border ? "1px" : "0",
@@ -165,7 +180,8 @@ export default defineComponent({
165
180
  "--fs-card-width" : sizeToVar(props.width),
166
181
  "--fs-card-background-color": colors.value.base,
167
182
  "--fs-card-border-color" : borderColor.value,
168
- "--fs-card-color" : colors.value.baseContrast!
183
+ "--fs-card-color" : colors.value.baseContrast!,
184
+ "--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
169
185
  }
170
186
  case "gradient": return {
171
187
  "--fs-card-border-size" : props.border ? "1px" : "0",
@@ -176,7 +192,8 @@ export default defineComponent({
176
192
  "--fs-card-width" : sizeToVar(props.width),
177
193
  "--fs-card-background-color": gradients.value.base,
178
194
  "--fs-card-border-color" : borderColor.value,
179
- "--fs-card-color" : colors.value.lightContrast!
195
+ "--fs-card-color" : colors.value.lightContrast!,
196
+ "--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
180
197
  }
181
198
  }
182
199
  });
@@ -0,0 +1,124 @@
1
+ <template>
2
+ <FSMenu
3
+ :location="$props.location"
4
+ :closeOnContentClick="false"
5
+ minWidth="0"
6
+ v-model="modelValue"
7
+ v-bind="$attrs"
8
+ >
9
+ <template
10
+ #activator="{ props }"
11
+ >
12
+ <slot
13
+ name="activator"
14
+ v-bind="props"
15
+ >
16
+ <FSButton
17
+ v-bind="props"
18
+ :color="lightColors.dark"
19
+ :iconSize="$props.iconSize"
20
+ variant="icon"
21
+ icon="mdi-information-outline"
22
+ />
23
+ </slot>
24
+ </template>
25
+ <slot
26
+ name="menuContent"
27
+ >
28
+ <FSCard
29
+ :width="$props.width"
30
+ :padding="$props.padding"
31
+ :elevation="true"
32
+ align="center"
33
+ >
34
+ <slot
35
+ name="cardContent"
36
+ >
37
+ <FSRow
38
+ align="center-center"
39
+ >
40
+ <FSText
41
+ font="text-overline"
42
+ :lineClamp="4"
43
+ >
44
+ {{ $props.content }}
45
+ </FSText>
46
+ </FSRow>
47
+ </slot>
48
+ <template
49
+ #top-right
50
+ >
51
+ <FSButton
52
+ variant="icon"
53
+ icon="mdi-close"
54
+ iconSize="18px"
55
+ :color="lightColors.dark"
56
+ @click="modelValue = false"
57
+ />
58
+ </template>
59
+ </FSCard>
60
+ </slot>
61
+ </FSMenu>
62
+ </template>
63
+
64
+ <script lang="ts">
65
+ import { defineComponent, ref, type PropType } from "vue";
66
+
67
+ import { useColors } from "@dative-gpi/foundation-shared-components/composables";
68
+
69
+ import { ColorEnum } from '@dative-gpi/foundation-shared-components/models';
70
+
71
+ import FSRow from '@dative-gpi/foundation-shared-components/components/FSRow.vue';
72
+ import FSMenu from '@dative-gpi/foundation-shared-components/components/FSMenu.vue';
73
+ import FSCard from '@dative-gpi/foundation-shared-components/components/FSCard.vue';
74
+ import FSText from '@dative-gpi/foundation-shared-components/components/FSText.vue';
75
+ import FSButton from '@dative-gpi/foundation-shared-components/components/FSButton.vue';
76
+
77
+ export default defineComponent({
78
+ name: "FSInformationsMenu",
79
+ components: {
80
+ FSMenu,
81
+ FSCard,
82
+ FSRow,
83
+ FSText,
84
+ FSButton
85
+ },
86
+ props: {
87
+ content: {
88
+ type: String as PropType<string | null>,
89
+ required: false,
90
+ default: null
91
+ },
92
+ location: {
93
+ type: String,
94
+ default: "top"
95
+ },
96
+ width: {
97
+ type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
98
+ default: 182
99
+ },
100
+ padding: {
101
+ type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
102
+ default: "16px 8px"
103
+ },
104
+ iconSize: {
105
+ type: String,
106
+ default: "18px"
107
+ }
108
+ },
109
+ emits: ["update:modelValue"],
110
+ setup() {
111
+ const modelValue = ref(false);
112
+
113
+ const { getColors } = useColors();
114
+
115
+ const lightColors = getColors(ColorEnum.Light);
116
+
117
+ return {
118
+ ColorEnum,
119
+ modelValue,
120
+ lightColors
121
+ };
122
+ }
123
+ });
124
+ </script>
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <v-menu
3
+ :modelValue="$props.modelValue"
4
+ :scrollStrategy="$props.scrollStrategy"
5
+ :offset="$props.offset"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ >
8
+ <template
9
+ v-for="(_, name) in $slots"
10
+ v-slot:[name]="slotData"
11
+ >
12
+ <slot
13
+ :name="name"
14
+ v-bind="slotData"
15
+ />
16
+ </template>
17
+ <slot />
18
+ </v-menu>
19
+ </template>
20
+
21
+ <script lang="ts">
22
+ import { defineComponent, type PropType } from "vue";
23
+
24
+ export default defineComponent({
25
+ name: "FSMenu",
26
+ props: {
27
+ modelValue: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ scrollStrategy: {
32
+ type: String,
33
+ default: "close"
34
+ },
35
+ offset: {
36
+ type: [String, Number] as PropType<string | number | null>,
37
+ default: "4px"
38
+ },
39
+ },
40
+ emits: ["update:modelValue"],
41
+ setup() {
42
+
43
+ return {
44
+ };
45
+ }
46
+ });
47
+ </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-menu
2
+ <FSMenu
3
3
  :closeOnContentClick="false"
4
4
  v-model="menu"
5
5
  location="bottom center"
@@ -22,7 +22,7 @@
22
22
  :deviceConnectivity="$props.deviceConnectivity"
23
23
  @close="menu = false"
24
24
  />
25
- </v-menu>
25
+ </FSMenu>
26
26
  </template>
27
27
 
28
28
  <script lang="ts">
@@ -33,12 +33,14 @@ import type { FSDeviceConnectivity } from "@dative-gpi/foundation-shared-compone
33
33
 
34
34
  import FSConnectivityCard from "./FSConnectivityCard.vue";
35
35
  import FSColorIcon from "../FSColorIcon.vue";
36
+ import FSMenu from '../FSMenu.vue';
36
37
 
37
38
  export default defineComponent({
38
39
  name: "FSConnectivity",
39
40
  components: {
40
41
  FSConnectivityCard,
41
- FSColorIcon
42
+ FSColorIcon,
43
+ FSMenu
42
44
  },
43
45
  props: {
44
46
  deviceConnectivity: {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-menu
2
+ <FSMenu
3
3
  :closeOnContentClick="false"
4
4
  v-model="menu"
5
5
  location="bottom center"
@@ -23,7 +23,7 @@
23
23
  :statusGroup="$props.statusGroup"
24
24
  @close="menu = false"
25
25
  />
26
- </v-menu>
26
+ </FSMenu>
27
27
  </template>
28
28
 
29
29
  <script lang="ts">
@@ -34,12 +34,14 @@ import type { FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-
34
34
 
35
35
  import FSStatusCard from "./FSStatusCard.vue";
36
36
  import FSColorIcon from "../FSColorIcon.vue";
37
+ import FSMenu from '../FSMenu.vue';
37
38
 
38
39
  export default defineComponent({
39
40
  name: "FSStatus",
40
41
  components: {
41
42
  FSStatusCard,
42
- FSColorIcon
43
+ FSColorIcon,
44
+ FSMenu
43
45
  },
44
46
  props: {
45
47
  modelStatus: {
@@ -2,6 +2,7 @@
2
2
  <component
3
3
  v-if="$props.modelStatus"
4
4
  class="fs-status-rich-card"
5
+ topRightPadding="2px"
5
6
  variant="standard"
6
7
  :is="$attrs.onClick ? FSClickable : FSCard"
7
8
  :padding="$props.padding"
@@ -41,14 +42,14 @@
41
42
  v-bind="{ color }"
42
43
  />
43
44
  </FSCol>
44
- <div
45
- class="fs-status-rich-card-corner"
45
+ <template
46
+ #top-right
46
47
  >
47
48
  <slot
48
49
  name="corner"
49
50
  v-bind="{ color }"
50
51
  />
51
- </div>
52
+ </template>
52
53
  </component>
53
54
  </template>
54
55
 
@@ -135,7 +136,7 @@ export default defineComponent({
135
136
  });
136
137
 
137
138
  const title = computed((): string => {
138
- return props.title ?? props.modelStatus?.label;
139
+ return props.title ?? props.modelStatus?.label ?? "";
139
140
  });
140
141
 
141
142
  const value = computed((): string | null => {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-menu
2
+ <FSMenu
3
3
  :closeOnContentClick="false"
4
4
  v-model="menu"
5
5
  location="bottom center"
@@ -28,7 +28,7 @@
28
28
  :alertTo="$props.alertTo"
29
29
  @close="menu = false"
30
30
  />
31
- </v-menu>
31
+ </FSMenu>
32
32
  </template>
33
33
 
34
34
  <script lang="ts">
@@ -42,13 +42,15 @@ import { type FSDeviceAlert } from "@dative-gpi/foundation-shared-components/mod
42
42
  import FSWorstAlertCard from "./FSWorstAlertCard.vue";
43
43
  import FSColorIcon from "../FSColorIcon.vue";
44
44
  import FSBadge from "../FSBadge.vue";
45
+ import FSMenu from '../FSMenu.vue';
45
46
 
46
47
  export default defineComponent({
47
48
  name: "FSWorstAlert",
48
49
  components: {
49
50
  FSWorstAlertCard,
50
51
  FSColorIcon,
51
- FSBadge
52
+ FSBadge,
53
+ FSMenu
52
54
  },
53
55
  props: {
54
56
  deviceWorstAlert: {
@@ -82,7 +82,7 @@ export default defineComponent({
82
82
 
83
83
  const deviceTimestamp = computed((): string => {
84
84
  if (props.deviceAlert.sourceTimestamp) {
85
- return epochToLongTimeFormat(props.deviceAlert.sourceTimestamp);
85
+ return epochToLongTimeFormat(props.deviceAlert.actualTimestamp);
86
86
  }
87
87
  return "";
88
88
  });
@@ -1,5 +1,4 @@
1
1
  <template>
2
-
3
2
  <FSBaseField
4
3
  class="fs-color-field"
5
4
  :description="$props.description"
@@ -34,7 +33,7 @@
34
33
  </FSRow>
35
34
  </FSCard>
36
35
  </FSBaseField>
37
- <v-menu
36
+ <FSMenu
38
37
  origin="top left"
39
38
  min-width="300px"
40
39
  :activator="`#${activatorId}`"
@@ -73,7 +72,7 @@
73
72
  />
74
73
  </FSCol>
75
74
  </FSCard>
76
- </v-menu>
75
+ </FSMenu>
77
76
  </template>
78
77
 
79
78
  <script lang="ts">
@@ -87,6 +86,7 @@ import FSBaseField from "./FSBaseField.vue";
87
86
  import FSCard from "../FSCard.vue";
88
87
  import FSIcon from "../FSIcon.vue";
89
88
  import FSText from "../FSText.vue";
89
+ import FSMenu from "../FSMenu.vue";
90
90
  import FSRow from "../FSRow.vue";
91
91
  import FSCol from "../FSCol.vue";
92
92
 
@@ -94,6 +94,7 @@ export default defineComponent({
94
94
  name: "FSColorField",
95
95
  components: {
96
96
  FSBaseField,
97
+ FSMenu,
97
98
  FSText,
98
99
  FSCard,
99
100
  FSIcon,
@@ -71,7 +71,7 @@
71
71
  <template
72
72
  v-else
73
73
  >
74
- <v-menu
74
+ <FSMenu
75
75
  min-width="300px"
76
76
  :closeOnContentClick="false"
77
77
  :modelValue="menu && !$props.disabled"
@@ -142,7 +142,7 @@
142
142
  />
143
143
  </FSCol>
144
144
  </FSCard>
145
- </v-menu>
145
+ </FSMenu>
146
146
  </template>
147
147
  </FSCol>
148
148
  </template>
@@ -160,6 +160,7 @@ import FSTextField from "./FSTextField.vue";
160
160
  import FSCalendar from "../FSCalendar.vue";
161
161
  import FSButton from "../FSButton.vue";
162
162
  import FSCard from "../FSCard.vue";
163
+ import FSMenu from '../FSMenu.vue';
163
164
  import FSCol from "../FSCol.vue";
164
165
 
165
166
  export default defineComponent({
@@ -170,6 +171,7 @@ export default defineComponent({
170
171
  FSCalendar,
171
172
  FSButton,
172
173
  FSCard,
174
+ FSMenu,
173
175
  FSCol
174
176
  },
175
177
  props: {
@@ -91,7 +91,8 @@
91
91
  <template
92
92
  v-else
93
93
  >
94
- <v-menu
94
+ <FSMenu
95
+ min-width="300px"
95
96
  :closeOnContentClick="false"
96
97
  :modelValue="menu && !$props.disabled"
97
98
  @update:modelValue="menu = $event"
@@ -187,7 +188,7 @@
187
188
  </FSCol>
188
189
  </FSCard>
189
190
  </FSWindow>
190
- </v-menu>
191
+ </FSMenu>
191
192
  </template>
192
193
  </FSCol>
193
194
  </template>
@@ -206,6 +207,7 @@ import FSWindow from "../FSWindow.vue";
206
207
  import FSButton from "../FSButton.vue";
207
208
  import FSClock from "../FSClock.vue";
208
209
  import FSCard from "../FSCard.vue";
210
+ import FSMenu from '../FSMenu.vue';
209
211
  import FSCol from "../FSCol.vue";
210
212
 
211
213
  export default defineComponent({
@@ -218,6 +220,7 @@ export default defineComponent({
218
220
  FSButton,
219
221
  FSClock,
220
222
  FSCard,
223
+ FSMenu,
221
224
  FSCol
222
225
  },
223
226
  props: {
@@ -116,7 +116,7 @@
116
116
  >
117
117
  mdi-link
118
118
  </FSIcon>
119
- <v-menu
119
+ <FSMenu
120
120
  v-if="$props.variableReferences && $props.variableReferences.length > 0"
121
121
  :closeOnContentClick="false"
122
122
  v-model="menuVariable"
@@ -146,7 +146,7 @@
146
146
  @update:modelValue="insertVariable($event)"
147
147
  />
148
148
  </FSCard>
149
- </v-menu>
149
+ </FSMenu>
150
150
  <v-divider
151
151
  vertical
152
152
  />
@@ -246,6 +246,7 @@ import FSTextField from "./FSTextField.vue";
246
246
  import FSIcon from "../FSIcon.vue";
247
247
  import FSCard from "../FSCard.vue";
248
248
  import FSText from "../FSText.vue";
249
+ import FSMenu from '../FSMenu.vue';
249
250
  import FSCol from "../FSCol.vue";
250
251
  import FSRow from "../FSRow.vue";
251
252
 
@@ -257,6 +258,7 @@ export default defineComponent({
257
258
  FSText,
258
259
  FSIcon,
259
260
  FSCard,
261
+ FSMenu,
260
262
  FSCol,
261
263
  FSRow
262
264
  },
@@ -131,7 +131,7 @@
131
131
  <template
132
132
  v-else
133
133
  >
134
- <v-menu
134
+ <FSMenu
135
135
  :closeOnContentClick="false"
136
136
  :modelValue="menu && !$props.disabled"
137
137
  @update:modelValue="menu = $event"
@@ -233,7 +233,7 @@
233
233
  #title
234
234
  />
235
235
  </v-treeview>
236
- </v-menu>
236
+ </FSMenu>
237
237
  </template>
238
238
  </FSCol>
239
239
  </template>
@@ -253,6 +253,7 @@ import FSFadeOut from "../FSFadeOut.vue";
253
253
  import FSLoader from "../FSLoader.vue";
254
254
  import FSRadio from "../FSRadio.vue";
255
255
  import FSSpan from "../FSSpan.vue";
256
+ import FSMenu from '../FSMenu.vue';
256
257
  import FSCol from "../FSCol.vue";
257
258
 
258
259
  export default defineComponent({
@@ -266,6 +267,7 @@ export default defineComponent({
266
267
  FSLoader,
267
268
  FSRadio,
268
269
  FSSpan,
270
+ FSMenu,
269
271
  FSCol,
270
272
  },
271
273
  props: {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-menu
2
+ <FSMenu
3
3
  :closeOnContentClick="false"
4
4
  v-model="expanded"
5
5
  >
@@ -79,7 +79,7 @@
79
79
  </FSFadeOut>
80
80
  </FSCol>
81
81
  </FSCard>
82
- </v-menu>
82
+ </FSMenu>
83
83
  </template>
84
84
 
85
85
  <script lang="ts">
@@ -94,6 +94,7 @@ import FSDivider from "../FSDivider.vue";
94
94
  import FSCard from "../FSCard.vue";
95
95
  import FSChip from "../FSChip.vue";
96
96
  import FSSpan from "../FSSpan.vue";
97
+ import FSMenu from '../FSMenu.vue';
97
98
  import FSCol from "../FSCol.vue";
98
99
 
99
100
  export default defineComponent({
@@ -105,6 +106,7 @@ export default defineComponent({
105
106
  FSCard,
106
107
  FSChip,
107
108
  FSSpan,
109
+ FSMenu,
108
110
  FSCol
109
111
  },
110
112
  props: {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-menu
2
+ <FSMenu
3
3
  v-model="expanded"
4
4
  >
5
5
  <template
@@ -61,7 +61,7 @@
61
61
  </FSCol>
62
62
  </FSCol>
63
63
  </FSCard>
64
- </v-menu>
64
+ </FSMenu>
65
65
  </template>
66
66
 
67
67
  <script lang="ts">
@@ -73,6 +73,7 @@ import FSButton from "../FSButton.vue";
73
73
  import FSCard from "../FSCard.vue";
74
74
  import FSSpan from "../FSSpan.vue";
75
75
  import FSChip from "../FSChip.vue";
76
+ import FSMenu from '../FSMenu.vue';
76
77
  import FSCol from "../FSCol.vue";
77
78
 
78
79
  export default defineComponent({
@@ -82,6 +83,7 @@ export default defineComponent({
82
83
  FSCard,
83
84
  FSChip,
84
85
  FSSpan,
86
+ FSMenu,
85
87
  FSCol
86
88
  },
87
89
  props: {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-menu
2
+ <FSMenu
3
3
  :closeOnContentClick="false"
4
4
  v-model="expanded"
5
5
  >
@@ -55,7 +55,7 @@
55
55
  </FSFadeOut>
56
56
  </FSCol>
57
57
  </FSCard>
58
- </v-menu>
58
+ </FSMenu>
59
59
  </template>
60
60
 
61
61
  <script lang="ts">
@@ -66,6 +66,7 @@ import { type ColorBase, ColorEnum, type FSDataTableColumn } from "@dative-gpi/f
66
66
  import FSCard from "../FSCard.vue";
67
67
  import FSChip from "../FSChip.vue";
68
68
  import FSSpan from "../FSSpan.vue";
69
+ import FSMenu from '../FSMenu.vue';
69
70
  import FSCol from "../FSCol.vue";
70
71
 
71
72
  export default defineComponent({
@@ -74,6 +75,7 @@ export default defineComponent({
74
75
  FSCard,
75
76
  FSChip,
76
77
  FSSpan,
78
+ FSMenu,
77
79
  FSCol
78
80
  },
79
81
  props: {
@@ -28,6 +28,7 @@
28
28
 
29
29
  <FSMapLayerButton
30
30
  v-if="$props.allowedLayers?.length && $props.allowedLayers.length > 1"
31
+ :disabled="$props.disabled"
31
32
  :layers="mapLayers.filter((layer) => $props.allowedLayers?.includes(layer.name) ?? true)"
32
33
  :modelValue="$props.currentLayer"
33
34
  @update:model-value="$emit('update:currentLayer', $event)"
@@ -39,6 +40,7 @@
39
40
  >
40
41
  <FSButton
41
42
  v-if="$props.showMyLocation"
43
+ :disabled="$props.disabled"
42
44
  icon="mdi-crosshairs-gps"
43
45
  color="primary"
44
46
  variant="full"
@@ -53,12 +55,14 @@
53
55
  gap="0"
54
56
  >
55
57
  <FSButton
58
+ :disabled="$props.disabled"
56
59
  class="fs-map-zoom-plus-button"
57
60
  icon="mdi-plus"
58
61
  @click="() => map!.zoomIn()"
59
62
  :border="false"
60
63
  />
61
64
  <FSButton
65
+ :disabled="$props.disabled"
62
66
  class="fs-map-zoom-minus-button"
63
67
  icon="mdi-minus"
64
68
  @click="() => map!.zoomOut()"
@@ -130,6 +134,16 @@ export default defineComponent({
130
134
  required: false,
131
135
  default: '100%'
132
136
  },
137
+ lockZoomOnFlyTo: {
138
+ type: Boolean,
139
+ required: false,
140
+ default: false
141
+ },
142
+ disabled: {
143
+ type: Boolean,
144
+ required: false,
145
+ default: false
146
+ },
133
147
  grayscale: {
134
148
  type: Boolean,
135
149
  required: false,
@@ -353,14 +367,16 @@ export default defineComponent({
353
367
 
354
368
  const mapOptions = {
355
369
  zoomControl: false,
356
- scrollWheelZoom: props.enableScrollWheelZoom,
370
+ scrollWheelZoom: props.enableScrollWheelZoom && !props.disabled,
371
+ dragging: !props.disabled,
372
+ doubleClickZoom: false,
357
373
  minZoom: 2,
358
374
  maxZoom: 22,
359
375
  maxBounds: latLngBounds(latLng(-90, -180), latLng(90, 180)),
360
376
  maxBoundsViscosity: 1.0,
361
377
  zoom: defaultZoom.value,
362
378
  center: props.center ? latLng(props.center[0], props.center[1]) : latLng(48.85782, 2.29521)
363
- };
379
+ } satisfies L.MapOptions;
364
380
 
365
381
  map.value = markRaw(createMap(leafletContainer.value, mapOptions));
366
382
 
@@ -396,7 +412,9 @@ export default defineComponent({
396
412
  if(!map.value || !props.center) {
397
413
  return;
398
414
  }
399
- setView(props.center[0], props.center[1], defaultZoom.value);
415
+ const zoom = props.lockZoomOnFlyTo ? map.value.getZoom() : defaultZoom.value;
416
+
417
+ setView(props.center[0], props.center[1], zoom);
400
418
  }, { immediate: true });
401
419
 
402
420
  watch([() => props.bounds, () => map.value], () => {
@@ -413,6 +431,32 @@ export default defineComponent({
413
431
  }
414
432
  }, { immediate: true });
415
433
 
434
+ watch(() => props.enableScrollWheelZoom, (newValue) => {
435
+ if(!map.value) {
436
+ return;
437
+ }
438
+ if(newValue) {
439
+ map.value.scrollWheelZoom.enable();
440
+ } else {
441
+ map.value.scrollWheelZoom.disable();
442
+ }
443
+ }, { immediate: true });
444
+
445
+ watch(() => props.disabled, (newValue) => {
446
+ if(!map.value) {
447
+ return;
448
+ }
449
+ if(newValue) {
450
+ map.value.dragging.disable();
451
+ map.value.scrollWheelZoom.disable();
452
+ } else {
453
+ map.value.dragging.enable();
454
+ if(props.enableScrollWheelZoom) {
455
+ map.value.scrollWheelZoom.enable();
456
+ }
457
+ }
458
+ }, { immediate: true });
459
+
416
460
  return {
417
461
  ColorEnum,
418
462
  defaultZoom,
@@ -4,6 +4,7 @@
4
4
  icon="mdi-layers-outline"
5
5
  :elevation="true"
6
6
  @click="dialog = true"
7
+ v-bind="$attrs"
7
8
  />
8
9
  <FSDialog
9
10
  v-model="dialog"
@@ -2,6 +2,7 @@
2
2
  <FSCard
3
3
  class="fs-load-tile"
4
4
  padding="11px"
5
+ topRightPadding="1px"
5
6
  :height="heights.card"
6
7
  :width="widths.card"
7
8
  :style="style"
@@ -39,19 +40,21 @@
39
40
  :width="widths.image"
40
41
  />
41
42
  </FSRow>
42
- <FSCard
43
+ <template
43
44
  v-if="$props.selectable"
44
- class="fs-tile-checkbox"
45
- :height="['40px', '32px']"
46
- :width="['40px', '32px']"
47
- :border="false"
45
+ #top-right
48
46
  >
49
- <FSCheckbox
50
- :modelValue="$props.modelValue"
51
- :disabled="true"
52
- @update:modelValue="() => $emit('update:modelValue', !$props.modelValue)"
53
- />
54
- </FSCard>
47
+ <FSCard
48
+ padding="8px"
49
+ :border="false"
50
+ >
51
+ <FSCheckbox
52
+ :modelValue="$props.modelValue"
53
+ :disabled="true"
54
+ @update:modelValue="() => $emit('update:modelValue', !$props.modelValue)"
55
+ />
56
+ </FSCard>
57
+ </template>
55
58
  </FSCard>
56
59
  </template>
57
60
 
@@ -12,23 +12,26 @@
12
12
  :href="$props.href"
13
13
  width="100%"
14
14
  height="100%"
15
+ topRightPadding="1px"
15
16
  :to="$props.to"
16
17
  :style="style"
17
18
  v-bind="$attrs"
18
19
  >
19
20
  <slot />
20
- <FSCard
21
+ <template
21
22
  v-if="$props.selectable"
22
- class="fs-tile-checkbox"
23
- :height="['40px', '32px']"
24
- :width="['40px', '32px']"
25
- :border="false"
23
+ #top-right
26
24
  >
27
- <FSCheckbox
28
- :modelValue="$props.modelValue"
29
- @update:modelValue="() => $emit('update:modelValue', !$props.modelValue)"
30
- />
31
- </FSCard>
25
+ <FSCard
26
+ padding="8px"
27
+ :border="false"
28
+ >
29
+ <FSCheckbox
30
+ :modelValue="$props.modelValue"
31
+ @update:modelValue="() => $emit('update:modelValue', !$props.modelValue)"
32
+ />
33
+ </FSCard>
34
+ </template>
32
35
  </FSClickable>
33
36
 
34
37
  <FSClickable
@@ -53,22 +56,24 @@
53
56
  :style="style"
54
57
  width="100%"
55
58
  height="100%"
59
+ topRightPadding="1px"
56
60
  v-bind="$attrs"
57
61
  >
58
62
  <slot />
59
- <FSCard
63
+ <template
60
64
  v-if="$props.selectable"
61
- class="fs-tile-checkbox"
62
- variant="background"
63
- :height="['40px', '32px']"
64
- :width="['40px', '32px']"
65
- :border="false"
65
+ #top-right
66
66
  >
67
- <FSCheckbox
68
- :modelValue="$props.modelValue"
69
- @update:modelValue="() => $emit('update:modelValue', !$props.modelValue)"
70
- />
71
- </FSCard>
67
+ <FSCard
68
+ padding="8px"
69
+ :border="false"
70
+ >
71
+ <FSCheckbox
72
+ :modelValue="$props.modelValue"
73
+ @update:modelValue="() => $emit('update:modelValue', !$props.modelValue)"
74
+ />
75
+ </FSCard>
76
+ </template>
72
77
  </FSCard>
73
78
 
74
79
  <div
@@ -105,7 +110,7 @@ export default defineComponent({
105
110
  },
106
111
  props: {
107
112
  to: {
108
- type: [String, Object] as PropType<string | RouteLocation | null>,
113
+ type: [String, Object] as PropType<RouteLocation | null>,
109
114
  required: false,
110
115
  default: null
111
116
  },
@@ -21,7 +21,7 @@ export const useBreakpoints = () => {
21
21
  };
22
22
 
23
23
  const isTouchScreenEnabled = computed((): boolean => {
24
- return navigator.maxTouchPoints > 0;
24
+ return window.matchMedia('(hover: none), (pointer: coarse), (pointer: none)').matches;
25
25
  });
26
26
 
27
27
  const isMobileSized = computed((): boolean => {
@@ -7,4 +7,5 @@ export interface FSDeviceAlert {
7
7
  criticity: Criticity;
8
8
  sourceTimestamp?: number | null;
9
9
  enqueuedTimestamp?: number | null;
10
+ actualTimestamp?: number | null;
10
11
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "1.0.145",
4
+ "version": "1.0.147-maps",
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": "1.0.145",
14
- "@dative-gpi/foundation-shared-services": "1.0.145"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.147-maps",
14
+ "@dative-gpi/foundation-shared-services": "1.0.147-maps"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -35,5 +35,5 @@
35
35
  "sass": "1.71.1",
36
36
  "sass-loader": "13.3.2"
37
37
  },
38
- "gitHead": "6c88c1ce189ab312cb04f5956ca391e94b1a0dbe"
38
+ "gitHead": "ae8bef1eca27c0f0c345f01c69bf851e12fec0df"
39
39
  }
@@ -4,6 +4,7 @@
4
4
  padding: var(--fs-card-padding);
5
5
  height: var(--fs-card-height);
6
6
  width: var(--fs-card-width);
7
+ position: relative;
7
8
  display: flex;
8
9
 
9
10
  border-color: var(--fs-card-border-color);
@@ -21,4 +22,11 @@
21
22
  &-gradient {
22
23
  background: var(--fs-card-background-color);
23
24
  }
25
+
26
+ .fs-card-top-right {
27
+ position: absolute;
28
+ line-height: normal;
29
+ right: var(--fs-card-top-right-padding);
30
+ top: var(--fs-card-top-right-padding);
31
+ }
24
32
  }
@@ -4,10 +4,3 @@
4
4
  background-color: var(--fs-status-rich-card-background-color);
5
5
  border-color: var(--fs-status-rich-card-border-color);
6
6
  }
7
-
8
- .fs-status-rich-card-corner {
9
- position: absolute;
10
- display: flex;
11
- right: 2px;
12
- top: 2px;
13
- }
@@ -25,15 +25,6 @@
25
25
  background: var(--fs-tile-left-border-color);
26
26
  }
27
27
 
28
- .fs-tile-checkbox {
29
- border-radius: 4px;
30
- position: absolute;
31
- align-items: center;
32
- justify-content: center;
33
- top: 1px;
34
- right: 1px;
35
- }
36
-
37
28
  .fs-location-tile-text-container {
38
29
  min-width: 0;
39
30
  }
@@ -14,6 +14,7 @@
14
14
  .fs-hide-x-scrollbar {
15
15
  overflow-x: scroll !important;
16
16
 
17
+ // Styles pour WebKit (Chrome, Safari)
17
18
  &::-webkit-scrollbar {
18
19
  height: 8px;
19
20
  }
@@ -25,11 +26,15 @@
25
26
  &:hover {
26
27
  --scrollbar-x-color: #00000022;
27
28
  }
29
+ &:not(:hover) {
30
+ --scrollbar-y-color: #00000000;
31
+ }
28
32
  }
29
33
 
30
34
  .fs-hide-y-scrollbar {
31
35
  overflow-y: scroll !important;
32
36
 
37
+ // Styles pour WebKit (Chrome, Safari)
33
38
  &::-webkit-scrollbar {
34
39
  width: 8px;
35
40
  }
@@ -41,25 +46,18 @@
41
46
  &:hover {
42
47
  --scrollbar-y-color: #00000022;
43
48
  }
49
+ &:not(:hover) {
50
+ --scrollbar-y-color: #00000000;
51
+ }
44
52
  }
45
53
  }
46
54
 
47
55
  @include touchscreen {
48
56
  .fs-hide-x-scrollbar {
49
57
  overflow-x: scroll;
50
-
51
- &::-webkit-scrollbar {
52
- display: none;
53
- }
54
- scrollbar-width: none;
55
58
  }
56
59
 
57
60
  .fs-hide-y-scrollbar {
58
61
  overflow-y: scroll;
59
-
60
- &::-webkit-scrollbar {
61
- display: none;
62
- }
63
- scrollbar-width: none;
64
62
  }
65
63
  }
@@ -1,11 +1,11 @@
1
1
  @mixin touchscreen {
2
- @media (hover: none) {
2
+ @media (hover: none), (pointer: coarse), (pointer: none) {
3
3
  @content;
4
4
  }
5
5
  }
6
6
 
7
7
  @mixin clickscreen {
8
- @media not all and (hover: none) {
8
+ @media (hover: hover), (pointer: fine) {
9
9
  @content;
10
10
  }
11
11
  }