proje-react-panel 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules.md +11 -1
- package/AUTH_LAYOUT_EXAMPLE.md +343 -0
- package/AUTH_LAYOUT_GUIDE.md +819 -0
- package/COLOR_SYSTEM_GUIDE.md +296 -0
- package/DASHBOARD_GUIDE.md +531 -0
- package/IMPLEMENTATION_GUIDE.md +899 -0
- package/README.md +18 -1
- package/dist/api/ApiConfig.d.ts +11 -0
- package/dist/api/AuthApi.d.ts +2 -5
- package/dist/api/CrudApi.d.ts +11 -12
- package/dist/components/DashboardContainer.d.ts +7 -0
- package/dist/components/DashboardGrid.d.ts +9 -0
- package/dist/components/DashboardItem.d.ts +10 -0
- package/dist/components/ThemeSwitcher.d.ts +7 -0
- package/dist/components/dashboard/Dashboard.d.ts +7 -0
- package/dist/components/dashboard/DashboardGrid.d.ts +7 -0
- package/dist/components/dashboard/DashboardItem.d.ts +6 -0
- package/dist/components/dashboard/index.d.ts +3 -0
- package/dist/decorators/auth/DefaultLoginForm.d.ts +4 -0
- package/dist/index.cjs.js +15 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.esm.js +15 -1
- package/dist/store/themeStore.d.ts +23 -0
- package/dist/types/Login.d.ts +8 -0
- package/package.json +3 -1
- package/src/api/ApiConfig.ts +63 -0
- package/src/api/AuthApi.ts +8 -0
- package/src/api/CrudApi.ts +96 -60
- package/src/components/dashboard/Dashboard.tsx +11 -0
- package/src/components/dashboard/DashboardGrid.tsx +14 -0
- package/src/components/dashboard/DashboardItem.tsx +9 -0
- package/src/components/dashboard/index.ts +3 -0
- package/src/decorators/auth/DefaultLoginForm.ts +32 -0
- package/src/index.ts +26 -0
- package/src/styles/base/_variables.scss +45 -0
- package/src/styles/components/button.scss +3 -3
- package/src/styles/components/checkbox.scss +6 -6
- package/src/styles/components/form-header.scss +21 -19
- package/src/styles/components/uploader.scss +15 -37
- package/src/styles/counter.scss +25 -33
- package/src/styles/dashboard.scss +9 -0
- package/src/styles/details.scss +6 -15
- package/src/styles/error-boundary.scss +75 -74
- package/src/styles/filter-popup.scss +29 -27
- package/src/styles/form.scss +16 -15
- package/src/styles/index.scss +8 -4
- package/src/styles/layout.scss +9 -8
- package/src/styles/list.scss +29 -27
- package/src/styles/loading-screen.scss +4 -4
- package/src/styles/login.scss +3 -3
- package/src/styles/pagination.scss +13 -13
- package/src/styles/sidebar.scss +24 -22
- package/src/styles/utils/scrollbar.scss +4 -3
- package/src/types/Login.ts +9 -0
- package/src/utils/logout.ts +2 -0
- package/dist/components/components/Checkbox.d.ts +0 -7
- package/dist/components/components/Counter.d.ts +0 -9
- package/dist/components/components/ErrorBoundary.d.ts +0 -16
- package/dist/components/components/ErrorComponent.d.ts +0 -4
- package/dist/components/components/FormField.d.ts +0 -17
- package/dist/components/components/ImageUploader.d.ts +0 -15
- package/dist/components/components/InnerForm.d.ts +0 -17
- package/dist/components/components/Label.d.ts +0 -9
- package/dist/components/components/LoadingScreen.d.ts +0 -2
- package/dist/components/components/Uploader.d.ts +0 -8
- package/dist/components/components/index.d.ts +0 -8
- package/dist/components/components/list/Datagrid.d.ts +0 -9
- package/dist/components/components/list/EmptyList.d.ts +0 -2
- package/dist/components/components/list/FilterPopup.d.ts +0 -11
- package/dist/components/components/list/ListPage.d.ts +0 -20
- package/dist/components/components/list/Pagination.d.ts +0 -11
- package/dist/components/components/list/index.d.ts +0 -0
- package/dist/components/pages/ControllerDetails.d.ts +0 -5
- package/dist/components/pages/FormPage.d.ts +0 -18
- package/dist/components/pages/ListPage.d.ts +0 -18
- package/dist/components/pages/Login.d.ts +0 -13
- package/dist/decorators/Crud.d.ts +0 -6
- package/dist/decorators/form/FormOptions.d.ts +0 -7
- package/dist/decorators/form/getFormFields.d.ts +0 -3
- package/dist/decorators/list/GetCellFields.d.ts +0 -2
- package/dist/decorators/list/ImageCell.d.ts +0 -6
- package/dist/decorators/list/ListData.d.ts +0 -6
- package/dist/decorators/list/getListFields.d.ts +0 -2
- package/dist/initPanel.d.ts +0 -2
- package/dist/types/Screen.d.ts +0 -4
- package/dist/types/ScreenCreatorData.d.ts +0 -13
- package/dist/types/getDetailsData.d.ts +0 -1
- package/dist/types/initPanelOptions.d.ts +0 -2
- package/dist/utils/createScreens.d.ts +0 -1
- package/dist/utils/getFields.d.ts +0 -3
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface PaginationProps {
|
|
3
|
-
pagination: {
|
|
4
|
-
total: number;
|
|
5
|
-
page: number;
|
|
6
|
-
limit: number;
|
|
7
|
-
};
|
|
8
|
-
onPageChange: (page: number) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare function Pagination({ pagination, onPageChange }: PaginationProps): React.JSX.Element | null;
|
|
11
|
-
export {};
|
|
File without changes
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnyClass } from '../../types/AnyClass';
|
|
3
|
-
import { InputOptions } from '../../decorators/form/Input';
|
|
4
|
-
export type GetDetailsDataFN<T> = (param: Record<string, string>) => Promise<T>;
|
|
5
|
-
export type OnSubmitFN<T> = (data: T) => Promise<T>;
|
|
6
|
-
export interface FormPageProps<T extends AnyClass> {
|
|
7
|
-
model: any;
|
|
8
|
-
getDetailsData?: GetDetailsDataFN<T>;
|
|
9
|
-
redirect?: string;
|
|
10
|
-
onSubmit: OnSubmitFN<T>;
|
|
11
|
-
onSelectPreloader?: (inputOptions: InputOptions) => Promise<{
|
|
12
|
-
label: string;
|
|
13
|
-
value: string;
|
|
14
|
-
}[]>;
|
|
15
|
-
redirectBackOnSuccess?: boolean;
|
|
16
|
-
type?: 'json' | 'formData';
|
|
17
|
-
}
|
|
18
|
-
export declare function FormPage<T extends AnyClass>({ model, getDetailsData, onSubmit, redirect, onSelectPreloader, redirectBackOnSuccess, type, ...rest }: FormPageProps<T>): React.JSX.Element;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnyClass } from '../../types/AnyClass';
|
|
3
|
-
export interface PaginationParams {
|
|
4
|
-
page?: number;
|
|
5
|
-
limit?: number;
|
|
6
|
-
filters?: Record<string, any>;
|
|
7
|
-
}
|
|
8
|
-
export interface PaginatedResponse<T> {
|
|
9
|
-
data: T[];
|
|
10
|
-
total: number;
|
|
11
|
-
page: number;
|
|
12
|
-
limit: number;
|
|
13
|
-
}
|
|
14
|
-
export type GetDataForList<T> = (params: PaginationParams) => Promise<PaginatedResponse<T>>;
|
|
15
|
-
export declare function ListPage<T extends AnyClass>({ model, getData, }: {
|
|
16
|
-
model: T;
|
|
17
|
-
getData: GetDataForList<T>;
|
|
18
|
-
}): React.JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type OnLogin = {
|
|
3
|
-
login: (username: string, password: string) => Promise<LoginResponse>;
|
|
4
|
-
};
|
|
5
|
-
interface LoginResponse {
|
|
6
|
-
user: any;
|
|
7
|
-
token: string;
|
|
8
|
-
}
|
|
9
|
-
interface LoginProps {
|
|
10
|
-
onLogin: OnLogin;
|
|
11
|
-
}
|
|
12
|
-
export declare function Login({ onLogin }: LoginProps): React.JSX.Element;
|
|
13
|
-
export {};
|
package/dist/initPanel.d.ts
DELETED
package/dist/types/Screen.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CellOptions } from '../decorators/list/Cell';
|
|
2
|
-
import { CrudOptions } from '../decorators/Crud';
|
|
3
|
-
import { InputOptions } from '../decorators/form/Input';
|
|
4
|
-
import { ListOptions } from '../decorators/list/List';
|
|
5
|
-
export interface ScreenCreatorData {
|
|
6
|
-
resolver: any;
|
|
7
|
-
fields: string[];
|
|
8
|
-
inputs: InputOptions[];
|
|
9
|
-
crud?: CrudOptions;
|
|
10
|
-
path: string;
|
|
11
|
-
list?: ListOptions<any>;
|
|
12
|
-
cells: CellOptions[];
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type GetDetailsDataFN<T> = (param: Record<string, string>) => Promise<T>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function createScreens(screens: Record<string, any>): void;
|