@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
|
@@ -81,14 +81,14 @@
|
|
|
81
81
|
font="text-overline"
|
|
82
82
|
:style="style"
|
|
83
83
|
>
|
|
84
|
-
{{ $tr('
|
|
84
|
+
{{ $tr('edit-image.format', 'PNG or JPG format') }}
|
|
85
85
|
</FSText>
|
|
86
86
|
<FSText
|
|
87
87
|
class="fs-edit-image-overline"
|
|
88
88
|
font="text-overline"
|
|
89
89
|
:style="style"
|
|
90
90
|
>
|
|
91
|
-
{{ $tr('
|
|
91
|
+
{{ $tr('edit-image.max-size', '10 MB Maximum') }}
|
|
92
92
|
</FSText>
|
|
93
93
|
</FSCol>
|
|
94
94
|
</FSCol>
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
font="text-body"
|
|
155
155
|
:lineClamp="2"
|
|
156
156
|
>
|
|
157
|
-
{{ $tr('
|
|
157
|
+
{{ $tr('edit-image.add-image', 'Add an image.') }}
|
|
158
158
|
</FSText>
|
|
159
159
|
<FSButtonFileMini
|
|
160
160
|
class="fs-edit-image-hidden-button"
|
|
@@ -243,7 +243,7 @@ export default defineComponent({
|
|
|
243
243
|
default: false
|
|
244
244
|
}
|
|
245
245
|
},
|
|
246
|
-
emits: ["update:modelValue", "update:source"],
|
|
246
|
+
emits: ["update", "update:modelValue", "update:source"],
|
|
247
247
|
setup(props, { emit }) {
|
|
248
248
|
const { isExtraSmall } = useBreakpoints();
|
|
249
249
|
const { getColors } = useColors();
|
|
@@ -266,9 +266,15 @@ export default defineComponent({
|
|
|
266
266
|
const content = (await readFile(payload)) as string;
|
|
267
267
|
fileSelected.value.fileName = payload.name;
|
|
268
268
|
fileSelected.value.fileContent = content;
|
|
269
|
-
|
|
269
|
+
const newModelValue = content.substring(content.indexOf(',') + 1);
|
|
270
270
|
if (props.source) {
|
|
271
|
+
emit("update:modelValue", newModelValue);
|
|
271
272
|
emit("update:source", null);
|
|
273
|
+
emit("update", { source: null, modelValue: newModelValue });
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
emit("update:modelValue", newModelValue);
|
|
277
|
+
emit("update", { source: props.source, modelValue: newModelValue });
|
|
272
278
|
}
|
|
273
279
|
};
|
|
274
280
|
|
|
@@ -277,9 +283,11 @@ export default defineComponent({
|
|
|
277
283
|
fileSelected.value.fileContent = null;
|
|
278
284
|
if (props.modelValue) {
|
|
279
285
|
emit("update:modelValue", null);
|
|
286
|
+
emit("update", { source: props.source, modelValue: null });
|
|
280
287
|
}
|
|
281
288
|
else {
|
|
282
289
|
emit("update:source", null);
|
|
290
|
+
emit("update", { source: null, modelValue: props.modelValue });
|
|
283
291
|
}
|
|
284
292
|
};
|
|
285
293
|
|
package/components/FSFadeOut.vue
CHANGED
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
class="fs-fade-out"
|
|
4
4
|
ref="fadeOutRef"
|
|
5
5
|
:id="elementId"
|
|
6
|
-
|
|
7
|
-
@scroll="debounceMasks"
|
|
6
|
+
@scroll="$emit('scroll', $event); debounceMasks()"
|
|
8
7
|
>
|
|
9
8
|
<slot />
|
|
10
9
|
</div>
|
|
11
10
|
</template>
|
|
12
11
|
|
|
13
12
|
<script lang="ts">
|
|
14
|
-
import { computed, defineComponent, onMounted, onUnmounted, type PropType, ref,
|
|
13
|
+
import { computed, defineComponent, onMounted, onUnmounted, type PropType, ref, watch } from "vue";
|
|
15
14
|
|
|
16
15
|
import { useBreakpoints, useColors, useDebounce } from "@dative-gpi/foundation-shared-components/composables";
|
|
17
16
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -45,17 +44,41 @@ export default defineComponent({
|
|
|
45
44
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
46
45
|
required: false,
|
|
47
46
|
default: "64px"
|
|
47
|
+
},
|
|
48
|
+
scrollOutside: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
required: false,
|
|
51
|
+
default: true
|
|
52
|
+
},
|
|
53
|
+
hideHorizontalOverflow: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
required: false,
|
|
56
|
+
default: true
|
|
57
|
+
},
|
|
58
|
+
disableTopMask: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
required: false,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
63
|
+
disableBottomMask: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
required: false,
|
|
66
|
+
default: false
|
|
67
|
+
},
|
|
68
|
+
style:{
|
|
69
|
+
type: Object,
|
|
70
|
+
required: false
|
|
48
71
|
}
|
|
49
72
|
},
|
|
50
73
|
emits: ["scroll"],
|
|
51
|
-
setup(props
|
|
52
|
-
const { windowHeight, windowWidth } = useBreakpoints();
|
|
74
|
+
setup(props) {
|
|
75
|
+
const { windowHeight, windowWidth, isTouchScreenEnabled } = useBreakpoints();
|
|
53
76
|
const { debounce } = useDebounce();
|
|
54
77
|
const { getColors } = useColors();
|
|
55
78
|
|
|
56
79
|
const backgrounds = getColors(ColorEnum.Background);
|
|
57
80
|
|
|
58
|
-
const fadeOutRef = ref(null);
|
|
81
|
+
const fadeOutRef = ref<HTMLElement | null>(null);
|
|
59
82
|
const bottomMaskHeight = ref("0px");
|
|
60
83
|
const topMaskHeight = ref("0px");
|
|
61
84
|
const lastScroll = ref(0);
|
|
@@ -64,14 +87,21 @@ export default defineComponent({
|
|
|
64
87
|
|
|
65
88
|
const elementId = `id${uuidv4()}`;
|
|
66
89
|
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
90
|
+
const showOutsideScrollbar = computed(() => props.scrollOutside && !isTouchScreenEnabled.value);
|
|
91
|
+
|
|
92
|
+
const style = computed((): {[index: string]: string} => ({
|
|
93
|
+
"--fs-fade-out-height" : props.height ? sizeToVar(props.height) : "initial",
|
|
94
|
+
"--fs-fade-out-max-height" : props.maxHeight ? sizeToVar(props.maxHeight) : "initial",
|
|
70
95
|
"--fs-fade-out-width" : sizeToVar(props.width),
|
|
71
96
|
"--fs-fade-out-padding" : sizeToVar(props.padding),
|
|
97
|
+
"--fs-fade-out-width-offset" : showOutsideScrollbar.value ? '12px' : '0px',
|
|
98
|
+
"--fs-fade-out-padding-offset" : showOutsideScrollbar.value ? '4px' : '0px',
|
|
99
|
+
"--fs-fade-out-margin-right" : showOutsideScrollbar.value ? '-12px' : '0px',
|
|
72
100
|
"--fs-fade-out-mask-color" : backgrounds.base,
|
|
73
|
-
"--fs-fade-out-top-mask-height" : topMaskHeight.value,
|
|
74
|
-
"--fs-fade-out-bottom-mask-height": bottomMaskHeight.value
|
|
101
|
+
"--fs-fade-out-top-mask-height" : props.disableTopMask ? '0px' : topMaskHeight.value,
|
|
102
|
+
"--fs-fade-out-bottom-mask-height": props.disableBottomMask ? '0px' : bottomMaskHeight.value,
|
|
103
|
+
"--fs-fade-out-x-overflow" : props.hideHorizontalOverflow ? 'hidden' : 'auto',
|
|
104
|
+
...props.style
|
|
75
105
|
}));
|
|
76
106
|
|
|
77
107
|
const handleMasks = () => {
|
|
@@ -93,20 +123,13 @@ export default defineComponent({
|
|
|
93
123
|
else {
|
|
94
124
|
topMaskHeight.value = sizeToVar(props.maskHeight);
|
|
95
125
|
}
|
|
96
|
-
|
|
97
|
-
const event = {
|
|
98
|
-
target: fadeOutRef.value,
|
|
99
|
-
onTop: topMaskHeight.value === "0px",
|
|
100
|
-
onBottom: bottomMaskHeight.value === "0px",
|
|
101
|
-
goingUp: (fadeOutRef.value as any).scrollTop < lastScroll.value,
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
emit("scroll", event);
|
|
126
|
+
|
|
105
127
|
lastScroll.value = (fadeOutRef.value as any).scrollTop;
|
|
106
128
|
}
|
|
107
129
|
};
|
|
108
130
|
|
|
109
|
-
|
|
131
|
+
// Delay to wait for animations to end before computing masks
|
|
132
|
+
const debounceMasks = (): void => debounce(handleMasks, 280);
|
|
110
133
|
|
|
111
134
|
onMounted((): void => {
|
|
112
135
|
debounceMasks();
|
|
@@ -129,6 +152,15 @@ export default defineComponent({
|
|
|
129
152
|
|
|
130
153
|
watch([() => windowWidth.value, () => windowHeight.value], debounceMasks);
|
|
131
154
|
|
|
155
|
+
watch(() => [style.value, fadeOutRef.value], () => {
|
|
156
|
+
if(!fadeOutRef.value || !style.value) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
for(const key in style.value){
|
|
160
|
+
fadeOutRef.value.style.setProperty(key, style.value[key])
|
|
161
|
+
}
|
|
162
|
+
}, { immediate: true})
|
|
163
|
+
|
|
132
164
|
return {
|
|
133
165
|
fadeOutRef,
|
|
134
166
|
elementId,
|
package/components/FSForm.vue
CHANGED
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
14
|
import type { PropType} from "vue";
|
|
15
|
+
|
|
16
|
+
import type VForm from "vuetify/lib/components/VForm";
|
|
17
|
+
|
|
15
18
|
import { computed, defineComponent, provide, ref } from "vue";
|
|
16
19
|
|
|
17
20
|
export default defineComponent({
|
|
@@ -30,7 +33,7 @@ export default defineComponent({
|
|
|
30
33
|
},
|
|
31
34
|
emits: ["update:modelValue", "submit"],
|
|
32
35
|
setup(props, { emit }) {
|
|
33
|
-
const formRef = ref<
|
|
36
|
+
const formRef = ref<typeof VForm | null>(null);
|
|
34
37
|
const submitted = ref(false);
|
|
35
38
|
|
|
36
39
|
const validateOn = computed((): "submit" | "input" => {
|
|
@@ -44,25 +47,24 @@ export default defineComponent({
|
|
|
44
47
|
event.stopImmediatePropagation();
|
|
45
48
|
event.preventDefault();
|
|
46
49
|
submitted.value = true;
|
|
47
|
-
await
|
|
48
|
-
emit("update:modelValue", !!(
|
|
49
|
-
emit("submit", !!(
|
|
50
|
+
await formRef.value.validate();
|
|
51
|
+
emit("update:modelValue", !!(formRef.value.isValid ?? true));
|
|
52
|
+
emit("submit", !!(formRef.value.isValid ?? true));
|
|
50
53
|
};
|
|
51
54
|
|
|
52
55
|
const validate = async () => {
|
|
53
56
|
submitted.value = true;
|
|
54
|
-
await
|
|
55
|
-
emit("update:modelValue", !!((formRef.value as any).isValid ?? true));
|
|
57
|
+
return await formRef.value.validate();
|
|
56
58
|
};
|
|
57
59
|
|
|
58
60
|
const reset = () => {
|
|
59
61
|
submitted.value = false;
|
|
60
|
-
|
|
62
|
+
formRef.value.reset();
|
|
61
63
|
};
|
|
62
64
|
|
|
63
65
|
const resetValidation = () => {
|
|
64
66
|
submitted.value = false;
|
|
65
|
-
|
|
67
|
+
formRef.value.resetValidation();
|
|
66
68
|
};
|
|
67
69
|
|
|
68
70
|
provide("validateOn", validateOn);
|
package/components/FSGrid.vue
CHANGED
package/components/FSIcon.vue
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
14
14
|
|
|
15
15
|
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
16
|
-
import { type ColorBase } from "@dative-gpi/foundation-shared-components/models";
|
|
16
|
+
import { type ColorBase, type ColorBaseVariations } from "@dative-gpi/foundation-shared-components/models";
|
|
17
17
|
|
|
18
18
|
import { sizeToVar } from "../utils";
|
|
19
19
|
|
|
@@ -31,7 +31,7 @@ export default defineComponent({
|
|
|
31
31
|
default: null
|
|
32
32
|
},
|
|
33
33
|
variant: {
|
|
34
|
-
type: String as PropType<
|
|
34
|
+
type: String as PropType<ColorBaseVariations>,
|
|
35
35
|
required: false,
|
|
36
36
|
default: "base"
|
|
37
37
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCard
|
|
3
3
|
:variant="$props.backgroundVariant"
|
|
4
|
+
:borderColor="$props.backgroundVariant === 'background' ? ColorEnum.Light : null"
|
|
4
5
|
:color="$props.backgroundColor"
|
|
5
6
|
:border="$props.border"
|
|
6
7
|
:height="$props.size"
|
|
@@ -9,10 +10,10 @@
|
|
|
9
10
|
<FSRow
|
|
10
11
|
align="center-center"
|
|
11
12
|
>
|
|
12
|
-
<FSIcon
|
|
13
|
-
:variant="
|
|
14
|
-
:color="
|
|
15
|
-
:size="
|
|
13
|
+
<FSIcon
|
|
14
|
+
:variant="iconVariant"
|
|
15
|
+
:color="iconColor"
|
|
16
|
+
:size="actualIconSize"
|
|
16
17
|
>
|
|
17
18
|
{{ $props.icon }}
|
|
18
19
|
</FSIcon>
|
|
@@ -21,9 +22,11 @@
|
|
|
21
22
|
</template>
|
|
22
23
|
|
|
23
24
|
<script lang="ts">
|
|
24
|
-
import { defineComponent, type PropType } from "vue";
|
|
25
|
+
import { defineComponent, type PropType, computed } from "vue";
|
|
25
26
|
|
|
26
|
-
import { type ColorBase,
|
|
27
|
+
import { ColorEnum, type ColorBase, type ColorBaseVariations } from "@dative-gpi/foundation-shared-components/models";
|
|
28
|
+
|
|
29
|
+
import { sizeToVar } from "../utils";
|
|
27
30
|
|
|
28
31
|
import FSCard from "./FSCard.vue";
|
|
29
32
|
import FSIcon from "./FSIcon.vue";
|
|
@@ -43,7 +46,7 @@ export default defineComponent({
|
|
|
43
46
|
backgroundColor: {
|
|
44
47
|
type: [Array, String] as PropType<ColorBase | ColorBase[]>,
|
|
45
48
|
required: false,
|
|
46
|
-
default:
|
|
49
|
+
default: ColorEnum.Background
|
|
47
50
|
},
|
|
48
51
|
backgroundVariant: {
|
|
49
52
|
type: String as PropType<"background" | "standard" | "full" | "gradient">,
|
|
@@ -57,24 +60,77 @@ export default defineComponent({
|
|
|
57
60
|
},
|
|
58
61
|
iconColor: {
|
|
59
62
|
type: String as PropType<ColorBase>,
|
|
60
|
-
required: false
|
|
61
|
-
default: ColorEnum.Primary
|
|
63
|
+
required: false
|
|
62
64
|
},
|
|
63
65
|
iconVariant: {
|
|
64
|
-
type: String as PropType<
|
|
66
|
+
type: String as PropType<ColorBaseVariations | null>,
|
|
65
67
|
required: false,
|
|
66
|
-
default:
|
|
68
|
+
default: null
|
|
67
69
|
},
|
|
68
70
|
iconSize: {
|
|
69
71
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
70
72
|
required: false,
|
|
71
|
-
default:
|
|
73
|
+
default: null
|
|
72
74
|
},
|
|
73
75
|
border: {
|
|
74
76
|
type: Boolean,
|
|
75
77
|
required: false,
|
|
76
78
|
default: true
|
|
77
79
|
}
|
|
80
|
+
},
|
|
81
|
+
setup(props){
|
|
82
|
+
const actualIconSize = computed(() => {
|
|
83
|
+
if (props.iconSize){
|
|
84
|
+
return props.iconSize;
|
|
85
|
+
}
|
|
86
|
+
else if (props.size) {
|
|
87
|
+
return `calc(${sizeToVar(props.size)} * 0.42)`;
|
|
88
|
+
}
|
|
89
|
+
return "42px";
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const iconVariant = computed((): ColorBaseVariations | undefined => {
|
|
93
|
+
if (props.iconVariant) {
|
|
94
|
+
return props.iconVariant;
|
|
95
|
+
}
|
|
96
|
+
if (props.iconColor) {
|
|
97
|
+
return "base";
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
switch (props.backgroundVariant) {
|
|
101
|
+
case "background":
|
|
102
|
+
return "lightContrast";
|
|
103
|
+
case "standard":
|
|
104
|
+
return "lightContrast";
|
|
105
|
+
case "full":
|
|
106
|
+
return "baseContrast";
|
|
107
|
+
case "gradient":
|
|
108
|
+
return "baseContrast";
|
|
109
|
+
default:
|
|
110
|
+
return "base";
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const iconColor = computed((): ColorBase | undefined => {
|
|
115
|
+
if (props.iconColor) {
|
|
116
|
+
return props.iconColor;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if(Array.isArray(props.backgroundColor)) {
|
|
120
|
+
return props.backgroundColor[Math.floor(props.backgroundColor.length/2)];
|
|
121
|
+
}
|
|
122
|
+
if(props.backgroundVariant === "background") {
|
|
123
|
+
return ColorEnum.Light;
|
|
124
|
+
}
|
|
125
|
+
return props.backgroundColor;
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
actualIconSize,
|
|
130
|
+
iconVariant,
|
|
131
|
+
ColorEnum,
|
|
132
|
+
iconColor,
|
|
133
|
+
};
|
|
78
134
|
}
|
|
79
135
|
});
|
|
80
136
|
</script>
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSMenu
|
|
3
|
+
:location="$props.location"
|
|
4
|
+
:closeOnContentClick="false"
|
|
5
|
+
minWidth="0"
|
|
6
|
+
v-model="modelValue"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
>
|
|
9
|
+
<template
|
|
10
|
+
#activator="{ props }"
|
|
11
|
+
>
|
|
12
|
+
<slot
|
|
13
|
+
name="activator"
|
|
14
|
+
v-bind="props"
|
|
15
|
+
>
|
|
16
|
+
<FSButton
|
|
17
|
+
v-bind="props"
|
|
18
|
+
:color="$props.iconColor"
|
|
19
|
+
:iconSize="$props.iconSize"
|
|
20
|
+
variant="icon"
|
|
21
|
+
icon="mdi-information-outline"
|
|
22
|
+
/>
|
|
23
|
+
</slot>
|
|
24
|
+
</template>
|
|
25
|
+
<slot
|
|
26
|
+
name="menuContent"
|
|
27
|
+
>
|
|
28
|
+
<FSCard
|
|
29
|
+
:maxWidth="$props.maxWidth"
|
|
30
|
+
:width="$props.width"
|
|
31
|
+
:padding="$props.padding"
|
|
32
|
+
:elevation="true"
|
|
33
|
+
align="center"
|
|
34
|
+
>
|
|
35
|
+
<slot
|
|
36
|
+
name="cardContent"
|
|
37
|
+
>
|
|
38
|
+
<FSRow
|
|
39
|
+
align="center-center"
|
|
40
|
+
>
|
|
41
|
+
<FSText
|
|
42
|
+
font="text-body"
|
|
43
|
+
:lineClamp="$props.lineClamp"
|
|
44
|
+
>
|
|
45
|
+
{{ $props.content }}
|
|
46
|
+
</FSText>
|
|
47
|
+
</FSRow>
|
|
48
|
+
</slot>
|
|
49
|
+
<template
|
|
50
|
+
v-if="$props.showCloseButton"
|
|
51
|
+
#top-right
|
|
52
|
+
>
|
|
53
|
+
<FSButton
|
|
54
|
+
variant="icon"
|
|
55
|
+
icon="mdi-close"
|
|
56
|
+
iconSize="18px"
|
|
57
|
+
:color="lightColors.dark"
|
|
58
|
+
@click="modelValue = false"
|
|
59
|
+
/>
|
|
60
|
+
</template>
|
|
61
|
+
</FSCard>
|
|
62
|
+
</slot>
|
|
63
|
+
</FSMenu>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<script lang="ts">
|
|
67
|
+
import { defineComponent, ref, type PropType } from "vue";
|
|
68
|
+
|
|
69
|
+
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
70
|
+
|
|
71
|
+
import { ColorEnum } from '@dative-gpi/foundation-shared-components/models';
|
|
72
|
+
|
|
73
|
+
import FSRow from '@dative-gpi/foundation-shared-components/components/FSRow.vue';
|
|
74
|
+
import FSMenu from '@dative-gpi/foundation-shared-components/components/FSMenu.vue';
|
|
75
|
+
import FSCard from '@dative-gpi/foundation-shared-components/components/FSCard.vue';
|
|
76
|
+
import FSText from '@dative-gpi/foundation-shared-components/components/FSText.vue';
|
|
77
|
+
import FSButton from '@dative-gpi/foundation-shared-components/components/FSButton.vue';
|
|
78
|
+
|
|
79
|
+
export default defineComponent({
|
|
80
|
+
name: "FSInformationsMenu",
|
|
81
|
+
components: {
|
|
82
|
+
FSMenu,
|
|
83
|
+
FSCard,
|
|
84
|
+
FSRow,
|
|
85
|
+
FSText,
|
|
86
|
+
FSButton
|
|
87
|
+
},
|
|
88
|
+
props: {
|
|
89
|
+
content: {
|
|
90
|
+
type: String as PropType<string | null>,
|
|
91
|
+
required: false,
|
|
92
|
+
default: null
|
|
93
|
+
},
|
|
94
|
+
location: {
|
|
95
|
+
type: String,
|
|
96
|
+
default: "top"
|
|
97
|
+
},
|
|
98
|
+
width: {
|
|
99
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
100
|
+
default: null
|
|
101
|
+
},
|
|
102
|
+
maxWidth: {
|
|
103
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
104
|
+
default: null
|
|
105
|
+
},
|
|
106
|
+
padding: {
|
|
107
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
108
|
+
default: "16px 8px"
|
|
109
|
+
},
|
|
110
|
+
iconSize: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: "18px"
|
|
113
|
+
},
|
|
114
|
+
iconColor: {
|
|
115
|
+
type: String as PropType<ColorBase>,
|
|
116
|
+
default: ColorEnum.Primary
|
|
117
|
+
},
|
|
118
|
+
showCloseButton: {
|
|
119
|
+
type: Boolean,
|
|
120
|
+
default: true
|
|
121
|
+
},
|
|
122
|
+
lineClamp: {
|
|
123
|
+
type: Number,
|
|
124
|
+
default: 4
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
emits: ["update:modelValue"],
|
|
128
|
+
setup() {
|
|
129
|
+
const modelValue = ref(false);
|
|
130
|
+
|
|
131
|
+
const { getColors } = useColors();
|
|
132
|
+
|
|
133
|
+
const lightColors = getColors(ColorEnum.Light);
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
ColorEnum,
|
|
137
|
+
modelValue,
|
|
138
|
+
lightColors
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
</script>
|