@dative-gpi/foundation-shared-components 1.0.57 → 1.0.58-groupings

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 (297) 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 +16 -16
  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/FSColorIcon.vue +23 -5
  16. package/components/FSDialog.vue +2 -1
  17. package/components/FSDialogContent.vue +12 -11
  18. package/components/FSDialogForm.vue +22 -2
  19. package/components/FSDialogFormBody.vue +50 -31
  20. package/components/FSDialogMenu.vue +17 -8
  21. package/components/FSDialogMultiFormBody.vue +23 -13
  22. package/components/FSDialogRemove.vue +7 -8
  23. package/components/FSDialogSubmit.vue +20 -11
  24. package/components/FSEditImage.vue +1 -1
  25. package/components/FSEditImageUI.vue +20 -10
  26. package/components/FSFadeOut.vue +53 -21
  27. package/components/FSForm.vue +10 -8
  28. package/components/FSGrid.vue +1 -1
  29. package/components/FSIcon.vue +4 -3
  30. package/components/FSIconCard.vue +68 -12
  31. package/components/FSImage.vue +9 -2
  32. package/components/FSImageUI.vue +8 -15
  33. package/components/FSInformationsMenu.vue +142 -0
  34. package/components/FSInstantPicker.vue +269 -0
  35. package/components/FSLink.vue +25 -9
  36. package/components/FSLoader.vue +28 -10
  37. package/components/FSMenu.vue +47 -0
  38. package/components/FSOptionGroup.vue +57 -9
  39. package/components/FSOptionItem.vue +4 -4
  40. package/components/FSPagination.vue +1 -1
  41. package/components/FSPlayButtons.vue +72 -0
  42. package/components/FSProgressBar.vue +94 -0
  43. package/components/FSRadio.vue +5 -4
  44. package/components/FSRadioGroup.vue +3 -3
  45. package/components/FSRouterLink.vue +42 -0
  46. package/components/FSSlideGroup.vue +19 -5
  47. package/components/FSSlider.vue +6 -5
  48. package/components/FSSpan.vue +12 -7
  49. package/components/FSSwitch.vue +47 -21
  50. package/components/FSTab.vue +15 -13
  51. package/components/FSTabs.vue +32 -7
  52. package/components/FSTag.vue +16 -5
  53. package/components/FSTagGroup.vue +4 -4
  54. package/components/FSText.vue +11 -7
  55. package/components/FSToggleSet.vue +7 -7
  56. package/components/FSWindow.vue +122 -5
  57. package/components/FSWrapGroup.vue +13 -1
  58. package/components/agenda/FSAgenda.vue +26 -7
  59. package/components/agenda/FSAgendaDialogCalendar.vue +2 -2
  60. package/components/agenda/FSAgendaHeader.vue +35 -10
  61. package/components/agenda/FSAgendaHorizontalEvent.vue +18 -6
  62. package/components/agenda/FSAgendaHoursRow.vue +48 -8
  63. package/components/agenda/FSAgendaVerticalEvent.vue +1 -1
  64. package/components/agenda/FSDayAgenda.vue +1 -2
  65. package/components/agenda/FSMonthAgenda.vue +3 -9
  66. package/components/agenda/FSSelectAgendaMode.vue +2 -2
  67. package/components/agenda/FSWeekAgenda.vue +7 -13
  68. package/components/autocompletes/FSAutoCompleteAddress.vue +25 -20
  69. package/components/autocompletes/FSAutocompleteLanguage.vue +7 -1
  70. package/components/autocompletes/FSAutocompleteTimeZone.vue +7 -1
  71. package/components/buttons/FSButtonAdd.vue +1 -1
  72. package/components/buttons/FSButtonAddLabel.vue +1 -1
  73. package/components/buttons/FSButtonCancel.vue +1 -1
  74. package/components/buttons/FSButtonCancelLabel.vue +1 -1
  75. package/components/buttons/FSButtonCheckbox.vue +4 -4
  76. package/components/buttons/FSButtonCopy.vue +1 -1
  77. package/components/buttons/FSButtonCopyLabel.vue +1 -1
  78. package/components/buttons/FSButtonDuplicate.vue +1 -1
  79. package/components/buttons/FSButtonDuplicateLabel.vue +1 -1
  80. package/components/buttons/FSButtonEdit.vue +1 -1
  81. package/components/buttons/FSButtonEditLabel.vue +1 -1
  82. package/components/buttons/FSButtonFile.vue +1 -1
  83. package/components/buttons/FSButtonFileLabel.vue +1 -1
  84. package/components/buttons/FSButtonNext.vue +1 -1
  85. package/components/buttons/FSButtonNextLabel.vue +1 -1
  86. package/components/buttons/FSButtonPrevious.vue +1 -1
  87. package/components/buttons/FSButtonPreviousLabel.vue +1 -1
  88. package/components/buttons/FSButtonRedo.vue +1 -1
  89. package/components/buttons/FSButtonRedoLabel.vue +1 -1
  90. package/components/buttons/FSButtonRemove.vue +1 -1
  91. package/components/buttons/FSButtonRemoveLabel.vue +1 -1
  92. package/components/buttons/FSButtonSave.vue +1 -1
  93. package/components/buttons/FSButtonSaveLabel.vue +1 -1
  94. package/components/buttons/FSButtonSearch.vue +1 -1
  95. package/components/buttons/FSButtonSearchLabel.vue +1 -1
  96. package/components/buttons/FSButtonUndo.vue +1 -1
  97. package/components/buttons/FSButtonUndoLabel.vue +1 -1
  98. package/components/buttons/FSButtonUpdate.vue +1 -1
  99. package/components/buttons/FSButtonUpdateLabel.vue +1 -1
  100. package/components/buttons/FSButtonValidate.vue +1 -1
  101. package/components/buttons/FSButtonValidateLabel.vue +1 -1
  102. package/components/calendar/FSSimpleCalendar.vue +145 -0
  103. package/components/calendar/FSSimpleCalendarHeader.vue +60 -0
  104. package/components/calendar/FSSimpleMonthSelector.vue +138 -0
  105. package/components/deviceOrganisations/FSConnectivity.vue +16 -4
  106. package/components/deviceOrganisations/FSConnectivityCard.vue +17 -45
  107. package/components/deviceOrganisations/FSStatus.vue +16 -4
  108. package/components/deviceOrganisations/FSStatusCard.vue +33 -59
  109. package/components/deviceOrganisations/FSStatusRichCard.vue +171 -0
  110. package/components/deviceOrganisations/FSStatusesCarousel.vue +1 -0
  111. package/components/deviceOrganisations/FSStatusesRow.vue +8 -2
  112. package/components/deviceOrganisations/FSWorstAlert.vue +37 -42
  113. package/components/deviceOrganisations/FSWorstAlertCard.vue +35 -84
  114. package/components/fields/FSAutocompleteField.vue +85 -82
  115. package/components/fields/FSAutocompleteTag.vue +1 -1
  116. package/components/fields/FSBaseField.vue +54 -30
  117. package/components/fields/FSClosableSearchField.vue +83 -0
  118. package/components/fields/FSColorField.vue +48 -44
  119. package/components/fields/FSCommentField.vue +28 -16
  120. package/components/fields/FSDateField.vue +13 -10
  121. package/components/fields/FSDateRangeField.vue +6 -5
  122. package/components/fields/FSDateTimeField.vue +14 -11
  123. package/components/fields/FSDateTimeRangeDialog.vue +160 -0
  124. package/components/fields/FSDateTimeRangeField.vue +23 -115
  125. package/components/fields/FSEntityFieldUI.vue +36 -19
  126. package/components/fields/FSGradientField.vue +5 -5
  127. package/components/fields/FSIconField.vue +16 -9
  128. package/components/fields/FSMagicConfigField.vue +15 -7
  129. package/components/fields/FSMagicField.vue +7 -2
  130. package/components/fields/FSNumberField.vue +9 -4
  131. package/components/fields/FSPasswordField.vue +7 -7
  132. package/components/fields/FSRichTextField.vue +78 -58
  133. package/components/fields/FSSearchField.vue +9 -115
  134. package/components/fields/FSSelectField.vue +69 -71
  135. package/components/fields/FSTagField.vue +10 -10
  136. package/components/fields/FSTermField.vue +72 -47
  137. package/components/fields/FSTextArea.vue +17 -11
  138. package/components/fields/FSTextField.vue +15 -10
  139. package/components/fields/FSTimeField.vue +14 -10
  140. package/components/fields/FSTimeRangeField.vue +310 -0
  141. package/components/fields/FSTimeStepField.vue +5 -5
  142. package/components/fields/FSTranslateField.vue +10 -10
  143. package/components/fields/FSTranslateRichTextField.vue +41 -20
  144. package/components/fields/FSTranslateTextArea.vue +10 -10
  145. package/components/fields/FSTreeViewField.vue +15 -13
  146. package/components/fields/periodicField/FSPeriodicDailyField.vue +7 -7
  147. package/components/fields/periodicField/FSPeriodicField.vue +15 -15
  148. package/components/fields/periodicField/FSPeriodicMonthlyField.vue +16 -16
  149. package/components/fields/periodicField/FSPeriodicWeeklyField.vue +28 -18
  150. package/components/fields/periodicField/FSPeriodicYearlyField.vue +12 -12
  151. package/components/lists/FSDataIteratorItem.vue +23 -67
  152. package/components/lists/FSDataTableUI.vue +220 -137
  153. package/components/lists/FSDraggable.vue +2 -2
  154. package/components/lists/FSFilterButton.vue +14 -16
  155. package/components/lists/FSHeaderButton.vue +11 -9
  156. package/components/lists/FSHiddenButton.vue +9 -9
  157. package/components/lists/FSLoadDataTable.vue +10 -7
  158. package/components/lists/FSSimpleList.vue +95 -82
  159. package/components/lists/FSSimpleListItem.vue +131 -0
  160. package/components/map/FSMap.vue +146 -158
  161. package/components/map/FSMapFeatureGroup.vue +7 -1
  162. package/components/map/FSMapLayerButton.vue +4 -3
  163. package/components/map/FSMapMarker.vue +70 -48
  164. package/components/map/FSMapMarkerClusterGroup.vue +32 -7
  165. package/components/map/FSMapOverlay.vue +44 -24
  166. package/components/map/FSMapPolygon.vue +16 -4
  167. package/components/map/FSMapTileLayer.vue +26 -9
  168. package/components/map/layers.ts +0 -0
  169. package/components/selects/FSSelectAutoRefresh.vue +8 -8
  170. package/components/selects/FSSelectDashboardVariableType.vue +4 -3
  171. package/components/selects/FSSelectDateSetting.vue +2 -2
  172. package/components/selects/FSSelectDays.vue +8 -8
  173. package/components/selects/FSSelectListMode.vue +2 -2
  174. package/components/selects/FSSelectMapLayer.vue +68 -0
  175. package/components/selects/FSSelectMonths.vue +13 -13
  176. package/components/selects/chartSelectors/FSAggregationSelector.vue +52 -0
  177. package/components/selects/chartSelectors/FSAxisTypeSelector.vue +49 -0
  178. package/components/selects/chartSelectors/FSDisplayAsSelector.vue +53 -0
  179. package/components/selects/chartSelectors/FSFilterTypeSelector.vue +54 -0
  180. package/components/selects/chartSelectors/FSHeatmapRuleSelector.vue +54 -0
  181. package/components/selects/chartSelectors/FSOperationOnSelector.vue +53 -0
  182. package/components/selects/chartSelectors/FSPlanningTypeSelector.vue +53 -0
  183. package/components/selects/chartSelectors/FSPlotPerSelector.vue +52 -0
  184. package/components/selects/chartSelectors/FSSelectEntityType.vue +59 -0
  185. package/components/selects/chartSelectors/FSSerieTypeSelector.vue +53 -0
  186. package/components/tiles/FSAlertTileUI.vue +90 -0
  187. package/components/tiles/FSChartTileUI.vue +61 -52
  188. package/components/tiles/FSCommentTileUI.vue +38 -13
  189. package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +14 -2
  190. package/components/tiles/FSDashboardShallowTileUI.vue +14 -2
  191. package/components/tiles/FSDeviceOrganisationTileUI.vue +6 -6
  192. package/components/tiles/FSGroupTileUI.vue +58 -110
  193. package/components/tiles/FSGroupingTileUI.vue +115 -0
  194. package/components/tiles/FSLoadTile.vue +16 -10
  195. package/components/tiles/FSLocationTileUI.vue +63 -55
  196. package/components/tiles/FSModelTileUI.vue +5 -46
  197. package/components/tiles/FSServiceAccountOrganisationTileUI.vue +0 -6
  198. package/components/tiles/FSSimpleTileUI.vue +34 -29
  199. package/components/tiles/FSTile.vue +46 -39
  200. package/components/tiles/FSUserOrganisationTileUI.vue +1 -7
  201. package/components/toggleSets/FSToggleSetPosition.vue +1 -1
  202. package/components/views/FSBaseView.vue +64 -0
  203. package/components/views/FSEntityView.vue +12 -140
  204. package/components/views/FSSimpleView.vue +29 -0
  205. package/components/views/desktop/FSBaseDefaultDesktopView.vue +135 -0
  206. package/components/views/desktop/FSBaseDesktopView.vue +53 -0
  207. package/components/views/desktop/FSBaseEntityDesktopView.vue +211 -0
  208. package/components/views/mobile/FSBaseDefaultMobileView.vue +133 -0
  209. package/components/views/mobile/FSBaseEntityMobileView.vue +206 -0
  210. package/components/views/mobile/FSBaseMobileView.vue +53 -0
  211. package/composables/index.ts +1 -0
  212. package/composables/useAddress.ts +40 -8
  213. package/composables/useBreakpoints.ts +40 -4
  214. package/composables/useColors.ts +16 -7
  215. package/composables/useMagicFieldProvider.ts +1 -0
  216. package/composables/useMapLayers.ts +62 -0
  217. package/composables/useSlots.ts +2 -1
  218. package/models/colors.ts +2 -1
  219. package/models/deviceAlerts.ts +1 -0
  220. package/models/magicFields.ts +1 -0
  221. package/models/map.ts +12 -10
  222. package/models/rules.ts +6 -3
  223. package/models/tables.ts +5 -2
  224. package/models/variableNode.ts +8 -5
  225. package/package.json +5 -5
  226. package/styles/components/fs_agenda.scss +4 -0
  227. package/styles/components/fs_agenda_event.scss +1 -1
  228. package/styles/components/fs_agenda_hours_row.scss +0 -8
  229. package/styles/components/fs_autocomplete_field.scss +0 -13
  230. package/styles/components/fs_breadcrumbs.scss +18 -36
  231. package/styles/components/fs_button.scss +7 -5
  232. package/styles/components/fs_calendar.scss +1 -0
  233. package/styles/components/fs_card.scss +9 -0
  234. package/styles/components/fs_chip.scss +13 -7
  235. package/styles/components/fs_clickable.scss +16 -23
  236. package/styles/components/fs_clock.scss +0 -10
  237. package/styles/components/fs_col.scss +1 -1
  238. package/styles/components/fs_color_field.scss +1 -4
  239. package/styles/components/fs_data_table.scss +6 -9
  240. package/styles/components/fs_dialog.scss +4 -10
  241. package/styles/components/fs_dialog_menu.scss +4 -2
  242. package/styles/components/fs_draggable.scss +0 -5
  243. package/styles/components/fs_edit_image.scss +8 -0
  244. package/styles/components/fs_fade_out.scss +10 -2
  245. package/styles/components/fs_filter_button.scss +1 -6
  246. package/styles/components/fs_hidden_button.scss +2 -7
  247. package/styles/components/fs_image_card.scss +6 -4
  248. package/styles/components/fs_magic_config_field.scss +1 -2
  249. package/styles/components/fs_map.scss +57 -17
  250. package/styles/components/fs_meta_field.scss +3 -5
  251. package/styles/components/fs_option_group.scss +15 -5
  252. package/styles/components/fs_password_field.scss +4 -2
  253. package/styles/components/fs_progress_bar.scss +14 -0
  254. package/styles/components/fs_radio.scss +0 -11
  255. package/styles/components/fs_rich_text_field.scss +1 -10
  256. package/styles/components/fs_select_field.scss +4 -13
  257. package/styles/components/fs_slide_group.scss +7 -0
  258. package/styles/components/fs_span.scss +13 -5
  259. package/styles/components/fs_status_rich_card.scss +6 -0
  260. package/styles/components/fs_switch.scss +1 -0
  261. package/styles/components/fs_tabs.scss +19 -34
  262. package/styles/components/fs_tag.scss +8 -22
  263. package/styles/components/fs_text_area.scss +2 -21
  264. package/styles/components/fs_tile.scss +0 -19
  265. package/styles/components/fs_window.scss +3 -1
  266. package/styles/components/fs_wrap_group.scss +7 -0
  267. package/styles/components/index.scss +2 -6
  268. package/styles/globals/index.scss +1 -5
  269. package/styles/globals/overrides.scss +28 -61
  270. package/styles/globals/scrollbars.scss +8 -0
  271. package/styles/globals/text_fonts.scss +18 -66
  272. package/styles/globals/touchscreen.scss +2 -2
  273. package/tools/alertsTools.ts +87 -12
  274. package/tools/chartsTools.ts +143 -16
  275. package/tools/index.ts +3 -1
  276. package/tools/reportsTools.ts +38 -0
  277. package/tools/timeRangeTools.ts +125 -0
  278. package/utils/badge.ts +9 -5
  279. package/utils/filter.ts +7 -4
  280. package/utils/index.ts +1 -0
  281. package/utils/leafletMarkers.ts +4 -4
  282. package/utils/operations.ts +108 -0
  283. package/utils/sort.ts +2 -2
  284. package/utils/time.ts +16 -16
  285. package/components/fields/FSTimeSlotField.vue +0 -250
  286. package/components/views/FSEntityHeader.vue +0 -350
  287. package/components/views/FSListHeader.vue +0 -83
  288. package/components/views/FSListView.vue +0 -83
  289. package/components/views/FSSkeletonView.vue +0 -100
  290. package/styles/components/fs_data_iterator_item.scss +0 -33
  291. package/styles/components/fs_icon_field.scss +0 -12
  292. package/styles/components/fs_search_field.scss +0 -3
  293. package/styles/components/fs_tag_field.scss +0 -8
  294. package/styles/components/fs_time_field.scss +0 -12
  295. package/styles/components/fs_timeslot_field.scss +0 -12
  296. package/styles/globals/breakpoints.scss +0 -20
  297. package/styles/globals/fixes.scss +0 -5
@@ -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
  />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('ui.button.validate', 'Validate')"
3
+ :label="$tr('ui.common.validate', 'Validate')"
4
4
  :color="ColorEnum.Primary"
5
5
  v-bind="$attrs"
6
6
  />
@@ -0,0 +1,145 @@
1
+ <template>
2
+ <FSCol>
3
+ <FSRow
4
+ v-if="$props.showHeader"
5
+ :wrap="false"
6
+ >
7
+ <FSCol
8
+ v-for="i in 7"
9
+ :key="i"
10
+ :style="{
11
+ minWidth: `calc((100% - 8px * 7) / 7)`,
12
+ maxWidth: `calc((100% - 8px * 7) / 7)`
13
+ }"
14
+ align="center-center"
15
+ >
16
+ {{ dayLabel(i - 1) }}
17
+ </FSCol>
18
+ </FSRow>
19
+ <FSRow>
20
+ <FSCol
21
+ v-for="date in days"
22
+ :key="$props.month + $props.year + date.date.toISOString()"
23
+ :style="{
24
+ minWidth: `calc((100% - 8px * 7) / 7)`,
25
+ maxWidth: `calc((100% - 8px * 7) / 7)`
26
+ }"
27
+ align="center-center"
28
+ height="hug"
29
+ >
30
+ <slot
31
+ name="day"
32
+ v-bind="date"
33
+ />
34
+ </FSCol>
35
+ </FSRow>
36
+ </FSCol>
37
+ </template>
38
+
39
+ <script lang="ts">
40
+ import { startOfWeek, endOfWeek, endOfMonth, isSameDay, isBefore, isAfter, isSameMonth, addDays } from "date-fns";
41
+ import { defineComponent, computed } from "vue";
42
+
43
+ import { dayLabel } from "../../tools";
44
+
45
+ import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
46
+
47
+ import FSRow from "../FSRow.vue";
48
+ import FSCol from "../FSCol.vue";
49
+
50
+ export default defineComponent({
51
+ name: "FSCalendarHeader",
52
+ components: {
53
+ FSRow,
54
+ FSCol
55
+ },
56
+ props: {
57
+ year: {
58
+ type: Number,
59
+ required: true
60
+ },
61
+ month: {
62
+ type: Number,
63
+ required: true
64
+ },
65
+ showHeader: {
66
+ type: Boolean,
67
+ default: true
68
+ }
69
+ },
70
+ setup(props) {
71
+
72
+ const { getMachineOffset } = useAppTimeZone();
73
+
74
+ const firstDayOfMonth = computed(() => {
75
+ const date = new Date(props.year, props.month - 1, 1);
76
+ const offset = getMachineOffset(date.getTime());
77
+
78
+ date.setTime(date.getTime() + offset);
79
+
80
+ return date;
81
+ })
82
+
83
+ const firstMonday = computed(() => {
84
+ const day = new Date(firstDayOfMonth.value);
85
+
86
+ const date = startOfWeek(day, { weekStartsOn: 1 });
87
+ const offset = getMachineOffset(date.getTime());
88
+
89
+ date.setTime(date.getTime() + offset);
90
+
91
+ return date;
92
+ });
93
+
94
+ const endDayOfMonth = computed(() => {
95
+ const day = new Date(firstDayOfMonth.value);
96
+
97
+ const date = endOfMonth(day);
98
+ const offset = getMachineOffset(date.getTime());
99
+
100
+ date.setTime(date.getTime() + offset);
101
+
102
+ return date;
103
+ });
104
+
105
+ const lastSunday = computed(() => {
106
+ const day = new Date(endDayOfMonth.value);
107
+
108
+ const date = endOfWeek(day, { weekStartsOn: 1 });
109
+ const offset = getMachineOffset(date.getTime());
110
+
111
+ date.setTime(date.getTime() + offset);
112
+
113
+ return date;
114
+ });
115
+
116
+ const days = computed(() => {
117
+ const result = [];
118
+
119
+ let currentDay = new Date(firstMonday.value);
120
+ const today = new Date();
121
+
122
+ while (currentDay <= lastSunday.value) {
123
+ result.push({
124
+ date: new Date(currentDay),
125
+ isToday: isSameDay(currentDay, today),
126
+ isPast: isBefore(currentDay, today) && !isSameDay(currentDay, today),
127
+ isFutur: isAfter(currentDay, today) && !isSameDay(currentDay, today),
128
+ isPreviousMonth: isBefore(currentDay, firstDayOfMonth.value),
129
+ isNextMonth: isAfter(currentDay, endDayOfMonth.value),
130
+ isCurrentMonth: isSameMonth(currentDay, firstDayOfMonth.value)
131
+ });
132
+
133
+ currentDay = addDays(currentDay, 1);
134
+ }
135
+
136
+ return result;
137
+ });
138
+
139
+ return {
140
+ dayLabel,
141
+ days
142
+ };
143
+ }
144
+ });
145
+ </script>
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <FSRow>
3
+ <FSSimpleMonthSelector
4
+ width="hug"
5
+ :year="$props.year"
6
+ :month="$props.month"
7
+ @update:year="$emit('update:year', $event)"
8
+ @update:month="$emit('update:month', $event)"
9
+ @update="$emit('update', $event)"
10
+ />
11
+ <FSButton
12
+ :label="$tr('ui.common.today', 'Today')"
13
+ icon="mdi-calendar-today"
14
+ @click="onToday"
15
+ />
16
+ </FSRow>
17
+ </template>
18
+
19
+ <script lang="ts">
20
+ import { defineComponent } from "vue";
21
+
22
+ import FSRow from "../FSRow.vue";
23
+ import FSButton from "../FSButton.vue";
24
+
25
+ import FSSimpleMonthSelector from "./FSSimpleMonthSelector.vue";
26
+
27
+ export default defineComponent({
28
+ name: "FSCalendarHeader",
29
+ components: {
30
+ FSRow,
31
+ FSButton,
32
+ FSSimpleMonthSelector
33
+ },
34
+ props: {
35
+ year: {
36
+ type: Number,
37
+ required: true
38
+ },
39
+ month: {
40
+ type: Number,
41
+ required: true
42
+ }
43
+ },
44
+ setup(_props, { emit }) {
45
+ const onToday = () => {
46
+ const now = new Date();
47
+ emit("update:year", now.getFullYear());
48
+ emit("update:month", now.getMonth() + 1);
49
+ emit("update", {
50
+ year: now.getFullYear(),
51
+ month: now.getMonth() + 1
52
+ });
53
+ };
54
+
55
+ return {
56
+ onToday
57
+ };
58
+ }
59
+ });
60
+ </script>
@@ -0,0 +1,138 @@
1
+ <template>
2
+ <FSRow
3
+ align="center-center"
4
+ >
5
+ <FSButtonPreviousIcon
6
+ @click="onPrevious"
7
+ />
8
+ <FSRow>
9
+ <!-- TODO : mettre un VMenu sur le FSColor pour pouvoir changer d'année plus vite -->
10
+ <FSColor
11
+ :border="false"
12
+ padding="0px 30px"
13
+ :color="$props.color"
14
+ width="100%"
15
+ :height="[40, 36]"
16
+ style="min-width: 210px;"
17
+ >
18
+ <FSRow
19
+ width="100%"
20
+ height="100%"
21
+ align="center-center"
22
+ >
23
+ <FSSpan
24
+ font="text-h3"
25
+ >
26
+ {{ monthToString($props.month) }}
27
+ </FSSpan>
28
+ <FSSpan
29
+ font="text-h3"
30
+ >
31
+ {{ $props.year }}
32
+ </FSSpan>
33
+ </FSRow>
34
+ </FSColor>
35
+ </FSRow>
36
+ <FSButtonNextIcon
37
+ @click="onNext"
38
+ />
39
+ </FSRow>
40
+ </template>
41
+
42
+ <script lang="ts">
43
+ import { defineComponent, type PropType } from "vue";
44
+
45
+ import { useTranslations } from "@dative-gpi/bones-ui";
46
+ import { Months } from '@dative-gpi/foundation-shared-domain/enums';
47
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
48
+
49
+ import FSRow from "../FSRow.vue";
50
+ import FSSpan from "../FSSpan.vue";
51
+ import FSColor from "../FSColor.vue";
52
+
53
+ import FSButtonNextIcon from "../buttons/FSButtonNextIcon.vue";
54
+ import FSButtonPreviousIcon from "../buttons/FSButtonPreviousIcon.vue";
55
+
56
+ export default defineComponent({
57
+ name: "FSMonthSelector",
58
+ components: {
59
+ FSRow,
60
+ FSSpan,
61
+ FSColor,
62
+ FSButtonNextIcon,
63
+ FSButtonPreviousIcon
64
+ },
65
+ props: {
66
+ color: {
67
+ type: String,
68
+ required: false,
69
+ default: ColorEnum.Primary
70
+ },
71
+ month: {
72
+ type: Number as PropType<Months>,
73
+ required: true
74
+ },
75
+ year: {
76
+ type: Number,
77
+ required: true
78
+ }
79
+ },
80
+ emits: ["update:month", "update:year", "update"],
81
+ setup(props, { emit }) {
82
+ const { $tr } = useTranslations();
83
+
84
+ const monthToString = (month: number) => {
85
+ switch(month) {
86
+ case Months.January:
87
+ return $tr("ui.common.january", "January");
88
+ case Months.February:
89
+ return $tr("ui.common.february", "February");
90
+ case Months.March:
91
+ return $tr("ui.common.march", "March");
92
+ case Months.April:
93
+ return $tr("ui.common.april", "April");
94
+ case Months.May:
95
+ return $tr("ui.common.may", "May");
96
+ case Months.June:
97
+ return $tr("ui.common.june", "June");
98
+ case Months.July:
99
+ return $tr("ui.common.july", "July");
100
+ case Months.August:
101
+ return $tr("ui.common.august", "August");
102
+ case Months.September:
103
+ return $tr("ui.common.september", "September");
104
+ case Months.October:
105
+ return $tr("ui.common.october", "October");
106
+ case Months.November:
107
+ return $tr("ui.common.november", "November");
108
+ case Months.December:
109
+ return $tr("ui.common.december", "December");
110
+ }
111
+ }
112
+
113
+ const onNext = () => {
114
+ emit("update:month", props.month === 12 ? 1 : props.month + 1);
115
+ emit("update:year", props.month === 12 ? props.year + 1 : props.year);
116
+ emit("update", {
117
+ month: props.month === 12 ? 1 : props.month + 1,
118
+ year: props.month === 12 ? props.year + 1 : props.year
119
+ })
120
+ }
121
+
122
+ const onPrevious = () => {
123
+ emit("update:month", props.month === 1 ? 12 : props.month - 1);
124
+ emit("update:year", props.month === 1 ? props.year - 1 : props.year);
125
+ emit("update", {
126
+ month: props.month === 1 ? 12 : props.month - 1,
127
+ year: props.month === 1 ? props.year - 1 : props.year
128
+ })
129
+ }
130
+
131
+ return {
132
+ monthToString,
133
+ onNext,
134
+ onPrevious
135
+ };
136
+ }
137
+ });
138
+ </script>
@@ -1,14 +1,16 @@
1
1
  <template>
2
- <v-menu
2
+ <FSMenu
3
3
  :closeOnContentClick="false"
4
4
  v-model="menu"
5
+ location="bottom center"
5
6
  >
6
7
  <template
7
8
  #activator="{ props }"
8
9
  >
9
10
  <FSColorIcon
10
11
  class="fs-stopclick"
11
- size="m"
12
+ :size="$props.size"
13
+ :padding="$props.padding"
12
14
  :color="$props.deviceConnectivity.color"
13
15
  @click.prevent.stop
14
16
  v-bind="props"
@@ -20,7 +22,7 @@
20
22
  :deviceConnectivity="$props.deviceConnectivity"
21
23
  @close="menu = false"
22
24
  />
23
- </v-menu>
25
+ </FSMenu>
24
26
  </template>
25
27
 
26
28
  <script lang="ts">
@@ -31,17 +33,27 @@ import type { FSDeviceConnectivity } from "@dative-gpi/foundation-shared-compone
31
33
 
32
34
  import FSConnectivityCard from "./FSConnectivityCard.vue";
33
35
  import FSColorIcon from "../FSColorIcon.vue";
36
+ import FSMenu from '../FSMenu.vue';
34
37
 
35
38
  export default defineComponent({
36
39
  name: "FSConnectivity",
37
40
  components: {
38
41
  FSConnectivityCard,
39
- FSColorIcon
42
+ FSColorIcon,
43
+ FSMenu
40
44
  },
41
45
  props: {
42
46
  deviceConnectivity: {
43
47
  type: Object as PropType<FSDeviceConnectivity>,
44
48
  required: true
49
+ },
50
+ size: {
51
+ type: [Array, String, Number] as PropType<"s" | "m" | "l" | string[] | number[] | string | number | null>,
52
+ default: "m"
53
+ },
54
+ padding: {
55
+ type: [String, Number] as PropType<string | number>,
56
+ default: "8px"
45
57
  }
46
58
  },
47
59
  setup() {