@dative-gpi/foundation-shared-components 1.0.7 → 1.0.10
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 +6 -6
- package/components/FSButton.vue +4 -4
- package/components/FSCalendar.vue +33 -31
- package/components/FSCalendarTwin.vue +75 -82
- package/components/FSCard.vue +7 -7
- package/components/FSCardPlaceholder.vue +1 -2
- package/components/FSCheckbox.vue +4 -6
- package/components/FSChip.vue +9 -11
- package/components/FSClickable.vue +44 -48
- package/components/FSClock.vue +2 -2
- package/components/FSCol.vue +2 -3
- package/components/FSColorIcon.vue +2 -4
- package/components/FSDialog.vue +1 -2
- package/components/FSDialogMenu.vue +2 -4
- package/components/FSDialogSubmit.vue +2 -4
- package/components/FSDivider.vue +6 -8
- package/components/FSEditImage.vue +6 -8
- package/components/FSErrorToast.vue +3 -4
- package/components/FSFadeOut.vue +9 -11
- package/components/FSGrid.vue +5 -9
- package/components/FSGridMosaic.vue +1 -2
- package/components/FSIcon.vue +4 -6
- package/components/FSIconCheck.vue +1 -2
- package/components/FSImage.vue +9 -10
- package/components/FSImageCard.vue +2 -2
- package/components/FSLabel.vue +17 -19
- package/components/FSLink.vue +18 -20
- package/components/FSLoader.vue +8 -11
- package/components/FSOptionGroup.vue +7 -9
- package/components/FSPagination.vue +3 -5
- package/components/FSRadio.vue +4 -6
- package/components/FSRadioGroup.vue +2 -4
- package/components/FSRow.vue +3 -4
- package/components/FSSlideGroup.vue +2 -3
- package/components/FSSlider.vue +8 -10
- package/components/FSSpan.vue +5 -8
- package/components/FSSwitch.vue +7 -9
- package/components/FSTab.vue +2 -4
- package/components/FSTabs.vue +9 -9
- package/components/FSTag.vue +9 -11
- package/components/FSTagGroup.vue +2 -4
- package/components/FSText.vue +7 -11
- package/components/FSWindow.vue +2 -2
- package/components/FSWrapGroup.vue +2 -3
- package/components/deviceOrganisations/FSConnectivityCard.vue +1 -2
- package/components/deviceOrganisations/FSStatusCard.vue +1 -2
- package/components/deviceOrganisations/FSStatusesRow.vue +1 -2
- package/components/deviceOrganisations/FSWorstAlert.vue +1 -2
- package/components/deviceOrganisations/FSWorstAlertCard.vue +1 -2
- package/components/fields/FSAutocompleteField.vue +2 -3
- package/components/fields/FSBaseField.vue +13 -10
- package/components/fields/FSColorField.vue +16 -16
- package/components/fields/FSDateTimeField.vue +2 -2
- package/components/fields/FSDateTimeRangeField.vue +4 -4
- package/components/fields/FSIconField.vue +2 -3
- package/components/fields/FSMagicConfigField.vue +1 -2
- package/components/fields/FSMagicField.vue +1 -2
- package/components/fields/FSNumberField.vue +1 -2
- package/components/fields/FSPasswordField.vue +2 -3
- package/components/fields/FSRichTextField.vue +3 -4
- package/components/fields/FSSearchField.vue +1 -2
- package/components/fields/FSSelectField.vue +2 -3
- package/components/fields/FSTagField.vue +3 -5
- package/components/fields/FSTermField.vue +6 -5
- package/components/fields/FSTextArea.vue +2 -3
- package/components/fields/FSTextField.vue +2 -3
- package/components/fields/FSTimeField.vue +1 -1
- package/components/fields/FSTimeSlotField.vue +2 -3
- package/components/fields/FSTranslateField.vue +2 -2
- package/components/fields/FSTreeViewField.vue +4 -6
- package/components/lists/FSDataIteratorItem.vue +8 -10
- package/components/lists/FSDataTableUI.vue +7 -11
- package/components/lists/FSFilterButton.vue +1 -2
- package/components/lists/FSLoadDataTable.vue +4 -6
- package/components/map/FSMap.vue +11 -14
- package/components/map/FSMapOverlay.vue +10 -10
- package/components/selects/FSSelectDateSetting.vue +1 -2
- package/components/tiles/FSLoadTile.vue +5 -7
- package/models/rules.ts +1 -1
- package/package.json +4 -4
- package/utils/badge.ts +9 -0
- package/utils/index.ts +1 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol
|
|
3
3
|
v-show="isExtraSmall"
|
|
4
|
-
:id="`left-overlay-mobile-${$props.mapId}`"
|
|
5
|
-
:height="$props.mode === 'expand' ? '100%' : ($props.mode === 'half' ? '50%' : 'hug')"
|
|
6
|
-
:style="style"
|
|
7
4
|
class="fs-map-overlay-left-mobile"
|
|
8
5
|
ref="mobileOverlayElement"
|
|
9
6
|
align="bottom-center"
|
|
10
7
|
width="hug"
|
|
11
8
|
gap="2px"
|
|
9
|
+
:height="$props.mode === 'expand' ? '100%' : ($props.mode === 'half' ? '50%' : 'hug')"
|
|
10
|
+
:id="`left-overlay-mobile-${$props.mapId}`"
|
|
11
|
+
:style="style"
|
|
12
12
|
@click="$event.target === mobileOverlayElement?.$el ? $emit('update:mode', 'collapse') : null"
|
|
13
13
|
>
|
|
14
14
|
<FSCard
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
:border="false"
|
|
18
18
|
>
|
|
19
19
|
<FSCol
|
|
20
|
-
gap="0px"
|
|
21
20
|
height="fill"
|
|
21
|
+
gap="0px"
|
|
22
22
|
>
|
|
23
23
|
<FSRow
|
|
24
24
|
align="center-center"
|
|
25
25
|
@touchstart="$props.mode === 'expand' ? $emit('update:mode', 'collapse') : $emit('update:mode', 'expand')"
|
|
26
26
|
>
|
|
27
27
|
<FSButton
|
|
28
|
-
:icon="$props.mode === 'expand' ? 'mdi-chevron-down' : 'mdi-chevron-up'"
|
|
29
28
|
variant="icon"
|
|
29
|
+
:icon="$props.mode === 'expand' ? 'mdi-chevron-down' : 'mdi-chevron-up'"
|
|
30
30
|
@click="$props.mode === 'expand' ? $emit('update:mode', 'collapse') : $emit('update:mode', 'expand')"
|
|
31
31
|
/>
|
|
32
32
|
</FSRow>
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
name="leftoverlay-header"
|
|
39
39
|
/>
|
|
40
40
|
<FSFadeOut
|
|
41
|
-
:height="$props.mode === 'collapse' ? '0px' : '100%'"
|
|
42
41
|
maskHeight="0px"
|
|
42
|
+
:height="$props.mode === 'collapse' ? '0px' : '100%'"
|
|
43
43
|
>
|
|
44
44
|
<slot
|
|
45
45
|
name="leftoverlay-body"
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
</FSCol>
|
|
52
52
|
<FSCol
|
|
53
53
|
v-show="!isExtraSmall"
|
|
54
|
-
:style="style"
|
|
55
|
-
:id="`left-overlay-${$props.mapId}`"
|
|
56
54
|
class="fs-map-overlay-left"
|
|
57
55
|
width="hug"
|
|
58
56
|
gap="2px"
|
|
57
|
+
:id="`left-overlay-${$props.mapId}`"
|
|
58
|
+
:style="style"
|
|
59
59
|
>
|
|
60
60
|
<FSCard
|
|
61
61
|
padding="4px"
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
</template>
|
|
83
83
|
|
|
84
84
|
<script lang="ts">
|
|
85
|
-
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
85
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue } from "vue";
|
|
86
86
|
|
|
87
87
|
import { useBreakpoints } from "../../composables";
|
|
88
88
|
|
|
@@ -124,7 +124,7 @@ export default defineComponent({
|
|
|
124
124
|
const leftOverlayMenuMobile = ref(false);
|
|
125
125
|
const mobileOverlayElement = ref(null);
|
|
126
126
|
|
|
127
|
-
const style = computed(():
|
|
127
|
+
const style = computed((): StyleValue => {
|
|
128
128
|
if (props.mode === "expand") {
|
|
129
129
|
return {
|
|
130
130
|
"--fs-map-overlay-max-height": `calc(${props.height} - 40px)`,
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script lang="ts">
|
|
12
|
-
import type
|
|
13
|
-
import { computed, defineComponent } from "vue";
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
14
13
|
|
|
15
14
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
16
15
|
import { DateSetting } from "@dative-gpi/foundation-shared-domain/models";
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</template>
|
|
54
54
|
|
|
55
55
|
<script lang="ts">
|
|
56
|
-
import { computed, defineComponent } from "vue";
|
|
56
|
+
import { computed, defineComponent, type StyleValue } from "vue";
|
|
57
57
|
|
|
58
58
|
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
59
59
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -92,6 +92,10 @@ export default defineComponent({
|
|
|
92
92
|
|
|
93
93
|
const backgroundColors = getColors(ColorEnum.Background);
|
|
94
94
|
|
|
95
|
+
const style = computed((): StyleValue => ({
|
|
96
|
+
"--fs-load-tile-background-color": backgroundColors.base
|
|
97
|
+
}));
|
|
98
|
+
|
|
95
99
|
const heights = computed(() => {
|
|
96
100
|
return {
|
|
97
101
|
image: isMobileSized.value ? "90px" : "100px",
|
|
@@ -108,12 +112,6 @@ export default defineComponent({
|
|
|
108
112
|
}
|
|
109
113
|
});
|
|
110
114
|
|
|
111
|
-
const style = computed((): { [key: string] : string | null | undefined } => {
|
|
112
|
-
return {
|
|
113
|
-
"--fs-load-tile-background-color": backgroundColors.base
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
|
|
117
115
|
return {
|
|
118
116
|
heights,
|
|
119
117
|
widths,
|
package/models/rules.ts
CHANGED
|
@@ -44,7 +44,7 @@ export const DateRules = {
|
|
|
44
44
|
required: (message: string | undefined = undefined) => (value: string) => !!value || (message ?? $tr("ui.rules.required", "Required")),
|
|
45
45
|
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
46
|
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)
|
|
47
|
+
validateExpression: (variant: "default" | "before-after" | undefined = "default") => (value: string) => validateExpression(value, variant)
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
export const SelectRules = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.10",
|
|
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": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.10",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.10"
|
|
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": "018a67489fc022344c90d45b02bfabdcd0dcefec"
|
|
39
39
|
}
|
package/utils/badge.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const getBadgeFromNumber = (value: number, parenthesis: boolean = false): string => {
|
|
2
|
+
if (value < 1) {
|
|
3
|
+
return "";
|
|
4
|
+
}
|
|
5
|
+
if (value > 99) {
|
|
6
|
+
return `${parenthesis ? '(' : ''}99+${parenthesis ? ')' : ''}`;
|
|
7
|
+
}
|
|
8
|
+
return `${parenthesis ? '(' : ''}${value.toString()}${parenthesis ? ')' : ''}`;
|
|
9
|
+
}
|
package/utils/index.ts
CHANGED