@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
|
@@ -1,60 +1,68 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
:modelValue="currentStep - 1"
|
|
2
|
+
<FSCol
|
|
3
|
+
gap="24px"
|
|
5
4
|
>
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
<FSPagination
|
|
6
|
+
width="calc(100% - 16px)"
|
|
7
|
+
:pages="$props.steps"
|
|
8
|
+
:modelValue="currentStep - 1"
|
|
9
|
+
/>
|
|
10
|
+
<FSWindow
|
|
11
|
+
width="100%"
|
|
12
|
+
:modelValue="currentStep - 1"
|
|
12
13
|
>
|
|
13
|
-
<
|
|
14
|
-
|
|
14
|
+
<FSForm
|
|
15
|
+
v-for="(step, index) in $props.steps"
|
|
16
|
+
:variant="$props.variant"
|
|
17
|
+
:key="index"
|
|
18
|
+
@submit="onSubmit"
|
|
19
|
+
v-model="valid"
|
|
15
20
|
>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
:maxHeight="maxHeight"
|
|
21
|
+
<FSCol
|
|
22
|
+
gap="24px"
|
|
19
23
|
>
|
|
20
|
-
<
|
|
21
|
-
:
|
|
22
|
-
/>
|
|
23
|
-
</FSFadeOut>
|
|
24
|
-
<FSRow
|
|
25
|
-
padding="0 16px 0 0"
|
|
26
|
-
>
|
|
27
|
-
<slot
|
|
28
|
-
name="left-footer"
|
|
29
|
-
/>
|
|
30
|
-
<FSRow
|
|
31
|
-
class="fs-dialog-actions"
|
|
32
|
-
align="top-right"
|
|
33
|
-
:wrap="false"
|
|
24
|
+
<FSFadeOut
|
|
25
|
+
:maxHeight="maxHeight"
|
|
34
26
|
>
|
|
35
|
-
<
|
|
36
|
-
:
|
|
37
|
-
:appendIcon="$props.cancelButtonAppendIcon"
|
|
38
|
-
:variant="$props.cancelButtonVariant"
|
|
39
|
-
:color="$props.cancelButtonColor"
|
|
40
|
-
:label="previousButtonLabel"
|
|
41
|
-
@click="onPrevious()"
|
|
27
|
+
<slot
|
|
28
|
+
:name="`step-${step}`"
|
|
42
29
|
/>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
:color="$props.submitButtonColor"
|
|
48
|
-
:variant="nextButtonVariant"
|
|
49
|
-
:editable="$props.editable"
|
|
50
|
-
:label="nextButtonLabel"
|
|
51
|
-
:load="$props.load"
|
|
30
|
+
</FSFadeOut>
|
|
31
|
+
<FSRow>
|
|
32
|
+
<slot
|
|
33
|
+
name="left-footer"
|
|
52
34
|
/>
|
|
35
|
+
<FSRow
|
|
36
|
+
class="fs-dialog-actions"
|
|
37
|
+
align="top-right"
|
|
38
|
+
:wrap="false"
|
|
39
|
+
>
|
|
40
|
+
<FSButton
|
|
41
|
+
v-if="$props.showCancelButton || currentStep > 1"
|
|
42
|
+
:prependIcon="$props.cancelButtonPrependIcon"
|
|
43
|
+
:appendIcon="$props.cancelButtonAppendIcon"
|
|
44
|
+
:variant="$props.cancelButtonVariant"
|
|
45
|
+
:color="$props.cancelButtonColor"
|
|
46
|
+
:label="previousButtonLabel"
|
|
47
|
+
@click="onPrevious()"
|
|
48
|
+
/>
|
|
49
|
+
<FSButton
|
|
50
|
+
v-if="$props.showSubmitButton || currentStep < $props.steps"
|
|
51
|
+
type="submit"
|
|
52
|
+
:prependIcon="$props.submitButtonPrependIcon"
|
|
53
|
+
:appendIcon="$props.submitButtonAppendIcon"
|
|
54
|
+
:color="$props.submitButtonColor"
|
|
55
|
+
:variant="nextButtonVariant"
|
|
56
|
+
:editable="$props.editable"
|
|
57
|
+
:label="nextButtonLabel"
|
|
58
|
+
:load="$props.load"
|
|
59
|
+
/>
|
|
60
|
+
</FSRow>
|
|
53
61
|
</FSRow>
|
|
54
|
-
</
|
|
55
|
-
</
|
|
56
|
-
</
|
|
57
|
-
</
|
|
62
|
+
</FSCol>
|
|
63
|
+
</FSForm>
|
|
64
|
+
</FSWindow>
|
|
65
|
+
</FSCol>
|
|
58
66
|
</template>
|
|
59
67
|
|
|
60
68
|
<script lang="ts">
|
|
@@ -64,17 +72,21 @@ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui
|
|
|
64
72
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
65
73
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
66
74
|
|
|
75
|
+
import FSPagination from "./FSPagination.vue";
|
|
67
76
|
import FSFadeOut from "./FSFadeOut.vue";
|
|
68
77
|
import FSButton from "./FSButton.vue";
|
|
69
78
|
import FSForm from "./FSForm.vue";
|
|
79
|
+
import FSCol from "./FSCol.vue";
|
|
70
80
|
import FSRow from "./FSRow.vue";
|
|
71
81
|
|
|
72
82
|
export default defineComponent({
|
|
73
83
|
name: "FSDialogMultiFormBody",
|
|
74
84
|
components: {
|
|
85
|
+
FSPagination,
|
|
75
86
|
FSFadeOut,
|
|
76
87
|
FSButton,
|
|
77
88
|
FSForm,
|
|
89
|
+
FSCol,
|
|
78
90
|
FSRow
|
|
79
91
|
},
|
|
80
92
|
props: {
|
|
@@ -97,6 +109,11 @@ export default defineComponent({
|
|
|
97
109
|
type: Number,
|
|
98
110
|
required: true
|
|
99
111
|
},
|
|
112
|
+
showCancelButton: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
required: false,
|
|
115
|
+
default: true
|
|
116
|
+
},
|
|
100
117
|
cancelButtonPrependIcon: {
|
|
101
118
|
type: String as PropType<string | null>,
|
|
102
119
|
required: false,
|
|
@@ -122,6 +139,11 @@ export default defineComponent({
|
|
|
122
139
|
required: false,
|
|
123
140
|
default: ColorEnum.Light
|
|
124
141
|
},
|
|
142
|
+
showSubmitButton: {
|
|
143
|
+
type: Boolean,
|
|
144
|
+
required: false,
|
|
145
|
+
default: true
|
|
146
|
+
},
|
|
125
147
|
submitButtonPrependIcon: {
|
|
126
148
|
type: String as PropType<string | null>,
|
|
127
149
|
required: false,
|
|
@@ -170,21 +192,22 @@ export default defineComponent({
|
|
|
170
192
|
const maxHeight = computed(() => {
|
|
171
193
|
const other = 24 + 24 // Paddings
|
|
172
194
|
+ (isMobileSized.value ? 24 : 32) + 24 // Title
|
|
173
|
-
+ (props.subtitle ? (isMobileSized.value ?
|
|
195
|
+
+ (props.subtitle ? (isMobileSized.value ? 16 : 20) + 8 : 0) // Subtitle
|
|
196
|
+
+ (props.steps > 1 ? 24 + 4 : 0) // Pagination
|
|
174
197
|
+ (isMobileSized.value ? 36 : 40) + 24; // Footer
|
|
175
|
-
return `calc(100vh -
|
|
198
|
+
return `calc(100vh - 42px - ${other}px)`;
|
|
176
199
|
});
|
|
177
200
|
|
|
178
201
|
const previousButtonLabel = computed(() => {
|
|
179
202
|
return currentStep.value == 1
|
|
180
|
-
? props.cancelButtonLabel ?? $tr("ui.
|
|
181
|
-
: $tr("ui.
|
|
203
|
+
? props.cancelButtonLabel ?? $tr("ui.common.cancel", "Cancel")
|
|
204
|
+
: $tr("ui.common.back", "Back");
|
|
182
205
|
});
|
|
183
206
|
|
|
184
207
|
const nextButtonLabel = computed(() => {
|
|
185
208
|
return currentStep.value == props.steps
|
|
186
|
-
? props.submitButtonLabel ?? $tr("ui.
|
|
187
|
-
: $tr("ui.
|
|
209
|
+
? props.submitButtonLabel ?? $tr("ui.common.validate", "Validate")
|
|
210
|
+
: $tr("ui.common.next", "Next");
|
|
188
211
|
});
|
|
189
212
|
|
|
190
213
|
const nextButtonVariant = computed(() => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDialogSubmit
|
|
3
|
+
width="460px"
|
|
3
4
|
:title="title"
|
|
4
|
-
:submitButtonLabel="$tr('ui.
|
|
5
|
+
:submitButtonLabel="$tr('ui.common.remove', 'Remove')"
|
|
5
6
|
:submitButtonColor="ColorEnum.Error"
|
|
6
7
|
:modelValue="$props.modelValue"
|
|
7
8
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -20,20 +21,20 @@
|
|
|
20
21
|
mdi-alert-outline
|
|
21
22
|
</FSIcon>
|
|
22
23
|
<FSRow
|
|
23
|
-
gap="
|
|
24
|
+
gap="4px"
|
|
24
25
|
>
|
|
25
26
|
<FSSpan>
|
|
26
|
-
{{ $tr("
|
|
27
|
+
{{ $tr("dialog-remove.body-regular", "This action is") }}
|
|
27
28
|
</FSSpan>
|
|
28
29
|
<FSSpan
|
|
29
30
|
font="text-button"
|
|
30
31
|
>
|
|
31
|
-
{{ $tr("
|
|
32
|
+
{{ $tr("dialog-remove.body-bold", "definitive") }}
|
|
32
33
|
</FSSpan>
|
|
33
34
|
</FSRow>
|
|
34
35
|
</FSRow>
|
|
35
36
|
<FSSpan>
|
|
36
|
-
{{ $tr("
|
|
37
|
+
{{ $tr("dialog-remove.final-warning", "Once removed, entities won't be retrievable") }}
|
|
37
38
|
</FSSpan>
|
|
38
39
|
</FSCol>
|
|
39
40
|
</template>
|
|
@@ -42,7 +43,6 @@
|
|
|
42
43
|
v-if="$props.removing"
|
|
43
44
|
>
|
|
44
45
|
<FSRow
|
|
45
|
-
padding="0 16px 0 0"
|
|
46
46
|
align="center-right"
|
|
47
47
|
:height="footerHeight"
|
|
48
48
|
>
|
|
@@ -108,10 +108,10 @@ export default defineComponent({
|
|
|
108
108
|
|
|
109
109
|
const title = computed((): string => {
|
|
110
110
|
if (props.removeTotal > 1) {
|
|
111
|
-
return $tr("
|
|
111
|
+
return $tr("dialog-remove.remove-plural", "Remove {0} entities", props.removeTotal.toString());
|
|
112
112
|
}
|
|
113
113
|
else {
|
|
114
|
-
return $tr("
|
|
114
|
+
return $tr("dialog-remove.remove-singular", "Remove an entity");
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
117
|
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
#body
|
|
12
12
|
>
|
|
13
13
|
<FSFadeOut
|
|
14
|
-
padding="0 8px 0 0"
|
|
15
14
|
:maxHeight="maxHeight"
|
|
16
15
|
>
|
|
17
16
|
<slot
|
|
@@ -25,9 +24,7 @@
|
|
|
25
24
|
<slot
|
|
26
25
|
name="footer"
|
|
27
26
|
>
|
|
28
|
-
<FSRow
|
|
29
|
-
padding="0 16px 0 0"
|
|
30
|
-
>
|
|
27
|
+
<FSRow>
|
|
31
28
|
<slot
|
|
32
29
|
name="left-footer"
|
|
33
30
|
/>
|
|
@@ -36,6 +33,7 @@
|
|
|
36
33
|
:wrap="false"
|
|
37
34
|
>
|
|
38
35
|
<FSButton
|
|
36
|
+
v-if="$props.showCancelButton"
|
|
39
37
|
:prependIcon="$props.cancelButtonPrependIcon"
|
|
40
38
|
:appendIcon="$props.cancelButtonAppendIcon"
|
|
41
39
|
:variant="$props.cancelButtonVariant"
|
|
@@ -44,6 +42,7 @@
|
|
|
44
42
|
@click="$emit('update:modelValue', false)"
|
|
45
43
|
/>
|
|
46
44
|
<FSButton
|
|
45
|
+
v-if="$props.showSubmitButton"
|
|
47
46
|
:prependIcon="$props.submitButtonPrependIcon"
|
|
48
47
|
:appendIcon="$props.submitButtonAppendIcon"
|
|
49
48
|
:variant="$props.submitButtonVariant"
|
|
@@ -101,6 +100,11 @@ export default defineComponent({
|
|
|
101
100
|
required: false,
|
|
102
101
|
default: false
|
|
103
102
|
},
|
|
103
|
+
showCancelButton: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
required: false,
|
|
106
|
+
default: true
|
|
107
|
+
},
|
|
104
108
|
cancelButtonPrependIcon: {
|
|
105
109
|
type: String as PropType<string | null>,
|
|
106
110
|
required: false,
|
|
@@ -126,6 +130,11 @@ export default defineComponent({
|
|
|
126
130
|
required: false,
|
|
127
131
|
default: ColorEnum.Light
|
|
128
132
|
},
|
|
133
|
+
showSubmitButton: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
required: false,
|
|
136
|
+
default: true
|
|
137
|
+
},
|
|
129
138
|
submitButtonPrependIcon: {
|
|
130
139
|
type: String as PropType<string | null>,
|
|
131
140
|
required: false,
|
|
@@ -170,17 +179,17 @@ export default defineComponent({
|
|
|
170
179
|
const maxHeight = computed(() => {
|
|
171
180
|
const other = 24 + 24 // Paddings
|
|
172
181
|
+ (isMobileSized.value ? 24 : 32) + 24 // Title
|
|
173
|
-
+ (props.subtitle ? (isMobileSized.value ?
|
|
182
|
+
+ (props.subtitle ? (isMobileSized.value ? 16 : 20) + 8 : 0) // Subtitle
|
|
174
183
|
+ (isMobileSized.value ? 36 : 40) + 24; // Footer
|
|
175
|
-
return `calc(100vh -
|
|
184
|
+
return `calc(100vh - 42px - ${other}px)`;
|
|
176
185
|
});
|
|
177
186
|
|
|
178
187
|
const cancelLabel = computed(() => {
|
|
179
|
-
return props.cancelButtonLabel ?? $tr("ui.
|
|
188
|
+
return props.cancelButtonLabel ?? $tr("ui.common.cancel", "Cancel");
|
|
180
189
|
});
|
|
181
190
|
|
|
182
191
|
const submitLabel = computed(() => {
|
|
183
|
-
return props.submitButtonLabel ?? $tr("ui.
|
|
192
|
+
return props.submitButtonLabel ?? $tr("ui.common.validate", "Validate");
|
|
184
193
|
});
|
|
185
194
|
|
|
186
195
|
return {
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
:wrap="false"
|
|
40
40
|
>
|
|
41
41
|
<FSRow
|
|
42
|
+
class="fs-edit-image-standard-row"
|
|
42
43
|
gap="24px"
|
|
43
44
|
:wrap="false"
|
|
44
45
|
>
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
:width="$props.width"
|
|
60
61
|
/>
|
|
61
62
|
<FSCol
|
|
63
|
+
class="fs-edit-image-standard-label-wrapper"
|
|
62
64
|
align="center-left"
|
|
63
65
|
height="fill"
|
|
64
66
|
width="hug"
|
|
@@ -79,24 +81,24 @@
|
|
|
79
81
|
font="text-overline"
|
|
80
82
|
:style="style"
|
|
81
83
|
>
|
|
82
|
-
{{ $tr('
|
|
84
|
+
{{ $tr('edit-image.format', 'PNG or JPG format') }}
|
|
83
85
|
</FSText>
|
|
84
86
|
<FSText
|
|
85
87
|
class="fs-edit-image-overline"
|
|
86
88
|
font="text-overline"
|
|
87
89
|
:style="style"
|
|
88
90
|
>
|
|
89
|
-
{{ $tr('
|
|
91
|
+
{{ $tr('edit-image.max-size', '10 MB Maximum') }}
|
|
90
92
|
</FSText>
|
|
91
93
|
</FSCol>
|
|
92
94
|
</FSCol>
|
|
93
95
|
</FSRow>
|
|
94
|
-
<v-spacer />
|
|
95
96
|
<FSRow
|
|
96
|
-
|
|
97
|
+
align="center-right"
|
|
98
|
+
:width="isExtraSmall ? '40px' : 'hug'"
|
|
97
99
|
>
|
|
98
100
|
<FSButtonFileMini
|
|
99
|
-
accept="
|
|
101
|
+
accept=".jpg,.jpeg,.png"
|
|
100
102
|
:readFile="false"
|
|
101
103
|
@update:metadata="onUpload"
|
|
102
104
|
/>
|
|
@@ -124,7 +126,7 @@
|
|
|
124
126
|
padding="4px"
|
|
125
127
|
>
|
|
126
128
|
<FSButtonFileMini
|
|
127
|
-
accept="
|
|
129
|
+
accept=".jpg,.jpeg,.png"
|
|
128
130
|
:readFile="false"
|
|
129
131
|
@update:metadata="onUpload"
|
|
130
132
|
/>
|
|
@@ -152,12 +154,12 @@
|
|
|
152
154
|
font="text-body"
|
|
153
155
|
:lineClamp="2"
|
|
154
156
|
>
|
|
155
|
-
{{ $tr('
|
|
157
|
+
{{ $tr('edit-image.add-image', 'Add an image.') }}
|
|
156
158
|
</FSText>
|
|
157
159
|
<FSButtonFileMini
|
|
158
160
|
class="fs-edit-image-hidden-button"
|
|
159
161
|
ref="invisibleButtonRef"
|
|
160
|
-
accept="
|
|
162
|
+
accept=".jpg,.jpeg,.png"
|
|
161
163
|
:readFile="false"
|
|
162
164
|
@update:metadata="onUpload"
|
|
163
165
|
/>
|
|
@@ -241,7 +243,7 @@ export default defineComponent({
|
|
|
241
243
|
default: false
|
|
242
244
|
}
|
|
243
245
|
},
|
|
244
|
-
emits: ["update:modelValue", "update:source"],
|
|
246
|
+
emits: ["update", "update:modelValue", "update:source"],
|
|
245
247
|
setup(props, { emit }) {
|
|
246
248
|
const { isExtraSmall } = useBreakpoints();
|
|
247
249
|
const { getColors } = useColors();
|
|
@@ -264,9 +266,15 @@ export default defineComponent({
|
|
|
264
266
|
const content = (await readFile(payload)) as string;
|
|
265
267
|
fileSelected.value.fileName = payload.name;
|
|
266
268
|
fileSelected.value.fileContent = content;
|
|
267
|
-
|
|
269
|
+
const newModelValue = content.substring(content.indexOf(',') + 1);
|
|
268
270
|
if (props.source) {
|
|
271
|
+
emit("update:modelValue", newModelValue);
|
|
269
272
|
emit("update:source", null);
|
|
273
|
+
emit("update", { source: null, modelValue: newModelValue });
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
emit("update:modelValue", newModelValue);
|
|
277
|
+
emit("update", { source: props.source, modelValue: newModelValue });
|
|
270
278
|
}
|
|
271
279
|
};
|
|
272
280
|
|
|
@@ -275,9 +283,11 @@ export default defineComponent({
|
|
|
275
283
|
fileSelected.value.fileContent = null;
|
|
276
284
|
if (props.modelValue) {
|
|
277
285
|
emit("update:modelValue", null);
|
|
286
|
+
emit("update", { source: props.source, modelValue: null });
|
|
278
287
|
}
|
|
279
288
|
else {
|
|
280
289
|
emit("update:source", null);
|
|
290
|
+
emit("update", { source: null, modelValue: props.modelValue });
|
|
281
291
|
}
|
|
282
292
|
};
|
|
283
293
|
|
package/components/FSFadeOut.vue
CHANGED
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
class="fs-fade-out"
|
|
4
4
|
ref="fadeOutRef"
|
|
5
5
|
:id="elementId"
|
|
6
|
-
|
|
7
|
-
@scroll="debounceMasks"
|
|
6
|
+
@scroll="$emit('scroll', $event); debounceMasks()"
|
|
8
7
|
>
|
|
9
8
|
<slot />
|
|
10
9
|
</div>
|
|
11
10
|
</template>
|
|
12
11
|
|
|
13
12
|
<script lang="ts">
|
|
14
|
-
import { computed, defineComponent, onMounted, onUnmounted, type PropType, ref,
|
|
13
|
+
import { computed, defineComponent, onMounted, onUnmounted, type PropType, ref, watch } from "vue";
|
|
15
14
|
|
|
16
15
|
import { useBreakpoints, useColors, useDebounce } from "@dative-gpi/foundation-shared-components/composables";
|
|
17
16
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -45,17 +44,41 @@ export default defineComponent({
|
|
|
45
44
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
46
45
|
required: false,
|
|
47
46
|
default: "64px"
|
|
47
|
+
},
|
|
48
|
+
scrollOutside: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
required: false,
|
|
51
|
+
default: true
|
|
52
|
+
},
|
|
53
|
+
hideHorizontalOverflow: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
required: false,
|
|
56
|
+
default: true
|
|
57
|
+
},
|
|
58
|
+
disableTopMask: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
required: false,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
63
|
+
disableBottomMask: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
required: false,
|
|
66
|
+
default: false
|
|
67
|
+
},
|
|
68
|
+
style:{
|
|
69
|
+
type: Object,
|
|
70
|
+
required: false
|
|
48
71
|
}
|
|
49
72
|
},
|
|
50
73
|
emits: ["scroll"],
|
|
51
|
-
setup(props
|
|
52
|
-
const { windowHeight, windowWidth } = useBreakpoints();
|
|
74
|
+
setup(props) {
|
|
75
|
+
const { windowHeight, windowWidth, isTouchScreenEnabled } = useBreakpoints();
|
|
53
76
|
const { debounce } = useDebounce();
|
|
54
77
|
const { getColors } = useColors();
|
|
55
78
|
|
|
56
79
|
const backgrounds = getColors(ColorEnum.Background);
|
|
57
80
|
|
|
58
|
-
const fadeOutRef = ref(null);
|
|
81
|
+
const fadeOutRef = ref<HTMLElement | null>(null);
|
|
59
82
|
const bottomMaskHeight = ref("0px");
|
|
60
83
|
const topMaskHeight = ref("0px");
|
|
61
84
|
const lastScroll = ref(0);
|
|
@@ -64,14 +87,21 @@ export default defineComponent({
|
|
|
64
87
|
|
|
65
88
|
const elementId = `id${uuidv4()}`;
|
|
66
89
|
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
90
|
+
const showOutsideScrollbar = computed(() => props.scrollOutside && !isTouchScreenEnabled.value);
|
|
91
|
+
|
|
92
|
+
const style = computed((): {[index: string]: string} => ({
|
|
93
|
+
"--fs-fade-out-height" : props.height ? sizeToVar(props.height) : "initial",
|
|
94
|
+
"--fs-fade-out-max-height" : props.maxHeight ? sizeToVar(props.maxHeight) : "initial",
|
|
70
95
|
"--fs-fade-out-width" : sizeToVar(props.width),
|
|
71
96
|
"--fs-fade-out-padding" : sizeToVar(props.padding),
|
|
97
|
+
"--fs-fade-out-width-offset" : showOutsideScrollbar.value ? '12px' : '0px',
|
|
98
|
+
"--fs-fade-out-padding-offset" : showOutsideScrollbar.value ? '4px' : '0px',
|
|
99
|
+
"--fs-fade-out-margin-right" : showOutsideScrollbar.value ? '-12px' : '0px',
|
|
72
100
|
"--fs-fade-out-mask-color" : backgrounds.base,
|
|
73
|
-
"--fs-fade-out-top-mask-height" : topMaskHeight.value,
|
|
74
|
-
"--fs-fade-out-bottom-mask-height": bottomMaskHeight.value
|
|
101
|
+
"--fs-fade-out-top-mask-height" : props.disableTopMask ? '0px' : topMaskHeight.value,
|
|
102
|
+
"--fs-fade-out-bottom-mask-height": props.disableBottomMask ? '0px' : bottomMaskHeight.value,
|
|
103
|
+
"--fs-fade-out-x-overflow" : props.hideHorizontalOverflow ? 'hidden' : 'auto',
|
|
104
|
+
...props.style
|
|
75
105
|
}));
|
|
76
106
|
|
|
77
107
|
const handleMasks = () => {
|
|
@@ -93,20 +123,13 @@ export default defineComponent({
|
|
|
93
123
|
else {
|
|
94
124
|
topMaskHeight.value = sizeToVar(props.maskHeight);
|
|
95
125
|
}
|
|
96
|
-
|
|
97
|
-
const event = {
|
|
98
|
-
target: fadeOutRef.value,
|
|
99
|
-
onTop: topMaskHeight.value === "0px",
|
|
100
|
-
onBottom: bottomMaskHeight.value === "0px",
|
|
101
|
-
goingUp: (fadeOutRef.value as any).scrollTop < lastScroll.value,
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
emit("scroll", event);
|
|
126
|
+
|
|
105
127
|
lastScroll.value = (fadeOutRef.value as any).scrollTop;
|
|
106
128
|
}
|
|
107
129
|
};
|
|
108
130
|
|
|
109
|
-
|
|
131
|
+
// Delay to wait for animations to end before computing masks
|
|
132
|
+
const debounceMasks = (): void => debounce(handleMasks, 280);
|
|
110
133
|
|
|
111
134
|
onMounted((): void => {
|
|
112
135
|
debounceMasks();
|
|
@@ -129,6 +152,15 @@ export default defineComponent({
|
|
|
129
152
|
|
|
130
153
|
watch([() => windowWidth.value, () => windowHeight.value], debounceMasks);
|
|
131
154
|
|
|
155
|
+
watch(() => [style.value, fadeOutRef.value], () => {
|
|
156
|
+
if(!fadeOutRef.value || !style.value) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
for(const key in style.value){
|
|
160
|
+
fadeOutRef.value.style.setProperty(key, style.value[key])
|
|
161
|
+
}
|
|
162
|
+
}, { immediate: true})
|
|
163
|
+
|
|
132
164
|
return {
|
|
133
165
|
fadeOutRef,
|
|
134
166
|
elementId,
|
package/components/FSForm.vue
CHANGED
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
14
|
import type { PropType} from "vue";
|
|
15
|
+
|
|
16
|
+
import type VForm from "vuetify/lib/components/VForm";
|
|
17
|
+
|
|
15
18
|
import { computed, defineComponent, provide, ref } from "vue";
|
|
16
19
|
|
|
17
20
|
export default defineComponent({
|
|
@@ -30,7 +33,7 @@ export default defineComponent({
|
|
|
30
33
|
},
|
|
31
34
|
emits: ["update:modelValue", "submit"],
|
|
32
35
|
setup(props, { emit }) {
|
|
33
|
-
const formRef = ref<
|
|
36
|
+
const formRef = ref<typeof VForm | null>(null);
|
|
34
37
|
const submitted = ref(false);
|
|
35
38
|
|
|
36
39
|
const validateOn = computed((): "submit" | "input" => {
|
|
@@ -44,25 +47,24 @@ export default defineComponent({
|
|
|
44
47
|
event.stopImmediatePropagation();
|
|
45
48
|
event.preventDefault();
|
|
46
49
|
submitted.value = true;
|
|
47
|
-
await
|
|
48
|
-
emit("update:modelValue", !!(
|
|
49
|
-
emit("submit", !!(
|
|
50
|
+
await formRef.value.validate();
|
|
51
|
+
emit("update:modelValue", !!(formRef.value.isValid ?? true));
|
|
52
|
+
emit("submit", !!(formRef.value.isValid ?? true));
|
|
50
53
|
};
|
|
51
54
|
|
|
52
55
|
const validate = async () => {
|
|
53
56
|
submitted.value = true;
|
|
54
|
-
await
|
|
55
|
-
emit("update:modelValue", !!((formRef.value as any).isValid ?? true));
|
|
57
|
+
return await formRef.value.validate();
|
|
56
58
|
};
|
|
57
59
|
|
|
58
60
|
const reset = () => {
|
|
59
61
|
submitted.value = false;
|
|
60
|
-
|
|
62
|
+
formRef.value.reset();
|
|
61
63
|
};
|
|
62
64
|
|
|
63
65
|
const resetValidation = () => {
|
|
64
66
|
submitted.value = false;
|
|
65
|
-
|
|
67
|
+
formRef.value.resetValidation();
|
|
66
68
|
};
|
|
67
69
|
|
|
68
70
|
provide("validateOn", validateOn);
|
package/components/FSGrid.vue
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
>
|
|
28
28
|
<FSText
|
|
29
29
|
:font="item.hideDefault ? 'text-body' : 'text-overline'"
|
|
30
|
+
variant="soft"
|
|
30
31
|
>
|
|
31
32
|
{{ item.label }}
|
|
32
33
|
</FSText>
|
|
@@ -51,7 +52,6 @@
|
|
|
51
52
|
</template>
|
|
52
53
|
</template>
|
|
53
54
|
</FSCol>
|
|
54
|
-
<v-spacer />
|
|
55
55
|
<FSRow
|
|
56
56
|
v-if="itemEndSlot(item.code)"
|
|
57
57
|
align="center-right"
|
package/components/FSIcon.vue
CHANGED
|
@@ -14,7 +14,8 @@ import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
|
14
14
|
|
|
15
15
|
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
16
16
|
import { type ColorBase } from "@dative-gpi/foundation-shared-components/models";
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
import { sizeToVar } from "../utils";
|
|
18
19
|
|
|
19
20
|
export default defineComponent({
|
|
20
21
|
name: "FSIcon",
|