@dative-gpi/foundation-core-services 1.0.169 → 1.0.171
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/composables/index.ts +0 -1
- package/composables/services/index.ts +0 -3
- package/config/urls/index.ts +0 -3
- package/package.json +3 -3
- package/composables/services/useGroupings.ts +0 -12
- package/composables/services/useSubgroupingDeviceOrganisations.ts +0 -57
- package/composables/services/useSubgroupings.ts +0 -12
- package/composables/useMagicFieldProvider.ts +0 -24
- package/config/urls/groupings.ts +0 -4
- package/config/urls/subgroupingDeviceOrganisations.ts +0 -4
- package/config/urls/subgroupings.ts +0 -4
package/composables/index.ts
CHANGED
|
@@ -23,7 +23,6 @@ export * from "./useDeviceExplorerElements";
|
|
|
23
23
|
export * from "./useDeviceOrganisations";
|
|
24
24
|
export * from "./useDeviceStatuses";
|
|
25
25
|
export * from "./useFolders";
|
|
26
|
-
export * from "./useGroupings";
|
|
27
26
|
export * from "./useGroups";
|
|
28
27
|
export * from "./useLocations";
|
|
29
28
|
export * from "./useManufacturers";
|
|
@@ -40,8 +39,6 @@ export * from "./useScenarioOrganisationTypes";
|
|
|
40
39
|
export * from "./useServiceAccountOrganisationAuthTokens";
|
|
41
40
|
export * from "./useServiceAccountOrganisations";
|
|
42
41
|
export * from "./useServiceAccountRoleOrganisations";
|
|
43
|
-
export * from "./useSubgroupingDeviceOrganisations";
|
|
44
|
-
export * from "./useSubgroupings"
|
|
45
42
|
export * from "./useUserOrganisations";
|
|
46
43
|
export * from "./useUserOrganisationTables";
|
|
47
44
|
export * from "./useWidgetTemplates";
|
package/config/urls/index.ts
CHANGED
|
@@ -22,7 +22,6 @@ export * from "./deviceExplorerElements";
|
|
|
22
22
|
export * from "./deviceStatuses";
|
|
23
23
|
export * from "./folders";
|
|
24
24
|
export * from "./groups";
|
|
25
|
-
export * from "./groupings";
|
|
26
25
|
export * from "./locations";
|
|
27
26
|
export * from "./manufacturers";
|
|
28
27
|
export * from "./models";
|
|
@@ -39,8 +38,6 @@ export * from "./scenarioOrganisationTypes";
|
|
|
39
38
|
export * from "./serviceAccountOrganisationAuthTokens";
|
|
40
39
|
export * from "./serviceAccountOrganisations";
|
|
41
40
|
export * from "./serviceAccountRoleOrganisations";
|
|
42
|
-
export * from "./subgroupingDeviceOrganisations";
|
|
43
|
-
export * from "./subgroupings";
|
|
44
41
|
export * from "./userOrganisations";
|
|
45
42
|
export * from "./userOrganisationTables";
|
|
46
43
|
export * from "./widgetTemplates";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-services",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.171",
|
|
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-core-domain": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "1.0.171"
|
|
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": "c3e976e42189e442a29e0596ee33008644f27ef4"
|
|
22
22
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { GroupingDetails, type GroupingDetailsDTO, type GroupingFilters, GroupingInfos, type GroupingInfosDTO, type CreateGroupingDTO, type UpdateGroupingDTO } from "@dative-gpi/foundation-core-domain/models/groupings";
|
|
2
|
-
import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui/core";
|
|
3
|
-
import { GROUPINGS_URL, GROUPING_URL } from "@dative-gpi/foundation-core-services/config/urls";
|
|
4
|
-
|
|
5
|
-
const GroupingServiceFactory = new ServiceFactory<GroupingDetailsDTO, GroupingDetails>("grouping", GroupingDetails)
|
|
6
|
-
.createComplete<GroupingInfos, GroupingInfosDTO, CreateGroupingDTO, UpdateGroupingDTO, GroupingFilters>(GROUPINGS_URL, GROUPING_URL, GroupingInfos);
|
|
7
|
-
|
|
8
|
-
export const useGrouping = ComposableFactory.get(GroupingServiceFactory);
|
|
9
|
-
export const useGroupings = ComposableFactory.getMany(GroupingServiceFactory);
|
|
10
|
-
export const useCreateGrouping = ComposableFactory.create(GroupingServiceFactory);
|
|
11
|
-
export const useUpdateGrouping = ComposableFactory.update(GroupingServiceFactory);
|
|
12
|
-
export const useRemoveGrouping = ComposableFactory.remove(GroupingServiceFactory);
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { computed } from "vue";
|
|
2
|
-
import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui/core";
|
|
3
|
-
|
|
4
|
-
import { SubgroupingDeviceOrganisationDetails, CompleteSubgroupingDeviceOrganisation, type SubgroupingDeviceOrganisationDetailsDTO, type SubgroupingDeviceOrganisationFilters, SubgroupingDeviceOrganisationInfos, type SubgroupingDeviceOrganisationInfosDTO, type CreateSubgroupingDeviceOrganisationDTO } from "@dative-gpi/foundation-core-domain/models";
|
|
5
|
-
import { SUBGROUPING_DEVICE_ORGANISATIONS_URL, SUBGROUPING_DEVICE_ORGANISATION_URL } from "../../config/urls";
|
|
6
|
-
import { useDeviceOrganisations } from "./useDeviceOrganisations";
|
|
7
|
-
|
|
8
|
-
const SubgroupingDeviceOrganisationServiceFactory = new ServiceFactory<SubgroupingDeviceOrganisationDetailsDTO, SubgroupingDeviceOrganisationDetails>("subgroupingDeviceOrganisation", SubgroupingDeviceOrganisationDetails)
|
|
9
|
-
.createComplete<SubgroupingDeviceOrganisationInfos, SubgroupingDeviceOrganisationInfosDTO, CreateSubgroupingDeviceOrganisationDTO, null, SubgroupingDeviceOrganisationFilters>(SUBGROUPING_DEVICE_ORGANISATIONS_URL, SUBGROUPING_DEVICE_ORGANISATION_URL, SubgroupingDeviceOrganisationInfos);
|
|
10
|
-
|
|
11
|
-
export const useSubgroupingDeviceOrganisation = ComposableFactory.get(SubgroupingDeviceOrganisationServiceFactory);
|
|
12
|
-
export const useCreateSubgroupingDeviceOrganisation = ComposableFactory.create(SubgroupingDeviceOrganisationServiceFactory);
|
|
13
|
-
export const useRemoveSubgroupingDeviceOrganisation = ComposableFactory.remove(SubgroupingDeviceOrganisationServiceFactory);
|
|
14
|
-
|
|
15
|
-
export const useSubgroupingDeviceOrganisations = ComposableFactory.getMany(SubgroupingDeviceOrganisationServiceFactory);
|
|
16
|
-
|
|
17
|
-
export const useCompleteSubgroupingDeviceOrganisations = () => {
|
|
18
|
-
const {
|
|
19
|
-
entities: subgroupingDeviceOrganisations,
|
|
20
|
-
getMany: getManySubgroupingDeviceOrganisations,
|
|
21
|
-
fetching: fetchingSubgroupingDeviceOrganisations
|
|
22
|
-
} = useSubgroupingDeviceOrganisations();
|
|
23
|
-
|
|
24
|
-
const { entities: deviceOrganisations, getMany: getManyDeviceOrganisations, fetching: fetchingDeviceOrganisations }
|
|
25
|
-
= useDeviceOrganisations();
|
|
26
|
-
|
|
27
|
-
const completeFetching = computed(() => fetchingDeviceOrganisations.value || fetchingSubgroupingDeviceOrganisations.value);
|
|
28
|
-
|
|
29
|
-
const completeEntities = computed(() => {
|
|
30
|
-
const subgroupingDeviceOrganisationsList = subgroupingDeviceOrganisations.value;
|
|
31
|
-
const deviceOrganisationsList = deviceOrganisations.value;
|
|
32
|
-
|
|
33
|
-
return subgroupingDeviceOrganisationsList.map(subgroupingDeviceOrganisation => {
|
|
34
|
-
const deviceOrganisation = deviceOrganisationsList.find(
|
|
35
|
-
deviceOrganisation => deviceOrganisation.id === subgroupingDeviceOrganisation.deviceOrganisationId
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
return new CompleteSubgroupingDeviceOrganisation({
|
|
39
|
-
subgroupingDeviceOrganisation: subgroupingDeviceOrganisation,
|
|
40
|
-
deviceOrganisation: deviceOrganisation!
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
const completeGetMany = (...params: Parameters<typeof getManySubgroupingDeviceOrganisations>) => {
|
|
46
|
-
return Promise.all([
|
|
47
|
-
getManySubgroupingDeviceOrganisations(...params),
|
|
48
|
-
getManyDeviceOrganisations(),
|
|
49
|
-
]).then(() => completeEntities.value);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return {
|
|
53
|
-
entities: completeEntities,
|
|
54
|
-
getMany: completeGetMany,
|
|
55
|
-
fetching: completeFetching
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SubgroupingDetails, type SubgroupingDetailsDTO, type SubgroupingFilters, SubgroupingInfos, type SubgroupingInfosDTO, type CreateSubgroupingDTO, type UpdateSubgroupingDTO } from "@dative-gpi/foundation-core-domain/models";
|
|
2
|
-
import { ComposableFactory, ServiceFactory } from "@dative-gpi/bones-ui/core";
|
|
3
|
-
import { SUBGROUPINGS_URL, SUBGROUPING_URL } from "../../config/urls";
|
|
4
|
-
|
|
5
|
-
const SubgroupingServiceFactory = new ServiceFactory<SubgroupingDetailsDTO, SubgroupingDetails>("subgrouping", SubgroupingDetails)
|
|
6
|
-
.createComplete<SubgroupingInfos, SubgroupingInfosDTO, CreateSubgroupingDTO, UpdateSubgroupingDTO, SubgroupingFilters>(SUBGROUPINGS_URL, SUBGROUPING_URL, SubgroupingInfos);
|
|
7
|
-
|
|
8
|
-
export const useSubgrouping = ComposableFactory.get(SubgroupingServiceFactory);
|
|
9
|
-
export const useSubgroupings = ComposableFactory.getMany(SubgroupingServiceFactory);
|
|
10
|
-
export const useCreateSubgrouping = ComposableFactory.create(SubgroupingServiceFactory);
|
|
11
|
-
export const useUpdateSubgrouping = ComposableFactory.update(SubgroupingServiceFactory);
|
|
12
|
-
export const useRemoveSubgrouping = ComposableFactory.remove(SubgroupingServiceFactory);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent } from "vue";
|
|
2
|
-
|
|
3
|
-
import { MagicFieldType } from "@dative-gpi/foundation-core-domain/models/magicFields";
|
|
4
|
-
|
|
5
|
-
const FIELDS = {
|
|
6
|
-
[MagicFieldType.NumberField] : defineAsyncComponent(() => import("@dative-gpi/foundation-shared-components/components/fields/FSNumberField.vue")),
|
|
7
|
-
[MagicFieldType.TextField] : defineAsyncComponent(() => import("@dative-gpi/foundation-shared-components/components/fields/FSTextField.vue")),
|
|
8
|
-
[MagicFieldType.Switch] : defineAsyncComponent(() => import("@dative-gpi/foundation-shared-components/components/FSSwitch.vue")),
|
|
9
|
-
[MagicFieldType.DateTimeField] : defineAsyncComponent(() => import("@dative-gpi/foundation-shared-components/components/fields/FSDateTimeField.vue")),
|
|
10
|
-
[MagicFieldType.IconField] : defineAsyncComponent(() => import("@dative-gpi/foundation-shared-components/components/fields/FSIconField.vue")),
|
|
11
|
-
[MagicFieldType.TimeField] : defineAsyncComponent(() => import("@dative-gpi/foundation-shared-components/components/fields/FSTimeField.vue")),
|
|
12
|
-
[MagicFieldType.TimeStepField] : defineAsyncComponent(() => import("@dative-gpi/foundation-shared-components/components/fields/FSTimeStepField.vue")),
|
|
13
|
-
[MagicFieldType.PlotPerField] : defineAsyncComponent(() => import("@dative-gpi/foundation-core-components/components/selects/FSPlotPerSelector.vue")),
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const useMagicFieldProvider = () => {
|
|
17
|
-
const get = (code: keyof typeof FIELDS) => {
|
|
18
|
-
return FIELDS[code];
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
return {
|
|
22
|
-
get
|
|
23
|
-
};
|
|
24
|
-
};
|
package/config/urls/groupings.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { CORE_URL } from "./base";
|
|
2
|
-
|
|
3
|
-
export const SUBGROUPING_DEVICE_ORGANISATIONS_URL = () => `${CORE_URL()}/subgrouping-device-organisations`;
|
|
4
|
-
export const SUBGROUPING_DEVICE_ORGANISATION_URL = (id: string) => `${SUBGROUPING_DEVICE_ORGANISATIONS_URL()}/${encodeURIComponent(id)}`;
|