@dative-gpi/foundation-shared-components 1.0.65 → 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,6 +3,7 @@
3
3
  gap="0"
4
4
  >
5
5
  <FSRow
6
+ :padding="`0 ${paddingRightHours} 0 ${paddingLeftHours}`"
6
7
  class="fs-agenda-hours-row"
7
8
  :wrap="false"
8
9
  gap="0"
@@ -36,14 +37,15 @@
36
37
  </FSRow>
37
38
  </FSRow>
38
39
  <FSRow
39
- class="fs-agenda-hours-row"
40
+ :padding="`0 ${paddingRightMarkers} 0 ${paddingLeftMarkers}`"
41
+ class="fs-agenda-hours-row-markers"
40
42
  :wrap="false"
41
43
  gap="0"
42
44
  >
43
45
  <FSRow
44
- v-for="hour in hours"
45
- :key="hour"
46
- :style="getMarkerStyle(displayNow && hour === modelValue)"
46
+ v-for="hour in 24"
47
+ :key="hour-1"
48
+ :style="getMarkerStyle(displayNow && hour-1 === modelValue)"
47
49
  width="100%"
48
50
  height="0"
49
51
  align="center-center"
@@ -59,7 +61,7 @@
59
61
  <script lang="ts">
60
62
  import { defineComponent, computed, type StyleValue } from 'vue';
61
63
 
62
- import { useColors } from "@dative-gpi/foundation-shared-components/composables";
64
+ import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
63
65
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
64
66
 
65
67
  import FSText from '../FSText.vue';
@@ -87,18 +89,51 @@ export default defineComponent({
87
89
  required: false,
88
90
  default: false,
89
91
  },
92
+ firstColumnWidth: {
93
+ type: String,
94
+ required: true,
95
+ },
90
96
  },
91
- setup() {
97
+ setup(props) {
92
98
  const { getColors } = useColors();
99
+ const { isMobileSized } = useBreakpoints();
93
100
 
94
101
  const lightColors = getColors(ColorEnum.Light);
95
102
  const primaryColors = getColors(ColorEnum.Primary);
96
103
  const fontColor = lightColors.dark;
97
104
 
105
+ const hoursToShow = computed(() => {
106
+ if(isMobileSized.value) {
107
+ return 12;
108
+ }
109
+ return 24;
110
+ });
111
+
98
112
  const hours = computed(() => {
99
- return Array.from({ length: 24 }, (_, i) => i);
113
+ return Array.from({ length: hoursToShow.value }, (_, i) => i * (24 / hoursToShow.value));
114
+ });
115
+
116
+ const paddingLeftHours = computed(() => {
117
+ // ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}) is the width of each hour slot (2 hour if 12 hours are shown, 1 hour if 24 hours are shown)
118
+ // 0.5 * ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}) is half of the width of each hour slot
119
+ // So we have : ${props.firstColumnWidth} - Half of the width of each hour slot
120
+ return `calc(${props.firstColumnWidth} - 0.5 * ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}))`;
100
121
  });
101
122
 
123
+ const paddingRightHours = computed(() => {
124
+ return `calc(0.5 * ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}))`;
125
+ });
126
+
127
+ const paddingLeftMarkers = computed(() => {
128
+ return `calc(${props.firstColumnWidth} - 0.5 * ((100% - ${props.firstColumnWidth}) / 24))`;
129
+ });
130
+
131
+ const paddingRightMarkers = computed(() => {
132
+ return `calc(0.5 * ((100% - ${props.firstColumnWidth}) / 24))`;
133
+ });
134
+
135
+
136
+
102
137
  const getMarkerStyle = (isNowHour: boolean): StyleValue => {
103
138
  if(isNowHour) {
104
139
  return {
@@ -113,8 +148,13 @@ export default defineComponent({
113
148
  const to2Digits = (value: number) => value.toString().padStart(2, '0');
114
149
 
115
150
  return {
116
- fontColor,
117
151
  hours,
152
+ fontColor,
153
+ hoursToShow,
154
+ paddingLeftHours,
155
+ paddingRightHours,
156
+ paddingLeftMarkers,
157
+ paddingRightMarkers,
118
158
  getMarkerStyle,
119
159
  to2Digits
120
160
  };
@@ -131,7 +131,7 @@ export default defineComponent({
131
131
  const height = computed(() => {
132
132
  let start = props.start - dayDurationOffset.value;
133
133
  let end = props.end - dayDurationOffset.value;
134
- if (props.variant === 'current') {
134
+ if (props.variant === 'current' && dayEnd.value > props.now) {
135
135
  end = props.now;
136
136
  } else if (props.end > dayEnd.value) {
137
137
  end = dayEnd.value - dayDurationOffset.value;
@@ -2,7 +2,6 @@
2
2
  <FSRow
3
3
  class="fs-day-agenda"
4
4
  height="100%"
5
- padding="8px 0 0 0"
6
5
  :wrap="false"
7
6
  gap="0px"
8
7
  :style="style"
@@ -9,13 +9,8 @@
9
9
  gap="0"
10
10
  :wrap="false"
11
11
  >
12
- <FSCol
13
- height="100%"
14
- :width="$props.firstColumnWidth"
15
- >
16
- </FSCol>
17
-
18
12
  <FSAgendaHoursRow
13
+ :firstColumnWidth="$props.firstColumnWidth"
19
14
  :displayNow="$props.nowIsInSelectedRange"
20
15
  :modelValue="nowHour"
21
16
  />
@@ -42,8 +42,8 @@ export default defineComponent({
42
42
  const { $tr } = useTranslationsProvider();
43
43
 
44
44
  const items = [
45
- { id: AgendaMode.Week, label: $tr('ui.agenda.week', 'Week'), icon: 'mdi-calendar-week' },
46
- { id: AgendaMode.Month, label: $tr('ui.agenda.month', 'Month'), icon: 'mdi-calendar-month' },
45
+ { id: AgendaMode.Week, label: $tr('ui.common.week', 'Week'), icon: 'mdi-calendar-week' },
46
+ { id: AgendaMode.Month, label: $tr('ui.common.month', 'Month'), icon: 'mdi-calendar-month' },
47
47
  ];
48
48
 
49
49
  return {
@@ -9,13 +9,8 @@
9
9
  gap="0"
10
10
  :wrap="false"
11
11
  >
12
- <FSCol
13
- height="100%"
14
- :width="$props.firstColumnWidth"
15
- >
16
- </FSCol>
17
-
18
12
  <FSAgendaHoursRow
13
+ :firstColumnWidth="$props.firstColumnWidth"
19
14
  :displayNow="$props.nowIsInSelectedRange"
20
15
  :modelValue="nowHour"
21
16
  />
@@ -75,7 +70,7 @@
75
70
  class="fs-agenda-week-number-label"
76
71
  :color="weekTextColor"
77
72
  >
78
- {{ $tr('ui.common.agenda.week-short', 'W{0}',day.weekNumber) }}
73
+ {{ $tr('ui.common.week-short', 'W{0}',day.weekNumber) }}
79
74
  </FSText>
80
75
  </FSCol>
81
76
  </FSCard>
@@ -125,7 +120,7 @@
125
120
  @click="() => $emit('click:eventId', event.id)"
126
121
  >
127
122
  <template
128
- #default="{ label, icon, timeStart, timeEnd, iconBis, variant }"
123
+ #default="{ label, icon, timeStart, timeEnd, iconBis, variant, width }"
129
124
  >
130
125
  <FSRow
131
126
  align="center-left"
@@ -158,7 +153,7 @@
158
153
  </FSRow>
159
154
  </FSCol>
160
155
  <FSCol
161
- v-if="iconBis && variant !== 'current'"
156
+ v-if="iconBis && variant !== 'current' && width > 13"
162
157
  align="center-right"
163
158
  padding="8px 8px 8px 0"
164
159
  width="hug"
@@ -259,7 +254,7 @@ export default defineComponent({
259
254
  $tr('ui.common.monday-short', 'MON'),
260
255
  $tr('ui.common.tuesday-short', 'TUE'),
261
256
  $tr('ui.common.wednesday-short', 'WED'),
262
- $tr('uui.common.thursday-short', 'THU'),
257
+ $tr('ui.common.thursday-short', 'THU'),
263
258
  $tr('ui.common.friday-short', 'FRI'),
264
259
  $tr('ui.common.saturday-short', 'SAT')
265
260
  ];
@@ -1,10 +1,14 @@
1
1
  <template>
2
2
  <FSAutocompleteField
3
+ :label="$props.label ?? $tr('ui.common.address', 'Address')"
3
4
  :clearable="false"
4
5
  :toggleSet="false"
5
6
  :multiple="false"
6
- :items="places"
7
- :modelValue="modelValuePlace"
7
+ :items="items"
8
+ :customFilter="(_label: string, _query: string, item: any) => {
9
+ return item.value !== $props.modelValue?.placeId;
10
+ }"
11
+ :modelValue="$props.modelValue?.placeId"
8
12
  @update:modelValue="onUpdate"
9
13
  v-model:search="search"
10
14
  v-bind="$attrs"
@@ -12,7 +16,7 @@
12
16
  </template>
13
17
 
14
18
  <script lang="ts">
15
- import { defineComponent, onMounted, ref, watch } from "vue";
19
+ import { computed, defineComponent, ref } from "vue";
16
20
 
17
21
  import { type Address, type Place } from "@dative-gpi/foundation-shared-domain/models";
18
22
  import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
@@ -32,13 +36,26 @@ export default defineComponent({
32
36
  required: false,
33
37
  default: null
34
38
  },
39
+ label: {
40
+ type: String,
41
+ required: false,
42
+ default: null
43
+ }
35
44
  },
36
45
  emits: ["update:modelValue"],
37
46
  setup(props, { emit }) {
38
47
  const { search: searchAddress, get: getAddress } = useAddress();
39
48
 
40
49
  const places = ref<Place[]>([]);
41
- const modelValuePlace = ref<Place | null>(null);
50
+
51
+ const items = computed(() => {
52
+ if(props.modelValue) {
53
+ const currentPlace = addressToPlace(props.modelValue);
54
+ const searchedPlaces = places.value.filter((place) => place.id !== currentPlace.id);
55
+ return [currentPlace, ...searchedPlaces];
56
+ }
57
+ return places.value;
58
+ });
42
59
 
43
60
  const fetch = async (search: string | null) => {
44
61
  if (search === null) {
@@ -69,7 +86,9 @@ export default defineComponent({
69
86
  (item) => (item).id,
70
87
  (item) => (item).label,
71
88
  true,
72
- false
89
+ false,
90
+ 0,
91
+ 500
73
92
  );
74
93
 
75
94
  const addressToPlace = (address: Address): Place => {
@@ -79,23 +98,9 @@ export default defineComponent({
79
98
  };
80
99
  };
81
100
 
82
- onMounted(() => {
83
- if(!props.modelValue) {
84
- return;
85
- }
86
- modelValuePlace.value = addressToPlace(props.modelValue);
87
- });
88
-
89
- watch(() => props.modelValue, (newValue) => {
90
- if(!newValue) {
91
- return;
92
- }
93
- modelValuePlace.value = addressToPlace(newValue);
94
- });
95
-
96
101
  return {
97
- modelValuePlace,
98
102
  places,
103
+ items,
99
104
  search,
100
105
  onUpdate
101
106
  };
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <FSAutocompleteField
3
+ :label="$tr('ui.common.language', 'Language')"
3
4
  :toggleSet="!$props.toggleSetDisabled && toggleSet"
4
5
  :multiple="$props.multiple"
5
6
  :placeholder="placeholder"
@@ -58,6 +59,11 @@ export default defineComponent({
58
59
  type: Boolean,
59
60
  required: false,
60
61
  default: false
62
+ },
63
+ label: {
64
+ type: String as PropType<string | null>,
65
+ required: false,
66
+ default: null
61
67
  }
62
68
  },
63
69
  emits: ["update:modelValue"],
@@ -71,7 +77,7 @@ export default defineComponent({
71
77
 
72
78
  const placeholder = computed((): string | null => {
73
79
  if (props.multiple && props.modelValue) {
74
- return $tr("ui.autocomplete-language.placeholder", "{0} language(s) selected", props.modelValue.length);
80
+ return $tr("autocomplete.language.placeholder", "{0} language(s) selected", props.modelValue.length);
75
81
  }
76
82
  return null;
77
83
  });
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <FSAutocompleteField
3
3
  itemTitle="id"
4
+ :label="$tr('ui.common.time-zone', 'Time zone')"
4
5
  :toggleSet="!$props.toggleSetDisabled && toggleSet"
5
6
  :multiple="$props.multiple"
6
7
  :placeholder="placeholder"
@@ -81,6 +82,11 @@ export default defineComponent({
81
82
  type: Boolean,
82
83
  required: false,
83
84
  default: false
85
+ },
86
+ label: {
87
+ type: String as PropType<string | null>,
88
+ required: false,
89
+ default: null
84
90
  }
85
91
  },
86
92
  emits: ["update:modelValue"],
@@ -94,7 +100,7 @@ export default defineComponent({
94
100
 
95
101
  const placeholder = computed((): string | null => {
96
102
  if (props.multiple && props.modelValue) {
97
- return $tr("ui.autocomplete-time-zone.placeholder", "{0} time zone(s) selected", props.modelValue.length);
103
+ return $tr("autocomplete.time-zone.placeholder", "{0} time zone(s) selected", props.modelValue.length);
98
104
  }
99
105
  return null;
100
106
  });
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-plus-circle-outline"
4
- :label="$tr('ui.button.add', 'Add')"
4
+ :label="$tr('ui.common.add', 'Add')"
5
5
  :color="ColorEnum.Primary"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.add', 'Add')"
3
+ :label="$tr('ui.common.add', 'Add')"
4
4
  :color="ColorEnum.Primary"
5
5
  v-bind="$attrs"
6
6
  />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-cancel"
4
- :label="$tr('ui.button.cancel', 'Cancel')"
4
+ :label="$tr('ui.common.cancel', 'Cancel')"
5
5
  :color="ColorEnum.Light"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.cancel', 'Cancel')"
3
+ :label="$tr('ui.common.cancel', 'Cancel')"
4
4
  :color="ColorEnum.Light"
5
5
  v-bind="$attrs"
6
6
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :editable="$props.editable"
3
+ :disabled="$props.disabled"
4
4
  :prependIcon="prependIcon"
5
5
  :load="$props.load"
6
6
  :variant="variant"
@@ -40,10 +40,10 @@ export default defineComponent({
40
40
  required: false,
41
41
  default: false
42
42
  },
43
- editable: {
43
+ disabled: {
44
44
  type: Boolean,
45
45
  required: false,
46
- default: true
46
+ default: false
47
47
  }
48
48
  },
49
49
  emits: ["update:modelValue"],
@@ -57,7 +57,7 @@ export default defineComponent({
57
57
  });
58
58
 
59
59
  const onClick = (): void => {
60
- if (props.editable && !props.load) {
60
+ if (!props.disabled && !props.load) {
61
61
  emit("update:modelValue", !props.modelValue);
62
62
  }
63
63
  };
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-content-copy"
4
- :label="$tr('ui.button.copy', 'Copy')"
4
+ :label="$tr('ui.common.copy', 'Copy')"
5
5
  :color="ColorEnum.Light"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.copy', 'Copy')"
3
+ :label="$tr('ui.common.copy', 'Copy')"
4
4
  :color="ColorEnum.Light"
5
5
  v-bind="$attrs"
6
6
  />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-content-copy"
4
- :label="$tr('ui.button.duplicate', 'Duplicate')"
4
+ :label="$tr('ui.common.duplicate', 'Duplicate')"
5
5
  :color="ColorEnum.Light"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.duplicate', 'Duplicate')"
3
+ :label="$tr('ui.common.duplicate', 'Duplicate')"
4
4
  :color="ColorEnum.Light"
5
5
  v-bind="$attrs"
6
6
  />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-pencil-outline"
4
- :label="$tr('ui.button.edit', 'Edit')"
4
+ :label="$tr('ui.common.edit', 'Edit')"
5
5
  :color="ColorEnum.Light"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.edit', 'Edit')"
3
+ :label="$tr('ui.common.edit', 'Edit')"
4
4
  :color="ColorEnum.Light"
5
5
  v-bind="$attrs"
6
6
  />
@@ -2,7 +2,7 @@
2
2
  <div>
3
3
  <FSButton
4
4
  prependIcon="mdi-upload-outline"
5
- :label="$tr('ui.button.import-file', 'Import file')"
5
+ :label="$tr('ui.common.import-file', 'Import file')"
6
6
  :color="ColorEnum.Light"
7
7
  @click="onClick"
8
8
  v-bind="$attrs"
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <FSButton
4
- :label="$tr('ui.button.import-file', 'Import file')"
4
+ :label="$tr('ui.common.import-file', 'Import file')"
5
5
  :color="ColorEnum.Light"
6
6
  @click="onClick"
7
7
  v-bind="$attrs"
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  appendIcon="mdi-chevron-right"
4
- :label="$tr('ui.button.next', 'Next')"
4
+ :label="$tr('ui.common.next', 'Next')"
5
5
  :color="ColorEnum.Primary"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.next', 'Next')"
3
+ :label="$tr('ui.common.next', 'Next')"
4
4
  :color="ColorEnum.Primary"
5
5
  v-bind="$attrs"
6
6
  />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-chevron-left"
4
- :label="$tr('ui.button.previous', 'Previous')"
4
+ :label="$tr('ui.common.previous', 'Previous')"
5
5
  :color="ColorEnum.Primary"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.previous', 'Previous')"
3
+ :label="$tr('ui.common.previous', 'Previous')"
4
4
  :color="ColorEnum.Primary"
5
5
  v-bind="$attrs"
6
6
  />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-redo-variant"
4
- :label="$tr('ui.button.redo', 'Redo')"
4
+ :label="$tr('ui.common.redo', 'Redo')"
5
5
  :color="ColorEnum.Light"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.redo', 'Redo')"
3
+ :label="$tr('ui.common.redo', 'Redo')"
4
4
  :color="ColorEnum.Light"
5
5
  v-bind="$attrs"
6
6
  />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-delete-outline"
4
- :label="$tr('ui.button.remove', 'Remove')"
4
+ :label="$tr('ui.common.remove', 'Remove')"
5
5
  :color="ColorEnum.Error"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.remove', 'Remove')"
3
+ :label="$tr('ui.common.remove', 'Remove')"
4
4
  :color="ColorEnum.Error"
5
5
  v-bind="$attrs"
6
6
  />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-content-save-outline"
4
- :label="$tr('ui.button.save', 'Save')"
4
+ :label="$tr('ui.common.save', 'Save')"
5
5
  :color="ColorEnum.Primary"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.save', 'Save')"
3
+ :label="$tr('ui.common.save', 'Save')"
4
4
  :color="ColorEnum.Primary"
5
5
  v-bind="$attrs"
6
6
  />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-magnify"
4
- :label="$tr('ui.button.search', 'Search')"
4
+ :label="$tr('ui.common.search', 'Search')"
5
5
  :color="ColorEnum.Primary"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.search', 'Search')"
3
+ :label="$tr('ui.common.search', 'Search')"
4
4
  :color="ColorEnum.Primary"
5
5
  v-bind="$attrs"
6
6
  />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-undo-variant"
4
- :label="$tr('ui.button.undo', 'Undo')"
4
+ :label="$tr('ui.common.undo', 'Undo')"
5
5
  :color="ColorEnum.Light"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.undo', 'Undo')"
3
+ :label="$tr('ui.common.undo', 'Undo')"
4
4
  :color="ColorEnum.Light"
5
5
  v-bind="$attrs"
6
6
  />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-pencil-outline"
4
- :label="$tr('ui.button.update', 'Update')"
4
+ :label="$tr('ui.common.update', 'Update')"
5
5
  :color="ColorEnum.Primary"
6
6
  v-bind="$attrs"
7
7
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.update', 'Update')"
3
+ :label="$tr('ui.common.update', 'Update')"
4
4
  :color="ColorEnum.Primary"
5
5
  v-bind="$attrs"
6
6
  />
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-check"
4
- :label="$tr('ui.button.validate', 'Validate')"
4
+ :label="$tr('ui.common.validate', 'Validate')"
5
5
  :color="ColorEnum.Primary"
6
6
  v-bind="$attrs"
7
7
  />