@dative-gpi/foundation-shared-components 1.0.6 → 1.0.9
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 +5 -7
- package/components/FSIconCard.vue +20 -25
- 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/components/views/FSEntityHeader.vue +4 -4
- package/components/views/FSListHeader.vue +83 -0
- package/components/views/FSListView.vue +83 -0
- package/models/rules.ts +1 -1
- package/package.json +4 -4
- package/utils/badge.ts +9 -0
- package/utils/index.ts +1 -0
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script lang="ts">
|
|
32
|
-
import type
|
|
33
|
-
import { computed, defineComponent, ref } from "vue";
|
|
32
|
+
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
34
33
|
|
|
35
34
|
import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/models";
|
|
36
35
|
import type { FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -55,8 +55,7 @@
|
|
|
55
55
|
</template>
|
|
56
56
|
|
|
57
57
|
<script lang="ts">
|
|
58
|
-
import type
|
|
59
|
-
import { computed, defineComponent } from "vue";
|
|
58
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
60
59
|
|
|
61
60
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
62
61
|
import type { FSDeviceAlert} from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -313,8 +313,7 @@
|
|
|
313
313
|
</template>
|
|
314
314
|
|
|
315
315
|
<script lang="ts">
|
|
316
|
-
import type
|
|
317
|
-
import { computed, defineComponent, ref } from "vue";
|
|
316
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue } from "vue";
|
|
318
317
|
|
|
319
318
|
import { useBreakpoints, useColors, useRules, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
320
319
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -450,7 +449,7 @@ export default defineComponent({
|
|
|
450
449
|
const dialog = ref(false);
|
|
451
450
|
const search = ref("");
|
|
452
451
|
|
|
453
|
-
const style = computed(():
|
|
452
|
+
const style = computed((): StyleValue => {
|
|
454
453
|
if (!props.editable) {
|
|
455
454
|
return {
|
|
456
455
|
"--fs-autocomplete-field-cursor": "default",
|
|
@@ -27,14 +27,18 @@
|
|
|
27
27
|
<v-spacer
|
|
28
28
|
style="min-width: 40px;"
|
|
29
29
|
/>
|
|
30
|
-
<
|
|
31
|
-
v-if="$props.messages
|
|
32
|
-
class="fs-base-field-messages"
|
|
33
|
-
font="text-overline"
|
|
34
|
-
:style="style"
|
|
30
|
+
<template
|
|
31
|
+
v-if="$props.messages"
|
|
35
32
|
>
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
<FSSpan
|
|
34
|
+
v-if="$props.messages.length > 0"
|
|
35
|
+
class="fs-base-field-messages"
|
|
36
|
+
font="text-overline"
|
|
37
|
+
:style="style"
|
|
38
|
+
>
|
|
39
|
+
{{ $props.messages.join(", ") }}
|
|
40
|
+
</FSSpan>
|
|
41
|
+
</template>
|
|
38
42
|
</FSRow>
|
|
39
43
|
</slot>
|
|
40
44
|
<slot />
|
|
@@ -54,8 +58,7 @@
|
|
|
54
58
|
</template>
|
|
55
59
|
|
|
56
60
|
<script lang="ts">
|
|
57
|
-
import type
|
|
58
|
-
import { computed, defineComponent } from "vue";
|
|
61
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
59
62
|
|
|
60
63
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
61
64
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -114,7 +117,7 @@ export default defineComponent({
|
|
|
114
117
|
const lights = getColors(ColorEnum.Light);
|
|
115
118
|
const darks = getColors(ColorEnum.Dark);
|
|
116
119
|
|
|
117
|
-
const style = computed(():
|
|
120
|
+
const style = computed((): StyleValue => {
|
|
118
121
|
if (!props.editable) {
|
|
119
122
|
return {
|
|
120
123
|
"--fs-base-field-color": lights.dark
|
|
@@ -9,29 +9,29 @@
|
|
|
9
9
|
>
|
|
10
10
|
<FSBaseField
|
|
11
11
|
class="fs-color-field"
|
|
12
|
+
:description="$props.description"
|
|
12
13
|
:hideHeader="$props.hideHeader"
|
|
13
|
-
:required="$props.required"
|
|
14
14
|
:editable="$props.editable"
|
|
15
|
-
:
|
|
16
|
-
:description="$props.description"
|
|
15
|
+
:required="$props.required"
|
|
17
16
|
:label="$props.label"
|
|
18
|
-
:style="style"
|
|
19
17
|
:width="$props.width"
|
|
18
|
+
:style="style"
|
|
19
|
+
:modelValue="innerColor"
|
|
20
20
|
v-bind="$attrs"
|
|
21
21
|
>
|
|
22
22
|
<FSCard
|
|
23
|
-
width="100%"
|
|
24
23
|
padding="8px"
|
|
25
|
-
|
|
24
|
+
width="100%"
|
|
26
25
|
:class="{ 'fs-color-field-disabled': !$props.editable }"
|
|
26
|
+
v-bind="props"
|
|
27
27
|
>
|
|
28
28
|
<FSRow
|
|
29
29
|
align="center-center"
|
|
30
30
|
>
|
|
31
31
|
<FSIcon
|
|
32
|
-
:color="innerColor"
|
|
33
|
-
size="20px"
|
|
34
32
|
icon="mdi-circle-half"
|
|
33
|
+
size="20px"
|
|
34
|
+
:color="innerColor"
|
|
35
35
|
/>
|
|
36
36
|
<FSText
|
|
37
37
|
font="text-overline"
|
|
@@ -53,23 +53,23 @@
|
|
|
53
53
|
v-if="!$props.onlyBaseColors"
|
|
54
54
|
class="fs-color-field-picker"
|
|
55
55
|
mode="hexa"
|
|
56
|
-
:elevation="0"
|
|
57
56
|
:modes="allowOpacity ? ['hexa', 'rgba'] : ['hex', 'rgb']"
|
|
57
|
+
:elevation="0"
|
|
58
58
|
:modelValue="fullColor"
|
|
59
59
|
@update:modelValue="onSubmit"
|
|
60
60
|
/>
|
|
61
61
|
<v-color-picker
|
|
62
62
|
v-else
|
|
63
63
|
class="fs-color-field-picker"
|
|
64
|
-
:elevation="0"
|
|
65
|
-
:modelValue="fullColor"
|
|
66
|
-
@update:modelValue="onSubmit"
|
|
67
64
|
swatches-max-height="400px"
|
|
68
65
|
show-swatches
|
|
69
|
-
hide-inputs
|
|
70
|
-
hide-canvas
|
|
71
66
|
hide-sliders
|
|
67
|
+
hide-canvas
|
|
68
|
+
hide-inputs
|
|
72
69
|
:swatches="getBasePaletteColors()"
|
|
70
|
+
:elevation="0"
|
|
71
|
+
:modelValue="fullColor"
|
|
72
|
+
@update:modelValue="onSubmit"
|
|
73
73
|
/>
|
|
74
74
|
</FSCol>
|
|
75
75
|
</FSCard>
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
</template>
|
|
78
78
|
|
|
79
79
|
<script lang="ts">
|
|
80
|
-
import { computed, defineComponent, type PropType, ref, watch } from "vue";
|
|
80
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue, watch } from "vue";
|
|
81
81
|
|
|
82
82
|
import { getPercentageFromHex, getHexFromPercentage } from "@dative-gpi/foundation-shared-components/utils";
|
|
83
83
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -168,7 +168,7 @@ export default defineComponent({
|
|
|
168
168
|
const innerOpacity = ref("00");
|
|
169
169
|
const fullColor = ref("#00000000");
|
|
170
170
|
|
|
171
|
-
const style = computed(():
|
|
171
|
+
const style = computed((): StyleValue => {
|
|
172
172
|
if (!props.editable) {
|
|
173
173
|
return {
|
|
174
174
|
"--fs-color-field-cursor" : "default",
|
|
@@ -264,7 +264,7 @@ export default defineComponent({
|
|
|
264
264
|
},
|
|
265
265
|
emits: ["update:modelValue"],
|
|
266
266
|
setup(props, { emit }) {
|
|
267
|
-
const {
|
|
267
|
+
const { epochToLongTimeFormat, getOffsetUser } = useAppTimeZone();
|
|
268
268
|
const { validateOn, getMessages } = useRules();
|
|
269
269
|
const { isExtraSmall } = useBreakpoints();
|
|
270
270
|
|
|
@@ -300,7 +300,7 @@ export default defineComponent({
|
|
|
300
300
|
if (props.modelValue) {
|
|
301
301
|
// FSClock just gives two numbers without consideration for the time zone
|
|
302
302
|
// We must adjust the time to the user's time zone
|
|
303
|
-
innerTime.value = Math.floor((props.modelValue +
|
|
303
|
+
innerTime.value = Math.floor((props.modelValue + getOffsetUser()) % (24 * 60 * 60 * 1000));
|
|
304
304
|
innerDate.value = props.modelValue - innerTime.value;
|
|
305
305
|
}
|
|
306
306
|
else {
|
|
@@ -145,7 +145,7 @@ export default defineComponent({
|
|
|
145
145
|
},
|
|
146
146
|
emits: ["update:modelValue"],
|
|
147
147
|
setup(props, { emit }) {
|
|
148
|
-
const {
|
|
148
|
+
const { epochToShortTimeFormat, getOffsetUser } = useAppTimeZone();
|
|
149
149
|
const { validateOn, getMessages } = useRules();
|
|
150
150
|
|
|
151
151
|
const dialog = ref(false);
|
|
@@ -206,13 +206,13 @@ export default defineComponent({
|
|
|
206
206
|
break;
|
|
207
207
|
}
|
|
208
208
|
case 1: {
|
|
209
|
-
innerTimeLeft.value = Math.floor((props.modelValue[0] +
|
|
209
|
+
innerTimeLeft.value = Math.floor((props.modelValue[0] + getOffsetUser()) % (24 * 60 * 60 * 1000));
|
|
210
210
|
innerDateRange.value = [props.modelValue[0] - innerTimeLeft.value];
|
|
211
211
|
break;
|
|
212
212
|
}
|
|
213
213
|
default: {
|
|
214
|
-
innerTimeLeft.value = Math.floor((props.modelValue[0] +
|
|
215
|
-
innerTimeRight.value = Math.floor((props.modelValue[1] +
|
|
214
|
+
innerTimeLeft.value = Math.floor((props.modelValue[0] + getOffsetUser()) % (24 * 60 * 60 * 1000));
|
|
215
|
+
innerTimeRight.value = Math.floor((props.modelValue[1] + getOffsetUser()) % (24 * 60 * 60 * 1000));
|
|
216
216
|
innerDateRange.value = [props.modelValue[0] - innerTimeLeft.value, props.modelValue[1] - innerTimeRight.value];
|
|
217
217
|
break;
|
|
218
218
|
}
|
|
@@ -48,8 +48,7 @@ import { computed, defineComponent, ref, watch } from "vue";
|
|
|
48
48
|
|
|
49
49
|
import { Icons, sortByLevenshteinDistance } from "@dative-gpi/foundation-shared-components/utils";
|
|
50
50
|
import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
|
|
51
|
-
import type
|
|
52
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
51
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
53
52
|
import type { FSToggle } from "@dative-gpi/foundation-shared-components/models";
|
|
54
53
|
|
|
55
54
|
import FSToggleSet from "../FSToggleSet.vue";
|
|
@@ -139,7 +138,7 @@ export default defineComponent({
|
|
|
139
138
|
const toggleSetRef = ref<HTMLElement | null>(null);
|
|
140
139
|
const innerValue = ref<string | null>(null);
|
|
141
140
|
|
|
142
|
-
const style = computed(():
|
|
141
|
+
const style = computed((): StyleValue => {
|
|
143
142
|
if (!props.editable) {
|
|
144
143
|
return {
|
|
145
144
|
"--fs-icon-field-color": lights.dark
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
</template>
|
|
39
39
|
|
|
40
40
|
<script lang="ts">
|
|
41
|
-
import type
|
|
42
|
-
import { computed, defineComponent } from "vue";
|
|
41
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
43
42
|
|
|
44
43
|
import { DateRules, IconRules, NumberRules, TextRules, TimeRules } from "../../models";
|
|
45
44
|
import { useMagicFieldProvider } from "../../composables";
|
|
@@ -58,8 +58,7 @@
|
|
|
58
58
|
</template>
|
|
59
59
|
|
|
60
60
|
<script lang="ts">
|
|
61
|
-
import type
|
|
62
|
-
import { computed, defineComponent } from "vue";
|
|
61
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
63
62
|
|
|
64
63
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
65
64
|
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
</template>
|
|
34
34
|
|
|
35
35
|
<script lang="ts">
|
|
36
|
-
import type
|
|
37
|
-
import { computed, defineComponent, ref } from "vue";
|
|
36
|
+
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
38
37
|
|
|
39
38
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
40
39
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -69,7 +68,7 @@ export default defineComponent({
|
|
|
69
68
|
|
|
70
69
|
const stars = ref(true);
|
|
71
70
|
|
|
72
|
-
const style = computed(():
|
|
71
|
+
const style = computed((): StyleValue => {
|
|
73
72
|
if (!props.editable) {
|
|
74
73
|
return {
|
|
75
74
|
"--fs-password-field-cursor" : "default",
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
</template>
|
|
219
219
|
|
|
220
220
|
<script lang="ts">
|
|
221
|
-
import { computed, defineComponent, onMounted, type PropType, ref, watch } from "vue";
|
|
221
|
+
import { computed, defineComponent, onMounted, type PropType, ref, type StyleValue, watch } from "vue";
|
|
222
222
|
|
|
223
223
|
import { $createParagraphNode, $getSelection, $isElementNode, $isRangeSelection, $isNodeSelection, $setSelection, CAN_UNDO_COMMAND, createEditor, type ElementNode, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, ParagraphNode, UNDO_COMMAND } from "lexical";
|
|
224
224
|
import { $createHeadingNode, HeadingNode, type HeadingTagType, registerRichText } from "@lexical/rich-text";
|
|
@@ -374,7 +374,7 @@ export default defineComponent({
|
|
|
374
374
|
return ["readonly"].includes(props.variant);
|
|
375
375
|
});
|
|
376
376
|
|
|
377
|
-
const style = computed(():
|
|
377
|
+
const style = computed((): StyleValue => {
|
|
378
378
|
let minHeight: string | undefined = "auto";
|
|
379
379
|
if (!readonly.value) {
|
|
380
380
|
const base = isMobileSized.value ? 30 : 42;
|
|
@@ -386,7 +386,6 @@ export default defineComponent({
|
|
|
386
386
|
minHeight = `${base}px`;
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
|
|
390
389
|
switch (props.variant) {
|
|
391
390
|
case "standard": {
|
|
392
391
|
if (!props.editable) {
|
|
@@ -410,7 +409,7 @@ export default defineComponent({
|
|
|
410
409
|
"--fs-rich-text-field-link-color": linkColors.value.dark,
|
|
411
410
|
"--fs-rich-text-field-min-height": minHeight,
|
|
412
411
|
"--fs-rich-text-field-variable-backgroundcolor": getColors(ColorEnum.Primary).light,
|
|
413
|
-
"--fs-rich-text-field-variable-color": getColors(ColorEnum.Primary).lightContrast
|
|
412
|
+
"--fs-rich-text-field-variable-color": getColors(ColorEnum.Primary).lightContrast!
|
|
414
413
|
};
|
|
415
414
|
}
|
|
416
415
|
}
|
|
@@ -57,8 +57,7 @@ import type { PropType} from "vue";
|
|
|
57
57
|
import { computed, defineComponent, ref, watch } from "vue";
|
|
58
58
|
|
|
59
59
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
60
|
-
import type
|
|
61
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
60
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
62
61
|
|
|
63
62
|
import { useSlots } from "../../composables";
|
|
64
63
|
|
|
@@ -241,8 +241,7 @@
|
|
|
241
241
|
</template>
|
|
242
242
|
|
|
243
243
|
<script lang="ts">
|
|
244
|
-
import type
|
|
245
|
-
import { computed, defineComponent, ref } from "vue";
|
|
244
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue } from "vue";
|
|
246
245
|
|
|
247
246
|
import { useBreakpoints, useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
|
|
248
247
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -351,7 +350,7 @@ export default defineComponent({
|
|
|
351
350
|
|
|
352
351
|
const dialog = ref(false);
|
|
353
352
|
|
|
354
|
-
const style = computed(():
|
|
353
|
+
const style = computed((): StyleValue => {
|
|
355
354
|
if (!props.editable) {
|
|
356
355
|
return {
|
|
357
356
|
"--fs-select-field-cursor" : "default",
|
|
@@ -49,12 +49,10 @@
|
|
|
49
49
|
</template>
|
|
50
50
|
|
|
51
51
|
<script lang="ts">
|
|
52
|
-
import type
|
|
53
|
-
import { computed, defineComponent, ref } from "vue";
|
|
52
|
+
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
54
53
|
|
|
55
54
|
import { useColors, useRules, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
56
|
-
import type
|
|
57
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
55
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
58
56
|
|
|
59
57
|
import FSTextField from "./FSTextField.vue";
|
|
60
58
|
import FSTagGroup from "../FSTagGroup.vue";
|
|
@@ -130,7 +128,7 @@ export default defineComponent({
|
|
|
130
128
|
|
|
131
129
|
const innerValue = ref("");
|
|
132
130
|
|
|
133
|
-
const style = computed(():
|
|
131
|
+
const style = computed((): StyleValue => {
|
|
134
132
|
if (!props.editable) {
|
|
135
133
|
return {
|
|
136
134
|
"--fs-tag-field-color": lights.dark
|
|
@@ -163,7 +163,7 @@ export default defineComponent({
|
|
|
163
163
|
},
|
|
164
164
|
emits: ["update:startDate", "update:endDate"],
|
|
165
165
|
setup(props, { emit }) {
|
|
166
|
-
const { parseForPicker,formatFromPicker,
|
|
166
|
+
const { parseForPicker, formatFromPicker, todayToPicker, yesterdayToPicker } = useAppTimeZone();
|
|
167
167
|
const { getMessages } = useRules();
|
|
168
168
|
|
|
169
169
|
const innerDateSetting = ref<DateSetting>(DateSetting.PastDays);
|
|
@@ -336,8 +336,8 @@ export default defineComponent({
|
|
|
336
336
|
}
|
|
337
337
|
break;
|
|
338
338
|
case DateSetting.Pick:
|
|
339
|
-
innerEndDate.value =
|
|
340
|
-
innerStartDate.value =
|
|
339
|
+
innerEndDate.value = todayToPicker();
|
|
340
|
+
innerStartDate.value = yesterdayToPicker();
|
|
341
341
|
break;
|
|
342
342
|
}
|
|
343
343
|
emit("update:startDate", innerStartDate.value);
|
|
@@ -409,14 +409,15 @@ export default defineComponent({
|
|
|
409
409
|
|
|
410
410
|
const onPickDates = (value: number[] | null) => {
|
|
411
411
|
if (!value) {
|
|
412
|
-
innerEndDate.value =
|
|
413
|
-
innerStartDate.value =
|
|
412
|
+
innerEndDate.value = todayToPicker();
|
|
413
|
+
innerStartDate.value = yesterdayToPicker();
|
|
414
414
|
if (valid.value) {
|
|
415
415
|
emit("update:startDate", innerStartDate.value);
|
|
416
416
|
emit("update:endDate", innerEndDate.value);
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
419
|
else {
|
|
420
|
+
console.log(value[0], value[1]);
|
|
420
421
|
if (value && value[0] != null && formatFromPicker(value[0]) !== innerStartDate.value) {
|
|
421
422
|
innerStartDate.value = formatFromPicker(value[0]);
|
|
422
423
|
if (valid.value) {
|
|
@@ -54,8 +54,7 @@
|
|
|
54
54
|
</template>
|
|
55
55
|
|
|
56
56
|
<script lang="ts">
|
|
57
|
-
import type
|
|
58
|
-
import { computed, defineComponent } from "vue";
|
|
57
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
59
58
|
|
|
60
59
|
import { useColors, useBreakpoints, useRules } from "@dative-gpi/foundation-shared-components/composables";
|
|
61
60
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -136,7 +135,7 @@ export default defineComponent({
|
|
|
136
135
|
const lights = getColors(ColorEnum.Light);
|
|
137
136
|
const darks = getColors(ColorEnum.Dark);
|
|
138
137
|
|
|
139
|
-
const style = computed(():
|
|
138
|
+
const style = computed((): StyleValue => {
|
|
140
139
|
let height: string | undefined = undefined;
|
|
141
140
|
let fieldHeight: string | undefined = undefined;
|
|
142
141
|
if (!props.autoGrow) {
|
|
@@ -65,8 +65,7 @@
|
|
|
65
65
|
</template>
|
|
66
66
|
|
|
67
67
|
<script lang="ts">
|
|
68
|
-
import type
|
|
69
|
-
import { computed, defineComponent } from "vue";
|
|
68
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
70
69
|
|
|
71
70
|
import { useColors, useRules, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
72
71
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -145,7 +144,7 @@ export default defineComponent({
|
|
|
145
144
|
const lights = getColors(ColorEnum.Light);
|
|
146
145
|
const darks = getColors(ColorEnum.Dark);
|
|
147
146
|
|
|
148
|
-
const style = computed(():
|
|
147
|
+
const style = computed((): StyleValue => {
|
|
149
148
|
if (!props.editable) {
|
|
150
149
|
return {
|
|
151
150
|
"--fs-text-field-cursor" : "default",
|
|
@@ -130,7 +130,7 @@ export default defineComponent({
|
|
|
130
130
|
const innerTime = ref(0);
|
|
131
131
|
const selectedUnit = ref(timeScale[0]);
|
|
132
132
|
|
|
133
|
-
const style = computed(():
|
|
133
|
+
const style = computed((): StyleValue => {
|
|
134
134
|
if (!props.editable) {
|
|
135
135
|
return {
|
|
136
136
|
"--fs-time-field-cursor" : "default",
|
|
@@ -61,8 +61,7 @@
|
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
63
|
<script lang="ts">
|
|
64
|
-
import type
|
|
65
|
-
import { computed, defineComponent } from "vue";
|
|
64
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
66
65
|
|
|
67
66
|
import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
|
|
68
67
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -142,7 +141,7 @@ export default defineComponent({
|
|
|
142
141
|
return acc;
|
|
143
142
|
}, [] as { id: number, label: string }[]);
|
|
144
143
|
|
|
145
|
-
const style = computed(():
|
|
144
|
+
const style = computed((): StyleValue => {
|
|
146
145
|
if (!props.editable) {
|
|
147
146
|
return {
|
|
148
147
|
"--fs-time-slot-field-cursor" : "default",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
</template>
|
|
84
84
|
|
|
85
85
|
<script lang="ts">
|
|
86
|
-
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
86
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue } from "vue";
|
|
87
87
|
|
|
88
88
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
89
89
|
import { useAppLanguages } from "@dative-gpi/foundation-shared-services/composables";
|
|
@@ -169,7 +169,7 @@ export default defineComponent({
|
|
|
169
169
|
const lights = getColors(ColorEnum.Light);
|
|
170
170
|
const darks = getColors(ColorEnum.Dark);
|
|
171
171
|
|
|
172
|
-
const style = computed(():
|
|
172
|
+
const style = computed((): StyleValue => {
|
|
173
173
|
if (!props.editable) {
|
|
174
174
|
return {
|
|
175
175
|
"--fs-translate-field-color": lights.dark
|
|
@@ -240,14 +240,12 @@
|
|
|
240
240
|
</template>
|
|
241
241
|
|
|
242
242
|
<script lang="ts">
|
|
243
|
-
import type
|
|
244
|
-
import {
|
|
243
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue } from "vue";
|
|
244
|
+
import { VTreeview } from "vuetify/labs/VTreeview";
|
|
245
245
|
|
|
246
246
|
import { useBreakpoints, useColors, useRules, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
247
247
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
248
248
|
|
|
249
|
-
import { VTreeview } from "vuetify/labs/VTreeview";
|
|
250
|
-
|
|
251
249
|
import FSDialogMenu from "../FSDialogMenu.vue";
|
|
252
250
|
import FSTextField from "./FSTextField.vue";
|
|
253
251
|
import FSCheckbox from "../FSCheckbox.vue";
|
|
@@ -367,7 +365,7 @@ export default defineComponent({
|
|
|
367
365
|
const dialog = ref(false);
|
|
368
366
|
const menu = ref(false);
|
|
369
367
|
|
|
370
|
-
const style = computed(():
|
|
368
|
+
const style = computed((): StyleValue => {
|
|
371
369
|
if (!props.editable) {
|
|
372
370
|
return {
|
|
373
371
|
"--fs-tree-view-field-cursor": "default"
|
|
@@ -431,7 +429,7 @@ export default defineComponent({
|
|
|
431
429
|
return item[props.itemParent] == parentId;
|
|
432
430
|
});
|
|
433
431
|
});
|
|
434
|
-
const process = ((item: any) => {
|
|
432
|
+
const process = ((item: any): any => {
|
|
435
433
|
if (props.items.some((child: any) => child[props.itemParent] === item[props.itemValue])) {
|
|
436
434
|
return {
|
|
437
435
|
...item,
|
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
<FSRow
|
|
40
40
|
align="center-left"
|
|
41
41
|
>
|
|
42
|
-
<FSText
|
|
42
|
+
<FSText
|
|
43
|
+
v-if="header.value"
|
|
44
|
+
>
|
|
43
45
|
{{ $props.item[header.value] }}
|
|
44
46
|
</FSText>
|
|
45
47
|
</FSRow>
|
|
@@ -67,11 +69,9 @@
|
|
|
67
69
|
</template>
|
|
68
70
|
|
|
69
71
|
<script lang="ts">
|
|
70
|
-
import type
|
|
71
|
-
import { computed, defineComponent } from "vue";
|
|
72
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
72
73
|
|
|
73
|
-
import type
|
|
74
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
74
|
+
import { ColorEnum, type FSDataTableColumn } from "@dative-gpi/foundation-shared-components/models";
|
|
75
75
|
|
|
76
76
|
import FSCheckbox from "../FSCheckbox.vue";
|
|
77
77
|
import FSCard from "../FSCard.vue";
|
|
@@ -135,11 +135,9 @@ export default defineComponent({
|
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
137
|
|
|
138
|
-
const style = computed(():
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
});
|
|
138
|
+
const style = computed((): StyleValue => ({
|
|
139
|
+
"--fs-data-iterator-item-cursor": props.clickable ? "pointer" : "default"
|
|
140
|
+
}));
|
|
143
141
|
|
|
144
142
|
return {
|
|
145
143
|
variant,
|
|
@@ -689,12 +689,10 @@
|
|
|
689
689
|
</template>
|
|
690
690
|
|
|
691
691
|
<script lang="ts">
|
|
692
|
-
import type
|
|
693
|
-
import { computed, defineComponent, nextTick, onMounted, onUnmounted, ref, watch } from "vue";
|
|
692
|
+
import { computed, defineComponent, nextTick, onMounted, onUnmounted, type PropType, type Ref, ref, type Slot, type StyleValue, watch } from "vue";
|
|
694
693
|
import { useRouter } from "vue-router";
|
|
695
694
|
|
|
696
|
-
import type
|
|
697
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
695
|
+
import { ColorEnum, type FSDataTableColumn, type FSDataTableFilter, type FSDataTableOrder, type FSToggle } from "@dative-gpi/foundation-shared-components/models";
|
|
698
696
|
import { useBreakpoints, useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
699
697
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
700
698
|
import { uuidv4 } from "@dative-gpi/bones-ui/tools/uuid"
|
|
@@ -963,13 +961,11 @@ export default defineComponent({
|
|
|
963
961
|
return slots;
|
|
964
962
|
});
|
|
965
963
|
|
|
966
|
-
const style = computed(():
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
};
|
|
972
|
-
});
|
|
964
|
+
const style = computed((): StyleValue => ({
|
|
965
|
+
"--fs-data-table-background-color": backgrounds.base,
|
|
966
|
+
"--fs-data-table-border-color": lights.base,
|
|
967
|
+
"--fs-data-table-row-gap": sizeToVar(props.rowGap)
|
|
968
|
+
}));
|
|
973
969
|
|
|
974
970
|
const classes = computed((): string[] => {
|
|
975
971
|
const classNames = ["fs-data-table"];
|
|
@@ -87,8 +87,7 @@
|
|
|
87
87
|
</template>
|
|
88
88
|
|
|
89
89
|
<script lang="ts">
|
|
90
|
-
import type
|
|
91
|
-
import { computed, defineComponent, ref } from "vue";
|
|
90
|
+
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
92
91
|
|
|
93
92
|
import type { ColorBase, FSDataTableColumn, FSDataTableFilter } from "@dative-gpi/foundation-shared-components/models";
|
|
94
93
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|