@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,9 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSTile
|
|
3
|
+
:activeColor="ColorEnum.Primary"
|
|
3
4
|
:bottomColor="ColorEnum.Error"
|
|
4
5
|
:editable="$props.editable"
|
|
5
|
-
:modelValue="$props.modelValue"
|
|
6
6
|
:width="$props.width"
|
|
7
|
+
:modelValue="$props.modelValue"
|
|
7
8
|
v-bind="$attrs"
|
|
8
9
|
>
|
|
9
10
|
<FSCol
|
|
@@ -13,27 +14,28 @@
|
|
|
13
14
|
<FSRow
|
|
14
15
|
align="center-center"
|
|
15
16
|
gap="24px"
|
|
16
|
-
:wrap="false"
|
|
17
17
|
:height="imageSize"
|
|
18
|
+
:wrap="false"
|
|
18
19
|
>
|
|
19
20
|
<FSCol
|
|
20
21
|
gap="12px"
|
|
21
|
-
:width="
|
|
22
|
+
:width="infoWidth"
|
|
22
23
|
>
|
|
23
24
|
<FSCol
|
|
24
25
|
gap="6px"
|
|
25
26
|
>
|
|
26
|
-
<
|
|
27
|
+
<FSSpan
|
|
27
28
|
font="text-button"
|
|
29
|
+
:lineClamp="1"
|
|
28
30
|
>
|
|
29
31
|
{{ $props.label }}
|
|
30
|
-
</
|
|
31
|
-
<
|
|
32
|
+
</FSSpan>
|
|
33
|
+
<FSSpan
|
|
32
34
|
font="text-overline"
|
|
33
35
|
variant="soft"
|
|
34
36
|
>
|
|
35
37
|
{{ $props.code }}
|
|
36
|
-
</
|
|
38
|
+
</FSSpan>
|
|
37
39
|
</FSCol>
|
|
38
40
|
<FSCol
|
|
39
41
|
gap="6px"
|
|
@@ -50,18 +52,18 @@
|
|
|
50
52
|
<FSRow
|
|
51
53
|
align="center-center"
|
|
52
54
|
>
|
|
53
|
-
<
|
|
55
|
+
<FSSpan
|
|
54
56
|
font="text-overline"
|
|
55
57
|
>
|
|
56
58
|
{{ groupsLabel }}
|
|
57
|
-
</
|
|
59
|
+
</FSSpan>
|
|
58
60
|
</FSRow>
|
|
59
61
|
</FSColor>
|
|
60
|
-
<
|
|
62
|
+
<FSSpan
|
|
61
63
|
font="text-overline"
|
|
62
64
|
>
|
|
63
65
|
{{ $tr("ui.group-tile.group(s)", "Group(s)") }}
|
|
64
|
-
</
|
|
66
|
+
</FSSpan>
|
|
65
67
|
</FSRow>
|
|
66
68
|
<FSRow
|
|
67
69
|
align="center-left"
|
|
@@ -75,18 +77,18 @@
|
|
|
75
77
|
<FSRow
|
|
76
78
|
align="center-center"
|
|
77
79
|
>
|
|
78
|
-
<
|
|
80
|
+
<FSSpan
|
|
79
81
|
font="text-overline"
|
|
80
82
|
>
|
|
81
83
|
{{ deviceOrganisationsLabel }}
|
|
82
|
-
</
|
|
84
|
+
</FSSpan>
|
|
83
85
|
</FSRow>
|
|
84
86
|
</FSColor>
|
|
85
|
-
<
|
|
87
|
+
<FSSpan
|
|
86
88
|
font="text-overline"
|
|
87
89
|
>
|
|
88
90
|
{{ $tr("ui.group-tile.device(s)", "Device(s)") }}
|
|
89
|
-
</
|
|
91
|
+
</FSSpan>
|
|
90
92
|
</FSRow>
|
|
91
93
|
</FSCol>
|
|
92
94
|
</FSCol>
|
|
@@ -101,15 +103,14 @@
|
|
|
101
103
|
</template>
|
|
102
104
|
|
|
103
105
|
<script lang="ts">
|
|
104
|
-
import type
|
|
105
|
-
import { computed, defineComponent } from "vue";
|
|
106
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
106
107
|
|
|
107
108
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
108
109
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
109
110
|
|
|
110
111
|
import FSImage from "../FSImage.vue";
|
|
111
112
|
import FSColor from "../FSColor.vue";
|
|
112
|
-
import
|
|
113
|
+
import FSSpan from "../FSSpan.vue";
|
|
113
114
|
import FSTile from "./FSTile.vue";
|
|
114
115
|
import FSCol from "../FSCol.vue";
|
|
115
116
|
import FSRow from "../FSRow.vue";
|
|
@@ -119,7 +120,7 @@ export default defineComponent({
|
|
|
119
120
|
components: {
|
|
120
121
|
FSImage,
|
|
121
122
|
FSColor,
|
|
122
|
-
|
|
123
|
+
FSSpan,
|
|
123
124
|
FSTile,
|
|
124
125
|
FSCol,
|
|
125
126
|
FSRow
|
|
@@ -181,11 +182,19 @@ export default defineComponent({
|
|
|
181
182
|
return isMobileSized.value ? 90 : 100;
|
|
182
183
|
});
|
|
183
184
|
|
|
185
|
+
const infoWidth = computed((): string => {
|
|
186
|
+
if (!props.imageId) {
|
|
187
|
+
return "100%";
|
|
188
|
+
}
|
|
189
|
+
return `calc(100% - ${imageSize.value}px - 24px)`;
|
|
190
|
+
});
|
|
191
|
+
|
|
184
192
|
return {
|
|
185
|
-
ColorEnum,
|
|
186
|
-
groupsLabel,
|
|
187
193
|
deviceOrganisationsLabel,
|
|
188
|
-
|
|
194
|
+
groupsLabel,
|
|
195
|
+
ColorEnum,
|
|
196
|
+
imageSize,
|
|
197
|
+
infoWidth
|
|
189
198
|
};
|
|
190
199
|
}
|
|
191
200
|
});
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</template>
|
|
54
54
|
|
|
55
55
|
<script lang="ts">
|
|
56
|
-
import { computed, defineComponent } from "vue";
|
|
56
|
+
import { computed, defineComponent, type StyleValue } from "vue";
|
|
57
57
|
|
|
58
58
|
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
59
59
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -92,6 +92,10 @@ export default defineComponent({
|
|
|
92
92
|
|
|
93
93
|
const backgroundColors = getColors(ColorEnum.Background);
|
|
94
94
|
|
|
95
|
+
const style = computed((): StyleValue => ({
|
|
96
|
+
"--fs-load-tile-background-color": backgroundColors.base
|
|
97
|
+
}));
|
|
98
|
+
|
|
95
99
|
const heights = computed(() => {
|
|
96
100
|
return {
|
|
97
101
|
image: isMobileSized.value ? "90px" : "100px",
|
|
@@ -108,12 +112,6 @@ export default defineComponent({
|
|
|
108
112
|
}
|
|
109
113
|
});
|
|
110
114
|
|
|
111
|
-
const style = computed((): { [key: string] : string | null | undefined } => {
|
|
112
|
-
return {
|
|
113
|
-
"--fs-load-tile-background-color": backgroundColors.base
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
|
|
117
115
|
return {
|
|
118
116
|
heights,
|
|
119
117
|
widths,
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSTile
|
|
3
|
+
:activeColor="$props.color"
|
|
4
|
+
:bottomColor="$props.color"
|
|
5
|
+
:modelValue="$props.modelValue"
|
|
6
|
+
:width="$props.width"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
>
|
|
9
|
+
<FSCol
|
|
10
|
+
align="center-center"
|
|
11
|
+
width="fill"
|
|
12
|
+
>
|
|
13
|
+
<FSRow
|
|
14
|
+
align="center-left"
|
|
15
|
+
gap="24px"
|
|
16
|
+
:height="imageSize"
|
|
17
|
+
:wrap="false"
|
|
18
|
+
>
|
|
19
|
+
<FSCol
|
|
20
|
+
gap="12px"
|
|
21
|
+
:width="infoWidth"
|
|
22
|
+
>
|
|
23
|
+
<FSCol
|
|
24
|
+
gap="6px"
|
|
25
|
+
>
|
|
26
|
+
<FSSpan
|
|
27
|
+
font="text-button"
|
|
28
|
+
:lineClamp="1"
|
|
29
|
+
>
|
|
30
|
+
{{ $props.label }}
|
|
31
|
+
</FSSpan>
|
|
32
|
+
<FSSpan
|
|
33
|
+
v-if="$props.code"
|
|
34
|
+
font="text-overline"
|
|
35
|
+
variant="soft"
|
|
36
|
+
>
|
|
37
|
+
{{ $props.code }}
|
|
38
|
+
</FSSpan>
|
|
39
|
+
</FSCol>
|
|
40
|
+
<FSRow
|
|
41
|
+
:wrap="false"
|
|
42
|
+
align="center-left"
|
|
43
|
+
>
|
|
44
|
+
<FSColor
|
|
45
|
+
padding="0 8px"
|
|
46
|
+
height="24px"
|
|
47
|
+
:color="ColorEnum.Light"
|
|
48
|
+
:border="false"
|
|
49
|
+
>
|
|
50
|
+
<FSRow
|
|
51
|
+
align="center-center"
|
|
52
|
+
>
|
|
53
|
+
<FSSpan
|
|
54
|
+
font="text-overline"
|
|
55
|
+
>
|
|
56
|
+
{{ $props.deviceCount }}
|
|
57
|
+
</FSSpan>
|
|
58
|
+
</FSRow>
|
|
59
|
+
</FSColor>
|
|
60
|
+
<FSSpan
|
|
61
|
+
font="text-overline"
|
|
62
|
+
>
|
|
63
|
+
{{ $tr("entity.location.devices", "Devices") }}
|
|
64
|
+
</FSSpan>
|
|
65
|
+
</FSRow>
|
|
66
|
+
</FSCol>
|
|
67
|
+
<FSIconCard
|
|
68
|
+
backgroundVariant="standard"
|
|
69
|
+
:backgroundColor="ColorEnum.Background"
|
|
70
|
+
:iconColor="$props.color"
|
|
71
|
+
:icon="$props.icon"
|
|
72
|
+
:size="imageSize"
|
|
73
|
+
/>
|
|
74
|
+
</FSRow>
|
|
75
|
+
</FSCol>
|
|
76
|
+
</FSTile>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<script lang="ts">
|
|
80
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
81
|
+
|
|
82
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
83
|
+
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
84
|
+
|
|
85
|
+
import FSIconCard from "../FSIconCard.vue";
|
|
86
|
+
import FSColor from "../FSColor.vue";
|
|
87
|
+
import FSSpan from "../FSSpan.vue";
|
|
88
|
+
import FSTile from "./FSTile.vue";
|
|
89
|
+
import FSCol from "../FSCol.vue";
|
|
90
|
+
import FSRow from "../FSRow.vue";
|
|
91
|
+
|
|
92
|
+
export default defineComponent({
|
|
93
|
+
name: "FSLocationTileUI",
|
|
94
|
+
components: {
|
|
95
|
+
FSIconCard,
|
|
96
|
+
FSColor,
|
|
97
|
+
FSSpan,
|
|
98
|
+
FSTile,
|
|
99
|
+
FSCol,
|
|
100
|
+
FSRow
|
|
101
|
+
},
|
|
102
|
+
props: {
|
|
103
|
+
label: {
|
|
104
|
+
type: String as PropType<string | null>,
|
|
105
|
+
required: false,
|
|
106
|
+
default: null
|
|
107
|
+
},
|
|
108
|
+
code: {
|
|
109
|
+
type: String as PropType<string | null>,
|
|
110
|
+
required: false,
|
|
111
|
+
default: null
|
|
112
|
+
},
|
|
113
|
+
icon: {
|
|
114
|
+
type: String,
|
|
115
|
+
required: false,
|
|
116
|
+
default: "mdi-map-marker"
|
|
117
|
+
},
|
|
118
|
+
deviceCount: {
|
|
119
|
+
type: Number,
|
|
120
|
+
required: false,
|
|
121
|
+
default: 0
|
|
122
|
+
},
|
|
123
|
+
color: {
|
|
124
|
+
type: String as PropType<ColorBase>,
|
|
125
|
+
required: false,
|
|
126
|
+
default: ColorEnum.Primary
|
|
127
|
+
},
|
|
128
|
+
width: {
|
|
129
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
130
|
+
required: false,
|
|
131
|
+
default: () => [352, 336]
|
|
132
|
+
},
|
|
133
|
+
modelValue: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
required: false,
|
|
136
|
+
default: false
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
setup() {
|
|
140
|
+
const { isMobileSized } = useBreakpoints();
|
|
141
|
+
|
|
142
|
+
const imageSize = computed((): number => {
|
|
143
|
+
return isMobileSized.value ? 90 : 100;
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
const infoWidth = computed((): string => {
|
|
147
|
+
return `calc(100% - ${imageSize.value}px - 24px)`;
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
return {
|
|
151
|
+
ColorEnum,
|
|
152
|
+
imageSize,
|
|
153
|
+
infoWidth
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
</script>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSimpleTileUI
|
|
3
|
+
v-bind="$attrs"
|
|
4
|
+
/>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts">
|
|
8
|
+
import { defineComponent } from "vue";
|
|
9
|
+
|
|
10
|
+
import FSSimpleTileUI from "./FSSimpleTileUI.vue";
|
|
11
|
+
|
|
12
|
+
export default defineComponent({
|
|
13
|
+
name: "FSModelTileUI",
|
|
14
|
+
components: {
|
|
15
|
+
FSSimpleTileUI,
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSTile
|
|
3
|
+
:activeColor="ColorEnum.Primary"
|
|
4
|
+
:editable="$props.editable"
|
|
5
|
+
:width="$props.width"
|
|
6
|
+
:modelValue="$props.modelValue"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
>
|
|
9
|
+
<FSCol
|
|
10
|
+
align="center-center"
|
|
11
|
+
width="fill"
|
|
12
|
+
>
|
|
13
|
+
<FSRow
|
|
14
|
+
align="center-center"
|
|
15
|
+
gap="24px"
|
|
16
|
+
:wrap="false"
|
|
17
|
+
:height="imageSize"
|
|
18
|
+
>
|
|
19
|
+
<FSCol
|
|
20
|
+
gap="4px"
|
|
21
|
+
:width="infoWidth"
|
|
22
|
+
>
|
|
23
|
+
<FSSpan
|
|
24
|
+
font="text-button"
|
|
25
|
+
:lineClamp="2"
|
|
26
|
+
>
|
|
27
|
+
{{ $props.label }}
|
|
28
|
+
</FSSpan>
|
|
29
|
+
<FSRow
|
|
30
|
+
v-if="$props.roleLabel"
|
|
31
|
+
align="center-left"
|
|
32
|
+
gap="4px"
|
|
33
|
+
:wrap="false"
|
|
34
|
+
>
|
|
35
|
+
<FSIcon
|
|
36
|
+
v-if="$props.roleIcon"
|
|
37
|
+
variant="soft"
|
|
38
|
+
:color="ColorEnum.Dark"
|
|
39
|
+
>
|
|
40
|
+
{{ $props.roleIcon }}
|
|
41
|
+
</FSIcon>
|
|
42
|
+
<FSSpan
|
|
43
|
+
font="text-overline"
|
|
44
|
+
variant="soft"
|
|
45
|
+
>
|
|
46
|
+
{{ $props.roleLabel }}
|
|
47
|
+
</FSSpan>
|
|
48
|
+
</FSRow>
|
|
49
|
+
</FSCol>
|
|
50
|
+
<FSImage
|
|
51
|
+
v-if="$props.imageId"
|
|
52
|
+
:imageId="$props.imageId"
|
|
53
|
+
:width="imageSize"
|
|
54
|
+
/>
|
|
55
|
+
</FSRow>
|
|
56
|
+
</FSCol>
|
|
57
|
+
</FSTile>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script lang="ts">
|
|
61
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
62
|
+
|
|
63
|
+
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
64
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
65
|
+
|
|
66
|
+
import FSImage from "../FSImage.vue";
|
|
67
|
+
import FSSpan from "../FSSpan.vue";
|
|
68
|
+
import FSTile from "./FSTile.vue";
|
|
69
|
+
import FSCol from "../FSCol.vue";
|
|
70
|
+
import FSRow from "../FSRow.vue";
|
|
71
|
+
|
|
72
|
+
export default defineComponent({
|
|
73
|
+
name: "FSServiceAccountOrganisationTileUI",
|
|
74
|
+
components: {
|
|
75
|
+
FSImage,
|
|
76
|
+
FSSpan,
|
|
77
|
+
FSTile,
|
|
78
|
+
FSCol,
|
|
79
|
+
FSRow
|
|
80
|
+
},
|
|
81
|
+
props: {
|
|
82
|
+
imageId: {
|
|
83
|
+
type: String as PropType<string | null>,
|
|
84
|
+
required: false,
|
|
85
|
+
default: null
|
|
86
|
+
},
|
|
87
|
+
label: {
|
|
88
|
+
type: String as PropType<string | null>,
|
|
89
|
+
required: false,
|
|
90
|
+
default: null
|
|
91
|
+
},
|
|
92
|
+
roleIcon: {
|
|
93
|
+
type: String as PropType<string | null>,
|
|
94
|
+
required: false,
|
|
95
|
+
default: null
|
|
96
|
+
},
|
|
97
|
+
roleLabel: {
|
|
98
|
+
type: String as PropType<string | null>,
|
|
99
|
+
required: false,
|
|
100
|
+
default: null
|
|
101
|
+
},
|
|
102
|
+
width: {
|
|
103
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
104
|
+
required: false,
|
|
105
|
+
default: () => [352, 336]
|
|
106
|
+
},
|
|
107
|
+
modelValue: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
required: false,
|
|
110
|
+
default: false
|
|
111
|
+
},
|
|
112
|
+
editable: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
required: false,
|
|
115
|
+
default: true
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
setup(props) {
|
|
119
|
+
const { isMobileSized } = useBreakpoints();
|
|
120
|
+
|
|
121
|
+
const imageSize = computed((): number => {
|
|
122
|
+
if (!props.imageId) {
|
|
123
|
+
return 0;
|
|
124
|
+
}
|
|
125
|
+
return isMobileSized.value ? 90 : 100;
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
const infoWidth = computed((): string => {
|
|
129
|
+
if (!props.imageId) {
|
|
130
|
+
return "100%";
|
|
131
|
+
}
|
|
132
|
+
return `calc(100% - ${imageSize.value}px - 24px)`;
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
ColorEnum,
|
|
137
|
+
imageSize,
|
|
138
|
+
infoWidth
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
</script>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSTile
|
|
3
|
+
:activeColor="$props.activeColor"
|
|
3
4
|
:bottomColor="$props.bottomColor"
|
|
4
5
|
:editable="$props.editable"
|
|
5
|
-
:modelValue="$props.modelValue"
|
|
6
6
|
:width="$props.width"
|
|
7
|
+
:modelValue="$props.modelValue"
|
|
7
8
|
v-bind="$attrs"
|
|
8
9
|
>
|
|
9
10
|
<FSCol
|
|
@@ -11,37 +12,40 @@
|
|
|
11
12
|
width="fill"
|
|
12
13
|
>
|
|
13
14
|
<FSRow
|
|
14
|
-
align="center-
|
|
15
|
+
align="center-left"
|
|
15
16
|
gap="24px"
|
|
16
17
|
:height="imageSize"
|
|
17
18
|
:wrap="false"
|
|
18
19
|
>
|
|
19
20
|
<FSCol
|
|
20
21
|
gap="6px"
|
|
21
|
-
:width="
|
|
22
|
+
:width="infoWidth"
|
|
22
23
|
>
|
|
23
|
-
<
|
|
24
|
+
<FSSpan
|
|
24
25
|
font="text-button"
|
|
25
26
|
:lineClamp="2"
|
|
26
27
|
>
|
|
27
28
|
{{ $props.label }}
|
|
28
|
-
</
|
|
29
|
-
<
|
|
29
|
+
</FSSpan>
|
|
30
|
+
<FSSpan
|
|
30
31
|
font="text-overline"
|
|
31
32
|
variant="soft"
|
|
32
33
|
>
|
|
33
34
|
{{ $props.code }}
|
|
34
|
-
</
|
|
35
|
+
</FSSpan>
|
|
35
36
|
</FSCol>
|
|
36
37
|
<FSImage
|
|
37
38
|
v-if="$props.imageId"
|
|
39
|
+
:imageId="$props.imageId"
|
|
38
40
|
:height="imageSize"
|
|
39
41
|
:width="imageSize"
|
|
40
|
-
:imageId="$props.imageId"
|
|
41
42
|
/>
|
|
42
43
|
<FSIconCard
|
|
43
|
-
v-else
|
|
44
|
-
:
|
|
44
|
+
v-else-if="$props.icon"
|
|
45
|
+
:backgroundVariant="$props.iconBackgroundVariant"
|
|
46
|
+
:backgroundColor="$props.iconBackgroundColor"
|
|
47
|
+
:iconColor="$props.activeColor"
|
|
48
|
+
:border="$props.iconBorder"
|
|
45
49
|
:icon="$props.icon"
|
|
46
50
|
:size="imageSize"
|
|
47
51
|
/>
|
|
@@ -51,16 +55,14 @@
|
|
|
51
55
|
</template>
|
|
52
56
|
|
|
53
57
|
<script lang="ts">
|
|
54
|
-
import type
|
|
55
|
-
import { computed, defineComponent } from "vue";
|
|
58
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
56
59
|
|
|
60
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
57
61
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
58
|
-
import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
|
|
59
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
60
62
|
|
|
61
63
|
import FSIconCard from "../FSIconCard.vue";
|
|
62
64
|
import FSImage from "../FSImage.vue";
|
|
63
|
-
import
|
|
65
|
+
import FSSpan from "../FSSpan.vue";
|
|
64
66
|
import FSTile from "./FSTile.vue";
|
|
65
67
|
import FSCol from "../FSCol.vue";
|
|
66
68
|
import FSRow from "../FSRow.vue";
|
|
@@ -70,57 +72,71 @@ export default defineComponent({
|
|
|
70
72
|
components: {
|
|
71
73
|
FSIconCard,
|
|
72
74
|
FSImage,
|
|
75
|
+
FSSpan,
|
|
73
76
|
FSTile,
|
|
74
|
-
FSText,
|
|
75
77
|
FSCol,
|
|
76
78
|
FSRow
|
|
77
79
|
},
|
|
78
80
|
props: {
|
|
79
|
-
|
|
80
|
-
type: String as PropType<string
|
|
81
|
+
imageId: {
|
|
82
|
+
type: String as PropType<string>,
|
|
81
83
|
required: false,
|
|
82
84
|
default: null
|
|
83
85
|
},
|
|
84
|
-
|
|
85
|
-
type:
|
|
86
|
+
label: {
|
|
87
|
+
type: String as PropType<string | null>,
|
|
86
88
|
required: false,
|
|
87
|
-
default:
|
|
89
|
+
default: null
|
|
88
90
|
},
|
|
89
91
|
code: {
|
|
90
92
|
type: String as PropType<string | null>,
|
|
91
93
|
required: false,
|
|
92
94
|
default: null
|
|
93
95
|
},
|
|
94
|
-
|
|
95
|
-
type:
|
|
96
|
+
icon: {
|
|
97
|
+
type: String as PropType<string>,
|
|
96
98
|
required: false,
|
|
97
|
-
|
|
99
|
+
},
|
|
100
|
+
iconBackgroundVariant: {
|
|
101
|
+
type: String as PropType<"background" | "standard" | "full" | "gradient">,
|
|
102
|
+
required: false,
|
|
103
|
+
default: "standard"
|
|
98
104
|
},
|
|
99
105
|
iconBackgroundColor: {
|
|
100
|
-
type:
|
|
106
|
+
type: [Array, String] as PropType<ColorBase | ColorBase[]>,
|
|
101
107
|
required: false,
|
|
102
|
-
default:
|
|
108
|
+
default: ColorEnum.Background
|
|
103
109
|
},
|
|
104
|
-
|
|
105
|
-
type:
|
|
110
|
+
iconBorder: {
|
|
111
|
+
type: Boolean as PropType<boolean>,
|
|
106
112
|
required: false,
|
|
107
|
-
default:
|
|
113
|
+
default: true
|
|
108
114
|
},
|
|
109
|
-
|
|
110
|
-
type: String as PropType<
|
|
115
|
+
activeColor: {
|
|
116
|
+
type: String as PropType<ColorBase>,
|
|
111
117
|
required: false,
|
|
112
|
-
default:
|
|
118
|
+
default: ColorEnum.Primary
|
|
113
119
|
},
|
|
114
|
-
|
|
115
|
-
type:
|
|
120
|
+
bottomColor: {
|
|
121
|
+
type: [Array, String] as PropType<ColorBase | ColorBase[]>,
|
|
116
122
|
required: false,
|
|
117
|
-
default:
|
|
123
|
+
default: ColorEnum.Light
|
|
118
124
|
},
|
|
119
125
|
width: {
|
|
120
126
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
121
127
|
required: false,
|
|
122
128
|
default: () => [352, 336]
|
|
123
129
|
},
|
|
130
|
+
modelValue: {
|
|
131
|
+
type: Boolean,
|
|
132
|
+
required: false,
|
|
133
|
+
default: false
|
|
134
|
+
},
|
|
135
|
+
editable: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
required: false,
|
|
138
|
+
default: true
|
|
139
|
+
}
|
|
124
140
|
},
|
|
125
141
|
setup(props) {
|
|
126
142
|
const { isMobileSized } = useBreakpoints();
|
|
@@ -133,10 +149,15 @@ export default defineComponent({
|
|
|
133
149
|
return isMobileSized.value ? 90 : 100;
|
|
134
150
|
});
|
|
135
151
|
|
|
152
|
+
const infoWidth = computed((): string => {
|
|
153
|
+
return `calc(100% - ${imageSize.value}px - 24px)`;
|
|
154
|
+
});
|
|
155
|
+
|
|
136
156
|
return {
|
|
137
157
|
iconBackgroundColor,
|
|
138
158
|
ColorEnum,
|
|
139
|
-
imageSize
|
|
159
|
+
imageSize,
|
|
160
|
+
infoWidth
|
|
140
161
|
};
|
|
141
162
|
}
|
|
142
163
|
});
|