@dative-gpi/foundation-shared-components 0.0.229 → 0.1.68
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.
- package/components/FSAccordionPanel.vue +8 -10
- package/components/FSBadge.vue +2 -4
- package/components/FSBreadcrumbs.vue +9 -10
- package/components/FSButton.vue +81 -31
- package/components/FSCalendar.vue +35 -33
- package/components/FSCalendarTwin.vue +77 -84
- package/components/FSCard.vue +29 -16
- package/components/FSCardPlaceholder.vue +1 -2
- package/components/FSCheckbox.vue +5 -7
- package/components/FSChip.vue +9 -11
- package/components/FSClickable.vue +67 -57
- package/components/FSClock.vue +4 -4
- package/components/FSCol.vue +2 -3
- package/components/FSColor.vue +13 -31
- package/components/FSColorIcon.vue +25 -9
- package/components/FSDialog.vue +1 -2
- package/components/FSDialogFormBody.vue +4 -4
- package/components/FSDialogMenu.vue +2 -4
- package/components/FSDialogMultiFormBody.vue +63 -50
- package/components/FSDialogRemove.vue +1 -0
- package/components/FSDialogSubmit.vue +5 -7
- package/components/FSDivider.vue +7 -9
- package/components/FSEditImage.vue +27 -274
- package/components/FSEditImageUI.vue +303 -0
- package/components/FSErrorToast.vue +3 -4
- package/components/FSFadeOut.vue +18 -13
- package/components/FSGrid.vue +6 -9
- package/components/FSGridMosaic.vue +1 -2
- package/components/FSIcon.vue +7 -8
- package/components/FSIconCard.vue +23 -30
- package/components/FSIconCheck.vue +1 -2
- package/components/FSImage.vue +21 -193
- package/components/FSImageCard.vue +2 -2
- package/components/FSImageUI.vue +212 -0
- package/components/FSLabel.vue +18 -20
- package/components/FSLink.vue +19 -21
- package/components/FSLoader.vue +10 -14
- package/components/FSOptionGroup.vue +58 -12
- package/components/FSPagination.vue +3 -5
- package/components/FSRadio.vue +5 -7
- package/components/FSRadioGroup.vue +2 -4
- package/components/FSRow.vue +3 -4
- package/components/FSSlideGroup.vue +15 -4
- package/components/FSSlider.vue +9 -11
- package/components/FSSpan.vue +11 -9
- package/components/FSSwitch.vue +65 -37
- package/components/FSTab.vue +2 -4
- package/components/FSTabs.vue +36 -16
- package/components/FSTag.vue +23 -14
- package/components/FSTagGroup.vue +3 -5
- package/components/FSText.vue +8 -12
- package/components/FSWindow.vue +11 -5
- package/components/FSWrapGroup.vue +15 -4
- package/components/agenda/FSAgenda.vue +204 -0
- package/components/agenda/FSAgendaDialogCalendar.vue +76 -0
- package/components/agenda/FSAgendaHeader.vue +190 -0
- package/components/agenda/FSAgendaHorizontalEvent.vue +162 -0
- package/components/agenda/FSAgendaHorizontalTimeLineMarker.vue +46 -0
- package/components/agenda/FSAgendaHoursCol.vue +103 -0
- package/components/agenda/FSAgendaHoursRow.vue +124 -0
- package/components/agenda/FSAgendaVerticalEvent.vue +160 -0
- package/components/agenda/FSAgendaVerticalTimeLineMarker.vue +46 -0
- package/components/agenda/FSDayAgenda.vue +200 -0
- package/components/agenda/FSMonthAgenda.vue +257 -0
- package/components/agenda/FSSelectAgendaMode.vue +54 -0
- package/components/agenda/FSWeekAgenda.vue +328 -0
- package/components/autocompletes/FSAutocompleteLanguage.vue +18 -39
- package/components/autocompletes/FSAutocompleteTimeZone.vue +20 -38
- package/components/buttons/FSButtonCancelMini.vue +1 -0
- package/components/buttons/FSButtonCopy.vue +28 -0
- package/components/buttons/FSButtonCopyIcon.vue +28 -0
- package/components/buttons/FSButtonCopyLabel.vue +27 -0
- package/components/buttons/FSButtonCopyMini.vue +28 -0
- package/components/buttons/FSButtonDragIcon.vue +27 -0
- package/components/buttons/FSButtonDuplicateMini.vue +1 -0
- package/components/buttons/FSButtonEditMini.vue +1 -0
- package/components/buttons/FSButtonFileMini.vue +1 -0
- package/components/buttons/FSButtonNextMini.vue +1 -0
- package/components/buttons/FSButtonPreviousMini.vue +1 -0
- package/components/buttons/FSButtonRedoMini.vue +1 -0
- package/components/buttons/FSButtonRemoveMini.vue +1 -0
- package/components/buttons/FSButtonSaveMini.vue +1 -0
- package/components/buttons/FSButtonSearchMini.vue +1 -0
- package/components/buttons/FSButtonUndoMini.vue +1 -0
- package/components/buttons/FSButtonUpdateMini.vue +1 -0
- package/components/buttons/FSButtonValidateMini.vue +1 -0
- package/components/deviceOrganisations/FSConnectivity.vue +11 -1
- package/components/deviceOrganisations/FSConnectivityCard.vue +20 -49
- package/components/deviceOrganisations/FSStatus.vue +11 -1
- package/components/deviceOrganisations/FSStatusCard.vue +40 -60
- package/components/deviceOrganisations/FSStatusesCarousel.vue +1 -0
- package/components/deviceOrganisations/FSStatusesRow.vue +10 -5
- package/components/deviceOrganisations/FSWorstAlert.vue +19 -13
- package/components/deviceOrganisations/FSWorstAlertCard.vue +36 -47
- package/components/fields/FSAutocompleteField.vue +501 -323
- package/components/fields/FSAutocompleteTag.vue +100 -0
- package/components/fields/FSBaseField.vue +26 -16
- package/components/fields/FSColorField.vue +63 -55
- package/components/fields/FSCommentField.vue +93 -0
- package/components/fields/FSDateField.vue +2 -2
- package/components/fields/FSDateRangeField.vue +2 -2
- package/components/fields/FSDateTimeField.vue +4 -3
- package/components/fields/FSDateTimeRangeField.vue +7 -6
- package/components/fields/FSEntityFieldUI.vue +271 -0
- package/components/fields/FSGradientField.vue +27 -33
- package/components/fields/FSIconField.vue +2 -3
- package/components/fields/FSMagicConfigField.vue +28 -19
- package/components/fields/FSMagicField.vue +25 -17
- package/components/fields/FSNumberField.vue +9 -7
- package/components/fields/FSPasswordField.vue +2 -3
- package/components/fields/FSRichTextField.vue +32 -5
- package/components/fields/FSSearchField.vue +2 -2
- package/components/fields/FSSelectField.vue +483 -251
- package/components/fields/FSTagField.vue +4 -6
- package/components/fields/FSTermField.vue +25 -13
- package/components/fields/FSTextArea.vue +18 -6
- package/components/fields/FSTextField.vue +13 -10
- package/components/fields/FSTimeField.vue +1 -1
- package/components/fields/FSTimeSlotField.vue +3 -4
- package/components/fields/FSTimeStepField.vue +157 -0
- package/components/fields/FSTranslateField.vue +3 -2
- package/components/fields/FSTranslateRichTextField.vue +4 -3
- package/components/fields/FSTranslateTextArea.vue +233 -0
- package/components/fields/FSTreeViewField.vue +7 -9
- package/components/fields/periodicField/FSPeriodicDailyField.vue +120 -0
- package/components/fields/periodicField/FSPeriodicField.vue +131 -0
- package/components/fields/periodicField/FSPeriodicMonthlyField.vue +222 -0
- package/components/fields/periodicField/FSPeriodicWeeklyField.vue +120 -0
- package/components/fields/periodicField/FSPeriodicYearlyField.vue +144 -0
- package/components/lists/FSDataIteratorItem.vue +8 -10
- package/components/lists/FSDataTableUI.vue +47 -39
- package/components/lists/FSFilterButton.vue +20 -22
- package/components/lists/FSHiddenButton.vue +10 -12
- package/components/lists/FSLoadDataTable.vue +4 -6
- package/components/lists/FSSimpleList.vue +229 -0
- package/components/map/FSMap.vue +256 -405
- package/components/map/FSMapFeatureGroup.vue +51 -0
- package/components/map/FSMapLayerButton.vue +6 -3
- package/components/map/FSMapMarker.vue +116 -0
- package/components/map/FSMapMarkerClusterGroup.vue +72 -0
- package/components/map/FSMapOverlay.vue +69 -83
- package/components/map/FSMapPolygon.vue +81 -0
- package/components/map/FSMapTileLayer.vue +50 -0
- package/components/map/keys.ts +4 -0
- package/components/selects/FSSelectAutoRefresh.vue +1 -1
- package/components/selects/FSSelectDashboardVariableType.vue +1 -1
- package/components/selects/FSSelectDateSetting.vue +3 -3
- package/components/selects/FSSelectDays.vue +1 -1
- package/components/selects/FSSelectListMode.vue +51 -0
- package/components/selects/FSSelectMonths.vue +67 -0
- package/components/tiles/FSChartTileUI.vue +116 -0
- package/components/tiles/FSCommentTileUI.vue +149 -0
- package/components/tiles/FSDashboardOrganisationTileUI.vue +6 -8
- package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +6 -8
- package/components/tiles/FSDashboardShallowTileUI.vue +6 -8
- package/components/tiles/FSDeviceOrganisationTileUI.vue +30 -18
- package/components/tiles/FSFolderTileUI.vue +6 -6
- package/components/tiles/FSGroupTileUI.vue +31 -22
- package/components/tiles/FSLoadTile.vue +5 -7
- package/components/tiles/FSLocationTileUI.vue +157 -0
- package/components/tiles/FSModelTileUI.vue +18 -0
- package/components/tiles/FSServiceAccountOrganisationTileUI.vue +142 -0
- package/components/tiles/FSSimpleTileUI.vue +57 -36
- package/components/tiles/FSTile.vue +115 -55
- package/components/tiles/FSUserOrganisationTileUI.vue +25 -35
- package/components/toggleSets/FSToggleSetPosition.vue +1 -1
- package/components/views/FSEntityHeader.vue +343 -0
- package/components/views/FSEntityView.vue +163 -0
- package/components/views/FSListHeader.vue +83 -0
- package/components/views/FSListView.vue +83 -0
- package/components/views/FSSkeletonView.vue +100 -0
- package/composables/useAddress.ts +2 -2
- package/composables/useColors.ts +15 -5
- package/composables/useMagicFieldProvider.ts +7 -6
- package/composables/useSlots.ts +51 -28
- package/models/agenda.ts +9 -0
- package/models/deviceAlerts.ts +1 -1
- package/models/deviceConnectivities.ts +1 -1
- package/models/index.ts +1 -0
- package/models/magicFields.ts +1 -0
- package/models/map.ts +2 -2
- package/models/rules.ts +10 -5
- package/models/tables.ts +3 -1
- package/package.json +4 -4
- package/styles/components/fs_agenda.scss +32 -0
- package/styles/components/fs_agenda_event.scss +41 -0
- package/styles/components/fs_agenda_hours_col.scss +4 -0
- package/styles/components/fs_agenda_hours_row.scss +13 -0
- package/styles/components/fs_agenda_time_line_marker.scss +19 -0
- package/styles/components/fs_card.scss +0 -1
- package/styles/components/fs_clickable.scss +5 -3
- package/styles/components/fs_color_field.scss +1 -0
- package/styles/components/fs_data_table.scss +2 -0
- package/styles/components/fs_dialog.scss +11 -15
- package/styles/components/fs_edit_image.scss +8 -0
- package/styles/components/fs_fade_out.scss +2 -1
- package/styles/components/fs_filter_button.scss +1 -6
- package/styles/components/fs_gradient_field.scss +11 -11
- package/styles/components/fs_magic_config_field.scss +2 -2
- package/styles/components/fs_map.scss +36 -30
- package/styles/components/fs_option_group.scss +15 -5
- package/styles/components/fs_radio.scss +11 -0
- package/styles/components/fs_rich_text_field.scss +2 -1
- package/styles/components/fs_search_field.scss +3 -0
- package/styles/components/fs_select_date_settings.scss +3 -0
- package/styles/components/fs_slide_group.scss +5 -0
- package/styles/components/fs_span.scss +2 -1
- package/styles/components/fs_switch.scss +1 -0
- package/styles/components/fs_tabs.scss +9 -0
- package/styles/components/fs_text_area.scss +15 -1
- package/styles/components/fs_tile.scss +22 -6
- package/styles/components/fs_window.scss +5 -0
- package/styles/components/fs_wrap_group.scss +4 -0
- package/styles/components/index.scss +6 -1
- package/styles/globals/overrides.scss +22 -19
- package/styles/globals/text_fonts.scss +17 -55
- package/tools/alertsTools.ts +54 -0
- package/tools/chartsTools.ts +300 -0
- package/tools/index.ts +2 -0
- package/utils/badge.ts +9 -0
- package/utils/filter.ts +18 -0
- package/utils/index.ts +2 -0
- package/utils/leafletMarkers.ts +8 -2
- package/utils/statuses.ts +1 -1
- package/utils/time.ts +27 -1
- package/components/autocompletes/FSAutocompleteTag.vue +0 -138
- package/components/map/FSMapEditPointAddressOverlay.vue +0 -164
- package/styles/components/fs_map_overlay.scss +0 -38
|
@@ -1,67 +1,94 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
v-if="$props.href || $props.to || $attrs.onClick"
|
|
4
|
-
variant="background"
|
|
2
|
+
<FSCol
|
|
5
3
|
class="fs-tile"
|
|
6
|
-
|
|
7
|
-
:
|
|
8
|
-
:style="style"
|
|
9
|
-
:href="$props.href"
|
|
10
|
-
:to="$props.to"
|
|
11
|
-
v-bind="$attrs"
|
|
4
|
+
:height="$props.height"
|
|
5
|
+
:width="$props.width"
|
|
12
6
|
>
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
:
|
|
7
|
+
<FSClickable
|
|
8
|
+
v-if="$props.singleSelect"
|
|
9
|
+
padding="12px"
|
|
10
|
+
:variant="variant"
|
|
11
|
+
:color="color"
|
|
12
|
+
:style="style"
|
|
13
|
+
width="100%"
|
|
14
|
+
height="100%"
|
|
15
|
+
@click="() => $emit('update:modelValue', !$props.modelValue)"
|
|
18
16
|
v-bind="$attrs"
|
|
19
17
|
>
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
<slot />
|
|
19
|
+
</FSClickable>
|
|
20
|
+
<FSClickable
|
|
21
|
+
v-else-if="$props.href || $props.to || $attrs.onClick"
|
|
22
|
+
variant="background"
|
|
23
|
+
class="fs-tile"
|
|
24
|
+
padding="12px"
|
|
25
|
+
:color="ColorEnum.Background"
|
|
26
|
+
:href="$props.href"
|
|
27
|
+
width="100%"
|
|
28
|
+
height="100%"
|
|
29
|
+
:to="$props.to"
|
|
27
30
|
:style="style"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
v-bind="$attrs"
|
|
32
|
+
>
|
|
33
|
+
<slot />
|
|
34
|
+
<FSCard
|
|
35
|
+
v-if="$props.editable"
|
|
36
|
+
class="fs-tile-checkbox"
|
|
37
|
+
variant="background"
|
|
38
|
+
:color="ColorEnum.Background"
|
|
39
|
+
:border="false"
|
|
40
|
+
v-bind="$attrs"
|
|
41
|
+
>
|
|
42
|
+
<FSCheckbox
|
|
43
|
+
:modelValue="$props.modelValue"
|
|
44
|
+
@update:modelValue="() => $emit('update:modelValue', !$props.modelValue)"
|
|
45
|
+
/>
|
|
46
|
+
</FSCard>
|
|
47
|
+
</FSClickable>
|
|
39
48
|
<FSCard
|
|
40
|
-
v-
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
v-else
|
|
50
|
+
variant="background"
|
|
51
|
+
class="fs-tile"
|
|
52
|
+
padding="12px"
|
|
53
|
+
:color="color"
|
|
54
|
+
:style="style"
|
|
55
|
+
width="100%"
|
|
56
|
+
height="100%"
|
|
43
57
|
v-bind="$attrs"
|
|
44
58
|
>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
59
|
+
<slot />
|
|
60
|
+
<FSCard
|
|
61
|
+
v-if="$props.editable"
|
|
62
|
+
class="fs-tile-checkbox"
|
|
63
|
+
variant="background"
|
|
64
|
+
:border="false"
|
|
65
|
+
v-bind="$attrs"
|
|
66
|
+
>
|
|
67
|
+
<FSCheckbox
|
|
68
|
+
:modelValue="$props.modelValue"
|
|
69
|
+
@update:modelValue="() => $emit('update:modelValue', !$props.modelValue)"
|
|
70
|
+
/>
|
|
71
|
+
</FSCard>
|
|
72
|
+
</FSCard>
|
|
73
|
+
<div
|
|
74
|
+
v-if="$props.leftColor"
|
|
75
|
+
class="fs-tile-left"
|
|
76
|
+
:style="style"
|
|
77
|
+
/>
|
|
50
78
|
<div
|
|
51
79
|
v-if="$props.bottomColor"
|
|
52
80
|
class="fs-tile-bottom"
|
|
53
81
|
:style="style"
|
|
54
82
|
/>
|
|
55
|
-
</
|
|
83
|
+
</FSCol>
|
|
56
84
|
</template>
|
|
57
85
|
|
|
58
86
|
<script lang="ts">
|
|
59
|
-
import type
|
|
60
|
-
import {
|
|
61
|
-
import type { RouteLocation } from "vue-router";
|
|
87
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
88
|
+
import { type RouteLocation } from "vue-router";
|
|
62
89
|
|
|
63
|
-
import {
|
|
64
|
-
import type
|
|
90
|
+
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
91
|
+
import { ColorEnum, type ColorBase } from "@dative-gpi/foundation-shared-components/models";
|
|
65
92
|
|
|
66
93
|
import FSClickable from "../FSClickable.vue";
|
|
67
94
|
import FSCheckbox from "../FSCheckbox.vue";
|
|
@@ -90,38 +117,71 @@ export default defineComponent({
|
|
|
90
117
|
required: false,
|
|
91
118
|
default: false
|
|
92
119
|
},
|
|
120
|
+
activeColor: {
|
|
121
|
+
type: [Array, String] as PropType<ColorBase>,
|
|
122
|
+
required: false,
|
|
123
|
+
default: ColorEnum.Primary
|
|
124
|
+
},
|
|
93
125
|
bottomColor: {
|
|
94
126
|
type: [Array, String] as PropType<ColorBase[] | ColorBase | null>,
|
|
95
127
|
required: false,
|
|
96
128
|
default: null
|
|
97
129
|
},
|
|
130
|
+
leftColor: {
|
|
131
|
+
type: [Array, String] as PropType<ColorBase[] | ColorBase | null>,
|
|
132
|
+
required: false,
|
|
133
|
+
default: null
|
|
134
|
+
},
|
|
98
135
|
editable: {
|
|
99
136
|
type: Boolean,
|
|
100
137
|
required: false,
|
|
101
138
|
default: false
|
|
102
|
-
}
|
|
139
|
+
},
|
|
140
|
+
singleSelect: {
|
|
141
|
+
type: Boolean,
|
|
142
|
+
required: false,
|
|
143
|
+
default: false
|
|
144
|
+
},
|
|
145
|
+
width: {
|
|
146
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
147
|
+
required: false,
|
|
148
|
+
default: null
|
|
149
|
+
},
|
|
150
|
+
height: {
|
|
151
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
152
|
+
required: false,
|
|
153
|
+
default: () => [170, 156]
|
|
154
|
+
},
|
|
103
155
|
},
|
|
104
156
|
emits: ["update:modelValue"],
|
|
105
157
|
setup(props) {
|
|
106
|
-
const { isMobileSized } = useBreakpoints();
|
|
107
158
|
const { getGradients } = useColors();
|
|
108
159
|
|
|
109
160
|
const style = computed((): StyleValue => {
|
|
161
|
+
const result: StyleValue = {};
|
|
110
162
|
if (props.bottomColor) {
|
|
111
163
|
const bottomColors = getGradients(props.bottomColor);
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
164
|
+
result["--fs-tile-bottom-border-color"] = bottomColors.base;
|
|
165
|
+
}
|
|
166
|
+
if (props.leftColor) {
|
|
167
|
+
const leftColors = getGradients(props.leftColor);
|
|
168
|
+
result["--fs-tile-left-border-color"] = leftColors.base;
|
|
115
169
|
}
|
|
116
|
-
return
|
|
170
|
+
return result;
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
const variant = computed((): "standard" | "background" => {
|
|
174
|
+
return (props.singleSelect && props.modelValue) ? "standard" : "background";
|
|
117
175
|
});
|
|
118
176
|
|
|
119
|
-
const
|
|
120
|
-
return
|
|
177
|
+
const color = computed((): ColorBase => {
|
|
178
|
+
return (props.singleSelect && props.modelValue) ? props.activeColor : ColorEnum.Background;
|
|
121
179
|
});
|
|
122
180
|
|
|
123
181
|
return {
|
|
124
|
-
|
|
182
|
+
ColorEnum,
|
|
183
|
+
variant,
|
|
184
|
+
color,
|
|
125
185
|
style
|
|
126
186
|
};
|
|
127
187
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSTile
|
|
3
|
+
:activeColor="ColorEnum.Primary"
|
|
3
4
|
:editable="$props.editable"
|
|
5
|
+
:width="$props.width"
|
|
4
6
|
:modelValue="$props.modelValue"
|
|
5
7
|
v-bind="$attrs"
|
|
6
8
|
>
|
|
@@ -18,16 +20,17 @@
|
|
|
18
20
|
gap="4px"
|
|
19
21
|
:width="infoWidth"
|
|
20
22
|
>
|
|
21
|
-
<
|
|
23
|
+
<FSSpan
|
|
22
24
|
font="text-button"
|
|
23
25
|
:lineClamp="2"
|
|
24
26
|
>
|
|
25
|
-
{{
|
|
26
|
-
</
|
|
27
|
+
{{ $props.name }}
|
|
28
|
+
</FSSpan>
|
|
27
29
|
<FSRow
|
|
28
30
|
v-if="roleLabel"
|
|
29
31
|
align="center-left"
|
|
30
32
|
gap="4px"
|
|
33
|
+
:wrap="false"
|
|
31
34
|
>
|
|
32
35
|
<FSIcon
|
|
33
36
|
v-if="roleIcon"
|
|
@@ -36,12 +39,12 @@
|
|
|
36
39
|
>
|
|
37
40
|
{{ roleIcon }}
|
|
38
41
|
</FSIcon>
|
|
39
|
-
<
|
|
42
|
+
<FSSpan
|
|
40
43
|
font="text-overline"
|
|
41
44
|
variant="soft"
|
|
42
45
|
>
|
|
43
46
|
{{ roleLabel }}
|
|
44
|
-
</
|
|
47
|
+
</FSSpan>
|
|
45
48
|
</FSRow>
|
|
46
49
|
</FSCol>
|
|
47
50
|
<FSImage
|
|
@@ -55,16 +58,14 @@
|
|
|
55
58
|
</template>
|
|
56
59
|
|
|
57
60
|
<script lang="ts">
|
|
58
|
-
import type
|
|
59
|
-
import { computed, defineComponent } from "vue";
|
|
61
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
60
62
|
|
|
61
63
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
62
64
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
63
65
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
64
|
-
import { UserType } from "@dative-gpi/foundation-core-domain/models";
|
|
65
66
|
|
|
66
67
|
import FSImage from "../FSImage.vue";
|
|
67
|
-
import
|
|
68
|
+
import FSSpan from "../FSSpan.vue";
|
|
68
69
|
import FSTile from "./FSTile.vue";
|
|
69
70
|
import FSCol from "../FSCol.vue";
|
|
70
71
|
import FSRow from "../FSRow.vue";
|
|
@@ -73,7 +74,7 @@ export default defineComponent({
|
|
|
73
74
|
name: "FSUserOrganisationTileUI",
|
|
74
75
|
components: {
|
|
75
76
|
FSImage,
|
|
76
|
-
|
|
77
|
+
FSSpan,
|
|
77
78
|
FSTile,
|
|
78
79
|
FSCol,
|
|
79
80
|
FSRow
|
|
@@ -89,16 +90,6 @@ export default defineComponent({
|
|
|
89
90
|
required: false,
|
|
90
91
|
default: null
|
|
91
92
|
},
|
|
92
|
-
label: {
|
|
93
|
-
type: String as PropType<string | null>,
|
|
94
|
-
required: false,
|
|
95
|
-
default: null
|
|
96
|
-
},
|
|
97
|
-
userType: {
|
|
98
|
-
type: Number as PropType<UserType>,
|
|
99
|
-
required: false,
|
|
100
|
-
default: UserType.User
|
|
101
|
-
},
|
|
102
93
|
roleIcon: {
|
|
103
94
|
type: String as PropType<string | null>,
|
|
104
95
|
required: false,
|
|
@@ -114,6 +105,11 @@ export default defineComponent({
|
|
|
114
105
|
required: false,
|
|
115
106
|
default: false
|
|
116
107
|
},
|
|
108
|
+
width: {
|
|
109
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
110
|
+
required: false,
|
|
111
|
+
default: () => [352, 336]
|
|
112
|
+
},
|
|
117
113
|
modelValue: {
|
|
118
114
|
type: Boolean,
|
|
119
115
|
required: false,
|
|
@@ -129,13 +125,6 @@ export default defineComponent({
|
|
|
129
125
|
const { isMobileSized } = useBreakpoints();
|
|
130
126
|
const { $tr } = useTranslationsProvider();
|
|
131
127
|
|
|
132
|
-
const title = computed((): string | null => {
|
|
133
|
-
switch (props.userType) {
|
|
134
|
-
case UserType.ServiceAccount: return props.label;
|
|
135
|
-
default: return props.name;
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
|
|
139
128
|
const roleIcon = computed((): string | null => {
|
|
140
129
|
if (props.admin) {
|
|
141
130
|
return "mdi-crown-outline";
|
|
@@ -151,24 +140,25 @@ export default defineComponent({
|
|
|
151
140
|
});
|
|
152
141
|
|
|
153
142
|
const imageSize = computed((): number => {
|
|
143
|
+
if (!props.imageId) {
|
|
144
|
+
return 0;
|
|
145
|
+
}
|
|
154
146
|
return isMobileSized.value ? 90 : 100;
|
|
155
147
|
});
|
|
156
148
|
|
|
157
|
-
const infoWidth = computed(():
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
width -= imageSize.value;
|
|
149
|
+
const infoWidth = computed((): string => {
|
|
150
|
+
if (!props.imageId) {
|
|
151
|
+
return "100%";
|
|
161
152
|
}
|
|
162
|
-
return
|
|
153
|
+
return `calc(100% - ${imageSize.value}px - 24px)`;
|
|
163
154
|
});
|
|
164
155
|
|
|
165
156
|
return {
|
|
157
|
+
ColorEnum,
|
|
166
158
|
imageSize,
|
|
167
159
|
infoWidth,
|
|
168
|
-
ColorEnum,
|
|
169
160
|
roleLabel,
|
|
170
|
-
roleIcon
|
|
171
|
-
title
|
|
161
|
+
roleIcon
|
|
172
162
|
};
|
|
173
163
|
}
|
|
174
164
|
});
|
|
@@ -22,7 +22,7 @@ import { computed, defineComponent } from "vue";
|
|
|
22
22
|
import type { PropType } from "vue";
|
|
23
23
|
|
|
24
24
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
25
|
-
import { Position } from "@dative-gpi/foundation-shared-domain/
|
|
25
|
+
import { Position } from "@dative-gpi/foundation-shared-domain/enums";
|
|
26
26
|
|
|
27
27
|
export default defineComponent({
|
|
28
28
|
name: "FSToggleSetPosition",
|