@dative-gpi/foundation-core-components 1.0.28 → 1.0.29
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.
|
@@ -1,24 +1,95 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:width="$props.width ? $props.width : '100%'"
|
|
3
4
|
:label="label ?? $tr('ui.common.data-category', 'Data category')"
|
|
4
5
|
:items="toggleDataCategories"
|
|
5
6
|
:modelValue="modelValue"
|
|
6
|
-
:toggleSet="toggleDataCategories.length < 5"
|
|
7
7
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
8
|
v-bind="$attrs"
|
|
9
|
-
|
|
9
|
+
>
|
|
10
|
+
<template
|
|
11
|
+
#autocomplete-selection="{item}"
|
|
12
|
+
>
|
|
13
|
+
<FSRow
|
|
14
|
+
:wrap="false"
|
|
15
|
+
align="center-center"
|
|
16
|
+
:width="$props.width ? $props.width : '100vh'"
|
|
17
|
+
>
|
|
18
|
+
<FSCol>
|
|
19
|
+
<FSText>
|
|
20
|
+
{{ item.raw.label }}
|
|
21
|
+
</FSText>
|
|
22
|
+
</FSCol>
|
|
23
|
+
<FSRow>
|
|
24
|
+
<FSRow
|
|
25
|
+
align="center-right"
|
|
26
|
+
>
|
|
27
|
+
<FSChip
|
|
28
|
+
:label="item.raw.unit"
|
|
29
|
+
:color="item.raw.correlated ? ColorEnum.Success : ColorEnum.Warning"
|
|
30
|
+
>
|
|
31
|
+
<FSRow
|
|
32
|
+
v-if="item.raw.correlated"
|
|
33
|
+
align="center-center"
|
|
34
|
+
:wrap="false"
|
|
35
|
+
>
|
|
36
|
+
<FSIcon
|
|
37
|
+
icon="mdi-link"
|
|
38
|
+
size="16px"
|
|
39
|
+
/>
|
|
40
|
+
<FSText
|
|
41
|
+
font="text-overline"
|
|
42
|
+
>
|
|
43
|
+
{{ $tr('ui.common.linked', 'Linked') }}
|
|
44
|
+
</FSText>
|
|
45
|
+
</FSRow>
|
|
46
|
+
<FSRow
|
|
47
|
+
v-else
|
|
48
|
+
align="center-center"
|
|
49
|
+
:wrap="false"
|
|
50
|
+
>
|
|
51
|
+
<FSIcon
|
|
52
|
+
icon="mdi-link-off"
|
|
53
|
+
size="16px"
|
|
54
|
+
/>
|
|
55
|
+
<FSSpan
|
|
56
|
+
font="text-overline"
|
|
57
|
+
>
|
|
58
|
+
{{ $tr('ui.common.not-linked', 'Not linked') }}
|
|
59
|
+
</FSSpan>
|
|
60
|
+
</FSRow>
|
|
61
|
+
</FSChip>
|
|
62
|
+
</FSRow>
|
|
63
|
+
</FSRow>
|
|
64
|
+
</FSRow>
|
|
65
|
+
</template></FSAutocompleteField>
|
|
10
66
|
</template>
|
|
11
67
|
|
|
12
68
|
<script lang="ts">
|
|
13
69
|
import { computed, defineComponent, watch } from "vue";
|
|
14
70
|
|
|
71
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
72
|
+
|
|
15
73
|
import {useDataCategories} from "@dative-gpi/foundation-core-services/composables";
|
|
16
74
|
|
|
17
75
|
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
76
|
+
import FSChip from "@dative-gpi/foundation-shared-components/components/FSChip.vue";
|
|
77
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
78
|
+
import FSCol from "@dative-gpi/foundation-shared-components/components/FSCol.vue";
|
|
79
|
+
import FSText from "@dative-gpi/foundation-shared-components/components/FSText.vue";
|
|
80
|
+
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
81
|
+
import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
|
|
82
|
+
|
|
18
83
|
|
|
19
84
|
export default defineComponent({
|
|
20
85
|
components: {
|
|
21
|
-
FSAutocompleteField
|
|
86
|
+
FSAutocompleteField,
|
|
87
|
+
FSChip,
|
|
88
|
+
FSRow,
|
|
89
|
+
FSCol,
|
|
90
|
+
FSText,
|
|
91
|
+
FSIcon,
|
|
92
|
+
FSSpan
|
|
22
93
|
},
|
|
23
94
|
props:{
|
|
24
95
|
modelValue: {
|
|
@@ -33,6 +104,10 @@ export default defineComponent({
|
|
|
33
104
|
type: String,
|
|
34
105
|
required: false
|
|
35
106
|
},
|
|
107
|
+
width: {
|
|
108
|
+
type: String,
|
|
109
|
+
required: false
|
|
110
|
+
}
|
|
36
111
|
},
|
|
37
112
|
emits: ['update:modelValue'],
|
|
38
113
|
setup(props) {
|
|
@@ -42,7 +117,8 @@ export default defineComponent({
|
|
|
42
117
|
return dataCategories.value.map((d) => {
|
|
43
118
|
return {
|
|
44
119
|
id: d.id,
|
|
45
|
-
label: d.label
|
|
120
|
+
label: d.label,
|
|
121
|
+
correlated: d.correlated
|
|
46
122
|
}
|
|
47
123
|
})
|
|
48
124
|
})
|
|
@@ -53,6 +129,7 @@ export default defineComponent({
|
|
|
53
129
|
|
|
54
130
|
|
|
55
131
|
return {
|
|
132
|
+
ColorEnum,
|
|
56
133
|
toggleDataCategories,
|
|
57
134
|
dataCategories
|
|
58
135
|
}
|
|
@@ -1,11 +1,39 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:width="$props.width ? $props.width : '100%'"
|
|
3
4
|
:label="label ?? $tr('ui.common.data-definition', 'Data')"
|
|
4
5
|
:items="toggleDataDefinitions"
|
|
5
6
|
:modelValue="modelValue"
|
|
6
7
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
8
|
v-bind="$attrs"
|
|
8
|
-
|
|
9
|
+
>
|
|
10
|
+
<template
|
|
11
|
+
#autocomplete-selection="{item}"
|
|
12
|
+
>
|
|
13
|
+
<FSRow
|
|
14
|
+
:wrap="false"
|
|
15
|
+
align="center-center"
|
|
16
|
+
:width="$props.width ? $props.width : '100vh'"
|
|
17
|
+
>
|
|
18
|
+
<FSCol>
|
|
19
|
+
<FSText>
|
|
20
|
+
{{ item.raw.label }}
|
|
21
|
+
</FSText>
|
|
22
|
+
</FSCol>
|
|
23
|
+
<FSRow
|
|
24
|
+
v-if="item.raw.showUnit"
|
|
25
|
+
>
|
|
26
|
+
<FSRow
|
|
27
|
+
align="center-right"
|
|
28
|
+
>
|
|
29
|
+
<FSChip
|
|
30
|
+
:label="item.raw.unit"
|
|
31
|
+
/>
|
|
32
|
+
</FSRow>
|
|
33
|
+
</FSRow>
|
|
34
|
+
</FSRow>
|
|
35
|
+
</template>
|
|
36
|
+
</FSAutocompleteField>
|
|
9
37
|
</template>
|
|
10
38
|
|
|
11
39
|
<script lang="ts">
|
|
@@ -14,10 +42,16 @@ import { computed, defineComponent, watch } from "vue";
|
|
|
14
42
|
import {useDataDefinitions} from "@dative-gpi/foundation-core-services/composables";
|
|
15
43
|
|
|
16
44
|
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
45
|
+
import FSChip from "@dative-gpi/foundation-shared-components/components/FSChip.vue";
|
|
46
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
47
|
+
import FSCol from "@dative-gpi/foundation-shared-components/components/FSCol.vue";
|
|
17
48
|
|
|
18
49
|
export default defineComponent({
|
|
19
50
|
components: {
|
|
20
|
-
FSAutocompleteField
|
|
51
|
+
FSAutocompleteField,
|
|
52
|
+
FSChip,
|
|
53
|
+
FSRow,
|
|
54
|
+
FSCol,
|
|
21
55
|
},
|
|
22
56
|
props:{
|
|
23
57
|
modelValue: {
|
|
@@ -36,7 +70,10 @@ export default defineComponent({
|
|
|
36
70
|
type: String,
|
|
37
71
|
required: false
|
|
38
72
|
},
|
|
39
|
-
|
|
73
|
+
width : {
|
|
74
|
+
type: String,
|
|
75
|
+
required: false
|
|
76
|
+
}
|
|
40
77
|
},
|
|
41
78
|
emits: ['update:modelValue'],
|
|
42
79
|
setup(props) {
|
|
@@ -47,7 +84,9 @@ export default defineComponent({
|
|
|
47
84
|
return dataDefinitions.value.map((d) => {
|
|
48
85
|
return {
|
|
49
86
|
id: d.id,
|
|
50
|
-
label: d.label
|
|
87
|
+
label: d.label,
|
|
88
|
+
showUnit : d.unit && d.unit.trim().length > 0,
|
|
89
|
+
unit : d.unit,
|
|
51
90
|
}
|
|
52
91
|
})
|
|
53
92
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.29",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-core-domain": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-core-services": "1.0.
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "1.0.
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "1.0.29",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.29",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.29",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.29",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.29"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@dative-gpi/bones-ui": "^0.0.75",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"sass": "1.71.1",
|
|
27
27
|
"sass-loader": "13.3.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "8034b26b00eda886e08fbf02b2dacb67f59bdc48"
|
|
30
30
|
}
|