@asaleh37/ui-base 25.6.2-0.4 → 25.6.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.
- package/README.md +51 -51
- package/dist/index.d.ts +0 -4
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/eslint.config.js +29 -29
- package/index.html +13 -13
- package/package.json +120 -120
- package/rollup.config-1748377725725.cjs +50 -50
- package/rollup.config.js +45 -45
- package/src/components/App.tsx +123 -123
- package/src/components/BaseApp.tsx +53 -53
- package/src/components/administration/admin/OrgMemberRoleForm.tsx +83 -83
- package/src/components/administration/admin/OrganizationApplicationModuleGrid.tsx +107 -107
- package/src/components/administration/admin/OrganizationGrid.tsx +82 -83
- package/src/components/administration/admin/OrganizationMemberGrid.tsx +176 -176
- package/src/components/administration/admin/OrganizationMemberRoleGrid.tsx +87 -87
- package/src/components/administration/admin/OrganizationRankGrid.tsx +133 -133
- package/src/components/administration/admin/OrganizationUnitGrid.tsx +143 -143
- package/src/components/administration/admin/OrganizationUnitTypeGrid.tsx +108 -108
- package/src/components/administration/admin/PersonGrid.tsx +231 -334
- package/src/components/administration/admin/RoleAuthoritiesForm.tsx +82 -82
- package/src/components/administration/admin/SystemApplicationAuthorityGrid.tsx +126 -117
- package/src/components/administration/admin/SystemApplicationGrid.tsx +83 -83
- package/src/components/administration/admin/SystemApplicationModuleGrid.tsx +96 -96
- package/src/components/administration/admin/SystemApplicationRoleAuthorityGrid.tsx +67 -75
- package/src/components/administration/admin/SystemApplicationRoleGrid.tsx +116 -116
- package/src/components/administration/dev/AttachmentConfigGrid.tsx +223 -223
- package/src/components/administration/dev/AttachmentGrid.tsx +172 -172
- package/src/components/administration/dev/BluePrintGrid.tsx +129 -129
- package/src/components/administration/dev/DashboardGrid.tsx +173 -173
- package/src/components/administration/dev/DashboardWidgetGrid.tsx +164 -164
- package/src/components/administration/dev/DataQueryGrid.tsx +206 -206
- package/src/components/administration/dev/DataQueryParameterGrid.tsx +191 -191
- package/src/components/administration/dev/DataQueryParametersForm.tsx +84 -84
- package/src/components/administration/dev/DatasourceConnectionGrid.tsx +150 -150
- package/src/components/administration/dev/EntityParameterGrid.tsx +279 -279
- package/src/components/administration/dev/LookupGrid.tsx +120 -120
- package/src/components/administration/dev/MailAttachmentGrid.tsx +155 -155
- package/src/components/administration/dev/MailBodyGrid.tsx +216 -216
- package/src/components/administration/dev/MailNotificationQueueGrid.tsx +245 -245
- package/src/components/administration/dev/MailRecipientGrid.tsx +169 -169
- package/src/components/administration/dev/MailSenderConfigGrid.tsx +478 -478
- package/src/components/administration/dev/MailTemplateGrid.tsx +384 -384
- package/src/components/administration/dev/NotificationGrid.tsx +432 -432
- package/src/components/administration/dev/NotificationQueueGrid.tsx +222 -222
- package/src/components/administration/dev/ReportGrid.tsx +506 -506
- package/src/components/administration/dev/ReportParameterGrid.tsx +186 -186
- package/src/components/administration/dev/ReportParametersForm.tsx +84 -84
- package/src/components/administration/dev/WidgetGrid.tsx +431 -431
- package/src/components/administration/dev/WorkflowDocumentActionGrid.tsx +264 -264
- package/src/components/administration/dev/WorkflowDocumentActionHistoryGrid.tsx +172 -172
- package/src/components/administration/dev/WorkflowDocumentActionMailGrid.tsx +161 -161
- package/src/components/administration/dev/WorkflowDocumentGrid.tsx +377 -377
- package/src/components/administration/dev/WorkflowDocumentMailLogGrid.tsx +218 -218
- package/src/components/administration/dev/WorkflowDocumentStatusGrid.tsx +243 -243
- package/src/components/common/ChangeOrgForm.tsx +81 -81
- package/src/components/common/Home.tsx +43 -43
- package/src/components/common/LanguageSwitcher.tsx +25 -25
- package/src/components/common/LayoutHandlers.tsx +11 -11
- package/src/components/common/LoadingMask.tsx +24 -24
- package/src/components/common/Login.tsx +214 -214
- package/src/components/common/MyNotificationsPanel.tsx +103 -109
- package/src/components/common/NotificationItem.tsx +138 -138
- package/src/components/index.ts +9 -9
- package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +324 -324
- package/src/components/templates/DataEntryTemplates/DataEntryUtil.ts +248 -248
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormAction.tsx +60 -60
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementField.tsx +231 -231
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementGroup.tsx +106 -106
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/CheckBox.tsx +64 -64
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/ComboBox.tsx +93 -93
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/Datefield.tsx +65 -65
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/DatetimeField.tsx +64 -64
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/FiltersPanel.tsx +237 -237
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/SystemLookupCombobox.tsx +55 -55
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/TemplateTextField.tsx +17 -17
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +387 -387
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx +189 -189
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid.tsx +998 -998
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridMultiRecordAction.tsx +89 -89
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridRecordAction.tsx +95 -95
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridTopBar.tsx +227 -227
- package/src/components/templates/TransferList.tsx +257 -257
- package/src/components/templates/Window/ConfirmationWindow.tsx +55 -55
- package/src/components/templates/attachment/AttachmentCard.tsx +141 -141
- package/src/components/templates/attachment/AttachmentImageViewer.tsx +45 -45
- package/src/components/templates/attachment/AttachmentPanel.tsx +271 -271
- package/src/components/templates/index.ts +33 -33
- package/src/components/templates/report/ExcelReportViewer.tsx +71 -71
- package/src/components/templates/report/ReportViewer.tsx +382 -382
- package/src/components/templates/visuals/DashboardRouteView.tsx +9 -9
- package/src/components/templates/visuals/DashboardViewer.tsx +148 -148
- package/src/components/templates/visuals/WidgetViewer.tsx +198 -198
- package/src/components/templates/visuals/charts/TemplateBarChart.tsx +23 -23
- package/src/components/templates/visuals/charts/TemplateDataCard.tsx +35 -35
- package/src/components/templates/visuals/charts/TemplateGauge.tsx +21 -21
- package/src/components/templates/visuals/charts/TemplateLineChart.tsx +22 -22
- package/src/components/templates/visuals/charts/TemplateLineProgress.tsx +42 -42
- package/src/components/templates/visuals/charts/TemplatePieChart.tsx +24 -24
- package/src/components/templates/workflow/WorkflowDocumentPanel.tsx +606 -606
- package/src/components/templates/workflow/WorkflowDocumentTimeLine.tsx +140 -140
- package/src/components/templates/workflow/WorkflowRouteComponent.tsx +14 -14
- package/src/hooks/UseConfirmationWindow.tsx +54 -54
- package/src/hooks/UseMobile.tsx +13 -13
- package/src/hooks/UseSession.tsx +40 -59
- package/src/hooks/UseWindow.tsx +107 -107
- package/src/hooks/index.ts +7 -7
- package/src/hooks/useApiActions.ts +124 -124
- package/src/hooks/useAxios.tsx +316 -316
- package/src/hooks/useInterval.tsx +23 -23
- package/src/hooks/useLoadingMask.tsx +16 -16
- package/src/hooks/useLookupGridColumn.tsx +35 -35
- package/src/index.ts +4 -4
- package/src/layout/DrawerHeader.tsx +10 -10
- package/src/layout/Layout.tsx +90 -90
- package/src/layout/MainContent.tsx +114 -117
- package/src/layout/MobileDrawer.tsx +103 -103
- package/src/layout/NavigationTree.tsx +295 -298
- package/src/layout/NotificationButton.tsx +207 -207
- package/src/layout/RouteWrapper.tsx +36 -63
- package/src/layout/SideBar.tsx +85 -85
- package/src/layout/TopBar.tsx +215 -218
- package/src/locales/arabic/adminLocalsAr.json +93 -93
- package/src/locales/arabic/common.json +44 -44
- package/src/locales/arabic/devLocalsAr.json +317 -317
- package/src/locales/arabic/index.ts +9 -9
- package/src/locales/english/adminLocalsEn.json +96 -96
- package/src/locales/english/common.json +43 -43
- package/src/locales/english/devLocalsEn.json +318 -318
- package/src/locales/english/index.ts +9 -9
- package/src/locales/i18n.ts +8 -8
- package/src/locales/index.ts +9 -9
- package/src/main.tsx +23 -23
- package/src/navigationItems/Administration/adminNavigationItems.tsx +222 -223
- package/src/navigationItems/Administration/index.tsx +16 -16
- package/src/navigationItems/common/CommonNavigationItems.tsx +12 -12
- package/src/navigationItems/common/index.tsx +7 -7
- package/src/navigationItems/index.tsx +34 -35
- package/src/redux/features/administration/AdministrationStoresMetaData.ts +126 -148
- package/src/redux/features/common/AppInfoSlice.ts +63 -65
- package/src/redux/features/common/AppLayoutSlice.ts +29 -29
- package/src/redux/features/common/CommonStoreSlice.ts +44 -44
- package/src/redux/features/common/LoadingMaskSlice.ts +30 -30
- package/src/redux/features/common/SideBarSlice.ts +27 -27
- package/src/redux/features/common/UserSessionSlice.ts +54 -54
- package/src/redux/store.ts +29 -29
- package/src/routes/administration/adminRoutes.tsx +99 -99
- package/src/routes/administration/devRoutes.tsx +129 -129
- package/src/routes/administration/index.ts +8 -8
- package/src/routes/index.ts +11 -11
- package/src/routes/types/index.ts +5 -6
- package/src/styles/index.css +19 -19
- package/src/types/index.ts +8 -8
- package/src/util/AppUtils.ts +53 -53
- package/src/util/constants.ts +6 -6
- package/src/util/index.ts +2 -2
- package/tsconfig.json +135 -135
- package/vite.config.ts +36 -24
- package/.github/workflows/publish-npm.yml +0 -49
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
import { SystemRoute } from "../types";
|
|
2
|
-
import BluePrintGrid from "../../components/administration/dev/BluePrintGrid";
|
|
3
|
-
import DataQueryGrid from "../../components/administration/dev/DataQueryGrid";
|
|
4
|
-
import DatasourceConnectionGrid from "../../components/administration/dev/DatasourceConnectionGrid";
|
|
5
|
-
import EntityParameterGrid from "../../components/administration/dev/EntityParameterGrid";
|
|
6
|
-
|
|
7
|
-
import LookupGrid from "../../components/administration/dev/LookupGrid";
|
|
8
|
-
|
|
9
|
-
import ReportGrid from "../../components/administration/dev/ReportGrid";
|
|
10
|
-
import MailTemplateGrid from "../../components/administration/dev/MailTemplateGrid";
|
|
11
|
-
import MailSenderConfigGrid from "../../components/administration/dev/MailSenderConfigGrid";
|
|
12
|
-
import WorkflowDocumentGrid from "../../components/administration/dev/WorkflowDocumentGrid";
|
|
13
|
-
import WidgetGrid from "../../components/administration/dev/WidgetGrid";
|
|
14
|
-
import DashboardGrid from "../../components/administration/dev/DashboardGrid";
|
|
15
|
-
import DashboardRouteView from "../../components/templates/visuals/DashboardRouteView";
|
|
16
|
-
import WorkflowDocumentMailLogGrid from "../../components/administration/dev/WorkflowDocumentMailLogGrid";
|
|
17
|
-
import MailNotificationQueueGrid from "../../components/administration/dev/MailNotificationQueueGrid";
|
|
18
|
-
import SystemApplicationAuthorityGrid from "../../components/administration/admin/SystemApplicationAuthorityGrid";
|
|
19
|
-
import SystemApplicationRoleGrid from "../../components/administration/admin/SystemApplicationRoleGrid";
|
|
20
|
-
import SystemApplicationModuleGrid from "../../components/administration/admin/SystemApplicationModuleGrid";
|
|
21
|
-
import AttachmentConfigGrid from "../../components/administration/dev/AttachmentConfigGrid";
|
|
22
|
-
import NotificationGrid from "../../components/administration/dev/NotificationGrid";
|
|
23
|
-
import MyNotificationsPanel from "../../components/common/MyNotificationsPanel";
|
|
24
|
-
import WorkflowRouteComponent from "../../components/templates/workflow/WorkflowRouteComponent";
|
|
25
|
-
|
|
26
|
-
export const devRoutes: Array<SystemRoute> = [
|
|
27
|
-
{
|
|
28
|
-
path: "dev/blueprints",
|
|
29
|
-
component: BluePrintGrid,
|
|
30
|
-
authority: "BLUE_PRINT_VIEW",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
path: "dev/dataqueries",
|
|
34
|
-
component: DataQueryGrid,
|
|
35
|
-
authority: "DATA_QUERY_VIEW",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
path: "dev/datasourceconnections",
|
|
39
|
-
component: DatasourceConnectionGrid,
|
|
40
|
-
authority: "DATASOURCE_CONNECTION_VIEW",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
path: "dev/entityparameters",
|
|
44
|
-
component: EntityParameterGrid,
|
|
45
|
-
authority: "ENTITY_PARAMETER_VIEW",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
path: "dev/lookups",
|
|
49
|
-
component: LookupGrid,
|
|
50
|
-
authority: "LOOKUP_VIEW",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
path: "dev/reports",
|
|
54
|
-
component: ReportGrid,
|
|
55
|
-
authority: "REPORT_VIEW",
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
path: "dev/mailtemplates",
|
|
59
|
-
component: MailTemplateGrid,
|
|
60
|
-
authority: "MAILTEMPLATE_VIEW",
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
path: "dev/mailsender/config",
|
|
64
|
-
component: MailSenderConfigGrid,
|
|
65
|
-
authority: "MAILTEMPLATE_VIEW",
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
path: "dev/workflowdocuments",
|
|
69
|
-
component: WorkflowDocumentGrid,
|
|
70
|
-
authority: "WORKFLOW_DOCUMENT_VIEW",
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
path: "dev/widgets",
|
|
74
|
-
component: WidgetGrid,
|
|
75
|
-
authority: "WIDGET_VIEW",
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
path: "dev/dashboards",
|
|
79
|
-
component: DashboardGrid,
|
|
80
|
-
authority: "DASHBOARD_VIEW",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
path: "dashboard/:dashboardCode",
|
|
84
|
-
component: DashboardRouteView,
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
path: "dev/workflowdocumentmaillogs",
|
|
88
|
-
component: WorkflowDocumentMailLogGrid,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
path: "dev/mailnotificationqueues",
|
|
92
|
-
component: MailNotificationQueueGrid,
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
path: "dev/system/authorities",
|
|
96
|
-
component: SystemApplicationAuthorityGrid,
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
path: "dev/system/roles",
|
|
100
|
-
component: SystemApplicationRoleGrid,
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
path: "dev/system/lookups",
|
|
104
|
-
component: LookupGrid,
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
path: "dev/system/modules",
|
|
108
|
-
component: SystemApplicationModuleGrid,
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
path: "dev/attachmentconfigs",
|
|
112
|
-
component: AttachmentConfigGrid,
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
path: "dev/notifications",
|
|
116
|
-
component: NotificationGrid,
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
path: "myNotifications",
|
|
120
|
-
component: MyNotificationsPanel,
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
path: "workflow/:workflowDocumentCode/:refDocumentId",
|
|
124
|
-
component: WorkflowRouteComponent,
|
|
125
|
-
},
|
|
126
|
-
];
|
|
127
|
-
|
|
128
|
-
// import { devRoutes } from "./devRoutes";
|
|
129
|
-
// [...devRoutes]
|
|
1
|
+
import { SystemRoute } from "../types";
|
|
2
|
+
import BluePrintGrid from "../../components/administration/dev/BluePrintGrid";
|
|
3
|
+
import DataQueryGrid from "../../components/administration/dev/DataQueryGrid";
|
|
4
|
+
import DatasourceConnectionGrid from "../../components/administration/dev/DatasourceConnectionGrid";
|
|
5
|
+
import EntityParameterGrid from "../../components/administration/dev/EntityParameterGrid";
|
|
6
|
+
|
|
7
|
+
import LookupGrid from "../../components/administration/dev/LookupGrid";
|
|
8
|
+
|
|
9
|
+
import ReportGrid from "../../components/administration/dev/ReportGrid";
|
|
10
|
+
import MailTemplateGrid from "../../components/administration/dev/MailTemplateGrid";
|
|
11
|
+
import MailSenderConfigGrid from "../../components/administration/dev/MailSenderConfigGrid";
|
|
12
|
+
import WorkflowDocumentGrid from "../../components/administration/dev/WorkflowDocumentGrid";
|
|
13
|
+
import WidgetGrid from "../../components/administration/dev/WidgetGrid";
|
|
14
|
+
import DashboardGrid from "../../components/administration/dev/DashboardGrid";
|
|
15
|
+
import DashboardRouteView from "../../components/templates/visuals/DashboardRouteView";
|
|
16
|
+
import WorkflowDocumentMailLogGrid from "../../components/administration/dev/WorkflowDocumentMailLogGrid";
|
|
17
|
+
import MailNotificationQueueGrid from "../../components/administration/dev/MailNotificationQueueGrid";
|
|
18
|
+
import SystemApplicationAuthorityGrid from "../../components/administration/admin/SystemApplicationAuthorityGrid";
|
|
19
|
+
import SystemApplicationRoleGrid from "../../components/administration/admin/SystemApplicationRoleGrid";
|
|
20
|
+
import SystemApplicationModuleGrid from "../../components/administration/admin/SystemApplicationModuleGrid";
|
|
21
|
+
import AttachmentConfigGrid from "../../components/administration/dev/AttachmentConfigGrid";
|
|
22
|
+
import NotificationGrid from "../../components/administration/dev/NotificationGrid";
|
|
23
|
+
import MyNotificationsPanel from "../../components/common/MyNotificationsPanel";
|
|
24
|
+
import WorkflowRouteComponent from "../../components/templates/workflow/WorkflowRouteComponent";
|
|
25
|
+
|
|
26
|
+
export const devRoutes: Array<SystemRoute> = [
|
|
27
|
+
{
|
|
28
|
+
path: "dev/blueprints",
|
|
29
|
+
component: BluePrintGrid,
|
|
30
|
+
authority: "BLUE_PRINT_VIEW",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
path: "dev/dataqueries",
|
|
34
|
+
component: DataQueryGrid,
|
|
35
|
+
authority: "DATA_QUERY_VIEW",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
path: "dev/datasourceconnections",
|
|
39
|
+
component: DatasourceConnectionGrid,
|
|
40
|
+
authority: "DATASOURCE_CONNECTION_VIEW",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
path: "dev/entityparameters",
|
|
44
|
+
component: EntityParameterGrid,
|
|
45
|
+
authority: "ENTITY_PARAMETER_VIEW",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
path: "dev/lookups",
|
|
49
|
+
component: LookupGrid,
|
|
50
|
+
authority: "LOOKUP_VIEW",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
path: "dev/reports",
|
|
54
|
+
component: ReportGrid,
|
|
55
|
+
authority: "REPORT_VIEW",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
path: "dev/mailtemplates",
|
|
59
|
+
component: MailTemplateGrid,
|
|
60
|
+
authority: "MAILTEMPLATE_VIEW",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
path: "dev/mailsender/config",
|
|
64
|
+
component: MailSenderConfigGrid,
|
|
65
|
+
authority: "MAILTEMPLATE_VIEW",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
path: "dev/workflowdocuments",
|
|
69
|
+
component: WorkflowDocumentGrid,
|
|
70
|
+
authority: "WORKFLOW_DOCUMENT_VIEW",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
path: "dev/widgets",
|
|
74
|
+
component: WidgetGrid,
|
|
75
|
+
authority: "WIDGET_VIEW",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
path: "dev/dashboards",
|
|
79
|
+
component: DashboardGrid,
|
|
80
|
+
authority: "DASHBOARD_VIEW",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
path: "dashboard/:dashboardCode",
|
|
84
|
+
component: DashboardRouteView,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
path: "dev/workflowdocumentmaillogs",
|
|
88
|
+
component: WorkflowDocumentMailLogGrid,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
path: "dev/mailnotificationqueues",
|
|
92
|
+
component: MailNotificationQueueGrid,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
path: "dev/system/authorities",
|
|
96
|
+
component: SystemApplicationAuthorityGrid,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
path: "dev/system/roles",
|
|
100
|
+
component: SystemApplicationRoleGrid,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
path: "dev/system/lookups",
|
|
104
|
+
component: LookupGrid,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
path: "dev/system/modules",
|
|
108
|
+
component: SystemApplicationModuleGrid,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
path: "dev/attachmentconfigs",
|
|
112
|
+
component: AttachmentConfigGrid,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
path: "dev/notifications",
|
|
116
|
+
component: NotificationGrid,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
path: "myNotifications",
|
|
120
|
+
component: MyNotificationsPanel,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
path: "workflow/:workflowDocumentCode/:refDocumentId",
|
|
124
|
+
component: WorkflowRouteComponent,
|
|
125
|
+
},
|
|
126
|
+
];
|
|
127
|
+
|
|
128
|
+
// import { devRoutes } from "./devRoutes";
|
|
129
|
+
// [...devRoutes]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SystemRoute } from "../types";
|
|
2
|
-
import { adminRoutes } from "./adminRoutes";
|
|
3
|
-
import { devRoutes } from "./devRoutes";
|
|
4
|
-
|
|
5
|
-
export const ADMINISTRATION_ROUTES: Array<SystemRoute> = [
|
|
6
|
-
...adminRoutes,
|
|
7
|
-
...devRoutes,
|
|
8
|
-
];
|
|
1
|
+
import { SystemRoute } from "../types";
|
|
2
|
+
import { adminRoutes } from "./adminRoutes";
|
|
3
|
+
import { devRoutes } from "./devRoutes";
|
|
4
|
+
|
|
5
|
+
export const ADMINISTRATION_ROUTES: Array<SystemRoute> = [
|
|
6
|
+
...adminRoutes,
|
|
7
|
+
...devRoutes,
|
|
8
|
+
];
|
package/src/routes/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Home from "../components/common/Home";
|
|
2
|
-
import { ADMINISTRATION_ROUTES } from "./administration";
|
|
3
|
-
import { SystemRoute } from "./types";
|
|
4
|
-
|
|
5
|
-
export const SYSTEM_ROUTES: Array<SystemRoute> = [
|
|
6
|
-
{
|
|
7
|
-
path: "/",
|
|
8
|
-
component: Home,
|
|
9
|
-
},
|
|
10
|
-
...ADMINISTRATION_ROUTES,
|
|
11
|
-
];
|
|
1
|
+
import Home from "../components/common/Home";
|
|
2
|
+
import { ADMINISTRATION_ROUTES } from "./administration";
|
|
3
|
+
import { SystemRoute } from "./types";
|
|
4
|
+
|
|
5
|
+
export const SYSTEM_ROUTES: Array<SystemRoute> = [
|
|
6
|
+
{
|
|
7
|
+
path: "/",
|
|
8
|
+
component: Home,
|
|
9
|
+
},
|
|
10
|
+
...ADMINISTRATION_ROUTES,
|
|
11
|
+
];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export interface SystemRoute {
|
|
2
|
-
path: string;
|
|
3
|
-
component: React.FC;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
1
|
+
export interface SystemRoute {
|
|
2
|
+
path: string;
|
|
3
|
+
component: React.FC;
|
|
4
|
+
authority?: string;
|
|
5
|
+
}
|
package/src/styles/index.css
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
html,
|
|
2
|
-
body {
|
|
3
|
-
height: 100vh;
|
|
4
|
-
margin: 0;
|
|
5
|
-
padding: 0;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
#root {
|
|
9
|
-
height: 100vh;
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.red-row {
|
|
18
|
-
background-color: #f0d8d8;
|
|
19
|
-
}
|
|
1
|
+
html,
|
|
2
|
+
body {
|
|
3
|
+
height: 100vh;
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
#root {
|
|
9
|
+
height: 100vh;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.red-row {
|
|
18
|
+
background-color: #f0d8d8;
|
|
19
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type { ExtendedTreeItemProps } from "../navigationItems/index";
|
|
2
|
-
export type * from "../routes/types/index";
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
type CommonStores,
|
|
6
|
-
type CommonStoresInterface,
|
|
7
|
-
type StoreMetaData,
|
|
8
|
-
} from "../redux/features/common/CommonStoreSlice";
|
|
1
|
+
export type { ExtendedTreeItemProps } from "../navigationItems/index";
|
|
2
|
+
export type * from "../routes/types/index";
|
|
3
|
+
|
|
4
|
+
export {
|
|
5
|
+
type CommonStores,
|
|
6
|
+
type CommonStoresInterface,
|
|
7
|
+
type StoreMetaData,
|
|
8
|
+
} from "../redux/features/common/CommonStoreSlice";
|
package/src/util/AppUtils.ts
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
export function hasDigitsOnly(str: string) {
|
|
2
|
-
return /^\d+$/.test(str);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export function isNumber(value: any) {
|
|
6
|
-
return typeof value === "number" && !isNaN(value);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function isNumeric(value: string) {
|
|
10
|
-
return (
|
|
11
|
-
typeof value === "string" && value.trim() !== "" && !isNaN(Number(value))
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function capitalizeFirstLetter(str: string) {
|
|
16
|
-
if (!str) return "";
|
|
17
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function isValidEmail(email) {
|
|
21
|
-
const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
22
|
-
return re.test(email);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function timeAgo(dateInput, appDirection: "ltr" | "rtl") {
|
|
26
|
-
const date = new Date(dateInput);
|
|
27
|
-
const now = new Date();
|
|
28
|
-
const diffInSeconds = Math.floor((date - now) / 1000); // Note: future is positive
|
|
29
|
-
const absDiff = Math.abs(diffInSeconds);
|
|
30
|
-
|
|
31
|
-
const locale = appDirection === "rtl" ? "ar" : "en";
|
|
32
|
-
|
|
33
|
-
const rtf = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
|
|
34
|
-
|
|
35
|
-
const units = [
|
|
36
|
-
{ unit: "year", seconds: 31536000 },
|
|
37
|
-
{ unit: "month", seconds: 2592000 },
|
|
38
|
-
{ unit: "week", seconds: 604800 },
|
|
39
|
-
{ unit: "day", seconds: 86400 },
|
|
40
|
-
{ unit: "hour", seconds: 3600 },
|
|
41
|
-
{ unit: "minute", seconds: 60 },
|
|
42
|
-
{ unit: "second", seconds: 1 },
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
for (const { unit, seconds } of units) {
|
|
46
|
-
const delta = Math.floor(diffInSeconds / seconds);
|
|
47
|
-
if (Math.abs(delta) > 1) {
|
|
48
|
-
return rtf.format(delta, unit);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return locale === "ar" ? "الآن" : "just now";
|
|
53
|
-
}
|
|
1
|
+
export function hasDigitsOnly(str: string) {
|
|
2
|
+
return /^\d+$/.test(str);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function isNumber(value: any) {
|
|
6
|
+
return typeof value === "number" && !isNaN(value);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function isNumeric(value: string) {
|
|
10
|
+
return (
|
|
11
|
+
typeof value === "string" && value.trim() !== "" && !isNaN(Number(value))
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function capitalizeFirstLetter(str: string) {
|
|
16
|
+
if (!str) return "";
|
|
17
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function isValidEmail(email) {
|
|
21
|
+
const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
22
|
+
return re.test(email);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function timeAgo(dateInput, appDirection: "ltr" | "rtl") {
|
|
26
|
+
const date = new Date(dateInput);
|
|
27
|
+
const now = new Date();
|
|
28
|
+
const diffInSeconds = Math.floor((date - now) / 1000); // Note: future is positive
|
|
29
|
+
const absDiff = Math.abs(diffInSeconds);
|
|
30
|
+
|
|
31
|
+
const locale = appDirection === "rtl" ? "ar" : "en";
|
|
32
|
+
|
|
33
|
+
const rtf = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
|
|
34
|
+
|
|
35
|
+
const units = [
|
|
36
|
+
{ unit: "year", seconds: 31536000 },
|
|
37
|
+
{ unit: "month", seconds: 2592000 },
|
|
38
|
+
{ unit: "week", seconds: 604800 },
|
|
39
|
+
{ unit: "day", seconds: 86400 },
|
|
40
|
+
{ unit: "hour", seconds: 3600 },
|
|
41
|
+
{ unit: "minute", seconds: 60 },
|
|
42
|
+
{ unit: "second", seconds: 1 },
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
for (const { unit, seconds } of units) {
|
|
46
|
+
const delta = Math.floor(diffInSeconds / seconds);
|
|
47
|
+
if (Math.abs(delta) > 1) {
|
|
48
|
+
return rtf.format(delta, unit);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return locale === "ar" ? "الآن" : "just now";
|
|
53
|
+
}
|
package/src/util/constants.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const DATE_FORMAT = "YYYY-MM-DD";
|
|
2
|
-
export const DATE_TIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
|
3
|
-
export const LIGHT_THEME_INITIAL_MAIN_COLOR = "#37505C";
|
|
4
|
-
export const LIGHT_THEME_INITIAL_SECANDARY_COLOR = "#ff6d00";
|
|
5
|
-
export const DARK_THEME_INITIAL_MAIN_COLOR = "#ea690e";
|
|
6
|
-
export const DARK_THEME_INITIAL_SECANDARY_COLOR = "#74776B";
|
|
1
|
+
export const DATE_FORMAT = "YYYY-MM-DD";
|
|
2
|
+
export const DATE_TIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
|
3
|
+
export const LIGHT_THEME_INITIAL_MAIN_COLOR = "#37505C";
|
|
4
|
+
export const LIGHT_THEME_INITIAL_SECANDARY_COLOR = "#ff6d00";
|
|
5
|
+
export const DARK_THEME_INITIAL_MAIN_COLOR = "#ea690e";
|
|
6
|
+
export const DARK_THEME_INITIAL_SECANDARY_COLOR = "#74776B";
|
package/src/util/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./AppUtils";
|
|
2
|
-
export * from "./constants";
|
|
1
|
+
export * from "./AppUtils";
|
|
2
|
+
export * from "./constants";
|