proje-react-panel 1.0.17 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Counter.d.ts +9 -0
- package/dist/components/DetailsPage.d.ts +7 -0
- package/dist/components/ErrorBoundary.d.ts +16 -0
- package/dist/components/ErrorComponent.d.ts +4 -0
- package/dist/components/LoadingScreen.d.ts +2 -0
- package/dist/components/Login.d.ts +13 -0
- package/dist/components/Panel.d.ts +1 -3
- package/dist/components/components/Checkbox.d.ts +3 -2
- package/dist/components/components/FormField.d.ts +5 -1
- package/dist/components/components/InnerForm.d.ts +8 -3
- package/dist/components/components/Label.d.ts +3 -2
- package/dist/components/components/Uploader.d.ts +8 -0
- package/dist/components/components/index.d.ts +1 -1
- package/dist/components/components/list/ListPage.d.ts +1 -1
- package/dist/components/form/Checkbox.d.ts +7 -0
- package/dist/components/form/FormField.d.ts +17 -0
- package/dist/components/form/FormPage.d.ts +6 -0
- package/dist/components/form/InnerForm.d.ts +10 -0
- package/dist/components/form/Label.d.ts +9 -0
- package/dist/components/form/Select.d.ts +8 -0
- package/dist/components/form/SelectStyles.d.ts +7 -0
- package/dist/components/form/Uploader.d.ts +8 -0
- package/dist/components/layout/Layout.d.ts +3 -4
- package/dist/components/layout/SideBar.d.ts +2 -3
- package/dist/components/list/CellField.d.ts +9 -0
- package/dist/components/list/Datagrid.d.ts +6 -8
- package/dist/components/list/FilterPopup.d.ts +7 -5
- package/dist/components/list/ListHeader.d.ts +11 -0
- package/dist/components/list/ListPage.d.ts +6 -0
- package/dist/components/pages/FormPage.d.ts +8 -2
- package/dist/decorators/details/Details.d.ts +11 -0
- package/dist/decorators/details/DetailsItem.d.ts +11 -0
- package/dist/decorators/details/getDetailsPageMeta.d.ts +8 -0
- package/dist/decorators/form/Form.d.ts +16 -5
- package/dist/decorators/form/Input.d.ts +14 -9
- package/dist/decorators/form/getFormPageMeta.d.ts +10 -0
- package/dist/decorators/form/inputs/SelectInput.d.ts +23 -0
- package/dist/decorators/list/Cell.d.ts +13 -1
- package/dist/decorators/list/List.d.ts +18 -1
- package/dist/decorators/list/cells/ImageCell.d.ts +9 -0
- package/dist/decorators/list/getListPageMeta.d.ts +8 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +13 -17
- package/dist/index.esm.js +1 -1
- package/dist/initPanel.d.ts +1 -1
- package/dist/store/store.d.ts +0 -3
- package/dist/types/AnyClass.d.ts +2 -1
- package/dist/types/getDetailsData.d.ts +1 -0
- package/dist/types/initPanelOptions.d.ts +0 -1
- package/package.json +1 -1
- package/src/assets/icons/svg/check.svg +4 -0
- package/src/assets/icons/svg/cross.svg +4 -0
- package/src/components/DetailsPage.tsx +55 -0
- package/src/components/{components/ErrorComponent.tsx → ErrorComponent.tsx} +1 -1
- package/src/components/{pages/Login.tsx → Login.tsx} +2 -2
- package/src/components/Panel.tsx +4 -5
- package/src/components/form/Checkbox.tsx +21 -0
- package/src/components/{components → form}/FormField.tsx +22 -30
- package/src/components/form/FormPage.tsx +32 -0
- package/src/components/form/InnerForm.tsx +84 -0
- package/src/components/form/Label.tsx +21 -0
- package/src/components/form/Select.tsx +51 -0
- package/src/components/form/SelectStyles.ts +73 -0
- package/src/components/form/Uploader.tsx +66 -0
- package/src/components/layout/Layout.tsx +29 -32
- package/src/components/layout/SideBar.tsx +4 -13
- package/src/components/list/CellField.tsx +63 -0
- package/src/components/list/Datagrid.tsx +106 -0
- package/src/components/{components/list → list}/FilterPopup.tsx +13 -9
- package/src/components/list/ListHeader.tsx +47 -0
- package/src/components/{components/list → list}/ListPage.tsx +20 -82
- package/src/decorators/details/Details.ts +31 -0
- package/src/decorators/details/DetailsItem.ts +40 -0
- package/src/decorators/details/getDetailsPageMeta.ts +15 -0
- package/src/decorators/form/Form.ts +38 -12
- package/src/decorators/form/Input.ts +31 -9
- package/src/decorators/form/getFormPageMeta.ts +21 -0
- package/src/decorators/form/inputs/SelectInput.ts +19 -0
- package/src/decorators/list/Cell.ts +41 -1
- package/src/decorators/list/List.ts +30 -6
- package/src/decorators/list/cells/ImageCell.ts +17 -0
- package/src/decorators/list/getListPageMeta.ts +16 -0
- package/src/index.ts +33 -24
- package/src/initPanel.ts +1 -4
- package/src/store/store.ts +0 -5
- package/src/styles/components/checkbox.scss +42 -0
- package/src/styles/components/uploader.scss +86 -0
- package/src/styles/details.scss +62 -0
- package/src/styles/form.scss +9 -11
- package/src/styles/index.scss +26 -12
- package/src/styles/list.scss +3 -1
- package/src/types/AnyClass.ts +2 -1
- package/src/types/initPanelOptions.ts +1 -3
- package/src/components/components/Checkbox.tsx +0 -9
- package/src/components/components/ImageUploader.tsx +0 -301
- package/src/components/components/InnerForm.tsx +0 -74
- package/src/components/components/Label.tsx +0 -15
- package/src/components/components/index.ts +0 -8
- package/src/components/components/list/Datagrid.tsx +0 -127
- package/src/components/pages/ControllerDetails.tsx +0 -37
- package/src/components/pages/FormPage.tsx +0 -34
- package/src/decorators/Crud.ts +0 -20
- package/src/decorators/form/FormOptions.ts +0 -8
- package/src/decorators/form/getFormFields.ts +0 -13
- package/src/decorators/list/GetCellFields.ts +0 -13
- package/src/decorators/list/ImageCell.ts +0 -13
- package/src/decorators/list/ListData.ts +0 -7
- package/src/decorators/list/getListFields.ts +0 -10
- package/src/styles/image-uploader.scss +0 -94
- package/src/types/Screen.ts +0 -4
- package/src/types/ScreenCreatorData.ts +0 -14
- package/src/utils/createScreens.ts +0 -5
- package/src/utils/getFields.ts +0 -22
- /package/src/components/{components/Counter.tsx → Counter.tsx} +0 -0
- /package/src/components/{components/ErrorBoundary.tsx → ErrorBoundary.tsx} +0 -0
- /package/src/components/{components/LoadingScreen.tsx → LoadingScreen.tsx} +0 -0
- /package/src/components/{components/list → list}/EmptyList.tsx +0 -0
- /package/src/components/{components/list → list}/Pagination.tsx +0 -0
- /package/src/components/{components/list → list}/index.ts +0 -0
@@ -1,94 +0,0 @@
|
|
1
|
-
.multi-image {
|
2
|
-
|
3
|
-
&.hover {
|
4
|
-
.container {
|
5
|
-
border: 2px solid rgb(160,160,160);
|
6
|
-
background-color: rgb(250,250,250);
|
7
|
-
|
8
|
-
.plus {
|
9
|
-
background-color: rgb(240,240,240);
|
10
|
-
}
|
11
|
-
}
|
12
|
-
}
|
13
|
-
|
14
|
-
&.after {
|
15
|
-
.container {
|
16
|
-
button.trash {display:block;
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
|
-
.container {
|
22
|
-
width: 100%;
|
23
|
-
display: grid;
|
24
|
-
grid-column-gap: 50px;
|
25
|
-
grid-template-columns: 1fr 1fr 1fr;
|
26
|
-
align-items: center;
|
27
|
-
border: 2px dashed rgb(160,160,160);
|
28
|
-
background-color: white;
|
29
|
-
min-height: 200px;
|
30
|
-
padding: 10px;
|
31
|
-
position:relative;
|
32
|
-
|
33
|
-
button.trash {
|
34
|
-
display:none;
|
35
|
-
position: absolute;
|
36
|
-
z-index: 1000;
|
37
|
-
right: 0;
|
38
|
-
top: 0;
|
39
|
-
background: none;
|
40
|
-
border: none;
|
41
|
-
cursor: pointer;
|
42
|
-
color: rgb(50,50,50);
|
43
|
-
}
|
44
|
-
|
45
|
-
> div {
|
46
|
-
text-align: center;
|
47
|
-
}
|
48
|
-
|
49
|
-
.image-container {
|
50
|
-
border: 1px solid rgb(245,245,255);
|
51
|
-
padding: 5px;
|
52
|
-
background-color: white;
|
53
|
-
position: relative;
|
54
|
-
|
55
|
-
.image.removed {
|
56
|
-
opacity: 0.3;
|
57
|
-
}
|
58
|
-
|
59
|
-
button {
|
60
|
-
position: absolute;
|
61
|
-
right: 0;
|
62
|
-
top: 0;
|
63
|
-
background: none;
|
64
|
-
border: none;
|
65
|
-
cursor: pointer;
|
66
|
-
|
67
|
-
&.remove {
|
68
|
-
color: red;
|
69
|
-
}
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
.plus {
|
74
|
-
background-color: rgb(245,245,245);
|
75
|
-
position: relative;
|
76
|
-
height: 180px;
|
77
|
-
width: 200px;
|
78
|
-
|
79
|
-
span {
|
80
|
-
display: block;
|
81
|
-
position: absolute;
|
82
|
-
top: 50%;
|
83
|
-
left: 50%;
|
84
|
-
transform: translate(-50%,-50%);
|
85
|
-
|
86
|
-
> * {
|
87
|
-
display: block;
|
88
|
-
margin: 0 auto;
|
89
|
-
text-align: center;
|
90
|
-
}
|
91
|
-
}
|
92
|
-
}
|
93
|
-
}
|
94
|
-
}
|
package/src/types/Screen.ts
DELETED
@@ -1,14 +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
|
-
//TODO: remove
|
6
|
-
export interface ScreenCreatorData {
|
7
|
-
resolver: any;
|
8
|
-
fields: string[];
|
9
|
-
inputs: InputOptions[];
|
10
|
-
crud?: CrudOptions;
|
11
|
-
path: string;
|
12
|
-
list?: ListOptions<any>;
|
13
|
-
cells: CellOptions[];
|
14
|
-
}
|
package/src/utils/getFields.ts
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
import { getMetadataStorage } from "class-validator";
|
2
|
-
import { classValidatorResolver } from "@hookform/resolvers/class-validator";
|
3
|
-
import { ScreenCreatorData } from "../types/ScreenCreatorData";
|
4
|
-
import { getInputFields } from "../decorators/form/Input";
|
5
|
-
import { getClassListData } from "../decorators/list/List";
|
6
|
-
import { getCellFields } from "../decorators/list/GetCellFields";
|
7
|
-
import { AnyClass } from "../types/AnyClass";
|
8
|
-
|
9
|
-
export function getFields<T extends AnyClass>(key: string, entityClass: T): ScreenCreatorData {
|
10
|
-
const metadataStorage = getMetadataStorage();
|
11
|
-
const targetMetadata = metadataStorage.getTargetValidationMetadatas(entityClass as any, "", false, false);
|
12
|
-
const listData = getClassListData(entityClass);
|
13
|
-
return {
|
14
|
-
resolver: classValidatorResolver(entityClass as any),
|
15
|
-
cells: getCellFields(entityClass),
|
16
|
-
list: listData,
|
17
|
-
fields: Array.from(new Set(targetMetadata.map((meta) => meta.propertyName))),
|
18
|
-
inputs: getInputFields<T>(entityClass),
|
19
|
-
crud: { controller: "" },
|
20
|
-
path: "/" + key,
|
21
|
-
};
|
22
|
-
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|