From dbf573181510a19edda0bf76aee6e8553a06c60e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 16 Apr 2026 01:43:43 +0200 Subject: [PATCH] =?utf8?q?refactor(web):=20eliminate=20type=20barrel=20?= =?utf8?q?=E2=80=94=20direct=20imports=20from=20ui-common=20and=20source?= =?utf8?q?=20modules?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ui/common/src/types/JsonType.ts | 6 ++- .../actions/AddChargingStations.vue | 4 +- .../components/actions/StartTransaction.vue | 2 +- .../charging-stations/CSConnector.vue | 2 +- .../components/charging-stations/CSData.vue | 2 +- .../components/charging-stations/CSTable.vue | 2 +- ui/web/src/composables/UIClient.ts | 25 +++++++----- ui/web/src/composables/Utils.ts | 4 +- ui/web/src/main.ts | 3 +- ui/web/src/types/ChargingStationType.ts | 7 +--- ui/web/src/types/index.ts | 40 ------------------- ui/web/src/views/ChargingStationsView.vue | 12 +++--- ui/web/tests/unit/CSConnector.test.ts | 2 +- ui/web/tests/unit/CSData.test.ts | 4 +- ui/web/tests/unit/CSTable.test.ts | 2 +- .../tests/unit/ChargingStationsView.test.ts | 2 +- ui/web/tests/unit/StartTransaction.test.ts | 2 +- ui/web/tests/unit/UIClient.test.ts | 10 +---- ui/web/tests/unit/constants.ts | 10 +++-- ui/web/tests/unit/helpers.ts | 3 +- 20 files changed, 52 insertions(+), 92 deletions(-) delete mode 100644 ui/web/src/types/index.ts diff --git a/ui/common/src/types/JsonType.ts b/ui/common/src/types/JsonType.ts index 927f3c4d..ace385f0 100644 --- a/ui/common/src/types/JsonType.ts +++ b/ui/common/src/types/JsonType.ts @@ -1,5 +1,7 @@ -export type JsonObject = { [K in string]?: JsonType } +export type JsonObject = { + [K in string]?: (JsonObject | JsonPrimitive)[] | JsonObject | JsonPrimitive +} export type JsonPrimitive = boolean | null | number | string -export type JsonType = JsonObject | JsonPrimitive | JsonType[] +export type JsonType = (JsonObject | JsonPrimitive)[] | JsonObject | JsonPrimitive diff --git a/ui/web/src/components/actions/AddChargingStations.vue b/ui/web/src/components/actions/AddChargingStations.vue index 3597e3c4..816fe2e9 100644 --- a/ui/web/src/components/actions/AddChargingStations.vue +++ b/ui/web/src/components/actions/AddChargingStations.vue @@ -113,9 +113,9 @@