@dative-gpi/foundation-shared-components 1.0.65 → 1.0.67-map-edit
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/assets/images/map/snow.png +0 -0
- package/components/FSAccordionPanel.vue +40 -21
- package/components/FSBreadcrumbs.vue +21 -12
- package/components/FSButton.vue +11 -9
- package/components/FSCalendar.vue +50 -12
- package/components/FSCalendarTwin.vue +95 -43
- package/components/FSCard.vue +61 -9
- package/components/FSCardPlaceholder.vue +8 -5
- package/components/FSCheckbox.vue +5 -4
- package/components/FSChip.vue +73 -45
- package/components/FSChipGroup.vue +69 -0
- package/components/FSClickable.vue +11 -9
- package/components/FSClock.vue +30 -12
- package/components/FSCol.vue +11 -5
- package/components/FSDialog.vue +2 -1
- package/components/FSDialogContent.vue +12 -11
- package/components/FSDialogForm.vue +22 -2
- package/components/FSDialogFormBody.vue +50 -31
- package/components/FSDialogMenu.vue +17 -8
- package/components/FSDialogMultiFormBody.vue +23 -13
- package/components/FSDialogRemove.vue +7 -8
- package/components/FSDialogSubmit.vue +20 -11
- package/components/FSEditImageUI.vue +13 -5
- package/components/FSFadeOut.vue +53 -21
- package/components/FSForm.vue +10 -8
- package/components/FSGrid.vue +0 -1
- package/components/FSIcon.vue +2 -2
- package/components/FSIconCard.vue +68 -12
- package/components/FSInformationsMenu.vue +142 -0
- package/components/FSInstantPicker.vue +268 -0
- package/components/FSLink.vue +25 -9
- package/components/FSLoader.vue +28 -10
- package/components/FSMenu.vue +47 -0
- package/components/FSOptionGroup.vue +8 -8
- package/components/FSOptionItem.vue +4 -4
- package/components/FSOptionsMenu.vue +165 -0
- package/components/FSPagination.vue +1 -1
- package/components/FSPlayButtons.vue +72 -0
- package/components/FSProgressBar.vue +94 -0
- package/components/FSRadio.vue +5 -4
- package/components/FSRadioGroup.vue +3 -3
- package/components/FSRangePicker.vue +275 -0
- package/components/FSRangeSlider.vue +84 -0
- package/components/FSRouterLink.vue +42 -0
- package/components/FSSlideGroup.vue +19 -5
- package/components/FSSlider.vue +44 -79
- package/components/FSSpan.vue +12 -7
- package/components/FSSwitch.vue +44 -48
- package/components/FSTab.vue +15 -13
- package/components/FSTabs.vue +32 -7
- package/components/FSTag.vue +3 -3
- package/components/FSTagGroup.vue +6 -4
- package/components/FSText.vue +11 -7
- package/components/FSToggleSet.vue +7 -7
- package/components/FSWindow.vue +122 -5
- package/components/FSWrapGroup.vue +13 -1
- package/components/agenda/FSAgenda.vue +26 -7
- package/components/agenda/FSAgendaDialogCalendar.vue +2 -2
- package/components/agenda/FSAgendaHeader.vue +35 -10
- package/components/agenda/FSAgendaHorizontalEvent.vue +18 -6
- package/components/agenda/FSAgendaHoursRow.vue +48 -8
- package/components/agenda/FSAgendaVerticalEvent.vue +1 -1
- package/components/agenda/FSDayAgenda.vue +0 -1
- package/components/agenda/FSMonthAgenda.vue +1 -6
- package/components/agenda/FSSelectAgendaMode.vue +2 -2
- package/components/agenda/FSWeekAgenda.vue +5 -10
- package/components/autocompletes/FSAutoCompleteAddress.vue +25 -20
- package/components/autocompletes/FSAutocompleteLanguage.vue +7 -1
- package/components/autocompletes/FSAutocompleteTimeZone.vue +7 -1
- package/components/buttons/FSButtonAdd.vue +1 -1
- package/components/buttons/FSButtonAddLabel.vue +1 -1
- package/components/buttons/FSButtonCancel.vue +1 -1
- package/components/buttons/FSButtonCancelLabel.vue +1 -1
- package/components/buttons/FSButtonCheckbox.vue +4 -4
- package/components/buttons/FSButtonCopy.vue +1 -1
- package/components/buttons/FSButtonCopyLabel.vue +1 -1
- package/components/buttons/FSButtonDuplicate.vue +1 -1
- package/components/buttons/FSButtonDuplicateLabel.vue +1 -1
- package/components/buttons/FSButtonEdit.vue +1 -1
- package/components/buttons/FSButtonEditLabel.vue +1 -1
- package/components/buttons/FSButtonFile.vue +1 -1
- package/components/buttons/FSButtonFileLabel.vue +1 -1
- package/components/buttons/FSButtonNext.vue +1 -1
- package/components/buttons/FSButtonNextLabel.vue +1 -1
- package/components/buttons/FSButtonPrevious.vue +1 -1
- package/components/buttons/FSButtonPreviousLabel.vue +1 -1
- package/components/buttons/FSButtonRedo.vue +1 -1
- package/components/buttons/FSButtonRedoLabel.vue +1 -1
- package/components/buttons/FSButtonRemove.vue +1 -1
- package/components/buttons/FSButtonRemoveLabel.vue +1 -1
- package/components/buttons/FSButtonSave.vue +1 -1
- package/components/buttons/FSButtonSaveLabel.vue +1 -1
- package/components/buttons/FSButtonSearch.vue +1 -1
- package/components/buttons/FSButtonSearchLabel.vue +1 -1
- package/components/buttons/FSButtonUndo.vue +1 -1
- package/components/buttons/FSButtonUndoLabel.vue +1 -1
- package/components/buttons/FSButtonUpdate.vue +1 -1
- package/components/buttons/FSButtonUpdateLabel.vue +1 -1
- package/components/buttons/FSButtonValidate.vue +1 -1
- package/components/buttons/FSButtonValidateLabel.vue +1 -1
- package/components/calendar/FSSimpleCalendar.vue +145 -0
- package/components/calendar/FSSimpleCalendarHeader.vue +60 -0
- package/components/calendar/FSSimpleMonthSelector.vue +138 -0
- package/components/deviceOrganisations/FSConnectivity.vue +5 -3
- package/components/deviceOrganisations/FSStatus.vue +5 -3
- package/components/deviceOrganisations/FSStatusCard.vue +7 -9
- package/components/deviceOrganisations/FSStatusRichCard.vue +171 -0
- package/components/deviceOrganisations/FSWorstAlert.vue +24 -36
- package/components/deviceOrganisations/FSWorstAlertCard.vue +8 -47
- package/components/fields/FSAutocompleteField.vue +85 -82
- package/components/fields/FSAutocompleteTag.vue +1 -1
- package/components/fields/FSBaseField.vue +42 -25
- package/components/fields/FSClosableSearchField.vue +83 -0
- package/components/fields/FSColorField.vue +12 -10
- package/components/fields/FSCommentField.vue +28 -16
- package/components/fields/FSDateField.vue +13 -10
- package/components/fields/FSDateRangeField.vue +6 -5
- package/components/fields/FSDateTimeField.vue +14 -11
- package/components/fields/FSDateTimeRangeDialog.vue +160 -0
- package/components/fields/FSDateTimeRangeField.vue +23 -115
- package/components/fields/FSEntityFieldUI.vue +19 -16
- package/components/fields/FSGradientField.vue +5 -5
- package/components/fields/FSIconField.vue +16 -9
- package/components/fields/FSMagicConfigField.vue +15 -7
- package/components/fields/FSMagicField.vue +7 -2
- package/components/fields/FSNumberField.vue +8 -4
- package/components/fields/FSPasswordField.vue +7 -7
- package/components/fields/FSRichTextField.vue +78 -58
- package/components/fields/FSSearchField.vue +9 -115
- package/components/fields/FSSelectField.vue +69 -71
- package/components/fields/FSTagField.vue +9 -9
- package/components/fields/FSTermField.vue +69 -46
- package/components/fields/FSTextArea.vue +17 -11
- package/components/fields/FSTextField.vue +15 -10
- package/components/fields/FSTimeField.vue +14 -10
- package/components/fields/FSTimeRangeField.vue +310 -0
- package/components/fields/FSTimeStepField.vue +5 -5
- package/components/fields/FSTranslateField.vue +10 -10
- package/components/fields/FSTranslateRichTextField.vue +41 -20
- package/components/fields/FSTranslateTextArea.vue +10 -10
- package/components/fields/FSTreeViewField.vue +15 -13
- package/components/fields/periodicField/FSPeriodicDailyField.vue +7 -7
- package/components/fields/periodicField/FSPeriodicField.vue +15 -15
- package/components/fields/periodicField/FSPeriodicMonthlyField.vue +16 -16
- package/components/fields/periodicField/FSPeriodicWeeklyField.vue +28 -18
- package/components/fields/periodicField/FSPeriodicYearlyField.vue +12 -12
- package/components/lists/FSDataIteratorItem.vue +23 -67
- package/components/lists/FSDataTableUI.vue +198 -123
- package/components/lists/FSDraggable.vue +2 -2
- package/components/lists/FSFilterButton.vue +14 -16
- package/components/lists/FSHeaderButton.vue +11 -9
- package/components/lists/FSHiddenButton.vue +9 -9
- package/components/lists/FSLoadDataTable.vue +10 -7
- package/components/lists/FSSimpleList.vue +95 -88
- package/components/lists/FSSimpleListItem.vue +131 -0
- package/components/map/FSMap.vue +144 -158
- package/components/map/FSMapEditLocationAddress.vue +189 -0
- package/components/map/FSMapFeatureGroup.vue +7 -1
- package/components/map/FSMapLayerButton.vue +4 -3
- package/components/map/FSMapMarker.vue +103 -42
- package/components/map/FSMapMarkerClusterGroup.vue +32 -7
- package/components/map/FSMapOverlay.vue +44 -24
- package/components/map/FSMapPolygon.vue +16 -4
- package/components/map/FSMapTileLayer.vue +26 -9
- package/components/map/layers.ts +0 -0
- package/components/selects/FSSelectAutoRefresh.vue +8 -8
- package/components/selects/FSSelectDashboardVariableType.vue +4 -3
- package/components/selects/FSSelectDateSetting.vue +2 -2
- package/components/selects/FSSelectDays.vue +8 -8
- package/components/selects/FSSelectListMode.vue +2 -2
- package/components/selects/FSSelectMapLayer.vue +68 -0
- package/components/selects/FSSelectMonths.vue +13 -13
- package/components/selects/chartSelectors/FSAggregationSelector.vue +52 -0
- package/components/selects/chartSelectors/FSAxisTypeSelector.vue +49 -0
- package/components/selects/chartSelectors/FSDisplayAsSelector.vue +53 -0
- package/components/selects/chartSelectors/FSFilterTypeSelector.vue +54 -0
- package/components/selects/chartSelectors/FSHeatmapRuleSelector.vue +54 -0
- package/components/selects/chartSelectors/FSOperationOnSelector.vue +53 -0
- package/components/selects/chartSelectors/FSPlanningTypeSelector.vue +53 -0
- package/components/selects/chartSelectors/FSPlotPerSelector.vue +52 -0
- package/components/selects/chartSelectors/FSSelectEntityType.vue +59 -0
- package/components/selects/chartSelectors/FSSerieTypeSelector.vue +53 -0
- package/components/tiles/FSAlertTileUI.vue +90 -0
- package/components/tiles/FSChartTileUI.vue +61 -52
- package/components/tiles/FSCommentTileUI.vue +38 -13
- package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +14 -2
- package/components/tiles/FSDashboardShallowTileUI.vue +14 -2
- package/components/tiles/FSDeviceOrganisationTileUI.vue +0 -6
- package/components/tiles/FSEntityCountBadge.vue +72 -0
- package/components/tiles/FSFolderTileUI.vue +38 -4
- package/components/tiles/FSGroupTileUI.vue +32 -136
- package/components/tiles/FSLoadTile.vue +16 -10
- package/components/tiles/FSLocationTileUI.vue +45 -63
- package/components/tiles/FSServiceAccountOrganisationTileUI.vue +0 -6
- package/components/tiles/FSSimpleTileUI.vue +30 -24
- package/components/tiles/FSTile.vue +46 -39
- package/components/tiles/FSUserOrganisationTileUI.vue +1 -7
- package/components/tiles/FSUserTileUI.vue +119 -0
- package/components/toggleSets/FSToggleSetPosition.vue +1 -1
- package/components/views/FSBaseView.vue +64 -0
- package/components/views/FSEntityView.vue +12 -146
- package/components/views/FSSimpleView.vue +29 -0
- package/components/views/desktop/FSBaseDefaultDesktopView.vue +135 -0
- package/components/views/desktop/FSBaseDesktopView.vue +53 -0
- package/components/views/desktop/FSBaseEntityDesktopView.vue +211 -0
- package/components/views/mobile/FSBaseDefaultMobileView.vue +133 -0
- package/components/views/mobile/FSBaseEntityMobileView.vue +206 -0
- package/components/views/mobile/FSBaseMobileView.vue +53 -0
- package/composables/index.ts +1 -0
- package/composables/useAddress.ts +40 -8
- package/composables/useBreakpoints.ts +40 -4
- package/composables/useColors.ts +16 -7
- package/composables/useMagicFieldProvider.ts +1 -0
- package/composables/useMapLayers.ts +69 -0
- package/composables/useSlots.ts +2 -1
- package/models/colors.ts +2 -1
- package/models/deviceAlerts.ts +1 -0
- package/models/magicFields.ts +1 -0
- package/models/map.ts +12 -10
- package/models/rules.ts +5 -2
- package/models/tables.ts +2 -1
- package/models/variableNode.ts +8 -5
- package/package.json +5 -5
- package/styles/components/fs_agenda.scss +4 -0
- package/styles/components/fs_agenda_event.scss +1 -1
- package/styles/components/fs_agenda_hours_row.scss +0 -8
- package/styles/components/fs_autocomplete_field.scss +0 -13
- package/styles/components/fs_breadcrumbs.scss +18 -36
- package/styles/components/fs_button.scss +7 -5
- package/styles/components/fs_calendar.scss +1 -0
- package/styles/components/fs_card.scss +9 -0
- package/styles/components/fs_chip.scss +13 -7
- package/styles/components/fs_clickable.scss +16 -23
- package/styles/components/fs_clock.scss +0 -10
- package/styles/components/fs_col.scss +1 -1
- package/styles/components/fs_color_field.scss +0 -4
- package/styles/components/fs_data_table.scss +6 -9
- package/styles/components/fs_dialog.scss +4 -10
- package/styles/components/fs_dialog_menu.scss +4 -2
- package/styles/components/fs_draggable.scss +0 -5
- package/styles/components/fs_fade_out.scss +10 -2
- package/styles/components/fs_filter_button.scss +1 -1
- package/styles/components/fs_hidden_button.scss +2 -7
- package/styles/components/fs_image_card.scss +6 -4
- package/styles/components/fs_magic_config_field.scss +1 -2
- package/styles/components/fs_map.scss +57 -17
- package/styles/components/fs_meta_field.scss +3 -5
- package/styles/components/fs_password_field.scss +4 -2
- package/styles/components/fs_progress_bar.scss +14 -0
- package/styles/components/fs_radio.scss +0 -11
- package/styles/components/fs_rich_text_field.scss +1 -10
- package/styles/components/fs_select_field.scss +4 -13
- package/styles/components/fs_slide_group.scss +7 -0
- package/styles/components/fs_slider.scss +0 -40
- package/styles/components/fs_span.scss +13 -5
- package/styles/components/fs_status_rich_card.scss +6 -0
- package/styles/components/fs_tabs.scss +18 -37
- package/styles/components/fs_tag.scss +8 -22
- package/styles/components/fs_text_area.scss +2 -21
- package/styles/components/fs_tile.scss +0 -19
- package/styles/components/fs_window.scss +3 -1
- package/styles/components/fs_wrap_group.scss +7 -0
- package/styles/components/index.scss +2 -6
- package/styles/globals/index.scss +1 -5
- package/styles/globals/overrides.scss +26 -54
- package/styles/globals/scrollbars.scss +8 -0
- package/styles/globals/text_fonts.scss +18 -66
- package/styles/globals/touchscreen.scss +2 -2
- package/tools/alertsTools.ts +94 -18
- package/tools/chartsTools.ts +155 -16
- package/tools/index.ts +3 -1
- package/tools/reportsTools.ts +38 -0
- package/tools/timeRangeTools.ts +125 -0
- package/utils/badge.ts +9 -5
- package/utils/filter.ts +4 -1
- package/utils/index.ts +2 -0
- package/utils/leafletMarkers.ts +4 -4
- package/utils/operations.ts +108 -0
- package/utils/picker.ts +40 -0
- package/utils/sort.ts +2 -2
- package/utils/time.ts +13 -13
- package/components/fields/FSTimeSlotField.vue +0 -250
- package/components/views/FSEntityHeader.vue +0 -343
- package/components/views/FSListHeader.vue +0 -83
- package/components/views/FSListView.vue +0 -83
- package/components/views/FSSkeletonView.vue +0 -100
- package/styles/components/fs_data_iterator_item.scss +0 -33
- package/styles/components/fs_icon_field.scss +0 -12
- package/styles/components/fs_search_field.scss +0 -3
- package/styles/components/fs_tag_field.scss +0 -8
- package/styles/components/fs_time_field.scss +0 -12
- package/styles/components/fs_timeslot_field.scss +0 -12
- package/styles/globals/breakpoints.scss +0 -20
- package/styles/globals/fixes.scss +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSMenu
|
|
3
3
|
:closeOnContentClick="false"
|
|
4
4
|
v-model="menu"
|
|
5
5
|
location="bottom center"
|
|
@@ -9,16 +9,17 @@
|
|
|
9
9
|
>
|
|
10
10
|
<FSBadge
|
|
11
11
|
:content="badgeLabel"
|
|
12
|
-
:color="criticityColor"
|
|
12
|
+
:color="AlertTools.criticityColor($props.deviceWorstAlert?.criticity)"
|
|
13
13
|
>
|
|
14
14
|
<FSColorIcon
|
|
15
15
|
class="fs-stopclick"
|
|
16
|
-
|
|
17
|
-
:color="criticityColor"
|
|
16
|
+
:padding="$props.padding"
|
|
17
|
+
:color="AlertTools.criticityColor($props.deviceWorstAlert?.criticity)"
|
|
18
|
+
:size="$props.size"
|
|
18
19
|
@click.prevent.stop
|
|
19
20
|
v-bind="props"
|
|
20
21
|
>
|
|
21
|
-
{{ statusIcon }}
|
|
22
|
+
{{ AlertTools.statusIcon($props.deviceWorstAlert?.status) }}
|
|
22
23
|
</FSColorIcon>
|
|
23
24
|
</FSBadge>
|
|
24
25
|
</template>
|
|
@@ -27,26 +28,29 @@
|
|
|
27
28
|
:alertTo="$props.alertTo"
|
|
28
29
|
@close="menu = false"
|
|
29
30
|
/>
|
|
30
|
-
</
|
|
31
|
+
</FSMenu>
|
|
31
32
|
</template>
|
|
32
33
|
|
|
33
34
|
<script lang="ts">
|
|
34
35
|
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
35
36
|
|
|
37
|
+
import { capNumberToString } from '@dative-gpi/foundation-shared-components/utils';
|
|
38
|
+
import { AlertTools } from "@dative-gpi/foundation-shared-components/tools";
|
|
39
|
+
|
|
36
40
|
import { type FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
|
|
37
|
-
import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/enums";
|
|
38
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
39
41
|
|
|
40
42
|
import FSWorstAlertCard from "./FSWorstAlertCard.vue";
|
|
41
43
|
import FSColorIcon from "../FSColorIcon.vue";
|
|
42
44
|
import FSBadge from "../FSBadge.vue";
|
|
45
|
+
import FSMenu from '../FSMenu.vue';
|
|
43
46
|
|
|
44
47
|
export default defineComponent({
|
|
45
48
|
name: "FSWorstAlert",
|
|
46
49
|
components: {
|
|
47
50
|
FSWorstAlertCard,
|
|
48
51
|
FSColorIcon,
|
|
49
|
-
FSBadge
|
|
52
|
+
FSBadge,
|
|
53
|
+
FSMenu
|
|
50
54
|
},
|
|
51
55
|
props: {
|
|
52
56
|
deviceWorstAlert: {
|
|
@@ -62,45 +66,29 @@ export default defineComponent({
|
|
|
62
66
|
type: Function,
|
|
63
67
|
required: false,
|
|
64
68
|
default: null
|
|
69
|
+
},
|
|
70
|
+
size: {
|
|
71
|
+
type: [Array, String, Number] as PropType<"s" | "m" | "l" | string[] | number[] | string | number | null>,
|
|
72
|
+
default: "m"
|
|
73
|
+
},
|
|
74
|
+
padding: {
|
|
75
|
+
type: [String, Number] as PropType<string | number>,
|
|
76
|
+
default: "8px"
|
|
65
77
|
}
|
|
66
78
|
},
|
|
67
79
|
setup(props) {
|
|
68
80
|
const menu = ref(false);
|
|
69
81
|
|
|
70
|
-
const criticityColor = computed(() => {
|
|
71
|
-
switch (props.deviceWorstAlert?.criticity) {
|
|
72
|
-
case Criticity.Error: return ColorEnum.Error;
|
|
73
|
-
case Criticity.Warning: return ColorEnum.Warning;
|
|
74
|
-
default: return ColorEnum.Primary;
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
const statusIcon = computed(() => {
|
|
79
|
-
switch (props.deviceWorstAlert?.status) {
|
|
80
|
-
case AlertStatus.Pending: return "mdi-timer-outline";
|
|
81
|
-
case AlertStatus.Untriggered: return "mdi-timer-off-outline";
|
|
82
|
-
case AlertStatus.Unresolved: return "mdi-alert-circle-outline";
|
|
83
|
-
case AlertStatus.Resolved: return "mdi-check-circle-outline";
|
|
84
|
-
case AlertStatus.Expired: return "mdi-clock-outline";
|
|
85
|
-
case AlertStatus.Triggered: return "mdi-alert-circle-outline";
|
|
86
|
-
case AlertStatus.Abandoned: return "mdi-cancel"
|
|
87
|
-
default: return "";
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
|
|
91
82
|
const badgeLabel = computed((): string | null => {
|
|
92
83
|
if (!props.deviceAlerts || props.deviceAlerts.length < 1) {
|
|
93
84
|
return null;
|
|
94
85
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
return props.deviceAlerts.length.toString();
|
|
86
|
+
|
|
87
|
+
return capNumberToString(props.deviceAlerts.length, 9);
|
|
99
88
|
});
|
|
100
89
|
|
|
101
90
|
return {
|
|
102
|
-
|
|
103
|
-
statusIcon,
|
|
91
|
+
AlertTools,
|
|
104
92
|
badgeLabel,
|
|
105
93
|
menu
|
|
106
94
|
};
|
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
>
|
|
10
10
|
<FSChip
|
|
11
11
|
:label="$tr('ui.common.alert', 'Alert')"
|
|
12
|
-
:prependIcon="statusIcon"
|
|
13
|
-
:color="criticityColor"
|
|
12
|
+
:prependIcon="AlertTools.statusIcon($props.deviceAlert?.status)"
|
|
13
|
+
:color="AlertTools.criticityColor($props.deviceAlert?.criticity)"
|
|
14
14
|
/>
|
|
15
15
|
<FSCol
|
|
16
16
|
align="center-center"
|
|
17
17
|
gap="0px"
|
|
18
18
|
>
|
|
19
19
|
<FSText>
|
|
20
|
-
{{ $tr('
|
|
20
|
+
{{ $tr('entity.alert.current-status', 'Status') }} : {{ AlertTools.statusLabel($props.deviceAlert?.status) }}
|
|
21
21
|
</FSText>
|
|
22
22
|
<FSText
|
|
23
23
|
font="text-button"
|
|
24
|
-
:color="criticityColor"
|
|
24
|
+
:color="AlertTools.criticityColor($props.deviceAlert?.criticity)"
|
|
25
25
|
>
|
|
26
26
|
{{ $props.deviceAlert.label }}
|
|
27
27
|
</FSText>
|
|
@@ -46,11 +46,9 @@
|
|
|
46
46
|
<script lang="ts">
|
|
47
47
|
import { computed, defineComponent, type PropType } from "vue";
|
|
48
48
|
|
|
49
|
-
import {
|
|
50
|
-
import { type FSDeviceAlert} from "@dative-gpi/foundation-shared-components/models";
|
|
51
|
-
import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/enums";
|
|
49
|
+
import { type FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
|
|
52
50
|
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
53
|
-
import {
|
|
51
|
+
import { AlertTools } from "@dative-gpi/foundation-shared-components/tools";
|
|
54
52
|
|
|
55
53
|
import FSButton from "../FSButton.vue";
|
|
56
54
|
import FSCard from "../FSCard.vue";
|
|
@@ -81,54 +79,17 @@ export default defineComponent({
|
|
|
81
79
|
emits: ["close"],
|
|
82
80
|
setup(props) {
|
|
83
81
|
const { epochToLongTimeFormat } = useDateFormat();
|
|
84
|
-
const { $tr } = useTranslationsProvider();
|
|
85
|
-
|
|
86
|
-
const criticityColor = computed(() => {
|
|
87
|
-
switch (props.deviceAlert?.criticity) {
|
|
88
|
-
case Criticity.Error: return ColorEnum.Error;
|
|
89
|
-
case Criticity.Warning: return ColorEnum.Warning;
|
|
90
|
-
default: return ColorEnum.Primary;
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
const statusIcon = computed(() => {
|
|
95
|
-
switch (props.deviceAlert?.status) {
|
|
96
|
-
case AlertStatus.Pending: return "mdi-timer-outline";
|
|
97
|
-
case AlertStatus.Untriggered: return "mdi-timer-off-outline";
|
|
98
|
-
case AlertStatus.Unresolved: return "mdi-alert-circle-outline";
|
|
99
|
-
case AlertStatus.Resolved: return "mdi-check-circle-outline";
|
|
100
|
-
case AlertStatus.Expired: return "mdi-clock-outline";
|
|
101
|
-
case AlertStatus.Triggered: return "mdi-alert-circle-outline";
|
|
102
|
-
case AlertStatus.Abandoned: return "mdi-cancel"
|
|
103
|
-
default: return "";
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
const statusLabel = computed(() => {
|
|
108
|
-
switch (props.deviceAlert?.status) {
|
|
109
|
-
case AlertStatus.Pending: return $tr("ui.alert-status.pending", "Pending");
|
|
110
|
-
case AlertStatus.Untriggered: return $tr("ui.alert-status.untriggered", "Untriggered");
|
|
111
|
-
case AlertStatus.Unresolved: return $tr("ui.alert-status.unresolved", "Unresolved");
|
|
112
|
-
case AlertStatus.Resolved: return $tr("ui.alert-status.resolved", "Resolved");
|
|
113
|
-
case AlertStatus.Expired: return $tr("ui.alert-status.expired", "Expired");
|
|
114
|
-
case AlertStatus.Triggered: return $tr("ui.alert-status.triggered", "Triggered");
|
|
115
|
-
case AlertStatus.Abandoned: return $tr("ui.alert-status.abandoned", "Abandoned");
|
|
116
|
-
default: return "";
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
82
|
|
|
120
83
|
const deviceTimestamp = computed((): string => {
|
|
121
84
|
if (props.deviceAlert.sourceTimestamp) {
|
|
122
|
-
return epochToLongTimeFormat(props.deviceAlert.
|
|
85
|
+
return epochToLongTimeFormat(props.deviceAlert.actualTimestamp);
|
|
123
86
|
}
|
|
124
87
|
return "";
|
|
125
88
|
});
|
|
126
89
|
|
|
127
90
|
return {
|
|
128
91
|
deviceTimestamp,
|
|
129
|
-
|
|
130
|
-
statusLabel,
|
|
131
|
-
statusIcon
|
|
92
|
+
AlertTools
|
|
132
93
|
};
|
|
133
94
|
}
|
|
134
95
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol
|
|
3
3
|
v-if="$props.loading"
|
|
4
|
+
:maxWidth="$props.maxWidth"
|
|
4
5
|
>
|
|
5
6
|
<FSLoader
|
|
6
7
|
v-if="!$props.hideHeader"
|
|
@@ -14,13 +15,14 @@
|
|
|
14
15
|
</FSCol>
|
|
15
16
|
<FSCol
|
|
16
17
|
v-else-if="isExtraSmall"
|
|
18
|
+
:maxWidth="$props.maxWidth"
|
|
17
19
|
>
|
|
18
20
|
<FSTextField
|
|
19
21
|
:validationValue="$props.modelValue"
|
|
20
22
|
:description="$props.description"
|
|
21
23
|
:hideHeader="$props.hideHeader"
|
|
22
24
|
:clearable="$props.clearable"
|
|
23
|
-
:
|
|
25
|
+
:disabled="$props.disabled"
|
|
24
26
|
:required="$props.required"
|
|
25
27
|
:label="$props.label"
|
|
26
28
|
:rules="$props.rules"
|
|
@@ -63,7 +65,7 @@
|
|
|
63
65
|
name="clear"
|
|
64
66
|
>
|
|
65
67
|
<FSButton
|
|
66
|
-
v-if="$props.clearable &&
|
|
68
|
+
v-if="$props.clearable && !$props.disabled && !!$props.modelValue"
|
|
67
69
|
icon="mdi-close"
|
|
68
70
|
variant="icon"
|
|
69
71
|
:color="ColorEnum.Dark"
|
|
@@ -78,7 +80,7 @@
|
|
|
78
80
|
<FSButton
|
|
79
81
|
icon="mdi-chevron-down"
|
|
80
82
|
variant="icon"
|
|
81
|
-
:
|
|
83
|
+
:disabled="$props.disabled"
|
|
82
84
|
:color="ColorEnum.Dark"
|
|
83
85
|
@click="openMobileOverlay"
|
|
84
86
|
/>
|
|
@@ -121,12 +123,14 @@
|
|
|
121
123
|
</FSCard>
|
|
122
124
|
</FSSlideGroup>
|
|
123
125
|
<FSDialogMenu
|
|
126
|
+
padding="16px"
|
|
124
127
|
v-model="dialog"
|
|
125
128
|
>
|
|
126
129
|
<template
|
|
127
130
|
#body
|
|
128
131
|
>
|
|
129
132
|
<FSSearchField
|
|
133
|
+
:clearable="$props.clearable"
|
|
130
134
|
:hideHeader="true"
|
|
131
135
|
v-model="search"
|
|
132
136
|
/>
|
|
@@ -138,69 +142,52 @@
|
|
|
138
142
|
>
|
|
139
143
|
<FSRow
|
|
140
144
|
v-for="(item, index) in searchItems"
|
|
145
|
+
align="center-left"
|
|
146
|
+
height="36px"
|
|
147
|
+
:wrap="false"
|
|
141
148
|
:key="index"
|
|
149
|
+
@click="$props.multiple ?
|
|
150
|
+
onCheckboxChange(item[$props.itemValue!]) :
|
|
151
|
+
onRadioChange(item[$props.itemValue!])
|
|
152
|
+
"
|
|
142
153
|
>
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
:
|
|
146
|
-
:editable="$props.editable"
|
|
147
|
-
:modelValue="$props.modelValue?.includes(item[$props.itemValue!])"
|
|
148
|
-
@update:modelValue="() => onCheckboxChange(item[$props.itemValue!])"
|
|
149
|
-
>
|
|
150
|
-
<template
|
|
151
|
-
#label="{ font }"
|
|
152
|
-
>
|
|
153
|
-
<FSRow
|
|
154
|
-
align="center-left"
|
|
155
|
-
:wrap="false"
|
|
156
|
-
>
|
|
157
|
-
<slot
|
|
158
|
-
name="item-prepend"
|
|
159
|
-
v-bind="{ item }"
|
|
160
|
-
/>
|
|
161
|
-
<FSSpan
|
|
162
|
-
:font="font"
|
|
163
|
-
>
|
|
164
|
-
{{ item[$props.itemTitle!] }}
|
|
165
|
-
</FSSpan>
|
|
166
|
-
</FSRow>
|
|
167
|
-
</template>
|
|
168
|
-
</FSCheckbox>
|
|
169
|
-
<FSRadio
|
|
170
|
-
v-else
|
|
171
|
-
:selected="$props.modelValue === item[$props.itemValue!]"
|
|
172
|
-
:label="item[$props.itemTitle!]"
|
|
173
|
-
:editable="$props.editable"
|
|
174
|
-
:item="item"
|
|
175
|
-
:modelValue="item[$props.itemValue!]"
|
|
176
|
-
@update:modelValue="() => onRadioChange(item[$props.itemValue!])"
|
|
154
|
+
<FSRow
|
|
155
|
+
style="min-width: 0;"
|
|
156
|
+
:wrap="false"
|
|
177
157
|
>
|
|
178
|
-
<
|
|
179
|
-
|
|
158
|
+
<slot
|
|
159
|
+
name="item-prepend"
|
|
160
|
+
v-bind="{ item }"
|
|
161
|
+
/>
|
|
162
|
+
<FSSpan
|
|
163
|
+
:font="selectedItems.includes(item) ? 'text-button' : 'text-body'"
|
|
180
164
|
>
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
>
|
|
185
|
-
<slot
|
|
186
|
-
name="item-prepend"
|
|
187
|
-
v-bind="{ item }"
|
|
188
|
-
/>
|
|
189
|
-
<FSSpan
|
|
190
|
-
:font="font"
|
|
191
|
-
>
|
|
192
|
-
{{ item[$props.itemTitle!] }}
|
|
193
|
-
</FSSpan>
|
|
194
|
-
</FSRow>
|
|
195
|
-
</template>
|
|
196
|
-
</FSRadio>
|
|
165
|
+
{{ item[$props.itemTitle!] }}
|
|
166
|
+
</FSSpan>
|
|
167
|
+
</FSRow>
|
|
197
168
|
<FSRow
|
|
198
169
|
align="center-right"
|
|
170
|
+
width="hug"
|
|
171
|
+
:wrap="false"
|
|
199
172
|
>
|
|
200
173
|
<slot
|
|
201
174
|
name="item-append"
|
|
202
175
|
v-bind="{ item }"
|
|
203
176
|
/>
|
|
177
|
+
<FSCheckbox
|
|
178
|
+
v-if="$props.multiple"
|
|
179
|
+
:disabled="$props.disabled"
|
|
180
|
+
:modelValue="$props.modelValue?.includes(item[$props.itemValue!])"
|
|
181
|
+
@update:modelValue="onCheckboxChange(item[$props.itemValue!])"
|
|
182
|
+
/>
|
|
183
|
+
<FSRadio
|
|
184
|
+
v-else
|
|
185
|
+
:selected="$props.modelValue === item[$props.itemValue!]"
|
|
186
|
+
:disabled="$props.disabled"
|
|
187
|
+
:item="item"
|
|
188
|
+
:modelValue="item[$props.itemValue!]"
|
|
189
|
+
@update:modelValue="onRadioChange(item[$props.itemValue!])"
|
|
190
|
+
/>
|
|
204
191
|
</FSRow>
|
|
205
192
|
</FSRow>
|
|
206
193
|
</FSCol>
|
|
@@ -211,7 +198,7 @@
|
|
|
211
198
|
>
|
|
212
199
|
<FSButton
|
|
213
200
|
variant="icon"
|
|
214
|
-
:label="$tr('
|
|
201
|
+
:label="$tr('autocomplete-field.add-item', 'Add new item')"
|
|
215
202
|
:color="ColorEnum.Primary"
|
|
216
203
|
@click="$emit('add:item', search)"
|
|
217
204
|
/>
|
|
@@ -221,7 +208,7 @@
|
|
|
221
208
|
padding="4px 3px"
|
|
222
209
|
>
|
|
223
210
|
<FSSpan>
|
|
224
|
-
{{ $tr("ui.
|
|
211
|
+
{{ $tr("ui.common.no-data", "No data") }}
|
|
225
212
|
</FSSpan>
|
|
226
213
|
</FSRow>
|
|
227
214
|
</template>
|
|
@@ -232,13 +219,14 @@
|
|
|
232
219
|
:description="$props.description"
|
|
233
220
|
:hideHeader="$props.hideHeader"
|
|
234
221
|
:required="$props.required"
|
|
235
|
-
:
|
|
222
|
+
:disabled="$props.disabled"
|
|
236
223
|
:label="$props.label"
|
|
237
224
|
:messages="messages"
|
|
225
|
+
:maxWidth="$props.maxWidth"
|
|
238
226
|
>
|
|
239
227
|
<FSToggleSet
|
|
240
228
|
v-if="$props.toggleSet"
|
|
241
|
-
:
|
|
229
|
+
:disabled="$props.disabled"
|
|
242
230
|
:multiple="$props.multiple"
|
|
243
231
|
:required="$props.required"
|
|
244
232
|
:values="$props.items"
|
|
@@ -263,10 +251,11 @@
|
|
|
263
251
|
<v-autocomplete
|
|
264
252
|
class="fs-autocomplete-field"
|
|
265
253
|
variant="outlined"
|
|
266
|
-
:clearable="$props.clearable &&
|
|
254
|
+
:clearable="$props.clearable && !$props.disabled && !!$props.modelValue"
|
|
267
255
|
:itemTitle="$props.itemTitle"
|
|
268
256
|
:itemValue="$props.itemValue"
|
|
269
|
-
:
|
|
257
|
+
:disabled="$props.disabled"
|
|
258
|
+
:readonly="$props.readonly"
|
|
270
259
|
:multiple="$props.multiple"
|
|
271
260
|
:validateOn="validateOn"
|
|
272
261
|
:autoSelectFirst="true"
|
|
@@ -381,7 +370,7 @@
|
|
|
381
370
|
name="clear"
|
|
382
371
|
>
|
|
383
372
|
<FSButton
|
|
384
|
-
v-if="$props.clearable &&
|
|
373
|
+
v-if="$props.clearable && !$props.disabled && !!$props.modelValue"
|
|
385
374
|
icon="mdi-close"
|
|
386
375
|
variant="icon"
|
|
387
376
|
:color="ColorEnum.Dark"
|
|
@@ -399,7 +388,7 @@
|
|
|
399
388
|
<FSButton
|
|
400
389
|
icon="mdi-chevron-down"
|
|
401
390
|
variant="icon"
|
|
402
|
-
:
|
|
391
|
+
:disabled="$props.disabled"
|
|
403
392
|
:color="ColorEnum.Dark"
|
|
404
393
|
/>
|
|
405
394
|
</slot>
|
|
@@ -413,7 +402,7 @@
|
|
|
413
402
|
>
|
|
414
403
|
<FSButton
|
|
415
404
|
variant="icon"
|
|
416
|
-
:label="$tr('
|
|
405
|
+
:label="$tr('autocomplete-field.add-item', 'Add new item')"
|
|
417
406
|
:color="ColorEnum.Primary"
|
|
418
407
|
@click="$emit('add:item', search)"
|
|
419
408
|
/>
|
|
@@ -578,10 +567,15 @@ export default defineComponent({
|
|
|
578
567
|
required: false,
|
|
579
568
|
default: true
|
|
580
569
|
},
|
|
581
|
-
|
|
570
|
+
disabled: {
|
|
582
571
|
type: Boolean,
|
|
583
572
|
required: false,
|
|
584
|
-
default:
|
|
573
|
+
default: false
|
|
574
|
+
},
|
|
575
|
+
readonly: {
|
|
576
|
+
type: Boolean,
|
|
577
|
+
required: false,
|
|
578
|
+
default: false
|
|
585
579
|
},
|
|
586
580
|
loading: {
|
|
587
581
|
type: Boolean,
|
|
@@ -597,11 +591,16 @@ export default defineComponent({
|
|
|
597
591
|
type: Boolean,
|
|
598
592
|
required: false,
|
|
599
593
|
default: false
|
|
594
|
+
},
|
|
595
|
+
maxWidth: {
|
|
596
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
597
|
+
required: false,
|
|
598
|
+
default: "600px"
|
|
600
599
|
}
|
|
601
600
|
},
|
|
602
601
|
emits: ["update:modelValue", "update:search", "add:item"],
|
|
603
602
|
setup: (props, { emit }) => {
|
|
604
|
-
const { isExtraSmall, isMobileSized } = useBreakpoints();
|
|
603
|
+
const { fontStyles, isExtraSmall, isMobileSized } = useBreakpoints();
|
|
605
604
|
const { validateOn, getMessages } = useRules();
|
|
606
605
|
const { getColors } = useColors();
|
|
607
606
|
const { slots } = useSlots();
|
|
@@ -619,23 +618,27 @@ export default defineComponent({
|
|
|
619
618
|
const showExtra = ref(true);
|
|
620
619
|
|
|
621
620
|
const style = computed((): StyleValue => {
|
|
622
|
-
if (
|
|
621
|
+
if (props.disabled) {
|
|
623
622
|
return {
|
|
624
|
-
"--fs-autocomplete-field-cursor":
|
|
625
|
-
"--fs-autocomplete-field-border-color":
|
|
626
|
-
"--fs-autocomplete-field-color":
|
|
627
|
-
"--fs-autocomplete-field-active-border-color": lights.base
|
|
623
|
+
"--fs-autocomplete-field-cursor" : "default",
|
|
624
|
+
"--fs-autocomplete-field-border-color" : lights.base,
|
|
625
|
+
"--fs-autocomplete-field-color" : lights.dark,
|
|
626
|
+
"--fs-autocomplete-field-active-border-color": lights.base,
|
|
627
|
+
"--fs-base-field-input-height" : isMobileSized.value ? "34px" : "38px",
|
|
628
|
+
...fontStyles.value
|
|
628
629
|
};
|
|
629
630
|
}
|
|
630
631
|
return {
|
|
631
|
-
"--fs-autocomplete-field-cursor":
|
|
632
|
-
"--fs-autocomplete-field-background-color":
|
|
632
|
+
"--fs-autocomplete-field-cursor" : "text",
|
|
633
|
+
"--fs-autocomplete-field-background-color" : backgrounds.base,
|
|
633
634
|
"--fs-autocomplete-field-no-data-background-color": lights.light,
|
|
634
|
-
"--fs-autocomplete-field-border-color":
|
|
635
|
-
"--fs-autocomplete-field-color":
|
|
636
|
-
"--fs-autocomplete-field-active-border-color":
|
|
637
|
-
"--fs-autocomplete-field-error-color":
|
|
638
|
-
"--fs-autocomplete-field-error-border-color":
|
|
635
|
+
"--fs-autocomplete-field-border-color" : lights.dark,
|
|
636
|
+
"--fs-autocomplete-field-color" : darks.base,
|
|
637
|
+
"--fs-autocomplete-field-active-border-color" : darks.dark,
|
|
638
|
+
"--fs-autocomplete-field-error-color" : errors.base,
|
|
639
|
+
"--fs-autocomplete-field-error-border-color" : errors.base,
|
|
640
|
+
"--fs-base-field-input-height" : isMobileSized.value ? "34px" : "38px",
|
|
641
|
+
...fontStyles.value
|
|
639
642
|
};
|
|
640
643
|
});
|
|
641
644
|
|
|
@@ -698,8 +701,8 @@ export default defineComponent({
|
|
|
698
701
|
});
|
|
699
702
|
|
|
700
703
|
const maxHeight = computed(() => {
|
|
701
|
-
const other = 8 + 8
|
|
702
|
-
+ (isMobileSized ? 36 : 40) + 8; // Header
|
|
704
|
+
const other = 8 + 8 // Paddings
|
|
705
|
+
+ (isMobileSized.value ? 36 : 40) + 8; // Header
|
|
703
706
|
return `calc(100vh - 40px - ${other}px)`;
|
|
704
707
|
});
|
|
705
708
|
|
|
@@ -714,7 +717,7 @@ export default defineComponent({
|
|
|
714
717
|
});
|
|
715
718
|
|
|
716
719
|
const openMobileOverlay = () => {
|
|
717
|
-
if (
|
|
720
|
+
if (props.disabled) {
|
|
718
721
|
return;
|
|
719
722
|
}
|
|
720
723
|
dialog.value = true;
|
|
@@ -62,7 +62,7 @@ export default defineComponent({
|
|
|
62
62
|
if (!props.modelValue || props.modelValue.length === 0) {
|
|
63
63
|
return null;
|
|
64
64
|
}
|
|
65
|
-
return props.placeholder ?? $tr("
|
|
65
|
+
return props.placeholder ?? $tr("autocomplete.tag.selecteds", "{0} item(s) selected", props.modelValue?.length ?? 0);
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
const onUpdateModelValue = (value: string[] | null): void => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol
|
|
3
|
+
:maxWidth="$props.maxWidth"
|
|
3
4
|
:style="style"
|
|
4
5
|
>
|
|
5
6
|
<slot
|
|
@@ -7,39 +8,43 @@
|
|
|
7
8
|
name="label"
|
|
8
9
|
>
|
|
9
10
|
<FSRow
|
|
11
|
+
gap="40px"
|
|
10
12
|
:wrap="false"
|
|
11
13
|
>
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
<FSRow
|
|
15
|
+
gap="2px"
|
|
16
|
+
:width="widths.label"
|
|
17
|
+
:wrap="false"
|
|
15
18
|
>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
<FSSpan
|
|
20
|
+
class="fs-base-field-label"
|
|
21
|
+
font="text-overline"
|
|
22
|
+
>
|
|
23
|
+
{{ $props.label }}
|
|
24
|
+
</FSSpan>
|
|
25
|
+
<FSSpan
|
|
26
|
+
v-if="$props.label && $props.required"
|
|
27
|
+
class="fs-base-field-label"
|
|
28
|
+
font="text-overline"
|
|
29
|
+
:ellipsis="false"
|
|
30
|
+
:style="style"
|
|
31
|
+
>
|
|
32
|
+
*
|
|
33
|
+
</FSSpan>
|
|
34
|
+
</FSRow>
|
|
35
|
+
<FSRow
|
|
36
|
+
align="center-right"
|
|
37
|
+
:width="widths.messages"
|
|
33
38
|
>
|
|
34
39
|
<FSSpan
|
|
35
|
-
v-if="$props.messages.length > 0"
|
|
40
|
+
v-if="$props.messages && $props.messages.length > 0"
|
|
36
41
|
class="fs-base-field-messages"
|
|
37
42
|
font="text-overline"
|
|
38
43
|
:style="style"
|
|
39
44
|
>
|
|
40
45
|
{{ $props.messages.join(", ") }}
|
|
41
46
|
</FSSpan>
|
|
42
|
-
</
|
|
47
|
+
</FSRow>
|
|
43
48
|
</FSRow>
|
|
44
49
|
</slot>
|
|
45
50
|
<slot />
|
|
@@ -50,6 +55,7 @@
|
|
|
50
55
|
v-if="$props.description"
|
|
51
56
|
class="fs-base-field-description"
|
|
52
57
|
font="text-overline"
|
|
58
|
+
:lineClamp="2"
|
|
53
59
|
>
|
|
54
60
|
{{ $props.description }}
|
|
55
61
|
</FSSpan>
|
|
@@ -100,15 +106,20 @@ export default defineComponent({
|
|
|
100
106
|
required: false,
|
|
101
107
|
default: () => []
|
|
102
108
|
},
|
|
103
|
-
|
|
109
|
+
disabled: {
|
|
104
110
|
type: Boolean,
|
|
105
111
|
required: false,
|
|
106
|
-
default:
|
|
112
|
+
default: false
|
|
107
113
|
},
|
|
108
114
|
minWidth: {
|
|
109
115
|
type: String,
|
|
110
116
|
required: false,
|
|
111
117
|
default: "120px"
|
|
118
|
+
},
|
|
119
|
+
maxWidth: {
|
|
120
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
121
|
+
required: false,
|
|
122
|
+
default: "600px"
|
|
112
123
|
}
|
|
113
124
|
},
|
|
114
125
|
setup(props) {
|
|
@@ -123,7 +134,7 @@ export default defineComponent({
|
|
|
123
134
|
const darks = getColors(ColorEnum.Dark);
|
|
124
135
|
|
|
125
136
|
const style = computed((): StyleValue => {
|
|
126
|
-
if (
|
|
137
|
+
if (props.disabled) {
|
|
127
138
|
return {
|
|
128
139
|
"--fs-base-field-color" : lights.dark,
|
|
129
140
|
"--fs-base-field-min-width": props.minWidth
|
|
@@ -136,7 +147,13 @@ export default defineComponent({
|
|
|
136
147
|
};
|
|
137
148
|
});
|
|
138
149
|
|
|
150
|
+
const widths = computed(() => ({
|
|
151
|
+
label: props.messages && props.messages.length ? "calc(50% - 40px)" : "100%",
|
|
152
|
+
messages: props.messages && props.messages.length ? "50%" : "0"
|
|
153
|
+
}));
|
|
154
|
+
|
|
139
155
|
return {
|
|
156
|
+
widths,
|
|
140
157
|
style,
|
|
141
158
|
slots
|
|
142
159
|
};
|