@dative-gpi/foundation-shared-services 1.0.133 → 1.0.134
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 +3 -3
- package/tools/hubFactory.ts +5 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-services",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.134",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.134"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"vue": "^3.4.38",
|
|
19
19
|
"vue-router": "^4.3.0"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "a8b8d2c285134ca72edf1bb0d3e224815f04c131"
|
|
22
22
|
}
|
package/tools/hubFactory.ts
CHANGED
|
@@ -10,7 +10,7 @@ export class HubFactory {
|
|
|
10
10
|
|
|
11
11
|
let connection: signalR.HubConnection | null = null;
|
|
12
12
|
let subscribed = false;
|
|
13
|
-
|
|
13
|
+
const watchManySubscribers = ref(0);
|
|
14
14
|
const watcheds = ref<string[]>([]);
|
|
15
15
|
|
|
16
16
|
return () => {
|
|
@@ -24,7 +24,7 @@ export class HubFactory {
|
|
|
24
24
|
|
|
25
25
|
configureHooks(connection, {
|
|
26
26
|
isWatched: (id: string) => watcheds.value.includes(id),
|
|
27
|
-
hasWatchers: () => watchManySubscribers > 0,
|
|
27
|
+
hasWatchers: () => watchManySubscribers.value > 0,
|
|
28
28
|
})
|
|
29
29
|
}
|
|
30
30
|
if (connection.state !== signalR.HubConnectionState.Connected) {
|
|
@@ -48,7 +48,7 @@ export class HubFactory {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
const hasSubscribers = computed(() => watcheds.value.length > 0 || watchManySubscribers > 0);
|
|
51
|
+
const hasSubscribers = computed(() => watcheds.value.length > 0 || watchManySubscribers.value > 0);
|
|
52
52
|
|
|
53
53
|
watch(hasSubscribers, async (value) => {
|
|
54
54
|
if (value) {
|
|
@@ -68,11 +68,11 @@ export class HubFactory {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
const subscribeToMany = () => {
|
|
71
|
-
watchManySubscribers++;
|
|
71
|
+
watchManySubscribers.value++;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
const unsubscribeFromMany = () => {
|
|
75
|
-
watchManySubscribers--;
|
|
75
|
+
watchManySubscribers.value--;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
return {
|