@dative-gpi/foundation-core-components 1.0.58 → 1.0.61

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.
@@ -20,10 +20,10 @@
20
20
  </template>
21
21
 
22
22
  <script lang="ts">
23
- import { defineComponent, type PropType } from "vue";
23
+ import { computed, defineComponent, type PropType } from "vue";
24
24
 
25
+ import { type GroupFilters, type GroupInfos } from "@dative-gpi/foundation-core-domain/models";
25
26
  import { useTreeView } from "@dative-gpi/foundation-shared-components/composables";
26
- import { type GroupFilters } from "@dative-gpi/foundation-core-domain/models";
27
27
  import { useGroups } from "@dative-gpi/foundation-core-services/composables";
28
28
 
29
29
  import FSTreeViewField from "@dative-gpi/foundation-shared-components/components/fields/FSTreeViewField.vue";
@@ -41,6 +41,11 @@ export default defineComponent({
41
41
  required: false,
42
42
  default: null
43
43
  },
44
+ exclude: {
45
+ type: String as PropType<string | null>,
46
+ required: false,
47
+ default: null
48
+ },
44
49
  modelValue: {
45
50
  type: [Array, String] as PropType<string[] | string | null>,
46
51
  required: false,
@@ -54,7 +59,14 @@ export default defineComponent({
54
59
  },
55
60
  emits: ["update:modelValue"],
56
61
  setup(props, { emit }) {
57
- const { getMany: getManyGroups, fetching: fetchingGroups, entities: groups } = useGroups();
62
+ const { getMany: getManyGroups, fetching: fetchingGroups, entities } = useGroups();
63
+
64
+ const groups = computed((): GroupInfos[] => {
65
+ if (!props.exclude) {
66
+ return entities.value;
67
+ }
68
+ return entities.value.filter(g => g.id !== props.exclude && !g.path.some(p => p.id === props.exclude));
69
+ });
58
70
 
59
71
  const fetch = () => {
60
72
  return getManyGroups({ ...props.groupFilters });
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.58",
4
+ "version": "1.0.61",
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.58",
14
- "@dative-gpi/foundation-core-services": "1.0.58",
15
- "@dative-gpi/foundation-shared-components": "1.0.58",
16
- "@dative-gpi/foundation-shared-domain": "1.0.58",
17
- "@dative-gpi/foundation-shared-services": "1.0.58"
13
+ "@dative-gpi/foundation-core-domain": "1.0.61",
14
+ "@dative-gpi/foundation-core-services": "1.0.61",
15
+ "@dative-gpi/foundation-shared-components": "1.0.61",
16
+ "@dative-gpi/foundation-shared-domain": "1.0.61",
17
+ "@dative-gpi/foundation-shared-services": "1.0.61"
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": "ee85735c6816c9c5f6264ac108a05e8bc6b2bec2"
29
+ "gitHead": "764e769b8eeb942d5028c00c479333be5907f4de"
30
30
  }