@dative-gpi/foundation-shared-components 0.0.7 → 0.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/{models/FSButtons.ts → aliases/FSButton.ts} +24 -21
- package/aliases/index.ts +1 -0
- package/components/FSAutocompleteField.vue +207 -0
- package/components/FSBadge.vue +38 -0
- package/components/FSBreadcrumbs.vue +49 -55
- package/components/FSButton.vue +116 -101
- package/components/FSCalendar.vue +184 -0
- package/components/FSCalendarTwin.vue +412 -0
- package/components/FSCard.vue +77 -0
- package/components/FSCarousel.vue +63 -0
- package/components/FSCheckbox.vue +111 -104
- package/components/FSChip.vue +140 -0
- package/components/FSClock.vue +172 -0
- package/components/FSCol.vue +104 -98
- package/components/FSColor.vue +61 -64
- package/components/FSColorIcon.vue +67 -0
- package/components/FSContainer.vue +64 -0
- package/components/FSDateField.vue +211 -0
- package/components/FSDateRangeField.vue +225 -0
- package/components/FSDateTimeField.vue +257 -0
- package/components/FSDateTimeRangeField.vue +286 -0
- package/components/FSDialog.vue +103 -0
- package/components/FSDivider.vue +39 -0
- package/components/FSFadeOut.vue +49 -59
- package/components/FSFileButton.vue +245 -0
- package/components/FSHeaderButton.vue +17 -0
- package/components/FSIcon.vue +23 -23
- package/components/FSIconField.vue +232 -0
- package/components/FSImage.vue +142 -0
- package/components/FSLoadTile.vue +93 -0
- package/components/FSNumberField.vue +51 -53
- package/components/FSPasswordField.vue +99 -99
- package/components/FSRadio.vue +107 -110
- package/components/FSRadioGroup.vue +55 -57
- package/components/FSRemoveDialog.vue +123 -0
- package/components/FSRichTextField.vue +551 -0
- package/components/FSRow.vue +110 -104
- package/components/FSSearchField.vue +114 -105
- package/components/FSSelectField.vue +188 -0
- package/components/FSSlideGroup.vue +45 -49
- package/components/FSSlider.vue +130 -0
- package/components/FSSpan.vue +53 -37
- package/components/FSSubmitDialog.vue +165 -0
- package/components/FSSwitch.vue +110 -109
- package/components/FSTab.vue +61 -61
- package/components/FSTabs.vue +53 -55
- package/components/FSTag.vue +88 -84
- package/components/FSTagField.vue +183 -128
- package/components/FSTagGroup.vue +38 -45
- package/components/FSText.vue +74 -64
- package/components/FSTextArea.vue +209 -0
- package/components/FSTextField.vue +152 -149
- package/components/FSTile.vue +90 -0
- package/components/FSToggleSet.vue +282 -0
- package/components/FSTooltip.vue +21 -0
- package/components/FSWindow.vue +26 -16
- package/components/FSWrapGroup.vue +44 -47
- package/components/deviceOrganisations/FSConnectivity.vue +114 -0
- package/components/deviceOrganisations/FSStatus.vue +117 -0
- package/components/deviceOrganisations/FSStatusesCarousel.vue +105 -0
- package/components/deviceOrganisations/FSStatusesRow.vue +66 -0
- package/components/deviceOrganisations/FSWorstAlert.vue +165 -0
- package/components/lists/FSDataIteratorGroup.vue +7 -0
- package/components/lists/FSDataIteratorItem.vue +103 -0
- package/components/lists/FSDataTable.vue +964 -0
- package/components/lists/FSFilterButton.vue +176 -0
- package/components/lists/FSHeaderButton.vue +99 -0
- package/components/lists/FSHiddenButton.vue +79 -0
- package/components/tiles/FSDeviceOrganisationTileUI.vue +232 -0
- package/components/tiles/FSGroupTileUI.vue +192 -0
- package/composables/index.ts +2 -1
- package/composables/useBreakpoints.ts +33 -0
- package/composables/useColors.ts +53 -23
- package/composables/useSlots.ts +43 -0
- package/index.ts +6 -0
- package/models/breadcrumbs.ts +8 -0
- package/models/colors.ts +17 -0
- package/models/deviceAlerts.ts +10 -0
- package/models/deviceConnectivities.ts +11 -0
- package/models/deviceStatuses.ts +16 -0
- package/models/dispositions.ts +33 -0
- package/models/index.ts +9 -0
- package/models/modelStatuses.ts +11 -0
- package/models/rules.ts +50 -0
- package/models/toggleSets.ts +7 -0
- package/package.json +13 -4
- package/plugins/colorPlugin.ts +2 -2
- package/shims-plugin.d.ts +1 -1
- package/styles/components/fs_autocomplete_field.scss +123 -0
- package/styles/components/fs_button.scss +4 -14
- package/styles/components/fs_calendar.scss +138 -0
- package/styles/components/fs_card.scss +4 -0
- package/styles/components/fs_carousel.scss +4 -0
- package/styles/components/fs_chip.scss +33 -0
- package/styles/components/fs_clock.scss +43 -0
- package/styles/components/fs_col.scss +2 -0
- package/styles/components/fs_color_icon.scss +37 -0
- package/styles/components/fs_container.scss +16 -0
- package/styles/components/fs_data_iterator_item.scss +19 -0
- package/styles/components/fs_data_table.scss +97 -0
- package/styles/components/fs_date_field.scss +8 -0
- package/styles/components/fs_dialog.scss +30 -0
- package/styles/components/fs_divider.scss +5 -0
- package/styles/components/fs_fade_out.scss +10 -2
- package/styles/components/fs_filter_button.scss +12 -0
- package/styles/components/fs_header_button.scss +4 -0
- package/styles/components/fs_icon.scss +14 -4
- package/styles/components/fs_icon_field.scss +12 -0
- package/styles/components/fs_image.scss +7 -0
- package/styles/components/fs_load_tile.scss +49 -0
- package/styles/components/fs_password_field.scss +2 -2
- package/styles/components/fs_rich_text_field.scss +67 -0
- package/styles/components/fs_row.scss +4 -1
- package/styles/components/fs_select_field.scss +71 -0
- package/styles/components/fs_slide_group.scss +6 -0
- package/styles/components/fs_slider.scss +40 -0
- package/styles/components/fs_span.scss +8 -0
- package/styles/components/fs_submit_dialog.scss +9 -0
- package/styles/components/fs_tabs.scss +4 -0
- package/styles/components/fs_tag_field.scss +6 -8
- package/styles/components/fs_text_area.scss +105 -0
- package/styles/components/fs_text_field.scss +23 -15
- package/styles/components/fs_tile.scss +33 -0
- package/styles/components/fs_tooltip.scss +5 -0
- package/styles/components/fs_wrap_group.scss +7 -8
- package/styles/components/index.scss +26 -0
- package/styles/globals/breakpoints.scss +7 -0
- package/styles/globals/overrides.scss +20 -7
- package/styles/globals/text_fonts.scss +8 -8
- package/themes/default.ts +1 -11
- package/utils/css.ts +11 -0
- package/utils/icons.ts +75416 -0
- package/utils/index.ts +5 -0
- package/utils/levenshtein.ts +97 -0
- package/utils/lexical.ts +27 -0
- package/utils/sort.ts +9 -0
- package/composables/useTouch.ts +0 -9
- package/models/FSTags.ts +0 -8
- package/models/FSTextFields.ts +0 -17
|
@@ -1,73 +1,71 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
<FSCol width="hug">
|
|
3
|
+
<FSRadio
|
|
4
|
+
v-for="item in $props.values"
|
|
5
|
+
:key="item.value"
|
|
6
|
+
:label="item.label"
|
|
7
|
+
:description="item.description"
|
|
8
|
+
:selected="isSelected(item.value)"
|
|
9
|
+
:color="$props.color"
|
|
10
|
+
:editable="$props.editable"
|
|
11
|
+
:modelValue="item.value"
|
|
12
|
+
@update:modelValue="onToggle"
|
|
13
|
+
/>
|
|
14
|
+
</FSCol>
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script lang="ts">
|
|
18
|
-
import { defineComponent, PropType
|
|
18
|
+
import { defineComponent, PropType } from "vue";
|
|
19
19
|
|
|
20
|
-
import { ColorBase } from "@dative-gpi/foundation-shared-components/
|
|
20
|
+
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
21
21
|
|
|
22
22
|
import FSRadio from "./FSRadio.vue";
|
|
23
23
|
import FSCol from "./FSCol.vue";
|
|
24
24
|
|
|
25
25
|
export default defineComponent({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
name: "FSRadioGroup",
|
|
27
|
+
components: {
|
|
28
|
+
FSRadio,
|
|
29
|
+
FSCol
|
|
30
|
+
},
|
|
31
|
+
props: {
|
|
32
|
+
values: {
|
|
33
|
+
type: Array as PropType<{ value: String | Boolean | Number, label?: String, description?: string }[]>,
|
|
34
|
+
required: true,
|
|
35
|
+
default: false
|
|
30
36
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
default: false
|
|
36
|
-
},
|
|
37
|
-
value: {
|
|
38
|
-
type: [String, Boolean, Number],
|
|
39
|
-
required: false,
|
|
40
|
-
default: 0
|
|
41
|
-
},
|
|
42
|
-
color: {
|
|
43
|
-
type: String as PropType<ColorBase>,
|
|
44
|
-
required: false,
|
|
45
|
-
default: ColorBase.Primary
|
|
46
|
-
},
|
|
47
|
-
editable: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
required: false,
|
|
50
|
-
default: true
|
|
51
|
-
}
|
|
37
|
+
modelValue: {
|
|
38
|
+
type: [String, Boolean, Number],
|
|
39
|
+
required: false,
|
|
40
|
+
default: 0
|
|
52
41
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
42
|
+
color: {
|
|
43
|
+
type: String as PropType<ColorBase>,
|
|
44
|
+
required: false,
|
|
45
|
+
default: ColorEnum.Primary
|
|
46
|
+
},
|
|
47
|
+
editable: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
required: false,
|
|
50
|
+
default: true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
emits: ["update:modelValue"],
|
|
54
|
+
setup(props, { emit }) {
|
|
55
|
+
const isSelected = (item: String | Boolean | Number): boolean => {
|
|
56
|
+
return item == props.modelValue;
|
|
57
|
+
};
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
const onToggle = (item: String | Boolean | Number): void => {
|
|
60
|
+
if (item != props.modelValue) {
|
|
61
|
+
emit("update:modelValue", item);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
66
64
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
return {
|
|
66
|
+
isSelected,
|
|
67
|
+
onToggle
|
|
68
|
+
};
|
|
69
|
+
}
|
|
72
70
|
});
|
|
73
71
|
</script>
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSubmitDialog
|
|
3
|
+
:rightButtonLabel="$tr('ui.button.remove', 'Remove')"
|
|
4
|
+
:rightButtonColor="ColorEnum.Error"
|
|
5
|
+
:title="title"
|
|
6
|
+
:modelValue="$props.modelValue"
|
|
7
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
>
|
|
10
|
+
<template #body>
|
|
11
|
+
<FSCol
|
|
12
|
+
gap="16px"
|
|
13
|
+
>
|
|
14
|
+
<FSRow>
|
|
15
|
+
<FSIcon
|
|
16
|
+
:color="ColorEnum.Error"
|
|
17
|
+
>
|
|
18
|
+
mdi-alert-outline
|
|
19
|
+
</FSIcon>
|
|
20
|
+
<FSRow
|
|
21
|
+
gap="2px"
|
|
22
|
+
>
|
|
23
|
+
<FSSpan>
|
|
24
|
+
{{ $tr("ui.remove-dialog.body-regular", "This action is") }}
|
|
25
|
+
</FSSpan>
|
|
26
|
+
<FSSpan
|
|
27
|
+
font="text-button"
|
|
28
|
+
>
|
|
29
|
+
{{ $tr("ui.remove-dialog.body-bold", "definitive") }}
|
|
30
|
+
</FSSpan>
|
|
31
|
+
</FSRow>
|
|
32
|
+
</FSRow>
|
|
33
|
+
<FSSpan>
|
|
34
|
+
{{ $tr("ui.remove-dialog.final-warning", "Once removed, entities won't be retrievable") }}
|
|
35
|
+
</FSSpan>
|
|
36
|
+
</FSCol>
|
|
37
|
+
</template>
|
|
38
|
+
<template #footer v-if="$props.removing">
|
|
39
|
+
<FSRow
|
|
40
|
+
align="center-right"
|
|
41
|
+
:height="footerHeight"
|
|
42
|
+
>
|
|
43
|
+
<FSSpan>
|
|
44
|
+
{{ $props.removeCurrent }} / {{ $props.removeTotal }}
|
|
45
|
+
</FSSpan>
|
|
46
|
+
<v-progress-circular
|
|
47
|
+
:color="ColorEnum.Dark"
|
|
48
|
+
:indeterminate="true"
|
|
49
|
+
/>
|
|
50
|
+
</FSRow>
|
|
51
|
+
</template>
|
|
52
|
+
</FSSubmitDialog>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<script lang="ts">
|
|
56
|
+
import { computed, defineComponent } from "vue";
|
|
57
|
+
|
|
58
|
+
import { useTranslationsProvider } from "@dative-gpi/foundation-shared-services/composables";
|
|
59
|
+
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
60
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
61
|
+
|
|
62
|
+
import FSSubmitDialog from "./FSSubmitDialog.vue";
|
|
63
|
+
import FSIcon from "./FSIcon.vue";
|
|
64
|
+
import FSSpan from "./FSSpan.vue";
|
|
65
|
+
import FSCol from "./FSCol.vue";
|
|
66
|
+
import FSRow from "./FSRow.vue";
|
|
67
|
+
|
|
68
|
+
export default defineComponent({
|
|
69
|
+
name: "FSRemoveDialog",
|
|
70
|
+
components: {
|
|
71
|
+
FSSubmitDialog,
|
|
72
|
+
FSIcon,
|
|
73
|
+
FSSpan,
|
|
74
|
+
FSCol,
|
|
75
|
+
FSRow
|
|
76
|
+
},
|
|
77
|
+
props: {
|
|
78
|
+
modelValue: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
required: false,
|
|
81
|
+
default: false
|
|
82
|
+
},
|
|
83
|
+
removing: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
required: false,
|
|
86
|
+
default: false
|
|
87
|
+
},
|
|
88
|
+
removeTotal: {
|
|
89
|
+
type: Number,
|
|
90
|
+
required: true
|
|
91
|
+
},
|
|
92
|
+
removeCurrent: {
|
|
93
|
+
type: Number,
|
|
94
|
+
required: false,
|
|
95
|
+
default: 0
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
emits: ["update:modelValue"],
|
|
99
|
+
setup(props) {
|
|
100
|
+
const { isMobileSized } = useBreakpoints();
|
|
101
|
+
const { $tr } = useTranslationsProvider();
|
|
102
|
+
|
|
103
|
+
const title = computed((): string => {
|
|
104
|
+
if (props.removeTotal > 1) {
|
|
105
|
+
return $tr("ui.remove-dialog.remove-plural", "Remove {0} entities", props.removeTotal.toString());
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
return $tr("ui.remove-dialog.remove-singular", "Remove an entity");
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const footerHeight = computed((): string => {
|
|
113
|
+
return isMobileSized.value ? "36px" : "40px";
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
ColorEnum,
|
|
118
|
+
footerHeight,
|
|
119
|
+
title
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
})
|
|
123
|
+
</script>
|