@dative-gpi/foundation-shared-components 1.0.66 → 1.0.67-tree-view-02
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/FSTreeView.vue +107 -0
- 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/FSMapAddressField.vue +187 -0
- 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 +21 -19
- 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/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
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSBaseField
|
|
3
|
+
:label="$props.label"
|
|
4
|
+
:description="$props.description"
|
|
5
|
+
:required="$props.required"
|
|
6
|
+
:disabled="$props.disabled"
|
|
7
|
+
>
|
|
8
|
+
<FSRow>
|
|
9
|
+
<v-range-slider
|
|
10
|
+
hide-details
|
|
11
|
+
width="100%"
|
|
12
|
+
:disabled="$props.disabled"
|
|
13
|
+
:ripple="false"
|
|
14
|
+
:color="$props.color"
|
|
15
|
+
:trackSize="6"
|
|
16
|
+
:elevation="0"
|
|
17
|
+
:tickSize="4"
|
|
18
|
+
:modelValue="$props.modelValue ?? undefined"
|
|
19
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
20
|
+
v-bind="$attrs"
|
|
21
|
+
>
|
|
22
|
+
<template
|
|
23
|
+
v-for="(_, name) in $slots"
|
|
24
|
+
v-slot:[name]="slotData"
|
|
25
|
+
>
|
|
26
|
+
<slot
|
|
27
|
+
:name="name"
|
|
28
|
+
v-bind="slotData"
|
|
29
|
+
/>
|
|
30
|
+
</template>
|
|
31
|
+
</v-range-slider>
|
|
32
|
+
</FSRow>
|
|
33
|
+
</FSBaseField>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script lang="ts">
|
|
37
|
+
import { defineComponent, type PropType } from "vue";
|
|
38
|
+
|
|
39
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
40
|
+
|
|
41
|
+
import FSRow from '@dative-gpi/foundation-shared-components/components/FSRow.vue';
|
|
42
|
+
import FSBaseField from '@dative-gpi/foundation-shared-components/components/fields/FSBaseField.vue';
|
|
43
|
+
|
|
44
|
+
export default defineComponent({
|
|
45
|
+
name: "FSRangeSlider",
|
|
46
|
+
components: {
|
|
47
|
+
FSBaseField,
|
|
48
|
+
FSRow
|
|
49
|
+
},
|
|
50
|
+
props: {
|
|
51
|
+
label: {
|
|
52
|
+
type: String as PropType<string | null>,
|
|
53
|
+
required: false,
|
|
54
|
+
default: null
|
|
55
|
+
},
|
|
56
|
+
description: {
|
|
57
|
+
type: String as PropType<string | null>,
|
|
58
|
+
required: false,
|
|
59
|
+
default: null
|
|
60
|
+
},
|
|
61
|
+
modelValue: {
|
|
62
|
+
type: Object as PropType<[number, number] | null>,
|
|
63
|
+
required: false,
|
|
64
|
+
default: null
|
|
65
|
+
},
|
|
66
|
+
color: {
|
|
67
|
+
type: String as PropType<ColorBase>,
|
|
68
|
+
required: false,
|
|
69
|
+
default: ColorEnum.Dark
|
|
70
|
+
},
|
|
71
|
+
required: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
required: false,
|
|
74
|
+
default: false
|
|
75
|
+
},
|
|
76
|
+
disabled: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
required: false,
|
|
79
|
+
default: false
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
emits: ["update:modelValue"]
|
|
83
|
+
});
|
|
84
|
+
</script>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<router-link
|
|
3
|
+
:to="$props.to"
|
|
4
|
+
@auxclick="handleRoutingEvent($event, $props.to)"
|
|
5
|
+
@click="handleRoutingEvent($event, $props.to)"
|
|
6
|
+
v-bind="$attrs"
|
|
7
|
+
>
|
|
8
|
+
<template
|
|
9
|
+
v-for="(_, name) in $slots"
|
|
10
|
+
v-slot:[name]="slotData"
|
|
11
|
+
>
|
|
12
|
+
<slot
|
|
13
|
+
:name="name"
|
|
14
|
+
v-bind="{ ...slotData }"
|
|
15
|
+
/>
|
|
16
|
+
</template>
|
|
17
|
+
</router-link>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script lang="ts">
|
|
21
|
+
import { defineComponent, type PropType } from "vue";
|
|
22
|
+
import { type RouteLocation } from "vue-router";
|
|
23
|
+
|
|
24
|
+
import { useRouting } from "@dative-gpi/foundation-shared-services/composables";
|
|
25
|
+
|
|
26
|
+
export default defineComponent({
|
|
27
|
+
name: "FSRouterLink",
|
|
28
|
+
props: {
|
|
29
|
+
to: {
|
|
30
|
+
type: Object as PropType<RouteLocation>,
|
|
31
|
+
required: true
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
setup() {
|
|
35
|
+
const { handleRoutingEvent } = useRouting();
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
handleRoutingEvent
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
</script>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<script lang="ts">
|
|
43
43
|
import { computed, defineComponent, onMounted, onUnmounted, type PropType, ref, type StyleValue } from "vue";
|
|
44
44
|
|
|
45
|
-
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
45
|
+
import { useBreakpoints, useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
46
46
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
47
47
|
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
48
48
|
import { uuidv4 } from "@dative-gpi/bones-ui/tools/uuid";
|
|
@@ -59,6 +59,16 @@ export default defineComponent({
|
|
|
59
59
|
FSButton
|
|
60
60
|
},
|
|
61
61
|
props: {
|
|
62
|
+
height: {
|
|
63
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
64
|
+
required: false,
|
|
65
|
+
default: "fit-content"
|
|
66
|
+
},
|
|
67
|
+
width: {
|
|
68
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
69
|
+
required: false,
|
|
70
|
+
default: "fit-content"
|
|
71
|
+
},
|
|
62
72
|
padding: {
|
|
63
73
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
64
74
|
required: false,
|
|
@@ -76,6 +86,7 @@ export default defineComponent({
|
|
|
76
86
|
}
|
|
77
87
|
},
|
|
78
88
|
setup(props) {
|
|
89
|
+
const { isMobileSized } = useBreakpoints();
|
|
79
90
|
const { getChildren } = useSlots();
|
|
80
91
|
const { getColors } = useColors();
|
|
81
92
|
|
|
@@ -89,10 +100,13 @@ export default defineComponent({
|
|
|
89
100
|
const elementId = `id${uuidv4()}`;
|
|
90
101
|
|
|
91
102
|
const style = computed((): StyleValue => ({
|
|
92
|
-
"--fs-group-padding"
|
|
93
|
-
"--fs-group-gap"
|
|
94
|
-
"--fs-group-color"
|
|
95
|
-
"--fs-group-hover-color"
|
|
103
|
+
"--fs-group-padding" : sizeToVar(props.padding),
|
|
104
|
+
"--fs-group-gap" : sizeToVar(props.gap),
|
|
105
|
+
"--fs-group-color" : darks.soft,
|
|
106
|
+
"--fs-group-hover-color": darks.dark,
|
|
107
|
+
"--fs-group-width" : sizeToVar(props.width),
|
|
108
|
+
"--fs-group-height" : sizeToVar(props.height),
|
|
109
|
+
"--fs-group-icon-size" : isMobileSized.value ? "20px" : "24px",
|
|
96
110
|
}));
|
|
97
111
|
|
|
98
112
|
const nextClasses = computed((): string[] => {
|
package/components/FSSlider.vue
CHANGED
|
@@ -1,84 +1,55 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<FSBaseField
|
|
3
|
+
:label="$props.label"
|
|
4
|
+
:description="$props.description"
|
|
5
|
+
:required="$props.required"
|
|
6
|
+
:disabled="$props.disabled"
|
|
7
|
+
:style="style"
|
|
8
|
+
>
|
|
9
|
+
<FSRow>
|
|
10
|
+
<v-slider
|
|
11
|
+
hide-details
|
|
12
|
+
class="fs-slider"
|
|
13
|
+
width="100%"
|
|
14
|
+
:color="$props.color"
|
|
15
|
+
:disabled="$props.disabled"
|
|
16
|
+
:ripple="false"
|
|
17
|
+
:trackSize="6"
|
|
18
|
+
:elevation="0"
|
|
19
|
+
:tickSize="4"
|
|
20
|
+
:modelValue="$props.modelValue ?? undefined"
|
|
21
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
22
|
+
v-bind="$attrs"
|
|
8
23
|
>
|
|
9
|
-
<
|
|
10
|
-
v-
|
|
11
|
-
|
|
12
|
-
font="text-overline"
|
|
13
|
-
:style="style"
|
|
24
|
+
<template
|
|
25
|
+
v-for="(_, name) in $slots"
|
|
26
|
+
v-slot:[name]="slotData"
|
|
14
27
|
>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
:style="style"
|
|
24
|
-
>
|
|
25
|
-
*
|
|
26
|
-
</FSSpan>
|
|
27
|
-
</FSRow>
|
|
28
|
-
</slot>
|
|
29
|
-
<v-slider
|
|
30
|
-
class="fs-slider"
|
|
31
|
-
hide-details
|
|
32
|
-
:disabled="!$props.editable"
|
|
33
|
-
:ripple="false"
|
|
34
|
-
:style="style"
|
|
35
|
-
:elevation="0"
|
|
36
|
-
:tickSize="4"
|
|
37
|
-
:modelValue="$props.modelValue ?? undefined"
|
|
38
|
-
@update:modelValue="(value) => $emit('update:modelValue', value)"
|
|
39
|
-
v-bind="$attrs"
|
|
40
|
-
>
|
|
41
|
-
<template
|
|
42
|
-
v-for="(_, name) in $slots"
|
|
43
|
-
v-slot:[name]="slotData"
|
|
44
|
-
>
|
|
45
|
-
<slot
|
|
46
|
-
:name="name"
|
|
47
|
-
v-bind="slotData"
|
|
48
|
-
/>
|
|
49
|
-
</template>
|
|
50
|
-
</v-slider>
|
|
51
|
-
<slot
|
|
52
|
-
name="description"
|
|
53
|
-
>
|
|
54
|
-
<FSSpan
|
|
55
|
-
v-if="$props.description"
|
|
56
|
-
class="fs-slider-description"
|
|
57
|
-
font="text-overline"
|
|
58
|
-
:style="style"
|
|
59
|
-
>
|
|
60
|
-
{{ $props.description }}
|
|
61
|
-
</FSSpan>
|
|
62
|
-
</slot>
|
|
63
|
-
</FSCol>
|
|
28
|
+
<slot
|
|
29
|
+
:name="name"
|
|
30
|
+
v-bind="slotData"
|
|
31
|
+
/>
|
|
32
|
+
</template>
|
|
33
|
+
</v-slider>
|
|
34
|
+
</FSRow>
|
|
35
|
+
</FSBaseField>
|
|
64
36
|
</template>
|
|
65
37
|
|
|
66
38
|
<script lang="ts">
|
|
67
39
|
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
68
40
|
|
|
41
|
+
import { useColors } from '@dative-gpi/foundation-shared-components/composables';
|
|
42
|
+
|
|
69
43
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
70
|
-
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
71
44
|
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import FSRow from "./FSRow.vue";
|
|
45
|
+
import FSRow from '@dative-gpi/foundation-shared-components/components/FSRow.vue';
|
|
46
|
+
import FSBaseField from '@dative-gpi/foundation-shared-components/components/fields/FSBaseField.vue';
|
|
75
47
|
|
|
76
48
|
export default defineComponent({
|
|
77
49
|
name: "FSSlider",
|
|
78
50
|
components: {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
FSRow
|
|
51
|
+
FSRow,
|
|
52
|
+
FSBaseField
|
|
82
53
|
},
|
|
83
54
|
props: {
|
|
84
55
|
label: {
|
|
@@ -106,10 +77,10 @@ export default defineComponent({
|
|
|
106
77
|
required: false,
|
|
107
78
|
default: false
|
|
108
79
|
},
|
|
109
|
-
|
|
80
|
+
disabled: {
|
|
110
81
|
type: Boolean,
|
|
111
82
|
required: false,
|
|
112
|
-
default:
|
|
83
|
+
default: false
|
|
113
84
|
}
|
|
114
85
|
},
|
|
115
86
|
setup(props) {
|
|
@@ -117,26 +88,20 @@ export default defineComponent({
|
|
|
117
88
|
|
|
118
89
|
const colors = computed(() => getColors(props.color));
|
|
119
90
|
const lights = getColors(ColorEnum.Light);
|
|
120
|
-
const darks = getColors(ColorEnum.Dark);
|
|
121
91
|
|
|
122
92
|
const style = computed((): StyleValue => {
|
|
123
|
-
if (
|
|
93
|
+
if (props.disabled) {
|
|
124
94
|
return {
|
|
125
|
-
"--fs-slider-
|
|
126
|
-
"--fs-slider-track-color": lights.base,
|
|
127
|
-
"--fs-slider-thumb-color": lights.base,
|
|
128
|
-
"--fs-slider-color" : lights.dark
|
|
95
|
+
"--fs-slider-thumb-color": lights.base
|
|
129
96
|
};
|
|
130
97
|
}
|
|
131
98
|
return {
|
|
132
|
-
"--fs-slider-
|
|
133
|
-
"--fs-slider-track-color": colors.value.light,
|
|
134
|
-
"--fs-slider-thumb-color": colors.value.base,
|
|
135
|
-
"--fs-slider-color" : darks.base
|
|
99
|
+
"--fs-slider-thumb-color": colors.value.base
|
|
136
100
|
};
|
|
137
101
|
});
|
|
138
102
|
|
|
139
103
|
return {
|
|
104
|
+
colors,
|
|
140
105
|
style
|
|
141
106
|
};
|
|
142
107
|
}
|
package/components/FSSpan.vue
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div
|
|
3
3
|
:class="classes"
|
|
4
4
|
:style="style"
|
|
5
5
|
v-bind="$attrs"
|
|
6
6
|
>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
<span>
|
|
8
|
+
<slot>
|
|
9
|
+
{{ $props.label }}
|
|
10
|
+
</slot>
|
|
11
|
+
</span>
|
|
12
|
+
</div>
|
|
11
13
|
</template>
|
|
12
14
|
|
|
13
15
|
<script lang="ts">
|
|
14
16
|
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
15
17
|
|
|
16
|
-
import { useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
18
|
+
import { useBreakpoints, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
17
19
|
|
|
18
20
|
export default defineComponent({
|
|
19
21
|
name: "FSSpan",
|
|
@@ -45,10 +47,13 @@ export default defineComponent({
|
|
|
45
47
|
}
|
|
46
48
|
},
|
|
47
49
|
setup(props) {
|
|
50
|
+
const { fontStyles } = useBreakpoints();
|
|
48
51
|
const { slots } = useSlots();
|
|
49
52
|
|
|
50
53
|
const style = computed((): StyleValue => ({
|
|
51
|
-
"--fs-span-
|
|
54
|
+
"--fs-span-text-align": props.align,
|
|
55
|
+
"--fs-span-line-clamp": props.lineClamp.toString(),
|
|
56
|
+
...fontStyles.value
|
|
52
57
|
}));
|
|
53
58
|
|
|
54
59
|
const classes = computed((): string[] => {
|
package/components/FSSwitch.vue
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
width="hug"
|
|
4
|
-
align="top-left"
|
|
5
|
-
gap="16px"
|
|
2
|
+
<FSCol
|
|
6
3
|
padding="8px 0px"
|
|
7
|
-
:wrap="false"
|
|
8
4
|
>
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
v-
|
|
26
|
-
|
|
5
|
+
<FSRow
|
|
6
|
+
gap="16px"
|
|
7
|
+
:wrap="false"
|
|
8
|
+
>
|
|
9
|
+
<v-switch
|
|
10
|
+
v-if="variant == 'left'"
|
|
11
|
+
class="fs-switch"
|
|
12
|
+
hide-details
|
|
13
|
+
inset
|
|
14
|
+
:validateOn="validateOn"
|
|
15
|
+
:rules="$props.rules"
|
|
16
|
+
:ripple="false"
|
|
17
|
+
:style="style"
|
|
18
|
+
:disabled="$props.disabled"
|
|
19
|
+
:modelValue="$props.modelValue"
|
|
20
|
+
@update:modelValue="onToggle"
|
|
21
|
+
v-bind="$attrs"
|
|
22
|
+
/>
|
|
23
|
+
<FSCol>
|
|
27
24
|
<FSSpan
|
|
28
25
|
v-if="$props.label"
|
|
29
26
|
class="fs-switch-label"
|
|
@@ -41,33 +38,32 @@
|
|
|
41
38
|
class="fs-switch-description"
|
|
42
39
|
font="text-overline"
|
|
43
40
|
:style="style"
|
|
41
|
+
:lineClamp="2"
|
|
44
42
|
>
|
|
45
43
|
{{ $props.description }}
|
|
46
44
|
</FSSpan>
|
|
47
45
|
</slot>
|
|
48
|
-
<slot
|
|
49
|
-
name="footer"
|
|
50
|
-
/>
|
|
51
46
|
</FSCol>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
47
|
+
<FSRow
|
|
48
|
+
v-if="variant == 'right'"
|
|
49
|
+
align="center-right"
|
|
50
|
+
>
|
|
51
|
+
<v-switch
|
|
52
|
+
class="fs-switch"
|
|
53
|
+
hide-details
|
|
54
|
+
inset
|
|
55
|
+
:disabled="$props.disabled"
|
|
56
|
+
:validateOn="validateOn"
|
|
57
|
+
:rules="$props.rules"
|
|
58
|
+
:ripple="false"
|
|
59
|
+
:style="style"
|
|
60
|
+
:modelValue="$props.modelValue"
|
|
61
|
+
@update:modelValue="onToggle"
|
|
62
|
+
v-bind="$attrs"
|
|
63
|
+
/>
|
|
64
|
+
</FSRow>
|
|
69
65
|
</FSRow>
|
|
70
|
-
</
|
|
66
|
+
</FSCol>
|
|
71
67
|
</template>
|
|
72
68
|
|
|
73
69
|
<script lang="ts">
|
|
@@ -123,10 +119,10 @@ export default defineComponent({
|
|
|
123
119
|
required: false,
|
|
124
120
|
default: null
|
|
125
121
|
},
|
|
126
|
-
|
|
122
|
+
disabled: {
|
|
127
123
|
type: Boolean,
|
|
128
124
|
required: false,
|
|
129
|
-
default:
|
|
125
|
+
default: false
|
|
130
126
|
}
|
|
131
127
|
},
|
|
132
128
|
emits: ["update:modelValue"],
|
|
@@ -141,7 +137,7 @@ export default defineComponent({
|
|
|
141
137
|
const darks = getColors(ColorEnum.Dark);
|
|
142
138
|
|
|
143
139
|
const style = computed((): StyleValue => {
|
|
144
|
-
if (
|
|
140
|
+
if (props.disabled) {
|
|
145
141
|
return {
|
|
146
142
|
"--fs-switch-translate-x": props.modelValue ? "8px" : "-8px",
|
|
147
143
|
"--fs-switch-cursor" : "default",
|
|
@@ -173,7 +169,7 @@ export default defineComponent({
|
|
|
173
169
|
const messages = computed((): string[] => props.messages ?? getMessages(props.modelValue, props.rules));
|
|
174
170
|
|
|
175
171
|
const onToggle = (): void => {
|
|
176
|
-
if (
|
|
172
|
+
if (props.disabled) {
|
|
177
173
|
return;
|
|
178
174
|
}
|
|
179
175
|
emit("update:modelValue", !props.modelValue);
|
package/components/FSTab.vue
CHANGED
|
@@ -26,19 +26,6 @@
|
|
|
26
26
|
{{ $props.label }}
|
|
27
27
|
</FSSpan>
|
|
28
28
|
</slot>
|
|
29
|
-
<v-spacer
|
|
30
|
-
v-if="$props.tag"
|
|
31
|
-
/>
|
|
32
|
-
<slot
|
|
33
|
-
name="tag"
|
|
34
|
-
>
|
|
35
|
-
<FSSpan
|
|
36
|
-
v-if="$props.tag"
|
|
37
|
-
class="fs-tab-tag"
|
|
38
|
-
>
|
|
39
|
-
{{ $props.tag }}
|
|
40
|
-
</FSSpan>
|
|
41
|
-
</slot>
|
|
42
29
|
<slot
|
|
43
30
|
name="append"
|
|
44
31
|
>
|
|
@@ -49,6 +36,21 @@
|
|
|
49
36
|
{{ $props.appendIcon }}
|
|
50
37
|
</FSIcon>
|
|
51
38
|
</slot>
|
|
39
|
+
<FSRow
|
|
40
|
+
align="center-right"
|
|
41
|
+
:wrap="false"
|
|
42
|
+
>
|
|
43
|
+
<slot
|
|
44
|
+
name="tag"
|
|
45
|
+
>
|
|
46
|
+
<FSSpan
|
|
47
|
+
v-if="$props.tag"
|
|
48
|
+
class="fs-tab-tag"
|
|
49
|
+
>
|
|
50
|
+
{{ $props.tag }}
|
|
51
|
+
</FSSpan>
|
|
52
|
+
</slot>
|
|
53
|
+
</FSRow>
|
|
52
54
|
</FSRow>
|
|
53
55
|
</slot>
|
|
54
56
|
</v-tab>
|
package/components/FSTabs.vue
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:style="style"
|
|
8
8
|
:grow="true"
|
|
9
9
|
:modelValue="$props.tab"
|
|
10
|
-
@update:modelValue="
|
|
10
|
+
@update:modelValue="onUpdateTab($event)"
|
|
11
11
|
v-bind="$attrs"
|
|
12
12
|
>
|
|
13
13
|
<slot/>
|
|
@@ -15,16 +15,17 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script lang="ts">
|
|
18
|
-
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
18
|
+
import { computed, defineComponent, onMounted, type PropType, type StyleValue } from "vue";
|
|
19
|
+
import { useRouter } from "vue-router";
|
|
19
20
|
|
|
21
|
+
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
20
22
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
21
|
-
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
22
23
|
|
|
23
24
|
export default defineComponent({
|
|
24
25
|
name: "FSTabs",
|
|
25
26
|
props: {
|
|
26
27
|
tab: {
|
|
27
|
-
type: Number,
|
|
28
|
+
type: [String, Number, Object] as PropType<any>,
|
|
28
29
|
required: false,
|
|
29
30
|
default: 0
|
|
30
31
|
},
|
|
@@ -32,10 +33,18 @@ export default defineComponent({
|
|
|
32
33
|
type: String as PropType<ColorBase>,
|
|
33
34
|
required: false,
|
|
34
35
|
default: ColorEnum.Primary
|
|
36
|
+
},
|
|
37
|
+
recordNavigation: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
required: false,
|
|
40
|
+
default: false
|
|
35
41
|
}
|
|
36
42
|
},
|
|
37
|
-
|
|
43
|
+
emits: ["update:tab"],
|
|
44
|
+
setup(props, { emit }) {
|
|
45
|
+
const { isMobileSized } = useBreakpoints();
|
|
38
46
|
const { getColors } = useColors();
|
|
47
|
+
const router = useRouter();
|
|
39
48
|
|
|
40
49
|
const colors = computed(() => getColors(props.color));
|
|
41
50
|
const lights = getColors(ColorEnum.Light);
|
|
@@ -48,11 +57,27 @@ export default defineComponent({
|
|
|
48
57
|
"--fs-tab-hover-border-color" : darks.dark,
|
|
49
58
|
"--fs-tab-active-background-color": colors.value.light,
|
|
50
59
|
"--fs-tab-tag-background-color" : colors.value.base,
|
|
51
|
-
"--fs-tab-tag-color" : colors.value.baseContrast
|
|
60
|
+
"--fs-tab-tag-color" : colors.value.baseContrast!,
|
|
61
|
+
"--fs-tab-height" : isMobileSized.value ? "40px" : "48px",
|
|
62
|
+
"--fs-tab-tag-size" : isMobileSized.value ? "24px" : "28px"
|
|
52
63
|
}));
|
|
53
64
|
|
|
65
|
+
const onUpdateTab = (tab: number): void => {
|
|
66
|
+
if (props.recordNavigation) {
|
|
67
|
+
router.replace({ query: { tab: tab.toString() } });
|
|
68
|
+
}
|
|
69
|
+
emit("update:tab", tab);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
onMounted((): void => {
|
|
73
|
+
if (props.recordNavigation && router.currentRoute.value.query.tab) {
|
|
74
|
+
emit("update:tab", router.currentRoute.value.query.tab);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
54
78
|
return {
|
|
55
|
-
style
|
|
79
|
+
style,
|
|
80
|
+
onUpdateTab
|
|
56
81
|
};
|
|
57
82
|
}
|
|
58
83
|
});
|
package/components/FSTag.vue
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
v-bind="{ color: $props.color, colors }"
|
|
24
24
|
>
|
|
25
25
|
<v-btn
|
|
26
|
-
v-if="$props.
|
|
26
|
+
v-if="$props.showRemove"
|
|
27
27
|
class="fs-tag-button"
|
|
28
28
|
:ripple="false"
|
|
29
29
|
@click="$emit('remove')"
|
|
@@ -59,7 +59,7 @@ export default defineComponent({
|
|
|
59
59
|
height: {
|
|
60
60
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
61
61
|
required: false,
|
|
62
|
-
default: "
|
|
62
|
+
default: () => ["28px", "24px"]
|
|
63
63
|
},
|
|
64
64
|
width: {
|
|
65
65
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
@@ -81,7 +81,7 @@ export default defineComponent({
|
|
|
81
81
|
required: false,
|
|
82
82
|
default: ColorEnum.Light
|
|
83
83
|
},
|
|
84
|
-
|
|
84
|
+
showRemove: {
|
|
85
85
|
type: Boolean,
|
|
86
86
|
required: false,
|
|
87
87
|
default: true
|