@dative-gpi/foundation-shared-components 1.0.35 → 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
package/components/FSChip.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSRow
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
:align="$props.align"
|
|
4
|
+
:width="$props.width"
|
|
5
5
|
:class="classes"
|
|
6
6
|
:style="style"
|
|
7
7
|
:wrap="false"
|
|
@@ -82,6 +82,11 @@ export default defineComponent({
|
|
|
82
82
|
required: false,
|
|
83
83
|
default: () => [24, 20]
|
|
84
84
|
},
|
|
85
|
+
width: {
|
|
86
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
87
|
+
required: false,
|
|
88
|
+
default: "hug"
|
|
89
|
+
},
|
|
85
90
|
variant: {
|
|
86
91
|
type: String as PropType<"standard" | "full" | "borderless">,
|
|
87
92
|
required: false,
|
|
@@ -96,6 +101,11 @@ export default defineComponent({
|
|
|
96
101
|
type: Boolean,
|
|
97
102
|
required: false,
|
|
98
103
|
default: false
|
|
104
|
+
},
|
|
105
|
+
align: {
|
|
106
|
+
type: String as PropType<"center-center" | "center-left">,
|
|
107
|
+
required: false,
|
|
108
|
+
default: "center-center"
|
|
99
109
|
}
|
|
100
110
|
},
|
|
101
111
|
setup(props) {
|
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
@mouseup="active = false"
|
|
11
11
|
>
|
|
12
12
|
<FSCard
|
|
13
|
+
height="100%"
|
|
14
|
+
width="100%"
|
|
13
15
|
:borderRadius="$props.borderRadius"
|
|
14
16
|
:borderStyle="$props.borderStyle"
|
|
15
17
|
:padding="$props.padding"
|
|
16
|
-
:height="$props.height"
|
|
17
|
-
:width="$props.width"
|
|
18
18
|
:class="classes"
|
|
19
|
-
:style="style"
|
|
20
19
|
v-bind="$attrs"
|
|
21
20
|
>
|
|
22
21
|
<template
|
|
@@ -41,7 +40,7 @@
|
|
|
41
40
|
/>
|
|
42
41
|
</template>
|
|
43
42
|
</a>
|
|
44
|
-
<
|
|
43
|
+
<FSRouterLink
|
|
45
44
|
v-else-if="$props.to"
|
|
46
45
|
:style="style"
|
|
47
46
|
:to="$props.to"
|
|
@@ -52,13 +51,12 @@
|
|
|
52
51
|
@mouseup="active = false"
|
|
53
52
|
>
|
|
54
53
|
<FSCard
|
|
54
|
+
height="100%"
|
|
55
|
+
width="100%"
|
|
55
56
|
:borderRadius="$props.borderRadius"
|
|
56
57
|
:borderStyle="$props.borderStyle"
|
|
57
58
|
:padding="$props.padding"
|
|
58
|
-
:height="$props.height"
|
|
59
|
-
:width="$props.width"
|
|
60
59
|
:class="classes"
|
|
61
|
-
:style="style"
|
|
62
60
|
v-bind="$attrs"
|
|
63
61
|
>
|
|
64
62
|
<template
|
|
@@ -82,12 +80,13 @@
|
|
|
82
80
|
:color="loadColor"
|
|
83
81
|
/>
|
|
84
82
|
</template>
|
|
85
|
-
</
|
|
83
|
+
</FSRouterLink>
|
|
86
84
|
<button
|
|
87
85
|
v-else
|
|
88
86
|
:type="$props.type"
|
|
89
87
|
:style="style"
|
|
90
88
|
:class="$props.class"
|
|
89
|
+
:disabled="$props.load || !$props.editable"
|
|
91
90
|
@click.stop="onClick"
|
|
92
91
|
@mouseover="hover = true"
|
|
93
92
|
@mouseleave="hover = false"
|
|
@@ -95,13 +94,12 @@
|
|
|
95
94
|
@mouseup="active = false"
|
|
96
95
|
>
|
|
97
96
|
<FSCard
|
|
97
|
+
height="100%"
|
|
98
|
+
width="100%"
|
|
98
99
|
:borderRadius="$props.borderRadius"
|
|
99
100
|
:borderStyle="$props.borderStyle"
|
|
100
101
|
:padding="$props.padding"
|
|
101
|
-
:height="$props.height"
|
|
102
|
-
:width="$props.width"
|
|
103
102
|
:class="classes"
|
|
104
|
-
:style="style"
|
|
105
103
|
v-bind="$attrs"
|
|
106
104
|
>
|
|
107
105
|
<template
|
|
@@ -118,7 +116,6 @@
|
|
|
118
116
|
v-if="$props.load"
|
|
119
117
|
>
|
|
120
118
|
<v-progress-circular
|
|
121
|
-
:class="$props.class"
|
|
122
119
|
class="fs-clickable-load"
|
|
123
120
|
width="2"
|
|
124
121
|
size="24"
|
|
@@ -137,11 +134,13 @@ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-compone
|
|
|
137
134
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
138
135
|
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
139
136
|
|
|
137
|
+
import FSRouterLink from "./FSRouterLink.vue";
|
|
140
138
|
import FSCard from "./FSCard.vue";
|
|
141
139
|
|
|
142
140
|
export default defineComponent({
|
|
143
141
|
name: "FSClickable",
|
|
144
142
|
components: {
|
|
143
|
+
FSRouterLink,
|
|
145
144
|
FSCard
|
|
146
145
|
},
|
|
147
146
|
props: {
|
|
@@ -166,7 +165,7 @@ export default defineComponent({
|
|
|
166
165
|
default: null
|
|
167
166
|
},
|
|
168
167
|
to: {
|
|
169
|
-
type:
|
|
168
|
+
type: Object as PropType<RouteLocation | null>,
|
|
170
169
|
required: false,
|
|
171
170
|
default: null
|
|
172
171
|
},
|
package/components/FSClock.vue
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
v-if="$props.slider"
|
|
31
31
|
>
|
|
32
32
|
<FSSlider
|
|
33
|
-
:label="$tr('ui.
|
|
33
|
+
:label="$tr('ui.common.hours', 'Hours')"
|
|
34
34
|
:readonly="!$props.editable"
|
|
35
35
|
:color="$props.color"
|
|
36
36
|
:step="1"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
v-model="innerHours"
|
|
40
40
|
/>
|
|
41
41
|
<FSSlider
|
|
42
|
-
:label="$tr('ui.
|
|
42
|
+
:label="$tr('ui.common.minutes', 'Minutes')"
|
|
43
43
|
:readonly="!$props.editable"
|
|
44
44
|
:color="$props.color"
|
|
45
45
|
:step="1"
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
<script lang="ts">
|
|
55
55
|
import { computed, defineComponent, type PropType, ref, type StyleValue, watch } from "vue";
|
|
56
56
|
|
|
57
|
+
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
57
58
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
58
|
-
import {
|
|
59
|
-
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
59
|
+
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
60
60
|
|
|
61
61
|
import FSSlider from "./FSSlider.vue";
|
|
62
62
|
import FSCol from "./FSCol.vue";
|
|
@@ -98,7 +98,8 @@ export default defineComponent({
|
|
|
98
98
|
},
|
|
99
99
|
emits: ["update:modelValue"],
|
|
100
100
|
setup(props, { emit }) {
|
|
101
|
-
const { epochToLongDateFormat } =
|
|
101
|
+
const { epochToLongDateFormat } = useDateFormat();
|
|
102
|
+
const { isMobileSized } = useBreakpoints();
|
|
102
103
|
const { getColors } = useColors();
|
|
103
104
|
|
|
104
105
|
const colors = computed(() => getColors(props.color));
|
|
@@ -116,7 +117,11 @@ export default defineComponent({
|
|
|
116
117
|
"--fs-clock-field-background-color" : backgrounds.base,
|
|
117
118
|
"--fs-clock-field-border-color" : lights.base,
|
|
118
119
|
"--fs-clock-field-color" : lights.dark,
|
|
119
|
-
"--fs-clock-field-active-border-color": lights.base
|
|
120
|
+
"--fs-clock-field-active-border-color": lights.base,
|
|
121
|
+
"--fs-font-font-size" : isMobileSized.value ? "12px" : "14px",
|
|
122
|
+
"--fs-font-line-height" : isMobileSized.value ? "16px" : "20px",
|
|
123
|
+
"--fs-font-letter-spacing" : isMobileSized.value ? "-0.36px" : "-0.42px",
|
|
124
|
+
"--fs-base-field-input-height" : isMobileSized.value ? "34px" : "38px"
|
|
120
125
|
};
|
|
121
126
|
}
|
|
122
127
|
return {
|
|
@@ -124,7 +129,11 @@ export default defineComponent({
|
|
|
124
129
|
"--fs-clock-field-background-color" : colors.value.light,
|
|
125
130
|
"--fs-clock-field-border-color" : colors.value.base,
|
|
126
131
|
"--fs-clock-field-color" : darks.base,
|
|
127
|
-
"--fs-clock-field-active-border-color": colors.value.dark
|
|
132
|
+
"--fs-clock-field-active-border-color": colors.value.dark,
|
|
133
|
+
"--fs-font-font-size" : isMobileSized.value ? "12px" : "14px",
|
|
134
|
+
"--fs-font-line-height" : isMobileSized.value ? "16px" : "20px",
|
|
135
|
+
"--fs-font-letter-spacing" : isMobileSized.value ? "-0.36px" : "-0.42px",
|
|
136
|
+
"--fs-base-field-input-height" : isMobileSized.value ? "34px" : "38px"
|
|
128
137
|
};
|
|
129
138
|
});
|
|
130
139
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
class="fs-color-icon"
|
|
4
4
|
:color="$props.color"
|
|
5
5
|
:border="false"
|
|
6
|
-
:height="
|
|
7
|
-
:width="
|
|
6
|
+
:height="actualSize"
|
|
7
|
+
:width="actualSize"
|
|
8
8
|
>
|
|
9
9
|
<FSRow
|
|
10
10
|
align="center-center"
|
|
11
11
|
>
|
|
12
12
|
<FSIcon
|
|
13
13
|
:color="$props.color"
|
|
14
|
-
:size="
|
|
14
|
+
:size="iconSize"
|
|
15
15
|
>
|
|
16
16
|
<slot />
|
|
17
17
|
</FSIcon>
|
|
@@ -25,6 +25,8 @@ import { computed, defineComponent, type PropType } from "vue";
|
|
|
25
25
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
26
26
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
27
27
|
|
|
28
|
+
import { sizeToVar } from "../utils";
|
|
29
|
+
|
|
28
30
|
import FSColor from "./FSColor.vue";
|
|
29
31
|
import FSIcon from "./FSIcon.vue";
|
|
30
32
|
import FSRow from "./FSRow.vue";
|
|
@@ -46,12 +48,17 @@ export default defineComponent({
|
|
|
46
48
|
type: String as PropType<ColorBase>,
|
|
47
49
|
required: false,
|
|
48
50
|
default: ColorEnum.Dark
|
|
51
|
+
},
|
|
52
|
+
padding: {
|
|
53
|
+
type: [String, Number] as PropType<string | number>,
|
|
54
|
+
required: false,
|
|
55
|
+
default: "8px"
|
|
49
56
|
}
|
|
50
57
|
},
|
|
51
58
|
setup(props) {
|
|
52
59
|
const { isMobileSized } = useBreakpoints();
|
|
53
60
|
|
|
54
|
-
const
|
|
61
|
+
const actualSize = computed((): string[] | number[] | string | number | null => {
|
|
55
62
|
switch(props.size) {
|
|
56
63
|
case "s": return isMobileSized.value ? "18px" : "20px";
|
|
57
64
|
case "m": return isMobileSized.value ? "20px" : "26px";
|
|
@@ -60,8 +67,19 @@ export default defineComponent({
|
|
|
60
67
|
}
|
|
61
68
|
});
|
|
62
69
|
|
|
70
|
+
const iconSize = computed((): string => {
|
|
71
|
+
switch(props.size) {
|
|
72
|
+
case "s":
|
|
73
|
+
case "m":
|
|
74
|
+
case "l":
|
|
75
|
+
return props.size;
|
|
76
|
+
default: return `calc(${sizeToVar(props.size)} - ${sizeToVar(props.padding)})`;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
63
80
|
return {
|
|
64
|
-
|
|
81
|
+
actualSize,
|
|
82
|
+
iconSize
|
|
65
83
|
};
|
|
66
84
|
}
|
|
67
85
|
});
|
package/components/FSDialog.vue
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
:class="classes"
|
|
5
5
|
:modelValue="$props.modelValue"
|
|
6
6
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
:width="$props.width"
|
|
7
8
|
v-bind="$attrs"
|
|
8
9
|
>
|
|
9
10
|
<slot>
|
|
@@ -67,7 +68,7 @@ export default defineComponent({
|
|
|
67
68
|
default: false
|
|
68
69
|
}
|
|
69
70
|
},
|
|
70
|
-
emits: ["update:modelValue"],
|
|
71
|
+
emits: ["click", "update:modelValue"],
|
|
71
72
|
setup() {
|
|
72
73
|
const { isExtraSmall } = useBreakpoints();
|
|
73
74
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCard
|
|
3
|
-
padding="24px
|
|
3
|
+
:padding="['24px', '16px', '16px 12px']"
|
|
4
4
|
gap="24px"
|
|
5
5
|
:class="$props.cardClasses"
|
|
6
6
|
:color="$props.color"
|
|
@@ -9,9 +9,7 @@
|
|
|
9
9
|
<template
|
|
10
10
|
#header
|
|
11
11
|
>
|
|
12
|
-
<FSCol
|
|
13
|
-
padding="0 16px 0 0"
|
|
14
|
-
>
|
|
12
|
+
<FSCol>
|
|
15
13
|
<FSRow
|
|
16
14
|
align="center-left"
|
|
17
15
|
:wrap="false"
|
|
@@ -21,13 +19,16 @@
|
|
|
21
19
|
>
|
|
22
20
|
{{ $props.title }}
|
|
23
21
|
</FSText>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
<FSRow
|
|
23
|
+
align="center-right"
|
|
24
|
+
>
|
|
25
|
+
<FSButton
|
|
26
|
+
icon="mdi-close"
|
|
27
|
+
variant="icon"
|
|
28
|
+
:color="ColorEnum.Dark"
|
|
29
|
+
@click="$emit('update:modelValue', false)"
|
|
30
|
+
/>
|
|
31
|
+
</FSRow>
|
|
31
32
|
</FSRow>
|
|
32
33
|
<FSText
|
|
33
34
|
v-if="$props.subtitle"
|
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
#body
|
|
12
12
|
>
|
|
13
13
|
<FSDialogFormBody
|
|
14
|
+
ref="bodyRef"
|
|
14
15
|
v-bind="$attrs"
|
|
15
16
|
:subtitle="$props.subtitle"
|
|
16
17
|
:validation="$props.validation"
|
|
17
18
|
@click:cancelButton="$emit('update:modelValue', false)"
|
|
18
19
|
@click:submitButton="$emit('click:submitButton')"
|
|
19
20
|
@click:validateButton="onValidate"
|
|
21
|
+
@update:isValidForm="isValidForm = $event"
|
|
20
22
|
>
|
|
21
23
|
<template
|
|
22
24
|
v-for="(_, name) in $slots"
|
|
@@ -33,8 +35,8 @@
|
|
|
33
35
|
</template>
|
|
34
36
|
|
|
35
37
|
<script lang="ts">
|
|
36
|
-
import type { PropType} from "vue";
|
|
37
|
-
import { defineComponent } from "vue";
|
|
38
|
+
import type { PropType } from "vue";
|
|
39
|
+
import { defineComponent, ref } from "vue";
|
|
38
40
|
|
|
39
41
|
import FSDialogFormBody from "./FSDialogFormBody.vue";
|
|
40
42
|
import FSDialog from "./FSDialog.vue";
|
|
@@ -74,6 +76,8 @@ export default defineComponent({
|
|
|
74
76
|
},
|
|
75
77
|
emits: ["update:modelValue", "click:validateButton", "click:submitButton"],
|
|
76
78
|
setup(props, { emit }) {
|
|
79
|
+
const bodyRef = ref<typeof FSDialogFormBody | null>(null);
|
|
80
|
+
const isValidForm = ref(false);
|
|
77
81
|
|
|
78
82
|
const onClose = () => {
|
|
79
83
|
if (props.validation) {
|
|
@@ -87,8 +91,24 @@ export default defineComponent({
|
|
|
87
91
|
emit("update:modelValue", false);
|
|
88
92
|
};
|
|
89
93
|
|
|
94
|
+
const resetFormValidation = () => {
|
|
95
|
+
if (bodyRef.value) {
|
|
96
|
+
bodyRef.value.resetFormValidation();
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const validateForm = async () => {
|
|
101
|
+
if (bodyRef.value) {
|
|
102
|
+
return await bodyRef.value.validateForm();
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
90
106
|
return {
|
|
107
|
+
resetFormValidation,
|
|
108
|
+
validateForm,
|
|
109
|
+
isValidForm,
|
|
91
110
|
onValidate,
|
|
111
|
+
bodyRef,
|
|
92
112
|
onClose
|
|
93
113
|
};
|
|
94
114
|
}
|
|
@@ -6,22 +6,19 @@
|
|
|
6
6
|
ref="formRef"
|
|
7
7
|
:variant="$props.variant"
|
|
8
8
|
@submit="onSubmit"
|
|
9
|
-
v-model="
|
|
9
|
+
v-model="isValidForm"
|
|
10
10
|
>
|
|
11
11
|
<FSCol
|
|
12
12
|
gap="24px"
|
|
13
13
|
>
|
|
14
14
|
<FSFadeOut
|
|
15
|
-
padding="0 8px 0 0"
|
|
16
15
|
:maxHeight="maxHeight"
|
|
17
16
|
>
|
|
18
17
|
<slot
|
|
19
18
|
name="body"
|
|
20
19
|
/>
|
|
21
20
|
</FSFadeOut>
|
|
22
|
-
<FSRow
|
|
23
|
-
padding="0 16px 0 0"
|
|
24
|
-
>
|
|
21
|
+
<FSRow>
|
|
25
22
|
<slot
|
|
26
23
|
name="left-footer"
|
|
27
24
|
/>
|
|
@@ -31,6 +28,7 @@
|
|
|
31
28
|
:wrap="false"
|
|
32
29
|
>
|
|
33
30
|
<FSButton
|
|
31
|
+
v-if="$props.showCancelButton"
|
|
34
32
|
:prependIcon="$props.cancelButtonPrependIcon"
|
|
35
33
|
:appendIcon="$props.cancelButtonAppendIcon"
|
|
36
34
|
:variant="$props.cancelButtonVariant"
|
|
@@ -39,6 +37,7 @@
|
|
|
39
37
|
@click="() => $emit('click:cancelButton', false)"
|
|
40
38
|
/>
|
|
41
39
|
<FSButton
|
|
40
|
+
v-if="$props.showSubmitButton"
|
|
42
41
|
type="submit"
|
|
43
42
|
:prependIcon="$props.submitButtonPrependIcon"
|
|
44
43
|
:appendIcon="$props.submitButtonAppendIcon"
|
|
@@ -60,16 +59,13 @@
|
|
|
60
59
|
gap="24px"
|
|
61
60
|
>
|
|
62
61
|
<FSFadeOut
|
|
63
|
-
padding="0 8px 0 0"
|
|
64
62
|
:maxHeight="maxHeight"
|
|
65
63
|
>
|
|
66
64
|
<slot
|
|
67
65
|
name="validation"
|
|
68
66
|
/>
|
|
69
67
|
</FSFadeOut>
|
|
70
|
-
<FSRow
|
|
71
|
-
padding="0 16px 0 0"
|
|
72
|
-
>
|
|
68
|
+
<FSRow>
|
|
73
69
|
<slot
|
|
74
70
|
name="left-footer"
|
|
75
71
|
/>
|
|
@@ -93,7 +89,7 @@
|
|
|
93
89
|
</template>
|
|
94
90
|
|
|
95
91
|
<script lang="ts">
|
|
96
|
-
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
92
|
+
import { computed, defineComponent, type PropType, ref, watch } from "vue";
|
|
97
93
|
|
|
98
94
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
99
95
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -118,16 +114,16 @@ export default defineComponent({
|
|
|
118
114
|
required: false,
|
|
119
115
|
default: "submit"
|
|
120
116
|
},
|
|
121
|
-
modelValue: {
|
|
122
|
-
type: Boolean,
|
|
123
|
-
required: false,
|
|
124
|
-
default: false
|
|
125
|
-
},
|
|
126
117
|
subtitle: {
|
|
127
118
|
type: String as PropType<string | null>,
|
|
128
119
|
required: false,
|
|
129
120
|
default: null
|
|
130
121
|
},
|
|
122
|
+
showCancelButton: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
required: false,
|
|
125
|
+
default: true
|
|
126
|
+
},
|
|
131
127
|
cancelButtonPrependIcon: {
|
|
132
128
|
type: String as PropType<string | null>,
|
|
133
129
|
required: false,
|
|
@@ -153,6 +149,11 @@ export default defineComponent({
|
|
|
153
149
|
required: false,
|
|
154
150
|
default: ColorEnum.Light
|
|
155
151
|
},
|
|
152
|
+
showSubmitButton: {
|
|
153
|
+
type: Boolean,
|
|
154
|
+
required: false,
|
|
155
|
+
default: true
|
|
156
|
+
},
|
|
156
157
|
submitButtonPrependIcon: {
|
|
157
158
|
type: String as PropType<string | null>,
|
|
158
159
|
required: false,
|
|
@@ -219,36 +220,48 @@ export default defineComponent({
|
|
|
219
220
|
default: true
|
|
220
221
|
}
|
|
221
222
|
},
|
|
222
|
-
emits: ["click:cancelButton", "click:submitButton", "click:validateButton"],
|
|
223
|
+
emits: ["click:cancelButton", "click:submitButton", "click:validateButton", "update:isValidForm"],
|
|
223
224
|
setup(props, { emit }) {
|
|
224
225
|
const { isMobileSized } = useBreakpoints();
|
|
225
226
|
const { $tr } = useTranslationsProvider();
|
|
226
227
|
|
|
227
|
-
const formRef = ref<
|
|
228
|
-
const
|
|
228
|
+
const formRef = ref<typeof FSForm | null>(null);
|
|
229
|
+
const isValidForm = ref(null);
|
|
229
230
|
|
|
230
231
|
const maxHeight = computed(() => {
|
|
231
232
|
const other = 24 + 24 // Paddings
|
|
232
233
|
+ (isMobileSized.value ? 24 : 32) + 24 // Title
|
|
233
|
-
+ (props.subtitle ? (isMobileSized.value ?
|
|
234
|
+
+ (props.subtitle ? (isMobileSized.value ? 16 : 20) + 8 : 0) // Subtitle
|
|
234
235
|
+ (isMobileSized.value ? 36 : 40) + 24; // Footer
|
|
235
|
-
return `calc(100vh -
|
|
236
|
+
return `calc(100vh - 42px - ${other}px)`;
|
|
236
237
|
});
|
|
237
238
|
|
|
238
239
|
const cancelLabel = computed(() => {
|
|
239
|
-
return props.cancelButtonLabel ?? $tr("ui.
|
|
240
|
+
return props.cancelButtonLabel ?? $tr("ui.common.cancel", "Cancel");
|
|
240
241
|
});
|
|
241
242
|
|
|
242
243
|
const submitLabel = computed(() => {
|
|
243
|
-
return props.submitButtonLabel ?? $tr("ui.
|
|
244
|
+
return props.submitButtonLabel ?? $tr("ui.common.submit", "Submit");
|
|
244
245
|
});
|
|
245
246
|
|
|
246
247
|
const validateLabel = computed(() => {
|
|
247
|
-
return props.validateButtonLabel ?? $tr("ui.
|
|
248
|
+
return props.validateButtonLabel ?? $tr("ui.common.validate", "Validate");
|
|
248
249
|
});
|
|
249
250
|
|
|
251
|
+
const resetFormValidation = () => {
|
|
252
|
+
if (formRef.value) {
|
|
253
|
+
formRef.value.resetValidation();
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
const validateForm = async () => {
|
|
258
|
+
if (formRef.value) {
|
|
259
|
+
return await formRef.value.validate();
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
|
|
250
263
|
const onSubmit = () => {
|
|
251
|
-
if (
|
|
264
|
+
if (isValidForm.value) {
|
|
252
265
|
emit("click:submitButton");
|
|
253
266
|
}
|
|
254
267
|
};
|
|
@@ -256,17 +269,23 @@ export default defineComponent({
|
|
|
256
269
|
const onValidate = () => {
|
|
257
270
|
emit("click:validateButton");
|
|
258
271
|
};
|
|
272
|
+
|
|
273
|
+
watch(() => isValidForm.value, () => {
|
|
274
|
+
emit("update:isValidForm", isValidForm.value);
|
|
275
|
+
}, { immediate: true });
|
|
259
276
|
|
|
260
277
|
return {
|
|
278
|
+
resetFormValidation,
|
|
261
279
|
validateLabel,
|
|
280
|
+
validateForm,
|
|
281
|
+
isValidForm,
|
|
262
282
|
cancelLabel,
|
|
263
283
|
submitLabel,
|
|
284
|
+
onValidate,
|
|
264
285
|
ColorEnum,
|
|
265
286
|
maxHeight,
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
onValidate,
|
|
269
|
-
onSubmit
|
|
287
|
+
onSubmit,
|
|
288
|
+
formRef
|
|
270
289
|
};
|
|
271
290
|
}
|
|
272
291
|
});
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
v-bind="$attrs"
|
|
6
6
|
>
|
|
7
7
|
<FSCard
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
gap="24px"
|
|
8
|
+
:padding="$props.padding"
|
|
9
|
+
:gap="$props.gap"
|
|
11
10
|
:color="$props.color"
|
|
12
11
|
:class="classes"
|
|
13
12
|
>
|
|
@@ -38,11 +37,21 @@ export default defineComponent({
|
|
|
38
37
|
FSCard
|
|
39
38
|
},
|
|
40
39
|
props: {
|
|
41
|
-
|
|
40
|
+
classes: {
|
|
42
41
|
type: [Array, String] as PropType<string[] | string | null>,
|
|
43
42
|
required: false,
|
|
44
43
|
default: null
|
|
45
44
|
},
|
|
45
|
+
padding: {
|
|
46
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
47
|
+
required: false,
|
|
48
|
+
default: "8px"
|
|
49
|
+
},
|
|
50
|
+
gap: {
|
|
51
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
52
|
+
required: false,
|
|
53
|
+
default: "24px"
|
|
54
|
+
},
|
|
46
55
|
modelValue: {
|
|
47
56
|
type: Boolean,
|
|
48
57
|
required: false,
|
|
@@ -60,12 +69,12 @@ export default defineComponent({
|
|
|
60
69
|
|
|
61
70
|
const classes = computed((): string[] => {
|
|
62
71
|
const classNames = ["fs-dialog-menu"];
|
|
63
|
-
if (props.
|
|
64
|
-
if (Array.isArray(props.
|
|
65
|
-
classNames.push(...props.
|
|
72
|
+
if (props.classes) {
|
|
73
|
+
if (Array.isArray(props.classes)) {
|
|
74
|
+
classNames.push(...props.classes);
|
|
66
75
|
}
|
|
67
76
|
else {
|
|
68
|
-
classNames.push(props.
|
|
77
|
+
classNames.push(props.classes);
|
|
69
78
|
}
|
|
70
79
|
}
|
|
71
80
|
return classNames;
|