@dative-gpi/foundation-shared-components 1.0.69 → 1.0.71-groupings-2
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 +9 -7
- package/components/FSSlider.vue +44 -79
- package/components/FSSpan.vue +22 -8
- package/components/FSSwitch.vue +44 -48
- package/components/FSTab.vue +15 -13
- package/components/FSTabs.vue +5 -2
- package/components/FSTag.vue +3 -3
- package/components/FSTagGroup.vue +6 -4
- package/components/FSText.vue +21 -8
- package/components/FSToggleSet.vue +7 -7
- package/components/FSTreeView.vue +107 -0
- package/components/FSWindow.vue +122 -5
- 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/carousels/FSCarousel.vue +23 -0
- package/components/carousels/FSCarouselItem.vue +14 -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/FSMapAddressField.vue +187 -0
- package/components/fields/FSNumberField.vue +8 -4
- package/components/fields/FSPasswordField.vue +7 -7
- package/components/fields/FSPoliciesValidationField.vue +101 -0
- 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 +117 -187
- package/components/fields/FSTimeStepField.vue +5 -5
- package/components/fields/FSTranslateField.vue +10 -10
- package/components/fields/FSTranslateRichTextField.vue +41 -20
- package/components/fields/FSTranslateTextArea.vue +10 -10
- package/components/fields/FSTreeViewField.vue +21 -19
- package/components/fields/periodicField/FSPeriodicDailyField.vue +7 -7
- package/components/fields/periodicField/FSPeriodicField.vue +15 -15
- package/components/fields/periodicField/FSPeriodicMonthlyField.vue +16 -16
- package/components/fields/periodicField/FSPeriodicWeeklyField.vue +28 -18
- package/components/fields/periodicField/FSPeriodicYearlyField.vue +12 -12
- package/components/lists/FSDataIteratorItem.vue +23 -67
- package/components/lists/FSDataTableUI.vue +194 -119
- package/components/lists/FSFilterButton.vue +14 -16
- package/components/lists/FSHeaderButton.vue +11 -9
- package/components/lists/FSHiddenButton.vue +9 -9
- package/components/lists/FSLoadDataTable.vue +10 -7
- package/components/lists/FSSimpleList.vue +95 -88
- package/components/lists/FSSimpleListItem.vue +131 -0
- package/components/map/FSMap.vue +144 -158
- package/components/map/FSMapFeatureGroup.vue +7 -1
- package/components/map/FSMapLayerButton.vue +3 -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/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 +83 -0
- package/components/tiles/FSFolderTileUI.vue +38 -4
- package/components/tiles/FSGroupTileUI.vue +32 -136
- package/components/tiles/FSGroupingTileUI.vue +52 -0
- package/components/tiles/FSLoadTile.vue +16 -10
- package/components/tiles/FSLocationTileUI.vue +50 -80
- package/components/tiles/FSServiceAccountOrganisationTileUI.vue +0 -6
- package/components/tiles/FSSimpleTileUI.vue +32 -27
- 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 -1
- package/composables/useAddress.ts +40 -8
- package/composables/useBreakpoints.ts +40 -4
- package/composables/useColors.ts +16 -7
- 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/index.ts +0 -1
- 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 +3 -1
- package/styles/components/fs_slider.scss +0 -40
- package/styles/components/fs_span.scss +17 -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 +3 -0
- package/styles/components/index.scss +2 -6
- package/styles/globals/index.scss +1 -5
- package/styles/globals/overrides.scss +26 -44
- 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 +156 -16
- package/tools/index.ts +1 -0
- package/tools/reportsTools.ts +38 -0
- package/tools/timeRangeTools.ts +99 -40
- package/utils/badge.ts +9 -5
- 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/FSMagicConfigField.vue +0 -163
- package/components/fields/FSMagicField.vue +0 -193
- 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/composables/useMagicFieldProvider.ts +0 -23
- package/models/magicFields.ts +0 -10
- package/styles/components/fs_data_iterator_item.scss +0 -33
- package/styles/components/fs_icon_field.scss +0 -12
- package/styles/components/fs_search_field.scss +0 -3
- package/styles/components/fs_tag_field.scss +0 -8
- package/styles/components/fs_time_field.scss +0 -12
- package/styles/components/fs_timeslot_field.scss +0 -12
- package/styles/globals/breakpoints.scss +0 -20
- package/styles/globals/fixes.scss +0 -5
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSearchField
|
|
3
|
+
:modelValue="$props.modelValue"
|
|
4
|
+
:appendInnerIcon="$props.closable ? $props.appendInnerIcon : null"
|
|
5
|
+
:clearable="false"
|
|
6
|
+
@click:appendInner="onCloseClicked"
|
|
7
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
>
|
|
10
|
+
<template
|
|
11
|
+
v-for="(_, name) in $slots"
|
|
12
|
+
v-slot:[name]="slotData"
|
|
13
|
+
>
|
|
14
|
+
<slot
|
|
15
|
+
:name="name"
|
|
16
|
+
v-bind="slotData"
|
|
17
|
+
/>
|
|
18
|
+
</template>
|
|
19
|
+
</FSSearchField>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { defineComponent, type PropType } from "vue";
|
|
24
|
+
|
|
25
|
+
import FSSearchField from "./FSSearchField.vue";
|
|
26
|
+
|
|
27
|
+
export default defineComponent({
|
|
28
|
+
name: "FSClosableSearchField",
|
|
29
|
+
components: {
|
|
30
|
+
FSSearchField
|
|
31
|
+
},
|
|
32
|
+
props: {
|
|
33
|
+
closable: {
|
|
34
|
+
type: Boolean as PropType<boolean>,
|
|
35
|
+
required: false,
|
|
36
|
+
default: true
|
|
37
|
+
},
|
|
38
|
+
unfocusOnClose: {
|
|
39
|
+
type: Boolean as PropType<boolean>,
|
|
40
|
+
required: false,
|
|
41
|
+
default: true
|
|
42
|
+
},
|
|
43
|
+
clearOnClose: {
|
|
44
|
+
type: Boolean as PropType<boolean>,
|
|
45
|
+
required: false,
|
|
46
|
+
default: true
|
|
47
|
+
},
|
|
48
|
+
modelValue: {
|
|
49
|
+
type: String as PropType<string | null>,
|
|
50
|
+
required: false,
|
|
51
|
+
default: null
|
|
52
|
+
},
|
|
53
|
+
appendInnerIcon: {
|
|
54
|
+
type: String as PropType<string | undefined>,
|
|
55
|
+
required: false,
|
|
56
|
+
default: 'mdi-close'
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
emits: ["update:modelValue", "close"],
|
|
60
|
+
setup(props, { emit }) {
|
|
61
|
+
const onCloseClicked = ($event: MouseEvent) => {
|
|
62
|
+
if(!props.closable) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (props.unfocusOnClose) {
|
|
67
|
+
$event.preventDefault();
|
|
68
|
+
$event.stopPropagation();
|
|
69
|
+
(document.activeElement as HTMLElement)?.blur();
|
|
70
|
+
}
|
|
71
|
+
if (props.clearOnClose) {
|
|
72
|
+
emit('update:modelValue', null);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
emit('close');
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
onCloseClicked
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
</script>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
2
|
<FSBaseField
|
|
4
3
|
class="fs-color-field"
|
|
5
4
|
:description="$props.description"
|
|
6
5
|
:hideHeader="$props.hideHeader"
|
|
7
|
-
:
|
|
6
|
+
:disabled="$props.disabled"
|
|
8
7
|
:required="$props.required"
|
|
9
8
|
:label="$props.label"
|
|
10
9
|
:width="$props.width"
|
|
@@ -16,7 +15,7 @@
|
|
|
16
15
|
:id="activatorId"
|
|
17
16
|
padding="8px"
|
|
18
17
|
width="100%"
|
|
19
|
-
:class="{ 'fs-color-field-disabled':
|
|
18
|
+
:class="{ 'fs-color-field-disabled': $props.disabled }"
|
|
20
19
|
>
|
|
21
20
|
<FSRow
|
|
22
21
|
align="center-center"
|
|
@@ -34,12 +33,12 @@
|
|
|
34
33
|
</FSRow>
|
|
35
34
|
</FSCard>
|
|
36
35
|
</FSBaseField>
|
|
37
|
-
<
|
|
36
|
+
<FSMenu
|
|
38
37
|
origin="top left"
|
|
39
38
|
min-width="300px"
|
|
40
39
|
:activator="`#${activatorId}`"
|
|
41
40
|
:closeOnContentClick="false"
|
|
42
|
-
:modelValue="menu &&
|
|
41
|
+
:modelValue="menu && !$props.disabled"
|
|
43
42
|
@update:modelValue="menu = $event"
|
|
44
43
|
>
|
|
45
44
|
<FSCard
|
|
@@ -73,7 +72,7 @@
|
|
|
73
72
|
/>
|
|
74
73
|
</FSCol>
|
|
75
74
|
</FSCard>
|
|
76
|
-
</
|
|
75
|
+
</FSMenu>
|
|
77
76
|
</template>
|
|
78
77
|
|
|
79
78
|
<script lang="ts">
|
|
@@ -87,6 +86,7 @@ import FSBaseField from "./FSBaseField.vue";
|
|
|
87
86
|
import FSCard from "../FSCard.vue";
|
|
88
87
|
import FSIcon from "../FSIcon.vue";
|
|
89
88
|
import FSText from "../FSText.vue";
|
|
89
|
+
import FSMenu from "../FSMenu.vue";
|
|
90
90
|
import FSRow from "../FSRow.vue";
|
|
91
91
|
import FSCol from "../FSCol.vue";
|
|
92
92
|
|
|
@@ -94,6 +94,7 @@ export default defineComponent({
|
|
|
94
94
|
name: "FSColorField",
|
|
95
95
|
components: {
|
|
96
96
|
FSBaseField,
|
|
97
|
+
FSMenu,
|
|
97
98
|
FSText,
|
|
98
99
|
FSCard,
|
|
99
100
|
FSIcon,
|
|
@@ -131,10 +132,10 @@ export default defineComponent({
|
|
|
131
132
|
required: false,
|
|
132
133
|
default: false
|
|
133
134
|
},
|
|
134
|
-
|
|
135
|
+
disabled: {
|
|
135
136
|
type: Boolean,
|
|
136
137
|
required: false,
|
|
137
|
-
default:
|
|
138
|
+
default: false
|
|
138
139
|
},
|
|
139
140
|
allowOpacity: {
|
|
140
141
|
type: Boolean,
|
|
@@ -152,7 +153,7 @@ export default defineComponent({
|
|
|
152
153
|
default: "fill"
|
|
153
154
|
}
|
|
154
155
|
},
|
|
155
|
-
emits: ["update:modelValue", "update:opacity"],
|
|
156
|
+
emits: ["update", "update:modelValue", "update:opacity"],
|
|
156
157
|
setup(props, { emit }) {
|
|
157
158
|
const { getColors, getBasePaletteColors } = useColors();
|
|
158
159
|
const { slots } = useSlots();
|
|
@@ -170,7 +171,7 @@ export default defineComponent({
|
|
|
170
171
|
const fullColor = ref("#00000000");
|
|
171
172
|
|
|
172
173
|
const style = computed((): StyleValue => {
|
|
173
|
-
if (
|
|
174
|
+
if (props.disabled) {
|
|
174
175
|
return {
|
|
175
176
|
"--fs-color-field-cursor" : "default",
|
|
176
177
|
"--fs-color-field-border-color" : lights.base,
|
|
@@ -192,6 +193,7 @@ export default defineComponent({
|
|
|
192
193
|
fullColor.value = innerColor.value + innerOpacity.value;
|
|
193
194
|
emit("update:modelValue", innerColor.value);
|
|
194
195
|
emit("update:opacity", getPercentageFromHex(innerOpacity.value));
|
|
196
|
+
emit("update", { modelValue: innerColor.value, opacity: getPercentageFromHex(innerOpacity.value) });
|
|
195
197
|
};
|
|
196
198
|
|
|
197
199
|
const reset = (): void => {
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
>
|
|
6
6
|
<FSImage
|
|
7
7
|
:imageId="userImageId"
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
width="32px"
|
|
9
|
+
height="32px"
|
|
10
10
|
rounded="circle"
|
|
11
|
+
:thumbnail="true"
|
|
11
12
|
/>
|
|
12
13
|
<FSTextArea
|
|
13
14
|
:rows="5"
|
|
@@ -17,18 +18,21 @@
|
|
|
17
18
|
/>
|
|
18
19
|
</FSRow>
|
|
19
20
|
<FSRow>
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
<FSRow
|
|
22
|
+
align="center-right"
|
|
23
|
+
>
|
|
24
|
+
<FSButtonCancel
|
|
25
|
+
v-if="showCancelButton"
|
|
26
|
+
@click="$emit('cancel')"
|
|
27
|
+
/>
|
|
28
|
+
<FSButton
|
|
29
|
+
prependIcon="mdi-send-outline"
|
|
30
|
+
:color="ColorEnum.Primary"
|
|
31
|
+
:loading="creating"
|
|
32
|
+
:label="buttonLabel ?? $tr('ui.common.publish','Publish')"
|
|
33
|
+
@click="onSubmit"
|
|
34
|
+
/>
|
|
35
|
+
</FSRow>
|
|
32
36
|
</FSRow>
|
|
33
37
|
</FSCol>
|
|
34
38
|
</template>
|
|
@@ -80,13 +84,21 @@ export default defineComponent({
|
|
|
80
84
|
},
|
|
81
85
|
},
|
|
82
86
|
emits: ["submit","cancel"],
|
|
83
|
-
setup(props) {
|
|
87
|
+
setup(props, { emit }) {
|
|
84
88
|
|
|
85
89
|
const innertext = ref<string | undefined>(props.text);
|
|
90
|
+
|
|
91
|
+
const onSubmit = () => {
|
|
92
|
+
if (innertext.value) {
|
|
93
|
+
emit('submit', innertext.value);
|
|
94
|
+
innertext.value = '';
|
|
95
|
+
}
|
|
96
|
+
};
|
|
86
97
|
|
|
87
98
|
return {
|
|
88
99
|
innertext,
|
|
89
|
-
ColorEnum
|
|
100
|
+
ColorEnum,
|
|
101
|
+
onSubmit,
|
|
90
102
|
};
|
|
91
103
|
},
|
|
92
104
|
})
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
:color="$props.color"
|
|
11
11
|
:hideHeader="$props.hideHeader"
|
|
12
12
|
:required="$props.required"
|
|
13
|
-
:
|
|
13
|
+
:disabled="$props.disabled"
|
|
14
14
|
:readonly="true"
|
|
15
15
|
:rules="$props.rules"
|
|
16
16
|
:messages="messages"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<FSButton
|
|
30
30
|
variant="icon"
|
|
31
31
|
icon="mdi-calendar"
|
|
32
|
-
:
|
|
32
|
+
:disabled="$props.disabled"
|
|
33
33
|
:color="ColorEnum.Dark"
|
|
34
34
|
@click="openMobileOverlay"
|
|
35
35
|
/>
|
|
@@ -71,9 +71,10 @@
|
|
|
71
71
|
<template
|
|
72
72
|
v-else
|
|
73
73
|
>
|
|
74
|
-
<
|
|
74
|
+
<FSMenu
|
|
75
|
+
min-width="300px"
|
|
75
76
|
:closeOnContentClick="false"
|
|
76
|
-
:modelValue="menu &&
|
|
77
|
+
:modelValue="menu && !$props.disabled"
|
|
77
78
|
@update:modelValue="menu = $event"
|
|
78
79
|
>
|
|
79
80
|
<template
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
:color="$props.color"
|
|
87
88
|
:hideHeader="$props.hideHeader"
|
|
88
89
|
:required="$props.required"
|
|
89
|
-
:
|
|
90
|
+
:disabled="$props.disabled"
|
|
90
91
|
:readonly="true"
|
|
91
92
|
:rules="$props.rules"
|
|
92
93
|
:messages="messages"
|
|
@@ -105,7 +106,7 @@
|
|
|
105
106
|
<FSButton
|
|
106
107
|
variant="icon"
|
|
107
108
|
icon="mdi-calendar"
|
|
108
|
-
:
|
|
109
|
+
:disabled="$props.disabled"
|
|
109
110
|
:color="ColorEnum.Dark"
|
|
110
111
|
/>
|
|
111
112
|
</slot>
|
|
@@ -141,7 +142,7 @@
|
|
|
141
142
|
/>
|
|
142
143
|
</FSCol>
|
|
143
144
|
</FSCard>
|
|
144
|
-
</
|
|
145
|
+
</FSMenu>
|
|
145
146
|
</template>
|
|
146
147
|
</FSCol>
|
|
147
148
|
</template>
|
|
@@ -159,6 +160,7 @@ import FSTextField from "./FSTextField.vue";
|
|
|
159
160
|
import FSCalendar from "../FSCalendar.vue";
|
|
160
161
|
import FSButton from "../FSButton.vue";
|
|
161
162
|
import FSCard from "../FSCard.vue";
|
|
163
|
+
import FSMenu from '../FSMenu.vue';
|
|
162
164
|
import FSCol from "../FSCol.vue";
|
|
163
165
|
|
|
164
166
|
export default defineComponent({
|
|
@@ -169,6 +171,7 @@ export default defineComponent({
|
|
|
169
171
|
FSCalendar,
|
|
170
172
|
FSButton,
|
|
171
173
|
FSCard,
|
|
174
|
+
FSMenu,
|
|
172
175
|
FSCol
|
|
173
176
|
},
|
|
174
177
|
props: {
|
|
@@ -207,10 +210,10 @@ export default defineComponent({
|
|
|
207
210
|
required: false,
|
|
208
211
|
default: () => []
|
|
209
212
|
},
|
|
210
|
-
|
|
213
|
+
disabled: {
|
|
211
214
|
type: Boolean,
|
|
212
215
|
required: false,
|
|
213
|
-
default:
|
|
216
|
+
default: false
|
|
214
217
|
}
|
|
215
218
|
},
|
|
216
219
|
emits: ["update:modelValue"],
|
|
@@ -227,7 +230,7 @@ export default defineComponent({
|
|
|
227
230
|
const messages = computed((): string[] => getMessages(props.modelValue, props.rules));
|
|
228
231
|
|
|
229
232
|
const openMobileOverlay = () => {
|
|
230
|
-
if (
|
|
233
|
+
if (props.disabled) {
|
|
231
234
|
return;
|
|
232
235
|
}
|
|
233
236
|
dialog.value = true;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:color="$props.color"
|
|
7
7
|
:hideHeader="$props.hideHeader"
|
|
8
8
|
:required="$props.required"
|
|
9
|
-
:
|
|
9
|
+
:disabled="$props.disabled"
|
|
10
10
|
:readonly="true"
|
|
11
11
|
:rules="$props.rules"
|
|
12
12
|
:messages="messages"
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
:modelValue="toShortDateFormat"
|
|
16
16
|
@click="onClick"
|
|
17
17
|
@update:modelValue="onClear"
|
|
18
|
+
v-bind="$attrs"
|
|
18
19
|
>
|
|
19
20
|
<template
|
|
20
21
|
#prepend-inner
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
<FSButton
|
|
26
27
|
variant="icon"
|
|
27
28
|
icon="mdi-calendar"
|
|
28
|
-
:
|
|
29
|
+
:disabled="$props.disabled"
|
|
29
30
|
:color="ColorEnum.Dark"
|
|
30
31
|
/>
|
|
31
32
|
</slot>
|
|
@@ -114,10 +115,10 @@ export default defineComponent({
|
|
|
114
115
|
required: false,
|
|
115
116
|
default: () => []
|
|
116
117
|
},
|
|
117
|
-
|
|
118
|
+
disabled: {
|
|
118
119
|
type: Boolean,
|
|
119
120
|
required: false,
|
|
120
|
-
default:
|
|
121
|
+
default: false
|
|
121
122
|
}
|
|
122
123
|
},
|
|
123
124
|
emits: ["update:modelValue"],
|
|
@@ -139,7 +140,7 @@ export default defineComponent({
|
|
|
139
140
|
const messages = computed((): string[] => getMessages(props.modelValue, props.rules, true));
|
|
140
141
|
|
|
141
142
|
const onClick = (): void => {
|
|
142
|
-
if (props.
|
|
143
|
+
if (!props.disabled) {
|
|
143
144
|
dialog.value = true;
|
|
144
145
|
}
|
|
145
146
|
};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
:color="$props.color"
|
|
11
11
|
:hideHeader="$props.hideHeader"
|
|
12
12
|
:required="$props.required"
|
|
13
|
-
:
|
|
13
|
+
:disabled="$props.disabled"
|
|
14
14
|
:readonly="true"
|
|
15
15
|
:rules="$props.rules"
|
|
16
16
|
:messages="messages"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<FSButton
|
|
30
30
|
variant="icon"
|
|
31
31
|
icon="mdi-calendar"
|
|
32
|
-
:
|
|
32
|
+
:disabled="$props.disabled"
|
|
33
33
|
:color="ColorEnum.Dark"
|
|
34
34
|
@click="openMobileOverlay"
|
|
35
35
|
/>
|
|
@@ -91,9 +91,10 @@
|
|
|
91
91
|
<template
|
|
92
92
|
v-else
|
|
93
93
|
>
|
|
94
|
-
<
|
|
94
|
+
<FSMenu
|
|
95
|
+
min-width="300px"
|
|
95
96
|
:closeOnContentClick="false"
|
|
96
|
-
:modelValue="menu &&
|
|
97
|
+
:modelValue="menu && !$props.disabled"
|
|
97
98
|
@update:modelValue="menu = $event"
|
|
98
99
|
>
|
|
99
100
|
<template
|
|
@@ -106,7 +107,7 @@
|
|
|
106
107
|
:color="$props.color"
|
|
107
108
|
:hideHeader="$props.hideHeader"
|
|
108
109
|
:required="$props.required"
|
|
109
|
-
:
|
|
110
|
+
:disabled="$props.disabled"
|
|
110
111
|
:readonly="true"
|
|
111
112
|
:rules="$props.rules"
|
|
112
113
|
:messages="messages"
|
|
@@ -125,7 +126,7 @@
|
|
|
125
126
|
<FSButton
|
|
126
127
|
variant="icon"
|
|
127
128
|
icon="mdi-calendar"
|
|
128
|
-
:
|
|
129
|
+
:disabled="$props.disabled"
|
|
129
130
|
:color="ColorEnum.Dark"
|
|
130
131
|
/>
|
|
131
132
|
</slot>
|
|
@@ -187,7 +188,7 @@
|
|
|
187
188
|
</FSCol>
|
|
188
189
|
</FSCard>
|
|
189
190
|
</FSWindow>
|
|
190
|
-
</
|
|
191
|
+
</FSMenu>
|
|
191
192
|
</template>
|
|
192
193
|
</FSCol>
|
|
193
194
|
</template>
|
|
@@ -206,6 +207,7 @@ import FSWindow from "../FSWindow.vue";
|
|
|
206
207
|
import FSButton from "../FSButton.vue";
|
|
207
208
|
import FSClock from "../FSClock.vue";
|
|
208
209
|
import FSCard from "../FSCard.vue";
|
|
210
|
+
import FSMenu from '../FSMenu.vue';
|
|
209
211
|
import FSCol from "../FSCol.vue";
|
|
210
212
|
|
|
211
213
|
export default defineComponent({
|
|
@@ -218,6 +220,7 @@ export default defineComponent({
|
|
|
218
220
|
FSButton,
|
|
219
221
|
FSClock,
|
|
220
222
|
FSCard,
|
|
223
|
+
FSMenu,
|
|
221
224
|
FSCol
|
|
222
225
|
},
|
|
223
226
|
props: {
|
|
@@ -256,10 +259,10 @@ export default defineComponent({
|
|
|
256
259
|
required: false,
|
|
257
260
|
default: () => []
|
|
258
261
|
},
|
|
259
|
-
|
|
262
|
+
disabled: {
|
|
260
263
|
type: Boolean,
|
|
261
264
|
required: false,
|
|
262
|
-
default:
|
|
265
|
+
default: false
|
|
263
266
|
}
|
|
264
267
|
},
|
|
265
268
|
emits: ["update:modelValue"],
|
|
@@ -279,7 +282,7 @@ export default defineComponent({
|
|
|
279
282
|
const messages = computed((): string[] => getMessages(props.modelValue, props.rules));
|
|
280
283
|
|
|
281
284
|
const openMobileOverlay = () => {
|
|
282
|
-
if (
|
|
285
|
+
if (props.disabled) {
|
|
283
286
|
return;
|
|
284
287
|
}
|
|
285
288
|
dialog.value = true;
|
|
@@ -301,7 +304,7 @@ export default defineComponent({
|
|
|
301
304
|
if (props.modelValue) {
|
|
302
305
|
// FSClock just gives two numbers without consideration for the time zone
|
|
303
306
|
// We must adjust the time to the user's time zone
|
|
304
|
-
innerTime.value = Math.floor((props.modelValue + getUserOffset()) % (24 * 60 * 60 * 1000));
|
|
307
|
+
innerTime.value = Math.floor((props.modelValue + getUserOffset(props.modelValue)) % (24 * 60 * 60 * 1000));
|
|
305
308
|
innerDate.value = props.modelValue - innerTime.value;
|
|
306
309
|
}
|
|
307
310
|
else {
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSDialogSubmit
|
|
3
|
+
:title="$props.label"
|
|
4
|
+
:submitButtonColor="$props.color"
|
|
5
|
+
:modelValue="$props.dialog"
|
|
6
|
+
:disabled="!valid"
|
|
7
|
+
@update:modelValue="$emit('cancel')"
|
|
8
|
+
@click:submitButton="onSubmit"
|
|
9
|
+
>
|
|
10
|
+
<template
|
|
11
|
+
#body
|
|
12
|
+
>
|
|
13
|
+
<FSCol>
|
|
14
|
+
<FSCalendarTwin
|
|
15
|
+
:color="$props.color"
|
|
16
|
+
v-model="innerDateRange"
|
|
17
|
+
/>
|
|
18
|
+
<FSRow>
|
|
19
|
+
<FSCol>
|
|
20
|
+
<FSClock
|
|
21
|
+
:color="$props.color"
|
|
22
|
+
:date="innerDateLeft"
|
|
23
|
+
v-model="innerTimeLeft"
|
|
24
|
+
/>
|
|
25
|
+
</FSCol>
|
|
26
|
+
<FSCol>
|
|
27
|
+
<FSClock
|
|
28
|
+
:color="$props.color"
|
|
29
|
+
:date="innerDateRight"
|
|
30
|
+
v-model="innerTimeRight"
|
|
31
|
+
/>
|
|
32
|
+
</FSCol>
|
|
33
|
+
</FSRow>
|
|
34
|
+
</FSCol>
|
|
35
|
+
</template>
|
|
36
|
+
</FSDialogSubmit>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script lang="ts">
|
|
40
|
+
import { computed, defineComponent, type PropType, ref, watch } from "vue";
|
|
41
|
+
|
|
42
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
43
|
+
import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
44
|
+
|
|
45
|
+
import FSDialogSubmit from "../FSDialogSubmit.vue";
|
|
46
|
+
import FSCalendarTwin from "../FSCalendarTwin.vue";
|
|
47
|
+
import FSClock from "../FSClock.vue";
|
|
48
|
+
import FSCol from "../FSCol.vue";
|
|
49
|
+
import FSRow from "../FSRow.vue";
|
|
50
|
+
|
|
51
|
+
export default defineComponent({
|
|
52
|
+
name: "FSDateTimeRangeDialog",
|
|
53
|
+
components: {
|
|
54
|
+
FSDialogSubmit,
|
|
55
|
+
FSCalendarTwin,
|
|
56
|
+
FSClock,
|
|
57
|
+
FSCol,
|
|
58
|
+
FSRow
|
|
59
|
+
},
|
|
60
|
+
props: {
|
|
61
|
+
label: {
|
|
62
|
+
type: String as PropType<string | null>,
|
|
63
|
+
required: false,
|
|
64
|
+
default: null
|
|
65
|
+
},
|
|
66
|
+
modelValue: {
|
|
67
|
+
type: Array as PropType<number[] | null>,
|
|
68
|
+
required: false,
|
|
69
|
+
default: () => null
|
|
70
|
+
},
|
|
71
|
+
color: {
|
|
72
|
+
type: String as PropType<ColorBase>,
|
|
73
|
+
required: false,
|
|
74
|
+
default: ColorEnum.Primary
|
|
75
|
+
},
|
|
76
|
+
dialog: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
required: false,
|
|
79
|
+
default: false
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
emits: ["update:modelValue", "cancel"],
|
|
83
|
+
setup(props, { emit }) {
|
|
84
|
+
const { getUserOffset } = useAppTimeZone();
|
|
85
|
+
|
|
86
|
+
const innerDateRange = ref<number[] | null>(null);
|
|
87
|
+
const innerTimeRight = ref(0);
|
|
88
|
+
const innerTimeLeft = ref(0);
|
|
89
|
+
|
|
90
|
+
const innerDateLeft = computed((): number | null => {
|
|
91
|
+
if (innerDateRange.value && Array.isArray(innerDateRange.value) && innerDateRange.value.length) {
|
|
92
|
+
return innerDateRange.value[0];
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const innerDateRight= computed((): number | null => {
|
|
98
|
+
if (innerDateRange.value && Array.isArray(innerDateRange.value) && innerDateRange.value.length > 1) {
|
|
99
|
+
return innerDateRange.value[1];
|
|
100
|
+
}
|
|
101
|
+
return null;
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
const valid = computed((): boolean => {
|
|
105
|
+
return !!innerDateRange.value && Array.isArray(innerDateRange.value) && innerDateRange.value.length > 1 &&
|
|
106
|
+
innerDateRange.value[0] + innerTimeLeft.value < innerDateRange.value[1] + innerTimeRight.value;
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const reset = (): void => {
|
|
110
|
+
if (props.modelValue && Array.isArray(props.modelValue)) {
|
|
111
|
+
// FSClock just gives two numbers without consideration for the time zone
|
|
112
|
+
// We must adjust the time to the user's time zone
|
|
113
|
+
switch (props.modelValue.length) {
|
|
114
|
+
case 0: {
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
case 1: {
|
|
118
|
+
innerTimeLeft.value = Math.floor((props.modelValue[0] + getUserOffset(props.modelValue[0])) % (24 * 60 * 60 * 1000));
|
|
119
|
+
innerDateRange.value = [props.modelValue[0] - innerTimeLeft.value];
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
default: {
|
|
123
|
+
innerTimeLeft.value = Math.floor((props.modelValue[0] + getUserOffset(props.modelValue[0])) % (24 * 60 * 60 * 1000));
|
|
124
|
+
innerTimeRight.value = Math.floor((props.modelValue[1] + getUserOffset(props.modelValue[1])) % (24 * 60 * 60 * 1000));
|
|
125
|
+
innerDateRange.value = [props.modelValue[0] - innerTimeLeft.value, props.modelValue[1] - innerTimeRight.value];
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
innerDateRange.value = null;
|
|
132
|
+
innerTimeLeft.value = 0;
|
|
133
|
+
innerTimeRight.value = 0;
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
watch(() => props.modelValue, () => {
|
|
138
|
+
reset();
|
|
139
|
+
}, { immediate: true });
|
|
140
|
+
|
|
141
|
+
const onSubmit = (): void => {
|
|
142
|
+
if (valid.value) {
|
|
143
|
+
emit("update:modelValue", [innerDateRange.value![0] + innerTimeLeft.value, innerDateRange.value![1] + innerTimeRight.value]);
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
return {
|
|
149
|
+
valid,
|
|
150
|
+
innerDateLeft,
|
|
151
|
+
innerTimeLeft,
|
|
152
|
+
innerDateRight,
|
|
153
|
+
innerTimeRight,
|
|
154
|
+
innerDateRange,
|
|
155
|
+
ColorEnum,
|
|
156
|
+
onSubmit
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
</script>
|