@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
@@ -5,22 +5,31 @@ let initialized = false;
5
5
  const windowHeight = ref(window.innerHeight);
6
6
  const windowWidth = ref(window.innerWidth);
7
7
 
8
+ const windowOuterWidth = ref(!window.document.hasFocus() && window.outerWidth === 0 ? window.innerWidth : window.outerWidth);
9
+
8
10
  export const useBreakpoints = () => {
9
11
  const onSizeChange = (): void => {
10
12
  windowHeight.value = window.innerHeight;
11
13
  windowWidth.value = window.innerWidth;
14
+
15
+ // Bug in chromium based browsers where window.outerWidth is 0 when tab loads without focus
16
+ if (!window.document.hasFocus() && window.outerWidth === 0) {
17
+ windowOuterWidth.value = window.innerWidth;
18
+ return;
19
+ }
20
+ windowOuterWidth.value = window.outerWidth;
12
21
  };
13
22
 
14
23
  const isTouchScreenEnabled = computed((): boolean => {
15
- return navigator.maxTouchPoints > 0;
24
+ return window.matchMedia('(hover: none), (pointer: coarse), (pointer: none)').matches;
16
25
  });
17
26
 
18
27
  const isMobileSized = computed((): boolean => {
19
- return windowWidth.value < 1264;
28
+ return windowOuterWidth.value < 1264;
20
29
  });
21
30
 
22
31
  const isExtraSmall = computed((): boolean => {
23
- return windowWidth.value < 600;
32
+ return windowOuterWidth.value < 600;
24
33
  });
25
34
 
26
35
  if (!initialized) {
@@ -28,11 +37,38 @@ export const useBreakpoints = () => {
28
37
  initialized = true;
29
38
  }
30
39
 
40
+ const fontStyles = computed(() => ({
41
+ "--fs-font-h1-font-size" : isMobileSized.value ? "28px" : "36px",
42
+ "--fs-font-h1-line-height" : isMobileSized.value ? "32px" : "40px",
43
+ "--fs-font-h1-letter-spacing" : isMobileSized.value ? "-1.4px" : "-0.72px",
44
+ "--fs-font-h2-font-size" : isMobileSized.value ? "22px" : "26px",
45
+ "--fs-font-h2-line-height" : isMobileSized.value ? "24px" : "32px",
46
+ "--fs-font-h2-letter-spacing" : isMobileSized.value ? "-0.88px" : "-0.78px",
47
+ "--fs-font-h3-font-size" : isMobileSized.value ? "16px" : "20px",
48
+ "--fs-font-h3-line-height" : isMobileSized.value ? "20px" : "24px",
49
+ "--fs-font-h3-letter-spacing" : isMobileSized.value ? "-0.48px" : "-0.6px",
50
+ "--fs-font-button-font-size" : isMobileSized.value ? "12px" : "14px",
51
+ "--fs-font-button-line-height" : isMobileSized.value ? "16px" : "20px",
52
+ "--fs-font-button-letter-spacing" : isMobileSized.value ? "-0.36px" : "-0.42px",
53
+ "--fs-font-overline-font-size" : isMobileSized.value ? "10px" : "12px",
54
+ "--fs-font-overline-line-height" : isMobileSized.value ? "16px" : "16px",
55
+ "--fs-font-overline-letter-spacing": isMobileSized.value ? "0" : "0",
56
+ ...bodyStyle.value
57
+ }));
58
+
59
+ const bodyStyle = computed(() => ({
60
+ "--fs-font-body-font-size" : isMobileSized.value ? "12px" : "14px",
61
+ "--fs-font-body-line-height" : isMobileSized.value ? "16px" : "20px",
62
+ "--fs-font-body-letter-spacing": isMobileSized.value ? "-0.36px" : "-0.42px",
63
+ }));
64
+
31
65
  return {
32
66
  isTouchScreenEnabled,
33
67
  isMobileSized,
34
68
  isExtraSmall,
35
69
  windowHeight,
36
- windowWidth
70
+ windowWidth,
71
+ fontStyles,
72
+ bodyStyle
37
73
  };
38
74
  }
@@ -5,6 +5,8 @@ import Color from "color";
5
5
  import type { ColorBase, ColorVariations } from "@dative-gpi/foundation-shared-components/models";
6
6
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
7
7
 
8
+ const colorsCache: Map<string, ColorVariations> = new Map();
9
+
8
10
  export const useColors = () => {
9
11
  const theme = useTheme().current.value;
10
12
  const baseMinSaturation = 0;
@@ -40,17 +42,17 @@ export const useColors = () => {
40
42
  };
41
43
 
42
44
  const getContrast = (color: Color): Color => {
43
- if(isGrayScale(color)){
45
+ if (isGrayScale(color)) {
44
46
  const coeff = 4
45
47
  return color
46
48
  .value(color.value() < 70 ? 100 : Math.max(color.value() / coeff, 0));
47
49
  }
48
50
 
49
- if(isPastel(color)){
51
+ if (isPastel(color)) {
50
52
  return color.darken(0.6);
51
53
  }
52
54
 
53
- if(color.darken(0.15).isLight()){
55
+ if (color.darken(0.15).isLight()) {
54
56
  return color.darken(0.8);
55
57
  }
56
58
 
@@ -59,7 +61,7 @@ export const useColors = () => {
59
61
 
60
62
  const parseColor = (color: ColorBase): Color => {
61
63
  const themed = (Object as any).values(ColorEnum).includes(color);
62
-
64
+
63
65
  try {
64
66
  return themed ? new Color(theme.colors[color as ColorEnum]) : new Color(color);
65
67
  }
@@ -70,7 +72,7 @@ export const useColors = () => {
70
72
 
71
73
  const getColors = (color: ColorBase): ColorVariations => {
72
74
  const base = parseColor(color);
73
-
75
+
74
76
  const light = getLight(base);
75
77
  const soft = getSoft(base);
76
78
  const dark = getDark(base);
@@ -88,7 +90,7 @@ export const useColors = () => {
88
90
  };
89
91
 
90
92
  const getGradients = (colors: ColorBase | ColorBase[], rotation: number = 90): ColorVariations => {
91
- const variations = Array.isArray(colors) ? colors.map(getColors) : [getColors(colors)];
93
+ const variations = Array.isArray(colors) ? colors.map(getColorsCached) : [getColorsCached(colors)];
92
94
 
93
95
  if (variations.length === 1) {
94
96
  return variations[0];
@@ -121,9 +123,16 @@ export const useColors = () => {
121
123
  return colors;
122
124
  }
123
125
 
126
+ const getColorsCached = (color: ColorBase): ColorVariations => {
127
+ if (!colorsCache.has(color)) {
128
+ const variations = getColors(color);
129
+ colorsCache.set(color, variations);
130
+ }
131
+ return colorsCache.get(color) as ColorVariations;
132
+ };
124
133
 
125
134
  return {
126
- getColors,
135
+ getColors : getColorsCached,
127
136
  getGradients,
128
137
  getBasePaletteColors
129
138
  };
@@ -10,6 +10,7 @@ const FIELDS = {
10
10
  [MagicFieldType.IconField] : defineAsyncComponent(() => import("../components/fields/FSIconField.vue")),
11
11
  [MagicFieldType.TimeField] : defineAsyncComponent(() => import("../components/fields/FSTimeField.vue")),
12
12
  [MagicFieldType.TimeStepField] : defineAsyncComponent(() => import("../components/fields/FSTimeStepField.vue")),
13
+ [MagicFieldType.PlotPerField] : defineAsyncComponent(() => import("../components/selects/chartSelectors/FSPlotPerSelector.vue")),
13
14
  };
14
15
 
15
16
  export const useMagicFieldProvider = () => {
@@ -0,0 +1,62 @@
1
+ import { tileLayer } from 'leaflet';
2
+
3
+ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
4
+
5
+ import { MapLayers } from '@dative-gpi/foundation-shared-components/models';
6
+
7
+ export const useMapLayers = () => {
8
+ const { $tr } = useTranslationsProvider();
9
+
10
+ const apiKey = import.meta.env.VITE_GOOGLE_MAPS_API_KEY ?? "";
11
+
12
+ const layers = [
13
+ {
14
+ name: MapLayers.Map,
15
+ label: $tr("ui.map-layer.map", "Map"),
16
+ image: new URL("../../assets/images/map/map.png", import.meta.url).href,
17
+ layers: [
18
+ tileLayer(`https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&key=${apiKey}`, {
19
+ maxZoom: 22,
20
+ subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
21
+ attribution: '© Google Map Data',
22
+ className: 'fs-map-tile-base-layer'
23
+ })
24
+ ]
25
+ },
26
+ {
27
+ name: MapLayers.Imagery,
28
+ label: $tr("ui.map-layer.imagery", "Imagery"),
29
+ image: new URL("../../assets/images/map/imagery.png", import.meta.url).href,
30
+ layers: [
31
+ tileLayer(`https://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}&key=${apiKey}`, {
32
+ maxZoom: 22,
33
+ subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
34
+ attribution: '© Google Map Data',
35
+ className: 'fs-map-tile-base-layer'
36
+ })
37
+ ]
38
+ },
39
+ {
40
+ name: MapLayers.Snow,
41
+ label: $tr("ui.map-layer.snow", "Snow ski map"),
42
+ image: new URL("../../assets/images/map/snow.png", import.meta.url).href,
43
+ layers: [
44
+ tileLayer(`https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&key=${apiKey}`, {
45
+ maxZoom: 22,
46
+ subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
47
+ attribution: '© Google Map Data',
48
+ className: 'fs-map-tile-base-layer fs-map-tile-grayscale-layer'
49
+ }),
50
+ tileLayer(`https://tiles.opensnowmap.org/pistes/{z}/{x}/{y}.png`, {
51
+ maxZoom: 18,
52
+ attribution: 'Map data: &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors & ODbL, &copy; <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
53
+ className: 'fs-map-tile-base-layer'
54
+ })
55
+ ]
56
+ }
57
+ ];
58
+
59
+ return {
60
+ layers
61
+ };
62
+ }
@@ -20,11 +20,12 @@ export const useSlots = () => {
20
20
  // Directive wrapper (v-for, v-if)
21
21
  case "symbol":
22
22
  switch (element.type) {
23
+ // On a v-for, we want to get the children of the v-for
23
24
  case Symbol.for("v-fgt"):
24
25
  returnElements.push(...recursiveGetChildren(element.children));
25
26
  break;
27
+ // On a negative v-if, we want to get nothing
26
28
  case Symbol.for("v-cmt"):
27
- returnElements.push(element);
28
29
  break;
29
30
  default:
30
31
  returnElements.push(element);
package/models/colors.ts CHANGED
@@ -19,4 +19,5 @@ export interface ColorVariations {
19
19
  darkContrast?: string | null;
20
20
  }
21
21
 
22
- export type ColorBase = (string | ColorEnum);
22
+ export type ColorBase = (string | ColorEnum);
23
+ export type ColorBaseVariations = "base" | "baseContrast" | "soft" | "softContrast" | "light" | "lightContrast" | "dark" | "darkContrast";
@@ -7,4 +7,5 @@ export interface FSDeviceAlert {
7
7
  criticity: Criticity;
8
8
  sourceTimestamp?: number | null;
9
9
  enqueuedTimestamp?: number | null;
10
+ actualTimestamp?: number | null;
10
11
  }
@@ -7,4 +7,5 @@ export enum MagicFieldType {
7
7
  IconField = 5,
8
8
  TimeField = 6,
9
9
  TimeStepField = 7,
10
+ PlotPerField = 8,
10
11
  }
package/models/map.ts CHANGED
@@ -1,18 +1,20 @@
1
1
  import { type Layer } from "leaflet";
2
2
 
3
- import { type Address } from "@dative-gpi/foundation-shared-domain/models";
4
-
5
3
  export interface MapLayer {
6
- name : string;
4
+ name : MapLayers;
7
5
  label: string;
8
6
  image: string;
9
- layer: Layer;
7
+ layers: Layer[];
10
8
  }
11
9
 
12
- export interface FSLocation {
13
- id: string;
14
- label: string;
15
- icon: string;
16
- address: Address;
17
- color: string;
10
+ export enum MapLayers {
11
+ Map = "map",
12
+ Imagery = "imagery",
13
+ Snow= "snow"
14
+ }
15
+
16
+ export enum MapOverlayPositions {
17
+ Expand = "expand",
18
+ Half = "half",
19
+ Collapse = "collapse",
18
20
  }
package/models/rules.ts CHANGED
@@ -2,8 +2,9 @@ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui
2
2
  import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
3
3
  import { validateExpression } from "@dative-gpi/foundation-shared-domain/tools";
4
4
 
5
- import { getTimeBestString } from "../utils";
6
- import type { TimeUnit } from "@/shared/foundation-shared-domain/enums";
5
+ import type { TimeUnit } from "@dative-gpi/foundation-shared-domain/enums";
6
+
7
+ import { getTimeBestString, validateOperation } from "../utils";
7
8
 
8
9
  const { epochToLongDateFormat } = useDateFormat()!;
9
10
  const { $tr } = useTranslationsProvider();
@@ -22,6 +23,8 @@ export const TextRules = {
22
23
  different: (original: string, message: string | undefined = undefined) => (value: string) => value != original || (message ?? $tr("ui.rules.text-different", "Must be different from original")),
23
24
  outside: (values: string[], message: string | undefined = undefined) => (value: string) => !values.includes(value) || (message ?? $tr("ui.rules.text-outside", "Must be different from others")),
24
25
  inside: (values: string[], message: string | undefined = undefined) => (value: string) => values.includes(value) || (message ?? $tr("ui.rules.text-inside", "Must be one of the options")),
26
+ operation: (operands: string[], variables: string[], message: string | undefined = undefined) => (value: string) => validateOperation(value, operands, variables) || (message ?? $tr("ui.rules.text-operation", "Invalid operation")),
27
+ singleWord: (message: string | undefined = undefined) => (value: string) => !value.includes(" ") || (message ?? $tr("ui.rules.text-single-word", "Must be a single word")),
25
28
  };
26
29
 
27
30
  export const TagRules = {
@@ -76,6 +79,6 @@ export const ToggleRules = {
76
79
 
77
80
  export const TreeViewRules = {
78
81
  required: (message: string | undefined = undefined) => (value: string) => !!value || (message ?? $tr("ui.rules.required", "Required")),
79
- min: (min: number, message: string | undefined = undefined) => (value: string[]) => { console.log(value); return (Array.isArray(value) && value.length >= min) || (message ?? $tr("ui.rules.tree-view-min", "Must select at least {0} elements", min.toString())); },
82
+ min: (min: number, message: string | undefined = undefined) => (value: string[]) => (Array.isArray(value) && value.length >= min) || (message ?? $tr("ui.rules.tree-view-min", "Must select at least {0} elements", min.toString())),
80
83
  max: (max: number, message: string | undefined = undefined) => (value: string[]) => (Array.isArray(value) && value.length <= max) || (message ?? $tr("ui.rules.tree-view-max", "Must select at most {0} elements", max.toString()))
81
84
  };
package/models/tables.ts CHANGED
@@ -8,10 +8,12 @@ export interface FSDataTableColumn {
8
8
 
9
9
  sortable?: boolean | null;
10
10
  sort?: ((a: any, b: any) => number) | null;
11
+ sortRaw?: ((a: any, b: any) => number) | null;
11
12
 
12
13
  filterable?: boolean | null;
13
14
  fixedFilters?: { value: any, text: string }[] | null;
14
- methodFilter?: ((value: any, item: any) => boolean) | null;
15
+ methodFilter?: ((value: any, property: any) => boolean) | null;
16
+ methodFilterRaw?: ((value: any, item: any) => boolean) | null;
15
17
  filter?: ((value: any, search: string, item: any) => boolean) | null;
16
18
 
17
19
  innerValue?: ((value: any) => any) | null;
@@ -35,8 +37,9 @@ export interface FSDataTableOrder {
35
37
  export interface FSDataTable {
36
38
  headers: FSDataTableColumn[];
37
39
  sortBy: FSDataTableOrder | null;
38
- mode: "table" | "iterator";
40
+ mode: "table" | "iterator" | null;
39
41
  rowsPerPage: -1 | 10 | 30;
42
+ showFilters: boolean;
40
43
  filters: { [key: string]: FSDataTableFilter[] };
41
44
  page: number;
42
45
  }
@@ -51,14 +51,17 @@ export class VariableNode extends DecoratorNode<Element> {
51
51
  content.classList.add("fs-rich-text-field-node-variable-value");
52
52
  if (_editor._rootElement) {
53
53
  content.textContent = this.getValue(_editor._rootElement);
54
- }
55
- else {
54
+
55
+ const observer = new MutationObserver(() => {
56
+ content.textContent = this.getValue(_editor._rootElement!);
57
+ });
58
+ observer.observe(_editor._rootElement, { attributes: true, attributeFilter: ['data-variable-values'] });
59
+ } else {
56
60
  content.textContent = this.__defaultValue;
57
61
  }
58
- }
59
- else {
62
+ } else {
60
63
  content.classList.add("fs-rich-text-field-node-variable-code");
61
- content.textContent = `{${this.__code}}`
64
+ content.textContent = `{${this.__code}}`;
62
65
  }
63
66
  container.appendChild(content);
64
67
  return container;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "1.0.57",
4
+ "version": "1.0.58-groupings",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,11 +10,11 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "1.0.57",
14
- "@dative-gpi/foundation-shared-services": "1.0.57"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.58-groupings",
14
+ "@dative-gpi/foundation-shared-services": "1.0.58-groupings"
15
15
  },
16
16
  "peerDependencies": {
17
- "@dative-gpi/bones-ui": "^0.0.75",
17
+ "@dative-gpi/bones-ui": "^1.0.0",
18
18
  "@fontsource/montserrat": "^5.0.16",
19
19
  "@lexical/clipboard": "0.12.5",
20
20
  "@lexical/history": "0.12.5",
@@ -35,5 +35,5 @@
35
35
  "sass": "1.71.1",
36
36
  "sass-loader": "13.3.2"
37
37
  },
38
- "gitHead": "4445a164fed7501246674432eba3e8227c8bc827"
38
+ "gitHead": "563e78c4a0b3e8f73fdf8576e9d8bc0b626bc095"
39
39
  }
@@ -30,3 +30,7 @@
30
30
  width: 100%;
31
31
  height: 100%;
32
32
  }
33
+
34
+ .fs-agenda-header-text {
35
+ text-transform: capitalize !important;
36
+ }
@@ -8,7 +8,7 @@
8
8
  }
9
9
 
10
10
  >.fs-card {
11
- border-left: solid 3px var(--fs-clickable-border-color) !important;
11
+ border-left: solid var(--fs-agenda-event-border-width) var(--fs-clickable-border-color) !important;
12
12
  }
13
13
  }
14
14
 
@@ -1,11 +1,3 @@
1
- .fs-agenda-hours-row {
2
- transform: translateX(calc(-2.4% + 2px));
3
- }
4
-
5
- .fs-agenda-hours-row-text {
6
- padding: 0 2px;
7
- }
8
-
9
1
  .fs-agenda-hours-row-marker {
10
2
  height: 4px;
11
3
  border-right: solid 1px var(--fs-agenda-hours-row-marker-color);
@@ -22,19 +22,6 @@
22
22
  }
23
23
  }
24
24
 
25
- .fs-autocomplete-field-label {
26
- color: var(--fs-autocomplete-field-color);
27
- }
28
-
29
- .fs-autocomplete-field-messages {
30
- align-self: stretch;
31
- color: var(--fs-autocomplete-field-error-color);
32
- }
33
-
34
- .fs-autocomplete-field-description {
35
- color: var(--fs-autocomplete-field-color);
36
- }
37
-
38
25
  .v-overlay-container > .v-overlay > .v-autocomplete__content {
39
26
  box-shadow: 0px 5px 8px 0px #00000029;
40
27
  max-width: none !important;
@@ -1,54 +1,36 @@
1
- .fs-breadcrumbs-label {
2
- cursor: pointer;
3
- user-select: none;
4
- color: var(--fs-breadcrumbs-color);
5
-
6
- &-disabled {
7
- color: var(--fs-breadcrumbs-disabled-color) !important;
8
- }
9
-
10
- &:hover {
11
- text-decoration: underline;
12
- }
13
-
14
- &:active {
15
- color: var(--fs-breadcrumbs-active-color) !important;
16
- }
17
- }
1
+ .fs-breadcrumbs {
2
+ height: var(--fs-breadcrumbs-height) !important;
3
+ padding: 0 !important;
4
+ gap: 0 !important;
18
5
 
19
- .fs-breadcrumbs-divider {
20
- margin-bottom: 2px !important;
6
+ max-width: 100%;
21
7
  }
22
8
 
23
- .v-breadcrumbs {
9
+ .v-breadcrumbs-item,
10
+ .v-breadcrumbs-item--link {
24
11
  padding: 0 !important;
25
- gap: 8px !important;
26
-
27
- @include web {
28
- height: 24px;
29
- }
12
+ user-select: none;
13
+ cursor: pointer;
30
14
 
31
- @include mobile {
32
- height: 20px;
33
- }
34
- }
15
+ align-self: stretch;
16
+ display: flex;
17
+ flex: 1 0 0;
35
18
 
36
- .v-breadcrumbs-item {
37
- padding: 0 !important;
19
+ max-width: fit-content;
20
+ min-width: 20px;
38
21
 
39
22
  &--disabled {
40
23
  opacity: 1 !important;
41
24
  color: var(--fs-breadcrumbs-disabled-color) !important;
42
25
  }
26
+ }
43
27
 
44
- &:last-child > .fs-breadcrumbs-label-disabled {
45
- @extend .text-button;
28
+ .v-breadcrumbs-item:last-child > .fs-breadcrumbs-label {
29
+ @extend .text-button;
46
30
 
47
- color: var(--fs-breadcrumbs-active-color) !important;
48
- }
31
+ color: var(--fs-breadcrumbs-active-color) !important;
49
32
  }
50
33
 
51
34
  .v-breadcrumbs-divider {
52
- padding: 0 !important;
53
35
  color: var(--fs-breadcrumbs-color) !important;
54
36
  }
@@ -2,11 +2,6 @@
2
2
  transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
3
3
  color: var(--fs-button-color) !important;
4
4
 
5
- &:not(.fs-button-disabled, :has(.fs-button-load)):hover {
6
- color: var(--fs-button-hover-color) !important;
7
- cursor: pointer !important;
8
- }
9
-
10
5
  &.fs-button-disabled,
11
6
  &:has(.fs-button-load) {
12
7
  cursor: default !important;
@@ -16,4 +11,11 @@
16
11
  color: inherit;
17
12
  text-decoration: none;
18
13
  }
14
+
15
+ @include clickscreen {
16
+ &:not(.fs-button-disabled, :has(.fs-button-load)):hover {
17
+ color: var(--fs-button-hover-color) !important;
18
+ cursor: pointer !important;
19
+ }
20
+ }
19
21
  }
@@ -32,6 +32,7 @@
32
32
  border: 1px solid var(--fs-calendar-border-color) !important;
33
33
  border-radius: 4px !important;
34
34
  padding: 8px !important;
35
+ min-height: 380px;
35
36
  }
36
37
 
37
38
  .fs-calendar-header {
@@ -4,6 +4,8 @@
4
4
  padding: var(--fs-card-padding);
5
5
  height: var(--fs-card-height);
6
6
  width: var(--fs-card-width);
7
+ max-width: var(--fs-card-max-width);
8
+ position: relative;
7
9
  display: flex;
8
10
 
9
11
  border-color: var(--fs-card-border-color);
@@ -21,4 +23,11 @@
21
23
  &-gradient {
22
24
  background: var(--fs-card-background-color);
23
25
  }
26
+
27
+ .fs-card-top-right {
28
+ position: absolute;
29
+ line-height: normal;
30
+ right: var(--fs-card-top-right-padding);
31
+ top: var(--fs-card-top-right-padding);
32
+ }
24
33
  }
@@ -1,3 +1,7 @@
1
+ .fs-chip-container {
2
+ text-decoration: none;
3
+ }
4
+
1
5
  .fs-chip {
2
6
  user-select: none;
3
7
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
@@ -9,18 +13,20 @@
9
13
  padding: 2px 20px !important;
10
14
  }
11
15
 
12
- .fs-chip-editable {
16
+ .fs-chip-clickable {
13
17
  cursor: pointer !important;
14
18
 
15
- &:hover {
16
- background-color: var(--fs-chip-hover-background-color) !important;
17
- border-color: var(--fs-chip-hover-border-color) !important;
18
- color: var(--fs-chip-hover-color) !important;
19
- }
20
-
21
19
  &:active {
22
20
  background-color: var(--fs-chip-active-background-color) !important;
23
21
  border-color: var(--fs-chip-active-border-color) !important;
24
22
  color: var(--fs-chip-active-color) !important;
25
23
  }
24
+
25
+ @include clickscreen {
26
+ &:hover {
27
+ background-color: var(--fs-chip-hover-background-color) !important;
28
+ border-color: var(--fs-chip-hover-border-color) !important;
29
+ color: var(--fs-chip-hover-color) !important;
30
+ }
31
+ }
26
32
  }