From 13a3b56ab436011055b01a2c010c80443aeba7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Sun, 9 Nov 2025 13:30:15 +0300 Subject: [PATCH] =?UTF-8?q?ui=20uygulamas=C4=B1n=C4=B1n=20klas=C3=B6r=20d?= =?UTF-8?q?=C3=BCzenlemesi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DynamicAssemblyRegistrationService.cs | 2 +- ui/public/version.json | 4 +- ui/src/@types/common.ts | 18 - ui/src/@types/docs.ts | 12 - ui/src/components/codeLayout/CodeEditor.tsx | 2 +- .../codeLayout/ComponentLibrary.tsx | 4 +- .../codeLayout/ComponentSelector.tsx | 2 +- .../components/codeLayout/PropertyPanel.tsx | 2 +- .../codeLayout/data/componentDefinitions.ts | 2 +- .../codeLayout/data/tailwindClasses.ts | 2 +- ui/src/components/developerKit/CodeLayout.tsx | 2 +- .../developerKit/ComponentEditor.tsx | 2 +- .../components/developerKit/EntityEditor.tsx | 2 +- .../components/layouts/AuthLayout/Cover.tsx | 2 +- ui/src/components/layouts/AuthLayout/Side.tsx | 2 +- .../components/layouts/AuthLayout/Simple.tsx | 4 +- ui/src/components/route/AppRoute.tsx | 2 +- ui/src/components/route/ProtectedRoute.tsx | 2 +- ui/src/components/route/PublicRoute.tsx | 2 +- ui/src/components/shared/ActionLink.tsx | 2 +- ui/src/components/shared/Affix.tsx | 2 +- ui/src/components/shared/AuthorityCheck.tsx | 2 +- ui/src/components/shared/Container.tsx | 2 +- ui/src/components/shared/IconText.tsx | 2 +- ui/src/components/shared/Loading.tsx | 2 +- ui/src/components/shared/NavToggle.tsx | 2 +- ui/src/components/shared/PermissionCheck.tsx | 2 +- .../components/shared/SegmentItemOption.tsx | 2 +- ui/src/components/shared/StickyFooter.tsx | 2 +- ui/src/components/shared/SvgIcon.tsx | 2 +- ui/src/components/template/Header.tsx | 2 +- .../HorizontalMenuContent.tsx | 2 +- .../HorizontalMenuIcon.tsx | 2 +- .../HorizontalMenuItem.tsx | 4 +- .../components/template/LanguageSelector.tsx | 4 +- ui/src/components/template/Logo.tsx | 4 +- ui/src/components/template/PageContainer.tsx | 4 +- .../components/template/SecondaryHeader.tsx | 2 +- ui/src/components/template/SideNavToggle.tsx | 2 +- .../template/SidePanel/SidePanel.tsx | 2 +- .../StackedSideNav/StackedSideNavMini.tsx | 8 +- .../StackedSideNavSecondary.tsx | 4 +- ui/src/components/template/Theme.tsx | 4 +- .../template/ThemeConfigurator/CopyButton.tsx | 2 +- .../ThemeConfigurator/DirectionSwitcher.tsx | 2 +- .../ThemeConfigurator/LayoutSwitcher.tsx | 2 +- .../ThemeConfigurator/ThemeSwitcher.tsx | 2 +- ui/src/components/template/UserDropdown.tsx | 2 +- .../VerticalCollapsedMenuItem.tsx | 6 +- .../VerticalMenuContent.tsx | 6 +- .../VerticalMenuContent/VerticalMenuIcon.tsx | 2 +- .../VerticalSingleMenuItem.tsx | 6 +- ui/src/configs/app.config.ts | 23 - ui/src/configs/theme.config.ts | 43 - ui/src/constants/countries.constant.ts | 1212 ----------------- ui/src/constants/roles.constant.ts | 2 - ui/src/proxy/account/models.ts | 2 +- .../{@types/auth.ts => proxy/auth/models.ts} | 0 ui/src/proxy/common.ts | 7 + ui/src/proxy/configs/app.config.ts | 14 + ui/src/proxy/configs/models.ts | 9 + .../developerKit}/componentInfo.ts | 0 ui/src/{@types => proxy/menus}/menu.ts | 0 .../menus}/navigation-icon.config.tsx | 0 ui/src/{@types => proxy/menus}/navigation.ts | 0 ui/src/{@types => proxy/routes}/routes.tsx | 2 +- .../theme.ts => proxy/theme/models.ts} | 16 +- ui/src/proxy/theme/theme.config.ts | 17 + ui/src/services/account.service.ts | 2 +- ui/src/services/auth.service.ts | 2 +- ui/src/services/authApi.service.ts | 2 +- ui/src/services/platformApi.service.ts | 2 +- ui/src/store/abpConfig.model.ts | 4 +- ui/src/store/locale.model.ts | 2 +- ui/src/store/theme.model.ts | 4 +- ui/src/{shared/types.ts => types/shared.ts} | 0 ui/src/utils/codeParser.ts | 2 +- ui/src/utils/hooks/useAuth.ts | 4 +- ui/src/utils/hooks/useCurrentMenuIcon.tsx | 2 +- ui/src/utils/hooks/useDarkmode.ts | 2 +- ui/src/utils/hooks/useDirection.ts | 2 +- ui/src/utils/hooks/useMenuActive.ts | 2 +- ui/src/utils/hooks/useMenuData.ts | 2 +- ui/src/utils/navigation.ts | 2 +- ui/src/views/Views.tsx | 2 +- .../admin/activityLog/components/Event.tsx | 2 +- .../activityLog/components/LogFilter.tsx | 2 +- ui/src/views/admin/listForm/Wizard.tsx | 2 +- .../admin/listForm/edit/ChartTabAnimation.tsx | 2 +- .../listForm/edit/ChartTabAnnotations.tsx | 2 +- .../admin/listForm/edit/ChartTabAxis.tsx | 2 +- .../listForm/edit/ChartTabCommonSettings.tsx | 2 +- .../admin/listForm/edit/ChartTabCrosshair.tsx | 2 +- .../admin/listForm/edit/ChartTabLegend.tsx | 2 +- .../admin/listForm/edit/ChartTabSeries.tsx | 2 +- .../listForm/edit/ChartTabZoomAndPan.tsx | 2 +- .../admin/listForm/edit/FormCustomization.tsx | 2 +- ui/src/views/admin/listForm/edit/FormEdit.tsx | 2 +- .../edit/FormTabDatabaseDataSource.tsx | 2 +- .../admin/listForm/edit/FormTabDetails.tsx | 2 +- .../admin/listForm/edit/FormTabFilters.tsx | 2 +- .../listForm/edit/FormTabPermissions.tsx | 2 +- .../admin/listForm/edit/FormTabPivots.tsx | 2 +- .../views/admin/listForm/edit/FormTabRow.tsx | 2 +- .../admin/listForm/edit/FormTabSorting.tsx | 2 +- .../views/admin/listForm/edit/FormTabTree.tsx | 2 +- .../form-fields/FormFieldTabCustomization.tsx | 2 +- .../edit/form-fields/FormFieldTabDetails.tsx | 2 +- .../edit/form-fields/FormFieldTabLookup.tsx | 2 +- .../edit/form-fields/FormFieldTabOptions.tsx | 2 +- .../form-fields/FormFieldTabPermissions.tsx | 2 +- .../form-fields/FormFieldTabPivotSetting.tsx | 2 +- .../listForm/edit/form-fields/FormFields.tsx | 2 +- .../JsonRowOpDialogAnnotation.tsx | 2 +- .../JsonRowOpDialogAxis.tsx | 2 +- .../JsonRowOpDialogCommand.tsx | 2 +- .../JsonRowOpDialogEditForm.tsx | 2 +- .../JsonRowOpDialogExtraFilter.tsx | 2 +- .../JsonRowOpDialogSeries.tsx | 2 +- .../JsonRowOpDialogSubForm.tsx | 2 +- .../JsonRowOpDialogWidget.tsx | 2 +- .../organization-unit/OrganizationUnits.tsx | 2 +- .../views/admin/user-management/Details.tsx | 2 +- ui/src/views/auth/Login.tsx | 2 +- ui/src/views/form/FormButtons.tsx | 2 +- ui/src/views/form/types.ts | 2 +- ui/src/views/form/useFormData.tsx | 4 +- ui/src/views/list/Card.tsx | 2 +- ui/src/views/list/Chart.tsx | 8 +- ui/src/views/list/ChartSeriesDialog.tsx | 2 +- ui/src/views/list/Grid.tsx | 9 +- ui/src/views/list/Pivot.tsx | 5 +- ui/src/views/list/Tree.tsx | 4 +- .../list}/useListFormColumns.ts | 22 +- .../list}/useListFormCustomDataSource.ts | 10 +- ui/src/views/menu/MenuItemComponent.tsx | 6 +- ui/src/views/menu/MenuManager.tsx | 2 +- ui/src/views/menu/SortableMenuTree.tsx | 4 +- ui/src/views/public/About.tsx | 2 +- ui/src/views/public/Logo.tsx | 4 +- ui/src/views/public/Services.tsx | 2 +- ui/src/views/shared/TableNoRecords.tsx | 2 +- 142 files changed, 234 insertions(+), 1487 deletions(-) delete mode 100644 ui/src/@types/common.ts delete mode 100644 ui/src/@types/docs.ts delete mode 100644 ui/src/configs/app.config.ts delete mode 100644 ui/src/configs/theme.config.ts delete mode 100644 ui/src/constants/countries.constant.ts delete mode 100644 ui/src/constants/roles.constant.ts rename ui/src/{@types/auth.ts => proxy/auth/models.ts} (100%) create mode 100644 ui/src/proxy/common.ts create mode 100644 ui/src/proxy/configs/app.config.ts create mode 100644 ui/src/proxy/configs/models.ts rename ui/src/{@types => proxy/developerKit}/componentInfo.ts (100%) rename ui/src/{@types => proxy/menus}/menu.ts (100%) rename ui/src/{configs => proxy/menus}/navigation-icon.config.tsx (100%) rename ui/src/{@types => proxy/menus}/navigation.ts (100%) rename ui/src/{@types => proxy/routes}/routes.tsx (92%) rename ui/src/{@types/theme.ts => proxy/theme/models.ts} (51%) create mode 100644 ui/src/proxy/theme/theme.config.ts rename ui/src/{shared/types.ts => types/shared.ts} (100%) rename ui/src/{shared => views/list}/useListFormColumns.ts (97%) rename ui/src/{shared => views/list}/useListFormCustomDataSource.ts (97%) diff --git a/api/src/Kurs.Platform.HttpApi.Host/DynamicServices/DynamicAssemblyRegistrationService.cs b/api/src/Kurs.Platform.HttpApi.Host/DynamicServices/DynamicAssemblyRegistrationService.cs index 4a61403a..483257aa 100644 --- a/api/src/Kurs.Platform.HttpApi.Host/DynamicServices/DynamicAssemblyRegistrationService.cs +++ b/api/src/Kurs.Platform.HttpApi.Host/DynamicServices/DynamicAssemblyRegistrationService.cs @@ -27,7 +27,7 @@ namespace Kurs.Platform.DynamicServices // Bekleyen assembly kayıt istekleri private static readonly Queue _pendingRegistrations = new(); - private static readonly object _lock = new object(); + private static readonly object _lock = new(); public DynamicAssemblyRegistrationService( IServiceProvider serviceProvider, diff --git a/ui/public/version.json b/ui/public/version.json index dadf9c7a..1b758755 100644 --- a/ui/public/version.json +++ b/ui/public/version.json @@ -1,5 +1,5 @@ { - "commit": "f7deeb4", + "commit": "533e937", "releases": [ { "version": "1.0.33", @@ -163,7 +163,7 @@ { "version": "1.0.14", "buildDate": "2025-09-22", - "commit": "1c4ab4f8232b4cd2a39fa66f8101664840113ce5", + "commit": "51208b86937484d68b699120d74872067b1c7ef6", "changeLog": [ "Yeni versiyon çıktı uyarı gelecek şekilde düzenlendi.", "Sağ alt kısımda mesaj çıkacak ve yenile butonu ile uygulama yeni versiyona geçecektir." diff --git a/ui/src/@types/common.ts b/ui/src/@types/common.ts deleted file mode 100644 index b47aacd8..00000000 --- a/ui/src/@types/common.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ReactNode, CSSProperties } from 'react' - -export interface CommonProps { - className?: string - children?: ReactNode - style?: CSSProperties -} - -export type TableQueries = { - total?: number - pageIndex?: number - pageSize?: number - query?: string - sort?: { - order: 'asc' | 'desc' | '' - key: string | number - } -} diff --git a/ui/src/@types/docs.ts b/ui/src/@types/docs.ts deleted file mode 100644 index cd0a7fcc..00000000 --- a/ui/src/@types/docs.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { LazyExoticComponent } from 'react' - -export type DocRouteNav = { - path: string - label: string - component: LazyExoticComponent<() => JSX.Element> -} - -export type DocumentationRoute = { - groupName: string - nav: DocRouteNav[] -} diff --git a/ui/src/components/codeLayout/CodeEditor.tsx b/ui/src/components/codeLayout/CodeEditor.tsx index 25d98c8e..9d5d599d 100644 --- a/ui/src/components/codeLayout/CodeEditor.tsx +++ b/ui/src/components/codeLayout/CodeEditor.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect, useRef } from 'react' import Editor from '@monaco-editor/react' -import { ComponentDefinition } from '../../@types/componentInfo' +import { ComponentDefinition } from '../../proxy/developerKit/componentInfo' import { generateSingleComponentJSX, generateUniqueId } from '@/utils/codeParser' import { FaCheck, FaCode, FaSpinner, FaMousePointer, FaSave, FaCog, FaTimes } from 'react-icons/fa' diff --git a/ui/src/components/codeLayout/ComponentLibrary.tsx b/ui/src/components/codeLayout/ComponentLibrary.tsx index a77fe85e..4cf5d898 100644 --- a/ui/src/components/codeLayout/ComponentLibrary.tsx +++ b/ui/src/components/codeLayout/ComponentLibrary.tsx @@ -1,8 +1,8 @@ import React, { useMemo, useState } from "react"; import { FaSearch, FaSquare } from 'react-icons/fa'; -import { ComponentDefinition, HookInfo, PropertyInfo } from "../../@types/componentInfo"; +import { ComponentDefinition, HookInfo, PropertyInfo } from "../../proxy/developerKit/componentInfo"; import { getAllComponentDefinitions } from "./data/componentDefinitions"; -import navigationIcon from "@/configs/navigation-icon.config"; +import navigationIcon from "@/proxy/menus/navigation-icon.config"; interface ComponentLibraryProps { onDragStart: (componentDef: ComponentDefinition, e: React.DragEvent) => void; diff --git a/ui/src/components/codeLayout/ComponentSelector.tsx b/ui/src/components/codeLayout/ComponentSelector.tsx index d640dfd9..909a957d 100644 --- a/ui/src/components/codeLayout/ComponentSelector.tsx +++ b/ui/src/components/codeLayout/ComponentSelector.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ComponentInfo } from '../../@types/componentInfo'; +import { ComponentInfo } from '../../proxy/developerKit/componentInfo'; interface ComponentSelectorProps { components: ComponentInfo[]; diff --git a/ui/src/components/codeLayout/PropertyPanel.tsx b/ui/src/components/codeLayout/PropertyPanel.tsx index 5fdd89e3..1654bc1d 100644 --- a/ui/src/components/codeLayout/PropertyPanel.tsx +++ b/ui/src/components/codeLayout/PropertyPanel.tsx @@ -1,6 +1,6 @@ import { useState, useEffect } from "react"; import TailwindModal from "./TailwindModal"; -import { ComponentInfo, HookInfo, PropertyInfo } from "../../@types/componentInfo"; +import { ComponentInfo, HookInfo, PropertyInfo } from "../../proxy/developerKit/componentInfo"; import { getComponentDefinition } from "./data/componentDefinitions"; interface PropertyPanelProps { diff --git a/ui/src/components/codeLayout/data/componentDefinitions.ts b/ui/src/components/codeLayout/data/componentDefinitions.ts index 1fb69822..8add721d 100644 --- a/ui/src/components/codeLayout/data/componentDefinitions.ts +++ b/ui/src/components/codeLayout/data/componentDefinitions.ts @@ -1,4 +1,4 @@ -import { ComponentDefinition } from "../../../@types/componentInfo"; +import { ComponentDefinition } from "../../../proxy/developerKit/componentInfo"; export const CUSTOM_COMPONENTS: ComponentDefinition[] = [ { diff --git a/ui/src/components/codeLayout/data/tailwindClasses.ts b/ui/src/components/codeLayout/data/tailwindClasses.ts index b67b966d..29f33f89 100644 --- a/ui/src/components/codeLayout/data/tailwindClasses.ts +++ b/ui/src/components/codeLayout/data/tailwindClasses.ts @@ -1,4 +1,4 @@ -import { TailwindClass } from "../../../@types/componentInfo"; +import { TailwindClass } from "../../../proxy/developerKit/componentInfo"; export const TAILWIND_CLASSES: TailwindClass[] = [ { diff --git a/ui/src/components/developerKit/CodeLayout.tsx b/ui/src/components/developerKit/CodeLayout.tsx index 9ce14c74..3008401c 100644 --- a/ui/src/components/developerKit/CodeLayout.tsx +++ b/ui/src/components/developerKit/CodeLayout.tsx @@ -16,7 +16,7 @@ import { ComponentLibrary } from '../../components/codeLayout/ComponentLibrary' import { Splitter } from '../../components/codeLayout/Splitter' import { PanelManager } from '../../components/codeLayout/PanelManager' import { CodeEditor } from '../../components/codeLayout/CodeEditor' -import { ComponentDefinition, ComponentInfo, EditorState } from '../../@types/componentInfo' +import { ComponentDefinition, ComponentInfo, EditorState } from '../../proxy/developerKit/componentInfo' import PropertyPanel from '../../components/codeLayout/PropertyPanel' import ComponentSelector from '../../components/codeLayout/ComponentSelector' import { useParams } from 'react-router-dom' diff --git a/ui/src/components/developerKit/ComponentEditor.tsx b/ui/src/components/developerKit/ComponentEditor.tsx index fd450256..f9c0420c 100644 --- a/ui/src/components/developerKit/ComponentEditor.tsx +++ b/ui/src/components/developerKit/ComponentEditor.tsx @@ -12,7 +12,7 @@ import { } from 'react-icons/fa' import { parseReactCode } from '../../utils/codeParser' import ComponentPreview from '../../components/componentEditor/ComponentPreview' -import { EditorState } from '../../@types/componentInfo' +import { EditorState } from '../../proxy/developerKit/componentInfo' import { ROUTES_ENUM } from '@/routes/route.constant' import { useLocalization } from '@/utils/hooks/useLocalization' import { Formik, Form, Field, FieldProps } from 'formik' diff --git a/ui/src/components/developerKit/EntityEditor.tsx b/ui/src/components/developerKit/EntityEditor.tsx index ac49f567..0e8dea5a 100644 --- a/ui/src/components/developerKit/EntityEditor.tsx +++ b/ui/src/components/developerKit/EntityEditor.tsx @@ -17,7 +17,7 @@ import { useLocalization } from '@/utils/hooks/useLocalization' import { Formik, Form, Field, FieldProps, FieldArray } from 'formik' import * as Yup from 'yup' import { FormItem, Input, Select, Checkbox, FormContainer, Button } from '@/components/ui' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { MenuPrefixEnum, menuPrefixValues, toPrefix } from '@/types/menu' // Validation schema diff --git a/ui/src/components/layouts/AuthLayout/Cover.tsx b/ui/src/components/layouts/AuthLayout/Cover.tsx index a29b5542..0f9599c0 100644 --- a/ui/src/components/layouts/AuthLayout/Cover.tsx +++ b/ui/src/components/layouts/AuthLayout/Cover.tsx @@ -1,7 +1,7 @@ import { cloneElement } from 'react' import Logo from '@/components/template/Logo' import { APP_NAME } from '@/constants/app.constant' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import type { ReactNode, ReactElement } from 'react' import { Avatar } from '@/components/ui' import { useLocalization } from '@/utils/hooks/useLocalization' diff --git a/ui/src/components/layouts/AuthLayout/Side.tsx b/ui/src/components/layouts/AuthLayout/Side.tsx index 7e3b2b47..8f06e982 100644 --- a/ui/src/components/layouts/AuthLayout/Side.tsx +++ b/ui/src/components/layouts/AuthLayout/Side.tsx @@ -2,7 +2,7 @@ import { cloneElement } from 'react' import Avatar from '@/components/ui/Avatar' import Logo from '@/components/template/Logo' import { APP_NAME } from '@/constants/app.constant' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import { useLocalization } from '@/utils/hooks/useLocalization' interface SideProps extends CommonProps { diff --git a/ui/src/components/layouts/AuthLayout/Simple.tsx b/ui/src/components/layouts/AuthLayout/Simple.tsx index f2ff3c93..157902c9 100644 --- a/ui/src/components/layouts/AuthLayout/Simple.tsx +++ b/ui/src/components/layouts/AuthLayout/Simple.tsx @@ -3,11 +3,11 @@ import Container from '@/components/shared/Container' import Card from '@/components/ui/Card' import Logo from '@/components/template/Logo' import type { ReactNode, ReactElement } from 'react' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import { FaArrowLeft, FaCheck } from 'react-icons/fa'; import { Avatar, Select } from '@/components/ui' import { useStoreActions, useStoreState } from '@/store' -import appConfig from '@/configs/app.config' +import appConfig from '@/proxy/configs/app.config' import dayjs from 'dayjs' import { components } from 'react-select' import { ROUTES_ENUM } from '@/routes/route.constant' diff --git a/ui/src/components/route/AppRoute.tsx b/ui/src/components/route/AppRoute.tsx index c421b974..d2f7e348 100644 --- a/ui/src/components/route/AppRoute.tsx +++ b/ui/src/components/route/AppRoute.tsx @@ -1,7 +1,7 @@ import { useEffect, useCallback } from 'react' import { useStoreState, useStoreActions } from '@/store' import { useLocation } from 'react-router-dom' -import type { LayoutType } from '@/@types/theme' +import type { LayoutType } from '@/proxy/theme/models' import type { ComponentType } from 'react' export type AppRouteProps = { diff --git a/ui/src/components/route/ProtectedRoute.tsx b/ui/src/components/route/ProtectedRoute.tsx index 6011f8f0..2f6fc786 100644 --- a/ui/src/components/route/ProtectedRoute.tsx +++ b/ui/src/components/route/ProtectedRoute.tsx @@ -1,4 +1,4 @@ -import appConfig from '@/configs/app.config' +import appConfig from '@/proxy/configs/app.config' import { REDIRECT_URL_KEY } from '@/constants/app.constant' import { Navigate, Outlet, useLocation } from 'react-router-dom' import useAuth from '@/utils/hooks/useAuth' diff --git a/ui/src/components/route/PublicRoute.tsx b/ui/src/components/route/PublicRoute.tsx index a9bbf88e..ccf1b44a 100644 --- a/ui/src/components/route/PublicRoute.tsx +++ b/ui/src/components/route/PublicRoute.tsx @@ -1,5 +1,5 @@ import { Navigate, Outlet } from 'react-router-dom' -import appConfig from '@/configs/app.config' +import appConfig from '@/proxy/configs/app.config' import useAuth from '@/utils/hooks/useAuth' const { authenticatedEntryPath } = appConfig diff --git a/ui/src/components/shared/ActionLink.tsx b/ui/src/components/shared/ActionLink.tsx index 2ddbc121..9acbeafa 100644 --- a/ui/src/components/shared/ActionLink.tsx +++ b/ui/src/components/shared/ActionLink.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames' import useThemeClass from '@/utils/hooks/useThemeClass' import { Link } from 'react-router-dom' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import type { ComponentPropsWithoutRef } from 'react' interface ActionLink extends CommonProps, ComponentPropsWithoutRef<'a'> { diff --git a/ui/src/components/shared/Affix.tsx b/ui/src/components/shared/Affix.tsx index 8fae43fb..9821e818 100644 --- a/ui/src/components/shared/Affix.tsx +++ b/ui/src/components/shared/Affix.tsx @@ -1,6 +1,6 @@ import { useEffect, createRef } from 'react' import classNames from 'classnames' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' type AffixStyles = { position: string diff --git a/ui/src/components/shared/AuthorityCheck.tsx b/ui/src/components/shared/AuthorityCheck.tsx index 91dc66ae..08811d7b 100644 --- a/ui/src/components/shared/AuthorityCheck.tsx +++ b/ui/src/components/shared/AuthorityCheck.tsx @@ -1,5 +1,5 @@ import useAuthority from '@/utils/hooks/useAuthority' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' interface AuthorityCheckProps extends CommonProps { userAuthority: string[] diff --git a/ui/src/components/shared/Container.tsx b/ui/src/components/shared/Container.tsx index 4e4f3a68..7014e764 100644 --- a/ui/src/components/shared/Container.tsx +++ b/ui/src/components/shared/Container.tsx @@ -1,6 +1,6 @@ import { forwardRef, ElementType } from 'react' import classNames from 'classnames' -import { CommonProps } from '@/@types/common' +import { CommonProps } from '@/proxy/common' interface ContainerProps extends CommonProps { asElement?: ElementType diff --git a/ui/src/components/shared/IconText.tsx b/ui/src/components/shared/IconText.tsx index 9fa38c75..c3bd0892 100644 --- a/ui/src/components/shared/IconText.tsx +++ b/ui/src/components/shared/IconText.tsx @@ -1,5 +1,5 @@ import classNames from 'classnames' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import type { ReactNode, ElementType } from 'react' export interface IconTextProps extends CommonProps { diff --git a/ui/src/components/shared/Loading.tsx b/ui/src/components/shared/Loading.tsx index f2035a8b..ad043ad8 100644 --- a/ui/src/components/shared/Loading.tsx +++ b/ui/src/components/shared/Loading.tsx @@ -1,6 +1,6 @@ import Spinner from '@/components/ui/Spinner' import classNames from 'classnames' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import type { ElementType, ReactNode } from 'react' interface BaseLoadingProps extends CommonProps { diff --git a/ui/src/components/shared/NavToggle.tsx b/ui/src/components/shared/NavToggle.tsx index 39f3bb4b..7d5d876b 100644 --- a/ui/src/components/shared/NavToggle.tsx +++ b/ui/src/components/shared/NavToggle.tsx @@ -1,5 +1,5 @@ import { FaAlignLeft, FaAlignJustify } from 'react-icons/fa' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' export interface NavToggleProps extends CommonProps { toggled?: boolean diff --git a/ui/src/components/shared/PermissionCheck.tsx b/ui/src/components/shared/PermissionCheck.tsx index 6f761cdf..66648484 100644 --- a/ui/src/components/shared/PermissionCheck.tsx +++ b/ui/src/components/shared/PermissionCheck.tsx @@ -1,4 +1,4 @@ -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import { usePermission } from '@/utils/hooks/usePermission' interface PermissionCheckProps extends CommonProps { diff --git a/ui/src/components/shared/SegmentItemOption.tsx b/ui/src/components/shared/SegmentItemOption.tsx index 05a8cc88..2b67b596 100644 --- a/ui/src/components/shared/SegmentItemOption.tsx +++ b/ui/src/components/shared/SegmentItemOption.tsx @@ -2,7 +2,7 @@ import { forwardRef } from 'react' import classNames from 'classnames' import useThemeClass from '@/utils/hooks/useThemeClass' import { FaCheckCircle } from 'react-icons/fa' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' interface SegmentItemOptionProps extends CommonProps { active: boolean diff --git a/ui/src/components/shared/StickyFooter.tsx b/ui/src/components/shared/StickyFooter.tsx index 0f03d967..9b908a9d 100644 --- a/ui/src/components/shared/StickyFooter.tsx +++ b/ui/src/components/shared/StickyFooter.tsx @@ -1,6 +1,6 @@ import { useRef, useState, useEffect } from 'react' import classNames from 'classnames' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import type { HTMLAttributes } from 'react' interface StickyFooterProps diff --git a/ui/src/components/shared/SvgIcon.tsx b/ui/src/components/shared/SvgIcon.tsx index dba6418d..3a11bf63 100644 --- a/ui/src/components/shared/SvgIcon.tsx +++ b/ui/src/components/shared/SvgIcon.tsx @@ -1,6 +1,6 @@ import { forwardRef } from 'react' import classNames from 'classnames' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' const SvgIcon = forwardRef((props, ref) => { const { children, className, ...rest } = props diff --git a/ui/src/components/template/Header.tsx b/ui/src/components/template/Header.tsx index 24cd7acf..42fdec8c 100644 --- a/ui/src/components/template/Header.tsx +++ b/ui/src/components/template/Header.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames' import { HEADER_HEIGHT_CLASS } from '@/constants/theme.constant' import type { ReactNode } from 'react' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' interface HeaderProps extends CommonProps { headerStart?: ReactNode diff --git a/ui/src/components/template/HorizontalMenuContent/HorizontalMenuContent.tsx b/ui/src/components/template/HorizontalMenuContent/HorizontalMenuContent.tsx index 29a76083..20273275 100644 --- a/ui/src/components/template/HorizontalMenuContent/HorizontalMenuContent.tsx +++ b/ui/src/components/template/HorizontalMenuContent/HorizontalMenuContent.tsx @@ -1,4 +1,4 @@ -import type { NavMode } from '@/@types/theme' +import type { NavMode } from '@/proxy/theme/models' import { PermissionCheck } from '@/components/shared' import Dropdown from '@/components/ui/Dropdown' import { diff --git a/ui/src/components/template/HorizontalMenuContent/HorizontalMenuIcon.tsx b/ui/src/components/template/HorizontalMenuContent/HorizontalMenuIcon.tsx index 828f05a8..4a2f3c94 100644 --- a/ui/src/components/template/HorizontalMenuContent/HorizontalMenuIcon.tsx +++ b/ui/src/components/template/HorizontalMenuContent/HorizontalMenuIcon.tsx @@ -1,4 +1,4 @@ -import navigationIcon from '@/configs/navigation-icon.config' +import navigationIcon from '@/proxy/menus/navigation-icon.config' import type { ElementType, ComponentPropsWithRef } from 'react' import React from 'react' import { FaQuestionCircle } from 'react-icons/fa' diff --git a/ui/src/components/template/HorizontalMenuContent/HorizontalMenuItem.tsx b/ui/src/components/template/HorizontalMenuContent/HorizontalMenuItem.tsx index dd662eb7..c904abd9 100644 --- a/ui/src/components/template/HorizontalMenuContent/HorizontalMenuItem.tsx +++ b/ui/src/components/template/HorizontalMenuContent/HorizontalMenuItem.tsx @@ -1,7 +1,7 @@ -import navigationIcon from '@/configs/navigation-icon.config' +import navigationIcon from '@/proxy/menus/navigation-icon.config' import MenuItem from '@/components/ui/MenuItem' import HorizontalMenuNavLink from './HorizontalMenuNavLink' -import type { NavMode } from '@/@types/theme' +import type { NavMode } from '@/proxy/theme/models' import React from 'react' import { FaQuestionCircle } from 'react-icons/fa' diff --git a/ui/src/components/template/LanguageSelector.tsx b/ui/src/components/template/LanguageSelector.tsx index f93643f9..70dc1c9c 100644 --- a/ui/src/components/template/LanguageSelector.tsx +++ b/ui/src/components/template/LanguageSelector.tsx @@ -7,8 +7,8 @@ import withHeaderItem from '@/utils/hoc/withHeaderItem' import { useStoreState, useStoreActions } from '@/store' import dayjs from 'dayjs' import { FaCheck } from 'react-icons/fa' -import type { CommonProps } from '@/@types/common' -import appConfig from '@/configs/app.config' +import type { CommonProps } from '@/proxy/common' +import appConfig from '@/proxy/configs/app.config' import { dateLocales } from '@/constants/dateLocales.constant' import { Tooltip } from '../ui' import { useLocalization } from '@/utils/hooks/useLocalization' diff --git a/ui/src/components/template/Logo.tsx b/ui/src/components/template/Logo.tsx index fdb61d08..8818bbbf 100644 --- a/ui/src/components/template/Logo.tsx +++ b/ui/src/components/template/Logo.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames' import { APP_NAME } from '@/constants/app.constant' -import type { CommonProps } from '@/@types/common' -import { Mode } from '@/@types/theme' +import type { CommonProps } from '@/proxy/common' +import { Mode } from '@/proxy/theme/models' import { Link } from 'react-router-dom' import { ROUTES_ENUM } from '@/routes/route.constant' diff --git a/ui/src/components/template/PageContainer.tsx b/ui/src/components/template/PageContainer.tsx index ec5f3a95..8478aa0d 100644 --- a/ui/src/components/template/PageContainer.tsx +++ b/ui/src/components/template/PageContainer.tsx @@ -6,8 +6,8 @@ import { PAGE_CONTAINER_GUTTER_Y, } from '@/constants/theme.constant' import Footer from '@/components/template/Footer' -import type { CommonProps } from '@/@types/common' -import type { Meta } from '@/@types/routes' +import type { CommonProps } from '@/proxy/common' +import type { Meta } from '@/proxy/routes/routes' import type { ElementType, ComponentPropsWithRef } from 'react' import type { FooterPageContainerType } from '@/components/template/Footer' diff --git a/ui/src/components/template/SecondaryHeader.tsx b/ui/src/components/template/SecondaryHeader.tsx index 9c46d34a..a154c40d 100644 --- a/ui/src/components/template/SecondaryHeader.tsx +++ b/ui/src/components/template/SecondaryHeader.tsx @@ -3,7 +3,7 @@ import HorizontalMenuContent from '@/components/template/HorizontalMenuContent' import { NAV_MODE_THEMED } from '@/constants/theme.constant' import useResponsive from '@/utils/hooks/useResponsive' import { useStoreState } from '@/store' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' interface SecondaryHeaderProps extends CommonProps { contained: boolean diff --git a/ui/src/components/template/SideNavToggle.tsx b/ui/src/components/template/SideNavToggle.tsx index e92aaf7a..4cf8b444 100644 --- a/ui/src/components/template/SideNavToggle.tsx +++ b/ui/src/components/template/SideNavToggle.tsx @@ -2,7 +2,7 @@ import withHeaderItem from '@/utils/hoc/withHeaderItem' import { useStoreState, useStoreActions } from '@/store' import useResponsive from '@/utils/hooks/useResponsive' import NavToggle from '@/components/shared/NavToggle' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' const _SideNavToggle = ({ className }: CommonProps) => { const sideNavCollapse = useStoreState((state) => state.theme.layout.sideNavCollapse) diff --git a/ui/src/components/template/SidePanel/SidePanel.tsx b/ui/src/components/template/SidePanel/SidePanel.tsx index 2973cb84..b1036221 100644 --- a/ui/src/components/template/SidePanel/SidePanel.tsx +++ b/ui/src/components/template/SidePanel/SidePanel.tsx @@ -3,7 +3,7 @@ import Drawer from '@/components/ui/Drawer' import SidePanelContent, { SidePanelContentProps } from './SidePanelContent' import withHeaderItem from '@/utils/hoc/withHeaderItem' import { useStoreState, useStoreActions } from '@/store' -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import { useLocalization } from '@/utils/hooks/useLocalization' import { FcEngineering } from 'react-icons/fc' import { Tooltip } from '@/components/ui' diff --git a/ui/src/components/template/StackedSideNav/StackedSideNavMini.tsx b/ui/src/components/template/StackedSideNav/StackedSideNavMini.tsx index 27f94c27..0890afe2 100644 --- a/ui/src/components/template/StackedSideNav/StackedSideNavMini.tsx +++ b/ui/src/components/template/StackedSideNav/StackedSideNavMini.tsx @@ -1,11 +1,11 @@ -import type { CommonProps } from '@/@types/common' -import type { NavigationTree } from '@/@types/navigation' -import type { Direction, Mode, NavMode } from '@/@types/theme' +import type { CommonProps } from '@/proxy/common' +import type { NavigationTree } from '@/proxy/menus/navigation' +import type { Direction, Mode, NavMode } from '@/proxy/theme/models' import { PermissionCheck } from '@/components/shared' import Logo from '@/components/template/Logo' import Menu from '@/components/ui/Menu' import ScrollBar from '@/components/ui/ScrollBar' -import navigationIcon from '@/configs/navigation-icon.config' +import navigationIcon from '@/proxy/menus/navigation-icon.config' import { NAV_ITEM_TYPE_ITEM } from '@/constants/navigation.constant' import { NAV_MODE_DARK, diff --git a/ui/src/components/template/StackedSideNav/StackedSideNavSecondary.tsx b/ui/src/components/template/StackedSideNav/StackedSideNavSecondary.tsx index afcbba01..1fdc968c 100644 --- a/ui/src/components/template/StackedSideNav/StackedSideNavSecondary.tsx +++ b/ui/src/components/template/StackedSideNav/StackedSideNavSecondary.tsx @@ -4,8 +4,8 @@ import classNames from 'classnames' import { HEADER_HEIGHT_CLASS, DIR_LTR, DIR_RTL } from '@/constants/theme.constant' import VerticalMenuContent from '@/components/template/VerticalMenuContent' import { FaArrowLeft, FaArrowRight } from 'react-icons/fa' -import type { NavigationTree } from '@/@types/navigation' -import type { Direction, NavMode } from '@/@types/theme' +import type { NavigationTree } from '@/proxy/menus/navigation' +import type { Direction, NavMode } from '@/proxy/theme/models' type StackedSideNavSecondaryProps = { className?: string diff --git a/ui/src/components/template/Theme.tsx b/ui/src/components/template/Theme.tsx index 0b6b4609..9ecab660 100644 --- a/ui/src/components/template/Theme.tsx +++ b/ui/src/components/template/Theme.tsx @@ -1,6 +1,6 @@ -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import ConfigProvider from '@/components/ui/ConfigProvider' -import { themeConfig } from '@/configs/theme.config' +import { themeConfig } from '@/proxy/theme/theme.config' import { useStoreActions, useStoreState } from '@/store' import useDarkMode from '@/utils/hooks/useDarkmode' import useNotification from '@/utils/hooks/useNotification' diff --git a/ui/src/components/template/ThemeConfigurator/CopyButton.tsx b/ui/src/components/template/ThemeConfigurator/CopyButton.tsx index 411518f8..ab06708d 100644 --- a/ui/src/components/template/ThemeConfigurator/CopyButton.tsx +++ b/ui/src/components/template/ThemeConfigurator/CopyButton.tsx @@ -1,7 +1,7 @@ import Notification from '@/components/ui/Notification' import Button from '@/components/ui/Button' import toast from '@/components/ui/toast' -import { themeConfig } from '@/configs/theme.config' +import { themeConfig } from '@/proxy/theme/theme.config' import { useStoreState } from '@/store' const CopyButton = () => { diff --git a/ui/src/components/template/ThemeConfigurator/DirectionSwitcher.tsx b/ui/src/components/template/ThemeConfigurator/DirectionSwitcher.tsx index 6b4d9db4..e7526755 100644 --- a/ui/src/components/template/ThemeConfigurator/DirectionSwitcher.tsx +++ b/ui/src/components/template/ThemeConfigurator/DirectionSwitcher.tsx @@ -2,7 +2,7 @@ import Button from '@/components/ui/Button' import InputGroup from '@/components/ui/InputGroup' import useDirection from '@/utils/hooks/useDirection' import { THEME_ENUM } from '@/constants/theme.constant' -import type { Direction } from '@/@types/theme' +import type { Direction } from '@/proxy/theme/models' const dirList = [ { value: THEME_ENUM.DIR_LTR, label: 'LTR' }, diff --git a/ui/src/components/template/ThemeConfigurator/LayoutSwitcher.tsx b/ui/src/components/template/ThemeConfigurator/LayoutSwitcher.tsx index 59d1ad28..4b888c4e 100644 --- a/ui/src/components/template/ThemeConfigurator/LayoutSwitcher.tsx +++ b/ui/src/components/template/ThemeConfigurator/LayoutSwitcher.tsx @@ -13,7 +13,7 @@ import { LAYOUT_TYPE_DECKED, LAYOUT_TYPE_BLANK, } from '@/constants/theme.constant' -import type { LayoutType } from '@/@types/theme' +import type { LayoutType } from '@/proxy/theme/models' import { useLocalization } from '@/utils/hooks/useLocalization' const layouts = [ diff --git a/ui/src/components/template/ThemeConfigurator/ThemeSwitcher.tsx b/ui/src/components/template/ThemeConfigurator/ThemeSwitcher.tsx index 0fbd3523..6bc8a1a3 100644 --- a/ui/src/components/template/ThemeConfigurator/ThemeSwitcher.tsx +++ b/ui/src/components/template/ThemeConfigurator/ThemeSwitcher.tsx @@ -4,7 +4,7 @@ import Badge from '@/components/ui/Badge' import { useStoreState, useStoreActions } from '@/store' import { FaCheck } from 'react-icons/fa' import { components } from 'react-select' -import type { ColorLevel } from '@/@types/theme' +import type { ColorLevel } from '@/proxy/theme/models' import type { ControlProps, OptionProps } from 'react-select' const { Control } = components diff --git a/ui/src/components/template/UserDropdown.tsx b/ui/src/components/template/UserDropdown.tsx index 9d17ca32..fbeb587f 100644 --- a/ui/src/components/template/UserDropdown.tsx +++ b/ui/src/components/template/UserDropdown.tsx @@ -1,4 +1,4 @@ -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import Dropdown from '@/components/ui/Dropdown' import { ROUTES_ENUM } from '@/routes/route.constant' import { useStoreActions, useStoreState } from '@/store' diff --git a/ui/src/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.tsx b/ui/src/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.tsx index a43d3f39..f07f8cb8 100644 --- a/ui/src/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.tsx +++ b/ui/src/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.tsx @@ -1,6 +1,6 @@ -import type { CommonProps } from '@/@types/common' -import type { NavigationTree } from '@/@types/navigation' -import type { Direction } from '@/@types/theme' +import type { CommonProps } from '@/proxy/common' +import type { NavigationTree } from '@/proxy/menus/navigation' +import type { Direction } from '@/proxy/theme/models' import { PermissionCheck } from '@/components/shared' import Dropdown from '@/components/ui/Dropdown' import Menu from '@/components/ui/Menu' diff --git a/ui/src/components/template/VerticalMenuContent/VerticalMenuContent.tsx b/ui/src/components/template/VerticalMenuContent/VerticalMenuContent.tsx index 4ce2cda9..ade14fb1 100644 --- a/ui/src/components/template/VerticalMenuContent/VerticalMenuContent.tsx +++ b/ui/src/components/template/VerticalMenuContent/VerticalMenuContent.tsx @@ -1,8 +1,8 @@ -import type { NavigationTree } from '@/@types/navigation' -import { Direction, NavMode } from '@/@types/theme' +import type { NavigationTree } from '@/proxy/menus/navigation' +import { Direction, NavMode } from '@/proxy/theme/models' import { PermissionCheck } from '@/components/shared' import Menu from '@/components/ui/Menu' -import { themeConfig } from '@/configs/theme.config' +import { themeConfig } from '@/proxy/theme/theme.config' import { NAV_ITEM_TYPE_COLLAPSE, NAV_ITEM_TYPE_ITEM, diff --git a/ui/src/components/template/VerticalMenuContent/VerticalMenuIcon.tsx b/ui/src/components/template/VerticalMenuContent/VerticalMenuIcon.tsx index 6cfcd588..3e51b867 100644 --- a/ui/src/components/template/VerticalMenuContent/VerticalMenuIcon.tsx +++ b/ui/src/components/template/VerticalMenuContent/VerticalMenuIcon.tsx @@ -1,4 +1,4 @@ -import navigationIcon from '@/configs/navigation-icon.config' +import navigationIcon from '@/proxy/menus/navigation-icon.config' import type { ElementType, ComponentPropsWithRef } from 'react' import React from 'react' diff --git a/ui/src/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx b/ui/src/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx index 66f87635..5fd0dde2 100644 --- a/ui/src/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx +++ b/ui/src/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx @@ -2,9 +2,9 @@ import Tooltip from '@/components/ui/Tooltip' import Menu from '@/components/ui/Menu' import VerticalMenuIcon from './VerticalMenuIcon' import { Link } from 'react-router-dom' -import type { CommonProps } from '@/@types/common' -import type { Direction } from '@/@types/theme' -import type { NavigationTree } from '@/@types/navigation' +import type { CommonProps } from '@/proxy/common' +import type { Direction } from '@/proxy/theme/models' +import type { NavigationTree } from '@/proxy/menus/navigation' import { PermissionCheck } from '@/components/shared' const { MenuItem } = Menu diff --git a/ui/src/configs/app.config.ts b/ui/src/configs/app.config.ts deleted file mode 100644 index 0ffabdfe..00000000 --- a/ui/src/configs/app.config.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ROUTES_ENUM } from "@/routes/route.constant" - -export type AppConfig = { - baseUrl: string - apiPrefix: string - authenticatedEntryPath: string - unAuthenticatedEntryPath: string - tourPath: string - locale: string - uiVersion: string | undefined -} - -const appConfig: AppConfig = { - baseUrl: import.meta.env.VITE_API_URL, - apiPrefix: '/api', - authenticatedEntryPath: ROUTES_ENUM.protected.dashboard, - unAuthenticatedEntryPath: ROUTES_ENUM.authenticated.login, - tourPath: '/', - locale: 'en', - uiVersion : undefined -} - -export default appConfig diff --git a/ui/src/configs/theme.config.ts b/ui/src/configs/theme.config.ts deleted file mode 100644 index 06d28f4e..00000000 --- a/ui/src/configs/theme.config.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { THEME_ENUM } from '@/constants/theme.constant' -import { - Direction, - Mode, - ColorLevel, - NavMode, - ControlSize, - LayoutType, -} from '@/@types/theme' - -export type ThemeConfig = { - themeColor: string - direction: Direction - mode: Mode - primaryColorLevel: ColorLevel - panelExpand: boolean - navMode: NavMode - controlSize: ControlSize - cardBordered: boolean - layout: { - type: LayoutType - sideNavCollapse: boolean - } -} - -/** - * Since some configurations need to be match with specific themes, - * we recommend to use the configuration that generated from demo. - */ -export const themeConfig: ThemeConfig = { - themeColor: 'indigo', - direction: THEME_ENUM.DIR_LTR, - mode: THEME_ENUM.MODE_LIGHT, - primaryColorLevel: 600, - cardBordered: true, - panelExpand: false, - controlSize: 'md', - navMode: THEME_ENUM.NAV_MODE_LIGHT, - layout: { - type: THEME_ENUM.LAYOUT_TYPE_SIMPLE, - sideNavCollapse: false, - }, -} diff --git a/ui/src/constants/countries.constant.ts b/ui/src/constants/countries.constant.ts deleted file mode 100644 index 6f444663..00000000 --- a/ui/src/constants/countries.constant.ts +++ /dev/null @@ -1,1212 +0,0 @@ -export const countryList = [ - { - label: 'Afghanistan', - dialCode: '+93', - value: 'AF', - }, - { - label: 'Aland Islands', - dialCode: '+358', - value: 'AX', - }, - { - label: 'Albania', - dialCode: '+355', - value: 'AL', - }, - { - label: 'Algeria', - dialCode: '+213', - value: 'DZ', - }, - { - label: 'AmericanSamoa', - dialCode: '+1684', - value: 'AS', - }, - { - label: 'Andorra', - dialCode: '+376', - value: 'AD', - }, - { - label: 'Angola', - dialCode: '+244', - value: 'AO', - }, - { - label: 'Anguilla', - dialCode: '+1264', - value: 'AI', - }, - { - label: 'Antarctica', - dialCode: '+672', - value: 'AQ', - }, - { - label: 'Antigua and Barbuda', - dialCode: '+1268', - value: 'AG', - }, - { - label: 'Argentina', - dialCode: '+54', - value: 'AR', - }, - { - label: 'Armenia', - dialCode: '+374', - value: 'AM', - }, - { - label: 'Aruba', - dialCode: '+297', - value: 'AW', - }, - { - label: 'Australia', - dialCode: '+61', - value: 'AU', - }, - { - label: 'Austria', - dialCode: '+43', - value: 'AT', - }, - { - label: 'Azerbaijan', - dialCode: '+994', - value: 'AZ', - }, - { - label: 'Bahamas', - dialCode: '+1242', - value: 'BS', - }, - { - label: 'Bahrain', - dialCode: '+973', - value: 'BH', - }, - { - label: 'Bangladesh', - dialCode: '+880', - value: 'BD', - }, - { - label: 'Barbados', - dialCode: '+1246', - value: 'BB', - }, - { - label: 'Belarus', - dialCode: '+375', - value: 'BY', - }, - { - label: 'Belgium', - dialCode: '+32', - value: 'BE', - }, - { - label: 'Belize', - dialCode: '+501', - value: 'BZ', - }, - { - label: 'Benin', - dialCode: '+229', - value: 'BJ', - }, - { - label: 'Bermuda', - dialCode: '+1441', - value: 'BM', - }, - { - label: 'Bhutan', - dialCode: '+975', - value: 'BT', - }, - { - label: 'Bolivia, Plurinational State of', - dialCode: '+591', - value: 'BO', - }, - { - label: 'Bosnia and Herzegovina', - dialCode: '+387', - value: 'BA', - }, - { - label: 'Botswana', - dialCode: '+267', - value: 'BW', - }, - { - label: 'Brazil', - dialCode: '+55', - value: 'BR', - }, - { - label: 'British Indian Ocean Territory', - dialCode: '+246', - value: 'IO', - }, - { - label: 'Brunei Darussalam', - dialCode: '+673', - value: 'BN', - }, - { - label: 'Bulgaria', - dialCode: '+359', - value: 'BG', - }, - { - label: 'Burkina Faso', - dialCode: '+226', - value: 'BF', - }, - { - label: 'Burundi', - dialCode: '+257', - value: 'BI', - }, - { - label: 'Cambodia', - dialCode: '+855', - value: 'KH', - }, - { - label: 'Cameroon', - dialCode: '+237', - value: 'CM', - }, - { - label: 'Canada', - dialCode: '+1', - value: 'CA', - }, - { - label: 'Cape Verde', - dialCode: '+238', - value: 'CV', - }, - { - label: 'Cayman Islands', - dialCode: '+ 345', - value: 'KY', - }, - { - label: 'Central African Republic', - dialCode: '+236', - value: 'CF', - }, - { - label: 'Chad', - dialCode: '+235', - value: 'TD', - }, - { - label: 'Chile', - dialCode: '+56', - value: 'CL', - }, - { - label: 'China', - dialCode: '+86', - value: 'CN', - }, - { - label: 'Christmas Island', - dialCode: '+61', - value: 'CX', - }, - { - label: 'Cocos (Keeling) Islands', - dialCode: '+61', - value: 'CC', - }, - { - label: 'Colombia', - dialCode: '+57', - value: 'CO', - }, - { - label: 'Comoros', - dialCode: '+269', - value: 'KM', - }, - { - label: 'Congo', - dialCode: '+242', - value: 'CG', - }, - { - label: 'Congo, The Democratic Republic of the Congo', - dialCode: '+243', - value: 'CD', - }, - { - label: 'Cook Islands', - dialCode: '+682', - value: 'CK', - }, - { - label: 'Costa Rica', - dialCode: '+506', - value: 'CR', - }, - { - label: "Cote d'Ivoire", - dialCode: '+225', - value: 'CI', - }, - { - label: 'Croatia', - dialCode: '+385', - value: 'HR', - }, - { - label: 'Cuba', - dialCode: '+53', - value: 'CU', - }, - { - label: 'Cyprus', - dialCode: '+357', - value: 'CY', - }, - { - label: 'Czech Republic', - dialCode: '+420', - value: 'CZ', - }, - { - label: 'Denmark', - dialCode: '+45', - value: 'DK', - }, - { - label: 'Djibouti', - dialCode: '+253', - value: 'DJ', - }, - { - label: 'Dominica', - dialCode: '+1767', - value: 'DM', - }, - { - label: 'Dominican Republic', - dialCode: '+1849', - value: 'DO', - }, - { - label: 'Ecuador', - dialCode: '+593', - value: 'EC', - }, - { - label: 'Egypt', - dialCode: '+20', - value: 'EG', - }, - { - label: 'El Salvador', - dialCode: '+503', - value: 'SV', - }, - { - label: 'Equatorial Guinea', - dialCode: '+240', - value: 'GQ', - }, - { - label: 'Eritrea', - dialCode: '+291', - value: 'ER', - }, - { - label: 'Estonia', - dialCode: '+372', - value: 'EE', - }, - { - label: 'Ethiopia', - dialCode: '+251', - value: 'ET', - }, - { - label: 'Falkland Islands (Malvinas)', - dialCode: '+500', - value: 'FK', - }, - { - label: 'Faroe Islands', - dialCode: '+298', - value: 'FO', - }, - { - label: 'Fiji', - dialCode: '+679', - value: 'FJ', - }, - { - label: 'Finland', - dialCode: '+358', - value: 'FI', - }, - { - label: 'France', - dialCode: '+33', - value: 'FR', - }, - { - label: 'French Guiana', - dialCode: '+594', - value: 'GF', - }, - { - label: 'French Polynesia', - dialCode: '+689', - value: 'PF', - }, - { - label: 'Gabon', - dialCode: '+241', - value: 'GA', - }, - { - label: 'Gambia', - dialCode: '+220', - value: 'GM', - }, - { - label: 'Georgia', - dialCode: '+995', - value: 'GE', - }, - { - label: 'Germany', - dialCode: '+49', - value: 'DE', - }, - { - label: 'Ghana', - dialCode: '+233', - value: 'GH', - }, - { - label: 'Gibraltar', - dialCode: '+350', - value: 'GI', - }, - { - label: 'Greece', - dialCode: '+30', - value: 'GR', - }, - { - label: 'Greenland', - dialCode: '+299', - value: 'GL', - }, - { - label: 'Grenada', - dialCode: '+1473', - value: 'GD', - }, - { - label: 'Guadeloupe', - dialCode: '+590', - value: 'GP', - }, - { - label: 'Guam', - dialCode: '+1671', - value: 'GU', - }, - { - label: 'Guatemala', - dialCode: '+502', - value: 'GT', - }, - { - label: 'Guernsey', - dialCode: '+44', - value: 'GG', - }, - { - label: 'Guinea', - dialCode: '+224', - value: 'GN', - }, - { - label: 'Guinea-Bissau', - dialCode: '+245', - value: 'GW', - }, - { - label: 'Guyana', - dialCode: '+595', - value: 'GY', - }, - { - label: 'Haiti', - dialCode: '+509', - value: 'HT', - }, - { - label: 'Holy See (Vatican City State)', - dialCode: '+379', - value: 'VA', - }, - { - label: 'Honduras', - dialCode: '+504', - value: 'HN', - }, - { - label: 'Hong Kong', - dialCode: '+852', - value: 'HK', - }, - { - label: 'Hungary', - dialCode: '+36', - value: 'HU', - }, - { - label: 'Iceland', - dialCode: '+354', - value: 'IS', - }, - { - label: 'India', - dialCode: '+91', - value: 'IN', - }, - { - label: 'Indonesia', - dialCode: '+62', - value: 'ID', - }, - { - label: 'Iran, Islamic Republic of Persian Gulf', - dialCode: '+98', - value: 'IR', - }, - { - label: 'Iraq', - dialCode: '+964', - value: 'IQ', - }, - { - label: 'Ireland', - dialCode: '+353', - value: 'IE', - }, - { - label: 'Isle of Man', - dialCode: '+44', - value: 'IM', - }, - { - label: 'Israel', - dialCode: '+972', - value: 'IL', - }, - { - label: 'Italy', - dialCode: '+39', - value: 'IT', - }, - { - label: 'Jamaica', - dialCode: '+1876', - value: 'JM', - }, - { - label: 'Japan', - dialCode: '+81', - value: 'JP', - }, - { - label: 'Jersey', - dialCode: '+44', - value: 'JE', - }, - { - label: 'Jordan', - dialCode: '+962', - value: 'JO', - }, - { - label: 'Kazakhstan', - dialCode: '+77', - value: 'KZ', - }, - { - label: 'Kenya', - dialCode: '+254', - value: 'KE', - }, - { - label: 'Kiribati', - dialCode: '+686', - value: 'KI', - }, - { - label: "Korea, Democratic People's Republic of Korea", - dialCode: '+850', - value: 'KP', - }, - { - label: 'Korea, Republic of South Korea', - dialCode: '+82', - value: 'KR', - }, - { - label: 'Kuwait', - dialCode: '+965', - value: 'KW', - }, - { - label: 'Kyrgyzstan', - dialCode: '+996', - value: 'KG', - }, - { - label: 'Laos', - dialCode: '+856', - value: 'LA', - }, - { - label: 'Latvia', - dialCode: '+371', - value: 'LV', - }, - { - label: 'Lebanon', - dialCode: '+961', - value: 'LB', - }, - { - label: 'Lesotho', - dialCode: '+266', - value: 'LS', - }, - { - label: 'Liberia', - dialCode: '+231', - value: 'LR', - }, - { - label: 'Libyan Arab Jamahiriya', - dialCode: '+218', - value: 'LY', - }, - { - label: 'Liechtenstein', - dialCode: '+423', - value: 'LI', - }, - { - label: 'Lithuania', - dialCode: '+370', - value: 'LT', - }, - { - label: 'Luxembourg', - dialCode: '+352', - value: 'LU', - }, - { - label: 'Macao', - dialCode: '+853', - value: 'MO', - }, - { - label: 'Macedonia', - dialCode: '+389', - value: 'MK', - }, - { - label: 'Madagascar', - dialCode: '+261', - value: 'MG', - }, - { - label: 'Malawi', - dialCode: '+265', - value: 'MW', - }, - { - label: 'Malaysia', - dialCode: '+60', - value: 'MY', - }, - { - label: 'Maldives', - dialCode: '+960', - value: 'MV', - }, - { - label: 'Mali', - dialCode: '+223', - value: 'ML', - }, - { - label: 'Malta', - dialCode: '+356', - value: 'MT', - }, - { - label: 'Marshall Islands', - dialCode: '+692', - value: 'MH', - }, - { - label: 'Martinique', - dialCode: '+596', - value: 'MQ', - }, - { - label: 'Mauritania', - dialCode: '+222', - value: 'MR', - }, - { - label: 'Mauritius', - dialCode: '+230', - value: 'MU', - }, - { - label: 'Mayotte', - dialCode: '+262', - value: 'YT', - }, - { - label: 'Mexico', - dialCode: '+52', - value: 'MX', - }, - { - label: 'Micronesia, Federated States of Micronesia', - dialCode: '+691', - value: 'FM', - }, - { - label: 'Moldova', - dialCode: '+373', - value: 'MD', - }, - { - label: 'Monaco', - dialCode: '+377', - value: 'MC', - }, - { - label: 'Mongolia', - dialCode: '+976', - value: 'MN', - }, - { - label: 'Montenegro', - dialCode: '+382', - value: 'ME', - }, - { - label: 'Montserrat', - dialCode: '+1664', - value: 'MS', - }, - { - label: 'Morocco', - dialCode: '+212', - value: 'MA', - }, - { - label: 'Mozambique', - dialCode: '+258', - value: 'MZ', - }, - { - label: 'Myanmar', - dialCode: '+95', - value: 'MM', - }, - { - label: 'Namibia', - dialCode: '+264', - value: 'NA', - }, - { - label: 'Nauru', - dialCode: '+674', - value: 'NR', - }, - { - label: 'Nepal', - dialCode: '+977', - value: 'NP', - }, - { - label: 'Netherlands', - dialCode: '+31', - value: 'NL', - }, - { - label: 'Netherlands Antilles', - dialCode: '+599', - value: 'AN', - }, - { - label: 'New Caledonia', - dialCode: '+687', - value: 'NC', - }, - { - label: 'New Zealand', - dialCode: '+64', - value: 'NZ', - }, - { - label: 'Nicaragua', - dialCode: '+505', - value: 'NI', - }, - { - label: 'Niger', - dialCode: '+227', - value: 'NE', - }, - { - label: 'Nigeria', - dialCode: '+234', - value: 'NG', - }, - { - label: 'Niue', - dialCode: '+683', - value: 'NU', - }, - { - label: 'Norfolk Island', - dialCode: '+672', - value: 'NF', - }, - { - label: 'Northern Mariana Islands', - dialCode: '+1670', - value: 'MP', - }, - { - label: 'Norway', - dialCode: '+47', - value: 'NO', - }, - { - label: 'Oman', - dialCode: '+968', - value: 'OM', - }, - { - label: 'Pakistan', - dialCode: '+92', - value: 'PK', - }, - { - label: 'Palau', - dialCode: '+680', - value: 'PW', - }, - { - label: 'Palestinian Territory, Occupied', - dialCode: '+970', - value: 'PS', - }, - { - label: 'Panama', - dialCode: '+507', - value: 'PA', - }, - { - label: 'Papua New Guinea', - dialCode: '+675', - value: 'PG', - }, - { - label: 'Paraguay', - dialCode: '+595', - value: 'PY', - }, - { - label: 'Peru', - dialCode: '+51', - value: 'PE', - }, - { - label: 'Philippines', - dialCode: '+63', - value: 'PH', - }, - { - label: 'Pitcairn', - dialCode: '+872', - value: 'PN', - }, - { - label: 'Poland', - dialCode: '+48', - value: 'PL', - }, - { - label: 'Portugal', - dialCode: '+351', - value: 'PT', - }, - { - label: 'Puerto Rico', - dialCode: '+1939', - value: 'PR', - }, - { - label: 'Qatar', - dialCode: '+974', - value: 'QA', - }, - { - label: 'Romania', - dialCode: '+40', - value: 'RO', - }, - { - label: 'Russia', - dialCode: '+7', - value: 'RU', - }, - { - label: 'Rwanda', - dialCode: '+250', - value: 'RW', - }, - { - label: 'Reunion', - dialCode: '+262', - value: 'RE', - }, - { - label: 'Saint Barthelemy', - dialCode: '+590', - value: 'BL', - }, - { - label: 'Saint Helena, Ascension and Tristan Da Cunha', - dialCode: '+290', - value: 'SH', - }, - { - label: 'Saint Kitts and Nevis', - dialCode: '+1869', - value: 'KN', - }, - { - label: 'Saint Lucia', - dialCode: '+1758', - value: 'LC', - }, - { - label: 'Saint Martin', - dialCode: '+590', - value: 'MF', - }, - { - label: 'Saint Pierre and Miquelon', - dialCode: '+508', - value: 'PM', - }, - { - label: 'Saint Vincent and the Grenadines', - dialCode: '+1784', - value: 'VC', - }, - { - label: 'Samoa', - dialCode: '+685', - value: 'WS', - }, - { - label: 'San Marino', - dialCode: '+378', - value: 'SM', - }, - { - label: 'Sao Tome and Principe', - dialCode: '+239', - value: 'ST', - }, - { - label: 'Saudi Arabia', - dialCode: '+966', - value: 'SA', - }, - { - label: 'Senegal', - dialCode: '+221', - value: 'SN', - }, - { - label: 'Serbia', - dialCode: '+381', - value: 'RS', - }, - { - label: 'Seychelles', - dialCode: '+248', - value: 'SC', - }, - { - label: 'Sierra Leone', - dialCode: '+232', - value: 'SL', - }, - { - label: 'Singapore', - dialCode: '+65', - value: 'SG', - }, - { - label: 'Slovakia', - dialCode: '+421', - value: 'SK', - }, - { - label: 'Slovenia', - dialCode: '+386', - value: 'SI', - }, - { - label: 'Solomon Islands', - dialCode: '+677', - value: 'SB', - }, - { - label: 'Somalia', - dialCode: '+252', - value: 'SO', - }, - { - label: 'South Africa', - dialCode: '+27', - value: 'ZA', - }, - { - label: 'South Sudan', - dialCode: '+211', - value: 'SS', - }, - { - label: 'South Georgia and the South Sandwich Islands', - dialCode: '+500', - value: 'GS', - }, - { - label: 'Spain', - dialCode: '+34', - value: 'ES', - }, - { - label: 'Sri Lanka', - dialCode: '+94', - value: 'LK', - }, - { - label: 'Sudan', - dialCode: '+249', - value: 'SD', - }, - { - label: 'Suriname', - dialCode: '+597', - value: 'SR', - }, - { - label: 'Svalbard and Jan Mayen', - dialCode: '+47', - value: 'SJ', - }, - { - label: 'Swaziland', - dialCode: '+268', - value: 'SZ', - }, - { - label: 'Sweden', - dialCode: '+46', - value: 'SE', - }, - { - label: 'Switzerland', - dialCode: '+41', - value: 'CH', - }, - { - label: 'Syrian Arab Republic', - dialCode: '+963', - value: 'SY', - }, - { - label: 'Taiwan', - dialCode: '+886', - value: 'TW', - }, - { - label: 'Tajikistan', - dialCode: '+992', - value: 'TJ', - }, - { - label: 'Tanzania, United Republic of Tanzania', - dialCode: '+255', - value: 'TZ', - }, - { - label: 'Thailand', - dialCode: '+66', - value: 'TH', - }, - { - label: 'Timor-Leste', - dialCode: '+670', - value: 'TL', - }, - { - label: 'Togo', - dialCode: '+228', - value: 'TG', - }, - { - label: 'Tokelau', - dialCode: '+690', - value: 'TK', - }, - { - label: 'Tonga', - dialCode: '+676', - value: 'TO', - }, - { - label: 'Trinidad and Tobago', - dialCode: '+1868', - value: 'TT', - }, - { - label: 'Tunisia', - dialCode: '+216', - value: 'TN', - }, - { - label: 'Turkey', - dialCode: '+90', - value: 'TR', - }, - { - label: 'Turkmenistan', - dialCode: '+993', - value: 'TM', - }, - { - label: 'Turks and Caicos Islands', - dialCode: '+1649', - value: 'TC', - }, - { - label: 'Tuvalu', - dialCode: '+688', - value: 'TV', - }, - { - label: 'Uganda', - dialCode: '+256', - value: 'UG', - }, - { - label: 'Ukraine', - dialCode: '+380', - value: 'UA', - }, - { - label: 'United Arab Emirates', - dialCode: '+971', - value: 'AE', - }, - { - label: 'United Kingdom', - dialCode: '+44', - value: 'GB', - }, - { - label: 'United States', - dialCode: '+1', - value: 'US', - }, - { - label: 'Uruguay', - dialCode: '+598', - value: 'UY', - }, - { - label: 'Uzbekistan', - dialCode: '+998', - value: 'UZ', - }, - { - label: 'Vanuatu', - dialCode: '+678', - value: 'VU', - }, - { - label: 'Venezuela, Bolivarian Republic of Venezuela', - dialCode: '+58', - value: 'VE', - }, - { - label: 'Vietnam', - dialCode: '+84', - value: 'VN', - }, - { - label: 'Virgin Islands, British', - dialCode: '+1284', - value: 'VG', - }, - { - label: 'Virgin Islands, U.S.', - dialCode: '+1340', - value: 'VI', - }, - { - label: 'Wallis and Futuna', - dialCode: '+681', - value: 'WF', - }, - { - label: 'Yemen', - dialCode: '+967', - value: 'YE', - }, - { - label: 'Zambia', - dialCode: '+260', - value: 'ZM', - }, - { - label: 'Zimbabwe', - dialCode: '+263', - value: 'ZW', - }, -] diff --git a/ui/src/constants/roles.constant.ts b/ui/src/constants/roles.constant.ts deleted file mode 100644 index 4d225a6d..00000000 --- a/ui/src/constants/roles.constant.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const ADMIN = 'admin' -export const USER = 'user' diff --git a/ui/src/proxy/account/models.ts b/ui/src/proxy/account/models.ts index 2b549b9b..2b019f42 100644 --- a/ui/src/proxy/account/models.ts +++ b/ui/src/proxy/account/models.ts @@ -1,5 +1,5 @@ import { ExtensibleObject } from '..' -import { SignInResponse } from '../../@types/auth' +import { SignInResponse } from '../auth/models' export interface ProfileDto extends ExtensibleObject { email: string diff --git a/ui/src/@types/auth.ts b/ui/src/proxy/auth/models.ts similarity index 100% rename from ui/src/@types/auth.ts rename to ui/src/proxy/auth/models.ts diff --git a/ui/src/proxy/common.ts b/ui/src/proxy/common.ts new file mode 100644 index 00000000..fd1d0916 --- /dev/null +++ b/ui/src/proxy/common.ts @@ -0,0 +1,7 @@ +import { ReactNode, CSSProperties } from 'react' + +export interface CommonProps { + className?: string + children?: ReactNode + style?: CSSProperties +} \ No newline at end of file diff --git a/ui/src/proxy/configs/app.config.ts b/ui/src/proxy/configs/app.config.ts new file mode 100644 index 00000000..55849a41 --- /dev/null +++ b/ui/src/proxy/configs/app.config.ts @@ -0,0 +1,14 @@ +import { ROUTES_ENUM } from '@/routes/route.constant' +import { AppConfig } from './models' + +const appConfig: AppConfig = { + baseUrl: import.meta.env.VITE_API_URL, + apiPrefix: '/api', + authenticatedEntryPath: ROUTES_ENUM.protected.dashboard, + unAuthenticatedEntryPath: ROUTES_ENUM.authenticated.login, + tourPath: '/', + locale: 'en', + uiVersion: undefined, +} + +export default appConfig diff --git a/ui/src/proxy/configs/models.ts b/ui/src/proxy/configs/models.ts new file mode 100644 index 00000000..915dbc60 --- /dev/null +++ b/ui/src/proxy/configs/models.ts @@ -0,0 +1,9 @@ +export type AppConfig = { + baseUrl: string + apiPrefix: string + authenticatedEntryPath: string + unAuthenticatedEntryPath: string + tourPath: string + locale: string + uiVersion: string | undefined +} diff --git a/ui/src/@types/componentInfo.ts b/ui/src/proxy/developerKit/componentInfo.ts similarity index 100% rename from ui/src/@types/componentInfo.ts rename to ui/src/proxy/developerKit/componentInfo.ts diff --git a/ui/src/@types/menu.ts b/ui/src/proxy/menus/menu.ts similarity index 100% rename from ui/src/@types/menu.ts rename to ui/src/proxy/menus/menu.ts diff --git a/ui/src/configs/navigation-icon.config.tsx b/ui/src/proxy/menus/navigation-icon.config.tsx similarity index 100% rename from ui/src/configs/navigation-icon.config.tsx rename to ui/src/proxy/menus/navigation-icon.config.tsx diff --git a/ui/src/@types/navigation.ts b/ui/src/proxy/menus/navigation.ts similarity index 100% rename from ui/src/@types/navigation.ts rename to ui/src/proxy/menus/navigation.ts diff --git a/ui/src/@types/routes.tsx b/ui/src/proxy/routes/routes.tsx similarity index 92% rename from ui/src/@types/routes.tsx rename to ui/src/proxy/routes/routes.tsx index e4226710..b42cacb5 100644 --- a/ui/src/@types/routes.tsx +++ b/ui/src/proxy/routes/routes.tsx @@ -1,4 +1,4 @@ -import { LayoutType } from './theme' +import { LayoutType } from '../theme/models' import type { LazyExoticComponent, ReactNode } from 'react' export interface Meta { diff --git a/ui/src/@types/theme.ts b/ui/src/proxy/theme/models.ts similarity index 51% rename from ui/src/@types/theme.ts rename to ui/src/proxy/theme/models.ts index 47ebf936..6c9eb1c1 100644 --- a/ui/src/@types/theme.ts +++ b/ui/src/proxy/theme/models.ts @@ -1,7 +1,7 @@ export type Direction = 'ltr' | 'rtl' export type Mode = 'light' | 'dark' export type NavMode = 'transparent' | 'light' | 'dark' | 'themed' -export type ControlSize = 'lg' | 'md' | 'sm' +export type ControlSize = 'lg' | 'md' | 'sm' | 'xs' export type LayoutType = | 'blank' | 'classic' @@ -20,3 +20,17 @@ export type ColorLevel = | 700 | 800 | 900 +export type ThemeConfig = { + themeColor: string + direction: Direction + mode: Mode + primaryColorLevel: ColorLevel + panelExpand: boolean + navMode: NavMode + controlSize: ControlSize + cardBordered: boolean + layout: { + type: LayoutType + sideNavCollapse: boolean + } +} \ No newline at end of file diff --git a/ui/src/proxy/theme/theme.config.ts b/ui/src/proxy/theme/theme.config.ts new file mode 100644 index 00000000..efcf17d3 --- /dev/null +++ b/ui/src/proxy/theme/theme.config.ts @@ -0,0 +1,17 @@ +import { THEME_ENUM } from '@/constants/theme.constant' +import { ThemeConfig } from '@/proxy/theme/models' + +export const themeConfig: ThemeConfig = { + themeColor: 'indigo', + direction: THEME_ENUM.DIR_LTR, + mode: THEME_ENUM.MODE_LIGHT, + primaryColorLevel: 600, + cardBordered: true, + panelExpand: false, + controlSize: 'md', + navMode: THEME_ENUM.NAV_MODE_LIGHT, + layout: { + type: THEME_ENUM.LAYOUT_TYPE_SIMPLE, + sideNavCollapse: false, + }, +} diff --git a/ui/src/services/account.service.ts b/ui/src/services/account.service.ts index adcb0860..68ddf292 100644 --- a/ui/src/services/account.service.ts +++ b/ui/src/services/account.service.ts @@ -1,5 +1,5 @@ import { AxiosError } from 'axios' -import { SignUpCredential, SignUpResponse } from '../@types/auth' +import { SignUpCredential, SignUpResponse } from '../proxy/auth/models' import apiService from './api.service' import { ProfileDto, UpdateProfileDto } from '@/proxy/account/models' diff --git a/ui/src/services/auth.service.ts b/ui/src/services/auth.service.ts index baffaad5..aab76d2c 100644 --- a/ui/src/services/auth.service.ts +++ b/ui/src/services/auth.service.ts @@ -3,7 +3,7 @@ import { FailedSignInResponse, SignInCredential, SignInResponse, -} from '../@types/auth' +} from '../proxy/auth/models' import { AUTH_API_NAME } from '../constants/app.constant' import apiService, { Config } from './api.service' diff --git a/ui/src/services/authApi.service.ts b/ui/src/services/authApi.service.ts index 5ce2c6b3..4edfb587 100644 --- a/ui/src/services/authApi.service.ts +++ b/ui/src/services/authApi.service.ts @@ -1,4 +1,4 @@ -import appConfig from '@/configs/app.config' +import appConfig from '@/proxy/configs/app.config' import { store } from '@/store' import axios from 'axios' diff --git a/ui/src/services/platformApi.service.ts b/ui/src/services/platformApi.service.ts index 316751b0..5fe47a26 100644 --- a/ui/src/services/platformApi.service.ts +++ b/ui/src/services/platformApi.service.ts @@ -1,7 +1,7 @@ import axios from 'axios' import { store } from '../store' import { jwtDecode } from 'jwt-decode' -import appConfig from '../configs/app.config' +import appConfig from '../proxy/configs/app.config' import { refreshToken } from './auth.service' import { isLoginSuccess } from '../proxy/account/models' diff --git a/ui/src/store/abpConfig.model.ts b/ui/src/store/abpConfig.model.ts index 1223a5fc..57d19d06 100644 --- a/ui/src/store/abpConfig.model.ts +++ b/ui/src/store/abpConfig.model.ts @@ -2,8 +2,8 @@ import type { Action, Thunk } from 'easy-peasy' import { action, thunk } from 'easy-peasy' import { Injections, StoreModel } from '.' import { getLocalization, setLocalization } from '../services/localization.service' -import appConfig from '../configs/app.config' -import { NavigationTree } from '../@types/navigation' +import appConfig from '../proxy/configs/app.config' +import { NavigationTree } from '../proxy/menus/navigation' import { MenuDto } from '../proxy/menus/models' import getChildren from '../utils/navigation' import { diff --git a/ui/src/store/locale.model.ts b/ui/src/store/locale.model.ts index 97f3e318..251da397 100644 --- a/ui/src/store/locale.model.ts +++ b/ui/src/store/locale.model.ts @@ -1,6 +1,6 @@ import type { Action, ThunkOn } from 'easy-peasy' import { action, thunkOn } from 'easy-peasy' -import appConfig from '../configs/app.config' +import appConfig from '../proxy/configs/app.config' import { Injections, StoreModel } from '.' export interface LocaleStoreModel { diff --git a/ui/src/store/theme.model.ts b/ui/src/store/theme.model.ts index 3a29116f..69d600cb 100644 --- a/ui/src/store/theme.model.ts +++ b/ui/src/store/theme.model.ts @@ -1,6 +1,6 @@ import type { Action } from 'easy-peasy' import { action } from 'easy-peasy' -import { themeConfig } from '../configs/theme.config' +import { themeConfig } from '../proxy/theme/theme.config' import { LAYOUT_TYPE_CLASSIC, LAYOUT_TYPE_DECKED, @@ -13,7 +13,7 @@ import { NAV_MODE_THEMED, NAV_MODE_TRANSPARENT, } from '../constants/theme.constant' -import { Direction, Mode, NavMode } from '../@types/theme' +import { Direction, Mode, NavMode } from '../proxy/theme/models' export interface ThemeStoreModel { themeColor: string diff --git a/ui/src/shared/types.ts b/ui/src/types/shared.ts similarity index 100% rename from ui/src/shared/types.ts rename to ui/src/types/shared.ts diff --git a/ui/src/utils/codeParser.ts b/ui/src/utils/codeParser.ts index 4808b7bf..d731c3f6 100644 --- a/ui/src/utils/codeParser.ts +++ b/ui/src/utils/codeParser.ts @@ -2,7 +2,7 @@ import * as parser from "@babel/parser"; import traverse from "@babel/traverse"; import * as t from "@babel/types"; import generate from "@babel/generator"; -import { ComponentInfo } from "../@types/componentInfo"; +import { ComponentInfo } from "../proxy/developerKit/componentInfo"; export interface ParsedComponent { components: ComponentInfo[]; diff --git a/ui/src/utils/hooks/useAuth.ts b/ui/src/utils/hooks/useAuth.ts index 1769faae..daae2cab 100644 --- a/ui/src/utils/hooks/useAuth.ts +++ b/ui/src/utils/hooks/useAuth.ts @@ -7,11 +7,11 @@ import { SignInCredential, SignInResponse, SignUpCredential, -} from '../../@types/auth' +} from '../../proxy/auth/models' import { signIn, signOut } from '../../services/auth.service' import { isLoginSuccess } from '../../proxy/account/models' import { REDIRECT_URL_KEY } from '../../constants/app.constant' -import appConfig from '../../configs/app.config' +import appConfig from '../../proxy/configs/app.config' import { register } from '../../services/account.service' type Status = 'success' | 'failed' | 'error' diff --git a/ui/src/utils/hooks/useCurrentMenuIcon.tsx b/ui/src/utils/hooks/useCurrentMenuIcon.tsx index 45c7da7a..2a6cbfe3 100644 --- a/ui/src/utils/hooks/useCurrentMenuIcon.tsx +++ b/ui/src/utils/hooks/useCurrentMenuIcon.tsx @@ -1,7 +1,7 @@ import { useStoreState } from '@/store/store' import { useLocation } from 'react-router-dom' import { FaUser } from 'react-icons/fa' -import navigationIcon from '@/configs/navigation-icon.config' +import navigationIcon from '@/proxy/menus/navigation-icon.config' import { navigationTreeToFlat } from '@/utils/navigation' export function useCurrentMenuIcon(className = 'w-6 h-6'): JSX.Element { diff --git a/ui/src/utils/hooks/useDarkmode.ts b/ui/src/utils/hooks/useDarkmode.ts index ae023fd6..ac4a6dd4 100644 --- a/ui/src/utils/hooks/useDarkmode.ts +++ b/ui/src/utils/hooks/useDarkmode.ts @@ -1,4 +1,4 @@ -import type { Mode } from '@/@types/theme' +import type { Mode } from '@/proxy/theme/models' import { THEME_ENUM } from '@/constants/theme.constant' import { useStoreActions, useStoreState } from '@/store' import { useEffect } from 'react' diff --git a/ui/src/utils/hooks/useDirection.ts b/ui/src/utils/hooks/useDirection.ts index ac26afd0..10082f15 100644 --- a/ui/src/utils/hooks/useDirection.ts +++ b/ui/src/utils/hooks/useDirection.ts @@ -1,6 +1,6 @@ import { useEffect } from 'react' import { useStoreActions, useStoreState } from '@/store' -import type { Direction } from '@/@types/theme' +import type { Direction } from '@/proxy/theme/models' function useDirection(): [direction: Direction, updateDirection: (dir: Direction) => void] { const direction = useStoreState((state) => state.theme.direction) diff --git a/ui/src/utils/hooks/useMenuActive.ts b/ui/src/utils/hooks/useMenuActive.ts index 663c7d2d..af0d19ba 100644 --- a/ui/src/utils/hooks/useMenuActive.ts +++ b/ui/src/utils/hooks/useMenuActive.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ // eslint-disable @typescript-eslint/no-explicit-any -import type { NavigationTree } from '@/@types/navigation' +import type { NavigationTree } from '@/proxy/menus/navigation' import isPlainObject from 'lodash/isPlainObject' import { useMemo } from 'react' diff --git a/ui/src/utils/hooks/useMenuData.ts b/ui/src/utils/hooks/useMenuData.ts index 2517e6ca..0af2b026 100644 --- a/ui/src/utils/hooks/useMenuData.ts +++ b/ui/src/utils/hooks/useMenuData.ts @@ -1,4 +1,4 @@ -import { MenuItem } from '@/@types/menu' +import { MenuItem } from '@/proxy/menus/menu' import { getMenus, MenuService } from '@/services/menu.service' import { useStoreActions } from '@/store/store' import { useState, useEffect } from 'react' diff --git a/ui/src/utils/navigation.ts b/ui/src/utils/navigation.ts index 8be80cd4..331517e6 100644 --- a/ui/src/utils/navigation.ts +++ b/ui/src/utils/navigation.ts @@ -1,4 +1,4 @@ -import { NavigationTree } from '@/@types/navigation' +import { NavigationTree } from '@/proxy/menus/navigation' import { NAV_ITEM_TYPE_COLLAPSE, NAV_ITEM_TYPE_ITEM, diff --git a/ui/src/views/Views.tsx b/ui/src/views/Views.tsx index 2ee9cd78..4c1ee559 100644 --- a/ui/src/views/Views.tsx +++ b/ui/src/views/Views.tsx @@ -1,4 +1,4 @@ -import type { LayoutType } from '@/@types/theme' +import type { LayoutType } from '@/proxy/theme/models' import Loading from '@/components/shared/Loading' import { Alert, Button } from '@/components/ui' import { store, useStoreState } from '@/store' diff --git a/ui/src/views/admin/activityLog/components/Event.tsx b/ui/src/views/admin/activityLog/components/Event.tsx index 8d92d954..5129cbe4 100644 --- a/ui/src/views/admin/activityLog/components/Event.tsx +++ b/ui/src/views/admin/activityLog/components/Event.tsx @@ -1,4 +1,4 @@ -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import { Card, Tag } from '@/components/ui' import { NotificationChannelColors } from '@/constants/notification-channel.enum' import { NotificationDto } from '@/proxy/notification/models' diff --git a/ui/src/views/admin/activityLog/components/LogFilter.tsx b/ui/src/views/admin/activityLog/components/LogFilter.tsx index a463814b..93453efd 100644 --- a/ui/src/views/admin/activityLog/components/LogFilter.tsx +++ b/ui/src/views/admin/activityLog/components/LogFilter.tsx @@ -1,4 +1,4 @@ -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import Affix from '@/components/shared/Affix' import Checkbox from '@/components/ui/Checkbox' import NotificationChannels from '@/constants/notification-channel.enum' diff --git a/ui/src/views/admin/listForm/Wizard.tsx b/ui/src/views/admin/listForm/Wizard.tsx index 3e3470a5..38f15cab 100644 --- a/ui/src/views/admin/listForm/Wizard.tsx +++ b/ui/src/views/admin/listForm/Wizard.tsx @@ -11,7 +11,7 @@ import { import { ROUTES_ENUM } from '@/routes/route.constant' import { ListFormWizardDto } from '@/proxy/admin/list-form/models' import { getDataSources } from '@/proxy/data-source' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' import { useEffect, useState } from 'react' diff --git a/ui/src/views/admin/listForm/edit/ChartTabAnimation.tsx b/ui/src/views/admin/listForm/edit/ChartTabAnimation.tsx index ea114470..0ac71a0f 100644 --- a/ui/src/views/admin/listForm/edit/ChartTabAnimation.tsx +++ b/ui/src/views/admin/listForm/edit/ChartTabAnimation.tsx @@ -1,5 +1,5 @@ import { Card, Checkbox, FormContainer, FormItem, Input, Select, Button } from '@/components/ui' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { Field, FieldProps, Form, Formik } from 'formik' import { object } from 'yup' import { useLocalization } from '@/utils/hooks/useLocalization' diff --git a/ui/src/views/admin/listForm/edit/ChartTabAnnotations.tsx b/ui/src/views/admin/listForm/edit/ChartTabAnnotations.tsx index c850a7ee..4f2e6805 100644 --- a/ui/src/views/admin/listForm/edit/ChartTabAnnotations.tsx +++ b/ui/src/views/admin/listForm/edit/ChartTabAnnotations.tsx @@ -17,7 +17,7 @@ import THead from '@/components/ui/Table/THead' import Td from '@/components/ui/Table/Td' import Th from '@/components/ui/Table/Th' import Tr from '@/components/ui/Table/Tr' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { Field, FieldProps, Form, Formik } from 'formik' import { FaEdit, FaFileMedical, FaTrash } from 'react-icons/fa' import { object, string } from 'yup' diff --git a/ui/src/views/admin/listForm/edit/ChartTabAxis.tsx b/ui/src/views/admin/listForm/edit/ChartTabAxis.tsx index 60b893b8..893e71cd 100644 --- a/ui/src/views/admin/listForm/edit/ChartTabAxis.tsx +++ b/ui/src/views/admin/listForm/edit/ChartTabAxis.tsx @@ -17,7 +17,7 @@ import Tr from '@/components/ui/Table/Tr' import TabContent from '@/components/ui/Tabs/TabContent' import TabList from '@/components/ui/Tabs/TabList' import TabNav from '@/components/ui/Tabs/TabNav' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { Field, FieldProps, Form, Formik } from 'formik' import { FaEdit, FaPlus, FaTrash } from 'react-icons/fa' import { FormEditProps } from '../../listForm/edit/FormEdit' diff --git a/ui/src/views/admin/listForm/edit/ChartTabCommonSettings.tsx b/ui/src/views/admin/listForm/edit/ChartTabCommonSettings.tsx index 517c5050..a37c7f70 100644 --- a/ui/src/views/admin/listForm/edit/ChartTabCommonSettings.tsx +++ b/ui/src/views/admin/listForm/edit/ChartTabCommonSettings.tsx @@ -12,7 +12,7 @@ import TabContent from '@/components/ui/Tabs/TabContent' import TabList from '@/components/ui/Tabs/TabList' import TabNav from '@/components/ui/Tabs/TabNav' import { IdentityRoleDto } from '@/proxy/admin/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { Field, FieldProps, Form, Formik, FormikErrors, FormikTouched } from 'formik' import { FormEditProps } from '../../listForm/edit/FormEdit' import { useLocalization } from '@/utils/hooks/useLocalization' diff --git a/ui/src/views/admin/listForm/edit/ChartTabCrosshair.tsx b/ui/src/views/admin/listForm/edit/ChartTabCrosshair.tsx index 8b0c11dd..1d622baa 100644 --- a/ui/src/views/admin/listForm/edit/ChartTabCrosshair.tsx +++ b/ui/src/views/admin/listForm/edit/ChartTabCrosshair.tsx @@ -1,5 +1,5 @@ import { Button, Card, Checkbox, FormContainer, FormItem, Input, Select } from '@/components/ui' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { Field, FieldProps, Form, Formik } from 'formik' import { FormEditProps } from '../../listForm/edit/FormEdit' import { useLocalization } from '@/utils/hooks/useLocalization' diff --git a/ui/src/views/admin/listForm/edit/ChartTabLegend.tsx b/ui/src/views/admin/listForm/edit/ChartTabLegend.tsx index b0eb5477..bbfef446 100644 --- a/ui/src/views/admin/listForm/edit/ChartTabLegend.tsx +++ b/ui/src/views/admin/listForm/edit/ChartTabLegend.tsx @@ -11,7 +11,7 @@ import { import TabContent from '@/components/ui/Tabs/TabContent' import TabList from '@/components/ui/Tabs/TabList' import TabNav from '@/components/ui/Tabs/TabNav' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { Field, FieldProps, Form, Formik } from 'formik' import { FormEditProps } from '../../listForm/edit/FormEdit' import { useLocalization } from '@/utils/hooks/useLocalization' diff --git a/ui/src/views/admin/listForm/edit/ChartTabSeries.tsx b/ui/src/views/admin/listForm/edit/ChartTabSeries.tsx index 9e98b058..d70764f9 100644 --- a/ui/src/views/admin/listForm/edit/ChartTabSeries.tsx +++ b/ui/src/views/admin/listForm/edit/ChartTabSeries.tsx @@ -21,7 +21,7 @@ import TabContent from '@/components/ui/Tabs/TabContent' import TabList from '@/components/ui/Tabs/TabList' import TabNav from '@/components/ui/Tabs/TabNav' import { ChartPanesDto, ChartValueAxisDto } from '@/proxy/admin/charts/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { Field, FieldProps, Form, Formik } from 'formik' import { FaEdit, FaPlus, FaTrash } from 'react-icons/fa' import { FormEditProps } from '../../listForm/edit/FormEdit' diff --git a/ui/src/views/admin/listForm/edit/ChartTabZoomAndPan.tsx b/ui/src/views/admin/listForm/edit/ChartTabZoomAndPan.tsx index d4f2fc68..6f8ab878 100644 --- a/ui/src/views/admin/listForm/edit/ChartTabZoomAndPan.tsx +++ b/ui/src/views/admin/listForm/edit/ChartTabZoomAndPan.tsx @@ -1,5 +1,5 @@ import { Button, Card, Checkbox, FormContainer, FormItem, Input, Select } from '@/components/ui' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { Field, FieldProps, Form, Formik } from 'formik' import { FormEditProps } from '../../listForm/edit/FormEdit' import { ListFormEditTabs } from '@/proxy/admin/list-form/options' diff --git a/ui/src/views/admin/listForm/edit/FormCustomization.tsx b/ui/src/views/admin/listForm/edit/FormCustomization.tsx index 3fb27639..c65382f1 100644 --- a/ui/src/views/admin/listForm/edit/FormCustomization.tsx +++ b/ui/src/views/admin/listForm/edit/FormCustomization.tsx @@ -20,7 +20,7 @@ import { postListFormCustomization, putListFormCustomization, } from '@/services/admin/list-form-customization.service' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' import { useState } from 'react' diff --git a/ui/src/views/admin/listForm/edit/FormEdit.tsx b/ui/src/views/admin/listForm/edit/FormEdit.tsx index a72d0bc0..02932195 100644 --- a/ui/src/views/admin/listForm/edit/FormEdit.tsx +++ b/ui/src/views/admin/listForm/edit/FormEdit.tsx @@ -3,7 +3,7 @@ import TabContent from '@/components/ui/Tabs/TabContent' import TabList from '@/components/ui/Tabs/TabList' import TabNav from '@/components/ui/Tabs/TabNav' import { LanguageInfo } from '@/proxy/config/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreActions, useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { FormikHelpers } from 'formik' diff --git a/ui/src/views/admin/listForm/edit/FormTabDatabaseDataSource.tsx b/ui/src/views/admin/listForm/edit/FormTabDatabaseDataSource.tsx index 6977a608..144f06d0 100644 --- a/ui/src/views/admin/listForm/edit/FormTabDatabaseDataSource.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabDatabaseDataSource.tsx @@ -2,7 +2,7 @@ import { Container } from '@/components/shared' import { Button, Card, Checkbox, FormContainer, FormItem, Input, Select } from '@/components/ui' import { ListFormEditTabs } from '@/proxy/admin/list-form/options' import { getDataSources } from '@/proxy/data-source' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' diff --git a/ui/src/views/admin/listForm/edit/FormTabDetails.tsx b/ui/src/views/admin/listForm/edit/FormTabDetails.tsx index 90b94360..9bb84969 100644 --- a/ui/src/views/admin/listForm/edit/FormTabDetails.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabDetails.tsx @@ -2,7 +2,7 @@ import { Container } from '@/components/shared' import { Button, Checkbox, FormContainer, FormItem, Input, Select } from '@/components/ui' import { ListFormEditTabs } from '@/proxy/admin/list-form/options' import { LanguageInfo } from '@/proxy/config/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import SelectBox from 'devextreme-react/select-box' diff --git a/ui/src/views/admin/listForm/edit/FormTabFilters.tsx b/ui/src/views/admin/listForm/edit/FormTabFilters.tsx index 34bb301a..0e57778f 100644 --- a/ui/src/views/admin/listForm/edit/FormTabFilters.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabFilters.tsx @@ -26,7 +26,7 @@ import TabList from '@/components/ui/Tabs/TabList' import TabNav from '@/components/ui/Tabs/TabNav' import TabContent from '@/components/ui/Tabs/TabContent' import { GridOptionsSortModeEnum } from '@/proxy/form/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' const validationSchema = Yup.object().shape({}) diff --git a/ui/src/views/admin/listForm/edit/FormTabPermissions.tsx b/ui/src/views/admin/listForm/edit/FormTabPermissions.tsx index e71acc1d..7245d5da 100644 --- a/ui/src/views/admin/listForm/edit/FormTabPermissions.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabPermissions.tsx @@ -1,7 +1,7 @@ import { Container } from '@/components/shared' import { Button, FormContainer, FormItem, Select } from '@/components/ui' import { ListFormEditTabs } from '@/proxy/admin/list-form/options' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' diff --git a/ui/src/views/admin/listForm/edit/FormTabPivots.tsx b/ui/src/views/admin/listForm/edit/FormTabPivots.tsx index c94612e8..2b453b5b 100644 --- a/ui/src/views/admin/listForm/edit/FormTabPivots.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabPivots.tsx @@ -6,7 +6,7 @@ import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' import * as Yup from 'yup' import { FormEditProps } from './FormEdit' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { chartSeriesTypeOptions } from './options' const validationSchema = Yup.object().shape({}) diff --git a/ui/src/views/admin/listForm/edit/FormTabRow.tsx b/ui/src/views/admin/listForm/edit/FormTabRow.tsx index 92382528..aedb0e62 100644 --- a/ui/src/views/admin/listForm/edit/FormTabRow.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabRow.tsx @@ -17,7 +17,7 @@ import TabList from '@/components/ui/Tabs/TabList' import TabNav from '@/components/ui/Tabs/TabNav' import TabContent from '@/components/ui/Tabs/TabContent' import { GridOptionsSortModeEnum } from '@/proxy/form/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' const validationSchema = Yup.object().shape({}) diff --git a/ui/src/views/admin/listForm/edit/FormTabSorting.tsx b/ui/src/views/admin/listForm/edit/FormTabSorting.tsx index 470ab961..b6c4419f 100644 --- a/ui/src/views/admin/listForm/edit/FormTabSorting.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabSorting.tsx @@ -26,7 +26,7 @@ import TabList from '@/components/ui/Tabs/TabList' import TabNav from '@/components/ui/Tabs/TabNav' import TabContent from '@/components/ui/Tabs/TabContent' import { GridOptionsSortModeEnum } from '@/proxy/form/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' const validationSchema = Yup.object().shape({}) diff --git a/ui/src/views/admin/listForm/edit/FormTabTree.tsx b/ui/src/views/admin/listForm/edit/FormTabTree.tsx index d1ab4d13..64391b80 100644 --- a/ui/src/views/admin/listForm/edit/FormTabTree.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabTree.tsx @@ -15,7 +15,7 @@ import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' import * as Yup from 'yup' import { FormEditProps } from './FormEdit' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useEffect, useState } from 'react' import { getListFormFields } from '@/services/admin/list-form-field.service' import { groupBy } from 'lodash' diff --git a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabCustomization.tsx b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabCustomization.tsx index bf9b1b57..7cbb49e1 100644 --- a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabCustomization.tsx +++ b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabCustomization.tsx @@ -1,7 +1,7 @@ import { Container } from '@/components/shared' import { Button, Checkbox, FormContainer, FormItem, Select } from '@/components/ui' import { ColumnFormatEditDto, ListFormFieldEditTabs } from '@/proxy/admin/list-form-field/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' import { bool, object, string } from 'yup' diff --git a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabDetails.tsx b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabDetails.tsx index 913df70a..0f3e82f5 100644 --- a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabDetails.tsx +++ b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabDetails.tsx @@ -1,7 +1,7 @@ import { Container } from '@/components/shared' import { Button, FormContainer, FormItem, Input, Select } from '@/components/ui' import { ColumnFormatEditDto, ListFormFieldEditTabs } from '@/proxy/admin/list-form-field/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' import { number, object, string } from 'yup' diff --git a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabLookup.tsx b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabLookup.tsx index 44a1053f..223cd152 100644 --- a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabLookup.tsx +++ b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabLookup.tsx @@ -1,7 +1,7 @@ import { Container } from '@/components/shared' import { Button, Checkbox, FormContainer, FormItem, Input, Select } from '@/components/ui' import { ColumnFormatEditDto, ListFormFieldEditTabs } from '@/proxy/admin/list-form-field/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' import { number, object, string } from 'yup' diff --git a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabOptions.tsx b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabOptions.tsx index 9662b698..f2959aba 100644 --- a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabOptions.tsx +++ b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabOptions.tsx @@ -1,7 +1,7 @@ import { Container } from '@/components/shared' import { Button, Checkbox, FormContainer, FormItem, Input, Select } from '@/components/ui' import { ColumnFormatEditDto, ListFormFieldEditTabs } from '@/proxy/admin/list-form-field/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' import { bool, number, object, string } from 'yup' diff --git a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabPermissions.tsx b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabPermissions.tsx index 7b659fa7..05db3cb4 100644 --- a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabPermissions.tsx +++ b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabPermissions.tsx @@ -1,7 +1,7 @@ import { Container } from '@/components/shared' import { Button, Checkbox, FormContainer, FormItem, Select } from '@/components/ui' import { ColumnFormatEditDto, ListFormFieldEditTabs } from '@/proxy/admin/list-form-field/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' import { useEffect, useState } from 'react' diff --git a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabPivotSetting.tsx b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabPivotSetting.tsx index ffecf088..a4cdcb5e 100644 --- a/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabPivotSetting.tsx +++ b/ui/src/views/admin/listForm/edit/form-fields/FormFieldTabPivotSetting.tsx @@ -5,7 +5,7 @@ import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' import { boolean, object, string } from 'yup' import { FormFieldEditProps } from './FormFields' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { columnSummaryTypeListOptions, pivotSettingsAreaOptions, diff --git a/ui/src/views/admin/listForm/edit/form-fields/FormFields.tsx b/ui/src/views/admin/listForm/edit/form-fields/FormFields.tsx index ce6dda4a..b398a56e 100644 --- a/ui/src/views/admin/listForm/edit/form-fields/FormFields.tsx +++ b/ui/src/views/admin/listForm/edit/form-fields/FormFields.tsx @@ -29,7 +29,7 @@ import { CopyListFormFieldColumnDto, } from '@/proxy/admin/list-form-field/models' import { LanguageInfo } from '@/proxy/config/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import setNull from '@/utils/setNull' diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAnnotation.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAnnotation.tsx index 9483cf8e..d47bebbb 100644 --- a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAnnotation.tsx +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAnnotation.tsx @@ -11,7 +11,7 @@ import { toast, } from '@/components/ui' import { ListFormJsonRowDto } from '@/proxy/admin/list-form/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreActions, useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAxis.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAxis.tsx index 76a46485..2bcffe77 100644 --- a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAxis.tsx +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAxis.tsx @@ -11,7 +11,7 @@ import { toast, } from '@/components/ui' import { ListFormJsonRowDto } from '@/proxy/admin/list-form/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreActions } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldArray, FieldProps, Form, Formik, FormikProps, getIn } from 'formik' diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogCommand.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogCommand.tsx index 0295dc04..e306c789 100644 --- a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogCommand.tsx +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogCommand.tsx @@ -13,7 +13,7 @@ import TabContent from '@/components/ui/Tabs/TabContent' import TabList from '@/components/ui/Tabs/TabList' import TabNav from '@/components/ui/Tabs/TabNav' import { ListFormJsonRowDto } from '@/proxy/admin/list-form/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreActions, useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogEditForm.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogEditForm.tsx index dd583bb9..94b79554 100644 --- a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogEditForm.tsx +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogEditForm.tsx @@ -12,7 +12,7 @@ import { } from '@/components/ui' import { ListFormJsonRowDto } from '@/proxy/admin/list-form/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreActions } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldArray, FieldProps, Form, Formik } from 'formik' diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogExtraFilter.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogExtraFilter.tsx index 44e84e4e..54fe3c59 100644 --- a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogExtraFilter.tsx +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogExtraFilter.tsx @@ -9,7 +9,7 @@ import { toast, } from '@/components/ui' import { ListFormJsonRowDto } from '@/proxy/admin/list-form/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreActions, useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogSeries.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogSeries.tsx index 5d0f4d1d..d01f2357 100644 --- a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogSeries.tsx +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogSeries.tsx @@ -11,7 +11,7 @@ import { toast, } from '@/components/ui' import { ListFormJsonRowDto } from '@/proxy/admin/list-form/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreActions, useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogSubForm.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogSubForm.tsx index adb85fbe..bc1eadcd 100644 --- a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogSubForm.tsx +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogSubForm.tsx @@ -10,7 +10,7 @@ import { toast, } from '@/components/ui' import { ListFormJsonRowDto } from '@/proxy/admin/list-form/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreActions } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldArray, FieldProps, Form, Formik } from 'formik' diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogWidget.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogWidget.tsx index 950a6441..fc5e8342 100644 --- a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogWidget.tsx +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogWidget.tsx @@ -11,7 +11,7 @@ import { Tooltip, } from '@/components/ui' import { ListFormJsonRowDto } from '@/proxy/admin/list-form/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreActions, useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { Field, FieldProps, Form, Formik } from 'formik' diff --git a/ui/src/views/admin/organization-unit/OrganizationUnits.tsx b/ui/src/views/admin/organization-unit/OrganizationUnits.tsx index 489b2644..1cbb0481 100644 --- a/ui/src/views/admin/organization-unit/OrganizationUnits.tsx +++ b/ui/src/views/admin/organization-unit/OrganizationUnits.tsx @@ -42,7 +42,7 @@ import { ouPutMove, ouPutRoles, } from '@/services/organization-unit.service' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useLocalization } from '@/utils/hooks/useLocalization' import TableNoRecords from '@/views/shared/TableNoRecords' import classNames from 'classnames' diff --git a/ui/src/views/admin/user-management/Details.tsx b/ui/src/views/admin/user-management/Details.tsx index f6fd7232..64c86dce 100644 --- a/ui/src/views/admin/user-management/Details.tsx +++ b/ui/src/views/admin/user-management/Details.tsx @@ -36,7 +36,7 @@ import { Helmet } from 'react-helmet' import { FaLockOpen, FaUser, FaFileAlt, FaTrashAlt } from 'react-icons/fa' import { useParams } from 'react-router-dom' import * as Yup from 'yup' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { ConfirmDialog, Container } from '@/components/shared' import { AssignedClaimViewModel, UserInfoViewModel } from '@/proxy/admin/models' diff --git a/ui/src/views/auth/Login.tsx b/ui/src/views/auth/Login.tsx index be8b69a1..ce8cb5e3 100644 --- a/ui/src/views/auth/Login.tsx +++ b/ui/src/views/auth/Login.tsx @@ -1,4 +1,4 @@ -import { FailedSignInResponse } from '@/@types/auth' +import { FailedSignInResponse } from '@/proxy/auth/models' import ActionLink from '@/components/shared/ActionLink' import Captcha from '@/components/shared/Captcha' import PasswordInput from '@/components/shared/PasswordInput' diff --git a/ui/src/views/form/FormButtons.tsx b/ui/src/views/form/FormButtons.tsx index 023272a6..8205e77a 100644 --- a/ui/src/views/form/FormButtons.tsx +++ b/ui/src/views/form/FormButtons.tsx @@ -1,5 +1,5 @@ import { Badge, Button, Dialog, Notification, toast } from '@/components/ui' -import navigationIcon from '@/configs/navigation-icon.config' +import navigationIcon from '@/proxy/menus/navigation-icon.config' import { useLocalization } from '@/utils/hooks/useLocalization' import CustomStore from 'devextreme/data/custom_store' import { useState } from 'react' diff --git a/ui/src/views/form/types.ts b/ui/src/views/form/types.ts index ff7abb64..1e5b93a5 100644 --- a/ui/src/views/form/types.ts +++ b/ui/src/views/form/types.ts @@ -6,7 +6,7 @@ import { PlatformEditorTypes, TagBoxOptionsDto, } from '../../proxy/form/models' -import { Meta } from '@/@types/routes' +import { Meta } from '@/proxy/routes/routes' export type EditorType2 = FormItemComponent | PlatformEditorTypes.dxGridBox export type SimpleItemWithColData = Overwrite< diff --git a/ui/src/views/form/useFormData.tsx b/ui/src/views/form/useFormData.tsx index ec38fb50..fab38530 100644 --- a/ui/src/views/form/useFormData.tsx +++ b/ui/src/views/form/useFormData.tsx @@ -1,7 +1,5 @@ import { Notification, toast } from '@/components/ui' import { getList } from '@/services/form.service' -import { useListFormColumns } from '@/shared/useListFormColumns' -import { useListFormCustomDataSource } from '@/shared/useListFormCustomDataSource' import { useLocalization } from '@/utils/hooks/useLocalization' import { usePermission } from '@/utils/hooks/usePermission' import { Form as FormDx } from 'devextreme-react/form' @@ -18,6 +16,8 @@ import { getAccessDeniedPath } from '@/utils/routing' import { ROUTES_ENUM } from '@/routes/route.constant' import { useLookupDataSource } from './useLookupDataSource' import { layoutTypes } from '../admin/listForm/edit/types' +import { useListFormCustomDataSource } from '../list/useListFormCustomDataSource' +import { useListFormColumns } from '../list/useListFormColumns' const useGridData = (props: { mode: RowMode diff --git a/ui/src/views/list/Card.tsx b/ui/src/views/list/Card.tsx index 51ac59e8..c9db0121 100644 --- a/ui/src/views/list/Card.tsx +++ b/ui/src/views/list/Card.tsx @@ -1,6 +1,5 @@ import { useCallback, useEffect, useState } from 'react' import { GridDto } from '@/proxy/form/models' -import { useListFormCustomDataSource } from '@/shared/useListFormCustomDataSource' import { Button, Pagination, Select } from '@/components/ui' import classNames from 'classnames' import { FaCog, FaSearch } from 'react-icons/fa' @@ -15,6 +14,7 @@ import { useStoreActions, useStoreState } from '@/store/store' import { usePWA } from '@/utils/hooks/usePWA' import CardItem from './CardItem' import { layoutTypes } from '../admin/listForm/edit/types' +import { useListFormCustomDataSource } from './useListFormCustomDataSource' interface CardProps { listFormCode: string diff --git a/ui/src/views/list/Chart.tsx b/ui/src/views/list/Chart.tsx index e06a057d..220044fc 100644 --- a/ui/src/views/list/Chart.tsx +++ b/ui/src/views/list/Chart.tsx @@ -1,5 +1,5 @@ -import { CommonProps } from '@/@types/common' -import { Meta } from '@/@types/routes' +import { CommonProps } from '@/proxy/common' +import { Meta } from '@/proxy/routes/routes' import { Container } from '@/components/shared' import { DX_CLASSNAMES } from '@/constants/app.constant' import { useLocalization } from '@/utils/hooks/useLocalization' @@ -7,7 +7,6 @@ import DxChart from 'devextreme-react/chart' import { useCallback, useEffect, useRef, useState } from 'react' import { Helmet } from 'react-helmet' import { useParams, useSearchParams } from 'react-router-dom' -import { useListFormCustomDataSource } from '@/shared/useListFormCustomDataSource' import { GridDto } from '@/proxy/form/models' import { usePermission } from '@/utils/hooks/usePermission' import { Button, toast, Notification } from '@/components/ui' @@ -16,7 +15,7 @@ import { usePWA } from '@/utils/hooks/usePWA' import { FaCog, FaCrosshairs, FaMinus, FaPlus, FaSearch, FaSyncAlt } from 'react-icons/fa' import { buildSeriesDto } from './Utils' import { ChartSeriesDto } from '@/proxy/admin/charts/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { useStoreState } from '@/store/store' import ChartSeriesDialog from './ChartSeriesDialog' import { getListFormFields } from '@/services/admin/list-form-field.service' @@ -29,6 +28,7 @@ import { putListFormJsonRow, } from '@/services/admin/list-form.service' import { layoutTypes } from '../admin/listForm/edit/types' +import { useListFormCustomDataSource } from './useListFormCustomDataSource' interface ChartProps extends CommonProps, Meta { id: string diff --git a/ui/src/views/list/ChartSeriesDialog.tsx b/ui/src/views/list/ChartSeriesDialog.tsx index 3b3b1f91..9764f489 100644 --- a/ui/src/views/list/ChartSeriesDialog.tsx +++ b/ui/src/views/list/ChartSeriesDialog.tsx @@ -1,7 +1,7 @@ import { Button, FormContainer, Input, Notification, Select, Dialog, toast } from '@/components/ui' import { Field, FieldArray, Form, Formik, FieldProps } from 'formik' import { FaMinus, FaPlus } from 'react-icons/fa' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import { chartSeriesTypeOptions, columnSummaryTypeListOptions, diff --git a/ui/src/views/list/Grid.tsx b/ui/src/views/list/Grid.tsx index 75821bbd..e1c7cb23 100644 --- a/ui/src/views/list/Grid.tsx +++ b/ui/src/views/list/Grid.tsx @@ -12,8 +12,6 @@ import { getListFormCustomization, postListFormCustomization, } from '@/services/list-form-customization.service' -import { useListFormColumns } from '@/shared/useListFormColumns' -import { useListFormCustomDataSource } from '@/shared/useListFormCustomDataSource' import { useLocalization } from '@/utils/hooks/useLocalization' import useResponsive from '@/utils/hooks/useResponsive' import { Template } from 'devextreme-react/core/template' @@ -68,6 +66,8 @@ import WidgetGroup from '@/components/ui/Widget/WidgetGroup' import { GridExtraFilterToolbar } from './GridExtraFilterToolbar' import { getList } from '@/services/form.service' import { layoutTypes } from '../admin/listForm/edit/types' +import { useListFormCustomDataSource } from './useListFormCustomDataSource' +import { useListFormColumns } from './useListFormColumns' interface GridProps { listFormCode: string @@ -709,10 +709,7 @@ const Grid = (props: GridProps) => { //dataSource={gridDataSource} //remoteOperations={{ groupPaging: true }} //remoteOperations={false} - height={ - gridDto.gridOptions.height || - `calc(100vh - ${170 + widgetGroupHeight}px)` - } + height={gridDto.gridOptions.height || `calc(100vh - ${170 + widgetGroupHeight}px)`} width={gridDto.gridOptions.width || '100%'} allowColumnResizing={gridDto.gridOptions.columnOptionDto?.allowColumnResizing} allowColumnReordering={gridDto.gridOptions.columnOptionDto?.allowColumnReordering} diff --git a/ui/src/views/list/Pivot.tsx b/ui/src/views/list/Pivot.tsx index 9ba181f4..9c34b9c6 100644 --- a/ui/src/views/list/Pivot.tsx +++ b/ui/src/views/list/Pivot.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import Container from '@/components/shared/Container' import { DX_CLASSNAMES } from '@/constants/app.constant' import { GridDto, ListFormCustomizationTypeEnum } from '@/proxy/form/models' @@ -6,8 +5,6 @@ import { getListFormCustomization, postListFormCustomization, } from '@/services/list-form-customization.service' -import { useListFormColumns } from '@/shared/useListFormColumns' -import { useListFormCustomDataSource } from '@/shared/useListFormCustomDataSource' import { useLocalization } from '@/utils/hooks/useLocalization' import Chart, { CommonSeriesSettings, Size, Tooltip } from 'devextreme-react/chart' import PivotGrid, { @@ -39,6 +36,8 @@ import { usePermission } from '@/utils/hooks/usePermission' import { ROUTES_ENUM } from '@/routes/route.constant' import { usePWA } from '@/utils/hooks/usePWA' import { layoutTypes } from '../admin/listForm/edit/types' +import { useListFormCustomDataSource } from './useListFormCustomDataSource' +import { useListFormColumns } from './useListFormColumns' interface PivotProps { listFormCode: string diff --git a/ui/src/views/list/Tree.tsx b/ui/src/views/list/Tree.tsx index 796ca898..2c12c080 100644 --- a/ui/src/views/list/Tree.tsx +++ b/ui/src/views/list/Tree.tsx @@ -13,8 +13,6 @@ import { getListFormCustomization, postListFormCustomization, } from '@/services/list-form-customization.service' -import { useListFormColumns } from '@/shared/useListFormColumns' -import { useListFormCustomDataSource } from '@/shared/useListFormCustomDataSource' import { useLocalization } from '@/utils/hooks/useLocalization' import useResponsive from '@/utils/hooks/useResponsive' import { captionize } from 'devextreme/core/utils/inflector' @@ -61,6 +59,8 @@ import WidgetGroup from '@/components/ui/Widget/WidgetGroup' import { GridExtraFilterToolbar } from './GridExtraFilterToolbar' import { getList } from '@/services/form.service' import { layoutTypes } from '../admin/listForm/edit/types' +import { useListFormCustomDataSource } from './useListFormCustomDataSource' +import { useListFormColumns } from './useListFormColumns' interface TreeProps { listFormCode: string diff --git a/ui/src/shared/useListFormColumns.ts b/ui/src/views/list/useListFormColumns.ts similarity index 97% rename from ui/src/shared/useListFormColumns.ts rename to ui/src/views/list/useListFormColumns.ts index 6068a116..b24ebbe3 100644 --- a/ui/src/shared/useListFormColumns.ts +++ b/ui/src/views/list/useListFormColumns.ts @@ -1,14 +1,14 @@ -import { DataGridTypes, IFormatProps } from 'devextreme-react/data-grid' +import { DataGridTypes } from 'devextreme-react/data-grid' import { DataType, HorizontalEdge, SortOrder, ValidationRule } from 'devextreme/common' import CustomStore from 'devextreme/data/custom_store' import { SelectedFilterOperation } from 'devextreme/ui/data_grid' -import { dynamicFetch } from '../services/form.service' -import { useLocalization } from '../utils/hooks/useLocalization' -import { addCss } from '../views/list/Utils' -import { useDialogContext } from '../views/shared/DialogContext' -import { usePWA } from '../utils/hooks/usePWA' -import { usePermission } from '../utils/hooks/usePermission' -import { GridColumnData } from '../views/list/GridColumnData' +import { useEffect } from 'react' +import { useLocalization } from '@/utils/hooks/useLocalization' +import { usePermission } from '@/utils/hooks/usePermission' +import { usePWA } from '@/utils/hooks/usePWA' +import { useDialogContext } from '../shared/DialogContext' +import { dynamicFetch } from '@/services/form.service' +import { GridColumnData } from './GridColumnData' import { ColumnFormatDto, EditingFormItemDto, @@ -16,8 +16,8 @@ import { PlatformEditorTypes, UiCommandButtonPositionTypeEnum, UiLookupDataSourceTypeEnum, -} from '../proxy/form/models' -import { useEffect } from 'react' +} from '@/proxy/form/models' +import { addCss } from './Utils' const cellTemplateMultiValue = ( cellElement: HTMLElement, @@ -125,7 +125,7 @@ const useListFormColumns = ({ gridDto, listFormCode, isSubForm, - gridRef + gridRef, }: { gridDto?: GridDto listFormCode: string diff --git a/ui/src/shared/useListFormCustomDataSource.ts b/ui/src/views/list/useListFormCustomDataSource.ts similarity index 97% rename from ui/src/shared/useListFormCustomDataSource.ts rename to ui/src/views/list/useListFormCustomDataSource.ts index 2d2a2859..f2134f06 100644 --- a/ui/src/shared/useListFormCustomDataSource.ts +++ b/ui/src/views/list/useListFormCustomDataSource.ts @@ -2,13 +2,13 @@ import DataGrid from 'devextreme-react/data-grid' import PivotGrid from 'devextreme-react/pivot-grid' import CustomStore from 'devextreme/data/custom_store' import { MutableRefObject, useCallback } from 'react' -import { getLoadOptions, getServiceAddress, setGridPanelColor } from '../views/list/Utils' -import { GridOptionsDto, LayoutDto } from '../proxy/form/models' -import { GridColumnData } from '../views/list/GridColumnData' -import { dynamicFetch } from '../services/form.service' -import { MULTIVALUE_DELIMITER } from '../constants/app.constant' import { TreeList } from 'devextreme-react' import { layoutTypes, ListViewLayoutType } from '@/views/admin/listForm/edit/types' +import { getLoadOptions, getServiceAddress, setGridPanelColor } from './Utils' +import { GridOptionsDto } from '@/proxy/form/models' +import { GridColumnData } from './GridColumnData' +import { dynamicFetch } from '@/services/form.service' +import { MULTIVALUE_DELIMITER } from '@/constants/app.constant' const filteredGridPanelColor = 'rgba(10, 200, 10, 0.5)' // kullanici tanimli filtre ile filtrelenmis gridin paneline ait renk diff --git a/ui/src/views/menu/MenuItemComponent.tsx b/ui/src/views/menu/MenuItemComponent.tsx index 7f8008c4..3c0c5ba9 100644 --- a/ui/src/views/menu/MenuItemComponent.tsx +++ b/ui/src/views/menu/MenuItemComponent.tsx @@ -1,10 +1,10 @@ import React, { useEffect, useState } from 'react' import { useSortable } from '@dnd-kit/sortable' import { CSS } from '@dnd-kit/utilities' -import { MenuItem } from '@/@types/menu' +import { MenuItem } from '@/proxy/menus/menu' import { useLocalization } from '@/utils/hooks/useLocalization' import { MenuService } from '@/services/menu.service' -import navigationIcon from '@/configs/navigation-icon.config' +import navigationIcon from '@/proxy/menus/navigation-icon.config' import { FaQuestionCircle } from 'react-icons/fa' import { Button, @@ -18,7 +18,7 @@ import { Select, } from '@/components/ui' import { Field, FieldProps, Form, Formik } from 'formik' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' import * as Yup from 'yup' import { FaExternalLinkAlt, FaPlus, FaTrashAlt } from 'react-icons/fa' import { MenuDto } from '@/proxy/menus/models' diff --git a/ui/src/views/menu/MenuManager.tsx b/ui/src/views/menu/MenuManager.tsx index 4fb2e1d3..b3e05694 100644 --- a/ui/src/views/menu/MenuManager.tsx +++ b/ui/src/views/menu/MenuManager.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react' import { SortableMenuTree } from './SortableMenuTree' -import { MenuItem } from '@/@types/menu' +import { MenuItem } from '@/proxy/menus/menu' import { useMenuData } from '@/utils/hooks/useMenuData' import { FaRegBell, diff --git a/ui/src/views/menu/SortableMenuTree.tsx b/ui/src/views/menu/SortableMenuTree.tsx index d444df6e..6bce3fc8 100644 --- a/ui/src/views/menu/SortableMenuTree.tsx +++ b/ui/src/views/menu/SortableMenuTree.tsx @@ -16,10 +16,10 @@ import { verticalListSortingStrategy, } from '@dnd-kit/sortable' import { MenuItemComponent } from './MenuItemComponent' -import { MenuItem } from '@/@types/menu' +import { MenuItem } from '@/proxy/menus/menu' import { getPermissionsList } from '@/services/identity.service' import { PermissionDefinitionRecord } from '@/proxy/admin/models' -import { SelectBoxOption } from '@/shared/types' +import { SelectBoxOption } from '@/types/shared' interface SortableMenuTreeProps { items: MenuItem[] diff --git a/ui/src/views/public/About.tsx b/ui/src/views/public/About.tsx index 64bba74f..eaaaefd3 100644 --- a/ui/src/views/public/About.tsx +++ b/ui/src/views/public/About.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react' import { Helmet } from 'react-helmet' -import navigationIcon from '@/configs/navigation-icon.config' +import navigationIcon from '@/proxy/menus/navigation-icon.config' import { AboutDto } from '@/proxy/about/models' import { getAbout } from '@/services/about' import { useLocalization } from '@/utils/hooks/useLocalization' diff --git a/ui/src/views/public/Logo.tsx b/ui/src/views/public/Logo.tsx index 514be0ed..23d66361 100644 --- a/ui/src/views/public/Logo.tsx +++ b/ui/src/views/public/Logo.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames' import { APP_NAME } from '@/constants/app.constant' -import type { CommonProps } from '@/@types/common' -import { Mode } from '@/@types/theme' +import type { CommonProps } from '@/proxy/common' +import { Mode } from '@/proxy/theme/models' import { Link } from 'react-router-dom' import { ROUTES_ENUM } from '@/routes/route.constant' diff --git a/ui/src/views/public/Services.tsx b/ui/src/views/public/Services.tsx index 3627b5ec..267d28a7 100644 --- a/ui/src/views/public/Services.tsx +++ b/ui/src/views/public/Services.tsx @@ -14,7 +14,7 @@ import { ROUTES_ENUM } from '@/routes/route.constant' import { Helmet } from 'react-helmet' import { ServiceDto } from '@/proxy/services/models' import { getServices } from '@/services/service.service' -import navigationIcon from '@/configs/navigation-icon.config' +import navigationIcon from '@/proxy/menus/navigation-icon.config' import { Loading } from '@/components/shared' const Services: React.FC = () => { diff --git a/ui/src/views/shared/TableNoRecords.tsx b/ui/src/views/shared/TableNoRecords.tsx index c53f5b65..486dcee7 100644 --- a/ui/src/views/shared/TableNoRecords.tsx +++ b/ui/src/views/shared/TableNoRecords.tsx @@ -1,4 +1,4 @@ -import type { CommonProps } from '@/@types/common' +import type { CommonProps } from '@/proxy/common' import Td from '@/components/ui/Table/Td' import Tr from '@/components/ui/Table/Tr' import { useLocalization } from '@/utils/hooks/useLocalization'