@dative-gpi/foundation-core-components 0.0.7 → 0.0.9
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.
- package/components/tiles/FSDeviceOrganisationTile.vue +71 -0
- package/components/tiles/FSGroupTile.vue +68 -0
- package/package.json +9 -7
- package/styles/components/fs_disposition_button.scss +8 -0
- package/styles/components/index.scss +1 -0
- package/styles/main.scss +3 -0
- package/components/FSCoreButton.vue +0 -26
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSLoadTile
|
|
3
|
+
v-if="getting"
|
|
4
|
+
:editable="$props.editable"
|
|
5
|
+
:modelValue="$props.modelValue"
|
|
6
|
+
@update:modelValue="(value) => $emit('update:modelValue', value)"
|
|
7
|
+
/>
|
|
8
|
+
<FSDeviceOrganisationTileUI
|
|
9
|
+
v-else-if="entity"
|
|
10
|
+
:imageId="entity.imageId"
|
|
11
|
+
:label="entity.label"
|
|
12
|
+
:code="entity.code"
|
|
13
|
+
:deviceConnectivity="entity.connectivity"
|
|
14
|
+
:deviceWorstAlert="entity.worstAlert"
|
|
15
|
+
:deviceAlerts="entity.alerts"
|
|
16
|
+
:modelStatuses="entity.modelStatuses"
|
|
17
|
+
:deviceStatuses="entity.status?.statuses"
|
|
18
|
+
:editable="$props.editable"
|
|
19
|
+
:modelValue="$props.modelValue"
|
|
20
|
+
@update:modelValue="(value) => $emit('update:modelValue', value)"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script lang="ts">
|
|
25
|
+
import { defineComponent, onMounted, watch } from "vue";
|
|
26
|
+
|
|
27
|
+
import FSDeviceOrganisationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSDeviceOrganisationTileUI.vue";
|
|
28
|
+
import FSLoadTile from "@dative-gpi/foundation-shared-components/components/FSLoadTile.vue";
|
|
29
|
+
|
|
30
|
+
import { useDeviceOrganisation } from "@dative-gpi/foundation-core-services/composables";
|
|
31
|
+
|
|
32
|
+
export default defineComponent({
|
|
33
|
+
name: "FSDeviceOrganisationTile",
|
|
34
|
+
components: {
|
|
35
|
+
FSDeviceOrganisationTileUI,
|
|
36
|
+
FSLoadTile
|
|
37
|
+
},
|
|
38
|
+
props: {
|
|
39
|
+
deviceOrganisationId: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true
|
|
42
|
+
},
|
|
43
|
+
modelValue: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
required: false,
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
48
|
+
editable: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
required: false,
|
|
51
|
+
default: true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
setup(props) {
|
|
55
|
+
const { get, getting, entity } = useDeviceOrganisation();
|
|
56
|
+
|
|
57
|
+
onMounted(() => {
|
|
58
|
+
get(props.deviceOrganisationId);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
watch(() => props.deviceOrganisationId, () => {
|
|
62
|
+
get(props.deviceOrganisationId);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
getting,
|
|
67
|
+
entity
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
</script>
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
<FSGroupTileUI
|
|
9
|
+
v-else-if="entity"
|
|
10
|
+
:imageId="entity.imageId"
|
|
11
|
+
:label="entity.label"
|
|
12
|
+
:code="entity.code"
|
|
13
|
+
:recursiveGroupsIds="entity.recursiveGroupsIds"
|
|
14
|
+
:recursiveDeviceOrganisationsIds="entity.recursiveDeviceOrganisationsIds"
|
|
15
|
+
:editable="$props.editable"
|
|
16
|
+
:modelValue="modelValue"
|
|
17
|
+
@update:modelValue="(value) => $emit('update:modelValue', value)"
|
|
18
|
+
/>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import { defineComponent, onMounted, watch } from "vue";
|
|
23
|
+
|
|
24
|
+
import FSGroupTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSGroupTileUI.vue";
|
|
25
|
+
import FSLoadTile from "@dative-gpi/foundation-shared-components/components/FSLoadTile.vue";
|
|
26
|
+
|
|
27
|
+
import { useGroup } from "@dative-gpi/foundation-core-services/composables";
|
|
28
|
+
|
|
29
|
+
export default defineComponent({
|
|
30
|
+
name: "FSGroupTile",
|
|
31
|
+
components: {
|
|
32
|
+
FSGroupTileUI,
|
|
33
|
+
FSLoadTile
|
|
34
|
+
},
|
|
35
|
+
props: {
|
|
36
|
+
groupId: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: true
|
|
39
|
+
},
|
|
40
|
+
modelValue: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
required: false,
|
|
43
|
+
default: false
|
|
44
|
+
},
|
|
45
|
+
editable: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
required: false,
|
|
48
|
+
default: true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
setup(props) {
|
|
52
|
+
const { get, getting, entity } = useGroup();
|
|
53
|
+
|
|
54
|
+
onMounted(() => {
|
|
55
|
+
get(props.groupId);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
watch(() => props.groupId, () => {
|
|
59
|
+
get(props.groupId);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
getting,
|
|
64
|
+
entity
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,17 +9,19 @@
|
|
|
9
9
|
"author": "",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@dative-gpi/foundation-core-domain": "0.0.
|
|
13
|
-
"@dative-gpi/foundation-core-services": "0.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-
|
|
15
|
-
"@dative-gpi/foundation-shared-
|
|
12
|
+
"@dative-gpi/foundation-core-domain": "0.0.9",
|
|
13
|
+
"@dative-gpi/foundation-core-services": "0.0.9",
|
|
14
|
+
"@dative-gpi/foundation-shared-components": "0.0.9",
|
|
15
|
+
"@dative-gpi/foundation-shared-domain": "0.0.9",
|
|
16
|
+
"@dative-gpi/foundation-shared-services": "0.0.9",
|
|
16
17
|
"color": "^4.2.3",
|
|
17
|
-
"vue": "^3.2.0"
|
|
18
|
+
"vue": "^3.2.0",
|
|
19
|
+
"vuedraggable": "^4.1.0"
|
|
18
20
|
},
|
|
19
21
|
"devDependencies": {
|
|
20
22
|
"@types/color": "^3.0.6",
|
|
21
23
|
"sass": "^1.69.5",
|
|
22
24
|
"sass-loader": "^13.3.2"
|
|
23
25
|
},
|
|
24
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "d079d93c7d8677f8269b97bc71820bc35dc46921"
|
|
25
27
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "fs_disposition_button.scss";
|
package/styles/main.scss
ADDED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<FSButton
|
|
4
|
-
label="ThisIsACoreButton"
|
|
5
|
-
/>
|
|
6
|
-
</div>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script lang="ts">
|
|
10
|
-
import { defineComponent, PropType, toRefs } from "vue";
|
|
11
|
-
import FSButton from "@dative-gpi/foundation-shared-components/components/FSButton.vue";
|
|
12
|
-
|
|
13
|
-
export default defineComponent({
|
|
14
|
-
name: "FSCoreButton",
|
|
15
|
-
components: {
|
|
16
|
-
FSButton
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
},
|
|
20
|
-
setup(props) {
|
|
21
|
-
return {
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
</script>
|
|
26
|
-
|