@dative-gpi/foundation-core-components 1.0.52 → 1.0.54

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.
@@ -0,0 +1,65 @@
1
+ <template>
2
+ <FSLoadTile
3
+ v-if="getting"
4
+ :editable="$props.editable"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
7
+ />
8
+ <FSLocationTileUI
9
+ v-else-if="entity"
10
+ :icon="entity.icon"
11
+ :label="entity.label"
12
+ :code="entity.code"
13
+ :color="entity.color"
14
+ :deviceCount="entity.deviceOrganisationsCount"
15
+ :editable="$props.editable"
16
+ :modelValue="modelValue"
17
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
18
+ v-bind="$attrs"
19
+ />
20
+ </template>
21
+
22
+ <script lang="ts">
23
+ import { defineComponent, watch } from "vue";
24
+
25
+ import { useLocation } from "@dative-gpi/foundation-core-services/composables";
26
+
27
+ import FSLocationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSLocationTileUI.vue";
28
+ import FSLoadTile from "@dative-gpi/foundation-shared-components/components/tiles/FSLoadTile.vue";
29
+
30
+ export default defineComponent({
31
+ name: "FSLocationTile",
32
+ components: {
33
+ FSLocationTileUI,
34
+ FSLoadTile
35
+ },
36
+ props: {
37
+ locationId: {
38
+ type: String,
39
+ required: true
40
+ },
41
+ modelValue: {
42
+ type: Boolean,
43
+ required: false,
44
+ default: false
45
+ },
46
+ editable: {
47
+ type: Boolean,
48
+ required: false,
49
+ default: true
50
+ }
51
+ },
52
+ setup(props) {
53
+ const { get, getting, entity } = useLocation();
54
+
55
+ watch(() => props.locationId, () => {
56
+ get(props.locationId);
57
+ }, { immediate: true });
58
+
59
+ return {
60
+ getting,
61
+ entity
62
+ };
63
+ }
64
+ });
65
+ </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": "1.0.52",
4
+ "version": "1.0.54",
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.52",
14
- "@dative-gpi/foundation-core-services": "1.0.52",
15
- "@dative-gpi/foundation-shared-components": "1.0.52",
16
- "@dative-gpi/foundation-shared-domain": "1.0.52",
17
- "@dative-gpi/foundation-shared-services": "1.0.52"
13
+ "@dative-gpi/foundation-core-domain": "1.0.54",
14
+ "@dative-gpi/foundation-core-services": "1.0.54",
15
+ "@dative-gpi/foundation-shared-components": "1.0.54",
16
+ "@dative-gpi/foundation-shared-domain": "1.0.54",
17
+ "@dative-gpi/foundation-shared-services": "1.0.54"
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": "3f7d88cfca5c1c30336482b58d65c559e4bdd386"
29
+ "gitHead": "332546e736d95d481dc97c06af935200d8344b2c"
30
30
  }