@xen-orchestra/web-core 0.26.0 → 0.26.1

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.
@@ -550,7 +550,6 @@
550
550
  "uuid": "UUID",
551
551
  "vcpus": "virt. procesor | virt. procesor | virt. procesory",
552
552
  "vcpus-assigned": "Přiděleno virt. procesorů",
553
- "vcpus-used": "využito virt. procesorů",
554
553
  "vdi-throughput": "propustnost VDI",
555
554
  "vdis": "Virt. disk | Virt. disky | Virt. disků",
556
555
  "version": "Verze",
@@ -480,7 +480,6 @@
480
480
  "uuid": "UUID",
481
481
  "vcpus": "vCPU | vCPU | vCPUs",
482
482
  "vcpus-assigned": "Zugewiesene vCPUs",
483
- "vcpus-used": "Genutzte vCPUs",
484
483
  "vdis": "VDI | VDI | VDIs",
485
484
  "version": "Version",
486
485
  "vif": "VIF",
@@ -567,7 +567,6 @@
567
567
  "uuid": "UUID",
568
568
  "vcpus": "vCPU | vCPU | vCPUs",
569
569
  "vcpus-assigned": "vCPUs assigned",
570
- "vcpus-used": "vCPUs used",
571
570
  "vdi-throughput": "VDI throughput",
572
571
  "vdis": "VDI | VDI | VDIs",
573
572
  "version": "Version",
@@ -551,7 +551,6 @@
551
551
  "uuid": "UUID",
552
552
  "vcpus": "vCPU|vCPU|vCPUs",
553
553
  "vcpus-assigned": "vCPUs asignados",
554
- "vcpus-used": "vCPUs usados",
555
554
  "vdi-throughput": "Rendimiento de VDI",
556
555
  "vdis": "VDI|VDI|VDIs",
557
556
  "version": "Versión",
@@ -462,7 +462,6 @@
462
462
  "user-config": "تنظیمات کاربر",
463
463
  "uuid": "UUID",
464
464
  "vcpus": "CPUمجازی | CPUمجازی | CPUهای مجازی",
465
- "vcpus-used": "CPUهای مجازی استفاده شده",
466
465
  "vdis": "دسکتاپ مجازی | دسکتاپ مجازی | دسکتاپ های مجازی",
467
466
  "version": "نسخه",
468
467
  "vif": "VIF",
@@ -567,7 +567,6 @@
567
567
  "uuid": "UUID",
568
568
  "vcpus": "vCPU | vCPU | vCPUs",
569
569
  "vcpus-assigned": "vCPUs assignés",
570
- "vcpus-used": "vCPUs utilisés",
571
570
  "vdi-throughput": "Débit du VDI",
572
571
  "vdis": "VDI | VDI | VDIs",
573
572
  "version": "Version",
@@ -551,7 +551,6 @@
551
551
  "uuid": "UUID",
552
552
  "vcpus": "vCPU | vCPU | vCPU's",
553
553
  "vcpus-assigned": "Toegewezen vCPU's",
554
- "vcpus-used": "Gebruikte vCPU's",
555
554
  "vdi-throughput": "VDI-doorvoer",
556
555
  "vdis": "VDI | VDI | VDI's",
557
556
  "version": "Versie",
@@ -519,7 +519,6 @@
519
519
  "uuid": "UUID",
520
520
  "vcpus": "vCPUer",
521
521
  "vcpus-assigned": "vCPUs tilldelade",
522
- "vcpus-used": "vCPUer använt",
523
522
  "vdis": "VDI | VDI | VDIer",
524
523
  "version": "Version",
525
524
  "vga": "VGA",
@@ -11,7 +11,7 @@ export type EmptyObject = Record<string, never>
11
11
  export type StringKeyOf<T> = Extract<keyof T, string>
12
12
 
13
13
  export type KeyOfByValue<T, TValue> =
14
- T extends Record<PropertyKey, unknown>
14
+ T extends Record<PropertyKey, any>
15
15
  ? keyof {
16
16
  [K in keyof T as T[K] extends TValue ? K : never]: T[K]
17
17
  }
@@ -0,0 +1,12 @@
1
+ import type { KeyOfByValue } from '@core/types/utility.type.ts'
2
+
3
+ type DateLike = Date | string | number
4
+
5
+ export function createDateSorter<T extends object>(key: KeyOfByValue<T, DateLike>) {
6
+ return (a: T, b: T) => {
7
+ const dateA = new Date(a[key] as DateLike)
8
+ const dateB = new Date(b[key] as DateLike)
9
+
10
+ return dateB.getTime() - dateA.getTime()
11
+ }
12
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xen-orchestra/web-core",
3
3
  "type": "module",
4
- "version": "0.26.0",
4
+ "version": "0.26.1",
5
5
  "private": false,
6
6
  "exports": {
7
7
  "./*": {