@dative-gpi/foundation-shared-components 1.0.51 → 1.0.53

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 (36) hide show
  1. package/components/FSCard.vue +6 -2
  2. package/components/FSClickable.vue +6 -9
  3. package/components/FSDialogRemove.vue +1 -0
  4. package/components/agenda/FSAgenda.vue +210 -0
  5. package/components/agenda/FSAgendaDialogCalendar.vue +76 -0
  6. package/components/agenda/FSAgendaHeader.vue +190 -0
  7. package/components/agenda/FSAgendaHorizontalEvent.vue +162 -0
  8. package/components/agenda/FSAgendaHorizontalTimeLineMarker.vue +46 -0
  9. package/components/agenda/FSAgendaHoursCol.vue +103 -0
  10. package/components/agenda/FSAgendaHoursRow.vue +124 -0
  11. package/components/agenda/FSAgendaVerticalEvent.vue +160 -0
  12. package/components/agenda/FSAgendaVerticalTimeLineMarker.vue +46 -0
  13. package/components/agenda/FSDayAgenda.vue +200 -0
  14. package/components/agenda/FSMonthAgenda.vue +258 -0
  15. package/components/agenda/FSSelectAgendaMode.vue +54 -0
  16. package/components/agenda/FSWeekAgenda.vue +329 -0
  17. package/components/fields/FSCommentField.vue +93 -0
  18. package/components/tiles/FSChartTileUI.vue +116 -0
  19. package/components/tiles/FSCommentTileUI.vue +149 -0
  20. package/components/tiles/FSLocationTileUI.vue +138 -0
  21. package/components/tiles/FSModelTileUI.vue +59 -0
  22. package/models/agenda.ts +9 -0
  23. package/models/index.ts +1 -0
  24. package/package.json +4 -4
  25. package/styles/components/fs_agenda.scss +32 -0
  26. package/styles/components/fs_agenda_event.scss +41 -0
  27. package/styles/components/fs_agenda_hours_col.scss +4 -0
  28. package/styles/components/fs_agenda_hours_row.scss +13 -0
  29. package/styles/components/fs_agenda_time_line_marker.scss +19 -0
  30. package/styles/components/fs_clickable.scss +4 -2
  31. package/styles/components/fs_dialog.scss +11 -15
  32. package/styles/components/fs_tile.scss +4 -0
  33. package/styles/components/index.scss +5 -0
  34. package/tools/alertsTools.ts +54 -0
  35. package/tools/chartsTools.ts +300 -0
  36. package/tools/index.ts +2 -0
@@ -0,0 +1,138 @@
1
+ <template>
2
+ <FSTile
3
+ :activeColor="$props.color"
4
+ :bottomColor="$props.color"
5
+ :modelValue="$props.modelValue"
6
+ v-bind="$attrs"
7
+ >
8
+ <FSRow
9
+ align="center-center"
10
+ width="100%"
11
+ gap="24px"
12
+ :wrap="false"
13
+ >
14
+ <FSCol
15
+ gap="12px"
16
+ width="100%"
17
+ class="fs-location-tile-text-container"
18
+ >
19
+ <FSCol
20
+ gap="6px"
21
+ >
22
+ <FSSpan
23
+ font="text-button"
24
+ :lineClamp="1"
25
+ >
26
+ {{ $props.label }}
27
+ </FSSpan>
28
+ <FSSpan
29
+ font="text-overline"
30
+ variant="soft"
31
+ >
32
+ {{ $props.code }}
33
+ </FSSpan>
34
+ </FSCol>
35
+ <FSRow
36
+ :wrap="false"
37
+ align="center-left"
38
+ >
39
+ <FSColor
40
+ padding="0 8px"
41
+ height="24px"
42
+ :color="ColorEnum.Light"
43
+ :border="false"
44
+ >
45
+ <FSRow
46
+ align="center-center"
47
+ >
48
+ <FSSpan
49
+ font="text-overline"
50
+ >
51
+ {{ $props.deviceCount }}
52
+ </FSSpan>
53
+ </FSRow>
54
+ </FSColor>
55
+ <FSSpan
56
+ font="text-overline"
57
+ >
58
+ {{ $tr("ui.location-tile.device(s)", "Device(s) in this location.") }}
59
+ </FSSpan>
60
+ </FSRow>
61
+ </FSCol>
62
+ <FSCol
63
+ width="hug"
64
+ >
65
+ <FSIconCard
66
+ :icon="$props.icon"
67
+ :iconColor="$props.color"
68
+ size="100px"
69
+ iconSize="38px"
70
+ variant="background"
71
+ :border="true"
72
+ />
73
+ </FSCol>
74
+ </FSRow>
75
+ </FSTile>
76
+ </template>
77
+
78
+ <script lang="ts">
79
+ import { defineComponent, type PropType } from "vue";
80
+
81
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
82
+
83
+ import FSIconCard from "../FSIconCard.vue";
84
+ import FSColor from "../FSColor.vue";
85
+ import FSSpan from "../FSSpan.vue";
86
+ import FSTile from "./FSTile.vue";
87
+ import FSCol from "../FSCol.vue";
88
+ import FSRow from "../FSRow.vue";
89
+
90
+ export default defineComponent({
91
+ name: "FSGroupTileUI",
92
+ components: {
93
+ FSIconCard,
94
+ FSColor,
95
+ FSSpan,
96
+ FSTile,
97
+ FSCol,
98
+ FSRow
99
+ },
100
+ props: {
101
+ label: {
102
+ type: String as PropType<string | null>,
103
+ required: false,
104
+ default: null
105
+ },
106
+ code: {
107
+ type: String as PropType<string | null>,
108
+ required: false,
109
+ default: null
110
+ },
111
+ color: {
112
+ type: String,
113
+ required: false,
114
+ default: () => ColorEnum.Primary
115
+ },
116
+ icon: {
117
+ type: String,
118
+ required: false,
119
+ default: "mdi-map-marker"
120
+ },
121
+ deviceCount: {
122
+ type: Number,
123
+ required: false,
124
+ default: 0
125
+ },
126
+ modelValue: {
127
+ type: Boolean,
128
+ required: false,
129
+ default: false
130
+ },
131
+ },
132
+ setup() {
133
+ return {
134
+ ColorEnum
135
+ };
136
+ }
137
+ });
138
+ </script>
@@ -0,0 +1,59 @@
1
+ <template>
2
+ <FSClickable
3
+ padding="16px"
4
+ height="196px"
5
+ width="148px"
6
+ :border="false"
7
+ v-bind="$attrs"
8
+ >
9
+ <template
10
+ #default
11
+ >
12
+ <FSCol
13
+ align="center-center"
14
+ >
15
+ <FSImage
16
+ :imageId="imageId"
17
+ width="116px"
18
+ height="116px"
19
+ />
20
+ <FSSpan
21
+ :lineClamp="2"
22
+ >
23
+ {{ label }}
24
+ </FSSpan>
25
+ </FSCol>
26
+ </template>
27
+ </FSClickable>
28
+ </template>
29
+
30
+ <script lang="ts">
31
+ import { defineComponent, type PropType } from "vue";
32
+
33
+ import FSCol from "../FSCol.vue";
34
+ import FSSpan from "../FSSpan.vue";
35
+ import FSImage from "../FSImage.vue";
36
+ import FSClickable from "../FSClickable.vue";
37
+
38
+ export default defineComponent({
39
+ name: "FSModelTileUI",
40
+ components: {
41
+ FSCol,
42
+ FSSpan,
43
+ FSImage,
44
+ FSClickable,
45
+ },
46
+ props:{
47
+ label: {
48
+ type: String,
49
+ required: false,
50
+ default: null,
51
+ },
52
+ imageId: {
53
+ type: String as PropType<string | null>,
54
+ required: false,
55
+ default: null,
56
+ }
57
+ }
58
+ });
59
+ </script>
@@ -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
+ }
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";
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.51",
4
+ "version": "1.0.53",
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": "1.0.51",
14
- "@dative-gpi/foundation-shared-services": "1.0.51"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.53",
14
+ "@dative-gpi/foundation-shared-services": "1.0.53"
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": "88ce99aa86ffc8a8c22ae0865b80cbfb4baf06d9"
38
+ "gitHead": "baf907fd3b2c5faed8f0688a5be995224bf42041"
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
+ }
@@ -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
  }
@@ -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
  }
@@ -42,4 +42,8 @@
42
42
  width: 32px;
43
43
  height: 32px;
44
44
  }
45
+ }
46
+
47
+ .fs-location-tile-text-container {
48
+ min-width: 0;
45
49
  }
@@ -1,4 +1,9 @@
1
1
  @import "fs_accordion_panel.scss";
2
+ @import "fs_agenda.scss";
3
+ @import "fs_agenda_event.scss";
4
+ @import "fs_agenda_hours_col.scss";
5
+ @import "fs_agenda_hours_row.scss";
6
+ @import "fs_agenda_time_line_marker.scss";
2
7
  @import "fs_autocomplete_field.scss";
3
8
  @import "fs_base_field.scss";
4
9
  @import "fs_breadcrumbs.scss";
@@ -0,0 +1,54 @@
1
+ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
2
+ import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/enums";
3
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models"
4
+
5
+ const { $tr } = useTranslationsProvider();
6
+
7
+ export const AlertTools = {
8
+ statusIcon(value: AlertStatus): string {
9
+ switch (value) {
10
+ case AlertStatus.Pending: return "mdi-timer-outline";
11
+ case AlertStatus.Untriggered: return "mdi-timer-off-outline";
12
+ case AlertStatus.Unresolved: return "mdi-alert-circle-outline";
13
+ case AlertStatus.Resolved: return "mdi-check-circle-outline";
14
+ case AlertStatus.Expired: return "mdi-clock-outline";
15
+ case AlertStatus.Triggered: return "mdi-alert-circle-outline";
16
+ case AlertStatus.Abandoned: return "mdi-cancel"
17
+ default: return "";
18
+ }
19
+ },
20
+ statusLabel(value: AlertStatus): string {
21
+ switch (value) {
22
+ case AlertStatus.Pending: return $tr("ui.alert.pending", "Pending");
23
+ case AlertStatus.Untriggered: return $tr("ui.alert.untriggered", "Untriggered");
24
+ case AlertStatus.Unresolved: return $tr("ui.alert.unresolved", "Unresolved");
25
+ case AlertStatus.Resolved: return $tr("ui.alert.resolved", "Resolved");
26
+ case AlertStatus.Expired: return $tr("ui.alert.expired", "Expired");
27
+ case AlertStatus.Triggered: return $tr("ui.alert.triggered", "Triggered");
28
+ case AlertStatus.Abandoned: return $tr("ui.alert.abandoned", "Abandoned");
29
+ default: return "";
30
+ }
31
+ },
32
+ criticityColor(value: Criticity): ColorEnum {
33
+ switch (value) {
34
+ case Criticity.Warning: return ColorEnum.Warning;
35
+ case Criticity.Error: return ColorEnum.Error;
36
+ case Criticity.Information: return ColorEnum.Primary;
37
+ default: return ColorEnum.Light;
38
+ }
39
+ },
40
+ criticityIcon(value: Criticity): string {
41
+ switch (value) {
42
+ case Criticity.Warning: return "mdi-alert-outline";
43
+ case Criticity.Error: return "mdi-alert-circle-outline";
44
+ default: return "mdi-information-outline";
45
+ }
46
+ },
47
+ criticityLabel(value: Criticity): string {
48
+ switch (value) {
49
+ case Criticity.Warning: return $tr("ui.alert.warning", "Warning");
50
+ case Criticity.Error: return $tr("ui.alert.error", "Error");
51
+ default: return $tr("ui.alert.information", "Information");
52
+ }
53
+ }
54
+ }