From 8112c8c63f145c753ead69d3a25efcc949f256f6 Mon Sep 17 00:00:00 2001 From: "theo.gillet" Date: Tue, 10 Feb 2026 09:59:13 +0100 Subject: [PATCH 1/3] chore: ran unbarrelify on global scope --- .../__tests__/VitalityDetailsConfig-test.ts | 20 ++-- .../src/__tests__/VitalityFormConfig-test.ts | 3 +- .../commons/config/VitalityDetailsConfig.tsx | 20 ++-- .../src/commons/config/VitalityFormConfig.tsx | 2 +- .../components/VitalityAccountCreateView.tsx | 2 +- .../components/VitalityAccountDetailsView.tsx | 2 +- .../components/VitalityAccountEditView.tsx | 2 +- .../VitalityApplicationDetailsView.tsx | 2 +- .../VitalityApplicationListView.tsx | 2 +- .../VitalityAuditHelpDetailsView.tsx | 2 +- ...italityDependencyStatusHelpDetailsView.tsx | 2 +- ...italityDeprecatedDependencyDetailsView.tsx | 2 +- .../VitalityEvolutionHelpDetailsView.tsx | 2 +- .../VitalityEvolutionHelpEditView.tsx | 2 +- .../components/VitalityFaqDetailsView.tsx | 2 +- .../VitalityNotificationDetailsView.tsx | 2 +- .../VitalityGeneralInformationView-test.tsx | 2 +- .../VitalitySelectableIndicators.tsx | 2 +- .../commons/config/VitalityCommonConfig.tsx | 2 +- .../commons/types/VitalityAppInfosProps.ts | 2 +- .../commons/utils/VitalityDataExportUtils.ts | 12 +-- .../components/VitalityAppDetailsView.tsx | 2 +- .../VitalityAuditReportsTypeGrouper.tsx | 2 +- .../VitalityAuditReportsView.tsx | 2 +- ...VitalityCodeStatusReportsBranchGrouper.tsx | 2 +- .../VitalityCodeStatusReportsSmellGrouper.tsx | 2 +- .../auditors/dora/VitalityDoraReportItem.tsx | 2 +- .../dora/VitalityDoraReportsGrouper.tsx | 2 +- .../VitalityLighthouseReportItem.tsx | 2 +- ...talityLighthouseReportsCategoryGrouper.tsx | 2 +- ...VitalityLighthouseReportsDeviceGrouper.tsx | 2 +- .../VitalityDependenciesBranchGrouper.tsx | 2 +- .../VitalityDependenciesStatusGrouper.tsx | 2 +- .../dependencies/VitalityDependenciesView.tsx | 2 +- .../VitalityEvolutionBranchGrouper.tsx | 2 +- .../VitalityEvolutionStatusGrouper.tsx | 2 +- .../evolutions/VitalityEvolutionsView.tsx | 2 +- .../infos/VitalityGeneralInformationView.tsx | 3 +- .../VitalityQualityIndicatorBranchGrouper.tsx | 2 +- .../VitalityQualityIndicatorStatusGrouper.tsx | 2 +- .../VitalityQualityIndicatorsView.tsx | 2 +- .../summary-card/VitalitySummaryCard.tsx | 2 +- .../app-list/components/VitalityAppList.tsx | 2 +- .../components/VitalityAppsStatsChart.tsx | 2 +- .../faq/components/VitalityFaqList.tsx | 2 +- .../faq/components/VitalityFaqView.tsx | 2 +- .../components/VitalityNotificationList.tsx | 2 +- .../components/VitalityNotificationView.tsx | 2 +- v6y-libs/core-logic/src/core/AuditUtils.ts | 2 +- .../src/core/AuthenticationHelper.ts | 2 +- .../src/database/AccountProvider.ts | 3 +- v6y-libs/core-logic/src/index.ts | 21 +++- v6y-libs/core-logic/src/types/index.ts | 20 ---- .../src/components/atoms/Icons.tsx | 15 --- .../src/components/atoms/index.ts | 22 ---- .../src/components/molecules/Form.tsx | 2 +- .../src/components/molecules/index.ts | 56 ---------- .../src/components/organisms/LanguageMenu.tsx | 2 +- .../src/components/organisms/index.ts | 1 - v6y-libs/ui-kit-front/src/hooks/index.ts | 1 - v6y-libs/ui-kit-front/src/index.ts | 12 --- .../src/__tests__/AdminCreateWrapper-test.tsx | 2 +- .../src/__tests__/AdminEditWrapper-test.tsx | 2 +- .../src/__tests__/AdminListWrapper-test.tsx | 2 +- .../src/__tests__/AdminSelectWrapper-test.tsx | 4 +- .../src/__tests__/AdminShowWrapper-test.tsx | 2 +- v6y-libs/ui-kit/src/api/index.ts | 2 - v6y-libs/ui-kit/src/components/atoms/index.ts | 41 ------- .../organisms/admin/AdminCreateWrapper.tsx | 7 +- .../organisms/admin/AdminEditWrapper.tsx | 7 +- .../organisms/admin/AdminErrorView.tsx | 2 +- .../organisms/admin/AdminListWrapper.tsx | 7 +- .../organisms/admin/AdminSelectWrapper.tsx | 7 +- .../organisms/admin/AdminShowWrapper.tsx | 7 +- .../components/organisms/app/CollapseView.tsx | 4 +- .../organisms/app/ControlledCheckbox.tsx | 4 +- .../organisms/app/ControlledInput.tsx | 4 +- .../organisms/app/DynamicLoader.tsx | 2 +- .../components/organisms/app/EmptyView.tsx | 2 +- .../components/organisms/app/LanguageMenu.tsx | 6 +- .../src/components/organisms/app/Links.tsx | 4 +- .../components/organisms/app/LoadMoreList.tsx | 7 +- .../components/organisms/app/LoaderView.tsx | 3 +- .../components/organisms/app/ModalView.tsx | 6 +- .../organisms/app/PaginatedList.tsx | 4 +- .../components/organisms/app/Paragraph.tsx | 4 +- .../src/components/organisms/app/TextView.tsx | 4 +- .../components/organisms/app/TitleView.tsx | 4 +- .../ui-kit/src/components/organisms/index.ts | 20 ---- v6y-libs/ui-kit/src/components/pages/index.ts | 3 - .../ui-kit/src/components/types/FormType.ts | 2 +- v6y-libs/ui-kit/src/components/types/index.ts | 17 --- v6y-libs/ui-kit/src/hooks/index.ts | 5 - .../src/hooks/useThemeConfigProvider.tsx | 2 +- v6y-libs/ui-kit/src/index.ts | 102 ++++++++++++++++-- .../src/providers/admin/AdminProvider.tsx | 3 +- v6y-libs/ui-kit/src/providers/index.ts | 3 - v6y-libs/ui-kit/src/theme/index.ts | 3 - .../src/theme/variants/app/AppTheme.tsx | 6 +- 99 files changed, 260 insertions(+), 359 deletions(-) delete mode 100644 v6y-libs/core-logic/src/types/index.ts delete mode 100644 v6y-libs/ui-kit-front/src/components/atoms/Icons.tsx delete mode 100644 v6y-libs/ui-kit-front/src/components/atoms/index.ts delete mode 100644 v6y-libs/ui-kit-front/src/components/molecules/index.ts delete mode 100644 v6y-libs/ui-kit-front/src/components/organisms/index.ts delete mode 100644 v6y-libs/ui-kit-front/src/hooks/index.ts delete mode 100644 v6y-libs/ui-kit-front/src/index.ts delete mode 100644 v6y-libs/ui-kit/src/api/index.ts delete mode 100644 v6y-libs/ui-kit/src/components/atoms/index.ts delete mode 100644 v6y-libs/ui-kit/src/components/organisms/index.ts delete mode 100644 v6y-libs/ui-kit/src/components/pages/index.ts delete mode 100644 v6y-libs/ui-kit/src/components/types/index.ts delete mode 100644 v6y-libs/ui-kit/src/hooks/index.ts delete mode 100644 v6y-libs/ui-kit/src/providers/index.ts delete mode 100644 v6y-libs/ui-kit/src/theme/index.ts diff --git a/v6y-apps/front-bo/src/__tests__/VitalityDetailsConfig-test.ts b/v6y-apps/front-bo/src/__tests__/VitalityDetailsConfig-test.ts index 2f47cbf2..a998308c 100644 --- a/v6y-apps/front-bo/src/__tests__/VitalityDetailsConfig-test.ts +++ b/v6y-apps/front-bo/src/__tests__/VitalityDetailsConfig-test.ts @@ -2,17 +2,15 @@ import '@testing-library/jest-dom/vitest'; import { render, screen } from '@testing-library/react'; import { describe, expect, it, vi } from 'vitest'; -import { - AccountType, - ApplicationType, - AuditHelpType, - DependencyStatusHelpType, - DeprecatedDependencyType, - EvolutionHelpType, - FaqType, - LinkType, - NotificationType, -} from '@v6y/core-logic/src/types'; +import { AccountType } from '@v6y/core-logic/src/types/AccountType'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; +import { AuditHelpType } from '@v6y/core-logic/src/types/AuditHelpType'; +import { DependencyStatusHelpType } from '@v6y/core-logic/src/types/DependencyStatusHelpType'; +import { DeprecatedDependencyType } from '@v6y/core-logic/src/types/DeprecatedDependencyType'; +import { EvolutionHelpType } from '@v6y/core-logic/src/types/EvolutionHelpType'; +import { FaqType } from '@v6y/core-logic/src/types/FaqType'; +import { LinkType } from '@v6y/core-logic/src/types/LinkType'; +import { NotificationType } from '@v6y/core-logic/src/types/NotificationType'; import { formatAccountDetails, diff --git a/v6y-apps/front-bo/src/__tests__/VitalityFormConfig-test.ts b/v6y-apps/front-bo/src/__tests__/VitalityFormConfig-test.ts index d450984a..a1c314b2 100644 --- a/v6y-apps/front-bo/src/__tests__/VitalityFormConfig-test.ts +++ b/v6y-apps/front-bo/src/__tests__/VitalityFormConfig-test.ts @@ -1,7 +1,8 @@ import '@testing-library/jest-dom/vitest'; import { describe, expect, it, vi } from 'vitest'; -import { ApplicationType, LinkType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; +import { LinkType } from '@v6y/core-logic/src/types/LinkType'; import { applicationCreateEditItems, diff --git a/v6y-apps/front-bo/src/commons/config/VitalityDetailsConfig.tsx b/v6y-apps/front-bo/src/commons/config/VitalityDetailsConfig.tsx index c0d0f8bb..6a326707 100644 --- a/v6y-apps/front-bo/src/commons/config/VitalityDetailsConfig.tsx +++ b/v6y-apps/front-bo/src/commons/config/VitalityDetailsConfig.tsx @@ -1,16 +1,14 @@ import { ReactNode } from 'react'; -import { - AccountType, - ApplicationType, - AuditHelpType, - DependencyStatusHelpType, - DeprecatedDependencyType, - EvolutionHelpType, - FaqType, - LinkType, - NotificationType, -} from '@v6y/core-logic/src/types'; +import { AccountType } from '@v6y/core-logic/src/types/AccountType'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; +import { AuditHelpType } from '@v6y/core-logic/src/types/AuditHelpType'; +import { DependencyStatusHelpType } from '@v6y/core-logic/src/types/DependencyStatusHelpType'; +import { DeprecatedDependencyType } from '@v6y/core-logic/src/types/DeprecatedDependencyType'; +import { EvolutionHelpType } from '@v6y/core-logic/src/types/EvolutionHelpType'; +import { FaqType } from '@v6y/core-logic/src/types/FaqType'; +import { LinkType } from '@v6y/core-logic/src/types/LinkType'; +import { NotificationType } from '@v6y/core-logic/src/types/NotificationType'; import { Links, TranslateType } from '@v6y/ui-kit'; export const formatAccountDetails = ( diff --git a/v6y-apps/front-bo/src/commons/config/VitalityFormConfig.tsx b/v6y-apps/front-bo/src/commons/config/VitalityFormConfig.tsx index 9d0fe06e..96f3420e 100644 --- a/v6y-apps/front-bo/src/commons/config/VitalityFormConfig.tsx +++ b/v6y-apps/front-bo/src/commons/config/VitalityFormConfig.tsx @@ -1,6 +1,6 @@ import { Variables } from 'graphql-request'; -import { ApplicationType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; import { SelectOptionType, TranslateType } from '@v6y/ui-kit'; import VitalityFormFieldSet from '../components/VitalityFormFieldSet'; diff --git a/v6y-apps/front-bo/src/features/v6y-accounts/components/VitalityAccountCreateView.tsx b/v6y-apps/front-bo/src/features/v6y-accounts/components/VitalityAccountCreateView.tsx index 68d467cc..2c4887f4 100644 --- a/v6y-apps/front-bo/src/features/v6y-accounts/components/VitalityAccountCreateView.tsx +++ b/v6y-apps/front-bo/src/features/v6y-accounts/components/VitalityAccountCreateView.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { useEffect, useState } from 'react'; -import { ApplicationType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; import { AdminSelectWrapper, EmptyView, TitleView, useTranslationProvider } from '@v6y/ui-kit'; import GetApplicationListByPageAndParams from '../../../commons/apis/getApplicationListByPageAndParams'; diff --git a/v6y-apps/front-bo/src/features/v6y-accounts/components/VitalityAccountDetailsView.tsx b/v6y-apps/front-bo/src/features/v6y-accounts/components/VitalityAccountDetailsView.tsx index f4248050..a00ac939 100644 --- a/v6y-apps/front-bo/src/features/v6y-accounts/components/VitalityAccountDetailsView.tsx +++ b/v6y-apps/front-bo/src/features/v6y-accounts/components/VitalityAccountDetailsView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { AccountType } from '@v6y/core-logic/src/types'; +import { AccountType } from '@v6y/core-logic/src/types/AccountType'; import { Matcher } from '@v6y/core-logic/src/utils'; import { AdminHttpError, diff --git a/v6y-apps/front-bo/src/features/v6y-accounts/components/VitalityAccountEditView.tsx b/v6y-apps/front-bo/src/features/v6y-accounts/components/VitalityAccountEditView.tsx index 7f925a8d..7d1f2137 100644 --- a/v6y-apps/front-bo/src/features/v6y-accounts/components/VitalityAccountEditView.tsx +++ b/v6y-apps/front-bo/src/features/v6y-accounts/components/VitalityAccountEditView.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { useEffect, useState } from 'react'; -import { ApplicationType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; import { AdminSelectWrapper, EmptyView, diff --git a/v6y-apps/front-bo/src/features/v6y-applications/components/VitalityApplicationDetailsView.tsx b/v6y-apps/front-bo/src/features/v6y-applications/components/VitalityApplicationDetailsView.tsx index 4f6bb22f..23aa14c7 100644 --- a/v6y-apps/front-bo/src/features/v6y-applications/components/VitalityApplicationDetailsView.tsx +++ b/v6y-apps/front-bo/src/features/v6y-applications/components/VitalityApplicationDetailsView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { ApplicationType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; import { Matcher } from '@v6y/core-logic/src/utils'; import { AdminHttpError, diff --git a/v6y-apps/front-bo/src/features/v6y-applications/components/VitalityApplicationListView.tsx b/v6y-apps/front-bo/src/features/v6y-applications/components/VitalityApplicationListView.tsx index 3b591418..3126b5af 100644 --- a/v6y-apps/front-bo/src/features/v6y-applications/components/VitalityApplicationListView.tsx +++ b/v6y-apps/front-bo/src/features/v6y-applications/components/VitalityApplicationListView.tsx @@ -1,6 +1,6 @@ import type { DocumentNode } from 'graphql/index'; -import { ApplicationType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; import { AdminListWrapper, useTranslationProvider } from '@v6y/ui-kit'; import GetApplicationListByPageAndParams from '../../../commons/apis/getApplicationListByPageAndParams'; diff --git a/v6y-apps/front-bo/src/features/v6y-audit-help/components/VitalityAuditHelpDetailsView.tsx b/v6y-apps/front-bo/src/features/v6y-audit-help/components/VitalityAuditHelpDetailsView.tsx index a6b52667..c1b482ff 100644 --- a/v6y-apps/front-bo/src/features/v6y-audit-help/components/VitalityAuditHelpDetailsView.tsx +++ b/v6y-apps/front-bo/src/features/v6y-audit-help/components/VitalityAuditHelpDetailsView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { AuditHelpType } from '@v6y/core-logic/src/types'; +import { AuditHelpType } from '@v6y/core-logic/src/types/AuditHelpType'; import { AdminHttpError, AdminShowWrapper, diff --git a/v6y-apps/front-bo/src/features/v6y-dependency-status-helps/components/VitalityDependencyStatusHelpDetailsView.tsx b/v6y-apps/front-bo/src/features/v6y-dependency-status-helps/components/VitalityDependencyStatusHelpDetailsView.tsx index d030071b..d581fb45 100644 --- a/v6y-apps/front-bo/src/features/v6y-dependency-status-helps/components/VitalityDependencyStatusHelpDetailsView.tsx +++ b/v6y-apps/front-bo/src/features/v6y-dependency-status-helps/components/VitalityDependencyStatusHelpDetailsView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { DependencyStatusHelpType } from '@v6y/core-logic/src/types'; +import { DependencyStatusHelpType } from '@v6y/core-logic/src/types/DependencyStatusHelpType'; import { AdminShowWrapper, TitleView, diff --git a/v6y-apps/front-bo/src/features/v6y-deprecated-dependencies/components/VitalityDeprecatedDependencyDetailsView.tsx b/v6y-apps/front-bo/src/features/v6y-deprecated-dependencies/components/VitalityDeprecatedDependencyDetailsView.tsx index e1fadc56..d6a4272a 100644 --- a/v6y-apps/front-bo/src/features/v6y-deprecated-dependencies/components/VitalityDeprecatedDependencyDetailsView.tsx +++ b/v6y-apps/front-bo/src/features/v6y-deprecated-dependencies/components/VitalityDeprecatedDependencyDetailsView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { DeprecatedDependencyType } from '@v6y/core-logic/src/types'; +import { DeprecatedDependencyType } from '@v6y/core-logic/src/types/DeprecatedDependencyType'; import { AdminShowWrapper, TitleView, diff --git a/v6y-apps/front-bo/src/features/v6y-evolution-helps/components/VitalityEvolutionHelpDetailsView.tsx b/v6y-apps/front-bo/src/features/v6y-evolution-helps/components/VitalityEvolutionHelpDetailsView.tsx index 82d8c608..651551e1 100644 --- a/v6y-apps/front-bo/src/features/v6y-evolution-helps/components/VitalityEvolutionHelpDetailsView.tsx +++ b/v6y-apps/front-bo/src/features/v6y-evolution-helps/components/VitalityEvolutionHelpDetailsView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { EvolutionHelpType } from '@v6y/core-logic/src/types'; +import { EvolutionHelpType } from '@v6y/core-logic/src/types/EvolutionHelpType'; import { AdminShowWrapper, TitleView, diff --git a/v6y-apps/front-bo/src/features/v6y-evolution-helps/components/VitalityEvolutionHelpEditView.tsx b/v6y-apps/front-bo/src/features/v6y-evolution-helps/components/VitalityEvolutionHelpEditView.tsx index 3c6b7903..c428f3bc 100644 --- a/v6y-apps/front-bo/src/features/v6y-evolution-helps/components/VitalityEvolutionHelpEditView.tsx +++ b/v6y-apps/front-bo/src/features/v6y-evolution-helps/components/VitalityEvolutionHelpEditView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { EvolutionHelpType } from '@v6y/core-logic/src/types'; +import { EvolutionHelpType } from '@v6y/core-logic/src/types/EvolutionHelpType'; import { AdminSelectWrapper, TitleView, diff --git a/v6y-apps/front-bo/src/features/v6y-faqs/components/VitalityFaqDetailsView.tsx b/v6y-apps/front-bo/src/features/v6y-faqs/components/VitalityFaqDetailsView.tsx index c80a504e..6634ef10 100644 --- a/v6y-apps/front-bo/src/features/v6y-faqs/components/VitalityFaqDetailsView.tsx +++ b/v6y-apps/front-bo/src/features/v6y-faqs/components/VitalityFaqDetailsView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { FaqType } from '@v6y/core-logic/src/types'; +import { FaqType } from '@v6y/core-logic/src/types/FaqType'; import { AdminShowWrapper, TitleView, diff --git a/v6y-apps/front-bo/src/features/v6y-notifications/components/VitalityNotificationDetailsView.tsx b/v6y-apps/front-bo/src/features/v6y-notifications/components/VitalityNotificationDetailsView.tsx index 42423230..185e6a35 100644 --- a/v6y-apps/front-bo/src/features/v6y-notifications/components/VitalityNotificationDetailsView.tsx +++ b/v6y-apps/front-bo/src/features/v6y-notifications/components/VitalityNotificationDetailsView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { NotificationType } from '@v6y/core-logic/src/types'; +import { NotificationType } from '@v6y/core-logic/src/types/NotificationType'; import { AdminShowWrapper, TitleView, diff --git a/v6y-apps/front/src/__tests__/app-details/VitalityGeneralInformationView-test.tsx b/v6y-apps/front/src/__tests__/app-details/VitalityGeneralInformationView-test.tsx index 523a2bfc..037fe48f 100644 --- a/v6y-apps/front/src/__tests__/app-details/VitalityGeneralInformationView-test.tsx +++ b/v6y-apps/front/src/__tests__/app-details/VitalityGeneralInformationView-test.tsx @@ -4,7 +4,7 @@ import { render, screen, waitFor } from '@testing-library/react'; import * as React from 'react'; import { Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; -import { ApplicationType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; import VitalityGeneralInformationView from '../../features/app-details/components/infos/VitalityGeneralInformationView'; import { useClientQuery } from '../../infrastructure/adapters/api/useQueryAdapter'; diff --git a/v6y-apps/front/src/commons/components/indicators/VitalitySelectableIndicators.tsx b/v6y-apps/front/src/commons/components/indicators/VitalitySelectableIndicators.tsx index d160e139..137e9d03 100644 --- a/v6y-apps/front/src/commons/components/indicators/VitalitySelectableIndicators.tsx +++ b/v6y-apps/front/src/commons/components/indicators/VitalitySelectableIndicators.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { useEffect, useState } from 'react'; -import { KeywordType } from '@v6y/core-logic/src/types'; +import { KeywordType } from '@v6y/core-logic/src/types/KeywordType'; import { Card, Checkbox, diff --git a/v6y-apps/front/src/commons/config/VitalityCommonConfig.tsx b/v6y-apps/front/src/commons/config/VitalityCommonConfig.tsx index 65f1b882..9b984e5f 100644 --- a/v6y-apps/front/src/commons/config/VitalityCommonConfig.tsx +++ b/v6y-apps/front/src/commons/config/VitalityCommonConfig.tsx @@ -2,7 +2,7 @@ import Link from 'next/link'; import * as React from 'react'; import { ReactNode } from 'react'; -import { ApplicationType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; import { Matcher } from '@v6y/core-logic/src/utils'; import { ApiOutlined, diff --git a/v6y-apps/front/src/commons/types/VitalityAppInfosProps.ts b/v6y-apps/front/src/commons/types/VitalityAppInfosProps.ts index add8a566..9798af99 100644 --- a/v6y-apps/front/src/commons/types/VitalityAppInfosProps.ts +++ b/v6y-apps/front/src/commons/types/VitalityAppInfosProps.ts @@ -1,6 +1,6 @@ import { type CSSProperties } from 'react'; -import { ApplicationType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; export interface VitalityAppInfosProps { app: ApplicationType; diff --git a/v6y-apps/front/src/commons/utils/VitalityDataExportUtils.ts b/v6y-apps/front/src/commons/utils/VitalityDataExportUtils.ts index 7b1a692e..e6ef4648 100644 --- a/v6y-apps/front/src/commons/utils/VitalityDataExportUtils.ts +++ b/v6y-apps/front/src/commons/utils/VitalityDataExportUtils.ts @@ -1,10 +1,8 @@ -import { - ApplicationType, - AuditType, - DependencyType, - EvolutionType, - KeywordType, -} from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; +import { AuditType } from '@v6y/core-logic/src/types/AuditType'; +import { DependencyType } from '@v6y/core-logic/src/types/DependencyType'; +import { EvolutionType } from '@v6y/core-logic/src/types/EvolutionType'; +import { KeywordType } from '@v6y/core-logic/src/types/KeywordType'; import { CsvUtils } from '@v6y/core-logic/src/utils'; const { exportDataToCSV } = CsvUtils; diff --git a/v6y-apps/front/src/features/app-details/components/VitalityAppDetailsView.tsx b/v6y-apps/front/src/features/app-details/components/VitalityAppDetailsView.tsx index 5eb36524..35582d54 100644 --- a/v6y-apps/front/src/features/app-details/components/VitalityAppDetailsView.tsx +++ b/v6y-apps/front/src/features/app-details/components/VitalityAppDetailsView.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; -import { ApplicationType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; import { DynamicLoader, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit'; import { Button, GlobeIcon, Input, PlayIcon, ReloadIcon, ShuffleIcon } from '@v6y/ui-kit-front'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@v6y/ui-kit-front'; diff --git a/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsTypeGrouper.tsx b/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsTypeGrouper.tsx index 1d8af89b..e29ffc5b 100644 --- a/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsTypeGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsTypeGrouper.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { AuditType } from '@v6y/core-logic/src/types'; +import { AuditType } from '@v6y/core-logic/src/types/AuditType'; import { Card, CardContent, CardHeader, CardTitle } from '@v6y/ui-kit-front'; import { getScoreStatusColor } from '../../../../commons/utils/StatusUtils'; diff --git a/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsView.tsx b/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsView.tsx index 90301159..a41a598f 100644 --- a/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsView.tsx +++ b/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { AuditType } from '@v6y/core-logic/src/types'; +import { AuditType } from '@v6y/core-logic/src/types/AuditType'; import { DynamicLoader, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit'; import { Card, CardContent } from '@v6y/ui-kit-front'; diff --git a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/code-status/VitalityCodeStatusReportsBranchGrouper.tsx b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/code-status/VitalityCodeStatusReportsBranchGrouper.tsx index febf8a4b..2d97d2ee 100644 --- a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/code-status/VitalityCodeStatusReportsBranchGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/code-status/VitalityCodeStatusReportsBranchGrouper.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { AuditType } from '@v6y/core-logic/src/types'; +import { AuditType } from '@v6y/core-logic/src/types/AuditType'; import { DynamicLoader, useTranslationProvider } from '@v6y/ui-kit'; import VitalitySelectGrouperView from '../../../../../../commons/components/VitalitySelectGrouperView'; diff --git a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/code-status/VitalityCodeStatusReportsSmellGrouper.tsx b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/code-status/VitalityCodeStatusReportsSmellGrouper.tsx index d81e332d..0ac89d45 100644 --- a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/code-status/VitalityCodeStatusReportsSmellGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/code-status/VitalityCodeStatusReportsSmellGrouper.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { useEffect, useState } from 'react'; -import { AuditType } from '@v6y/core-logic/src/types'; +import { AuditType } from '@v6y/core-logic/src/types/AuditType'; import { Card, Checkbox, Col, DynamicLoader, Row } from '@v6y/ui-kit'; import useDataGrouper from '../../../../../../commons/hooks/useDataGrouper'; diff --git a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/dora/VitalityDoraReportItem.tsx b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/dora/VitalityDoraReportItem.tsx index 6065ab46..8c66c802 100644 --- a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/dora/VitalityDoraReportItem.tsx +++ b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/dora/VitalityDoraReportItem.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { AuditType } from '@v6y/core-logic/src/types'; +import { AuditType } from '@v6y/core-logic/src/types/AuditType'; import { Button, Card, diff --git a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/dora/VitalityDoraReportsGrouper.tsx b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/dora/VitalityDoraReportsGrouper.tsx index ba02a4a3..bc59d711 100644 --- a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/dora/VitalityDoraReportsGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/dora/VitalityDoraReportsGrouper.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { AuditType } from '@v6y/core-logic/src/types'; +import { AuditType } from '@v6y/core-logic/src/types/AuditType'; import { DynamicLoader } from '@v6y/ui-kit'; import { VitalityModuleType } from '../../../../../../commons/types/VitalityModulesProps'; diff --git a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/lighthouse/VitalityLighthouseReportItem.tsx b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/lighthouse/VitalityLighthouseReportItem.tsx index 964e544b..fc7e0cdc 100644 --- a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/lighthouse/VitalityLighthouseReportItem.tsx +++ b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/lighthouse/VitalityLighthouseReportItem.tsx @@ -1,7 +1,7 @@ import Link from 'next/link'; import * as React from 'react'; -import { AuditType } from '@v6y/core-logic/src/types'; +import { AuditType } from '@v6y/core-logic/src/types/AuditType'; import { Button, Card, diff --git a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/lighthouse/VitalityLighthouseReportsCategoryGrouper.tsx b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/lighthouse/VitalityLighthouseReportsCategoryGrouper.tsx index d73c0501..e0967210 100644 --- a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/lighthouse/VitalityLighthouseReportsCategoryGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/lighthouse/VitalityLighthouseReportsCategoryGrouper.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { useEffect, useState } from 'react'; -import { AuditType } from '@v6y/core-logic/src/types'; +import { AuditType } from '@v6y/core-logic/src/types/AuditType'; import { DynamicLoader, List, diff --git a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/lighthouse/VitalityLighthouseReportsDeviceGrouper.tsx b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/lighthouse/VitalityLighthouseReportsDeviceGrouper.tsx index 4df5d02e..b2d20b2e 100644 --- a/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/lighthouse/VitalityLighthouseReportsDeviceGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/audit-reports/auditors/lighthouse/VitalityLighthouseReportsDeviceGrouper.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { AuditType } from '@v6y/core-logic/src/types'; +import { AuditType } from '@v6y/core-logic/src/types/AuditType'; import { DynamicLoader } from '@v6y/ui-kit'; import VitalityTabGrouperView from '../../../../../../commons/components/VitalityTabGrouperView'; diff --git a/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesBranchGrouper.tsx b/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesBranchGrouper.tsx index 7c65ef73..debd09e7 100644 --- a/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesBranchGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesBranchGrouper.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { DependencyType } from '@v6y/core-logic/src/types'; +import { DependencyType } from '@v6y/core-logic/src/types/DependencyType'; import { useTranslationProvider } from '@v6y/ui-kit'; import { Card, CardContent, CardHeader, CardTitle } from '@v6y/ui-kit-front'; diff --git a/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesStatusGrouper.tsx b/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesStatusGrouper.tsx index f2d74972..1f041ff5 100644 --- a/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesStatusGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesStatusGrouper.tsx @@ -1,4 +1,4 @@ -import { DependencyType } from '@v6y/core-logic/src/types'; +import { DependencyType } from '@v6y/core-logic/src/types/DependencyType'; import { useTranslationProvider } from '@v6y/ui-kit'; import { Card, CardContent, CardHeader, CardTitle } from '@v6y/ui-kit-front'; diff --git a/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesView.tsx b/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesView.tsx index ff13e7c7..c6de6e94 100644 --- a/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesView.tsx +++ b/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { DependencyType } from '@v6y/core-logic/src/types'; +import { DependencyType } from '@v6y/core-logic/src/types/DependencyType'; import { DynamicLoader, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit'; import { Card, CardContent } from '@v6y/ui-kit-front'; diff --git a/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionBranchGrouper.tsx b/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionBranchGrouper.tsx index 5cf6e35d..14e0246e 100644 --- a/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionBranchGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionBranchGrouper.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { EvolutionType } from '@v6y/core-logic/src/types'; +import { EvolutionType } from '@v6y/core-logic/src/types/EvolutionType'; import { useTranslationProvider } from '@v6y/ui-kit'; import { Card, CardContent, CardHeader, CardTitle } from '@v6y/ui-kit-front'; diff --git a/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionStatusGrouper.tsx b/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionStatusGrouper.tsx index 05e6c869..ca495216 100644 --- a/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionStatusGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionStatusGrouper.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { EvolutionType } from '@v6y/core-logic/src/types'; +import { EvolutionType } from '@v6y/core-logic/src/types/EvolutionType'; import { DynamicLoader } from '@v6y/ui-kit'; import VitalityTabGrouperView from '../../../../commons/components/VitalityTabGrouperView'; diff --git a/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionsView.tsx b/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionsView.tsx index b19e1034..3836d893 100644 --- a/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionsView.tsx +++ b/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionsView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { EvolutionType } from '@v6y/core-logic/src/types'; +import { EvolutionType } from '@v6y/core-logic/src/types/EvolutionType'; import { DynamicLoader, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit'; import { Card, CardContent } from '@v6y/ui-kit-front'; diff --git a/v6y-apps/front/src/features/app-details/components/infos/VitalityGeneralInformationView.tsx b/v6y-apps/front/src/features/app-details/components/infos/VitalityGeneralInformationView.tsx index 9fefdb49..ffc0ad2c 100644 --- a/v6y-apps/front/src/features/app-details/components/infos/VitalityGeneralInformationView.tsx +++ b/v6y-apps/front/src/features/app-details/components/infos/VitalityGeneralInformationView.tsx @@ -1,4 +1,5 @@ -import { ApplicationType, AuditType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; +import { AuditType } from '@v6y/core-logic/src/types/AuditType'; import { LoaderView, useTranslationProvider } from '@v6y/ui-kit'; import { Card, diff --git a/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorBranchGrouper.tsx b/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorBranchGrouper.tsx index 561e5b94..8b57e3e0 100644 --- a/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorBranchGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorBranchGrouper.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { KeywordType } from '@v6y/core-logic/src/types'; +import { KeywordType } from '@v6y/core-logic/src/types/KeywordType'; import { useTranslationProvider } from '@v6y/ui-kit'; import { Card, CardContent, CardHeader, CardTitle } from '@v6y/ui-kit-front'; diff --git a/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorStatusGrouper.tsx b/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorStatusGrouper.tsx index cb4a098a..5cb89f77 100644 --- a/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorStatusGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorStatusGrouper.tsx @@ -1,4 +1,4 @@ -import { KeywordType } from '@v6y/core-logic/src/types'; +import { KeywordType } from '@v6y/core-logic/src/types/KeywordType'; import { useTranslationProvider } from '@v6y/ui-kit'; import { Card, CardContent, CardHeader, CardTitle } from '@v6y/ui-kit-front'; diff --git a/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorsView.tsx b/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorsView.tsx index 3dbd0cef..f087f950 100644 --- a/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorsView.tsx +++ b/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorsView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { KeywordType } from '@v6y/core-logic/src/types'; +import { KeywordType } from '@v6y/core-logic/src/types/KeywordType'; import { DynamicLoader, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit'; import { Card, CardContent } from '@v6y/ui-kit-front'; diff --git a/v6y-apps/front/src/features/app-details/components/summary-card/VitalitySummaryCard.tsx b/v6y-apps/front/src/features/app-details/components/summary-card/VitalitySummaryCard.tsx index acfe0d6f..cdac65ad 100644 --- a/v6y-apps/front/src/features/app-details/components/summary-card/VitalitySummaryCard.tsx +++ b/v6y-apps/front/src/features/app-details/components/summary-card/VitalitySummaryCard.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { ApplicationType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; import { StarIcon, useTranslationProvider } from '@v6y/ui-kit-front'; interface VitalitySummaryCardProps { diff --git a/v6y-apps/front/src/features/app-list/components/VitalityAppList.tsx b/v6y-apps/front/src/features/app-list/components/VitalityAppList.tsx index 2e75df6e..f07d5cdc 100644 --- a/v6y-apps/front/src/features/app-list/components/VitalityAppList.tsx +++ b/v6y-apps/front/src/features/app-list/components/VitalityAppList.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useRef, useState } from 'react'; -import { ApplicationType } from '@v6y/core-logic/src/types'; +import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; import { Spinner, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit-front'; import VitalityAppInfos from '../../../commons/components/application-info/VitalityAppInfos'; diff --git a/v6y-apps/front/src/features/apps-stats/components/VitalityAppsStatsChart.tsx b/v6y-apps/front/src/features/apps-stats/components/VitalityAppsStatsChart.tsx index 90f381c6..d4677764 100644 --- a/v6y-apps/front/src/features/apps-stats/components/VitalityAppsStatsChart.tsx +++ b/v6y-apps/front/src/features/apps-stats/components/VitalityAppsStatsChart.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { useEffect } from 'react'; -import { KeywordStatsType } from '@v6y/core-logic/src/types'; +import { KeywordStatsType } from '@v6y/core-logic/src/types/KeywordType'; import { Charts, Col, diff --git a/v6y-apps/front/src/features/faq/components/VitalityFaqList.tsx b/v6y-apps/front/src/features/faq/components/VitalityFaqList.tsx index 8cdbe748..298e1d34 100644 --- a/v6y-apps/front/src/features/faq/components/VitalityFaqList.tsx +++ b/v6y-apps/front/src/features/faq/components/VitalityFaqList.tsx @@ -1,7 +1,7 @@ import Link from 'next/link'; import * as React from 'react'; -import { FaqType } from '@v6y/core-logic/src/types'; +import { FaqType } from '@v6y/core-logic/src/types/FaqType'; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@v6y/ui-kit-front'; const VitalityFaqList = ({ dataSource }: { dataSource?: FaqType[] }) => { diff --git a/v6y-apps/front/src/features/faq/components/VitalityFaqView.tsx b/v6y-apps/front/src/features/faq/components/VitalityFaqView.tsx index f5536db9..b0c9a6cc 100644 --- a/v6y-apps/front/src/features/faq/components/VitalityFaqView.tsx +++ b/v6y-apps/front/src/features/faq/components/VitalityFaqView.tsx @@ -3,7 +3,7 @@ import Link from 'next/link'; import * as React from 'react'; -import { FaqType } from '@v6y/core-logic/src/types'; +import { FaqType } from '@v6y/core-logic/src/types/FaqType'; import { useTranslationProvider } from '@v6y/ui-kit-front'; import VitalityApiConfig from '../../../commons/config/VitalityApiConfig'; diff --git a/v6y-apps/front/src/features/notifications/components/VitalityNotificationList.tsx b/v6y-apps/front/src/features/notifications/components/VitalityNotificationList.tsx index fb50faa8..30239e05 100644 --- a/v6y-apps/front/src/features/notifications/components/VitalityNotificationList.tsx +++ b/v6y-apps/front/src/features/notifications/components/VitalityNotificationList.tsx @@ -1,4 +1,4 @@ -import { NotificationType } from '@v6y/core-logic/src/types'; +import { NotificationType } from '@v6y/core-logic/src/types/NotificationType'; import { CollapseItemType, CollapseView, Links } from '@v6y/ui-kit'; const VitalityNotificationList = ({ dataSource }: { dataSource?: NotificationType[] }) => { diff --git a/v6y-apps/front/src/features/notifications/components/VitalityNotificationView.tsx b/v6y-apps/front/src/features/notifications/components/VitalityNotificationView.tsx index dc6a98b6..77aae019 100644 --- a/v6y-apps/front/src/features/notifications/components/VitalityNotificationView.tsx +++ b/v6y-apps/front/src/features/notifications/components/VitalityNotificationView.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; -import { NotificationType } from '@v6y/core-logic/src/types'; +import { NotificationType } from '@v6y/core-logic/src/types/NotificationType'; import { NotificationOutlined, useTranslationProvider } from '@v6y/ui-kit'; import VitalitySectionView from '../../../commons/components/VitalitySectionView'; diff --git a/v6y-libs/core-logic/src/core/AuditUtils.ts b/v6y-libs/core-logic/src/core/AuditUtils.ts index 71753533..2cf1d683 100644 --- a/v6y-libs/core-logic/src/core/AuditUtils.ts +++ b/v6y-libs/core-logic/src/core/AuditUtils.ts @@ -10,7 +10,7 @@ import { ComplexityAnalysisOptionsType, ParsedFileResultType, ParsedFileType, -} from '../types/index.ts'; +} from '../types/AuditParserType.ts'; import AppLogger from './AppLogger.ts'; const __dirname = path.resolve(); diff --git a/v6y-libs/core-logic/src/core/AuthenticationHelper.ts b/v6y-libs/core-logic/src/core/AuthenticationHelper.ts index ff43e48c..edd85c04 100644 --- a/v6y-libs/core-logic/src/core/AuthenticationHelper.ts +++ b/v6y-libs/core-logic/src/core/AuthenticationHelper.ts @@ -3,7 +3,7 @@ import passport from 'passport'; import { ExtractJwt, Strategy as JwtStrategy, VerifiedCallback } from 'passport-jwt'; import AccountProvider from '../database/AccountProvider.ts'; -import { AccountType } from '../types/index.ts'; +import { AccountType } from '../types/AccountType.ts'; import AppLogger from './AppLogger.ts'; /** diff --git a/v6y-libs/core-logic/src/database/AccountProvider.ts b/v6y-libs/core-logic/src/database/AccountProvider.ts index 97edbc67..3935de6f 100644 --- a/v6y-libs/core-logic/src/database/AccountProvider.ts +++ b/v6y-libs/core-logic/src/database/AccountProvider.ts @@ -2,7 +2,8 @@ import { FindOptions, Op, Sequelize } from 'sequelize'; import AppLogger from '../core/AppLogger.ts'; import { isAdmin, isSuperAdmin } from '../core/AuthenticationHelper.ts'; -import { AccountInputType, AccountType, SearchQueryType } from '../types/index.ts'; +import { AccountInputType, AccountType } from '../types/AccountType.ts'; +import { SearchQueryType } from '../types/SearchQueryType.ts'; import { AccountModelType } from './models/AccountModel.ts'; /** diff --git a/v6y-libs/core-logic/src/index.ts b/v6y-libs/core-logic/src/index.ts index 9746ddf4..2739f4f2 100644 --- a/v6y-libs/core-logic/src/index.ts +++ b/v6y-libs/core-logic/src/index.ts @@ -32,7 +32,26 @@ export * from './config/ServerConfig.ts'; export * from './utils/index.ts'; export * from './core/AuthenticationHelper.ts'; -export * from './types/index.ts'; +export type * from './types/AccountType.ts'; +export type * from './types/ApplicationType.ts'; +export type * from './types/AuditHelpType.ts'; +export type * from './types/AuditType.ts'; +export type * from './types/AuditParserType.ts'; +export type * from './types/DependencyType.ts'; +export type * from './types/DependencyStatusHelpType.ts'; +export type * from './types/DeprecatedDependencyType.ts'; +export type * from './types/EvolutionHelpType.ts'; +export type * from './types/EvolutionType.ts'; +export type * from './types/FaqType.ts'; +export type * from './types/KeywordType.ts'; +export type * from './types/NotificationType.ts'; +export type * from './types/RepositoryType.ts'; +export type * from './types/SearchQueryType.ts'; +export type * from './types/LinkType.ts'; +export type * from './types/ServerConfigType.ts'; +export type * from './types/ModuleType.ts'; +export type * from './types/ApplicationConfigType.ts'; +export type * from './types/MonitoringType.ts'; export { AppLogger, diff --git a/v6y-libs/core-logic/src/types/index.ts b/v6y-libs/core-logic/src/types/index.ts deleted file mode 100644 index 43c558ec..00000000 --- a/v6y-libs/core-logic/src/types/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -export * from './AccountType.ts'; -export * from './ApplicationType.ts'; -export * from './AuditHelpType.ts'; -export * from './AuditType.ts'; -export * from './AuditParserType.ts'; -export * from './DependencyType.ts'; -export * from './DependencyStatusHelpType.ts'; -export * from './DeprecatedDependencyType.ts'; -export * from './EvolutionHelpType.ts'; -export * from './EvolutionType.ts'; -export * from './FaqType.ts'; -export * from './KeywordType.ts'; -export * from './NotificationType.ts'; -export * from './RepositoryType.ts'; -export * from './SearchQueryType.ts'; -export * from './LinkType.ts'; -export * from './ServerConfigType.ts'; -export * from './ModuleType.ts'; -export * from './ApplicationConfigType.ts'; -export * from './MonitoringType.ts'; diff --git a/v6y-libs/ui-kit-front/src/components/atoms/Icons.tsx b/v6y-libs/ui-kit-front/src/components/atoms/Icons.tsx deleted file mode 100644 index e3efd485..00000000 --- a/v6y-libs/ui-kit-front/src/components/atoms/Icons.tsx +++ /dev/null @@ -1,15 +0,0 @@ -export { - ExitIcon, - GlobeIcon, - CommitIcon, - MagnifyingGlassIcon, - QuestionMarkCircledIcon, - ShuffleIcon, - StarIcon, - StarFilledIcon, - ReloadIcon, - PlayIcon, - EnvelopeClosedIcon, - ChatBubbleIcon, - MixerHorizontalIcon -} from '@radix-ui/react-icons'; diff --git a/v6y-libs/ui-kit-front/src/components/atoms/index.ts b/v6y-libs/ui-kit-front/src/components/atoms/index.ts deleted file mode 100644 index c79d1f2e..00000000 --- a/v6y-libs/ui-kit-front/src/components/atoms/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -export { Alert, AlertTitle, AlertDescription } from './alert.tsx'; -export { Avatar, AvatarFallback, AvatarImage } from './avatar.tsx'; -export { Button } from './button.tsx'; -export { Checkbox } from './checkbox.tsx'; -export * from './Icons.tsx'; -export { Input } from './input.tsx'; -export { Label } from './label.tsx'; -export { Spinner } from './spinner.tsx'; -export { Toaster } from './sonner.tsx'; -export { toast } from './sonnerHelpers.ts'; -export { Badge } from './badge.tsx'; -export { - Breadcrumb, - BreadcrumbEllipsis, - BreadcrumbItem, - BreadcrumbLink, - BreadcrumbList, - BreadcrumbPage, - BreadcrumbSeparator, -} from './breadcrumb.tsx'; -export { Textarea } from './textarea.tsx'; -export { Skeleton } from './skeleton.tsx'; diff --git a/v6y-libs/ui-kit-front/src/components/molecules/Form.tsx b/v6y-libs/ui-kit-front/src/components/molecules/Form.tsx index 1d4377e7..c76d7608 100644 --- a/v6y-libs/ui-kit-front/src/components/molecules/Form.tsx +++ b/v6y-libs/ui-kit-front/src/components/molecules/Form.tsx @@ -13,7 +13,7 @@ import { } from 'react-hook-form'; import { cn } from '../../lib/utils'; -import { Label } from '../atoms'; +import { Label } from '../atoms/label'; const Form = FormProvider as unknown as React.FC>; diff --git a/v6y-libs/ui-kit-front/src/components/molecules/index.ts b/v6y-libs/ui-kit-front/src/components/molecules/index.ts deleted file mode 100644 index a31f6895..00000000 --- a/v6y-libs/ui-kit-front/src/components/molecules/index.ts +++ /dev/null @@ -1,56 +0,0 @@ -export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './Accordion.tsx'; -export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './Card.tsx'; -export { - Form, - FormControl, - FormDescription, - FormField, - FormItem, - FormLabel, - FormMessage, -} from './Form.tsx'; -export { - NavigationMenu, - NavigationMenuList, - NavigationMenuItem, - NavigationMenuContent, - NavigationMenuTrigger, - NavigationMenuLink, - NavigationMenuIndicator, - NavigationMenuViewport, -} from './navigation-menu.tsx'; -export { navigationMenuTriggerStyle } from './navigationMenuStyles'; -export { - Select, - SelectContent, - SelectGroup, - SelectItem, - SelectLabel, - SelectScrollDownButton, - SelectScrollUpButton, - SelectSeparator, - SelectTrigger, - SelectValue, -} from './Select.tsx'; -export { - TypographyH1, - TypographyH2, - TypographyH3, - TypographyH4, - TypographyP, - TypographyBlockquote, - TypographyInlineCode, - TypographyLead, - TypographyLarge, - TypographySmall, - TypographyMuted, -} from './Typography.tsx'; -export { - Pagination, - PaginationContent, - PaginationItem, - PaginationLink, - PaginationEllipsis, - PaginationNext, - PaginationPrevious, -} from './pagination.tsx'; diff --git a/v6y-libs/ui-kit-front/src/components/organisms/LanguageMenu.tsx b/v6y-libs/ui-kit-front/src/components/organisms/LanguageMenu.tsx index 831cab47..5045d111 100644 --- a/v6y-libs/ui-kit-front/src/components/organisms/LanguageMenu.tsx +++ b/v6y-libs/ui-kit-front/src/components/organisms/LanguageMenu.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { useTranslationProvider } from '../../translation/useTranslationProvider'; -import { Select, SelectContent, SelectItem, SelectTrigger } from '../molecules'; +import { Select, SelectContent, SelectItem, SelectTrigger } from '../molecules/Select'; const languages = [ { code: 'fr', label: 'Français', flagCode: 'fr' }, diff --git a/v6y-libs/ui-kit-front/src/components/organisms/index.ts b/v6y-libs/ui-kit-front/src/components/organisms/index.ts deleted file mode 100644 index 8e1d36ea..00000000 --- a/v6y-libs/ui-kit-front/src/components/organisms/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { LanguageMenu } from './LanguageMenu.tsx'; diff --git a/v6y-libs/ui-kit-front/src/hooks/index.ts b/v6y-libs/ui-kit-front/src/hooks/index.ts deleted file mode 100644 index 17e76df0..00000000 --- a/v6y-libs/ui-kit-front/src/hooks/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './useNavigationAdapter'; diff --git a/v6y-libs/ui-kit-front/src/index.ts b/v6y-libs/ui-kit-front/src/index.ts deleted file mode 100644 index e41702e3..00000000 --- a/v6y-libs/ui-kit-front/src/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * from './translation/useTranslationProvider.ts'; -export * from './translation/TranslationType.ts'; - -// Components -export * from './components/atoms'; -export * from './components/molecules'; -export * from './components/organisms'; - -export * from './hooks'; - -// Utils -export { cn } from './lib/utils'; diff --git a/v6y-libs/ui-kit/src/__tests__/AdminCreateWrapper-test.tsx b/v6y-libs/ui-kit/src/__tests__/AdminCreateWrapper-test.tsx index c93256c4..e8e033de 100644 --- a/v6y-libs/ui-kit/src/__tests__/AdminCreateWrapper-test.tsx +++ b/v6y-libs/ui-kit/src/__tests__/AdminCreateWrapper-test.tsx @@ -2,7 +2,7 @@ import '@testing-library/jest-dom/vitest'; import { act, screen } from '@testing-library/react'; import { describe, expect, it, vi } from 'vitest'; -import { AdminCreateWrapper } from '../components/organisms'; +import AdminCreateWrapper from '../components/organisms/admin/AdminCreateWrapper'; import { renderWithQueryClientProvider } from '../test-utils/TestUtils'; vi.mock('../api', () => ({ diff --git a/v6y-libs/ui-kit/src/__tests__/AdminEditWrapper-test.tsx b/v6y-libs/ui-kit/src/__tests__/AdminEditWrapper-test.tsx index 3e9fb90e..150236cf 100644 --- a/v6y-libs/ui-kit/src/__tests__/AdminEditWrapper-test.tsx +++ b/v6y-libs/ui-kit/src/__tests__/AdminEditWrapper-test.tsx @@ -3,7 +3,7 @@ import { act, screen, waitFor } from '@testing-library/react'; import { userEvent } from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { AdminEditWrapper } from '../components/organisms'; +import AdminEditWrapper from '../components/organisms/admin/AdminEditWrapper'; import { renderWithQueryClientProvider } from '../test-utils/TestUtils'; vi.mock('../api', () => ({ diff --git a/v6y-libs/ui-kit/src/__tests__/AdminListWrapper-test.tsx b/v6y-libs/ui-kit/src/__tests__/AdminListWrapper-test.tsx index dd662306..1949b108 100644 --- a/v6y-libs/ui-kit/src/__tests__/AdminListWrapper-test.tsx +++ b/v6y-libs/ui-kit/src/__tests__/AdminListWrapper-test.tsx @@ -4,7 +4,7 @@ import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { AdminListWrapper } from '../components/organisms'; +import AdminListWrapper from '../components/organisms/admin/AdminListWrapper'; import { renderWithQueryClientProvider } from '../test-utils/TestUtils'; vi.mock('../api', () => ({ diff --git a/v6y-libs/ui-kit/src/__tests__/AdminSelectWrapper-test.tsx b/v6y-libs/ui-kit/src/__tests__/AdminSelectWrapper-test.tsx index cf986d68..622703a0 100644 --- a/v6y-libs/ui-kit/src/__tests__/AdminSelectWrapper-test.tsx +++ b/v6y-libs/ui-kit/src/__tests__/AdminSelectWrapper-test.tsx @@ -2,8 +2,8 @@ import '@testing-library/jest-dom/vitest'; import { act, screen, waitFor } from '@testing-library/react'; import { Mock, describe, expect, it, vi } from 'vitest'; -import { gqlClientRequest } from '../api'; -import { AdminSelectWrapper } from '../components/organisms'; +import { gqlClientRequest } from '../api/GraphQLClient'; +import AdminSelectWrapper from '../components/organisms/admin/AdminSelectWrapper'; import { renderWithQueryClientProvider } from '../test-utils/TestUtils'; vi.mock('../api', () => ({ diff --git a/v6y-libs/ui-kit/src/__tests__/AdminShowWrapper-test.tsx b/v6y-libs/ui-kit/src/__tests__/AdminShowWrapper-test.tsx index c936f975..93b4455b 100644 --- a/v6y-libs/ui-kit/src/__tests__/AdminShowWrapper-test.tsx +++ b/v6y-libs/ui-kit/src/__tests__/AdminShowWrapper-test.tsx @@ -3,7 +3,7 @@ import '@testing-library/jest-dom/vitest'; import { act, screen, waitFor } from '@testing-library/react'; import { Mock, beforeEach, describe, expect, it, vi } from 'vitest'; -import { AdminShowWrapper } from '../components/organisms'; +import AdminShowWrapper from '../components/organisms/admin/AdminShowWrapper'; import { renderWithQueryClientProvider } from '../test-utils/TestUtils'; vi.mock('../api', () => ({ diff --git a/v6y-libs/ui-kit/src/api/index.ts b/v6y-libs/ui-kit/src/api/index.ts deleted file mode 100644 index f2a484b4..00000000 --- a/v6y-libs/ui-kit/src/api/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './GraphQLClient'; -export * from './types/AdminHttpError'; diff --git a/v6y-libs/ui-kit/src/components/atoms/index.ts b/v6y-libs/ui-kit/src/components/atoms/index.ts deleted file mode 100644 index 5618016f..00000000 --- a/v6y-libs/ui-kit/src/components/atoms/index.ts +++ /dev/null @@ -1,41 +0,0 @@ -export * from './Icons.tsx'; -export { default as DeleteButton } from './admin/DeleteButton.tsx'; -export { default as EditButton } from './admin/EditButton.tsx'; -export { default as ShowButton } from './admin/ShowButton.tsx'; -export { default as RefreshButton } from './admin/RefreshButton.tsx'; -export { default as ErrorView } from './admin/ErrorView.tsx'; -export { default as CreateLayout } from './admin/CreateLayout.tsx'; -export { default as EditLayout } from './admin/EditLayout.tsx'; -export { default as ShowLayout } from './admin/ShowLayout.tsx'; -export { default as ListLayout } from './admin/ListLayout.tsx'; -export { default as Checkbox } from './app/Checkbox.tsx'; -export { default as Form } from './app/Form.tsx'; -export { default as Descriptions } from './app/Descriptions.tsx'; -export { default as Select } from './app/Select.tsx'; -export { default as Input } from './app/Input.tsx'; -export { default as Result } from './app/Result.tsx'; -export { default as Space } from './app/Space.tsx'; -export { default as Table } from './app/Table.tsx'; -export { default as Layout } from './app/Layout.tsx'; -export { default as Avatar } from './app/Avatar.tsx'; -export { default as Button } from './app/Button.tsx'; -export { default as Card } from './app/Card.tsx'; -export { default as Divider } from './app/Divider.tsx'; -export { default as Dropdown } from './app/Dropdown.tsx'; -export { default as Flex } from './app/Flex.tsx'; -export { default as Menu } from './app/Menu.tsx'; -export { default as Statistic } from './app/Statistic.tsx'; -export { default as Switch } from './app/Switch.tsx'; -export { default as Breadcrumb } from './app/Breadcrumb.tsx'; -export { default as FloatButton } from './app/FloatButton.tsx'; -export { default as Tabs } from './app/Tabs.tsx'; -export { default as Tag } from './app/Tag.tsx'; -export { default as Charts } from './app/Charts.tsx'; -export { default as Message } from './app/Message.tsx'; -export { default as Modal } from './app/Modal.tsx'; -export { default as Collapse } from './app/Collapse.tsx'; -export { default as Spin } from './app/Spin.tsx'; -export { default as Empty } from './app/Empty.tsx'; -export * from './app/Typography.tsx'; -export * from './app/Grid.tsx'; -export * from './app/List.tsx'; diff --git a/v6y-libs/ui-kit/src/components/organisms/admin/AdminCreateWrapper.tsx b/v6y-libs/ui-kit/src/components/organisms/admin/AdminCreateWrapper.tsx index 132fd119..22e1b278 100644 --- a/v6y-libs/ui-kit/src/components/organisms/admin/AdminCreateWrapper.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/admin/AdminCreateWrapper.tsx @@ -3,9 +3,10 @@ import { useForm } from '@refinedev/antd'; import { BaseRecord, GetOneResponse, UseCreateProps, UseFormProps } from '@refinedev/core'; -import { gqlClientRequest } from '../../../api'; -import { CreateLayout, Form } from '../../atoms'; -import { FormCreateWrapperType } from '../../types'; +import { gqlClientRequest } from '../../../api/GraphQLClient'; +import CreateLayout from '../../atoms/admin/CreateLayout'; +import Form from '../../atoms/app/Form'; +import { FormCreateWrapperType } from '../../types/FormType'; const AdminCreateWrapper = ({ title, createOptions, formItems }: FormCreateWrapperType) => { const { form, formProps, saveButtonProps } = useForm({ diff --git a/v6y-libs/ui-kit/src/components/organisms/admin/AdminEditWrapper.tsx b/v6y-libs/ui-kit/src/components/organisms/admin/AdminEditWrapper.tsx index 3f8e0f69..c800562f 100644 --- a/v6y-libs/ui-kit/src/components/organisms/admin/AdminEditWrapper.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/admin/AdminEditWrapper.tsx @@ -4,9 +4,10 @@ import { useForm } from '@refinedev/antd'; import { BaseRecord, GetOneResponse, UseFormProps, UseUpdateProps } from '@refinedev/core'; import { useEffect } from 'react'; -import { gqlClientRequest } from '../../../api'; -import { EditLayout, Form } from '../../atoms'; -import { FormWrapperType } from '../../types'; +import { gqlClientRequest } from '../../../api/GraphQLClient'; +import EditLayout from '../../atoms/admin/EditLayout'; +import Form from '../../atoms/app/Form'; +import { FormWrapperType } from '../../types/FormType'; const AdminEditWrapper = ({ title, queryOptions, mutationOptions, formItems }: FormWrapperType) => { const { form, formProps, saveButtonProps, query } = useForm({ diff --git a/v6y-libs/ui-kit/src/components/organisms/admin/AdminErrorView.tsx b/v6y-libs/ui-kit/src/components/organisms/admin/AdminErrorView.tsx index c9c78cd9..2a1d8b95 100644 --- a/v6y-libs/ui-kit/src/components/organisms/admin/AdminErrorView.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/admin/AdminErrorView.tsx @@ -1,7 +1,7 @@ import { RefineReadyPageProps } from '@refinedev/ui-types'; import * as React from 'react'; -import { ErrorView } from '../../atoms'; +import ErrorView from '../../atoms/admin/ErrorView'; const AdminErrorView = (props: RefineReadyPageProps) => ; diff --git a/v6y-libs/ui-kit/src/components/organisms/admin/AdminListWrapper.tsx b/v6y-libs/ui-kit/src/components/organisms/admin/AdminListWrapper.tsx index 6d335b98..4dc3f49b 100644 --- a/v6y-libs/ui-kit/src/components/organisms/admin/AdminListWrapper.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/admin/AdminListWrapper.tsx @@ -2,9 +2,10 @@ import { useTable } from '@refinedev/antd'; import { BaseRecord, HttpError } from '@refinedev/core'; import { ReactNode } from 'react'; -import { gqlClientRequest } from '../../../api'; -import { ListLayout, RefreshButton } from '../../atoms'; -import { AdminTableType } from '../../types'; +import { gqlClientRequest } from '../../../api/GraphQLClient'; +import ListLayout from '../../atoms/admin/ListLayout'; +import RefreshButton from '../../atoms/admin/RefreshButton'; +import { AdminTableType } from '../../types/AdminTableType'; import LoaderView from '../app/LoaderView.tsx'; import TitleView from '../app/TitleView.tsx'; diff --git a/v6y-libs/ui-kit/src/components/organisms/admin/AdminSelectWrapper.tsx b/v6y-libs/ui-kit/src/components/organisms/admin/AdminSelectWrapper.tsx index 0fe9884f..abc29ce0 100644 --- a/v6y-libs/ui-kit/src/components/organisms/admin/AdminSelectWrapper.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/admin/AdminSelectWrapper.tsx @@ -4,9 +4,10 @@ import { useForm, useSelect } from '@refinedev/antd'; import { BaseRecord, GetOneResponse, HttpError } from '@refinedev/core'; import { ReactNode, useEffect } from 'react'; -import { gqlClientRequest } from '../../../api'; -import { EditLayout, Form } from '../../atoms'; -import { FormWrapperType, SelectOptionsType } from '../../types'; +import { gqlClientRequest } from '../../../api/GraphQLClient'; +import EditLayout from '../../atoms/admin/EditLayout'; +import Form from '../../atoms/app/Form'; +import { FormWrapperType, SelectOptionsType } from '../../types/FormType'; const AdminSelectWrapper = ({ title, diff --git a/v6y-libs/ui-kit/src/components/organisms/admin/AdminShowWrapper.tsx b/v6y-libs/ui-kit/src/components/organisms/admin/AdminShowWrapper.tsx index e2fcb9fe..27f4f1d4 100644 --- a/v6y-libs/ui-kit/src/components/organisms/admin/AdminShowWrapper.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/admin/AdminShowWrapper.tsx @@ -2,9 +2,10 @@ import { BaseRecord, GetOneResponse, useShow } from '@refinedev/core'; -import { gqlClientRequest } from '../../../api'; -import { RefreshButton, ShowLayout } from '../../atoms'; -import { FormShowOptions } from '../../types'; +import { gqlClientRequest } from '../../../api/GraphQLClient'; +import RefreshButton from '../../atoms/admin/RefreshButton'; +import ShowLayout from '../../atoms/admin/ShowLayout'; +import { FormShowOptions } from '../../types/FormType'; const AdminShowWrapper = ({ title, renderShowView, queryOptions }: FormShowOptions) => { const { query } = useShow({ diff --git a/v6y-libs/ui-kit/src/components/organisms/app/CollapseView.tsx b/v6y-libs/ui-kit/src/components/organisms/app/CollapseView.tsx index c784eaa1..71f6814e 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/CollapseView.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/CollapseView.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import { Collapse } from '../../atoms'; -import { CollapseType } from '../../types'; +import Collapse from '../../atoms/app/Collapse'; +import { CollapseType } from '../../types/CollapseType'; import EmptyView from './EmptyView.tsx'; const CollapseView = ({ bordered, accordion, dataSource }: CollapseType) => { diff --git a/v6y-libs/ui-kit/src/components/organisms/app/ControlledCheckbox.tsx b/v6y-libs/ui-kit/src/components/organisms/app/ControlledCheckbox.tsx index 46cc03b5..fb5c9a0a 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/ControlledCheckbox.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/ControlledCheckbox.tsx @@ -2,8 +2,8 @@ import { Controller } from 'react-hook-form'; -import { Checkbox } from '../../atoms'; -import { ControlledCheckboxType } from '../../types'; +import Checkbox from '../../atoms/app/Checkbox'; +import { ControlledCheckboxType } from '../../types/CheckboxType'; const ControlledCheckbox = ({ name, control, ariaLabel }: ControlledCheckboxType) => { return ( diff --git a/v6y-libs/ui-kit/src/components/organisms/app/ControlledInput.tsx b/v6y-libs/ui-kit/src/components/organisms/app/ControlledInput.tsx index 153f1bf1..d9787879 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/ControlledInput.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/ControlledInput.tsx @@ -2,8 +2,8 @@ import { Controller } from 'react-hook-form'; -import { Input } from '../../atoms'; -import { ControlledInputType } from '../../types'; +import Input from '../../atoms/app/Input'; +import { ControlledInputType } from '../../types/InputType'; const ControlledInput = ({ name, diff --git a/v6y-libs/ui-kit/src/components/organisms/app/DynamicLoader.tsx b/v6y-libs/ui-kit/src/components/organisms/app/DynamicLoader.tsx index 71f2d73a..2dfbe4e5 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/DynamicLoader.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/DynamicLoader.tsx @@ -1,7 +1,7 @@ import dynamic, { DynamicOptions } from 'next/dynamic'; import * as React from 'react'; -import { DynamicLoaderType } from '../../types'; +import { DynamicLoaderType } from '../../types/DynamicLoaderType'; import LoaderView from './LoaderView.tsx'; const ControlledLoading = () => ; diff --git a/v6y-libs/ui-kit/src/components/organisms/app/EmptyView.tsx b/v6y-libs/ui-kit/src/components/organisms/app/EmptyView.tsx index fee24e4b..b55d8603 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/EmptyView.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/EmptyView.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { Empty } from '../../atoms'; +import Empty from '../../atoms/app/Empty'; import TextView from './TextView.tsx'; const EmptyView = ({ message }: { message?: string }) => ( diff --git a/v6y-libs/ui-kit/src/components/organisms/app/LanguageMenu.tsx b/v6y-libs/ui-kit/src/components/organisms/app/LanguageMenu.tsx index 715d6635..5af0090b 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/LanguageMenu.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/LanguageMenu.tsx @@ -1,7 +1,11 @@ import * as React from 'react'; import { useTranslationProvider } from '../../../translation/useTranslationProvider'; -import { Avatar, Button, DownOutlined, Dropdown, Space } from '../../atoms'; +import { DownOutlined } from '../../atoms/Icons'; +import Avatar from '../../atoms/app/Avatar'; +import Button from '../../atoms/app/Button'; +import Dropdown from '../../atoms/app/Dropdown'; +import Space from '../../atoms/app/Space'; import TextView from './TextView.tsx'; const LanguageMenu = () => { diff --git a/v6y-libs/ui-kit/src/components/organisms/app/Links.tsx b/v6y-libs/ui-kit/src/components/organisms/app/Links.tsx index 2caa281f..33a575d4 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/Links.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/Links.tsx @@ -3,8 +3,8 @@ import * as React from 'react'; import { LinkType } from '@v6y/core-logic'; -import { Col, Row } from '../../atoms'; -import { LinksType } from '../../types'; +import { Col, Row } from '../../atoms/app/Grid'; +import { LinksType } from '../../types/LinksType'; import TextView from './TextView.tsx'; const Links = ({ links, align }: LinksType) => { diff --git a/v6y-libs/ui-kit/src/components/organisms/app/LoadMoreList.tsx b/v6y-libs/ui-kit/src/components/organisms/app/LoadMoreList.tsx index 00cdce04..00949784 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/LoadMoreList.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/LoadMoreList.tsx @@ -1,5 +1,8 @@ -import { Button, Flex, List, SyncOutlined } from '../../atoms'; -import { PaginatedListType } from '../../types'; +import { SyncOutlined } from '../../atoms/Icons'; +import Button from '../../atoms/app/Button'; +import Flex from '../../atoms/app/Flex'; +import { List } from '../../atoms/app/List'; +import { PaginatedListType } from '../../types/PaginatedListType'; const LoadMoreList = ({ isDataSourceLoading, diff --git a/v6y-libs/ui-kit/src/components/organisms/app/LoaderView.tsx b/v6y-libs/ui-kit/src/components/organisms/app/LoaderView.tsx index 9fecb23d..dbf6c192 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/LoaderView.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/LoaderView.tsx @@ -1,4 +1,5 @@ -import { Col, Row, Spin } from '../../atoms'; +import { Col, Row } from '../../atoms/app/Grid'; +import Spin from '../../atoms/app/Spin'; const LoaderView = () => ( diff --git a/v6y-libs/ui-kit/src/components/organisms/app/ModalView.tsx b/v6y-libs/ui-kit/src/components/organisms/app/ModalView.tsx index ec11522a..73fca73c 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/ModalView.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/ModalView.tsx @@ -1,7 +1,9 @@ import * as React from 'react'; -import { Button, Divider, Modal } from '../../atoms'; -import { ModalType } from '../../types'; +import Button from '../../atoms/app/Button'; +import Divider from '../../atoms/app/Divider'; +import Modal from '../../atoms/app/Modal'; +import { ModalType } from '../../types/ModalType'; const ModalView = ({ title, isOpen, onCloseModal, children }: ModalType) => { return ( diff --git a/v6y-libs/ui-kit/src/components/organisms/app/PaginatedList.tsx b/v6y-libs/ui-kit/src/components/organisms/app/PaginatedList.tsx index df74713a..556ce060 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/PaginatedList.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/PaginatedList.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import { List } from '../../atoms'; -import { PaginatedListType } from '../../types'; +import { List } from '../../atoms/app/List'; +import { PaginatedListType } from '../../types/PaginatedListType'; import TextView from './TextView.tsx'; const PaginatedList = ({ diff --git a/v6y-libs/ui-kit/src/components/organisms/app/Paragraph.tsx b/v6y-libs/ui-kit/src/components/organisms/app/Paragraph.tsx index af38726c..2d69b29b 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/Paragraph.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/Paragraph.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import { Paragraph as AtomParagraph } from '../../atoms'; -import { ParagraphType } from '../../types'; +import { Paragraph as AtomParagraph } from '../../atoms/app/Typography'; +import { ParagraphType } from '../../types/ParagraphType'; const Paragraph = ({ content, style, strong, underline }: ParagraphType) => { return ( diff --git a/v6y-libs/ui-kit/src/components/organisms/app/TextView.tsx b/v6y-libs/ui-kit/src/components/organisms/app/TextView.tsx index 36040d7b..8e78fe57 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/TextView.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/TextView.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import { Text } from '../../atoms'; -import { TextType } from '../../types'; +import { Text } from '../../atoms/app/Typography'; +import { TextType } from '../../types/TextType'; const TextView = ({ content, style, strong, underline }: TextType) => { return ( diff --git a/v6y-libs/ui-kit/src/components/organisms/app/TitleView.tsx b/v6y-libs/ui-kit/src/components/organisms/app/TitleView.tsx index fec51763..8d3f91b2 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/TitleView.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/TitleView.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import { Title } from '../../atoms'; -import { TitleType } from '../../types'; +import { Title } from '../../atoms/app/Typography'; +import { TitleType } from '../../types/TitleType'; import TextView from './TextView.tsx'; const TitleView = ({ title, subTitle, level = 2, style, underline }: TitleType) => { diff --git a/v6y-libs/ui-kit/src/components/organisms/index.ts b/v6y-libs/ui-kit/src/components/organisms/index.ts deleted file mode 100644 index bcacd700..00000000 --- a/v6y-libs/ui-kit/src/components/organisms/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -export { default as CollapseView } from './app/CollapseView.tsx'; -export { default as EmptyView } from './app/EmptyView.tsx'; -export { default as Links } from './app/Links.tsx'; -export { default as LoaderView } from './app/LoaderView.tsx'; -export { default as ModalView } from './app/ModalView.tsx'; -export { default as TextView } from './app/TextView.tsx'; -export { default as TitleView } from './app/TitleView.tsx'; -export { default as ControlledInput } from './app/ControlledInput.tsx'; -export { default as ControlledCheckbox } from './app/ControlledCheckbox.tsx'; -export { default as PaginatedList } from './app/PaginatedList.tsx'; -export { default as DynamicLoader } from './app/DynamicLoader.tsx'; -export { default as LanguageMenu } from './app/LanguageMenu.tsx'; -export { default as LoadMoreList } from './app/LoadMoreList.tsx'; -export { default as AdminLayout } from './admin/AdminLayout.tsx'; -export { default as AdminCreateWrapper } from './admin/AdminCreateWrapper.tsx'; -export { default as AdminEditWrapper } from './admin/AdminEditWrapper.tsx'; -export { default as AdminSelectWrapper } from './admin/AdminSelectWrapper.tsx'; -export { default as AdminShowWrapper } from './admin/AdminShowWrapper.tsx'; -export { default as AdminListWrapper } from './admin/AdminListWrapper.tsx'; -export { default as AdminErrorView } from './admin/AdminErrorView.tsx'; diff --git a/v6y-libs/ui-kit/src/components/pages/index.ts b/v6y-libs/ui-kit/src/components/pages/index.ts deleted file mode 100644 index 007e11c0..00000000 --- a/v6y-libs/ui-kit/src/components/pages/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default as AdminAuthenticationWrapper } from './admin/AdminAuthenticationWrapper.tsx'; -export { default as AdminAuthenticatedWrapper } from './admin/AdminAuthenticatedWrapper.tsx'; -export { default as AdminNavigationWrapper } from './admin/AdminNavigationWrapper.tsx'; diff --git a/v6y-libs/ui-kit/src/components/types/FormType.ts b/v6y-libs/ui-kit/src/components/types/FormType.ts index 5d317e49..188ce8d3 100644 --- a/v6y-libs/ui-kit/src/components/types/FormType.ts +++ b/v6y-libs/ui-kit/src/components/types/FormType.ts @@ -1,7 +1,7 @@ import { Variables } from 'graphql-request'; import { ReactNode } from 'react'; -import { AdminHttpError } from '../../api'; +import { AdminHttpError } from '../../api/types/AdminHttpError'; export interface FormQueryOptionsType { resource?: string; diff --git a/v6y-libs/ui-kit/src/components/types/index.ts b/v6y-libs/ui-kit/src/components/types/index.ts deleted file mode 100644 index 06558c4b..00000000 --- a/v6y-libs/ui-kit/src/components/types/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -export * from './AdminTableType'; -export * from './CollapseType.ts'; -export * from './FormType'; -export * from './LinksType.ts'; -export * from './SelectOptionType'; -export * from './AdminMessageType'; -export * from './TableType'; -export * from './CheckboxType.ts'; -export * from './BreadcrumbType.ts'; -export * from './ListType.ts'; -export * from './PaginatedListType.ts'; -export * from './ModalType.ts'; -export * from './InputType.ts'; -export * from './DynamicLoaderType.ts'; -export * from './TitleType.ts'; -export * from './TextType.ts'; -export * from './ParagraphType.ts'; diff --git a/v6y-libs/ui-kit/src/hooks/index.ts b/v6y-libs/ui-kit/src/hooks/index.ts deleted file mode 100644 index ac3a0ffa..00000000 --- a/v6y-libs/ui-kit/src/hooks/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './useAdminIdentity.tsx'; -export * from './useNavigationAdapter'; -export * from './useAdminNavigationAdapter'; -export * from './useForm'; -export * from './useThemeConfigProvider'; diff --git a/v6y-libs/ui-kit/src/hooks/useThemeConfigProvider.tsx b/v6y-libs/ui-kit/src/hooks/useThemeConfigProvider.tsx index 6cddb791..d00029ed 100644 --- a/v6y-libs/ui-kit/src/hooks/useThemeConfigProvider.tsx +++ b/v6y-libs/ui-kit/src/hooks/useThemeConfigProvider.tsx @@ -2,8 +2,8 @@ import { useContext } from 'react'; -import { ThemeContextType } from '../theme'; import { ThemeConfigProvider } from '../theme/commons/ThemeContext'; +import { ThemeContextType } from '../theme/types/ThemeProps'; export const useThemeConfigProvider = () => { const { currentConfig } = useContext(ThemeConfigProvider); diff --git a/v6y-libs/ui-kit/src/index.ts b/v6y-libs/ui-kit/src/index.ts index cc8ea61c..64aeff32 100644 --- a/v6y-libs/ui-kit/src/index.ts +++ b/v6y-libs/ui-kit/src/index.ts @@ -1,15 +1,101 @@ import '@ant-design/v5-patch-for-react-19'; -export * from './providers'; -export * from './hooks'; +export type * from './providers/admin/AdminProvider'; +export type * from './providers/admin/AdminDataProvider'; +export type * from './providers/types/AdminAuthProviderType'; +export type * from './hooks/useAdminIdentity'; +export type * from './hooks/useNavigationAdapter'; +export type * from './hooks/useAdminNavigationAdapter'; +export type * from './hooks/useForm'; +export type * from './hooks/useThemeConfigProvider'; export * from './translation/useTranslationProvider.ts'; export * from './translation/TranslationType.ts'; -export * from './components/types'; -export * from './components/pages'; -export * from './components/organisms'; -export * from './components/atoms'; +export type * from './components/types/AdminTableType'; +export type * from './components/types/CollapseType'; +export type * from './components/types/FormType'; +export type * from './components/types/LinksType'; +export type * from './components/types/SelectOptionType'; +export type * from './components/types/AdminMessageType'; +export type * from './components/types/TableType'; +export type * from './components/types/CheckboxType'; +export type * from './components/types/BreadcrumbType'; +export type * from './components/types/ListType'; +export type * from './components/types/PaginatedListType'; +export type * from './components/types/ModalType'; +export type * from './components/types/InputType'; +export type * from './components/types/DynamicLoaderType'; +export type * from './components/types/TitleType'; +export type * from './components/types/TextType'; +export type * from './components/types/ParagraphType'; +export type * from './components/pages/admin/AdminAuthenticationWrapper'; +export type * from './components/pages/admin/AdminAuthenticatedWrapper'; +export type * from './components/pages/admin/AdminNavigationWrapper'; +export type * from './components/organisms/app/CollapseView'; +export type * from './components/organisms/app/EmptyView'; +export type * from './components/organisms/app/Links'; +export type * from './components/organisms/app/LoaderView'; +export type * from './components/organisms/app/ModalView'; +export type * from './components/organisms/app/TextView'; +export type * from './components/organisms/app/TitleView'; +export type * from './components/organisms/app/ControlledInput'; +export type * from './components/organisms/app/ControlledCheckbox'; +export type * from './components/organisms/app/PaginatedList'; +export type * from './components/organisms/app/DynamicLoader'; +export type * from './components/organisms/app/LanguageMenu'; +export type * from './components/organisms/app/LoadMoreList'; +export type * from './components/organisms/admin/AdminLayout'; +export type * from './components/organisms/admin/AdminCreateWrapper'; +export type * from './components/organisms/admin/AdminEditWrapper'; +export type * from './components/organisms/admin/AdminSelectWrapper'; +export type * from './components/organisms/admin/AdminShowWrapper'; +export type * from './components/organisms/admin/AdminListWrapper'; +export type * from './components/organisms/admin/AdminErrorView'; +export type * from './components/atoms/Icons'; +export type * from './components/atoms/admin/DeleteButton'; +export type * from './components/atoms/admin/EditButton'; +export type * from './components/atoms/admin/ShowButton'; +export type * from './components/atoms/admin/RefreshButton'; +export type * from './components/atoms/admin/ErrorView'; +export type * from './components/atoms/admin/CreateLayout'; +export type * from './components/atoms/admin/EditLayout'; +export type * from './components/atoms/admin/ShowLayout'; +export type * from './components/atoms/admin/ListLayout'; +export type * from './components/atoms/app/Checkbox'; +export type * from './components/atoms/app/Form'; +export type * from './components/atoms/app/Descriptions'; +export type * from './components/atoms/app/Select'; +export type * from './components/atoms/app/Input'; +export type * from './components/atoms/app/Result'; +export type * from './components/atoms/app/Space'; +export type * from './components/atoms/app/Table'; +export type * from './components/atoms/app/Layout'; +export type * from './components/atoms/app/Avatar'; +export type * from './components/atoms/app/Button'; +export type * from './components/atoms/app/Card'; +export type * from './components/atoms/app/Divider'; +export type * from './components/atoms/app/Dropdown'; +export type * from './components/atoms/app/Flex'; +export type * from './components/atoms/app/Menu'; +export type * from './components/atoms/app/Statistic'; +export type * from './components/atoms/app/Switch'; +export type * from './components/atoms/app/Breadcrumb'; +export type * from './components/atoms/app/FloatButton'; +export type * from './components/atoms/app/Tabs'; +export type * from './components/atoms/app/Tag'; +export type * from './components/atoms/app/Charts'; +export type * from './components/atoms/app/Message'; +export type * from './components/atoms/app/Modal'; +export type * from './components/atoms/app/Collapse'; +export type * from './components/atoms/app/Spin'; +export type * from './components/atoms/app/Empty'; +export type * from './components/atoms/app/Typography'; +export type * from './components/atoms/app/Grid'; +export type * from './components/atoms/app/List'; -export * from './theme'; -export * from './api'; +export type * from './theme/commons/ThemeProvider'; +export type * from './theme/types/ThemeProps'; +export type * from './theme/commons/ThemeLoader'; +export type * from './api/GraphQLClient'; +export type * from './api/types/AdminHttpError'; diff --git a/v6y-libs/ui-kit/src/providers/admin/AdminProvider.tsx b/v6y-libs/ui-kit/src/providers/admin/AdminProvider.tsx index 33a461b9..4428709d 100644 --- a/v6y-libs/ui-kit/src/providers/admin/AdminProvider.tsx +++ b/v6y-libs/ui-kit/src/providers/admin/AdminProvider.tsx @@ -13,7 +13,8 @@ import routerProvider from '@refinedev/nextjs-router'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import * as React from 'react'; -import { ThemeModes, ThemeProvider, ThemeTypes } from '../../theme'; +import { ThemeModes, ThemeTypes } from '../../theme/commons/ThemeLoader'; +import { ThemeProvider } from '../../theme/commons/ThemeProvider'; import { useTranslationProvider } from '../../translation/useTranslationProvider'; import { AdminDevtoolsProvider } from './AdminDevtoolsProvider'; diff --git a/v6y-libs/ui-kit/src/providers/index.ts b/v6y-libs/ui-kit/src/providers/index.ts deleted file mode 100644 index f02697b7..00000000 --- a/v6y-libs/ui-kit/src/providers/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default as AdminProvider } from './admin/AdminProvider'; -export * from './admin/AdminDataProvider'; -export * from './types/AdminAuthProviderType'; diff --git a/v6y-libs/ui-kit/src/theme/index.ts b/v6y-libs/ui-kit/src/theme/index.ts deleted file mode 100644 index 4a79d5b5..00000000 --- a/v6y-libs/ui-kit/src/theme/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './commons/ThemeProvider.tsx'; -export * from './types/ThemeProps.ts'; -export * from './commons/ThemeLoader.ts'; diff --git a/v6y-libs/ui-kit/src/theme/variants/app/AppTheme.tsx b/v6y-libs/ui-kit/src/theme/variants/app/AppTheme.tsx index b56e598d..ffe38465 100644 --- a/v6y-libs/ui-kit/src/theme/variants/app/AppTheme.tsx +++ b/v6y-libs/ui-kit/src/theme/variants/app/AppTheme.tsx @@ -1,6 +1,10 @@ import * as React from 'react'; -import { DislikeOutlined, LikeOutlined, ThunderboltOutlined } from '../../../components/atoms'; +import { + DislikeOutlined, + LikeOutlined, + ThunderboltOutlined, +} from '../../../components/atoms/Icons'; const ThemeTokensConfig = { colorTextBase: '#1a1a1a', From 717ac55f014bfff9085ca373efbfff46a2afe1eb Mon Sep 17 00:00:00 2001 From: "theo.gillet" Date: Tue, 10 Feb 2026 10:46:34 +0100 Subject: [PATCH 2/3] [FIX]: tests failing since barrel files removal --- pnpm-lock.yaml | 6 + v6y-apps/front/package.json | 2 + v6y-apps/front/setupTests.tsx | 178 +++++++++++++++--- .../app-list/VitalityAppListView-test.tsx | 32 ++-- .../commons/VitalityAppInfos-test.tsx | 35 ++-- .../application-info/VitalityAppInfos.tsx | 15 +- .../commons/hooks/useVitalitySearchBar.tsx | 2 +- .../components/VitalityAppDetailsView.tsx | 12 +- .../VitalityAuditReportsTypeGrouper.tsx | 7 +- .../VitalityAuditReportsView.tsx | 2 +- .../VitalityDependenciesBranchGrouper.tsx | 7 +- .../VitalityDependenciesStatusGrouper.tsx | 7 +- .../dependencies/VitalityDependenciesView.tsx | 2 +- .../VitalityEvolutionBranchGrouper.tsx | 7 +- .../evolutions/VitalityEvolutionsView.tsx | 2 +- .../infos/VitalityGeneralInformationView.tsx | 6 +- .../VitalityQualityIndicatorBranchGrouper.tsx | 7 +- .../VitalityQualityIndicatorStatusGrouper.tsx | 7 +- .../VitalityQualityIndicatorsView.tsx | 2 +- .../summary-card/VitalitySummaryCard.tsx | 3 +- .../app-list/components/VitalityAppList.tsx | 4 +- .../components/VitalityAppListHeader.tsx | 4 +- .../components/VitalityAppListPagination.tsx | 2 +- .../components/VitalityAppListView.tsx | 22 ++- .../auth/components/VitalityLoginForm.tsx | 12 +- .../components/VitalityContactPageView.tsx | 10 +- .../VitalityDashboardFilterItem.tsx | 5 +- .../components/VitalityDashboardFilters.tsx | 7 +- .../faq/components/VitalityFaqList.tsx | 7 +- .../faq/components/VitalityFaqView.tsx | 2 +- v6y-libs/ui-kit-front/package.json | 24 ++- .../src/__tests__/AdminSelectWrapper-test.tsx | 2 +- 32 files changed, 313 insertions(+), 129 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bcdc777f..59f60477 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -621,6 +621,9 @@ importers: v6y-apps/front: dependencies: + '@radix-ui/react-icons': + specifier: '=1.3.2' + version: 1.3.2(react@19.0.0) '@tanstack/react-query': specifier: '=5.90.2' version: 5.90.2(react@19.0.0) @@ -669,6 +672,9 @@ importers: js-cookie: specifier: '=3.0.5' version: 3.0.5 + lucide-react: + specifier: '=0.511.0' + version: 0.511.0(react@19.0.0) next: specifier: '=15.4.10' version: 15.4.10(@babel/core@7.28.5)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) diff --git a/v6y-apps/front/package.json b/v6y-apps/front/package.json index e5b745bb..dd7c9b90 100644 --- a/v6y-apps/front/package.json +++ b/v6y-apps/front/package.json @@ -31,6 +31,7 @@ "@v6y/core-logic": "workspace:^", "@v6y/ui-kit": "workspace:^", "@v6y/ui-kit-front": "workspace:^", + "@radix-ui/react-icons": "=1.3.2", "@vitejs/plugin-react-swc": "=3.7.2", "crypto-hash": "=4.0.0", "google": "link:next/font/google", @@ -41,6 +42,7 @@ "i18next-browser-languagedetector": "=8.0.2", "i18next-resources-to-backend": "=1.2.1", "js-cookie": "=3.0.5", + "lucide-react": "=0.511.0", "next": "=15.4.10", "react": "=19.0.0", "react-chatbotify": "=2.0.0-beta.26", diff --git a/v6y-apps/front/setupTests.tsx b/v6y-apps/front/setupTests.tsx index 03b2f406..056703c4 100644 --- a/v6y-apps/front/setupTests.tsx +++ b/v6y-apps/front/setupTests.tsx @@ -1,8 +1,9 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { cleanup } from '@testing-library/react'; import { List } from '@v6y/ui-kit'; -import '@v6y/ui-kit-front'; +import '@v6y/ui-kit-front/styles.css'; import dynamic from 'next/dynamic'; +import * as React from 'react'; import { afterEach, beforeEach, vi } from 'vitest'; vi.mock('next/dynamic', async () => { @@ -57,7 +58,7 @@ vi.mock('@v6y/ui-kit', () => { createUrlQueryParam: vi.fn((key, value) => `${key}=${value}`), removeUrlQueryParam: vi.fn(), getUrlParams: vi.fn(() => ['123']), - pathname: '/dashboard', + pathname: '/apps', router: { push: vi.fn(), replace: vi.fn() }, }; }), @@ -490,34 +491,39 @@ vi.mock('@v6y/ui-kit', () => { }; }); -vi.mock('@v6y/ui-kit-front', async () => { - const actual = await vi.importActual('@v6y/ui-kit-front'); - return { - ...actual, - useNavigationAdapter: vi.fn(() => ({ - createUrlQueryParam: vi.fn((name: string, value: string) => `${name}=${value}`), - removeUrlQueryParam: vi.fn(), - getUrlParams: vi.fn(() => ['123']), - pathname: '/dashboard', - router: { - push: vi.fn(), - replace: vi.fn(), - back: vi.fn(), - forward: vi.fn(), - refresh: vi.fn(), - }, - })), - useTranslationProvider: vi.fn(() => ({ - translate: (key: string) => key, - })), - Input: vi.fn((props) => ), - Button: vi.fn(({ children, onClick, ...others }) => ( - - )), - }; -}); +vi.mock('@v6y/ui-kit-front/hooks/useNavigationAdapter', () => ({ + useNavigationAdapter: vi.fn(() => ({ + createUrlQueryParam: vi.fn((name: string, value: string) => `${name}=${value}`), + removeUrlQueryParam: vi.fn(), + getUrlParams: vi.fn(() => ['123']), + pathname: '/dashboard', + router: { + push: vi.fn(), + replace: vi.fn(), + back: vi.fn(), + forward: vi.fn(), + refresh: vi.fn(), + }, + })), +})); + +vi.mock('@v6y/ui-kit-front/translation/useTranslationProvider', () => ({ + useTranslationProvider: vi.fn(() => ({ + translate: (key: string) => key, + })), +})); + +vi.mock('@v6y/ui-kit-front/components/atoms/input', () => ({ + Input: vi.fn((props) => ), +})); + +vi.mock('@v6y/ui-kit-front/components/atoms/button', () => ({ + Button: vi.fn(({ children, onClick, ...others }) => ( + + )), +})); vi.mock('./src/commons/components/VitalitySearchBar', () => ({ default: ({ placeholder, helper, label }: any) => ( @@ -559,3 +565,115 @@ vi.mock('./src/infrastructure/adapters/api/useQueryAdapter', () => { vi.mock('./src/commons/utils/VitalityDataExportUtils', () => ({ exportAppListDataToCSV: vi.fn(), })); + +// Mock lucide-react icons +vi.mock('lucide-react', () => ({ + GlobeIcon: () => React.createElement('div'), + PlayIcon: () => React.createElement('div'), + ReloadIcon: () => React.createElement('div'), + ShuffleIcon: () => React.createElement('div'), + StarIcon: () => React.createElement('div'), + Check: () => React.createElement('div'), +})); + +// Mock ui-kit-front components +vi.mock('@v6y/ui-kit-front/components/atoms/button', () => ({ + Button: ({ children, ...props }: any) => React.createElement('button', props, children), +})); + +vi.mock('@v6y/ui-kit-front/components/atoms/input', () => ({ + Input: ({ ...props }: any) => React.createElement('input', props), +})); + +vi.mock('@v6y/ui-kit-front/components/molecules/Select', () => ({ + Select: ({ children, ...props }: any) => React.createElement('div', props, children), + SelectContent: ({ children, ...props }: any) => React.createElement('div', props, children), + SelectItem: ({ children, ...props }: any) => React.createElement('div', props, children), + SelectTrigger: ({ children, ...props }: any) => React.createElement('div', { ...props, role: 'combobox' }, children), + SelectValue: ({ children, ...props }: any) => React.createElement('div', props, children), +})); + +vi.mock('@v6y/ui-kit-front/components/molecules/Card', () => ({ + Card: ({ children, ...props }: any) => React.createElement('div', props, children), + CardContent: ({ children, ...props }: any) => React.createElement('div', props, children), + CardDescription: ({ children, ...props }: any) => React.createElement('div', props, children), + CardHeader: ({ children, ...props }: any) => React.createElement('div', props, children), + CardTitle: ({ children, ...props }: any) => React.createElement('div', props, children), +})); + +vi.mock('@v6y/ui-kit-front/components/molecules/Form', () => ({ + Form: ({ children, ...props }: any) => React.createElement('form', props, children), + FormControl: ({ children, ...props }: any) => React.createElement('div', props, children), + FormField: ({ children, ...props }: any) => React.createElement('div', props, children), + FormItem: ({ children, ...props }: any) => React.createElement('div', props, children), + FormLabel: ({ children, ...props }: any) => React.createElement('label', props, children), + FormMessage: ({ children, ...props }: any) => React.createElement('div', props, children), +})); + +vi.mock('@v6y/ui-kit-front/components/atoms/sonnerHelpers', () => ({ + toast: vi.fn(), +})); + +vi.mock('@v6y/ui-kit-front/components/atoms/avatar', () => ({ + Avatar: ({ children, ...props }: any) => React.createElement('div', props, children), + AvatarFallback: ({ children, ...props }: any) => React.createElement('div', props, children), + AvatarImage: ({ children, ...props }: any) => React.createElement('img', props, children), +})); + +vi.mock('@v6y/ui-kit-front/components/atoms/badge', () => ({ + Badge: ({ children, ...props }: any) => React.createElement('span', props, children), +})); + +vi.mock('@v6y/ui-kit-front/components/atoms/label', () => ({ + Label: ({ children, ...props }: any) => React.createElement('label', props, children), +})); + +vi.mock('@v6y/ui-kit-front/components/atoms/skeleton', () => ({ + Skeleton: ({ ...props }: any) => React.createElement('div', props), +})); + +vi.mock('@v6y/ui-kit-front/components/atoms/spinner', () => ({ + Spinner: ({ ...props }: any) => React.createElement('div', props), +})); + +vi.mock('@v6y/ui-kit-front/components/atoms/textarea', () => ({ + Textarea: ({ ...props }: any) => React.createElement('textarea', props), +})); + +vi.mock('@v6y/ui-kit-front/components/molecules/Accordion', () => ({ + Accordion: ({ children, ...props }: any) => React.createElement('div', props, children), + AccordionContent: ({ children, ...props }: any) => React.createElement('div', props, children), + AccordionItem: ({ children, ...props }: any) => React.createElement('div', props, children), + AccordionTrigger: ({ children, ...props }: any) => React.createElement('div', props, children), +})); + +vi.mock('@v6y/ui-kit-front/components/molecules/Typography', () => ({ + TypographyH1: ({ children, ...props }: any) => React.createElement('h1', props, children), + TypographyH2: ({ children, ...props }: any) => React.createElement('h2', props, children), + TypographyH3: ({ children, ...props }: any) => React.createElement('h3', props, children), + TypographyH4: ({ children, ...props }: any) => React.createElement('h4', props, children), + TypographyP: ({ children, ...props }: any) => React.createElement('p', props, children), +})); + +vi.mock('@v6y/ui-kit-front/components/molecules/navigation-menu', () => ({ + NavigationMenu: ({ children, ...props }: any) => React.createElement('nav', props, children), + NavigationMenuContent: ({ children, ...props }: any) => React.createElement('div', props, children), + NavigationMenuItem: ({ children, ...props }: any) => React.createElement('div', props, children), + NavigationMenuLink: ({ children, ...props }: any) => React.createElement('a', props, children), + NavigationMenuList: ({ children, ...props }: any) => React.createElement('ul', props, children), + NavigationMenuTrigger: ({ children, ...props }: any) => React.createElement('button', props, children), +})); + +vi.mock('@v6y/ui-kit-front/components/molecules/pagination', () => ({ + Pagination: ({ children, ...props }: any) => React.createElement('div', props, children), + PaginationContent: ({ children, ...props }: any) => React.createElement('div', props, children), + PaginationEllipsis: ({ children, ...props }: any) => React.createElement('span', props, children), + PaginationItem: ({ children, ...props }: any) => React.createElement('div', props, children), + PaginationLink: ({ children, ...props }: any) => React.createElement('a', props, children), + PaginationNext: ({ children, ...props }: any) => React.createElement('a', props, children), + PaginationPrevious: ({ children, ...props }: any) => React.createElement('a', props, children), +})); + +vi.mock('@v6y/ui-kit-front/components/organisms/LanguageMenu', () => ({ + LanguageMenu: ({ ...props }: any) => React.createElement('div', props), +})); diff --git a/v6y-apps/front/src/__tests__/app-list/VitalityAppListView-test.tsx b/v6y-apps/front/src/__tests__/app-list/VitalityAppListView-test.tsx index 76616913..aa15ee91 100644 --- a/v6y-apps/front/src/__tests__/app-list/VitalityAppListView-test.tsx +++ b/v6y-apps/front/src/__tests__/app-list/VitalityAppListView-test.tsx @@ -1,9 +1,20 @@ import '@testing-library/jest-dom/vitest'; import { fireEvent, render, screen, waitFor } from '@testing-library/react'; +import * as React from 'react'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import VitalityAppListView from '../../features/app-list/components/VitalityAppListView'; +vi.mock('@v6y/ui-kit-front/hooks/useNavigationAdapter', () => ({ + useNavigationAdapter: vi.fn(() => ({ + createUrlQueryParam: mockCreateUrlQueryParam, + removeUrlQueryParam: mockRemoveUrlQueryParam, + router: mockRouter, + pathname: '/apps', + getUrlParams: mockGetUrlParams, + })), +})); + const mockRouter = { replace: vi.fn(), }; @@ -12,23 +23,6 @@ const mockGetUrlParams = vi.fn(() => [undefined]); const mockCreateUrlQueryParam = vi.fn(() => 'keywords=react'); const mockRemoveUrlQueryParam = vi.fn(() => ''); -vi.mock('@v6y/ui-kit-front', async () => { - const actual = await vi.importActual('@v6y/ui-kit-front'); - return { - ...actual, - useNavigationAdapter: () => ({ - getUrlParams: mockGetUrlParams, - createUrlQueryParam: mockCreateUrlQueryParam, - removeUrlQueryParam: mockRemoveUrlQueryParam, - router: mockRouter, - pathname: '/apps', - }), - useTranslationProvider: () => ({ - translate: (key: string) => key, - }), - }; -}); - vi.mock('../../infrastructure/adapters/api/useQueryAdapter', () => { return { useClientQuery: vi.fn(() => ({ @@ -50,10 +44,6 @@ vi.mock('../../commons/utils/VitalityDataExportUtils', () => ({ exportAppListDataToCSV: vi.fn(), })); -vi.mock('../../features/app-list/components/VitalityAppList', () => ({ - default: () =>
Mocked App List
, -})); - describe('VitalityAppListView', () => { beforeEach(() => { mockGetUrlParams.mockReturnValue([undefined]); diff --git a/v6y-apps/front/src/__tests__/commons/VitalityAppInfos-test.tsx b/v6y-apps/front/src/__tests__/commons/VitalityAppInfos-test.tsx index ac598fb1..7950ae98 100644 --- a/v6y-apps/front/src/__tests__/commons/VitalityAppInfos-test.tsx +++ b/v6y-apps/front/src/__tests__/commons/VitalityAppInfos-test.tsx @@ -5,24 +5,23 @@ import { afterEach, describe, expect, it, vi } from 'vitest'; import VitalityAppInfos from '../../commons/components/application-info/VitalityAppInfos'; import { VitalityAppInfosProps } from '../../commons/types/VitalityAppInfosProps'; -vi.mock('@v6y/ui-kit-front', async () => { - const actual = await vi.importActual('@v6y/ui-kit-front'); - return { - ...actual, - useNavigationAdapter: vi.fn(() => ({ - createUrlQueryParam: vi.fn((name: string, value: string) => `${name}=${value}`), - removeUrlQueryParam: vi.fn(), - router: { - push: vi.fn(), - replace: vi.fn(), - back: vi.fn(), - forward: vi.fn(), - refresh: vi.fn(), - }, - })), - useTranslationProvider: vi.fn(() => ({ translate: (k: string) => k })), - }; -}); +vi.mock('@v6y/ui-kit-front/hooks/useNavigationAdapter', () => ({ + useNavigationAdapter: vi.fn(() => ({ + createUrlQueryParam: vi.fn((name: string, value: string) => `${name}=${value}`), + removeUrlQueryParam: vi.fn(), + router: { + push: vi.fn(), + replace: vi.fn(), + back: vi.fn(), + forward: vi.fn(), + refresh: vi.fn(), + }, + })), +})); + +vi.mock('@v6y/ui-kit-front/translation/useTranslationProvider', () => ({ + useTranslationProvider: vi.fn(() => ({ translate: (k: string) => k })), +})); describe('VitalityAppInfos', () => { afterEach(() => { diff --git a/v6y-apps/front/src/commons/components/application-info/VitalityAppInfos.tsx b/v6y-apps/front/src/commons/components/application-info/VitalityAppInfos.tsx index d9f68425..05004c65 100644 --- a/v6y-apps/front/src/commons/components/application-info/VitalityAppInfos.tsx +++ b/v6y-apps/front/src/commons/components/application-info/VitalityAppInfos.tsx @@ -1,14 +1,11 @@ +import { CommitIcon } from '@radix-ui/react-icons'; +import { GlobeIcon, StarIcon } from 'lucide-react'; import Link from 'next/link'; -import { - Badge, - Button, - CommitIcon, - GlobeIcon, - StarIcon, - useNavigationAdapter, - useTranslationProvider, -} from '@v6y/ui-kit-front'; +import { Badge } from '@v6y/ui-kit-front/components/atoms/badge'; +import { Button } from '@v6y/ui-kit-front/components/atoms/button'; +import { useNavigationAdapter } from '@v6y/ui-kit-front/hooks/useNavigationAdapter'; +import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; import VitalityNavigationPaths from '../../config/VitalityNavigationPaths'; import { VitalityAppInfosProps } from '../../types/VitalityAppInfosProps'; diff --git a/v6y-apps/front/src/commons/hooks/useVitalitySearchBar.tsx b/v6y-apps/front/src/commons/hooks/useVitalitySearchBar.tsx index da637656..ee41fa93 100644 --- a/v6y-apps/front/src/commons/hooks/useVitalitySearchBar.tsx +++ b/v6y-apps/front/src/commons/hooks/useVitalitySearchBar.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; -import { useNavigationAdapter } from '@v6y/ui-kit-front'; +import { useNavigationAdapter } from '@v6y/ui-kit-front/hooks/useNavigationAdapter'; import VitalityNavigationPaths from '../config/VitalityNavigationPaths'; diff --git a/v6y-apps/front/src/features/app-details/components/VitalityAppDetailsView.tsx b/v6y-apps/front/src/features/app-details/components/VitalityAppDetailsView.tsx index 35582d54..c6dbefdd 100644 --- a/v6y-apps/front/src/features/app-details/components/VitalityAppDetailsView.tsx +++ b/v6y-apps/front/src/features/app-details/components/VitalityAppDetailsView.tsx @@ -1,11 +1,19 @@ 'use client'; +import { GlobeIcon, PlayIcon, ReloadIcon, ShuffleIcon } from 'lucide-react'; import * as React from 'react'; import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; import { DynamicLoader, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit'; -import { Button, GlobeIcon, Input, PlayIcon, ReloadIcon, ShuffleIcon } from '@v6y/ui-kit-front'; -import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@v6y/ui-kit-front'; +import { Button } from '@v6y/ui-kit-front/components/atoms/button'; +import { Input } from '@v6y/ui-kit-front/components/atoms/input'; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@v6y/ui-kit-front/components/molecules/Select'; import VitalityApiConfig from '../../../commons/config/VitalityApiConfig'; import { exportAppDetailsDataToCSV } from '../../../commons/utils/VitalityDataExportUtils'; diff --git a/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsTypeGrouper.tsx b/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsTypeGrouper.tsx index e29ffc5b..c055960f 100644 --- a/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsTypeGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsTypeGrouper.tsx @@ -1,7 +1,12 @@ import * as React from 'react'; import { AuditType } from '@v6y/core-logic/src/types/AuditType'; -import { Card, CardContent, CardHeader, CardTitle } from '@v6y/ui-kit-front'; +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from '@v6y/ui-kit-front/components/molecules/Card'; import { getScoreStatusColor } from '../../../../commons/utils/StatusUtils'; diff --git a/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsView.tsx b/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsView.tsx index a41a598f..b8ad9779 100644 --- a/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsView.tsx +++ b/v6y-apps/front/src/features/app-details/components/audit-reports/VitalityAuditReportsView.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { AuditType } from '@v6y/core-logic/src/types/AuditType'; import { DynamicLoader, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit'; -import { Card, CardContent } from '@v6y/ui-kit-front'; +import { Card, CardContent } from '@v6y/ui-kit-front/components/molecules/Card'; import VitalityApiConfig from '../../../../commons/config/VitalityApiConfig'; import { diff --git a/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesBranchGrouper.tsx b/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesBranchGrouper.tsx index debd09e7..8f060f43 100644 --- a/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesBranchGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesBranchGrouper.tsx @@ -2,7 +2,12 @@ import * as React from 'react'; import { DependencyType } from '@v6y/core-logic/src/types/DependencyType'; import { useTranslationProvider } from '@v6y/ui-kit'; -import { Card, CardContent, CardHeader, CardTitle } from '@v6y/ui-kit-front'; +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from '@v6y/ui-kit-front/components/molecules/Card'; import { getScoreStatusColor, getStatusLabel } from '../../../../commons/utils/StatusUtils'; diff --git a/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesStatusGrouper.tsx b/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesStatusGrouper.tsx index 1f041ff5..1ab80838 100644 --- a/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesStatusGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesStatusGrouper.tsx @@ -1,6 +1,11 @@ import { DependencyType } from '@v6y/core-logic/src/types/DependencyType'; import { useTranslationProvider } from '@v6y/ui-kit'; -import { Card, CardContent, CardHeader, CardTitle } from '@v6y/ui-kit-front'; +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from '@v6y/ui-kit-front/components/molecules/Card'; import { getScoreStatusColor } from '../../../../commons/utils/ColorsByStatusUtils'; diff --git a/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesView.tsx b/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesView.tsx index c6de6e94..95e594c4 100644 --- a/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesView.tsx +++ b/v6y-apps/front/src/features/app-details/components/dependencies/VitalityDependenciesView.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { DependencyType } from '@v6y/core-logic/src/types/DependencyType'; import { DynamicLoader, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit'; -import { Card, CardContent } from '@v6y/ui-kit-front'; +import { Card, CardContent } from '@v6y/ui-kit-front/components/molecules/Card'; import VitalityApiConfig from '../../../../commons/config/VitalityApiConfig'; import { diff --git a/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionBranchGrouper.tsx b/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionBranchGrouper.tsx index 14e0246e..7ab1ce33 100644 --- a/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionBranchGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionBranchGrouper.tsx @@ -2,7 +2,12 @@ import * as React from 'react'; import { EvolutionType } from '@v6y/core-logic/src/types/EvolutionType'; import { useTranslationProvider } from '@v6y/ui-kit'; -import { Card, CardContent, CardHeader, CardTitle } from '@v6y/ui-kit-front'; +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from '@v6y/ui-kit-front/components/molecules/Card'; const VitalityEvolutionBranchGrouper = ({ evolutions }: { evolutions: EvolutionType[] }) => { const { translate } = useTranslationProvider(); diff --git a/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionsView.tsx b/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionsView.tsx index 3836d893..8ba13aa4 100644 --- a/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionsView.tsx +++ b/v6y-apps/front/src/features/app-details/components/evolutions/VitalityEvolutionsView.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { EvolutionType } from '@v6y/core-logic/src/types/EvolutionType'; import { DynamicLoader, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit'; -import { Card, CardContent } from '@v6y/ui-kit-front'; +import { Card, CardContent } from '@v6y/ui-kit-front/components/molecules/Card'; import VitalityApiConfig from '../../../../commons/config/VitalityApiConfig'; import { diff --git a/v6y-apps/front/src/features/app-details/components/infos/VitalityGeneralInformationView.tsx b/v6y-apps/front/src/features/app-details/components/infos/VitalityGeneralInformationView.tsx index ffc0ad2c..b9d4964f 100644 --- a/v6y-apps/front/src/features/app-details/components/infos/VitalityGeneralInformationView.tsx +++ b/v6y-apps/front/src/features/app-details/components/infos/VitalityGeneralInformationView.tsx @@ -1,14 +1,14 @@ import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; import { AuditType } from '@v6y/core-logic/src/types/AuditType'; import { LoaderView, useTranslationProvider } from '@v6y/ui-kit'; +import { Skeleton } from '@v6y/ui-kit-front/components/atoms/skeleton'; import { Card, CardContent, CardHeader, CardTitle, - Skeleton, - useNavigationAdapter, -} from '@v6y/ui-kit-front'; +} from '@v6y/ui-kit-front/components/molecules/Card'; +import { useNavigationAdapter } from '@v6y/ui-kit-front/hooks/useNavigationAdapter'; import VitalityApiConfig from '../../../../commons/config/VitalityApiConfig'; import { getGradeFromScore } from '../../../../commons/utils/ScoreUtils'; diff --git a/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorBranchGrouper.tsx b/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorBranchGrouper.tsx index 8b57e3e0..3bbe458a 100644 --- a/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorBranchGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorBranchGrouper.tsx @@ -2,7 +2,12 @@ import * as React from 'react'; import { KeywordType } from '@v6y/core-logic/src/types/KeywordType'; import { useTranslationProvider } from '@v6y/ui-kit'; -import { Card, CardContent, CardHeader, CardTitle } from '@v6y/ui-kit-front'; +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from '@v6y/ui-kit-front/components/molecules/Card'; const VitalityQualityIndicatorBranchGrouper = ({ indicators }: { indicators: KeywordType[] }) => { const { translate } = useTranslationProvider(); diff --git a/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorStatusGrouper.tsx b/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorStatusGrouper.tsx index 5cb89f77..69d762c7 100644 --- a/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorStatusGrouper.tsx +++ b/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorStatusGrouper.tsx @@ -1,6 +1,11 @@ import { KeywordType } from '@v6y/core-logic/src/types/KeywordType'; import { useTranslationProvider } from '@v6y/ui-kit'; -import { Card, CardContent, CardHeader, CardTitle } from '@v6y/ui-kit-front'; +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from '@v6y/ui-kit-front/components/molecules/Card'; const VitalityQualityIndicatorStatusGrouper = ({ indicators }: { indicators: KeywordType[] }) => { const { translate } = useTranslationProvider(); diff --git a/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorsView.tsx b/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorsView.tsx index f087f950..60971276 100644 --- a/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorsView.tsx +++ b/v6y-apps/front/src/features/app-details/components/quality-indicators/VitalityQualityIndicatorsView.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { KeywordType } from '@v6y/core-logic/src/types/KeywordType'; import { DynamicLoader, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit'; -import { Card, CardContent } from '@v6y/ui-kit-front'; +import { Card, CardContent } from '@v6y/ui-kit-front/components/molecules/Card'; import VitalityApiConfig from '../../../../commons/config/VitalityApiConfig'; import { diff --git a/v6y-apps/front/src/features/app-details/components/summary-card/VitalitySummaryCard.tsx b/v6y-apps/front/src/features/app-details/components/summary-card/VitalitySummaryCard.tsx index cdac65ad..1fd6c464 100644 --- a/v6y-apps/front/src/features/app-details/components/summary-card/VitalitySummaryCard.tsx +++ b/v6y-apps/front/src/features/app-details/components/summary-card/VitalitySummaryCard.tsx @@ -1,7 +1,8 @@ +import { StarIcon } from 'lucide-react'; import * as React from 'react'; import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; -import { StarIcon, useTranslationProvider } from '@v6y/ui-kit-front'; +import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; interface VitalitySummaryCardProps { appInfos: ApplicationType; diff --git a/v6y-apps/front/src/features/app-list/components/VitalityAppList.tsx b/v6y-apps/front/src/features/app-list/components/VitalityAppList.tsx index f07d5cdc..f4458bdc 100644 --- a/v6y-apps/front/src/features/app-list/components/VitalityAppList.tsx +++ b/v6y-apps/front/src/features/app-list/components/VitalityAppList.tsx @@ -3,7 +3,9 @@ import React, { useEffect, useRef, useState } from 'react'; import { ApplicationType } from '@v6y/core-logic/src/types/ApplicationType'; -import { Spinner, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit-front'; +import { Spinner } from '@v6y/ui-kit-front/components/atoms/spinner'; +import { useNavigationAdapter } from '@v6y/ui-kit-front/hooks/useNavigationAdapter'; +import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; import VitalityAppInfos from '../../../commons/components/application-info/VitalityAppInfos'; import VitalityApiConfig from '../../../commons/config/VitalityApiConfig'; diff --git a/v6y-apps/front/src/features/app-list/components/VitalityAppListHeader.tsx b/v6y-apps/front/src/features/app-list/components/VitalityAppListHeader.tsx index c5383d2c..97ab4987 100644 --- a/v6y-apps/front/src/features/app-list/components/VitalityAppListHeader.tsx +++ b/v6y-apps/front/src/features/app-list/components/VitalityAppListHeader.tsx @@ -1,7 +1,9 @@ import { useEffect, useState } from 'react'; import { ExportOutlined } from '@v6y/ui-kit'; -import { Button, useNavigationAdapter, useTranslationProvider } from '@v6y/ui-kit-front'; +import { Button } from '@v6y/ui-kit-front/components/atoms/button'; +import { useNavigationAdapter } from '@v6y/ui-kit-front/hooks/useNavigationAdapter'; +import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; import VitalityApiConfig from '../../../commons/config/VitalityApiConfig'; import { diff --git a/v6y-apps/front/src/features/app-list/components/VitalityAppListPagination.tsx b/v6y-apps/front/src/features/app-list/components/VitalityAppListPagination.tsx index fdde8073..5641765a 100644 --- a/v6y-apps/front/src/features/app-list/components/VitalityAppListPagination.tsx +++ b/v6y-apps/front/src/features/app-list/components/VitalityAppListPagination.tsx @@ -10,7 +10,7 @@ import { PaginationLink, PaginationNext, PaginationPrevious, -} from '@v6y/ui-kit-front'; +} from '@v6y/ui-kit-front/components/molecules/pagination'; interface Props { currentPage: number; diff --git a/v6y-apps/front/src/features/app-list/components/VitalityAppListView.tsx b/v6y-apps/front/src/features/app-list/components/VitalityAppListView.tsx index dba8d8df..108cd8e1 100644 --- a/v6y-apps/front/src/features/app-list/components/VitalityAppListView.tsx +++ b/v6y-apps/front/src/features/app-list/components/VitalityAppListView.tsx @@ -1,19 +1,20 @@ 'use client'; +import { useEffect, useState } from 'react'; + import { DynamicLoader } from '@v6y/ui-kit'; +import { Badge } from '@v6y/ui-kit-front/components/atoms/badge'; +import { Checkbox } from '@v6y/ui-kit-front/components/atoms/checkbox'; import { - Badge, Card, CardContent, CardDescription, CardHeader, CardTitle, - Checkbox, - TypographyH3, - useNavigationAdapter, - useTranslationProvider, -} from '@v6y/ui-kit-front'; -import { useEffect, useState } from 'react'; +} from '@v6y/ui-kit-front/components/molecules/Card'; +import { TypographyH3 } from '@v6y/ui-kit-front/components/molecules/Typography'; +import { useNavigationAdapter } from '@v6y/ui-kit-front/hooks/useNavigationAdapter'; +import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; const VitalityAppList = DynamicLoader(() => import('./VitalityAppList')); @@ -91,8 +92,8 @@ const VitalityAppListView = () => {
{AVAILABLE_TECHNOLOGIES.map(({ slug, name }) => ( -
{
- {translate('vitality.appListPage.activeFiltersLabel') || 'Active Filters'} + {translate('vitality.appListPage.activeFiltersLabel') || + 'Active Filters'} {selectedKeywords.length} selected diff --git a/v6y-apps/front/src/features/auth/components/VitalityLoginForm.tsx b/v6y-apps/front/src/features/auth/components/VitalityLoginForm.tsx index 1cb2fa74..595339d5 100644 --- a/v6y-apps/front/src/features/auth/components/VitalityLoginForm.tsx +++ b/v6y-apps/front/src/features/auth/components/VitalityLoginForm.tsx @@ -3,23 +3,25 @@ import React, { useEffect, useRef } from 'react'; import { useForm } from '@v6y/ui-kit'; +import { Button } from '@v6y/ui-kit-front/components/atoms/button'; +import { Input } from '@v6y/ui-kit-front/components/atoms/input'; +import { toast } from '@v6y/ui-kit-front/components/atoms/sonnerHelpers'; import { - Button, Card, CardContent, CardDescription, CardHeader, CardTitle, +} from '@v6y/ui-kit-front/components/molecules/Card'; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage, - Input, - toast, - useTranslationProvider, -} from '@v6y/ui-kit-front'; +} from '@v6y/ui-kit-front/components/molecules/Form'; +import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; import { LoginAccountFormType, diff --git a/v6y-apps/front/src/features/contact/components/VitalityContactPageView.tsx b/v6y-apps/front/src/features/contact/components/VitalityContactPageView.tsx index 04c4aace..004f2b08 100644 --- a/v6y-apps/front/src/features/contact/components/VitalityContactPageView.tsx +++ b/v6y-apps/front/src/features/contact/components/VitalityContactPageView.tsx @@ -1,11 +1,9 @@ 'use client'; -import { - Card, - ChatBubbleIcon, - EnvelopeClosedIcon, - useTranslationProvider, -} from '@v6y/ui-kit-front'; +import { ChatBubbleIcon, EnvelopeClosedIcon } from '@radix-ui/react-icons'; + +import { Card } from '@v6y/ui-kit-front/components/molecules/Card'; +import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; import { ContactForm } from './VitalityContactPageForm'; diff --git a/v6y-apps/front/src/features/dashboard/components/VitalityDashboardFilterItem.tsx b/v6y-apps/front/src/features/dashboard/components/VitalityDashboardFilterItem.tsx index 2661eb9c..685759df 100644 --- a/v6y-apps/front/src/features/dashboard/components/VitalityDashboardFilterItem.tsx +++ b/v6y-apps/front/src/features/dashboard/components/VitalityDashboardFilterItem.tsx @@ -1,14 +1,13 @@ import Link from 'next/link'; +import { Avatar, AvatarFallback } from '@v6y/ui-kit-front/components/atoms/avatar'; import { - Avatar, - AvatarFallback, Card, CardContent, CardDescription, CardHeader, CardTitle, -} from '@v6y/ui-kit-front'; +} from '@v6y/ui-kit-front/components/molecules/Card'; interface VitalityDashboardFilterItemProps { option: { diff --git a/v6y-apps/front/src/features/dashboard/components/VitalityDashboardFilters.tsx b/v6y-apps/front/src/features/dashboard/components/VitalityDashboardFilters.tsx index ccd5b070..9f128790 100644 --- a/v6y-apps/front/src/features/dashboard/components/VitalityDashboardFilters.tsx +++ b/v6y-apps/front/src/features/dashboard/components/VitalityDashboardFilters.tsx @@ -1,12 +1,13 @@ +import { MixerHorizontalIcon } from '@radix-ui/react-icons'; + import { useThemeConfigProvider } from '@v6y/ui-kit'; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, - MixerHorizontalIcon, - useTranslationProvider, -} from '@v6y/ui-kit-front'; +} from '@v6y/ui-kit-front/components/molecules/Accordion'; +import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; import { DashboardItemType, diff --git a/v6y-apps/front/src/features/faq/components/VitalityFaqList.tsx b/v6y-apps/front/src/features/faq/components/VitalityFaqList.tsx index 298e1d34..db697a96 100644 --- a/v6y-apps/front/src/features/faq/components/VitalityFaqList.tsx +++ b/v6y-apps/front/src/features/faq/components/VitalityFaqList.tsx @@ -2,7 +2,12 @@ import Link from 'next/link'; import * as React from 'react'; import { FaqType } from '@v6y/core-logic/src/types/FaqType'; -import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@v6y/ui-kit-front'; +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from '@v6y/ui-kit-front/components/molecules/Accordion'; const VitalityFaqList = ({ dataSource }: { dataSource?: FaqType[] }) => { if (!dataSource?.length) { diff --git a/v6y-apps/front/src/features/faq/components/VitalityFaqView.tsx b/v6y-apps/front/src/features/faq/components/VitalityFaqView.tsx index b0c9a6cc..a7168906 100644 --- a/v6y-apps/front/src/features/faq/components/VitalityFaqView.tsx +++ b/v6y-apps/front/src/features/faq/components/VitalityFaqView.tsx @@ -4,7 +4,7 @@ import Link from 'next/link'; import * as React from 'react'; import { FaqType } from '@v6y/core-logic/src/types/FaqType'; -import { useTranslationProvider } from '@v6y/ui-kit-front'; +import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; import VitalityApiConfig from '../../../commons/config/VitalityApiConfig'; import { diff --git a/v6y-libs/ui-kit-front/package.json b/v6y-libs/ui-kit-front/package.json index 750dcac6..7547ad5a 100644 --- a/v6y-libs/ui-kit-front/package.json +++ b/v6y-libs/ui-kit-front/package.json @@ -3,7 +3,29 @@ "version": "0.0.1", "private": true, "exports": { - ".": "./src/index.ts", + "./components/atoms/alert": "./src/components/atoms/alert.tsx", + "./components/atoms/avatar": "./src/components/atoms/avatar.tsx", + "./components/atoms/badge": "./src/components/atoms/badge.tsx", + "./components/atoms/breadcrumb": "./src/components/atoms/breadcrumb.tsx", + "./components/atoms/button": "./src/components/atoms/button.tsx", + "./components/atoms/checkbox": "./src/components/atoms/checkbox.tsx", + "./components/atoms/input": "./src/components/atoms/input.tsx", + "./components/atoms/label": "./src/components/atoms/label.tsx", + "./components/atoms/skeleton": "./src/components/atoms/skeleton.tsx", + "./components/atoms/sonnerHelpers": "./src/components/atoms/sonnerHelpers.ts", + "./components/atoms/spinner": "./src/components/atoms/spinner.tsx", + "./components/atoms/textarea": "./src/components/atoms/textarea.tsx", + "./components/molecules/Accordion": "./src/components/molecules/Accordion.tsx", + "./components/molecules/Card": "./src/components/molecules/Card.tsx", + "./components/molecules/Form": "./src/components/molecules/Form.tsx", + "./components/molecules/Select": "./src/components/molecules/Select.tsx", + "./components/molecules/Typography": "./src/components/molecules/Typography.tsx", + "./components/molecules/navigation-menu": "./src/components/molecules/navigation-menu.tsx", + "./components/molecules/pagination": "./src/components/molecules/pagination.tsx", + "./components/organisms/LanguageMenu": "./src/components/organisms/LanguageMenu.tsx", + "./hooks/useNavigationAdapter": "./src/hooks/useNavigationAdapter.ts", + "./translation/useTranslationProvider": "./src/translation/useTranslationProvider.ts", + "./lib/utils": "./src/lib/utils.ts", "./tailwind.config.js": "./tailwind.config.js", "./styles.css": "./src/styles.css" }, diff --git a/v6y-libs/ui-kit/src/__tests__/AdminSelectWrapper-test.tsx b/v6y-libs/ui-kit/src/__tests__/AdminSelectWrapper-test.tsx index 622703a0..84f59bc1 100644 --- a/v6y-libs/ui-kit/src/__tests__/AdminSelectWrapper-test.tsx +++ b/v6y-libs/ui-kit/src/__tests__/AdminSelectWrapper-test.tsx @@ -6,7 +6,7 @@ import { gqlClientRequest } from '../api/GraphQLClient'; import AdminSelectWrapper from '../components/organisms/admin/AdminSelectWrapper'; import { renderWithQueryClientProvider } from '../test-utils/TestUtils'; -vi.mock('../api', () => ({ +vi.mock('../api/GraphQLClient', () => ({ gqlClientRequest: vi.fn(), })); From 43c329a9fb0cfed8fe574576f8324fc3c28d6427 Mon Sep 17 00:00:00 2001 From: "theo.gillet" Date: Tue, 10 Feb 2026 17:45:39 +0100 Subject: [PATCH 3/3] [FIX]: tests and build front and front-bo after barrel file deletions --- pnpm-lock.yaml | 23 + v6y-apps/front-bo/package.json | 1 + v6y-apps/front-bo/setupTests.tsx | 538 ++++-------------- v6y-apps/front-bo/src/app/not-found.tsx | 3 +- v6y-apps/front-bo/src/app/page.tsx | 3 +- .../components/VitalityDetailsView.tsx | 4 +- .../components/VitalityFormFieldSet.tsx | 5 +- .../components/VitalityMessageView.tsx | 11 +- .../src/commons/components/VitalityTable.tsx | 3 +- .../components/VitalityTableRowActions.tsx | 6 +- .../components/layout/VitalityPageHeader.tsx | 9 +- .../components/layout/VitalityPageLayout.tsx | 3 +- .../commons/config/VitalityDetailsConfig.tsx | 3 +- .../src/commons/config/VitalityFormConfig.tsx | 3 +- .../commons/config/VitalityTableConfig.tsx | 2 +- .../components/VitalityAccountCreateView.tsx | 5 +- .../components/VitalityAccountDetailsView.tsx | 12 +- .../components/VitalityAccountEditView.tsx | 12 +- .../components/VitalityAccountListView.tsx | 3 +- .../VitalityApplicationCreateView.tsx | 4 +- .../VitalityApplicationDetailsView.tsx | 12 +- .../VitalityApplicationEditView.tsx | 10 +- .../VitalityApplicationListView.tsx | 3 +- .../VitalityAuditHelpDetailsView.tsx | 12 +- .../components/VitalityAuditHelpEditView.tsx | 10 +- .../components/VitalityAuditHelpListView.tsx | 3 +- .../VitalityAuthForgotPasswordView.tsx | 4 +- .../VitalityAuthUpdatePasswordView.tsx | 4 +- .../components/VitalityAuthLoginView.tsx | 12 +- ...italityDependencyStatusHelpDetailsView.tsx | 10 +- .../VitalityDependencyStatusHelpEditView.tsx | 10 +- .../VitalityDependencyStatusHelpListView.tsx | 3 +- ...VitalityDeprecatedDependencyCreateView.tsx | 4 +- ...italityDeprecatedDependencyDetailsView.tsx | 10 +- .../VitalityDeprecatedDependencyEditView.tsx | 10 +- .../VitalityDeprecatedDependencyListView.tsx | 3 +- .../VitalityEvolutionHelpDetailsView.tsx | 10 +- .../VitalityEvolutionHelpEditView.tsx | 10 +- .../VitalityEvolutionHelpListView.tsx | 3 +- .../components/VitalityFaqCreateView.tsx | 4 +- .../components/VitalityFaqDetailsView.tsx | 10 +- .../components/VitalityFaqEditView.tsx | 10 +- .../components/VitalityFaqListView.tsx | 3 +- .../VitalityNotificationCreateView.tsx | 4 +- .../VitalityNotificationDetailsView.tsx | 10 +- .../VitalityNotificationEditView.tsx | 10 +- .../VitalityNotificationListView.tsx | 3 +- .../infrastructure/providers/AppProvider.tsx | 2 +- .../providers/GraphQLProvider.ts | 6 +- v6y-apps/front/package.json | 1 + v6y-apps/front/setupTests.tsx | 493 ++-------------- .../app-list/VitalityAppListView-test.tsx | 15 +- .../commons/VitalityAppInfos-test.tsx | 22 +- .../VitalityNotificationView-test.tsx | 20 +- v6y-apps/front/src/app/layout.tsx | 2 +- .../commons/components/VitalitySearchBar.tsx | 6 +- .../components/VitalitySectionView.tsx | 32 +- .../components/VitalitySelectGrouperView.tsx | 6 +- .../components/VitalityTabGrouperView.tsx | 6 +- .../application-info/VitalityAppInfos.tsx | 4 +- .../components/chatbot/VitalityBot.tsx | 2 +- .../components/help/VitalityHelpView.tsx | 3 +- .../VitalitySelectableIndicators.tsx | 32 +- .../components/layout/VitalityBreadcrumb.tsx | 6 +- .../components/layout/VitalityPageHeader.tsx | 14 +- .../components/layout/VitalityPageLayout.tsx | 2 +- .../components/modules/VitalityModuleList.tsx | 12 +- .../modules/VitalityModuleListItem.tsx | 32 +- .../commons/config/VitalityCommonConfig.tsx | 16 +- v6y-apps/front/src/commons/hooks/useAuth.tsx | 2 +- .../src/commons/hooks/useDataGrouper.tsx | 2 +- .../commons/hooks/useVitalitySearchBar.tsx | 2 +- .../src/commons/types/VitalityListProps.ts | 2 +- .../components/VitalityAppDetailsView.tsx | 7 +- .../VitalityAuditReportsView.tsx | 4 +- ...VitalityCodeStatusReportsBranchGrouper.tsx | 3 +- .../VitalityCodeStatusReportsSmellGrouper.tsx | 6 +- .../auditors/dora/VitalityDoraReportItem.tsx | 23 +- .../dora/VitalityDoraReportsGrouper.tsx | 2 +- .../VitalityLighthouseReportItem.tsx | 24 +- ...talityLighthouseReportsCategoryGrouper.tsx | 14 +- ...VitalityLighthouseReportsDeviceGrouper.tsx | 4 +- .../VitalityDependenciesBranchGrouper.tsx | 2 +- .../VitalityDependenciesStatusGrouper.tsx | 4 +- .../dependencies/VitalityDependenciesView.tsx | 4 +- .../VitalityEvolutionBranchGrouper.tsx | 2 +- .../VitalityEvolutionStatusGrouper.tsx | 2 +- .../evolutions/VitalityEvolutionsView.tsx | 4 +- .../infos/VitalityGeneralInformationView.tsx | 5 +- .../VitalityQualityIndicatorBranchGrouper.tsx | 2 +- .../VitalityQualityIndicatorStatusGrouper.tsx | 2 +- .../VitalityQualityIndicatorsView.tsx | 4 +- .../summary-card/VitalitySummaryCard.tsx | 2 +- .../app-list/components/VitalityAppList.tsx | 4 +- .../components/VitalityAppListHeader.tsx | 6 +- .../components/VitalityAppListView.tsx | 6 +- .../components/VitalityAppsStatsChart.tsx | 14 +- .../components/VitalityAppsStatsView.tsx | 2 +- .../auth/components/VitalityLoginForm.tsx | 4 +- .../components/VitalityContactPageForm.tsx | 7 +- .../components/VitalityContactPageView.tsx | 2 +- .../components/VitalityDashboardFilters.tsx | 4 +- .../faq/components/VitalityFaqView.tsx | 2 +- .../components/VitalityNotificationList.tsx | 4 +- .../components/VitalityNotificationView.tsx | 3 +- .../search/components/VitalitySearchView.tsx | 2 +- .../infrastructure/providers/AppProvider.tsx | 8 +- v6y-libs/ui-kit-front/package.json | 1 + .../src/components/organisms/LanguageMenu.tsx | 2 +- .../src/hooks/useNavigationAdapter.ts | 4 +- .../src/translation/useTranslationProvider.ts | 4 +- v6y-libs/ui-kit/package.json | 299 +++++++--- .../ui-kit/src/components/atoms/Icons.tsx | 49 -- .../components/organisms/app/LanguageMenu.tsx | 2 +- .../ui-kit/src/hooks/useNavigationAdapter.tsx | 4 +- v6y-libs/ui-kit/src/index.ts | 101 ---- .../src/theme/variants/app/AppTheme.tsx | 7 +- .../src/translation/useTranslationProvider.ts | 6 +- 118 files changed, 785 insertions(+), 1474 deletions(-) delete mode 100644 v6y-libs/ui-kit/src/components/atoms/Icons.tsx delete mode 100644 v6y-libs/ui-kit/src/index.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 59f60477..d293ce82 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -621,6 +621,9 @@ importers: v6y-apps/front: dependencies: + '@ant-design/icons': + specifier: '=6.1.0' + version: 6.1.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@radix-ui/react-icons': specifier: '=1.3.2' version: 1.3.2(react@19.0.0) @@ -805,6 +808,9 @@ importers: v6y-apps/front-bo: dependencies: + '@ant-design/icons': + specifier: '=5.5.1' + version: 5.5.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@refinedev/cli': specifier: '=2.16.42' version: 2.16.42(@babel/preset-env@7.26.9(@babel/core@7.28.5))(@types/react-dom@19.0.3(@types/react@19.0.7))(@types/react@19.0.7)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -1502,6 +1508,13 @@ packages: '@ant-design/icons-svg@4.4.2': resolution: {integrity: sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==} + '@ant-design/icons@5.5.1': + resolution: {integrity: sha512-0UrM02MA2iDIgvLatWrj6YTCYe0F/cwXvVE0E2SqGrL7PZireQwgEKTKBisWpZyal5eXZLvuM98kju6YtYne8w==} + engines: {node: '>=8'} + peerDependencies: + react: '>=16.0.0' + react-dom: '>=16.0.0' + '@ant-design/icons@5.5.2': resolution: {integrity: sha512-xc53rjVBl9v2BqFxUjZGti/RfdDeA8/6KYglmInM2PNqSXc/WfuGDTifJI/ZsokJK0aeKvOIbXc9y2g8ILAhEA==} engines: {node: '>=8'} @@ -11748,6 +11761,16 @@ snapshots: '@ant-design/icons-svg@4.4.2': {} + '@ant-design/icons@5.5.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@ant-design/colors': 7.2.0 + '@ant-design/icons-svg': 4.4.2 + '@babel/runtime': 7.28.6 + classnames: 2.5.1 + rc-util: 5.44.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + '@ant-design/icons@5.5.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: '@ant-design/colors': 7.2.0 diff --git a/v6y-apps/front-bo/package.json b/v6y-apps/front-bo/package.json index 1cb8512b..94d5393d 100644 --- a/v6y-apps/front-bo/package.json +++ b/v6y-apps/front-bo/package.json @@ -25,6 +25,7 @@ "test:ui": "vitest --ui" }, "dependencies": { + "@ant-design/icons": "=5.5.1", "@refinedev/cli": "=2.16.42", "@tanstack/react-query": "=4.36.1", "@urql/core": "=6.0.1", diff --git a/v6y-apps/front-bo/setupTests.tsx b/v6y-apps/front-bo/setupTests.tsx index 3f26269f..ed921c8b 100644 --- a/v6y-apps/front-bo/setupTests.tsx +++ b/v6y-apps/front-bo/setupTests.tsx @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { cleanup } from '@testing-library/react'; -import { List } from '@v6y/ui-kit'; +import { List } from '@v6y/ui-kit/components/atoms/app/List.tsx'; import dynamic from 'next/dynamic'; import { afterEach, beforeEach, vi } from 'vitest'; @@ -30,447 +30,115 @@ afterEach(() => { cleanup(); }); -vi.mock('@v6y/ui-kit', () => { - return { - useNavigationAdapter: vi.fn(() => { - return { - createUrlQueryParam: vi.fn((key, value) => `${key}=${value}`), - removeUrlQueryParam: vi.fn(), - getUrlParams: vi.fn(() => ['']), - pathname: '/dashboard', - router: { push: vi.fn(), replace: vi.fn() }, - }; - }), - useThemeConfigProvider: () => ({ - currentConfig: { - status: { error: 'red', success: 'green', warning: 'yellow', default: 'gray' }, - statusIcons: { error: '❌', success: '✅', warning: '⚠️', default: 'ℹ️' }, - }, - }), - useForm: vi.fn(() => ({ - control: {}, - handleSubmit: vi.fn((callback) => () => { - if (Object.keys(formErrors).length > 0) { - return callback(formErrors); - } else { - return callback(); // Executes callback if no errors - } - }), - formState: { - get errors() { - return formErrors; - }, - }, - clearErrors: (name) => { - delete formErrors[name]; - }, - })), - Form: Object.assign( - ({ children, onFinish }: { children: React.ReactNode; onFinish?: () => void }) => { - return ( -
{ - event.preventDefault(); // Prevent default form behavior - if (onFinish) { - onFinish(); // Manually trigger form fail submission handler - } - }} - > - {children} -
- ); - }, - { - useForm: vi.fn(() => [{ getFieldValue: vi.fn(), setFieldsValue: vi.fn() }]), - Item: ({ - children, - label, - help, - }: { - children: React.ReactNode; - label: React.ReactNode; - help: React.ReactNode; - }) => { - return ( -
- {label} - {help} - {children} -
- ); - }, - }, +vi.mock('@v6y/ui-kit/components/atoms/admin/DeleteButton', () => ({ + default: vi.fn(({ recordItemId }) => ( + - ); }, - ExportOutlined: () => ExportIcon, - Tabs: ({ - items, - onChange, - }: { - items: Array<{ key: string }>; - onChange: (key: string) => void; - }) => ( -
- {items.map((tab) => ( - - ))} -
- ), - Select: ({ - placeholder, - options = [], - onChange, - }: { - placeholder: string; - options: any[]; - onChange?: (val: string) => void; - }) => ( - - ), - Checkbox: Object.assign( - ({ children }: { children: React.ReactNode }) => ( -
{children}
- ), - { - Group: ({ - value, - options, - onChange, - }: { - value: string[]; - options: any[]; - onChange: (values: string[]) => void; - }) => ( -
- {options.map((option) => ( - - ))} -
- ), - }, - ), - Descriptions: Object.assign( - ({ children }: { children: React.ReactNode }) => ( -
{children}
- ), - { - Item: ({ label, children }: { label: string; children: React.ReactNode }) => { - return ( -
-
{label}
-
{children}
-
- ); - }, - }, - ), - List: Object.assign( - ({ - dataSource = [], - renderItem, - pagination, - ...props - }: { - dataSource: any[]; - renderItem: (item: any, index: number) => React.ReactNode; - pagination?: { pageSize: number }; - }) => { - if (!dataSource || dataSource.length === 0) { - return
No Data Available
; - } + ), +})); - // Handle pagination if provided - const paginatedData = pagination - ? dataSource.slice(0, pagination.pageSize) - : dataSource; +vi.mock('@v6y/ui-kit/components/organisms/app/TextView', () => ({ + default: ({ content }: { content: string }) => {content}, +})); - return ( -
- {paginatedData.map((item, index) => ( -
- {renderItem ? renderItem(item, index) : item || 'No Title'} -
- ))} -
- ); - }, - { - Item: Object.assign( - ({ children }: { children: React.ReactNode }) => ( -
{children}
- ), - { - Meta: ({ - title, - description, - }: { - title: React.ReactNode; - description: React.ReactNode; - }) => ( -
-
{title}
-
{description}
-
- ), - }, - ), - }, - ), - ListItem: ({ children }: { children: React.ReactNode }) => ( -
{children}
- ), - ListItemMeta: ({ - title, - description, - }: { - title: React.ReactNode; - description: React.ReactNode; - }) => ( -
-
{title}
-
{description}
-
- ), - NotificationOutlined: () =>
, - BulbOutlined: () =>
, - ProductOutlined: () =>
, - QuestionOutlined: () =>
, - DashboardOutlined: () =>
, - AppstoreAddOutlined: () =>
, - SplitCellsOutlined: () =>
, - ApiOutlined: () =>
, - PieChartOutlined: () =>
, - InfoCircleOutlined: () => , - InfoOutlined: () => , - PushpinOutlined: () => , - CompassOutlined: () => , - Modal: ({ isOpen, children }: { isOpen: boolean; children: React.ReactNode }) => - isOpen ?
{children}
: null, - ModalView: ({ isOpen, children }: { isOpen: boolean; children: React.ReactNode }) => - isOpen ?
{children}
: null, - Links: ({ links }: { links: Array<{ label: string; value: string }> }) => ( -
    - {links.map((link, index) => ( -
  • - {link.label} -
  • - ))} -
- ), - ControlledCheckbox: vi.fn(({ name, 'aria-label': ariaLabel }) => ( - - )), - EmptyView: () =>
No Data Available
, - TextView: ({ content }: { content: string }) => {content}, - TitleView: ({ title }: { title: string }) =>

{title}

, - LoaderView: () =>
Loading...
, - DynamicLoader: (importFn: () => Promise<{ default: React.ComponentType }>) => { - // eslint-disable-next-line react/display-name - return (props: any) => { - const LazyComponent = dynamic(() => importFn(), { ssr: false }); - return ; - }; - }, - PaginatedList: ({ - dataSource, - renderItem, - }: { - dataSource: any[]; - renderItem: (item: any) => React.ReactNode; - }) => { - if (!dataSource || !Array.isArray(dataSource)) { - return
No Data Available
; - } +vi.mock('@v6y/ui-kit/api/types/AdminHttpError', () => ({ + AdminHttpError: class AdminHttpError extends Error { + constructor(message: string) { + super(message); + this.name = 'AdminHttpError'; + } + }, +})); - return ( -
- -
- ); - }, - LoadMoreList: ({ - dataSource, - renderItem, - }: { - dataSource: any[]; - renderItem: (item: any) => React.ReactNode; - }) => { - if (!dataSource || !Array.isArray(dataSource)) { - return
No Data Available
; - } +vi.mock('@v6y/ui-kit/components/atoms/app/Result', () => ({ + default: ({ children }: { children: React.ReactNode }) =>
{children}
, +})); - return ( -
- -
- ); - }, - CollapseView: vi.fn(({ dataSource }) => ( -
- {dataSource?.length ? ( - dataSource.map((item: any, index: number) => ( -
-
{item.label}
-
{item.children}
-
- )) - ) : ( -
No Data Available
- )} -
- )), - DeleteButton: vi.fn(({ recordItemId }) => ( - - ); - }, - ExportOutlined: () => ExportIcon, - Tabs: ({ - items, - onChange, - }: { - items: Array<{ key: string }>; - onChange: (key: string) => void; - }) => ( -
- {items.map((tab) => ( - - ))} -
- ), - Select: ({ - placeholder, - options = [], - onChange, - }: { - placeholder: string; - options: any[]; - onChange?: (val: string) => void; - }) => ( - - ), - Checkbox: Object.assign( - ({ children }: { children: React.ReactNode }) => ( -
{children}
- ), - { - Group: ({ - value, - options, - onChange, - }: { - value: string[]; - options: any[]; - onChange: (values: string[]) => void; - }) => ( -
- {options.map((option) => ( - - ))} -
- ), - }, - ), - Descriptions: Object.assign( - ({ children }: { children: React.ReactNode }) => ( -
{children}
- ), - { - Item: ({ label, children }: { label: string; children: React.ReactNode }) => { - return ( -
-
{label}
-
{children}
-
- ); - }, - }, - ), - List: Object.assign( - ({ - dataSource = [], - renderItem, - pagination, - ...props - }: { - dataSource: any[]; - renderItem: (item: any, index: number) => React.ReactNode; - pagination?: { pageSize: number }; - }) => { - if (!dataSource || dataSource.length === 0) { - return
No Data Available
; - } - // Handle pagination if provided - const paginatedData = pagination - ? dataSource.slice(0, pagination.pageSize) - : dataSource; - - return ( -
- {paginatedData.map((item, index) => ( -
- {renderItem ? renderItem(item, index) : item || 'No Title'} -
- ))} -
- ); - }, - { - Item: Object.assign( - ({ children }: { children: React.ReactNode }) => ( -
{children}
- ), - { - Meta: ({ - title, - description, - }: { - title: React.ReactNode; - description: React.ReactNode; - }) => ( -
-
{title}
-
{description}
-
- ), - }, - ), - }, - ), - ListItem: ({ children }: { children: React.ReactNode }) => ( -
{children}
- ), - ListItemMeta: ({ - title, - description, - }: { - title: React.ReactNode; - description: React.ReactNode; - }) => ( -
-
{title}
-
{description}
-
- ), - NotificationOutlined: () =>
, - BulbOutlined: () =>
, - ProductOutlined: () =>
, - QuestionOutlined: () =>
, - DashboardOutlined: () =>
, - AppstoreAddOutlined: () =>
, - SplitCellsOutlined: () =>
, - ApiOutlined: () =>
, - PieChartOutlined: () =>
, - InfoCircleOutlined: () => , - InfoOutlined: () => , - PushpinOutlined: () => , - CompassOutlined: () => , - Modal: ({ isOpen, children }: { isOpen: boolean; children: React.ReactNode }) => - isOpen ?
{children}
: null, - ModalView: ({ isOpen, children }: { isOpen: boolean; children: React.ReactNode }) => - isOpen ?
{children}
: null, - Links: ({ links }: { links: Array<{ label: string; value: string }> }) => ( -
    - {links.map((link, index) => ( -
  • - {link.label} -
  • - ))} -
- ), - ControlledCheckbox: vi.fn(({ name, 'aria-label': ariaLabel }) => ( - - )), - EmptyView: () =>
No Data Available
, - TextView: ({ content }: { content: string }) => {content}, - TitleView: ({ title }: { title: string }) =>

{title}

, - LoaderView: () =>
Loading...
, - DynamicLoader: (importFn: () => Promise<{ default: React.ComponentType }>) => { - // eslint-disable-next-line react/display-name - return (props: any) => { - const LazyComponent = dynamic(() => importFn(), { ssr: false }); - return ; - }; - }, - PaginatedList: ({ - dataSource, - renderItem, - }: { - dataSource: any[]; - renderItem: (item: any) => React.ReactNode; - }) => { - if (!dataSource || !Array.isArray(dataSource)) { - return
No Data Available
; - } - - return ( -
- -
- ); - }, - LoadMoreList: ({ - dataSource, - renderItem, - }: { - dataSource: any[]; - renderItem: (item: any) => React.ReactNode; - }) => { - if (!dataSource || !Array.isArray(dataSource)) { - return
No Data Available
; - } - - return ( -
- -
- ); - }, - CollapseView: vi.fn(({ dataSource }) => ( -
- {dataSource?.length ? ( - dataSource.map((item: any, index: number) => ( -
-
{item.label}
-
{item.children}
-
- )) - ) : ( -
No Data Available
- )} -
- )), - }; -}); vi.mock('@v6y/ui-kit-front/hooks/useNavigationAdapter', () => ({ - useNavigationAdapter: vi.fn(() => ({ + default: vi.fn(() => ({ createUrlQueryParam: vi.fn((name: string, value: string) => `${name}=${value}`), removeUrlQueryParam: vi.fn(), getUrlParams: vi.fn(() => ['123']), @@ -507,10 +64,35 @@ vi.mock('@v6y/ui-kit-front/hooks/useNavigationAdapter', () => ({ })), })); -vi.mock('@v6y/ui-kit-front/translation/useTranslationProvider', () => ({ - useTranslationProvider: vi.fn(() => ({ - translate: (key: string) => key, - })), + +vi.mock('@v6y/ui-kit/components/organisms/app/EmptyView.tsx', () => ({ + default: () =>
No Data Available
, +})); + +vi.mock('@v6y/ui-kit/components/organisms/app/LoaderView.tsx', () => ({ + default: () =>
Loading...
, +})); + +vi.mock('@v6y/ui-kit/components/atoms/app/Statistic.tsx', () => ({ + default: ({ value, suffix, valueStyle, prefix }: any) => { + const MockStatistic = () => { + const ref = React.useRef(null); + React.useEffect(() => { + if (ref.current && valueStyle) { + const styleString = Object.entries(valueStyle).map(([k, v]) => `${k}: ${v};`).join(' '); + ref.current.setAttribute('style', styleString); + } + }, [valueStyle]); + return ( +
+ {prefix && {prefix}} + {value} + {suffix && {suffix}} +
+ ); + }; + return ; + }, })); vi.mock('@v6y/ui-kit-front/components/atoms/input', () => ({ @@ -674,6 +256,17 @@ vi.mock('@v6y/ui-kit-front/components/molecules/pagination', () => ({ PaginationPrevious: ({ children, ...props }: any) => React.createElement('a', props, children), })); -vi.mock('@v6y/ui-kit-front/components/organisms/LanguageMenu', () => ({ - LanguageMenu: ({ ...props }: any) => React.createElement('div', props), +vi.mock('@v6y/ui-kit/hooks/useThemeConfigProvider.tsx', () => ({ + useThemeConfigProvider: () => ({ + currentConfig: { + status: { + success: 'green', + warning: 'orange', + error: 'red', + info: 'blue', + default: 'black', + }, + statusIcons: {}, + }, + }), })); diff --git a/v6y-apps/front/src/__tests__/app-list/VitalityAppListView-test.tsx b/v6y-apps/front/src/__tests__/app-list/VitalityAppListView-test.tsx index aa15ee91..19f97a06 100644 --- a/v6y-apps/front/src/__tests__/app-list/VitalityAppListView-test.tsx +++ b/v6y-apps/front/src/__tests__/app-list/VitalityAppListView-test.tsx @@ -6,7 +6,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import VitalityAppListView from '../../features/app-list/components/VitalityAppListView'; vi.mock('@v6y/ui-kit-front/hooks/useNavigationAdapter', () => ({ - useNavigationAdapter: vi.fn(() => ({ + default: vi.fn(() => ({ createUrlQueryParam: mockCreateUrlQueryParam, removeUrlQueryParam: mockRemoveUrlQueryParam, router: mockRouter, @@ -15,6 +15,19 @@ vi.mock('@v6y/ui-kit-front/hooks/useNavigationAdapter', () => ({ })), })); +vi.mock('@v6y/ui-kit-front/translation/useTranslationProvider', async (importOriginal) => { + const actual = await importOriginal(); + return { + default: () => ({ + translate: (key: string) => key, + translateHelper: (key: string) => key, + i18n: { changeLanguage: vi.fn(), language: 'en' }, + changeLocale: vi.fn(), + getLocale: () => 'en', + }), + }; +}); + const mockRouter = { replace: vi.fn(), }; diff --git a/v6y-apps/front/src/__tests__/commons/VitalityAppInfos-test.tsx b/v6y-apps/front/src/__tests__/commons/VitalityAppInfos-test.tsx index 7950ae98..0b0b4da0 100644 --- a/v6y-apps/front/src/__tests__/commons/VitalityAppInfos-test.tsx +++ b/v6y-apps/front/src/__tests__/commons/VitalityAppInfos-test.tsx @@ -5,22 +5,14 @@ import { afterEach, describe, expect, it, vi } from 'vitest'; import VitalityAppInfos from '../../commons/components/application-info/VitalityAppInfos'; import { VitalityAppInfosProps } from '../../commons/types/VitalityAppInfosProps'; -vi.mock('@v6y/ui-kit-front/hooks/useNavigationAdapter', () => ({ - useNavigationAdapter: vi.fn(() => ({ - createUrlQueryParam: vi.fn((name: string, value: string) => `${name}=${value}`), - removeUrlQueryParam: vi.fn(), - router: { - push: vi.fn(), - replace: vi.fn(), - back: vi.fn(), - forward: vi.fn(), - refresh: vi.fn(), - }, - })), -})); - vi.mock('@v6y/ui-kit-front/translation/useTranslationProvider', () => ({ - useTranslationProvider: vi.fn(() => ({ translate: (k: string) => k })), + default: vi.fn(() => ({ + translate: vi.fn((key) => key), + translateHelper: vi.fn((key) => key), + i18n: { changeLanguage: vi.fn(), language: 'en' }, + changeLocale: vi.fn(), + getLocale: vi.fn(() => 'en'), + })), })); describe('VitalityAppInfos', () => { diff --git a/v6y-apps/front/src/__tests__/notifications/VitalityNotificationView-test.tsx b/v6y-apps/front/src/__tests__/notifications/VitalityNotificationView-test.tsx index 554855d4..7f139c0e 100644 --- a/v6y-apps/front/src/__tests__/notifications/VitalityNotificationView-test.tsx +++ b/v6y-apps/front/src/__tests__/notifications/VitalityNotificationView-test.tsx @@ -1,5 +1,5 @@ import '@testing-library/jest-dom/vitest'; -import { render, screen, waitFor } from '@testing-library/react'; +import { fireEvent, render, screen, waitFor } from '@testing-library/react'; import { Mock, beforeEach, describe, expect, it, vi } from 'vitest'; import VitalityNotificationView from '../../features/notifications/components/VitalityNotificationView'; @@ -82,11 +82,25 @@ describe('VitalityNotificationView', () => { screen.getByText((content) => content.includes('How to use Vitality?')), ).toBeInTheDocument(); expect( - screen.getByText((content) => content.includes('Step-by-step guide')), + screen.getByText((content) => content.includes('How to reset my password?')), ).toBeInTheDocument(); + }); + + // Expand the first collapse to check the description + const firstCollapseHeader = screen.getByText('How to use Vitality?'); + fireEvent.click(firstCollapseHeader); + + await waitFor(() => { expect( - screen.getByText((content) => content.includes('How to reset my password?')), + screen.getByText((content) => content.includes('Step-by-step guide')), ).toBeInTheDocument(); + }); + + // Expand the second collapse to check the description + const secondCollapseHeader = screen.getByText('How to reset my password?'); + fireEvent.click(secondCollapseHeader); + + await waitFor(() => { expect( screen.getByText((content) => content.includes('Go to settings')), ).toBeInTheDocument(); diff --git a/v6y-apps/front/src/app/layout.tsx b/v6y-apps/front/src/app/layout.tsx index 0c5af0a5..01434104 100644 --- a/v6y-apps/front/src/app/layout.tsx +++ b/v6y-apps/front/src/app/layout.tsx @@ -1,8 +1,8 @@ import { Inter } from 'next/font/google'; import { ReactNode, Suspense } from 'react'; -import { LoaderView } from '@v6y/ui-kit'; import '@v6y/ui-kit-front/styles.css'; +import LoaderView from '@v6y/ui-kit/components/organisms/app/LoaderView.tsx'; import VitalityPageLayout from '../commons/components/layout/VitalityPageLayout'; import { AppProvider } from '../infrastructure/providers/AppProvider'; diff --git a/v6y-apps/front/src/commons/components/VitalitySearchBar.tsx b/v6y-apps/front/src/commons/components/VitalitySearchBar.tsx index 4ce08ec3..82c99cb9 100644 --- a/v6y-apps/front/src/commons/components/VitalitySearchBar.tsx +++ b/v6y-apps/front/src/commons/components/VitalitySearchBar.tsx @@ -1,9 +1,11 @@ 'use client'; +import { MagnifyingGlassIcon } from '@radix-ui/react-icons'; import * as React from 'react'; -import { MagnifyingGlassIcon, useTranslationProvider } from '@v6y/ui-kit-front'; -import { Button, Input } from '@v6y/ui-kit-front'; +import { Button } from '@v6y/ui-kit-front/components/atoms/button'; +import { Input } from '@v6y/ui-kit-front/components/atoms/input'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; import { useVitalitySearchBar } from '../hooks/useVitalitySearchBar'; import { VitalitySearchBarProps } from '../types/VitalitySearchBarProps'; diff --git a/v6y-apps/front/src/commons/components/VitalitySectionView.tsx b/v6y-apps/front/src/commons/components/VitalitySectionView.tsx index b40c078a..c4d576cc 100644 --- a/v6y-apps/front/src/commons/components/VitalitySectionView.tsx +++ b/v6y-apps/front/src/commons/components/VitalitySectionView.tsx @@ -1,18 +1,16 @@ +import { ExportOutlined } from '@ant-design/icons'; import * as React from 'react'; -import { - Avatar, - Button, - Card, - Col, - EmptyView, - ExportOutlined, - LoaderView, - Paragraph, - Row, - Space, - TitleView, -} from '@v6y/ui-kit'; +import Avatar from '@v6y/ui-kit/components/atoms/app/Avatar.tsx'; +import Button from '@v6y/ui-kit/components/atoms/app/Button.tsx'; +import Card from '@v6y/ui-kit/components/atoms/app/Card.tsx'; +import { Col } from '@v6y/ui-kit/components/atoms/app/Grid.tsx'; +import { Row } from '@v6y/ui-kit/components/atoms/app/Grid.tsx'; +import Space from '@v6y/ui-kit/components/atoms/app/Space.tsx'; +import EmptyView from '@v6y/ui-kit/components/organisms/app/EmptyView.tsx'; +import LoaderView from '@v6y/ui-kit/components/organisms/app/LoaderView.tsx'; +import Paragraph from '@v6y/ui-kit/components/organisms/app/Paragraph.tsx'; +import TitleView from '@v6y/ui-kit/components/organisms/app/TitleView.tsx'; import { VitalitySectionViewProps } from '../types/VitalitySectionViewProps'; @@ -45,13 +43,7 @@ const VitalitySectionView = ({ } > {(description?.length || 0) > 0 && ( - -

{description || ''}

- - } - /> + {description || ''}

} />} /> )} {isLoading ? : <>{isEmpty ? : children}} diff --git a/v6y-apps/front/src/commons/components/VitalitySelectGrouperView.tsx b/v6y-apps/front/src/commons/components/VitalitySelectGrouperView.tsx index f5a385f6..687b2aea 100644 --- a/v6y-apps/front/src/commons/components/VitalitySelectGrouperView.tsx +++ b/v6y-apps/front/src/commons/components/VitalitySelectGrouperView.tsx @@ -1,7 +1,11 @@ import * as React from 'react'; import { useEffect } from 'react'; -import { Col, EmptyView, Form, Row, Select, TextView } from '@v6y/ui-kit'; +import Form from '@v6y/ui-kit/components/atoms/app/Form.tsx'; +import { Col, Row } from '@v6y/ui-kit/components/atoms/app/Grid.tsx'; +import Select from '@v6y/ui-kit/components/atoms/app/Select.tsx'; +import EmptyView from '@v6y/ui-kit/components/organisms/app/EmptyView.tsx'; +import TextView from '@v6y/ui-kit/components/organisms/app/TextView.tsx'; import useDataGrouper from '../hooks/useDataGrouper'; import { VitalityDataGrouperProps } from '../types/VitalityDataGrouperProps'; diff --git a/v6y-apps/front/src/commons/components/VitalityTabGrouperView.tsx b/v6y-apps/front/src/commons/components/VitalityTabGrouperView.tsx index f589e548..1470b0bc 100644 --- a/v6y-apps/front/src/commons/components/VitalityTabGrouperView.tsx +++ b/v6y-apps/front/src/commons/components/VitalityTabGrouperView.tsx @@ -1,6 +1,6 @@ -import * as React from 'react'; - -import { Col, EmptyView, Row, Tabs } from '@v6y/ui-kit'; +import { Col, Row } from '@v6y/ui-kit/components/atoms/app/Grid.tsx'; +import Tabs from '@v6y/ui-kit/components/atoms/app/Tabs.tsx'; +import EmptyView from '@v6y/ui-kit/components/organisms/app/EmptyView.tsx'; import useDataGrouper from '../hooks/useDataGrouper'; import { VitalityDataGrouperProps } from '../types/VitalityDataGrouperProps'; diff --git a/v6y-apps/front/src/commons/components/application-info/VitalityAppInfos.tsx b/v6y-apps/front/src/commons/components/application-info/VitalityAppInfos.tsx index 05004c65..e1f591eb 100644 --- a/v6y-apps/front/src/commons/components/application-info/VitalityAppInfos.tsx +++ b/v6y-apps/front/src/commons/components/application-info/VitalityAppInfos.tsx @@ -4,8 +4,8 @@ import Link from 'next/link'; import { Badge } from '@v6y/ui-kit-front/components/atoms/badge'; import { Button } from '@v6y/ui-kit-front/components/atoms/button'; -import { useNavigationAdapter } from '@v6y/ui-kit-front/hooks/useNavigationAdapter'; -import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; +import useNavigationAdapter from '@v6y/ui-kit-front/hooks/useNavigationAdapter'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; import VitalityNavigationPaths from '../../config/VitalityNavigationPaths'; import { VitalityAppInfosProps } from '../../types/VitalityAppInfosProps'; diff --git a/v6y-apps/front/src/commons/components/chatbot/VitalityBot.tsx b/v6y-apps/front/src/commons/components/chatbot/VitalityBot.tsx index b9215a60..c99db63a 100644 --- a/v6y-apps/front/src/commons/components/chatbot/VitalityBot.tsx +++ b/v6y-apps/front/src/commons/components/chatbot/VitalityBot.tsx @@ -4,7 +4,7 @@ import * as React from 'react'; import { Suspense, lazy, useEffect, useState } from 'react'; import { Flow, Settings } from 'react-chatbotify'; -import { LoaderView } from '@v6y/ui-kit'; +import LoaderView from '@v6y/ui-kit/components/organisms/app/LoaderView.tsx'; import { VitalityBotFlow } from './VitalityBotFlow'; import VitalityBotSettings from './VitalityBotSettings'; diff --git a/v6y-apps/front/src/commons/components/help/VitalityHelpView.tsx b/v6y-apps/front/src/commons/components/help/VitalityHelpView.tsx index d9099bbf..275e7953 100644 --- a/v6y-apps/front/src/commons/components/help/VitalityHelpView.tsx +++ b/v6y-apps/front/src/commons/components/help/VitalityHelpView.tsx @@ -1,7 +1,8 @@ import * as React from 'react'; import { Matcher } from '@v6y/core-logic/src/utils'; -import { Descriptions, useTranslationProvider } from '@v6y/ui-kit'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; +import Descriptions from '@v6y/ui-kit/components/atoms/app/Descriptions.tsx'; import { VitalityModuleType } from '../../types/VitalityModulesProps'; diff --git a/v6y-apps/front/src/commons/components/indicators/VitalitySelectableIndicators.tsx b/v6y-apps/front/src/commons/components/indicators/VitalitySelectableIndicators.tsx index 137e9d03..578ea6d9 100644 --- a/v6y-apps/front/src/commons/components/indicators/VitalitySelectableIndicators.tsx +++ b/v6y-apps/front/src/commons/components/indicators/VitalitySelectableIndicators.tsx @@ -2,14 +2,11 @@ import * as React from 'react'; import { useEffect, useState } from 'react'; import { KeywordType } from '@v6y/core-logic/src/types/KeywordType'; -import { - Card, - Checkbox, - CheckboxOptionType, - EmptyView, - LoaderView, - useNavigationAdapter, -} from '@v6y/ui-kit'; +import useNavigationAdapter from '@v6y/ui-kit-front/hooks/useNavigationAdapter'; +import Card from '@v6y/ui-kit/components/atoms/app/Card.tsx'; +import Checkbox from '@v6y/ui-kit/components/atoms/app/Checkbox.tsx'; +import EmptyView from '@v6y/ui-kit/components/organisms/app/EmptyView.tsx'; +import LoaderView from '@v6y/ui-kit/components/organisms/app/LoaderView.tsx'; import { buildClientQuery, @@ -18,6 +15,11 @@ import { import VitalityApiConfig from '../../config/VitalityApiConfig'; import GetIndicatorListByParams from './getIndicatorListByParams'; +interface CheckboxOptionType { + label: string; + value: string; +} + interface VitalitySelectableIndicatorsQueryType { isLoading: boolean; data?: { getApplicationDetailsKeywordsByParams: KeywordType[] }; @@ -25,7 +27,7 @@ interface VitalitySelectableIndicatorsQueryType { const VitalitySelectableIndicators = () => { const [selectedIndicators, setSelectedIndicators] = useState(); - const [indicatorsList, setIndicatorsList] = useState(); + const [indicatorsList, setIndicatorsList] = useState(); const { router, pathname, getUrlParams, createUrlQueryParam, removeUrlQueryParam } = useNavigationAdapter(); @@ -50,10 +52,12 @@ const VitalitySelectableIndicators = () => { (item: KeywordType) => item.label, ); - const data = [...new Set(dataSource || [])].map((item) => ({ - label: item, - value: item, - })); + const data = [...new Set(dataSource || [])] + .filter((item): item is string => item !== undefined) + .map((item) => ({ + label: item, + value: item, + })); setIndicatorsList(data); }, [dataIndicators?.getApplicationDetailsKeywordsByParams]); @@ -85,7 +89,7 @@ const VitalitySelectableIndicators = () => { handleSelectedIndicator(values)} /> diff --git a/v6y-apps/front/src/commons/components/layout/VitalityBreadcrumb.tsx b/v6y-apps/front/src/commons/components/layout/VitalityBreadcrumb.tsx index 973083c0..2b1baa26 100644 --- a/v6y-apps/front/src/commons/components/layout/VitalityBreadcrumb.tsx +++ b/v6y-apps/front/src/commons/components/layout/VitalityBreadcrumb.tsx @@ -7,9 +7,9 @@ import { BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, - useNavigationAdapter, - useTranslationProvider, -} from '@v6y/ui-kit-front'; +} from '@v6y/ui-kit-front/components/atoms/breadcrumb'; +import useNavigationAdapter from '@v6y/ui-kit-front/hooks/useNavigationAdapter'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; import { buildBreadCrumbItems } from '../../config/VitalityCommonConfig'; diff --git a/v6y-apps/front/src/commons/components/layout/VitalityPageHeader.tsx b/v6y-apps/front/src/commons/components/layout/VitalityPageHeader.tsx index 5dbdb952..ad26e733 100644 --- a/v6y-apps/front/src/commons/components/layout/VitalityPageHeader.tsx +++ b/v6y-apps/front/src/commons/components/layout/VitalityPageHeader.tsx @@ -1,15 +1,11 @@ +import { ExitIcon, MagnifyingGlassIcon, QuestionMarkCircledIcon } from '@radix-ui/react-icons'; import Image from 'next/image'; import Link from 'next/link'; -import { - Button, - ExitIcon, - LanguageMenu, - MagnifyingGlassIcon, - QuestionMarkCircledIcon, - TypographySmall, - useTranslationProvider, -} from '@v6y/ui-kit-front'; +import { Button } from '@v6y/ui-kit-front/components/atoms/button'; +import { TypographySmall } from '@v6y/ui-kit-front/components/molecules/Typography'; +import { LanguageMenu } from '@v6y/ui-kit-front/components/organisms/LanguageMenu'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; import { getSession } from '../../../infrastructure/providers/SessionProvider'; import VitalityNavigationPaths from '../../config/VitalityNavigationPaths'; diff --git a/v6y-apps/front/src/commons/components/layout/VitalityPageLayout.tsx b/v6y-apps/front/src/commons/components/layout/VitalityPageLayout.tsx index 075ba02e..dfcd6113 100644 --- a/v6y-apps/front/src/commons/components/layout/VitalityPageLayout.tsx +++ b/v6y-apps/front/src/commons/components/layout/VitalityPageLayout.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { ReactNode } from 'react'; -import { Toaster } from '@v6y/ui-kit-front'; +import { Toaster } from '@v6y/ui-kit-front/components/atoms/sonner'; import VitalityBreadcrumb from './VitalityBreadcrumb'; import VitalityPageHeader from './VitalityPageHeader'; diff --git a/v6y-apps/front/src/commons/components/modules/VitalityModuleList.tsx b/v6y-apps/front/src/commons/components/modules/VitalityModuleList.tsx index 0bbb2cbf..8a09e3ab 100644 --- a/v6y-apps/front/src/commons/components/modules/VitalityModuleList.tsx +++ b/v6y-apps/front/src/commons/components/modules/VitalityModuleList.tsx @@ -1,13 +1,11 @@ import * as React from 'react'; import { useEffect, useState } from 'react'; -import { - DynamicLoader, - ModalView, - PaginatedList, - TitleView, - useTranslationProvider, -} from '@v6y/ui-kit'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; +import DynamicLoader from '@v6y/ui-kit/components/organisms/app/DynamicLoader.tsx'; +import ModalView from '@v6y/ui-kit/components/organisms/app/ModalView.tsx'; +import PaginatedList from '@v6y/ui-kit/components/organisms/app/PaginatedList.tsx'; +import TitleView from '@v6y/ui-kit/components/organisms/app/TitleView.tsx'; import { VitalityModuleType, VitalityModulesProps } from '../../types/VitalityModulesProps'; import VitalityModuleListItem from './VitalityModuleListItem'; diff --git a/v6y-apps/front/src/commons/components/modules/VitalityModuleListItem.tsx b/v6y-apps/front/src/commons/components/modules/VitalityModuleListItem.tsx index c30cb20a..9ace2102 100644 --- a/v6y-apps/front/src/commons/components/modules/VitalityModuleListItem.tsx +++ b/v6y-apps/front/src/commons/components/modules/VitalityModuleListItem.tsx @@ -1,22 +1,18 @@ +import { InfoCircledIcon } from '@radix-ui/react-icons'; import * as React from 'react'; import { auditStatus } from '@v6y/core-logic/src/config/AuditHelpConfig'; -import { - Avatar, - Button, - Card, - Divider, - EmptyView, - InfoCircleOutlined, - ListItem, - ListItemMeta, - PushpinOutlined, - Space, - Statistic, - TextView, - useThemeConfigProvider, - useTranslationProvider, -} from '@v6y/ui-kit'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; +import Avatar from '@v6y/ui-kit/components/atoms/app/Avatar.tsx'; +import Button from '@v6y/ui-kit/components/atoms/app/Button.tsx'; +import Card from '@v6y/ui-kit/components/atoms/app/Card.tsx'; +import Divider from '@v6y/ui-kit/components/atoms/app/Divider.tsx'; +import { ListItem, ListItemMeta } from '@v6y/ui-kit/components/atoms/app/List.tsx'; +import Space from '@v6y/ui-kit/components/atoms/app/Space.tsx'; +import Statistic from '@v6y/ui-kit/components/atoms/app/Statistic.tsx'; +import EmptyView from '@v6y/ui-kit/components/organisms/app/EmptyView.tsx'; +import TextView from '@v6y/ui-kit/components/organisms/app/TextView.tsx'; +import { useThemeConfigProvider } from '@v6y/ui-kit/hooks/useThemeConfigProvider.tsx'; import { VitalityModuleType } from '../../types/VitalityModulesProps'; @@ -47,7 +43,7 @@ const VitalityModuleListItem = ({ module, onModuleClicked }: VitalityModuleItemP {(hasAuditHelp || hasDependencyStatusHelp || hasEvolutionHelp) && (

{appsTotal} results

diff --git a/v6y-apps/front/src/features/app-list/components/VitalityAppListView.tsx b/v6y-apps/front/src/features/app-list/components/VitalityAppListView.tsx index 108cd8e1..58f63b6a 100644 --- a/v6y-apps/front/src/features/app-list/components/VitalityAppListView.tsx +++ b/v6y-apps/front/src/features/app-list/components/VitalityAppListView.tsx @@ -2,7 +2,6 @@ import { useEffect, useState } from 'react'; -import { DynamicLoader } from '@v6y/ui-kit'; import { Badge } from '@v6y/ui-kit-front/components/atoms/badge'; import { Checkbox } from '@v6y/ui-kit-front/components/atoms/checkbox'; import { @@ -13,8 +12,9 @@ import { CardTitle, } from '@v6y/ui-kit-front/components/molecules/Card'; import { TypographyH3 } from '@v6y/ui-kit-front/components/molecules/Typography'; -import { useNavigationAdapter } from '@v6y/ui-kit-front/hooks/useNavigationAdapter'; -import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; +import useNavigationAdapter from '@v6y/ui-kit-front/hooks/useNavigationAdapter'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; +import DynamicLoader from '@v6y/ui-kit/components/organisms/app/DynamicLoader.tsx'; const VitalityAppList = DynamicLoader(() => import('./VitalityAppList')); diff --git a/v6y-apps/front/src/features/apps-stats/components/VitalityAppsStatsChart.tsx b/v6y-apps/front/src/features/apps-stats/components/VitalityAppsStatsChart.tsx index d4677764..2ee4f5f9 100644 --- a/v6y-apps/front/src/features/apps-stats/components/VitalityAppsStatsChart.tsx +++ b/v6y-apps/front/src/features/apps-stats/components/VitalityAppsStatsChart.tsx @@ -2,14 +2,12 @@ import * as React from 'react'; import { useEffect } from 'react'; import { KeywordStatsType } from '@v6y/core-logic/src/types/KeywordType'; -import { - Charts, - Col, - LoaderView, - Row, - useNavigationAdapter, - useTranslationProvider, -} from '@v6y/ui-kit'; +import Charts from '@v6y/ui-kit/components/atoms/app/Charts.tsx'; +import { Col } from '@v6y/ui-kit/components/atoms/app/Grid.tsx'; +import { Row } from '@v6y/ui-kit/components/atoms/app/Grid.tsx'; +import LoaderView from '@v6y/ui-kit/components/organisms/app/LoaderView.tsx'; +import useNavigationAdapter from '@v6y/ui-kit/hooks/useNavigationAdapter.tsx'; +import useTranslationProvider from '@v6y/ui-kit/translation/useTranslationProvider.ts'; import VitalityApiConfig from '../../../commons/config/VitalityApiConfig'; import { diff --git a/v6y-apps/front/src/features/apps-stats/components/VitalityAppsStatsView.tsx b/v6y-apps/front/src/features/apps-stats/components/VitalityAppsStatsView.tsx index ba517d73..6a098d3c 100644 --- a/v6y-apps/front/src/features/apps-stats/components/VitalityAppsStatsView.tsx +++ b/v6y-apps/front/src/features/apps-stats/components/VitalityAppsStatsView.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { Suspense } from 'react'; -import { LoaderView } from '@v6y/ui-kit'; +import LoaderView from '@v6y/ui-kit/components/organisms/app/LoaderView.tsx'; import VitalitySelectableIndicators from '../../../commons/components/indicators/VitalitySelectableIndicators'; import VitalityAppList from '../../app-list/components/VitalityAppList'; diff --git a/v6y-apps/front/src/features/auth/components/VitalityLoginForm.tsx b/v6y-apps/front/src/features/auth/components/VitalityLoginForm.tsx index 595339d5..20414385 100644 --- a/v6y-apps/front/src/features/auth/components/VitalityLoginForm.tsx +++ b/v6y-apps/front/src/features/auth/components/VitalityLoginForm.tsx @@ -1,8 +1,8 @@ 'use client'; import React, { useEffect, useRef } from 'react'; +import { useForm } from 'react-hook-form'; -import { useForm } from '@v6y/ui-kit'; import { Button } from '@v6y/ui-kit-front/components/atoms/button'; import { Input } from '@v6y/ui-kit-front/components/atoms/input'; import { toast } from '@v6y/ui-kit-front/components/atoms/sonnerHelpers'; @@ -21,7 +21,7 @@ import { FormLabel, FormMessage, } from '@v6y/ui-kit-front/components/molecules/Form'; -import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; import { LoginAccountFormType, diff --git a/v6y-apps/front/src/features/contact/components/VitalityContactPageForm.tsx b/v6y-apps/front/src/features/contact/components/VitalityContactPageForm.tsx index 58480b8a..84ba297b 100644 --- a/v6y-apps/front/src/features/contact/components/VitalityContactPageForm.tsx +++ b/v6y-apps/front/src/features/contact/components/VitalityContactPageForm.tsx @@ -3,7 +3,12 @@ import type React from 'react'; import { useState } from 'react'; -import { Button, Card, Input, Label, Textarea, useTranslationProvider } from '@v6y/ui-kit-front'; +import { Button } from '@v6y/ui-kit-front/components/atoms/button'; +import { Input } from '@v6y/ui-kit-front/components/atoms/input'; +import { Label } from '@v6y/ui-kit-front/components/atoms/label'; +import { Textarea } from '@v6y/ui-kit-front/components/atoms/textarea'; +import { Card } from '@v6y/ui-kit-front/components/molecules/Card'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; export function ContactForm() { const { translate } = useTranslationProvider(); diff --git a/v6y-apps/front/src/features/contact/components/VitalityContactPageView.tsx b/v6y-apps/front/src/features/contact/components/VitalityContactPageView.tsx index 004f2b08..a2a4b263 100644 --- a/v6y-apps/front/src/features/contact/components/VitalityContactPageView.tsx +++ b/v6y-apps/front/src/features/contact/components/VitalityContactPageView.tsx @@ -3,7 +3,7 @@ import { ChatBubbleIcon, EnvelopeClosedIcon } from '@radix-ui/react-icons'; import { Card } from '@v6y/ui-kit-front/components/molecules/Card'; -import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; import { ContactForm } from './VitalityContactPageForm'; diff --git a/v6y-apps/front/src/features/dashboard/components/VitalityDashboardFilters.tsx b/v6y-apps/front/src/features/dashboard/components/VitalityDashboardFilters.tsx index 9f128790..b287f3c1 100644 --- a/v6y-apps/front/src/features/dashboard/components/VitalityDashboardFilters.tsx +++ b/v6y-apps/front/src/features/dashboard/components/VitalityDashboardFilters.tsx @@ -1,13 +1,13 @@ import { MixerHorizontalIcon } from '@radix-ui/react-icons'; -import { useThemeConfigProvider } from '@v6y/ui-kit'; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from '@v6y/ui-kit-front/components/molecules/Accordion'; -import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; +import { useThemeConfigProvider } from '@v6y/ui-kit/hooks/useThemeConfigProvider.tsx'; import { DashboardItemType, diff --git a/v6y-apps/front/src/features/faq/components/VitalityFaqView.tsx b/v6y-apps/front/src/features/faq/components/VitalityFaqView.tsx index a7168906..2434c110 100644 --- a/v6y-apps/front/src/features/faq/components/VitalityFaqView.tsx +++ b/v6y-apps/front/src/features/faq/components/VitalityFaqView.tsx @@ -4,7 +4,7 @@ import Link from 'next/link'; import * as React from 'react'; import { FaqType } from '@v6y/core-logic/src/types/FaqType'; -import { useTranslationProvider } from '@v6y/ui-kit-front/translation/useTranslationProvider'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; import VitalityApiConfig from '../../../commons/config/VitalityApiConfig'; import { diff --git a/v6y-apps/front/src/features/notifications/components/VitalityNotificationList.tsx b/v6y-apps/front/src/features/notifications/components/VitalityNotificationList.tsx index 30239e05..c205ddea 100644 --- a/v6y-apps/front/src/features/notifications/components/VitalityNotificationList.tsx +++ b/v6y-apps/front/src/features/notifications/components/VitalityNotificationList.tsx @@ -1,5 +1,7 @@ import { NotificationType } from '@v6y/core-logic/src/types/NotificationType'; -import { CollapseItemType, CollapseView, Links } from '@v6y/ui-kit'; +import CollapseView from '@v6y/ui-kit/components/organisms/app/CollapseView.tsx'; +import Links from '@v6y/ui-kit/components/organisms/app/Links.tsx'; +import { CollapseItemType } from '@v6y/ui-kit/components/types/CollapseType.ts'; const VitalityNotificationList = ({ dataSource }: { dataSource?: NotificationType[] }) => { if (!dataSource?.length) { diff --git a/v6y-apps/front/src/features/notifications/components/VitalityNotificationView.tsx b/v6y-apps/front/src/features/notifications/components/VitalityNotificationView.tsx index 77aae019..f883f9b0 100644 --- a/v6y-apps/front/src/features/notifications/components/VitalityNotificationView.tsx +++ b/v6y-apps/front/src/features/notifications/components/VitalityNotificationView.tsx @@ -1,9 +1,10 @@ 'use client'; +import { NotificationOutlined } from '@ant-design/icons'; import * as React from 'react'; import { NotificationType } from '@v6y/core-logic/src/types/NotificationType'; -import { NotificationOutlined, useTranslationProvider } from '@v6y/ui-kit'; +import useTranslationProvider from '@v6y/ui-kit-front/translation/useTranslationProvider'; import VitalitySectionView from '../../../commons/components/VitalitySectionView'; import VitalityApiConfig from '../../../commons/config/VitalityApiConfig'; diff --git a/v6y-apps/front/src/features/search/components/VitalitySearchView.tsx b/v6y-apps/front/src/features/search/components/VitalitySearchView.tsx index b551ab54..a1ca8fa3 100644 --- a/v6y-apps/front/src/features/search/components/VitalitySearchView.tsx +++ b/v6y-apps/front/src/features/search/components/VitalitySearchView.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Suspense } from 'react'; -import { LoaderView } from '@v6y/ui-kit'; +import LoaderView from '@v6y/ui-kit/components/organisms/app/LoaderView.tsx'; import VitalityAppList from '../../app-list/components/VitalityAppList'; diff --git a/v6y-apps/front/src/infrastructure/providers/AppProvider.tsx b/v6y-apps/front/src/infrastructure/providers/AppProvider.tsx index 5ffc9854..2c1eaffb 100644 --- a/v6y-apps/front/src/infrastructure/providers/AppProvider.tsx +++ b/v6y-apps/front/src/infrastructure/providers/AppProvider.tsx @@ -1,8 +1,12 @@ 'use client'; -import { ThemeModes, ThemeProvider, ThemeTypes } from '@v6y/ui-kit'; -import { ThemeProps } from '@v6y/ui-kit/src/theme/types/ThemeProps'; +import { ThemeProvider } from '@v6y/ui-kit/theme/commons/ThemeProvider.tsx'; +import { ThemeProps } from '@v6y/ui-kit/theme/types/ThemeProps.ts'; +import { + ThemeModes, + ThemeTypes, +} from '../../../../../v6y-libs/ui-kit/src/theme/commons/ThemeLoader'; import QueryProvider from './QueryProvider'; export const AppProvider = ({ children }: ThemeProps) => { diff --git a/v6y-libs/ui-kit-front/package.json b/v6y-libs/ui-kit-front/package.json index 7547ad5a..c8f5346e 100644 --- a/v6y-libs/ui-kit-front/package.json +++ b/v6y-libs/ui-kit-front/package.json @@ -23,6 +23,7 @@ "./components/molecules/navigation-menu": "./src/components/molecules/navigation-menu.tsx", "./components/molecules/pagination": "./src/components/molecules/pagination.tsx", "./components/organisms/LanguageMenu": "./src/components/organisms/LanguageMenu.tsx", + "./components/atoms/sonner": "./src/components/atoms/sonner.tsx", "./hooks/useNavigationAdapter": "./src/hooks/useNavigationAdapter.ts", "./translation/useTranslationProvider": "./src/translation/useTranslationProvider.ts", "./lib/utils": "./src/lib/utils.ts", diff --git a/v6y-libs/ui-kit-front/src/components/organisms/LanguageMenu.tsx b/v6y-libs/ui-kit-front/src/components/organisms/LanguageMenu.tsx index 5045d111..919e55a3 100644 --- a/v6y-libs/ui-kit-front/src/components/organisms/LanguageMenu.tsx +++ b/v6y-libs/ui-kit-front/src/components/organisms/LanguageMenu.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { useTranslationProvider } from '../../translation/useTranslationProvider'; +import useTranslationProvider from '../../translation/useTranslationProvider'; import { Select, SelectContent, SelectItem, SelectTrigger } from '../molecules/Select'; const languages = [ diff --git a/v6y-libs/ui-kit-front/src/hooks/useNavigationAdapter.ts b/v6y-libs/ui-kit-front/src/hooks/useNavigationAdapter.ts index 64876bf9..a01a303f 100644 --- a/v6y-libs/ui-kit-front/src/hooks/useNavigationAdapter.ts +++ b/v6y-libs/ui-kit-front/src/hooks/useNavigationAdapter.ts @@ -3,7 +3,7 @@ import { redirect, usePathname, useRouter, useSearchParams } from 'next/navigation'; import { useCallback } from 'react'; -export const useNavigationAdapter = () => { +const useNavigationAdapter = () => { const searchParams = useSearchParams(); const pathname = usePathname(); const router = useRouter(); @@ -36,3 +36,5 @@ export const useNavigationAdapter = () => { pathname, }; }; + +export default useNavigationAdapter; diff --git a/v6y-libs/ui-kit-front/src/translation/useTranslationProvider.ts b/v6y-libs/ui-kit-front/src/translation/useTranslationProvider.ts index 4a70996a..9c41cefb 100644 --- a/v6y-libs/ui-kit-front/src/translation/useTranslationProvider.ts +++ b/v6y-libs/ui-kit-front/src/translation/useTranslationProvider.ts @@ -3,7 +3,7 @@ import { TFunction } from 'i18next'; import { useTranslation as useNextTranslate } from 'react-i18next'; -export const useTranslationProvider = () => { +const useTranslationProvider = () => { const { t, i18n } = useNextTranslate(); return { @@ -16,3 +16,5 @@ export const useTranslationProvider = () => { getLocale: () => i18n.language, }; }; + +export default useTranslationProvider; diff --git a/v6y-libs/ui-kit/package.json b/v6y-libs/ui-kit/package.json index 22462c0a..75dbb920 100644 --- a/v6y-libs/ui-kit/package.json +++ b/v6y-libs/ui-kit/package.json @@ -1,91 +1,212 @@ { - "name": "@v6y/ui-kit", - "version": "0.0.1", - "main": "src/index.ts", - "type": "module", - "files": [ - "src", - "dist", - "README.md" - ], - "repository": { - "type": "git", - "url": "https://github.com/ekino/v6y" - }, - "scripts": { - "build:vite": "vite build", - "build:tsc": "tsc --project ./tsconfig.json && vite build", - "check:tsc": "tsc --noEmit --project ./tsconfig.json", - "lint": "eslint", - "lint:fix": "eslint --fix", - "analyze": "vite-bundle-visualizer -c vite.config.ts", - "format": "prettier --write src", - "test": "vitest --coverage --watch false", - "test:watch": "vitest", - "test:ui": "vitest --ui" - }, - "dependencies": { - "@ant-design/icons": "=6.1.0", - "@ant-design/nextjs-registry": "=1.0.2", - "@ant-design/v5-patch-for-react-19": "=1.0.3", - "@refinedev/antd": "=5.45.1", - "@refinedev/cli": "=2.16.42", - "@refinedev/core": "=4.57.5", - "@refinedev/devtools": "=2.0.3", - "@refinedev/inferencer": "=6.0.2", - "@refinedev/kbar": "=2.0.0", - "@refinedev/nextjs-router": "=7.0.4", - "@refinedev/simple-rest": "=5.0.10", - "@refinedev/ui-types": "=1.23.1", - "@v6y/core-logic": "workspace:^", - "@tanstack/react-query": "=4.36.1", - "@refinedev/graphql": "=7.1.1", - "graphql": "=16.10.0", - "graphql-request": "=7.1.2", - "graphql-ws": "=6.0.4", - "antd": "=5.23.1", - "ag-charts-react": "=13.0.0", - "i18next": "=25.8.0", - "i18next-browser-languagedetector": "=8.0.2", - "i18next-resources-to-backend": "=1.2.1", - "i18next-xhr-backend": "=3.2.2", - "js-cookie": "=3.0.5", - "next": "=15.4.10", - "next-i18next": "=15.4.1", - "react": "=19.0.0", - "react-dom": "=19.0.0", - "react-hook-form": "=7.54.2", - "react-i18next": "=15.4.0" - }, - "devDependencies": { - "@eslint/js": "=9.18.0", - "@next/bundle-analyzer": "=16.0.7", - "@refinedev/devtools": "=2.0.3", - "@testing-library/dom": "=10.4.0", - "@testing-library/jest-dom": "=6.6.3", - "@testing-library/react": "=16.1.0", - "@testing-library/user-event": "=14.5.2", - "@trivago/prettier-plugin-sort-imports": "=6.0.0", - "@types/eslint__js": "=8.42.3", - "@types/node": "=24.10.0", - "@types/react": "=19.0.7", - "@types/react-dom": "=19.0.3", - "@vitejs/plugin-react": "=4.3.4", - "@vitejs/plugin-react-swc": "=4.2.2", - "@vitest/coverage-v8": "=3.0.5", - "@vitest/ui": "=4.0.14", - "eslint": "=9.18.0", - "eslint-config-prettier": "=10.0.1", - "eslint-plugin-prettier": "=5.2.1", - "eslint-plugin-react-hooks": "=5.1.0", - "eslint-plugin-react-refresh": "=0.4.18", - "globals": "=16.4.0", - "prettier": "=3.4.2", - "typescript": "=5.7.3", - "typescript-eslint": "=8.20.0", - "vite": "=7.2.3", - "vite-bundle-visualizer": "=1.2.1", - "vite-plugin-dts": "=4.5.0", - "vitest": "=3.0.5" - } + "name": "@v6y/ui-kit", + "version": "0.0.1", + "type": "module", + "files": [ + "src", + "dist", + "README.md" + ], + "repository": { + "type": "git", + "url": "https://github.com/ekino/v6y" + }, + "scripts": { + "build:vite": "vite build", + "build:tsc": "tsc --project ./tsconfig.json && vite build", + "check:tsc": "tsc --noEmit --project ./tsconfig.json", + "lint": "eslint", + "lint:fix": "eslint --fix", + "analyze": "vite-bundle-visualizer -c vite.config.ts", + "format": "prettier --write src", + "test": "vitest --coverage --watch false", + "test:watch": "vitest", + "test:ui": "vitest --ui" + }, + "dependencies": { + "@ant-design/icons": "=6.1.0", + "@ant-design/nextjs-registry": "=1.0.2", + "@ant-design/v5-patch-for-react-19": "=1.0.3", + "@refinedev/antd": "=5.45.1", + "@refinedev/cli": "=2.16.42", + "@refinedev/core": "=4.57.5", + "@refinedev/devtools": "=2.0.3", + "@refinedev/inferencer": "=6.0.2", + "@refinedev/kbar": "=2.0.0", + "@refinedev/nextjs-router": "=7.0.4", + "@refinedev/simple-rest": "=5.0.10", + "@refinedev/ui-types": "=1.23.1", + "@v6y/core-logic": "workspace:^", + "@tanstack/react-query": "=4.36.1", + "@refinedev/graphql": "=7.1.1", + "graphql": "=16.10.0", + "graphql-request": "=7.1.2", + "graphql-ws": "=6.0.4", + "antd": "=5.23.1", + "ag-charts-react": "=13.0.0", + "i18next": "=25.8.0", + "i18next-browser-languagedetector": "=8.0.2", + "i18next-resources-to-backend": "=1.2.1", + "i18next-xhr-backend": "=3.2.2", + "js-cookie": "=3.0.5", + "next": "=15.4.10", + "next-i18next": "=15.4.1", + "react": "=19.0.0", + "react-dom": "=19.0.0", + "react-hook-form": "=7.54.2", + "react-i18next": "=15.4.0" + }, + "devDependencies": { + "@eslint/js": "=9.18.0", + "@next/bundle-analyzer": "=16.0.7", + "@refinedev/devtools": "=2.0.3", + "@testing-library/dom": "=10.4.0", + "@testing-library/jest-dom": "=6.6.3", + "@testing-library/react": "=16.1.0", + "@testing-library/user-event": "=14.5.2", + "@trivago/prettier-plugin-sort-imports": "=6.0.0", + "@types/eslint__js": "=8.42.3", + "@types/node": "=24.10.0", + "@types/react": "=19.0.7", + "@types/react-dom": "=19.0.3", + "@vitejs/plugin-react": "=4.3.4", + "@vitejs/plugin-react-swc": "=4.2.2", + "@vitest/coverage-v8": "=3.0.5", + "@vitest/ui": "=4.0.14", + "eslint": "=9.18.0", + "eslint-config-prettier": "=10.0.1", + "eslint-plugin-prettier": "=5.2.1", + "eslint-plugin-react-hooks": "=5.1.0", + "eslint-plugin-react-refresh": "=0.4.18", + "globals": "=16.4.0", + "prettier": "=3.4.2", + "typescript": "=5.7.3", + "typescript-eslint": "=8.20.0", + "vite": "=7.2.3", + "vite-bundle-visualizer": "=1.2.1", + "vite-plugin-dts": "=4.5.0", + "vitest": "=3.0.5" + }, + "exports": { + "./components/organisms/admin/AdminEditWrapper.tsx": "./src/components/organisms/admin/AdminEditWrapper.tsx", + "./components/organisms/admin/AdminListWrapper.tsx": "./src/components/organisms/admin/AdminListWrapper.tsx", + "./components/organisms/admin/AdminCreateWrapper.tsx": "./src/components/organisms/admin/AdminCreateWrapper.tsx", + "./components/organisms/admin/AdminShowWrapper.tsx": "./src/components/organisms/admin/AdminShowWrapper.tsx", + "./components/organisms/admin/AdminSelectWrapper.tsx": "./src/components/organisms/admin/AdminSelectWrapper.tsx", + "./components/organisms/admin/AdminLayout.tsx": "./src/components/organisms/admin/AdminLayout.tsx", + "./components/organisms/admin/AdminErrorView.tsx": "./src/components/organisms/admin/AdminErrorView.tsx", + "./components/organisms/app/TitleView.tsx": "./src/components/organisms/app/TitleView.tsx", + "./components/organisms/app/EmptyView.tsx": "./src/components/organisms/app/EmptyView.tsx", + "./components/organisms/app/LanguageMenu.tsx": "./src/components/organisms/app/LanguageMenu.tsx", + "./components/organisms/app/TextView.tsx": "./src/components/organisms/app/TextView.tsx", + "./components/atoms/app/Avatar.tsx": "./src/components/atoms/app/Avatar.tsx", + "./components/atoms/app/Layout.tsx": "./src/components/atoms/app/Layout.tsx", + "./components/atoms/app/Space.tsx": "./src/components/atoms/app/Space.tsx", + "./components/organisms/app/Links.tsx": "./src/components/organisms/app/Links.tsx", + "./components/atoms/admin/EditButton.tsx": "./src/components/atoms/admin/EditButton.tsx", + "./components/atoms/admin/ShowButton.tsx": "./src/components/atoms/admin/ShowButton.tsx", + "./components/atoms/admin/DeleteButton.tsx": "./src/components/atoms/admin/DeleteButton.tsx", + "./components/atoms/app/Result.tsx": "./src/components/atoms/app/Result.tsx", + "./components/atoms/app/Table.tsx": "./src/components/atoms/app/Table.tsx", + "./components/atoms/app/Form.tsx": "./src/components/atoms/app/Form.tsx", + "./components/atoms/app/Select.tsx": "./src/components/atoms/app/Select.tsx", + "./components/atoms/app/Input.tsx": "./src/components/atoms/app/Input.tsx", + "./components/atoms/app/Checkbox.tsx": "./src/components/atoms/app/Checkbox.tsx", + "./components/atoms/app/Checkbox": "./src/components/atoms/app/Checkbox.tsx", + "./components/organisms/app/LoaderView.tsx": "./src/components/organisms/app/LoaderView.tsx", + "./components/organisms/app/DynamicLoader.tsx": "./src/components/organisms/app/DynamicLoader.tsx", + "./components/organisms/app/CollapseView.tsx": "./src/components/organisms/app/CollapseView.tsx", + "./components/organisms/app/ModalView.tsx": "./src/components/organisms/app/ModalView.tsx", + "./components/organisms/app/PaginatedList.tsx": "./src/components/organisms/app/PaginatedList.tsx", + "./components/organisms/app/Paragraph.tsx": "./src/components/organisms/app/Paragraph.tsx", + "./components/atoms/app/Col.tsx": "./src/components/atoms/app/Col.tsx", + "./components/atoms/app/Row.tsx": "./src/components/atoms/app/Row.tsx", + "./components/atoms/app/Tabs.tsx": "./src/components/atoms/app/Tabs.tsx", + "./components/atoms/app/Button.tsx": "./src/components/atoms/app/Button.tsx", + "./components/atoms/app/Card.tsx": "./src/components/atoms/app/Card.tsx", + "./components/atoms/app/Divider.tsx": "./src/components/atoms/app/Divider.tsx", + "./components/atoms/app/Statistic.tsx": "./src/components/atoms/app/Statistic.tsx", + "./components/atoms/app/List.tsx": "./src/components/atoms/app/List.tsx", + "./components/atoms/app/Charts.tsx": "./src/components/atoms/app/Charts.tsx", + "./components/atoms/app/Menu.tsx": "./src/components/atoms/app/Menu.tsx", + "./components/atoms/app/Message.tsx": "./src/components/atoms/app/Message.tsx", + "./components/atoms/app/Descriptions.tsx": "./src/components/atoms/app/Descriptions.tsx", + "./components/atoms/app/Dropdown.tsx": "./src/components/atoms/app/Dropdown.tsx", + "./components/atoms/app/Flex.tsx": "./src/components/atoms/app/Flex.tsx", + "./components/atoms/app/Grid.tsx": "./src/components/atoms/app/Grid.tsx", + "./components/atoms/app/Switch.tsx": "./src/components/atoms/app/Switch.tsx", + "./components/atoms/app/Tag.tsx": "./src/components/atoms/app/Tag.tsx", + "./components/atoms/app/Empty.tsx": "./src/components/atoms/app/Empty.tsx", + "./components/atoms/app/Typography.tsx": "./src/components/atoms/app/Typography.tsx", + "./components/atoms/app/Breadcrumb.tsx": "./src/components/atoms/app/Breadcrumb.tsx", + "./components/atoms/app/Modal.tsx": "./src/components/atoms/app/Modal.tsx", + "./components/atoms/app/FloatButton.tsx": "./src/components/atoms/app/FloatButton.tsx", + "./components/atoms/app/Spin.tsx": "./src/components/atoms/app/Spin.tsx", + "./components/organisms/app/LoadMoreList.tsx": "./src/components/organisms/app/LoadMoreList.tsx", + "./components/organisms/app/ControlledCheckbox.tsx": "./src/components/organisms/app/ControlledCheckbox.tsx", + "./components/organisms/app/ControlledInput.tsx": "./src/components/organisms/app/ControlledInput.tsx", + "./components/types/CollapseType.ts": "./src/components/types/CollapseType.ts", + "./components/types/CheckboxType.ts": "./src/components/types/CheckboxType.ts", + "./hooks/useThemeConfigProvider.tsx": "./src/hooks/useThemeConfigProvider.tsx", + "./theme/commons/ThemeProvider.tsx": "./src/theme/commons/ThemeProvider.tsx", + "./theme/commons/ThemeContext.tsx": "./src/theme/commons/ThemeContext.tsx", + "./theme/variants/admin/AdminTheme.tsx": "./src/theme/variants/admin/AdminTheme.tsx", + "./theme/variants/app/AppTheme.tsx": "./src/theme/variants/app/AppTheme.tsx", + "./theme/types/ThemeProps.ts": "./src/theme/types/ThemeProps.ts", + "./providers/types/AdminAuthProviderType.ts": "./src/providers/types/AdminAuthProviderType.ts", + "./components/pages/admin/AdminAuthenticatedWrapper.tsx": "./src/components/pages/admin/AdminAuthenticatedWrapper.tsx", + "./components/pages/admin/AdminAuthenticationWrapper.tsx": "./src/components/pages/admin/AdminAuthenticationWrapper.tsx", + "./components/pages/admin/AdminNavigationWrapper.tsx": "./src/components/pages/admin/AdminNavigationWrapper.tsx", + "./hooks/useAdminIdentity.tsx": "./src/hooks/useAdminIdentity.tsx", + "./hooks/useAdminNavigationAdapter.ts": "./src/hooks/useAdminNavigationAdapter.ts", + "./hooks/useNavigationAdapter.tsx": "./src/hooks/useNavigationAdapter.tsx", + "./hooks/useForm": "./src/hooks/useForm.tsx", + "./providers/admin/AdminProvider": "./src/providers/admin/AdminProvider.tsx", + "./providers/admin/AdminDataProvider": "./src/providers/admin/AdminDataProvider.ts", + "./providers/admin/AdminDevtoolsProvider": "./src/providers/admin/AdminDevtoolsProvider.tsx", + "./api/GraphQLClient": "./src/api/GraphQLClient.ts", + "./translation/useTranslationProvider.ts": "./src/translation/useTranslationProvider.ts", + "./hooks/useAdminNavigationParamsParser.ts": "./src/hooks/useAdminNavigationAdapter.ts", + "./hooks/useAdminGetIdentity.tsx": "./src/hooks/useAdminIdentity.tsx", + "./components/types/AdminTableType.ts": "./src/components/types/AdminTableType.ts", + "./components/types/SelectOptionType.ts": "./src/components/types/SelectOptionType.ts", + "./translation/TranslationType.ts": "./src/translation/TranslationType.ts", + "./api/types/AdminHttpError.ts": "./src/api/types/AdminHttpError.ts", + "./components/atoms/admin/DeleteButton": "./src/components/atoms/admin/DeleteButton.tsx", + "./components/atoms/admin/EditButton": "./src/components/atoms/admin/EditButton.tsx", + "./components/atoms/admin/ShowButton": "./src/components/atoms/admin/ShowButton.tsx", + "./components/atoms/app/Space": "./src/components/atoms/app/Space.tsx", + "./components/types/AdminTableType": "./src/components/types/AdminTableType.ts", + "./components/atoms/app/Table": "./src/components/atoms/app/Table.tsx", + "./components/atoms/app/Descriptions": "./src/components/atoms/app/Descriptions.tsx", + "./components/organisms/app/TextView": "./src/components/organisms/app/TextView.tsx", + "./api/types/AdminHttpError": "./src/api/types/AdminHttpError.ts", + "./components/atoms/app/Result": "./src/components/atoms/app/Result.tsx", + "./translation/useTranslationProvider": "./src/translation/useTranslationProvider.ts", + "./components/pages/admin/AdminAuthenticatedWrapper": "./src/components/pages/admin/AdminAuthenticatedWrapper.tsx", + "./components/organisms/admin/AdminErrorView": "./src/components/organisms/admin/AdminErrorView.tsx", + "./components/pages/admin/AdminNavigationWrapper": "./src/components/pages/admin/AdminNavigationWrapper.tsx", + "./components/types/SelectOptionType": "./src/components/types/SelectOptionType.ts", + "./translation/TranslationType": "./src/translation/TranslationType.ts", + "./components/organisms/app/Links": "./src/components/organisms/app/Links.tsx", + "./providers/types/AdminAuthProviderType": "./src/providers/types/AdminAuthProviderType.ts", + "./components/atoms/app/Form": "./src/components/atoms/app/Form.tsx", + "./components/atoms/app/Input": "./src/components/atoms/app/Input.tsx", + "./components/atoms/app/Select": "./src/components/atoms/app/Select.tsx", + "./components/organisms/app/TitleView": "./src/components/organisms/app/TitleView.tsx", + "./components/pages/admin/AdminAuthenticationWrapper": "./src/components/pages/admin/AdminAuthenticationWrapper.tsx", + "./components/atoms/app/Avatar": "./src/components/atoms/app/Avatar.tsx", + "./components/organisms/app/LanguageMenu": "./src/components/organisms/app/LanguageMenu.tsx", + "./components/atoms/app/Layout": "./src/components/atoms/app/Layout.tsx", + "./hooks/useAdminGetIdentity": "./src/hooks/useAdminIdentity.tsx", + "./components/organisms/admin/AdminLayout": "./src/components/organisms/admin/AdminLayout.tsx", + "./components/organisms/admin/AdminShowWrapper": "./src/components/organisms/admin/AdminShowWrapper.tsx", + "./hooks/useAdminNavigationParamsParser": "./src/hooks/useAdminNavigationAdapter.ts", + "./components/organisms/admin/AdminSelectWrapper": "./src/components/organisms/admin/AdminSelectWrapper.tsx", + "./components/organisms/app/EmptyView": "./src/components/organisms/app/EmptyView.tsx", + "./components/organisms/admin/AdminListWrapper": "./src/components/organisms/admin/AdminListWrapper.tsx", + "./components/organisms/admin/AdminEditWrapper": "./src/components/organisms/admin/AdminEditWrapper.tsx", + "./components/organisms/admin/AdminCreateWrapper": "./src/components/organisms/admin/AdminCreateWrapper.tsx", + "./translation/useTranslationProvider": "./src/translation/useTranslationProvider.ts" + } } diff --git a/v6y-libs/ui-kit/src/components/atoms/Icons.tsx b/v6y-libs/ui-kit/src/components/atoms/Icons.tsx deleted file mode 100644 index d32859e2..00000000 --- a/v6y-libs/ui-kit/src/components/atoms/Icons.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { - ApiOutlined, - AppstoreAddOutlined, - BulbOutlined, - CompassOutlined, - DashboardOutlined, - DislikeOutlined, - DownOutlined, - ExportOutlined, - FormOutlined, - InfoCircleOutlined, - InfoOutlined, - LikeOutlined, - LogoutOutlined, - NotificationOutlined, - PieChartOutlined, - ProductOutlined, - PushpinOutlined, - QuestionOutlined, - SmileOutlined, - SplitCellsOutlined, - SyncOutlined, - ThunderboltOutlined, -} from '@ant-design/icons'; - -export { - ApiOutlined, - AppstoreAddOutlined, - DashboardOutlined, - DislikeOutlined, - LikeOutlined, - LogoutOutlined, - NotificationOutlined, - PieChartOutlined, - QuestionOutlined, - SplitCellsOutlined, - ThunderboltOutlined, - InfoCircleOutlined, - PushpinOutlined, - ProductOutlined, - CompassOutlined, - SyncOutlined, - ExportOutlined, - FormOutlined, - BulbOutlined, - InfoOutlined, - SmileOutlined, - DownOutlined, -}; diff --git a/v6y-libs/ui-kit/src/components/organisms/app/LanguageMenu.tsx b/v6y-libs/ui-kit/src/components/organisms/app/LanguageMenu.tsx index 5af0090b..3abe9a1a 100644 --- a/v6y-libs/ui-kit/src/components/organisms/app/LanguageMenu.tsx +++ b/v6y-libs/ui-kit/src/components/organisms/app/LanguageMenu.tsx @@ -1,7 +1,7 @@ +import { DownOutlined } from '@ant-design/icons'; import * as React from 'react'; import { useTranslationProvider } from '../../../translation/useTranslationProvider'; -import { DownOutlined } from '../../atoms/Icons'; import Avatar from '../../atoms/app/Avatar'; import Button from '../../atoms/app/Button'; import Dropdown from '../../atoms/app/Dropdown'; diff --git a/v6y-libs/ui-kit/src/hooks/useNavigationAdapter.tsx b/v6y-libs/ui-kit/src/hooks/useNavigationAdapter.tsx index 64876bf9..a01a303f 100644 --- a/v6y-libs/ui-kit/src/hooks/useNavigationAdapter.tsx +++ b/v6y-libs/ui-kit/src/hooks/useNavigationAdapter.tsx @@ -3,7 +3,7 @@ import { redirect, usePathname, useRouter, useSearchParams } from 'next/navigation'; import { useCallback } from 'react'; -export const useNavigationAdapter = () => { +const useNavigationAdapter = () => { const searchParams = useSearchParams(); const pathname = usePathname(); const router = useRouter(); @@ -36,3 +36,5 @@ export const useNavigationAdapter = () => { pathname, }; }; + +export default useNavigationAdapter; diff --git a/v6y-libs/ui-kit/src/index.ts b/v6y-libs/ui-kit/src/index.ts deleted file mode 100644 index 64aeff32..00000000 --- a/v6y-libs/ui-kit/src/index.ts +++ /dev/null @@ -1,101 +0,0 @@ -import '@ant-design/v5-patch-for-react-19'; - -export type * from './providers/admin/AdminProvider'; -export type * from './providers/admin/AdminDataProvider'; -export type * from './providers/types/AdminAuthProviderType'; -export type * from './hooks/useAdminIdentity'; -export type * from './hooks/useNavigationAdapter'; -export type * from './hooks/useAdminNavigationAdapter'; -export type * from './hooks/useForm'; -export type * from './hooks/useThemeConfigProvider'; - -export * from './translation/useTranslationProvider.ts'; -export * from './translation/TranslationType.ts'; - -export type * from './components/types/AdminTableType'; -export type * from './components/types/CollapseType'; -export type * from './components/types/FormType'; -export type * from './components/types/LinksType'; -export type * from './components/types/SelectOptionType'; -export type * from './components/types/AdminMessageType'; -export type * from './components/types/TableType'; -export type * from './components/types/CheckboxType'; -export type * from './components/types/BreadcrumbType'; -export type * from './components/types/ListType'; -export type * from './components/types/PaginatedListType'; -export type * from './components/types/ModalType'; -export type * from './components/types/InputType'; -export type * from './components/types/DynamicLoaderType'; -export type * from './components/types/TitleType'; -export type * from './components/types/TextType'; -export type * from './components/types/ParagraphType'; -export type * from './components/pages/admin/AdminAuthenticationWrapper'; -export type * from './components/pages/admin/AdminAuthenticatedWrapper'; -export type * from './components/pages/admin/AdminNavigationWrapper'; -export type * from './components/organisms/app/CollapseView'; -export type * from './components/organisms/app/EmptyView'; -export type * from './components/organisms/app/Links'; -export type * from './components/organisms/app/LoaderView'; -export type * from './components/organisms/app/ModalView'; -export type * from './components/organisms/app/TextView'; -export type * from './components/organisms/app/TitleView'; -export type * from './components/organisms/app/ControlledInput'; -export type * from './components/organisms/app/ControlledCheckbox'; -export type * from './components/organisms/app/PaginatedList'; -export type * from './components/organisms/app/DynamicLoader'; -export type * from './components/organisms/app/LanguageMenu'; -export type * from './components/organisms/app/LoadMoreList'; -export type * from './components/organisms/admin/AdminLayout'; -export type * from './components/organisms/admin/AdminCreateWrapper'; -export type * from './components/organisms/admin/AdminEditWrapper'; -export type * from './components/organisms/admin/AdminSelectWrapper'; -export type * from './components/organisms/admin/AdminShowWrapper'; -export type * from './components/organisms/admin/AdminListWrapper'; -export type * from './components/organisms/admin/AdminErrorView'; -export type * from './components/atoms/Icons'; -export type * from './components/atoms/admin/DeleteButton'; -export type * from './components/atoms/admin/EditButton'; -export type * from './components/atoms/admin/ShowButton'; -export type * from './components/atoms/admin/RefreshButton'; -export type * from './components/atoms/admin/ErrorView'; -export type * from './components/atoms/admin/CreateLayout'; -export type * from './components/atoms/admin/EditLayout'; -export type * from './components/atoms/admin/ShowLayout'; -export type * from './components/atoms/admin/ListLayout'; -export type * from './components/atoms/app/Checkbox'; -export type * from './components/atoms/app/Form'; -export type * from './components/atoms/app/Descriptions'; -export type * from './components/atoms/app/Select'; -export type * from './components/atoms/app/Input'; -export type * from './components/atoms/app/Result'; -export type * from './components/atoms/app/Space'; -export type * from './components/atoms/app/Table'; -export type * from './components/atoms/app/Layout'; -export type * from './components/atoms/app/Avatar'; -export type * from './components/atoms/app/Button'; -export type * from './components/atoms/app/Card'; -export type * from './components/atoms/app/Divider'; -export type * from './components/atoms/app/Dropdown'; -export type * from './components/atoms/app/Flex'; -export type * from './components/atoms/app/Menu'; -export type * from './components/atoms/app/Statistic'; -export type * from './components/atoms/app/Switch'; -export type * from './components/atoms/app/Breadcrumb'; -export type * from './components/atoms/app/FloatButton'; -export type * from './components/atoms/app/Tabs'; -export type * from './components/atoms/app/Tag'; -export type * from './components/atoms/app/Charts'; -export type * from './components/atoms/app/Message'; -export type * from './components/atoms/app/Modal'; -export type * from './components/atoms/app/Collapse'; -export type * from './components/atoms/app/Spin'; -export type * from './components/atoms/app/Empty'; -export type * from './components/atoms/app/Typography'; -export type * from './components/atoms/app/Grid'; -export type * from './components/atoms/app/List'; - -export type * from './theme/commons/ThemeProvider'; -export type * from './theme/types/ThemeProps'; -export type * from './theme/commons/ThemeLoader'; -export type * from './api/GraphQLClient'; -export type * from './api/types/AdminHttpError'; diff --git a/v6y-libs/ui-kit/src/theme/variants/app/AppTheme.tsx b/v6y-libs/ui-kit/src/theme/variants/app/AppTheme.tsx index ffe38465..4c2506bb 100644 --- a/v6y-libs/ui-kit/src/theme/variants/app/AppTheme.tsx +++ b/v6y-libs/ui-kit/src/theme/variants/app/AppTheme.tsx @@ -1,11 +1,6 @@ +import { DislikeOutlined, LikeOutlined, ThunderboltOutlined } from '@ant-design/icons'; import * as React from 'react'; -import { - DislikeOutlined, - LikeOutlined, - ThunderboltOutlined, -} from '../../../components/atoms/Icons'; - const ThemeTokensConfig = { colorTextBase: '#1a1a1a', colorTextLight: '#fff', diff --git a/v6y-libs/ui-kit/src/translation/useTranslationProvider.ts b/v6y-libs/ui-kit/src/translation/useTranslationProvider.ts index 4a70996a..ae6d975f 100644 --- a/v6y-libs/ui-kit/src/translation/useTranslationProvider.ts +++ b/v6y-libs/ui-kit/src/translation/useTranslationProvider.ts @@ -3,7 +3,7 @@ import { TFunction } from 'i18next'; import { useTranslation as useNextTranslate } from 'react-i18next'; -export const useTranslationProvider = () => { +const useTranslationProvider = () => { const { t, i18n } = useNextTranslate(); return { @@ -16,3 +16,7 @@ export const useTranslationProvider = () => { getLocale: () => i18n.language, }; }; + +export default useTranslationProvider; + +export { useTranslationProvider };