@dative-gpi/foundation-shared-components 0.1.120 → 1.0.1
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/imagery.png +0 -0
- package/assets/images/map/map.png +0 -0
- package/components/FSAccordion.vue +2 -1
- package/components/FSAccordionPanel.vue +20 -1
- package/components/FSBadge.vue +7 -3
- package/components/FSBreadcrumbs.vue +4 -2
- package/components/FSButton.vue +15 -8
- package/components/FSCalendar.vue +5 -2
- package/components/FSCalendarTwin.vue +6 -3
- package/components/FSCard.vue +4 -2
- package/components/FSCardPlaceholder.vue +80 -0
- package/components/FSCheckbox.vue +10 -7
- package/components/FSChip.vue +4 -2
- package/components/FSClickable.vue +5 -3
- package/components/FSClock.vue +18 -4
- package/components/FSCol.vue +12 -5
- package/components/FSColor.vue +4 -2
- package/components/FSColorIcon.vue +5 -3
- package/components/FSDialog.vue +28 -87
- package/components/FSDialogContent.vue +133 -0
- package/components/FSDialogForm.vue +25 -236
- package/components/FSDialogFormBody.vue +273 -0
- package/components/FSDialogMenu.vue +5 -2
- package/components/FSDialogMultiForm.vue +21 -197
- package/components/FSDialogMultiFormBody.vue +231 -0
- package/components/FSDialogSubmit.vue +4 -2
- package/components/FSDivider.vue +6 -4
- package/components/FSEditImage.vue +16 -9
- package/components/FSErrorToast.vue +2 -1
- package/components/FSFadeOut.vue +1 -1
- package/components/FSForm.vue +7 -7
- package/components/FSGrid.vue +4 -2
- package/components/FSGridMosaic.vue +3 -2
- package/components/FSIcon.vue +3 -2
- package/components/FSIconCard.vue +10 -3
- package/components/FSIconCheck.vue +2 -1
- package/components/FSIconFlag.vue +2 -1
- package/components/FSImage.vue +2 -1
- package/components/FSImageCard.vue +72 -0
- package/components/FSLabel.vue +4 -2
- package/components/FSLink.vue +5 -3
- package/components/FSLoader.vue +2 -1
- package/components/FSOptionGroup.vue +28 -20
- package/components/FSOptionItem.vue +8 -18
- package/components/FSPagination.vue +4 -2
- package/components/FSRadio.vue +23 -11
- package/components/FSRadioGroup.vue +23 -10
- package/components/FSRow.vue +8 -1
- package/components/FSSlideGroup.vue +27 -6
- package/components/FSSlider.vue +4 -2
- package/components/FSSpan.vue +2 -1
- package/components/FSSwitch.vue +13 -10
- package/components/FSTab.vue +4 -2
- package/components/FSTabs.vue +5 -14
- package/components/FSTag.vue +11 -4
- package/components/FSTagGroup.vue +4 -2
- package/components/FSText.vue +4 -2
- package/components/FSToggleSet.vue +30 -17
- package/components/FSTooltip.vue +15 -4
- package/components/FSWindow.vue +2 -2
- package/components/FSWrapGroup.vue +2 -1
- package/components/autocompletes/FSAutoCompleteAddress.vue +104 -0
- package/components/autocompletes/FSAutocompleteLanguage.vue +18 -26
- package/components/autocompletes/FSAutocompleteTag.vue +138 -0
- package/components/autocompletes/FSAutocompleteTimeZone.vue +19 -30
- package/components/buttons/FSButtonAdd.vue +28 -0
- package/components/buttons/FSButtonAddIcon.vue +28 -0
- package/components/buttons/FSButtonAddLabel.vue +27 -0
- package/components/buttons/FSButtonAddMini.vue +27 -0
- package/components/buttons/FSButtonFile.vue +4 -4
- package/components/buttons/FSButtonFileIcon.vue +4 -4
- package/components/buttons/FSButtonFileLabel.vue +4 -4
- package/components/buttons/FSButtonFileMini.vue +4 -4
- package/components/deviceOrganisations/FSConnectivity.vue +3 -2
- package/components/deviceOrganisations/FSConnectivityCard.vue +3 -2
- package/components/deviceOrganisations/FSStatus.vue +3 -2
- package/components/deviceOrganisations/FSStatusCard.vue +3 -2
- package/components/deviceOrganisations/FSStatusesCarousel.vue +3 -2
- package/components/deviceOrganisations/FSStatusesRow.vue +3 -2
- package/components/deviceOrganisations/FSWorstAlert.vue +5 -4
- package/components/deviceOrganisations/FSWorstAlertCard.vue +4 -2
- package/components/fields/FSAutocompleteField.vue +219 -97
- package/components/fields/FSBaseField.vue +2 -1
- package/components/fields/FSColorField.vue +65 -94
- package/components/fields/FSDateField.vue +12 -25
- package/components/fields/FSDateRangeField.vue +15 -27
- package/components/fields/FSDateTimeField.vue +22 -32
- package/components/fields/FSDateTimeRangeField.vue +43 -51
- package/components/fields/FSGradientField.vue +143 -0
- package/components/fields/FSIconField.vue +9 -6
- package/components/fields/FSMagicConfigField.vue +154 -0
- package/components/fields/FSMagicField.vue +185 -0
- package/components/fields/FSNumberField.vue +3 -1
- package/components/fields/FSPasswordField.vue +10 -10
- package/components/fields/FSRichTextField.vue +136 -50
- package/components/fields/FSSearchField.vue +41 -62
- package/components/fields/FSSelectField.vue +148 -53
- package/components/fields/FSTagField.vue +19 -16
- package/components/fields/FSTermField.vue +192 -186
- package/components/fields/FSTextArea.vue +4 -4
- package/components/fields/FSTextField.vue +29 -6
- package/components/fields/FSTimeField.vue +55 -20
- package/components/fields/FSTimeSlotField.vue +6 -5
- package/components/fields/FSTranslateField.vue +234 -0
- package/components/fields/FSTranslateRichTextField.vue +185 -0
- package/components/fields/FSTreeViewField.vue +520 -0
- package/components/lists/FSDataIteratorItem.vue +18 -3
- package/components/lists/FSDataTableUI.vue +138 -51
- package/components/lists/FSFilterButton.vue +4 -2
- package/components/lists/FSHiddenButton.vue +4 -2
- package/components/map/FSMap.vue +598 -0
- package/components/map/FSMapEditPointAddressOverlay.vue +164 -0
- package/components/map/FSMapLayerButton.vue +77 -0
- package/components/map/FSMapOverlay.vue +150 -0
- package/components/selects/FSSelectAutoRefresh.vue +62 -0
- package/components/selects/FSSelectDashboardVariableType.vue +47 -0
- package/components/selects/FSSelectDateSetting.vue +39 -37
- package/components/selects/FSSelectDays.vue +62 -0
- package/components/tiles/FSDashboardOrganisationTileUI.vue +8 -8
- package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +8 -8
- package/components/tiles/FSDashboardShallowTileUI.vue +8 -8
- package/components/tiles/FSDeviceOrganisationTileUI.vue +20 -15
- package/components/tiles/FSFolderTileUI.vue +7 -7
- package/components/tiles/FSGroupTileUI.vue +34 -27
- package/components/tiles/FSServiceAccountOrganisationTileUI.vue +142 -0
- package/components/tiles/{FSSimpleIconTileUI.vue → FSSimpleTileUI.vue} +48 -25
- package/components/tiles/FSTile.vue +51 -13
- package/components/tiles/FSUserOrganisationTileUI.vue +25 -34
- package/components/toggleSets/FSToggleSetPosition.vue +61 -0
- package/composables/index.ts +5 -1
- package/composables/useAddress.ts +158 -0
- package/composables/useAutocomplete.ts +4 -3
- package/composables/useColors.ts +8 -25
- package/composables/useDebounce.ts +2 -1
- package/composables/useMagicFieldProvider.ts +22 -0
- package/composables/useRules.ts +4 -12
- package/composables/useSlots.ts +65 -27
- package/composables/useTables.ts +29 -0
- package/composables/useTreeView.ts +48 -0
- package/elements/FSFormElement.ts +2 -1
- package/icons/flags/France.vue +21 -5
- package/icons/flags/Germany.vue +16 -4
- package/icons/flags/GreatBritain.vue +25 -6
- package/icons/flags/Italy.vue +21 -5
- package/icons/flags/Portugal.vue +225 -51
- package/icons/flags/Spain.vue +2781 -543
- package/icons/flags/UnitedStates.vue +31 -7
- package/icons/widgetTemplates/DevicesWidget.vue +189 -189
- package/icons/widgetTemplates/ProfileWidget.vue +9 -9
- package/icons/widgetTemplates/TextWidget.vue +6 -6
- package/models/breadcrumbs.ts +1 -1
- package/models/deviceAlerts.ts +1 -1
- package/models/deviceConnectivities.ts +1 -1
- package/models/index.ts +2 -0
- package/models/magicFields.ts +9 -0
- package/models/map.ts +18 -0
- package/models/richTextVariable.ts +5 -0
- package/models/rules.ts +11 -2
- package/models/tables.ts +30 -21
- package/models/variableNode.ts +104 -0
- package/package.json +21 -18
- package/plugins/colorPlugin.ts +2 -2
- package/plugins/index.ts +2 -1
- package/plugins/mapsPlugin.ts +37 -0
- package/shims-plugin.d.ts +2 -2
- package/shims-window.d.ts +3 -0
- package/styles/components/fs_button.scss +5 -0
- package/styles/components/fs_card.scss +0 -1
- package/styles/components/fs_col.scss +1 -0
- package/styles/components/fs_color_field.scss +12 -2
- package/styles/components/fs_data_iterator_item.scss +19 -6
- package/styles/components/fs_dialog.scss +12 -22
- package/styles/components/fs_gradient_field.scss +16 -0
- package/styles/components/fs_image_card.scss +18 -0
- package/styles/components/fs_magic_config_field.scss +13 -0
- package/styles/components/fs_map.scss +129 -0
- package/styles/components/fs_map_overlay.scss +38 -0
- package/styles/components/fs_meta_field.scss +6 -0
- package/styles/components/fs_option_group.scss +1 -0
- package/styles/components/fs_radio.scss +1 -1
- package/styles/components/fs_rich_text_field.scss +17 -5
- package/styles/components/fs_row.scss +1 -1
- package/styles/components/fs_select_field.scss +9 -14
- package/styles/components/fs_text.scss +1 -1
- package/styles/components/fs_time_field.scss +0 -4
- package/styles/components/fs_translate_field.scss +3 -0
- package/styles/components/fs_tree_view_field.scss +53 -0
- package/styles/components/index.scss +8 -1
- package/styles/globals/overrides.scss +54 -8
- package/styles/globals/scrollbars.scss +2 -2
- package/themes/default.ts +1 -1
- package/utils/gradient.ts +1601 -0
- package/utils/index.ts +3 -1
- package/utils/leafletMarkers.ts +23 -0
- package/utils/lexical.ts +3 -1
- package/components/selects/FSSelectTimeZone.vue +0 -67
- package/styles/components/fs_date_field.scss +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSSimpleTileUI
|
|
3
3
|
:bottomColor="color"
|
|
4
4
|
:icon="$props.icon"
|
|
5
5
|
v-bind="$attrs"
|
|
@@ -7,14 +7,17 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script lang="ts">
|
|
10
|
-
import { computed, defineComponent, PropType } from "vue";
|
|
10
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
11
11
|
|
|
12
|
-
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
12
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
13
13
|
|
|
14
|
-
import
|
|
14
|
+
import FSSimpleTileUI from "./FSSimpleTileUI.vue";
|
|
15
15
|
|
|
16
16
|
export default defineComponent({
|
|
17
17
|
name: "FSDashboardOrganisationTileUI",
|
|
18
|
+
components: {
|
|
19
|
+
FSSimpleTileUI
|
|
20
|
+
},
|
|
18
21
|
props: {
|
|
19
22
|
bottomColor: {
|
|
20
23
|
type: [Array, String] as PropType<ColorBase | ColorBase[]>,
|
|
@@ -27,9 +30,6 @@ export default defineComponent({
|
|
|
27
30
|
default: "mdi-view-dashboard"
|
|
28
31
|
}
|
|
29
32
|
},
|
|
30
|
-
components: {
|
|
31
|
-
FSSimpleIconTileUI
|
|
32
|
-
},
|
|
33
33
|
setup(props){
|
|
34
34
|
const color = computed(() => {
|
|
35
35
|
if(Array.isArray(props.bottomColor) && !props.bottomColor.length) {
|
|
@@ -40,7 +40,7 @@ export default defineComponent({
|
|
|
40
40
|
|
|
41
41
|
return {
|
|
42
42
|
color
|
|
43
|
-
}
|
|
43
|
+
};
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSSimpleTileUI
|
|
3
3
|
:bottomColor="color"
|
|
4
4
|
:icon="$props.icon"
|
|
5
5
|
v-bind="$attrs"
|
|
@@ -7,14 +7,17 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script lang="ts">
|
|
10
|
-
import { computed, defineComponent, PropType } from "vue";
|
|
10
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
11
11
|
|
|
12
|
-
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
12
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
13
13
|
|
|
14
|
-
import
|
|
14
|
+
import FSSimpleTileUI from "./FSSimpleTileUI.vue";
|
|
15
15
|
|
|
16
16
|
export default defineComponent({
|
|
17
17
|
name: "FSDashboardOrganisationTypeTileUI",
|
|
18
|
+
components: {
|
|
19
|
+
FSSimpleTileUI
|
|
20
|
+
},
|
|
18
21
|
props: {
|
|
19
22
|
bottomColor: {
|
|
20
23
|
type: [Array, String] as PropType<ColorBase | ColorBase[]>,
|
|
@@ -27,9 +30,6 @@ export default defineComponent({
|
|
|
27
30
|
default: "mdi-view-dashboard"
|
|
28
31
|
}
|
|
29
32
|
},
|
|
30
|
-
components: {
|
|
31
|
-
FSSimpleIconTileUI
|
|
32
|
-
},
|
|
33
33
|
setup(props){
|
|
34
34
|
const color = computed(() => {
|
|
35
35
|
if(Array.isArray(props.bottomColor) && !props.bottomColor.length) {
|
|
@@ -40,7 +40,7 @@ export default defineComponent({
|
|
|
40
40
|
|
|
41
41
|
return {
|
|
42
42
|
color
|
|
43
|
-
}
|
|
43
|
+
};
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSSimpleTileUI
|
|
3
3
|
:bottomColor="color"
|
|
4
4
|
:icon="$props.icon"
|
|
5
5
|
v-bind="$attrs"
|
|
@@ -7,14 +7,17 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script lang="ts">
|
|
10
|
-
import { computed, defineComponent, PropType } from "vue";
|
|
10
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
11
11
|
|
|
12
|
-
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
12
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
13
13
|
|
|
14
|
-
import
|
|
14
|
+
import FSSimpleTileUI from "./FSSimpleTileUI.vue";
|
|
15
15
|
|
|
16
16
|
export default defineComponent({
|
|
17
17
|
name: "FSDashboardShallowTileUI",
|
|
18
|
+
components: {
|
|
19
|
+
FSSimpleTileUI
|
|
20
|
+
},
|
|
18
21
|
props: {
|
|
19
22
|
bottomColor: {
|
|
20
23
|
type: [Array, String] as PropType<ColorBase | ColorBase[]>,
|
|
@@ -27,9 +30,6 @@ export default defineComponent({
|
|
|
27
30
|
default: "mdi-view-dashboard"
|
|
28
31
|
}
|
|
29
32
|
},
|
|
30
|
-
components: {
|
|
31
|
-
FSSimpleIconTileUI
|
|
32
|
-
},
|
|
33
33
|
setup(props){
|
|
34
34
|
const color = computed(() => {
|
|
35
35
|
if(Array.isArray(props.bottomColor) && !props.bottomColor.length) {
|
|
@@ -40,7 +40,7 @@ export default defineComponent({
|
|
|
40
40
|
|
|
41
41
|
return {
|
|
42
42
|
color
|
|
43
|
-
}
|
|
43
|
+
};
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
</script>
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSTile
|
|
3
|
+
:activeColor="ColorEnum.Primary"
|
|
3
4
|
:bottomColor="ColorEnum.Primary"
|
|
4
5
|
:editable="$props.editable"
|
|
6
|
+
:width="$props.width"
|
|
5
7
|
:modelValue="$props.modelValue"
|
|
6
8
|
v-bind="$attrs"
|
|
7
9
|
>
|
|
@@ -17,23 +19,23 @@
|
|
|
17
19
|
>
|
|
18
20
|
<FSCol
|
|
19
21
|
gap="12px"
|
|
22
|
+
:width="infoWidth"
|
|
20
23
|
>
|
|
21
24
|
<FSCol
|
|
22
25
|
gap="6px"
|
|
23
|
-
:width="infoWidth"
|
|
24
26
|
>
|
|
25
|
-
<
|
|
27
|
+
<FSSpan
|
|
26
28
|
font="text-button"
|
|
27
29
|
:lineClamp="2"
|
|
28
30
|
>
|
|
29
31
|
{{ $props.label }}
|
|
30
|
-
</
|
|
31
|
-
<
|
|
32
|
+
</FSSpan>
|
|
33
|
+
<FSSpan
|
|
32
34
|
font="text-overline"
|
|
33
35
|
variant="soft"
|
|
34
36
|
>
|
|
35
37
|
{{ $props.code }}
|
|
36
|
-
</
|
|
38
|
+
</FSSpan>
|
|
37
39
|
</FSCol>
|
|
38
40
|
<FSStatusesRow
|
|
39
41
|
:deviceConnectivity="$props.deviceConnectivity"
|
|
@@ -63,17 +65,16 @@
|
|
|
63
65
|
</template>
|
|
64
66
|
|
|
65
67
|
<script lang="ts">
|
|
66
|
-
import { computed, defineComponent, PropType } from "vue";
|
|
68
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
67
69
|
|
|
68
|
-
import { FSModelStatus, FSDeviceStatus, FSDeviceAlert, FSDeviceConnectivity } from "@dative-gpi/foundation-shared-components/models";
|
|
70
|
+
import { ColorEnum, type FSModelStatus, type FSDeviceStatus, type FSDeviceAlert, type FSDeviceConnectivity } from "@dative-gpi/foundation-shared-components/models";
|
|
69
71
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
70
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
71
72
|
|
|
72
73
|
import FSStatusesCarousel from "../deviceOrganisations/FSStatusesCarousel.vue";
|
|
73
74
|
import FSStatusesRow from "../deviceOrganisations/FSStatusesRow.vue";
|
|
74
75
|
import FSDivider from "../FSDivider.vue";
|
|
75
76
|
import FSImage from "../FSImage.vue";
|
|
76
|
-
import
|
|
77
|
+
import FSSpan from "../FSSpan.vue";
|
|
77
78
|
import FSTile from "./FSTile.vue";
|
|
78
79
|
import FSCol from "../FSCol.vue";
|
|
79
80
|
import FSRow from "../FSRow.vue";
|
|
@@ -85,7 +86,7 @@ export default defineComponent({
|
|
|
85
86
|
FSStatusesRow,
|
|
86
87
|
FSDivider,
|
|
87
88
|
FSImage,
|
|
88
|
-
|
|
89
|
+
FSSpan,
|
|
89
90
|
FSTile,
|
|
90
91
|
FSCol,
|
|
91
92
|
FSRow
|
|
@@ -131,6 +132,11 @@ export default defineComponent({
|
|
|
131
132
|
required: true,
|
|
132
133
|
default: () => []
|
|
133
134
|
},
|
|
135
|
+
width: {
|
|
136
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
137
|
+
required: false,
|
|
138
|
+
default: () => [352, 336]
|
|
139
|
+
},
|
|
134
140
|
modelValue: {
|
|
135
141
|
type: Boolean,
|
|
136
142
|
required: false,
|
|
@@ -189,12 +195,11 @@ export default defineComponent({
|
|
|
189
195
|
return isMobileSized.value ? 90 : 100;
|
|
190
196
|
});
|
|
191
197
|
|
|
192
|
-
const infoWidth = computed(():
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
width -= imageSize.value;
|
|
198
|
+
const infoWidth = computed((): string => {
|
|
199
|
+
if (!props.imageId) {
|
|
200
|
+
return "100%";
|
|
196
201
|
}
|
|
197
|
-
return
|
|
202
|
+
return `calc(100% - ${imageSize.value}px - 24px)`;
|
|
198
203
|
});
|
|
199
204
|
|
|
200
205
|
return {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSSimpleTileUI
|
|
3
|
+
:iconBackgroundColor="true"
|
|
3
4
|
:bottomColor="color"
|
|
4
5
|
:icon="$props.icon"
|
|
5
|
-
:iconBackgroundColor="true"
|
|
6
6
|
v-bind="$attrs"
|
|
7
7
|
/>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script lang="ts">
|
|
11
|
-
import { computed, defineComponent, PropType } from "vue";
|
|
11
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
12
12
|
|
|
13
|
-
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
13
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
14
14
|
|
|
15
|
-
import
|
|
15
|
+
import FSSimpleTileUI from "./FSSimpleTileUI.vue";
|
|
16
16
|
|
|
17
17
|
export default defineComponent({
|
|
18
18
|
name: "FSFolderTileUI",
|
|
@@ -29,7 +29,7 @@ export default defineComponent({
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
components: {
|
|
32
|
-
|
|
32
|
+
FSSimpleTileUI
|
|
33
33
|
},
|
|
34
34
|
setup(props){
|
|
35
35
|
const color = computed(() => {
|
|
@@ -41,7 +41,7 @@ export default defineComponent({
|
|
|
41
41
|
|
|
42
42
|
return {
|
|
43
43
|
color
|
|
44
|
-
}
|
|
44
|
+
};
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
</script>
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSTile
|
|
3
|
+
:activeColor="ColorEnum.Primary"
|
|
3
4
|
:bottomColor="ColorEnum.Error"
|
|
4
5
|
:editable="$props.editable"
|
|
6
|
+
:width="$props.width"
|
|
5
7
|
:modelValue="$props.modelValue"
|
|
6
8
|
v-bind="$attrs"
|
|
7
9
|
>
|
|
@@ -12,27 +14,28 @@
|
|
|
12
14
|
<FSRow
|
|
13
15
|
align="center-center"
|
|
14
16
|
gap="24px"
|
|
15
|
-
:wrap="false"
|
|
16
17
|
:height="imageSize"
|
|
18
|
+
:wrap="false"
|
|
17
19
|
>
|
|
18
20
|
<FSCol
|
|
19
21
|
gap="12px"
|
|
22
|
+
:width="infoWidth"
|
|
20
23
|
>
|
|
21
24
|
<FSCol
|
|
22
25
|
gap="6px"
|
|
23
|
-
:width="infoWidth"
|
|
24
26
|
>
|
|
25
|
-
<
|
|
27
|
+
<FSSpan
|
|
26
28
|
font="text-button"
|
|
29
|
+
:lineClamp="1"
|
|
27
30
|
>
|
|
28
31
|
{{ $props.label }}
|
|
29
|
-
</
|
|
30
|
-
<
|
|
32
|
+
</FSSpan>
|
|
33
|
+
<FSSpan
|
|
31
34
|
font="text-overline"
|
|
32
35
|
variant="soft"
|
|
33
36
|
>
|
|
34
37
|
{{ $props.code }}
|
|
35
|
-
</
|
|
38
|
+
</FSSpan>
|
|
36
39
|
</FSCol>
|
|
37
40
|
<FSCol
|
|
38
41
|
gap="6px"
|
|
@@ -49,18 +52,18 @@
|
|
|
49
52
|
<FSRow
|
|
50
53
|
align="center-center"
|
|
51
54
|
>
|
|
52
|
-
<
|
|
55
|
+
<FSSpan
|
|
53
56
|
font="text-overline"
|
|
54
57
|
>
|
|
55
58
|
{{ groupsLabel }}
|
|
56
|
-
</
|
|
59
|
+
</FSSpan>
|
|
57
60
|
</FSRow>
|
|
58
61
|
</FSColor>
|
|
59
|
-
<
|
|
62
|
+
<FSSpan
|
|
60
63
|
font="text-overline"
|
|
61
64
|
>
|
|
62
65
|
{{ $tr("ui.group-tile.group(s)", "Group(s)") }}
|
|
63
|
-
</
|
|
66
|
+
</FSSpan>
|
|
64
67
|
</FSRow>
|
|
65
68
|
<FSRow
|
|
66
69
|
align="center-left"
|
|
@@ -74,18 +77,18 @@
|
|
|
74
77
|
<FSRow
|
|
75
78
|
align="center-center"
|
|
76
79
|
>
|
|
77
|
-
<
|
|
80
|
+
<FSSpan
|
|
78
81
|
font="text-overline"
|
|
79
82
|
>
|
|
80
83
|
{{ deviceOrganisationsLabel }}
|
|
81
|
-
</
|
|
84
|
+
</FSSpan>
|
|
82
85
|
</FSRow>
|
|
83
86
|
</FSColor>
|
|
84
|
-
<
|
|
87
|
+
<FSSpan
|
|
85
88
|
font="text-overline"
|
|
86
89
|
>
|
|
87
90
|
{{ $tr("ui.group-tile.device(s)", "Device(s)") }}
|
|
88
|
-
</
|
|
91
|
+
</FSSpan>
|
|
89
92
|
</FSRow>
|
|
90
93
|
</FSCol>
|
|
91
94
|
</FSCol>
|
|
@@ -100,14 +103,14 @@
|
|
|
100
103
|
</template>
|
|
101
104
|
|
|
102
105
|
<script lang="ts">
|
|
103
|
-
import { computed, defineComponent, PropType } from "vue";
|
|
106
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
104
107
|
|
|
105
108
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
106
109
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
107
110
|
|
|
108
111
|
import FSImage from "../FSImage.vue";
|
|
109
112
|
import FSColor from "../FSColor.vue";
|
|
110
|
-
import
|
|
113
|
+
import FSSpan from "../FSSpan.vue";
|
|
111
114
|
import FSTile from "./FSTile.vue";
|
|
112
115
|
import FSCol from "../FSCol.vue";
|
|
113
116
|
import FSRow from "../FSRow.vue";
|
|
@@ -117,7 +120,7 @@ export default defineComponent({
|
|
|
117
120
|
components: {
|
|
118
121
|
FSImage,
|
|
119
122
|
FSColor,
|
|
120
|
-
|
|
123
|
+
FSSpan,
|
|
121
124
|
FSTile,
|
|
122
125
|
FSCol,
|
|
123
126
|
FSRow
|
|
@@ -139,12 +142,12 @@ export default defineComponent({
|
|
|
139
142
|
default: null
|
|
140
143
|
},
|
|
141
144
|
recursiveGroupsIds: {
|
|
142
|
-
type: Array as PropType<
|
|
145
|
+
type: Array as PropType<string[]>,
|
|
143
146
|
required: false,
|
|
144
147
|
default: () => []
|
|
145
148
|
},
|
|
146
149
|
recursiveDeviceOrganisationsIds: {
|
|
147
|
-
type: Array as PropType<
|
|
150
|
+
type: Array as PropType<string[]>,
|
|
148
151
|
required: false,
|
|
149
152
|
default: () => []
|
|
150
153
|
},
|
|
@@ -157,7 +160,12 @@ export default defineComponent({
|
|
|
157
160
|
type: Boolean,
|
|
158
161
|
required: false,
|
|
159
162
|
default: true
|
|
160
|
-
}
|
|
163
|
+
},
|
|
164
|
+
width: {
|
|
165
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
166
|
+
required: false,
|
|
167
|
+
default: () => [352, 336]
|
|
168
|
+
},
|
|
161
169
|
},
|
|
162
170
|
setup(props) {
|
|
163
171
|
const { isMobileSized } = useBreakpoints();
|
|
@@ -174,18 +182,17 @@ export default defineComponent({
|
|
|
174
182
|
return isMobileSized.value ? 90 : 100;
|
|
175
183
|
});
|
|
176
184
|
|
|
177
|
-
const infoWidth = computed(():
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
width -= imageSize.value;
|
|
185
|
+
const infoWidth = computed((): string => {
|
|
186
|
+
if (!props.imageId) {
|
|
187
|
+
return "100%";
|
|
181
188
|
}
|
|
182
|
-
return
|
|
189
|
+
return `calc(100% - ${imageSize.value}px - 24px)`;
|
|
183
190
|
});
|
|
184
191
|
|
|
185
192
|
return {
|
|
186
|
-
ColorEnum,
|
|
187
|
-
groupsLabel,
|
|
188
193
|
deviceOrganisationsLabel,
|
|
194
|
+
groupsLabel,
|
|
195
|
+
ColorEnum,
|
|
189
196
|
imageSize,
|
|
190
197
|
infoWidth
|
|
191
198
|
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSTile
|
|
3
|
+
:activeColor="ColorEnum.Primary"
|
|
4
|
+
:editable="$props.editable"
|
|
5
|
+
:width="$props.width"
|
|
6
|
+
:modelValue="$props.modelValue"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
>
|
|
9
|
+
<FSCol
|
|
10
|
+
align="center-center"
|
|
11
|
+
width="fill"
|
|
12
|
+
>
|
|
13
|
+
<FSRow
|
|
14
|
+
align="center-center"
|
|
15
|
+
gap="24px"
|
|
16
|
+
:wrap="false"
|
|
17
|
+
:height="imageSize"
|
|
18
|
+
>
|
|
19
|
+
<FSCol
|
|
20
|
+
gap="4px"
|
|
21
|
+
:width="infoWidth"
|
|
22
|
+
>
|
|
23
|
+
<FSSpan
|
|
24
|
+
font="text-button"
|
|
25
|
+
:lineClamp="2"
|
|
26
|
+
>
|
|
27
|
+
{{ $props.label }}
|
|
28
|
+
</FSSpan>
|
|
29
|
+
<FSRow
|
|
30
|
+
v-if="$props.roleLabel"
|
|
31
|
+
align="center-left"
|
|
32
|
+
gap="4px"
|
|
33
|
+
:wrap="false"
|
|
34
|
+
>
|
|
35
|
+
<FSIcon
|
|
36
|
+
v-if="$props.roleIcon"
|
|
37
|
+
variant="soft"
|
|
38
|
+
:color="ColorEnum.Dark"
|
|
39
|
+
>
|
|
40
|
+
{{ $props.roleIcon }}
|
|
41
|
+
</FSIcon>
|
|
42
|
+
<FSSpan
|
|
43
|
+
font="text-overline"
|
|
44
|
+
variant="soft"
|
|
45
|
+
>
|
|
46
|
+
{{ $props.roleLabel }}
|
|
47
|
+
</FSSpan>
|
|
48
|
+
</FSRow>
|
|
49
|
+
</FSCol>
|
|
50
|
+
<FSImage
|
|
51
|
+
v-if="$props.imageId"
|
|
52
|
+
:imageId="$props.imageId"
|
|
53
|
+
:width="imageSize"
|
|
54
|
+
/>
|
|
55
|
+
</FSRow>
|
|
56
|
+
</FSCol>
|
|
57
|
+
</FSTile>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script lang="ts">
|
|
61
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
62
|
+
|
|
63
|
+
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
64
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
65
|
+
|
|
66
|
+
import FSImage from "../FSImage.vue";
|
|
67
|
+
import FSSpan from "../FSSpan.vue";
|
|
68
|
+
import FSTile from "./FSTile.vue";
|
|
69
|
+
import FSCol from "../FSCol.vue";
|
|
70
|
+
import FSRow from "../FSRow.vue";
|
|
71
|
+
|
|
72
|
+
export default defineComponent({
|
|
73
|
+
name: "FSServiceAccountOrganisationTileUI",
|
|
74
|
+
components: {
|
|
75
|
+
FSImage,
|
|
76
|
+
FSSpan,
|
|
77
|
+
FSTile,
|
|
78
|
+
FSCol,
|
|
79
|
+
FSRow
|
|
80
|
+
},
|
|
81
|
+
props: {
|
|
82
|
+
imageId: {
|
|
83
|
+
type: String as PropType<string | null>,
|
|
84
|
+
required: false,
|
|
85
|
+
default: null
|
|
86
|
+
},
|
|
87
|
+
label: {
|
|
88
|
+
type: String as PropType<string | null>,
|
|
89
|
+
required: false,
|
|
90
|
+
default: null
|
|
91
|
+
},
|
|
92
|
+
roleIcon: {
|
|
93
|
+
type: String as PropType<string | null>,
|
|
94
|
+
required: false,
|
|
95
|
+
default: null
|
|
96
|
+
},
|
|
97
|
+
roleLabel: {
|
|
98
|
+
type: String as PropType<string | null>,
|
|
99
|
+
required: false,
|
|
100
|
+
default: null
|
|
101
|
+
},
|
|
102
|
+
width: {
|
|
103
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
104
|
+
required: false,
|
|
105
|
+
default: () => [352, 336]
|
|
106
|
+
},
|
|
107
|
+
modelValue: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
required: false,
|
|
110
|
+
default: false
|
|
111
|
+
},
|
|
112
|
+
editable: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
required: false,
|
|
115
|
+
default: true
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
setup(props) {
|
|
119
|
+
const { isMobileSized } = useBreakpoints();
|
|
120
|
+
|
|
121
|
+
const imageSize = computed((): number => {
|
|
122
|
+
if (!props.imageId) {
|
|
123
|
+
return 0;
|
|
124
|
+
}
|
|
125
|
+
return isMobileSized.value ? 90 : 100;
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
const infoWidth = computed((): string => {
|
|
129
|
+
if (!props.imageId) {
|
|
130
|
+
return "100%";
|
|
131
|
+
}
|
|
132
|
+
return `calc(100% - ${imageSize.value}px - 24px)`;
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
ColorEnum,
|
|
137
|
+
imageSize,
|
|
138
|
+
infoWidth
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
</script>
|