@asaleh37/ui-base 1.2.27 → 1.2.29
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 +97 -34
- 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 +1 -1
- package/rollup.config-1748377725725.cjs +16 -16
- package/src/components/BaseApp.tsx +14 -2
- package/src/components/templates/index.ts +15 -6
- package/src/layout/NavigationTree.tsx +3 -4
- package/src/locales/i18n.ts +0 -7
- package/src/main.tsx +1 -1
- package/src/redux/features/common/AppInfoSlice.ts +8 -4
- package/src/locals/book/arabic/bookLocalsAr.json +0 -8
- package/src/locals/book/english/bookLocalsEn.json +0 -8
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import * as react from 'react';
|
|
|
10
10
|
import react__default from 'react';
|
|
11
11
|
import { GridColDef, GridRowSelectionModel, DataGridPremiumProps, GridToolbarProps, ToolbarPropsOverrides } from '@mui/x-data-grid-premium';
|
|
12
12
|
import { UseFormReturn } from 'react-hook-form';
|
|
13
|
+
import { TFunction } from 'i18next';
|
|
13
14
|
export * from '@mui/x-tree-view/models';
|
|
14
15
|
import { ResponseType } from 'axios';
|
|
15
16
|
|
|
@@ -45,12 +46,20 @@ type AppInfo = {
|
|
|
45
46
|
appName: string | null;
|
|
46
47
|
appVersion: string | null;
|
|
47
48
|
appLogo: any | null;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
businessLocals?: {
|
|
50
|
+
ar: {
|
|
51
|
+
[key: string]: string;
|
|
52
|
+
};
|
|
53
|
+
en: {
|
|
54
|
+
[key: string]: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
businessRoutes?: Array<SystemRoute>;
|
|
58
|
+
businessNavigationItems?: Array<ExtendedTreeItemProps>;
|
|
59
|
+
businessReduxReducers?: {
|
|
51
60
|
[key: string]: Reducer<any>;
|
|
52
61
|
};
|
|
53
|
-
businessCommonStoresMetaData
|
|
62
|
+
businessCommonStoresMetaData?: {
|
|
54
63
|
[key: string]: StoreMetaData;
|
|
55
64
|
};
|
|
56
65
|
muiPremiumKey: string;
|
|
@@ -78,34 +87,6 @@ type TransferListProps = {
|
|
|
78
87
|
};
|
|
79
88
|
declare const TransferList: react.FC<TransferListProps>;
|
|
80
89
|
|
|
81
|
-
interface WidgetProps {
|
|
82
|
-
widgetTitle?: string;
|
|
83
|
-
widgetType: "Line" | "Bar" | "Pie" | "Card" | "Gauge" | "Progress";
|
|
84
|
-
data: any;
|
|
85
|
-
valueLabel?: string;
|
|
86
|
-
valueField: string;
|
|
87
|
-
labelField: string;
|
|
88
|
-
}
|
|
89
|
-
interface SingleRecordWidgetProps {
|
|
90
|
-
widgetTitle?: string;
|
|
91
|
-
record: object;
|
|
92
|
-
valueField: string;
|
|
93
|
-
labelField: string;
|
|
94
|
-
total?: number;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
declare const TemplateBarChart: React.FC<WidgetProps>;
|
|
98
|
-
|
|
99
|
-
declare const TemplateDataCard: React.FC<SingleRecordWidgetProps>;
|
|
100
|
-
|
|
101
|
-
declare const TemplateGauge: React.FC<SingleRecordWidgetProps>;
|
|
102
|
-
|
|
103
|
-
declare const TemplateLineChart: React.FC<WidgetProps>;
|
|
104
|
-
|
|
105
|
-
declare const TemplateLineProgress: react.FC<SingleRecordWidgetProps>;
|
|
106
|
-
|
|
107
|
-
declare const TemplatePieChart: React.FC<WidgetProps>;
|
|
108
|
-
|
|
109
90
|
interface CheckBoxProps {
|
|
110
91
|
value: any;
|
|
111
92
|
disabled?: boolean;
|
|
@@ -160,6 +141,18 @@ declare const DatetimeField: React.FC<DatetimeFieldProps>;
|
|
|
160
141
|
|
|
161
142
|
declare const TemplateTextField: React.FC<Omit<TextFieldProps, "outlined">>;
|
|
162
143
|
|
|
144
|
+
type SystemLookupListProps = {
|
|
145
|
+
lookupType: string;
|
|
146
|
+
value: any;
|
|
147
|
+
onChangeCallBack: Function;
|
|
148
|
+
label: string;
|
|
149
|
+
disabled?: boolean;
|
|
150
|
+
required?: boolean;
|
|
151
|
+
errorMessage?: any;
|
|
152
|
+
sx?: any;
|
|
153
|
+
};
|
|
154
|
+
declare const SystemLookupCombobox: React.FC<SystemLookupListProps>;
|
|
155
|
+
|
|
163
156
|
type ApiActionsProps = {
|
|
164
157
|
findAll?: string;
|
|
165
158
|
commonStoreKey?: string;
|
|
@@ -413,6 +406,16 @@ type TemplateGridTopBarProps = GridToolbarProps & ToolbarPropsOverrides & {
|
|
|
413
406
|
clearGridState: () => void;
|
|
414
407
|
};
|
|
415
408
|
|
|
409
|
+
declare const getElementFields: (element: FormElementProps) => Array<RecordFieldProps>;
|
|
410
|
+
declare const getAllFields: (elements: Array<FormElementProps>) => Array<RecordFieldProps>;
|
|
411
|
+
declare const constructGridColumnsFromFields: (fields: Array<RecordFieldProps>, isDefaultEditable: boolean, t: TFunction<"translation", undefined>) => Array<TemplateGridColDef>;
|
|
412
|
+
declare const constructValidationSchema: (fields: Array<RecordFieldProps>) => any;
|
|
413
|
+
type GridSelection = {
|
|
414
|
+
selectedRecords: Array<any>;
|
|
415
|
+
selectedRecordIds: Array<any>;
|
|
416
|
+
};
|
|
417
|
+
declare const getGridSelection: (rowSelectionModel: GridRowSelectionModel, data: Array<any>, keyColumnName: string) => GridSelection;
|
|
418
|
+
|
|
416
419
|
declare const TemplateForm: react__default.FC<TemplateFormProps>;
|
|
417
420
|
|
|
418
421
|
declare const TemplateGrid: react__default.FC<TemplateGridProps>;
|
|
@@ -476,6 +479,66 @@ declare const WorkflowDocumentTimeLine: React.FC<WorkflowDocumentTimeLineProp>;
|
|
|
476
479
|
|
|
477
480
|
declare const WorkflowRouteComponent: React.FC;
|
|
478
481
|
|
|
482
|
+
type ExcelReportViewerProps = {
|
|
483
|
+
reportData: Array<any>;
|
|
484
|
+
setReportData: (data: any) => void;
|
|
485
|
+
reloadReport: () => void;
|
|
486
|
+
gridLoadParameters?: Array<FormElementProps>;
|
|
487
|
+
gridLoadParametersValues?: {
|
|
488
|
+
[key: string]: any;
|
|
489
|
+
};
|
|
490
|
+
setGridLoadParametersValues?: any;
|
|
491
|
+
};
|
|
492
|
+
declare const ExcelReportViewer: React.FC<ExcelReportViewerProps>;
|
|
493
|
+
|
|
494
|
+
type ReportViewerProps = {
|
|
495
|
+
reportCode: string;
|
|
496
|
+
resultMode: "Request" | "App";
|
|
497
|
+
reportParametersValues?: {
|
|
498
|
+
[key: string]: any;
|
|
499
|
+
};
|
|
500
|
+
byPassParameterEntry?: boolean;
|
|
501
|
+
jasperOutPutFileType?: "pdf" | "word" | "excel";
|
|
502
|
+
};
|
|
503
|
+
declare const ReportViewer: React.FC<ReportViewerProps>;
|
|
504
|
+
|
|
505
|
+
type DashboardViewerProps = {
|
|
506
|
+
dashboardCode: string;
|
|
507
|
+
parameters?: {
|
|
508
|
+
[key: string]: any;
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
interface WidgetProps {
|
|
512
|
+
widgetTitle?: string;
|
|
513
|
+
widgetType: "Line" | "Bar" | "Pie" | "Card" | "Gauge" | "Progress";
|
|
514
|
+
data: any;
|
|
515
|
+
valueLabel?: string;
|
|
516
|
+
valueField: string;
|
|
517
|
+
labelField: string;
|
|
518
|
+
}
|
|
519
|
+
interface SingleRecordWidgetProps {
|
|
520
|
+
widgetTitle?: string;
|
|
521
|
+
record: object;
|
|
522
|
+
valueField: string;
|
|
523
|
+
labelField: string;
|
|
524
|
+
total?: number;
|
|
525
|
+
}
|
|
526
|
+
declare const DashboardViewer: React.FC<DashboardViewerProps>;
|
|
527
|
+
|
|
528
|
+
declare const TemplateBarChart: React.FC<WidgetProps>;
|
|
529
|
+
|
|
530
|
+
declare const TemplateDataCard: React.FC<SingleRecordWidgetProps>;
|
|
531
|
+
|
|
532
|
+
declare const TemplateGauge: React.FC<SingleRecordWidgetProps>;
|
|
533
|
+
|
|
534
|
+
declare const TemplateLineChart: React.FC<WidgetProps>;
|
|
535
|
+
|
|
536
|
+
declare const TemplateLineProgress: react.FC<SingleRecordWidgetProps>;
|
|
537
|
+
|
|
538
|
+
declare const TemplatePieChart: React.FC<WidgetProps>;
|
|
539
|
+
|
|
540
|
+
declare const DashboardRouteView: React.FC;
|
|
541
|
+
|
|
479
542
|
interface APIRequest {
|
|
480
543
|
endPointURI: string;
|
|
481
544
|
parameters?: any;
|
|
@@ -560,5 +623,5 @@ declare const LIGHT_THEME_INITIAL_SECANDARY_COLOR = "#ff6d00";
|
|
|
560
623
|
declare const DARK_THEME_INITIAL_MAIN_COLOR = "#ea690e";
|
|
561
624
|
declare const DARK_THEME_INITIAL_SECANDARY_COLOR = "#74776B";
|
|
562
625
|
|
|
563
|
-
export { AttachmentCard, AttachmentImageViewer, AttachmentPanel, 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, WorkflowDocumentPanel, WorkflowDocumentTimeLine, WorkflowRouteComponent, capitalizeFirstLetter, hasDigitsOnly, isNumber, isNumeric, isValidEmail, timeAgo, useApiActions, useAxios, useConfirmationWindow, useIsMobile, useLoadingMask, useSession, useWindow };
|
|
564
|
-
export type { EditDeleteAction, ExtendedTreeItemProps, FormActionProps, FormElementFieldProps, FormElementGroupProps, FormElementNodeProps, FormElementProps, FormElementSize, MakeOptional, ModalFormProps, RecordAction, RecordFieldProps, SystemRoute, TemplateFormProps, TemplateGridAttachmentProps, TemplateGridColDef, TemplateGridColumnProps, TemplateGridProps, TemplateGridTopBarProps, TransferListProps };
|
|
626
|
+
export { AttachmentCard, AttachmentImageViewer, AttachmentPanel, BaseApp, CheckBox, ComboBox, DARK_THEME_INITIAL_MAIN_COLOR, DARK_THEME_INITIAL_SECANDARY_COLOR, DATE_FORMAT, DATE_TIME_FORMAT, DashboardRouteView, DashboardViewer, Datefield, DatetimeField, ExcelReportViewer, LIGHT_THEME_INITIAL_MAIN_COLOR, LIGHT_THEME_INITIAL_SECANDARY_COLOR, ReportViewer, SystemLookupCombobox, TemplateBarChart, TemplateDataCard, TemplateForm, TemplateGauge, TemplateGrid, TemplateLineChart, TemplateLineProgress, TemplatePieChart, TemplateTextField, TransferList, WorkflowDocumentPanel, WorkflowDocumentTimeLine, WorkflowRouteComponent, capitalizeFirstLetter, constructGridColumnsFromFields, constructValidationSchema, getAllFields, getElementFields, getGridSelection, hasDigitsOnly, isNumber, isNumeric, isValidEmail, timeAgo, useApiActions, useAxios, useConfirmationWindow, useIsMobile, useLoadingMask, useSession, useWindow };
|
|
627
|
+
export type { EditDeleteAction, ExtendedTreeItemProps, FormActionProps, FormElementFieldProps, FormElementGroupProps, FormElementNodeProps, FormElementProps, FormElementSize, GridSelection, MakeOptional, ModalFormProps, RecordAction, RecordFieldProps, SystemRoute, TemplateFormProps, TemplateGridAttachmentProps, TemplateGridColDef, TemplateGridColumnProps, TemplateGridProps, TemplateGridTopBarProps, TransferListProps };
|