@dative-gpi/foundation-shared-components 1.0.94 → 1.0.96

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 (43) hide show
  1. package/components/FSDialogContent.vue +10 -7
  2. package/components/FSDialogFormBody.vue +2 -2
  3. package/components/FSDialogMultiFormBody.vue +3 -2
  4. package/components/FSDialogSubmit.vue +2 -2
  5. package/components/FSEditImageUI.vue +10 -2
  6. package/components/FSFadeOut.vue +3 -10
  7. package/components/FSGrid.vue +0 -1
  8. package/components/FSTab.vue +15 -13
  9. package/components/agenda/FSAgenda.vue +26 -7
  10. package/components/agenda/FSAgendaHeader.vue +33 -8
  11. package/components/agenda/FSAgendaHorizontalEvent.vue +3 -1
  12. package/components/agenda/FSAgendaHoursRow.vue +23 -7
  13. package/components/agenda/FSWeekAgenda.vue +2 -2
  14. package/components/fields/FSBaseField.vue +32 -22
  15. package/components/fields/FSColorField.vue +2 -1
  16. package/components/fields/FSIconField.vue +0 -1
  17. package/components/fields/FSNumberField.vue +5 -1
  18. package/components/fields/FSRichTextField.vue +4 -3
  19. package/components/fields/FSTermField.vue +8 -1
  20. package/components/lists/FSDataTableUI.vue +24 -22
  21. package/components/lists/FSLoadDataTable.vue +10 -7
  22. package/components/tiles/FSChartTile.vue +73 -0
  23. package/components/tiles/FSChartTileUI.vue +14 -20
  24. package/components/tiles/FSCommentTileUI.vue +13 -9
  25. package/components/tiles/FSLocationTileUI.vue +52 -48
  26. package/components/views/desktop/FSBaseEntityDesktopView.vue +6 -7
  27. package/components/views/mobile/FSBaseEntityMobileView.vue +6 -7
  28. package/composables/useBreakpoints.ts +5 -0
  29. package/package.json +4 -4
  30. package/styles/components/fs_agenda.scss +4 -0
  31. package/styles/components/fs_agenda_hours_row.scss +3 -3
  32. package/styles/components/fs_autocomplete_field.scss +0 -13
  33. package/styles/components/fs_color_field.scss +0 -4
  34. package/styles/components/fs_magic_config_field.scss +1 -2
  35. package/styles/components/fs_select_field.scss +0 -13
  36. package/styles/components/fs_wrap_group.scss +3 -2
  37. package/styles/components/index.scss +0 -4
  38. package/components/views/FSEntityHeader.vue +0 -343
  39. package/components/views/FSListHeader.vue +0 -83
  40. package/styles/components/fs_icon_field.scss +0 -12
  41. package/styles/components/fs_search_field.scss +0 -3
  42. package/styles/components/fs_tag_field.scss +0 -8
  43. package/styles/components/fs_time_field.scss +0 -12
@@ -289,25 +289,29 @@
289
289
  <slot
290
290
  :name="`${header.slotName}-append`"
291
291
  />
292
- <v-spacer />
293
- <slot
294
- :name="`${header.slotName}-configuration`"
292
+ <FSRow
293
+ align="center-right"
294
+ :wrap="false"
295
295
  >
296
- <FSHeaderButton
297
- :first="index === 0"
298
- :last="index === headersSlots.length - 1"
299
- @update:hide="updateHeader(header, 'hidden', !header.hidden)"
300
- @update:left="updateHeader(header, 'index', -1)"
301
- @update:right="updateHeader(header, 'index', 1)"
302
- />
303
- <FSButton
304
- v-if="header.sortable"
305
- variant="icon"
306
- :color="sortColor(header, props)"
307
- :icon="sortIcon(header, props)"
308
- @click="toggleSort(header)"
309
- />
310
- </slot>
296
+ <slot
297
+ :name="`${header.slotName}-configuration`"
298
+ >
299
+ <FSHeaderButton
300
+ :first="index === 0"
301
+ :last="index === headersSlots.length - 1"
302
+ @update:hide="updateHeader(header, 'hidden', !header.hidden)"
303
+ @update:left="updateHeader(header, 'index', -1)"
304
+ @update:right="updateHeader(header, 'index', 1)"
305
+ />
306
+ <FSButton
307
+ v-if="header.sortable"
308
+ variant="icon"
309
+ :color="sortColor(header, props)"
310
+ :icon="sortIcon(header, props)"
311
+ @click="toggleSort(header)"
312
+ />
313
+ </slot>
314
+ </FSRow>
311
315
  </FSRow>
312
316
  </slot>
313
317
  </template>
@@ -370,7 +374,6 @@
370
374
  </FSText>
371
375
  </template>
372
376
  </template>
373
- <v-spacer />
374
377
  <FSRow
375
378
  align="center-right"
376
379
  width="hug"
@@ -544,7 +547,6 @@
544
547
  </FSText>
545
548
  </template>
546
549
  </template>
547
- <v-spacer />
548
550
  <FSRow
549
551
  align="center-right"
550
552
  :wrap="false"
@@ -1249,7 +1251,7 @@ export default defineComponent({
1249
1251
  return header.methodFilterRaw(ff.value, item);
1250
1252
  }
1251
1253
  const flat = property = [property].flat();
1252
- return Array.isArray(flat) ? flat.includes(ff.value) || (!ff.value && flat.length == 0) : (!ff.value && !flat) || ff.value == flat;
1254
+ return (!ff.value && flat.length == 0) || flat.some(f => f == ff.value);
1253
1255
  })
1254
1256
  }));
1255
1257
  filterDictionary[key] = value;
@@ -1272,7 +1274,7 @@ export default defineComponent({
1272
1274
  return header.methodFilterRaw(dv, item);
1273
1275
  }
1274
1276
  const flat = [property].flat().map(mapToInnerValue);
1275
- return Array.isArray(flat) ? flat.includes(dv) || (!dv && flat.length == 0) : (!dv && !flat) || dv == flat;
1277
+ return (!dv && flat.length == 0) || flat.some(f => f == dv);
1276
1278
  })
1277
1279
  }
1278
1280
  });
@@ -13,13 +13,16 @@
13
13
  <FSLoader
14
14
  variant="button"
15
15
  />
16
- <v-spacer />
17
- <FSLoader
18
- variant="button"
19
- />
20
- <FSLoader
21
- variant="button"
22
- />
16
+ <FSRow
17
+ align="center-right"
18
+ >
19
+ <FSLoader
20
+ variant="button"
21
+ />
22
+ <FSLoader
23
+ variant="button"
24
+ />
25
+ </FSRow>
23
26
  </FSRow>
24
27
  <FSRow>
25
28
  <FSLoader
@@ -0,0 +1,73 @@
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>
@@ -1,8 +1,9 @@
1
1
  <template>
2
2
  <FSClickable
3
- padding="16px"
4
3
  :width="['275px','336px']"
5
4
  :height="['124px','156px']"
5
+ padding="16px 16px 16px 20px"
6
+ borderRadius="8px"
6
7
  v-bind="$attrs"
7
8
  >
8
9
  <template
@@ -10,27 +11,24 @@
10
11
  >
11
12
  <FSRow
12
13
  align="center-left"
14
+ gap="16px"
13
15
  :wrap="false"
14
16
  >
15
17
  <FSCol
16
18
  align="center-left"
17
19
  >
18
20
  <FSSpan
19
- font="text-button"
20
- :lineClamp="2"
21
+ font="text-overline"
22
+ :lineClamp="4"
21
23
  >
22
24
  {{ $props.label }}
23
25
  </FSSpan>
24
26
  <FSIcon
25
27
  :color="ColorEnum.Error"
28
+ size="18px"
26
29
  >
27
30
  {{ chartIcon(type) }}
28
31
  </FSIcon>
29
- <FSSpan
30
- font="text-overline"
31
- >
32
- {{ $props.categoryLabel }}
33
- </FSSpan>
34
32
  </FSCol>
35
33
  <FSCol
36
34
  align="center-right"
@@ -38,13 +36,13 @@
38
36
  >
39
37
  <FSImage
40
38
  v-if="$props.imageId"
41
- height="92px"
42
- width="92px"
39
+ height="82px"
40
+ width="82px"
43
41
  :imageId="$props.imageId"
44
42
  />
45
43
  <FSIcon
46
44
  v-else-if="$props.icon"
47
- size="92px"
45
+ size="82px"
48
46
  :icon="$props.icon"
49
47
  />
50
48
  </FSCol>
@@ -58,7 +56,7 @@ import { defineComponent } from "vue";
58
56
  import type { PropType } from "vue";
59
57
 
60
58
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
61
- import type { ChartType } from "@dative-gpi/foundation-shared-domain/enums";
59
+ import { ChartType } from "@dative-gpi/foundation-shared-domain/enums";
62
60
 
63
61
  import { chartIcon } from "@dative-gpi/foundation-shared-components/tools";
64
62
 
@@ -69,15 +67,16 @@ import FSIcon from "../FSIcon.vue";
69
67
  import FSRow from "../FSRow.vue";
70
68
  import FSCol from "../FSCol.vue";
71
69
 
70
+
72
71
  export default defineComponent({
73
72
  name: "FSChartTileUI",
74
73
  components: {
75
- FSIcon,
74
+ FSClickable,
76
75
  FSImage,
76
+ FSIcon,
77
77
  FSRow,
78
78
  FSCol,
79
79
  FSSpan,
80
- FSClickable
81
80
  },
82
81
  props: {
83
82
  label: {
@@ -90,11 +89,6 @@ export default defineComponent({
90
89
  required: false,
91
90
  default: null
92
91
  },
93
- categoryLabel: {
94
- type: String as PropType<string | null>,
95
- required: false,
96
- default: null
97
- },
98
92
  icon: {
99
93
  type: String as PropType<string | null>,
100
94
  required: false,
@@ -103,7 +97,7 @@ export default defineComponent({
103
97
  type: {
104
98
  type: Number as PropType<ChartType>,
105
99
  required: false,
106
- default: null
100
+ default: ChartType.None
107
101
  }
108
102
  },
109
103
  setup() {
@@ -26,15 +26,19 @@
26
26
  -
27
27
  {{ timestamp }}
28
28
  </FSText>
29
- <v-spacer />
30
- <FSButtonEditIcon
31
- v-if="canEditRemove"
32
- @click="showEditComment = true"
33
- />
34
- <FSButtonRemoveIcon
35
- v-if="canEditRemove"
36
- @click="removeDialog = true"
37
- />
29
+ <FSRow
30
+ align="center-right"
31
+ :wrap="false"
32
+ >
33
+ <FSButtonEditIcon
34
+ v-if="canEditRemove"
35
+ @click="showEditComment = true"
36
+ />
37
+ <FSButtonRemoveIcon
38
+ v-if="canEditRemove"
39
+ @click="removeDialog = true"
40
+ />
41
+ </FSRow>
38
42
  </FSRow>
39
43
  </template>
40
44
  <template
@@ -21,7 +21,7 @@
21
21
  :width="infoWidth"
22
22
  >
23
23
  <FSCol
24
- gap="6px"
24
+ gap="4px"
25
25
  >
26
26
  <FSSpan
27
27
  font="text-button"
@@ -37,59 +37,63 @@
37
37
  {{ $props.code }}
38
38
  </FSSpan>
39
39
  </FSCol>
40
- <FSRow
41
- v-if="$props.deviceCount"
42
- :wrap="false"
43
- align="center-left"
40
+ <FSCol
41
+ gap="8px"
44
42
  >
45
- <FSColor
46
- width="24px"
47
- height="24px"
48
- :color="ColorEnum.Light"
49
- :border="false"
43
+ <FSRow
44
+ v-if="$props.deviceCount"
45
+ :wrap="false"
46
+ align="center-left"
50
47
  >
51
- <FSRow
52
- align="center-center"
48
+ <FSColor
49
+ width="24px"
50
+ height="24px"
51
+ :color="ColorEnum.Light"
52
+ :border="false"
53
53
  >
54
- <FSSpan
55
- font="text-overline"
54
+ <FSRow
55
+ align="center-center"
56
56
  >
57
- {{ $props.deviceCount <= 99 ? $props.deviceCount : "99+" }}
58
- </FSSpan>
59
- </FSRow>
60
- </FSColor>
61
- <FSSpan
62
- font="text-overline"
63
- >
64
- {{ $tr("entity.location.devices", "Devices") }}
65
- </FSSpan>
66
- </FSRow>
67
- <FSRow
68
- v-if="$props.address"
69
- :wrap="false"
70
- align="center-left"
71
- >
72
- <FSColor
73
- width="24px"
74
- height="24px"
75
- :color="ColorEnum.Light"
76
- :border="false"
77
- >
78
- <FSRow
79
- align="center-center"
57
+ <FSSpan
58
+ font="text-overline"
59
+ >
60
+ {{ $props.deviceCount <= 99 ? $props.deviceCount : "99+" }}
61
+ </FSSpan>
62
+ </FSRow>
63
+ </FSColor>
64
+ <FSSpan
65
+ font="text-overline"
80
66
  >
81
- <FSIcon
82
- icon="mdi-map-marker"
83
- size="16px"
84
- />
85
- </FSRow>
86
- </FSColor>
87
- <FSSpan
88
- font="text-overline"
67
+ {{ $tr("entity.location.devices", "Devices") }}
68
+ </FSSpan>
69
+ </FSRow>
70
+ <FSRow
71
+ v-if="$props.address"
72
+ :wrap="false"
73
+ align="center-left"
89
74
  >
90
- {{ $props.address }}
91
- </FSSpan>
92
- </FSRow>
75
+ <FSColor
76
+ width="24px"
77
+ height="24px"
78
+ :color="ColorEnum.Light"
79
+ :border="false"
80
+ >
81
+ <FSRow
82
+ align="center-center"
83
+ >
84
+ <FSIcon
85
+ icon="mdi-map-marker"
86
+ size="16px"
87
+ />
88
+ </FSRow>
89
+ </FSColor>
90
+ <FSSpan
91
+ font="text-overline"
92
+ >
93
+ {{ $props.address }}
94
+ </FSSpan>
95
+ </FSRow>
96
+ </FSCol>
93
97
  </FSCol>
94
98
  <FSIconCard
95
99
  backgroundVariant="standard"
@@ -30,9 +30,9 @@
30
30
  v-else-if="$props.icon"
31
31
  :backgroundVariant="$props.iconBackgroundVariant"
32
32
  :backgroundColor="$props.iconBackgroundColors"
33
+ :iconColor="$props.iconColor"
33
34
  :border="$props.iconBorder"
34
35
  :icon="$props.icon"
35
- :iconColor="$props.color"
36
36
  :size="actualImageSize"
37
37
  />
38
38
  <FSCol
@@ -144,16 +144,16 @@ export default defineComponent({
144
144
  required: false,
145
145
  default: () => ["124px", "96px", "80px"]
146
146
  },
147
- color: {
148
- type: String as PropType<ColorBase>,
149
- required: false,
150
- default: null
151
- },
152
147
  icon: {
153
148
  type: String as PropType<string>,
154
149
  required: false,
155
150
  default: "mdi-ab-testing"
156
151
  },
152
+ iconColor: {
153
+ type: String as PropType<ColorBase>,
154
+ required: false,
155
+ default: null
156
+ },
157
157
  iconBackgroundVariant: {
158
158
  type: String as PropType<"background" | "standard" | "full" | "gradient">,
159
159
  required: false,
@@ -195,7 +195,6 @@ export default defineComponent({
195
195
  topOffset.value = Math.max(0, Math.min(actualScrollTop, actualMinSize + 16 + 24));
196
196
  }
197
197
 
198
-
199
198
  delete slots.title;
200
199
 
201
200
  return {
@@ -22,9 +22,9 @@
22
22
  v-else-if="$props.icon"
23
23
  :backgroundVariant="$props.iconBackgroundVariant"
24
24
  :backgroundColor="$props.iconBackgroundColors"
25
+ :iconColor="$props.iconColor"
25
26
  :border="$props.iconBorder"
26
27
  :icon="$props.icon"
27
- :iconColor="$props.color"
28
28
  :size="actualImageSize"
29
29
  />
30
30
  <FSCol
@@ -134,16 +134,16 @@ export default defineComponent({
134
134
  required: false,
135
135
  default: () => ["124px", "96px", "80px"]
136
136
  },
137
- color: {
138
- type: String as PropType<ColorBase>,
139
- required: false,
140
- default: null
141
- },
142
137
  icon: {
143
138
  type: String as PropType<string>,
144
139
  required: false,
145
140
  default: "mdi-ab-testing"
146
141
  },
142
+ iconColor: {
143
+ type: String as PropType<ColorBase>,
144
+ required: false,
145
+ default: null
146
+ },
147
147
  iconBackgroundVariant: {
148
148
  type: String as PropType<"background" | "standard" | "full" | "gradient">,
149
149
  required: false,
@@ -185,7 +185,6 @@ export default defineComponent({
185
185
  topOffset.value = Math.max(0, Math.min(actualScrollTop, actualMinSize + 16 + 24));
186
186
  }
187
187
 
188
-
189
188
  delete slots.title;
190
189
 
191
190
  return {
@@ -12,6 +12,11 @@ export const useBreakpoints = () => {
12
12
  windowHeight.value = window.innerHeight;
13
13
  windowWidth.value = window.innerWidth;
14
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
+ }
15
20
  windowOuterWidth.value = window.outerWidth;
16
21
  };
17
22
 
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.94",
4
+ "version": "1.0.96",
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.94",
14
- "@dative-gpi/foundation-shared-services": "1.0.94"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.96",
14
+ "@dative-gpi/foundation-shared-services": "1.0.96"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -35,5 +35,5 @@
35
35
  "sass": "1.71.1",
36
36
  "sass-loader": "13.3.2"
37
37
  },
38
- "gitHead": "be58c8299c1fc3d18c29089e157f248527da9234"
38
+ "gitHead": "208043509258652b856a824d62a2a91e98328007"
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
+ }
@@ -1,9 +1,9 @@
1
1
  .fs-agenda-hours-row {
2
- transform: translateX(calc(-2.4% + 2px));
2
+ transform: var(--fs-agenda-hours-row-transform);
3
3
  }
4
4
 
5
- .fs-agenda-hours-row-text {
6
- padding: 0 2px;
5
+ .fs-agenda-hours-row-markers {
6
+ transform: translateX(calc(-2.4% + 1px)); // 1px is the border width
7
7
  }
8
8
 
9
9
  .fs-agenda-hours-row-marker {
@@ -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;
@@ -17,8 +17,4 @@
17
17
  background: none !important;
18
18
  min-width: auto !important;
19
19
  width: 100% !important;
20
- }
21
-
22
- .fs-color-field-description {
23
- color: var(--fs-color-field-color);
24
20
  }
@@ -1,5 +1,4 @@
1
- .fs-magic-config-field > .fs-col:has(.v-switch) {
2
- margin: 0 0 6px 0;
1
+ .fs-magic-config-field > :has(.v-switch) {
3
2
  align-self: end;
4
3
  }
5
4
 
@@ -21,19 +21,6 @@
21
21
  }
22
22
  }
23
23
 
24
- .fs-select-field-label {
25
- color: var(--fs-select-field-color);
26
- }
27
-
28
- .fs-select-field-messages {
29
- align-self: stretch;
30
- color: var(--fs-select-field-error-color);
31
- }
32
-
33
- .fs-select-field-description {
34
- color: var(--fs-select-field-color);
35
- }
36
-
37
24
  .v-overlay-container > .v-overlay > .v-select__content > .v-list {
38
25
  @extend .fs-hide-y-scrollbar;
39
26
 
@@ -2,10 +2,11 @@
2
2
  height: var(--fs-group-height);
3
3
  width: var(--fs-group-width);
4
4
  max-width: 100%;
5
- margin: -1px;
6
- padding: 1px;
5
+ margin: 0 -1px 0 0;
7
6
 
8
7
  & > .v-slide-group__container > .v-slide-group__content {
8
+ margin: 0 1px 0 0;
9
+
9
10
  padding: var(--fs-group-padding);
10
11
  gap: var(--fs-group-gap);
11
12