@dative-gpi/foundation-core-components 1.0.65 → 1.0.67-map-edit

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 (80) hide show
  1. package/components/autocompletes/FSAutocompleteChart.vue +15 -8
  2. package/components/autocompletes/FSAutocompleteDashboard.vue +14 -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 +14 -6
  12. package/components/autocompletes/FSAutocompleteServiceAccountRoleOrganisation.vue +7 -1
  13. package/components/autocompletes/FSAutocompleteUserOrganisation.vue +9 -1
  14. package/components/customProperties/FSMetaField.vue +35 -40
  15. package/components/customProperties/FSMetaFormContent.vue +4 -3
  16. package/components/customProperties/FSMetaHistory.vue +2 -2
  17. package/components/customProperties/helpers.ts +57 -165
  18. package/components/entities/FSBaseEntitiesList.vue +12 -2
  19. package/components/entities/FSDialogSelectEntities.vue +19 -2
  20. package/components/entities/FSEntityField.vue +75 -14
  21. package/components/entities/FSSelectEntitiesList.vue +40 -7
  22. package/components/explorers/FSBaseDevicesExplorer.vue +322 -0
  23. package/components/explorers/FSBaseFoldersExplorer.vue +126 -24
  24. package/components/lists/FSDataTable.vue +22 -16
  25. package/components/lists/alerts/FSBaseAlertsList.vue +96 -106
  26. package/components/lists/alerts/FSButtonAcknowledgeAlert.vue +4 -4
  27. package/components/lists/authTokens/FSBaseAuthTokensList.vue +6 -4
  28. package/components/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue +97 -34
  29. package/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue +98 -34
  30. package/components/lists/charts/FSBaseChartsList.vue +153 -64
  31. package/components/lists/comments/FSBaseCommentsList.vue +39 -23
  32. package/components/lists/connectivityScenarios/FSBaseConnectivityScenariosList.vue +128 -0
  33. package/components/lists/dashboardOrganisationTypes/FSBaseDashboardOrganisationTypesList.vue +41 -8
  34. package/components/lists/dashboards/FSBaseDashboardsList.vue +76 -16
  35. package/components/lists/dashboards/FSSimpleDashboardsList.vue +33 -7
  36. package/components/lists/dataCategories/FSBaseDataCategoriesList.vue +8 -6
  37. package/components/lists/dataDefinitions/FSBaseDataDefinitionsList.vue +8 -5
  38. package/components/lists/deviceOrganisations/FSBaseDeviceOrganisationsList.vue +70 -44
  39. package/components/lists/folders/FSBaseFoldersList.vue +27 -15
  40. package/components/lists/groups/FSBaseGroupsList.vue +13 -9
  41. package/components/lists/locations/FSBaseLocationsList.vue +17 -13
  42. package/components/lists/models/FSBaseModelsList.vue +31 -13
  43. package/components/lists/playlists/FSSimplePlaylistsList.vue +44 -0
  44. package/components/lists/roleOrganisationTypes/FSBaseRoleOrganisationTypesList.vue +6 -5
  45. package/components/lists/roleOrganisations/FSBaseRoleOrganisationsList.vue +17 -16
  46. package/components/lists/scenarioOrganisationTypes/FSBaseScenarioOrganisationTypesList.vue +45 -8
  47. package/components/lists/scenarioOrganisations/FSBaseScenarioOrganisationsList.vue +45 -7
  48. package/components/lists/scenarios/FSBaseScenariosList.vue +121 -86
  49. package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue +10 -7
  50. package/components/lists/serviceAccountRoleOrganisations/FSBaseServiceAccountRoleOrganisationsList.vue +128 -0
  51. package/components/lists/userOrganisations/FSBaseUserOrganisationsList.vue +10 -7
  52. package/components/lists/userOrganisations/FSChipUserOrganisationsList.vue +61 -0
  53. package/components/tiles/FSChartTile.vue +71 -0
  54. package/components/tiles/FSDashboardOrganisationTile.vue +3 -3
  55. package/components/tiles/FSDashboardOrganisationTypeTile.vue +3 -3
  56. package/components/tiles/FSDashboardShallowTile.vue +3 -3
  57. package/components/tiles/FSDeviceOrganisationTile.vue +3 -3
  58. package/components/tiles/FSFolderTile.vue +7 -5
  59. package/components/tiles/FSGroupTile.vue +3 -3
  60. package/components/tiles/FSLocationTile.vue +5 -3
  61. package/components/tiles/FSModelTile.vue +64 -0
  62. package/components/tiles/FSServiceAccountOrganisationTile.vue +3 -3
  63. package/components/tiles/FSUserOrganisationTile.vue +3 -3
  64. package/components/treeviews/FSTreeViewGroup.vue +7 -1
  65. package/package.json +9 -9
  66. package/utils/dashboards.ts +4 -4
  67. package/utils/index.ts +0 -1
  68. package/utils/roles.ts +3 -3
  69. package/utils/users.ts +3 -3
  70. package/components/selects/FSAggregationSelector.vue +0 -51
  71. package/components/selects/FSAxisTypeSelector.vue +0 -48
  72. package/components/selects/FSDisplayAsSelector.vue +0 -52
  73. package/components/selects/FSFilterTypeSelector.vue +0 -53
  74. package/components/selects/FSHeatmapRuleSelector.vue +0 -52
  75. package/components/selects/FSOperationOnSelector.vue +0 -51
  76. package/components/selects/FSPlanningTypeSelector.vue +0 -51
  77. package/components/selects/FSPlotPerSelector.vue +0 -51
  78. package/components/selects/FSSelectEntityType.vue +0 -59
  79. package/components/selects/FSSerieTypeSelector.vue +0 -51
  80. package/utils/charts.ts +0 -137
@@ -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-shared-domain/enums";
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-shared-domain/enums";
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-shared-domain/enums";
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-shared-domain/enums";
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="entityTypes"
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 { EntityType } from "@dative-gpi/foundation-shared-domain/enums";
17
-
18
- import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
19
-
20
- export default defineComponent({
21
- name: "FSSelectEntityType",
22
- components: {
23
- FSSelectField
24
- },
25
- props: {
26
- modelValue: {
27
- type: Number as PropType<EntityType>,
28
- required: false,
29
- default: EntityType.Device
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 entityTypes = computed((): { id: EntityType; label: string }[] => {
42
- const items = [
43
- { id: EntityType.Model, label: $tr("ui.entity-type.models", "Models") },
44
- { id: EntityType.Device, label: $tr("ui.entity-type.devices", "Devices") },
45
- { id: EntityType.Group, label: $tr("ui.entity-type.groups", "Groups") },
46
- { id: EntityType.Location, label: $tr("ui.entity-type.locations", "Locations") }
47
- ];
48
- if (props.useNone) {
49
- items.unshift({ id: EntityType.None, label: $tr("ui.entity-type.none", "None") });
50
- }
51
- return items;
52
- });
53
-
54
- return {
55
- entityTypes
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-shared-domain/enums";
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>
package/utils/charts.ts DELETED
@@ -1,137 +0,0 @@
1
- import { AggregationType, AxisType, ChartOrigin, DisplayAs, FilterType, HeatmapRule, OperationOn, PlanningType, PlotPer, SerieType } from "@dative-gpi/foundation-shared-domain/enums";
2
- import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
3
- import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
4
-
5
- const { $tr } = useTranslationsProvider();
6
-
7
-
8
- export const chartOriginLabel = (type: ChartOrigin): string => {
9
- switch (type) {
10
- case ChartOrigin.None: return $tr("ui.chart-type.none", "None");
11
- case ChartOrigin.Organisation: return $tr("ui.chart-type.organisation", "Custom");
12
- case ChartOrigin.OrganisationType: return $tr("ui.chart-type.organisation-type", "Shared");
13
- }
14
- };
15
-
16
- export const chartOriginColor = (type: ChartOrigin): ColorBase => {
17
- switch (type) {
18
- case ChartOrigin.None: return ColorEnum.Error;
19
- case ChartOrigin.Organisation: return ColorEnum.Primary;
20
- case ChartOrigin.OrganisationType: return ColorEnum.Warning;
21
- }
22
- };
23
-
24
- export const aggregationTypeLabel = (aggregationType : AggregationType): string => {
25
- switch (aggregationType) {
26
- case AggregationType.Sum: return $tr("ui.common.sum", "Sum");
27
- case AggregationType.Cardinal: return $tr("ui.common.cardinal", "Cardinal");
28
- case AggregationType.Mean: return $tr("ui.common.cean", "Mean");
29
- case AggregationType.Median: return $tr("ui.common.median", "Median");
30
- case AggregationType.First: return $tr("ui.common.first", "First");
31
- case AggregationType.Last: return $tr("ui.common.last", "Last");
32
- case AggregationType.Difference: return $tr("ui.common.difference", "Difference");
33
- case AggregationType.Minimum: return $tr("ui.common.minimum", "Minimum");
34
- case AggregationType.Maximum: return $tr("ui.common.maximum", "Maximum");
35
- case AggregationType.Range: return $tr("ui.common.range", "Range");
36
- default : return $tr("ui.common.none", "None");
37
- }
38
- };
39
-
40
- export const axisTypeLabel = (axisType: AxisType | number): string => {
41
- switch (axisType) {
42
- case AxisType.Date: return $tr("ui.common.date", "Date");
43
- case AxisType.Value: return $tr("ui.common.value", "Value");
44
- case AxisType.Category: return $tr("ui.common.category", "Category");
45
- default: return $tr("ui.common.none", "None");
46
- }
47
- };
48
-
49
- export const displayAsLabel = (display: DisplayAs | number): string => {
50
- switch (display) {
51
- case DisplayAs.Bars: return $tr("ui.common.bars", "Bars");
52
- case DisplayAs.Lines: return $tr("ui.common.lines", "Lines");
53
- case DisplayAs.Points: return $tr("ui.common.point", "Points");
54
- default: return $tr("ui.common.none", "None");
55
- }
56
- };
57
-
58
- export const filterTypeLabel = (filterType: FilterType | number): string => {
59
- switch (filterType) {
60
- case FilterType.Contains: return $tr("ui.common.contains", "contains");
61
- case FilterType.Different: return "≠";
62
- case FilterType.EndsWith: return $tr("ui.common.end-width", "end with") ;
63
- case FilterType.Equal: return "=";
64
- case FilterType.Less: return "<";
65
- case FilterType.LessOrEqual: return "≤";
66
- case FilterType.More: return ">";
67
- case FilterType.MoreOrEqual: return "≥";
68
- case FilterType.StartsWith: return $tr("ui.common.starts-with", "start with");
69
- default: return $tr("ui.common.none", "None");
70
- }
71
- };
72
-
73
- export const heatmapRuleLabel = (heatMap: HeatmapRule | number): string => {
74
- switch (heatMap) {
75
- case HeatmapRule.Gradient: return $tr("ui.common.gradient", "Gradient");
76
- case HeatmapRule.Ranges: return $tr("ui.common.ranges", "Ranges");
77
- case HeatmapRule.Fixed : return $tr("ui.common.fixed", "Fixed");
78
- default: return $tr("ui.common.none", "None");
79
- }
80
- };
81
-
82
- export const operationOnLabel = (operationOn: OperationOn | number): string => {
83
- switch (operationOn) {
84
- case OperationOn.SameEntity: return $tr("ui.common.same-entity", "Same entity");
85
- case OperationOn.SameGroup: return $tr("ui.common.same-group", "Same group");
86
- case OperationOn.SameGroupAndEntity: return $tr("ui.common.same-group-entity", "Same group and entity");
87
- default: return $tr("ui.common.none", "None");
88
- }
89
- };
90
-
91
- export const planningTypeLabel = (planningType : PlanningType | number): string => {
92
- switch (planningType) {
93
- case PlanningType.UntilNext: return $tr("ui.common.until-next", "Until next");
94
- case PlanningType.ElapsedTime: return $tr("ui.common.elapsed-time", "Elapsed time");
95
- case PlanningType.SinglePoint: return $tr("ui.common.single-point", "Single point");
96
- default: return $tr("ui.common.none", "None");
97
- }
98
- };
99
-
100
- export const plotPerLabel = (plotper: PlotPer | number): string => {
101
- switch (plotper) {
102
- case PlotPer.SinglePlot: return $tr("ui.common.single-slot", "Single slot");
103
- case PlotPer.Model: return $tr("ui.common.model", "Model");
104
- case PlotPer.Group: return $tr("ui.common.group", "Group");
105
- case PlotPer.Location: return $tr("ui.common.location", "Location");
106
- case PlotPer.Device: return $tr("ui.common.device", "Device");
107
- default: return $tr("ui.common.none", "None");
108
- }
109
- };
110
-
111
- export const serieTypeLabel = (serieType : SerieType): string => {
112
- switch (serieType) {
113
- case SerieType.Lines: return $tr("ui.common.lines", "Lines");
114
- case SerieType.Area: return $tr("ui.common.area", "Area");
115
- case SerieType.Range: return $tr("ui.common.range", "Range");
116
- case SerieType.Histogram: return $tr("ui.common.histogram", "Histogram");
117
- case SerieType.Operation: return $tr("ui.common.operation", "Operation");
118
- case SerieType.Planning: return $tr("ui.common.planning", "Planning");
119
- case SerieType.ScatterPlot: return $tr("ui.common.scatter-plot", "Scatter plot");
120
- case SerieType.Top: return $tr("ui.common.top", "Top");
121
- case SerieType.Bars: return $tr("ui.common.bars", "Bars");
122
- case SerieType.StackedBars: return $tr("ui.common.stacked-bars", "Stacked bars");
123
- case SerieType.Pie: return $tr("ui.common.pie", "Pie");
124
- case SerieType.Heatmap: return $tr('ui.common.heatmap', 'Heatmap');
125
- case SerieType.Slider: return $tr("ui.common.slider", "Slider");
126
- case SerieType.Gauge: return $tr("ui.common.gauge", "Gauge");
127
- case SerieType.ScoreCard: return $tr("ui.common.score-card", "Score card");
128
- case SerieType.Table: return $tr("ui.common.table", "Table");
129
- default: return "";
130
- }
131
- };
132
-
133
- export const getEnumEntries = (e: any) => {
134
- return Object.keys(e)
135
- .filter(key => isNaN(Number(key)))
136
- .map(key => ({key : key, value : e[key]}));
137
- };