@asaleh37/ui-base 1.2.3 → 1.2.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/dist/index.d.ts +20 -13
- 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/package.json +15 -3
- package/src/components/App.tsx +1 -1
- package/src/components/BaseApp.tsx +2 -19
- package/src/components/administration/admin/OrgMemberRoleForm.tsx +83 -0
- package/src/components/administration/admin/OrganizationApplicationModuleGrid.tsx +131 -0
- package/src/components/administration/admin/OrganizationGrid.tsx +165 -0
- package/src/components/administration/admin/OrganizationMemberGrid.tsx +176 -0
- package/src/components/administration/admin/OrganizationMemberRoleGrid.tsx +87 -0
- package/src/components/{admin → administration/admin}/OrganizationRankGrid.tsx +49 -19
- package/src/components/administration/admin/OrganizationUnitGrid.tsx +139 -0
- package/src/components/administration/admin/OrganizationUnitTypeGrid.tsx +121 -0
- package/src/components/administration/admin/PersonGrid.tsx +195 -0
- package/src/components/{admin → administration/admin}/RoleAuthoritiesForm.tsx +30 -11
- package/src/components/administration/admin/SystemApplicationAuthorityGrid.tsx +142 -0
- package/src/components/administration/admin/SystemApplicationGrid.tsx +161 -0
- package/src/components/administration/admin/SystemApplicationModuleGrid.tsx +109 -0
- package/src/components/administration/admin/SystemApplicationRoleAuthorityGrid.tsx +67 -0
- package/src/components/administration/admin/SystemApplicationRoleGrid.tsx +130 -0
- package/src/components/administration/dev/BluePrintGrid.tsx +129 -0
- package/src/components/administration/dev/DashboardGrid.tsx +173 -0
- package/src/components/administration/dev/DashboardWidgetGrid.tsx +164 -0
- package/src/components/administration/dev/DataQueryGrid.tsx +206 -0
- package/src/components/administration/dev/DataQueryParameterGrid.tsx +191 -0
- package/src/components/administration/dev/DataQueryParametersForm.tsx +84 -0
- package/src/components/administration/dev/DatasourceConnectionGrid.tsx +150 -0
- package/src/components/administration/dev/EntityParameterGrid.tsx +279 -0
- package/src/components/administration/dev/LookupGrid.tsx +131 -0
- package/src/components/administration/dev/MailAttachmentGrid.tsx +155 -0
- package/src/components/administration/dev/MailBodyGrid.tsx +215 -0
- package/src/components/{admin → administration/dev}/MailNotificationQueueGrid.tsx +114 -26
- package/src/components/administration/dev/MailRecipientGrid.tsx +169 -0
- package/src/components/administration/dev/MailSenderConfigGrid.tsx +478 -0
- package/src/components/administration/dev/MailTemplateGrid.tsx +388 -0
- package/src/components/administration/dev/ReportGrid.tsx +504 -0
- package/src/components/administration/dev/ReportParameterGrid.tsx +186 -0
- package/src/components/administration/dev/ReportParametersForm.tsx +84 -0
- package/src/components/administration/dev/WidgetGrid.tsx +431 -0
- package/src/components/administration/dev/WorkflowDocumentActionGrid.tsx +264 -0
- package/src/components/administration/dev/WorkflowDocumentActionHistoryGrid.tsx +172 -0
- package/src/components/administration/dev/WorkflowDocumentActionMailGrid.tsx +161 -0
- package/src/components/administration/dev/WorkflowDocumentGrid.tsx +377 -0
- package/src/components/{admin → administration/dev}/WorkflowDocumentMailLogGrid.tsx +87 -10
- package/src/components/administration/dev/WorkflowDocumentStatusGrid.tsx +243 -0
- package/src/components/common/ChangeOrgForm.tsx +81 -0
- package/src/components/common/Home.tsx +28 -22
- package/src/components/common/LoadingMask.tsx +9 -4
- package/src/components/common/Login.tsx +9 -13
- package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +30 -6
- package/src/components/templates/DataEntryTemplates/DataEntryUtil.ts +46 -5
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementField.tsx +64 -5
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementGroup.tsx +11 -3
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/CheckBox.tsx +2 -2
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/ComboBox.tsx +1 -2
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/HtmlEditor.tsx +144 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/SystemLookupCombobox.tsx +55 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/TemplateTextField.tsx +9 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +45 -5
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx +8 -7
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid.tsx +38 -10
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridRecordAction.tsx +4 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridTopBar.tsx +3 -4
- package/src/components/templates/TransferList.tsx +16 -6
- package/src/components/templates/index.ts +0 -2
- package/src/components/templates/report/ExcelReportViewer.tsx +65 -0
- package/src/components/templates/report/ReportViewer.tsx +382 -0
- package/src/components/templates/visuals/DashboardRouteView.tsx +9 -0
- package/src/components/templates/visuals/DashboardViewer.tsx +148 -0
- package/src/components/templates/visuals/WidgetViewer.tsx +198 -0
- package/src/components/templates/visuals/charts/TemplateBarChart.tsx +9 -2
- package/src/components/templates/visuals/charts/TemplateDataCard.tsx +6 -31
- package/src/components/templates/visuals/charts/TemplateGauge.tsx +8 -3
- package/src/components/templates/visuals/charts/TemplateLineChart.tsx +8 -2
- package/src/components/templates/visuals/charts/TemplateLineProgress.tsx +5 -3
- package/src/components/templates/visuals/charts/TemplatePieChart.tsx +1 -2
- package/src/components/templates/workflow/WorkflowDocumentPanel.tsx +581 -0
- package/src/components/templates/workflow/WorkflowDocumentTimeLine.tsx +134 -0
- package/src/hooks/UseSession.tsx +3 -7
- package/src/hooks/UseWindow.tsx +2 -1
- package/src/hooks/useAxios.tsx +9 -27
- package/src/hooks/useLookupGridColumn.tsx +35 -0
- package/src/layout/Layout.tsx +2 -46
- package/src/layout/MainContent.tsx +60 -7
- package/src/layout/MobileDrawer.tsx +5 -5
- package/src/layout/NavigationTree.tsx +0 -1
- package/src/layout/RouteWrapper.tsx +36 -0
- package/src/layout/SideBar.tsx +15 -10
- package/src/layout/TopBar.tsx +139 -71
- package/src/locales/arabic/adminLocalsAr.json +81 -344
- package/src/locales/arabic/common.json +11 -1
- package/src/locales/arabic/devLocalsAr.json +280 -0
- package/src/locales/arabic/index.ts +2 -0
- package/src/locales/english/adminLocalsEn.json +86 -346
- package/src/locales/english/common.json +11 -1
- package/src/locales/english/devLocalsEn.json +281 -0
- package/src/locales/english/index.ts +3 -0
- package/src/main.tsx +5 -6
- package/src/navigationItems/Administration/adminNavigationItems.tsx +65 -99
- package/src/navigationItems/Administration/index.tsx +10 -65
- package/src/redux/features/administration/AdministrationStoresMetaData.ts +45 -12
- package/src/redux/features/common/AppLayoutSlice.ts +0 -8
- package/src/redux/features/common/CommonStoreSlice.ts +4 -0
- package/src/redux/features/common/SideBarSlice.ts +29 -0
- package/src/redux/features/common/UserSessionSlice.ts +15 -23
- package/src/redux/store.ts +1 -1
- package/src/routes/administration/adminRoutes.tsx +41 -222
- package/src/routes/administration/devRoutes.tsx +90 -0
- package/src/routes/administration/index.ts +5 -1
- package/src/routes/index.ts +1 -0
- package/src/styles/index.css +3 -3
- package/src/util/AppUtils.ts +5 -0
- package/vite.config.ts +14 -0
- package/src/components/admin/AttachmentGrid.tsx +0 -116
- package/src/components/admin/AuthorityGrid.tsx +0 -88
- package/src/components/admin/BluePrintGrid.tsx +0 -55
- package/src/components/admin/BluePrintPageGrid.tsx +0 -85
- package/src/components/admin/BluePrintPointGrid.tsx +0 -85
- package/src/components/admin/DashboardGrid.tsx +0 -95
- package/src/components/admin/DashboardWidgetGrid.tsx +0 -75
- package/src/components/admin/DataQueryGrid.tsx +0 -75
- package/src/components/admin/DataQueryParameterGrid.tsx +0 -98
- package/src/components/admin/DatasourceConnectionGrid.tsx +0 -98
- package/src/components/admin/EmployeeGrid.tsx +0 -105
- package/src/components/admin/EntityParameterGrid.tsx +0 -125
- package/src/components/admin/ExcelUploaderDetailGrid.tsx +0 -78
- package/src/components/admin/ExcelUploaderHeaderGrid.tsx +0 -78
- package/src/components/admin/LookupGrid.tsx +0 -95
- package/src/components/admin/MailAttachmentGrid.tsx +0 -65
- package/src/components/admin/MailBodyGrid.tsx +0 -105
- package/src/components/admin/MailRecipientGrid.tsx +0 -75
- package/src/components/admin/MailTemplateGrid.tsx +0 -145
- package/src/components/admin/NewTableGrid.tsx +0 -65
- package/src/components/admin/NotificationGrid.tsx +0 -115
- package/src/components/admin/NotificationQueueGrid.tsx +0 -125
- package/src/components/admin/OrganizationApplicationGrid.tsx +0 -81
- package/src/components/admin/OrganizationGrid.tsx +0 -65
- package/src/components/admin/OrganizationUnitGrid.tsx +0 -85
- package/src/components/admin/OrganizationUserGrid.tsx +0 -75
- package/src/components/admin/OrganizationUserRoleGrid.tsx +0 -98
- package/src/components/admin/ReportGrid.tsx +0 -155
- package/src/components/admin/ReportParameterGrid.tsx +0 -95
- package/src/components/admin/RoleAuthorityGrid.tsx +0 -65
- package/src/components/admin/RoleGrid.tsx +0 -132
- package/src/components/admin/UserAccountGrid.tsx +0 -65
- package/src/components/admin/UserRequestGrid.tsx +0 -145
- package/src/components/admin/WidgetGrid.tsx +0 -175
- package/src/components/admin/WorkflowDocumentActionGrid.tsx +0 -111
- package/src/components/admin/WorkflowDocumentActionHistoryGrid.tsx +0 -111
- package/src/components/admin/WorkflowDocumentActionMailGrid.tsx +0 -71
- package/src/components/admin/WorkflowDocumentGrid.tsx +0 -185
- package/src/components/admin/WorkflowDocumentStatusGrid.tsx +0 -121
- package/src/components/templates/visuals/TemplateDashboard.tsx +0 -126
- package/src/redux/features/CounterSlice.tsx +0 -13
package/dist/index.d.ts
CHANGED
|
@@ -79,6 +79,7 @@ interface WidgetProps {
|
|
|
79
79
|
widgetTitle?: string;
|
|
80
80
|
widgetType: "Line" | "Bar" | "Pie" | "Card" | "Gauge" | "Progress";
|
|
81
81
|
data: any;
|
|
82
|
+
valueLabel?: string;
|
|
82
83
|
valueField: string;
|
|
83
84
|
labelField: string;
|
|
84
85
|
}
|
|
@@ -87,12 +88,8 @@ interface SingleRecordWidgetProps {
|
|
|
87
88
|
record: object;
|
|
88
89
|
valueField: string;
|
|
89
90
|
labelField: string;
|
|
91
|
+
total?: number;
|
|
90
92
|
}
|
|
91
|
-
interface DashboardProps {
|
|
92
|
-
dashboardTitle: string;
|
|
93
|
-
dashboardWidgets: Array<WidgetProps>;
|
|
94
|
-
}
|
|
95
|
-
declare const TemplateDashboard: React.FC<DashboardProps>;
|
|
96
93
|
|
|
97
94
|
declare const TemplateBarChart: React.FC<WidgetProps>;
|
|
98
95
|
|
|
@@ -194,6 +191,7 @@ type RecordAction = {
|
|
|
194
191
|
gridActionProps?: {
|
|
195
192
|
showInMenu?: boolean;
|
|
196
193
|
multiRecord?: boolean;
|
|
194
|
+
reloadGridAfterAction?: boolean;
|
|
197
195
|
};
|
|
198
196
|
formActionProps?: {
|
|
199
197
|
enabled?: boolean;
|
|
@@ -231,6 +229,7 @@ type TemplateGridColumnProps = {
|
|
|
231
229
|
muiProps?: MakeOptional<GridColDef, "field">;
|
|
232
230
|
};
|
|
233
231
|
type TemplateGridColDef = GridColDef & {
|
|
232
|
+
lookupType?: string;
|
|
234
233
|
hidden?: boolean;
|
|
235
234
|
searchable?: boolean;
|
|
236
235
|
options?: Array<object>;
|
|
@@ -266,6 +265,7 @@ type TemplateGridProps = {
|
|
|
266
265
|
setRowSelectionModel?: any;
|
|
267
266
|
setSelectedRecord?: any;
|
|
268
267
|
setSelectedRecordIds?: any;
|
|
268
|
+
formLoadCallBk?: (formActions: FormActionProps, formManager: UseFormReturn, record: any) => void;
|
|
269
269
|
editMode: {
|
|
270
270
|
editMode: "none";
|
|
271
271
|
} | {
|
|
@@ -302,19 +302,23 @@ type FormElementSize = {
|
|
|
302
302
|
type RecordFieldProps = {
|
|
303
303
|
fieldName: string;
|
|
304
304
|
fieldLabel: string;
|
|
305
|
-
fieldType: "text" | "number" | "date" | "datetime" | "combobox" | "checkbox";
|
|
305
|
+
fieldType: "text" | "number" | "date" | "datetime" | "combobox" | "checkbox" | "html" | "lookup";
|
|
306
|
+
lookupType?: string;
|
|
306
307
|
required?: boolean;
|
|
307
308
|
disabled?: boolean;
|
|
308
309
|
hidden?: boolean;
|
|
309
310
|
dateFormat?: string;
|
|
311
|
+
defaultValue?: any;
|
|
310
312
|
options?: Array<any>;
|
|
311
313
|
optionValueField?: string;
|
|
312
314
|
optionDisplayField?: string;
|
|
313
315
|
checkedValue?: any;
|
|
314
316
|
unCheckedValue?: any;
|
|
317
|
+
muiTextFieldProps?: TextFieldProps;
|
|
315
318
|
gridProps?: TemplateGridColumnProps;
|
|
316
319
|
formProps?: {
|
|
317
320
|
fieldSize?: FormElementSize;
|
|
321
|
+
fieldHeight?: number;
|
|
318
322
|
style?: SxProps;
|
|
319
323
|
onValueChangeCallBack?: (value: any, formManager: UseFormReturn, formActions?: FormActionProps, selectedRecord?: any) => void;
|
|
320
324
|
};
|
|
@@ -328,16 +332,16 @@ type FormElementGroupProps = {
|
|
|
328
332
|
formManager?: UseFormReturn;
|
|
329
333
|
formValues?: any;
|
|
330
334
|
formActions?: any;
|
|
331
|
-
hiddenFields
|
|
332
|
-
disabledFields
|
|
335
|
+
hiddenFields?: string[];
|
|
336
|
+
disabledFields?: string[];
|
|
333
337
|
};
|
|
334
338
|
type FormElementFieldProps = {
|
|
335
339
|
fieldInfo: RecordFieldProps;
|
|
336
340
|
formManager?: UseFormReturn;
|
|
337
341
|
formValues?: any;
|
|
338
342
|
formActions?: any;
|
|
339
|
-
hiddenFields
|
|
340
|
-
disabledFields
|
|
343
|
+
hiddenFields?: string[];
|
|
344
|
+
disabledFields?: string[];
|
|
341
345
|
};
|
|
342
346
|
type FormElementNodeProps = {
|
|
343
347
|
formManager?: UseFormReturn;
|
|
@@ -374,6 +378,7 @@ type TemplateFormProps = {
|
|
|
374
378
|
apiActions: ApiActions;
|
|
375
379
|
preSaveValidation?: (record: any) => boolean | Promise<boolean>;
|
|
376
380
|
formSavedSuccessfullyCallBk?: (response: any) => void;
|
|
381
|
+
formLoadCallBk?: (formActions: FormActionProps, formManager: UseFormReturn, record: any) => void;
|
|
377
382
|
formCloseCallBk?: () => void;
|
|
378
383
|
saveButtonSpecs?: {
|
|
379
384
|
label?: string;
|
|
@@ -437,6 +442,7 @@ declare const useIsMobile: (breakpoint?: number) => boolean;
|
|
|
437
442
|
declare const useSession: () => {
|
|
438
443
|
UserSession: any;
|
|
439
444
|
isUserAuthorized: (authorityCode: string) => boolean;
|
|
445
|
+
UserInfo: any;
|
|
440
446
|
};
|
|
441
447
|
|
|
442
448
|
interface TemplateWindowProp {
|
|
@@ -444,7 +450,7 @@ interface TemplateWindowProp {
|
|
|
444
450
|
width?: any;
|
|
445
451
|
minWidth?: any;
|
|
446
452
|
minHeight?: any;
|
|
447
|
-
windowIcon?:
|
|
453
|
+
windowIcon?: IconProp;
|
|
448
454
|
windowTitle?: string;
|
|
449
455
|
onCloseCallBack?: any;
|
|
450
456
|
}
|
|
@@ -461,6 +467,7 @@ declare function hasDigitsOnly(str: string): boolean;
|
|
|
461
467
|
declare function isNumber(value: any): boolean;
|
|
462
468
|
declare function isNumeric(value: string): boolean;
|
|
463
469
|
declare function capitalizeFirstLetter(str: string): string;
|
|
470
|
+
declare function isValidEmail(email: any): boolean;
|
|
464
471
|
|
|
465
472
|
declare const DATE_FORMAT = "YYYY-MM-DD";
|
|
466
473
|
declare const DATE_TIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
|
@@ -469,5 +476,5 @@ declare const LIGHT_THEME_INITIAL_SECANDARY_COLOR = "#ff6d00";
|
|
|
469
476
|
declare const DARK_THEME_INITIAL_MAIN_COLOR = "#ea690e";
|
|
470
477
|
declare const DARK_THEME_INITIAL_SECANDARY_COLOR = "#74776B";
|
|
471
478
|
|
|
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,
|
|
473
|
-
export type {
|
|
479
|
+
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, TemplateDataCard, TemplateForm, TemplateGauge, TemplateGrid, TemplateLineChart, TemplateLineProgress, TemplatePieChart, TemplateTextField, TransferList, capitalizeFirstLetter, hasDigitsOnly, isNumber, isNumeric, isValidEmail, useApiActions, useAxios, useConfirmationWindow, useIsMobile, useLoadingMask, useSession, useWindow };
|
|
480
|
+
export type { EditDeleteAction, FormActionProps, FormElementFieldProps, FormElementGroupProps, FormElementNodeProps, FormElementProps, FormElementSize, MakeOptional, ModalFormProps, RecordAction, RecordFieldProps, TemplateFormProps, TemplateGridColDef, TemplateGridColumnProps, TemplateGridProps, TemplateGridTopBarProps, TransferListProps };
|