@dative-gpi/foundation-shared-components 1.0.36 → 1.0.37-report-v1
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/FSBreadcrumbs.vue +21 -12
- package/components/FSButton.vue +10 -10
- package/components/FSCalendar.vue +52 -14
- package/components/FSCalendarTwin.vue +96 -40
- package/components/FSCard.vue +28 -7
- package/components/FSCardPlaceholder.vue +8 -5
- package/components/FSChip.vue +12 -2
- package/components/FSClickable.vue +12 -13
- package/components/FSClock.vue +16 -7
- package/components/FSColorIcon.vue +23 -5
- package/components/FSDialog.vue +2 -1
- package/components/FSDialogContent.vue +12 -11
- package/components/FSDialogForm.vue +22 -2
- package/components/FSDialogFormBody.vue +47 -28
- package/components/FSDialogMenu.vue +17 -8
- package/components/FSDialogMultiFormBody.vue +77 -54
- package/components/FSDialogRemove.vue +8 -8
- package/components/FSDialogSubmit.vue +17 -8
- package/components/FSEditImage.vue +1 -1
- package/components/FSEditImageUI.vue +20 -10
- package/components/FSFadeOut.vue +53 -21
- package/components/FSForm.vue +10 -8
- package/components/FSGrid.vue +1 -1
- package/components/FSIcon.vue +2 -1
- package/components/FSIconCard.vue +47 -7
- package/components/FSImage.vue +12 -4
- package/components/FSImageUI.vue +8 -15
- package/components/FSInstantPicker.vue +266 -0
- package/components/FSLink.vue +25 -9
- package/components/FSLoader.vue +28 -11
- package/components/FSOptionGroup.vue +51 -3
- package/components/FSPlayButtons.vue +72 -0
- package/components/FSProgressBar.vue +94 -0
- package/components/FSRouterLink.vue +42 -0
- package/components/FSSlideGroup.vue +19 -5
- package/components/FSSpan.vue +17 -7
- package/components/FSSwitch.vue +57 -27
- package/components/FSTab.vue +15 -13
- package/components/FSTabs.vue +32 -7
- package/components/FSTag.vue +14 -3
- package/components/FSTagGroup.vue +1 -1
- package/components/FSText.vue +11 -7
- package/components/FSWindow.vue +128 -4
- package/components/FSWrapGroup.vue +13 -1
- package/components/agenda/FSAgenda.vue +223 -0
- package/components/agenda/FSAgendaDialogCalendar.vue +76 -0
- package/components/agenda/FSAgendaHeader.vue +215 -0
- package/components/agenda/FSAgendaHorizontalEvent.vue +174 -0
- package/components/agenda/FSAgendaHorizontalTimeLineMarker.vue +46 -0
- package/components/agenda/FSAgendaHoursCol.vue +103 -0
- package/components/agenda/FSAgendaHoursRow.vue +164 -0
- package/components/agenda/FSAgendaVerticalEvent.vue +160 -0
- package/components/agenda/FSAgendaVerticalTimeLineMarker.vue +46 -0
- package/components/agenda/FSDayAgenda.vue +199 -0
- package/components/agenda/FSMonthAgenda.vue +252 -0
- package/components/agenda/FSSelectAgendaMode.vue +54 -0
- package/components/agenda/FSWeekAgenda.vue +323 -0
- package/components/autocompletes/FSAutoCompleteAddress.vue +22 -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/FSButtonCopy.vue +1 -1
- package/components/buttons/FSButtonCopyLabel.vue +1 -1
- package/components/buttons/FSButtonDragIcon.vue +27 -0
- 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 +11 -1
- package/components/deviceOrganisations/FSConnectivityCard.vue +19 -47
- package/components/deviceOrganisations/FSStatus.vue +11 -1
- package/components/deviceOrganisations/FSStatusCard.vue +35 -61
- package/components/deviceOrganisations/FSStatusesCarousel.vue +1 -0
- package/components/deviceOrganisations/FSStatusesRow.vue +9 -3
- package/components/deviceOrganisations/FSWorstAlert.vue +30 -37
- package/components/deviceOrganisations/FSWorstAlertCard.vue +36 -85
- package/components/fields/FSAutocompleteField.vue +445 -463
- package/components/fields/FSAutocompleteTag.vue +1 -1
- package/components/fields/FSBaseField.vue +44 -27
- package/components/fields/FSColorField.vue +42 -39
- package/components/fields/FSCommentField.vue +105 -0
- package/components/fields/FSDateField.vue +3 -2
- package/components/fields/FSDateRangeField.vue +3 -2
- package/components/fields/FSDateTimeField.vue +4 -3
- package/components/fields/FSDateTimeRangeField.vue +8 -6
- package/components/fields/FSEntityFieldUI.vue +271 -0
- package/components/fields/FSGradientField.vue +27 -33
- package/components/fields/FSIconField.vue +0 -1
- package/components/fields/FSMagicConfigField.vue +10 -3
- package/components/fields/FSMagicField.vue +9 -4
- package/components/fields/FSNumberField.vue +6 -1
- package/components/fields/FSRichTextField.vue +102 -52
- package/components/fields/FSSearchField.vue +9 -115
- package/components/fields/FSSelectField.vue +477 -252
- package/components/fields/FSTagField.vue +1 -1
- package/components/fields/FSTermField.vue +42 -17
- package/components/fields/FSTextArea.vue +26 -7
- package/components/fields/FSTextField.vue +8 -3
- package/components/fields/FSTimeRangeField.vue +304 -0
- package/components/fields/FSTimeStepField.vue +3 -3
- package/components/fields/FSTranslateField.vue +4 -3
- package/components/fields/FSTranslateRichTextField.vue +32 -12
- package/components/fields/FSTranslateTextArea.vue +233 -0
- package/components/fields/periodicField/FSPeriodicDailyField.vue +2 -2
- package/components/fields/periodicField/FSPeriodicField.vue +8 -8
- package/components/fields/periodicField/FSPeriodicMonthlyField.vue +8 -8
- package/components/fields/periodicField/FSPeriodicWeeklyField.vue +23 -13
- package/components/fields/periodicField/FSPeriodicYearlyField.vue +6 -6
- package/components/lists/FSDataTableUI.vue +173 -103
- package/components/lists/FSDraggable.vue +2 -2
- package/components/lists/FSFilterButton.vue +7 -11
- package/components/lists/FSHeaderButton.vue +4 -4
- package/components/lists/FSHiddenButton.vue +3 -5
- package/components/lists/FSLoadDataTable.vue +10 -7
- package/components/lists/FSSimpleList.vue +234 -0
- package/components/lists/FSSimpleListItem.vue +132 -0
- package/components/map/FSMap.vue +83 -33
- package/components/map/FSMapFeatureGroup.vue +2 -2
- package/components/map/FSMapLayerButton.vue +3 -3
- package/components/map/FSMapMarker.vue +11 -7
- package/components/map/FSMapMarkerClusterGroup.vue +8 -3
- package/components/map/FSMapOverlay.vue +37 -20
- package/components/map/FSMapPolygon.vue +5 -5
- package/components/map/FSMapTileLayer.vue +2 -2
- package/components/map/keys.ts +3 -3
- package/components/selects/FSSelectAutoRefresh.vue +9 -9
- package/components/selects/FSSelectDashboardVariableType.vue +5 -4
- package/components/selects/FSSelectDateSetting.vue +3 -2
- package/components/selects/FSSelectDays.vue +9 -9
- package/components/selects/FSSelectListMode.vue +51 -0
- package/components/selects/FSSelectMonths.vue +14 -14
- 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 +111 -0
- package/components/tiles/FSCommentTileUI.vue +174 -0
- package/components/tiles/FSDeviceOrganisationTileUI.vue +6 -0
- package/components/tiles/FSGroupTileUI.vue +2 -2
- package/components/tiles/FSLoadTile.vue +2 -0
- package/components/tiles/FSLocationTileUI.vue +192 -0
- package/components/tiles/FSModelTileUI.vue +18 -0
- package/components/tiles/FSSimpleTileUI.vue +9 -4
- package/components/tiles/FSTile.vue +93 -74
- package/components/tiles/FSUserOrganisationTileUI.vue +1 -1
- package/components/toggleSets/FSToggleSetPosition.vue +2 -2
- package/components/views/FSBaseView.vue +64 -0
- package/components/views/FSEntityView.vue +12 -140
- 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 +209 -0
- package/components/views/mobile/FSBaseDefaultMobileView.vue +133 -0
- package/components/views/mobile/FSBaseEntityMobileView.vue +199 -0
- package/components/views/mobile/FSBaseMobileView.vue +53 -0
- package/composables/useBreakpoints.ts +39 -3
- package/composables/useColors.ts +3 -2
- package/composables/useMagicFieldProvider.ts +1 -0
- package/composables/useSlots.ts +2 -1
- 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 +8 -5
- package/models/tables.ts +5 -2
- package/models/variableNode.ts +8 -5
- package/package.json +5 -5
- package/styles/components/fs_agenda.scss +36 -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 +5 -0
- package/styles/components/fs_agenda_time_line_marker.scss +19 -0
- 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_chip.scss +8 -6
- package/styles/components/fs_clickable.scss +18 -23
- package/styles/components/fs_clock.scss +0 -10
- package/styles/components/fs_color_field.scss +1 -4
- package/styles/components/fs_data_iterator_item.scss +12 -10
- package/styles/components/fs_data_table.scss +6 -9
- package/styles/components/fs_dialog.scss +7 -17
- package/styles/components/fs_dialog_menu.scss +4 -2
- package/styles/components/fs_edit_image.scss +8 -0
- package/styles/components/fs_fade_out.scss +10 -2
- package/styles/components/fs_filter_button.scss +1 -6
- package/styles/components/fs_gradient_field.scss +11 -11
- 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 +11 -7
- package/styles/components/fs_meta_field.scss +3 -5
- package/styles/components/fs_option_group.scss +15 -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 -9
- package/styles/components/fs_select_date_settings.scss +3 -0
- package/styles/components/fs_select_field.scss +4 -13
- package/styles/components/fs_slide_group.scss +7 -0
- package/styles/components/fs_span.scss +13 -4
- package/styles/components/fs_switch.scss +1 -0
- package/styles/components/fs_tabs.scss +19 -33
- package/styles/components/fs_tag.scss +8 -22
- package/styles/components/fs_text_area.scss +13 -17
- package/styles/components/fs_tile.scss +21 -15
- package/styles/components/fs_window.scss +7 -0
- package/styles/components/fs_wrap_group.scss +7 -0
- package/styles/components/index.scss +6 -4
- package/styles/globals/index.scss +1 -5
- package/styles/globals/overrides.scss +28 -61
- package/styles/globals/scrollbars.scss +10 -0
- package/styles/globals/text_fonts.scss +18 -66
- package/tools/alertsTools.ts +69 -0
- package/tools/chartsTools.ts +427 -0
- package/tools/index.ts +4 -0
- package/tools/reportsTools.ts +38 -0
- package/tools/timeRangeTools.ts +125 -0
- package/utils/filter.ts +18 -0
- package/utils/index.ts +2 -0
- package/utils/leafletMarkers.ts +4 -4
- package/utils/operations.ts +69 -0
- package/utils/sort.ts +2 -2
- package/utils/statuses.ts +1 -1
- package/utils/time.ts +17 -17
- package/components/fields/FSTimeSlotField.vue +0 -250
- package/components/views/FSEntityHeader.vue +0 -350
- 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_icon_field.scss +0 -12
- 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
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
<FSRow
|
|
10
10
|
align="center-center"
|
|
11
11
|
>
|
|
12
|
-
<FSIcon
|
|
12
|
+
<FSIcon
|
|
13
13
|
:variant="$props.iconVariant"
|
|
14
|
-
:color="
|
|
15
|
-
:size="
|
|
14
|
+
:color="contrastedIconColor"
|
|
15
|
+
:size="actualIconSize"
|
|
16
16
|
>
|
|
17
17
|
{{ $props.icon }}
|
|
18
18
|
</FSIcon>
|
|
@@ -21,9 +21,12 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script lang="ts">
|
|
24
|
-
import { defineComponent, type PropType } from "vue";
|
|
24
|
+
import { defineComponent, type PropType, computed } from "vue";
|
|
25
25
|
|
|
26
|
-
import { type ColorBase
|
|
26
|
+
import { ColorEnum, type ColorBase } from "@dative-gpi/foundation-shared-components/models";
|
|
27
|
+
|
|
28
|
+
import { sizeToVar } from "../utils";
|
|
29
|
+
import { useColors } from "../composables";
|
|
27
30
|
|
|
28
31
|
import FSCard from "./FSCard.vue";
|
|
29
32
|
import FSIcon from "./FSIcon.vue";
|
|
@@ -58,7 +61,7 @@ export default defineComponent({
|
|
|
58
61
|
iconColor: {
|
|
59
62
|
type: String as PropType<ColorBase>,
|
|
60
63
|
required: false,
|
|
61
|
-
default: ColorEnum.
|
|
64
|
+
default: ColorEnum.Light
|
|
62
65
|
},
|
|
63
66
|
iconVariant: {
|
|
64
67
|
type: String as PropType<"base" | "baseContrast" | "soft" | "softContrast" | "light" | "lightContrast" | "dark" | "darkContrast">,
|
|
@@ -68,13 +71,50 @@ export default defineComponent({
|
|
|
68
71
|
iconSize: {
|
|
69
72
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
70
73
|
required: false,
|
|
71
|
-
default:
|
|
74
|
+
default: null
|
|
72
75
|
},
|
|
73
76
|
border: {
|
|
74
77
|
type: Boolean,
|
|
75
78
|
required: false,
|
|
76
79
|
default: true
|
|
77
80
|
}
|
|
81
|
+
},
|
|
82
|
+
setup(props){
|
|
83
|
+
const { getColors } = useColors();
|
|
84
|
+
|
|
85
|
+
const colors = computed(() => {
|
|
86
|
+
return Array.isArray(props.backgroundColor)
|
|
87
|
+
? getColors(props.backgroundColor[Math.floor(props.backgroundColor.length/2)])
|
|
88
|
+
: getColors(props.backgroundColor)
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const actualIconSize = computed(() => {
|
|
92
|
+
if (props.iconSize){
|
|
93
|
+
return props.iconSize;
|
|
94
|
+
}
|
|
95
|
+
else if (props.size) {
|
|
96
|
+
return `calc(${sizeToVar(props.size)} * 0.42)`;
|
|
97
|
+
}
|
|
98
|
+
return "42px";
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const contrastedIconColor = computed(() => {
|
|
102
|
+
switch (props.backgroundVariant) {
|
|
103
|
+
case "standard":
|
|
104
|
+
switch (props.iconColor) {
|
|
105
|
+
case ColorEnum.Dark :
|
|
106
|
+
case ColorEnum.Light:
|
|
107
|
+
default: return colors.value.lightContrast!
|
|
108
|
+
};
|
|
109
|
+
case "background": return colors.value.base
|
|
110
|
+
default: return colors.value.baseContrast!
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
return {
|
|
115
|
+
contrastedIconColor,
|
|
116
|
+
actualIconSize
|
|
117
|
+
};
|
|
78
118
|
}
|
|
79
119
|
});
|
|
80
120
|
</script>
|
package/components/FSImage.vue
CHANGED
|
@@ -10,9 +10,8 @@
|
|
|
10
10
|
<script lang="ts">
|
|
11
11
|
import { computed, defineComponent, type PropType } from "vue";
|
|
12
12
|
|
|
13
|
-
import { IMAGE_RAW_URL } from "@dative-gpi/foundation-shared-services/config/urls";
|
|
14
|
-
|
|
15
|
-
import { useImage } from "@dative-gpi/foundation-shared-services/composables";
|
|
13
|
+
import { IMAGE_THUMBNAIL_URL, IMAGE_RAW_URL } from "@dative-gpi/foundation-shared-services/config/urls";
|
|
14
|
+
import { useAppAuthToken, useImage } from "@dative-gpi/foundation-shared-services/composables";
|
|
16
15
|
|
|
17
16
|
import FSImageUI from "./FSImageUI.vue";
|
|
18
17
|
|
|
@@ -26,13 +25,22 @@ export default defineComponent({
|
|
|
26
25
|
type: String as PropType<string | null>,
|
|
27
26
|
required: false,
|
|
28
27
|
default: null
|
|
28
|
+
},
|
|
29
|
+
thumbnail: {
|
|
30
|
+
type: Boolean as PropType<boolean>,
|
|
31
|
+
required: false,
|
|
32
|
+
default: false
|
|
29
33
|
}
|
|
30
34
|
},
|
|
31
35
|
setup(props) {
|
|
32
36
|
const { get: getImage, entity: image } = useImage();
|
|
37
|
+
const { authToken } = useAppAuthToken();
|
|
33
38
|
|
|
34
39
|
const source = computed(() => {
|
|
35
|
-
|
|
40
|
+
if (props.thumbnail) {
|
|
41
|
+
return props.imageId ? IMAGE_THUMBNAIL_URL(props.imageId, authToken.value) : null;
|
|
42
|
+
}
|
|
43
|
+
return props.imageId ? IMAGE_RAW_URL(props.imageId, authToken.value) : null;
|
|
36
44
|
});
|
|
37
45
|
|
|
38
46
|
const onError = (): void => {
|
package/components/FSImageUI.vue
CHANGED
|
@@ -42,9 +42,8 @@
|
|
|
42
42
|
import { computed, defineComponent, type PropType, ref, type StyleValue, watch } from "vue";
|
|
43
43
|
import { decode, isBlurhashValid } from "blurhash";
|
|
44
44
|
|
|
45
|
-
import type { ImageDetails } from "@dative-gpi/foundation-shared-domain/models";
|
|
46
|
-
|
|
47
45
|
import { sizeToVar, varToSize } from "@dative-gpi/foundation-shared-components/utils";
|
|
46
|
+
import { type ImageDetails } from "@dative-gpi/foundation-shared-domain/models";
|
|
48
47
|
|
|
49
48
|
import FSLoader from "./FSLoader.vue";
|
|
50
49
|
|
|
@@ -64,6 +63,11 @@ export default defineComponent({
|
|
|
64
63
|
required: false,
|
|
65
64
|
default: null
|
|
66
65
|
},
|
|
66
|
+
aspectRatio: {
|
|
67
|
+
type: Number as PropType<number | null>,
|
|
68
|
+
required: false,
|
|
69
|
+
default: 1
|
|
70
|
+
},
|
|
67
71
|
imageB64: {
|
|
68
72
|
type: String as PropType<string | null>,
|
|
69
73
|
required: false,
|
|
@@ -79,11 +83,6 @@ export default defineComponent({
|
|
|
79
83
|
required: false,
|
|
80
84
|
default: null
|
|
81
85
|
},
|
|
82
|
-
aspectRatio: {
|
|
83
|
-
type: String as PropType<string | null>,
|
|
84
|
-
required: false,
|
|
85
|
-
default: null
|
|
86
|
-
},
|
|
87
86
|
borderRadius: {
|
|
88
87
|
type: [String, Number],
|
|
89
88
|
required: false,
|
|
@@ -127,10 +126,7 @@ export default defineComponent({
|
|
|
127
126
|
return undefined;
|
|
128
127
|
}
|
|
129
128
|
if (props.aspectRatio) {
|
|
130
|
-
|
|
131
|
-
if (split.length === 2 && !isNaN(parseFloat(split[0])) && !isNaN(parseFloat(split[1]))) {
|
|
132
|
-
return sizeToVar(varToSize(props.width) * (parseFloat(split[1]) / parseFloat(split[0])));
|
|
133
|
-
}
|
|
129
|
+
return sizeToVar(varToSize(props.width) / props.aspectRatio);
|
|
134
130
|
}
|
|
135
131
|
return sizeToVar(props.width);
|
|
136
132
|
}
|
|
@@ -146,10 +142,7 @@ export default defineComponent({
|
|
|
146
142
|
return undefined;
|
|
147
143
|
}
|
|
148
144
|
if (props.aspectRatio) {
|
|
149
|
-
|
|
150
|
-
if (split.length === 2 && !isNaN(parseFloat(split[0])) && !isNaN(parseFloat(split[1]))) {
|
|
151
|
-
return sizeToVar(varToSize(props.height) * (parseFloat(split[0]) / parseFloat(split[1])));
|
|
152
|
-
}
|
|
145
|
+
return sizeToVar(varToSize(props.height) * props.aspectRatio);
|
|
153
146
|
}
|
|
154
147
|
return sizeToVar(props.height);
|
|
155
148
|
}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSBaseField
|
|
3
|
+
:description="$props.description"
|
|
4
|
+
:hideHeader="$props.hideHeader"
|
|
5
|
+
:required="$props.required"
|
|
6
|
+
:editable="$props.editable"
|
|
7
|
+
:label="$props.label"
|
|
8
|
+
>
|
|
9
|
+
<FSRow
|
|
10
|
+
align="bottom-center"
|
|
11
|
+
gap="32px"
|
|
12
|
+
>
|
|
13
|
+
<FSTermField
|
|
14
|
+
width="430px"
|
|
15
|
+
:label="$tr('ui.instant-picker.analyze-period', 'Analyze Period')"
|
|
16
|
+
:startDate="$props.startDate"
|
|
17
|
+
:endDate="$props.endDate"
|
|
18
|
+
@update:startDate="$emit('update:startDate', $event)"
|
|
19
|
+
@update:endDate="$emit('update:endDate', $event)"
|
|
20
|
+
/>
|
|
21
|
+
<FSRow
|
|
22
|
+
padding="0 0 2px 0"
|
|
23
|
+
align="center-center"
|
|
24
|
+
>
|
|
25
|
+
<FSCol
|
|
26
|
+
width="fill"
|
|
27
|
+
>
|
|
28
|
+
<FSSlider
|
|
29
|
+
minWidth='min(300px, 90vw)'
|
|
30
|
+
:color="ColorEnum.Light"
|
|
31
|
+
:thumbColor="ColorEnum.Primary"
|
|
32
|
+
:thumbSize="18"
|
|
33
|
+
:trackSize="8"
|
|
34
|
+
thumb-label="always"
|
|
35
|
+
:step="$props.stepTime"
|
|
36
|
+
:min="startTimestamp"
|
|
37
|
+
:max="endTimestamp"
|
|
38
|
+
:ticks="ticks"
|
|
39
|
+
showTicks="always"
|
|
40
|
+
:modelValue="$props.modelValue"
|
|
41
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
42
|
+
>
|
|
43
|
+
<template
|
|
44
|
+
#thumb-label="{ modelValue }"
|
|
45
|
+
>
|
|
46
|
+
<FSSpan
|
|
47
|
+
font="text-overline"
|
|
48
|
+
>
|
|
49
|
+
{{ epochToMonthShortTimeFormat(modelValue) }}
|
|
50
|
+
</FSSpan>
|
|
51
|
+
</template>
|
|
52
|
+
<template
|
|
53
|
+
#tick-label="{ tick, index }"
|
|
54
|
+
>
|
|
55
|
+
<FSRow
|
|
56
|
+
v-if="index % Math.trunc(ticks.length / maximumTickToShow) === 0 || ticks.length < maximumTickToShow"
|
|
57
|
+
>
|
|
58
|
+
<FSText
|
|
59
|
+
:color="lightColors.dark"
|
|
60
|
+
font="text-overline"
|
|
61
|
+
>
|
|
62
|
+
{{ intervalTime <= 3600000
|
|
63
|
+
?
|
|
64
|
+
epochToShortTimeOnlyFormat(tick.value)
|
|
65
|
+
:
|
|
66
|
+
epochToDayMonthShortOnly(tick.value)
|
|
67
|
+
}}
|
|
68
|
+
</FSText>
|
|
69
|
+
</FSRow>
|
|
70
|
+
</template>
|
|
71
|
+
</FSSlider>
|
|
72
|
+
</FSCol>
|
|
73
|
+
<FSPlayButtons
|
|
74
|
+
v-if="$props.playable"
|
|
75
|
+
:modelValue="playing"
|
|
76
|
+
@click:backward="onClickBackward"
|
|
77
|
+
@click:forward="onClickForward"
|
|
78
|
+
@update:modelValue="onPlayingChange"
|
|
79
|
+
/>
|
|
80
|
+
</FSRow>
|
|
81
|
+
</FSRow>
|
|
82
|
+
</FSBaseField>
|
|
83
|
+
</template>
|
|
84
|
+
|
|
85
|
+
<script lang="ts">
|
|
86
|
+
import { computed, defineComponent, ref, watch } from "vue";
|
|
87
|
+
|
|
88
|
+
import { useDateFormat, useTermFieldDate } from "@dative-gpi/foundation-shared-services/composables";
|
|
89
|
+
|
|
90
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
91
|
+
import { useBreakpoints, useColors } from '@dative-gpi/foundation-shared-components/composables';
|
|
92
|
+
|
|
93
|
+
import FSCol from '@dative-gpi/foundation-shared-components/components/FSCol.vue';
|
|
94
|
+
import FSSpan from '@dative-gpi/foundation-shared-components/components/FSSpan.vue';
|
|
95
|
+
import FSText from '@dative-gpi/foundation-shared-components/components/FSText.vue';
|
|
96
|
+
import FSSlider from '@dative-gpi/foundation-shared-components/components/FSSlider.vue';
|
|
97
|
+
import FSBaseField from '@dative-gpi/foundation-shared-components/components/fields/FSBaseField.vue';
|
|
98
|
+
import FSTermField from '@dative-gpi/foundation-shared-components/components/fields/FSTermField.vue';
|
|
99
|
+
import FSPlayButtons from '@dative-gpi/foundation-shared-components/components/FSPlayButtons.vue';
|
|
100
|
+
|
|
101
|
+
export default defineComponent({
|
|
102
|
+
name: "FSInstantPicker",
|
|
103
|
+
components: {
|
|
104
|
+
FSCol,
|
|
105
|
+
FSSpan,
|
|
106
|
+
FSText,
|
|
107
|
+
FSSlider,
|
|
108
|
+
FSTermField,
|
|
109
|
+
FSBaseField,
|
|
110
|
+
FSPlayButtons
|
|
111
|
+
},
|
|
112
|
+
props: {
|
|
113
|
+
label: {
|
|
114
|
+
type: String,
|
|
115
|
+
required: false,
|
|
116
|
+
},
|
|
117
|
+
modelValue: {
|
|
118
|
+
type: Number,
|
|
119
|
+
required: false,
|
|
120
|
+
default: 0,
|
|
121
|
+
},
|
|
122
|
+
startDate: {
|
|
123
|
+
type: String,
|
|
124
|
+
required: true
|
|
125
|
+
},
|
|
126
|
+
endDate: {
|
|
127
|
+
type: String,
|
|
128
|
+
required: true
|
|
129
|
+
},
|
|
130
|
+
description: {
|
|
131
|
+
type: String,
|
|
132
|
+
required: false,
|
|
133
|
+
default: null
|
|
134
|
+
},
|
|
135
|
+
hideHeader: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
required: false,
|
|
138
|
+
default: false
|
|
139
|
+
},
|
|
140
|
+
required: {
|
|
141
|
+
type: Boolean,
|
|
142
|
+
required: false,
|
|
143
|
+
default: false
|
|
144
|
+
},
|
|
145
|
+
editable: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
required: false,
|
|
148
|
+
default: true
|
|
149
|
+
},
|
|
150
|
+
playable: {
|
|
151
|
+
type: Boolean,
|
|
152
|
+
required: false,
|
|
153
|
+
default: true
|
|
154
|
+
},
|
|
155
|
+
stepTime: {
|
|
156
|
+
type: Number,
|
|
157
|
+
required: false,
|
|
158
|
+
default: 60000
|
|
159
|
+
},
|
|
160
|
+
playingStepDuration: {
|
|
161
|
+
type: Number,
|
|
162
|
+
required: false,
|
|
163
|
+
default: 50
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
emits: ['update:modelValue', 'update:startDate', 'update:endDate'],
|
|
167
|
+
setup(props, { emit }) {
|
|
168
|
+
const { epochToShortTimeOnlyFormat, epochToShortDateFormat, epochToDayMonthShortOnly, epochToISO, epochToMonthShortTimeFormat } = useDateFormat();
|
|
169
|
+
const { convert : convertTermToEpoch } = useTermFieldDate();
|
|
170
|
+
const { isMobileSized, isExtraSmall } = useBreakpoints();
|
|
171
|
+
const { getColors } = useColors();
|
|
172
|
+
|
|
173
|
+
const lightColors = getColors(ColorEnum.Light);
|
|
174
|
+
const playing = ref(false);
|
|
175
|
+
const playingInterval = ref();
|
|
176
|
+
|
|
177
|
+
const startTimestamp = computed(() => convertTermToEpoch(props.startDate));
|
|
178
|
+
const endTimestamp = computed(() => convertTermToEpoch(props.endDate));
|
|
179
|
+
|
|
180
|
+
const intervalTime = computed(() => {
|
|
181
|
+
const possibleIntervals = [60000, 3600000, 86400000];
|
|
182
|
+
|
|
183
|
+
const interval = possibleIntervals.find(interval => {
|
|
184
|
+
return (endTimestamp.value - startTimestamp.value) / interval < 100;
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
if (interval) {
|
|
188
|
+
return interval;
|
|
189
|
+
}
|
|
190
|
+
return 86400000;
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
const ticks = computed(() => {
|
|
194
|
+
const ticks: number[] = [];
|
|
195
|
+
|
|
196
|
+
const firstTick = Math.ceil(startTimestamp.value / intervalTime.value) * intervalTime.value;
|
|
197
|
+
for (let i = firstTick; i <= endTimestamp.value; i += intervalTime.value) {
|
|
198
|
+
ticks.push(i);
|
|
199
|
+
}
|
|
200
|
+
return ticks;
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
const maximumTickToShow = computed(() => {
|
|
204
|
+
if (isMobileSized.value) {
|
|
205
|
+
return 5;
|
|
206
|
+
}
|
|
207
|
+
if (isExtraSmall.value) {
|
|
208
|
+
return 4;
|
|
209
|
+
}
|
|
210
|
+
return 6;
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
const onPlayingChange = (value: boolean) => {
|
|
214
|
+
playing.value = value;
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
const onClickBackward = () => {
|
|
218
|
+
emit('update:modelValue', startTimestamp.value);
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
const onClickForward = () => {
|
|
222
|
+
emit('update:modelValue', endTimestamp.value);
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
watch(() => [props.startDate, props.endDate], () => {
|
|
226
|
+
if(props.modelValue < startTimestamp.value || props.modelValue > endTimestamp.value) {
|
|
227
|
+
emit('update:modelValue', endTimestamp.value);
|
|
228
|
+
}
|
|
229
|
+
}, { immediate: true });
|
|
230
|
+
|
|
231
|
+
watch(playing, (value) => {
|
|
232
|
+
if(!value && playingInterval.value) {
|
|
233
|
+
clearInterval(playingInterval.value);
|
|
234
|
+
} else {
|
|
235
|
+
playingInterval.value = setInterval(() => {
|
|
236
|
+
if(props.modelValue + props.stepTime <= endTimestamp.value) {
|
|
237
|
+
emit('update:modelValue', props.modelValue + props.stepTime);
|
|
238
|
+
} else {
|
|
239
|
+
emit('update:modelValue', endTimestamp.value);
|
|
240
|
+
playing.value = false;
|
|
241
|
+
}
|
|
242
|
+
}, props.playingStepDuration);
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
return {
|
|
247
|
+
ticks,
|
|
248
|
+
playing,
|
|
249
|
+
ColorEnum,
|
|
250
|
+
lightColors,
|
|
251
|
+
intervalTime,
|
|
252
|
+
endTimestamp,
|
|
253
|
+
startTimestamp,
|
|
254
|
+
maximumTickToShow,
|
|
255
|
+
epochToISO,
|
|
256
|
+
onPlayingChange,
|
|
257
|
+
onClickForward,
|
|
258
|
+
onClickBackward,
|
|
259
|
+
epochToShortDateFormat,
|
|
260
|
+
epochToShortTimeOnlyFormat,
|
|
261
|
+
epochToDayMonthShortOnly,
|
|
262
|
+
epochToMonthShortTimeFormat
|
|
263
|
+
};
|
|
264
|
+
},
|
|
265
|
+
});
|
|
266
|
+
</script>
|
package/components/FSLink.vue
CHANGED
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
<a
|
|
3
3
|
v-if="$props.href"
|
|
4
4
|
:href="$props.href"
|
|
5
|
+
:class="classes"
|
|
5
6
|
:style="style"
|
|
6
7
|
>
|
|
7
8
|
<slot>
|
|
8
|
-
|
|
9
|
+
<FSSpan>
|
|
10
|
+
{{ $props.label }}
|
|
11
|
+
</FSSpan>
|
|
9
12
|
</slot>
|
|
10
13
|
</a>
|
|
11
|
-
<
|
|
14
|
+
<FSRouterLink
|
|
12
15
|
v-else-if="$props.to"
|
|
13
16
|
:to="$props.to"
|
|
14
17
|
:class="classes"
|
|
@@ -19,20 +22,29 @@
|
|
|
19
22
|
<slot
|
|
20
23
|
v-bind="props"
|
|
21
24
|
>
|
|
22
|
-
|
|
25
|
+
<FSSpan>
|
|
26
|
+
{{ $props.label }}
|
|
27
|
+
</FSSpan>
|
|
23
28
|
</slot>
|
|
24
|
-
</
|
|
29
|
+
</FSRouterLink>
|
|
25
30
|
</template>
|
|
26
31
|
|
|
27
32
|
<script lang="ts">
|
|
28
33
|
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
29
34
|
import { type RouteLocation } from "vue-router";
|
|
30
35
|
|
|
36
|
+
import { useBreakpoints, useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
31
37
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
32
|
-
|
|
38
|
+
|
|
39
|
+
import FSRouterLink from "./FSRouterLink.vue";
|
|
40
|
+
import FSSpan from "./FSSpan.vue";
|
|
33
41
|
|
|
34
42
|
export default defineComponent({
|
|
35
43
|
name: "FSLink",
|
|
44
|
+
components: {
|
|
45
|
+
FSRouterLink,
|
|
46
|
+
FSSpan
|
|
47
|
+
},
|
|
36
48
|
props: {
|
|
37
49
|
label: {
|
|
38
50
|
type: String as PropType<string | null>,
|
|
@@ -40,7 +52,7 @@ export default defineComponent({
|
|
|
40
52
|
default: null
|
|
41
53
|
},
|
|
42
54
|
to: {
|
|
43
|
-
type:
|
|
55
|
+
type: Object as PropType<RouteLocation | null>,
|
|
44
56
|
required: false,
|
|
45
57
|
default: null
|
|
46
58
|
},
|
|
@@ -76,6 +88,7 @@ export default defineComponent({
|
|
|
76
88
|
}
|
|
77
89
|
},
|
|
78
90
|
setup(props) {
|
|
91
|
+
const { fontStyles } = useBreakpoints();
|
|
79
92
|
const { getColors } = useColors();
|
|
80
93
|
const { slots } = useSlots();
|
|
81
94
|
|
|
@@ -85,15 +98,18 @@ export default defineComponent({
|
|
|
85
98
|
switch (props.variant) {
|
|
86
99
|
case "base": return {
|
|
87
100
|
"--fs-span-line-clamp": props.lineClamp.toString(),
|
|
88
|
-
"--fs-link-color" : colors.value.base
|
|
101
|
+
"--fs-link-color" : colors.value.base,
|
|
102
|
+
...fontStyles.value
|
|
89
103
|
};
|
|
90
104
|
case "light": return {
|
|
91
105
|
"--fs-span-line-clamp": props.lineClamp.toString(),
|
|
92
|
-
"--fs-link-color" : colors.value.light
|
|
106
|
+
"--fs-link-color" : colors.value.light,
|
|
107
|
+
...fontStyles.value
|
|
93
108
|
};
|
|
94
109
|
case "dark": return {
|
|
95
110
|
"--fs-span-line-clamp": props.lineClamp.toString(),
|
|
96
|
-
"--fs-link-color" : colors.value.dark
|
|
111
|
+
"--fs-link-color" : colors.value.dark,
|
|
112
|
+
...fontStyles.value
|
|
97
113
|
};
|
|
98
114
|
}
|
|
99
115
|
});
|
package/components/FSLoader.vue
CHANGED
|
@@ -32,7 +32,7 @@ export default defineComponent({
|
|
|
32
32
|
default: "0"
|
|
33
33
|
},
|
|
34
34
|
variant: {
|
|
35
|
-
type: String as PropType<"standard" | "button" | "input" | "field" | "chip" | "text-h1" | "text-h2" | "text-h3" | "text-
|
|
35
|
+
type: String as PropType<"standard" | "button" | "input" | "field" | "chip" | "text-h1" | "text-h2" | "text-h3" | "text-body" | "text-button" | "text-overline">,
|
|
36
36
|
required: false,
|
|
37
37
|
default: "standard"
|
|
38
38
|
},
|
|
@@ -51,7 +51,7 @@ export default defineComponent({
|
|
|
51
51
|
const style = computed((): StyleValue => ({
|
|
52
52
|
"--fs-loader-background-color": backgrounds.base,
|
|
53
53
|
"--fs-loader-border-radius" : ["chip"].includes(props.variant) ? "50px" : sizeToVar(props.borderRadius),
|
|
54
|
-
"--fs-loader-padding" : sizeToVar(
|
|
54
|
+
"--fs-loader-padding" : sizeToVar(getPadding.value),
|
|
55
55
|
"--fs-loader-height" : sizeToVar(getHeight.value),
|
|
56
56
|
"--fs-loader-width" : sizeToVar(getWidth.value)
|
|
57
57
|
}));
|
|
@@ -63,22 +63,24 @@ export default defineComponent({
|
|
|
63
63
|
case "input" :
|
|
64
64
|
case "field" : return isMobileSized.value ? "36px" : "40px";
|
|
65
65
|
case "chip" : return isMobileSized.value ? "20px" : "24px";
|
|
66
|
-
|
|
67
|
-
case "text-
|
|
68
|
-
case "text-
|
|
69
|
-
case "text-
|
|
66
|
+
|
|
67
|
+
case "text-h1" : return isMobileSized.value ? "28px" : "36px";
|
|
68
|
+
case "text-h2" : return isMobileSized.value ? "22px" : "26px";
|
|
69
|
+
case "text-h3" : return isMobileSized.value ? "16px" : "20px";
|
|
70
70
|
case "text-body" :
|
|
71
|
-
case "text-button" : return isMobileSized.value ? "
|
|
72
|
-
case "text-overline" :
|
|
73
|
-
case "text-overline": return "16px";
|
|
71
|
+
case "text-button" : return isMobileSized.value ? "12px" : "14px";
|
|
72
|
+
case "text-overline" : return isMobileSized.value ? "10px" : "12px";
|
|
74
73
|
}
|
|
75
74
|
});
|
|
76
75
|
|
|
77
76
|
const getWidth = computed((): string | number => {
|
|
77
|
+
if (props.width != null) {
|
|
78
|
+
return sizeToVar(props.width);
|
|
79
|
+
}
|
|
78
80
|
switch (props.variant) {
|
|
79
81
|
case "standard": return sizeToVar(props.width);
|
|
80
|
-
case "button" : return isMobileSized ? "36px" : "40px";
|
|
81
|
-
case "input" : return isMobileSized ? "calc(50% - 124px)" : "calc(50% - 132px)";
|
|
82
|
+
case "button" : return isMobileSized.value ? "36px" : "40px";
|
|
83
|
+
case "input" : return isMobileSized.value ? "calc(50% - 124px)" : "calc(50% - 132px)";
|
|
82
84
|
case "field" : return "100%";
|
|
83
85
|
case "chip" : return "8vw";
|
|
84
86
|
case "text-h1" : return "calc(50% - 32px)";
|
|
@@ -88,6 +90,21 @@ export default defineComponent({
|
|
|
88
90
|
}
|
|
89
91
|
});
|
|
90
92
|
|
|
93
|
+
const getPadding = computed((): string | number => {
|
|
94
|
+
if (props.padding !== "0") {
|
|
95
|
+
return sizeToVar(props.padding);
|
|
96
|
+
}
|
|
97
|
+
switch (props.variant) {
|
|
98
|
+
case "text-h1" : return "2px 0";
|
|
99
|
+
case "text-h2" : return isMobileSized.value ? "1px 0" : "3px 0";
|
|
100
|
+
case "text-h3" : return "2px 0";
|
|
101
|
+
case "text-body" :
|
|
102
|
+
case "text-button" : return isMobileSized.value ? "2px 0" : "3px 0";;
|
|
103
|
+
case "text-overline" : return isMobileSized.value ? "3px 0" : "2px 0";
|
|
104
|
+
default : return sizeToVar(props.padding);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
91
108
|
return {
|
|
92
109
|
style
|
|
93
110
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSWrapGroup
|
|
3
|
-
v-if="
|
|
3
|
+
v-if="props.variant === 'wrap'"
|
|
4
4
|
class="fs-option-group"
|
|
5
5
|
:padding="props.padding"
|
|
6
6
|
:gap="props.gap"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
/>
|
|
47
47
|
</FSWrapGroup>
|
|
48
48
|
<FSSlideGroup
|
|
49
|
-
v-else
|
|
49
|
+
v-else-if="props.variant === 'slide'"
|
|
50
50
|
class="fs-option-group"
|
|
51
51
|
:padding="props.padding"
|
|
52
52
|
:gap="props.gap"
|
|
@@ -91,6 +91,54 @@
|
|
|
91
91
|
v-bind="{ toggle, getVariant, getColor, getClass }"
|
|
92
92
|
/>
|
|
93
93
|
</FSSlideGroup>
|
|
94
|
+
<FSRow
|
|
95
|
+
v-else
|
|
96
|
+
class="fs-option-group-full-width"
|
|
97
|
+
width="100%"
|
|
98
|
+
:padding="props.padding"
|
|
99
|
+
:gap="props.gap"
|
|
100
|
+
:style="style"
|
|
101
|
+
:wrap="false"
|
|
102
|
+
>
|
|
103
|
+
<template
|
|
104
|
+
v-if="props.values.length"
|
|
105
|
+
>
|
|
106
|
+
<template
|
|
107
|
+
v-if="!$slots.item"
|
|
108
|
+
>
|
|
109
|
+
<FSOptionItem
|
|
110
|
+
v-for="(item, index) in props.values"
|
|
111
|
+
:padding="props.optionPadding"
|
|
112
|
+
:editable="props.editable"
|
|
113
|
+
:prependIcon="item.prependIcon"
|
|
114
|
+
:appendIcon="item.appendIcon"
|
|
115
|
+
:variant="getVariant(item)"
|
|
116
|
+
:color="getColor(item)"
|
|
117
|
+
:class="getClass(item)"
|
|
118
|
+
:label="item.label"
|
|
119
|
+
:icon="item.icon"
|
|
120
|
+
:key="index"
|
|
121
|
+
@click="toggle(item)"
|
|
122
|
+
/>
|
|
123
|
+
</template>
|
|
124
|
+
<template
|
|
125
|
+
v-else
|
|
126
|
+
>
|
|
127
|
+
<template
|
|
128
|
+
v-for="item in props.values"
|
|
129
|
+
>
|
|
130
|
+
<slot
|
|
131
|
+
name="item"
|
|
132
|
+
v-bind="{ item, toggle, getVariant, getColor, getClass }"
|
|
133
|
+
/>
|
|
134
|
+
</template>
|
|
135
|
+
</template>
|
|
136
|
+
</template>
|
|
137
|
+
<slot
|
|
138
|
+
v-else
|
|
139
|
+
v-bind="{ toggle, getVariant, getColor, getClass }"
|
|
140
|
+
/>
|
|
141
|
+
</FSRow>
|
|
94
142
|
</template>
|
|
95
143
|
|
|
96
144
|
<script lang="ts">
|
|
@@ -128,7 +176,7 @@ export default defineComponent({
|
|
|
128
176
|
default: "4px"
|
|
129
177
|
},
|
|
130
178
|
variant: {
|
|
131
|
-
type: String as PropType<"wrap" | "slide">,
|
|
179
|
+
type: String as PropType<"wrap" | "slide" | "fullwidth">,
|
|
132
180
|
required: false,
|
|
133
181
|
default: "wrap"
|
|
134
182
|
},
|