@dative-gpi/foundation-shared-components 1.0.59 → 1.0.61

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.
@@ -39,7 +39,7 @@ export default defineComponent({
39
39
 
40
40
  const onError = (): void => {
41
41
  if (props.imageId) {
42
- console.log("onError");
42
+ console.error("Error loading image", props.imageId);
43
43
  getImage(props.imageId);
44
44
  }
45
45
  };
@@ -39,6 +39,7 @@
39
39
  :wrap="false"
40
40
  >
41
41
  <FSRow
42
+ class="fs-edit-image-standard-row"
42
43
  gap="24px"
43
44
  :wrap="false"
44
45
  >
@@ -59,6 +60,7 @@
59
60
  :width="$props.width"
60
61
  />
61
62
  <FSCol
63
+ class="fs-edit-image-standard-label-wrapper"
62
64
  align="center-left"
63
65
  height="fill"
64
66
  width="hug"
@@ -91,12 +93,12 @@
91
93
  </FSCol>
92
94
  </FSCol>
93
95
  </FSRow>
94
- <v-spacer />
95
96
  <FSRow
96
- width="hug"
97
+ align="center-right"
98
+ :width="isExtraSmall ? '40px' : 'hug'"
97
99
  >
98
100
  <FSButtonFileMini
99
- accept="image/*"
101
+ accept=".jpg,.jpeg,.png"
100
102
  :readFile="false"
101
103
  @update:metadata="onUpload"
102
104
  />
@@ -124,7 +126,7 @@
124
126
  padding="4px"
125
127
  >
126
128
  <FSButtonFileMini
127
- accept="image/*"
129
+ accept=".jpg,.jpeg,.png"
128
130
  :readFile="false"
129
131
  @update:metadata="onUpload"
130
132
  />
@@ -157,7 +159,7 @@
157
159
  <FSButtonFileMini
158
160
  class="fs-edit-image-hidden-button"
159
161
  ref="invisibleButtonRef"
160
- accept="image/*"
162
+ accept=".jpg,.jpeg,.png"
161
163
  :readFile="false"
162
164
  @update:metadata="onUpload"
163
165
  />
@@ -27,6 +27,7 @@
27
27
  >
28
28
  <FSText
29
29
  :font="item.hideDefault ? 'text-body' : 'text-overline'"
30
+ variant="soft"
30
31
  >
31
32
  {{ item.label }}
32
33
  </FSText>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSRow
3
- align="center-left"
3
+ align="center-center"
4
4
  class="fs-tag"
5
5
  :height="$props.height"
6
6
  :width="$props.width"
@@ -79,7 +79,7 @@ export default defineComponent({
79
79
  color: {
80
80
  type: String as PropType<ColorBase>,
81
81
  required: false,
82
- default: ColorEnum.Primary
82
+ default: ColorEnum.Light
83
83
  },
84
84
  editable: {
85
85
  type: Boolean,
@@ -64,7 +64,7 @@ export default defineComponent({
64
64
  color: {
65
65
  type: String as PropType<ColorBase>,
66
66
  required: false,
67
- default: ColorEnum.Primary
67
+ default: ColorEnum.Light
68
68
  },
69
69
  editable: {
70
70
  type: Boolean,
@@ -8,7 +8,7 @@
8
8
  >
9
9
  <FSColorIcon
10
10
  class="fs-stopclick"
11
- size="m"
11
+ :size="$props.size"
12
12
  :color="$props.statusGroup.color"
13
13
  @click.prevent.stop
14
14
  v-bind="props"
@@ -47,6 +47,10 @@ export default defineComponent({
47
47
  statusGroup: {
48
48
  type: Object as PropType<FSDeviceStatusGroup>,
49
49
  required: true
50
+ },
51
+ size: {
52
+ type: [Array, String, Number] as PropType<"s" | "m" | "l" | string[] | number[] | string | number | null>,
53
+ default: "m"
50
54
  }
51
55
  },
52
56
  setup() {
@@ -39,7 +39,7 @@
39
39
  font="text-button"
40
40
  :color="$props.statusGroup.color"
41
41
  >
42
- {{ $props.statusGroup.value }} {{ $props.statusGroup.unit }}
42
+ {{ statusValue }} {{ $props.statusGroup.unit }}
43
43
  </FSText>
44
44
  </FSRow>
45
45
  <FSRow
@@ -114,6 +114,13 @@ export default defineComponent({
114
114
  return props.statusGroup.label || props.modelStatus.label;
115
115
  });
116
116
 
117
+ const statusValue = computed((): string => {
118
+ if (props.statusGroup.value && !isNaN(parseFloat(props.statusGroup.value))) {
119
+ return parseFloat(props.statusGroup.value).toLocaleString("fullwide", { maximumFractionDigits: 2 });
120
+ }
121
+ return props.statusGroup.value || "";
122
+ });
123
+
117
124
  const deviceTimestamp = computed((): string => {
118
125
  if (props.statusGroup.sourceTimestamp) {
119
126
  return epochToLongTimeFormat(props.statusGroup.sourceTimestamp);
@@ -123,7 +130,8 @@ export default defineComponent({
123
130
 
124
131
  return {
125
132
  deviceTimestamp,
126
- statusLabel
133
+ statusLabel,
134
+ statusValue
127
135
  };
128
136
  }
129
137
  });
@@ -10,8 +10,9 @@
10
10
  />
11
11
  <FSWorstAlert
12
12
  v-if="$props.deviceWorstAlert"
13
- :deviceAlerts="$props.deviceAlerts.length"
14
- :deviceAlert="$props.deviceWorstAlert"
13
+ :deviceWorstAlert="$props.deviceWorstAlert"
14
+ :deviceAlerts="$props.deviceAlerts"
15
+ :alertTo="$props.alertTo"
15
16
  />
16
17
  <template
17
18
  v-for="(modelStatus, index) in $props.modelStatuses"
@@ -68,6 +69,11 @@ export default defineComponent({
68
69
  deviceStatuses: {
69
70
  type: Array as PropType<FSDeviceStatus[]>,
70
71
  required: true
72
+ },
73
+ alertTo: {
74
+ type: Function,
75
+ required: false,
76
+ default: null
71
77
  }
72
78
  },
73
79
  setup(props) {
@@ -22,7 +22,8 @@
22
22
  </FSBadge>
23
23
  </template>
24
24
  <FSWorstAlertCard
25
- :deviceAlert="deviceAlert"
25
+ :deviceAlert="deviceWorstAlert"
26
+ :alertTo="$props.alertTo"
26
27
  @close="menu = false"
27
28
  />
28
29
  </v-menu>
@@ -31,8 +32,8 @@
31
32
  <script lang="ts">
32
33
  import { computed, defineComponent, type PropType, ref } from "vue";
33
34
 
35
+ import { type FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
34
36
  import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/enums";
35
- import type { FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
36
37
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
37
38
 
38
39
  import FSWorstAlertCard from "./FSWorstAlertCard.vue";
@@ -47,21 +48,26 @@ export default defineComponent({
47
48
  FSBadge
48
49
  },
49
50
  props: {
50
- deviceAlert: {
51
+ deviceWorstAlert: {
51
52
  type: Object as PropType<FSDeviceAlert>,
52
53
  required: true
53
54
  },
54
55
  deviceAlerts: {
55
- type: Number,
56
+ type: Array as PropType<FSDeviceAlert[]>,
56
57
  required: false,
57
- default: 0
58
+ default: () => []
59
+ },
60
+ alertTo: {
61
+ type: Function,
62
+ required: false,
63
+ default: null
58
64
  }
59
65
  },
60
66
  setup(props) {
61
67
  const menu = ref(false);
62
68
 
63
69
  const criticityColor = computed(() => {
64
- switch (props.deviceAlert?.criticity) {
70
+ switch (props.deviceWorstAlert?.criticity) {
65
71
  case Criticity.Error: return ColorEnum.Error;
66
72
  case Criticity.Warning: return ColorEnum.Warning;
67
73
  default: return ColorEnum.Primary;
@@ -69,7 +75,7 @@ export default defineComponent({
69
75
  });
70
76
 
71
77
  const statusIcon = computed(() => {
72
- switch (props.deviceAlert?.status) {
78
+ switch (props.deviceWorstAlert?.status) {
73
79
  case AlertStatus.Pending: return "mdi-timer-outline";
74
80
  case AlertStatus.Untriggered: return "mdi-timer-off-outline";
75
81
  case AlertStatus.Unresolved: return "mdi-alert-circle-outline";
@@ -82,13 +88,13 @@ export default defineComponent({
82
88
  });
83
89
 
84
90
  const badgeLabel = computed((): string | null => {
85
- if (props.deviceAlerts < 1) {
91
+ if (!props.deviceAlerts || props.deviceAlerts.length < 1) {
86
92
  return null;
87
93
  }
88
- if (props.deviceAlerts > 9) {
94
+ if (props.deviceAlerts.length > 9) {
89
95
  return "9+";
90
96
  }
91
- return (props.deviceAlerts).toString();
97
+ return props.deviceAlerts.length.toString();
92
98
  });
93
99
 
94
100
  return {
@@ -50,6 +50,12 @@
50
50
  {{ deviceTimestamp }}
51
51
  </FSSpan>
52
52
  </FSRow>
53
+ <FSButton
54
+ v-if="$props.alertTo"
55
+ icon="mdi-information-outline"
56
+ :label="$tr('ui.shared.device-alert.view-alert', 'View alert')"
57
+ :to="$props.alertTo($props.deviceAlert.id)"
58
+ />
53
59
  </FSCol>
54
60
  </FSCard>
55
61
  </template>
@@ -58,10 +64,10 @@
58
64
  import { computed, defineComponent, type PropType } from "vue";
59
65
 
60
66
  import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
61
- import type { FSDeviceAlert} from "@dative-gpi/foundation-shared-components/models";
62
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
67
+ import { type FSDeviceAlert} from "@dative-gpi/foundation-shared-components/models";
63
68
  import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/enums";
64
69
  import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
70
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
65
71
 
66
72
  import FSButton from "../FSButton.vue";
67
73
  import FSCard from "../FSCard.vue";
@@ -86,6 +92,11 @@ export default defineComponent({
86
92
  deviceAlert: {
87
93
  type: Object as PropType<FSDeviceAlert>,
88
94
  required: true
95
+ },
96
+ alertTo: {
97
+ type: Function,
98
+ required: false,
99
+ default: null
89
100
  }
90
101
  },
91
102
  emits: ["close"],
@@ -1,5 +1,7 @@
1
1
  <template>
2
- <FSCol>
2
+ <FSCol
3
+ :style="style"
4
+ >
3
5
  <slot
4
6
  v-if="!$props.hideHeader"
5
7
  name="label"
@@ -10,7 +12,6 @@
10
12
  <FSSpan
11
13
  class="fs-base-field-label"
12
14
  font="text-overline"
13
- :style="style"
14
15
  >
15
16
  {{ $props.label }}
16
17
  </FSSpan>
@@ -49,7 +50,6 @@
49
50
  v-if="$props.description"
50
51
  class="fs-base-field-description"
51
52
  font="text-overline"
52
- :style="style"
53
53
  >
54
54
  {{ $props.description }}
55
55
  </FSSpan>
@@ -104,6 +104,11 @@ export default defineComponent({
104
104
  type: Boolean,
105
105
  required: false,
106
106
  default: true
107
+ },
108
+ minWidth: {
109
+ type: String,
110
+ required: false,
111
+ default: "120px"
107
112
  }
108
113
  },
109
114
  setup(props) {
@@ -120,12 +125,14 @@ export default defineComponent({
120
125
  const style = computed((): StyleValue => {
121
126
  if (!props.editable) {
122
127
  return {
123
- "--fs-base-field-color": lights.dark
128
+ "--fs-base-field-color" : lights.dark,
129
+ "--fs-base-field-min-width": props.minWidth
124
130
  };
125
131
  }
126
132
  return {
127
133
  "--fs-base-field-color" : darks.base,
128
- "--fs-base-field-error-color": errors.base
134
+ "--fs-base-field-error-color": errors.base,
135
+ "--fs-base-field-min-width" : props.minWidth
129
136
  };
130
137
  });
131
138
 
@@ -10,7 +10,9 @@
10
10
  <FSCol
11
11
  gap="12px"
12
12
  >
13
- <FSRow>
13
+ <FSRow
14
+ :wrap="false"
15
+ >
14
16
  <FSSelectField
15
17
  :hideHeader="true"
16
18
  :modelValue="$props.entityType"
@@ -37,7 +39,9 @@
37
39
  />
38
40
  </template>
39
41
  </FSRow>
40
- <FSRow>
42
+ <FSRow
43
+ v-if="$props.showCount"
44
+ >
41
45
  <template
42
46
  v-if="itemsCount > 0"
43
47
  >
@@ -89,7 +93,7 @@
89
93
 
90
94
  <FSFadeOut
91
95
  v-if="$props.showEntities && itemsCount > 0"
92
- maxHeight="220px"
96
+ :maxHeight="$props.listMaxHeight"
93
97
  width="100%"
94
98
  >
95
99
  <slot
@@ -181,6 +185,16 @@ export default defineComponent({
181
185
  type: Boolean,
182
186
  required: false,
183
187
  default: true
188
+ },
189
+ showCount: {
190
+ type: Boolean,
191
+ required: false,
192
+ default: true
193
+ },
194
+ listMaxHeight: {
195
+ type: String as PropType<string | null>,
196
+ required: false,
197
+ default: "220px"
184
198
  }
185
199
  },
186
200
  emits: ["update:entityType", "click:select"],
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <FSTextField
3
3
  class="fs-number-field"
4
+ minWidth="80px"
4
5
  :editable="$props.editable"
5
6
  :modelValue="$props.modelValue?.toString()"
6
7
  @update:modelValue="onUpdate"
@@ -91,7 +91,7 @@ export default defineComponent({
91
91
  tagColor: {
92
92
  type: String as PropType<ColorBase>,
93
93
  required: false,
94
- default: ColorEnum.Primary
94
+ default: ColorEnum.Light
95
95
  },
96
96
  hideHeader: {
97
97
  type: Boolean,
@@ -14,6 +14,7 @@
14
14
  :wrap="false"
15
15
  >
16
16
  <FSSelectDateSetting
17
+ minWidth="180px"
17
18
  :lastPeriod="$props.lastPeriod"
18
19
  :editable="$props.editable"
19
20
  :variant="$props.variant"
@@ -22,10 +23,12 @@
22
23
  @update:modelValue="innerDateSettingChange"
23
24
  />
24
25
  <FSNumberField
26
+ minWidth="60px"
25
27
  v-if="pastSettings.includes(innerDateSetting)"
26
28
  :rules="[NumberRules.required(), NumberRules.min(0)]"
27
29
  :editable="$props.editable"
28
30
  :hideHeader="true"
31
+ :clearable="false"
29
32
  :modelValue="innerDateValue"
30
33
  @update:modelValue="innerDateValueChange"
31
34
  />
@@ -3,7 +3,7 @@
3
3
  gap="16px"
4
4
  >
5
5
  <FSRow
6
- align="bottom-center"
6
+ align="bottom-left"
7
7
  :wrap="isExtraSmall ? false : true"
8
8
  width="fill"
9
9
  >
@@ -896,7 +896,7 @@ export default defineComponent({
896
896
  const innerSortBy = ref(props.sortBy);
897
897
  const innerMode = ref(props.mode);
898
898
  const innerPage = ref(props.page);
899
- const showFilters = ref(true);
899
+ const showFilters = ref(false);
900
900
  const resetable = ref(false);
901
901
 
902
902
  const intersectionObserver = ref<IntersectionObserver | null>(null);
@@ -46,6 +46,7 @@
46
46
  >
47
47
  <FSRow
48
48
  align="center-left"
49
+ height="24px"
49
50
  :wrap="false"
50
51
  >
51
52
  <FSButtonDragIcon
@@ -43,6 +43,7 @@
43
43
  :deviceStatuses="singleDeviceStatuses"
44
44
  :modelStatuses="singleModelStatuses"
45
45
  :deviceAlerts="$props.deviceAlerts"
46
+ :alertTo="$props.alertTo"
46
47
  />
47
48
  </FSCol>
48
49
  <FSImage
@@ -132,6 +133,11 @@ export default defineComponent({
132
133
  required: true,
133
134
  default: () => []
134
135
  },
136
+ alertTo: {
137
+ type: Function,
138
+ required: false,
139
+ default: null
140
+ },
135
141
  width: {
136
142
  type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
137
143
  required: false,
@@ -3,6 +3,7 @@
3
3
  :activeColor="$props.color"
4
4
  :bottomColor="$props.color"
5
5
  :modelValue="$props.modelValue"
6
+ :width="$props.width"
6
7
  v-bind="$attrs"
7
8
  >
8
9
  <FSRow
@@ -26,6 +27,7 @@
26
27
  {{ $props.label }}
27
28
  </FSSpan>
28
29
  <FSSpan
30
+ v-if="$props.code"
29
31
  font="text-overline"
30
32
  variant="soft"
31
33
  >
@@ -55,7 +57,7 @@
55
57
  <FSSpan
56
58
  font="text-overline"
57
59
  >
58
- {{ $tr("ui.location-tile.device(s)", "Device(s) in this location.") }}
60
+ {{ $tr("ui.common.devices", "Devices") }}
59
61
  </FSSpan>
60
62
  </FSRow>
61
63
  </FSCol>
@@ -88,7 +90,7 @@ import FSCol from "../FSCol.vue";
88
90
  import FSRow from "../FSRow.vue";
89
91
 
90
92
  export default defineComponent({
91
- name: "FSGroupTileUI",
93
+ name: "FSLocationTileUI",
92
94
  components: {
93
95
  FSIconCard,
94
96
  FSColor,
@@ -128,6 +130,11 @@ export default defineComponent({
128
130
  required: false,
129
131
  default: false
130
132
  },
133
+ width: {
134
+ type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
135
+ required: false,
136
+ default: () => [352, 336]
137
+ },
131
138
  },
132
139
  setup() {
133
140
  return {
@@ -1,59 +1,18 @@
1
1
  <template>
2
- <FSClickable
3
- padding="16px"
4
- height="196px"
5
- width="148px"
6
- :border="false"
2
+ <FSSimpleTileUI
7
3
  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>
4
+ />
28
5
  </template>
29
6
 
30
7
  <script lang="ts">
31
- import { defineComponent, type PropType } from "vue";
8
+ import { defineComponent } from "vue";
32
9
 
33
- import FSCol from "../FSCol.vue";
34
- import FSSpan from "../FSSpan.vue";
35
- import FSImage from "../FSImage.vue";
36
- import FSClickable from "../FSClickable.vue";
10
+ import FSSimpleTileUI from "./FSSimpleTileUI.vue";
37
11
 
38
12
  export default defineComponent({
39
13
  name: "FSModelTileUI",
40
14
  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
- }
15
+ FSSimpleTileUI,
57
16
  }
58
17
  });
59
18
  </script>
@@ -12,7 +12,7 @@
12
12
  width="fill"
13
13
  >
14
14
  <FSRow
15
- align="center-center"
15
+ align="center-left"
16
16
  gap="24px"
17
17
  :height="imageSize"
18
18
  :wrap="false"
@@ -41,7 +41,7 @@
41
41
  :width="imageSize"
42
42
  />
43
43
  <FSIconCard
44
- v-else
44
+ v-else-if="$props.icon"
45
45
  :backgroundVariant="$props.iconBackgroundVariant"
46
46
  :backgroundColor="$props.iconBackgroundColor"
47
47
  :border="$props.iconBorder"
@@ -95,7 +95,6 @@ export default defineComponent({
95
95
  icon: {
96
96
  type: String as PropType<string>,
97
97
  required: false,
98
- default: "mdi-ab-testing"
99
98
  },
100
99
  iconBackgroundVariant: {
101
100
  type: String as PropType<"background" | "standard" | "full" | "gradient">,
@@ -29,18 +29,13 @@
29
29
  />
30
30
  </slot>
31
31
  </template>
32
- <FSIcon
33
- v-else-if="$props.icon && $props.color"
34
- :color="$props.color"
35
- :icon="$props.icon"
36
- :size="imageSize"
37
- />
38
32
  <FSIconCard
39
- v-else-if="$props.icon && $props.iconBackgroundColor && $props.iconBackgroundColor.length > 0"
33
+ v-else-if="$props.icon"
40
34
  :backgroundVariant="$props.iconBackgroundVariant"
41
- :backgroundColor="$props.iconBackgroundColor"
35
+ :backgroundColor="$props.iconBackgroundColors"
42
36
  :border="$props.iconBorder"
43
37
  :icon="$props.icon"
38
+ :iconColor="$props.color"
44
39
  :size="imageSize"
45
40
  />
46
41
  <FSCol
@@ -59,11 +54,13 @@
59
54
  align="center-left"
60
55
  gap="4px"
61
56
  >
62
- <FSText>
57
+ <FSText
58
+ font="text-button"
59
+ >
63
60
  {{ $props.subtitle }}
64
61
  </FSText>
65
62
  <FSText
66
- font="text-overline"
63
+ font="text-body"
67
64
  >
68
65
  {{ $props.description }}
69
66
  </FSText>
@@ -78,7 +75,9 @@
78
75
  >
79
76
  {{ $props.title }}
80
77
  </FSText>
81
- <FSText>
78
+ <FSText
79
+ font="text-button"
80
+ >
82
81
  {{ $props.subtitle }}
83
82
  </FSText>
84
83
  </template>
@@ -92,7 +91,7 @@
92
91
  {{ $props.title }}
93
92
  </FSText>
94
93
  <FSText
95
- font="text-overline"
94
+ font="text-body"
96
95
  :lineClamp="2"
97
96
  >
98
97
  {{ $props.description }}
@@ -161,17 +160,12 @@
161
160
  </slot>
162
161
  </template>
163
162
  <FSIconCard
164
- v-else-if="$props.icon && $props.iconBackgroundColor && $props.iconBackgroundColor.length > 0"
163
+ v-else-if="$props.icon"
165
164
  iconSize="70px"
166
165
  :backgroundVariant="$props.iconBackgroundVariant"
167
- :backgroundColor="$props.iconBackgroundColor"
166
+ :backgroundColor="$props.iconBackgroundColors"
168
167
  :border="$props.iconBorder"
169
- :icon="$props.icon"
170
- :size="imageSize"
171
- />
172
- <FSIcon
173
- v-else-if="$props.icon"
174
- :color="$props.color"
168
+ :iconColor="$props.color"
175
169
  :icon="$props.icon"
176
170
  :size="imageSize"
177
171
  />
@@ -189,12 +183,13 @@
189
183
  >
190
184
  <FSText
191
185
  v-if="$props.subtitle"
186
+ font="text-button"
192
187
  >
193
188
  {{ $props.subtitle }}
194
189
  </FSText>
195
190
  <FSText
196
191
  v-if="$props.description"
197
- font="text-overline"
192
+ font="text-body"
198
193
  :lineClamp="2"
199
194
  >
200
195
  {{ $props.description }}
@@ -231,14 +226,13 @@
231
226
  <script lang="ts">
232
227
  import { computed, defineComponent, type PropType } from "vue";
233
228
 
234
- import { ColorEnum, type ColorBase, type FSBreadcrumbItem } from "@dative-gpi/foundation-shared-components/models";
229
+ import { type ColorBase, type FSBreadcrumbItem } from "@dative-gpi/foundation-shared-components/models";
235
230
  import { useBreakpoints, useSlots } from "@dative-gpi/foundation-shared-components/composables";
236
231
 
237
232
  import FSBreadcrumbs from "../FSBreadcrumbs.vue";
238
233
  import FSSlideGroup from "../FSSlideGroup.vue";
239
234
  import FSIconCard from "../FSIconCard.vue";
240
235
  import FSImage from "../FSImage.vue";
241
- import FSIcon from "../FSIcon.vue";
242
236
  import FSText from "../FSText.vue";
243
237
  import FSCol from "../FSCol.vue";
244
238
  import FSRow from "../FSRow.vue";
@@ -250,7 +244,6 @@ export default defineComponent({
250
244
  FSSlideGroup,
251
245
  FSIconCard,
252
246
  FSImage,
253
- FSIcon,
254
247
  FSText,
255
248
  FSCol,
256
249
  FSRow
@@ -276,10 +269,10 @@ export default defineComponent({
276
269
  required: false,
277
270
  default: "background"
278
271
  },
279
- iconBackgroundColor: {
280
- type: [Array, String] as PropType<ColorBase | ColorBase[]>,
272
+ iconBackgroundColors: {
273
+ type: Array as PropType<string[]>,
281
274
  required: false,
282
- default: ColorEnum.Background
275
+ default: () => []
283
276
  },
284
277
  iconBorder: {
285
278
  type: Boolean as PropType<boolean>,
@@ -11,6 +11,7 @@
11
11
  :title="$props.title"
12
12
  :light="lightHeader"
13
13
  :imageId="imageId"
14
+ :iconBackgroundVariant="$props.iconBackgroundVariant"
14
15
  :icon="$props.icon"
15
16
  :color="$props.color"
16
17
  :iconBackgroundColors="$props.iconBackgroundColors"
@@ -120,6 +121,11 @@ export default defineComponent({
120
121
  type: Array as PropType<FSBreadcrumbItem[]>,
121
122
  required: false,
122
123
  default: () => []
124
+ },
125
+ iconBackgroundVariant: {
126
+ type: String as PropType<"background" | "standard" | "full" | "gradient">,
127
+ required: false,
128
+ default: "background"
123
129
  }
124
130
  },
125
131
  setup() {
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.59",
4
+ "version": "1.0.61",
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.59",
14
- "@dative-gpi/foundation-shared-services": "1.0.59"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.61",
14
+ "@dative-gpi/foundation-shared-services": "1.0.61"
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": "583e582d2f2185269a2d2880806be36bdc4dffdd"
38
+ "gitHead": "764e769b8eeb942d5028c00c479333be5907f4de"
39
39
  }
@@ -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;
@@ -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
  }
@@ -59,6 +59,7 @@
59
59
  color: var(--fs-tab-tag-color);
60
60
  display: flex;
61
61
  align-items: center;
62
+ justify-content: center;
62
63
 
63
64
  @include web {
64
65
  min-width: 28px;
@@ -40,13 +40,8 @@
40
40
  flex: 0 0 auto;
41
41
  }
42
42
 
43
- &:not(.v-checkbox):not(.v-slider):not(.fs-small-input):not(.fs-number-field) {
44
- min-width: 120px;
45
- width: 100%;
46
- }
47
-
48
- &.fs-number-field {
49
- min-width: 80px;
43
+ &:not(.v-checkbox):not(.v-slider):not(.fs-small-input) {
44
+ min-width: var(--fs-base-field-min-width);
50
45
  width: 100%;
51
46
  }
52
47
 
package/utils/time.ts CHANGED
@@ -12,7 +12,7 @@ export const timeSteps = [
12
12
  { id: TimeUnit.Week, label: $tr("ui.time-step.week.singular", "Week"), plural: $tr("ui.time-step.week.plural", "Weeks") },
13
13
  { id: TimeUnit.Month, label: $tr("ui.time-step.month.singular", "Month"), plural: $tr("ui.time-step.month.plural", "Months") },
14
14
  { id: TimeUnit.Year, label: $tr("ui.time-step.year.singular", "Year"), plural: $tr("ui.time-step.year.plural", "Years") },
15
- ]
15
+ ];
16
16
 
17
17
  export const timeStepToString = (value: { value: number, unit: TimeUnit } | null): string => {
18
18
  if (!value) {
@@ -25,7 +25,7 @@ export const timeStepToString = (value: { value: number, unit: TimeUnit } | null
25
25
  }
26
26
 
27
27
  return `${value.value} ${value.value === 1 ? unit.label.toLowerCase() : unit.plural.toLowerCase()}`;
28
- }
28
+ };
29
29
 
30
30
  // TODO : remove everything below this line
31
31
  export const timeScale: any[] = [
@@ -52,4 +52,4 @@ export const getTimeBestString = (value: number): string => {
52
52
  const unit = getTimeScaleIndex(value);
53
53
  const figure = value / timeScale[unit].id;
54
54
  return `${figure} ${figure === 1 ? timeScale[unit].label.toLowerCase() : timeScale[unit].plural.toLowerCase()}`;
55
- }
55
+ };