@asaleh37/ui-base 1.2.0 → 1.2.2

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 (74) hide show
  1. package/.env +4 -0
  2. package/.env.development +1 -0
  3. package/.env.production +1 -0
  4. package/dist/index.d.ts +18 -37
  5. package/dist/index.js +5 -5
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +5 -5
  8. package/dist/index.mjs.map +1 -1
  9. package/index.html +13 -0
  10. package/package.json +1 -1
  11. package/public/__logo.png +0 -0
  12. package/public/logo.png +0 -0
  13. package/public/vite.svg +1 -0
  14. package/rollup.config-1748377725725.cjs +16 -16
  15. package/src/assets/logo.png +0 -0
  16. package/src/components/App.tsx +39 -9
  17. package/src/components/BaseApp.tsx +37 -25
  18. package/src/components/admin/AttachmentGrid.tsx +1 -1
  19. package/src/components/admin/AuthorityGrid.tsx +1 -1
  20. package/src/components/admin/BluePrintGrid.tsx +1 -1
  21. package/src/components/admin/BluePrintPageGrid.tsx +1 -1
  22. package/src/components/admin/BluePrintPointGrid.tsx +1 -1
  23. package/src/components/admin/DashboardGrid.tsx +1 -1
  24. package/src/components/admin/DashboardWidgetGrid.tsx +1 -1
  25. package/src/components/admin/DataQueryGrid.tsx +1 -1
  26. package/src/components/admin/DataQueryParameterGrid.tsx +1 -1
  27. package/src/components/admin/DatasourceConnectionGrid.tsx +1 -1
  28. package/src/components/admin/EmployeeGrid.tsx +1 -1
  29. package/src/components/admin/EntityParameterGrid.tsx +1 -1
  30. package/src/components/admin/ExcelUploaderDetailGrid.tsx +1 -1
  31. package/src/components/admin/ExcelUploaderHeaderGrid.tsx +1 -1
  32. package/src/components/admin/LookupGrid.tsx +1 -1
  33. package/src/components/admin/MailAttachmentGrid.tsx +1 -1
  34. package/src/components/admin/MailBodyGrid.tsx +1 -1
  35. package/src/components/admin/MailNotificationQueueGrid.tsx +1 -1
  36. package/src/components/admin/MailRecipientGrid.tsx +1 -1
  37. package/src/components/admin/MailTemplateGrid.tsx +1 -1
  38. package/src/components/admin/NewTableGrid.tsx +1 -1
  39. package/src/components/admin/NotificationGrid.tsx +1 -1
  40. package/src/components/admin/NotificationQueueGrid.tsx +1 -1
  41. package/src/components/admin/OrganizationApplicationGrid.tsx +1 -1
  42. package/src/components/admin/OrganizationGrid.tsx +1 -1
  43. package/src/components/admin/OrganizationRankGrid.tsx +1 -1
  44. package/src/components/admin/OrganizationUnitGrid.tsx +1 -1
  45. package/src/components/admin/OrganizationUserGrid.tsx +1 -1
  46. package/src/components/admin/OrganizationUserRoleGrid.tsx +1 -1
  47. package/src/components/admin/ReportGrid.tsx +1 -1
  48. package/src/components/admin/ReportParameterGrid.tsx +1 -1
  49. package/src/components/admin/RoleAuthoritiesForm.tsx +65 -0
  50. package/src/components/admin/RoleAuthorityGrid.tsx +1 -1
  51. package/src/components/admin/RoleGrid.tsx +68 -14
  52. package/src/components/admin/UserAccountGrid.tsx +1 -1
  53. package/src/components/admin/UserRequestGrid.tsx +1 -1
  54. package/src/components/admin/WidgetGrid.tsx +1 -1
  55. package/src/components/admin/WorkflowDocumentActionGrid.tsx +1 -1
  56. package/src/components/admin/WorkflowDocumentActionHistoryGrid.tsx +1 -1
  57. package/src/components/admin/WorkflowDocumentActionMailGrid.tsx +1 -1
  58. package/src/components/admin/WorkflowDocumentGrid.tsx +1 -1
  59. package/src/components/admin/WorkflowDocumentMailLogGrid.tsx +1 -1
  60. package/src/components/admin/WorkflowDocumentStatusGrid.tsx +1 -1
  61. package/src/components/common/Home.tsx +3 -0
  62. package/src/components/common/Login.tsx +10 -3
  63. package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +1 -1
  64. package/src/components/templates/TransferList.tsx +4 -7
  65. package/src/hooks/index.ts +1 -0
  66. package/src/{components/templates/DataEntryTemplates → hooks}/useApiActions.ts +4 -5
  67. package/src/layout/Layout.tsx +36 -29
  68. package/src/main.tsx +25 -0
  69. package/src/redux/features/CounterSlice.tsx +13 -0
  70. package/src/redux/features/common/AppInfoSlice.ts +1 -1
  71. package/src/redux/features/common/CommonStoreSlice.ts +19 -5
  72. package/src/redux/store.ts +25 -24
  73. package/src/util/constants.ts +5 -1
  74. package/vite.config.ts +10 -0
package/.env ADDED
@@ -0,0 +1,4 @@
1
+ VITE_APP_VERSION=0.6
2
+ VITE_APP_NAME=Ezzsteel Flat Product Management
3
+ VITE_LOGIN_METHOD=APP
4
+ VITE_APP_TITLE=Ezzsteel Flat Product
@@ -0,0 +1 @@
1
+ VITE_API_URL=http://localhost:8080/as-api
@@ -0,0 +1 @@
1
+ VITE_API_URL=https://ezzfpmapi.ezzsteel.com.eg/ezz-fpm-api
package/dist/index.d.ts CHANGED
@@ -52,7 +52,7 @@ type AppInfo = {
52
52
  };
53
53
  muiPremiumKey: string;
54
54
  enableAdministrationModule: boolean;
55
- appTheme: {
55
+ appTheme?: {
56
56
  light: {
57
57
  primaryColor: string;
58
58
  secondaryColor: string;
@@ -160,12 +160,23 @@ declare const DatetimeField: React.FC<DatetimeFieldProps>;
160
160
 
161
161
  declare const TemplateTextField: React.FC<Omit<TextFieldProps, "outlined">>;
162
162
 
163
+ type ApiActionsProps = {
164
+ findAll?: string;
165
+ commonStoreKey?: string;
166
+ setData?: any;
167
+ findById?: string;
168
+ findByIdParamName?: string;
169
+ save?: string;
170
+ deleteById?: string;
171
+ deleteByIdParamName?: string;
172
+ };
163
173
  type ApiActions = {
164
174
  reloadData: (params?: any) => Promise<void>;
165
175
  saveRecord: (record: any) => Promise<any | null>;
166
176
  loadRecordById: (recordId: any) => Promise<any>;
167
177
  deleteRecordById: (recordId: any) => Promise<boolean>;
168
178
  };
179
+ declare const useApiActions: (apiActionsProps: ApiActionsProps) => ApiActions;
169
180
 
170
181
  type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
171
182
  type RecordAction = {
@@ -423,42 +434,8 @@ declare const useLoadingMask: () => {
423
434
 
424
435
  declare const useIsMobile: (breakpoint?: number) => boolean;
425
436
 
426
- interface OrganizationProps {
427
- organizationCode?: string;
428
- organizationName?: string;
429
- }
430
- interface UserProfileProps {
431
- username?: string;
432
- currentOrganizationCode?: string;
433
- userOrganizations?: Array<OrganizationProps>;
434
- employeeNumber?: string;
435
- employeeName?: string;
436
- divisionCode?: string;
437
- divisionName?: string;
438
- departmentCode?: string;
439
- departmentName?: string;
440
- rankCode?: string;
441
- rankName?: string;
442
- sectionCode?: string;
443
- sectionName?: string;
444
- subsectionCode?: string;
445
- subsectionName?: string;
446
- extNumber?: string;
447
- mobileNumber?: string;
448
- email?: string;
449
- }
450
- interface UserSessionProps {
451
- value: {
452
- isAuthenticated: boolean | null;
453
- userProfile: UserProfileProps | null;
454
- authorities: Array<{
455
- authority: string;
456
- }>;
457
- };
458
- }
459
-
460
437
  declare const useSession: () => {
461
- UserSession: UserSessionProps;
438
+ UserSession: any;
462
439
  isUserAuthorized: (authorityCode: string) => boolean;
463
440
  };
464
441
 
@@ -487,6 +464,10 @@ declare function capitalizeFirstLetter(str: string): string;
487
464
 
488
465
  declare const DATE_FORMAT = "YYYY-MM-DD";
489
466
  declare const DATE_TIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
467
+ declare const LIGHT_THEME_INITIAL_MAIN_COLOR = "#37505C";
468
+ declare const LIGHT_THEME_INITIAL_SECANDARY_COLOR = "#ff6d00";
469
+ declare const DARK_THEME_INITIAL_MAIN_COLOR = "#ea690e";
470
+ declare const DARK_THEME_INITIAL_SECANDARY_COLOR = "#74776B";
490
471
 
491
- export { BaseApp, CheckBox, ComboBox, DATE_FORMAT, DATE_TIME_FORMAT, Datefield, DatetimeField, TemplateBarChart, TemplateDashboard, TemplateDataCard, TemplateForm, TemplateGauge, TemplateGrid, TemplateLineChart, TemplateLineProgress, TemplatePieChart, TemplateTextField, TransferList, capitalizeFirstLetter, hasDigitsOnly, isNumber, isNumeric, useAxios, useConfirmationWindow, useIsMobile, useLoadingMask, useSession, useWindow };
472
+ export { BaseApp, CheckBox, ComboBox, DARK_THEME_INITIAL_MAIN_COLOR, DARK_THEME_INITIAL_SECANDARY_COLOR, DATE_FORMAT, DATE_TIME_FORMAT, Datefield, DatetimeField, LIGHT_THEME_INITIAL_MAIN_COLOR, LIGHT_THEME_INITIAL_SECANDARY_COLOR, TemplateBarChart, TemplateDashboard, TemplateDataCard, TemplateForm, TemplateGauge, TemplateGrid, TemplateLineChart, TemplateLineProgress, TemplatePieChart, TemplateTextField, TransferList, capitalizeFirstLetter, hasDigitsOnly, isNumber, isNumeric, useApiActions, useAxios, useConfirmationWindow, useIsMobile, useLoadingMask, useSession, useWindow };
492
473
  export type { DashboardProps, EditDeleteAction, FormActionProps, FormElementFieldProps, FormElementGroupProps, FormElementNodeProps, FormElementProps, FormElementSize, MakeOptional, ModalFormProps, RecordAction, RecordFieldProps, TemplateFormProps, TemplateGridColDef, TemplateGridColumnProps, TemplateGridProps, TemplateGridTopBarProps, TransferListProps };