@dative-gpi/foundation-core-components 0.0.97 → 0.0.98

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.
@@ -93,7 +93,7 @@
93
93
  :label="$props.customProperty.label"
94
94
  :editable="editable"
95
95
  :modelValue="asNumber()"
96
- @update:modelValue="(event) => $emit('update:modelValue', (event + getMachineOffsetMillis - getUserOffsetMillis).toString())"
96
+ @update:modelValue="(event) => $emit('update:modelValue', (event + getMachineOffsetMillis() - getUserOffsetMillis()).toString())"
97
97
  />
98
98
  <FSIconField
99
99
  v-else-if="$props.customProperty.dataType === PropertyDataType.Icon"
@@ -0,0 +1,73 @@
1
+ <template>
2
+ <FSCol
3
+ :gap="24"
4
+ >
5
+ <FSCol
6
+ v-for="(properties, category) in categories"
7
+ :key="category"
8
+ :gap="16"
9
+ >
10
+ <FSRow>
11
+ <FSText
12
+ font="text-h3"
13
+ >
14
+ {{ category }}
15
+ </FSText>
16
+ </FSRow>
17
+ <FSMetaField
18
+ v-for="(property, index) in properties"
19
+ :customProperty="property"
20
+ :editable="editable"
21
+ :key="index"
22
+ :modelValue="modelValue[property.code]"
23
+ @update:modelValue="(event) => $emit('update:modelValue', { ...modelValue, [property.code]: event})"
24
+ />
25
+ </FSCol>
26
+ </FSCol>
27
+ </template>
28
+
29
+ <script lang="ts">
30
+ import { defineComponent, PropType } from 'vue';
31
+
32
+ import { CustomPropertyInfos } from '@dative-gpi/foundation-core-domain/models';
33
+
34
+ import FSText from '@dative-gpi/foundation-shared-components/components/FSText.vue';
35
+
36
+ import FSMetaField from './FSMetaField.vue';
37
+
38
+ export default defineComponent({
39
+ name: "FSMetaFormContent",
40
+ components: {
41
+ FSMetaField,
42
+ FSText
43
+ },
44
+ props: {
45
+ customProperties: {
46
+ type: [Object] as PropType<CustomPropertyInfos[]>,
47
+ required: true
48
+ },
49
+ modelValue: {
50
+ type: Object as PropType<{ [key: string]: string }>,
51
+ required: true
52
+ },
53
+ editable: {
54
+ type: Boolean,
55
+ required: false,
56
+ default: true
57
+ }
58
+ },
59
+ setup(props) {
60
+ const categories = props.customProperties.reduce((acc, curr) => {
61
+ if (acc[curr.categoryLabel] === undefined) {
62
+ acc[curr.categoryLabel] = [];
63
+ }
64
+ acc[curr.categoryLabel].push(curr);
65
+ return acc;
66
+ }, {} as { [key: string]: CustomPropertyInfos[] });
67
+
68
+ return {
69
+ categories
70
+ };
71
+ }
72
+ });
73
+ </script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-core-components",
3
3
  "sideEffects": false,
4
- "version": "0.0.97",
4
+ "version": "0.0.98",
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": "0.0.97",
14
- "@dative-gpi/foundation-core-services": "0.0.97",
15
- "@dative-gpi/foundation-shared-components": "0.0.97",
16
- "@dative-gpi/foundation-shared-domain": "0.0.97",
17
- "@dative-gpi/foundation-shared-services": "0.0.97",
13
+ "@dative-gpi/foundation-core-domain": "0.0.98",
14
+ "@dative-gpi/foundation-core-services": "0.0.98",
15
+ "@dative-gpi/foundation-shared-components": "0.0.98",
16
+ "@dative-gpi/foundation-shared-domain": "0.0.98",
17
+ "@dative-gpi/foundation-shared-services": "0.0.98",
18
18
  "color": "^4.2.3",
19
19
  "vue": "^3.4.23",
20
20
  "vuedraggable": "^4.1.0"
@@ -24,5 +24,5 @@
24
24
  "sass": "^1.69.5",
25
25
  "sass-loader": "^13.3.2"
26
26
  },
27
- "gitHead": "693196d41a0a3852953992a72defed751ef2dde3"
27
+ "gitHead": "3e3b2cf8888bd50741bd2d91a76ebb7f53ff5f27"
28
28
  }