@drax/dashboard-vue 0.40.0 → 0.42.2
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/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.42.2",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"module": "./src/index.ts",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"format": "prettier --write src/"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@drax/crud-front": "^0.
|
|
28
|
-
"@drax/crud-share": "^0.
|
|
27
|
+
"@drax/crud-front": "^0.42.2",
|
|
28
|
+
"@drax/crud-share": "^0.42.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"pinia": "^2.2.2",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"vue-tsc": "^2.0.11",
|
|
63
63
|
"vuetify": "^3.7.1"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "6b4f9f50a8e3f0fbdaff7ec913356834a4e2c0b5"
|
|
66
66
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {computed} from 'vue'
|
|
2
|
-
import {
|
|
2
|
+
import {useEntityStore} from "@drax/crud-vue";
|
|
3
3
|
import type {IDashboardCard} from "@drax/dashboard-share";
|
|
4
4
|
import type {IDraxCrudProvider, IEntityCrud, IEntityCrudField} from "@drax/crud-share";
|
|
5
5
|
import {useI18n} from "vue-i18n";
|
|
@@ -8,7 +8,7 @@ import {useI18n} from "vue-i18n";
|
|
|
8
8
|
export function useDashboardCard(card: IDashboardCard) {
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
const store =
|
|
11
|
+
const store = useEntityStore()
|
|
12
12
|
const {t, te} = useI18n()
|
|
13
13
|
|
|
14
14
|
const cardEntity = computed<IEntityCrud>(() => {
|
|
@@ -10,7 +10,7 @@ import type {
|
|
|
10
10
|
IEntityCrudRules
|
|
11
11
|
} from "@drax/crud-share";
|
|
12
12
|
import {DashboardProvider} from "@drax/dashboard-front";
|
|
13
|
-
import {
|
|
13
|
+
import {useEntityStore} from "@drax/crud-vue";
|
|
14
14
|
|
|
15
15
|
//Import EntityCrud Refs
|
|
16
16
|
|
|
@@ -81,7 +81,7 @@ class DashboardCrud extends EntityCrud implements IEntityCrud {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
get entities(){
|
|
84
|
-
const dashboardStore =
|
|
84
|
+
const dashboardStore = useEntityStore();
|
|
85
85
|
return dashboardStore.entities.map((entity: any) => entity.name)
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {defineStore} from "pinia";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IDashboardBase} from "@drax/dashboard-share";
|
|
3
3
|
|
|
4
4
|
export const useDashboardStore = defineStore('DashboardStore', {
|
|
5
5
|
state: () => (
|
|
6
6
|
{
|
|
7
|
-
|
|
7
|
+
dashboards: [] as IDashboardBase[],
|
|
8
8
|
|
|
9
9
|
}
|
|
10
10
|
),
|
|
11
11
|
getters: {
|
|
12
|
-
|
|
13
|
-
return state.
|
|
12
|
+
getDashboards(state: any) {
|
|
13
|
+
return state.dashboards
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
actions: {
|
|
17
|
-
|
|
18
|
-
this.
|
|
17
|
+
setDashboards(dashboards: IDashboardBase[]) {
|
|
18
|
+
this.dashboards = dashboards
|
|
19
19
|
},
|
|
20
|
-
addEntity(
|
|
21
|
-
this.
|
|
20
|
+
addEntity(dashboard: IDashboardBase) {
|
|
21
|
+
this.dashboards.push(dashboard)
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|