@dative-gpi/foundation-shared-components 1.0.36 → 1.0.37-report-v1

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 (271) hide show
  1. package/components/FSBreadcrumbs.vue +21 -12
  2. package/components/FSButton.vue +10 -10
  3. package/components/FSCalendar.vue +52 -14
  4. package/components/FSCalendarTwin.vue +96 -40
  5. package/components/FSCard.vue +28 -7
  6. package/components/FSCardPlaceholder.vue +8 -5
  7. package/components/FSChip.vue +12 -2
  8. package/components/FSClickable.vue +12 -13
  9. package/components/FSClock.vue +16 -7
  10. package/components/FSColorIcon.vue +23 -5
  11. package/components/FSDialog.vue +2 -1
  12. package/components/FSDialogContent.vue +12 -11
  13. package/components/FSDialogForm.vue +22 -2
  14. package/components/FSDialogFormBody.vue +47 -28
  15. package/components/FSDialogMenu.vue +17 -8
  16. package/components/FSDialogMultiFormBody.vue +77 -54
  17. package/components/FSDialogRemove.vue +8 -8
  18. package/components/FSDialogSubmit.vue +17 -8
  19. package/components/FSEditImage.vue +1 -1
  20. package/components/FSEditImageUI.vue +20 -10
  21. package/components/FSFadeOut.vue +53 -21
  22. package/components/FSForm.vue +10 -8
  23. package/components/FSGrid.vue +1 -1
  24. package/components/FSIcon.vue +2 -1
  25. package/components/FSIconCard.vue +47 -7
  26. package/components/FSImage.vue +12 -4
  27. package/components/FSImageUI.vue +8 -15
  28. package/components/FSInstantPicker.vue +266 -0
  29. package/components/FSLink.vue +25 -9
  30. package/components/FSLoader.vue +28 -11
  31. package/components/FSOptionGroup.vue +51 -3
  32. package/components/FSPlayButtons.vue +72 -0
  33. package/components/FSProgressBar.vue +94 -0
  34. package/components/FSRouterLink.vue +42 -0
  35. package/components/FSSlideGroup.vue +19 -5
  36. package/components/FSSpan.vue +17 -7
  37. package/components/FSSwitch.vue +57 -27
  38. package/components/FSTab.vue +15 -13
  39. package/components/FSTabs.vue +32 -7
  40. package/components/FSTag.vue +14 -3
  41. package/components/FSTagGroup.vue +1 -1
  42. package/components/FSText.vue +11 -7
  43. package/components/FSWindow.vue +128 -4
  44. package/components/FSWrapGroup.vue +13 -1
  45. package/components/agenda/FSAgenda.vue +223 -0
  46. package/components/agenda/FSAgendaDialogCalendar.vue +76 -0
  47. package/components/agenda/FSAgendaHeader.vue +215 -0
  48. package/components/agenda/FSAgendaHorizontalEvent.vue +174 -0
  49. package/components/agenda/FSAgendaHorizontalTimeLineMarker.vue +46 -0
  50. package/components/agenda/FSAgendaHoursCol.vue +103 -0
  51. package/components/agenda/FSAgendaHoursRow.vue +164 -0
  52. package/components/agenda/FSAgendaVerticalEvent.vue +160 -0
  53. package/components/agenda/FSAgendaVerticalTimeLineMarker.vue +46 -0
  54. package/components/agenda/FSDayAgenda.vue +199 -0
  55. package/components/agenda/FSMonthAgenda.vue +252 -0
  56. package/components/agenda/FSSelectAgendaMode.vue +54 -0
  57. package/components/agenda/FSWeekAgenda.vue +323 -0
  58. package/components/autocompletes/FSAutoCompleteAddress.vue +22 -20
  59. package/components/autocompletes/FSAutocompleteLanguage.vue +7 -1
  60. package/components/autocompletes/FSAutocompleteTimeZone.vue +7 -1
  61. package/components/buttons/FSButtonAdd.vue +1 -1
  62. package/components/buttons/FSButtonAddLabel.vue +1 -1
  63. package/components/buttons/FSButtonCancel.vue +1 -1
  64. package/components/buttons/FSButtonCancelLabel.vue +1 -1
  65. package/components/buttons/FSButtonCopy.vue +1 -1
  66. package/components/buttons/FSButtonCopyLabel.vue +1 -1
  67. package/components/buttons/FSButtonDragIcon.vue +27 -0
  68. package/components/buttons/FSButtonDuplicate.vue +1 -1
  69. package/components/buttons/FSButtonDuplicateLabel.vue +1 -1
  70. package/components/buttons/FSButtonEdit.vue +1 -1
  71. package/components/buttons/FSButtonEditLabel.vue +1 -1
  72. package/components/buttons/FSButtonFile.vue +1 -1
  73. package/components/buttons/FSButtonFileLabel.vue +1 -1
  74. package/components/buttons/FSButtonNext.vue +1 -1
  75. package/components/buttons/FSButtonNextLabel.vue +1 -1
  76. package/components/buttons/FSButtonPrevious.vue +1 -1
  77. package/components/buttons/FSButtonPreviousLabel.vue +1 -1
  78. package/components/buttons/FSButtonRedo.vue +1 -1
  79. package/components/buttons/FSButtonRedoLabel.vue +1 -1
  80. package/components/buttons/FSButtonRemove.vue +1 -1
  81. package/components/buttons/FSButtonRemoveLabel.vue +1 -1
  82. package/components/buttons/FSButtonSave.vue +1 -1
  83. package/components/buttons/FSButtonSaveLabel.vue +1 -1
  84. package/components/buttons/FSButtonSearch.vue +1 -1
  85. package/components/buttons/FSButtonSearchLabel.vue +1 -1
  86. package/components/buttons/FSButtonUndo.vue +1 -1
  87. package/components/buttons/FSButtonUndoLabel.vue +1 -1
  88. package/components/buttons/FSButtonUpdate.vue +1 -1
  89. package/components/buttons/FSButtonUpdateLabel.vue +1 -1
  90. package/components/buttons/FSButtonValidate.vue +1 -1
  91. package/components/buttons/FSButtonValidateLabel.vue +1 -1
  92. package/components/calendar/FSSimpleCalendar.vue +145 -0
  93. package/components/calendar/FSSimpleCalendarHeader.vue +60 -0
  94. package/components/calendar/FSSimpleMonthSelector.vue +138 -0
  95. package/components/deviceOrganisations/FSConnectivity.vue +11 -1
  96. package/components/deviceOrganisations/FSConnectivityCard.vue +19 -47
  97. package/components/deviceOrganisations/FSStatus.vue +11 -1
  98. package/components/deviceOrganisations/FSStatusCard.vue +35 -61
  99. package/components/deviceOrganisations/FSStatusesCarousel.vue +1 -0
  100. package/components/deviceOrganisations/FSStatusesRow.vue +9 -3
  101. package/components/deviceOrganisations/FSWorstAlert.vue +30 -37
  102. package/components/deviceOrganisations/FSWorstAlertCard.vue +36 -85
  103. package/components/fields/FSAutocompleteField.vue +445 -463
  104. package/components/fields/FSAutocompleteTag.vue +1 -1
  105. package/components/fields/FSBaseField.vue +44 -27
  106. package/components/fields/FSColorField.vue +42 -39
  107. package/components/fields/FSCommentField.vue +105 -0
  108. package/components/fields/FSDateField.vue +3 -2
  109. package/components/fields/FSDateRangeField.vue +3 -2
  110. package/components/fields/FSDateTimeField.vue +4 -3
  111. package/components/fields/FSDateTimeRangeField.vue +8 -6
  112. package/components/fields/FSEntityFieldUI.vue +271 -0
  113. package/components/fields/FSGradientField.vue +27 -33
  114. package/components/fields/FSIconField.vue +0 -1
  115. package/components/fields/FSMagicConfigField.vue +10 -3
  116. package/components/fields/FSMagicField.vue +9 -4
  117. package/components/fields/FSNumberField.vue +6 -1
  118. package/components/fields/FSRichTextField.vue +102 -52
  119. package/components/fields/FSSearchField.vue +9 -115
  120. package/components/fields/FSSelectField.vue +477 -252
  121. package/components/fields/FSTagField.vue +1 -1
  122. package/components/fields/FSTermField.vue +42 -17
  123. package/components/fields/FSTextArea.vue +26 -7
  124. package/components/fields/FSTextField.vue +8 -3
  125. package/components/fields/FSTimeRangeField.vue +304 -0
  126. package/components/fields/FSTimeStepField.vue +3 -3
  127. package/components/fields/FSTranslateField.vue +4 -3
  128. package/components/fields/FSTranslateRichTextField.vue +32 -12
  129. package/components/fields/FSTranslateTextArea.vue +233 -0
  130. package/components/fields/periodicField/FSPeriodicDailyField.vue +2 -2
  131. package/components/fields/periodicField/FSPeriodicField.vue +8 -8
  132. package/components/fields/periodicField/FSPeriodicMonthlyField.vue +8 -8
  133. package/components/fields/periodicField/FSPeriodicWeeklyField.vue +23 -13
  134. package/components/fields/periodicField/FSPeriodicYearlyField.vue +6 -6
  135. package/components/lists/FSDataTableUI.vue +173 -103
  136. package/components/lists/FSDraggable.vue +2 -2
  137. package/components/lists/FSFilterButton.vue +7 -11
  138. package/components/lists/FSHeaderButton.vue +4 -4
  139. package/components/lists/FSHiddenButton.vue +3 -5
  140. package/components/lists/FSLoadDataTable.vue +10 -7
  141. package/components/lists/FSSimpleList.vue +234 -0
  142. package/components/lists/FSSimpleListItem.vue +132 -0
  143. package/components/map/FSMap.vue +83 -33
  144. package/components/map/FSMapFeatureGroup.vue +2 -2
  145. package/components/map/FSMapLayerButton.vue +3 -3
  146. package/components/map/FSMapMarker.vue +11 -7
  147. package/components/map/FSMapMarkerClusterGroup.vue +8 -3
  148. package/components/map/FSMapOverlay.vue +37 -20
  149. package/components/map/FSMapPolygon.vue +5 -5
  150. package/components/map/FSMapTileLayer.vue +2 -2
  151. package/components/map/keys.ts +3 -3
  152. package/components/selects/FSSelectAutoRefresh.vue +9 -9
  153. package/components/selects/FSSelectDashboardVariableType.vue +5 -4
  154. package/components/selects/FSSelectDateSetting.vue +3 -2
  155. package/components/selects/FSSelectDays.vue +9 -9
  156. package/components/selects/FSSelectListMode.vue +51 -0
  157. package/components/selects/FSSelectMonths.vue +14 -14
  158. package/components/selects/chartSelectors/FSAggregationSelector.vue +52 -0
  159. package/components/selects/chartSelectors/FSAxisTypeSelector.vue +49 -0
  160. package/components/selects/chartSelectors/FSDisplayAsSelector.vue +53 -0
  161. package/components/selects/chartSelectors/FSFilterTypeSelector.vue +54 -0
  162. package/components/selects/chartSelectors/FSHeatmapRuleSelector.vue +54 -0
  163. package/components/selects/chartSelectors/FSOperationOnSelector.vue +53 -0
  164. package/components/selects/chartSelectors/FSPlanningTypeSelector.vue +53 -0
  165. package/components/selects/chartSelectors/FSPlotPerSelector.vue +52 -0
  166. package/components/selects/chartSelectors/FSSelectEntityType.vue +59 -0
  167. package/components/selects/chartSelectors/FSSerieTypeSelector.vue +53 -0
  168. package/components/tiles/FSAlertTileUI.vue +90 -0
  169. package/components/tiles/FSChartTileUI.vue +111 -0
  170. package/components/tiles/FSCommentTileUI.vue +174 -0
  171. package/components/tiles/FSDeviceOrganisationTileUI.vue +6 -0
  172. package/components/tiles/FSGroupTileUI.vue +2 -2
  173. package/components/tiles/FSLoadTile.vue +2 -0
  174. package/components/tiles/FSLocationTileUI.vue +192 -0
  175. package/components/tiles/FSModelTileUI.vue +18 -0
  176. package/components/tiles/FSSimpleTileUI.vue +9 -4
  177. package/components/tiles/FSTile.vue +93 -74
  178. package/components/tiles/FSUserOrganisationTileUI.vue +1 -1
  179. package/components/toggleSets/FSToggleSetPosition.vue +2 -2
  180. package/components/views/FSBaseView.vue +64 -0
  181. package/components/views/FSEntityView.vue +12 -140
  182. package/components/views/FSSimpleView.vue +29 -0
  183. package/components/views/desktop/FSBaseDefaultDesktopView.vue +135 -0
  184. package/components/views/desktop/FSBaseDesktopView.vue +53 -0
  185. package/components/views/desktop/FSBaseEntityDesktopView.vue +209 -0
  186. package/components/views/mobile/FSBaseDefaultMobileView.vue +133 -0
  187. package/components/views/mobile/FSBaseEntityMobileView.vue +199 -0
  188. package/components/views/mobile/FSBaseMobileView.vue +53 -0
  189. package/composables/useBreakpoints.ts +39 -3
  190. package/composables/useColors.ts +3 -2
  191. package/composables/useMagicFieldProvider.ts +1 -0
  192. package/composables/useSlots.ts +2 -1
  193. package/models/agenda.ts +9 -0
  194. package/models/deviceAlerts.ts +1 -1
  195. package/models/deviceConnectivities.ts +1 -1
  196. package/models/index.ts +1 -0
  197. package/models/magicFields.ts +1 -0
  198. package/models/map.ts +2 -2
  199. package/models/rules.ts +8 -5
  200. package/models/tables.ts +5 -2
  201. package/models/variableNode.ts +8 -5
  202. package/package.json +5 -5
  203. package/styles/components/fs_agenda.scss +36 -0
  204. package/styles/components/fs_agenda_event.scss +41 -0
  205. package/styles/components/fs_agenda_hours_col.scss +4 -0
  206. package/styles/components/fs_agenda_hours_row.scss +5 -0
  207. package/styles/components/fs_agenda_time_line_marker.scss +19 -0
  208. package/styles/components/fs_autocomplete_field.scss +0 -13
  209. package/styles/components/fs_breadcrumbs.scss +18 -36
  210. package/styles/components/fs_button.scss +7 -5
  211. package/styles/components/fs_chip.scss +8 -6
  212. package/styles/components/fs_clickable.scss +18 -23
  213. package/styles/components/fs_clock.scss +0 -10
  214. package/styles/components/fs_color_field.scss +1 -4
  215. package/styles/components/fs_data_iterator_item.scss +12 -10
  216. package/styles/components/fs_data_table.scss +6 -9
  217. package/styles/components/fs_dialog.scss +7 -17
  218. package/styles/components/fs_dialog_menu.scss +4 -2
  219. package/styles/components/fs_edit_image.scss +8 -0
  220. package/styles/components/fs_fade_out.scss +10 -2
  221. package/styles/components/fs_filter_button.scss +1 -6
  222. package/styles/components/fs_gradient_field.scss +11 -11
  223. package/styles/components/fs_hidden_button.scss +2 -7
  224. package/styles/components/fs_image_card.scss +6 -4
  225. package/styles/components/fs_magic_config_field.scss +1 -2
  226. package/styles/components/fs_map.scss +11 -7
  227. package/styles/components/fs_meta_field.scss +3 -5
  228. package/styles/components/fs_option_group.scss +15 -5
  229. package/styles/components/fs_password_field.scss +4 -2
  230. package/styles/components/fs_progress_bar.scss +14 -0
  231. package/styles/components/fs_radio.scss +0 -11
  232. package/styles/components/fs_rich_text_field.scss +1 -9
  233. package/styles/components/fs_select_date_settings.scss +3 -0
  234. package/styles/components/fs_select_field.scss +4 -13
  235. package/styles/components/fs_slide_group.scss +7 -0
  236. package/styles/components/fs_span.scss +13 -4
  237. package/styles/components/fs_switch.scss +1 -0
  238. package/styles/components/fs_tabs.scss +19 -33
  239. package/styles/components/fs_tag.scss +8 -22
  240. package/styles/components/fs_text_area.scss +13 -17
  241. package/styles/components/fs_tile.scss +21 -15
  242. package/styles/components/fs_window.scss +7 -0
  243. package/styles/components/fs_wrap_group.scss +7 -0
  244. package/styles/components/index.scss +6 -4
  245. package/styles/globals/index.scss +1 -5
  246. package/styles/globals/overrides.scss +28 -61
  247. package/styles/globals/scrollbars.scss +10 -0
  248. package/styles/globals/text_fonts.scss +18 -66
  249. package/tools/alertsTools.ts +69 -0
  250. package/tools/chartsTools.ts +427 -0
  251. package/tools/index.ts +4 -0
  252. package/tools/reportsTools.ts +38 -0
  253. package/tools/timeRangeTools.ts +125 -0
  254. package/utils/filter.ts +18 -0
  255. package/utils/index.ts +2 -0
  256. package/utils/leafletMarkers.ts +4 -4
  257. package/utils/operations.ts +69 -0
  258. package/utils/sort.ts +2 -2
  259. package/utils/statuses.ts +1 -1
  260. package/utils/time.ts +17 -17
  261. package/components/fields/FSTimeSlotField.vue +0 -250
  262. package/components/views/FSEntityHeader.vue +0 -350
  263. package/components/views/FSListHeader.vue +0 -83
  264. package/components/views/FSListView.vue +0 -83
  265. package/components/views/FSSkeletonView.vue +0 -100
  266. package/styles/components/fs_icon_field.scss +0 -12
  267. package/styles/components/fs_tag_field.scss +0 -8
  268. package/styles/components/fs_time_field.scss +0 -12
  269. package/styles/components/fs_timeslot_field.scss +0 -12
  270. package/styles/globals/breakpoints.scss +0 -20
  271. package/styles/globals/fixes.scss +0 -5
@@ -0,0 +1,323 @@
1
+ <template>
2
+ <FSCol
3
+ class="fs-agenda-month-container"
4
+ height="100%"
5
+ width="100%"
6
+ gap="0"
7
+ >
8
+ <FSRow
9
+ gap="0"
10
+ :wrap="false"
11
+ >
12
+ <FSAgendaHoursRow
13
+ :firstColumnWidth="$props.firstColumnWidth"
14
+ :displayNow="$props.nowIsInSelectedRange"
15
+ :modelValue="nowHour"
16
+ />
17
+ </FSRow>
18
+ <FSRow
19
+ class="fs-agenda-month"
20
+ height="100%"
21
+ :style="style"
22
+ :wrap="false"
23
+ gap="0px"
24
+ >
25
+ <FSCol
26
+ class="fs-agenda-label-day-container"
27
+ height="100%"
28
+ gap="0"
29
+ :width="$props.firstColumnWidth"
30
+ >
31
+ <FSCol
32
+ class="fs-agenda-label-day"
33
+ v-for="day in weekDays"
34
+ :style="getDayLabelStyle(day.isNowDay)"
35
+ :key="day.dayNumber"
36
+ height="100%"
37
+ width="100%"
38
+ >
39
+ <FSCard
40
+ height="100%"
41
+ width="100%"
42
+ :borderRadius="0"
43
+ :border="false"
44
+ variant="standard"
45
+ :color="day.isNowDay ? 'primary' : 'background'"
46
+ >
47
+ <FSCol
48
+ padding="6px"
49
+ height="100%"
50
+ width="100%"
51
+ gap="2px"
52
+ align="center-left"
53
+ >
54
+ <FSCol
55
+ gap="0px"
56
+ >
57
+ <FSSpan
58
+ font="text-overline"
59
+ >
60
+ {{ day.dayName }}
61
+ </FSSpan>
62
+ <FSSpan
63
+ font="text-h3"
64
+ >
65
+ {{ to2Digits(day.dayNumber) }}
66
+ </FSSpan>
67
+ </FSCol>
68
+ <FSText
69
+ font="text-overline"
70
+ class="fs-agenda-week-number-label"
71
+ :color="weekTextColor"
72
+ >
73
+ {{ $tr('ui.common.week-short', 'W{0}',day.weekNumber) }}
74
+ </FSText>
75
+ </FSCol>
76
+ </FSCard>
77
+ </FSCol>
78
+
79
+ </FSCol>
80
+ <FSCol
81
+ class="fs-agenda-body"
82
+ gap="0"
83
+ height="100%"
84
+ width="100%"
85
+ >
86
+ <slot />
87
+ <template
88
+ v-if="loading"
89
+ >
90
+ <FSLoader
91
+ height="100%"
92
+ width="100%"
93
+ padding="2px"
94
+ />
95
+ </template>
96
+ <template
97
+ v-else
98
+ >
99
+ <FSRow
100
+ v-for="day in weekDays"
101
+ :key="day.dayNumber"
102
+ class="fs-agenda-row-day"
103
+ height="100%"
104
+ width="fill"
105
+ align="center-left"
106
+ >
107
+ <FSAgendaHorizontalEvent
108
+ v-for="event in getDayEvents(day.dayStartEpoch)"
109
+ :key="event.id"
110
+ :variant="event.end < now ? 'past' : event.start > now ? 'future' : 'current'"
111
+ :now="now"
112
+ :dayStart="day.dayStartEpoch"
113
+ :label="event.label"
114
+ :start="event.start"
115
+ :end="event.end"
116
+ :icon="event.icon"
117
+ :iconBis="event.iconBis"
118
+ :id="event.id"
119
+ :color="event.color"
120
+ @click="() => $emit('click:eventId', event.id)"
121
+ >
122
+ <template
123
+ #default="{ label, icon, timeStart, timeEnd, iconBis, variant, width }"
124
+ >
125
+ <FSRow
126
+ align="center-left"
127
+ gap="4px"
128
+ :wrap="false"
129
+ >
130
+ <FSCol
131
+ height="100%"
132
+ width="fill"
133
+ align="center-left"
134
+ padding="8px 0 8px 8px"
135
+ >
136
+ <FSSpan>
137
+ {{ `${timeStart} - ${timeEnd}` }}
138
+ </FSSpan>
139
+ <FSRow
140
+ align="center-left"
141
+ :wrap="false"
142
+ >
143
+ <FSIcon
144
+ v-if="icon"
145
+ :icon="icon"
146
+ size="24px"
147
+ />
148
+ <FSSpan
149
+ font="text-button"
150
+ >
151
+ {{ label }}
152
+ </FSSpan>
153
+ </FSRow>
154
+ </FSCol>
155
+ <FSCol
156
+ v-if="iconBis && variant !== 'current' && width > 13"
157
+ align="center-right"
158
+ padding="8px 8px 8px 0"
159
+ width="hug"
160
+ >
161
+ <FSIcon
162
+ :icon="iconBis"
163
+ size="20px"
164
+ />
165
+ </FSCol>
166
+ </FSRow>
167
+ </template>
168
+ </FSAgendaHorizontalEvent>
169
+ </FSRow>
170
+ </template>
171
+ </FSCol>
172
+ </FSRow>
173
+ </FSCol>
174
+ </template>
175
+
176
+ <script lang="ts">
177
+ import { defineComponent, computed, type PropType, type StyleValue } from 'vue';
178
+
179
+ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui";
180
+ import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
181
+
182
+ import { useColors } from "@dative-gpi/foundation-shared-components/composables";
183
+ import { ColorEnum, type FSAgendaEvent } from "@dative-gpi/foundation-shared-components/models";
184
+
185
+ import FSAgendaHorizontalEvent from './FSAgendaHorizontalEvent.vue';
186
+ import FSAgendaHoursRow from './FSAgendaHoursRow.vue';
187
+ import FSCard from '../FSCard.vue';
188
+ import FSCol from '../FSCol.vue';
189
+ import FSRow from '../FSRow.vue';
190
+ import FSLoader from '../FSLoader.vue';
191
+ import FSSpan from '../FSSpan.vue';
192
+ import FSIcon from '../FSIcon.vue';
193
+ import FSText from '../FSText.vue';
194
+
195
+ export default defineComponent({
196
+ name: 'FSWeekAgenda',
197
+ components: {
198
+ FSAgendaHorizontalEvent,
199
+ FSAgendaHoursRow,
200
+ FSCard,
201
+ FSCol,
202
+ FSIcon,
203
+ FSLoader,
204
+ FSRow,
205
+ FSSpan,
206
+ FSText
207
+ },
208
+ props: {
209
+ now: {
210
+ type: Number,
211
+ required: true
212
+ },
213
+ start: {
214
+ type: Number,
215
+ required: true
216
+ },
217
+ end: {
218
+ type: Number,
219
+ required: true
220
+ },
221
+ nowIsInSelectedRange: {
222
+ type: Boolean,
223
+ required: true
224
+ },
225
+ firstColumnWidth: {
226
+ type: String,
227
+ required: true
228
+ },
229
+ loading: {
230
+ type: Boolean,
231
+ default: false
232
+ },
233
+ events: {
234
+ type: Array as PropType<FSAgendaEvent[]>,
235
+ default: () => []
236
+ }
237
+ },
238
+ emits: ['click:eventId'],
239
+ setup(props) {
240
+ const { $tr } = useTranslationsProvider();
241
+ const { getColors } = useColors();
242
+ const { epochToWeekNumber } = useDateFormat();
243
+
244
+ const primaryColors = getColors(ColorEnum.Primary);
245
+ const lightColors = getColors(ColorEnum.Light);
246
+
247
+ const weekTextColor = lightColors.dark;
248
+
249
+ const nowHour = computed(() => new Date(props.now).getHours());
250
+
251
+ const weekDays = computed(() => {
252
+ const daysOfWeek = [
253
+ $tr('ui.common.sunday-short', 'SUN'),
254
+ $tr('ui.common.monday-short', 'MON'),
255
+ $tr('ui.common.tuesday-short', 'TUE'),
256
+ $tr('ui.common.wednesday-short', 'WED'),
257
+ $tr('ui.common.thursday-short', 'THU'),
258
+ $tr('ui.common.friday-short', 'FRI'),
259
+ $tr('ui.common.saturday-short', 'SAT')
260
+ ];
261
+ const weekDaysArray = [];
262
+ const nowDate = new Date(props.now);
263
+
264
+ let currentDay = new Date(props.start);
265
+ const endDate = new Date(props.end);
266
+
267
+ while (currentDay <= endDate) {
268
+ weekDaysArray.push({
269
+ dayNumber: currentDay.getDate(),
270
+ dayName: daysOfWeek[currentDay.getDay()],
271
+ dayStartEpoch: currentDay.getTime(),
272
+ weekNumber: epochToWeekNumber(currentDay.getTime()),
273
+ isNowDay: currentDay.toDateString() === nowDate.toDateString(),
274
+ });
275
+
276
+ currentDay.setDate(currentDay.getDate() + 1);
277
+ }
278
+
279
+ return weekDaysArray;
280
+ });
281
+
282
+ const style = computed((): StyleValue => {
283
+ return {
284
+ '--fs-agenda-row-day-border-bottom-color': lightColors.base,
285
+ };
286
+ });
287
+
288
+ const to2Digits = (value: number | string) => {
289
+ return value.toString().padStart(2, '0');
290
+ };
291
+
292
+ const getDayLabelStyle = (isNowDay: boolean = false) => {
293
+ if (isNowDay) {
294
+ return {
295
+ '--fs-agenda-label-day-border-bottom-color': primaryColors.base,
296
+ '--fs-agenda-label-day-border-right-color': lightColors.base,
297
+ };
298
+ }
299
+ return {
300
+ '--fs-agenda-label-day-border-bottom-color': lightColors.base,
301
+ '--fs-agenda-label-day-border-right-color': lightColors.base,
302
+ };
303
+ };
304
+
305
+ const getDayEvents = (dayStartEpoch: number) => {
306
+ return props.events.filter((event) => {
307
+ const dayEndEpoch = dayStartEpoch + 1000 * 60 * 60 * 24;
308
+ return event.start < dayEndEpoch && event.end > dayStartEpoch;
309
+ });
310
+ };
311
+
312
+ return {
313
+ style,
314
+ nowHour,
315
+ weekDays,
316
+ weekTextColor,
317
+ getDayEvents,
318
+ getDayLabelStyle,
319
+ to2Digits
320
+ };
321
+ },
322
+ });
323
+ </script>
@@ -1,10 +1,11 @@
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
+ :modelValue="$props.modelValue?.placeId"
8
9
  @update:modelValue="onUpdate"
9
10
  v-model:search="search"
10
11
  v-bind="$attrs"
@@ -12,7 +13,7 @@
12
13
  </template>
13
14
 
14
15
  <script lang="ts">
15
- import { defineComponent, onMounted, ref, watch } from "vue";
16
+ import { computed, defineComponent, ref } from "vue";
16
17
 
17
18
  import { type Address, type Place } from "@dative-gpi/foundation-shared-domain/models";
18
19
  import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
@@ -32,13 +33,26 @@ export default defineComponent({
32
33
  required: false,
33
34
  default: null
34
35
  },
36
+ label: {
37
+ type: String,
38
+ required: false,
39
+ default: null
40
+ }
35
41
  },
36
42
  emits: ["update:modelValue"],
37
43
  setup(props, { emit }) {
38
44
  const { search: searchAddress, get: getAddress } = useAddress();
39
45
 
40
46
  const places = ref<Place[]>([]);
41
- const modelValuePlace = ref<Place | null>(null);
47
+
48
+ const items = computed(() => {
49
+ if(props.modelValue) {
50
+ const currentPlace = addressToPlace(props.modelValue);
51
+ const searchedPlaces = places.value.filter((place) => place.id !== currentPlace.id);
52
+ return [currentPlace, ...searchedPlaces];
53
+ }
54
+ return places.value;
55
+ });
42
56
 
43
57
  const fetch = async (search: string | null) => {
44
58
  if (search === null) {
@@ -69,7 +83,9 @@ export default defineComponent({
69
83
  (item) => (item).id,
70
84
  (item) => (item).label,
71
85
  true,
72
- false
86
+ false,
87
+ 0,
88
+ 500
73
89
  );
74
90
 
75
91
  const addressToPlace = (address: Address): Place => {
@@ -79,23 +95,9 @@ export default defineComponent({
79
95
  };
80
96
  };
81
97
 
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
98
  return {
97
- modelValuePlace,
98
99
  places,
100
+ items,
99
101
  search,
100
102
  onUpdate
101
103
  };
@@ -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,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
  />
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <FSButton
3
+ icon="mdi-drag"
4
+ variant="icon"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ import { defineComponent } from "vue";
11
+
12
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
13
+
14
+ import FSButton from "../FSButton.vue";
15
+
16
+ export default defineComponent({
17
+ name: "FSButtonCopyIcon",
18
+ components: {
19
+ FSButton
20
+ },
21
+ setup() {
22
+ return {
23
+ ColorEnum
24
+ }
25
+ }
26
+ });
27
+ </script>
@@ -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
  />