@dative-gpi/foundation-shared-services 0.0.43 → 0.0.45

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.
@@ -1,5 +1,4 @@
1
1
  export * from "./services";
2
2
  export * from "./useLanguageCode";
3
- export * from "./useOrganisationId";
4
3
  export * from "./useShared";
5
4
  export * from "./useTimeZone";
@@ -3,15 +3,10 @@ import { ref } from "vue";
3
3
  import { BlurHash } from "@dative-gpi/foundation-shared-domain/models";
4
4
  import { ServiceFactory } from "@dative-gpi/bones-ui";
5
5
 
6
- import { IMAGE_RAW_URL, IMAGE_BLURHASH_URL } from "../../config/urls";
6
+ import { IMAGE_BLURHASH_URL } from "../../config/urls";
7
7
 
8
8
  const ImageServiceFactory = new ServiceFactory("image", BlurHash).create(factory => factory.build(
9
9
  factory.addNotify(() => ({
10
- getRaw: async (imageId: string): Promise<string> => {
11
- const response = await ServiceFactory.http.get(IMAGE_RAW_URL(imageId));
12
-
13
- return response.data;
14
- },
15
10
  getBlurHash: async (imageId: string): Promise<BlurHash> => {
16
11
  const response = await ServiceFactory.http.get(IMAGE_BLURHASH_URL(imageId));
17
12
  const result = new BlurHash(response.data);
@@ -21,29 +16,6 @@ const ImageServiceFactory = new ServiceFactory("image", BlurHash).create(factory
21
16
  }))
22
17
  ));
23
18
 
24
- export const useImageRaw = () => {
25
- const service = ImageServiceFactory();
26
-
27
- const getting = ref(false);
28
- const entity = ref<string | null>(null);
29
-
30
- const get = async (imageId: string) => {
31
- getting.value = true;
32
- try {
33
- entity.value = await service.getRaw(imageId);
34
- }
35
- finally {
36
- getting.value = false;
37
- }
38
- return entity;
39
- }
40
-
41
- return {
42
- getting,
43
- get,
44
- entity
45
- }
46
- }
47
19
  export const useImageBlurHash = () => {
48
20
  const service = ImageServiceFactory();
49
21
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-services",
3
3
  "sideEffects": false,
4
- "version": "0.0.43",
4
+ "version": "0.0.45",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -11,11 +11,11 @@
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
13
  "@dative-gpi/bones-ui": "^0.0.61",
14
- "@dative-gpi/foundation-shared-domain": "0.0.43",
14
+ "@dative-gpi/foundation-shared-domain": "0.0.45",
15
15
  "@microsoft/signalr": "^8.0.0",
16
16
  "date-fns": "^3.2.0",
17
17
  "vue": "^3.2.0",
18
18
  "vue-router": "^4.2.5"
19
19
  },
20
- "gitHead": "69165444c1ca673a3f96fc7e7fb00a13e6bc1dfc"
20
+ "gitHead": "4af778193801da465615d1718cc5562e3297d651"
21
21
  }
@@ -1,28 +0,0 @@
1
- import { ref, watch } from "vue";
2
-
3
- const organisationId = ref<string | null>(null);
4
-
5
- export const useOrganisationId = () => {
6
- const setOrganisationId = (payload: string) => {
7
- organisationId.value = payload;
8
- };
9
-
10
- const ready = new Promise((resolve) => {
11
- if (organisationId.value) {
12
- resolve(organisationId.value);
13
- }
14
- else {
15
- watch(organisationId, () => {
16
- if (organisationId.value) {
17
- resolve(organisationId.value);
18
- }
19
- });
20
- }
21
- });
22
-
23
- return {
24
- ready,
25
- organisationId,
26
- setOrganisationId
27
- };
28
- }