@dative-gpi/foundation-shared-components 1.0.65 → 1.0.67-map-edit
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/images/map/snow.png +0 -0
- package/components/FSAccordionPanel.vue +40 -21
- package/components/FSBreadcrumbs.vue +21 -12
- package/components/FSButton.vue +11 -9
- package/components/FSCalendar.vue +50 -12
- package/components/FSCalendarTwin.vue +95 -43
- package/components/FSCard.vue +61 -9
- package/components/FSCardPlaceholder.vue +8 -5
- package/components/FSCheckbox.vue +5 -4
- package/components/FSChip.vue +73 -45
- package/components/FSChipGroup.vue +69 -0
- package/components/FSClickable.vue +11 -9
- package/components/FSClock.vue +30 -12
- package/components/FSCol.vue +11 -5
- package/components/FSDialog.vue +2 -1
- package/components/FSDialogContent.vue +12 -11
- package/components/FSDialogForm.vue +22 -2
- package/components/FSDialogFormBody.vue +50 -31
- package/components/FSDialogMenu.vue +17 -8
- package/components/FSDialogMultiFormBody.vue +23 -13
- package/components/FSDialogRemove.vue +7 -8
- package/components/FSDialogSubmit.vue +20 -11
- package/components/FSEditImageUI.vue +13 -5
- package/components/FSFadeOut.vue +53 -21
- package/components/FSForm.vue +10 -8
- package/components/FSGrid.vue +0 -1
- package/components/FSIcon.vue +2 -2
- package/components/FSIconCard.vue +68 -12
- package/components/FSInformationsMenu.vue +142 -0
- package/components/FSInstantPicker.vue +268 -0
- package/components/FSLink.vue +25 -9
- package/components/FSLoader.vue +28 -10
- package/components/FSMenu.vue +47 -0
- package/components/FSOptionGroup.vue +8 -8
- package/components/FSOptionItem.vue +4 -4
- package/components/FSOptionsMenu.vue +165 -0
- package/components/FSPagination.vue +1 -1
- package/components/FSPlayButtons.vue +72 -0
- package/components/FSProgressBar.vue +94 -0
- package/components/FSRadio.vue +5 -4
- package/components/FSRadioGroup.vue +3 -3
- package/components/FSRangePicker.vue +275 -0
- package/components/FSRangeSlider.vue +84 -0
- package/components/FSRouterLink.vue +42 -0
- package/components/FSSlideGroup.vue +19 -5
- package/components/FSSlider.vue +44 -79
- package/components/FSSpan.vue +12 -7
- package/components/FSSwitch.vue +44 -48
- package/components/FSTab.vue +15 -13
- package/components/FSTabs.vue +32 -7
- package/components/FSTag.vue +3 -3
- package/components/FSTagGroup.vue +6 -4
- package/components/FSText.vue +11 -7
- package/components/FSToggleSet.vue +7 -7
- package/components/FSWindow.vue +122 -5
- package/components/FSWrapGroup.vue +13 -1
- package/components/agenda/FSAgenda.vue +26 -7
- package/components/agenda/FSAgendaDialogCalendar.vue +2 -2
- package/components/agenda/FSAgendaHeader.vue +35 -10
- package/components/agenda/FSAgendaHorizontalEvent.vue +18 -6
- package/components/agenda/FSAgendaHoursRow.vue +48 -8
- package/components/agenda/FSAgendaVerticalEvent.vue +1 -1
- package/components/agenda/FSDayAgenda.vue +0 -1
- package/components/agenda/FSMonthAgenda.vue +1 -6
- package/components/agenda/FSSelectAgendaMode.vue +2 -2
- package/components/agenda/FSWeekAgenda.vue +5 -10
- package/components/autocompletes/FSAutoCompleteAddress.vue +25 -20
- package/components/autocompletes/FSAutocompleteLanguage.vue +7 -1
- package/components/autocompletes/FSAutocompleteTimeZone.vue +7 -1
- package/components/buttons/FSButtonAdd.vue +1 -1
- package/components/buttons/FSButtonAddLabel.vue +1 -1
- package/components/buttons/FSButtonCancel.vue +1 -1
- package/components/buttons/FSButtonCancelLabel.vue +1 -1
- package/components/buttons/FSButtonCheckbox.vue +4 -4
- package/components/buttons/FSButtonCopy.vue +1 -1
- package/components/buttons/FSButtonCopyLabel.vue +1 -1
- package/components/buttons/FSButtonDuplicate.vue +1 -1
- package/components/buttons/FSButtonDuplicateLabel.vue +1 -1
- package/components/buttons/FSButtonEdit.vue +1 -1
- package/components/buttons/FSButtonEditLabel.vue +1 -1
- package/components/buttons/FSButtonFile.vue +1 -1
- package/components/buttons/FSButtonFileLabel.vue +1 -1
- package/components/buttons/FSButtonNext.vue +1 -1
- package/components/buttons/FSButtonNextLabel.vue +1 -1
- package/components/buttons/FSButtonPrevious.vue +1 -1
- package/components/buttons/FSButtonPreviousLabel.vue +1 -1
- package/components/buttons/FSButtonRedo.vue +1 -1
- package/components/buttons/FSButtonRedoLabel.vue +1 -1
- package/components/buttons/FSButtonRemove.vue +1 -1
- package/components/buttons/FSButtonRemoveLabel.vue +1 -1
- package/components/buttons/FSButtonSave.vue +1 -1
- package/components/buttons/FSButtonSaveLabel.vue +1 -1
- package/components/buttons/FSButtonSearch.vue +1 -1
- package/components/buttons/FSButtonSearchLabel.vue +1 -1
- package/components/buttons/FSButtonUndo.vue +1 -1
- package/components/buttons/FSButtonUndoLabel.vue +1 -1
- package/components/buttons/FSButtonUpdate.vue +1 -1
- package/components/buttons/FSButtonUpdateLabel.vue +1 -1
- package/components/buttons/FSButtonValidate.vue +1 -1
- package/components/buttons/FSButtonValidateLabel.vue +1 -1
- package/components/calendar/FSSimpleCalendar.vue +145 -0
- package/components/calendar/FSSimpleCalendarHeader.vue +60 -0
- package/components/calendar/FSSimpleMonthSelector.vue +138 -0
- package/components/deviceOrganisations/FSConnectivity.vue +5 -3
- package/components/deviceOrganisations/FSStatus.vue +5 -3
- package/components/deviceOrganisations/FSStatusCard.vue +7 -9
- package/components/deviceOrganisations/FSStatusRichCard.vue +171 -0
- package/components/deviceOrganisations/FSWorstAlert.vue +24 -36
- package/components/deviceOrganisations/FSWorstAlertCard.vue +8 -47
- package/components/fields/FSAutocompleteField.vue +85 -82
- package/components/fields/FSAutocompleteTag.vue +1 -1
- package/components/fields/FSBaseField.vue +42 -25
- package/components/fields/FSClosableSearchField.vue +83 -0
- package/components/fields/FSColorField.vue +12 -10
- package/components/fields/FSCommentField.vue +28 -16
- package/components/fields/FSDateField.vue +13 -10
- package/components/fields/FSDateRangeField.vue +6 -5
- package/components/fields/FSDateTimeField.vue +14 -11
- package/components/fields/FSDateTimeRangeDialog.vue +160 -0
- package/components/fields/FSDateTimeRangeField.vue +23 -115
- package/components/fields/FSEntityFieldUI.vue +19 -16
- package/components/fields/FSGradientField.vue +5 -5
- package/components/fields/FSIconField.vue +16 -9
- package/components/fields/FSMagicConfigField.vue +15 -7
- package/components/fields/FSMagicField.vue +7 -2
- package/components/fields/FSNumberField.vue +8 -4
- package/components/fields/FSPasswordField.vue +7 -7
- package/components/fields/FSRichTextField.vue +78 -58
- package/components/fields/FSSearchField.vue +9 -115
- package/components/fields/FSSelectField.vue +69 -71
- package/components/fields/FSTagField.vue +9 -9
- package/components/fields/FSTermField.vue +69 -46
- package/components/fields/FSTextArea.vue +17 -11
- package/components/fields/FSTextField.vue +15 -10
- package/components/fields/FSTimeField.vue +14 -10
- package/components/fields/FSTimeRangeField.vue +310 -0
- package/components/fields/FSTimeStepField.vue +5 -5
- package/components/fields/FSTranslateField.vue +10 -10
- package/components/fields/FSTranslateRichTextField.vue +41 -20
- package/components/fields/FSTranslateTextArea.vue +10 -10
- package/components/fields/FSTreeViewField.vue +15 -13
- package/components/fields/periodicField/FSPeriodicDailyField.vue +7 -7
- package/components/fields/periodicField/FSPeriodicField.vue +15 -15
- package/components/fields/periodicField/FSPeriodicMonthlyField.vue +16 -16
- package/components/fields/periodicField/FSPeriodicWeeklyField.vue +28 -18
- package/components/fields/periodicField/FSPeriodicYearlyField.vue +12 -12
- package/components/lists/FSDataIteratorItem.vue +23 -67
- package/components/lists/FSDataTableUI.vue +198 -123
- package/components/lists/FSDraggable.vue +2 -2
- package/components/lists/FSFilterButton.vue +14 -16
- package/components/lists/FSHeaderButton.vue +11 -9
- package/components/lists/FSHiddenButton.vue +9 -9
- package/components/lists/FSLoadDataTable.vue +10 -7
- package/components/lists/FSSimpleList.vue +95 -88
- package/components/lists/FSSimpleListItem.vue +131 -0
- package/components/map/FSMap.vue +144 -158
- package/components/map/FSMapEditLocationAddress.vue +189 -0
- package/components/map/FSMapFeatureGroup.vue +7 -1
- package/components/map/FSMapLayerButton.vue +4 -3
- package/components/map/FSMapMarker.vue +103 -42
- package/components/map/FSMapMarkerClusterGroup.vue +32 -7
- package/components/map/FSMapOverlay.vue +44 -24
- package/components/map/FSMapPolygon.vue +16 -4
- package/components/map/FSMapTileLayer.vue +26 -9
- package/components/map/layers.ts +0 -0
- package/components/selects/FSSelectAutoRefresh.vue +8 -8
- package/components/selects/FSSelectDashboardVariableType.vue +4 -3
- package/components/selects/FSSelectDateSetting.vue +2 -2
- package/components/selects/FSSelectDays.vue +8 -8
- package/components/selects/FSSelectListMode.vue +2 -2
- package/components/selects/FSSelectMapLayer.vue +68 -0
- package/components/selects/FSSelectMonths.vue +13 -13
- package/components/selects/chartSelectors/FSAggregationSelector.vue +52 -0
- package/components/selects/chartSelectors/FSAxisTypeSelector.vue +49 -0
- package/components/selects/chartSelectors/FSDisplayAsSelector.vue +53 -0
- package/components/selects/chartSelectors/FSFilterTypeSelector.vue +54 -0
- package/components/selects/chartSelectors/FSHeatmapRuleSelector.vue +54 -0
- package/components/selects/chartSelectors/FSOperationOnSelector.vue +53 -0
- package/components/selects/chartSelectors/FSPlanningTypeSelector.vue +53 -0
- package/components/selects/chartSelectors/FSPlotPerSelector.vue +52 -0
- package/components/selects/chartSelectors/FSSelectEntityType.vue +59 -0
- package/components/selects/chartSelectors/FSSerieTypeSelector.vue +53 -0
- package/components/tiles/FSAlertTileUI.vue +90 -0
- package/components/tiles/FSChartTileUI.vue +61 -52
- package/components/tiles/FSCommentTileUI.vue +38 -13
- package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +14 -2
- package/components/tiles/FSDashboardShallowTileUI.vue +14 -2
- package/components/tiles/FSDeviceOrganisationTileUI.vue +0 -6
- package/components/tiles/FSEntityCountBadge.vue +72 -0
- package/components/tiles/FSFolderTileUI.vue +38 -4
- package/components/tiles/FSGroupTileUI.vue +32 -136
- package/components/tiles/FSLoadTile.vue +16 -10
- package/components/tiles/FSLocationTileUI.vue +45 -63
- package/components/tiles/FSServiceAccountOrganisationTileUI.vue +0 -6
- package/components/tiles/FSSimpleTileUI.vue +30 -24
- package/components/tiles/FSTile.vue +46 -39
- package/components/tiles/FSUserOrganisationTileUI.vue +1 -7
- package/components/tiles/FSUserTileUI.vue +119 -0
- package/components/toggleSets/FSToggleSetPosition.vue +1 -1
- package/components/views/FSBaseView.vue +64 -0
- package/components/views/FSEntityView.vue +12 -146
- package/components/views/FSSimpleView.vue +29 -0
- package/components/views/desktop/FSBaseDefaultDesktopView.vue +135 -0
- package/components/views/desktop/FSBaseDesktopView.vue +53 -0
- package/components/views/desktop/FSBaseEntityDesktopView.vue +211 -0
- package/components/views/mobile/FSBaseDefaultMobileView.vue +133 -0
- package/components/views/mobile/FSBaseEntityMobileView.vue +206 -0
- package/components/views/mobile/FSBaseMobileView.vue +53 -0
- package/composables/index.ts +1 -0
- package/composables/useAddress.ts +40 -8
- package/composables/useBreakpoints.ts +40 -4
- package/composables/useColors.ts +16 -7
- package/composables/useMagicFieldProvider.ts +1 -0
- package/composables/useMapLayers.ts +69 -0
- package/composables/useSlots.ts +2 -1
- package/models/colors.ts +2 -1
- package/models/deviceAlerts.ts +1 -0
- package/models/magicFields.ts +1 -0
- package/models/map.ts +12 -10
- package/models/rules.ts +5 -2
- package/models/tables.ts +2 -1
- package/models/variableNode.ts +8 -5
- package/package.json +5 -5
- package/styles/components/fs_agenda.scss +4 -0
- package/styles/components/fs_agenda_event.scss +1 -1
- package/styles/components/fs_agenda_hours_row.scss +0 -8
- package/styles/components/fs_autocomplete_field.scss +0 -13
- package/styles/components/fs_breadcrumbs.scss +18 -36
- package/styles/components/fs_button.scss +7 -5
- package/styles/components/fs_calendar.scss +1 -0
- package/styles/components/fs_card.scss +9 -0
- package/styles/components/fs_chip.scss +13 -7
- package/styles/components/fs_clickable.scss +16 -23
- package/styles/components/fs_clock.scss +0 -10
- package/styles/components/fs_col.scss +1 -1
- package/styles/components/fs_color_field.scss +0 -4
- package/styles/components/fs_data_table.scss +6 -9
- package/styles/components/fs_dialog.scss +4 -10
- package/styles/components/fs_dialog_menu.scss +4 -2
- package/styles/components/fs_draggable.scss +0 -5
- package/styles/components/fs_fade_out.scss +10 -2
- package/styles/components/fs_filter_button.scss +1 -1
- package/styles/components/fs_hidden_button.scss +2 -7
- package/styles/components/fs_image_card.scss +6 -4
- package/styles/components/fs_magic_config_field.scss +1 -2
- package/styles/components/fs_map.scss +57 -17
- package/styles/components/fs_meta_field.scss +3 -5
- package/styles/components/fs_password_field.scss +4 -2
- package/styles/components/fs_progress_bar.scss +14 -0
- package/styles/components/fs_radio.scss +0 -11
- package/styles/components/fs_rich_text_field.scss +1 -10
- package/styles/components/fs_select_field.scss +4 -13
- package/styles/components/fs_slide_group.scss +7 -0
- package/styles/components/fs_slider.scss +0 -40
- package/styles/components/fs_span.scss +13 -5
- package/styles/components/fs_status_rich_card.scss +6 -0
- package/styles/components/fs_tabs.scss +18 -37
- package/styles/components/fs_tag.scss +8 -22
- package/styles/components/fs_text_area.scss +2 -21
- package/styles/components/fs_tile.scss +0 -19
- package/styles/components/fs_window.scss +3 -1
- package/styles/components/fs_wrap_group.scss +7 -0
- package/styles/components/index.scss +2 -6
- package/styles/globals/index.scss +1 -5
- package/styles/globals/overrides.scss +26 -54
- package/styles/globals/scrollbars.scss +8 -0
- package/styles/globals/text_fonts.scss +18 -66
- package/styles/globals/touchscreen.scss +2 -2
- package/tools/alertsTools.ts +94 -18
- package/tools/chartsTools.ts +155 -16
- package/tools/index.ts +3 -1
- package/tools/reportsTools.ts +38 -0
- package/tools/timeRangeTools.ts +125 -0
- package/utils/badge.ts +9 -5
- package/utils/filter.ts +4 -1
- package/utils/index.ts +2 -0
- package/utils/leafletMarkers.ts +4 -4
- package/utils/operations.ts +108 -0
- package/utils/picker.ts +40 -0
- package/utils/sort.ts +2 -2
- package/utils/time.ts +13 -13
- package/components/fields/FSTimeSlotField.vue +0 -250
- package/components/views/FSEntityHeader.vue +0 -343
- package/components/views/FSListHeader.vue +0 -83
- package/components/views/FSListView.vue +0 -83
- package/components/views/FSSkeletonView.vue +0 -100
- package/styles/components/fs_data_iterator_item.scss +0 -33
- package/styles/components/fs_icon_field.scss +0 -12
- package/styles/components/fs_search_field.scss +0 -3
- package/styles/components/fs_tag_field.scss +0 -8
- package/styles/components/fs_time_field.scss +0 -12
- package/styles/components/fs_timeslot_field.scss +0 -12
- package/styles/globals/breakpoints.scss +0 -20
- package/styles/globals/fixes.scss +0 -5
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
gap="0"
|
|
4
4
|
>
|
|
5
5
|
<FSRow
|
|
6
|
+
:padding="`0 ${paddingRightHours} 0 ${paddingLeftHours}`"
|
|
6
7
|
class="fs-agenda-hours-row"
|
|
7
8
|
:wrap="false"
|
|
8
9
|
gap="0"
|
|
@@ -36,14 +37,15 @@
|
|
|
36
37
|
</FSRow>
|
|
37
38
|
</FSRow>
|
|
38
39
|
<FSRow
|
|
39
|
-
|
|
40
|
+
:padding="`0 ${paddingRightMarkers} 0 ${paddingLeftMarkers}`"
|
|
41
|
+
class="fs-agenda-hours-row-markers"
|
|
40
42
|
:wrap="false"
|
|
41
43
|
gap="0"
|
|
42
44
|
>
|
|
43
45
|
<FSRow
|
|
44
|
-
v-for="hour in
|
|
45
|
-
:key="hour"
|
|
46
|
-
:style="getMarkerStyle(displayNow && hour === modelValue)"
|
|
46
|
+
v-for="hour in 24"
|
|
47
|
+
:key="hour-1"
|
|
48
|
+
:style="getMarkerStyle(displayNow && hour-1 === modelValue)"
|
|
47
49
|
width="100%"
|
|
48
50
|
height="0"
|
|
49
51
|
align="center-center"
|
|
@@ -59,7 +61,7 @@
|
|
|
59
61
|
<script lang="ts">
|
|
60
62
|
import { defineComponent, computed, type StyleValue } from 'vue';
|
|
61
63
|
|
|
62
|
-
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
64
|
+
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
63
65
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
64
66
|
|
|
65
67
|
import FSText from '../FSText.vue';
|
|
@@ -87,18 +89,51 @@ export default defineComponent({
|
|
|
87
89
|
required: false,
|
|
88
90
|
default: false,
|
|
89
91
|
},
|
|
92
|
+
firstColumnWidth: {
|
|
93
|
+
type: String,
|
|
94
|
+
required: true,
|
|
95
|
+
},
|
|
90
96
|
},
|
|
91
|
-
setup() {
|
|
97
|
+
setup(props) {
|
|
92
98
|
const { getColors } = useColors();
|
|
99
|
+
const { isMobileSized } = useBreakpoints();
|
|
93
100
|
|
|
94
101
|
const lightColors = getColors(ColorEnum.Light);
|
|
95
102
|
const primaryColors = getColors(ColorEnum.Primary);
|
|
96
103
|
const fontColor = lightColors.dark;
|
|
97
104
|
|
|
105
|
+
const hoursToShow = computed(() => {
|
|
106
|
+
if(isMobileSized.value) {
|
|
107
|
+
return 12;
|
|
108
|
+
}
|
|
109
|
+
return 24;
|
|
110
|
+
});
|
|
111
|
+
|
|
98
112
|
const hours = computed(() => {
|
|
99
|
-
return Array.from({ length:
|
|
113
|
+
return Array.from({ length: hoursToShow.value }, (_, i) => i * (24 / hoursToShow.value));
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
const paddingLeftHours = computed(() => {
|
|
117
|
+
// ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}) is the width of each hour slot (2 hour if 12 hours are shown, 1 hour if 24 hours are shown)
|
|
118
|
+
// 0.5 * ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}) is half of the width of each hour slot
|
|
119
|
+
// So we have : ${props.firstColumnWidth} - Half of the width of each hour slot
|
|
120
|
+
return `calc(${props.firstColumnWidth} - 0.5 * ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}))`;
|
|
100
121
|
});
|
|
101
122
|
|
|
123
|
+
const paddingRightHours = computed(() => {
|
|
124
|
+
return `calc(0.5 * ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}))`;
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
const paddingLeftMarkers = computed(() => {
|
|
128
|
+
return `calc(${props.firstColumnWidth} - 0.5 * ((100% - ${props.firstColumnWidth}) / 24))`;
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
const paddingRightMarkers = computed(() => {
|
|
132
|
+
return `calc(0.5 * ((100% - ${props.firstColumnWidth}) / 24))`;
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
102
137
|
const getMarkerStyle = (isNowHour: boolean): StyleValue => {
|
|
103
138
|
if(isNowHour) {
|
|
104
139
|
return {
|
|
@@ -113,8 +148,13 @@ export default defineComponent({
|
|
|
113
148
|
const to2Digits = (value: number) => value.toString().padStart(2, '0');
|
|
114
149
|
|
|
115
150
|
return {
|
|
116
|
-
fontColor,
|
|
117
151
|
hours,
|
|
152
|
+
fontColor,
|
|
153
|
+
hoursToShow,
|
|
154
|
+
paddingLeftHours,
|
|
155
|
+
paddingRightHours,
|
|
156
|
+
paddingLeftMarkers,
|
|
157
|
+
paddingRightMarkers,
|
|
118
158
|
getMarkerStyle,
|
|
119
159
|
to2Digits
|
|
120
160
|
};
|
|
@@ -131,7 +131,7 @@ export default defineComponent({
|
|
|
131
131
|
const height = computed(() => {
|
|
132
132
|
let start = props.start - dayDurationOffset.value;
|
|
133
133
|
let end = props.end - dayDurationOffset.value;
|
|
134
|
-
if (props.variant === 'current') {
|
|
134
|
+
if (props.variant === 'current' && dayEnd.value > props.now) {
|
|
135
135
|
end = props.now;
|
|
136
136
|
} else if (props.end > dayEnd.value) {
|
|
137
137
|
end = dayEnd.value - dayDurationOffset.value;
|
|
@@ -9,13 +9,8 @@
|
|
|
9
9
|
gap="0"
|
|
10
10
|
:wrap="false"
|
|
11
11
|
>
|
|
12
|
-
<FSCol
|
|
13
|
-
height="100%"
|
|
14
|
-
:width="$props.firstColumnWidth"
|
|
15
|
-
>
|
|
16
|
-
</FSCol>
|
|
17
|
-
|
|
18
12
|
<FSAgendaHoursRow
|
|
13
|
+
:firstColumnWidth="$props.firstColumnWidth"
|
|
19
14
|
:displayNow="$props.nowIsInSelectedRange"
|
|
20
15
|
:modelValue="nowHour"
|
|
21
16
|
/>
|
|
@@ -42,8 +42,8 @@ export default defineComponent({
|
|
|
42
42
|
const { $tr } = useTranslationsProvider();
|
|
43
43
|
|
|
44
44
|
const items = [
|
|
45
|
-
{ id: AgendaMode.Week, label: $tr('ui.
|
|
46
|
-
{ id: AgendaMode.Month, label: $tr('ui.
|
|
45
|
+
{ id: AgendaMode.Week, label: $tr('ui.common.week', 'Week'), icon: 'mdi-calendar-week' },
|
|
46
|
+
{ id: AgendaMode.Month, label: $tr('ui.common.month', 'Month'), icon: 'mdi-calendar-month' },
|
|
47
47
|
];
|
|
48
48
|
|
|
49
49
|
return {
|
|
@@ -9,13 +9,8 @@
|
|
|
9
9
|
gap="0"
|
|
10
10
|
:wrap="false"
|
|
11
11
|
>
|
|
12
|
-
<FSCol
|
|
13
|
-
height="100%"
|
|
14
|
-
:width="$props.firstColumnWidth"
|
|
15
|
-
>
|
|
16
|
-
</FSCol>
|
|
17
|
-
|
|
18
12
|
<FSAgendaHoursRow
|
|
13
|
+
:firstColumnWidth="$props.firstColumnWidth"
|
|
19
14
|
:displayNow="$props.nowIsInSelectedRange"
|
|
20
15
|
:modelValue="nowHour"
|
|
21
16
|
/>
|
|
@@ -75,7 +70,7 @@
|
|
|
75
70
|
class="fs-agenda-week-number-label"
|
|
76
71
|
:color="weekTextColor"
|
|
77
72
|
>
|
|
78
|
-
{{ $tr('ui.common.
|
|
73
|
+
{{ $tr('ui.common.week-short', 'W{0}',day.weekNumber) }}
|
|
79
74
|
</FSText>
|
|
80
75
|
</FSCol>
|
|
81
76
|
</FSCard>
|
|
@@ -125,7 +120,7 @@
|
|
|
125
120
|
@click="() => $emit('click:eventId', event.id)"
|
|
126
121
|
>
|
|
127
122
|
<template
|
|
128
|
-
#default="{ label, icon, timeStart, timeEnd, iconBis, variant }"
|
|
123
|
+
#default="{ label, icon, timeStart, timeEnd, iconBis, variant, width }"
|
|
129
124
|
>
|
|
130
125
|
<FSRow
|
|
131
126
|
align="center-left"
|
|
@@ -158,7 +153,7 @@
|
|
|
158
153
|
</FSRow>
|
|
159
154
|
</FSCol>
|
|
160
155
|
<FSCol
|
|
161
|
-
v-if="iconBis && variant !== 'current'"
|
|
156
|
+
v-if="iconBis && variant !== 'current' && width > 13"
|
|
162
157
|
align="center-right"
|
|
163
158
|
padding="8px 8px 8px 0"
|
|
164
159
|
width="hug"
|
|
@@ -259,7 +254,7 @@ export default defineComponent({
|
|
|
259
254
|
$tr('ui.common.monday-short', 'MON'),
|
|
260
255
|
$tr('ui.common.tuesday-short', 'TUE'),
|
|
261
256
|
$tr('ui.common.wednesday-short', 'WED'),
|
|
262
|
-
$tr('
|
|
257
|
+
$tr('ui.common.thursday-short', 'THU'),
|
|
263
258
|
$tr('ui.common.friday-short', 'FRI'),
|
|
264
259
|
$tr('ui.common.saturday-short', 'SAT')
|
|
265
260
|
];
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.address', 'Address')"
|
|
3
4
|
:clearable="false"
|
|
4
5
|
:toggleSet="false"
|
|
5
6
|
:multiple="false"
|
|
6
|
-
:items="
|
|
7
|
-
:
|
|
7
|
+
:items="items"
|
|
8
|
+
:customFilter="(_label: string, _query: string, item: any) => {
|
|
9
|
+
return item.value !== $props.modelValue?.placeId;
|
|
10
|
+
}"
|
|
11
|
+
:modelValue="$props.modelValue?.placeId"
|
|
8
12
|
@update:modelValue="onUpdate"
|
|
9
13
|
v-model:search="search"
|
|
10
14
|
v-bind="$attrs"
|
|
@@ -12,7 +16,7 @@
|
|
|
12
16
|
</template>
|
|
13
17
|
|
|
14
18
|
<script lang="ts">
|
|
15
|
-
import {
|
|
19
|
+
import { computed, defineComponent, ref } from "vue";
|
|
16
20
|
|
|
17
21
|
import { type Address, type Place } from "@dative-gpi/foundation-shared-domain/models";
|
|
18
22
|
import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -32,13 +36,26 @@ export default defineComponent({
|
|
|
32
36
|
required: false,
|
|
33
37
|
default: null
|
|
34
38
|
},
|
|
39
|
+
label: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: false,
|
|
42
|
+
default: null
|
|
43
|
+
}
|
|
35
44
|
},
|
|
36
45
|
emits: ["update:modelValue"],
|
|
37
46
|
setup(props, { emit }) {
|
|
38
47
|
const { search: searchAddress, get: getAddress } = useAddress();
|
|
39
48
|
|
|
40
49
|
const places = ref<Place[]>([]);
|
|
41
|
-
|
|
50
|
+
|
|
51
|
+
const items = computed(() => {
|
|
52
|
+
if(props.modelValue) {
|
|
53
|
+
const currentPlace = addressToPlace(props.modelValue);
|
|
54
|
+
const searchedPlaces = places.value.filter((place) => place.id !== currentPlace.id);
|
|
55
|
+
return [currentPlace, ...searchedPlaces];
|
|
56
|
+
}
|
|
57
|
+
return places.value;
|
|
58
|
+
});
|
|
42
59
|
|
|
43
60
|
const fetch = async (search: string | null) => {
|
|
44
61
|
if (search === null) {
|
|
@@ -69,7 +86,9 @@ export default defineComponent({
|
|
|
69
86
|
(item) => (item).id,
|
|
70
87
|
(item) => (item).label,
|
|
71
88
|
true,
|
|
72
|
-
false
|
|
89
|
+
false,
|
|
90
|
+
0,
|
|
91
|
+
500
|
|
73
92
|
);
|
|
74
93
|
|
|
75
94
|
const addressToPlace = (address: Address): Place => {
|
|
@@ -79,23 +98,9 @@ export default defineComponent({
|
|
|
79
98
|
};
|
|
80
99
|
};
|
|
81
100
|
|
|
82
|
-
onMounted(() => {
|
|
83
|
-
if(!props.modelValue) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
modelValuePlace.value = addressToPlace(props.modelValue);
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
watch(() => props.modelValue, (newValue) => {
|
|
90
|
-
if(!newValue) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
modelValuePlace.value = addressToPlace(newValue);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
101
|
return {
|
|
97
|
-
modelValuePlace,
|
|
98
102
|
places,
|
|
103
|
+
items,
|
|
99
104
|
search,
|
|
100
105
|
onUpdate
|
|
101
106
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$tr('ui.common.language', 'Language')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:multiple="$props.multiple"
|
|
5
6
|
:placeholder="placeholder"
|
|
@@ -58,6 +59,11 @@ export default defineComponent({
|
|
|
58
59
|
type: Boolean,
|
|
59
60
|
required: false,
|
|
60
61
|
default: false
|
|
62
|
+
},
|
|
63
|
+
label: {
|
|
64
|
+
type: String as PropType<string | null>,
|
|
65
|
+
required: false,
|
|
66
|
+
default: null
|
|
61
67
|
}
|
|
62
68
|
},
|
|
63
69
|
emits: ["update:modelValue"],
|
|
@@ -71,7 +77,7 @@ export default defineComponent({
|
|
|
71
77
|
|
|
72
78
|
const placeholder = computed((): string | null => {
|
|
73
79
|
if (props.multiple && props.modelValue) {
|
|
74
|
-
return $tr("
|
|
80
|
+
return $tr("autocomplete.language.placeholder", "{0} language(s) selected", props.modelValue.length);
|
|
75
81
|
}
|
|
76
82
|
return null;
|
|
77
83
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
3
|
itemTitle="id"
|
|
4
|
+
:label="$tr('ui.common.time-zone', 'Time zone')"
|
|
4
5
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
5
6
|
:multiple="$props.multiple"
|
|
6
7
|
:placeholder="placeholder"
|
|
@@ -81,6 +82,11 @@ export default defineComponent({
|
|
|
81
82
|
type: Boolean,
|
|
82
83
|
required: false,
|
|
83
84
|
default: false
|
|
85
|
+
},
|
|
86
|
+
label: {
|
|
87
|
+
type: String as PropType<string | null>,
|
|
88
|
+
required: false,
|
|
89
|
+
default: null
|
|
84
90
|
}
|
|
85
91
|
},
|
|
86
92
|
emits: ["update:modelValue"],
|
|
@@ -94,7 +100,7 @@ export default defineComponent({
|
|
|
94
100
|
|
|
95
101
|
const placeholder = computed((): string | null => {
|
|
96
102
|
if (props.multiple && props.modelValue) {
|
|
97
|
-
return $tr("
|
|
103
|
+
return $tr("autocomplete.time-zone.placeholder", "{0} time zone(s) selected", props.modelValue.length);
|
|
98
104
|
}
|
|
99
105
|
return null;
|
|
100
106
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSButton
|
|
3
|
-
:
|
|
3
|
+
:disabled="$props.disabled"
|
|
4
4
|
:prependIcon="prependIcon"
|
|
5
5
|
:load="$props.load"
|
|
6
6
|
:variant="variant"
|
|
@@ -40,10 +40,10 @@ export default defineComponent({
|
|
|
40
40
|
required: false,
|
|
41
41
|
default: false
|
|
42
42
|
},
|
|
43
|
-
|
|
43
|
+
disabled: {
|
|
44
44
|
type: Boolean,
|
|
45
45
|
required: false,
|
|
46
|
-
default:
|
|
46
|
+
default: false
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
emits: ["update:modelValue"],
|
|
@@ -57,7 +57,7 @@ export default defineComponent({
|
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
const onClick = (): void => {
|
|
60
|
-
if (props.
|
|
60
|
+
if (!props.disabled && !props.load) {
|
|
61
61
|
emit("update:modelValue", !props.modelValue);
|
|
62
62
|
}
|
|
63
63
|
};
|