proje-react-panel 1.1.3 → 1.1.5
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 +21 -95
- package/.vscode/settings.json +6 -1
- package/PTD.md +124 -24
- package/dist/components/DetailsPage.d.ts +2 -2
- package/dist/components/ErrorComponent.d.ts +3 -2
- package/dist/components/LoadingScreen.d.ts +3 -1
- package/dist/components/Login.d.ts +2 -2
- package/dist/components/Panel.d.ts +2 -2
- package/dist/components/form/FormField.d.ts +1 -5
- package/dist/components/form/FormHeader.d.ts +10 -0
- package/dist/components/form/FormPage.d.ts +12 -1
- package/dist/components/form/Select.d.ts +1 -1
- package/dist/components/form/SelectStyles.d.ts +3 -3
- package/dist/components/list/CellField.d.ts +2 -3
- package/dist/components/list/EmptyList.d.ts +1 -1
- package/dist/decorators/details/Details.d.ts +1 -2
- package/dist/decorators/form/Form.d.ts +6 -4
- package/dist/decorators/form/Input.d.ts +10 -2
- package/dist/decorators/form/inputs/SelectInput.d.ts +8 -7
- package/dist/decorators/list/Cell.d.ts +3 -3
- package/dist/decorators/list/List.d.ts +3 -4
- package/dist/decorators/list/getListPageMeta.d.ts +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/store/store.d.ts +1 -0
- package/dist/utils/decerators.d.ts +3 -3
- package/eslint.config.mjs +60 -0
- package/package.json +7 -3
- package/src/api/CrudApi.ts +59 -53
- package/src/components/DetailsPage.tsx +12 -9
- package/src/components/ErrorComponent.tsx +36 -33
- package/src/components/LoadingScreen.tsx +4 -3
- package/src/components/Login.tsx +11 -4
- package/src/components/Panel.tsx +10 -6
- package/src/components/form/Checkbox.tsx +1 -1
- package/src/components/form/FormField.tsx +13 -9
- package/src/components/form/FormHeader.tsx +18 -0
- package/src/components/form/FormPage.tsx +146 -5
- package/src/components/form/InnerForm.tsx +24 -8
- package/src/components/form/Select.tsx +14 -12
- package/src/components/form/SelectStyles.ts +4 -4
- package/src/components/layout/Layout.tsx +1 -7
- package/src/components/layout/SideBar.tsx +1 -2
- package/src/components/list/CellField.tsx +2 -5
- package/src/components/list/Datagrid.tsx +0 -1
- package/src/components/list/EmptyList.tsx +2 -2
- package/src/components/list/FilterPopup.tsx +4 -2
- package/src/components/list/ListPage.tsx +11 -8
- package/src/components/list/cells/DefaultCell.tsx +2 -0
- package/src/decorators/details/Details.ts +2 -2
- package/src/decorators/details/DetailsItem.ts +2 -0
- package/src/decorators/form/Form.ts +13 -10
- package/src/decorators/form/Input.ts +18 -9
- package/src/decorators/form/inputs/SelectInput.ts +8 -7
- package/src/decorators/list/Cell.ts +6 -4
- package/src/decorators/list/ExtendedCell.ts +1 -9
- package/src/decorators/list/List.ts +8 -4
- package/src/decorators/list/cells/ImageCell.ts +1 -1
- package/src/decorators/list/getListPageMeta.ts +4 -3
- package/src/store/store.ts +3 -1
- package/src/styles/components/form-header.scss +75 -0
- package/src/styles/index.scss +1 -0
- package/src/types/AnyClass.ts +3 -0
- package/src/utils/decerators.ts +3 -2
- package/.eslintrc.js +0 -23
- package/.eslintrc.json +0 -26
- package/src/initPanel.ts +0 -3
- package/src/types/initPanelOptions.ts +0 -1
@@ -0,0 +1,75 @@
|
|
1
|
+
.form-header {
|
2
|
+
display: flex;
|
3
|
+
justify-content: space-between;
|
4
|
+
align-items: center;
|
5
|
+
padding: 1rem;
|
6
|
+
margin-bottom: 1.5rem;
|
7
|
+
background-color: #333333;
|
8
|
+
border-radius: 8px 0 0 8px;
|
9
|
+
|
10
|
+
.form-title {
|
11
|
+
margin: 0;
|
12
|
+
font-size: 1.5rem;
|
13
|
+
font-weight: 600;
|
14
|
+
color: #cccccc;
|
15
|
+
}
|
16
|
+
|
17
|
+
.form-actions {
|
18
|
+
display: flex;
|
19
|
+
gap: 0.5rem;
|
20
|
+
align-items: center;
|
21
|
+
|
22
|
+
//keep this even its not used in project (it can be used in other projects)
|
23
|
+
.export-button,
|
24
|
+
.import-button {
|
25
|
+
padding: 0.5rem 1rem;
|
26
|
+
border: 1px solid #444444;
|
27
|
+
border-radius: 4px;
|
28
|
+
background-color: #222222;
|
29
|
+
color: #cccccc;
|
30
|
+
font-size: 0.875rem;
|
31
|
+
cursor: pointer;
|
32
|
+
transition: all 0.2s ease;
|
33
|
+
|
34
|
+
&:hover {
|
35
|
+
background-color: #444444;
|
36
|
+
border-color: #555555;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
&.dark-theme {
|
42
|
+
background-color: black;
|
43
|
+
box-shadow: none;
|
44
|
+
|
45
|
+
.form-title {
|
46
|
+
color: white;
|
47
|
+
}
|
48
|
+
|
49
|
+
.form-actions {
|
50
|
+
.export-button {
|
51
|
+
background-color: black;
|
52
|
+
border-color: black;
|
53
|
+
color: white;
|
54
|
+
|
55
|
+
&:hover {
|
56
|
+
background-color: black;
|
57
|
+
border-color: black;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
.import-button {
|
62
|
+
.import-label {
|
63
|
+
background-color: black;
|
64
|
+
border-color: black;
|
65
|
+
color: white;
|
66
|
+
|
67
|
+
&:hover {
|
68
|
+
background-color: black;
|
69
|
+
border-color: black;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
package/src/styles/index.scss
CHANGED
package/src/types/AnyClass.ts
CHANGED
package/src/utils/decerators.ts
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
export type DecoratorMap<T, K> = (
|
2
|
-
|
2
|
+
prop: { target: object; propertyKey: string | symbol },
|
3
3
|
options: T
|
4
4
|
) => K;
|
5
|
+
|
5
6
|
export function createDecorator<T extends { name?: string }, K>(
|
6
|
-
key:
|
7
|
+
key: symbol,
|
7
8
|
options?: T,
|
8
9
|
map?: DecoratorMap<T, K>
|
9
10
|
): PropertyDecorator {
|
package/.eslintrc.js
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
module.exports = {
|
2
|
-
root: true,
|
3
|
-
extends: ["eslint:recommended", "plugin:react/recommended"],
|
4
|
-
parser: "@typescript-eslint/parser",
|
5
|
-
plugins: ["@typescript-eslint"],
|
6
|
-
settings: {
|
7
|
-
react: {
|
8
|
-
version: "detect"
|
9
|
-
}
|
10
|
-
},
|
11
|
-
overrides: [
|
12
|
-
{
|
13
|
-
files: ["*.ts", "*.tsx"],
|
14
|
-
rules: {
|
15
|
-
semi: 0,
|
16
|
-
"@typescript-eslint/no-shadow": ["error"],
|
17
|
-
"no-shadow": "off",
|
18
|
-
"no-undef": "off",
|
19
|
-
"no-unused-vars": "off",
|
20
|
-
},
|
21
|
-
},
|
22
|
-
],
|
23
|
-
};
|
package/.eslintrc.json
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"extends": [
|
3
|
-
"eslint:recommended",
|
4
|
-
"plugin:react/recommended",
|
5
|
-
"plugin:react-hooks/recommended"
|
6
|
-
],
|
7
|
-
"plugins": ["react", "react-hooks"],
|
8
|
-
"rules": {
|
9
|
-
"react/function-component-definition": [
|
10
|
-
"error",
|
11
|
-
{
|
12
|
-
"namedComponents": "function-declaration",
|
13
|
-
"unnamedComponents": "function-declaration"
|
14
|
-
}
|
15
|
-
],
|
16
|
-
"import/prefer-default-export": "off",
|
17
|
-
"react/prefer-stateless-function": "error",
|
18
|
-
"react/no-this-in-sfc": "error",
|
19
|
-
"react-hooks/exhaustive-deps": "warn"
|
20
|
-
},
|
21
|
-
"settings": {
|
22
|
-
"react": {
|
23
|
-
"version": "detect"
|
24
|
-
}
|
25
|
-
}
|
26
|
-
}
|
package/src/initPanel.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export interface InitPanelOptions {}
|