@dative-gpi/foundation-shared-components 1.0.123 → 1.0.125

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.
@@ -13,7 +13,7 @@
13
13
  align="center-right"
14
14
  >
15
15
  <FSButton
16
- :label="$tr('ui.calendar.today', 'Today')"
16
+ :label="$tr('ui.common.today', 'Today')"
17
17
  @click="onClickToday"
18
18
  />
19
19
  </FSRow>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSButton
3
- :label="$tr('button.copy', 'Copy')"
3
+ :label="$tr('ui.common.copy', 'Copy')"
4
4
  :color="ColorEnum.Light"
5
5
  v-bind="$attrs"
6
6
  />
@@ -205,31 +205,31 @@ export default defineComponent({
205
205
  const items = [
206
206
  {
207
207
  id: EntityType.Model,
208
- label: $tr("ui.entity-type.models", "Models")
208
+ label: $tr("ui.common.models", "Models")
209
209
  },
210
210
  {
211
211
  id: EntityType.Group,
212
- label: $tr("ui.entity-type.groups", "Groups")
212
+ label: $tr("ui.common.groups", "Groups")
213
213
  },
214
214
  {
215
215
  id: EntityType.Location,
216
- label: $tr("ui.entity-type.locations", "Locations")
216
+ label: $tr("ui.common.locations", "Locations")
217
217
  },
218
218
  {
219
219
  id: EntityType.Device,
220
- label: $tr("ui.entity-type.devices", "Devices")
220
+ label: $tr("ui.common.devices", "Devices")
221
221
  },
222
222
  {
223
223
  id: EntityType.User,
224
- label: $tr("ui.entity-type.users", "Users")
224
+ label: $tr("ui.common.users", "Users")
225
225
  },
226
226
  {
227
227
  id: EntityType.Dashboard,
228
- label: $tr("ui.entity-type.dashboards", "Dashboards")
228
+ label: $tr("ui.common.dashboards", "Dashboards")
229
229
  },
230
230
  {
231
231
  id: EntityType.Folder,
232
- label: $tr("ui.entity-type.folders", "Folders")
232
+ label: $tr("ui.common.folders", "Folders")
233
233
  }
234
234
  ];
235
235
 
@@ -40,7 +40,7 @@ export default defineComponent({
40
40
 
41
41
  const items = [
42
42
  { id: ListModes.Table, label: $tr("ui.common.table", "Table"), icon: "mdi-format-list-bulleted" },
43
- { id: ListModes.Iterator, label: $tr("ui.common.iterator", "Tuile"), icon: "mdi-view-grid-outline" },
43
+ { id: ListModes.Iterator, label: $tr("ui.common.iterator", "Tile"), icon: "mdi-view-grid-outline" },
44
44
  ];
45
45
 
46
46
  return {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <FSAutocompleteField
3
- :label="label ?? $tr('autcomplete.display-as.label','Display as')"
3
+ :label="label ?? $tr('autocomplete.display-as.label','Display as')"
4
4
  :items="displayAsItems"
5
5
  :modelValue="modelValue"
6
6
  @update:modelValue="$emit('update:modelValue', $event)"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "1.0.123",
4
+ "version": "1.0.125",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,8 +10,8 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "1.0.123",
14
- "@dative-gpi/foundation-shared-services": "1.0.123"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.125",
14
+ "@dative-gpi/foundation-shared-services": "1.0.125"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -35,5 +35,5 @@
35
35
  "sass": "1.71.1",
36
36
  "sass-loader": "13.3.2"
37
37
  },
38
- "gitHead": "04157720c6327851c1867bd7133a0cebf945d5b6"
38
+ "gitHead": "fe376a2d6846d6830925a36d0d7a54ec6e71a141"
39
39
  }
@@ -9,8 +9,8 @@ const { $tr } = useTranslationsProvider();
9
9
  export const chartOriginLabel = (type: ChartOrigin): string => {
10
10
  switch (type) {
11
11
  case ChartOrigin.None: return $tr("ui.common.none", "None");
12
- case ChartOrigin.Organisation: return $tr("ui.chart-origin.custom", "Custom");
13
- case ChartOrigin.OrganisationType: return $tr("ui.chart-origin.shared", "Shared");
12
+ case ChartOrigin.Organisation: return $tr("ui.common.custom", "Custom");
13
+ case ChartOrigin.OrganisationType: return $tr("ui.common.shared", "Shared");
14
14
  }
15
15
  };
16
16
 
@@ -43,7 +43,7 @@ export const colorSetLabel = (value: ColorSets | number): string => {
43
43
  case ColorSets.Hash: return $tr("ui.color-sets.hash", "Hash");
44
44
  case ColorSets.Kelly: return $tr("ui.color-sets.material", "Kelly");
45
45
  case ColorSets.ZeileisHornikMurrell: return $tr("ui.color-sets.material", "ZeileisHornikMurrell");
46
- default: return $tr("ui.color-sets.none", "None");
46
+ default: return $tr("ui.common.none", "None");
47
47
  }
48
48
  }
49
49
 
@@ -95,7 +95,7 @@ export const aggregationTypeLabel = (aggregationType: AggregationType): string =
95
95
  case AggregationType.Minimum: return $tr("ui.common.minimum", "Minimum");
96
96
  case AggregationType.Maximum: return $tr("ui.common.maximum", "Maximum");
97
97
  case AggregationType.Range: return $tr("ui.aggregation-type.range", "Range");
98
- default: return $tr("ui.aggregation-type.none", "None");
98
+ default: return $tr("ui.common.none", "None");
99
99
  }
100
100
  };
101
101
 
@@ -110,16 +110,16 @@ export const axisTypeLabel = (axisType: AxisType | number): string => {
110
110
 
111
111
  export const displayAsLabel = (display: DisplayAs | number): string => {
112
112
  switch (display) {
113
- case DisplayAs.Bars: return $tr("ui.display-as.bars", "Bars");
114
- case DisplayAs.Lines: return $tr("ui.display-as.lines", "Lines");
115
- case DisplayAs.Points: return $tr("ui.display-as.point", "Points");
116
- default: return $tr("ui.display-as.none", "None");
113
+ case DisplayAs.Bars: return $tr("ui.common.bars", "Bars");
114
+ case DisplayAs.Lines: return $tr("ui.common.lines", "Lines");
115
+ case DisplayAs.Points: return $tr("ui.common.points", "Points");
116
+ default: return $tr("ui.common.none", "None");
117
117
  }
118
118
  };
119
119
 
120
120
  export const filterTypeLabel = (filterType: FilterType | number): string => {
121
121
  switch (filterType) {
122
- case FilterType.Contains: return $tr("ui.filter-type.contains", "contains");
122
+ case FilterType.Contains: return $tr("ui.common.contains", "contains");
123
123
  case FilterType.Different: return "≠";
124
124
  case FilterType.EndsWith: return $tr("ui.filter-type.ends-with", "ends with");
125
125
  case FilterType.Equal: return "=";
@@ -128,7 +128,7 @@ export const filterTypeLabel = (filterType: FilterType | number): string => {
128
128
  case FilterType.More: return ">";
129
129
  case FilterType.MoreOrEqual: return "≥";
130
130
  case FilterType.StartsWith: return $tr("ui.filter-type.starts-with", "start with");
131
- default: return $tr("ui.filter-type.none", "None");
131
+ default: return $tr("ui.common.none", "None");
132
132
  }
133
133
  };
134
134
 
@@ -179,7 +179,7 @@ export const serieTypeLabel = (serieType: SerieType): string => {
179
179
  case SerieType.Operation: return $tr("ui.common.operation", "Operation");
180
180
  case SerieType.Planning: return $tr("ui.common.planning", "Planning");
181
181
  case SerieType.ScatterPlot: return $tr("ui.common.scatter-plot", "Scatter plot");
182
- case SerieType.Top: return $tr("ui.common.top", "Top");
182
+ case SerieType.Top: return $tr("ui.serie-type.top", "Top");
183
183
  case SerieType.Bars: return $tr("ui.common.bars", "Bars");
184
184
  case SerieType.StackedBars: return $tr("ui.common.stacked-bars", "Stacked bars");
185
185
  case SerieType.Pie: return $tr("ui.common.pie", "Pie");
@@ -187,7 +187,7 @@ export const serieTypeLabel = (serieType: SerieType): string => {
187
187
  case SerieType.Slider: return $tr("ui.common.slider", "Slider");
188
188
  case SerieType.Gauge: return $tr("ui.common.gauge", "Gauge");
189
189
  case SerieType.ScoreCard: return $tr("ui.common.score-card", "Score card");
190
- case SerieType.Table: return $tr("ui.common.table", "Table");
190
+ case SerieType.Table: return $tr("ui.serie-type.table", "Table");
191
191
  default: return "";
192
192
  }
193
193
  };
package/utils/sort.ts CHANGED
@@ -23,7 +23,7 @@ export const alphanumericSort = (a: any, b: any) => {
23
23
  if (b == null) {
24
24
  return 1;
25
25
  }
26
- a = asString(a);
27
- b = asString(b);
26
+ a = asString(a).trim();
27
+ b = asString(b).trim();
28
28
  return a.localeCompare(b, undefined, { numeric: true });
29
29
  };
package/utils/time.ts CHANGED
@@ -5,13 +5,13 @@ import { TimeUnit } from "@dative-gpi/foundation-shared-domain/enums"
5
5
  const { $tr } = useTranslationsProvider();
6
6
 
7
7
  export const timeSteps = [
8
- { id: TimeUnit.Second, label: $tr("ui.time-step.second.singular", "Second"), plural: $tr("ui.time-step.second.plural", "Seconds") },
9
- { id: TimeUnit.Minute, label: $tr("ui.time-step.minute.singular", "Minute"), plural: $tr("ui.time-step.minute.plural", "Minutes") },
10
- { id: TimeUnit.Hour, label: $tr("ui.time-step.hour.singular", "Hour"), plural: $tr("ui.time-step.hour.plural", "Hours") },
11
- { id: TimeUnit.Day, label: $tr("ui.time-step.day.singular", "Day"), plural: $tr("ui.time-step.day.plural", "Days") },
12
- { id: TimeUnit.Week, label: $tr("ui.time-step.week.singular", "Week"), plural: $tr("ui.time-step.week.plural", "Weeks") },
13
- { id: TimeUnit.Month, label: $tr("ui.time-step.month.singular", "Month"), plural: $tr("ui.time-step.month.plural", "Months") },
14
- { id: TimeUnit.Year, label: $tr("ui.time-step.year.singular", "Year"), plural: $tr("ui.time-step.year.plural", "Years") },
8
+ { id: TimeUnit.Second, label: $tr("ui.common.second", "Second"), plural: $tr("ui.common.seconds", "Seconds") },
9
+ { id: TimeUnit.Minute, label: $tr("ui.common.minute", "Minute"), plural: $tr("ui.common.minutes", "Minutes") },
10
+ { id: TimeUnit.Hour, label: $tr("ui.common.hour", "Hour"), plural: $tr("ui.common.hours", "Hours") },
11
+ { id: TimeUnit.Day, label: $tr("ui.common.day", "Day"), plural: $tr("ui.common.days", "Days") },
12
+ { id: TimeUnit.Week, label: $tr("ui.common.week", "Week"), plural: $tr("ui.common.weeks", "Weeks") },
13
+ { id: TimeUnit.Month, label: $tr("ui.common.month", "Month"), plural: $tr("ui.common.months", "Months") },
14
+ { id: TimeUnit.Year, label: $tr("ui.common.year", "Year"), plural: $tr("ui.common.years", "Years") },
15
15
  ];
16
16
 
17
17
  export const timeStepToString = (value: { value: number, unit: TimeUnit } | null): string => {
@@ -29,11 +29,11 @@ export const timeStepToString = (value: { value: number, unit: TimeUnit } | null
29
29
 
30
30
  // TODO : remove everything below this line
31
31
  export const timeScale: any[] = [
32
- { id: 1, label: $tr("ui.time-field.second.singular", "Second"), plural: $tr("ui.time-field.second.plural", "Seconds") },
33
- { id: 60, label: $tr("ui.time-field.minute.singular", "Minute"), plural: $tr("ui.time-field.minute.plural", "Minutes") },
34
- { id: 3600, label: $tr("ui.time-field.hour.singular", "Hour"), plural: $tr("ui.time-field.hour.plural", "Hours") },
35
- { id: 86400, label: $tr("ui.time-field.day.singular", "Day"), plural: $tr("ui.time-field.day.plural", "Days") },
36
- { id: 604800, label: $tr("ui.time-field.week.singular", "Week"), plural: $tr("ui.time-field.week.plural", "Weeks") },
32
+ { id: 1, label: $tr("ui.common.second", "Second"), plural: $tr("ui.common.seconds", "Seconds") },
33
+ { id: 60, label: $tr("ui.common.minute", "Minute"), plural: $tr("ui.common.minutes", "Minutes") },
34
+ { id: 3600, label: $tr("ui.common.hour", "Hour"), plural: $tr("ui.common.hours", "Hours") },
35
+ { id: 86400, label: $tr("ui.common.day", "Day"), plural: $tr("ui.common.days", "Days") },
36
+ { id: 604800, label: $tr("ui.common.week", "Week"), plural: $tr("ui.common.weeks", "Weeks") },
37
37
  ];
38
38
 
39
39
  export const getTimeScaleIndex = (value: number): number => {