@dative-gpi/foundation-shared-components 0.0.50 → 0.0.51

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 (82) hide show
  1. package/components/FSAccordion.vue +3 -3
  2. package/components/FSAccordionPanel.vue +5 -5
  3. package/components/FSBadge.vue +1 -1
  4. package/components/FSBreadcrumbs.vue +1 -1
  5. package/components/FSButton.vue +5 -5
  6. package/components/FSCalendar.vue +19 -9
  7. package/components/FSCalendarTwin.vue +13 -9
  8. package/components/FSCard.vue +11 -2
  9. package/components/FSCarousel.vue +1 -1
  10. package/components/FSCheckbox.vue +4 -4
  11. package/components/FSChip.vue +4 -4
  12. package/components/FSClickable.vue +1 -1
  13. package/components/FSClock.vue +38 -46
  14. package/components/FSCol.vue +1 -1
  15. package/components/FSColor.vue +9 -7
  16. package/components/FSColorIcon.vue +1 -1
  17. package/components/FSDivider.vue +2 -2
  18. package/components/FSEditImage.vue +6 -3
  19. package/components/FSErrorToast.vue +1 -1
  20. package/components/FSFadeOut.vue +1 -1
  21. package/components/FSForm.vue +4 -4
  22. package/components/FSGrid.vue +1 -1
  23. package/components/FSImage.vue +13 -14
  24. package/components/FSLabel.vue +1 -1
  25. package/components/FSLink.vue +1 -1
  26. package/components/FSLoader.vue +1 -1
  27. package/components/FSOptionGroup.vue +3 -3
  28. package/components/FSOptionItem.vue +4 -4
  29. package/components/FSPagination.vue +1 -1
  30. package/components/FSRadio.vue +4 -4
  31. package/components/FSRadioGroup.vue +3 -3
  32. package/components/FSRow.vue +1 -1
  33. package/components/FSSlideGroup.vue +11 -11
  34. package/components/FSSlider.vue +4 -4
  35. package/components/FSSpan.vue +1 -1
  36. package/components/FSSubmitDialog.vue +8 -8
  37. package/components/FSSwitch.vue +4 -4
  38. package/components/FSTab.vue +4 -4
  39. package/components/FSTabs.vue +2 -2
  40. package/components/FSTag.vue +2 -2
  41. package/components/FSText.vue +1 -1
  42. package/components/FSToggleSet.vue +4 -4
  43. package/components/FSWindow.vue +1 -1
  44. package/components/FSWrapGroup.vue +2 -2
  45. package/components/buttons/FSButtonFile.vue +11 -4
  46. package/components/buttons/FSButtonFileIcon.vue +11 -4
  47. package/components/buttons/FSButtonFileLabel.vue +12 -5
  48. package/components/buttons/FSButtonFileMini.vue +12 -5
  49. package/components/deviceOrganisations/FSStatusesCarousel.vue +2 -3
  50. package/components/deviceOrganisations/FSStatusesRow.vue +2 -3
  51. package/components/fields/FSAutocompleteField.vue +5 -5
  52. package/components/fields/FSColorField.vue +3 -3
  53. package/components/fields/FSDateField.vue +8 -7
  54. package/components/fields/FSDateRangeField.vue +6 -6
  55. package/components/fields/FSDateTimeField.vue +14 -12
  56. package/components/fields/FSDateTimeRangeField.vue +10 -12
  57. package/components/fields/FSIconField.vue +10 -10
  58. package/components/fields/FSNumberField.vue +2 -2
  59. package/components/fields/FSPasswordField.vue +4 -4
  60. package/components/fields/FSRichTextField.vue +82 -92
  61. package/components/fields/FSSearchField.vue +8 -8
  62. package/components/fields/FSSelectField.vue +6 -6
  63. package/components/fields/FSTagField.vue +4 -4
  64. package/components/fields/FSTextArea.vue +5 -5
  65. package/components/fields/FSTextField.vue +5 -5
  66. package/components/fields/FSTimeField.vue +15 -9
  67. package/components/fields/FSTimeSlotField.vue +49 -21
  68. package/components/lists/FSDataTableUI.vue +1 -1
  69. package/components/lists/FSDraggable.vue +12 -6
  70. package/components/lists/FSFilterButton.vue +11 -8
  71. package/components/lists/FSLoadDataTable.vue +1 -1
  72. package/components/selects/FSSelectTimeZone.vue +2 -2
  73. package/components/tiles/FSDeviceOrganisationTileUI.vue +3 -3
  74. package/components/tiles/FSGroupTileUI.vue +3 -3
  75. package/components/tiles/FSLoadTile.vue +1 -1
  76. package/components/tiles/FSTile.vue +1 -1
  77. package/composables/useRules.ts +1 -1
  78. package/models/colors.ts +1 -1
  79. package/models/deviceStatuses.ts +1 -1
  80. package/package.json +4 -4
  81. package/styles/components/fs_clock.scss +3 -2
  82. package/styles/globals/overrides.scss +1 -1
@@ -743,7 +743,7 @@ export default defineComponent({
743
743
  return slots;
744
744
  });
745
745
 
746
- const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => {
746
+ const style = computed((): { [key: string] : string | undefined } => {
747
747
  return {
748
748
  "--fs-data-table-background-color": backgrounds.base,
749
749
  "--fs-data-table-border-color": lights.base
@@ -80,9 +80,11 @@ export default defineComponent({
80
80
  touchEndX.value = touch.clientX;
81
81
  touchEndY.value = touch.clientY;
82
82
 
83
- draggedElementCopy.value.style.left = `${touchEndX.value - 25}px`;
84
- draggedElementCopy.value.style.top = `${touchEndY.value - 25}px`;
85
- document.body.appendChild(draggedElementCopy.value);
83
+ if (draggedElementCopy.value) {
84
+ draggedElementCopy.value.style.left = `${touchEndX.value - 25}px`;
85
+ draggedElementCopy.value.style.top = `${touchEndY.value - 25}px`;
86
+ document.body.appendChild(draggedElementCopy.value);
87
+ }
86
88
  const dragOverTarget = document.elementFromPoint(touchEndX.value, touchEndY.value)?.closest(props.elementSelector);
87
89
 
88
90
  if (dragOverTarget) {
@@ -116,8 +118,10 @@ export default defineComponent({
116
118
  }
117
119
  event.preventDefault();
118
120
  const dragged = (event.target as HTMLElement)?.closest(props.elementSelector);
119
- draggedElementCopy.value.remove();
120
- draggedElementCopy.value = null;
121
+ if (draggedElementCopy.value) {
122
+ draggedElementCopy.value.remove();
123
+ draggedElementCopy.value = null;
124
+ }
121
125
 
122
126
  const dropTarget = document.elementFromPoint(touchEndX.value, touchEndY.value);
123
127
  const dragEndEvent = new Event("dragend");
@@ -137,7 +141,9 @@ export default defineComponent({
137
141
  touchStartY.value = 0;
138
142
  touchEndX.value = 0;
139
143
  touchEndY.value = 0;
140
- dragged.classList.remove("fs-draggable-dragging");
144
+ if (dragged) {
145
+ dragged.classList.remove("fs-draggable-dragging");
146
+ }
141
147
  };
142
148
 
143
149
  const onDragStart = (event: DragEvent) => {
@@ -113,21 +113,24 @@ export default defineComponent({
113
113
 
114
114
  const singlePick = ref(false);
115
115
  const expanded = ref(false);
116
- const search = ref(null);
116
+ const search = ref<string | null>(null);
117
117
 
118
- const label = computed(() => {
119
- if (props.filters) {
120
- const hidden = props.filters.filter(f => f.hidden).length;
121
- if (hidden > 0) {
122
- return $tr("ui.data-table.some-filters-visible", "{0}: {1} visible", props.header.text, (props.filters.length - hidden).toString());
118
+ const label = computed((): string | null => {
119
+ if (props.header.text) {
120
+ if (props.filters) {
121
+ const hidden = props.filters.filter(f => f.hidden).length;
122
+ if (hidden > 0) {
123
+ return $tr("ui.data-table.some-filters-visible", "{0}: {1} visible", props.header.text, (props.filters.length - hidden).toString());
124
+ }
123
125
  }
126
+ return $tr("ui.data-table.all-filters-visible", "{0}: All visible", props.header.text);
124
127
  }
125
- return $tr("ui.data-table.all-filters-visible", "{0}: All visible", props.header.text);
128
+ return null;
126
129
  });
127
130
 
128
131
  const searchedFilters = computed((): FSDataTableFilter[] => {
129
132
  if (search.value) {
130
- return props.filters.filter(f => (f.text + f.value).includes(search.value));
133
+ return props.filters.filter(f => (f.text + f.value).includes(search.value!));
131
134
  }
132
135
  return props.filters;
133
136
  });
@@ -81,7 +81,7 @@ export default defineComponent({
81
81
 
82
82
  const backgroundColors = getColors(ColorEnum.Background);
83
83
 
84
- const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
84
+ const style = computed((): { [key: string] : string | undefined } => {
85
85
  return {
86
86
  "--fs-load-data-table-background-color": backgroundColors.base
87
87
  };
@@ -16,7 +16,7 @@
16
16
  </template>
17
17
 
18
18
  <script lang="ts">
19
- import { computed, defineComponent, onMounted } from "vue";
19
+ import { computed, defineComponent, onMounted, PropType } from "vue";
20
20
 
21
21
  import { useTimeZones } from "@dative-gpi/foundation-shared-services/composables";
22
22
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
@@ -32,7 +32,7 @@ export default defineComponent({
32
32
  },
33
33
  props: {
34
34
  modelValue: {
35
- type: String,
35
+ type: String as PropType<string | null>,
36
36
  required: false,
37
37
  default: null
38
38
  },
@@ -103,17 +103,17 @@ export default defineComponent({
103
103
  },
104
104
  props: {
105
105
  imageId: {
106
- type: String,
106
+ type: String as PropType<string | null>,
107
107
  required: false,
108
108
  default: null
109
109
  },
110
110
  label: {
111
- type: String,
111
+ type: String as PropType<string | null>,
112
112
  required: false,
113
113
  default: null
114
114
  },
115
115
  code: {
116
- type: String,
116
+ type: String as PropType<string | null>,
117
117
  required: false,
118
118
  default: null
119
119
  },
@@ -125,17 +125,17 @@ export default defineComponent({
125
125
  },
126
126
  props: {
127
127
  imageId: {
128
- type: String,
128
+ type: String as PropType<string | null>,
129
129
  required: false,
130
130
  default: null
131
131
  },
132
132
  label: {
133
- type: String,
133
+ type: String as PropType<string | null>,
134
134
  required: false,
135
135
  default: null
136
136
  },
137
137
  code: {
138
- type: String,
138
+ type: String as PropType<string | null>,
139
139
  required: false,
140
140
  default: null
141
141
  },
@@ -108,7 +108,7 @@ export default defineComponent({
108
108
  }
109
109
  });
110
110
 
111
- const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
111
+ const style = computed((): { [key: string] : string | undefined } => {
112
112
  return {
113
113
  "--fs-load-tile-background-color": backgroundColors.base
114
114
  };
@@ -64,7 +64,7 @@ export default defineComponent({
64
64
 
65
65
  const bottomColors = computed(() => getGradients(props.bottomColor));
66
66
 
67
- const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
67
+ const style = computed((): { [key: string] : string | undefined } => {
68
68
  return {
69
69
  "--fs-tile-border-color": bottomColors.value.base
70
70
  };
@@ -6,7 +6,7 @@ export const useRules = () => {
6
6
 
7
7
  const blurred = ref(false);
8
8
 
9
- const validateOn = computed((): string => {
9
+ const validateOn = computed((): "input" | "submit" | "blur" => {
10
10
  switch (innerValidateOn.value) {
11
11
  case "submit": return submitted.value ? "input" : "submit";
12
12
  case "blur": return blurred.value ? "input" : "blur";
package/models/colors.ts CHANGED
@@ -19,4 +19,4 @@ export interface ColorVariations {
19
19
  darkContrast?: string;
20
20
  };
21
21
 
22
- export type ColorBase = (String | ColorEnum);
22
+ export type ColorBase = (string | ColorEnum);
@@ -6,7 +6,7 @@ export interface FSDeviceStatus {
6
6
  export interface FSDeviceStatusGroup {
7
7
  label: string;
8
8
  groupByValue?: string;
9
- value: string;
9
+ value?: string;
10
10
  unit?: string;
11
11
  icon: string;
12
12
  color: string;
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.50",
4
+ "version": "0.0.51",
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.50",
14
- "@dative-gpi/foundation-shared-services": "0.0.50",
13
+ "@dative-gpi/foundation-shared-domain": "0.0.51",
14
+ "@dative-gpi/foundation-shared-services": "0.0.51",
15
15
  "@fontsource/montserrat": "^5.0.16",
16
16
  "@lexical/clipboard": "^0.12.5",
17
17
  "@lexical/history": "^0.12.5",
@@ -32,5 +32,5 @@
32
32
  "sass": "^1.69.5",
33
33
  "sass-loader": "^13.3.2"
34
34
  },
35
- "gitHead": "be18a14ae47c91c1f3ccd22a196593050f06aae8"
35
+ "gitHead": "13a8e0d4bd10a05a35c570412fa2024d33b0c115"
36
36
  }
@@ -4,10 +4,10 @@
4
4
 
5
5
  .fs-clock-field {
6
6
  padding: 0px !important;
7
- width: 72px !important;
8
7
 
9
8
  &.v-input {
10
- flex: 0 0 auto !important;
9
+ min-width: 76px !important;
10
+ max-width: 76px !important;
11
11
  }
12
12
 
13
13
  & > .v-input__control > .v-field {
@@ -15,6 +15,7 @@
15
15
  border: 1px solid var(--fs-clock-field-border-color) !important;
16
16
  border-radius: 4px !important;
17
17
  padding: 0 16px !important;
18
+ gap: 0 !important;
18
19
 
19
20
  &:not(.v-field--error):focus-within {
20
21
  border-color: var(--fs-clock-field-active-border-color) !important;
@@ -30,7 +30,7 @@
30
30
  .v-input {
31
31
  padding: 0px !important;
32
32
 
33
- &:not(.v-checkbox) {
33
+ &:not(.v-checkbox):not(.v-slider) {
34
34
  min-width: 200px;
35
35
  width: 100%;
36
36
  }