@dative-gpi/foundation-shared-components 0.0.229 → 0.1.68
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/components/FSAccordionPanel.vue +8 -10
- package/components/FSBadge.vue +2 -4
- package/components/FSBreadcrumbs.vue +9 -10
- package/components/FSButton.vue +81 -31
- package/components/FSCalendar.vue +35 -33
- package/components/FSCalendarTwin.vue +77 -84
- package/components/FSCard.vue +29 -16
- package/components/FSCardPlaceholder.vue +1 -2
- package/components/FSCheckbox.vue +5 -7
- package/components/FSChip.vue +9 -11
- package/components/FSClickable.vue +67 -57
- package/components/FSClock.vue +4 -4
- package/components/FSCol.vue +2 -3
- package/components/FSColor.vue +13 -31
- package/components/FSColorIcon.vue +25 -9
- package/components/FSDialog.vue +1 -2
- package/components/FSDialogFormBody.vue +4 -4
- package/components/FSDialogMenu.vue +2 -4
- package/components/FSDialogMultiFormBody.vue +63 -50
- package/components/FSDialogRemove.vue +1 -0
- package/components/FSDialogSubmit.vue +5 -7
- package/components/FSDivider.vue +7 -9
- package/components/FSEditImage.vue +27 -274
- package/components/FSEditImageUI.vue +303 -0
- package/components/FSErrorToast.vue +3 -4
- package/components/FSFadeOut.vue +18 -13
- package/components/FSGrid.vue +6 -9
- package/components/FSGridMosaic.vue +1 -2
- package/components/FSIcon.vue +7 -8
- package/components/FSIconCard.vue +23 -30
- package/components/FSIconCheck.vue +1 -2
- package/components/FSImage.vue +21 -193
- package/components/FSImageCard.vue +2 -2
- package/components/FSImageUI.vue +212 -0
- package/components/FSLabel.vue +18 -20
- package/components/FSLink.vue +19 -21
- package/components/FSLoader.vue +10 -14
- package/components/FSOptionGroup.vue +58 -12
- package/components/FSPagination.vue +3 -5
- package/components/FSRadio.vue +5 -7
- package/components/FSRadioGroup.vue +2 -4
- package/components/FSRow.vue +3 -4
- package/components/FSSlideGroup.vue +15 -4
- package/components/FSSlider.vue +9 -11
- package/components/FSSpan.vue +11 -9
- package/components/FSSwitch.vue +65 -37
- package/components/FSTab.vue +2 -4
- package/components/FSTabs.vue +36 -16
- package/components/FSTag.vue +23 -14
- package/components/FSTagGroup.vue +3 -5
- package/components/FSText.vue +8 -12
- package/components/FSWindow.vue +11 -5
- package/components/FSWrapGroup.vue +15 -4
- package/components/agenda/FSAgenda.vue +204 -0
- package/components/agenda/FSAgendaDialogCalendar.vue +76 -0
- package/components/agenda/FSAgendaHeader.vue +190 -0
- package/components/agenda/FSAgendaHorizontalEvent.vue +162 -0
- package/components/agenda/FSAgendaHorizontalTimeLineMarker.vue +46 -0
- package/components/agenda/FSAgendaHoursCol.vue +103 -0
- package/components/agenda/FSAgendaHoursRow.vue +124 -0
- package/components/agenda/FSAgendaVerticalEvent.vue +160 -0
- package/components/agenda/FSAgendaVerticalTimeLineMarker.vue +46 -0
- package/components/agenda/FSDayAgenda.vue +200 -0
- package/components/agenda/FSMonthAgenda.vue +257 -0
- package/components/agenda/FSSelectAgendaMode.vue +54 -0
- package/components/agenda/FSWeekAgenda.vue +328 -0
- package/components/autocompletes/FSAutocompleteLanguage.vue +18 -39
- package/components/autocompletes/FSAutocompleteTimeZone.vue +20 -38
- package/components/buttons/FSButtonCancelMini.vue +1 -0
- package/components/buttons/FSButtonCopy.vue +28 -0
- package/components/buttons/FSButtonCopyIcon.vue +28 -0
- package/components/buttons/FSButtonCopyLabel.vue +27 -0
- package/components/buttons/FSButtonCopyMini.vue +28 -0
- package/components/buttons/FSButtonDragIcon.vue +27 -0
- package/components/buttons/FSButtonDuplicateMini.vue +1 -0
- package/components/buttons/FSButtonEditMini.vue +1 -0
- package/components/buttons/FSButtonFileMini.vue +1 -0
- package/components/buttons/FSButtonNextMini.vue +1 -0
- package/components/buttons/FSButtonPreviousMini.vue +1 -0
- package/components/buttons/FSButtonRedoMini.vue +1 -0
- package/components/buttons/FSButtonRemoveMini.vue +1 -0
- package/components/buttons/FSButtonSaveMini.vue +1 -0
- package/components/buttons/FSButtonSearchMini.vue +1 -0
- package/components/buttons/FSButtonUndoMini.vue +1 -0
- package/components/buttons/FSButtonUpdateMini.vue +1 -0
- package/components/buttons/FSButtonValidateMini.vue +1 -0
- package/components/deviceOrganisations/FSConnectivity.vue +11 -1
- package/components/deviceOrganisations/FSConnectivityCard.vue +20 -49
- package/components/deviceOrganisations/FSStatus.vue +11 -1
- package/components/deviceOrganisations/FSStatusCard.vue +40 -60
- package/components/deviceOrganisations/FSStatusesCarousel.vue +1 -0
- package/components/deviceOrganisations/FSStatusesRow.vue +10 -5
- package/components/deviceOrganisations/FSWorstAlert.vue +19 -13
- package/components/deviceOrganisations/FSWorstAlertCard.vue +36 -47
- package/components/fields/FSAutocompleteField.vue +501 -323
- package/components/fields/FSAutocompleteTag.vue +100 -0
- package/components/fields/FSBaseField.vue +26 -16
- package/components/fields/FSColorField.vue +63 -55
- package/components/fields/FSCommentField.vue +93 -0
- package/components/fields/FSDateField.vue +2 -2
- package/components/fields/FSDateRangeField.vue +2 -2
- package/components/fields/FSDateTimeField.vue +4 -3
- package/components/fields/FSDateTimeRangeField.vue +7 -6
- package/components/fields/FSEntityFieldUI.vue +271 -0
- package/components/fields/FSGradientField.vue +27 -33
- package/components/fields/FSIconField.vue +2 -3
- package/components/fields/FSMagicConfigField.vue +28 -19
- package/components/fields/FSMagicField.vue +25 -17
- package/components/fields/FSNumberField.vue +9 -7
- package/components/fields/FSPasswordField.vue +2 -3
- package/components/fields/FSRichTextField.vue +32 -5
- package/components/fields/FSSearchField.vue +2 -2
- package/components/fields/FSSelectField.vue +483 -251
- package/components/fields/FSTagField.vue +4 -6
- package/components/fields/FSTermField.vue +25 -13
- package/components/fields/FSTextArea.vue +18 -6
- package/components/fields/FSTextField.vue +13 -10
- package/components/fields/FSTimeField.vue +1 -1
- package/components/fields/FSTimeSlotField.vue +3 -4
- package/components/fields/FSTimeStepField.vue +157 -0
- package/components/fields/FSTranslateField.vue +3 -2
- package/components/fields/FSTranslateRichTextField.vue +4 -3
- package/components/fields/FSTranslateTextArea.vue +233 -0
- package/components/fields/FSTreeViewField.vue +7 -9
- package/components/fields/periodicField/FSPeriodicDailyField.vue +120 -0
- package/components/fields/periodicField/FSPeriodicField.vue +131 -0
- package/components/fields/periodicField/FSPeriodicMonthlyField.vue +222 -0
- package/components/fields/periodicField/FSPeriodicWeeklyField.vue +120 -0
- package/components/fields/periodicField/FSPeriodicYearlyField.vue +144 -0
- package/components/lists/FSDataIteratorItem.vue +8 -10
- package/components/lists/FSDataTableUI.vue +47 -39
- package/components/lists/FSFilterButton.vue +20 -22
- package/components/lists/FSHiddenButton.vue +10 -12
- package/components/lists/FSLoadDataTable.vue +4 -6
- package/components/lists/FSSimpleList.vue +229 -0
- package/components/map/FSMap.vue +256 -405
- package/components/map/FSMapFeatureGroup.vue +51 -0
- package/components/map/FSMapLayerButton.vue +6 -3
- package/components/map/FSMapMarker.vue +116 -0
- package/components/map/FSMapMarkerClusterGroup.vue +72 -0
- package/components/map/FSMapOverlay.vue +69 -83
- package/components/map/FSMapPolygon.vue +81 -0
- package/components/map/FSMapTileLayer.vue +50 -0
- package/components/map/keys.ts +4 -0
- package/components/selects/FSSelectAutoRefresh.vue +1 -1
- package/components/selects/FSSelectDashboardVariableType.vue +1 -1
- package/components/selects/FSSelectDateSetting.vue +3 -3
- package/components/selects/FSSelectDays.vue +1 -1
- package/components/selects/FSSelectListMode.vue +51 -0
- package/components/selects/FSSelectMonths.vue +67 -0
- package/components/tiles/FSChartTileUI.vue +116 -0
- package/components/tiles/FSCommentTileUI.vue +149 -0
- package/components/tiles/FSDashboardOrganisationTileUI.vue +6 -8
- package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +6 -8
- package/components/tiles/FSDashboardShallowTileUI.vue +6 -8
- package/components/tiles/FSDeviceOrganisationTileUI.vue +30 -18
- package/components/tiles/FSFolderTileUI.vue +6 -6
- package/components/tiles/FSGroupTileUI.vue +31 -22
- package/components/tiles/FSLoadTile.vue +5 -7
- package/components/tiles/FSLocationTileUI.vue +157 -0
- package/components/tiles/FSModelTileUI.vue +18 -0
- package/components/tiles/FSServiceAccountOrganisationTileUI.vue +142 -0
- package/components/tiles/FSSimpleTileUI.vue +57 -36
- package/components/tiles/FSTile.vue +115 -55
- package/components/tiles/FSUserOrganisationTileUI.vue +25 -35
- package/components/toggleSets/FSToggleSetPosition.vue +1 -1
- package/components/views/FSEntityHeader.vue +343 -0
- package/components/views/FSEntityView.vue +163 -0
- package/components/views/FSListHeader.vue +83 -0
- package/components/views/FSListView.vue +83 -0
- package/components/views/FSSkeletonView.vue +100 -0
- package/composables/useAddress.ts +2 -2
- package/composables/useColors.ts +15 -5
- package/composables/useMagicFieldProvider.ts +7 -6
- package/composables/useSlots.ts +51 -28
- package/models/agenda.ts +9 -0
- package/models/deviceAlerts.ts +1 -1
- package/models/deviceConnectivities.ts +1 -1
- package/models/index.ts +1 -0
- package/models/magicFields.ts +1 -0
- package/models/map.ts +2 -2
- package/models/rules.ts +10 -5
- package/models/tables.ts +3 -1
- package/package.json +4 -4
- package/styles/components/fs_agenda.scss +32 -0
- package/styles/components/fs_agenda_event.scss +41 -0
- package/styles/components/fs_agenda_hours_col.scss +4 -0
- package/styles/components/fs_agenda_hours_row.scss +13 -0
- package/styles/components/fs_agenda_time_line_marker.scss +19 -0
- package/styles/components/fs_card.scss +0 -1
- package/styles/components/fs_clickable.scss +5 -3
- package/styles/components/fs_color_field.scss +1 -0
- package/styles/components/fs_data_table.scss +2 -0
- package/styles/components/fs_dialog.scss +11 -15
- package/styles/components/fs_edit_image.scss +8 -0
- package/styles/components/fs_fade_out.scss +2 -1
- package/styles/components/fs_filter_button.scss +1 -6
- package/styles/components/fs_gradient_field.scss +11 -11
- package/styles/components/fs_magic_config_field.scss +2 -2
- package/styles/components/fs_map.scss +36 -30
- package/styles/components/fs_option_group.scss +15 -5
- package/styles/components/fs_radio.scss +11 -0
- package/styles/components/fs_rich_text_field.scss +2 -1
- package/styles/components/fs_search_field.scss +3 -0
- package/styles/components/fs_select_date_settings.scss +3 -0
- package/styles/components/fs_slide_group.scss +5 -0
- package/styles/components/fs_span.scss +2 -1
- package/styles/components/fs_switch.scss +1 -0
- package/styles/components/fs_tabs.scss +9 -0
- package/styles/components/fs_text_area.scss +15 -1
- package/styles/components/fs_tile.scss +22 -6
- package/styles/components/fs_window.scss +5 -0
- package/styles/components/fs_wrap_group.scss +4 -0
- package/styles/components/index.scss +6 -1
- package/styles/globals/overrides.scss +22 -19
- package/styles/globals/text_fonts.scss +17 -55
- package/tools/alertsTools.ts +54 -0
- package/tools/chartsTools.ts +300 -0
- package/tools/index.ts +2 -0
- package/utils/badge.ts +9 -0
- package/utils/filter.ts +18 -0
- package/utils/index.ts +2 -0
- package/utils/leafletMarkers.ts +8 -2
- package/utils/statuses.ts +1 -1
- package/utils/time.ts +27 -1
- package/components/autocompletes/FSAutocompleteTag.vue +0 -138
- package/components/map/FSMapEditPointAddressOverlay.vue +0 -164
- package/styles/components/fs_map_overlay.scss +0 -38
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template
|
|
3
|
+
v-if="isExtraSmall"
|
|
4
|
+
>
|
|
5
|
+
<FSCol
|
|
6
|
+
padding="16px 4px 16px 12px"
|
|
7
|
+
height="100%"
|
|
8
|
+
gap="16px"
|
|
9
|
+
>
|
|
10
|
+
<slot
|
|
11
|
+
name="header"
|
|
12
|
+
>
|
|
13
|
+
<slot
|
|
14
|
+
name="title"
|
|
15
|
+
>
|
|
16
|
+
<FSRow
|
|
17
|
+
gap="12px"
|
|
18
|
+
>
|
|
19
|
+
<slot
|
|
20
|
+
name="title-image"
|
|
21
|
+
/>
|
|
22
|
+
<slot
|
|
23
|
+
name="title-texts"
|
|
24
|
+
/>
|
|
25
|
+
</FSRow>
|
|
26
|
+
</slot>
|
|
27
|
+
</slot>
|
|
28
|
+
<slot
|
|
29
|
+
name="breadcrumbs"
|
|
30
|
+
/>
|
|
31
|
+
<slot
|
|
32
|
+
name="toolbar"
|
|
33
|
+
/>
|
|
34
|
+
<slot
|
|
35
|
+
name="title-append"
|
|
36
|
+
/>
|
|
37
|
+
<slot
|
|
38
|
+
name="default"
|
|
39
|
+
/>
|
|
40
|
+
</FSCol>
|
|
41
|
+
</template>
|
|
42
|
+
<template
|
|
43
|
+
v-else
|
|
44
|
+
>
|
|
45
|
+
<FSCol
|
|
46
|
+
padding="24px 8px 24px 24px"
|
|
47
|
+
height="100vh"
|
|
48
|
+
gap="16px"
|
|
49
|
+
>
|
|
50
|
+
<slot
|
|
51
|
+
name="header"
|
|
52
|
+
>
|
|
53
|
+
<slot
|
|
54
|
+
name="title"
|
|
55
|
+
>
|
|
56
|
+
<FSRow
|
|
57
|
+
gap="32px"
|
|
58
|
+
>
|
|
59
|
+
<slot
|
|
60
|
+
name="title-image"
|
|
61
|
+
/>
|
|
62
|
+
<slot
|
|
63
|
+
name="title-texts"
|
|
64
|
+
/>
|
|
65
|
+
<v-spacer />
|
|
66
|
+
<slot
|
|
67
|
+
name="title-append"
|
|
68
|
+
/>
|
|
69
|
+
</FSRow>
|
|
70
|
+
</slot>
|
|
71
|
+
</slot>
|
|
72
|
+
<slot
|
|
73
|
+
name="breadcrumbs"
|
|
74
|
+
/>
|
|
75
|
+
<slot
|
|
76
|
+
name="toolbar"
|
|
77
|
+
/>
|
|
78
|
+
<slot
|
|
79
|
+
name="default"
|
|
80
|
+
/>
|
|
81
|
+
</FSCol>
|
|
82
|
+
</template>
|
|
83
|
+
</template>
|
|
84
|
+
|
|
85
|
+
<script lang="ts">
|
|
86
|
+
import { defineComponent } from "vue";
|
|
87
|
+
|
|
88
|
+
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
89
|
+
|
|
90
|
+
export default defineComponent({
|
|
91
|
+
name: "FSSkeletonView",
|
|
92
|
+
setup() {
|
|
93
|
+
const { isExtraSmall } = useBreakpoints();
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
isExtraSmall
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Place } from "@dative-gpi/foundation-shared-domain/models";
|
|
2
|
-
import { Address } from "@dative-gpi/foundation-shared-domain/models";
|
|
3
1
|
import _ from "lodash";
|
|
4
2
|
|
|
3
|
+
import { Address, type Place } from "@dative-gpi/foundation-shared-domain/models";
|
|
4
|
+
|
|
5
5
|
export const useAddress = () => {
|
|
6
6
|
const enabled = true;
|
|
7
7
|
let initialized = false;
|
package/composables/useColors.ts
CHANGED
|
@@ -53,14 +53,24 @@ export const useColors = () => {
|
|
|
53
53
|
if(color.darken(0.15).isLight()){
|
|
54
54
|
return color.darken(0.8);
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
|
|
57
|
+
return color.lightness(color.lightness() < 30 ? 100 : Math.min(color.lightness() + 60, 100));
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
const
|
|
60
|
+
const parseColor = (color: ColorBase): Color => {
|
|
60
61
|
const themed = (Object as any).values(ColorEnum).includes(color);
|
|
62
|
+
|
|
63
|
+
try {
|
|
64
|
+
return themed ? new Color(theme.colors[color as ColorEnum]) : new Color(color);
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
return new Color("#000000");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
61
70
|
|
|
62
|
-
|
|
63
|
-
|
|
71
|
+
const getColors = (color: ColorBase): ColorVariations => {
|
|
72
|
+
const base = parseColor(color);
|
|
73
|
+
|
|
64
74
|
const light = getLight(base);
|
|
65
75
|
const soft = getSoft(base);
|
|
66
76
|
const dark = getDark(base);
|
|
@@ -96,7 +106,7 @@ export const useColors = () => {
|
|
|
96
106
|
const colors: string[][] = [];
|
|
97
107
|
for (let saturation = baseMinSaturation; saturation <= 100; saturation += (100 - baseMinSaturation) / (columnCount - 1)) {
|
|
98
108
|
const colorsRow = [];
|
|
99
|
-
for (let hue = 0; hue < 360; hue +=
|
|
109
|
+
for (let hue = 0; hue < 360; hue += 5) {
|
|
100
110
|
const color = new Color({ h: hue, s: saturation, v: baseFixedBrightness });
|
|
101
111
|
colorsRow.push(color.hex());
|
|
102
112
|
}
|
|
@@ -3,12 +3,13 @@ import { defineAsyncComponent } from "vue";
|
|
|
3
3
|
import { MagicFieldType } from "../models/magicFields";
|
|
4
4
|
|
|
5
5
|
const FIELDS = {
|
|
6
|
-
[MagicFieldType.NumberField]
|
|
7
|
-
[MagicFieldType.TextField]
|
|
8
|
-
[MagicFieldType.Switch]
|
|
9
|
-
[MagicFieldType.DateTimeField]: defineAsyncComponent(() => import("../components/fields/FSDateTimeField.vue")),
|
|
10
|
-
[MagicFieldType.IconField]
|
|
11
|
-
[MagicFieldType.TimeField]
|
|
6
|
+
[MagicFieldType.NumberField] : defineAsyncComponent(() => import("../components/fields/FSNumberField.vue")),
|
|
7
|
+
[MagicFieldType.TextField] : defineAsyncComponent(() => import("../components/fields/FSTextField.vue")),
|
|
8
|
+
[MagicFieldType.Switch] : defineAsyncComponent(() => import("../components/FSSwitch.vue")),
|
|
9
|
+
[MagicFieldType.DateTimeField] : defineAsyncComponent(() => import("../components/fields/FSDateTimeField.vue")),
|
|
10
|
+
[MagicFieldType.IconField] : defineAsyncComponent(() => import("../components/fields/FSIconField.vue")),
|
|
11
|
+
[MagicFieldType.TimeField] : defineAsyncComponent(() => import("../components/fields/FSTimeField.vue")),
|
|
12
|
+
[MagicFieldType.TimeStepField] : defineAsyncComponent(() => import("../components/fields/FSTimeStepField.vue")),
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
export const useMagicFieldProvider = () => {
|
package/composables/useSlots.ts
CHANGED
|
@@ -1,32 +1,55 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { useSlots as useVueSlots } from "vue"
|
|
1
|
+
import { type Slot, useSlots as useVueSlots } from "vue"
|
|
3
2
|
|
|
4
3
|
export const useSlots = () => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
switch (slot()[0].type) {
|
|
14
|
-
case Symbol.for("v-fgt"): return slot()[0].children;
|
|
15
|
-
case Symbol.for("v-cmt"): return slot();
|
|
16
|
-
default: return slot();
|
|
17
|
-
}
|
|
18
|
-
// Custom component
|
|
19
|
-
case "object": return slot();
|
|
20
|
-
// Pre-existing component
|
|
21
|
-
case "string": return slot();
|
|
22
|
-
}
|
|
23
|
-
return slot();
|
|
24
|
-
}
|
|
25
|
-
return null;
|
|
26
|
-
};
|
|
4
|
+
const getChildren = (name: string | undefined = undefined): any => {
|
|
5
|
+
const innerSlots = { ...useVueSlots() };
|
|
6
|
+
const innerName = name ?? "default";
|
|
7
|
+
if (innerSlots[innerName] != null) {
|
|
8
|
+
return recursiveGetChildren(innerSlots[innerName]!());
|
|
9
|
+
}
|
|
10
|
+
return null;
|
|
11
|
+
};
|
|
27
12
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
13
|
+
const recursiveGetChildren = (elements: any): any => {
|
|
14
|
+
if (elements == null) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
const returnElements: any[] = [];
|
|
18
|
+
for (const element of elements) {
|
|
19
|
+
switch (typeof(element.type)) {
|
|
20
|
+
// Directive wrapper (v-for, v-if)
|
|
21
|
+
case "symbol":
|
|
22
|
+
switch (element.type) {
|
|
23
|
+
case Symbol.for("v-fgt"):
|
|
24
|
+
returnElements.push(...recursiveGetChildren(element.children));
|
|
25
|
+
break;
|
|
26
|
+
case Symbol.for("v-cmt"):
|
|
27
|
+
returnElements.push(element);
|
|
28
|
+
break;
|
|
29
|
+
default:
|
|
30
|
+
returnElements.push(element);
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
// Custom component
|
|
35
|
+
case "object":
|
|
36
|
+
returnElements.push(element);
|
|
37
|
+
break;
|
|
38
|
+
// Pre-existing component
|
|
39
|
+
case "string":
|
|
40
|
+
returnElements.push(element);
|
|
41
|
+
break;
|
|
42
|
+
// Default
|
|
43
|
+
default:
|
|
44
|
+
returnElements.push(element);
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return returnElements;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
slots: { ...useVueSlots() } as { [label: string]: Slot<any> },
|
|
53
|
+
getChildren
|
|
54
|
+
};
|
|
32
55
|
}
|
package/models/agenda.ts
ADDED
package/models/deviceAlerts.ts
CHANGED
package/models/index.ts
CHANGED
package/models/magicFields.ts
CHANGED
package/models/map.ts
CHANGED
package/models/rules.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
2
|
-
import {
|
|
2
|
+
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
3
3
|
import { validateExpression } from "@dative-gpi/foundation-shared-domain/tools";
|
|
4
4
|
|
|
5
5
|
import { getTimeBestString } from "../utils";
|
|
6
|
+
import type { TimeUnit } from "@/shared/foundation-shared-domain/enums";
|
|
6
7
|
|
|
7
|
-
const { epochToLongDateFormat } =
|
|
8
|
+
const { epochToLongDateFormat } = useDateFormat()!;
|
|
8
9
|
const { $tr } = useTranslationsProvider();
|
|
9
10
|
|
|
10
11
|
export const TextRules = {
|
|
@@ -30,7 +31,7 @@ export const TagRules = {
|
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
export const NumberRules = {
|
|
33
|
-
required: (message: string | undefined = undefined) => (value: string) => (
|
|
34
|
+
required: (message: string | undefined = undefined) => (value: string) => (value != null && !isNaN(parseFloat(value))) || (message ?? $tr("ui.rules.required", "Required")),
|
|
34
35
|
min: (min: number, message: string | undefined = undefined) => (value: string) => (!!value && !isNaN(parseFloat(value)) && parseFloat(value) >= min) || (message ?? $tr("ui.rules.number-min", "Must be at least {0}", min.toString())),
|
|
35
36
|
max: (max: number, message: string | undefined = undefined) => (value: string) => (!!value && !isNaN(parseFloat(value)) && parseFloat(value) <= max) || (message ?? $tr("ui.rules.number-max", "Must be at most {0}", max.toString())),
|
|
36
37
|
integer: (message: string | undefined = undefined) => (value: string) => (!!value && !isNaN(parseFloat(value)) && Number.isInteger(parseFloat(value))) || (message ?? $tr("ui.rules.number-integer", "Must be an integer"))
|
|
@@ -44,7 +45,7 @@ export const DateRules = {
|
|
|
44
45
|
required: (message: string | undefined = undefined) => (value: string) => !!value || (message ?? $tr("ui.rules.required", "Required")),
|
|
45
46
|
min: (min: number, message: string | undefined = undefined) => (value: number) => (!value || value >= min) || (message ?? $tr("ui.rules.date-min", "Must be after {0}", epochToLongDateFormat(min))),
|
|
46
47
|
max: (max: number, message: string | undefined = undefined) => (value: number) => (!value || value <= max) || (message ?? $tr("ui.rules.date-max", "Must be before {0}", epochToLongDateFormat(max))),
|
|
47
|
-
validateExpression: (variant: "default" | "before-after") => (value: string) => validateExpression(value, variant)
|
|
48
|
+
validateExpression: (variant: "default" | "before-after" | undefined = "default") => (value: string) => validateExpression(value, variant)
|
|
48
49
|
};
|
|
49
50
|
|
|
50
51
|
export const SelectRules = {
|
|
@@ -65,12 +66,16 @@ export const TimeRules = {
|
|
|
65
66
|
max: (max: number, message: string | undefined = undefined) => (value: number) => value <= max || (message ?? $tr("ui.rules.time-max", "Must be less than {0}", getTimeBestString(max)))
|
|
66
67
|
};
|
|
67
68
|
|
|
69
|
+
export const TimeStepRules = {
|
|
70
|
+
required: (message: string | undefined = undefined) => (value: { value: number, unit: TimeUnit } | null) => (!!value && value.value !== 0) || (message ?? $tr("ui.rules.required", "Required")),
|
|
71
|
+
}
|
|
72
|
+
|
|
68
73
|
export const ToggleRules = {
|
|
69
74
|
required: (message: string | undefined = undefined) => (value: boolean) => value || (message ?? $tr("ui.rules.required", "Required"))
|
|
70
75
|
};
|
|
71
76
|
|
|
72
77
|
export const TreeViewRules = {
|
|
73
78
|
required: (message: string | undefined = undefined) => (value: string) => !!value || (message ?? $tr("ui.rules.required", "Required")),
|
|
74
|
-
min: (min: number, message: string | undefined = undefined) => (value: string[]) =>
|
|
79
|
+
min: (min: number, message: string | undefined = undefined) => (value: string[]) => (Array.isArray(value) && value.length >= min) || (message ?? $tr("ui.rules.tree-view-min", "Must select at least {0} elements", min.toString())),
|
|
75
80
|
max: (max: number, message: string | undefined = undefined) => (value: string[]) => (Array.isArray(value) && value.length <= max) || (message ?? $tr("ui.rules.tree-view-max", "Must select at most {0} elements", max.toString()))
|
|
76
81
|
};
|
package/models/tables.ts
CHANGED
|
@@ -8,10 +8,12 @@ export interface FSDataTableColumn {
|
|
|
8
8
|
|
|
9
9
|
sortable?: boolean | null;
|
|
10
10
|
sort?: ((a: any, b: any) => number) | null;
|
|
11
|
+
sortRaw?: ((a: any, b: any) => number) | null;
|
|
11
12
|
|
|
12
13
|
filterable?: boolean | null;
|
|
13
14
|
fixedFilters?: { value: any, text: string }[] | null;
|
|
14
|
-
methodFilter?: ((value: any,
|
|
15
|
+
methodFilter?: ((value: any, property: any) => boolean) | null;
|
|
16
|
+
methodFilterRaw?: ((value: any, item: any) => boolean) | null;
|
|
15
17
|
filter?: ((value: any, search: string, item: any) => boolean) | null;
|
|
16
18
|
|
|
17
19
|
innerValue?: ((value: any) => any) | null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.68",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "0.1.68",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.1.68"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^0.0.75",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "fa2ed7031088f422751fc1d939f2fbe168ae0596"
|
|
39
39
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.fs-agenda-view {
|
|
2
|
+
min-height: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.fs-agenda-label-day-container {
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.fs-agenda-label-day {
|
|
10
|
+
border-bottom: 1px solid var(--fs-agenda-label-day-border-bottom-color);
|
|
11
|
+
border-right: 1px solid var(--fs-agenda-label-day-border-right-color);
|
|
12
|
+
min-height: 0px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.fs-agenda-label-day-now {
|
|
16
|
+
border-bottom: 4px solid var(--fs-clickable-border-color);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.fs-agenda-body {
|
|
20
|
+
position: relative;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.fs-agenda-row-day {
|
|
24
|
+
position: relative;
|
|
25
|
+
border-bottom: 1px solid var(--fs-agenda-row-day-border-bottom-color);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.fs-day-agenda-hour-line {
|
|
29
|
+
border-top: solid 1px var(--fs-day-agenda-hour-line-color);
|
|
30
|
+
width: 100%;
|
|
31
|
+
height: 100%;
|
|
32
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.fs-agenda-event {
|
|
2
|
+
position: absolute !important;
|
|
3
|
+
left: var(--fs-agenda-event-left);
|
|
4
|
+
top: var(--fs-agenda-event-top);
|
|
5
|
+
|
|
6
|
+
&.fs-agenda-event-past {
|
|
7
|
+
opacity: 0.5;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
>.fs-card {
|
|
11
|
+
border-left: solid 3px var(--fs-clickable-border-color) !important;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.fs-agenda-event .fs-col,
|
|
16
|
+
.fs-agenda-event .fs-row {
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.fs-day-agenda .fs-agenda-event {
|
|
21
|
+
.fs-agenda-event-day-label-container {
|
|
22
|
+
overflow: visible !important;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.fs-week-agenda .fs-agenda-event{
|
|
27
|
+
margin-top: 3px;
|
|
28
|
+
margin-bottom: 3px;
|
|
29
|
+
height: calc(100% - 6px) !important;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.fs-month-agenda .fs-agenda-event {
|
|
33
|
+
margin-top: 2px;
|
|
34
|
+
margin-bottom: 2px;
|
|
35
|
+
height: calc(100% - 4px) !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.fs-agenda-event-current span {
|
|
39
|
+
text-overflow: unset;
|
|
40
|
+
flex-shrink: 0;
|
|
41
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.fs-agenda-hours-row {
|
|
2
|
+
transform: translateX(calc(-2.4% + 2px));
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.fs-agenda-hours-row-text {
|
|
6
|
+
padding: 0 2px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.fs-agenda-hours-row-marker {
|
|
10
|
+
height: 4px;
|
|
11
|
+
border-right: solid 1px var(--fs-agenda-hours-row-marker-color);
|
|
12
|
+
transform: translateY(-4px);
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.fs-agenda-horizontal-time-line-marker {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: var(--fs-agenda-horizontal-time-line-marker-left);
|
|
5
|
+
width: 2px;
|
|
6
|
+
height: 100%;
|
|
7
|
+
z-index: 1;
|
|
8
|
+
background-color: var(--fs-agenda-horizontal-time-line-marker-color);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.fs-agenda-vertical-time-line-marker {
|
|
12
|
+
position: absolute;
|
|
13
|
+
top: var(--fs-agenda-vertical-time-line-marker-top);
|
|
14
|
+
left: 0;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 2px;
|
|
17
|
+
z-index: 1;
|
|
18
|
+
background-color: var(--fs-agenda-vertical-time-line-marker-color);
|
|
19
|
+
}
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
border-color: var(--fs-clickable-hover-border-color) !important;
|
|
18
18
|
color: var(--fs-clickable-hover-color) !important;
|
|
19
19
|
|
|
20
|
-
& .fs-
|
|
20
|
+
& .fs-card-clickable {
|
|
21
|
+
transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
21
22
|
background-color: var(--fs-clickable-hover-background-color);
|
|
22
23
|
}
|
|
23
24
|
}
|
|
@@ -27,7 +28,8 @@
|
|
|
27
28
|
border-color: var(--fs-clickable-active-border-color) !important;
|
|
28
29
|
color: var(--fs-clickable-active-color) !important;
|
|
29
30
|
|
|
30
|
-
& .fs-
|
|
31
|
+
& .fs-card-clickable {
|
|
32
|
+
transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
31
33
|
background-color: var(--fs-clickable-active-background-color);
|
|
32
34
|
}
|
|
33
35
|
}
|
|
@@ -42,7 +44,7 @@ a:has(.fs-clickable) {
|
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
button:has(.fs-clickable) {
|
|
45
|
-
position: relative
|
|
47
|
+
position: relative;
|
|
46
48
|
height: var(--fs-clickable-height);
|
|
47
49
|
width: var(--fs-clickable-width);
|
|
48
50
|
}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
.fs-dialog-mobile {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
align-self: flex-end;
|
|
8
|
-
}
|
|
1
|
+
.fs-dialog-mobile > .v-overlay__content {
|
|
2
|
+
max-height: calc(100% - 40px) !important;
|
|
3
|
+
max-width: 100% !important;
|
|
4
|
+
width: 100% !important;
|
|
5
|
+
margin: 0 !important;
|
|
6
|
+
align-self: flex-end;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
|
-
.fs-dialog {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
width: fit-content !important;
|
|
17
|
-
}
|
|
9
|
+
.fs-dialog > .v-overlay__content {
|
|
10
|
+
max-height: calc(100vh - 40px) !important;
|
|
11
|
+
max-width: calc(100vw - 40px) !important;
|
|
12
|
+
width: fit-content !important;
|
|
13
|
+
margin: 20px !important;
|
|
18
14
|
}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
@extend .fs-hide-y-scrollbar;
|
|
3
3
|
|
|
4
4
|
transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
5
|
-
max-height: var(--fs-fade-out-height);
|
|
5
|
+
max-height: var(--fs-fade-out-max-height);
|
|
6
6
|
padding: var(--fs-fade-out-padding);
|
|
7
|
+
height: var(--fs-fade-out-height);
|
|
7
8
|
width: var(--fs-fade-out-width);
|
|
8
9
|
flex-direction: column;
|
|
9
10
|
position: relative;
|