@dative-gpi/foundation-shared-components 1.0.70 → 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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSTextField
|
|
3
3
|
:type="type"
|
|
4
|
-
:
|
|
4
|
+
:disabled="$props.disabled"
|
|
5
5
|
:modelValue="$props.modelValue"
|
|
6
6
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
7
|
v-bind="$attrs"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
>
|
|
21
21
|
<FSButton
|
|
22
22
|
variant="icon"
|
|
23
|
-
:
|
|
23
|
+
:disabled="$props.disabled"
|
|
24
24
|
:color="ColorEnum.Dark"
|
|
25
25
|
:icon="icon"
|
|
26
26
|
@click="onToggle"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</template>
|
|
34
34
|
|
|
35
35
|
<script lang="ts">
|
|
36
|
-
import { computed, defineComponent, type PropType,
|
|
36
|
+
import { computed, defineComponent, ref, type PropType, type StyleValue } from "vue";
|
|
37
37
|
|
|
38
38
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
39
39
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -53,10 +53,10 @@ export default defineComponent({
|
|
|
53
53
|
required: false,
|
|
54
54
|
default: null
|
|
55
55
|
},
|
|
56
|
-
|
|
56
|
+
disabled: {
|
|
57
57
|
type: Boolean,
|
|
58
58
|
required: false,
|
|
59
|
-
default:
|
|
59
|
+
default: false
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
emits: ["update:modelValue"],
|
|
@@ -69,7 +69,7 @@ export default defineComponent({
|
|
|
69
69
|
const stars = ref(true);
|
|
70
70
|
|
|
71
71
|
const style = computed((): StyleValue => {
|
|
72
|
-
if (
|
|
72
|
+
if (props.disabled) {
|
|
73
73
|
return {
|
|
74
74
|
"--fs-password-field-cursor" : "default",
|
|
75
75
|
"--fs-password-field-color": lights.dark,
|
|
@@ -88,7 +88,7 @@ export default defineComponent({
|
|
|
88
88
|
const icon = computed((): string => stars.value ? "mdi-eye-off-outline" : "mdi-eye-outline");
|
|
89
89
|
|
|
90
90
|
const onToggle = (): void => {
|
|
91
|
-
if (
|
|
91
|
+
if (props.disabled) {
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
stars.value = !stars.value;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSCol
|
|
3
|
+
v-if="fetching"
|
|
4
|
+
>
|
|
5
|
+
<FSLoader
|
|
6
|
+
variant="field"
|
|
7
|
+
/>
|
|
8
|
+
<FSLoader
|
|
9
|
+
variant="field"
|
|
10
|
+
/>
|
|
11
|
+
</FSCol>
|
|
12
|
+
<FSCol
|
|
13
|
+
v-if="legalInformation"
|
|
14
|
+
>
|
|
15
|
+
<FSRow
|
|
16
|
+
align="center-left"
|
|
17
|
+
gap="4px"
|
|
18
|
+
>
|
|
19
|
+
<FSCheckbox
|
|
20
|
+
:label="$tr('ui.registration.i-have-read-and-understand', 'I have read and understand the')"
|
|
21
|
+
:rules="[ToggleRules.required()]"
|
|
22
|
+
:modelValue="$props.generalConditions"
|
|
23
|
+
@update:modelValue="$emit('update:generalConditions', $event)"
|
|
24
|
+
/>
|
|
25
|
+
<FSButton
|
|
26
|
+
variant="icon"
|
|
27
|
+
:label="$tr('ui.registration.general-conditions-of-use', 'general conditions of use')"
|
|
28
|
+
:color="ColorEnum.Primary"
|
|
29
|
+
@click="downloadFile(legalInformation.generalConditionsId)"
|
|
30
|
+
/>
|
|
31
|
+
</FSRow>
|
|
32
|
+
<FSRow
|
|
33
|
+
align="center-left"
|
|
34
|
+
gap="4px"
|
|
35
|
+
>
|
|
36
|
+
<FSCheckbox
|
|
37
|
+
:label="$tr('ui.registration.i-have-read-and-understand', 'I have read and understand the')"
|
|
38
|
+
:rules="[ToggleRules.required()]"
|
|
39
|
+
:modelValue="$props.privacyPolicy"
|
|
40
|
+
@update:modelValue="$emit('update:privacyPolicy', $event)"
|
|
41
|
+
/>
|
|
42
|
+
<FSButton
|
|
43
|
+
variant="icon"
|
|
44
|
+
:label="$tr('ui.registration.privacy-policy', 'privacy policy')"
|
|
45
|
+
:color="ColorEnum.Primary"
|
|
46
|
+
@click="downloadFile(legalInformation.privacyPolicyId)"
|
|
47
|
+
/>
|
|
48
|
+
</FSRow>
|
|
49
|
+
</FSCol>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script lang="ts">
|
|
53
|
+
import { defineComponent, onMounted } from "vue";
|
|
54
|
+
|
|
55
|
+
import FSCol from "@dative-gpi/foundation-shared-components/components/FSCol.vue";
|
|
56
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
57
|
+
import FSCheckbox from "@dative-gpi/foundation-shared-components/components/FSCheckbox.vue";
|
|
58
|
+
import FSButton from "@dative-gpi/foundation-shared-components/components/FSButton.vue";
|
|
59
|
+
import FSLoader from "@dative-gpi/foundation-shared-components/components/FSLoader.vue";
|
|
60
|
+
|
|
61
|
+
import { useCurrentLegalInformation, useFiles } from "@dative-gpi/foundation-shared-services/composables";
|
|
62
|
+
import { ColorEnum, ToggleRules } from "@dative-gpi/foundation-shared-components/models";
|
|
63
|
+
|
|
64
|
+
export default defineComponent({
|
|
65
|
+
name: "FSPoliciesValidationField",
|
|
66
|
+
components: {
|
|
67
|
+
FSCol,
|
|
68
|
+
FSRow,
|
|
69
|
+
FSCheckbox,
|
|
70
|
+
FSButton,
|
|
71
|
+
FSLoader
|
|
72
|
+
},
|
|
73
|
+
props: {
|
|
74
|
+
generalConditions: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
required: false
|
|
77
|
+
},
|
|
78
|
+
privacyPolicy: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
required: false
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
emits: ["update:generalConditions", "update:privacyPolicy"],
|
|
84
|
+
setup() {
|
|
85
|
+
const { fetch: getLegalInformation, entity: legalInformation, fetching } = useCurrentLegalInformation();
|
|
86
|
+
const { downloadFile } = useFiles();
|
|
87
|
+
|
|
88
|
+
onMounted(() => {
|
|
89
|
+
getLegalInformation();
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
legalInformation,
|
|
94
|
+
ToggleRules,
|
|
95
|
+
ColorEnum,
|
|
96
|
+
fetching,
|
|
97
|
+
downloadFile,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
</script>
|
|
@@ -29,9 +29,10 @@
|
|
|
29
29
|
</FSSpan>
|
|
30
30
|
</FSRow>
|
|
31
31
|
</slot>
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
<FSRow
|
|
33
|
+
v-if="!$props.disabled"
|
|
34
|
+
align="center-right"
|
|
35
|
+
:wrap="false"
|
|
35
36
|
>
|
|
36
37
|
<FSIcon
|
|
37
38
|
class="fs-rich-text-field-icon"
|
|
@@ -115,7 +116,7 @@
|
|
|
115
116
|
>
|
|
116
117
|
mdi-link
|
|
117
118
|
</FSIcon>
|
|
118
|
-
<
|
|
119
|
+
<FSMenu
|
|
119
120
|
v-if="$props.variableReferences && $props.variableReferences.length > 0"
|
|
120
121
|
:closeOnContentClick="false"
|
|
121
122
|
v-model="menuVariable"
|
|
@@ -140,12 +141,12 @@
|
|
|
140
141
|
<FSAutoCompleteField
|
|
141
142
|
itemTitle="label"
|
|
142
143
|
itemValue="code"
|
|
143
|
-
:placeholder="$tr('
|
|
144
|
+
:placeholder="$tr('rich-text-field.variable-placeholder', 'Choose a variable...')"
|
|
144
145
|
:items="$props.variableReferences"
|
|
145
146
|
@update:modelValue="insertVariable($event)"
|
|
146
147
|
/>
|
|
147
148
|
</FSCard>
|
|
148
|
-
</
|
|
149
|
+
</FSMenu>
|
|
149
150
|
<v-divider
|
|
150
151
|
vertical
|
|
151
152
|
/>
|
|
@@ -177,7 +178,7 @@
|
|
|
177
178
|
>
|
|
178
179
|
mdi-format-align-justify
|
|
179
180
|
</FSIcon>
|
|
180
|
-
</
|
|
181
|
+
</FSRow>
|
|
181
182
|
</FSRow>
|
|
182
183
|
<FSText
|
|
183
184
|
v-if="readonly && !$props.modelValue && $props.emptyLabel"
|
|
@@ -191,8 +192,8 @@
|
|
|
191
192
|
>
|
|
192
193
|
<div
|
|
193
194
|
class="fs-rich-text-field-content"
|
|
194
|
-
:data-variable-values="
|
|
195
|
-
:contenteditable="!readonly &&
|
|
195
|
+
:data-variable-values="variableValues"
|
|
196
|
+
:contenteditable="!readonly && !$props.disabled && !loading"
|
|
196
197
|
:data-readonly="$props.variant === 'readonly'"
|
|
197
198
|
:id="id"
|
|
198
199
|
/>
|
|
@@ -203,7 +204,7 @@
|
|
|
203
204
|
</div>
|
|
204
205
|
|
|
205
206
|
<FSTextField
|
|
206
|
-
v-if="isLink && !readonly &&
|
|
207
|
+
v-if="isLink && !readonly && !$props.disabled"
|
|
207
208
|
:hideHeader="true"
|
|
208
209
|
@keypress.enter.stop="toggleLink"
|
|
209
210
|
v-model="linkUrl"
|
|
@@ -214,7 +215,8 @@
|
|
|
214
215
|
<FSSpan
|
|
215
216
|
v-if="!readonly && $props.description"
|
|
216
217
|
class="fs-rich-text-field-description"
|
|
217
|
-
font="text-
|
|
218
|
+
font="text-overline"
|
|
219
|
+
:lineClamp="2"
|
|
218
220
|
:style="style"
|
|
219
221
|
>
|
|
220
222
|
{{ $props.description }}
|
|
@@ -244,6 +246,7 @@ import FSTextField from "./FSTextField.vue";
|
|
|
244
246
|
import FSIcon from "../FSIcon.vue";
|
|
245
247
|
import FSCard from "../FSCard.vue";
|
|
246
248
|
import FSText from "../FSText.vue";
|
|
249
|
+
import FSMenu from '../FSMenu.vue';
|
|
247
250
|
import FSCol from "../FSCol.vue";
|
|
248
251
|
import FSRow from "../FSRow.vue";
|
|
249
252
|
|
|
@@ -255,6 +258,7 @@ export default defineComponent({
|
|
|
255
258
|
FSText,
|
|
256
259
|
FSIcon,
|
|
257
260
|
FSCard,
|
|
261
|
+
FSMenu,
|
|
258
262
|
FSCol,
|
|
259
263
|
FSRow
|
|
260
264
|
},
|
|
@@ -275,7 +279,7 @@ export default defineComponent({
|
|
|
275
279
|
default: null
|
|
276
280
|
},
|
|
277
281
|
modelValue: {
|
|
278
|
-
type: String as PropType<string | null>,
|
|
282
|
+
type: [Object, String] as PropType<{ [key: string]: any } | string | null>,
|
|
279
283
|
required: false,
|
|
280
284
|
default: null
|
|
281
285
|
},
|
|
@@ -308,21 +312,22 @@ export default defineComponent({
|
|
|
308
312
|
required: false,
|
|
309
313
|
default: () => ({})
|
|
310
314
|
},
|
|
311
|
-
|
|
315
|
+
disabled: {
|
|
312
316
|
type: Boolean,
|
|
313
317
|
required: false,
|
|
314
|
-
default:
|
|
318
|
+
default: false
|
|
315
319
|
}
|
|
316
320
|
},
|
|
317
321
|
emits: ["update:modelValue"],
|
|
318
322
|
setup(props, { emit }) {
|
|
319
|
-
const { isMobileSized } = useBreakpoints();
|
|
323
|
+
const { fontStyles, isMobileSized } = useBreakpoints();
|
|
320
324
|
const { getColors } = useColors();
|
|
321
325
|
|
|
322
326
|
const linkColors = computed(() => getColors(props.linkColor));
|
|
323
327
|
const lights = getColors(ColorEnum.Light);
|
|
324
328
|
const darks = getColors(ColorEnum.Dark);
|
|
325
329
|
|
|
330
|
+
const loading = ref(true);
|
|
326
331
|
const canUndo = ref(false);
|
|
327
332
|
const isLink = ref(false);
|
|
328
333
|
const isBold = ref(false);
|
|
@@ -375,16 +380,8 @@ export default defineComponent({
|
|
|
375
380
|
registerRichText(editor);
|
|
376
381
|
registerHistory(editor, createEmptyHistoryState(), 250);
|
|
377
382
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
editor.setEditorState(editor.parseEditorState(props.modelValue!));
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
else {
|
|
384
|
-
editor.update((): void => {
|
|
385
|
-
editor.setEditorState(editor.parseEditorState(emptyLexicalState));
|
|
386
|
-
});
|
|
387
|
-
}
|
|
383
|
+
updateEditorState();
|
|
384
|
+
loading.value = false;
|
|
388
385
|
});
|
|
389
386
|
|
|
390
387
|
const readonly = computed((): boolean => {
|
|
@@ -405,37 +402,43 @@ export default defineComponent({
|
|
|
405
402
|
}
|
|
406
403
|
switch (props.variant) {
|
|
407
404
|
case "standard": {
|
|
408
|
-
if (
|
|
405
|
+
if (props.disabled) {
|
|
409
406
|
return {
|
|
410
|
-
"--fs-rich-text-field-undo-cursor": "default",
|
|
411
|
-
"--fs-rich-text-field-icon-cursor": "default",
|
|
412
|
-
"--fs-rich-text-field-border-color": lights.base,
|
|
413
|
-
"--fs-rich-text-field-color": lights.dark,
|
|
407
|
+
"--fs-rich-text-field-undo-cursor" : "default",
|
|
408
|
+
"--fs-rich-text-field-icon-cursor" : "default",
|
|
409
|
+
"--fs-rich-text-field-border-color" : lights.base,
|
|
410
|
+
"--fs-rich-text-field-color" : lights.dark,
|
|
414
411
|
"--fs-rich-text-field-active-border-color": lights.base,
|
|
415
|
-
"--fs-rich-text-field-link-color": linkColors.value.light,
|
|
416
|
-
"--fs-rich-text-field-min-height": minHeight
|
|
412
|
+
"--fs-rich-text-field-link-color" : linkColors.value.light,
|
|
413
|
+
"--fs-rich-text-field-min-height" : minHeight,
|
|
414
|
+
"--fs-rich-text-field-padding" : isMobileSized.value ? "6px 16px" : "10px 12px",
|
|
415
|
+
...fontStyles.value
|
|
417
416
|
};
|
|
418
417
|
}
|
|
419
418
|
else {
|
|
420
419
|
return {
|
|
421
|
-
"--fs-rich-text-field-undo-cursor": canUndo.value ? "pointer" : "default",
|
|
422
|
-
"--fs-rich-text-field-icon-cursor": "pointer",
|
|
423
|
-
"--fs-rich-text-field-border-color": lights.dark,
|
|
424
|
-
"--fs-rich-text-field-color": darks.base,
|
|
425
|
-
"--fs-rich-text-field-active-border-color": darks.dark,
|
|
426
|
-
"--fs-rich-text-field-link-color": linkColors.value.dark,
|
|
427
|
-
"--fs-rich-text-field-min-height": minHeight,
|
|
420
|
+
"--fs-rich-text-field-undo-cursor" : canUndo.value ? "pointer" : "default",
|
|
421
|
+
"--fs-rich-text-field-icon-cursor" : "pointer",
|
|
422
|
+
"--fs-rich-text-field-border-color" : lights.dark,
|
|
423
|
+
"--fs-rich-text-field-color" : darks.base,
|
|
424
|
+
"--fs-rich-text-field-active-border-color" : darks.dark,
|
|
425
|
+
"--fs-rich-text-field-link-color" : linkColors.value.dark,
|
|
426
|
+
"--fs-rich-text-field-min-height" : minHeight,
|
|
428
427
|
"--fs-rich-text-field-variable-backgroundcolor": getColors(ColorEnum.Primary).light,
|
|
429
|
-
"--fs-rich-text-field-variable-color": getColors(ColorEnum.Primary).lightContrast
|
|
428
|
+
"--fs-rich-text-field-variable-color" : getColors(ColorEnum.Primary).lightContrast!,
|
|
429
|
+
"--fs-rich-text-field-padding" : isMobileSized.value ? "6px 16px" : "10px 12px",
|
|
430
|
+
...fontStyles.value
|
|
430
431
|
};
|
|
431
432
|
}
|
|
432
433
|
}
|
|
433
434
|
case "readonly": return {
|
|
434
|
-
"--fs-rich-text-field-border-color": "transparent",
|
|
435
|
-
"--fs-rich-text-field-color": darks.base,
|
|
435
|
+
"--fs-rich-text-field-border-color" : "transparent",
|
|
436
|
+
"--fs-rich-text-field-color" : darks.base,
|
|
436
437
|
"--fs-rich-text-field-active-border-color": "transparent",
|
|
437
|
-
"--fs-rich-text-field-link-color": linkColors.value.dark,
|
|
438
|
-
"--fs-rich-text-field-min-height": minHeight
|
|
438
|
+
"--fs-rich-text-field-link-color" : linkColors.value.dark,
|
|
439
|
+
"--fs-rich-text-field-min-height" : minHeight,
|
|
440
|
+
"--fs-rich-text-field-padding" : "0",
|
|
441
|
+
...fontStyles.value
|
|
439
442
|
}
|
|
440
443
|
}
|
|
441
444
|
});
|
|
@@ -449,7 +452,7 @@ export default defineComponent({
|
|
|
449
452
|
});
|
|
450
453
|
|
|
451
454
|
const toolbarColors = computed((): { [code: string]: string } => {
|
|
452
|
-
if (props.
|
|
455
|
+
if (!props.disabled) {
|
|
453
456
|
return {
|
|
454
457
|
undo: canUndo.value ? darks.base : lights.base,
|
|
455
458
|
bold: isBold.value ? darks.base : lights.base,
|
|
@@ -472,6 +475,10 @@ export default defineComponent({
|
|
|
472
475
|
}
|
|
473
476
|
});
|
|
474
477
|
|
|
478
|
+
const variableValues = computed(() => {
|
|
479
|
+
return JSON.stringify(props.variableValues)
|
|
480
|
+
});
|
|
481
|
+
|
|
475
482
|
const updateToolbar = (): void => {
|
|
476
483
|
const selection = $getSelection();
|
|
477
484
|
isVariable.value = false;
|
|
@@ -492,11 +499,16 @@ export default defineComponent({
|
|
|
492
499
|
editor.registerUpdateListener(({ editorState }) => {
|
|
493
500
|
editorState.read(() => {
|
|
494
501
|
updateToolbar();
|
|
495
|
-
if
|
|
496
|
-
|
|
502
|
+
if(loading.value) {
|
|
503
|
+
return;
|
|
497
504
|
}
|
|
498
|
-
|
|
505
|
+
const editorModelValue = JSON.stringify(editorState.toJSON());
|
|
506
|
+
if(editorModelValue === emptyLexicalState && props.modelValue !== null) {
|
|
499
507
|
emit("update:modelValue", null);
|
|
508
|
+
return;
|
|
509
|
+
}
|
|
510
|
+
if(editorModelValue !== emptyLexicalState && editorModelValue !== props.modelValue) {
|
|
511
|
+
emit("update:modelValue", editorModelValue);
|
|
500
512
|
}
|
|
501
513
|
});
|
|
502
514
|
});
|
|
@@ -659,24 +671,31 @@ export default defineComponent({
|
|
|
659
671
|
isLink.value = false;
|
|
660
672
|
}
|
|
661
673
|
|
|
662
|
-
|
|
663
|
-
if (JSON.stringify(editor.getEditorState().toJSON())
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
674
|
+
const updateEditorState = () => {
|
|
675
|
+
if (JSON.stringify(editor.getEditorState().toJSON()) === props.modelValue) {
|
|
676
|
+
return;
|
|
677
|
+
}
|
|
678
|
+
if (props.modelValue != null) {
|
|
679
|
+
if (typeof props.modelValue === "string" && props.modelValue !== "") {
|
|
680
|
+
editor.setEditorState(editor.parseEditorState(props.modelValue!));
|
|
681
|
+
return;
|
|
668
682
|
}
|
|
669
|
-
|
|
670
|
-
editor.
|
|
671
|
-
|
|
672
|
-
});
|
|
683
|
+
if (typeof props.modelValue === "object") {
|
|
684
|
+
editor.setEditorState(editor.parseEditorState(JSON.stringify(props.modelValue)));
|
|
685
|
+
return;
|
|
673
686
|
}
|
|
674
687
|
}
|
|
688
|
+
editor.setEditorState(editor.parseEditorState(emptyLexicalState));
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
watch(() => props.modelValue, () => {
|
|
692
|
+
updateEditorState();
|
|
675
693
|
});
|
|
676
694
|
|
|
677
695
|
return {
|
|
678
696
|
FORMAT_ELEMENT_COMMAND,
|
|
679
697
|
FORMAT_TEXT_COMMAND,
|
|
698
|
+
variableValues,
|
|
680
699
|
toolbarColors,
|
|
681
700
|
menuVariable,
|
|
682
701
|
UNDO_COMMAND,
|
|
@@ -684,6 +703,7 @@ export default defineComponent({
|
|
|
684
703
|
readonly,
|
|
685
704
|
linkUrl,
|
|
686
705
|
classes,
|
|
706
|
+
loading,
|
|
687
707
|
isEmpty,
|
|
688
708
|
editor,
|
|
689
709
|
isLink,
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSTextField
|
|
3
3
|
class="fs-search-field"
|
|
4
|
-
:editable="$props.editable"
|
|
5
4
|
:placeholder="placeholder"
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
:modelValue="$props.modelValue"
|
|
6
|
+
prependInnerIcon="mdi-magnify"
|
|
7
|
+
minWidth="200px"
|
|
8
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
9
|
v-bind="$attrs"
|
|
9
10
|
>
|
|
10
11
|
<template
|
|
11
|
-
v-for="(_, name) in slots"
|
|
12
|
+
v-for="(_, name) in $slots"
|
|
12
13
|
v-slot:[name]="slotData"
|
|
13
14
|
>
|
|
14
15
|
<slot
|
|
@@ -16,60 +17,20 @@
|
|
|
16
17
|
v-bind="slotData"
|
|
17
18
|
/>
|
|
18
19
|
</template>
|
|
19
|
-
<template
|
|
20
|
-
v-if="$props.prependInnerIcon || $slots['prepend-inner']"
|
|
21
|
-
#prepend-inner
|
|
22
|
-
>
|
|
23
|
-
<FSButton
|
|
24
|
-
v-if="$props.prependInnerIcon"
|
|
25
|
-
variant="icon"
|
|
26
|
-
:icon="$props.prependInnerIcon"
|
|
27
|
-
:editable="$props.editable"
|
|
28
|
-
:color="ColorEnum.Dark"
|
|
29
|
-
@click="onSearch"
|
|
30
|
-
/>
|
|
31
|
-
<slot
|
|
32
|
-
name="prepend-inner"
|
|
33
|
-
/>
|
|
34
|
-
</template>
|
|
35
|
-
<template
|
|
36
|
-
v-if="$props.variant !== 'instant' || $slots.append"
|
|
37
|
-
#append
|
|
38
|
-
>
|
|
39
|
-
<FSButton
|
|
40
|
-
v-if="$props.variant !== 'instant'"
|
|
41
|
-
:prependIcon="$props.buttonPrependIcon"
|
|
42
|
-
:label="buttonLabel"
|
|
43
|
-
:appendIcon="$props.buttonAppendIcon"
|
|
44
|
-
:variant="$props.buttonVariant"
|
|
45
|
-
:color="$props.buttonColor"
|
|
46
|
-
:editable="$props.editable"
|
|
47
|
-
@click="onSearch"
|
|
48
|
-
/>
|
|
49
|
-
<slot
|
|
50
|
-
name="append"
|
|
51
|
-
/>
|
|
52
|
-
</template>
|
|
53
20
|
</FSTextField>
|
|
54
21
|
</template>
|
|
55
22
|
|
|
56
23
|
<script lang="ts">
|
|
57
|
-
import type
|
|
58
|
-
import { computed, defineComponent, ref, watch } from "vue";
|
|
24
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
59
25
|
|
|
60
26
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
61
|
-
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
62
|
-
|
|
63
|
-
import { useSlots } from "../../composables";
|
|
64
27
|
|
|
65
28
|
import FSTextField from "./FSTextField.vue";
|
|
66
|
-
import FSButton from "../FSButton.vue";
|
|
67
29
|
|
|
68
30
|
export default defineComponent({
|
|
69
31
|
name: "FSSearchField",
|
|
70
32
|
components: {
|
|
71
|
-
FSTextField
|
|
72
|
-
FSButton
|
|
33
|
+
FSTextField
|
|
73
34
|
},
|
|
74
35
|
props: {
|
|
75
36
|
placeholder: {
|
|
@@ -77,89 +38,22 @@ export default defineComponent({
|
|
|
77
38
|
required: false,
|
|
78
39
|
default: null
|
|
79
40
|
},
|
|
80
|
-
prependInnerIcon: {
|
|
81
|
-
type: String as PropType<string | null>,
|
|
82
|
-
required: false,
|
|
83
|
-
default: "mdi-magnify"
|
|
84
|
-
},
|
|
85
|
-
variant: {
|
|
86
|
-
type: String as PropType<"standard" | "instant">,
|
|
87
|
-
required: false,
|
|
88
|
-
default: "instant"
|
|
89
|
-
},
|
|
90
|
-
buttonPrependIcon: {
|
|
91
|
-
type: String as PropType<string | null>,
|
|
92
|
-
required: false,
|
|
93
|
-
default: null
|
|
94
|
-
},
|
|
95
|
-
buttonLabel: {
|
|
96
|
-
type: String as PropType<string | null>,
|
|
97
|
-
required: false,
|
|
98
|
-
default: null
|
|
99
|
-
},
|
|
100
|
-
buttonAppendIcon: {
|
|
101
|
-
type: String as PropType<string | null>,
|
|
102
|
-
required: false,
|
|
103
|
-
default: null
|
|
104
|
-
},
|
|
105
|
-
buttonVariant: {
|
|
106
|
-
type: String as PropType<"standard" | "full" | "icon">,
|
|
107
|
-
required: false,
|
|
108
|
-
default: "standard"
|
|
109
|
-
},
|
|
110
41
|
modelValue: {
|
|
111
42
|
type: String as PropType<string | null>,
|
|
112
43
|
required: false,
|
|
113
44
|
default: null
|
|
114
|
-
},
|
|
115
|
-
buttonColor: {
|
|
116
|
-
type: String as PropType<ColorBase>,
|
|
117
|
-
required: false,
|
|
118
|
-
default: ColorEnum.Primary
|
|
119
|
-
},
|
|
120
|
-
editable: {
|
|
121
|
-
type: Boolean,
|
|
122
|
-
required: false,
|
|
123
|
-
default: true
|
|
124
45
|
}
|
|
125
46
|
},
|
|
126
47
|
emits: ["update:modelValue"],
|
|
127
|
-
setup(props
|
|
48
|
+
setup(props) {
|
|
128
49
|
const { $tr } = useTranslationsProvider();
|
|
129
|
-
const { slots } = useSlots();
|
|
130
|
-
|
|
131
|
-
delete slots["prepend-inner"];
|
|
132
|
-
delete slots.append;
|
|
133
|
-
|
|
134
|
-
const innerValue = ref(props.modelValue);
|
|
135
50
|
|
|
136
51
|
const placeholder = computed(() => {
|
|
137
|
-
return props.placeholder ?? $tr('
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
const buttonLabel = computed(() => {
|
|
141
|
-
return props.buttonLabel ?? $tr('ui.button.search', 'Search');
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
const onSearch = (event: Event) => {
|
|
145
|
-
event.stopImmediatePropagation();
|
|
146
|
-
event.preventDefault();
|
|
147
|
-
emit('update:modelValue', innerValue.value);
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
watch(innerValue, () => {
|
|
151
|
-
if (["instant"].includes(props.variant)) {
|
|
152
|
-
emit("update:modelValue", innerValue.value);
|
|
153
|
-
}
|
|
52
|
+
return props.placeholder ?? $tr('search-field.placeholder', 'Search...');
|
|
154
53
|
});
|
|
155
54
|
|
|
156
55
|
return {
|
|
157
56
|
placeholder,
|
|
158
|
-
buttonLabel,
|
|
159
|
-
innerValue,
|
|
160
|
-
ColorEnum,
|
|
161
|
-
slots,
|
|
162
|
-
onSearch
|
|
163
57
|
};
|
|
164
58
|
}
|
|
165
59
|
});
|