@dative-gpi/foundation-core-components 0.0.221 → 0.0.223

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,12 +1,10 @@
1
1
  <template>
2
- <FSCol>
3
- <FSSelectField
4
- :label="label ?? $tr('ui.common.aggregation-type','Aggregation')"
5
- :items="aggregationTypeItems"
6
- :modelValue="modelValue"
7
- @update:modelValue="$emit('update:modelValue', $event)"
8
- />
9
- </FSCol>
2
+ <FSSelectField
3
+ :label="label ?? $tr('ui.common.aggregation-type','Aggregation')"
4
+ :items="aggregationTypeItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ />
10
8
  </template>
11
9
 
12
10
  <script lang="ts">
@@ -1,12 +1,10 @@
1
1
  <template>
2
- <FSCol>
3
- <FSToggleSet
4
- :hideHeader="true"
5
- :values="axisTypeItems"
6
- :modelValue="modelValue"
7
- @update:modelValue="$emit('update:modelValue', $event)"
8
- />
9
- </FSCol>
2
+ <FSToggleSet
3
+ :hideHeader="true"
4
+ :values="axisTypeItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ />
10
8
  </template>
11
9
 
12
10
  <script lang="ts">
@@ -1,12 +1,10 @@
1
1
  <template>
2
- <FSCol>
3
- <FSSelectField
4
- :label="label ?? $tr('ui.common.display-as','Display as')"
5
- :items="displayAsItems"
6
- :modelValue="modelValue"
7
- @update:modelValue="$emit('update:modelValue', $event)"
8
- />
9
- </FSCol>
2
+ <FSSelectField
3
+ :label="label ?? $tr('ui.common.display-as','Display as')"
4
+ :items="displayAsItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ />
10
8
  </template>
11
9
 
12
10
  <script lang="ts">
@@ -1,13 +1,11 @@
1
1
  <template>
2
- <FSCol>
3
- <FSAutocompleteField
4
- :label="label ?? $tr('ui.common.filter-type','Filter type')"
5
- :toggleSet="true"
6
- :items="filterTypeItems"
7
- :modelValue="modelValue"
8
- @update:modelValue="$emit('update:modelValue', $event)"
9
- />
10
- </FSCol>
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
+ />
11
9
  </template>
12
10
 
13
11
  <script lang="ts">
@@ -1,12 +1,10 @@
1
1
  <template>
2
- <FSCol>
3
- <FSSelectField
4
- :label="label ?? $tr('ui.common.heat-rule','Heat rule')"
5
- :items="heatmapRuleItems"
6
- :modelValue="modelValue"
7
- @update:modelValue="$emit('update:modelValue', $event)"
8
- />
9
- </FSCol>
2
+ <FSSelectField
3
+ :label="label ?? $tr('ui.common.heat-rule','Heat rule')"
4
+ :items="heatmapRuleItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ />
10
8
  </template>
11
9
 
12
10
  <script lang="ts">
@@ -1,12 +1,10 @@
1
1
  <template>
2
- <FSCol>
3
- <FSSelectField
4
- :label="label ?? $tr('ui.common.operation-on','Operation on')"
5
- :items="operationOnItems"
6
- :modelValue="modelValue"
7
- @update:modelValue="$emit('update:modelValue', $event)"
8
- />
9
- </FSCol>
2
+ <FSSelectField
3
+ :label="label ?? $tr('ui.common.operation-on','Operation on')"
4
+ :items="operationOnItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ />
10
8
  </template>
11
9
 
12
10
  <script lang="ts">
@@ -1,12 +1,10 @@
1
1
  <template>
2
- <FSCol>
3
- <FSSelectField
4
- :label="label ?? $tr('ui.common.planning-type','Planning type')"
5
- :items="planningTypeItems"
6
- :modelValue="modelValue"
7
- @update:modelValue="$emit('update:modelValue', $event)"
8
- />
9
- </FSCol>
2
+ <FSSelectField
3
+ :label="label ?? $tr('ui.common.planning-type','Planning type')"
4
+ :items="planningTypeItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ />
10
8
  </template>
11
9
 
12
10
  <script lang="ts">
@@ -1,12 +1,10 @@
1
1
  <template>
2
- <FSCol>
3
- <FSSelectField
4
- :label="label ?? $tr('ui.common.plot-per','Plot per')"
5
- :items="plotPerItems"
6
- :modelValue="modelValue"
7
- @update:modelValue="$emit('update:modelValue', $event)"
8
- />
9
- </FSCol>
2
+ <FSSelectField
3
+ :label="label ?? $tr('ui.common.plot-per','Plot per')"
4
+ :items="plotPerItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ />
10
8
  </template>
11
9
 
12
10
  <script lang="ts">
@@ -1,12 +1,10 @@
1
1
  <template>
2
- <FSCol>
3
- <FSSelectField
4
- :label="label ?? $tr('ui.common.serie-type','Serie type')"
5
- :items="serieTypeItems"
6
- :modelValue="modelValue"
7
- @update:modelValue="$emit('update:modelValue', $event)"
8
- />
9
- </FSCol>
2
+ <FSSelectField
3
+ :label="label ?? $tr('ui.common.serie-type','Serie type')"
4
+ :items="serieTypeItems"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="$emit('update:modelValue', $event)"
7
+ />
10
8
  </template>
11
9
 
12
10
  <script lang="ts">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-core-components",
3
3
  "sideEffects": false,
4
- "version": "0.0.221",
4
+ "version": "0.0.223",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,11 +10,11 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-core-domain": "0.0.221",
14
- "@dative-gpi/foundation-core-services": "0.0.221",
15
- "@dative-gpi/foundation-shared-components": "0.0.221",
16
- "@dative-gpi/foundation-shared-domain": "0.0.221",
17
- "@dative-gpi/foundation-shared-services": "0.0.221"
13
+ "@dative-gpi/foundation-core-domain": "0.0.223",
14
+ "@dative-gpi/foundation-core-services": "0.0.223",
15
+ "@dative-gpi/foundation-shared-components": "0.0.223",
16
+ "@dative-gpi/foundation-shared-domain": "0.0.223",
17
+ "@dative-gpi/foundation-shared-services": "0.0.223"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@dative-gpi/bones-ui": "^0.0.75",
@@ -26,5 +26,5 @@
26
26
  "sass": "1.71.1",
27
27
  "sass-loader": "13.3.2"
28
28
  },
29
- "gitHead": "6fbd963beb2ddf8fdeab7d8fcca490be6757b36f"
29
+ "gitHead": "1cca776be37985a3e5d2226ed422d62e19a785bb"
30
30
  }
package/utils/charts.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
2
- import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
3
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
4
1
  import { AggregationType, AxisType, ChartOrigin, DisplayAs, FilterType, HeatmapRule, OperationOn, PlanningType, PlotPer, SerieType } from "@dative-gpi/foundation-core-domain/models";
2
+ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
3
+ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
5
4
 
6
5
  const { $tr } = useTranslationsProvider();
7
6
 
@@ -23,124 +22,112 @@ export const chartOriginColor = (type: ChartOrigin): ColorBase => {
23
22
 
24
23
  export const aggregationTypeLabel = (aggregationType : AggregationType): string => {
25
24
  switch (aggregationType) {
26
- case AggregationType.None : return $tr("ui.common.none", "None");
27
- case AggregationType.Sum : return $tr("ui.common.sum", "Sum");
28
- case AggregationType.Cardinal : return $tr("ui.common.cardinal", "Cardinal");
29
- case AggregationType.Mean : return $tr("ui.common.cean", "Mean");
30
- case AggregationType.Median : return $tr("ui.common.median", "Median");
31
- case AggregationType.First : return $tr("ui.common.first", "First");
32
- case AggregationType.Last : return $tr("ui.common.last", "Last");
33
- case AggregationType.Difference : return $tr("ui.common.difference", "Difference");
34
- case AggregationType.Minimum : return $tr("ui.common.minimum", "Minimum");
35
- case AggregationType.Maximum : return $tr("ui.common.maximum", "Maximum");
36
- case AggregationType.Range : return $tr("ui.common.range", "Range");
37
- default : return "";
25
+ case AggregationType.Sum: return $tr("ui.common.sum", "Sum");
26
+ case AggregationType.Cardinal: return $tr("ui.common.cardinal", "Cardinal");
27
+ case AggregationType.Mean: return $tr("ui.common.cean", "Mean");
28
+ case AggregationType.Median: return $tr("ui.common.median", "Median");
29
+ case AggregationType.First: return $tr("ui.common.first", "First");
30
+ case AggregationType.Last: return $tr("ui.common.last", "Last");
31
+ case AggregationType.Difference: return $tr("ui.common.difference", "Difference");
32
+ case AggregationType.Minimum: return $tr("ui.common.minimum", "Minimum");
33
+ case AggregationType.Maximum: return $tr("ui.common.maximum", "Maximum");
34
+ case AggregationType.Range: return $tr("ui.common.range", "Range");
35
+ default : return $tr("ui.common.none", "None");
38
36
  }
39
- }
37
+ };
40
38
 
41
39
  export const axisTypeLabel = (axisType: AxisType | number): string => {
42
40
  switch (axisType) {
43
- case AxisType.None : return $tr("ui.common.none", "None");
44
- case AxisType.Date : return $tr("ui.common.date", "Date");
45
- case AxisType.Value : return $tr("ui.common.value", "Value");
46
- case AxisType.Category : return $tr("ui.common.category", "Category");
47
- default : return "";
41
+ case AxisType.Date: return $tr("ui.common.date", "Date");
42
+ case AxisType.Value: return $tr("ui.common.value", "Value");
43
+ case AxisType.Category: return $tr("ui.common.category", "Category");
44
+ default: return $tr("ui.common.none", "None");
48
45
  }
49
- }
46
+ };
50
47
 
51
48
  export const displayAsLabel = (display: DisplayAs | number): string => {
52
-
53
49
  switch (display) {
54
- case DisplayAs.None : return $tr("ui.common.none", "None");
55
- case DisplayAs.Bars : return $tr("ui.common.bars", "Bars");
56
- case DisplayAs.Lines : return $tr("ui.common.lines", "Lines");
57
- case DisplayAs.Points : return $tr("ui.common.point", "Points");
58
- default : return "";
50
+ case DisplayAs.Bars: return $tr("ui.common.bars", "Bars");
51
+ case DisplayAs.Lines: return $tr("ui.common.lines", "Lines");
52
+ case DisplayAs.Points: return $tr("ui.common.point", "Points");
53
+ default: return $tr("ui.common.none", "None");
59
54
  }
60
- }
55
+ };
61
56
 
62
57
  export const filterTypeLabel = (filterType: FilterType | number): string => {
63
58
  switch (filterType) {
64
- case FilterType.None : return $tr("ui.common.none", "None");
65
- case FilterType.Contains : return $tr("ui.common.contains", "contains");
66
- case FilterType.Different : return "";
67
- case FilterType.EndsWith : return $tr("ui.common.end-width", "end with") ;
68
- case FilterType.Equal : return "=";
69
- case FilterType.Less : return "<";
70
- case FilterType.LessOrEqual : return "";
71
- case FilterType.More : return ">";
72
- case FilterType.MoreOrEqual : return "";
73
- case FilterType.StartsWith : return $tr("ui.common.starts-with", "start with");
74
- default : return "";
59
+ case FilterType.Contains: return $tr("ui.common.contains", "contains");
60
+ case FilterType.Different: return "";
61
+ case FilterType.EndsWith: return $tr("ui.common.end-width", "end with") ;
62
+ case FilterType.Equal: return "=";
63
+ case FilterType.Less: return "<";
64
+ case FilterType.LessOrEqual: return "";
65
+ case FilterType.More: return ">";
66
+ case FilterType.MoreOrEqual: return "";
67
+ case FilterType.StartsWith: return $tr("ui.common.starts-with", "start with");
68
+ default: return $tr("ui.common.none", "None");
75
69
  }
76
- }
70
+ };
77
71
 
78
72
  export const heatmapRuleLabel = (heatMap: HeatmapRule | number): string => {
79
73
  switch (heatMap) {
80
- case HeatmapRule.None : return $tr("ui.common.none", "None");
81
- case HeatmapRule.Gradient : return $tr("ui.common.gradient", "Gradient");
82
- case HeatmapRule.Ranges : return $tr("ui.common.ranges", "Ranges");
83
- case HeatmapRule.Fixed : return $tr("ui.common.fixed", "Fixed");
84
- default : return "";
74
+ case HeatmapRule.Gradient: return $tr("ui.common.gradient", "Gradient");
75
+ case HeatmapRule.Ranges: return $tr("ui.common.ranges", "Ranges");
76
+ case HeatmapRule.Fixed : return $tr("ui.common.fixed", "Fixed");
77
+ default: return $tr("ui.common.none", "None");
85
78
  }
86
- }
79
+ };
87
80
 
88
81
  export const operationOnLabel = (operationOn: OperationOn | number): string => {
89
-
90
82
  switch (operationOn) {
91
- case OperationOn.None : return $tr("ui.common.none", "None");
92
- case OperationOn.SameEntity : return $tr("ui.common.same-entity", "Same entity");
93
- case OperationOn.SameGroup : return $tr("ui.common.same-group", "Same group");
94
- case OperationOn.SameGroupAndEntity : return $tr("ui.common.same-group-entity", "Same group and entity");
95
- default : return "";
83
+ case OperationOn.SameEntity: return $tr("ui.common.same-entity", "Same entity");
84
+ case OperationOn.SameGroup: return $tr("ui.common.same-group", "Same group");
85
+ case OperationOn.SameGroupAndEntity: return $tr("ui.common.same-group-entity", "Same group and entity");
86
+ default: return $tr("ui.common.none", "None");
96
87
  }
97
- }
88
+ };
98
89
 
99
90
  export const planningTypeLabel = (planningType : PlanningType | number): string => {
100
91
  switch (planningType) {
101
- case PlanningType.None : return $tr("ui.common.none", "None");
102
- case PlanningType.UntilNext : return $tr("ui.common.until-next", "Until next");
103
- case PlanningType.ElapsedTime : return $tr("ui.common.elapsed-time", "Elapsed time");
104
- case PlanningType.SinglePoint : return $tr("ui.common.single-point", "Single point");
105
- default : return "";
92
+ case PlanningType.UntilNext: return $tr("ui.common.until-next", "Until next");
93
+ case PlanningType.ElapsedTime: return $tr("ui.common.elapsed-time", "Elapsed time");
94
+ case PlanningType.SinglePoint: return $tr("ui.common.single-point", "Single point");
95
+ default: return $tr("ui.common.none", "None");
106
96
  }
107
- }
97
+ };
108
98
 
109
99
  export const plotPerLabel = (plotper: PlotPer | number): string => {
110
-
111
100
  switch (plotper) {
112
- case PlotPer.None : return $tr("ui.common.none", "None");
113
- case PlotPer.SinglePlot : return $tr("ui.common.single-slot", "Single slot");
114
- case PlotPer.Model : return $tr("ui.common.model", "Model");
115
- case PlotPer.Group : return $tr("ui.common.group", "Group");
116
- case PlotPer.Location : return $tr("ui.common.location", "Location");
117
- case PlotPer.Device : return $tr("ui.common.device", "Device");
118
- default : return "";
101
+ case PlotPer.SinglePlot: return $tr("ui.common.single-slot", "Single slot");
102
+ case PlotPer.Model: return $tr("ui.common.model", "Model");
103
+ case PlotPer.Group: return $tr("ui.common.group", "Group");
104
+ case PlotPer.Location: return $tr("ui.common.location", "Location");
105
+ case PlotPer.Device: return $tr("ui.common.device", "Device");
106
+ default: return $tr("ui.common.none", "None");
119
107
  }
120
- }
108
+ };
121
109
 
122
110
  export const serieTypeLabel = (serieType : SerieType): string => {
123
111
  switch (serieType) {
124
- case SerieType.Lines : return $tr("ui.common.lines", "Lines");
125
- case SerieType.Area : return $tr("ui.common.area", "Area");
126
- case SerieType.Range : return $tr("ui.common.range", "Range");
127
- case SerieType.Histogram : return $tr("ui.common.histogram", "Histogram");
128
- case SerieType.Operation : return $tr("ui.common.operation", "Operation");
129
- case SerieType.Planning : return $tr("ui.common.planning", "Planning");
130
- case SerieType.ScatterPlot : return $tr("ui.common.scatter-plot", "Scatter plot");
131
- case SerieType.Top : return $tr("ui.common.top", "Top");
132
- case SerieType.Bars : return $tr("ui.common.bars", "Bars");
133
- case SerieType.StackedBars : return $tr("ui.common.stacked-bars", "Stacked bars");
134
- case SerieType.Pie : return $tr("ui.common.pie", "Pie");
135
- case SerieType.Heatmap : return $tr('ui.common.heatmap', 'Heatmap');
136
- case SerieType.Slider : return $tr("ui.common.slider", "Slider");
137
- case SerieType.Gauge : return $tr("ui.common.gauge", "Gauge");
138
- case SerieType.ScoreCard : return $tr("ui.common.score-card", "Score card");
139
- case SerieType.Table : return $tr("ui.common.table", "Table");
140
- default : return "";
112
+ case SerieType.Lines: return $tr("ui.common.lines", "Lines");
113
+ case SerieType.Area: return $tr("ui.common.area", "Area");
114
+ case SerieType.Range: return $tr("ui.common.range", "Range");
115
+ case SerieType.Histogram: return $tr("ui.common.histogram", "Histogram");
116
+ case SerieType.Operation: return $tr("ui.common.operation", "Operation");
117
+ case SerieType.Planning: return $tr("ui.common.planning", "Planning");
118
+ case SerieType.ScatterPlot: return $tr("ui.common.scatter-plot", "Scatter plot");
119
+ case SerieType.Top: return $tr("ui.common.top", "Top");
120
+ case SerieType.Bars: return $tr("ui.common.bars", "Bars");
121
+ case SerieType.StackedBars: return $tr("ui.common.stacked-bars", "Stacked bars");
122
+ case SerieType.Pie: return $tr("ui.common.pie", "Pie");
123
+ case SerieType.Heatmap: return $tr('ui.common.heatmap', 'Heatmap');
124
+ case SerieType.Slider: return $tr("ui.common.slider", "Slider");
125
+ case SerieType.Gauge: return $tr("ui.common.gauge", "Gauge");
126
+ case SerieType.ScoreCard: return $tr("ui.common.score-card", "Score card");
127
+ case SerieType.Table: return $tr("ui.common.table", "Table");
128
+ default: return "";
141
129
  }
142
- }
143
-
130
+ };
144
131
 
145
132
  export const getEnumEntries = (e: any) => {
146
133
  return Object.keys(e)