@dative-gpi/foundation-shared-components 1.0.126 → 1.0.128-dvh

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 (45) hide show
  1. package/components/FSBreadcrumbs.vue +20 -12
  2. package/components/FSDialogFormBody.vue +6 -6
  3. package/components/FSDialogMenu.vue +12 -2
  4. package/components/FSDialogMultiFormBody.vue +1 -1
  5. package/components/FSDialogRemove.vue +1 -1
  6. package/components/FSDialogSubmit.vue +1 -1
  7. package/components/FSFadeOut.vue +24 -9
  8. package/components/FSSpan.vue +8 -5
  9. package/components/FSText.vue +7 -5
  10. package/components/FSWindow.vue +10 -5
  11. package/components/agenda/FSAgendaHorizontalEvent.vue +14 -4
  12. package/components/calendar/FSSimpleCalendar.vue +6 -10
  13. package/components/fields/FSAutocompleteField.vue +37 -53
  14. package/components/fields/FSSelectField.vue +37 -53
  15. package/components/fields/FSTreeViewField.vue +1 -1
  16. package/components/lists/FSDataTableUI.vue +22 -14
  17. package/components/map/FSMap.vue +18 -8
  18. package/components/map/FSMapOverlay.vue +46 -18
  19. package/components/tiles/FSLocationTileUI.vue +1 -1
  20. package/components/views/desktop/FSBaseDefaultDesktopView.vue +9 -9
  21. package/components/views/desktop/FSBaseEntityDesktopView.vue +1 -0
  22. package/components/views/mobile/FSBaseDefaultMobileView.vue +9 -9
  23. package/components/views/mobile/FSBaseEntityMobileView.vue +1 -0
  24. package/composables/useBreakpoints.ts +6 -0
  25. package/composables/useSlots.ts +2 -1
  26. package/package.json +4 -4
  27. package/styles/components/fs_agenda_event.scss +1 -1
  28. package/styles/components/fs_breadcrumbs.scss +19 -31
  29. package/styles/components/fs_button.scss +7 -5
  30. package/styles/components/fs_chip.scss +8 -6
  31. package/styles/components/fs_clickable.scss +14 -12
  32. package/styles/components/fs_data_iterator_item.scss +12 -10
  33. package/styles/components/fs_dialog.scss +1 -1
  34. package/styles/components/fs_dialog_menu.scss +2 -2
  35. package/styles/components/fs_image_card.scss +5 -3
  36. package/styles/components/fs_map.scss +11 -7
  37. package/styles/components/fs_password_field.scss +4 -2
  38. package/styles/components/fs_span.scss +12 -4
  39. package/styles/components/fs_tabs.scss +9 -5
  40. package/styles/components/fs_tag.scss +9 -7
  41. package/styles/globals/overrides.scss +11 -4
  42. package/styles/globals/scrollbars.scss +10 -0
  43. package/tools/chartsTools.ts +3 -3
  44. package/utils/time.ts +13 -13
  45. package/components/tiles/FSChartTile.vue +0 -73
@@ -1,48 +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
- }
1
+ .fs-breadcrumbs {
2
+ height: var(--fs-breadcrumbs-height) !important;
3
+ padding: 0 !important;
4
+ gap: 0 !important;
13
5
 
14
- &:active {
15
- color: var(--fs-breadcrumbs-active-color) !important;
16
- }
6
+ max-width: 100%;
17
7
  }
18
8
 
19
- // .fs-breadcrumbs-divider {
20
- // margin-bottom: 2px !important;
21
- // }
22
-
23
- .fs-breadcrumbs.v-breadcrumbs {
24
- line-height: normal!important;
9
+ .v-breadcrumbs-item,
10
+ .v-breadcrumbs-item--link {
25
11
  padding: 0 !important;
26
- gap: 8px !important;
27
- height: 20px;
28
- }
12
+ user-select: none;
13
+ cursor: pointer;
29
14
 
30
- .v-breadcrumbs-item {
31
- padding: 0 !important;
15
+ align-self: stretch;
16
+ display: flex;
17
+ flex: 1 0 0;
18
+
19
+ max-width: fit-content;
20
+ min-width: 20px;
32
21
 
33
22
  &--disabled {
34
23
  opacity: 1 !important;
35
24
  color: var(--fs-breadcrumbs-disabled-color) !important;
36
25
  }
26
+ }
37
27
 
38
- &:last-child > .fs-breadcrumbs-label-disabled {
39
- @extend .text-button;
28
+ .v-breadcrumbs-item:last-child > .fs-breadcrumbs-label {
29
+ @extend .text-button;
40
30
 
41
- color: var(--fs-breadcrumbs-active-color) !important;
42
- }
31
+ color: var(--fs-breadcrumbs-active-color) !important;
43
32
  }
44
33
 
45
34
  .v-breadcrumbs-divider {
46
- padding: 0 !important;
47
35
  color: var(--fs-breadcrumbs-color) !important;
48
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
  }
@@ -12,15 +12,17 @@
12
12
  .fs-chip-editable {
13
13
  cursor: pointer !important;
14
14
 
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
15
  &:active {
22
16
  background-color: var(--fs-chip-active-background-color) !important;
23
17
  border-color: var(--fs-chip-active-border-color) !important;
24
18
  color: var(--fs-chip-active-color) !important;
25
19
  }
20
+
21
+ @include clickscreen {
22
+ &:hover {
23
+ background-color: var(--fs-chip-hover-background-color) !important;
24
+ border-color: var(--fs-chip-hover-border-color) !important;
25
+ color: var(--fs-chip-hover-color) !important;
26
+ }
27
+ }
26
28
  }
@@ -11,18 +11,7 @@
11
11
  &.fs-clickable-disabled {
12
12
  cursor: default;
13
13
  }
14
-
15
- &:not(.fs-clickable-disabled):hover:not(:has( .fs-stopclick:hover)) {
16
- background-color: var(--fs-clickable-hover-background-color) !important;
17
- border-color: var(--fs-clickable-hover-border-color) !important;
18
- color: var(--fs-clickable-hover-color) !important;
19
-
20
- & .fs-card-clickable {
21
- transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
22
- background-color: var(--fs-clickable-hover-background-color);
23
- }
24
- }
25
-
14
+
26
15
  &:not(.fs-clickable-disabled):active:not(:has( .fs-stopclick:hover)) {
27
16
  background-color: var(--fs-clickable-active-background-color) !important;
28
17
  border-color: var(--fs-clickable-active-border-color) !important;
@@ -33,6 +22,19 @@
33
22
  background-color: var(--fs-clickable-active-background-color);
34
23
  }
35
24
  }
25
+
26
+ @include clickscreen {
27
+ &:not(.fs-clickable-disabled):hover:not(:has( .fs-stopclick:hover)) {
28
+ background-color: var(--fs-clickable-hover-background-color) !important;
29
+ border-color: var(--fs-clickable-hover-border-color) !important;
30
+ color: var(--fs-clickable-hover-color) !important;
31
+
32
+ & .fs-card-clickable {
33
+ transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
34
+ background-color: var(--fs-clickable-hover-background-color);
35
+ }
36
+ }
37
+ }
36
38
  }
37
39
 
38
40
  a:has(.fs-clickable) {
@@ -8,16 +8,18 @@
8
8
  padding-right: 32px;
9
9
  }
10
10
 
11
- &:hover::after {
12
- content: "";
13
- background-color: black;
14
- pointer-events: none;
15
- position: absolute;
16
- opacity: 0.04;
17
- height: 100%;
18
- width: 100%;
19
- left: 0;
20
- top: 0;
11
+ @include clickscreen {
12
+ &:hover::after {
13
+ content: "";
14
+ background-color: black;
15
+ pointer-events: none;
16
+ position: absolute;
17
+ opacity: 0.04;
18
+ height: 100%;
19
+ width: 100%;
20
+ left: 0;
21
+ top: 0;
22
+ }
21
23
  }
22
24
  }
23
25
 
@@ -1,5 +1,5 @@
1
1
  .fs-dialog-mobile > .v-overlay__content {
2
- max-height: 100vh !important;
2
+ max-height: 100dvh !important;
3
3
  max-width: 100vw !important;
4
4
  width: 100% !important;
5
5
  margin: 0 !important;
@@ -1,11 +1,11 @@
1
1
  .v-overlay__content:has(.fs-dialog-menu) {
2
2
  width: fit-content !important;
3
- max-height: calc(100vh - 40px) !important;
3
+ max-height: calc(100dvh - 40px) !important;
4
4
  justify-content: center;
5
5
  align-items: center;
6
6
  }
7
7
 
8
8
  .fs-dialog-menu {
9
- max-height: calc(100vh - 40px) !important;
9
+ max-height: calc(100dvh - 40px) !important;
10
10
  max-width: calc(100vw - 40px) !important;
11
11
  }
@@ -11,8 +11,10 @@
11
11
  }
12
12
  }
13
13
 
14
- .fs-image-card:hover {
15
- > .fs-card {
16
- background-size: 105%;
14
+ @include clickscreen {
15
+ .fs-image-card:hover {
16
+ > .fs-card {
17
+ background-size: 105%;
18
+ }
17
19
  }
18
20
  }
@@ -92,11 +92,13 @@
92
92
  align-items: center;
93
93
  justify-content: center;
94
94
 
95
- &:hover {
96
- filter: brightness(0.92) drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4));
97
-
98
- > * {
99
- transform: scale(1.15);
95
+ @include clickscreen {
96
+ &:hover {
97
+ filter: brightness(0.92) drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4));
98
+
99
+ > * {
100
+ transform: scale(1.15);
101
+ }
100
102
  }
101
103
  }
102
104
  }
@@ -128,8 +130,10 @@
128
130
  opacity: 0.6;
129
131
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
130
132
 
131
- &:hover {
132
- opacity: 1;
133
+ @include clickscreen {
134
+ &:hover {
135
+ opacity: 1;
136
+ }
133
137
  }
134
138
  }
135
139
  }
@@ -4,7 +4,9 @@
4
4
  color: var(--fs-password-field-color) !important;
5
5
  transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
6
6
 
7
- &:hover {
8
- color: var(--fs-password-field-hover-color) !important;
7
+ @include clickscreen {
8
+ &:hover {
9
+ color: var(--fs-password-field-hover-color) !important;
10
+ }
9
11
  }
10
12
  }
@@ -1,9 +1,17 @@
1
1
  .fs-span {
2
+ display: flex;
3
+
4
+ max-width: 100%;
5
+ min-width: 0;
6
+ }
7
+
8
+ .fs-span > span {
9
+ text-align: var(--fs-span-text-align);
10
+ align-content: center;
2
11
  max-width: 100%;
3
- text-align: left;
4
12
  }
5
13
 
6
- .fs-span-line-clamp {
14
+ .fs-span-line-clamp > span {
7
15
  overflow: hidden;
8
16
  display: -webkit-box;
9
17
  line-clamp: var(--fs-span-line-clamp);
@@ -11,12 +19,12 @@
11
19
  -webkit-line-clamp: var(--fs-span-line-clamp);
12
20
  }
13
21
 
14
- .fs-span-ellipsis {
22
+ .fs-span-ellipsis > span {
15
23
  overflow: hidden;
16
24
  white-space: nowrap;
17
25
  text-overflow: ellipsis;
18
26
  }
19
27
 
20
- .fs-span-pre-wrap {
28
+ .fs-span-pre-wrap > span {
21
29
  white-space: pre-wrap;
22
30
  }
@@ -23,9 +23,11 @@
23
23
  @extend .text-button;
24
24
  }
25
25
 
26
- &:hover {
27
- border-bottom: 1px solid var(--fs-tab-hover-border-color) !important;
28
- color: var(--fs-group-hover-color) !important;
26
+ @include clickscreen {
27
+ &:hover {
28
+ border-bottom: 1px solid var(--fs-tab-hover-border-color) !important;
29
+ color: var(--fs-group-hover-color) !important;
30
+ }
29
31
  }
30
32
  }
31
33
 
@@ -34,8 +36,10 @@
34
36
  color: var(--fs-group-hover-color) !important;
35
37
  border-bottom: 0 !important;
36
38
 
37
- &:hover {
38
- border-bottom: 0 !important;
39
+ @include clickscreen {
40
+ &:hover {
41
+ border-bottom: 0 !important;
42
+ }
39
43
  }
40
44
  }
41
45
 
@@ -13,17 +13,19 @@
13
13
  background-color: var(--fs-tag-background-color) !important;
14
14
  color: var(--fs-tag-color) !important;
15
15
 
16
- &:hover {
17
- background-color: var(--fs-tag-hover-background-color) !important;
18
- color: var(--fs-tag-hover-color) !important;
19
- }
16
+ min-width: 20px !important;
17
+ width: 20px !important;
18
+ height: 20px !important;
20
19
 
21
20
  &:active {
22
21
  background-color: var(--fs-tag-active-background-color) !important;
23
22
  color: var(--fs-tag-active-color) !important;
24
23
  }
25
24
 
26
- min-width: 20px !important;
27
- width: 20px !important;
28
- height: 20px !important;
25
+ @include clickscreen {
26
+ &:hover {
27
+ background-color: var(--fs-tag-hover-background-color) !important;
28
+ color: var(--fs-tag-hover-color) !important;
29
+ }
30
+ }
29
31
  }
@@ -137,11 +137,16 @@
137
137
  }
138
138
  }
139
139
 
140
- // Ellipsis on input of all fields
141
140
  input {
141
+ // Ellipsis on all fields
142
142
  text-overflow: ellipsis;
143
143
  }
144
144
 
145
+ input, select, textarea {
146
+ // No zoom on focus for user of a certain version of Chrome, and who ask their mobile to zoom if font-size < 16px
147
+ touch-action: none;
148
+ }
149
+
145
150
  // No up / down buttons in input field of type number
146
151
  input[type=number] {
147
152
  -moz-appearance: textfield;
@@ -187,9 +192,11 @@ $nthOverlay: 25;
187
192
  }
188
193
 
189
194
  // Change color on arrows when hovered
190
- .v-slide-group__prev:hover,
191
- .v-slide-group__next:hover {
192
- color: var(--fs-group-hover-color);
195
+ @include clickscreen {
196
+ .v-slide-group__prev:hover,
197
+ .v-slide-group__next:hover {
198
+ color: var(--fs-group-hover-color);
199
+ }
193
200
  }
194
201
 
195
202
  /***************************************************************************/
@@ -47,9 +47,19 @@
47
47
  @include touchscreen {
48
48
  .fs-hide-x-scrollbar {
49
49
  overflow-x: scroll;
50
+
51
+ &::-webkit-scrollbar {
52
+ display: none;
53
+ }
54
+ scrollbar-width: none;
50
55
  }
51
56
 
52
57
  .fs-hide-y-scrollbar {
53
58
  overflow-y: scroll;
59
+
60
+ &::-webkit-scrollbar {
61
+ display: none;
62
+ }
63
+ scrollbar-width: none;
54
64
  }
55
65
  }
@@ -39,10 +39,10 @@ export const colorSetLabel = (value: ColorSets | number): string => {
39
39
  switch (value) {
40
40
  case ColorSets.Default: return $tr("ui.color-sets.am-charts", "Am Charts");
41
41
  case ColorSets.Grafana: return $tr("ui.color-sets.grafana", "Grafana");
42
- case ColorSets.Armytage: return $tr("ui.color-sets.armytage", "Armytage");
42
+ case ColorSets.Armytage: return $tr("ui.color-sets.armytage", "High contrast (26 colors)");
43
43
  case ColorSets.Hash: return $tr("ui.color-sets.hash", "Hash");
44
- case ColorSets.Kelly: return $tr("ui.color-sets.material", "Kelly");
45
- case ColorSets.ZeileisHornikMurrell: return $tr("ui.color-sets.material", "ZeileisHornikMurrell");
44
+ case ColorSets.Kelly: return $tr("ui.color-sets.kelly", "High contrast (22 colors)");
45
+ case ColorSets.ZeileisHornikMurrell: return $tr("ui.color-sets.zeileis", "Colorblind accessible");
46
46
  default: return $tr("ui.common.none", "None");
47
47
  }
48
48
  }
package/utils/time.ts CHANGED
@@ -5,13 +5,13 @@ import { TimeUnit } from "@dative-gpi/foundation-shared-domain/enums"
5
5
  const { $tr } = useTranslationsProvider();
6
6
 
7
7
  export const timeSteps = [
8
- { id: TimeUnit.Second, label: $tr("ui.common.second", "Second"), plural: $tr("ui.common.seconds", "Seconds") },
9
- { id: TimeUnit.Minute, label: $tr("ui.common.minute", "Minute"), plural: $tr("ui.common.minutes", "Minutes") },
10
- { id: TimeUnit.Hour, label: $tr("ui.common.hour", "Hour"), plural: $tr("ui.common.hours", "Hours") },
11
- { id: TimeUnit.Day, label: $tr("ui.common.day", "Day"), plural: $tr("ui.common.days", "Days") },
12
- { id: TimeUnit.Week, label: $tr("ui.common.week", "Week"), plural: $tr("ui.common.weeks", "Weeks") },
13
- { id: TimeUnit.Month, label: $tr("ui.common.month", "Month"), plural: $tr("ui.common.months", "Months") },
14
- { id: TimeUnit.Year, label: $tr("ui.common.year", "Year"), plural: $tr("ui.common.years", "Years") },
8
+ { id: TimeUnit.Second, get label() { return $tr("ui.common.second", "Second") }, get plural() { return $tr("ui.common.seconds", "Seconds") } },
9
+ { id: TimeUnit.Minute, get label() { return $tr("ui.common.minute", "Minute") }, get plural() { return $tr("ui.common.minutes", "Minutes") } },
10
+ { id: TimeUnit.Hour, get label() { return $tr("ui.common.hour", "Hour") }, get plural() { return $tr("ui.common.hours", "Hours") } },
11
+ { id: TimeUnit.Day, get label() { return $tr("ui.common.day", "Day") }, get plural() { return $tr("ui.common.days", "Days") } },
12
+ { id: TimeUnit.Week, get label() { return $tr("ui.common.week", "Week") }, get plural() { return $tr("ui.common.weeks", "Weeks") } },
13
+ { id: TimeUnit.Month, get label() { return $tr("ui.common.month", "Month") }, get plural() { return $tr("ui.common.months", "Months") } },
14
+ { id: TimeUnit.Year, get label() { return $tr("ui.common.year", "Year") }, get plural() { return $tr("ui.common.years", "Years") } },
15
15
  ];
16
16
 
17
17
  export const timeStepToString = (value: { value: number, unit: TimeUnit } | null): string => {
@@ -28,12 +28,12 @@ export const timeStepToString = (value: { value: number, unit: TimeUnit } | null
28
28
  };
29
29
 
30
30
  // TODO : remove everything below this line
31
- export const timeScale: any[] = [
32
- { id: 1, label: $tr("ui.common.second", "Second"), plural: $tr("ui.common.seconds", "Seconds") },
33
- { id: 60, label: $tr("ui.common.minute", "Minute"), plural: $tr("ui.common.minutes", "Minutes") },
34
- { id: 3600, label: $tr("ui.common.hour", "Hour"), plural: $tr("ui.common.hours", "Hours") },
35
- { id: 86400, label: $tr("ui.common.day", "Day"), plural: $tr("ui.common.days", "Days") },
36
- { id: 604800, label: $tr("ui.common.week", "Week"), plural: $tr("ui.common.weeks", "Weeks") },
31
+ export const timeScale = [
32
+ { id: 1, get label() { return $tr("ui.common.second", "Second") }, get plural() { return $tr("ui.common.seconds", "Seconds") } },
33
+ { id: 60, get label() { return $tr("ui.common.minute", "Minute") }, get plural() { return $tr("ui.common.minutes", "Minutes") } },
34
+ { id: 3600, get label() { return $tr("ui.common.hour", "Hour") }, get plural() { return $tr("ui.common.hours", "Hours") } },
35
+ { id: 86400, get label() { return $tr("ui.common.day", "Day") }, get plural() { return $tr("ui.common.days", "Days") } },
36
+ { id: 604800, get label() { return $tr("ui.common.week", "Week") }, get plural() { return $tr("ui.common.weeks", "Weeks") } },
37
37
  ];
38
38
 
39
39
  export const getTimeScaleIndex = (value: number): number => {
@@ -1,73 +0,0 @@
1
- <template>
2
- <FSChartTileUI
3
- v-if="chart"
4
- :label="chart.label"
5
- :icon="chart.icon"
6
- :type="chart.chartType"
7
- :imageId="chart.imageId"
8
- v-bind="$attrs"
9
- />
10
- </template>
11
-
12
- <script lang="ts">
13
- import { defineComponent, watch, computed } from "vue";
14
- import type { PropType } from "vue";
15
-
16
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
17
- import { chartIcon } from "@dative-gpi/foundation-shared-components/tools";
18
-
19
- import { useChartOrganisation, useChartOrganisationType } from "@dative-gpi/foundation-core-services/composables";
20
-
21
- import { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
22
- import FSChartTileUI from "./FSChartTileUI.vue";
23
-
24
- export default defineComponent({
25
- name: "FSChartTile",
26
- components: {
27
- FSChartTileUI
28
- },
29
- props: {
30
- chartId: {
31
- type: String,
32
- required: true
33
- },
34
- scope: {
35
- type: Object as PropType<ApplicationScope | number>,
36
- required : true
37
- }
38
- },
39
- setup(props) {
40
-
41
- const {get : fetchChartOrganisation, entity : chartOrganisation } = useChartOrganisation();
42
- const {get : fetchChartOrganisationType, entity : chartOrganisationType } = useChartOrganisationType();
43
-
44
- const chart = computed(() =>{
45
- if(props.scope == ApplicationScope.Organisation){
46
- return chartOrganisation.value;
47
- }
48
- else if(props.scope == ApplicationScope.OrganisationType){
49
- return chartOrganisationType.value;
50
- }
51
- else{
52
- return null
53
- }
54
- })
55
-
56
- watch(() => [props.chartId, props.scope], () =>{
57
- if(props.scope == ApplicationScope.Organisation){
58
- fetchChartOrganisation(props.chartId);
59
- }
60
- else if(props.scope == ApplicationScope.OrganisationType)
61
- {
62
- fetchChartOrganisationType(props.chartId)
63
- }
64
- }, {immediate : true})
65
-
66
- return {
67
- ColorEnum,
68
- chart,
69
- chartIcon
70
- };
71
- }
72
- });
73
- </script>