@dative-gpi/foundation-shared-components 0.0.229 → 0.1.68

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 (228) hide show
  1. package/components/FSAccordionPanel.vue +8 -10
  2. package/components/FSBadge.vue +2 -4
  3. package/components/FSBreadcrumbs.vue +9 -10
  4. package/components/FSButton.vue +81 -31
  5. package/components/FSCalendar.vue +35 -33
  6. package/components/FSCalendarTwin.vue +77 -84
  7. package/components/FSCard.vue +29 -16
  8. package/components/FSCardPlaceholder.vue +1 -2
  9. package/components/FSCheckbox.vue +5 -7
  10. package/components/FSChip.vue +9 -11
  11. package/components/FSClickable.vue +67 -57
  12. package/components/FSClock.vue +4 -4
  13. package/components/FSCol.vue +2 -3
  14. package/components/FSColor.vue +13 -31
  15. package/components/FSColorIcon.vue +25 -9
  16. package/components/FSDialog.vue +1 -2
  17. package/components/FSDialogFormBody.vue +4 -4
  18. package/components/FSDialogMenu.vue +2 -4
  19. package/components/FSDialogMultiFormBody.vue +63 -50
  20. package/components/FSDialogRemove.vue +1 -0
  21. package/components/FSDialogSubmit.vue +5 -7
  22. package/components/FSDivider.vue +7 -9
  23. package/components/FSEditImage.vue +27 -274
  24. package/components/FSEditImageUI.vue +303 -0
  25. package/components/FSErrorToast.vue +3 -4
  26. package/components/FSFadeOut.vue +18 -13
  27. package/components/FSGrid.vue +6 -9
  28. package/components/FSGridMosaic.vue +1 -2
  29. package/components/FSIcon.vue +7 -8
  30. package/components/FSIconCard.vue +23 -30
  31. package/components/FSIconCheck.vue +1 -2
  32. package/components/FSImage.vue +21 -193
  33. package/components/FSImageCard.vue +2 -2
  34. package/components/FSImageUI.vue +212 -0
  35. package/components/FSLabel.vue +18 -20
  36. package/components/FSLink.vue +19 -21
  37. package/components/FSLoader.vue +10 -14
  38. package/components/FSOptionGroup.vue +58 -12
  39. package/components/FSPagination.vue +3 -5
  40. package/components/FSRadio.vue +5 -7
  41. package/components/FSRadioGroup.vue +2 -4
  42. package/components/FSRow.vue +3 -4
  43. package/components/FSSlideGroup.vue +15 -4
  44. package/components/FSSlider.vue +9 -11
  45. package/components/FSSpan.vue +11 -9
  46. package/components/FSSwitch.vue +65 -37
  47. package/components/FSTab.vue +2 -4
  48. package/components/FSTabs.vue +36 -16
  49. package/components/FSTag.vue +23 -14
  50. package/components/FSTagGroup.vue +3 -5
  51. package/components/FSText.vue +8 -12
  52. package/components/FSWindow.vue +11 -5
  53. package/components/FSWrapGroup.vue +15 -4
  54. package/components/agenda/FSAgenda.vue +204 -0
  55. package/components/agenda/FSAgendaDialogCalendar.vue +76 -0
  56. package/components/agenda/FSAgendaHeader.vue +190 -0
  57. package/components/agenda/FSAgendaHorizontalEvent.vue +162 -0
  58. package/components/agenda/FSAgendaHorizontalTimeLineMarker.vue +46 -0
  59. package/components/agenda/FSAgendaHoursCol.vue +103 -0
  60. package/components/agenda/FSAgendaHoursRow.vue +124 -0
  61. package/components/agenda/FSAgendaVerticalEvent.vue +160 -0
  62. package/components/agenda/FSAgendaVerticalTimeLineMarker.vue +46 -0
  63. package/components/agenda/FSDayAgenda.vue +200 -0
  64. package/components/agenda/FSMonthAgenda.vue +257 -0
  65. package/components/agenda/FSSelectAgendaMode.vue +54 -0
  66. package/components/agenda/FSWeekAgenda.vue +328 -0
  67. package/components/autocompletes/FSAutocompleteLanguage.vue +18 -39
  68. package/components/autocompletes/FSAutocompleteTimeZone.vue +20 -38
  69. package/components/buttons/FSButtonCancelMini.vue +1 -0
  70. package/components/buttons/FSButtonCopy.vue +28 -0
  71. package/components/buttons/FSButtonCopyIcon.vue +28 -0
  72. package/components/buttons/FSButtonCopyLabel.vue +27 -0
  73. package/components/buttons/FSButtonCopyMini.vue +28 -0
  74. package/components/buttons/FSButtonDragIcon.vue +27 -0
  75. package/components/buttons/FSButtonDuplicateMini.vue +1 -0
  76. package/components/buttons/FSButtonEditMini.vue +1 -0
  77. package/components/buttons/FSButtonFileMini.vue +1 -0
  78. package/components/buttons/FSButtonNextMini.vue +1 -0
  79. package/components/buttons/FSButtonPreviousMini.vue +1 -0
  80. package/components/buttons/FSButtonRedoMini.vue +1 -0
  81. package/components/buttons/FSButtonRemoveMini.vue +1 -0
  82. package/components/buttons/FSButtonSaveMini.vue +1 -0
  83. package/components/buttons/FSButtonSearchMini.vue +1 -0
  84. package/components/buttons/FSButtonUndoMini.vue +1 -0
  85. package/components/buttons/FSButtonUpdateMini.vue +1 -0
  86. package/components/buttons/FSButtonValidateMini.vue +1 -0
  87. package/components/deviceOrganisations/FSConnectivity.vue +11 -1
  88. package/components/deviceOrganisations/FSConnectivityCard.vue +20 -49
  89. package/components/deviceOrganisations/FSStatus.vue +11 -1
  90. package/components/deviceOrganisations/FSStatusCard.vue +40 -60
  91. package/components/deviceOrganisations/FSStatusesCarousel.vue +1 -0
  92. package/components/deviceOrganisations/FSStatusesRow.vue +10 -5
  93. package/components/deviceOrganisations/FSWorstAlert.vue +19 -13
  94. package/components/deviceOrganisations/FSWorstAlertCard.vue +36 -47
  95. package/components/fields/FSAutocompleteField.vue +501 -323
  96. package/components/fields/FSAutocompleteTag.vue +100 -0
  97. package/components/fields/FSBaseField.vue +26 -16
  98. package/components/fields/FSColorField.vue +63 -55
  99. package/components/fields/FSCommentField.vue +93 -0
  100. package/components/fields/FSDateField.vue +2 -2
  101. package/components/fields/FSDateRangeField.vue +2 -2
  102. package/components/fields/FSDateTimeField.vue +4 -3
  103. package/components/fields/FSDateTimeRangeField.vue +7 -6
  104. package/components/fields/FSEntityFieldUI.vue +271 -0
  105. package/components/fields/FSGradientField.vue +27 -33
  106. package/components/fields/FSIconField.vue +2 -3
  107. package/components/fields/FSMagicConfigField.vue +28 -19
  108. package/components/fields/FSMagicField.vue +25 -17
  109. package/components/fields/FSNumberField.vue +9 -7
  110. package/components/fields/FSPasswordField.vue +2 -3
  111. package/components/fields/FSRichTextField.vue +32 -5
  112. package/components/fields/FSSearchField.vue +2 -2
  113. package/components/fields/FSSelectField.vue +483 -251
  114. package/components/fields/FSTagField.vue +4 -6
  115. package/components/fields/FSTermField.vue +25 -13
  116. package/components/fields/FSTextArea.vue +18 -6
  117. package/components/fields/FSTextField.vue +13 -10
  118. package/components/fields/FSTimeField.vue +1 -1
  119. package/components/fields/FSTimeSlotField.vue +3 -4
  120. package/components/fields/FSTimeStepField.vue +157 -0
  121. package/components/fields/FSTranslateField.vue +3 -2
  122. package/components/fields/FSTranslateRichTextField.vue +4 -3
  123. package/components/fields/FSTranslateTextArea.vue +233 -0
  124. package/components/fields/FSTreeViewField.vue +7 -9
  125. package/components/fields/periodicField/FSPeriodicDailyField.vue +120 -0
  126. package/components/fields/periodicField/FSPeriodicField.vue +131 -0
  127. package/components/fields/periodicField/FSPeriodicMonthlyField.vue +222 -0
  128. package/components/fields/periodicField/FSPeriodicWeeklyField.vue +120 -0
  129. package/components/fields/periodicField/FSPeriodicYearlyField.vue +144 -0
  130. package/components/lists/FSDataIteratorItem.vue +8 -10
  131. package/components/lists/FSDataTableUI.vue +47 -39
  132. package/components/lists/FSFilterButton.vue +20 -22
  133. package/components/lists/FSHiddenButton.vue +10 -12
  134. package/components/lists/FSLoadDataTable.vue +4 -6
  135. package/components/lists/FSSimpleList.vue +229 -0
  136. package/components/map/FSMap.vue +256 -405
  137. package/components/map/FSMapFeatureGroup.vue +51 -0
  138. package/components/map/FSMapLayerButton.vue +6 -3
  139. package/components/map/FSMapMarker.vue +116 -0
  140. package/components/map/FSMapMarkerClusterGroup.vue +72 -0
  141. package/components/map/FSMapOverlay.vue +69 -83
  142. package/components/map/FSMapPolygon.vue +81 -0
  143. package/components/map/FSMapTileLayer.vue +50 -0
  144. package/components/map/keys.ts +4 -0
  145. package/components/selects/FSSelectAutoRefresh.vue +1 -1
  146. package/components/selects/FSSelectDashboardVariableType.vue +1 -1
  147. package/components/selects/FSSelectDateSetting.vue +3 -3
  148. package/components/selects/FSSelectDays.vue +1 -1
  149. package/components/selects/FSSelectListMode.vue +51 -0
  150. package/components/selects/FSSelectMonths.vue +67 -0
  151. package/components/tiles/FSChartTileUI.vue +116 -0
  152. package/components/tiles/FSCommentTileUI.vue +149 -0
  153. package/components/tiles/FSDashboardOrganisationTileUI.vue +6 -8
  154. package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +6 -8
  155. package/components/tiles/FSDashboardShallowTileUI.vue +6 -8
  156. package/components/tiles/FSDeviceOrganisationTileUI.vue +30 -18
  157. package/components/tiles/FSFolderTileUI.vue +6 -6
  158. package/components/tiles/FSGroupTileUI.vue +31 -22
  159. package/components/tiles/FSLoadTile.vue +5 -7
  160. package/components/tiles/FSLocationTileUI.vue +157 -0
  161. package/components/tiles/FSModelTileUI.vue +18 -0
  162. package/components/tiles/FSServiceAccountOrganisationTileUI.vue +142 -0
  163. package/components/tiles/FSSimpleTileUI.vue +57 -36
  164. package/components/tiles/FSTile.vue +115 -55
  165. package/components/tiles/FSUserOrganisationTileUI.vue +25 -35
  166. package/components/toggleSets/FSToggleSetPosition.vue +1 -1
  167. package/components/views/FSEntityHeader.vue +343 -0
  168. package/components/views/FSEntityView.vue +163 -0
  169. package/components/views/FSListHeader.vue +83 -0
  170. package/components/views/FSListView.vue +83 -0
  171. package/components/views/FSSkeletonView.vue +100 -0
  172. package/composables/useAddress.ts +2 -2
  173. package/composables/useColors.ts +15 -5
  174. package/composables/useMagicFieldProvider.ts +7 -6
  175. package/composables/useSlots.ts +51 -28
  176. package/models/agenda.ts +9 -0
  177. package/models/deviceAlerts.ts +1 -1
  178. package/models/deviceConnectivities.ts +1 -1
  179. package/models/index.ts +1 -0
  180. package/models/magicFields.ts +1 -0
  181. package/models/map.ts +2 -2
  182. package/models/rules.ts +10 -5
  183. package/models/tables.ts +3 -1
  184. package/package.json +4 -4
  185. package/styles/components/fs_agenda.scss +32 -0
  186. package/styles/components/fs_agenda_event.scss +41 -0
  187. package/styles/components/fs_agenda_hours_col.scss +4 -0
  188. package/styles/components/fs_agenda_hours_row.scss +13 -0
  189. package/styles/components/fs_agenda_time_line_marker.scss +19 -0
  190. package/styles/components/fs_card.scss +0 -1
  191. package/styles/components/fs_clickable.scss +5 -3
  192. package/styles/components/fs_color_field.scss +1 -0
  193. package/styles/components/fs_data_table.scss +2 -0
  194. package/styles/components/fs_dialog.scss +11 -15
  195. package/styles/components/fs_edit_image.scss +8 -0
  196. package/styles/components/fs_fade_out.scss +2 -1
  197. package/styles/components/fs_filter_button.scss +1 -6
  198. package/styles/components/fs_gradient_field.scss +11 -11
  199. package/styles/components/fs_magic_config_field.scss +2 -2
  200. package/styles/components/fs_map.scss +36 -30
  201. package/styles/components/fs_option_group.scss +15 -5
  202. package/styles/components/fs_radio.scss +11 -0
  203. package/styles/components/fs_rich_text_field.scss +2 -1
  204. package/styles/components/fs_search_field.scss +3 -0
  205. package/styles/components/fs_select_date_settings.scss +3 -0
  206. package/styles/components/fs_slide_group.scss +5 -0
  207. package/styles/components/fs_span.scss +2 -1
  208. package/styles/components/fs_switch.scss +1 -0
  209. package/styles/components/fs_tabs.scss +9 -0
  210. package/styles/components/fs_text_area.scss +15 -1
  211. package/styles/components/fs_tile.scss +22 -6
  212. package/styles/components/fs_window.scss +5 -0
  213. package/styles/components/fs_wrap_group.scss +4 -0
  214. package/styles/components/index.scss +6 -1
  215. package/styles/globals/overrides.scss +22 -19
  216. package/styles/globals/text_fonts.scss +17 -55
  217. package/tools/alertsTools.ts +54 -0
  218. package/tools/chartsTools.ts +300 -0
  219. package/tools/index.ts +2 -0
  220. package/utils/badge.ts +9 -0
  221. package/utils/filter.ts +18 -0
  222. package/utils/index.ts +2 -0
  223. package/utils/leafletMarkers.ts +8 -2
  224. package/utils/statuses.ts +1 -1
  225. package/utils/time.ts +27 -1
  226. package/components/autocompletes/FSAutocompleteTag.vue +0 -138
  227. package/components/map/FSMapEditPointAddressOverlay.vue +0 -164
  228. package/styles/components/fs_map_overlay.scss +0 -38
@@ -0,0 +1,100 @@
1
+ <template>
2
+ <template
3
+ v-if="isExtraSmall"
4
+ >
5
+ <FSCol
6
+ padding="16px 4px 16px 12px"
7
+ height="100%"
8
+ gap="16px"
9
+ >
10
+ <slot
11
+ name="header"
12
+ >
13
+ <slot
14
+ name="title"
15
+ >
16
+ <FSRow
17
+ gap="12px"
18
+ >
19
+ <slot
20
+ name="title-image"
21
+ />
22
+ <slot
23
+ name="title-texts"
24
+ />
25
+ </FSRow>
26
+ </slot>
27
+ </slot>
28
+ <slot
29
+ name="breadcrumbs"
30
+ />
31
+ <slot
32
+ name="toolbar"
33
+ />
34
+ <slot
35
+ name="title-append"
36
+ />
37
+ <slot
38
+ name="default"
39
+ />
40
+ </FSCol>
41
+ </template>
42
+ <template
43
+ v-else
44
+ >
45
+ <FSCol
46
+ padding="24px 8px 24px 24px"
47
+ height="100vh"
48
+ gap="16px"
49
+ >
50
+ <slot
51
+ name="header"
52
+ >
53
+ <slot
54
+ name="title"
55
+ >
56
+ <FSRow
57
+ gap="32px"
58
+ >
59
+ <slot
60
+ name="title-image"
61
+ />
62
+ <slot
63
+ name="title-texts"
64
+ />
65
+ <v-spacer />
66
+ <slot
67
+ name="title-append"
68
+ />
69
+ </FSRow>
70
+ </slot>
71
+ </slot>
72
+ <slot
73
+ name="breadcrumbs"
74
+ />
75
+ <slot
76
+ name="toolbar"
77
+ />
78
+ <slot
79
+ name="default"
80
+ />
81
+ </FSCol>
82
+ </template>
83
+ </template>
84
+
85
+ <script lang="ts">
86
+ import { defineComponent } from "vue";
87
+
88
+ import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
89
+
90
+ export default defineComponent({
91
+ name: "FSSkeletonView",
92
+ setup() {
93
+ const { isExtraSmall } = useBreakpoints();
94
+
95
+ return {
96
+ isExtraSmall
97
+ };
98
+ }
99
+ });
100
+ </script>
@@ -1,7 +1,7 @@
1
- import type { Place } from "@dative-gpi/foundation-shared-domain/models";
2
- import { Address } from "@dative-gpi/foundation-shared-domain/models";
3
1
  import _ from "lodash";
4
2
 
3
+ import { Address, type Place } from "@dative-gpi/foundation-shared-domain/models";
4
+
5
5
  export const useAddress = () => {
6
6
  const enabled = true;
7
7
  let initialized = false;
@@ -53,14 +53,24 @@ export const useColors = () => {
53
53
  if(color.darken(0.15).isLight()){
54
54
  return color.darken(0.8);
55
55
  }
56
- return color.lighten(color.value() / 50);
56
+
57
+ return color.lightness(color.lightness() < 30 ? 100 : Math.min(color.lightness() + 60, 100));
57
58
  }
58
59
 
59
- const getColors = (color: ColorBase): ColorVariations => {
60
+ const parseColor = (color: ColorBase): Color => {
60
61
  const themed = (Object as any).values(ColorEnum).includes(color);
62
+
63
+ try {
64
+ return themed ? new Color(theme.colors[color as ColorEnum]) : new Color(color);
65
+ }
66
+ catch {
67
+ return new Color("#000000");
68
+ }
69
+ }
61
70
 
62
- const base = themed ? new Color(theme.colors[color as ColorEnum]) : new Color(color);
63
-
71
+ const getColors = (color: ColorBase): ColorVariations => {
72
+ const base = parseColor(color);
73
+
64
74
  const light = getLight(base);
65
75
  const soft = getSoft(base);
66
76
  const dark = getDark(base);
@@ -96,7 +106,7 @@ export const useColors = () => {
96
106
  const colors: string[][] = [];
97
107
  for (let saturation = baseMinSaturation; saturation <= 100; saturation += (100 - baseMinSaturation) / (columnCount - 1)) {
98
108
  const colorsRow = [];
99
- for (let hue = 0; hue < 360; hue += 15) {
109
+ for (let hue = 0; hue < 360; hue += 5) {
100
110
  const color = new Color({ h: hue, s: saturation, v: baseFixedBrightness });
101
111
  colorsRow.push(color.hex());
102
112
  }
@@ -3,12 +3,13 @@ import { defineAsyncComponent } from "vue";
3
3
  import { MagicFieldType } from "../models/magicFields";
4
4
 
5
5
  const FIELDS = {
6
- [MagicFieldType.NumberField] : defineAsyncComponent(() => import("../components/fields/FSNumberField.vue")),
7
- [MagicFieldType.TextField] : defineAsyncComponent(() => import("../components/fields/FSTextField.vue")),
8
- [MagicFieldType.Switch] : defineAsyncComponent(() => import("../components/FSSwitch.vue")),
9
- [MagicFieldType.DateTimeField]: defineAsyncComponent(() => import("../components/fields/FSDateTimeField.vue")),
10
- [MagicFieldType.IconField] : defineAsyncComponent(() => import("../components/fields/FSIconField.vue")),
11
- [MagicFieldType.TimeField] : defineAsyncComponent(() => import("../components/fields/FSTimeField.vue")),
6
+ [MagicFieldType.NumberField] : defineAsyncComponent(() => import("../components/fields/FSNumberField.vue")),
7
+ [MagicFieldType.TextField] : defineAsyncComponent(() => import("../components/fields/FSTextField.vue")),
8
+ [MagicFieldType.Switch] : defineAsyncComponent(() => import("../components/FSSwitch.vue")),
9
+ [MagicFieldType.DateTimeField] : defineAsyncComponent(() => import("../components/fields/FSDateTimeField.vue")),
10
+ [MagicFieldType.IconField] : defineAsyncComponent(() => import("../components/fields/FSIconField.vue")),
11
+ [MagicFieldType.TimeField] : defineAsyncComponent(() => import("../components/fields/FSTimeField.vue")),
12
+ [MagicFieldType.TimeStepField] : defineAsyncComponent(() => import("../components/fields/FSTimeStepField.vue")),
12
13
  };
13
14
 
14
15
  export const useMagicFieldProvider = () => {
@@ -1,32 +1,55 @@
1
- import type { Slot} from "vue";
2
- import { useSlots as useVueSlots } from "vue"
1
+ import { type Slot, useSlots as useVueSlots } from "vue"
3
2
 
4
3
  export const useSlots = () => {
5
- const getChildren = (name: string | undefined = undefined): any => {
6
- const innerSlots = { ...useVueSlots() };
7
- const innerName = name ?? "default";
8
- if (innerSlots[innerName] != null) {
9
- const slot = innerSlots[innerName]!;
10
- switch (typeof(slot()[0].type)) {
11
- // Directive wrapper (v-for, v-if)
12
- case "symbol":
13
- switch (slot()[0].type) {
14
- case Symbol.for("v-fgt"): return slot()[0].children;
15
- case Symbol.for("v-cmt"): return slot();
16
- default: return slot();
17
- }
18
- // Custom component
19
- case "object": return slot();
20
- // Pre-existing component
21
- case "string": return slot();
22
- }
23
- return slot();
24
- }
25
- return null;
26
- };
4
+ const getChildren = (name: string | undefined = undefined): any => {
5
+ const innerSlots = { ...useVueSlots() };
6
+ const innerName = name ?? "default";
7
+ if (innerSlots[innerName] != null) {
8
+ return recursiveGetChildren(innerSlots[innerName]!());
9
+ }
10
+ return null;
11
+ };
27
12
 
28
- return {
29
- slots: { ...useVueSlots() } as { [label: string]: Slot<any> },
30
- getChildren
31
- };
13
+ const recursiveGetChildren = (elements: any): any => {
14
+ if (elements == null) {
15
+ return null;
16
+ }
17
+ const returnElements: any[] = [];
18
+ for (const element of elements) {
19
+ switch (typeof(element.type)) {
20
+ // Directive wrapper (v-for, v-if)
21
+ case "symbol":
22
+ switch (element.type) {
23
+ case Symbol.for("v-fgt"):
24
+ returnElements.push(...recursiveGetChildren(element.children));
25
+ break;
26
+ case Symbol.for("v-cmt"):
27
+ returnElements.push(element);
28
+ break;
29
+ default:
30
+ returnElements.push(element);
31
+ break;
32
+ }
33
+ break;
34
+ // Custom component
35
+ case "object":
36
+ returnElements.push(element);
37
+ break;
38
+ // Pre-existing component
39
+ case "string":
40
+ returnElements.push(element);
41
+ break;
42
+ // Default
43
+ default:
44
+ returnElements.push(element);
45
+ break;
46
+ }
47
+ }
48
+ return returnElements;
49
+ };
50
+
51
+ return {
52
+ slots: { ...useVueSlots() } as { [label: string]: Slot<any> },
53
+ getChildren
54
+ };
32
55
  }
@@ -0,0 +1,9 @@
1
+ export interface FSAgendaEvent {
2
+ id: string;
3
+ label: string;
4
+ icon?: string;
5
+ iconBis?: string;
6
+ color: string;
7
+ start: number;
8
+ end: number;
9
+ }
@@ -1,4 +1,4 @@
1
- import type { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/models";
1
+ import type { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/enums";
2
2
 
3
3
  export interface FSDeviceAlert {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import type { ConnectivityStatus } from "@dative-gpi/foundation-shared-domain/models";
1
+ import type { ConnectivityStatus } from "@dative-gpi/foundation-shared-domain/enums";
2
2
 
3
3
  export interface FSDeviceConnectivity {
4
4
  id: string;
package/models/index.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "./agenda";
1
2
  export * from "./breadcrumbs";
2
3
  export * from "./colors";
3
4
  export * from "./deviceAlerts";
@@ -6,4 +6,5 @@ export enum MagicFieldType {
6
6
  DateTimeField = 4,
7
7
  IconField = 5,
8
8
  TimeField = 6,
9
+ TimeStepField = 7,
9
10
  }
package/models/map.ts CHANGED
@@ -12,7 +12,7 @@ export interface MapLayer {
12
12
  export interface FSLocation {
13
13
  id: string;
14
14
  label: string;
15
- icon: string;
15
+ icon: string | null;
16
16
  address: Address;
17
- color: string;
17
+ color: string | null;
18
18
  }
package/models/rules.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
2
- import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
2
+ import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
3
3
  import { validateExpression } from "@dative-gpi/foundation-shared-domain/tools";
4
4
 
5
5
  import { getTimeBestString } from "../utils";
6
+ import type { TimeUnit } from "@/shared/foundation-shared-domain/enums";
6
7
 
7
- const { epochToLongDateFormat } = useAppTimeZone()!;
8
+ const { epochToLongDateFormat } = useDateFormat()!;
8
9
  const { $tr } = useTranslationsProvider();
9
10
 
10
11
  export const TextRules = {
@@ -30,7 +31,7 @@ export const TagRules = {
30
31
  };
31
32
 
32
33
  export const NumberRules = {
33
- required: (message: string | undefined = undefined) => (value: string) => (!!value && !isNaN(parseFloat(value))) || (message ?? $tr("ui.rules.required", "Required")),
34
+ required: (message: string | undefined = undefined) => (value: string) => (value != null && !isNaN(parseFloat(value))) || (message ?? $tr("ui.rules.required", "Required")),
34
35
  min: (min: number, message: string | undefined = undefined) => (value: string) => (!!value && !isNaN(parseFloat(value)) && parseFloat(value) >= min) || (message ?? $tr("ui.rules.number-min", "Must be at least {0}", min.toString())),
35
36
  max: (max: number, message: string | undefined = undefined) => (value: string) => (!!value && !isNaN(parseFloat(value)) && parseFloat(value) <= max) || (message ?? $tr("ui.rules.number-max", "Must be at most {0}", max.toString())),
36
37
  integer: (message: string | undefined = undefined) => (value: string) => (!!value && !isNaN(parseFloat(value)) && Number.isInteger(parseFloat(value))) || (message ?? $tr("ui.rules.number-integer", "Must be an integer"))
@@ -44,7 +45,7 @@ export const DateRules = {
44
45
  required: (message: string | undefined = undefined) => (value: string) => !!value || (message ?? $tr("ui.rules.required", "Required")),
45
46
  min: (min: number, message: string | undefined = undefined) => (value: number) => (!value || value >= min) || (message ?? $tr("ui.rules.date-min", "Must be after {0}", epochToLongDateFormat(min))),
46
47
  max: (max: number, message: string | undefined = undefined) => (value: number) => (!value || value <= max) || (message ?? $tr("ui.rules.date-max", "Must be before {0}", epochToLongDateFormat(max))),
47
- validateExpression: (variant: "default" | "before-after") => (value: string) => validateExpression(value, variant)
48
+ validateExpression: (variant: "default" | "before-after" | undefined = "default") => (value: string) => validateExpression(value, variant)
48
49
  };
49
50
 
50
51
  export const SelectRules = {
@@ -65,12 +66,16 @@ export const TimeRules = {
65
66
  max: (max: number, message: string | undefined = undefined) => (value: number) => value <= max || (message ?? $tr("ui.rules.time-max", "Must be less than {0}", getTimeBestString(max)))
66
67
  };
67
68
 
69
+ export const TimeStepRules = {
70
+ required: (message: string | undefined = undefined) => (value: { value: number, unit: TimeUnit } | null) => (!!value && value.value !== 0) || (message ?? $tr("ui.rules.required", "Required")),
71
+ }
72
+
68
73
  export const ToggleRules = {
69
74
  required: (message: string | undefined = undefined) => (value: boolean) => value || (message ?? $tr("ui.rules.required", "Required"))
70
75
  };
71
76
 
72
77
  export const TreeViewRules = {
73
78
  required: (message: string | undefined = undefined) => (value: string) => !!value || (message ?? $tr("ui.rules.required", "Required")),
74
- 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())); },
79
+ 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())),
75
80
  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()))
76
81
  };
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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "0.0.229",
4
+ "version": "0.1.68",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,8 +10,8 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "0.0.229",
14
- "@dative-gpi/foundation-shared-services": "0.0.229"
13
+ "@dative-gpi/foundation-shared-domain": "0.1.68",
14
+ "@dative-gpi/foundation-shared-services": "0.1.68"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@dative-gpi/bones-ui": "^0.0.75",
@@ -35,5 +35,5 @@
35
35
  "sass": "1.71.1",
36
36
  "sass-loader": "13.3.2"
37
37
  },
38
- "gitHead": "d737aab8ca46f10f6d92c24cb01fa55a65488198"
38
+ "gitHead": "fa2ed7031088f422751fc1d939f2fbe168ae0596"
39
39
  }
@@ -0,0 +1,32 @@
1
+ .fs-agenda-view {
2
+ min-height: 0;
3
+ }
4
+
5
+ .fs-agenda-label-day-container {
6
+ flex-shrink: 0;
7
+ }
8
+
9
+ .fs-agenda-label-day {
10
+ border-bottom: 1px solid var(--fs-agenda-label-day-border-bottom-color);
11
+ border-right: 1px solid var(--fs-agenda-label-day-border-right-color);
12
+ min-height: 0px;
13
+ }
14
+
15
+ .fs-agenda-label-day-now {
16
+ border-bottom: 4px solid var(--fs-clickable-border-color);
17
+ }
18
+
19
+ .fs-agenda-body {
20
+ position: relative;
21
+ }
22
+
23
+ .fs-agenda-row-day {
24
+ position: relative;
25
+ border-bottom: 1px solid var(--fs-agenda-row-day-border-bottom-color);
26
+ }
27
+
28
+ .fs-day-agenda-hour-line {
29
+ border-top: solid 1px var(--fs-day-agenda-hour-line-color);
30
+ width: 100%;
31
+ height: 100%;
32
+ }
@@ -0,0 +1,41 @@
1
+ .fs-agenda-event {
2
+ position: absolute !important;
3
+ left: var(--fs-agenda-event-left);
4
+ top: var(--fs-agenda-event-top);
5
+
6
+ &.fs-agenda-event-past {
7
+ opacity: 0.5;
8
+ }
9
+
10
+ >.fs-card {
11
+ border-left: solid 3px var(--fs-clickable-border-color) !important;
12
+ }
13
+ }
14
+
15
+ .fs-agenda-event .fs-col,
16
+ .fs-agenda-event .fs-row {
17
+ overflow: hidden;
18
+ }
19
+
20
+ .fs-day-agenda .fs-agenda-event {
21
+ .fs-agenda-event-day-label-container {
22
+ overflow: visible !important;
23
+ }
24
+ }
25
+
26
+ .fs-week-agenda .fs-agenda-event{
27
+ margin-top: 3px;
28
+ margin-bottom: 3px;
29
+ height: calc(100% - 6px) !important;
30
+ }
31
+
32
+ .fs-month-agenda .fs-agenda-event {
33
+ margin-top: 2px;
34
+ margin-bottom: 2px;
35
+ height: calc(100% - 4px) !important;
36
+ }
37
+
38
+ .fs-agenda-event-current span {
39
+ text-overflow: unset;
40
+ flex-shrink: 0;
41
+ }
@@ -0,0 +1,4 @@
1
+ .fs-agenda-hours-col {
2
+ transform: translateY(calc(-2.4% + 4px));
3
+ overflow: visible;
4
+ }
@@ -0,0 +1,13 @@
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
+ .fs-agenda-hours-row-marker {
10
+ height: 4px;
11
+ border-right: solid 1px var(--fs-agenda-hours-row-marker-color);
12
+ transform: translateY(-4px);
13
+ }
@@ -0,0 +1,19 @@
1
+ .fs-agenda-horizontal-time-line-marker {
2
+ position: absolute;
3
+ top: 0;
4
+ left: var(--fs-agenda-horizontal-time-line-marker-left);
5
+ width: 2px;
6
+ height: 100%;
7
+ z-index: 1;
8
+ background-color: var(--fs-agenda-horizontal-time-line-marker-color);
9
+ }
10
+
11
+ .fs-agenda-vertical-time-line-marker {
12
+ position: absolute;
13
+ top: var(--fs-agenda-vertical-time-line-marker-top);
14
+ left: 0;
15
+ width: 100%;
16
+ height: 2px;
17
+ z-index: 1;
18
+ background-color: var(--fs-agenda-vertical-time-line-marker-color);
19
+ }
@@ -12,7 +12,6 @@
12
12
  &-elevation {
13
13
  box-shadow: 0px 1px 8px 0px #00000029;
14
14
  border-radius: 4px;
15
- margin: 4px;
16
15
  }
17
16
 
18
17
  &-background {
@@ -17,7 +17,8 @@
17
17
  border-color: var(--fs-clickable-hover-border-color) !important;
18
18
  color: var(--fs-clickable-hover-color) !important;
19
19
 
20
- & .fs-background {
20
+ & .fs-card-clickable {
21
+ transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
21
22
  background-color: var(--fs-clickable-hover-background-color);
22
23
  }
23
24
  }
@@ -27,7 +28,8 @@
27
28
  border-color: var(--fs-clickable-active-border-color) !important;
28
29
  color: var(--fs-clickable-active-color) !important;
29
30
 
30
- & .fs-background {
31
+ & .fs-card-clickable {
32
+ transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
31
33
  background-color: var(--fs-clickable-active-background-color);
32
34
  }
33
35
  }
@@ -42,7 +44,7 @@ a:has(.fs-clickable) {
42
44
  }
43
45
 
44
46
  button:has(.fs-clickable) {
45
- position: relative !important;
47
+ position: relative;
46
48
  height: var(--fs-clickable-height);
47
49
  width: var(--fs-clickable-width);
48
50
  }
@@ -1,5 +1,6 @@
1
1
  .fs-color-field .fs-card {
2
2
  cursor: var(--fs-color-field-cursor) !important;
3
+ min-width: var(--fs-base-field-min-width);
3
4
  border-color: var(--fs-color-field-border-color) !important;
4
5
  .fs-text {
5
6
  color: var(--fs-color-field-color) !important;
@@ -1,4 +1,6 @@
1
1
  .fs-data-table {
2
+ background-color: var(--fs-data-table-row-background-color) !important;
3
+
2
4
  & > .v-table__wrapper {
3
5
  padding: 0 1px 0 0;
4
6
 
@@ -1,18 +1,14 @@
1
- .fs-dialog-mobile {
2
- & > .v-overlay__content {
3
- max-height: calc(100% - 40px) !important;
4
- max-width: 100% !important;
5
- width: 100% !important;
6
- margin: 0 !important;
7
- align-self: flex-end;
8
- }
1
+ .fs-dialog-mobile > .v-overlay__content {
2
+ max-height: calc(100% - 40px) !important;
3
+ max-width: 100% !important;
4
+ width: 100% !important;
5
+ margin: 0 !important;
6
+ align-self: flex-end;
9
7
  }
10
8
 
11
- .fs-dialog {
12
- & > .v-overlay__content {
13
- max-height: calc(100% - 40px) !important;
14
- max-width: calc(100% - 40px) !important;
15
- min-width: 35vw !important;
16
- width: fit-content !important;
17
- }
9
+ .fs-dialog > .v-overlay__content {
10
+ max-height: calc(100vh - 40px) !important;
11
+ max-width: calc(100vw - 40px) !important;
12
+ width: fit-content !important;
13
+ margin: 20px !important;
18
14
  }
@@ -2,6 +2,14 @@
2
2
  color: var(--fs-edit-image-overline-text-color) !important;
3
3
  }
4
4
 
5
+ .fs-edit-image-standard-row {
6
+ min-width: 0;
7
+ }
8
+
9
+ .fs-edit-image-standard-label-wrapper {
10
+ min-width: 0;
11
+ }
12
+
5
13
  .fs-edit-image-hidden-button {
6
14
  display: none;
7
15
  }
@@ -2,8 +2,9 @@
2
2
  @extend .fs-hide-y-scrollbar;
3
3
 
4
4
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
5
- max-height: var(--fs-fade-out-height);
5
+ max-height: var(--fs-fade-out-max-height);
6
6
  padding: var(--fs-fade-out-padding);
7
+ height: var(--fs-fade-out-height);
7
8
  width: var(--fs-fade-out-width);
8
9
  flex-direction: column;
9
10
  position: relative;
@@ -1,10 +1,5 @@
1
1
  .fs-filter-button-menu {
2
- @include web {
3
- min-width: 200px !important;
4
- }
5
- @include mobile {
6
- min-width: 180px !important;
7
- }
2
+ min-width: 300px !important;
8
3
  }
9
4
 
10
5
  .fs-filter-button-chip {