@dative-gpi/foundation-shared-components 1.0.66 → 1.0.67-map-edit

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.
Files changed (294) hide show
  1. package/assets/images/map/snow.png +0 -0
  2. package/components/FSAccordionPanel.vue +40 -21
  3. package/components/FSBreadcrumbs.vue +21 -12
  4. package/components/FSButton.vue +11 -9
  5. package/components/FSCalendar.vue +50 -12
  6. package/components/FSCalendarTwin.vue +95 -43
  7. package/components/FSCard.vue +61 -9
  8. package/components/FSCardPlaceholder.vue +8 -5
  9. package/components/FSCheckbox.vue +5 -4
  10. package/components/FSChip.vue +73 -45
  11. package/components/FSChipGroup.vue +69 -0
  12. package/components/FSClickable.vue +11 -9
  13. package/components/FSClock.vue +30 -12
  14. package/components/FSCol.vue +11 -5
  15. package/components/FSDialog.vue +2 -1
  16. package/components/FSDialogContent.vue +12 -11
  17. package/components/FSDialogForm.vue +22 -2
  18. package/components/FSDialogFormBody.vue +50 -31
  19. package/components/FSDialogMenu.vue +17 -8
  20. package/components/FSDialogMultiFormBody.vue +23 -13
  21. package/components/FSDialogRemove.vue +7 -8
  22. package/components/FSDialogSubmit.vue +20 -11
  23. package/components/FSEditImageUI.vue +13 -5
  24. package/components/FSFadeOut.vue +53 -21
  25. package/components/FSForm.vue +10 -8
  26. package/components/FSGrid.vue +0 -1
  27. package/components/FSIcon.vue +2 -2
  28. package/components/FSIconCard.vue +68 -12
  29. package/components/FSInformationsMenu.vue +142 -0
  30. package/components/FSInstantPicker.vue +268 -0
  31. package/components/FSLink.vue +25 -9
  32. package/components/FSLoader.vue +28 -10
  33. package/components/FSMenu.vue +47 -0
  34. package/components/FSOptionGroup.vue +8 -8
  35. package/components/FSOptionItem.vue +4 -4
  36. package/components/FSOptionsMenu.vue +165 -0
  37. package/components/FSPagination.vue +1 -1
  38. package/components/FSPlayButtons.vue +72 -0
  39. package/components/FSProgressBar.vue +94 -0
  40. package/components/FSRadio.vue +5 -4
  41. package/components/FSRadioGroup.vue +3 -3
  42. package/components/FSRangePicker.vue +275 -0
  43. package/components/FSRangeSlider.vue +84 -0
  44. package/components/FSRouterLink.vue +42 -0
  45. package/components/FSSlideGroup.vue +19 -5
  46. package/components/FSSlider.vue +44 -79
  47. package/components/FSSpan.vue +12 -7
  48. package/components/FSSwitch.vue +44 -48
  49. package/components/FSTab.vue +15 -13
  50. package/components/FSTabs.vue +32 -7
  51. package/components/FSTag.vue +3 -3
  52. package/components/FSTagGroup.vue +6 -4
  53. package/components/FSText.vue +11 -7
  54. package/components/FSToggleSet.vue +7 -7
  55. package/components/FSWindow.vue +122 -5
  56. package/components/FSWrapGroup.vue +13 -1
  57. package/components/agenda/FSAgenda.vue +26 -7
  58. package/components/agenda/FSAgendaDialogCalendar.vue +2 -2
  59. package/components/agenda/FSAgendaHeader.vue +35 -10
  60. package/components/agenda/FSAgendaHorizontalEvent.vue +18 -6
  61. package/components/agenda/FSAgendaHoursRow.vue +48 -8
  62. package/components/agenda/FSAgendaVerticalEvent.vue +1 -1
  63. package/components/agenda/FSDayAgenda.vue +0 -1
  64. package/components/agenda/FSMonthAgenda.vue +1 -6
  65. package/components/agenda/FSSelectAgendaMode.vue +2 -2
  66. package/components/agenda/FSWeekAgenda.vue +5 -10
  67. package/components/autocompletes/FSAutoCompleteAddress.vue +25 -20
  68. package/components/autocompletes/FSAutocompleteLanguage.vue +7 -1
  69. package/components/autocompletes/FSAutocompleteTimeZone.vue +7 -1
  70. package/components/buttons/FSButtonAdd.vue +1 -1
  71. package/components/buttons/FSButtonAddLabel.vue +1 -1
  72. package/components/buttons/FSButtonCancel.vue +1 -1
  73. package/components/buttons/FSButtonCancelLabel.vue +1 -1
  74. package/components/buttons/FSButtonCheckbox.vue +4 -4
  75. package/components/buttons/FSButtonCopy.vue +1 -1
  76. package/components/buttons/FSButtonCopyLabel.vue +1 -1
  77. package/components/buttons/FSButtonDuplicate.vue +1 -1
  78. package/components/buttons/FSButtonDuplicateLabel.vue +1 -1
  79. package/components/buttons/FSButtonEdit.vue +1 -1
  80. package/components/buttons/FSButtonEditLabel.vue +1 -1
  81. package/components/buttons/FSButtonFile.vue +1 -1
  82. package/components/buttons/FSButtonFileLabel.vue +1 -1
  83. package/components/buttons/FSButtonNext.vue +1 -1
  84. package/components/buttons/FSButtonNextLabel.vue +1 -1
  85. package/components/buttons/FSButtonPrevious.vue +1 -1
  86. package/components/buttons/FSButtonPreviousLabel.vue +1 -1
  87. package/components/buttons/FSButtonRedo.vue +1 -1
  88. package/components/buttons/FSButtonRedoLabel.vue +1 -1
  89. package/components/buttons/FSButtonRemove.vue +1 -1
  90. package/components/buttons/FSButtonRemoveLabel.vue +1 -1
  91. package/components/buttons/FSButtonSave.vue +1 -1
  92. package/components/buttons/FSButtonSaveLabel.vue +1 -1
  93. package/components/buttons/FSButtonSearch.vue +1 -1
  94. package/components/buttons/FSButtonSearchLabel.vue +1 -1
  95. package/components/buttons/FSButtonUndo.vue +1 -1
  96. package/components/buttons/FSButtonUndoLabel.vue +1 -1
  97. package/components/buttons/FSButtonUpdate.vue +1 -1
  98. package/components/buttons/FSButtonUpdateLabel.vue +1 -1
  99. package/components/buttons/FSButtonValidate.vue +1 -1
  100. package/components/buttons/FSButtonValidateLabel.vue +1 -1
  101. package/components/calendar/FSSimpleCalendar.vue +145 -0
  102. package/components/calendar/FSSimpleCalendarHeader.vue +60 -0
  103. package/components/calendar/FSSimpleMonthSelector.vue +138 -0
  104. package/components/deviceOrganisations/FSConnectivity.vue +5 -3
  105. package/components/deviceOrganisations/FSStatus.vue +5 -3
  106. package/components/deviceOrganisations/FSStatusCard.vue +7 -9
  107. package/components/deviceOrganisations/FSStatusRichCard.vue +171 -0
  108. package/components/deviceOrganisations/FSWorstAlert.vue +24 -36
  109. package/components/deviceOrganisations/FSWorstAlertCard.vue +8 -47
  110. package/components/fields/FSAutocompleteField.vue +85 -82
  111. package/components/fields/FSAutocompleteTag.vue +1 -1
  112. package/components/fields/FSBaseField.vue +42 -25
  113. package/components/fields/FSClosableSearchField.vue +83 -0
  114. package/components/fields/FSColorField.vue +12 -10
  115. package/components/fields/FSCommentField.vue +28 -16
  116. package/components/fields/FSDateField.vue +13 -10
  117. package/components/fields/FSDateRangeField.vue +6 -5
  118. package/components/fields/FSDateTimeField.vue +14 -11
  119. package/components/fields/FSDateTimeRangeDialog.vue +160 -0
  120. package/components/fields/FSDateTimeRangeField.vue +23 -115
  121. package/components/fields/FSEntityFieldUI.vue +19 -16
  122. package/components/fields/FSGradientField.vue +5 -5
  123. package/components/fields/FSIconField.vue +16 -9
  124. package/components/fields/FSMagicConfigField.vue +15 -7
  125. package/components/fields/FSMagicField.vue +7 -2
  126. package/components/fields/FSNumberField.vue +8 -4
  127. package/components/fields/FSPasswordField.vue +7 -7
  128. package/components/fields/FSRichTextField.vue +78 -58
  129. package/components/fields/FSSearchField.vue +9 -115
  130. package/components/fields/FSSelectField.vue +69 -71
  131. package/components/fields/FSTagField.vue +9 -9
  132. package/components/fields/FSTermField.vue +69 -46
  133. package/components/fields/FSTextArea.vue +17 -11
  134. package/components/fields/FSTextField.vue +15 -10
  135. package/components/fields/FSTimeField.vue +14 -10
  136. package/components/fields/FSTimeRangeField.vue +310 -0
  137. package/components/fields/FSTimeStepField.vue +5 -5
  138. package/components/fields/FSTranslateField.vue +10 -10
  139. package/components/fields/FSTranslateRichTextField.vue +41 -20
  140. package/components/fields/FSTranslateTextArea.vue +10 -10
  141. package/components/fields/FSTreeViewField.vue +15 -13
  142. package/components/fields/periodicField/FSPeriodicDailyField.vue +7 -7
  143. package/components/fields/periodicField/FSPeriodicField.vue +15 -15
  144. package/components/fields/periodicField/FSPeriodicMonthlyField.vue +16 -16
  145. package/components/fields/periodicField/FSPeriodicWeeklyField.vue +28 -18
  146. package/components/fields/periodicField/FSPeriodicYearlyField.vue +12 -12
  147. package/components/lists/FSDataIteratorItem.vue +23 -67
  148. package/components/lists/FSDataTableUI.vue +198 -123
  149. package/components/lists/FSDraggable.vue +2 -2
  150. package/components/lists/FSFilterButton.vue +14 -16
  151. package/components/lists/FSHeaderButton.vue +11 -9
  152. package/components/lists/FSHiddenButton.vue +9 -9
  153. package/components/lists/FSLoadDataTable.vue +10 -7
  154. package/components/lists/FSSimpleList.vue +95 -88
  155. package/components/lists/FSSimpleListItem.vue +131 -0
  156. package/components/map/FSMap.vue +144 -158
  157. package/components/map/FSMapEditLocationAddress.vue +189 -0
  158. package/components/map/FSMapFeatureGroup.vue +7 -1
  159. package/components/map/FSMapLayerButton.vue +4 -3
  160. package/components/map/FSMapMarker.vue +103 -42
  161. package/components/map/FSMapMarkerClusterGroup.vue +32 -7
  162. package/components/map/FSMapOverlay.vue +44 -24
  163. package/components/map/FSMapPolygon.vue +16 -4
  164. package/components/map/FSMapTileLayer.vue +26 -9
  165. package/components/map/layers.ts +0 -0
  166. package/components/selects/FSSelectAutoRefresh.vue +8 -8
  167. package/components/selects/FSSelectDashboardVariableType.vue +4 -3
  168. package/components/selects/FSSelectDateSetting.vue +2 -2
  169. package/components/selects/FSSelectDays.vue +8 -8
  170. package/components/selects/FSSelectListMode.vue +2 -2
  171. package/components/selects/FSSelectMapLayer.vue +68 -0
  172. package/components/selects/FSSelectMonths.vue +13 -13
  173. package/components/selects/chartSelectors/FSAggregationSelector.vue +52 -0
  174. package/components/selects/chartSelectors/FSAxisTypeSelector.vue +49 -0
  175. package/components/selects/chartSelectors/FSDisplayAsSelector.vue +53 -0
  176. package/components/selects/chartSelectors/FSFilterTypeSelector.vue +54 -0
  177. package/components/selects/chartSelectors/FSHeatmapRuleSelector.vue +54 -0
  178. package/components/selects/chartSelectors/FSOperationOnSelector.vue +53 -0
  179. package/components/selects/chartSelectors/FSPlanningTypeSelector.vue +53 -0
  180. package/components/selects/chartSelectors/FSPlotPerSelector.vue +52 -0
  181. package/components/selects/chartSelectors/FSSelectEntityType.vue +59 -0
  182. package/components/selects/chartSelectors/FSSerieTypeSelector.vue +53 -0
  183. package/components/tiles/FSAlertTileUI.vue +90 -0
  184. package/components/tiles/FSChartTileUI.vue +61 -52
  185. package/components/tiles/FSCommentTileUI.vue +38 -13
  186. package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +14 -2
  187. package/components/tiles/FSDashboardShallowTileUI.vue +14 -2
  188. package/components/tiles/FSDeviceOrganisationTileUI.vue +0 -6
  189. package/components/tiles/FSEntityCountBadge.vue +72 -0
  190. package/components/tiles/FSFolderTileUI.vue +38 -4
  191. package/components/tiles/FSGroupTileUI.vue +32 -136
  192. package/components/tiles/FSLoadTile.vue +16 -10
  193. package/components/tiles/FSLocationTileUI.vue +45 -63
  194. package/components/tiles/FSServiceAccountOrganisationTileUI.vue +0 -6
  195. package/components/tiles/FSSimpleTileUI.vue +30 -24
  196. package/components/tiles/FSTile.vue +46 -39
  197. package/components/tiles/FSUserOrganisationTileUI.vue +1 -7
  198. package/components/tiles/FSUserTileUI.vue +119 -0
  199. package/components/toggleSets/FSToggleSetPosition.vue +1 -1
  200. package/components/views/FSBaseView.vue +64 -0
  201. package/components/views/FSEntityView.vue +12 -146
  202. package/components/views/FSSimpleView.vue +29 -0
  203. package/components/views/desktop/FSBaseDefaultDesktopView.vue +135 -0
  204. package/components/views/desktop/FSBaseDesktopView.vue +53 -0
  205. package/components/views/desktop/FSBaseEntityDesktopView.vue +211 -0
  206. package/components/views/mobile/FSBaseDefaultMobileView.vue +133 -0
  207. package/components/views/mobile/FSBaseEntityMobileView.vue +206 -0
  208. package/components/views/mobile/FSBaseMobileView.vue +53 -0
  209. package/composables/index.ts +1 -0
  210. package/composables/useAddress.ts +40 -8
  211. package/composables/useBreakpoints.ts +40 -4
  212. package/composables/useColors.ts +16 -7
  213. package/composables/useMagicFieldProvider.ts +1 -0
  214. package/composables/useMapLayers.ts +69 -0
  215. package/composables/useSlots.ts +2 -1
  216. package/models/colors.ts +2 -1
  217. package/models/deviceAlerts.ts +1 -0
  218. package/models/magicFields.ts +1 -0
  219. package/models/map.ts +12 -10
  220. package/models/rules.ts +5 -2
  221. package/models/tables.ts +2 -1
  222. package/models/variableNode.ts +8 -5
  223. package/package.json +5 -5
  224. package/styles/components/fs_agenda.scss +4 -0
  225. package/styles/components/fs_agenda_event.scss +1 -1
  226. package/styles/components/fs_agenda_hours_row.scss +0 -8
  227. package/styles/components/fs_autocomplete_field.scss +0 -13
  228. package/styles/components/fs_breadcrumbs.scss +18 -36
  229. package/styles/components/fs_button.scss +7 -5
  230. package/styles/components/fs_calendar.scss +1 -0
  231. package/styles/components/fs_card.scss +9 -0
  232. package/styles/components/fs_chip.scss +13 -7
  233. package/styles/components/fs_clickable.scss +16 -23
  234. package/styles/components/fs_clock.scss +0 -10
  235. package/styles/components/fs_col.scss +1 -1
  236. package/styles/components/fs_color_field.scss +0 -4
  237. package/styles/components/fs_data_table.scss +6 -9
  238. package/styles/components/fs_dialog.scss +4 -10
  239. package/styles/components/fs_dialog_menu.scss +4 -2
  240. package/styles/components/fs_draggable.scss +0 -5
  241. package/styles/components/fs_fade_out.scss +10 -2
  242. package/styles/components/fs_filter_button.scss +1 -1
  243. package/styles/components/fs_hidden_button.scss +2 -7
  244. package/styles/components/fs_image_card.scss +6 -4
  245. package/styles/components/fs_magic_config_field.scss +1 -2
  246. package/styles/components/fs_map.scss +57 -17
  247. package/styles/components/fs_meta_field.scss +3 -5
  248. package/styles/components/fs_password_field.scss +4 -2
  249. package/styles/components/fs_progress_bar.scss +14 -0
  250. package/styles/components/fs_radio.scss +0 -11
  251. package/styles/components/fs_rich_text_field.scss +1 -10
  252. package/styles/components/fs_select_field.scss +4 -13
  253. package/styles/components/fs_slide_group.scss +7 -0
  254. package/styles/components/fs_slider.scss +0 -40
  255. package/styles/components/fs_span.scss +13 -5
  256. package/styles/components/fs_status_rich_card.scss +6 -0
  257. package/styles/components/fs_tabs.scss +18 -37
  258. package/styles/components/fs_tag.scss +8 -22
  259. package/styles/components/fs_text_area.scss +2 -21
  260. package/styles/components/fs_tile.scss +0 -19
  261. package/styles/components/fs_window.scss +3 -1
  262. package/styles/components/fs_wrap_group.scss +7 -0
  263. package/styles/components/index.scss +2 -6
  264. package/styles/globals/index.scss +1 -5
  265. package/styles/globals/overrides.scss +26 -54
  266. package/styles/globals/scrollbars.scss +8 -0
  267. package/styles/globals/text_fonts.scss +18 -66
  268. package/styles/globals/touchscreen.scss +2 -2
  269. package/tools/alertsTools.ts +94 -18
  270. package/tools/chartsTools.ts +155 -16
  271. package/tools/index.ts +3 -1
  272. package/tools/reportsTools.ts +38 -0
  273. package/tools/timeRangeTools.ts +125 -0
  274. package/utils/badge.ts +9 -5
  275. package/utils/filter.ts +4 -1
  276. package/utils/index.ts +2 -0
  277. package/utils/leafletMarkers.ts +4 -4
  278. package/utils/operations.ts +108 -0
  279. package/utils/picker.ts +40 -0
  280. package/utils/sort.ts +2 -2
  281. package/utils/time.ts +13 -13
  282. package/components/fields/FSTimeSlotField.vue +0 -250
  283. package/components/views/FSEntityHeader.vue +0 -343
  284. package/components/views/FSListHeader.vue +0 -83
  285. package/components/views/FSListView.vue +0 -83
  286. package/components/views/FSSkeletonView.vue +0 -100
  287. package/styles/components/fs_data_iterator_item.scss +0 -33
  288. package/styles/components/fs_icon_field.scss +0 -12
  289. package/styles/components/fs_search_field.scss +0 -3
  290. package/styles/components/fs_tag_field.scss +0 -8
  291. package/styles/components/fs_time_field.scss +0 -12
  292. package/styles/components/fs_timeslot_field.scss +0 -12
  293. package/styles/globals/breakpoints.scss +0 -20
  294. package/styles/globals/fixes.scss +0 -5
@@ -3,7 +3,7 @@
3
3
  </template>
4
4
 
5
5
  <script lang="ts">
6
- import { inject, type PropType, onMounted, type Ref, watch } from 'vue';
6
+ import { inject, type PropType, onMounted, type Ref, watch, onUnmounted } from 'vue';
7
7
 
8
8
  import type { Map, Layer } from 'leaflet';
9
9
 
@@ -12,15 +12,15 @@ import { MAP } from './keys';
12
12
  export default {
13
13
  name: 'FSMapTileLayer',
14
14
  props: {
15
- layer: {
16
- type: Object as PropType<Layer>,
15
+ layers: {
16
+ type: Object as PropType<Layer[]>,
17
17
  required: false
18
18
  }
19
19
  },
20
20
  setup(props) {
21
21
  const map = inject<Ref<Map | null>>(MAP);
22
22
 
23
- const lastLayer = props.layer;
23
+ let lastLayers = props.layers;
24
24
 
25
25
  if(!map) {
26
26
  throw new Error('FSMapTileLayer must be used inside a FSMap component');
@@ -31,20 +31,37 @@ export default {
31
31
  }
32
32
 
33
33
  const updateLayer = () => {
34
- if (!props.layer || !map.value) {
34
+ if (!props.layers || !map.value) {
35
35
  return;
36
36
  }
37
37
 
38
- if(lastLayer) {
39
- map.value.removeLayer(lastLayer);
38
+ if(lastLayers) {
39
+ lastLayers.forEach(layer => {
40
+ layer.removeFrom(map.value!);
41
+ });
40
42
  }
41
43
 
42
- props.layer.addTo(map.value);
44
+ lastLayers = [];
45
+
46
+ props.layers.forEach(layer => {
47
+ lastLayers?.push(layer.addTo(map.value!));
48
+ });
43
49
  };
44
50
 
45
51
  onMounted(updateLayer);
46
52
 
47
- watch(() => props.layer, updateLayer);
53
+ onUnmounted(() => {
54
+ if (lastLayers && map.value) {
55
+ lastLayers.forEach(layer => {
56
+ if (map.value.hasLayer(layer)) {
57
+ map.value.removeLayer(layer);
58
+ }
59
+ });
60
+ lastLayers = [];
61
+ }
62
+ });
63
+
64
+ watch(() => props.layers, updateLayer);
48
65
  }
49
66
  };
50
67
  </script>
File without changes
@@ -40,16 +40,16 @@ export default defineComponent({
40
40
 
41
41
  const autoRefreshes = computed((): { id: AutoRefresh; label: string }[] => {
42
42
  const items = [
43
- { id: AutoRefresh.FifteenSeconds, label: $tr("ui.auto-refresh.fifteen-seconds", "Fifteen seconds") },
44
- { id: AutoRefresh.ThirtySeconds, label: $tr("ui.auto-refresh.thirty-seconds", "Thirty seconds") },
45
- { id: AutoRefresh.OneMinute, label: $tr("ui.auto-refresh.one-minute", "One minute") },
46
- { id: AutoRefresh.FiveMinutes, label: $tr("ui.auto-refresh.five-minutes", "Five minutes") },
47
- { id: AutoRefresh.FifteenMinutes, label: $tr("ui.auto-refresh.fifteen-minutes", "Fifteen minutes") },
48
- { id: AutoRefresh.ThirtyMinutes, label: $tr("ui.auto-refresh.thirty-minutes", "Thirty minutes") },
49
- { id: AutoRefresh.OneHour, label: $tr("ui.auto-refresh.one-hour", "One hour") },
43
+ { id: AutoRefresh.FifteenSeconds, label: $tr("ui.common.fifteen-seconds", "Fifteen seconds") },
44
+ { id: AutoRefresh.ThirtySeconds, label: $tr("ui.common.thirty-seconds", "Thirty seconds") },
45
+ { id: AutoRefresh.OneMinute, label: $tr("ui.common.one-minute", "One minute") },
46
+ { id: AutoRefresh.FiveMinutes, label: $tr("ui.common.five-minutes", "Five minutes") },
47
+ { id: AutoRefresh.FifteenMinutes, label: $tr("ui.common.fifteen-minutes", "Fifteen minutes") },
48
+ { id: AutoRefresh.ThirtyMinutes, label: $tr("ui.common.thirty-minutes", "Thirty minutes") },
49
+ { id: AutoRefresh.OneHour, label: $tr("ui.common.one-hour", "One hour") },
50
50
  ];
51
51
  if (props.useNone) {
52
- items.unshift({ id: AutoRefresh.None, label: $tr("ui.auto-refresh.none", "None") });
52
+ items.unshift({ id: AutoRefresh.None, label: $tr("ui.common.none", "None") });
53
53
  }
54
54
  return items;
55
55
  });
@@ -34,9 +34,10 @@ export default defineComponent({
34
34
  const { $tr } = useTranslationsProvider();
35
35
 
36
36
  const dashboardVariableTypes = computed((): { id: DashboardVariableType; label: string }[] => ([
37
- { id: DashboardVariableType.Number, label: $tr("ui.dashboard-variable-type.number", "Number") },
38
- { id: DashboardVariableType.String, label: $tr("ui.dashboard-variable-type.string", "String") },
39
- { id: DashboardVariableType.TimeStep, label: $tr("ui.dashboard-variable-type.time-step", "Time step") }
37
+ { id: DashboardVariableType.Number, label: $tr("ui.common.number", "Number") },
38
+ { id: DashboardVariableType.String, label: $tr("ui.common.string", "String") },
39
+ { id: DashboardVariableType.TimeStep, label: $tr("ui.common.time-step", "Time step")},
40
+ { id: DashboardVariableType.PlotPer, label: $tr("ui.common.plot-per", "Plot per")}
40
41
  ]));
41
42
 
42
43
  return {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSSelectField
3
- class="fs-select-date-setting"
3
+ class="select.date-setting.label"
4
4
  :items="dateSettings"
5
5
  :clearable="false"
6
6
  :modelValue="$props.modelValue"
@@ -88,7 +88,7 @@ export default defineComponent({
88
88
  dateSettings.push({ id: DateSetting.LastPeriod, label: $tr("ui.date-setting.last-period", "Last period") });
89
89
  }
90
90
  if (props.useNone) {
91
- dateSettings.unshift({ id: DateSetting.None, label: $tr("ui.date-setting.none", "None") });
91
+ dateSettings.unshift({ id: DateSetting.None, label: $tr("ui.common.none", "None") });
92
92
  }
93
93
  return dateSettings;
94
94
  })
@@ -40,16 +40,16 @@ export default defineComponent({
40
40
 
41
41
  const days = computed((): { id: Days; label: string }[] => {
42
42
  const items = [
43
- { id: Days.Monday, label: $tr("ui.days.monday", "Monday") },
44
- { id: Days.Tuesday, label: $tr("ui.days.tuesday", "Tuesday") },
45
- { id: Days.Wednesday, label: $tr("ui.days.wednesday", "Wednesday") },
46
- { id: Days.Thursday, label: $tr("ui.days.thursday", "Thursday") },
47
- { id: Days.Friday, label: $tr("ui.days.friday", "Friday") },
48
- { id: Days.Saturday, label: $tr("ui.days.saturday", "Saturday") },
49
- { id: Days.Sunday, label: $tr("ui.days.sunday", "Sunday") }
43
+ { id: Days.Monday, label: $tr("ui.common.monday", "Monday") },
44
+ { id: Days.Tuesday, label: $tr("ui.common.tuesday", "Tuesday") },
45
+ { id: Days.Wednesday, label: $tr("ui.common.wednesday", "Wednesday") },
46
+ { id: Days.Thursday, label: $tr("ui.common.thursday", "Thursday") },
47
+ { id: Days.Friday, label: $tr("ui.common.friday", "Friday") },
48
+ { id: Days.Saturday, label: $tr("ui.common.saturday", "Saturday") },
49
+ { id: Days.Sunday, label: $tr("ui.common.sunday", "Sunday") }
50
50
  ];
51
51
  if (props.useAllDays) {
52
- items.unshift({ id: Days.AllDays, label: $tr("ui.days.all-days", "All days") });
52
+ items.unshift({ id: Days.AllDays, label: $tr("ui.common.all-days", "All days") });
53
53
  }
54
54
  return items;
55
55
  });
@@ -39,8 +39,8 @@ export default defineComponent({
39
39
  const { $tr } = useTranslationsProvider();
40
40
 
41
41
  const items = [
42
- { id: ListModes.Table, label: $tr("ui.common.table-mode", "Table"), icon: "mdi-format-list-bulleted" },
43
- { id: ListModes.Iterator, label: $tr("ui.common.tile-mode", "Tuile"), icon: "mdi-view-grid-outline" },
42
+ { id: ListModes.Table, label: $tr("ui.common.table", "Table"), icon: "mdi-format-list-bulleted" },
43
+ { id: ListModes.Iterator, label: $tr("ui.common.iterator", "Tile"), icon: "mdi-view-grid-outline" },
44
44
  ];
45
45
 
46
46
  return {
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <FSSelectField
3
+ :items="items"
4
+ :modelValue="$props.modelValue"
5
+ @update:modelValue="$emit('update:modelValue', $event)"
6
+ v-bind="$attrs"
7
+ >
8
+ <template
9
+ #item-prepend="{ item }"
10
+ >
11
+ <FSIcon
12
+ :icon="item.icon"
13
+ />
14
+ </template>
15
+ </FSSelectField>
16
+ </template>
17
+
18
+ <script lang="ts">
19
+ import type { PropType} from "vue";
20
+ import { defineComponent } from "vue";
21
+
22
+ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
23
+
24
+ import { MapLayers } from '@dative-gpi/foundation-shared-components/models';
25
+
26
+ import FSSelectField from "../fields/FSSelectField.vue";
27
+ import FSIcon from '@dative-gpi/foundation-shared-components/components/FSIcon.vue';
28
+
29
+ export default defineComponent({
30
+ name: "FSSelectMapLayer",
31
+ components: {
32
+ FSIcon,
33
+ FSSelectField
34
+ },
35
+ props: {
36
+ modelValue: {
37
+ type: [String, Array] as PropType<MapLayers | MapLayers[]>,
38
+ required: false
39
+ }
40
+ },
41
+ emits: ["update:modelValue"],
42
+ setup() {
43
+ const { $tr } = useTranslationsProvider();
44
+
45
+ const items = [
46
+ {
47
+ id: MapLayers.Map,
48
+ icon: 'mdi-map',
49
+ label: $tr("ui.map-layer.map", "Map")
50
+ },
51
+ {
52
+ id: MapLayers.Imagery,
53
+ icon: 'mdi-satellite',
54
+ label: $tr("ui.map-layer.imagery", "Imagery")
55
+ },
56
+ {
57
+ id: MapLayers.Snow,
58
+ icon: 'mdi-snowflake',
59
+ label: $tr("ui.map-layer.snow", "Snow ski map")
60
+ }
61
+ ]
62
+
63
+ return {
64
+ items
65
+ };
66
+ }
67
+ });
68
+ </script>
@@ -40,21 +40,21 @@ export default defineComponent({
40
40
 
41
41
  const months = computed((): { id: Months; label: string }[] => {
42
42
  const items = [
43
- { id: Months.January, label: $tr("ui.months.january", "January") },
44
- { id: Months.February, label: $tr("ui.months.february", "February") },
45
- { id: Months.March, label: $tr("ui.months.march", "March") },
46
- { id: Months.April, label: $tr("ui.months.april", "April") },
47
- { id: Months.May, label: $tr("ui.months.may", "May") },
48
- { id: Months.June, label: $tr("ui.months.june", "June") },
49
- { id: Months.July, label: $tr("ui.months.july", "July") },
50
- { id: Months.August, label: $tr("ui.months.august", "August") },
51
- { id: Months.September, label: $tr("ui.months.september", "September") },
52
- { id: Months.October, label: $tr("ui.months.october", "October") },
53
- { id: Months.November, label: $tr("ui.months.november", "November") },
54
- { id: Months.December, label: $tr("ui.months.december", "December") }
43
+ { id: Months.January, label: $tr("ui.common.january", "January") },
44
+ { id: Months.February, label: $tr("ui.common.february", "February") },
45
+ { id: Months.March, label: $tr("ui.common.march", "March") },
46
+ { id: Months.April, label: $tr("ui.common.april", "April") },
47
+ { id: Months.May, label: $tr("ui.common.may", "May") },
48
+ { id: Months.June, label: $tr("ui.common.june", "June") },
49
+ { id: Months.July, label: $tr("ui.common.july", "July") },
50
+ { id: Months.August, label: $tr("ui.common.august", "August") },
51
+ { id: Months.September, label: $tr("ui.common.september", "September") },
52
+ { id: Months.October, label: $tr("ui.common.october", "October") },
53
+ { id: Months.November, label: $tr("ui.common.november", "November") },
54
+ { id: Months.December, label: $tr("ui.common.december", "December") }
55
55
  ];
56
56
  if (props.useAllMonths) {
57
- items.unshift({ id: Months.AllMonths, label: $tr("ui.months.all-months", "All months") });
57
+ items.unshift({ id: Months.AllMonths, label: $tr("ui.common.all-months", "All months") });
58
58
  }
59
59
  return items;
60
60
  });
@@ -0,0 +1,52 @@
1
+ <template>
2
+ <FSAutocompleteField
3
+ :label="label ?? $tr('autocomplete.aggregation.label','Aggregation')"
4
+ :items="aggregationTypeItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ v-bind="$attrs"
8
+ />
9
+ </template>
10
+
11
+ <script lang="ts">
12
+ import { computed, defineComponent, type PropType } from "vue";
13
+
14
+ import { AggregationType } from "@dative-gpi/foundation-shared-domain/enums";
15
+
16
+ import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
17
+ import { aggregationTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
18
+
19
+ import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
20
+
21
+ export default defineComponent({
22
+ components: {
23
+ FSAutocompleteField
24
+ },
25
+ props: {
26
+ modelValue : {
27
+ type: Number as PropType<AggregationType>,
28
+ required: false
29
+ },
30
+ label : {
31
+ type: String,
32
+ required: false
33
+ }
34
+ },
35
+ emits: ['update:modelValue'],
36
+ setup() {
37
+
38
+ const aggregationTypeItems = computed(()=>{
39
+ return getEnumEntries(AggregationType).filter(f=>f.value != AggregationType.None).map((f)=>{
40
+ return {
41
+ id: f.value,
42
+ label: aggregationTypeLabel(f.value)
43
+ }
44
+ })
45
+ });
46
+
47
+ return {
48
+ aggregationTypeItems
49
+ }
50
+ }
51
+ })
52
+ </script>
@@ -0,0 +1,49 @@
1
+ <template>
2
+ <FSToggleSet
3
+ :hideHeader="true"
4
+ :values="axisTypeItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ v-bind="$attrs"
8
+ />
9
+ </template>
10
+
11
+ <script lang="ts">
12
+ import { computed, defineComponent, type PropType } from "vue";
13
+
14
+ import {AxisType} from "@dative-gpi/foundation-shared-domain/enums";
15
+
16
+ import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
17
+ import { axisTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
18
+
19
+ import FSToggleSet from "@dative-gpi/foundation-shared-components/components/FSToggleSet.vue";
20
+
21
+
22
+ export default defineComponent({
23
+ components: {
24
+ FSToggleSet
25
+ },
26
+ props: {
27
+ modelValue: {
28
+ type: Number as PropType<AxisType>,
29
+ required: false
30
+ }
31
+ },
32
+ emits: ['update:modelValue'],
33
+ setup() {
34
+
35
+ const axisTypeItems = computed(()=>{
36
+ return getEnumEntries(AxisType).map((f)=>{
37
+ return {
38
+ id: f.value,
39
+ label: axisTypeLabel(f.value)
40
+ }
41
+ })
42
+ });
43
+
44
+ return {
45
+ axisTypeItems
46
+ }
47
+ }
48
+ })
49
+ </script>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <FSAutocompleteField
3
+ :label="label ?? $tr('autocomplete.display-as.label','Display as')"
4
+ :items="displayAsItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ v-bind="$attrs"
8
+ />
9
+ </template>
10
+
11
+ <script lang="ts">
12
+ import { computed, defineComponent, type PropType } from "vue";
13
+
14
+ import {DisplayAs} from "@dative-gpi/foundation-shared-domain/enums";
15
+
16
+ import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
17
+ import { displayAsLabel } from "@dative-gpi/foundation-shared-components/tools";
18
+
19
+ import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
20
+
21
+ export default defineComponent({
22
+ components: {
23
+ FSAutocompleteField
24
+ },
25
+ props: {
26
+ modelValue: {
27
+ type: Number as PropType<DisplayAs>,
28
+ required: false
29
+ },
30
+ label: {
31
+ type: String,
32
+ required: false
33
+ }
34
+
35
+ },
36
+ emits: ['update:modelValue'],
37
+ setup() {
38
+
39
+ const displayAsItems = computed(()=>{
40
+ return getEnumEntries(DisplayAs).filter(f=>f.value != DisplayAs.None).map((f)=>{
41
+ return {
42
+ id: f.value,
43
+ label: displayAsLabel(f.value)
44
+ }
45
+ })
46
+ });
47
+
48
+ return {
49
+ displayAsItems,
50
+ }
51
+ }
52
+ })
53
+ </script>
@@ -0,0 +1,54 @@
1
+ <template>
2
+ <FSAutocompleteField
3
+ :label="label ?? $tr('ui.common.filter-type','Filter type')"
4
+ :toggleSet="true"
5
+ :items="filterTypeItems"
6
+ :modelValue="modelValue"
7
+ @update:modelValue="$emit('update:modelValue', $event)"
8
+ v-bind="$attrs"
9
+ />
10
+ </template>
11
+
12
+ <script lang="ts">
13
+ import { computed, defineComponent, type PropType } from "vue";
14
+
15
+ import {FilterType} from "@dative-gpi/foundation-shared-domain/enums";
16
+
17
+ import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
18
+ import { filterTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
19
+
20
+ import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
21
+
22
+ export default defineComponent({
23
+ components: {
24
+ FSAutocompleteField
25
+ },
26
+ props: {
27
+ modelValue: {
28
+ type: Number as PropType<FilterType>,
29
+ required: false,
30
+ default : FilterType.None
31
+ },
32
+ label: {
33
+ type: String,
34
+ required: false
35
+ }
36
+ },
37
+ emits: ['update:modelValue'],
38
+ setup() {
39
+
40
+ const filterTypeItems = computed(()=>{
41
+ return getEnumEntries(FilterType).filter(f=>f.value != FilterType.None).map((f)=>{
42
+ return {
43
+ id: f.value,
44
+ label: filterTypeLabel(f.value)
45
+ }
46
+ })
47
+ });
48
+
49
+ return {
50
+ filterTypeItems
51
+ }
52
+ }
53
+ })
54
+ </script>
@@ -0,0 +1,54 @@
1
+ <template>
2
+ <FSAutocompleteField
3
+ :label="label ?? $tr('autocomplete.heat-rule.label','Heat rule')"
4
+ :items="heatmapRuleItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ v-bind="$attrs"
8
+ />
9
+ </template>
10
+
11
+ <script lang="ts">
12
+ import { computed, defineComponent, type PropType } from "vue";
13
+
14
+ import {HeatmapRule} from "@dative-gpi/foundation-shared-domain/enums";
15
+
16
+ import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
17
+ import { heatmapRuleLabel } from "@dative-gpi/foundation-shared-components/tools";
18
+
19
+ import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
20
+
21
+
22
+ export default defineComponent({
23
+ components: {
24
+ FSAutocompleteField
25
+ },
26
+ props: {
27
+ modelValue: {
28
+ type: Number as PropType<HeatmapRule>,
29
+ required: false
30
+ },
31
+ label: {
32
+ type: String,
33
+ required: false
34
+ }
35
+
36
+ },
37
+ emits: ['update:modelValue'],
38
+ setup() {
39
+
40
+ const heatmapRuleItems = computed(()=>{
41
+ return getEnumEntries(HeatmapRule).filter(f=>f.value != HeatmapRule.None).map((f)=>{
42
+ return {
43
+ id: f.value,
44
+ label: heatmapRuleLabel(f.value)
45
+ }
46
+ })
47
+ });
48
+
49
+ return {
50
+ heatmapRuleItems
51
+ }
52
+ }
53
+ })
54
+ </script>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <FSAutocompleteField
3
+ :label="label ?? $tr('autocomplete.operation-on.label','Operation on')"
4
+ :items="operationOnItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ v-bind="$attrs"
8
+ />
9
+ </template>
10
+
11
+ <script lang="ts">
12
+ import { computed, defineComponent, type PropType } from "vue";
13
+
14
+ import {OperationOn} from "@dative-gpi/foundation-shared-domain/enums";
15
+
16
+ import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
17
+ import { operationOnLabel} from "@dative-gpi/foundation-shared-components/tools";
18
+
19
+ import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
20
+
21
+
22
+ export default defineComponent({
23
+ components: {
24
+ FSAutocompleteField
25
+ },
26
+ props: {
27
+ modelValue: {
28
+ type: Number as PropType<OperationOn>,
29
+ required: false
30
+ },
31
+ label : {
32
+ type: String,
33
+ required: false
34
+ }
35
+ },
36
+ emits: ['update:modelValue'],
37
+ setup() {
38
+
39
+ const operationOnItems = computed(()=>{
40
+ return getEnumEntries(OperationOn).filter(f=>f.value != OperationOn.None).map((f)=>{
41
+ return {
42
+ id: f.value,
43
+ label: operationOnLabel(f.value)
44
+ }
45
+ })
46
+ });
47
+
48
+ return {
49
+ operationOnItems
50
+ }
51
+ }
52
+ })
53
+ </script>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <FSAutocompleteField
3
+ :label="label ?? $tr('autocomplete.planning-type.label','Planning type')"
4
+ :items="planningTypeItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ v-bind="$attrs"
8
+ />
9
+ </template>
10
+
11
+ <script lang="ts">
12
+ import { computed, defineComponent, type PropType } from "vue";
13
+
14
+ import {PlanningType} from "@dative-gpi/foundation-shared-domain/enums";
15
+
16
+ import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
17
+ import { planningTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
18
+
19
+ import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
20
+
21
+
22
+ export default defineComponent({
23
+ components: {
24
+ FSAutocompleteField
25
+ },
26
+ props: {
27
+ modelValue: {
28
+ type: Number as PropType<PlanningType>,
29
+ required: false
30
+ },
31
+ label: {
32
+ type: String,
33
+ required: false
34
+ }
35
+ },
36
+ emits: ['update:modelValue'],
37
+ setup() {
38
+
39
+ const planningTypeItems = computed(()=>{
40
+ return getEnumEntries(PlanningType).filter(f=>f.value != PlanningType.None).map((f)=>{
41
+ return {
42
+ id: f.value,
43
+ label: planningTypeLabel(f.value)
44
+ }
45
+ })
46
+ });
47
+
48
+ return {
49
+ planningTypeItems
50
+ }
51
+ }
52
+ })
53
+ </script>