@dative-gpi/foundation-shared-components 0.1.120 → 1.0.0
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/imagery.png +0 -0
- package/assets/images/map/map.png +0 -0
- package/components/FSAccordion.vue +2 -1
- package/components/FSAccordionPanel.vue +20 -1
- package/components/FSBadge.vue +7 -3
- package/components/FSBreadcrumbs.vue +4 -2
- package/components/FSButton.vue +15 -8
- package/components/FSCalendar.vue +5 -2
- package/components/FSCalendarTwin.vue +6 -3
- package/components/FSCard.vue +4 -2
- package/components/FSCardPlaceholder.vue +80 -0
- package/components/FSCheckbox.vue +10 -7
- package/components/FSChip.vue +4 -2
- package/components/FSClickable.vue +5 -3
- package/components/FSClock.vue +18 -4
- package/components/FSCol.vue +12 -5
- package/components/FSColor.vue +4 -2
- package/components/FSColorIcon.vue +5 -3
- package/components/FSDialog.vue +28 -87
- package/components/FSDialogContent.vue +133 -0
- package/components/FSDialogForm.vue +25 -236
- package/components/FSDialogFormBody.vue +273 -0
- package/components/FSDialogMenu.vue +5 -2
- package/components/FSDialogMultiForm.vue +21 -197
- package/components/FSDialogMultiFormBody.vue +231 -0
- package/components/FSDialogSubmit.vue +4 -2
- package/components/FSDivider.vue +6 -4
- package/components/FSEditImage.vue +16 -9
- package/components/FSErrorToast.vue +2 -1
- package/components/FSFadeOut.vue +1 -1
- package/components/FSForm.vue +7 -7
- package/components/FSGrid.vue +4 -2
- package/components/FSGridMosaic.vue +3 -2
- package/components/FSIcon.vue +3 -2
- package/components/FSIconCard.vue +10 -3
- package/components/FSIconCheck.vue +2 -1
- package/components/FSIconFlag.vue +2 -1
- package/components/FSImage.vue +2 -1
- package/components/FSImageCard.vue +72 -0
- package/components/FSLabel.vue +4 -2
- package/components/FSLink.vue +5 -3
- package/components/FSLoader.vue +2 -1
- package/components/FSOptionGroup.vue +28 -20
- package/components/FSOptionItem.vue +8 -18
- package/components/FSPagination.vue +4 -2
- package/components/FSRadio.vue +23 -11
- package/components/FSRadioGroup.vue +23 -10
- package/components/FSRow.vue +8 -1
- package/components/FSSlideGroup.vue +27 -6
- package/components/FSSlider.vue +4 -2
- package/components/FSSpan.vue +2 -1
- package/components/FSSwitch.vue +13 -10
- package/components/FSTab.vue +4 -2
- package/components/FSTabs.vue +5 -14
- package/components/FSTag.vue +11 -4
- package/components/FSTagGroup.vue +4 -2
- package/components/FSText.vue +4 -2
- package/components/FSToggleSet.vue +30 -17
- package/components/FSTooltip.vue +15 -4
- package/components/FSWindow.vue +2 -2
- package/components/FSWrapGroup.vue +2 -1
- package/components/autocompletes/FSAutoCompleteAddress.vue +104 -0
- package/components/autocompletes/FSAutocompleteLanguage.vue +18 -26
- package/components/autocompletes/FSAutocompleteTag.vue +138 -0
- package/components/autocompletes/FSAutocompleteTimeZone.vue +19 -30
- package/components/buttons/FSButtonAdd.vue +28 -0
- package/components/buttons/FSButtonAddIcon.vue +28 -0
- package/components/buttons/FSButtonAddLabel.vue +27 -0
- package/components/buttons/FSButtonAddMini.vue +27 -0
- package/components/buttons/FSButtonFile.vue +4 -4
- package/components/buttons/FSButtonFileIcon.vue +4 -4
- package/components/buttons/FSButtonFileLabel.vue +4 -4
- package/components/buttons/FSButtonFileMini.vue +4 -4
- package/components/deviceOrganisations/FSConnectivity.vue +3 -2
- package/components/deviceOrganisations/FSConnectivityCard.vue +3 -2
- package/components/deviceOrganisations/FSStatus.vue +3 -2
- package/components/deviceOrganisations/FSStatusCard.vue +3 -2
- package/components/deviceOrganisations/FSStatusesCarousel.vue +3 -2
- package/components/deviceOrganisations/FSStatusesRow.vue +3 -2
- package/components/deviceOrganisations/FSWorstAlert.vue +5 -4
- package/components/deviceOrganisations/FSWorstAlertCard.vue +4 -2
- package/components/fields/FSAutocompleteField.vue +210 -97
- package/components/fields/FSBaseField.vue +2 -1
- package/components/fields/FSColorField.vue +65 -94
- package/components/fields/FSDateField.vue +12 -25
- package/components/fields/FSDateRangeField.vue +15 -27
- package/components/fields/FSDateTimeField.vue +22 -32
- package/components/fields/FSDateTimeRangeField.vue +43 -51
- package/components/fields/FSGradientField.vue +143 -0
- package/components/fields/FSIconField.vue +9 -6
- package/components/fields/FSMagicConfigField.vue +154 -0
- package/components/fields/FSMagicField.vue +185 -0
- package/components/fields/FSNumberField.vue +3 -1
- package/components/fields/FSPasswordField.vue +10 -10
- package/components/fields/FSRichTextField.vue +136 -50
- package/components/fields/FSSearchField.vue +41 -62
- package/components/fields/FSSelectField.vue +148 -53
- package/components/fields/FSTagField.vue +19 -16
- package/components/fields/FSTermField.vue +192 -186
- package/components/fields/FSTextArea.vue +4 -4
- package/components/fields/FSTextField.vue +29 -6
- package/components/fields/FSTimeField.vue +55 -20
- package/components/fields/FSTimeSlotField.vue +6 -5
- package/components/fields/FSTranslateField.vue +234 -0
- package/components/fields/FSTranslateRichTextField.vue +185 -0
- package/components/fields/FSTreeViewField.vue +520 -0
- package/components/lists/FSDataIteratorItem.vue +18 -3
- package/components/lists/FSDataTableUI.vue +138 -51
- package/components/lists/FSFilterButton.vue +4 -2
- package/components/lists/FSHiddenButton.vue +4 -2
- package/components/map/FSMap.vue +598 -0
- package/components/map/FSMapEditPointAddressOverlay.vue +164 -0
- package/components/map/FSMapLayerButton.vue +77 -0
- package/components/map/FSMapOverlay.vue +150 -0
- package/components/selects/FSSelectAutoRefresh.vue +62 -0
- package/components/selects/FSSelectDashboardVariableType.vue +47 -0
- package/components/selects/FSSelectDateSetting.vue +39 -37
- package/components/selects/FSSelectDays.vue +62 -0
- package/components/tiles/FSDashboardOrganisationTileUI.vue +7 -5
- package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +7 -5
- package/components/tiles/FSDashboardShallowTileUI.vue +7 -5
- package/components/tiles/FSDeviceOrganisationTileUI.vue +11 -12
- package/components/tiles/FSFolderTileUI.vue +8 -6
- package/components/tiles/FSGroupTileUI.vue +13 -15
- package/components/tiles/{FSSimpleIconTileUI.vue → FSSimpleTileUI.vue} +29 -15
- package/components/tiles/FSTile.vue +5 -11
- package/components/tiles/FSUserOrganisationTileUI.vue +2 -1
- package/components/toggleSets/FSToggleSetPosition.vue +61 -0
- package/composables/index.ts +5 -1
- package/composables/useAddress.ts +158 -0
- package/composables/useAutocomplete.ts +4 -3
- package/composables/useColors.ts +8 -25
- package/composables/useDebounce.ts +2 -1
- package/composables/useMagicFieldProvider.ts +22 -0
- package/composables/useRules.ts +4 -12
- package/composables/useSlots.ts +46 -26
- package/composables/useTables.ts +29 -0
- package/composables/useTreeView.ts +48 -0
- package/elements/FSFormElement.ts +2 -1
- package/icons/flags/France.vue +21 -5
- package/icons/flags/Germany.vue +16 -4
- package/icons/flags/GreatBritain.vue +25 -6
- package/icons/flags/Italy.vue +21 -5
- package/icons/flags/Portugal.vue +225 -51
- package/icons/flags/Spain.vue +2781 -543
- package/icons/flags/UnitedStates.vue +31 -7
- package/icons/widgetTemplates/DevicesWidget.vue +189 -189
- package/icons/widgetTemplates/ProfileWidget.vue +9 -9
- package/icons/widgetTemplates/TextWidget.vue +6 -6
- package/models/breadcrumbs.ts +1 -1
- package/models/deviceAlerts.ts +1 -1
- package/models/deviceConnectivities.ts +1 -1
- package/models/index.ts +2 -0
- package/models/magicFields.ts +9 -0
- package/models/map.ts +18 -0
- package/models/richTextVariable.ts +5 -0
- package/models/rules.ts +11 -2
- package/models/tables.ts +30 -21
- package/models/variableNode.ts +104 -0
- package/package.json +21 -18
- package/plugins/colorPlugin.ts +2 -2
- package/plugins/index.ts +2 -1
- package/plugins/mapsPlugin.ts +37 -0
- package/shims-plugin.d.ts +2 -2
- package/shims-window.d.ts +3 -0
- package/styles/components/fs_button.scss +5 -0
- package/styles/components/fs_card.scss +0 -1
- package/styles/components/fs_col.scss +1 -0
- package/styles/components/fs_color_field.scss +12 -2
- package/styles/components/fs_data_iterator_item.scss +19 -6
- package/styles/components/fs_dialog.scss +12 -22
- package/styles/components/fs_gradient_field.scss +16 -0
- package/styles/components/fs_image_card.scss +18 -0
- package/styles/components/fs_magic_config_field.scss +13 -0
- package/styles/components/fs_map.scss +129 -0
- package/styles/components/fs_map_overlay.scss +38 -0
- package/styles/components/fs_meta_field.scss +6 -0
- package/styles/components/fs_option_group.scss +1 -0
- package/styles/components/fs_radio.scss +1 -1
- package/styles/components/fs_rich_text_field.scss +17 -5
- package/styles/components/fs_row.scss +1 -1
- package/styles/components/fs_select_field.scss +9 -14
- package/styles/components/fs_text.scss +1 -1
- package/styles/components/fs_time_field.scss +0 -4
- package/styles/components/fs_translate_field.scss +3 -0
- package/styles/components/fs_tree_view_field.scss +53 -0
- package/styles/components/index.scss +8 -1
- package/styles/globals/overrides.scss +54 -8
- package/styles/globals/scrollbars.scss +2 -2
- package/themes/default.ts +1 -1
- package/utils/gradient.ts +1601 -0
- package/utils/index.ts +3 -1
- package/utils/leafletMarkers.ts +23 -0
- package/utils/lexical.ts +3 -1
- package/components/selects/FSSelectTimeZone.vue +0 -67
- package/styles/components/fs_date_field.scss +0 -8
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSCard
|
|
3
|
+
padding="16px"
|
|
4
|
+
height="100%"
|
|
5
|
+
width="100%"
|
|
6
|
+
:elevation="true"
|
|
7
|
+
>
|
|
8
|
+
<FSCol
|
|
9
|
+
gap="24px"
|
|
10
|
+
>
|
|
11
|
+
<FSRow>
|
|
12
|
+
<FSText
|
|
13
|
+
font="text-h3"
|
|
14
|
+
>
|
|
15
|
+
{{ $tr('ui.map.modify-location', 'Modify location') }}
|
|
16
|
+
</FSText>
|
|
17
|
+
<v-spacer />
|
|
18
|
+
<FSButton
|
|
19
|
+
v-if="menuLocationCoordinates"
|
|
20
|
+
icon="mdi-arrow-collapse"
|
|
21
|
+
variant="icon"
|
|
22
|
+
@click="menuLocationCoordinates = !menuLocationCoordinates"
|
|
23
|
+
/>
|
|
24
|
+
<FSButton
|
|
25
|
+
v-else
|
|
26
|
+
icon="mdi-arrow-expand"
|
|
27
|
+
variant="icon"
|
|
28
|
+
@click="menuLocationCoordinates = !menuLocationCoordinates"
|
|
29
|
+
/>
|
|
30
|
+
</FSRow>
|
|
31
|
+
<FSCol
|
|
32
|
+
v-if="menuLocationCoordinates"
|
|
33
|
+
>
|
|
34
|
+
<FSAutoCompleteAddress
|
|
35
|
+
:modelValue="$props.modelValue"
|
|
36
|
+
@update:modelValue="onAddressFieldSubmit($event)"
|
|
37
|
+
/>
|
|
38
|
+
<FSForm
|
|
39
|
+
variant="standard"
|
|
40
|
+
@submit="onCoordinatesChange()"
|
|
41
|
+
>
|
|
42
|
+
<FSRow>
|
|
43
|
+
<FSNumberField
|
|
44
|
+
:label="$tr('ui.map.latitude', 'Latitude')"
|
|
45
|
+
v-model="latitude"
|
|
46
|
+
/>
|
|
47
|
+
<FSNumberField
|
|
48
|
+
:label="$tr('ui.map.longitude', 'Longitude')"
|
|
49
|
+
v-model="longitude"
|
|
50
|
+
/>
|
|
51
|
+
</FSRow>
|
|
52
|
+
<FSButton
|
|
53
|
+
prependIcon="mdi-content-save"
|
|
54
|
+
style="display: none;"
|
|
55
|
+
color="primary"
|
|
56
|
+
type="submit"
|
|
57
|
+
:label="$tr('ui.map.save', 'Save')"
|
|
58
|
+
/>
|
|
59
|
+
</FSForm>
|
|
60
|
+
</FSCol>
|
|
61
|
+
<FSRow
|
|
62
|
+
align="center-right"
|
|
63
|
+
>
|
|
64
|
+
<FSButton
|
|
65
|
+
:label="$tr('ui.map.cancel', 'Cancel')"
|
|
66
|
+
@click="onCancel"
|
|
67
|
+
/>
|
|
68
|
+
<FSButton
|
|
69
|
+
prependIcon="mdi-content-save"
|
|
70
|
+
color="primary"
|
|
71
|
+
:label="$tr('ui.map.save', 'Save')"
|
|
72
|
+
@click="onSubmit"
|
|
73
|
+
/>
|
|
74
|
+
</FSRow>
|
|
75
|
+
</FSCol>
|
|
76
|
+
</FSCard>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<script lang="ts">
|
|
80
|
+
import { defineComponent, type PropType, ref, watch } from "vue";
|
|
81
|
+
|
|
82
|
+
import { Address } from "@dative-gpi/foundation-shared-domain/models";
|
|
83
|
+
|
|
84
|
+
import FSAutoCompleteAddress from "../autocompletes/FSAutoCompleteAddress.vue";
|
|
85
|
+
import FSNumberField from "../fields/FSNumberField.vue";
|
|
86
|
+
import FSButton from "../FSButton.vue";
|
|
87
|
+
import FSCard from "../FSCard.vue";
|
|
88
|
+
import FSForm from "../FSForm.vue";
|
|
89
|
+
import FSText from "../FSText.vue";
|
|
90
|
+
import FSCol from "../FSCol.vue";
|
|
91
|
+
import FSRow from "../FSRow.vue";
|
|
92
|
+
|
|
93
|
+
export default defineComponent({
|
|
94
|
+
name: "FSMapEditPointAddressOverlay.vue",
|
|
95
|
+
components: {
|
|
96
|
+
FSAutoCompleteAddress,
|
|
97
|
+
FSNumberField,
|
|
98
|
+
FSButton,
|
|
99
|
+
FSCard,
|
|
100
|
+
FSForm,
|
|
101
|
+
FSText,
|
|
102
|
+
FSCol,
|
|
103
|
+
FSRow
|
|
104
|
+
},
|
|
105
|
+
props: {
|
|
106
|
+
modelValue: {
|
|
107
|
+
type: Object as PropType<Address | null>,
|
|
108
|
+
default: null
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
emits: ["update:modelValue", "update:locationCoordinates", "submit", "cancel"],
|
|
112
|
+
setup(props, { emit }) {
|
|
113
|
+
const menuLocationCoordinates = ref(false);
|
|
114
|
+
|
|
115
|
+
const latitude = ref(0);
|
|
116
|
+
const longitude = ref(0);
|
|
117
|
+
|
|
118
|
+
const onCoordinatesChange = () => {
|
|
119
|
+
const newModelValue = new Address({
|
|
120
|
+
country: "",
|
|
121
|
+
formattedAddress: "",
|
|
122
|
+
locality: "",
|
|
123
|
+
placeId: "",
|
|
124
|
+
placeLabel: "",
|
|
125
|
+
latitude: latitude.value,
|
|
126
|
+
longitude: longitude.value,
|
|
127
|
+
});
|
|
128
|
+
emit("update:locationCoordinates", newModelValue);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const onAddressFieldSubmit = (address: Address|null) => {
|
|
132
|
+
if(!address) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
emit('update:modelValue', address);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const onSubmit = () => {
|
|
139
|
+
emit('submit');
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const onCancel = () => {
|
|
143
|
+
emit('cancel');
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
watch(() => props.modelValue, () => {
|
|
147
|
+
if (props.modelValue) {
|
|
148
|
+
latitude.value = props.modelValue.latitude;
|
|
149
|
+
longitude.value = props.modelValue.longitude;
|
|
150
|
+
}
|
|
151
|
+
}, { immediate: true });
|
|
152
|
+
|
|
153
|
+
return {
|
|
154
|
+
menuLocationCoordinates,
|
|
155
|
+
longitude,
|
|
156
|
+
latitude,
|
|
157
|
+
onAddressFieldSubmit,
|
|
158
|
+
onCoordinatesChange,
|
|
159
|
+
onCancel,
|
|
160
|
+
onSubmit
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
</script>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSButton
|
|
3
|
+
prependIcon="mdi-layers-outline"
|
|
4
|
+
:elevation="true"
|
|
5
|
+
@click="dialog = true"
|
|
6
|
+
/>
|
|
7
|
+
<FSDialog
|
|
8
|
+
v-model="dialog"
|
|
9
|
+
title="Select Layers"
|
|
10
|
+
width="442px"
|
|
11
|
+
>
|
|
12
|
+
<template
|
|
13
|
+
v-slot:body
|
|
14
|
+
>
|
|
15
|
+
<FSRow
|
|
16
|
+
align="center-center"
|
|
17
|
+
>
|
|
18
|
+
<FSImageCard
|
|
19
|
+
v-for="layer in layers"
|
|
20
|
+
:variant="modelValue === layer.name ? 'full' : 'background'"
|
|
21
|
+
:color="modelValue === layer.name ? 'primary' : 'light'"
|
|
22
|
+
:label="layer.label"
|
|
23
|
+
:src="layer.image"
|
|
24
|
+
:key="layer.name"
|
|
25
|
+
@click="onLayerClick(layer.name)"
|
|
26
|
+
/>
|
|
27
|
+
</FSRow>
|
|
28
|
+
</template>
|
|
29
|
+
</FSDialog>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script lang="ts">
|
|
33
|
+
import { defineComponent, type PropType, ref } from "vue";
|
|
34
|
+
|
|
35
|
+
import { type MapLayer } from "../../models";
|
|
36
|
+
|
|
37
|
+
import FSImageCard from "../FSImageCard.vue";
|
|
38
|
+
import FSButton from "../FSButton.vue";
|
|
39
|
+
import FSDialog from "../FSDialog.vue";
|
|
40
|
+
import FSRow from "../FSRow.vue";
|
|
41
|
+
|
|
42
|
+
export default defineComponent({
|
|
43
|
+
name: "FSMapLayerButton",
|
|
44
|
+
components: {
|
|
45
|
+
FSImageCard,
|
|
46
|
+
FSButton,
|
|
47
|
+
FSDialog,
|
|
48
|
+
FSRow
|
|
49
|
+
},
|
|
50
|
+
props: {
|
|
51
|
+
layers: {
|
|
52
|
+
type: Array as PropType<MapLayer[]>,
|
|
53
|
+
required: false,
|
|
54
|
+
default: () => []
|
|
55
|
+
},
|
|
56
|
+
modelValue: {
|
|
57
|
+
type: String,
|
|
58
|
+
required: false,
|
|
59
|
+
default: ""
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
emits: ["update:modelValue"],
|
|
63
|
+
setup(_, { emit }) {
|
|
64
|
+
const dialog = ref(false);
|
|
65
|
+
|
|
66
|
+
const onLayerClick = (layer: string) => {
|
|
67
|
+
emit("update:modelValue", layer);
|
|
68
|
+
dialog.value = false;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
dialog,
|
|
73
|
+
onLayerClick
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
</script>
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSCol
|
|
3
|
+
v-show="isExtraSmall"
|
|
4
|
+
:id="`left-overlay-mobile-${$props.mapId}`"
|
|
5
|
+
:height="$props.mode === 'expand' ? '100%' : ($props.mode === 'half' ? '50%' : 'hug')"
|
|
6
|
+
:style="style"
|
|
7
|
+
class="fs-map-overlay-left-mobile"
|
|
8
|
+
ref="mobileOverlayElement"
|
|
9
|
+
align="bottom-center"
|
|
10
|
+
width="hug"
|
|
11
|
+
gap="2px"
|
|
12
|
+
@click="$event.target === mobileOverlayElement?.$el ? $emit('update:mode', 'collapse') : null"
|
|
13
|
+
>
|
|
14
|
+
<FSCard
|
|
15
|
+
padding="0px"
|
|
16
|
+
:elevation="true"
|
|
17
|
+
:border="false"
|
|
18
|
+
>
|
|
19
|
+
<FSCol
|
|
20
|
+
gap="0px"
|
|
21
|
+
height="fill"
|
|
22
|
+
>
|
|
23
|
+
<FSRow
|
|
24
|
+
align="center-center"
|
|
25
|
+
@touchstart="$props.mode === 'expand' ? $emit('update:mode', 'collapse') : $emit('update:mode', 'expand')"
|
|
26
|
+
>
|
|
27
|
+
<FSButton
|
|
28
|
+
:icon="$props.mode === 'expand' ? 'mdi-chevron-down' : 'mdi-chevron-up'"
|
|
29
|
+
variant="icon"
|
|
30
|
+
@click="$props.mode === 'expand' ? $emit('update:mode', 'collapse') : $emit('update:mode', 'expand')"
|
|
31
|
+
/>
|
|
32
|
+
</FSRow>
|
|
33
|
+
<FSCol
|
|
34
|
+
class="fs-map-overlay-left-mobile-content"
|
|
35
|
+
height="fill"
|
|
36
|
+
>
|
|
37
|
+
<slot
|
|
38
|
+
name="leftoverlay-header"
|
|
39
|
+
/>
|
|
40
|
+
<FSFadeOut
|
|
41
|
+
:height="$props.mode === 'collapse' ? '0px' : '100%'"
|
|
42
|
+
maskHeight="0px"
|
|
43
|
+
>
|
|
44
|
+
<slot
|
|
45
|
+
name="leftoverlay-body"
|
|
46
|
+
/>
|
|
47
|
+
</FSFadeOut>
|
|
48
|
+
</FSCol>
|
|
49
|
+
</FSCol>
|
|
50
|
+
</FSCard>
|
|
51
|
+
</FSCol>
|
|
52
|
+
<FSCol
|
|
53
|
+
v-show="!isExtraSmall"
|
|
54
|
+
:style="style"
|
|
55
|
+
:id="`left-overlay-${$props.mapId}`"
|
|
56
|
+
class="fs-map-overlay-left"
|
|
57
|
+
width="hug"
|
|
58
|
+
gap="2px"
|
|
59
|
+
>
|
|
60
|
+
<FSCard
|
|
61
|
+
padding="4px"
|
|
62
|
+
:elevation="true"
|
|
63
|
+
:border="false"
|
|
64
|
+
>
|
|
65
|
+
<FSCol
|
|
66
|
+
class="fs-map-overlay-left-content"
|
|
67
|
+
>
|
|
68
|
+
<slot
|
|
69
|
+
name="leftoverlay-header"
|
|
70
|
+
/>
|
|
71
|
+
<FSFadeOut
|
|
72
|
+
maskHeight="0"
|
|
73
|
+
height="100%"
|
|
74
|
+
>
|
|
75
|
+
<slot
|
|
76
|
+
name="leftoverlay-body"
|
|
77
|
+
/>
|
|
78
|
+
</FSFadeOut>
|
|
79
|
+
</FSCol>
|
|
80
|
+
</FSCard>
|
|
81
|
+
</FSCol>
|
|
82
|
+
</template>
|
|
83
|
+
|
|
84
|
+
<script lang="ts">
|
|
85
|
+
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
86
|
+
|
|
87
|
+
import { useBreakpoints } from "../../composables";
|
|
88
|
+
|
|
89
|
+
import FSFadeOut from "../FSFadeOut.vue";
|
|
90
|
+
import FSButton from "../FSButton.vue";
|
|
91
|
+
import FSCard from "../FSCard.vue";
|
|
92
|
+
import FSCol from "../FSCol.vue";
|
|
93
|
+
import FSRow from "../FSRow.vue";
|
|
94
|
+
|
|
95
|
+
export default defineComponent({
|
|
96
|
+
name: "FSMapOverlay",
|
|
97
|
+
props: {
|
|
98
|
+
height: {
|
|
99
|
+
type: [String, Number] as PropType<string | number | null>,
|
|
100
|
+
required: false,
|
|
101
|
+
default: "100%"
|
|
102
|
+
},
|
|
103
|
+
mode: {
|
|
104
|
+
type: String as PropType<"collapse" | "half" | "expand">,
|
|
105
|
+
required: false,
|
|
106
|
+
default: "collapse"
|
|
107
|
+
},
|
|
108
|
+
mapId: {
|
|
109
|
+
type: String,
|
|
110
|
+
required: true
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
components: {
|
|
114
|
+
FSFadeOut,
|
|
115
|
+
FSButton,
|
|
116
|
+
FSCard,
|
|
117
|
+
FSCol,
|
|
118
|
+
FSRow
|
|
119
|
+
},
|
|
120
|
+
emits: ["update:mode"],
|
|
121
|
+
setup(props) {
|
|
122
|
+
const { isExtraSmall } = useBreakpoints();
|
|
123
|
+
|
|
124
|
+
const leftOverlayMenuMobile = ref(false);
|
|
125
|
+
const mobileOverlayElement = ref(null);
|
|
126
|
+
|
|
127
|
+
const style = computed((): { [key: string]: string | null | undefined } => {
|
|
128
|
+
if (props.mode === "expand") {
|
|
129
|
+
return {
|
|
130
|
+
"--fs-map-overlay-max-height": `calc(${props.height} - 40px)`,
|
|
131
|
+
"--fs-map-overlay-card-height": "95%",
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
return {
|
|
136
|
+
"--fs-map-overlay-max-height": `calc(${props.height} - 40px)`,
|
|
137
|
+
"--fs-map-overlay-card-height": "100%",
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
return {
|
|
143
|
+
leftOverlayMenuMobile,
|
|
144
|
+
mobileOverlayElement,
|
|
145
|
+
isExtraSmall,
|
|
146
|
+
style
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
</script>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSelectField
|
|
3
|
+
:items="autoRefreshes"
|
|
4
|
+
:clearable="false"
|
|
5
|
+
:modelValue="$props.modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import type { PropType} from "vue";
|
|
13
|
+
import { computed, defineComponent } from "vue";
|
|
14
|
+
|
|
15
|
+
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
16
|
+
import { AutoRefresh } from "@dative-gpi/foundation-shared-domain/models";
|
|
17
|
+
|
|
18
|
+
import FSSelectField from "../fields/FSSelectField.vue";
|
|
19
|
+
|
|
20
|
+
export default defineComponent({
|
|
21
|
+
name: "FSSelectAutoRefresh",
|
|
22
|
+
components: {
|
|
23
|
+
FSSelectField
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: Number as PropType<AutoRefresh>,
|
|
28
|
+
required: false,
|
|
29
|
+
default: AutoRefresh.FifteenSeconds
|
|
30
|
+
},
|
|
31
|
+
useNone: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
required: false,
|
|
34
|
+
default: false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
emits: ["update:modelValue"],
|
|
38
|
+
setup(props) {
|
|
39
|
+
const { $tr } = useTranslationsProvider();
|
|
40
|
+
|
|
41
|
+
const autoRefreshes = computed((): { id: AutoRefresh; label: string }[] => {
|
|
42
|
+
const items = [
|
|
43
|
+
{ id: AutoRefresh.FifteenSeconds, label: $tr("ui.auto-refresh.fifteen-seconds", "Fifteen seconds") },
|
|
44
|
+
{ id: AutoRefresh.ThirtySeconds, label: $tr("ui.auto-refresh.thirty-seconds", "Thirty seconds") },
|
|
45
|
+
{ id: AutoRefresh.OneMinute, label: $tr("ui.auto-refresh.one-minute", "One minute") },
|
|
46
|
+
{ id: AutoRefresh.FiveMinutes, label: $tr("ui.auto-refresh.five-minutes", "Five minutes") },
|
|
47
|
+
{ id: AutoRefresh.FifteenMinutes, label: $tr("ui.auto-refresh.fifteen-minutes", "Fifteen minutes") },
|
|
48
|
+
{ id: AutoRefresh.ThirtyMinutes, label: $tr("ui.auto-refresh.thirty-minutes", "Thirty minutes") },
|
|
49
|
+
{ id: AutoRefresh.OneHour, label: $tr("ui.auto-refresh.one-hour", "One hour") },
|
|
50
|
+
];
|
|
51
|
+
if (props.useNone) {
|
|
52
|
+
items.unshift({ id: AutoRefresh.None, label: $tr("ui.auto-refresh.none", "None") });
|
|
53
|
+
}
|
|
54
|
+
return items;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
autoRefreshes
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
</script>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSelectField
|
|
3
|
+
:items="dashboardVariableTypes"
|
|
4
|
+
:clearable="false"
|
|
5
|
+
:modelValue="$props.modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import type { PropType} from "vue";
|
|
13
|
+
import { computed, defineComponent } from "vue";
|
|
14
|
+
|
|
15
|
+
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
16
|
+
import { DashboardVariableType } from "@dative-gpi/foundation-shared-domain/models";
|
|
17
|
+
|
|
18
|
+
import FSSelectField from "../fields/FSSelectField.vue";
|
|
19
|
+
|
|
20
|
+
export default defineComponent({
|
|
21
|
+
name: "FSSelectDashboardVariableType",
|
|
22
|
+
components: {
|
|
23
|
+
FSSelectField
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: Number as PropType<DashboardVariableType>,
|
|
28
|
+
required: false,
|
|
29
|
+
default: DashboardVariableType.Number
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
emits: ["update:modelValue"],
|
|
33
|
+
setup() {
|
|
34
|
+
const { $tr } = useTranslationsProvider();
|
|
35
|
+
|
|
36
|
+
const dashboardVariableTypes = computed((): { id: DashboardVariableType; label: string }[] => ([
|
|
37
|
+
{ id: DashboardVariableType.Number, label: $tr("ui.dashboard-variable-type.number", "Number") },
|
|
38
|
+
{ id: DashboardVariableType.String, label: $tr("ui.dashboard-variable-type.string", "String") },
|
|
39
|
+
{ id: DashboardVariableType.TimeStep, label: $tr("ui.dashboard-variable-type.time-step", "Time step") }
|
|
40
|
+
]));
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
dashboardVariableTypes
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
</script>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSSelectField
|
|
3
|
-
:editable="$props.editable"
|
|
4
3
|
:items="dateSettings"
|
|
5
|
-
:hideHeader="true"
|
|
6
4
|
:clearable="false"
|
|
7
5
|
:modelValue="$props.modelValue"
|
|
8
6
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -11,7 +9,8 @@
|
|
|
11
9
|
</template>
|
|
12
10
|
|
|
13
11
|
<script lang="ts">
|
|
14
|
-
import {
|
|
12
|
+
import type { PropType } from "vue";
|
|
13
|
+
import { computed, defineComponent } from "vue";
|
|
15
14
|
|
|
16
15
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
17
16
|
import { DateSetting } from "@dative-gpi/foundation-shared-domain/models";
|
|
@@ -31,17 +30,18 @@ export default defineComponent({
|
|
|
31
30
|
},
|
|
32
31
|
modelValue: {
|
|
33
32
|
type: Number as PropType<DateSetting>,
|
|
34
|
-
required:
|
|
33
|
+
required: false,
|
|
34
|
+
default: DateSetting.LastDay
|
|
35
35
|
},
|
|
36
36
|
lastPeriod: {
|
|
37
37
|
type: Boolean,
|
|
38
38
|
required: false,
|
|
39
39
|
default: false
|
|
40
40
|
},
|
|
41
|
-
|
|
41
|
+
useNone: {
|
|
42
42
|
type: Boolean,
|
|
43
43
|
required: false,
|
|
44
|
-
default:
|
|
44
|
+
default: false
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
emits: ["update:modelValue"],
|
|
@@ -51,42 +51,44 @@ export default defineComponent({
|
|
|
51
51
|
const dateSettings = computed((): { id: DateSetting, label: string }[] => {
|
|
52
52
|
if (props.variant === "before-after") {
|
|
53
53
|
return [
|
|
54
|
-
{ id: DateSetting.Pick, label: $tr("ui.
|
|
55
|
-
{ id: DateSetting.MinutesBeforeAfter, label: $tr("ui.
|
|
56
|
-
{ id: DateSetting.HoursBeforeAfter, label: $tr("ui.
|
|
57
|
-
{ id: DateSetting.DaysBeforeAfter, label: $tr("ui.
|
|
58
|
-
{ id: DateSetting.WeeksBeforeAfter, label: $tr("ui.
|
|
59
|
-
{ id: DateSetting.MinutesBefore, label: $tr("ui.
|
|
60
|
-
{ id: DateSetting.HoursBefore, label: $tr("ui.
|
|
61
|
-
{ id: DateSetting.DaysBefore, label: $tr("ui.
|
|
62
|
-
{ id: DateSetting.WeeksBefore, label: $tr("ui.
|
|
63
|
-
{ id: DateSetting.Expression, label: $tr("ui.common.expression", "Expression") }
|
|
54
|
+
{ id: DateSetting.Pick, label: $tr("ui.date-setting.pick-dates", "Pick dates") },
|
|
55
|
+
{ id: DateSetting.MinutesBeforeAfter, label: $tr("ui.date-setting.x-minutes-before-after-hour", "x Minutes before/after") },
|
|
56
|
+
{ id: DateSetting.HoursBeforeAfter, label: $tr("ui.date-setting.x-hours-before-after-hour", "x Hours before/after") },
|
|
57
|
+
{ id: DateSetting.DaysBeforeAfter, label: $tr("ui.date-setting.x-days-before-after-hour", "x Days before/after") },
|
|
58
|
+
{ id: DateSetting.WeeksBeforeAfter, label: $tr("ui.date-setting.x-weeks-before-after-hour", "x Weeks before/after") },
|
|
59
|
+
{ id: DateSetting.MinutesBefore, label: $tr("ui.date-setting.x-minutes-before", "x Minutes before") },
|
|
60
|
+
{ id: DateSetting.HoursBefore, label: $tr("ui.date-setting.x-hours-before", "x Hours before") },
|
|
61
|
+
{ id: DateSetting.DaysBefore, label: $tr("ui.date-setting.x-days-before", "x Days before") },
|
|
62
|
+
{ id: DateSetting.WeeksBefore, label: $tr("ui.date-setting.x-weeks-before", "x Weeks before") },
|
|
64
63
|
];
|
|
65
64
|
}
|
|
66
65
|
let dateSettings = [
|
|
67
|
-
{ id: DateSetting.Pick, label: $tr("ui.
|
|
68
|
-
{ id: DateSetting.CurrentHour, label: $tr("ui.
|
|
69
|
-
{ id: DateSetting.CurrentDay, label: $tr("ui.
|
|
70
|
-
{ id: DateSetting.CurrentWeek, label: $tr("ui.
|
|
71
|
-
{ id: DateSetting.CurrentMonth, label: $tr("ui.
|
|
72
|
-
{ id: DateSetting.CurrentYear, label: $tr("ui.
|
|
73
|
-
{ id: DateSetting.LastDay, label: $tr("ui.
|
|
74
|
-
{ id: DateSetting.LastWeek, label: $tr("ui.
|
|
75
|
-
{ id: DateSetting.LastMonth, label: $tr("ui.
|
|
76
|
-
{ id: DateSetting.LastYear, label: $tr("ui.
|
|
77
|
-
{ id: DateSetting.SinceLastDay, label: $tr("ui.
|
|
78
|
-
{ id: DateSetting.SinceLastWeek, label: $tr("ui.
|
|
79
|
-
{ id: DateSetting.SinceLastMonth, label: $tr("ui.
|
|
80
|
-
{ id: DateSetting.SinceLastYear, label: $tr("ui.
|
|
81
|
-
{ id: DateSetting.PastHours, label: $tr("ui.
|
|
82
|
-
{ id: DateSetting.PastDays, label: $tr("ui.
|
|
83
|
-
{ id: DateSetting.PastWeeks, label: $tr("ui.
|
|
84
|
-
{ id: DateSetting.PastMonths, label: $tr("ui.
|
|
85
|
-
{ id: DateSetting.PastYears, label: $tr("ui.
|
|
86
|
-
{ id: DateSetting.Expression, label: $tr("ui.
|
|
66
|
+
{ id: DateSetting.Pick, label: $tr("ui.date-setting.pick-dates", "Pick dates") },
|
|
67
|
+
{ id: DateSetting.CurrentHour, label: $tr("ui.date-setting.this-hour", "This hour") },
|
|
68
|
+
{ id: DateSetting.CurrentDay, label: $tr("ui.date-setting.this-day", "This day") },
|
|
69
|
+
{ id: DateSetting.CurrentWeek, label: $tr("ui.date-setting.this-week", "This week") },
|
|
70
|
+
{ id: DateSetting.CurrentMonth, label: $tr("ui.date-setting.this-month", "This month") },
|
|
71
|
+
{ id: DateSetting.CurrentYear, label: $tr("ui.date-setting.this-year", "This year") },
|
|
72
|
+
{ id: DateSetting.LastDay, label: $tr("ui.date-setting.last-day", "Last day") },
|
|
73
|
+
{ id: DateSetting.LastWeek, label: $tr("ui.date-setting.last-week", "Last week") },
|
|
74
|
+
{ id: DateSetting.LastMonth, label: $tr("ui.date-setting.last-month", "Last month") },
|
|
75
|
+
{ id: DateSetting.LastYear, label: $tr("ui.date-setting.last-year", "Last year") },
|
|
76
|
+
{ id: DateSetting.SinceLastDay, label: $tr("ui.date-setting.since-last-day", "Since last day") },
|
|
77
|
+
{ id: DateSetting.SinceLastWeek, label: $tr("ui.date-setting.since-last-week", "Since last week") },
|
|
78
|
+
{ id: DateSetting.SinceLastMonth, label: $tr("ui.date-setting.since-last-month", "Since last month") },
|
|
79
|
+
{ id: DateSetting.SinceLastYear, label: $tr("ui.date-setting.since-last-year", "Since last year") },
|
|
80
|
+
{ id: DateSetting.PastHours, label: $tr("ui.date-setting.past-x-hours", "Past x hours") },
|
|
81
|
+
{ id: DateSetting.PastDays, label: $tr("ui.date-setting.past-x-days", "Past x days") },
|
|
82
|
+
{ id: DateSetting.PastWeeks, label: $tr("ui.date-setting.past-x-weeks", "Past x weeks") },
|
|
83
|
+
{ id: DateSetting.PastMonths, label: $tr("ui.date-setting.past-x-months", "Past x months") },
|
|
84
|
+
{ id: DateSetting.PastYears, label: $tr("ui.date-setting.past-x-years", "Past x years") },
|
|
85
|
+
{ id: DateSetting.Expression, label: $tr("ui.date-setting.expression", "Expression") }
|
|
87
86
|
];
|
|
88
87
|
if (props.lastPeriod) {
|
|
89
|
-
dateSettings.push({ id: DateSetting.LastPeriod, label: $tr("ui.
|
|
88
|
+
dateSettings.push({ id: DateSetting.LastPeriod, label: $tr("ui.date-setting.last-period", "Last period") });
|
|
89
|
+
}
|
|
90
|
+
if (props.useNone) {
|
|
91
|
+
dateSettings.unshift({ id: DateSetting.None, label: $tr("ui.date-setting.none", "None") });
|
|
90
92
|
}
|
|
91
93
|
return dateSettings;
|
|
92
94
|
})
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSelectField
|
|
3
|
+
:clearable="false"
|
|
4
|
+
:items="days"
|
|
5
|
+
:modelValue="$props.modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import type { PropType} from "vue";
|
|
13
|
+
import { computed, defineComponent } from "vue";
|
|
14
|
+
|
|
15
|
+
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
16
|
+
import { Days } from "@dative-gpi/foundation-shared-domain/models";
|
|
17
|
+
|
|
18
|
+
import FSSelectField from "../fields/FSSelectField.vue";
|
|
19
|
+
|
|
20
|
+
export default defineComponent({
|
|
21
|
+
name: "FSSelectDays",
|
|
22
|
+
components: {
|
|
23
|
+
FSSelectField
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: Number as PropType<Days>,
|
|
28
|
+
required: false,
|
|
29
|
+
default: Days.Monday
|
|
30
|
+
},
|
|
31
|
+
useAllDays: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
required: false,
|
|
34
|
+
default: true
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
emits: ["update:modelValue"],
|
|
38
|
+
setup(props) {
|
|
39
|
+
const { $tr } = useTranslationsProvider();
|
|
40
|
+
|
|
41
|
+
const days = computed((): { id: Days; label: string }[] => {
|
|
42
|
+
const items = [
|
|
43
|
+
{ id: Days.Monday, label: $tr("ui.days.monday", "Monday") },
|
|
44
|
+
{ id: Days.Tuesday, label: $tr("ui.days.tuesday", "Tuesday") },
|
|
45
|
+
{ id: Days.Wednesday, label: $tr("ui.days.wednesday", "Wednesday") },
|
|
46
|
+
{ id: Days.Thursday, label: $tr("ui.days.thursday", "Thursday") },
|
|
47
|
+
{ id: Days.Friday, label: $tr("ui.days.friday", "Friday") },
|
|
48
|
+
{ id: Days.Saturday, label: $tr("ui.days.saturday", "Saturday") },
|
|
49
|
+
{ id: Days.Sunday, label: $tr("ui.days.sunday", "Sunday") }
|
|
50
|
+
];
|
|
51
|
+
if (props.useAllDays) {
|
|
52
|
+
items.unshift({ id: Days.AllDays, label: $tr("ui.days.all-days", "All days") });
|
|
53
|
+
}
|
|
54
|
+
return items;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
days
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
</script>
|