@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.
Files changed (139) hide show
  1. package/{models/FSButtons.ts → aliases/FSButton.ts} +24 -21
  2. package/aliases/index.ts +1 -0
  3. package/components/FSAutocompleteField.vue +207 -0
  4. package/components/FSBadge.vue +38 -0
  5. package/components/FSBreadcrumbs.vue +49 -55
  6. package/components/FSButton.vue +116 -101
  7. package/components/FSCalendar.vue +184 -0
  8. package/components/FSCalendarTwin.vue +412 -0
  9. package/components/FSCard.vue +77 -0
  10. package/components/FSCarousel.vue +63 -0
  11. package/components/FSCheckbox.vue +111 -104
  12. package/components/FSChip.vue +140 -0
  13. package/components/FSClock.vue +172 -0
  14. package/components/FSCol.vue +104 -98
  15. package/components/FSColor.vue +61 -64
  16. package/components/FSColorIcon.vue +67 -0
  17. package/components/FSContainer.vue +64 -0
  18. package/components/FSDateField.vue +211 -0
  19. package/components/FSDateRangeField.vue +225 -0
  20. package/components/FSDateTimeField.vue +257 -0
  21. package/components/FSDateTimeRangeField.vue +286 -0
  22. package/components/FSDialog.vue +103 -0
  23. package/components/FSDivider.vue +39 -0
  24. package/components/FSFadeOut.vue +49 -59
  25. package/components/FSFileButton.vue +245 -0
  26. package/components/FSHeaderButton.vue +17 -0
  27. package/components/FSIcon.vue +23 -23
  28. package/components/FSIconField.vue +232 -0
  29. package/components/FSImage.vue +142 -0
  30. package/components/FSLoadTile.vue +93 -0
  31. package/components/FSNumberField.vue +51 -53
  32. package/components/FSPasswordField.vue +99 -99
  33. package/components/FSRadio.vue +107 -110
  34. package/components/FSRadioGroup.vue +55 -57
  35. package/components/FSRemoveDialog.vue +123 -0
  36. package/components/FSRichTextField.vue +551 -0
  37. package/components/FSRow.vue +110 -104
  38. package/components/FSSearchField.vue +114 -105
  39. package/components/FSSelectField.vue +188 -0
  40. package/components/FSSlideGroup.vue +45 -49
  41. package/components/FSSlider.vue +130 -0
  42. package/components/FSSpan.vue +53 -37
  43. package/components/FSSubmitDialog.vue +165 -0
  44. package/components/FSSwitch.vue +110 -109
  45. package/components/FSTab.vue +61 -61
  46. package/components/FSTabs.vue +53 -55
  47. package/components/FSTag.vue +88 -84
  48. package/components/FSTagField.vue +183 -128
  49. package/components/FSTagGroup.vue +38 -45
  50. package/components/FSText.vue +74 -64
  51. package/components/FSTextArea.vue +209 -0
  52. package/components/FSTextField.vue +152 -149
  53. package/components/FSTile.vue +90 -0
  54. package/components/FSToggleSet.vue +282 -0
  55. package/components/FSTooltip.vue +21 -0
  56. package/components/FSWindow.vue +26 -16
  57. package/components/FSWrapGroup.vue +44 -47
  58. package/components/deviceOrganisations/FSConnectivity.vue +114 -0
  59. package/components/deviceOrganisations/FSStatus.vue +117 -0
  60. package/components/deviceOrganisations/FSStatusesCarousel.vue +105 -0
  61. package/components/deviceOrganisations/FSStatusesRow.vue +66 -0
  62. package/components/deviceOrganisations/FSWorstAlert.vue +165 -0
  63. package/components/lists/FSDataIteratorGroup.vue +7 -0
  64. package/components/lists/FSDataIteratorItem.vue +103 -0
  65. package/components/lists/FSDataTable.vue +964 -0
  66. package/components/lists/FSFilterButton.vue +176 -0
  67. package/components/lists/FSHeaderButton.vue +99 -0
  68. package/components/lists/FSHiddenButton.vue +79 -0
  69. package/components/tiles/FSDeviceOrganisationTileUI.vue +232 -0
  70. package/components/tiles/FSGroupTileUI.vue +192 -0
  71. package/composables/index.ts +2 -1
  72. package/composables/useBreakpoints.ts +33 -0
  73. package/composables/useColors.ts +53 -23
  74. package/composables/useSlots.ts +43 -0
  75. package/index.ts +6 -0
  76. package/models/breadcrumbs.ts +8 -0
  77. package/models/colors.ts +17 -0
  78. package/models/deviceAlerts.ts +10 -0
  79. package/models/deviceConnectivities.ts +11 -0
  80. package/models/deviceStatuses.ts +16 -0
  81. package/models/dispositions.ts +33 -0
  82. package/models/index.ts +9 -0
  83. package/models/modelStatuses.ts +11 -0
  84. package/models/rules.ts +50 -0
  85. package/models/toggleSets.ts +7 -0
  86. package/package.json +13 -4
  87. package/plugins/colorPlugin.ts +2 -2
  88. package/shims-plugin.d.ts +1 -1
  89. package/styles/components/fs_autocomplete_field.scss +123 -0
  90. package/styles/components/fs_button.scss +4 -14
  91. package/styles/components/fs_calendar.scss +138 -0
  92. package/styles/components/fs_card.scss +4 -0
  93. package/styles/components/fs_carousel.scss +4 -0
  94. package/styles/components/fs_chip.scss +33 -0
  95. package/styles/components/fs_clock.scss +43 -0
  96. package/styles/components/fs_col.scss +2 -0
  97. package/styles/components/fs_color_icon.scss +37 -0
  98. package/styles/components/fs_container.scss +16 -0
  99. package/styles/components/fs_data_iterator_item.scss +19 -0
  100. package/styles/components/fs_data_table.scss +97 -0
  101. package/styles/components/fs_date_field.scss +8 -0
  102. package/styles/components/fs_dialog.scss +30 -0
  103. package/styles/components/fs_divider.scss +5 -0
  104. package/styles/components/fs_fade_out.scss +10 -2
  105. package/styles/components/fs_filter_button.scss +12 -0
  106. package/styles/components/fs_header_button.scss +4 -0
  107. package/styles/components/fs_icon.scss +14 -4
  108. package/styles/components/fs_icon_field.scss +12 -0
  109. package/styles/components/fs_image.scss +7 -0
  110. package/styles/components/fs_load_tile.scss +49 -0
  111. package/styles/components/fs_password_field.scss +2 -2
  112. package/styles/components/fs_rich_text_field.scss +67 -0
  113. package/styles/components/fs_row.scss +4 -1
  114. package/styles/components/fs_select_field.scss +71 -0
  115. package/styles/components/fs_slide_group.scss +6 -0
  116. package/styles/components/fs_slider.scss +40 -0
  117. package/styles/components/fs_span.scss +8 -0
  118. package/styles/components/fs_submit_dialog.scss +9 -0
  119. package/styles/components/fs_tabs.scss +4 -0
  120. package/styles/components/fs_tag_field.scss +6 -8
  121. package/styles/components/fs_text_area.scss +105 -0
  122. package/styles/components/fs_text_field.scss +23 -15
  123. package/styles/components/fs_tile.scss +33 -0
  124. package/styles/components/fs_tooltip.scss +5 -0
  125. package/styles/components/fs_wrap_group.scss +7 -8
  126. package/styles/components/index.scss +26 -0
  127. package/styles/globals/breakpoints.scss +7 -0
  128. package/styles/globals/overrides.scss +20 -7
  129. package/styles/globals/text_fonts.scss +8 -8
  130. package/themes/default.ts +1 -11
  131. package/utils/css.ts +11 -0
  132. package/utils/icons.ts +75416 -0
  133. package/utils/index.ts +5 -0
  134. package/utils/levenshtein.ts +97 -0
  135. package/utils/lexical.ts +27 -0
  136. package/utils/sort.ts +9 -0
  137. package/composables/useTouch.ts +0 -9
  138. package/models/FSTags.ts +0 -8
  139. package/models/FSTextFields.ts +0 -17
@@ -0,0 +1,117 @@
1
+ <template>
2
+ <v-menu
3
+ :closeOnContentClick="false"
4
+ v-model="menu"
5
+ >
6
+ <template #activator="{ props }">
7
+ <FSColorIcon
8
+ size="m"
9
+ variant="fill"
10
+ :color="$props.statusGroup.color"
11
+ v-bind="props"
12
+ >
13
+ {{ $props.statusGroup.icon }}
14
+ </FSColorIcon>
15
+ </template>
16
+ <FSCard
17
+ :elevation="true"
18
+ :border="false"
19
+ >
20
+ <FSCol
21
+ align="center-center"
22
+ padding="6px 24px"
23
+ >
24
+ <FSCol
25
+ align="center-center"
26
+ gap="12px"
27
+ >
28
+ <FSChip
29
+ :color="$props.statusGroup.color"
30
+ :prependIcon="$props.statusGroup.icon"
31
+ :label="$props.statusGroup.label"
32
+ />
33
+ <FSRow
34
+ v-if="$props.statusGroup.value"
35
+ width="hug"
36
+ >
37
+ <FSText
38
+ font="text-button"
39
+ :color="$props.statusGroup.color"
40
+ >
41
+ {{ $props.statusGroup.value }} {{ $props.statusGroup.unit }}
42
+ </FSText>
43
+ </FSRow>
44
+ <FSRow
45
+ v-if="$props.statusGroup.value && $props.modelStatus.groupById && $props.statusGroup.groupByValue"
46
+ width="hug"
47
+ >
48
+ <FSSpan>
49
+ {{ $props.modelStatus.groupByLabel }} {{ $props.statusGroup.groupByValue }}
50
+ </FSSpan>
51
+ </FSRow>
52
+ </FSCol>
53
+ <FSRow
54
+ v-if="deviceTimestamp"
55
+ width="hug"
56
+ >
57
+ <FSSpan
58
+ font="text-overline"
59
+ >
60
+ {{ deviceTimestamp }}
61
+ </FSSpan>
62
+ </FSRow>
63
+ </FSCol>
64
+ </FSCard>
65
+ </v-menu>
66
+ </template>
67
+
68
+ <script lang="ts">
69
+ import { computed, defineComponent, PropType, ref } from "vue";
70
+
71
+ import { FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
72
+ import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
73
+
74
+ import FSColorIcon from "../FSColorIcon.vue";
75
+ import FSCard from "../FSCard.vue";
76
+ import FSChip from "../FSChip.vue";
77
+ import FSText from "../FSText.vue";
78
+ import FSSpan from "../FSSpan.vue";
79
+
80
+ export default defineComponent({
81
+ name: "FSStatus",
82
+ components: {
83
+ FSColorIcon,
84
+ FSCard,
85
+ FSChip,
86
+ FSText,
87
+ FSSpan
88
+ },
89
+ props: {
90
+ modelStatus: {
91
+ type: Object as PropType<FSModelStatus>,
92
+ required: true
93
+ },
94
+ statusGroup: {
95
+ type: Object as PropType<FSDeviceStatusGroup>,
96
+ required: true
97
+ }
98
+ },
99
+ setup(props) {
100
+ const { epochToLongTimeFormat } = useTimeZone();
101
+
102
+ const menu = ref(false);
103
+
104
+ const deviceTimestamp = computed((): string => {
105
+ if (props.statusGroup.sourceTimestamp) {
106
+ return epochToLongTimeFormat(props.statusGroup.sourceTimestamp);
107
+ }
108
+ return "";
109
+ });
110
+
111
+ return {
112
+ deviceTimestamp,
113
+ menu
114
+ };
115
+ }
116
+ });
117
+ </script>
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <FSCarousel
3
+ :height="height"
4
+ >
5
+ <template #prev="{ props }">
6
+ <FSButton
7
+ v-if="$props.modelStatuses.length > 1"
8
+ variant="icon"
9
+ icon="mdi-chevron-left"
10
+ :color="ColorEnum.Dark"
11
+ @click="props.onClick"
12
+ />
13
+ </template>
14
+ <template #next="{ props }">
15
+ <FSButton
16
+ v-if="$props.modelStatuses.length > 1"
17
+ variant="icon"
18
+ icon="mdi-chevron-right"
19
+ :color="ColorEnum.Dark"
20
+ @click="props.onClick"
21
+ />
22
+ </template>
23
+ <FSRow
24
+ v-for="(modelStatus, index) in $props.modelStatuses"
25
+ align="center-center"
26
+ width="hug"
27
+ gap="4px"
28
+ :key="index"
29
+ :wrap="false"
30
+ >
31
+ <FSStatus
32
+ v-for="(statusGroup, index) in deviceStatus(modelStatus)"
33
+ :modelStatus="modelStatus"
34
+ :statusGroup="statusGroup"
35
+ :key="index"
36
+ />
37
+ </FSRow>
38
+ </FSCarousel>
39
+ </template>
40
+
41
+ <script lang="ts">
42
+ import { computed, defineComponent, PropType, ref } from "vue";
43
+
44
+ import { FSDeviceStatus, FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
45
+ import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
46
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
47
+
48
+ import FSCarousel from "../FSCarousel.vue";
49
+ import FSButton from "../FSButton.vue";
50
+ import FSStatus from "./FSStatus.vue";
51
+ import FSRow from "../FSRow.vue";
52
+
53
+ export default defineComponent({
54
+ name: "FSStatusesCarousel",
55
+ components: {
56
+ FSCarousel,
57
+ FSButton,
58
+ FSStatus,
59
+ FSRow
60
+ },
61
+ props: {
62
+ modelStatuses: {
63
+ type: Array as PropType<FSModelStatus[]>,
64
+ required: true
65
+ },
66
+ deviceStatuses: {
67
+ type: Array as PropType<FSDeviceStatus[]>,
68
+ required: true
69
+ }
70
+ },
71
+ setup(props) {
72
+ const { isMobileSized } = useBreakpoints();
73
+
74
+ const tab = ref(0);
75
+
76
+ const height = computed((): number => {
77
+ return isMobileSized.value ? 20 : 26;
78
+ });
79
+
80
+ const deviceStatus = (modelStatus: FSModelStatus): FSDeviceStatusGroup[] => {
81
+ const deviceStatus = props.deviceStatuses
82
+ .find((deviceStatus: FSDeviceStatus) => deviceStatus.modelStatusId === modelStatus.id);
83
+ if (deviceStatus != null) {
84
+ return deviceStatus.statusGroups;
85
+ }
86
+ if (modelStatus.showDefault) {
87
+ return [{
88
+ label: modelStatus.label,
89
+ value: null,
90
+ icon: modelStatus.iconDefault,
91
+ color: modelStatus.colorDefault
92
+ }];
93
+ }
94
+ return [];
95
+ }
96
+
97
+ return {
98
+ ColorEnum,
99
+ height,
100
+ tab,
101
+ deviceStatus
102
+ };
103
+ }
104
+ });
105
+ </script>
@@ -0,0 +1,66 @@
1
+ <template>
2
+ <FSRow
3
+ v-for="(modelStatus, index) in $props.modelStatuses"
4
+ align="center-center"
5
+ width="hug"
6
+ gap="4px"
7
+ :key="index"
8
+ :wrap="false"
9
+ >
10
+ <FSStatus
11
+ v-for="(statusGroup, index) in deviceStatus(modelStatus)"
12
+ :modelStatus="modelStatus"
13
+ :statusGroup="statusGroup"
14
+ :key="index"
15
+ />
16
+ </FSRow>
17
+ </template>
18
+
19
+ <script lang="ts">
20
+ import { defineComponent, PropType } from "vue";
21
+
22
+ import { FSDeviceStatus, FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
23
+
24
+ import FSStatus from "./FSStatus.vue";
25
+ import FSRow from "../FSRow.vue";
26
+
27
+ export default defineComponent({
28
+ name: "FSStatusesRow",
29
+ components: {
30
+ FSStatus,
31
+ FSRow
32
+ },
33
+ props: {
34
+ modelStatuses: {
35
+ type: Array as PropType<FSModelStatus[]>,
36
+ required: true
37
+ },
38
+ deviceStatuses: {
39
+ type: Array as PropType<FSDeviceStatus[]>,
40
+ required: true
41
+ }
42
+ },
43
+ setup(props) {
44
+ const deviceStatus = (modelStatus: FSModelStatus): FSDeviceStatusGroup[] => {
45
+ const deviceStatus = props.deviceStatuses
46
+ .find((deviceStatus: FSDeviceStatus) => deviceStatus.modelStatusId === modelStatus.id);
47
+ if (deviceStatus != null) {
48
+ return deviceStatus.statusGroups;
49
+ }
50
+ if (modelStatus.showDefault) {
51
+ return [{
52
+ label: modelStatus.label,
53
+ value: null,
54
+ icon: modelStatus.iconDefault,
55
+ color: modelStatus.colorDefault
56
+ }];
57
+ }
58
+ return [];
59
+ }
60
+
61
+ return {
62
+ deviceStatus
63
+ };
64
+ }
65
+ });
66
+ </script>
@@ -0,0 +1,165 @@
1
+ <template>
2
+ <v-menu
3
+ v-if="$props.deviceAlert"
4
+ :closeOnContentClick="false"
5
+ v-model="menu"
6
+ >
7
+ <template #activator="{ props }">
8
+ <FSBadge
9
+ :content="badgeLabel"
10
+ :color="criticityColor"
11
+ >
12
+ <FSColorIcon
13
+ size="m"
14
+ variant="fill"
15
+ :color="criticityColor"
16
+ v-bind="props"
17
+ >
18
+ {{ statusIcon }}
19
+ </FSColorIcon>
20
+ </FSBadge>
21
+ </template>
22
+ <FSCard
23
+ :elevation="true"
24
+ :border="false"
25
+ >
26
+ <FSCol
27
+ align="center-center"
28
+ padding="6px 24px"
29
+ >
30
+ <FSCol
31
+ align="center-center"
32
+ gap="12px"
33
+ >
34
+ <FSChip
35
+ :color="criticityColor"
36
+ :prependIcon="statusIcon"
37
+ :label="$props.deviceAlert.label"
38
+ />
39
+ <FSRow
40
+ width="hug"
41
+ >
42
+ <FSText>
43
+ {{ statusLabel }}
44
+ </FSText>
45
+ </FSRow>
46
+ </FSCol>
47
+ <FSRow
48
+ v-if="deviceTimestamp"
49
+ width="hug"
50
+ >
51
+ <FSSpan
52
+ font="text-overline"
53
+ >
54
+ {{ deviceTimestamp }}
55
+ </FSSpan>
56
+ </FSRow>
57
+ </FSCol>
58
+ </FSCard>
59
+ </v-menu>
60
+ </template>
61
+
62
+ <script lang="ts">
63
+ import { computed, defineComponent, PropType, ref } from "vue";
64
+
65
+ import { useTimeZone, useTranslationsProvider } from "@dative-gpi/foundation-shared-services/composables";
66
+ import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/models";
67
+ import { FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
68
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
69
+
70
+ import FSColorIcon from "../FSColorIcon.vue";
71
+ import FSBadge from "../FSBadge.vue";
72
+ import FSCard from "../FSCard.vue";
73
+ import FSChip from "../FSChip.vue";
74
+ import FSText from "../FSText.vue";
75
+ import FSSpan from "../FSSpan.vue";
76
+
77
+ export default defineComponent({
78
+ name: "FSWorstAlert",
79
+ components: {
80
+ FSColorIcon,
81
+ FSBadge,
82
+ FSCard,
83
+ FSChip,
84
+ FSText,
85
+ FSSpan
86
+ },
87
+ props: {
88
+ deviceAlert: {
89
+ type: Object as PropType<FSDeviceAlert>,
90
+ required: true
91
+ },
92
+ deviceAlerts: {
93
+ type: Number,
94
+ required: false,
95
+ default: 0
96
+ }
97
+ },
98
+ setup(props) {
99
+ const { epochToLongTimeFormat } = useTimeZone();
100
+ const { $tr } = useTranslationsProvider();
101
+
102
+ const menu = ref(false);
103
+
104
+ const criticityColor = computed(() => {
105
+ switch (props.deviceAlert?.criticity) {
106
+ case Criticity.Error: return ColorEnum.Error;
107
+ case Criticity.Warning: return ColorEnum.Warning;
108
+ default: return ColorEnum.Primary;
109
+ }
110
+ });
111
+
112
+ const statusIcon = computed(() => {
113
+ switch (props.deviceAlert?.status) {
114
+ case AlertStatus.Pending: return "mdi-timer-outline";
115
+ case AlertStatus.Untriggered: return "mdi-timer-off-outline";
116
+ case AlertStatus.Unresolved: return "mdi-alert-circle-outline";
117
+ case AlertStatus.Resolved: return "mdi-check-circle-outline";
118
+ case AlertStatus.Expired: return "mdi-clock-outline";
119
+ case AlertStatus.Triggered: return "mdi-alert-circle-outline";
120
+ case AlertStatus.Abandoned: return "mdi-cancel"
121
+ default: return "";
122
+ }
123
+ });
124
+
125
+ const statusLabel = computed(() => {
126
+ switch (props.deviceAlert?.status) {
127
+ case AlertStatus.Pending: return $tr("ui.alert-status.pending", "Pending");
128
+ case AlertStatus.Untriggered: return $tr("ui.alert-status.untriggered", "Untriggered");
129
+ case AlertStatus.Unresolved: return $tr("ui.alert-status.unresolved", "Unresolved");
130
+ case AlertStatus.Resolved: return $tr("ui.alert-status.resolved", "Resolved");
131
+ case AlertStatus.Expired: return $tr("ui.alert-status.expired", "Expired");
132
+ case AlertStatus.Triggered: return $tr("ui.alert-status.triggered", "Triggered");
133
+ case AlertStatus.Abandoned: return $tr("ui.alert-status.abandoned", "Abandoned");
134
+ default: return "";
135
+ }
136
+ });
137
+
138
+ const badgeLabel = computed((): string | null => {
139
+ if (props.deviceAlerts < 1) {
140
+ return null;
141
+ }
142
+ if (props.deviceAlerts > 8) {
143
+ return "9+";
144
+ }
145
+ return (props.deviceAlerts + 1).toString();
146
+ });
147
+
148
+ const deviceTimestamp = computed((): string => {
149
+ if (props.deviceAlert.sourceTimestamp) {
150
+ return epochToLongTimeFormat(props.deviceAlert.sourceTimestamp);
151
+ }
152
+ return "";
153
+ });
154
+
155
+ return {
156
+ deviceTimestamp,
157
+ criticityColor,
158
+ statusLabel,
159
+ statusIcon,
160
+ badgeLabel,
161
+ menu
162
+ };
163
+ }
164
+ });
165
+ </script>
@@ -0,0 +1,7 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script lang="ts">
6
+
7
+ </script>
@@ -0,0 +1,103 @@
1
+ <template>
2
+ <FSCard
3
+ class="fs-data-iterator-item"
4
+ padding="12px"
5
+ width="50%"
6
+ >
7
+ <FSCol>
8
+ <slot name="item.top" v-bind="{ item: $props.item }" />
9
+ <FSRow
10
+ v-for="(header, index) in $props.headers"
11
+ align="center-left"
12
+ :wrap="false"
13
+ :key="index"
14
+ >
15
+ <slot :name="`header.${header.value}`" v-bind="{ header }">
16
+ <FSRow
17
+ align="center-left"
18
+ >
19
+ <FSText
20
+ font="text-button"
21
+ >
22
+ {{ header.text }}
23
+ </FSText>
24
+ </FSRow>
25
+ </slot>
26
+ <slot :name="`item.${header.value}`" v-bind="{ item: $props.item }">
27
+ <FSRow
28
+ align="center-left"
29
+ >
30
+ <FSText>
31
+ {{ $props.item[header.value] }}
32
+ </FSText>
33
+ </FSRow>
34
+ </slot>
35
+ </FSRow>
36
+ <slot name="item.bottom" v-bind="{ item: $props.item }" />
37
+ </FSCol>
38
+ <FSContainer
39
+ v-if="$props.showSelect"
40
+ class="fs-data-iterator-item-checkbox"
41
+ :border="false"
42
+ >
43
+ <FSCheckbox
44
+ :color="$props.color"
45
+ :modelValue="$props.modelValue"
46
+ @update:modelValue="() => $emit('update:modelValue', $props.item)"
47
+ />
48
+ </FSContainer>
49
+ </FSCard>
50
+ </template>
51
+
52
+ <script lang="ts">
53
+ import { defineComponent, PropType } from "vue";
54
+
55
+ import { ColorEnum, FSDataTableColumn } from "@dative-gpi/foundation-shared-components/models";
56
+
57
+ import FSContainer from "../FSContainer.vue";
58
+ import FSCheckbox from "../FSCheckbox.vue";
59
+ import FSCard from "../FSCard.vue";
60
+ import FSText from "../FSText.vue";
61
+ import FSRow from "../FSRow.vue";
62
+
63
+ export default defineComponent({
64
+ name: "FSIteratorCard",
65
+ components: {
66
+ FSContainer,
67
+ FSCheckbox,
68
+ FSCard,
69
+ FSText,
70
+ FSRow
71
+ },
72
+ props: {
73
+ headers: {
74
+ type: Array as PropType<FSDataTableColumn[]>,
75
+ required: true
76
+ },
77
+ item: {
78
+ type: Object,
79
+ required: true
80
+ },
81
+ itemTo: {
82
+ type: Function,
83
+ required: false,
84
+ default: null
85
+ },
86
+ modelValue: {
87
+ type: Boolean,
88
+ required: false,
89
+ default: false
90
+ },
91
+ color: {
92
+ type: String as PropType<ColorEnum>,
93
+ required: false,
94
+ default: ColorEnum.Primary
95
+ },
96
+ showSelect: {
97
+ type: Boolean,
98
+ required: false,
99
+ default: true
100
+ }
101
+ }
102
+ });
103
+ </script>