@asaleh37/ui-base 1.2.28 → 1.2.30

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 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
 
@@ -32,6 +33,15 @@ type ExtendedTreeItemProps = {
32
33
  children?: ExtendedTreeItemProps[];
33
34
  };
34
35
 
36
+ type CommonStores = {
37
+ [key: string]: StoreMetaData;
38
+ };
39
+ type CommonStoresInterface = {
40
+ stores: {
41
+ [key: string]: StoreMetaData;
42
+ };
43
+ storeKeys: Array<String>;
44
+ };
35
45
  interface StoreMetaData {
36
46
  url: string;
37
47
  data: Array<any>;
@@ -86,34 +96,6 @@ type TransferListProps = {
86
96
  };
87
97
  declare const TransferList: react.FC<TransferListProps>;
88
98
 
89
- interface WidgetProps {
90
- widgetTitle?: string;
91
- widgetType: "Line" | "Bar" | "Pie" | "Card" | "Gauge" | "Progress";
92
- data: any;
93
- valueLabel?: string;
94
- valueField: string;
95
- labelField: string;
96
- }
97
- interface SingleRecordWidgetProps {
98
- widgetTitle?: string;
99
- record: object;
100
- valueField: string;
101
- labelField: string;
102
- total?: number;
103
- }
104
-
105
- declare const TemplateBarChart: React.FC<WidgetProps>;
106
-
107
- declare const TemplateDataCard: React.FC<SingleRecordWidgetProps>;
108
-
109
- declare const TemplateGauge: React.FC<SingleRecordWidgetProps>;
110
-
111
- declare const TemplateLineChart: React.FC<WidgetProps>;
112
-
113
- declare const TemplateLineProgress: react.FC<SingleRecordWidgetProps>;
114
-
115
- declare const TemplatePieChart: React.FC<WidgetProps>;
116
-
117
99
  interface CheckBoxProps {
118
100
  value: any;
119
101
  disabled?: boolean;
@@ -168,6 +150,18 @@ declare const DatetimeField: React.FC<DatetimeFieldProps>;
168
150
 
169
151
  declare const TemplateTextField: React.FC<Omit<TextFieldProps, "outlined">>;
170
152
 
153
+ type SystemLookupListProps = {
154
+ lookupType: string;
155
+ value: any;
156
+ onChangeCallBack: Function;
157
+ label: string;
158
+ disabled?: boolean;
159
+ required?: boolean;
160
+ errorMessage?: any;
161
+ sx?: any;
162
+ };
163
+ declare const SystemLookupCombobox: React.FC<SystemLookupListProps>;
164
+
171
165
  type ApiActionsProps = {
172
166
  findAll?: string;
173
167
  commonStoreKey?: string;
@@ -421,6 +415,16 @@ type TemplateGridTopBarProps = GridToolbarProps & ToolbarPropsOverrides & {
421
415
  clearGridState: () => void;
422
416
  };
423
417
 
418
+ declare const getElementFields: (element: FormElementProps) => Array<RecordFieldProps>;
419
+ declare const getAllFields: (elements: Array<FormElementProps>) => Array<RecordFieldProps>;
420
+ declare const constructGridColumnsFromFields: (fields: Array<RecordFieldProps>, isDefaultEditable: boolean, t: TFunction<"translation", undefined>) => Array<TemplateGridColDef>;
421
+ declare const constructValidationSchema: (fields: Array<RecordFieldProps>) => any;
422
+ type GridSelection = {
423
+ selectedRecords: Array<any>;
424
+ selectedRecordIds: Array<any>;
425
+ };
426
+ declare const getGridSelection: (rowSelectionModel: GridRowSelectionModel, data: Array<any>, keyColumnName: string) => GridSelection;
427
+
424
428
  declare const TemplateForm: react__default.FC<TemplateFormProps>;
425
429
 
426
430
  declare const TemplateGrid: react__default.FC<TemplateGridProps>;
@@ -484,6 +488,66 @@ declare const WorkflowDocumentTimeLine: React.FC<WorkflowDocumentTimeLineProp>;
484
488
 
485
489
  declare const WorkflowRouteComponent: React.FC;
486
490
 
491
+ type ExcelReportViewerProps = {
492
+ reportData: Array<any>;
493
+ setReportData: (data: any) => void;
494
+ reloadReport: () => void;
495
+ gridLoadParameters?: Array<FormElementProps>;
496
+ gridLoadParametersValues?: {
497
+ [key: string]: any;
498
+ };
499
+ setGridLoadParametersValues?: any;
500
+ };
501
+ declare const ExcelReportViewer: React.FC<ExcelReportViewerProps>;
502
+
503
+ type ReportViewerProps = {
504
+ reportCode: string;
505
+ resultMode: "Request" | "App";
506
+ reportParametersValues?: {
507
+ [key: string]: any;
508
+ };
509
+ byPassParameterEntry?: boolean;
510
+ jasperOutPutFileType?: "pdf" | "word" | "excel";
511
+ };
512
+ declare const ReportViewer: React.FC<ReportViewerProps>;
513
+
514
+ type DashboardViewerProps = {
515
+ dashboardCode: string;
516
+ parameters?: {
517
+ [key: string]: any;
518
+ };
519
+ };
520
+ interface WidgetProps {
521
+ widgetTitle?: string;
522
+ widgetType: "Line" | "Bar" | "Pie" | "Card" | "Gauge" | "Progress";
523
+ data: any;
524
+ valueLabel?: string;
525
+ valueField: string;
526
+ labelField: string;
527
+ }
528
+ interface SingleRecordWidgetProps {
529
+ widgetTitle?: string;
530
+ record: object;
531
+ valueField: string;
532
+ labelField: string;
533
+ total?: number;
534
+ }
535
+ declare const DashboardViewer: React.FC<DashboardViewerProps>;
536
+
537
+ declare const TemplateBarChart: React.FC<WidgetProps>;
538
+
539
+ declare const TemplateDataCard: React.FC<SingleRecordWidgetProps>;
540
+
541
+ declare const TemplateGauge: React.FC<SingleRecordWidgetProps>;
542
+
543
+ declare const TemplateLineChart: React.FC<WidgetProps>;
544
+
545
+ declare const TemplateLineProgress: react.FC<SingleRecordWidgetProps>;
546
+
547
+ declare const TemplatePieChart: React.FC<WidgetProps>;
548
+
549
+ declare const DashboardRouteView: React.FC;
550
+
487
551
  interface APIRequest {
488
552
  endPointURI: string;
489
553
  parameters?: any;
@@ -568,5 +632,5 @@ declare const LIGHT_THEME_INITIAL_SECANDARY_COLOR = "#ff6d00";
568
632
  declare const DARK_THEME_INITIAL_MAIN_COLOR = "#ea690e";
569
633
  declare const DARK_THEME_INITIAL_SECANDARY_COLOR = "#74776B";
570
634
 
571
- 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 };
572
- export type { EditDeleteAction, ExtendedTreeItemProps, FormActionProps, FormElementFieldProps, FormElementGroupProps, FormElementNodeProps, FormElementProps, FormElementSize, MakeOptional, ModalFormProps, RecordAction, RecordFieldProps, SystemRoute, TemplateFormProps, TemplateGridAttachmentProps, TemplateGridColDef, TemplateGridColumnProps, TemplateGridProps, TemplateGridTopBarProps, TransferListProps };
635
+ 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 };
636
+ export type { CommonStores, CommonStoresInterface, EditDeleteAction, ExtendedTreeItemProps, FormActionProps, FormElementFieldProps, FormElementGroupProps, FormElementNodeProps, FormElementProps, FormElementSize, GridSelection, MakeOptional, ModalFormProps, RecordAction, RecordFieldProps, SystemRoute, TemplateFormProps, TemplateGridAttachmentProps, TemplateGridColDef, TemplateGridColumnProps, TemplateGridProps, TemplateGridTopBarProps, TransferListProps };