@dative-gpi/foundation-core-components 0.0.221 → 0.0.222
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/components/selects/FSAggregationSelector.vue +6 -8
- package/components/selects/FSAxisTypeSelector.vue +6 -8
- package/components/selects/FSDisplayAsSelector.vue +6 -8
- package/components/selects/FSFilterTypeSelector.vue +7 -9
- package/components/selects/FSHeatmapRuleSelector.vue +6 -8
- package/components/selects/FSOperationOnSelector.vue +6 -8
- package/components/selects/FSPlanningTypeSelector.vue +6 -8
- package/components/selects/FSPlotPerSelector.vue +6 -8
- package/components/selects/FSSerieTypeSelector.vue +6 -8
- package/package.json +7 -7
- package/utils/charts.ts +75 -88
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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.
|
|
4
|
+
"version": "0.0.222",
|
|
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.
|
|
14
|
-
"@dative-gpi/foundation-core-services": "0.0.
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "0.0.
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "0.0.
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "0.0.222",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "0.0.222",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "0.0.222",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "0.0.222",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "0.0.222"
|
|
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": "
|
|
29
|
+
"gitHead": "84398c44d065b454974c48e07f494d6e2c73690a"
|
|
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.
|
|
27
|
-
case AggregationType.
|
|
28
|
-
case AggregationType.
|
|
29
|
-
case AggregationType.
|
|
30
|
-
case AggregationType.
|
|
31
|
-
case AggregationType.
|
|
32
|
-
case AggregationType.
|
|
33
|
-
case AggregationType.
|
|
34
|
-
case AggregationType.
|
|
35
|
-
case AggregationType.
|
|
36
|
-
|
|
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.
|
|
44
|
-
case AxisType.
|
|
45
|
-
case AxisType.
|
|
46
|
-
|
|
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.
|
|
55
|
-
case DisplayAs.
|
|
56
|
-
case DisplayAs.
|
|
57
|
-
|
|
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.
|
|
65
|
-
case FilterType.
|
|
66
|
-
case FilterType.
|
|
67
|
-
case FilterType.
|
|
68
|
-
case FilterType.
|
|
69
|
-
case FilterType.
|
|
70
|
-
case FilterType.
|
|
71
|
-
case FilterType.
|
|
72
|
-
case FilterType.
|
|
73
|
-
|
|
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.
|
|
81
|
-
case HeatmapRule.
|
|
82
|
-
case HeatmapRule.
|
|
83
|
-
|
|
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.
|
|
92
|
-
case OperationOn.
|
|
93
|
-
case OperationOn.
|
|
94
|
-
|
|
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.
|
|
102
|
-
case PlanningType.
|
|
103
|
-
case PlanningType.
|
|
104
|
-
|
|
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.
|
|
113
|
-
case PlotPer.
|
|
114
|
-
case PlotPer.
|
|
115
|
-
case PlotPer.
|
|
116
|
-
case PlotPer.
|
|
117
|
-
|
|
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
|
|
125
|
-
case SerieType.Area
|
|
126
|
-
case SerieType.Range
|
|
127
|
-
case SerieType.Histogram
|
|
128
|
-
case SerieType.Operation
|
|
129
|
-
case SerieType.Planning
|
|
130
|
-
case SerieType.ScatterPlot
|
|
131
|
-
case SerieType.Top
|
|
132
|
-
case SerieType.Bars
|
|
133
|
-
case SerieType.StackedBars
|
|
134
|
-
case SerieType.Pie
|
|
135
|
-
case SerieType.Heatmap
|
|
136
|
-
case SerieType.Slider
|
|
137
|
-
case SerieType.Gauge
|
|
138
|
-
case SerieType.ScoreCard
|
|
139
|
-
case SerieType.Table
|
|
140
|
-
default
|
|
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)
|