@dative-gpi/foundation-core-components 1.0.82 → 1.0.83
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,49 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSSelectField
|
|
3
3
|
v-if="$props.customProperty.useOnlyAllowedValues"
|
|
4
|
-
class="fs-meta-field"
|
|
5
4
|
:editable="$props.editable"
|
|
5
|
+
:itemTitle="itemTitle"
|
|
6
6
|
:label="$props.label"
|
|
7
|
+
:class="classes"
|
|
7
8
|
:items="items"
|
|
8
9
|
:modelValue="$props.modelValue"
|
|
9
10
|
@update:modelValue="onUpdate"
|
|
10
11
|
>
|
|
11
12
|
<template
|
|
12
|
-
|
|
13
|
+
v-if="$props.customProperty.dataType === PropertyDataType.Icon"
|
|
14
|
+
#item-prepend="{ item }"
|
|
13
15
|
>
|
|
14
16
|
<FSIcon
|
|
15
|
-
v-if="item.
|
|
17
|
+
v-if="item.icon"
|
|
16
18
|
>
|
|
17
|
-
{{ item.
|
|
18
|
-
</FSIcon>
|
|
19
|
-
<FSText
|
|
20
|
-
v-else
|
|
21
|
-
>
|
|
22
|
-
{{ item.raw.label }}
|
|
23
|
-
</FSText>
|
|
24
|
-
</template>
|
|
25
|
-
<template
|
|
26
|
-
#selection-mobile="{ item }"
|
|
27
|
-
>
|
|
28
|
-
<FSIcon
|
|
29
|
-
v-if="item.raw.icon"
|
|
30
|
-
>
|
|
31
|
-
{{ item.raw.icon }}
|
|
32
|
-
</FSIcon>
|
|
33
|
-
</template>
|
|
34
|
-
<template
|
|
35
|
-
#item-label="{ item, font }"
|
|
36
|
-
>
|
|
37
|
-
<FSIcon
|
|
38
|
-
v-if="item.raw.icon"
|
|
39
|
-
>
|
|
40
|
-
{{ item.raw.icon }}
|
|
19
|
+
{{ item.icon }}
|
|
41
20
|
</FSIcon>
|
|
42
21
|
<FSSpan
|
|
43
22
|
v-else
|
|
44
|
-
:font="font"
|
|
45
23
|
>
|
|
46
|
-
{{ item.
|
|
24
|
+
{{ item.label }}
|
|
47
25
|
</FSSpan>
|
|
48
26
|
</template>
|
|
49
27
|
</FSSelectField>
|
|
@@ -103,7 +81,6 @@ import FSIconField from "@dative-gpi/foundation-shared-components/components/fie
|
|
|
103
81
|
import FSSwitch from "@dative-gpi/foundation-shared-components/components/FSSwitch.vue";
|
|
104
82
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
105
83
|
import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
|
|
106
|
-
import FSText from "@dative-gpi/foundation-shared-components/components/FSText.vue";
|
|
107
84
|
|
|
108
85
|
export default defineComponent({
|
|
109
86
|
name: "FSMetaField",
|
|
@@ -114,8 +91,7 @@ export default defineComponent({
|
|
|
114
91
|
FSIconField,
|
|
115
92
|
FSSwitch,
|
|
116
93
|
FSIcon,
|
|
117
|
-
FSSpan
|
|
118
|
-
FSText
|
|
94
|
+
FSSpan
|
|
119
95
|
},
|
|
120
96
|
props: {
|
|
121
97
|
label: {
|
|
@@ -180,6 +156,23 @@ export default defineComponent({
|
|
|
180
156
|
});
|
|
181
157
|
});
|
|
182
158
|
|
|
159
|
+
const itemTitle = computed((): string => {
|
|
160
|
+
switch (props.customProperty.dataType) {
|
|
161
|
+
case PropertyDataType.Icon: return "";
|
|
162
|
+
default : return "label";
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
const classes = computed((): string[] => {
|
|
167
|
+
const classNames = ["fs-meta-field"];
|
|
168
|
+
switch(props.customProperty.dataType) {
|
|
169
|
+
case PropertyDataType.Icon:
|
|
170
|
+
classNames.push("fs-meta-icon-field");
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
return classNames;
|
|
174
|
+
});
|
|
175
|
+
|
|
183
176
|
const asNumber = (): number | null => {
|
|
184
177
|
if (!props.modelValue) {
|
|
185
178
|
return null;
|
|
@@ -216,6 +209,8 @@ export default defineComponent({
|
|
|
216
209
|
|
|
217
210
|
return {
|
|
218
211
|
PropertyDataType,
|
|
212
|
+
itemTitle,
|
|
213
|
+
classes,
|
|
219
214
|
items,
|
|
220
215
|
asBoolean,
|
|
221
216
|
asNumber,
|
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.83",
|
|
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.83",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.83",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.83",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.83",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.83"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"sass": "1.71.1",
|
|
27
27
|
"sass-loader": "13.3.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "38c4f9debe8e6bba7fe7c2f46197d04b28ce1ade"
|
|
30
30
|
}
|