@dative-gpi/foundation-core-components 1.0.36 → 1.0.37-report-v1

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.
Files changed (84) hide show
  1. package/components/autocompletes/FSAutocompleteChart.vue +18 -8
  2. package/components/autocompletes/FSAutocompleteDashboard.vue +16 -6
  3. package/components/autocompletes/FSAutocompleteDashboardOrganisation.vue +7 -1
  4. package/components/autocompletes/FSAutocompleteDataCategory.vue +11 -5
  5. package/components/autocompletes/FSAutocompleteDataDefinition.vue +7 -1
  6. package/components/autocompletes/FSAutocompleteGroup.vue +7 -1
  7. package/components/autocompletes/FSAutocompleteLocation.vue +6 -0
  8. package/components/autocompletes/FSAutocompleteManufacturer.vue +8 -0
  9. package/components/autocompletes/FSAutocompleteModel.vue +9 -1
  10. package/components/autocompletes/FSAutocompleteOrganisationType.vue +7 -1
  11. package/components/autocompletes/FSAutocompleteRole.vue +17 -6
  12. package/components/autocompletes/FSAutocompleteServiceAccountRoleOrganisation.vue +7 -1
  13. package/components/autocompletes/FSAutocompleteUserOrganisation.vue +9 -1
  14. package/components/chips/FSChipGroupUserOrganisation.vue +61 -0
  15. package/components/chips/FSChipGroupUserOrganisationUI.vue +38 -0
  16. package/components/customProperties/FSMetaField.vue +31 -35
  17. package/components/customProperties/FSMetaHistory.vue +4 -4
  18. package/components/customProperties/FSMetaValue.vue +66 -33
  19. package/components/customProperties/helpers.ts +2 -1
  20. package/components/entities/FSBaseEntitiesList.vue +50 -0
  21. package/components/entities/FSDialogSelectEntities.vue +83 -0
  22. package/components/entities/FSEntityField.vue +203 -0
  23. package/components/entities/FSSelectEntitiesList.vue +209 -0
  24. package/components/entities/FSSimpleEntitiesList.vue +100 -0
  25. package/components/explorers/FSBaseDevicesExplorer.vue +310 -0
  26. package/components/explorers/FSBaseFoldersExplorer.vue +277 -0
  27. package/components/lists/FSDataTable.vue +23 -21
  28. package/components/lists/alerts/FSBaseAlertsList.vue +338 -0
  29. package/components/lists/alerts/FSButtonAcknowledgeAlert.vue +101 -0
  30. package/components/lists/authTokens/FSBaseAuthTokensList.vue +79 -0
  31. package/components/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue +205 -0
  32. package/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue +206 -0
  33. package/components/lists/charts/FSBaseChartsList.vue +268 -0
  34. package/components/lists/comments/FSBaseCommentsList.vue +143 -0
  35. package/components/lists/connectivityScenarios/FSBaseConnectivityScenariosList.vue +128 -0
  36. package/components/lists/dashboardOrganisationTypes/FSBaseDashboardOrganisationTypesList.vue +179 -0
  37. package/components/lists/dashboards/FSBaseDashboardsList.vue +235 -0
  38. package/components/lists/dashboards/FSSimpleDashboardsList.vue +62 -0
  39. package/components/lists/dataCategories/FSBaseDataCategoriesList.vue +155 -0
  40. package/components/lists/dataDefinitions/FSBaseDataDefinitionsList.vue +130 -0
  41. package/components/lists/deviceOrganisations/FSBaseDeviceOrganisationsList.vue +378 -0
  42. package/components/lists/deviceOrganisations/FSSimpleDeviceOrganisationsList.vue +44 -0
  43. package/components/lists/folders/FSBaseFoldersList.vue +127 -0
  44. package/components/lists/folders/FSSimpleFoldersList.vue +44 -0
  45. package/components/lists/groups/FSBaseGroupsList.vue +136 -0
  46. package/components/lists/groups/FSSimpleGroupsList.vue +44 -0
  47. package/components/lists/locations/FSBaseLocationsList.vue +118 -0
  48. package/components/lists/locations/FSSimpleLocationsList.vue +44 -0
  49. package/components/lists/models/FSBaseModelsList.vue +155 -0
  50. package/components/lists/models/FSSimpleModelsList.vue +44 -0
  51. package/components/lists/reports/FSBaseReportExecutionsList.vue +137 -0
  52. package/components/lists/reports/FSBaseReportsList.vue +140 -0
  53. package/components/lists/roleOrganisationTypes/FSBaseRoleOrganisationTypesList.vue +128 -0
  54. package/components/lists/roleOrganisations/FSBaseRoleOrganisationsList.vue +128 -0
  55. package/components/lists/scenarioOrganisationTypes/FSBaseScenarioOrganisationTypesList.vue +157 -0
  56. package/components/lists/scenarioOrganisations/FSBaseScenarioOrganisationsList.vue +145 -0
  57. package/components/lists/scenarios/FSBaseScenariosList.vue +241 -0
  58. package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue +155 -0
  59. package/components/lists/serviceAccountRoleOrganisations/FSBaseServiceAccountRoleOrganisationsList.vue +128 -0
  60. package/components/lists/userOrganisations/FSBaseUserOrganisationsList.vue +171 -0
  61. package/components/lists/userOrganisations/FSSimpleUserOrganisationsList.vue +45 -0
  62. package/components/tiles/FSChartTile.vue +70 -0
  63. package/components/tiles/FSDeviceOrganisationTile.vue +9 -2
  64. package/components/tiles/FSLocationTile.vue +66 -0
  65. package/components/treeviews/FSTreeViewFolder.vue +15 -3
  66. package/components/treeviews/FSTreeViewGroup.vue +22 -4
  67. package/package.json +9 -9
  68. package/utils/dashboards.ts +33 -5
  69. package/utils/index.ts +2 -2
  70. package/utils/permissions.ts +80 -0
  71. package/utils/roles.ts +4 -4
  72. package/utils/tables.ts +41 -0
  73. package/utils/users.ts +7 -4
  74. package/components/selects/FSAggregationSelector.vue +0 -51
  75. package/components/selects/FSAxisTypeSelector.vue +0 -48
  76. package/components/selects/FSDisplayAsSelector.vue +0 -52
  77. package/components/selects/FSFilterTypeSelector.vue +0 -53
  78. package/components/selects/FSHeatmapRuleSelector.vue +0 -52
  79. package/components/selects/FSOperationOnSelector.vue +0 -51
  80. package/components/selects/FSPlanningTypeSelector.vue +0 -51
  81. package/components/selects/FSPlotPerSelector.vue +0 -51
  82. package/components/selects/FSSelectSelectedEntities.vue +0 -59
  83. package/components/selects/FSSerieTypeSelector.vue +0 -51
  84. package/utils/charts.ts +0 -136
package/utils/roles.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
2
2
  import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
3
- import { RoleType } from "@dative-gpi/foundation-core-domain/models"
3
+ import { RoleType } from "@dative-gpi/foundation-shared-domain/enums";
4
4
 
5
5
  const { $tr } = useTranslationsProvider();
6
6
 
7
7
  export const roleTypeLabel = (type: RoleType): string => {
8
8
  switch (type) {
9
- case RoleType.None: return $tr("ui.role-type.none", "None");
10
- case RoleType.Organisation: return $tr("ui.role-type.organisation", "Custom");
11
- case RoleType.OrganisationType: return $tr("ui.role-type.organisation-type", "Shared");
9
+ case RoleType.None: return $tr("ui.common.none", "None");
10
+ case RoleType.Organisation: return $tr("ui.common.custom", "Custom");
11
+ case RoleType.OrganisationType: return $tr("ui.common.shared", "Shared");
12
12
  }
13
13
  };
14
14
 
@@ -0,0 +1,41 @@
1
+
2
+ export const DASHBOARDS_EXPLORER_MAIN = "ui.tables.folder-mock.explorer-main";
3
+ export const DASHBOARDS_EXPLORER_SHARED = "ui.tables.dashboard-mock.explorer-shared";
4
+ export const DEVICES_EXPLORER_MAIN = "ui.tables.group-mock.explorer-main";
5
+
6
+ export const DEVICES_LIST_MAIN = "ui.tables.device.main";
7
+ export const DEVICES_MAINTENANCE = "ui.tables.device.maintenance";
8
+ export const LOCATIONS_LIST_MAIN = "ui.tables.location.main";
9
+
10
+ export const CHARTS_LIST_MAIN = "ui.tables.chart.main";
11
+ export const CHARTS_LIST_SHARED = "ui.tables.chart.shared";
12
+
13
+ export const SCENARIOS_LIST_MAIN = "ui.tables.scenario.main";
14
+ export const SCENARIOS_LIST_SHARED = "ui.tables.scenario.shared";
15
+ export const CONNECTIVITY_SCENARIOS_LIST_MAIN = "ui.tables.connectivity-scenario.main";
16
+
17
+ export const ALERTS_LIST_MAIN = "ui.tables.alert.main";
18
+ export const CONNECTIVITY_ALERTS_LIST_MAIN = "ui.tables.connectivity-alert.main";
19
+
20
+ export const DEVICES_SELECT = "ui.tables.device.select";
21
+ export const GROUPS_SELECT = "ui.tables.group.select";
22
+ export const LOCATIONS_SELECT = "ui.tables.location.select";
23
+ export const MODELS_SELECT = "ui.tables.model.select";
24
+ export const DASHBOARDS_SELECT = "ui.tables.dashboard-mock.select";
25
+
26
+ export const WIDGET_DASHBOARDS_EXPLORER = "ui.tables.folder-mock.widget";
27
+
28
+ export const LOCATION_DEVICES = "ui.tables.device.location-devices";
29
+ export const DEVICE_ALERTS = "ui.tables.alert.device-alerts";
30
+ export const DEVICE_CONNECTIVITY_ALERTS = "ui.tables.connectivity-alerts.device-connectivity-alerts";
31
+ export const SCENARIO_ALERTS = "ui.tables.alert.scenario-alerts";
32
+ export const SCENARIO_DEVICE_ORGANISATIONS = "ui.tables.scenario-device.scenario-device-organisations";
33
+ export const ALERT_COMMENTS = "ui.tables.comments.alert-comments";
34
+
35
+ export const ORGANISATION_USERS = "ui.tables.user.organisation-users";
36
+ export const ORGANISATION_ROLES = "ui.tables.role.organisation-roles";
37
+ export const ORGANISATION_SERVICE_ACCOUNTS = "ui.tables.service-account.organisation-service-accounts";
38
+
39
+ export const USER_AUTHENTICATION_TOKENS = "ui.tables.auth-token.user-auth-tokens";
40
+
41
+ export const CUSTOM_PROPERTIES_VALUES = "ui.tables.custom-property-value.history";
package/utils/users.ts CHANGED
@@ -1,13 +1,14 @@
1
1
  import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
2
- import { UserType, UserValidityState } from "@dative-gpi/foundation-core-domain/models"
2
+ import { UserType, UserValidityState } from "@dative-gpi/foundation-shared-domain/enums";
3
3
 
4
4
  const { $tr } = useTranslationsProvider();
5
5
 
6
6
  export const userTypeLabel = (type: UserType): string => {
7
7
  switch (type) {
8
- case UserType.User: return $tr("ui.user-type.user", "User");
9
- case UserType.ServiceAccount: return $tr("ui.user-type.service-account", "Service account");
10
- case UserType.Extension: return $tr("ui.user-type.extension", "Extension");
8
+ case UserType.User: return $tr("ui.common.user", "User");
9
+ case UserType.ServiceAccount: return $tr("ui.common.service-account", "Service account");
10
+ case UserType.Extension: return $tr("ui.common.extension", "Extension");
11
+ default: return "";
11
12
  }
12
13
  };
13
14
 
@@ -16,6 +17,7 @@ export const userTypeIcon = (type: UserType): string => {
16
17
  case UserType.User: return "mdi-account-multiple-outline";
17
18
  case UserType.ServiceAccount: return "mdi-puzzle-outline";
18
19
  case UserType.Extension: return "mdi-cog-outline";
20
+ default: return "";
19
21
  }
20
22
  };
21
23
 
@@ -25,5 +27,6 @@ export const userValidityLabel = (validity: UserValidityState): string => {
25
27
  case UserValidityState.InvitationSent: return $tr("ui.user-validity.invitation-sent", "Invitation sent");
26
28
  case UserValidityState.AccountCreated: return $tr("ui.user-validity.account-created", "Not validated");
27
29
  case UserValidityState.AccountValidated: return $tr("ui.user-validity.account-validated", "Validated");
30
+ default: return "";
28
31
  }
29
32
  }
@@ -1,51 +0,0 @@
1
- <template>
2
- <FSAutocompleteField
3
- :label="label ?? $tr('ui.common.aggregation-type','Aggregation')"
4
- :items="aggregationTypeItems"
5
- :modelValue="modelValue"
6
- @update:modelValue="$emit('update:modelValue', $event)"
7
- v-bind="$attrs"
8
- />
9
- </template>
10
-
11
- <script lang="ts">
12
- import { computed, defineComponent, type PropType } from "vue";
13
-
14
- import {AggregationType} from "@dative-gpi/foundation-core-domain/models";
15
-
16
- import {aggregationTypeLabel, getEnumEntries} from "../../utils";
17
-
18
- import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
19
-
20
- export default defineComponent({
21
- components: {
22
- FSAutocompleteField
23
- },
24
- props: {
25
- modelValue : {
26
- type: Number as PropType<AggregationType>,
27
- required: false
28
- },
29
- label : {
30
- type: String,
31
- required: false
32
- }
33
- },
34
- emits: ['update:modelValue'],
35
- setup() {
36
-
37
- const aggregationTypeItems = computed(()=>{
38
- return getEnumEntries(AggregationType).filter(f=>f.value != AggregationType.None).map((f)=>{
39
- return {
40
- id: f.value,
41
- label: aggregationTypeLabel(f.value)
42
- }
43
- })
44
- });
45
-
46
- return {
47
- aggregationTypeItems
48
- }
49
- }
50
- })
51
- </script>
@@ -1,48 +0,0 @@
1
- <template>
2
- <FSToggleSet
3
- :hideHeader="true"
4
- :values="axisTypeItems"
5
- :modelValue="modelValue"
6
- @update:modelValue="$emit('update:modelValue', $event)"
7
- v-bind="$attrs"
8
- />
9
- </template>
10
-
11
- <script lang="ts">
12
- import { computed, defineComponent, type PropType } from "vue";
13
-
14
- import {AxisType} from "@dative-gpi/foundation-core-domain/models";
15
-
16
- import {axisTypeLabel, getEnumEntries} from "../../utils";
17
-
18
- import FSToggleSet from "@dative-gpi/foundation-shared-components/components/FSToggleSet.vue";
19
-
20
-
21
- export default defineComponent({
22
- components: {
23
- FSToggleSet
24
- },
25
- props: {
26
- modelValue: {
27
- type: Number as PropType<AxisType>,
28
- required: false
29
- }
30
- },
31
- emits: ['update:modelValue'],
32
- setup() {
33
-
34
- const axisTypeItems = computed(()=>{
35
- return getEnumEntries(AxisType).map((f)=>{
36
- return {
37
- id: f.value,
38
- label: axisTypeLabel(f.value)
39
- }
40
- })
41
- });
42
-
43
- return {
44
- axisTypeItems
45
- }
46
- }
47
- })
48
- </script>
@@ -1,52 +0,0 @@
1
- <template>
2
- <FSAutocompleteField
3
- :label="label ?? $tr('ui.common.display-as','Display as')"
4
- :items="displayAsItems"
5
- :modelValue="modelValue"
6
- @update:modelValue="$emit('update:modelValue', $event)"
7
- v-bind="$attrs"
8
- />
9
- </template>
10
-
11
- <script lang="ts">
12
- import { computed, defineComponent, type PropType } from "vue";
13
-
14
- import {DisplayAs} from "@dative-gpi/foundation-core-domain/models";
15
-
16
- import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
17
-
18
- import {displayAsLabel, getEnumEntries} from "../../utils";
19
-
20
- export default defineComponent({
21
- components: {
22
- FSAutocompleteField
23
- },
24
- props: {
25
- modelValue: {
26
- type: Number as PropType<DisplayAs>,
27
- required: false
28
- },
29
- label: {
30
- type: String,
31
- required: false
32
- }
33
-
34
- },
35
- emits: ['update:modelValue'],
36
- setup() {
37
-
38
- const displayAsItems = computed(()=>{
39
- return getEnumEntries(DisplayAs).filter(f=>f.value != DisplayAs.None).map((f)=>{
40
- return {
41
- id: f.value,
42
- label: displayAsLabel(f.value)
43
- }
44
- })
45
- });
46
-
47
- return {
48
- displayAsItems,
49
- }
50
- }
51
- })
52
- </script>
@@ -1,53 +0,0 @@
1
- <template>
2
- <FSAutocompleteField
3
- :label="label ?? $tr('ui.common.filter-type','Filter type')"
4
- :toggleSet="true"
5
- :items="filterTypeItems"
6
- :modelValue="modelValue"
7
- @update:modelValue="$emit('update:modelValue', $event)"
8
- v-bind="$attrs"
9
- />
10
- </template>
11
-
12
- <script lang="ts">
13
- import { computed, defineComponent, type PropType } from "vue";
14
-
15
- import {FilterType} from "@dative-gpi/foundation-core-domain/models";
16
-
17
- import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
18
-
19
- import {filterTypeLabel, getEnumEntries} from "../../utils";
20
-
21
- export default defineComponent({
22
- components: {
23
- FSAutocompleteField
24
- },
25
- props: {
26
- modelValue: {
27
- type: Number as PropType<FilterType>,
28
- required: false,
29
- default : FilterType.None
30
- },
31
- label: {
32
- type: String,
33
- required: false
34
- }
35
- },
36
- emits: ['update:modelValue'],
37
- setup() {
38
-
39
- const filterTypeItems = computed(()=>{
40
- return getEnumEntries(FilterType).filter(f=>f.value != FilterType.None).map((f)=>{
41
- return {
42
- id: f.value,
43
- label: filterTypeLabel(f.value)
44
- }
45
- })
46
- });
47
-
48
- return {
49
- filterTypeItems
50
- }
51
- }
52
- })
53
- </script>
@@ -1,52 +0,0 @@
1
- <template>
2
- <FSAutocompleteField
3
- :label="label ?? $tr('ui.common.heat-rule','Heat rule')"
4
- :items="heatmapRuleItems"
5
- :modelValue="modelValue"
6
- @update:modelValue="$emit('update:modelValue', $event)"
7
- v-bind="$attrs"
8
- />
9
- </template>
10
-
11
- <script lang="ts">
12
- import { computed, defineComponent, type PropType } from "vue";
13
-
14
- import {HeatmapRule} from "@dative-gpi/foundation-core-domain/models";
15
-
16
- import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
17
-
18
- import {heatmapRuleLabel, getEnumEntries} from "../../utils";
19
-
20
- export default defineComponent({
21
- components: {
22
- FSAutocompleteField
23
- },
24
- props: {
25
- modelValue: {
26
- type: Number as PropType<HeatmapRule>,
27
- required: false
28
- },
29
- label: {
30
- type: String,
31
- required: false
32
- }
33
-
34
- },
35
- emits: ['update:modelValue'],
36
- setup() {
37
-
38
- const heatmapRuleItems = computed(()=>{
39
- return getEnumEntries(HeatmapRule).filter(f=>f.value != HeatmapRule.None).map((f)=>{
40
- return {
41
- id: f.value,
42
- label: heatmapRuleLabel(f.value)
43
- }
44
- })
45
- });
46
-
47
- return {
48
- heatmapRuleItems
49
- }
50
- }
51
- })
52
- </script>
@@ -1,51 +0,0 @@
1
- <template>
2
- <FSAutocompleteField
3
- :label="label ?? $tr('ui.common.operation-on','Operation on')"
4
- :items="operationOnItems"
5
- :modelValue="modelValue"
6
- @update:modelValue="$emit('update:modelValue', $event)"
7
- v-bind="$attrs"
8
- />
9
- </template>
10
-
11
- <script lang="ts">
12
- import { computed, defineComponent, type PropType } from "vue";
13
-
14
- import {OperationOn} from "@dative-gpi/foundation-core-domain/models";
15
-
16
- import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
17
-
18
- import {operationOnLabel, getEnumEntries} from "../../utils";
19
-
20
- export default defineComponent({
21
- components: {
22
- FSAutocompleteField
23
- },
24
- props: {
25
- modelValue: {
26
- type: Number as PropType<OperationOn>,
27
- required: false
28
- },
29
- label : {
30
- type: String,
31
- required: false
32
- }
33
- },
34
- emits: ['update:modelValue'],
35
- setup() {
36
-
37
- const operationOnItems = computed(()=>{
38
- return getEnumEntries(OperationOn).filter(f=>f.value != OperationOn.None).map((f)=>{
39
- return {
40
- id: f.value,
41
- label: operationOnLabel(f.value)
42
- }
43
- })
44
- });
45
-
46
- return {
47
- operationOnItems
48
- }
49
- }
50
- })
51
- </script>
@@ -1,51 +0,0 @@
1
- <template>
2
- <FSAutocompleteField
3
- :label="label ?? $tr('ui.common.planning-type','Planning type')"
4
- :items="planningTypeItems"
5
- :modelValue="modelValue"
6
- @update:modelValue="$emit('update:modelValue', $event)"
7
- v-bind="$attrs"
8
- />
9
- </template>
10
-
11
- <script lang="ts">
12
- import { computed, defineComponent, type PropType } from "vue";
13
-
14
- import {PlanningType} from "@dative-gpi/foundation-core-domain/models";
15
-
16
- import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
17
-
18
- import {planningTypeLabel, getEnumEntries} from "../../utils";
19
-
20
- export default defineComponent({
21
- components: {
22
- FSAutocompleteField
23
- },
24
- props: {
25
- modelValue: {
26
- type: Number as PropType<PlanningType>,
27
- required: false
28
- },
29
- label: {
30
- type: String,
31
- required: false
32
- }
33
- },
34
- emits: ['update:modelValue'],
35
- setup() {
36
-
37
- const planningTypeItems = computed(()=>{
38
- return getEnumEntries(PlanningType).filter(f=>f.value != PlanningType.None).map((f)=>{
39
- return {
40
- id: f.value,
41
- label: planningTypeLabel(f.value)
42
- }
43
- })
44
- });
45
-
46
- return {
47
- planningTypeItems
48
- }
49
- }
50
- })
51
- </script>
@@ -1,51 +0,0 @@
1
- <template>
2
- <FSAutocompleteField
3
- :label="label ?? $tr('ui.common.plot-per','Plot per')"
4
- :items="plotPerItems"
5
- :modelValue="modelValue"
6
- @update:modelValue="$emit('update:modelValue', $event)"
7
- v-bind="$attrs"
8
- />
9
- </template>
10
-
11
- <script lang="ts">
12
- import { computed, defineComponent, type PropType } from "vue";
13
-
14
- import {PlotPer} from "@dative-gpi/foundation-core-domain/models";
15
-
16
- import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
17
-
18
- import {plotPerLabel, getEnumEntries} from "../../utils";
19
-
20
- export default defineComponent({
21
- components: {
22
- FSAutocompleteField
23
- },
24
- props: {
25
- modelValue: {
26
- type: Number as PropType<PlotPer>,
27
- required: false
28
- },
29
- label: {
30
- type: String,
31
- required: false
32
- }
33
- },
34
- emits: ['update:modelValue'],
35
- setup() {
36
-
37
- const plotPerItems = computed(()=>{
38
- return getEnumEntries(PlotPer).filter(f=>f.value != PlotPer.None).map((f)=>{
39
- return {
40
- id: f.value,
41
- label: plotPerLabel(f.value)
42
- }
43
- })
44
- });
45
-
46
- return {
47
- plotPerItems
48
- }
49
- }
50
- })
51
- </script>
@@ -1,59 +0,0 @@
1
- <template>
2
- <FSSelectField
3
- :items="selectedEntities"
4
- :clearable="false"
5
- :modelValue="$props.modelValue"
6
- @update:modelValue="$emit('update:modelValue', $event)"
7
- v-bind="$attrs"
8
- />
9
- </template>
10
-
11
- <script lang="ts">
12
- import type { PropType} from "vue";
13
- import { computed, defineComponent } from "vue";
14
-
15
- import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
16
- import { SelectedEntities } from "@dative-gpi/foundation-core-domain/models";
17
-
18
- import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
19
-
20
- export default defineComponent({
21
- name: "FSSelectSelectedEntities",
22
- components: {
23
- FSSelectField
24
- },
25
- props: {
26
- modelValue: {
27
- type: Number as PropType<SelectedEntities>,
28
- required: false,
29
- default: SelectedEntities.Devices
30
- },
31
- useNone: {
32
- type: Boolean,
33
- required: false,
34
- default: false
35
- }
36
- },
37
- emits: ["update:modelValue"],
38
- setup(props) {
39
- const { $tr } = useTranslationsProvider();
40
-
41
- const selectedEntities = computed((): { id: SelectedEntities; label: string }[] => {
42
- const items = [
43
- { id: SelectedEntities.Models, label: $tr("ui.selected-entities.models", "Models") },
44
- { id: SelectedEntities.Devices, label: $tr("ui.selected-entities.devices", "Devices") },
45
- { id: SelectedEntities.Groups, label: $tr("ui.selected-entities.groups", "Groups") },
46
- { id: SelectedEntities.Locations, label: $tr("ui.selected-entities.locations", "Locations") }
47
- ];
48
- if (props.useNone) {
49
- items.unshift({ id: SelectedEntities.None, label: $tr("ui.selected-entities.none", "None") });
50
- }
51
- return items;
52
- });
53
-
54
- return {
55
- selectedEntities
56
- };
57
- }
58
- });
59
- </script>
@@ -1,51 +0,0 @@
1
- <template>
2
- <FSAutocompleteField
3
- :label="label ?? $tr('ui.common.serie-type','Serie type')"
4
- :items="serieTypeItems"
5
- :modelValue="modelValue"
6
- @update:modelValue="$emit('update:modelValue', $event)"
7
- v-bind="$attrs"
8
- />
9
- </template>
10
-
11
- <script lang="ts">
12
- import { computed, defineComponent, type PropType } from "vue";
13
-
14
- import {SerieType} from "@dative-gpi/foundation-core-domain/models";
15
-
16
- import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
17
-
18
- import {serieTypeLabel, getEnumEntries} from "../../utils";
19
-
20
- export default defineComponent({
21
- components: {
22
- FSAutocompleteField
23
- },
24
- props: {
25
- modelValue: {
26
- type: Number as PropType<SerieType>,
27
- required: false
28
- },
29
- label: {
30
- type: String,
31
- required: false
32
- }
33
- },
34
- emits: ['update:modelValue'],
35
- setup() {
36
-
37
- const serieTypeItems = computed(()=>{
38
- return getEnumEntries(SerieType).filter(f=>f.value != SerieType.None).map((f)=>{
39
- return {
40
- id: f.value,
41
- label: serieTypeLabel(f.value)
42
- }
43
- })
44
- });
45
-
46
- return {
47
- serieTypeItems
48
- }
49
- }
50
- })
51
- </script>