proje-react-panel 1.5.0 → 1.6.0-test-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.
Files changed (43) hide show
  1. package/.cursor/rules.md +11 -1
  2. package/AUTH_LAYOUT_EXAMPLE.md +343 -0
  3. package/AUTH_LAYOUT_GUIDE.md +819 -0
  4. package/IMPLEMENTATION_GUIDE.md +899 -0
  5. package/dist/api/ApiConfig.d.ts +11 -0
  6. package/dist/api/AuthApi.d.ts +2 -5
  7. package/dist/api/CrudApi.d.ts +11 -12
  8. package/dist/components/list/cells/BooleanCell.d.ts +5 -2
  9. package/dist/components/list/cells/DateCell.d.ts +5 -2
  10. package/dist/components/list/cells/DefaultCell.d.ts +3 -2
  11. package/dist/components/list/cells/DownloadCell.d.ts +3 -2
  12. package/dist/components/list/cells/ImageCell.d.ts +3 -2
  13. package/dist/components/list/cells/UUIDCell.d.ts +5 -2
  14. package/dist/decorators/auth/DefaultLoginForm.d.ts +4 -0
  15. package/dist/decorators/list/Cell.d.ts +4 -0
  16. package/dist/decorators/list/List.d.ts +7 -2
  17. package/dist/index.cjs.js +15 -1
  18. package/dist/index.d.ts +5 -0
  19. package/dist/index.esm.js +15 -1
  20. package/dist/types/Login.d.ts +8 -0
  21. package/package.json +3 -1
  22. package/src/api/ApiConfig.ts +63 -0
  23. package/src/api/AuthApi.ts +8 -0
  24. package/src/api/CrudApi.ts +96 -60
  25. package/src/components/list/CellField.tsx +19 -10
  26. package/src/components/list/Datagrid.tsx +26 -12
  27. package/src/components/list/cells/BooleanCell.tsx +7 -2
  28. package/src/components/list/cells/DateCell.tsx +6 -2
  29. package/src/components/list/cells/DefaultCell.tsx +4 -4
  30. package/src/components/list/cells/DownloadCell.tsx +4 -2
  31. package/src/components/list/cells/ImageCell.tsx +4 -2
  32. package/src/components/list/cells/LinkCell.tsx +3 -2
  33. package/src/components/list/cells/UUIDCell.tsx +6 -2
  34. package/src/decorators/auth/DefaultLoginForm.ts +32 -0
  35. package/src/decorators/list/Cell.ts +4 -0
  36. package/src/decorators/list/List.ts +3 -2
  37. package/src/index.ts +25 -0
  38. package/src/store/store.ts +1 -1
  39. package/src/styles/components/button.scss +14 -0
  40. package/src/styles/index.scss +1 -1
  41. package/src/styles/list.scss +8 -1
  42. package/src/types/Login.ts +9 -0
  43. package/src/utils/logout.ts +2 -0
@@ -11,8 +11,8 @@
11
11
  @import './components/uploader.scss';
12
12
  @import './components/checkbox';
13
13
  @import './components/form-header';
14
+ @import './components/button';
14
15
  @import './details';
15
-
16
16
  //TODO: import deprecated
17
17
  .layout {
18
18
  display: flex;
@@ -86,14 +86,18 @@ $datagrid-height: calc(100vh - #{$header-height} - #{$footer-height});
86
86
  }
87
87
 
88
88
  .datagrid-table {
89
- width: 100%;
89
+ min-width: 100%;
90
+ table-layout: fixed;
90
91
  border-collapse: collapse;
92
+ position: relative;
91
93
 
92
94
  th,
93
95
  td {
94
96
  padding: 12px 16px;
95
97
  text-align: left;
96
98
  border-bottom: 1px solid #444444;
99
+ text-overflow: ellipsis;
100
+ white-space: nowrap;
97
101
  }
98
102
 
99
103
  th {
@@ -265,3 +269,6 @@ $datagrid-height: calc(100vh - #{$header-height} - #{$footer-height});
265
269
  }
266
270
  }
267
271
  }
272
+ .util-cell-link {
273
+ cursor: pointer;
274
+ }
@@ -0,0 +1,9 @@
1
+ export interface LoginResponse<T> {
2
+ access_token: string;
3
+ admin: T;
4
+ }
5
+
6
+ export interface LoginForm {
7
+ username: string;
8
+ password: string;
9
+ }
@@ -1,6 +1,8 @@
1
+ import { setAuthLogout } from '../api/ApiConfig';
1
2
  import { useAppStore } from '../store/store';
2
3
 
3
4
  export function logout(navigate: () => void) {
5
+ setAuthLogout();
4
6
  localStorage.removeItem('token');
5
7
  useAppStore.getState().logout();
6
8
  navigate();