@mcurros2/microm 1.1.377-0 → 1.1.379-0
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 +1587 -1490
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +981 -188
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { AlertProps, DefaultMantineColor, ProgressProps, MantineNumberSize, Variants, StepperProps, MantineTheme, TextareaProps, TextInputProps, MantineColor, PasswordInputProps, NotificationProps, CheckboxProps, ButtonProps, ActionIconProps, NumberInputProps, ImageProps, MultiSelectProps,
|
|
1
|
+
import { AlertProps, DefaultMantineColor, ProgressProps, MantineNumberSize, Variants, StepperProps, SelectItem, BadgeVariant, MantineSize, CardProps, MantineTheme, TextareaProps, TextInputProps, MantineColor, PasswordInputProps, NotificationProps, CheckboxProps, ButtonProps, ActionIconProps, NumberInputProps, ImageProps, MultiSelectProps, SimpleGridProps, OverlayProps, TransitionProps, AccordionProps, PinInputProps, SwitchProps, Radio, SelectProps, GroupProps, AvatarProps, AnchorProps, AutocompleteItem, AutocompleteProps, DefaultProps, BadgeProps, BreadcrumbsProps, MenuProps as _MenuProps1, TitleOrder, CSSObject, StackProps, NavbarProps, TooltipProps } from "@mantine/core";
|
|
2
2
|
import { JSX } from "react/jsx-runtime";
|
|
3
|
-
import React, { JSXElementConstructor, ReactElement, ReactNode, PropsWithChildren, RefAttributes, ForwardRefExoticComponent,
|
|
3
|
+
import React, { JSXElementConstructor, ReactElement, ReactNode, PropsWithChildren, RefAttributes, ForwardRefExoticComponent, Dispatch, RefObject, SetStateAction, ComponentType, CSSProperties, MutableRefObject, useState, KeyboardEvent, ComponentPropsWithoutRef, Context, ReactPortal } from "react";
|
|
4
4
|
import { hasLength, isNotEmpty, matches, UseFormReturnType } from "@mantine/form";
|
|
5
5
|
import { ModalSettings } from "@mantine/modals/lib/context";
|
|
6
6
|
import { IconProps, Icon } from "@tabler/icons-react";
|
|
7
7
|
import { LooseKeys } from "@mantine/form/lib/types";
|
|
8
|
+
import { AccordionVariant } from "@mantine/core/lib/Accordion/Accordion.types";
|
|
9
|
+
import { UseEntityFormReturnType as _UseEntityFormReturnType1, DataResult as _DataResult1, OperationStatus as _OperationStatus1, DataMapInfoWindowRenderer as _DataMapInfoWindowRenderer1, DataMapSelectRecordsRenderer as _DataMapSelectRecordsRenderer1, DataMapMarkerRenderer as _DataMapMarkerRenderer1, DataMapGroupMarkerRenderer as _DataMapGroupMarkerRenderer1, EntityDefinition as _EntityDefinition1, Entity as _Entity1, ValuesObject as _ValuesObject1, DBStatusResult as _DBStatusResult1, GridColumnsOverrides as _GridColumnsOverrides1, DataGridSelectionChangedCallback as _DataGridSelectionChangedCallback1, DataViewSearchCallback as _DataViewSearchCallback1, DataGridLabels as _DataGridLabels1, GridRecord as _GridRecord1, GridSelectionChangedCallback as _GridSelectionChangedCallback1, GridDoubleClickCallback as _GridDoubleClickCallback1, EntityClientAction as _EntityClientAction1, GridColumn as _GridColumn1 } from "src";
|
|
8
10
|
import { PrismProps } from "@mantine/prism";
|
|
9
11
|
import { DateInputProps, TimeInputProps, CalendarProps } from "@mantine/dates";
|
|
10
12
|
import { DropzoneProps } from "@mantine/dropzone";
|
|
11
|
-
import { UseEntityFormReturnType as _UseEntityFormReturnType1, DataResult as _DataResult1, OperationStatus as _OperationStatus1, DataMapInfoWindowRenderer as _DataMapInfoWindowRenderer1, DataMapSelectRecordsRenderer as _DataMapSelectRecordsRenderer1, DataMapMarkerRenderer as _DataMapMarkerRenderer1, DataMapGroupMarkerRenderer as _DataMapGroupMarkerRenderer1, EntityDefinition as _EntityDefinition1, Entity as _Entity1, ValuesObject as _ValuesObject1, DBStatusResult as _DBStatusResult1, DataGridLabels as _DataGridLabels1, GridColumnsOverrides as _GridColumnsOverrides1, DataGridSelectionChangedCallback as _DataGridSelectionChangedCallback1, DataViewSearchCallback as _DataViewSearchCallback1, GridRecord as _GridRecord1, GridSelectionChangedCallback as _GridSelectionChangedCallback1, GridDoubleClickCallback as _GridDoubleClickCallback1, EntityClientAction as _EntityClientAction1, GridColumn as _GridColumn1 } from "src";
|
|
12
|
-
import { AccordionVariant } from "@mantine/core/lib/Accordion/Accordion.types";
|
|
13
13
|
import { SpotlightAction } from "@mantine/spotlight";
|
|
14
14
|
import { Loader, LoaderOptions } from "@googlemaps/js-api-loader";
|
|
15
15
|
import { Cluster, ClusterStats, Marker, MarkerClustererOptions } from "@googlemaps/markerclusterer";
|
|
@@ -19,6 +19,15 @@ export type ValuesRecord = Value[];
|
|
|
19
19
|
export interface MicroMRequestOptions {
|
|
20
20
|
keepalive?: boolean;
|
|
21
21
|
}
|
|
22
|
+
export interface ImportDataMapping {
|
|
23
|
+
SourceHeader: string | null;
|
|
24
|
+
SourceIndex: number | null;
|
|
25
|
+
DestinationColumnName: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ExcelImportMapping {
|
|
28
|
+
SheetName: string | null;
|
|
29
|
+
Mapping: ImportDataMapping[];
|
|
30
|
+
}
|
|
22
31
|
export type SQLType = 'char' | 'nchar' | 'varchar' | 'nvarchar' | 'text' | 'ntext' | 'tinyint' | 'smallint' | 'int' | 'bigint' | 'float' | 'decimal' | 'real' | 'bit' | 'money' | 'datetime2' | 'datetime' | 'smalldatetime' | 'date' | 'binary' | 'varbinary' | 'image' | 'time';
|
|
23
32
|
export interface DataResult {
|
|
24
33
|
Header: string[];
|
|
@@ -527,1554 +536,1673 @@ export interface EntityFormModalProps {
|
|
|
527
536
|
}
|
|
528
537
|
export const EntityFormModalDefaultProps: Partial<EntityFormModalProps>;
|
|
529
538
|
export function EntityFormModal(props: EntityFormModalProps): null;
|
|
530
|
-
export
|
|
531
|
-
export
|
|
532
|
-
|
|
533
|
-
}
|
|
534
|
-
export interface NumberIndexer {
|
|
535
|
-
[key: number]: any;
|
|
539
|
+
export declare namespace query {
|
|
540
|
+
export function html(str: any): Query | undefined;
|
|
541
|
+
import version = Query.version;
|
|
542
|
+
export { version };
|
|
536
543
|
}
|
|
537
|
-
export
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
+
export declare namespace w2locale {
|
|
545
|
+
let locale: string;
|
|
546
|
+
let dateFormat: string;
|
|
547
|
+
let timeFormat: string;
|
|
548
|
+
let datetimeFormat: string;
|
|
549
|
+
let currencyPrefix: string;
|
|
550
|
+
let currencySuffix: string;
|
|
551
|
+
let currencyPrecision: number;
|
|
552
|
+
let groupSymbol: string;
|
|
553
|
+
let decimalSymbol: string;
|
|
554
|
+
let shortmonths: string[];
|
|
555
|
+
let fullmonths: string[];
|
|
556
|
+
let shortdays: string[];
|
|
557
|
+
let fulldays: string[];
|
|
558
|
+
let weekStarts: string;
|
|
559
|
+
let phrases: {
|
|
560
|
+
'${count} letters or more...': string;
|
|
561
|
+
'Add new record': string;
|
|
562
|
+
'Add New': string;
|
|
563
|
+
'Advanced Search': string;
|
|
564
|
+
after: string;
|
|
565
|
+
'AJAX error. See console for more details.': string;
|
|
566
|
+
'All Fields': string;
|
|
567
|
+
All: string;
|
|
568
|
+
Any: string;
|
|
569
|
+
'Are you sure you want to delete ${count} ${records}?': string;
|
|
570
|
+
'Attach files by dragging and dropping or Click to Select': string;
|
|
571
|
+
before: string;
|
|
572
|
+
'begins with': string;
|
|
573
|
+
begins: string;
|
|
574
|
+
between: string;
|
|
575
|
+
buffered: string;
|
|
576
|
+
Cancel: string;
|
|
577
|
+
Close: string;
|
|
578
|
+
Column: string;
|
|
579
|
+
Confirmation: string;
|
|
580
|
+
contains: string;
|
|
581
|
+
Copied: string;
|
|
582
|
+
'Copy to clipboard': string;
|
|
583
|
+
'Current Date & Time': string;
|
|
584
|
+
'Delete selected records': string;
|
|
585
|
+
Delete: string;
|
|
586
|
+
'Do you want to delete search item "${item}"?': string;
|
|
587
|
+
'Edit selected record': string;
|
|
588
|
+
Edit: string;
|
|
589
|
+
'Empty list': string;
|
|
590
|
+
'ends with': string;
|
|
591
|
+
ends: string;
|
|
592
|
+
'Field should be at least ${count} characters.': string;
|
|
593
|
+
Hide: string;
|
|
594
|
+
in: string;
|
|
595
|
+
'is not': string;
|
|
596
|
+
is: string;
|
|
597
|
+
'less than': string;
|
|
598
|
+
'Line #': string;
|
|
599
|
+
'Load ${count} more...': string;
|
|
600
|
+
'Loading...': string;
|
|
601
|
+
'Maximum number of files is ${count}': string;
|
|
602
|
+
'Maximum total size is ${count}': string;
|
|
603
|
+
Modified: string;
|
|
604
|
+
'more than': string;
|
|
605
|
+
'Multiple Fields': string;
|
|
606
|
+
Name: string;
|
|
607
|
+
'No items found': string;
|
|
608
|
+
'No matches': string;
|
|
609
|
+
No: string;
|
|
610
|
+
none: string;
|
|
611
|
+
'Not a float': string;
|
|
612
|
+
'Not a hex number': string;
|
|
613
|
+
'Not a valid date': string;
|
|
614
|
+
'Not a valid email': string;
|
|
615
|
+
'Not alpha-numeric': string;
|
|
616
|
+
'Not an integer': string;
|
|
617
|
+
'Not in money format': string;
|
|
618
|
+
'not in': string;
|
|
619
|
+
Notification: string;
|
|
620
|
+
of: string;
|
|
621
|
+
Ok: string;
|
|
622
|
+
Opacity: string;
|
|
623
|
+
'Record ID': string;
|
|
624
|
+
record: string;
|
|
625
|
+
records: string;
|
|
626
|
+
'Refreshing...': string;
|
|
627
|
+
'Reload data in the list': string;
|
|
628
|
+
Remove: string;
|
|
629
|
+
'Remove This Field': string;
|
|
630
|
+
'Request aborted.': string;
|
|
631
|
+
'Required field': string;
|
|
632
|
+
Reset: string;
|
|
633
|
+
'Restore Default State': string;
|
|
634
|
+
'Returned data is not in valid JSON format.': string;
|
|
635
|
+
'Save changed records': string;
|
|
636
|
+
'Save Grid State': string;
|
|
637
|
+
Save: string;
|
|
638
|
+
'Saved Searches': string;
|
|
639
|
+
'Saving...': string;
|
|
640
|
+
'Search took ${count} seconds': string;
|
|
641
|
+
Search: string;
|
|
642
|
+
'Select Hour': string;
|
|
643
|
+
'Select Minute': string;
|
|
644
|
+
selected: string;
|
|
645
|
+
'Server Response ${count} seconds': string;
|
|
646
|
+
'Show/hide columns': string;
|
|
647
|
+
Show: string;
|
|
648
|
+
Size: string;
|
|
649
|
+
Skip: string;
|
|
650
|
+
'Sorting took ${count} seconds': string;
|
|
651
|
+
'Type to search...': string;
|
|
652
|
+
Type: string;
|
|
653
|
+
Yes: string;
|
|
654
|
+
Yesterday: string;
|
|
655
|
+
'Your remote data source record count has changed, reloading from the first record.': string;
|
|
656
|
+
};
|
|
544
657
|
}
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
export type ButtonVariant = 'gradient' | 'subtle' | 'default' | 'outline' | 'filled' | 'light' | 'white';
|
|
548
|
-
export type latLng = {
|
|
549
|
-
lat: number;
|
|
550
|
-
lng: number;
|
|
658
|
+
type w2record = Record<string, unknown> & {
|
|
659
|
+
recid: number;
|
|
551
660
|
};
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
661
|
+
type w2recordId = string | number;
|
|
662
|
+
type w2columnField = string;
|
|
663
|
+
export type GridSelectionMode = 'multi' | 'single';
|
|
664
|
+
export type GridColumnFormat = 'url' | 'email' | 'string' | 'check' | 'image' | 'html';
|
|
665
|
+
export type GridColumnRender = (value: unknown, cellElement?: HTMLElement, record?: GridRecord, field?: w2columnField) => ReactNode;
|
|
666
|
+
export type GridRecord = w2record;
|
|
667
|
+
export type GridSourceRecord = Record<string | number, unknown> | unknown[];
|
|
668
|
+
export type GridRecordId = w2recordId;
|
|
669
|
+
export type GridColumn = {
|
|
670
|
+
field: string;
|
|
671
|
+
text: string;
|
|
672
|
+
hidden?: boolean;
|
|
673
|
+
format?: GridColumnFormat;
|
|
674
|
+
autoSizeMax?: number;
|
|
675
|
+
render?: GridColumnRender;
|
|
676
|
+
sqlType?: SQLType;
|
|
559
677
|
};
|
|
560
|
-
export
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
export
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
678
|
+
export type GridColumnsOverrides = Record<string | number, Partial<GridColumn>>;
|
|
679
|
+
export type GridSelection = GridRecord[];
|
|
680
|
+
export type GridDoubleClickCallback = (record: GridRecord) => void;
|
|
681
|
+
export type GridSelectionChangedCallback = (selection: GridSelection) => void;
|
|
682
|
+
export type GridOptions = {
|
|
683
|
+
columns?: GridColumn[];
|
|
684
|
+
rows?: GridSourceRecord[];
|
|
685
|
+
gridHeight?: string | number | 'auto' | 'flex-grow';
|
|
686
|
+
selectionMode?: GridSelectionMode;
|
|
687
|
+
onDoubleClick?: GridDoubleClickCallback;
|
|
688
|
+
preserveSelection?: boolean;
|
|
689
|
+
autoSelectFirstRow?: boolean;
|
|
690
|
+
onSelectionChanged?: GridSelectionChangedCallback;
|
|
691
|
+
showSelectCheckbox?: boolean;
|
|
692
|
+
rowHeight?: number;
|
|
693
|
+
stripped?: boolean;
|
|
694
|
+
highlightOnHover?: boolean;
|
|
695
|
+
columnBorders?: boolean;
|
|
696
|
+
rowBorders?: boolean;
|
|
697
|
+
withBorder?: boolean;
|
|
698
|
+
autoSizeColumnsOnLoad?: boolean;
|
|
699
|
+
columnsOverrides?: GridColumnsOverrides;
|
|
700
|
+
selectedRows?: GridSelection;
|
|
701
|
+
setSelectedRows?: (rows: GridSelection) => void;
|
|
702
|
+
timeZoneOffset?: number;
|
|
703
|
+
};
|
|
704
|
+
export type GridImperative = {};
|
|
705
|
+
export const DefaultGridProps: Partial<GridOptions>;
|
|
706
|
+
export const DefaultGridColumnProps: Partial<GridColumn>;
|
|
707
|
+
export const Grid: ForwardRefExoticComponent<GridOptions & RefAttributes<GridImperative>>;
|
|
708
|
+
export function GridGlobalStyles(): JSX.Element;
|
|
709
|
+
export interface UseDataGridToolbarFiltersProps {
|
|
710
|
+
filterValues: ValuesObject | undefined;
|
|
711
|
+
setFilterValues: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
712
|
+
filtersDescription: ValuesObject | undefined;
|
|
713
|
+
setFiltersDescription: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
714
|
+
client?: MicroMClient;
|
|
715
|
+
parentKeys?: ValuesObject;
|
|
716
|
+
FiltersEntity?: EntityConstructor;
|
|
717
|
+
searchData: SelectItem[];
|
|
718
|
+
setSearchData: Dispatch<SetStateAction<SelectItem[]>>;
|
|
719
|
+
setSearchText: Dispatch<SetStateAction<string[] | undefined>>;
|
|
720
|
+
onRefreshClick: (searchText: string[] | undefined) => void;
|
|
721
|
+
onSearchTextChange?: (text: string[] | undefined) => void;
|
|
722
|
+
filtersFormSize: MantineNumberSize;
|
|
723
|
+
visibleFilters?: string[];
|
|
724
|
+
initialColumnFilters?: ColumnsObject;
|
|
725
|
+
filterInputRef: RefObject<HTMLInputElement>;
|
|
589
726
|
}
|
|
590
|
-
export
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
727
|
+
export function useDataGridToolbarFilters(props: UseDataGridToolbarFiltersProps): {
|
|
728
|
+
handleFilterButtonClick: (e: React.MouseEvent) => Promise<void>;
|
|
729
|
+
handleSearchFilterInputEnter: (e: React.KeyboardEvent) => void;
|
|
730
|
+
handleClearFiltersClick: (e: React.MouseEvent) => void;
|
|
731
|
+
createSearchPhrase: (filter: string) => {
|
|
732
|
+
value: string;
|
|
733
|
+
label: string;
|
|
734
|
+
};
|
|
735
|
+
queryText: string;
|
|
736
|
+
filtersDescription: ValuesObject | undefined;
|
|
737
|
+
setFiltersDescription: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
738
|
+
setQueryText: Dispatch<SetStateAction<string>>;
|
|
739
|
+
handleSearchFilterInputOnChange: (searchFilter: string[]) => void;
|
|
740
|
+
updateFilterValuesAndDescription: (columns: ColumnsObject) => void;
|
|
741
|
+
};
|
|
742
|
+
export type DataGridToolbarSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
743
|
+
export interface DataGridToolbarOptions {
|
|
744
|
+
size?: DataGridToolbarSizes;
|
|
745
|
+
client?: MicroMClient;
|
|
746
|
+
searchPlaceholder?: string;
|
|
747
|
+
hideCheckboxToggle?: boolean;
|
|
748
|
+
onCheckboxToggle?: () => void;
|
|
749
|
+
onSearchTextChange?: (text: string[] | undefined) => void;
|
|
750
|
+
onRefreshClick: (searchText: string[] | undefined) => void;
|
|
751
|
+
onExportClick: () => void;
|
|
752
|
+
autoFocus?: boolean;
|
|
753
|
+
toolbarIconVariant?: ActionIconVariant;
|
|
754
|
+
enableExport?: boolean;
|
|
755
|
+
refreshTooltip?: string;
|
|
756
|
+
exportTooltip?: string;
|
|
757
|
+
selectRowsTooltip?: string;
|
|
758
|
+
searchText: string[] | undefined;
|
|
759
|
+
setSearchText: Dispatch<SetStateAction<string[] | undefined>>;
|
|
760
|
+
searchData: SelectItem[];
|
|
761
|
+
setSearchData: Dispatch<SetStateAction<SelectItem[]>>;
|
|
762
|
+
maxSearchTerms?: number;
|
|
763
|
+
FiltersEntity?: EntityConstructor;
|
|
764
|
+
filterTooltip?: string;
|
|
765
|
+
parentKeys?: ValuesObject;
|
|
766
|
+
filterValues: ValuesObject | undefined;
|
|
767
|
+
setFilterValues: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
768
|
+
filtersDescription: ValuesObject | undefined;
|
|
769
|
+
setFiltersDescription: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
770
|
+
clearFiltersTooltip?: string;
|
|
771
|
+
filtersFormSize: MantineNumberSize;
|
|
772
|
+
enableImport?: boolean;
|
|
773
|
+
importTooltip?: string;
|
|
774
|
+
onImportClick?: () => void;
|
|
775
|
+
filtersBadgeSize?: MantineSize;
|
|
776
|
+
filtersBadgeVariant?: BadgeVariant;
|
|
777
|
+
showAppliedFilters?: boolean;
|
|
778
|
+
showRefreshButton?: boolean;
|
|
779
|
+
showSelectRowsButton?: boolean;
|
|
780
|
+
showFiltersButton?: boolean;
|
|
781
|
+
showSearchInput?: boolean;
|
|
782
|
+
visibleFilters?: string[];
|
|
783
|
+
initialColumnFilters?: ColumnsObject;
|
|
784
|
+
filtersTitle?: string;
|
|
785
|
+
editFitersLabel?: string;
|
|
786
|
+
clearFiltersLabel?: string;
|
|
787
|
+
filtersAccordionVariant?: AccordionVariant;
|
|
788
|
+
showColumnsConfig?: boolean;
|
|
789
|
+
configMenuOpened?: boolean;
|
|
790
|
+
setConfigMenuOpened?: Dispatch<SetStateAction<boolean>>;
|
|
791
|
+
configMenuDropdown?: ReactNode;
|
|
608
792
|
}
|
|
609
|
-
export
|
|
610
|
-
|
|
611
|
-
|
|
793
|
+
export const DataGridToolbarDefaultProps: Partial<DataGridToolbarOptions>;
|
|
794
|
+
export function DataGridToolbar(props: DataGridToolbarOptions): JSX.Element;
|
|
795
|
+
export interface DataGridStateProps {
|
|
796
|
+
setRefresh: React.Dispatch<React.SetStateAction<boolean>>;
|
|
797
|
+
setSearchText: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
798
|
+
executeViewState: OperationStatus<DataResult[]>;
|
|
612
799
|
}
|
|
613
|
-
export interface
|
|
614
|
-
|
|
800
|
+
export interface DataGridLabels extends EntityUILabels {
|
|
801
|
+
rowsReturnedLabel: string;
|
|
802
|
+
selectedRowsLabel: string;
|
|
803
|
+
limitLabel: string;
|
|
804
|
+
rowsLabel: string;
|
|
805
|
+
unlimitedLabel: string;
|
|
615
806
|
}
|
|
616
|
-
export
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
807
|
+
export type DataGridSelectionChangedCallback = (selection: GridSelection, keys: DataGridSelectionKeys) => void;
|
|
808
|
+
export interface DataGridProps extends UseEntityUIProps {
|
|
809
|
+
viewName?: string;
|
|
810
|
+
search?: string[];
|
|
811
|
+
limit?: DataViewLimit;
|
|
812
|
+
refreshOnInit?: boolean;
|
|
813
|
+
selectionMode: GridSelectionMode;
|
|
814
|
+
preserveSelection?: boolean;
|
|
815
|
+
autoFocus?: boolean;
|
|
816
|
+
onDataRefresh?: (result: OperationStatus<DataResult[]>) => void;
|
|
817
|
+
onSearch?: DataViewSearchCallback;
|
|
818
|
+
onSearchTextChange?: DataViewSearchCallback;
|
|
819
|
+
allwaysRefreshOnEntityClose?: boolean;
|
|
820
|
+
toolbarIconVariant?: ActionIconVariant;
|
|
821
|
+
actionsButtonVariant?: ButtonVariant;
|
|
822
|
+
toolbarSize?: DataGridToolbarSizes;
|
|
823
|
+
enableAdd?: boolean;
|
|
824
|
+
enableEdit?: boolean;
|
|
825
|
+
enableDelete?: boolean;
|
|
826
|
+
enableView?: boolean;
|
|
827
|
+
enableExport?: boolean;
|
|
828
|
+
filtersFormSize?: MantineNumberSize;
|
|
829
|
+
showActions?: boolean;
|
|
830
|
+
setInitialFiltersFromColumns?: boolean;
|
|
831
|
+
visibleFilters?: string[];
|
|
832
|
+
maxSearchTerms?: number;
|
|
833
|
+
columnBorders?: boolean;
|
|
834
|
+
rowBorders?: boolean;
|
|
835
|
+
withBorder?: boolean;
|
|
836
|
+
autoSizeColumnsOnLoad?: boolean;
|
|
837
|
+
labels?: DataGridLabels;
|
|
838
|
+
columnsOverrides?: GridColumnsOverrides;
|
|
839
|
+
renderOnlyWhenVisible?: boolean;
|
|
840
|
+
showToolbar?: boolean;
|
|
841
|
+
showActionsToolbar?: boolean;
|
|
842
|
+
enableImport?: boolean;
|
|
843
|
+
entityProcName?: string;
|
|
844
|
+
excludedImportDestinations?: string[];
|
|
845
|
+
gridHeight?: string | number | 'auto' | 'flex-grow';
|
|
846
|
+
minGridHeight?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'none';
|
|
847
|
+
autoSelectFirstRow?: boolean;
|
|
848
|
+
onSelectionChanged?: DataGridSelectionChangedCallback;
|
|
849
|
+
doubleClickAction?: 'edit' | 'view' | 'none' | ((record: GridRecord) => void);
|
|
850
|
+
formMode?: FormMode;
|
|
851
|
+
notExportableColumns?: number[];
|
|
852
|
+
showColumnsConfigMenu?: boolean;
|
|
853
|
+
initialHiddenColumns?: number[];
|
|
854
|
+
showSelectRowsButton?: boolean;
|
|
855
|
+
initialSelectRowsToggle?: boolean;
|
|
624
856
|
}
|
|
625
|
-
export
|
|
626
|
-
export interface
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
857
|
+
export type DataGridSelectionKeys = ValuesObject[];
|
|
858
|
+
export interface DataGridColumnsMenuProps {
|
|
859
|
+
columns?: GridColumn[];
|
|
860
|
+
setColumns: (columns: GridColumn[]) => void;
|
|
861
|
+
setOpened: (opened: boolean) => void;
|
|
630
862
|
}
|
|
631
|
-
export
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
mapSelectRecordsRenderer?: DataMapProps['selectRecordsRenderer'];
|
|
863
|
+
export function DataGridColumnsMenu(props: DataGridColumnsMenuProps): JSX.Element;
|
|
864
|
+
export const DataGridDefaultProps: Partial<DataGridProps>;
|
|
865
|
+
export function DataGrid(props: DataGridProps): JSX.Element;
|
|
866
|
+
export interface DataGridFormProps extends DataGridProps {
|
|
867
|
+
customTitle?: ReactNode;
|
|
868
|
+
title?: string;
|
|
869
|
+
icon?: ReactNode;
|
|
870
|
+
helpText?: string;
|
|
871
|
+
formMode: FormMode;
|
|
872
|
+
showTitle?: boolean;
|
|
642
873
|
}
|
|
643
|
-
export
|
|
644
|
-
|
|
874
|
+
export const DataGridFormDefaultProps: Partial<DataGridFormProps>;
|
|
875
|
+
export function DataGridForm(props: DataGridFormProps): JSX.Element;
|
|
876
|
+
export interface useDataGridFormType {
|
|
877
|
+
open: ({ entity, viewName, onClosed, selectionMode, modalProps, search, modalTitle, gridTitle }: ModalDataGridProps) => void;
|
|
878
|
+
}
|
|
879
|
+
export interface ModalDataGridProps {
|
|
880
|
+
entity: Entity<EntityDefinition>;
|
|
881
|
+
viewName: string;
|
|
882
|
+
onClosed?: () => void;
|
|
883
|
+
modalProps?: ModalSettings;
|
|
884
|
+
selectionMode?: GridSelectionMode;
|
|
885
|
+
search?: string[] | undefined;
|
|
886
|
+
modalTitle?: string;
|
|
887
|
+
gridTitle?: React.ReactNode;
|
|
888
|
+
formMode: FormMode;
|
|
889
|
+
}
|
|
890
|
+
export function useDataGridForm(): (props: ModalDataGridProps) => Promise<void>;
|
|
891
|
+
export interface DataGridPageProps extends Omit<DataGridProps, 'entity' | 'title'> {
|
|
892
|
+
title?: string;
|
|
893
|
+
icon?: ReactNode;
|
|
894
|
+
helpText?: string;
|
|
895
|
+
formMode: FormMode;
|
|
645
896
|
client: MicroMClient;
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
* Get the data for the current row and fill the columns values with it.
|
|
649
|
-
*/
|
|
650
|
-
getData(abort_signal?: AbortSignal | null): Promise<boolean>;
|
|
651
|
-
/**
|
|
652
|
-
* Add the data for the current row and fill the key columns values with the returned auto-numeric (if any).
|
|
653
|
-
*/
|
|
654
|
-
addData(abort_signal?: AbortSignal | null, recordsSelection?: ValuesObject[], ignoreRecordExists?: boolean, requestOptions?: MicroMRequestOptions): Promise<DBStatusResult>;
|
|
655
|
-
/**
|
|
656
|
-
* Edits the data for the current row.
|
|
657
|
-
*/
|
|
658
|
-
editData(abort_signal?: AbortSignal | null, recordsSelection?: ValuesObject[], requestOptions?: MicroMRequestOptions): Promise<DBStatusResult>;
|
|
659
|
-
/**
|
|
660
|
-
* Deletes the data for the current row.
|
|
661
|
-
*/
|
|
662
|
-
deleteData(recordsSelection?: ValuesObject[], abort_signal?: AbortSignal | null, parentKeys?: ValuesObject | null): Promise<DBStatusResult>;
|
|
663
|
-
/**
|
|
664
|
-
* Lookup the description for an entity.
|
|
665
|
-
*/
|
|
666
|
-
lookupData(abort_signal?: AbortSignal | null, parentKeys?: ValuesObject | null, proc_name?: string | null): Promise<string>;
|
|
667
|
-
/**
|
|
668
|
-
* Import data
|
|
669
|
-
*/
|
|
670
|
-
importData(abort_signal: (AbortSignal | null) | undefined, import_procname: (string | null) | undefined, parentKeys: (ValuesObject | null) | undefined, fileprocess_id: string): Promise<ImpDataResult>;
|
|
671
|
-
executeView(view: EntityView, view_parms?: ValuesObject, limit?: string | null, search?: string[] | null, abort_signal?: AbortSignal | null): Promise<DataResult[]>;
|
|
672
|
-
downloadBlobFile(blob: Blob, filename: string): void;
|
|
673
|
-
exportView(view: EntityView, view_parms?: ValuesObject, limit?: string | null, search?: string[] | null, abort_signal?: AbortSignal | null): Promise<Blob>;
|
|
674
|
-
exportProc(proc: EntityProc, proc_parms?: ValuesObject, abort_signal?: AbortSignal | null, recordsSelection?: ValuesObject[]): Promise<Blob>;
|
|
675
|
-
executeProc(proc: EntityProc, proc_parms?: ValuesObject, abort_signal?: AbortSignal | null, recordsSelection?: ValuesObject[]): Promise<DataResult[]>;
|
|
676
|
-
executeProcess(proc: EntityProc, proc_parms?: ValuesObject, abort_signal?: AbortSignal | null, recordsSelection?: ValuesObject[]): Promise<DBStatusResult>;
|
|
677
|
-
executeServerAction<TReturn extends Record<string, unknown>>(action: EntityServerAction, action_parms?: ValuesObject, abort_signal?: AbortSignal | null): Promise<TReturn>;
|
|
897
|
+
entityConstructor: (client: MicroMClient) => Entity<EntityDefinition>;
|
|
898
|
+
showTitle?: boolean;
|
|
678
899
|
}
|
|
679
|
-
export
|
|
680
|
-
export
|
|
681
|
-
|
|
682
|
-
get name(): string;
|
|
683
|
-
get def(): T;
|
|
684
|
-
parentKeys: ValuesObject;
|
|
685
|
-
API: EntityAPI;
|
|
686
|
-
Form: EntityFormComponentPromise | "AutoForm" | "AutoFiltersForm" | null;
|
|
687
|
-
Title: string;
|
|
688
|
-
HelpText?: string;
|
|
689
|
-
Icon?: ComponentType<IconProps>;
|
|
690
|
-
constructor(client: MicroMClient, def: T, parentKeys?: ValuesObject, setParentKeys?: boolean);
|
|
691
|
-
static clone(entity: Entity<EntityDefinition>): Entity<EntityDefinition>;
|
|
900
|
+
export const DataGridPageDefaultProps: Partial<DataGridPageProps>;
|
|
901
|
+
export function DataGridPage(props: DataGridPageProps): JSX.Element;
|
|
902
|
+
export interface UseViewFiltersProps extends Omit<UseEntityFormOptions, 'noSaveOnSubmit'> {
|
|
692
903
|
}
|
|
693
|
-
export function
|
|
694
|
-
export
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
export function convertRecordToValuesObject(record: ValuesRecord, headers: string[], typeInfo: SQLType[], formatToString?: (value: Value, sqlType: SQLType) => string): ValuesObject;
|
|
698
|
-
export function convertRecordsToArrayOfValuesObject(dataResult: DataResult, nameTransformFunction?: ((name: string) => string) | null, formatToString?: (value: Value) => string): ValuesObject[];
|
|
699
|
-
export function mapRecordToType<T extends ValuesObject>(record: ValuesRecord, headers: string[], enforceObjectKeys: Set<string>, mapping_behavior: MappingBehavior, map_properties?: Record<string, keyof T> | null, skipUndefinedOrNull?: boolean): T;
|
|
700
|
-
export function mapDataResultToType<T extends ValuesObject>(dataResult: DataResult, mapping_behavior: MappingBehavior, nameTransformFunction?: ((name: string) => string) | null, map_properties?: Record<string, keyof T> | null, skipUndefinedOrNull?: boolean): T[];
|
|
701
|
-
export function exportToCSV(viewResult: DataResult, notExportableColumns?: number[]): void;
|
|
702
|
-
export function exportToExcel(data: DataResult[], notExportableColumns?: number[], sheetNames?: string[]): Promise<void>;
|
|
703
|
-
export function extractArrayFromSelectedRecords<T>(selectedKeys: ValuesObject[], property: keyof ValuesObject): T[];
|
|
704
|
-
export function isInstanceOfEntityColumn<T extends Value>(obj: unknown): obj is EntityColumn<T>;
|
|
705
|
-
export function isViewMapping(obj: unknown): obj is ViewMapping;
|
|
706
|
-
export function isEntityLookup(obj: unknown): obj is EntityLookup;
|
|
707
|
-
export function getRequiredColumns(entity?: Entity<EntityDefinition>): string[];
|
|
708
|
-
export interface ColumnMapRecord {
|
|
709
|
-
columnName: string;
|
|
710
|
-
propertyName: string;
|
|
904
|
+
export function useViewFiltersForm(props: UseViewFiltersProps): _UseEntityFormReturnType1;
|
|
905
|
+
export interface UseResolvedEntityBuilderResult<TResult> {
|
|
906
|
+
result: TResult | null;
|
|
907
|
+
ready: boolean;
|
|
711
908
|
}
|
|
712
|
-
export
|
|
713
|
-
export
|
|
714
|
-
|
|
715
|
-
|
|
909
|
+
export function useResolvedEntityBuilder<TResult>(client: MicroMClient, parentKeys: ValuesObject | undefined, source: EntitySource<TResult>): UseResolvedEntityBuilderResult<TResult>;
|
|
910
|
+
export type SearchCallback = (search: string[] | undefined) => void;
|
|
911
|
+
interface UseRetainedSearchOptions {
|
|
912
|
+
retainSearch?: string;
|
|
913
|
+
search?: string[];
|
|
914
|
+
refreshOnInit?: boolean;
|
|
915
|
+
onSearch?: SearchCallback;
|
|
916
|
+
onSearchTextChange?: SearchCallback;
|
|
716
917
|
}
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
*/
|
|
723
|
-
export function getDictionaryByColumnName<T extends Partial<ColumnsObject>, V>(map: ColumnsMap<T, V>): Record<keyof T, keyof V>;
|
|
724
|
-
/**
|
|
725
|
-
* Returns a dictionary of property names mapped to column names.
|
|
726
|
-
* @param map
|
|
727
|
-
* @returns
|
|
728
|
-
*/
|
|
729
|
-
export function getDictionaryByPropertyName<V, T extends Partial<ColumnsObject>>(map: ColumnsMap<T, V>): Record<keyof V, keyof T>;
|
|
730
|
-
export function mapToRecordSelection<T extends Partial<ColumnsObject>, V>(values: V[], propertiesMapDictionary: Record<keyof V, keyof T>): ValuesObject[];
|
|
731
|
-
export class ColumnsMapper<T extends Entity<EntityDefinition>, V extends ValuesObject> {
|
|
732
|
-
#private;
|
|
733
|
-
constructor(entity: T, values: V, records: ColumnMapRecord[]);
|
|
734
|
-
columnsDictionary: Record<string, string>;
|
|
735
|
-
valuesDictionary: Record<string, string>;
|
|
736
|
-
mapValuesToColumns(columns: ColumnsObject, values: V, ignoreInvalidMappings?: boolean, ignoreInexistentValues?: boolean): void;
|
|
737
|
-
mapColumnsToValues(columns: ColumnsObject, ignoreInvalidMappings?: boolean, ignoreInexistentValues?: boolean): Partial<V>;
|
|
918
|
+
interface UseRetainedSearchResult {
|
|
919
|
+
search?: string[];
|
|
920
|
+
refreshOnInit?: boolean;
|
|
921
|
+
onSearch?: SearchCallback;
|
|
922
|
+
onSearchTextChange?: SearchCallback;
|
|
738
923
|
}
|
|
739
|
-
export
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
924
|
+
export function useRetainedSearch({ retainSearch, search, refreshOnInit, onSearch, onSearchTextChange }: UseRetainedSearchOptions): UseRetainedSearchResult;
|
|
925
|
+
type DataGridPanelBaseProps = Omit<DataGridProps, "entity" | "title"> & {
|
|
926
|
+
client: MicroMClient;
|
|
927
|
+
parentKeys?: ValuesObject;
|
|
928
|
+
retainSearch?: string;
|
|
929
|
+
onSearchTextChange?: DataGridProps["onSearch"];
|
|
930
|
+
bgLight?: DefaultMantineColor;
|
|
931
|
+
bgDark?: DefaultMantineColor;
|
|
932
|
+
/** Props for the wrapping Card. Replaces the default object entirely when set per instance */
|
|
933
|
+
containerCardProps?: Omit<CardProps, 'children'>;
|
|
934
|
+
/** Component shown while the entity is being resolved */
|
|
935
|
+
loadingComponent?: ReactNode;
|
|
746
936
|
};
|
|
747
|
-
export
|
|
748
|
-
export
|
|
749
|
-
export function
|
|
750
|
-
export interface
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
937
|
+
export type DataGridPanelProps = DataGridPanelBaseProps & EntityGridSourceProps;
|
|
938
|
+
export const DataGridPanelDefaultProps: Partial<DataGridPanelProps>;
|
|
939
|
+
export function DataGridPanel(props: DataGridPanelProps): JSX.Element;
|
|
940
|
+
export interface useDataViewReturnType {
|
|
941
|
+
handleSelectionChanged: DataViewSelectionChangedHandler;
|
|
942
|
+
handleDeleteRecord: (keys: ValuesObject, element?: HTMLElement) => Promise<void>;
|
|
943
|
+
handleDeleteClick: (element?: HTMLElement) => Promise<void>;
|
|
944
|
+
handleEditClick: (keys: ValuesObject, element?: HTMLElement) => Promise<void>;
|
|
945
|
+
handleAddClick: (element?: HTMLElement) => Promise<void>;
|
|
946
|
+
handleViewClick: (keys: ValuesObject, element?: HTMLElement) => Promise<void>;
|
|
947
|
+
handleToggleSelectable: () => void;
|
|
948
|
+
handleRefresh: (searchText: string[] | undefined) => void;
|
|
949
|
+
handleExecuteAction: (action: EntityClientAction, recordIndex?: number, element?: HTMLElement) => Promise<boolean | undefined>;
|
|
950
|
+
handleExport: () => void;
|
|
951
|
+
selectedRowsCount: number;
|
|
952
|
+
limitRows: string | null;
|
|
953
|
+
setLimitRows: React.Dispatch<React.SetStateAction<string | null>>;
|
|
954
|
+
showSelectCheckbox: boolean;
|
|
955
|
+
isLoading: boolean;
|
|
956
|
+
executeViewState: OperationStatus<DataResult[]>;
|
|
957
|
+
data: DataViewRecord<ValuesObject>[];
|
|
958
|
+
handleDeselectAllRecords: () => Promise<void>;
|
|
959
|
+
handleDeselectRecord: (record_index: number) => Promise<void>;
|
|
960
|
+
handleSelectRecord: (record_index: number) => Promise<void>;
|
|
961
|
+
handleSelectAllRecords: () => Promise<void>;
|
|
962
|
+
selectedRecords: DataViewSelection;
|
|
963
|
+
toggleSelectable: boolean;
|
|
964
|
+
handleLoadMore: () => void;
|
|
965
|
+
displayedItemsCount: number;
|
|
966
|
+
recordsCount?: number;
|
|
768
967
|
}
|
|
769
|
-
export
|
|
770
|
-
export
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
validationContainer?: React.ComponentType<{
|
|
776
|
-
children: ReactNode;
|
|
777
|
-
}>;
|
|
778
|
-
autoFocus?: 'autoFocusOnAdd' | 'autoFocusOnEdit' | boolean;
|
|
779
|
-
autoMaxWidth?: {
|
|
780
|
-
columnLenghtLessThanOrEqual: number;
|
|
781
|
-
maxWidth: string;
|
|
782
|
-
};
|
|
783
|
-
maxWidth?: keyof typeof MicroMWidthSizes;
|
|
784
|
-
minWidth?: keyof typeof MicroMWidthSizes;
|
|
968
|
+
export function useDataView(props: DataViewProps, stateProps: DataGridStateProps): useDataViewReturnType;
|
|
969
|
+
export const DataViewDefaultProps: Partial<DataViewProps>;
|
|
970
|
+
export const DataView: ForwardRefExoticComponent<DataViewProps & RefAttributes<HTMLElement>>;
|
|
971
|
+
export interface DataViewCardContainerProps extends EntityCardProps<ValuesObject> {
|
|
972
|
+
EntityCard?: ComponentType<EntityCardProps<ValuesObject>>;
|
|
973
|
+
CardProps?: Omit<CardProps, 'children'>;
|
|
785
974
|
}
|
|
786
|
-
export const
|
|
787
|
-
export
|
|
788
|
-
|
|
789
|
-
|
|
975
|
+
export const DataViewCardContainerDefaultProps: Partial<DataViewCardContainerProps>;
|
|
976
|
+
export function DataViewCardContainer(props: DataViewCardContainerProps): JSX.Element;
|
|
977
|
+
export type DataViewLimit = '50' | '100' | '500' | '1000' | '10000' | '0';
|
|
978
|
+
export const DataViewLimitData: (rowsLabel: string, unlimitedLabel: string) => SelectItem[];
|
|
979
|
+
export type DataViewSelection = number[];
|
|
980
|
+
export interface DataViewRecord<T extends ValuesObject> {
|
|
981
|
+
keys: ValuesObject;
|
|
982
|
+
data: T;
|
|
790
983
|
}
|
|
791
|
-
export
|
|
792
|
-
export
|
|
793
|
-
export
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
984
|
+
export type DataViewSelectionChangedCallback = (selection: DataViewSelection, keys: ValuesObject[]) => void;
|
|
985
|
+
export type DataViewSelectionChangedHandler = (selection: DataViewSelection) => void;
|
|
986
|
+
export type DataViewSearchCallback = (search: string[] | undefined) => void;
|
|
987
|
+
export type DataViewSelectionMode = 'single' | 'multi';
|
|
988
|
+
export interface DataViewLabels extends EntityUILabels {
|
|
989
|
+
rowsReturnedLabel: string;
|
|
990
|
+
selectedRowsLabel: string;
|
|
991
|
+
limitLabel: string;
|
|
992
|
+
rowsLabel: string;
|
|
993
|
+
unlimitedLabel: string;
|
|
994
|
+
resultLimitLabel: string;
|
|
995
|
+
loadMoreLabel: string;
|
|
996
|
+
fetchingDataLabel: string;
|
|
997
|
+
noRecordsFoundLabel: string;
|
|
797
998
|
}
|
|
798
|
-
export
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
placeholder?: string;
|
|
999
|
+
export interface DataViewProps extends Omit<UseEntityUIProps, 'labels'> {
|
|
1000
|
+
viewName: string;
|
|
1001
|
+
search?: string[];
|
|
1002
|
+
limit?: DataViewLimit;
|
|
1003
|
+
refreshOnInit?: boolean;
|
|
1004
|
+
selectionMode: DataViewSelectionMode;
|
|
1005
|
+
preserveSelection?: boolean;
|
|
806
1006
|
autoFocus?: boolean;
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
1007
|
+
onDataRefresh?: (result: OperationStatus<DataResult[]>) => void;
|
|
1008
|
+
onSearch?: DataViewSearchCallback;
|
|
1009
|
+
onSearchTextChange?: DataViewSearchCallback;
|
|
1010
|
+
allwaysRefreshOnEntityClose?: boolean;
|
|
1011
|
+
toolbarIconVariant?: ActionIconVariant;
|
|
1012
|
+
actionsButtonVariant?: ButtonVariant;
|
|
1013
|
+
toolbarSize?: DataGridToolbarSizes;
|
|
1014
|
+
enableAdd?: boolean;
|
|
1015
|
+
enableEdit?: boolean;
|
|
1016
|
+
enableDelete?: boolean;
|
|
1017
|
+
enableView?: boolean;
|
|
1018
|
+
enableExport?: boolean;
|
|
1019
|
+
filtersFormSize?: MantineNumberSize;
|
|
1020
|
+
setInitialFiltersFromColumns?: boolean;
|
|
1021
|
+
visibleFilters?: string[];
|
|
1022
|
+
showAppliedFilters?: boolean;
|
|
1023
|
+
showRefreshButton?: boolean;
|
|
1024
|
+
showFiltersButton?: boolean;
|
|
1025
|
+
showSearchInput?: boolean;
|
|
1026
|
+
showSelectRowsButton?: boolean;
|
|
1027
|
+
searchPlaceholder?: string;
|
|
1028
|
+
hideCheckboxToggle?: boolean;
|
|
1029
|
+
showActions?: boolean;
|
|
1030
|
+
showToolbar?: boolean;
|
|
1031
|
+
showDeleteOnlyWhenMultiselect?: boolean;
|
|
1032
|
+
CardContainer?: ComponentType<DataViewCardContainerProps>;
|
|
1033
|
+
CardRowAlign?: CSSProperties['alignItems'];
|
|
1034
|
+
cardHrefRootURL?: string;
|
|
1035
|
+
cardHrefTarget?: string;
|
|
1036
|
+
Card: ComponentType<EntityCardProps<ValuesObject>>;
|
|
1037
|
+
onSelectionChanged?: DataViewSelectionChangedCallback;
|
|
1038
|
+
notExportableColumns?: number[];
|
|
1039
|
+
labels?: DataViewLabels;
|
|
1040
|
+
itemsPerPage?: number;
|
|
1041
|
+
convertResultToLocaleString?: boolean;
|
|
1042
|
+
formMode?: FormMode;
|
|
1043
|
+
RowsContainer?: ComponentType<PropsWithChildren>;
|
|
1044
|
+
RowsContainerProps?: PropsWithChildren;
|
|
832
1045
|
}
|
|
833
|
-
export interface
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
1046
|
+
export interface EntityCardProps<T extends ValuesObject> {
|
|
1047
|
+
entity: Entity<EntityDefinition>;
|
|
1048
|
+
recordIndex: number;
|
|
1049
|
+
record: DataViewRecord<T>;
|
|
1050
|
+
selected?: boolean;
|
|
1051
|
+
toggleSelectable?: boolean;
|
|
1052
|
+
enableEdit?: boolean;
|
|
1053
|
+
enableDelete?: boolean;
|
|
1054
|
+
enableView?: boolean;
|
|
1055
|
+
handleEditClick?: (keys: ValuesObject, element: HTMLElement) => void;
|
|
1056
|
+
handleDeleteClick?: (keys: ValuesObject, element: HTMLElement) => void;
|
|
1057
|
+
handleViewClick?: (keys: ValuesObject, element: HTMLElement) => void;
|
|
1058
|
+
handleSelectRecord?: (record_index: number) => void;
|
|
1059
|
+
handleDeselectRecord?: (record_index: number) => void;
|
|
1060
|
+
handleExecuteAction?: (action: EntityClientAction, recordIndex?: number, element?: HTMLElement) => Promise<boolean | undefined>;
|
|
1061
|
+
handleCardClick?: (data: T) => void;
|
|
1062
|
+
refreshView?: () => void;
|
|
1063
|
+
cardHrefRootURL?: string;
|
|
1064
|
+
cardHrefTarget?: string;
|
|
838
1065
|
}
|
|
839
|
-
export
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
export interface PasswordFieldProps extends PasswordInputProps {
|
|
844
|
-
column: EntityColumn<string>;
|
|
845
|
-
entityForm: UseEntityFormReturnType;
|
|
846
|
-
loading?: boolean;
|
|
847
|
-
disableOnLoading?: boolean;
|
|
848
|
-
validate?: PasswordFieldValidatorConfiguration;
|
|
849
|
-
requiredMessage?: ReactNode;
|
|
850
|
-
validationContainer?: React.ComponentType<{
|
|
851
|
-
children: ReactNode;
|
|
852
|
-
}>;
|
|
853
|
-
autoMaxWidth?: {
|
|
854
|
-
columnLenghtLessThanOrEqual: number;
|
|
855
|
-
maxWidth: string;
|
|
856
|
-
};
|
|
857
|
-
}
|
|
858
|
-
export function PasswordField(props: PasswordFieldProps): JSX.Element;
|
|
859
|
-
export type useExecuteServerActionReturnType<TReturn extends ValuesObject> = {
|
|
860
|
-
status: OperationStatus<TReturn>;
|
|
861
|
-
execute: (values?: ValuesObject) => Promise<OperationStatus<TReturn> | undefined>;
|
|
862
|
-
abort: () => void;
|
|
1066
|
+
export type EntityBuilderProps = {
|
|
1067
|
+
entity: Entity<EntityDefinition>;
|
|
1068
|
+
view: string;
|
|
1069
|
+
Card: ComponentType<EntityCardProps<ValuesObject>>;
|
|
863
1070
|
};
|
|
864
|
-
export
|
|
865
|
-
export
|
|
866
|
-
export
|
|
867
|
-
export
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
falseMessage: ReactNode;
|
|
876
|
-
trueColor?: MantineColor;
|
|
877
|
-
falseColor?: MantineColor;
|
|
878
|
-
}
|
|
879
|
-
export const NotifyBitFieldDefaultProps: Partial<NotifyBitFieldProps>;
|
|
880
|
-
export function NotifyBitField(props: NotifyBitFieldProps): JSX.Element;
|
|
881
|
-
export interface CheckboxFieldProps extends CheckboxProps {
|
|
882
|
-
column: EntityColumn<Value>;
|
|
883
|
-
entityForm: UseEntityFormReturnType;
|
|
884
|
-
loading?: boolean;
|
|
885
|
-
disableOnLoading?: boolean;
|
|
886
|
-
requiredMessage?: ReactNode;
|
|
887
|
-
}
|
|
888
|
-
export function CheckboxField(props: CheckboxFieldProps): JSX.Element;
|
|
889
|
-
export interface UseOperationStatusCallback<T> {
|
|
890
|
-
callback: (...args: any[]) => Promise<T>;
|
|
891
|
-
operation: DataOperationType;
|
|
892
|
-
deps: React.DependencyList;
|
|
893
|
-
}
|
|
894
|
-
export type UseOperationStatusCallbackReturnType<T> = {
|
|
895
|
-
operationCallback: (...args: any[]) => Promise<OperationStatus<T>>;
|
|
896
|
-
status: OperationStatus<T>;
|
|
1071
|
+
export type EntityGridBuilderProps = Omit<EntityBuilderProps, 'Card'>;
|
|
1072
|
+
export type EntityLoader = (client: MicroMClient, parentKeys?: ValuesObject) => Promise<Entity<EntityDefinition>>;
|
|
1073
|
+
export type EntityBuilder<TEntity, TClient> = new (client: TClient, parentKeys?: ValuesObject) => TEntity;
|
|
1074
|
+
export type EntitySource<TResult> = {
|
|
1075
|
+
/** Builds the result synchronously */
|
|
1076
|
+
entityConstructor: (client: MicroMClient, parentKeys?: ValuesObject) => TResult;
|
|
1077
|
+
entityLoader?: never;
|
|
1078
|
+
} | {
|
|
1079
|
+
entityConstructor?: never;
|
|
1080
|
+
/** Loads the result asynchronously (e.g. via dynamic import) */
|
|
1081
|
+
entityLoader: (client: MicroMClient, parentKeys?: ValuesObject) => Promise<TResult>;
|
|
897
1082
|
};
|
|
898
|
-
export
|
|
899
|
-
export
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
1083
|
+
export type EntitySourceProps = EntitySource<Entity<EntityDefinition>>;
|
|
1084
|
+
export type EntityBuilderSourceProps = EntitySource<EntityBuilderProps>;
|
|
1085
|
+
export type EntityGridSourceProps = EntitySource<EntityGridBuilderProps>;
|
|
1086
|
+
export function importEntity<TClient, TEntity, TModule>(importModule: () => Promise<TModule>, getEntity: (module: TModule) => EntityBuilder<TEntity, TClient>): (client: TClient, parentKeys?: ValuesObject) => Promise<TEntity>;
|
|
1087
|
+
export function getEntity<TClient, TEntity, TModule, TCard>(importModule: () => Promise<TModule>, getEntity: (module: TModule) => EntityBuilder<TEntity, TClient>, getView: (entity: TEntity) => string, importCard: () => Promise<TCard>): (client: TClient, parentKeys?: ValuesObject) => Promise<EntityBuilderProps>;
|
|
1088
|
+
export function getEntity<TClient, TEntity, TModule>(importModule: () => Promise<TModule>, getEntity: (module: TModule) => EntityBuilder<TEntity, TClient>, getView: (entity: TEntity) => string): (client: TClient, parentKeys?: ValuesObject) => Promise<EntityGridBuilderProps>;
|
|
1089
|
+
export interface EntityClientActionOnClickProps {
|
|
1090
|
+
entity: Entity<any>;
|
|
1091
|
+
modal?: ModalContextType;
|
|
1092
|
+
selectedKeys?: ValuesObject[];
|
|
1093
|
+
element?: HTMLElement;
|
|
1094
|
+
onClose?: (result?: boolean) => Promise<boolean>;
|
|
910
1095
|
}
|
|
911
|
-
export
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
1096
|
+
export interface EntityClientAction {
|
|
1097
|
+
name: string;
|
|
1098
|
+
title: ReactNode;
|
|
1099
|
+
label: ReactNode;
|
|
1100
|
+
icon?: ReactNode;
|
|
1101
|
+
refreshOnClose?: boolean;
|
|
1102
|
+
dontRequireSelection?: boolean;
|
|
1103
|
+
minSelectedRecords?: number;
|
|
1104
|
+
maxSelectedRecords?: number;
|
|
1105
|
+
views?: string[];
|
|
1106
|
+
showActionInViewMode?: boolean;
|
|
1107
|
+
onClick: (props: EntityClientActionOnClickProps) => Promise<boolean>;
|
|
915
1108
|
}
|
|
916
|
-
export
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
invalidMessage?: string;
|
|
1109
|
+
export interface EntityProc {
|
|
1110
|
+
name: string;
|
|
1111
|
+
parms?: Record<string, Value>;
|
|
920
1112
|
}
|
|
921
|
-
export
|
|
922
|
-
|
|
923
|
-
export interface UseDynamicContentProps {
|
|
924
|
-
contentState: ReturnType<typeof useState<ReactNode>>;
|
|
925
|
-
dynamicContent: Promise<ReactNode>;
|
|
926
|
-
loading?: ReactNode;
|
|
1113
|
+
export interface EntityServerAction {
|
|
1114
|
+
name: string;
|
|
927
1115
|
}
|
|
928
|
-
export
|
|
929
|
-
export interface
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
iconSize?: string | number;
|
|
1116
|
+
export const DefaultKeySeparator = "-";
|
|
1117
|
+
export interface CompoundKeyGroup {
|
|
1118
|
+
viewIndex: number;
|
|
1119
|
+
keyMappings: Record<string, number>;
|
|
1120
|
+
keySeparator?: string;
|
|
934
1121
|
}
|
|
935
|
-
export
|
|
936
|
-
|
|
937
|
-
|
|
1122
|
+
export interface EntityView {
|
|
1123
|
+
name: string;
|
|
1124
|
+
keyMappings: Record<string, number>;
|
|
1125
|
+
compoundKeyGroups?: Record<string, CompoundKeyGroup>;
|
|
1126
|
+
Card?: Promise<ComponentType<EntityCardProps<ValuesObject>>> | null;
|
|
1127
|
+
FiltersEntity?: EntityConstructor;
|
|
1128
|
+
gridColumnsOverrides?: (theme: MantineTheme) => GridColumnsOverrides;
|
|
1129
|
+
mapMarkerRenderer?: DataMapProps['markerRenderer'];
|
|
1130
|
+
mapGroupMarkerRenderer?: DataMapProps['groupMarkerRenderer'];
|
|
1131
|
+
mapInfoWindowRenderer?: DataMapProps['InfoWindowRenderer'];
|
|
1132
|
+
mapSelectRecordsRenderer?: DataMapProps['selectRecordsRenderer'];
|
|
938
1133
|
}
|
|
939
|
-
export
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1134
|
+
export class EntityDefinition {
|
|
1135
|
+
name: string;
|
|
1136
|
+
columns: ColumnsObject;
|
|
1137
|
+
procs: Record<string, EntityProc>;
|
|
1138
|
+
views: Record<string, EntityView>;
|
|
1139
|
+
lookups: Record<string, EntityLookup>;
|
|
1140
|
+
serverActions: Record<string, EntityServerAction>;
|
|
1141
|
+
clientActions: Record<string, EntityClientAction>;
|
|
1142
|
+
importColumns: string[] | null;
|
|
1143
|
+
standardView(): string | null;
|
|
1144
|
+
constructor(name: string);
|
|
1145
|
+
addCol<T extends Value>({ name, type, length, scale, value, defaultValue, flags, prompt }: EntityColumnOptions<T>): EntityColumn<T>;
|
|
1146
|
+
addView(view: EntityView): EntityView;
|
|
1147
|
+
addProc(proc: EntityProc): EntityProc;
|
|
1148
|
+
addLookup(lookup: EntityLookup): EntityLookup;
|
|
1149
|
+
addServerAction(action: EntityServerAction): EntityServerAction;
|
|
1150
|
+
addClientAction(action: EntityClientAction): EntityClientAction;
|
|
1151
|
+
static clone(entity_def: EntityDefinition): EntityDefinition;
|
|
952
1152
|
}
|
|
953
|
-
export
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
column: EntityColumn<Value>;
|
|
957
|
-
entityForm: UseEntityFormReturnType;
|
|
958
|
-
loading?: boolean;
|
|
959
|
-
disableOnLoading?: boolean;
|
|
960
|
-
validate?: ValidatorConfiguration;
|
|
961
|
-
requiredMessage?: ReactNode;
|
|
962
|
-
validationContainer?: React.ComponentType<{
|
|
963
|
-
children: ReactNode;
|
|
964
|
-
}>;
|
|
965
|
-
autoFocus?: 'autoFocusOnAdd' | 'autoFocusOnEdit' | boolean;
|
|
966
|
-
maxWidth?: keyof typeof MicroMWidthSizes;
|
|
967
|
-
minWidth?: keyof typeof MicroMWidthSizes;
|
|
1153
|
+
export interface ViewMapping {
|
|
1154
|
+
keyIndex: number;
|
|
1155
|
+
descriptionIndex: number;
|
|
968
1156
|
}
|
|
969
|
-
export
|
|
970
|
-
|
|
971
|
-
formAPI: UseEntityFormReturnType;
|
|
972
|
-
hierarchy: string[];
|
|
973
|
-
mappedHierarchy?: string[];
|
|
1157
|
+
export interface EntityConstructor {
|
|
1158
|
+
(client: MicroMClient, parentKeys?: ValuesObject): Entity<EntityDefinition>;
|
|
974
1159
|
}
|
|
975
|
-
export
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
1160
|
+
export interface EntityLookup {
|
|
1161
|
+
name: string;
|
|
1162
|
+
entityConstructor: EntityConstructor;
|
|
1163
|
+
view?: string;
|
|
1164
|
+
proc?: string;
|
|
1165
|
+
bindingColumnKey?: string;
|
|
1166
|
+
compoundKeyGroupName?: string;
|
|
1167
|
+
viewMapping?: ViewMapping;
|
|
980
1168
|
}
|
|
981
|
-
export
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1169
|
+
export interface UseResolvedEntityConstructorResult {
|
|
1170
|
+
entityConstructor: EntityConstructor | null;
|
|
1171
|
+
loading: boolean;
|
|
1172
|
+
error: unknown | null;
|
|
985
1173
|
}
|
|
986
|
-
export
|
|
987
|
-
|
|
988
|
-
export
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1174
|
+
export function useResolvedEntityConstructor(client: MicroMClient, parentKeys: ValuesObject | undefined, source: EntitySourceProps): UseResolvedEntityConstructorResult;
|
|
1175
|
+
type EntityFormPanelBaseProps = Omit<EntityFormPageProps, "entityConstructor">;
|
|
1176
|
+
export type EntityFormPanelProps = EntityFormPanelBaseProps & EntitySourceProps & {
|
|
1177
|
+
parentKeys?: ValuesObject;
|
|
1178
|
+
bgLight?: DefaultMantineColor;
|
|
1179
|
+
bgDark?: DefaultMantineColor;
|
|
1180
|
+
/** Props for the wrapping Card. Replaces the default object entirely when set per instance */
|
|
1181
|
+
containerCardProps?: Omit<CardProps, 'children'>;
|
|
1182
|
+
};
|
|
1183
|
+
export const EntityFormPanelDefaultProps: Partial<EntityFormPanelProps>;
|
|
1184
|
+
export function EntityFormPanel(props: EntityFormPanelProps): JSX.Element;
|
|
1185
|
+
export type FormMode = 'add' | 'edit' | 'view';
|
|
1186
|
+
export interface KeyStringIndexer {
|
|
1187
|
+
[key: string]: any;
|
|
992
1188
|
}
|
|
993
|
-
export
|
|
994
|
-
|
|
995
|
-
column: EntityColumn<Value>;
|
|
996
|
-
entityForm: UseEntityFormReturnType;
|
|
997
|
-
validate?: ValidatorConfiguration;
|
|
998
|
-
requiredMessage?: React.ReactNode;
|
|
999
|
-
validationContainer?: React.ComponentType<{
|
|
1000
|
-
children: ReactNode;
|
|
1001
|
-
}>;
|
|
1002
|
-
autoFocus?: 'autoFocusOnAdd' | 'autoFocusOnEdit' | boolean;
|
|
1003
|
-
showTimePicker?: boolean;
|
|
1004
|
-
maxWidth?: keyof typeof MicroMWidthSizes;
|
|
1005
|
-
minWidth?: keyof typeof MicroMWidthSizes;
|
|
1189
|
+
export interface NumberIndexer {
|
|
1190
|
+
[key: number]: any;
|
|
1006
1191
|
}
|
|
1007
|
-
export
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
client: MicroMClient;
|
|
1015
|
-
useLocalLoggedInCheck?: boolean;
|
|
1016
|
-
userInitialsClientClaimsNames?: string[];
|
|
1017
|
-
}
|
|
1018
|
-
export type useIsLoggedInReturnType = {
|
|
1019
|
-
isLoggedIn: boolean | undefined;
|
|
1020
|
-
setIsLoggedIn: Dispatch<SetStateAction<boolean | undefined>>;
|
|
1021
|
-
checkIsLoggedIn: () => Promise<void>;
|
|
1022
|
-
loggedInInfo: Partial<MicroMClientClaimTypes>;
|
|
1023
|
-
};
|
|
1024
|
-
export function useIsLoggedIn({ client, useLocalLoggedInCheck, userInitialsClientClaimsNames }: useIsLoggedInProps): useIsLoggedInReturnType;
|
|
1025
|
-
export const usePreventEnterSubmission: () => (event: KeyboardEvent) => void;
|
|
1026
|
-
export function formatDate(value: Value, locale?: string, dateOptions?: Intl.DateTimeFormatOptions): string;
|
|
1027
|
-
export function formatTime(value: Value, locale?: string, dateOptions?: Intl.DateTimeFormatOptions): string;
|
|
1028
|
-
export function formatNumber(value: Value, locale?: string): string;
|
|
1029
|
-
export function convertDateToNative(value: string, serverTimeZoneOffset: number): Date;
|
|
1030
|
-
export function formatSQLValue(value: Value, sqlType: SQLType, locale?: string): string;
|
|
1031
|
-
export function convertToNativeValue(value: Value, sqlType: SQLType, serverTimezoneOffset: number): Value;
|
|
1032
|
-
export interface UseLocaleFormatProps {
|
|
1033
|
-
timeZoneOffset: number;
|
|
1034
|
-
initialLocale?: string;
|
|
1192
|
+
export interface FormOptions<T extends Entity<EntityDefinition>> extends Omit<EntityFormProps, 'formAPI' | 'children'> {
|
|
1193
|
+
entity: T;
|
|
1194
|
+
initialFormMode: FormMode;
|
|
1195
|
+
getDataOnInit?: boolean;
|
|
1196
|
+
onSaved?: (status: OperationStatus<DBStatusResult>) => void;
|
|
1197
|
+
onCancel?: () => void;
|
|
1198
|
+
navigationProtection?: NavigationProtectionMode;
|
|
1035
1199
|
}
|
|
1036
|
-
export
|
|
1037
|
-
export
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
formatColumnValue: (col: EntityColumn<Value>) => string;
|
|
1200
|
+
export type useStateReturnType<T> = [T, React.Dispatch<React.SetStateAction<T>>];
|
|
1201
|
+
export type ActionIconVariant = 'transparent' | 'subtle' | 'default' | 'outline' | 'filled' | 'light';
|
|
1202
|
+
export type ButtonVariant = 'gradient' | 'subtle' | 'default' | 'outline' | 'filled' | 'light' | 'white';
|
|
1203
|
+
export type latLng = {
|
|
1204
|
+
lat: number;
|
|
1205
|
+
lng: number;
|
|
1043
1206
|
};
|
|
1044
|
-
export const
|
|
1045
|
-
|
|
1046
|
-
|
|
1207
|
+
export const MicroMWidthSizes: {
|
|
1208
|
+
xs: string;
|
|
1209
|
+
sm: string;
|
|
1210
|
+
md: string;
|
|
1211
|
+
lg: string;
|
|
1212
|
+
xl: string;
|
|
1213
|
+
auto: string;
|
|
1047
1214
|
};
|
|
1048
|
-
export interface
|
|
1049
|
-
|
|
1215
|
+
export interface EntityError extends Error {
|
|
1216
|
+
Errors: DBStatus[];
|
|
1050
1217
|
}
|
|
1051
|
-
export
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1218
|
+
export class EntityAPI {
|
|
1219
|
+
#private;
|
|
1220
|
+
client: MicroMClient;
|
|
1221
|
+
constructor(client: MicroMClient, name: string, columns: ColumnsObject);
|
|
1222
|
+
/**
|
|
1223
|
+
* Get the data for the current row and fill the columns values with it.
|
|
1224
|
+
*/
|
|
1225
|
+
getData(abort_signal?: AbortSignal | null): Promise<boolean>;
|
|
1226
|
+
/**
|
|
1227
|
+
* Add the data for the current row and fill the key columns values with the returned auto-numeric (if any).
|
|
1228
|
+
*/
|
|
1229
|
+
addData(abort_signal?: AbortSignal | null, recordsSelection?: ValuesObject[], ignoreRecordExists?: boolean, requestOptions?: MicroMRequestOptions): Promise<DBStatusResult>;
|
|
1230
|
+
/**
|
|
1231
|
+
* Edits the data for the current row.
|
|
1232
|
+
*/
|
|
1233
|
+
editData(abort_signal?: AbortSignal | null, recordsSelection?: ValuesObject[], requestOptions?: MicroMRequestOptions): Promise<DBStatusResult>;
|
|
1234
|
+
/**
|
|
1235
|
+
* Deletes the data for the current row.
|
|
1236
|
+
*/
|
|
1237
|
+
deleteData(recordsSelection?: ValuesObject[], abort_signal?: AbortSignal | null, parentKeys?: ValuesObject | null): Promise<DBStatusResult>;
|
|
1238
|
+
/**
|
|
1239
|
+
* Lookup the description for an entity.
|
|
1240
|
+
*/
|
|
1241
|
+
lookupData(abort_signal?: AbortSignal | null, parentKeys?: ValuesObject | null, proc_name?: string | null): Promise<string>;
|
|
1242
|
+
/**
|
|
1243
|
+
* Import data
|
|
1244
|
+
*/
|
|
1245
|
+
importData(abort_signal: (AbortSignal | null) | undefined, import_procname: (string | null) | undefined, parentKeys: (ValuesObject | null) | undefined, fileprocess_id: string, excelImportMapping?: ExcelImportMapping, initialRow?: number): Promise<ImpDataResult>;
|
|
1246
|
+
executeView(view: EntityView, view_parms?: ValuesObject, limit?: string | null, search?: string[] | null, abort_signal?: AbortSignal | null): Promise<DataResult[]>;
|
|
1247
|
+
downloadBlobFile(blob: Blob, filename: string): void;
|
|
1248
|
+
exportView(view: EntityView, view_parms?: ValuesObject, limit?: string | null, search?: string[] | null, abort_signal?: AbortSignal | null): Promise<Blob>;
|
|
1249
|
+
exportProc(proc: EntityProc, proc_parms?: ValuesObject, abort_signal?: AbortSignal | null, recordsSelection?: ValuesObject[]): Promise<Blob>;
|
|
1250
|
+
executeProc(proc: EntityProc, proc_parms?: ValuesObject, abort_signal?: AbortSignal | null, recordsSelection?: ValuesObject[]): Promise<DataResult[]>;
|
|
1251
|
+
executeProcess(proc: EntityProc, proc_parms?: ValuesObject, abort_signal?: AbortSignal | null, recordsSelection?: ValuesObject[]): Promise<DBStatusResult>;
|
|
1252
|
+
executeServerAction<TReturn extends Record<string, unknown>>(action: EntityServerAction, action_parms?: ValuesObject, abort_signal?: AbortSignal | null): Promise<TReturn>;
|
|
1055
1253
|
}
|
|
1056
|
-
export
|
|
1057
|
-
|
|
1254
|
+
export type EntityFormComponentPromise = Promise<ComponentType<FormOptions<Entity<any>>>>;
|
|
1255
|
+
export class Entity<T extends EntityDefinition> {
|
|
1256
|
+
#private;
|
|
1257
|
+
get name(): string;
|
|
1258
|
+
get def(): T;
|
|
1259
|
+
parentKeys: ValuesObject;
|
|
1260
|
+
API: EntityAPI;
|
|
1261
|
+
Form: EntityFormComponentPromise | "AutoForm" | "AutoFiltersForm" | null;
|
|
1262
|
+
Title: string;
|
|
1263
|
+
HelpText?: string;
|
|
1264
|
+
Icon?: ComponentType<IconProps>;
|
|
1265
|
+
constructor(client: MicroMClient, def: T, parentKeys?: ValuesObject, setParentKeys?: boolean);
|
|
1266
|
+
static clone(entity: Entity<EntityDefinition>): Entity<EntityDefinition>;
|
|
1058
1267
|
}
|
|
1059
|
-
export
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1268
|
+
export function convertValueFromString(col: EntityColumn<Value>, value: string): Value;
|
|
1269
|
+
export type MappingBehavior = 'lax' | 'enforceObject' | 'enforceDataResult' | 'exactMatch';
|
|
1270
|
+
export function toCamelCase(str: string): string;
|
|
1271
|
+
/** function to convert a record array to a values object */
|
|
1272
|
+
export function convertRecordToValuesObject(record: ValuesRecord, headers: string[], typeInfo: SQLType[], formatToString?: (value: Value, sqlType: SQLType) => string): ValuesObject;
|
|
1273
|
+
export function convertRecordsToArrayOfValuesObject(dataResult: DataResult, nameTransformFunction?: ((name: string) => string) | null, formatToString?: (value: Value) => string): ValuesObject[];
|
|
1274
|
+
export function mapRecordToType<T extends ValuesObject>(record: ValuesRecord, headers: string[], enforceObjectKeys: Set<string>, mapping_behavior: MappingBehavior, map_properties?: Record<string, keyof T> | null, skipUndefinedOrNull?: boolean): T;
|
|
1275
|
+
export function mapDataResultToType<T extends ValuesObject>(dataResult: DataResult, mapping_behavior: MappingBehavior, nameTransformFunction?: ((name: string) => string) | null, map_properties?: Record<string, keyof T> | null, skipUndefinedOrNull?: boolean): T[];
|
|
1276
|
+
export function exportToCSV(viewResult: DataResult, notExportableColumns?: number[]): void;
|
|
1277
|
+
export function exportToExcel(data: DataResult[], notExportableColumns?: number[], sheetNames?: string[]): Promise<void>;
|
|
1278
|
+
export function extractArrayFromSelectedRecords<T>(selectedKeys: ValuesObject[], property: keyof ValuesObject): T[];
|
|
1279
|
+
export function isInstanceOfEntityColumn<T extends Value>(obj: unknown): obj is EntityColumn<T>;
|
|
1280
|
+
export function isViewMapping(obj: unknown): obj is ViewMapping;
|
|
1281
|
+
export function isEntityLookup(obj: unknown): obj is EntityLookup;
|
|
1282
|
+
export function getRequiredColumns(entity?: Entity<EntityDefinition>): string[];
|
|
1283
|
+
export interface ColumnMapRecord {
|
|
1284
|
+
columnName: string;
|
|
1285
|
+
propertyName: string;
|
|
1063
1286
|
}
|
|
1064
|
-
export
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
manualRotation?: boolean | ImageManualRotationOptions;
|
|
1069
|
-
compression?: boolean | ImageCompressionOptions;
|
|
1070
|
-
outputFormat?: string;
|
|
1071
|
-
jpegBackgroundColor?: string;
|
|
1287
|
+
export type ColumnMap = ColumnMapRecord[];
|
|
1288
|
+
export interface ColumnsMapRecord<T extends Partial<ColumnsObject>, V> {
|
|
1289
|
+
columnName: keyof T;
|
|
1290
|
+
propertyName: keyof V;
|
|
1072
1291
|
}
|
|
1073
|
-
export
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1292
|
+
export type ColumnsMap<T extends Partial<ColumnsObject>, V> = ColumnsMapRecord<T, V>[];
|
|
1293
|
+
/**
|
|
1294
|
+
* Returns a dictionary of column names mapped to property names.
|
|
1295
|
+
* @param map
|
|
1296
|
+
* @returns
|
|
1297
|
+
*/
|
|
1298
|
+
export function getDictionaryByColumnName<T extends Partial<ColumnsObject>, V>(map: ColumnsMap<T, V>): Record<keyof T, keyof V>;
|
|
1299
|
+
/**
|
|
1300
|
+
* Returns a dictionary of property names mapped to column names.
|
|
1301
|
+
* @param map
|
|
1302
|
+
* @returns
|
|
1303
|
+
*/
|
|
1304
|
+
export function getDictionaryByPropertyName<V, T extends Partial<ColumnsObject>>(map: ColumnsMap<T, V>): Record<keyof V, keyof T>;
|
|
1305
|
+
export function mapToRecordSelection<T extends Partial<ColumnsObject>, V>(values: V[], propertiesMapDictionary: Record<keyof V, keyof T>): ValuesObject[];
|
|
1306
|
+
export class ColumnsMapper<T extends Entity<EntityDefinition>, V extends ValuesObject> {
|
|
1307
|
+
#private;
|
|
1308
|
+
constructor(entity: T, values: V, records: ColumnMapRecord[]);
|
|
1309
|
+
columnsDictionary: Record<string, string>;
|
|
1310
|
+
valuesDictionary: Record<string, string>;
|
|
1311
|
+
mapValuesToColumns(columns: ColumnsObject, values: V, ignoreInvalidMappings?: boolean, ignoreInexistentValues?: boolean): void;
|
|
1312
|
+
mapColumnsToValues(columns: ColumnsObject, ignoreInvalidMappings?: boolean, ignoreInexistentValues?: boolean): Partial<V>;
|
|
1081
1313
|
}
|
|
1082
|
-
export const
|
|
1083
|
-
export
|
|
1084
|
-
export function
|
|
1085
|
-
export function
|
|
1086
|
-
export function
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
shouldCompress: boolean;
|
|
1090
|
-
quality: number | undefined;
|
|
1314
|
+
export const MaxCompoundKeyValues = 10;
|
|
1315
|
+
export type OrderedCompoundKeyMapping = readonly [columnName: string, position: number];
|
|
1316
|
+
export function getOrderedCompoundKeyMappings(group: CompoundKeyGroup): OrderedCompoundKeyMapping[];
|
|
1317
|
+
export function resolveCompoundKeyGroup(view: EntityView, groupName: string): CompoundKeyGroup;
|
|
1318
|
+
export function splitCompoundKey(rawValue: string, group: CompoundKeyGroup): {
|
|
1319
|
+
values: string[];
|
|
1320
|
+
complete: boolean;
|
|
1091
1321
|
};
|
|
1092
|
-
export function
|
|
1093
|
-
export function
|
|
1094
|
-
export
|
|
1095
|
-
export
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
filePreviewError?: string;
|
|
1101
|
-
}
|
|
1102
|
-
export function ImagePreview({ documentURL, onClose, closeText }: FilePreviewProps): JSX.Element;
|
|
1103
|
-
export const PDFPreviewDefaultProps: Partial<FilePreviewProps>;
|
|
1104
|
-
export function PDFPreview(props: FilePreviewProps): JSX.Element;
|
|
1105
|
-
export class FileStoreClientDef extends EntityDefinition {
|
|
1106
|
-
columns: {
|
|
1107
|
-
dt_inserttime: EntityColumn<Date>;
|
|
1108
|
-
dt_lu: EntityColumn<Date>;
|
|
1109
|
-
vc_webinsuser: EntityColumn<string>;
|
|
1110
|
-
vc_webluuser: EntityColumn<string>;
|
|
1111
|
-
vc_insuser: EntityColumn<string>;
|
|
1112
|
-
vc_luuser: EntityColumn<string>;
|
|
1113
|
-
vc_fileguid: EntityColumn<string>;
|
|
1114
|
-
c_fileprocess_id: EntityColumn<string>;
|
|
1115
|
-
vc_filename: EntityColumn<string>;
|
|
1116
|
-
vc_filefolder: EntityColumn<string>;
|
|
1117
|
-
bi_filesize: EntityColumn<number>;
|
|
1118
|
-
vc_file_tag: EntityColumn<string>;
|
|
1119
|
-
c_fileuploadstatus_id: EntityColumn<string>;
|
|
1120
|
-
c_filestoragetype_id: EntityColumn<string>;
|
|
1121
|
-
};
|
|
1122
|
-
views: {
|
|
1123
|
-
fcc_brwFiles: {
|
|
1124
|
-
name: string;
|
|
1125
|
-
keyMappings: {
|
|
1126
|
-
vc_fileguid: number;
|
|
1127
|
-
c_fileprocess_id: number;
|
|
1128
|
-
};
|
|
1129
|
-
};
|
|
1130
|
-
};
|
|
1131
|
-
constructor();
|
|
1322
|
+
export function composeCompoundKey(values: readonly Value[], group: CompoundKeyGroup): string;
|
|
1323
|
+
export function extractCompoundKeyValues(keys: ValuesObject, group: CompoundKeyGroup): Value[] | undefined;
|
|
1324
|
+
export function extractCompoundRecordKeys(record: object, group: CompoundKeyGroup): ValuesObject | undefined;
|
|
1325
|
+
export interface useTextTransformProps {
|
|
1326
|
+
entityForm: UseEntityFormReturnType;
|
|
1327
|
+
column: EntityColumn<Value>;
|
|
1328
|
+
transform?: "uppercase" | "lowercase" | "capitalize" | "titlecase";
|
|
1329
|
+
autoTrim?: boolean;
|
|
1132
1330
|
}
|
|
1133
|
-
export
|
|
1134
|
-
|
|
1331
|
+
export function useTextTransform(props: useTextTransformProps): (text: string) => void;
|
|
1332
|
+
type TextAreaFieldAllowedValidators = 'regex' | 'length' | 'field' | 'required';
|
|
1333
|
+
export type TextAreaFieldValidatorConfiguration = Partial<Record<TextAreaFieldAllowedValidators, ValidatorConfigurationParms>>;
|
|
1334
|
+
export interface TextAreaFieldProps extends Omit<TextareaProps, 'autoFocus'>, Omit<useTextTransformProps, 'entityForm' | 'column' | 'onBlur' | 'mantineOnBlur'> {
|
|
1335
|
+
column: EntityColumn<Value>;
|
|
1336
|
+
entityForm: UseEntityFormReturnType;
|
|
1337
|
+
validate?: TextAreaFieldValidatorConfiguration;
|
|
1338
|
+
requiredMessage?: ReactNode;
|
|
1339
|
+
validationContainer?: React.ComponentType<{
|
|
1340
|
+
children: ReactNode;
|
|
1341
|
+
}>;
|
|
1342
|
+
autoFocus?: 'autoFocusOnAdd' | 'autoFocusOnEdit' | boolean;
|
|
1135
1343
|
}
|
|
1136
|
-
export
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
keyMappings: {
|
|
1150
|
-
c_fileprocess_id: number;
|
|
1151
|
-
};
|
|
1152
|
-
};
|
|
1344
|
+
export const TextAreaField: ForwardRefExoticComponent<TextAreaFieldProps & RefAttributes<HTMLTextAreaElement>>;
|
|
1345
|
+
export interface TextFieldProps extends Omit<TextInputProps, 'autoFocus'>, Omit<useTextTransformProps, 'entityForm' | 'column'> {
|
|
1346
|
+
column: EntityColumn<Value>;
|
|
1347
|
+
entityForm: UseEntityFormReturnType;
|
|
1348
|
+
validate?: ValidatorConfiguration;
|
|
1349
|
+
requiredMessage?: ReactNode;
|
|
1350
|
+
validationContainer?: React.ComponentType<{
|
|
1351
|
+
children: ReactNode;
|
|
1352
|
+
}>;
|
|
1353
|
+
autoFocus?: 'autoFocusOnAdd' | 'autoFocusOnEdit' | boolean;
|
|
1354
|
+
autoMaxWidth?: {
|
|
1355
|
+
columnLenghtLessThanOrEqual: number;
|
|
1356
|
+
maxWidth: string;
|
|
1153
1357
|
};
|
|
1154
|
-
|
|
1358
|
+
maxWidth?: keyof typeof MicroMWidthSizes;
|
|
1359
|
+
minWidth?: keyof typeof MicroMWidthSizes;
|
|
1155
1360
|
}
|
|
1156
|
-
export
|
|
1157
|
-
|
|
1361
|
+
export const TextField: ForwardRefExoticComponent<TextFieldProps & RefAttributes<HTMLInputElement>>;
|
|
1362
|
+
export interface AutoFormFieldsProps<T extends Entity<EntityDefinition>> {
|
|
1363
|
+
entity: T;
|
|
1364
|
+
entityForm: UseEntityFormReturnType;
|
|
1158
1365
|
}
|
|
1159
|
-
export
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1366
|
+
export function AutoFormFields(props: AutoFormFieldsProps<Entity<EntityDefinition>>): (ReactElement<any, string | JSXElementConstructor<any>> | undefined)[];
|
|
1367
|
+
export function AutoForm(props: FormOptions<Entity<EntityDefinition>>): JSX.Element;
|
|
1368
|
+
export interface ModalFormOptions {
|
|
1369
|
+
entity: Entity<EntityDefinition>;
|
|
1370
|
+
onSaved: (entity: Entity<EntityDefinition>) => void;
|
|
1371
|
+
onCancel: (entity: Entity<EntityDefinition>) => void;
|
|
1163
1372
|
}
|
|
1164
|
-
export function
|
|
1165
|
-
export interface
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
permissionDeniedMessage?: string;
|
|
1176
|
-
noCameraMessage?: string;
|
|
1177
|
-
cameraUnavailableMessage?: string;
|
|
1373
|
+
export function ModalForm({ entity, onSaved, onCancel }: ModalFormOptions): JSX.Element;
|
|
1374
|
+
export interface SearchInputProps extends TextInputProps {
|
|
1375
|
+
onSearchClick: React.MouseEventHandler;
|
|
1376
|
+
size: string;
|
|
1377
|
+
iconsSize: string;
|
|
1378
|
+
value: string;
|
|
1379
|
+
onChange: React.ChangeEventHandler<HTMLInputElement>;
|
|
1380
|
+
placeholder?: string;
|
|
1381
|
+
autoFocus?: boolean;
|
|
1382
|
+
iconVariant?: ActionIconVariant;
|
|
1383
|
+
[x: string]: any;
|
|
1178
1384
|
}
|
|
1179
|
-
export
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1385
|
+
export const SearchInputDefaultProps: Partial<SearchInputProps>;
|
|
1386
|
+
export function SearchInput(props: SearchInputProps): JSX.Element;
|
|
1387
|
+
export interface ToggleActionIconOptions {
|
|
1388
|
+
hidden: boolean;
|
|
1389
|
+
size: string;
|
|
1390
|
+
onColor: MantineColor;
|
|
1391
|
+
offColor: MantineColor;
|
|
1392
|
+
onVariant?: ActionIconVariant;
|
|
1393
|
+
offVariant?: ActionIconVariant;
|
|
1394
|
+
onIcon: ReactNode;
|
|
1395
|
+
offIcon: ReactNode;
|
|
1396
|
+
initialStatus?: 'on' | 'off';
|
|
1397
|
+
onClick?: () => void;
|
|
1398
|
+
radius?: MantineNumberSize;
|
|
1399
|
+
title?: string;
|
|
1187
1400
|
}
|
|
1188
|
-
export const
|
|
1189
|
-
export function
|
|
1190
|
-
export
|
|
1191
|
-
export
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
onSave: (file: File) => Promise<void> | void;
|
|
1195
|
-
onBeforeSave?: (file: File) => boolean | Promise<boolean>;
|
|
1196
|
-
onCancel: () => Promise<void> | void;
|
|
1197
|
-
initiallyDirty?: boolean;
|
|
1198
|
-
saveLabel?: string;
|
|
1199
|
-
cancelLabel?: string;
|
|
1200
|
-
rotateClockwiseLabel?: string;
|
|
1201
|
-
rotateCounterClockwiseLabel?: string;
|
|
1202
|
-
takePhotoLabel?: string;
|
|
1203
|
-
camera?: boolean | ImageEditorCameraConfiguration;
|
|
1401
|
+
export const ToggleActionIcon: ForwardRefExoticComponent<ToggleActionIconOptions & RefAttributes<HTMLButtonElement>>;
|
|
1402
|
+
export function useExecuteView(entity?: Entity<EntityDefinition>, values?: ValuesObject, viewName?: string, search?: string[] | undefined, limit?: string | null, refresh?: boolean, filters?: ValuesObject, enabled?: boolean): OperationStatus<DataResult[]>;
|
|
1403
|
+
export function useDebugProps<T>(propsObject: T, dependencies: any[], componentName: string): void;
|
|
1404
|
+
export function useEnterAsTab<T extends HTMLElement>(): MutableRefObject<T | null>;
|
|
1405
|
+
export interface useLoginType {
|
|
1406
|
+
login: () => void;
|
|
1204
1407
|
}
|
|
1205
|
-
export
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
progress: number;
|
|
1211
|
-
done?: boolean;
|
|
1212
|
-
cancelled?: boolean;
|
|
1213
|
-
documentURL?: string;
|
|
1214
|
-
file_name: string;
|
|
1215
|
-
file_size: number;
|
|
1216
|
-
vc_fileguid?: string;
|
|
1217
|
-
thumbnailURL?: string;
|
|
1408
|
+
export interface useLoginOptions {
|
|
1409
|
+
client: MicroMClient;
|
|
1410
|
+
modalProps?: ModalSettings;
|
|
1411
|
+
onClose?: () => void;
|
|
1412
|
+
title?: string;
|
|
1218
1413
|
}
|
|
1219
|
-
export
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1414
|
+
export const UseLoginDefaultProps: Partial<useLoginOptions>;
|
|
1415
|
+
export function useLogin(props: useLoginOptions): () => Promise<void>;
|
|
1416
|
+
type PasswordFieldAllowedValidators = 'regex' | 'length' | 'field' | 'required';
|
|
1417
|
+
export type PasswordFieldValidatorConfiguration = Partial<Record<PasswordFieldAllowedValidators, ValidatorConfigurationParms>>;
|
|
1418
|
+
export interface PasswordFieldProps extends PasswordInputProps {
|
|
1419
|
+
column: EntityColumn<string>;
|
|
1420
|
+
entityForm: UseEntityFormReturnType;
|
|
1421
|
+
loading?: boolean;
|
|
1422
|
+
disableOnLoading?: boolean;
|
|
1423
|
+
validate?: PasswordFieldValidatorConfiguration;
|
|
1424
|
+
requiredMessage?: ReactNode;
|
|
1425
|
+
validationContainer?: React.ComponentType<{
|
|
1426
|
+
children: ReactNode;
|
|
1427
|
+
}>;
|
|
1428
|
+
autoMaxWidth?: {
|
|
1429
|
+
columnLenghtLessThanOrEqual: number;
|
|
1430
|
+
maxWidth: string;
|
|
1431
|
+
};
|
|
1231
1432
|
}
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1433
|
+
export function PasswordField(props: PasswordFieldProps): JSX.Element;
|
|
1434
|
+
export type useExecuteServerActionReturnType<TReturn extends ValuesObject> = {
|
|
1435
|
+
status: OperationStatus<TReturn>;
|
|
1436
|
+
execute: (values?: ValuesObject) => Promise<OperationStatus<TReturn> | undefined>;
|
|
1437
|
+
abort: () => void;
|
|
1438
|
+
};
|
|
1439
|
+
export function useExecuteServerAction<T extends EntityDefinition, TReturn extends ValuesObject>(entity: Entity<T>, actionName: string, doNotExecuteIfEntityValuesUnchanged?: boolean): useExecuteServerActionReturnType<TReturn>;
|
|
1440
|
+
export const NotifySuccessDefaultProps: Partial<NotificationProps>;
|
|
1441
|
+
export function NotifySuccess(props: NotificationProps): JSX.Element;
|
|
1442
|
+
export function NotifyError(props: NotificationProps): JSX.Element;
|
|
1443
|
+
export const NotifyInfoDefaultProps: Partial<NotificationProps>;
|
|
1444
|
+
export function NotifyInfo(props: NotificationProps): JSX.Element;
|
|
1445
|
+
export interface NotifyBitFieldProps extends NotificationProps {
|
|
1446
|
+
column: EntityColumn<boolean>;
|
|
1447
|
+
trueIcon?: ReactNode;
|
|
1448
|
+
falseIcon?: ReactNode;
|
|
1449
|
+
trueMessage: ReactNode;
|
|
1450
|
+
falseMessage: ReactNode;
|
|
1451
|
+
trueColor?: MantineColor;
|
|
1452
|
+
falseColor?: MantineColor;
|
|
1244
1453
|
}
|
|
1245
|
-
export
|
|
1246
|
-
|
|
1247
|
-
|
|
1454
|
+
export const NotifyBitFieldDefaultProps: Partial<NotifyBitFieldProps>;
|
|
1455
|
+
export function NotifyBitField(props: NotifyBitFieldProps): JSX.Element;
|
|
1456
|
+
export interface CheckboxFieldProps extends CheckboxProps {
|
|
1457
|
+
column: EntityColumn<Value>;
|
|
1458
|
+
entityForm: UseEntityFormReturnType;
|
|
1459
|
+
loading?: boolean;
|
|
1460
|
+
disableOnLoading?: boolean;
|
|
1461
|
+
requiredMessage?: ReactNode;
|
|
1248
1462
|
}
|
|
1249
|
-
export function
|
|
1250
|
-
export
|
|
1251
|
-
|
|
1252
|
-
|
|
1463
|
+
export function CheckboxField(props: CheckboxFieldProps): JSX.Element;
|
|
1464
|
+
export interface UseOperationStatusCallback<T> {
|
|
1465
|
+
callback: (...args: any[]) => Promise<T>;
|
|
1466
|
+
operation: DataOperationType;
|
|
1467
|
+
deps: React.DependencyList;
|
|
1468
|
+
}
|
|
1469
|
+
export type UseOperationStatusCallbackReturnType<T> = {
|
|
1470
|
+
operationCallback: (...args: any[]) => Promise<OperationStatus<T>>;
|
|
1471
|
+
status: OperationStatus<T>;
|
|
1253
1472
|
};
|
|
1254
|
-
export
|
|
1255
|
-
export
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1473
|
+
export function useOperationStatusCallback<T>(props: UseOperationStatusCallback<T>): UseOperationStatusCallbackReturnType<T>;
|
|
1474
|
+
export interface ConfirmPanelProps {
|
|
1475
|
+
content: ReactNode;
|
|
1476
|
+
loadingContent?: ReactNode;
|
|
1477
|
+
operation: DataOperationType;
|
|
1478
|
+
onOK: () => Promise<unknown>;
|
|
1479
|
+
onCancel: () => Promise<void> | void;
|
|
1480
|
+
cancelButtonText?: string;
|
|
1481
|
+
okButtonText?: string;
|
|
1482
|
+
okButtonProps?: ButtonProps;
|
|
1483
|
+
cancelButtonProps?: ButtonProps;
|
|
1484
|
+
runOnOpen?: boolean;
|
|
1259
1485
|
}
|
|
1260
|
-
export
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
maxTotalFilesSize?: number;
|
|
1265
|
-
maxFilesCount?: number;
|
|
1266
|
-
youCanUploadAMaximumOfText?: string;
|
|
1267
|
-
filesText?: string;
|
|
1268
|
-
exceedMaximumIndividualSizeText?: string;
|
|
1269
|
-
unspecifiedErrorWhenUploadingFileText?: string;
|
|
1270
|
-
totalUploadExceedsMaximumSizeText?: string;
|
|
1271
|
-
onCancel?: () => void;
|
|
1272
|
-
editor?: boolean;
|
|
1273
|
-
imageProcessing?: BrowserImageProcessingOptions;
|
|
1274
|
-
imageEditorTitle?: ReactNode;
|
|
1275
|
-
imageEditorProps?: ImageEditorConfigurationProps;
|
|
1276
|
-
imageEditorModalProps?: MicroMModalSettings;
|
|
1277
|
-
onValidateFile?: (file: File) => Promise<ValidateFileReturnType>;
|
|
1278
|
-
onProcessFile?: (file: File) => Promise<File | null>;
|
|
1279
|
-
onBeforeUpload?: (file: File) => Promise<boolean>;
|
|
1280
|
-
onBeforeReplace?: (currentFile: UploadProgressReport, replacementFile?: File) => Promise<boolean>;
|
|
1281
|
-
onUploadComplete?: (report: UploadProgressReport) => Promise<UploadCompletionResult | void>;
|
|
1282
|
-
onDeleteComplete?: (fileGUID: string) => Promise<void> | void;
|
|
1283
|
-
thumbnailMaxSize?: number;
|
|
1284
|
-
thumbnailQuality?: number;
|
|
1285
|
-
loadFilesOnMount?: boolean;
|
|
1286
|
-
}
|
|
1287
|
-
export const UseFileUploadDefaultProps: Partial<UseFileUploadProps>;
|
|
1288
|
-
export type UploadStatus = 'Pending' | 'Uploading' | 'Uploaded' | 'Failed' | 'Cancelled';
|
|
1289
|
-
export function useFileUpload(props: UseFileUploadProps): UseFileUploadReturnType;
|
|
1290
|
-
export interface FileUploaderProps extends Omit<DropzoneProps, 'children' | 'onDrop' | 'maxSize' | 'maxFiles'> {
|
|
1291
|
-
IdleIcon?: (props: IconProps) => ReactNode;
|
|
1292
|
-
UploadText?: string;
|
|
1293
|
-
AttachUpToText?: string;
|
|
1294
|
-
FilesText?: string;
|
|
1295
|
-
EachFileShouldNotExceedText?: string;
|
|
1296
|
-
uploadAPI: UseFileUploadReturnType;
|
|
1297
|
-
onDelete?: (fileGUID: string) => boolean | Promise<boolean>;
|
|
1298
|
-
imageProps?: ImageProps;
|
|
1299
|
-
closeText?: string;
|
|
1300
|
-
cancelledText?: string;
|
|
1301
|
-
operationCancelledText?: string;
|
|
1302
|
-
pdfCannotBeViewedText?: string;
|
|
1303
|
-
showCancelButton?: boolean;
|
|
1304
|
-
cancelLabel?: string;
|
|
1305
|
-
parentFormAPI?: UseEntityFormReturnType;
|
|
1306
|
-
editor?: boolean;
|
|
1307
|
-
editImageLabel?: string;
|
|
1308
|
-
replaceFileGUID?: string;
|
|
1309
|
-
replaceExistingFile?: boolean;
|
|
1310
|
-
}
|
|
1311
|
-
export const FileUploaderDefaultProps: Partial<FileUploaderProps>;
|
|
1312
|
-
export function FileUploader(props: FileUploaderProps): JSX.Element;
|
|
1313
|
-
export interface FilesUploadFormProps extends UseFileUploadProps {
|
|
1314
|
-
fileProcessColumn: EntityColumn<string>;
|
|
1315
|
-
onOK?: (fileprocess_id: string, files: readonly UploadProgressReport[]) => void;
|
|
1316
|
-
onDelete?: (fileGUID: string) => boolean | Promise<boolean>;
|
|
1317
|
-
helpMessage?: string;
|
|
1318
|
-
uploaderProps?: Omit<FileUploaderProps, 'uploadAPI' | 'editor'>;
|
|
1319
|
-
okLabel?: string;
|
|
1320
|
-
showOKButton?: boolean;
|
|
1321
|
-
uploadAPI?: UseFileUploadReturnType;
|
|
1486
|
+
export const ConfirmAndExecutePanelDefaultProps: Partial<ConfirmPanelProps>;
|
|
1487
|
+
export function ConfirmAndExecutePanel(props: ConfirmPanelProps): JSX.Element;
|
|
1488
|
+
export interface EmailFieldProps extends Omit<TextFieldProps, 'validate'> {
|
|
1489
|
+
invalidMessage?: string;
|
|
1322
1490
|
}
|
|
1323
|
-
export const
|
|
1324
|
-
export function
|
|
1325
|
-
export interface
|
|
1326
|
-
|
|
1327
|
-
fileProcessColumn: EntityColumn<string>;
|
|
1328
|
-
onOK?: (fileprocess_id: string, files: readonly UploadProgressReport[]) => void;
|
|
1329
|
-
onCancel?: () => void;
|
|
1330
|
-
onClosed?: () => void;
|
|
1331
|
-
modalProps?: ModalSettings;
|
|
1332
|
-
modalTitle?: string;
|
|
1333
|
-
uploadAPI?: UseFileUploadReturnType;
|
|
1334
|
-
filesUploadFormProps: Omit<FilesUploadFormProps, 'fileProcessColumn' | 'uploaderProps' | 'client' | 'onOK' | 'onCancel' | 'uploadAPI'>;
|
|
1335
|
-
uploaderProps?: Omit<FileUploaderProps, 'uploadAPI' | 'editor'>;
|
|
1491
|
+
export const EmailFieldDefaultProps: Partial<EmailFieldProps>;
|
|
1492
|
+
export function EmailField(props: EmailFieldProps): JSX.Element;
|
|
1493
|
+
export interface UrlFieldProps extends Omit<TextFieldProps, 'validate'> {
|
|
1494
|
+
invalidMessage?: string;
|
|
1336
1495
|
}
|
|
1337
|
-
export const
|
|
1338
|
-
export function
|
|
1339
|
-
export interface
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1496
|
+
export const UrlFieldDefaultProps: Partial<UrlFieldProps>;
|
|
1497
|
+
export function UrlField(props: UrlFieldProps): JSX.Element;
|
|
1498
|
+
export interface UseDynamicContentProps {
|
|
1499
|
+
contentState: ReturnType<typeof useState<ReactNode>>;
|
|
1500
|
+
dynamicContent: Promise<ReactNode>;
|
|
1501
|
+
loading?: ReactNode;
|
|
1343
1502
|
}
|
|
1344
|
-
export function
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
export function useImportData(importEntity?: Entity<EntityDefinition>): {
|
|
1351
|
-
execute: (fileprocess_id: string) => Promise<OperationStatus<ImpDataResult> | undefined>;
|
|
1352
|
-
importStatus: OperationStatus<ImpDataResult>;
|
|
1353
|
-
cancellation: AbortController;
|
|
1354
|
-
};
|
|
1355
|
-
export interface MicroMClientClaimTypes {
|
|
1356
|
-
username: string;
|
|
1357
|
-
useremail?: string;
|
|
1358
|
-
userinitials?: string;
|
|
1359
|
-
[k: string]: unknown;
|
|
1503
|
+
export function useDynamicContent(props: UseDynamicContentProps): void;
|
|
1504
|
+
export interface CopyToClipboardProps extends ActionIconProps {
|
|
1505
|
+
valueToCopy: unknown;
|
|
1506
|
+
timeout?: number;
|
|
1507
|
+
copiedColor?: MantineColor;
|
|
1508
|
+
iconSize?: string | number;
|
|
1360
1509
|
}
|
|
1361
|
-
export
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
access_token: string;
|
|
1365
|
-
refresh_token: string;
|
|
1366
|
-
token_type: string;
|
|
1367
|
-
claims: Partial<MicroMClientClaimTypes>;
|
|
1368
|
-
constructor(access_token?: string, expires_in?: number, refresh_token?: string, token_type?: string, claims?: {});
|
|
1369
|
-
className(): string;
|
|
1510
|
+
export function CopyToClipboard(props: CopyToClipboardProps): JSX.Element;
|
|
1511
|
+
export interface CodeBlockProps extends Omit<PrismProps, 'children'> {
|
|
1512
|
+
codeText: string;
|
|
1370
1513
|
}
|
|
1371
|
-
export
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1514
|
+
export const CodeBlockDefaultProps: Partial<CodeBlockProps>;
|
|
1515
|
+
export function CodeBlock(props: CodeBlockProps): JSX.Element;
|
|
1516
|
+
export interface DateInputFieldProps extends Omit<DateInputProps, 'autoFocus'> {
|
|
1517
|
+
column: EntityColumn<Value>;
|
|
1518
|
+
entityForm: UseEntityFormReturnType;
|
|
1519
|
+
validate?: ValidatorConfiguration;
|
|
1520
|
+
requiredMessage?: ReactNode;
|
|
1521
|
+
validationContainer?: React.ComponentType<{
|
|
1522
|
+
children: ReactNode;
|
|
1523
|
+
}>;
|
|
1524
|
+
autoFocus?: 'autoFocusOnAdd' | 'autoFocusOnEdit' | boolean;
|
|
1525
|
+
maxWidth?: keyof typeof MicroMWidthSizes;
|
|
1526
|
+
minWidth?: keyof typeof MicroMWidthSizes;
|
|
1381
1527
|
}
|
|
1382
|
-
export
|
|
1383
|
-
export
|
|
1528
|
+
export const DateInputFieldDefaultProps: Partial<DateInputFieldProps>;
|
|
1529
|
+
export const DateInputField: ForwardRefExoticComponent<DateInputFieldProps & RefAttributes<HTMLInputElement>>;
|
|
1530
|
+
export interface NumberFieldProps extends Omit<NumberInputProps, 'autoFocus'> {
|
|
1531
|
+
column: EntityColumn<Value>;
|
|
1532
|
+
entityForm: UseEntityFormReturnType;
|
|
1384
1533
|
loading?: boolean;
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1534
|
+
disableOnLoading?: boolean;
|
|
1535
|
+
validate?: ValidatorConfiguration;
|
|
1536
|
+
requiredMessage?: ReactNode;
|
|
1537
|
+
validationContainer?: React.ComponentType<{
|
|
1538
|
+
children: ReactNode;
|
|
1539
|
+
}>;
|
|
1540
|
+
autoFocus?: 'autoFocusOnAdd' | 'autoFocusOnEdit' | boolean;
|
|
1541
|
+
maxWidth?: keyof typeof MicroMWidthSizes;
|
|
1542
|
+
minWidth?: keyof typeof MicroMWidthSizes;
|
|
1388
1543
|
}
|
|
1389
|
-
export
|
|
1390
|
-
export
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
vc_webinsuser: EntityColumn<string>;
|
|
1395
|
-
vc_webluuser: EntityColumn<string>;
|
|
1396
|
-
vc_insuser: EntityColumn<string>;
|
|
1397
|
-
vc_luuser: EntityColumn<string>;
|
|
1398
|
-
c_fileprocess_id: EntityColumn<string>;
|
|
1399
|
-
};
|
|
1400
|
-
views: {
|
|
1401
|
-
ipr_brwStandard: {
|
|
1402
|
-
name: string;
|
|
1403
|
-
keyMappings: {
|
|
1404
|
-
c_import_process: number;
|
|
1405
|
-
};
|
|
1406
|
-
};
|
|
1407
|
-
};
|
|
1408
|
-
lookups: {
|
|
1409
|
-
FileStoreProcess: {
|
|
1410
|
-
name: string;
|
|
1411
|
-
viewMapping: {
|
|
1412
|
-
keyIndex: number;
|
|
1413
|
-
descriptionIndex: number;
|
|
1414
|
-
};
|
|
1415
|
-
entityConstructor: (client: MicroMClient, parentKeys?: ValuesObject) => FileStoreProcess;
|
|
1416
|
-
};
|
|
1417
|
-
};
|
|
1418
|
-
constructor();
|
|
1544
|
+
export const NumberField: ForwardRefExoticComponent<NumberFieldProps & RefAttributes<HTMLInputElement>>;
|
|
1545
|
+
export interface UseHierarchyKeysProps {
|
|
1546
|
+
formAPI: UseEntityFormReturnType;
|
|
1547
|
+
hierarchy: string[];
|
|
1548
|
+
mappedHierarchy?: string[];
|
|
1419
1549
|
}
|
|
1420
|
-
export
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
icon: ReactNode;
|
|
1426
|
-
mr?: string;
|
|
1550
|
+
export function useHierarchyKeys(props: UseHierarchyKeysProps): Record<string, Value>[];
|
|
1551
|
+
export interface PhoneFieldProps extends Omit<TextFieldProps, 'validate'> {
|
|
1552
|
+
invalidMessage?: string;
|
|
1553
|
+
showCallIcon?: boolean;
|
|
1554
|
+
showWhatsappIcon?: boolean;
|
|
1427
1555
|
}
|
|
1428
|
-
export const
|
|
1429
|
-
export
|
|
1430
|
-
export interface
|
|
1431
|
-
|
|
1432
|
-
importInfoLabel?: string;
|
|
1433
|
-
csvInstructionsLabel?: string;
|
|
1434
|
-
columnHeaderLabel?: string;
|
|
1435
|
-
dataNameLabel?: string;
|
|
1436
|
-
contentLabel?: string;
|
|
1437
|
-
dataTypeLabel?: string;
|
|
1438
|
-
errorReadingFileLabel?: string;
|
|
1439
|
-
emptyCSVFileLabel?: string;
|
|
1440
|
-
missingColumnsLabel?: string;
|
|
1441
|
-
dateFormatLabel?: string;
|
|
1442
|
-
numberFormatLabel?: string;
|
|
1443
|
-
downloadSampleLabel?: string;
|
|
1444
|
-
importButtonLabel?: string;
|
|
1445
|
-
importHelpAndInstructionsLabel?: string;
|
|
1446
|
-
recordsImportedSusccessfullyLabel?: string;
|
|
1447
|
-
recordsNotImportedDueToErrorsLabel?: string;
|
|
1448
|
-
importTheCSVFileLabel?: string;
|
|
1449
|
-
importedFileLabel?: string;
|
|
1450
|
-
errorColumnTitle?: string;
|
|
1451
|
-
rowColumnTitle?: string;
|
|
1556
|
+
export const PhoneFieldDefaultProps: Partial<PhoneFieldProps>;
|
|
1557
|
+
export function PhoneField(props: PhoneFieldProps): JSX.Element;
|
|
1558
|
+
export interface CUITFieldProps extends TextFieldProps {
|
|
1559
|
+
invalidMessage?: string;
|
|
1452
1560
|
}
|
|
1453
|
-
export const
|
|
1454
|
-
export function
|
|
1455
|
-
export interface
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1561
|
+
export const CUITFieldDefaultProps: Partial<CUITFieldProps>;
|
|
1562
|
+
export function CUITField(props: CUITFieldProps): JSX.Element;
|
|
1563
|
+
export interface UseParentKeysProps {
|
|
1564
|
+
formAPI: UseEntityFormReturnType;
|
|
1565
|
+
columnNames: string[];
|
|
1566
|
+
entity: Entity<EntityDefinition>;
|
|
1459
1567
|
}
|
|
1460
|
-
export
|
|
1461
|
-
export
|
|
1462
|
-
|
|
1568
|
+
export function useParentKeys(props: UseParentKeysProps): ValuesObject;
|
|
1569
|
+
export interface TimeFieldProps extends Omit<TimeInputProps, 'validate' | 'autoFocus'> {
|
|
1570
|
+
column: EntityColumn<Value>;
|
|
1571
|
+
entityForm: UseEntityFormReturnType;
|
|
1572
|
+
validate?: ValidatorConfiguration;
|
|
1573
|
+
requiredMessage?: React.ReactNode;
|
|
1574
|
+
validationContainer?: React.ComponentType<{
|
|
1575
|
+
children: ReactNode;
|
|
1576
|
+
}>;
|
|
1577
|
+
autoFocus?: 'autoFocusOnAdd' | 'autoFocusOnEdit' | boolean;
|
|
1578
|
+
showTimePicker?: boolean;
|
|
1579
|
+
maxWidth?: keyof typeof MicroMWidthSizes;
|
|
1580
|
+
minWidth?: keyof typeof MicroMWidthSizes;
|
|
1463
1581
|
}
|
|
1464
|
-
export
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1582
|
+
export const TimeFieldDefaultProps: Partial<TimeFieldProps>;
|
|
1583
|
+
interface TimeFieldRef {
|
|
1584
|
+
showPicker: () => void;
|
|
1585
|
+
}
|
|
1586
|
+
export const TimeField: ForwardRefExoticComponent<TimeFieldProps & RefAttributes<TimeFieldRef>>;
|
|
1587
|
+
export function getInitials(input: string): string;
|
|
1588
|
+
export interface useIsLoggedInProps {
|
|
1589
|
+
client: MicroMClient;
|
|
1590
|
+
useLocalLoggedInCheck?: boolean;
|
|
1591
|
+
userInitialsClientClaimsNames?: string[];
|
|
1473
1592
|
}
|
|
1474
|
-
export
|
|
1475
|
-
|
|
1593
|
+
export type useIsLoggedInReturnType = {
|
|
1594
|
+
isLoggedIn: boolean | undefined;
|
|
1595
|
+
setIsLoggedIn: Dispatch<SetStateAction<boolean | undefined>>;
|
|
1596
|
+
checkIsLoggedIn: () => Promise<void>;
|
|
1597
|
+
loggedInInfo: Partial<MicroMClientClaimTypes>;
|
|
1476
1598
|
};
|
|
1477
|
-
export
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1599
|
+
export function useIsLoggedIn({ client, useLocalLoggedInCheck, userInitialsClientClaimsNames }: useIsLoggedInProps): useIsLoggedInReturnType;
|
|
1600
|
+
export const usePreventEnterSubmission: () => (event: KeyboardEvent) => void;
|
|
1601
|
+
export function formatDate(value: Value, locale?: string, dateOptions?: Intl.DateTimeFormatOptions): string;
|
|
1602
|
+
export function formatTime(value: Value, locale?: string, dateOptions?: Intl.DateTimeFormatOptions): string;
|
|
1603
|
+
export function formatNumber(value: Value, locale?: string): string;
|
|
1604
|
+
export function convertDateToNative(value: string, serverTimeZoneOffset: number): Date;
|
|
1605
|
+
export function formatSQLValue(value: Value, sqlType: SQLType, locale?: string): string;
|
|
1606
|
+
export function convertToNativeValue(value: Value, sqlType: SQLType, serverTimezoneOffset: number): Value;
|
|
1607
|
+
export interface UseLocaleFormatProps {
|
|
1608
|
+
timeZoneOffset: number;
|
|
1609
|
+
initialLocale?: string;
|
|
1481
1610
|
}
|
|
1482
|
-
export
|
|
1483
|
-
|
|
1611
|
+
export const UseLocaleFormatDefaultProps: Partial<UseLocaleFormatProps>;
|
|
1612
|
+
export function useLocaleFormat(props: UseLocaleFormatProps): {
|
|
1613
|
+
locale: string | undefined;
|
|
1614
|
+
setLocale: Dispatch<SetStateAction<string | undefined>>;
|
|
1615
|
+
formatValue: (value: Value, sqlType: SQLType) => string;
|
|
1616
|
+
getNativeValue: (value: Value, sqlType: SQLType) => Value;
|
|
1617
|
+
formatColumnValue: (col: EntityColumn<Value>) => string;
|
|
1484
1618
|
};
|
|
1485
|
-
export interface
|
|
1619
|
+
export interface ExcelImportMappingEditorProps {
|
|
1620
|
+
file: File;
|
|
1621
|
+
destinations: readonly string[];
|
|
1622
|
+
onChange: (mapping: ExcelImportMapping | undefined, initialRow: number) => void;
|
|
1623
|
+
initialRow?: number;
|
|
1624
|
+
sampleRowCount?: number;
|
|
1625
|
+
worksheetLabel?: string;
|
|
1626
|
+
initialRowLabel?: string;
|
|
1627
|
+
sourceHeaderLabel?: string;
|
|
1628
|
+
sourceIndexLabel?: string;
|
|
1629
|
+
destinationLabel?: string;
|
|
1630
|
+
previewLabel?: string;
|
|
1631
|
+
addMappingLabel?: string;
|
|
1632
|
+
legacyHelpLabel?: string;
|
|
1633
|
+
noDestinationsLabel?: string;
|
|
1634
|
+
workbookErrorLabel?: string;
|
|
1635
|
+
}
|
|
1636
|
+
export const ExcelImportMappingEditorDefaultProps: Partial<ExcelImportMappingEditorProps>;
|
|
1637
|
+
export function ExcelImportMappingEditor(props: ExcelImportMappingEditorProps): JSX.Element;
|
|
1638
|
+
export const UseImportDataDefaultProps: {
|
|
1639
|
+
noFileProcessLabel: string;
|
|
1640
|
+
errorImportingDataLabel: string;
|
|
1641
|
+
};
|
|
1642
|
+
export interface ImageCropOptions {
|
|
1643
|
+
aspectRatio?: number;
|
|
1486
1644
|
}
|
|
1487
|
-
export
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
export interface openEntityFormProps<T extends FormOptions<Entity<EntityDefinition>>> {
|
|
1492
|
-
modals: ModalContextType;
|
|
1493
|
-
title?: string;
|
|
1494
|
-
element?: HTMLElement;
|
|
1495
|
-
handleModalSaved: (newStatus: OperationStatus<DBStatusResult | null>) => Promise<void>;
|
|
1496
|
-
handleModalCancel: () => Promise<void>;
|
|
1497
|
-
handleModalClosed?: () => void;
|
|
1498
|
-
modalFormSize?: MicroMModalSize;
|
|
1499
|
-
withModalFullscreenButton?: boolean;
|
|
1500
|
-
formProps: T;
|
|
1645
|
+
export interface ImageResizeOptions {
|
|
1646
|
+
maxWidth?: number;
|
|
1647
|
+
maxHeight?: number;
|
|
1648
|
+
allowUpscale?: boolean;
|
|
1501
1649
|
}
|
|
1502
|
-
export
|
|
1503
|
-
|
|
1504
|
-
addLabel: string;
|
|
1505
|
-
editLabel: string;
|
|
1506
|
-
deleteLabel: string;
|
|
1507
|
-
viewLabel: string;
|
|
1508
|
-
YouWillDeleteLabel: string;
|
|
1509
|
-
recordsLabel: string;
|
|
1510
|
-
recordLabel: string;
|
|
1511
|
-
AreYouSureLabel: string;
|
|
1512
|
-
warningLabel: string;
|
|
1513
|
-
YouMustSelectOneOrMoreRecordsToDelete: string;
|
|
1514
|
-
closeLabel: string;
|
|
1515
|
-
YouMustSelectOneOrMoreRecordsToExecuteAction: string;
|
|
1516
|
-
YouMustSelect: string;
|
|
1517
|
-
YouMustSelectBetween: string;
|
|
1518
|
-
YouMustSelectAtLeast: string;
|
|
1519
|
-
YouMustSelectMaximum: string;
|
|
1650
|
+
export interface ImageManualRotationOptions {
|
|
1651
|
+
stepDegrees?: 90 | -90;
|
|
1520
1652
|
}
|
|
1521
|
-
export interface
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
withModalFullscreenButton?: boolean;
|
|
1526
|
-
parentFormAPI?: UseEntityFormReturnType;
|
|
1527
|
-
saveFormBeforeAdd?: boolean;
|
|
1528
|
-
onModalSaved?: (new_status: OperationStatus<DBStatusResult | null>) => void;
|
|
1529
|
-
onModalCancelled?: () => void;
|
|
1530
|
-
onRecordsDeleted?: () => void;
|
|
1531
|
-
onActionRefreshOnClose?: () => void;
|
|
1532
|
-
labels?: EntityUILabels;
|
|
1533
|
-
onAddClick?: (gridAddClick: (element?: HTMLElement) => void, element?: HTMLElement) => void;
|
|
1534
|
-
onEditClick?: (keys: ValuesObject, element?: HTMLElement) => void;
|
|
1535
|
-
onDeleteClick?: (keys: ValuesObject[], element?: HTMLElement) => void;
|
|
1536
|
-
onActionExecuted?: (actionName: string, result?: boolean) => void;
|
|
1537
|
-
onModalClosed?: (cancelled?: boolean) => void;
|
|
1653
|
+
export interface ImageCompressionOptions {
|
|
1654
|
+
thresholdBytes?: number;
|
|
1655
|
+
quality?: number;
|
|
1656
|
+
fallbackFormat?: string;
|
|
1538
1657
|
}
|
|
1539
|
-
export
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
}
|
|
1548
|
-
export
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1658
|
+
export interface BrowserImageProcessingOptions {
|
|
1659
|
+
exifOrientation?: boolean;
|
|
1660
|
+
crop?: boolean | ImageCropOptions;
|
|
1661
|
+
resize?: boolean | ImageResizeOptions;
|
|
1662
|
+
manualRotation?: boolean | ImageManualRotationOptions;
|
|
1663
|
+
compression?: boolean | ImageCompressionOptions;
|
|
1664
|
+
outputFormat?: string;
|
|
1665
|
+
jpegBackgroundColor?: string;
|
|
1666
|
+
}
|
|
1667
|
+
export interface ResolvedBrowserImageProcessingOptions {
|
|
1668
|
+
exifOrientation: boolean;
|
|
1669
|
+
crop: false | Required<ImageCropOptions>;
|
|
1670
|
+
resize: false | Required<ImageResizeOptions>;
|
|
1671
|
+
manualRotation: false | Required<ImageManualRotationOptions>;
|
|
1672
|
+
compression: false | Required<ImageCompressionOptions>;
|
|
1673
|
+
outputFormat?: string;
|
|
1674
|
+
jpegBackgroundColor: string;
|
|
1675
|
+
}
|
|
1676
|
+
export const BrowserImageProcessingDefaults: ResolvedBrowserImageProcessingOptions;
|
|
1677
|
+
export function resolveImageProcessingOptions(options?: BrowserImageProcessingOptions): ResolvedBrowserImageProcessingOptions;
|
|
1678
|
+
export function getSupportedImageMimeType(fileName: string, declaredType?: string): string | undefined;
|
|
1679
|
+
export function isSupportedImageFile(fileName: string, declaredType?: string): boolean;
|
|
1680
|
+
export function getImageOutputSettings(file: File, options: ResolvedBrowserImageProcessingOptions): {
|
|
1681
|
+
sourceFormat: string;
|
|
1682
|
+
outputFormat: string;
|
|
1683
|
+
shouldCompress: boolean;
|
|
1684
|
+
quality: number | undefined;
|
|
1552
1685
|
};
|
|
1553
|
-
export
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1686
|
+
export function canvasToProcessedFile(canvas: HTMLCanvasElement, source: File, options: ResolvedBrowserImageProcessingOptions): Promise<File>;
|
|
1687
|
+
export function processImageFileAutomatically(file: File, options: ResolvedBrowserImageProcessingOptions): Promise<File>;
|
|
1688
|
+
export type PreviewFileTypes = 'image' | 'pdf' | 'other';
|
|
1689
|
+
export const getFileType: (file_name: string) => PreviewFileTypes;
|
|
1690
|
+
export interface FilePreviewProps {
|
|
1691
|
+
documentURL: string;
|
|
1692
|
+
onClose: () => void;
|
|
1693
|
+
closeText: string;
|
|
1694
|
+
filePreviewError?: string;
|
|
1562
1695
|
}
|
|
1563
|
-
export
|
|
1564
|
-
export const
|
|
1565
|
-
export function
|
|
1566
|
-
export
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1696
|
+
export function ImagePreview({ documentURL, onClose, closeText }: FilePreviewProps): JSX.Element;
|
|
1697
|
+
export const PDFPreviewDefaultProps: Partial<FilePreviewProps>;
|
|
1698
|
+
export function PDFPreview(props: FilePreviewProps): JSX.Element;
|
|
1699
|
+
export class FileStoreClientDef extends EntityDefinition {
|
|
1700
|
+
columns: {
|
|
1701
|
+
dt_inserttime: EntityColumn<Date>;
|
|
1702
|
+
dt_lu: EntityColumn<Date>;
|
|
1703
|
+
vc_webinsuser: EntityColumn<string>;
|
|
1704
|
+
vc_webluuser: EntityColumn<string>;
|
|
1705
|
+
vc_insuser: EntityColumn<string>;
|
|
1706
|
+
vc_luuser: EntityColumn<string>;
|
|
1707
|
+
vc_fileguid: EntityColumn<string>;
|
|
1708
|
+
c_fileprocess_id: EntityColumn<string>;
|
|
1709
|
+
vc_filename: EntityColumn<string>;
|
|
1710
|
+
vc_filefolder: EntityColumn<string>;
|
|
1711
|
+
bi_filesize: EntityColumn<number>;
|
|
1712
|
+
vc_file_tag: EntityColumn<string>;
|
|
1713
|
+
c_fileuploadstatus_id: EntityColumn<string>;
|
|
1714
|
+
c_filestoragetype_id: EntityColumn<string>;
|
|
1715
|
+
};
|
|
1716
|
+
views: {
|
|
1717
|
+
fcc_brwFiles: {
|
|
1718
|
+
name: string;
|
|
1719
|
+
keyMappings: {
|
|
1720
|
+
vc_fileguid: number;
|
|
1721
|
+
c_fileprocess_id: number;
|
|
1722
|
+
};
|
|
1723
|
+
};
|
|
1724
|
+
};
|
|
1725
|
+
constructor();
|
|
1584
1726
|
}
|
|
1585
|
-
export
|
|
1586
|
-
|
|
1587
|
-
export function html(str: any): Query | undefined;
|
|
1588
|
-
import version = Query.version;
|
|
1589
|
-
export { version };
|
|
1727
|
+
export class FileStoreClient extends Entity<FileStoreClientDef> {
|
|
1728
|
+
constructor(client: MicroMClient, parentKeys?: {});
|
|
1590
1729
|
}
|
|
1591
|
-
export
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
'Add new record': string;
|
|
1609
|
-
'Add New': string;
|
|
1610
|
-
'Advanced Search': string;
|
|
1611
|
-
after: string;
|
|
1612
|
-
'AJAX error. See console for more details.': string;
|
|
1613
|
-
'All Fields': string;
|
|
1614
|
-
All: string;
|
|
1615
|
-
Any: string;
|
|
1616
|
-
'Are you sure you want to delete ${count} ${records}?': string;
|
|
1617
|
-
'Attach files by dragging and dropping or Click to Select': string;
|
|
1618
|
-
before: string;
|
|
1619
|
-
'begins with': string;
|
|
1620
|
-
begins: string;
|
|
1621
|
-
between: string;
|
|
1622
|
-
buffered: string;
|
|
1623
|
-
Cancel: string;
|
|
1624
|
-
Close: string;
|
|
1625
|
-
Column: string;
|
|
1626
|
-
Confirmation: string;
|
|
1627
|
-
contains: string;
|
|
1628
|
-
Copied: string;
|
|
1629
|
-
'Copy to clipboard': string;
|
|
1630
|
-
'Current Date & Time': string;
|
|
1631
|
-
'Delete selected records': string;
|
|
1632
|
-
Delete: string;
|
|
1633
|
-
'Do you want to delete search item "${item}"?': string;
|
|
1634
|
-
'Edit selected record': string;
|
|
1635
|
-
Edit: string;
|
|
1636
|
-
'Empty list': string;
|
|
1637
|
-
'ends with': string;
|
|
1638
|
-
ends: string;
|
|
1639
|
-
'Field should be at least ${count} characters.': string;
|
|
1640
|
-
Hide: string;
|
|
1641
|
-
in: string;
|
|
1642
|
-
'is not': string;
|
|
1643
|
-
is: string;
|
|
1644
|
-
'less than': string;
|
|
1645
|
-
'Line #': string;
|
|
1646
|
-
'Load ${count} more...': string;
|
|
1647
|
-
'Loading...': string;
|
|
1648
|
-
'Maximum number of files is ${count}': string;
|
|
1649
|
-
'Maximum total size is ${count}': string;
|
|
1650
|
-
Modified: string;
|
|
1651
|
-
'more than': string;
|
|
1652
|
-
'Multiple Fields': string;
|
|
1653
|
-
Name: string;
|
|
1654
|
-
'No items found': string;
|
|
1655
|
-
'No matches': string;
|
|
1656
|
-
No: string;
|
|
1657
|
-
none: string;
|
|
1658
|
-
'Not a float': string;
|
|
1659
|
-
'Not a hex number': string;
|
|
1660
|
-
'Not a valid date': string;
|
|
1661
|
-
'Not a valid email': string;
|
|
1662
|
-
'Not alpha-numeric': string;
|
|
1663
|
-
'Not an integer': string;
|
|
1664
|
-
'Not in money format': string;
|
|
1665
|
-
'not in': string;
|
|
1666
|
-
Notification: string;
|
|
1667
|
-
of: string;
|
|
1668
|
-
Ok: string;
|
|
1669
|
-
Opacity: string;
|
|
1670
|
-
'Record ID': string;
|
|
1671
|
-
record: string;
|
|
1672
|
-
records: string;
|
|
1673
|
-
'Refreshing...': string;
|
|
1674
|
-
'Reload data in the list': string;
|
|
1675
|
-
Remove: string;
|
|
1676
|
-
'Remove This Field': string;
|
|
1677
|
-
'Request aborted.': string;
|
|
1678
|
-
'Required field': string;
|
|
1679
|
-
Reset: string;
|
|
1680
|
-
'Restore Default State': string;
|
|
1681
|
-
'Returned data is not in valid JSON format.': string;
|
|
1682
|
-
'Save changed records': string;
|
|
1683
|
-
'Save Grid State': string;
|
|
1684
|
-
Save: string;
|
|
1685
|
-
'Saved Searches': string;
|
|
1686
|
-
'Saving...': string;
|
|
1687
|
-
'Search took ${count} seconds': string;
|
|
1688
|
-
Search: string;
|
|
1689
|
-
'Select Hour': string;
|
|
1690
|
-
'Select Minute': string;
|
|
1691
|
-
selected: string;
|
|
1692
|
-
'Server Response ${count} seconds': string;
|
|
1693
|
-
'Show/hide columns': string;
|
|
1694
|
-
Show: string;
|
|
1695
|
-
Size: string;
|
|
1696
|
-
Skip: string;
|
|
1697
|
-
'Sorting took ${count} seconds': string;
|
|
1698
|
-
'Type to search...': string;
|
|
1699
|
-
Type: string;
|
|
1700
|
-
Yes: string;
|
|
1701
|
-
Yesterday: string;
|
|
1702
|
-
'Your remote data source record count has changed, reloading from the first record.': string;
|
|
1730
|
+
export class FileStoreProcessDef extends EntityDefinition {
|
|
1731
|
+
columns: {
|
|
1732
|
+
dt_inserttime: EntityColumn<Date>;
|
|
1733
|
+
dt_lu: EntityColumn<Date>;
|
|
1734
|
+
vc_webinsuser: EntityColumn<string>;
|
|
1735
|
+
vc_webluuser: EntityColumn<string>;
|
|
1736
|
+
vc_insuser: EntityColumn<string>;
|
|
1737
|
+
vc_luuser: EntityColumn<string>;
|
|
1738
|
+
c_fileprocess_id: EntityColumn<string>;
|
|
1739
|
+
};
|
|
1740
|
+
views: {
|
|
1741
|
+
fsp_brwStandard: {
|
|
1742
|
+
name: string;
|
|
1743
|
+
keyMappings: {
|
|
1744
|
+
c_fileprocess_id: number;
|
|
1745
|
+
};
|
|
1746
|
+
};
|
|
1703
1747
|
};
|
|
1748
|
+
constructor();
|
|
1704
1749
|
}
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
};
|
|
1708
|
-
type w2recordId = string | number;
|
|
1709
|
-
type w2columnField = string;
|
|
1710
|
-
export type GridSelectionMode = 'multi' | 'single';
|
|
1711
|
-
export type GridColumnFormat = 'url' | 'email' | 'string' | 'check' | 'image' | 'html';
|
|
1712
|
-
export type GridColumnRender = (value: unknown, cellElement?: HTMLElement, record?: GridRecord, field?: w2columnField) => ReactNode;
|
|
1713
|
-
export type GridRecord = w2record;
|
|
1714
|
-
export type GridSourceRecord = Record<string | number, unknown> | unknown[];
|
|
1715
|
-
export type GridRecordId = w2recordId;
|
|
1716
|
-
export type GridColumn = {
|
|
1717
|
-
field: string;
|
|
1718
|
-
text: string;
|
|
1719
|
-
hidden?: boolean;
|
|
1720
|
-
format?: GridColumnFormat;
|
|
1721
|
-
autoSizeMax?: number;
|
|
1722
|
-
render?: GridColumnRender;
|
|
1723
|
-
sqlType?: SQLType;
|
|
1724
|
-
};
|
|
1725
|
-
export type GridColumnsOverrides = Record<string | number, Partial<GridColumn>>;
|
|
1726
|
-
export type GridSelection = GridRecord[];
|
|
1727
|
-
export type GridDoubleClickCallback = (record: GridRecord) => void;
|
|
1728
|
-
export type GridSelectionChangedCallback = (selection: GridSelection) => void;
|
|
1729
|
-
export type GridOptions = {
|
|
1730
|
-
columns?: GridColumn[];
|
|
1731
|
-
rows?: GridSourceRecord[];
|
|
1732
|
-
gridHeight?: string | number | 'auto' | 'flex-grow';
|
|
1733
|
-
selectionMode?: GridSelectionMode;
|
|
1734
|
-
onDoubleClick?: GridDoubleClickCallback;
|
|
1735
|
-
preserveSelection?: boolean;
|
|
1736
|
-
autoSelectFirstRow?: boolean;
|
|
1737
|
-
onSelectionChanged?: GridSelectionChangedCallback;
|
|
1738
|
-
showSelectCheckbox?: boolean;
|
|
1739
|
-
rowHeight?: number;
|
|
1740
|
-
stripped?: boolean;
|
|
1741
|
-
highlightOnHover?: boolean;
|
|
1742
|
-
columnBorders?: boolean;
|
|
1743
|
-
rowBorders?: boolean;
|
|
1744
|
-
withBorder?: boolean;
|
|
1745
|
-
autoSizeColumnsOnLoad?: boolean;
|
|
1746
|
-
columnsOverrides?: GridColumnsOverrides;
|
|
1747
|
-
selectedRows?: GridSelection;
|
|
1748
|
-
setSelectedRows?: (rows: GridSelection) => void;
|
|
1749
|
-
timeZoneOffset?: number;
|
|
1750
|
-
};
|
|
1751
|
-
export type GridImperative = {};
|
|
1752
|
-
export const DefaultGridProps: Partial<GridOptions>;
|
|
1753
|
-
export const DefaultGridColumnProps: Partial<GridColumn>;
|
|
1754
|
-
export const Grid: ForwardRefExoticComponent<GridOptions & RefAttributes<GridImperative>>;
|
|
1755
|
-
export function GridGlobalStyles(): JSX.Element;
|
|
1756
|
-
export interface UseDataGridToolbarFiltersProps {
|
|
1757
|
-
filterValues: ValuesObject | undefined;
|
|
1758
|
-
setFilterValues: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
1759
|
-
filtersDescription: ValuesObject | undefined;
|
|
1760
|
-
setFiltersDescription: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
1761
|
-
client?: MicroMClient;
|
|
1762
|
-
parentKeys?: ValuesObject;
|
|
1763
|
-
FiltersEntity?: EntityConstructor;
|
|
1764
|
-
searchData: SelectItem[];
|
|
1765
|
-
setSearchData: Dispatch<SetStateAction<SelectItem[]>>;
|
|
1766
|
-
setSearchText: Dispatch<SetStateAction<string[] | undefined>>;
|
|
1767
|
-
onRefreshClick: (searchText: string[] | undefined) => void;
|
|
1768
|
-
onSearchTextChange?: (text: string[] | undefined) => void;
|
|
1769
|
-
filtersFormSize: MantineNumberSize;
|
|
1770
|
-
visibleFilters?: string[];
|
|
1771
|
-
initialColumnFilters?: ColumnsObject;
|
|
1772
|
-
filterInputRef: RefObject<HTMLInputElement>;
|
|
1750
|
+
export class FileStoreProcess extends Entity<FileStoreProcessDef> {
|
|
1751
|
+
constructor(client: MicroMClient, parentKeys?: {});
|
|
1773
1752
|
}
|
|
1774
|
-
export
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1753
|
+
export interface FullImagePreviewProps {
|
|
1754
|
+
source: HTMLCanvasElement;
|
|
1755
|
+
rotation: number;
|
|
1756
|
+
label: string;
|
|
1757
|
+
}
|
|
1758
|
+
export function FullImagePreview({ source, rotation, label }: FullImagePreviewProps): JSX.Element;
|
|
1759
|
+
export interface WebcamCaptureLabels {
|
|
1760
|
+
permissionMessage?: string;
|
|
1761
|
+
enableCameraLabel?: string;
|
|
1762
|
+
cameraLabel?: string;
|
|
1763
|
+
captureLabel?: string;
|
|
1764
|
+
retakeLabel?: string;
|
|
1765
|
+
usePhotoLabel?: string;
|
|
1766
|
+
cancelLabel?: string;
|
|
1767
|
+
unsupportedMessage?: string;
|
|
1768
|
+
insecureContextMessage?: string;
|
|
1769
|
+
permissionDeniedMessage?: string;
|
|
1770
|
+
noCameraMessage?: string;
|
|
1771
|
+
cameraUnavailableMessage?: string;
|
|
1772
|
+
}
|
|
1773
|
+
export interface WebcamCaptureProps {
|
|
1774
|
+
onCapture: (file: File) => Promise<void> | void;
|
|
1775
|
+
onCancel: () => Promise<void> | void;
|
|
1776
|
+
labels?: WebcamCaptureLabels;
|
|
1777
|
+
videoConstraints?: MediaTrackConstraints;
|
|
1778
|
+
fileName?: string;
|
|
1779
|
+
outputType?: 'image/jpeg' | 'image/png' | 'image/webp';
|
|
1780
|
+
outputQuality?: number;
|
|
1781
|
+
}
|
|
1782
|
+
export const WebcamCaptureDefaultProps: Partial<WebcamCaptureProps>;
|
|
1783
|
+
export function WebcamCapture(props: WebcamCaptureProps): JSX.Element;
|
|
1784
|
+
export type ImageEditorCameraConfiguration = Omit<WebcamCaptureProps, 'onCapture' | 'onCancel'>;
|
|
1785
|
+
export interface ImageEditorProps {
|
|
1786
|
+
sourceFile?: File;
|
|
1787
|
+
options: ResolvedBrowserImageProcessingOptions;
|
|
1788
|
+
onSave: (file: File) => Promise<void> | void;
|
|
1789
|
+
onBeforeSave?: (file: File) => boolean | Promise<boolean>;
|
|
1790
|
+
onCancel: () => Promise<void> | void;
|
|
1791
|
+
initiallyDirty?: boolean;
|
|
1792
|
+
saveLabel?: string;
|
|
1793
|
+
cancelLabel?: string;
|
|
1794
|
+
rotateClockwiseLabel?: string;
|
|
1795
|
+
rotateCounterClockwiseLabel?: string;
|
|
1796
|
+
takePhotoLabel?: string;
|
|
1797
|
+
camera?: boolean | ImageEditorCameraConfiguration;
|
|
1798
|
+
}
|
|
1799
|
+
export const ImageEditorDefaultProps: Partial<ImageEditorProps>;
|
|
1800
|
+
export const ImageEditor: (props: ImageEditorProps) => JSX.Element;
|
|
1801
|
+
export interface UploadProgressReport {
|
|
1802
|
+
errorMessage?: string;
|
|
1803
|
+
status_id: string;
|
|
1804
|
+
progress: number;
|
|
1805
|
+
done?: boolean;
|
|
1806
|
+
cancelled?: boolean;
|
|
1807
|
+
documentURL?: string;
|
|
1808
|
+
file_name: string;
|
|
1809
|
+
file_size: number;
|
|
1810
|
+
vc_fileguid?: string;
|
|
1811
|
+
thumbnailURL?: string;
|
|
1812
|
+
}
|
|
1813
|
+
export interface UseFileUploadSnapshot {
|
|
1814
|
+
files: readonly UploadProgressReport[];
|
|
1815
|
+
fileProcessID: string;
|
|
1816
|
+
maxIndividualFileSize?: number;
|
|
1817
|
+
maxTotalFilesSize?: number;
|
|
1818
|
+
maxFilesCount?: number;
|
|
1819
|
+
errorNotification?: string;
|
|
1820
|
+
cancelledNotification?: boolean;
|
|
1821
|
+
uploadingNotification?: boolean;
|
|
1822
|
+
loadingNotification?: boolean;
|
|
1823
|
+
processing: boolean;
|
|
1824
|
+
editorEnabled: boolean;
|
|
1825
|
+
}
|
|
1826
|
+
interface UseFileUploadActions {
|
|
1827
|
+
uploadFiles: (selectedFiles: File[]) => Promise<UploadProgressReport[]>;
|
|
1828
|
+
replaceFile: (fileGUID: string, replacementFile: File) => Promise<UploadProgressReport | null>;
|
|
1829
|
+
editImage: (file: string | UploadProgressReport) => Promise<UploadProgressReport | null>;
|
|
1830
|
+
openImageEditor: (file?: File, options?: OpenImageEditorOptions) => Promise<File | null>;
|
|
1831
|
+
captureImage: () => Promise<UploadProgressReport | null>;
|
|
1832
|
+
canEditImage: (file: string | UploadProgressReport) => boolean;
|
|
1833
|
+
refreshFiles: () => Promise<Record<string, UploadProgressReport>>;
|
|
1834
|
+
deleteFile: (fileGUID: string) => Promise<DBStatusResult>;
|
|
1835
|
+
downloadFile: (fileUrl: string, fileName?: string) => Promise<void>;
|
|
1836
|
+
clearNotifications: () => void;
|
|
1837
|
+
cancelUpload: () => void;
|
|
1838
|
+
}
|
|
1839
|
+
export interface UseFileUploadReturnType extends UseFileUploadSnapshot, UseFileUploadActions {
|
|
1840
|
+
subscribe: (listener: () => void) => () => void;
|
|
1841
|
+
getSnapshot: () => UseFileUploadSnapshot;
|
|
1842
|
+
}
|
|
1843
|
+
export function useFileUploadSnapshot(uploadAPI: UseFileUploadReturnType): UseFileUploadSnapshot;
|
|
1844
|
+
export type ValidateFileReturnType = {
|
|
1845
|
+
error: boolean;
|
|
1846
|
+
message?: string;
|
|
1788
1847
|
};
|
|
1789
|
-
export type
|
|
1790
|
-
export
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
hideCheckboxToggle?: boolean;
|
|
1795
|
-
onCheckboxToggle?: () => void;
|
|
1796
|
-
onSearchTextChange?: (text: string[] | undefined) => void;
|
|
1797
|
-
onRefreshClick: (searchText: string[] | undefined) => void;
|
|
1798
|
-
onExportClick: () => void;
|
|
1799
|
-
autoFocus?: boolean;
|
|
1800
|
-
toolbarIconVariant?: ActionIconVariant;
|
|
1801
|
-
enableExport?: boolean;
|
|
1802
|
-
refreshTooltip?: string;
|
|
1803
|
-
exportTooltip?: string;
|
|
1804
|
-
selectRowsTooltip?: string;
|
|
1805
|
-
searchText: string[] | undefined;
|
|
1806
|
-
setSearchText: Dispatch<SetStateAction<string[] | undefined>>;
|
|
1807
|
-
searchData: SelectItem[];
|
|
1808
|
-
setSearchData: Dispatch<SetStateAction<SelectItem[]>>;
|
|
1809
|
-
maxSearchTerms?: number;
|
|
1810
|
-
FiltersEntity?: EntityConstructor;
|
|
1811
|
-
filterTooltip?: string;
|
|
1812
|
-
parentKeys?: ValuesObject;
|
|
1813
|
-
filterValues: ValuesObject | undefined;
|
|
1814
|
-
setFilterValues: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
1815
|
-
filtersDescription: ValuesObject | undefined;
|
|
1816
|
-
setFiltersDescription: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
1817
|
-
clearFiltersTooltip?: string;
|
|
1818
|
-
filtersFormSize: MantineNumberSize;
|
|
1819
|
-
enableImport?: boolean;
|
|
1820
|
-
importTooltip?: string;
|
|
1821
|
-
onImportClick?: () => void;
|
|
1822
|
-
filtersBadgeSize?: MantineSize;
|
|
1823
|
-
filtersBadgeVariant?: BadgeVariant;
|
|
1824
|
-
showAppliedFilters?: boolean;
|
|
1825
|
-
showRefreshButton?: boolean;
|
|
1826
|
-
showSelectRowsButton?: boolean;
|
|
1827
|
-
showFiltersButton?: boolean;
|
|
1828
|
-
showSearchInput?: boolean;
|
|
1829
|
-
visibleFilters?: string[];
|
|
1830
|
-
initialColumnFilters?: ColumnsObject;
|
|
1831
|
-
filtersTitle?: string;
|
|
1832
|
-
editFitersLabel?: string;
|
|
1833
|
-
clearFiltersLabel?: string;
|
|
1834
|
-
filtersAccordionVariant?: AccordionVariant;
|
|
1835
|
-
showColumnsConfig?: boolean;
|
|
1836
|
-
configMenuOpened?: boolean;
|
|
1837
|
-
setConfigMenuOpened?: Dispatch<SetStateAction<boolean>>;
|
|
1838
|
-
configMenuDropdown?: ReactNode;
|
|
1848
|
+
export type UploadCompletionResult = ValidateFileReturnType;
|
|
1849
|
+
export type ImageEditorConfigurationProps = Partial<Pick<ImageEditorProps, 'saveLabel' | 'cancelLabel' | 'rotateClockwiseLabel' | 'rotateCounterClockwiseLabel' | 'takePhotoLabel' | 'camera'>>;
|
|
1850
|
+
export interface OpenImageEditorOptions {
|
|
1851
|
+
initiallyDirty?: boolean;
|
|
1852
|
+
onBeforeSave?: NonNullable<ImageEditorProps['onBeforeSave']>;
|
|
1839
1853
|
}
|
|
1840
|
-
export
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1854
|
+
export interface UseFileUploadProps {
|
|
1855
|
+
client: MicroMClient;
|
|
1856
|
+
fileProcessColumn: EntityColumn<string>;
|
|
1857
|
+
maxIndividualFileSize?: number;
|
|
1858
|
+
maxTotalFilesSize?: number;
|
|
1859
|
+
maxFilesCount?: number;
|
|
1860
|
+
youCanUploadAMaximumOfText?: string;
|
|
1861
|
+
filesText?: string;
|
|
1862
|
+
exceedMaximumIndividualSizeText?: string;
|
|
1863
|
+
unspecifiedErrorWhenUploadingFileText?: string;
|
|
1864
|
+
totalUploadExceedsMaximumSizeText?: string;
|
|
1865
|
+
onCancel?: () => void;
|
|
1866
|
+
editor?: boolean;
|
|
1867
|
+
imageProcessing?: BrowserImageProcessingOptions;
|
|
1868
|
+
imageEditorTitle?: ReactNode;
|
|
1869
|
+
imageEditorProps?: ImageEditorConfigurationProps;
|
|
1870
|
+
imageEditorModalProps?: MicroMModalSettings;
|
|
1871
|
+
onValidateFile?: (file: File) => Promise<ValidateFileReturnType>;
|
|
1872
|
+
onProcessFile?: (file: File) => Promise<File | null>;
|
|
1873
|
+
onBeforeUpload?: (file: File) => Promise<boolean>;
|
|
1874
|
+
onBeforeReplace?: (currentFile: UploadProgressReport, replacementFile?: File) => Promise<boolean>;
|
|
1875
|
+
onUploadComplete?: (report: UploadProgressReport) => Promise<UploadCompletionResult | void>;
|
|
1876
|
+
onDeleteComplete?: (fileGUID: string) => Promise<void> | void;
|
|
1877
|
+
thumbnailMaxSize?: number;
|
|
1878
|
+
thumbnailQuality?: number;
|
|
1879
|
+
loadFilesOnMount?: boolean;
|
|
1846
1880
|
}
|
|
1847
|
-
export
|
|
1848
|
-
export
|
|
1849
|
-
export function
|
|
1850
|
-
export interface
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1881
|
+
export const UseFileUploadDefaultProps: Partial<UseFileUploadProps>;
|
|
1882
|
+
export type UploadStatus = 'Pending' | 'Uploading' | 'Uploaded' | 'Failed' | 'Cancelled';
|
|
1883
|
+
export function useFileUpload(props: UseFileUploadProps): UseFileUploadReturnType;
|
|
1884
|
+
export interface FileUploaderProps extends Omit<DropzoneProps, 'children' | 'onDrop' | 'maxSize' | 'maxFiles'> {
|
|
1885
|
+
IdleIcon?: (props: IconProps) => ReactNode;
|
|
1886
|
+
UploadText?: string;
|
|
1887
|
+
AttachUpToText?: string;
|
|
1888
|
+
FilesText?: string;
|
|
1889
|
+
EachFileShouldNotExceedText?: string;
|
|
1890
|
+
uploadAPI: UseFileUploadReturnType;
|
|
1891
|
+
onDelete?: (fileGUID: string) => boolean | Promise<boolean>;
|
|
1892
|
+
imageProps?: ImageProps;
|
|
1893
|
+
closeText?: string;
|
|
1894
|
+
cancelledText?: string;
|
|
1895
|
+
operationCancelledText?: string;
|
|
1896
|
+
pdfCannotBeViewedText?: string;
|
|
1897
|
+
showCancelButton?: boolean;
|
|
1898
|
+
cancelLabel?: string;
|
|
1899
|
+
parentFormAPI?: UseEntityFormReturnType;
|
|
1900
|
+
editor?: boolean;
|
|
1901
|
+
editImageLabel?: string;
|
|
1902
|
+
replaceFileGUID?: string;
|
|
1903
|
+
replaceExistingFile?: boolean;
|
|
1857
1904
|
}
|
|
1858
|
-
export const
|
|
1859
|
-
export function
|
|
1860
|
-
export interface
|
|
1861
|
-
|
|
1905
|
+
export const FileUploaderDefaultProps: Partial<FileUploaderProps>;
|
|
1906
|
+
export function FileUploader(props: FileUploaderProps): JSX.Element;
|
|
1907
|
+
export interface FilesUploadFormProps extends UseFileUploadProps {
|
|
1908
|
+
fileProcessColumn: EntityColumn<string>;
|
|
1909
|
+
onOK?: (fileprocess_id: string, files: readonly UploadProgressReport[]) => void;
|
|
1910
|
+
onDelete?: (fileGUID: string) => boolean | Promise<boolean>;
|
|
1911
|
+
helpMessage?: string;
|
|
1912
|
+
uploaderProps?: Omit<FileUploaderProps, 'uploadAPI' | 'editor'>;
|
|
1913
|
+
okLabel?: string;
|
|
1914
|
+
showOKButton?: boolean;
|
|
1915
|
+
uploadAPI?: UseFileUploadReturnType;
|
|
1862
1916
|
}
|
|
1863
|
-
export
|
|
1864
|
-
|
|
1865
|
-
|
|
1917
|
+
export const FilesUploadFormDefaultProps: Partial<FilesUploadFormProps>;
|
|
1918
|
+
export function FilesUploadForm(props: FilesUploadFormProps): JSX.Element;
|
|
1919
|
+
export interface ModalFileUploadProps {
|
|
1920
|
+
client: MicroMClient;
|
|
1921
|
+
fileProcessColumn: EntityColumn<string>;
|
|
1922
|
+
onOK?: (fileprocess_id: string, files: readonly UploadProgressReport[]) => void;
|
|
1923
|
+
onCancel?: () => void;
|
|
1866
1924
|
onClosed?: () => void;
|
|
1867
1925
|
modalProps?: ModalSettings;
|
|
1868
|
-
selectionMode?: GridSelectionMode;
|
|
1869
|
-
search?: string[] | undefined;
|
|
1870
1926
|
modalTitle?: string;
|
|
1871
|
-
|
|
1872
|
-
|
|
1927
|
+
uploadAPI?: UseFileUploadReturnType;
|
|
1928
|
+
filesUploadFormProps: Omit<FilesUploadFormProps, 'fileProcessColumn' | 'uploaderProps' | 'client' | 'onOK' | 'onCancel' | 'uploadAPI'>;
|
|
1929
|
+
uploaderProps?: Omit<FileUploaderProps, 'uploadAPI' | 'editor'>;
|
|
1873
1930
|
}
|
|
1874
|
-
export
|
|
1875
|
-
export
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
client: MicroMClient;
|
|
1881
|
-
entityConstructor: (client: MicroMClient) => Entity<EntityDefinition>;
|
|
1882
|
-
showTitle?: boolean;
|
|
1931
|
+
export const UseFileUploadFormOpenDefaultProps: Partial<ModalFileUploadProps>;
|
|
1932
|
+
export function useFilesUploadForm(): (props: ModalFileUploadProps) => Promise<void>;
|
|
1933
|
+
export interface useEntityCSVImportValidationProps {
|
|
1934
|
+
errorReadingFileLabel?: string;
|
|
1935
|
+
emptyCSVFileLabel?: string;
|
|
1936
|
+
missingColumnsLabel?: string;
|
|
1883
1937
|
}
|
|
1884
|
-
export
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
enableView?: boolean;
|
|
1895
|
-
handleEditClick?: (keys: ValuesObject, element: HTMLElement) => void;
|
|
1896
|
-
handleDeleteClick?: (keys: ValuesObject, element: HTMLElement) => void;
|
|
1897
|
-
handleViewClick?: (keys: ValuesObject, element: HTMLElement) => void;
|
|
1898
|
-
handleSelectRecord?: (record_index: number) => void;
|
|
1899
|
-
handleDeselectRecord?: (record_index: number) => void;
|
|
1900
|
-
handleExecuteAction?: (action: EntityClientAction, recordIndex?: number, element?: HTMLElement) => Promise<boolean | undefined>;
|
|
1901
|
-
handleCardClick?: (data: T) => void;
|
|
1902
|
-
refreshView?: () => void;
|
|
1903
|
-
cardHrefRootURL?: string;
|
|
1904
|
-
cardHrefTarget?: string;
|
|
1938
|
+
export function useEntityCSVImportValidation({ errorReadingFileLabel, emptyCSVFileLabel, missingColumnsLabel }: useEntityCSVImportValidationProps): {
|
|
1939
|
+
validateEntityImportCSVFile: (props: {
|
|
1940
|
+
file: File;
|
|
1941
|
+
requiredColumns: string[];
|
|
1942
|
+
}) => Promise<ValidateFileReturnType>;
|
|
1943
|
+
};
|
|
1944
|
+
export interface UseExportToExcelProps {
|
|
1945
|
+
data: DataResult[];
|
|
1946
|
+
dataResultNames?: string[];
|
|
1947
|
+
notExportableColumns?: number[];
|
|
1905
1948
|
}
|
|
1906
|
-
export
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1949
|
+
export function useExportToExcel(props: UseExportToExcelProps): {
|
|
1950
|
+
exportToExcel: () => Promise<void>;
|
|
1951
|
+
};
|
|
1952
|
+
export function useImportData(importEntity?: Entity<EntityDefinition>): {
|
|
1953
|
+
execute: (fileprocess_id: string, importProcedureName?: string, excelImportMapping?: ExcelImportMapping, initialRow?: number) => Promise<OperationStatus<ImpDataResult> | undefined>;
|
|
1954
|
+
importStatus: OperationStatus<ImpDataResult>;
|
|
1955
|
+
cancellation: AbortController;
|
|
1956
|
+
};
|
|
1957
|
+
export interface MicroMClientClaimTypes {
|
|
1958
|
+
username: string;
|
|
1959
|
+
useremail?: string;
|
|
1960
|
+
userinitials?: string;
|
|
1961
|
+
[k: string]: unknown;
|
|
1911
1962
|
}
|
|
1912
|
-
export
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1963
|
+
export class MicroMToken {
|
|
1964
|
+
expiration: string;
|
|
1965
|
+
expires_in: number;
|
|
1966
|
+
access_token: string;
|
|
1967
|
+
refresh_token: string;
|
|
1968
|
+
token_type: string;
|
|
1969
|
+
claims: Partial<MicroMClientClaimTypes>;
|
|
1970
|
+
constructor(access_token?: string, expires_in?: number, refresh_token?: string, token_type?: string, claims?: {});
|
|
1971
|
+
className(): string;
|
|
1920
1972
|
}
|
|
1921
|
-
export
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
resultLimitLabel: string;
|
|
1932
|
-
loadMoreLabel: string;
|
|
1933
|
-
fetchingDataLabel: string;
|
|
1934
|
-
noRecordsFoundLabel: string;
|
|
1973
|
+
export interface TwoFactorLoginResult {
|
|
1974
|
+
requires_two_factor: true;
|
|
1975
|
+
two_factor_challenge_id: string;
|
|
1976
|
+
two_factor_provider?: string;
|
|
1977
|
+
two_factor_flow?: "authenticator" | "email_setup" | "email_recovery" | "support_required" | "sql_admin_setup" | "sql_admin_authenticator";
|
|
1978
|
+
two_factor_setup_required?: boolean;
|
|
1979
|
+
authenticator_management_required?: boolean;
|
|
1980
|
+
qr_code_data_url?: string;
|
|
1981
|
+
username: string;
|
|
1982
|
+
email?: string;
|
|
1935
1983
|
}
|
|
1936
|
-
export
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1984
|
+
export type DataOperationType = "add" | "edit" | "delete" | "get" | "lookup" | "view" | "action" | "login" | "refresh" | "proc" | "import" | "export" | "other";
|
|
1985
|
+
export interface OperationStatus<T> {
|
|
1986
|
+
loading?: boolean;
|
|
1987
|
+
error?: MicroMError;
|
|
1988
|
+
operationType?: DataOperationType;
|
|
1989
|
+
data?: T;
|
|
1990
|
+
}
|
|
1991
|
+
export type StatusCompletedHandler<T extends MicroMToken | TwoFactorLoginResult | DBStatusResult | DataResult | ValuesObject | null> = (status: OperationStatus<T>) => void;
|
|
1992
|
+
export class ImportEntityDataDef extends EntityDefinition {
|
|
1993
|
+
columns: {
|
|
1994
|
+
dt_inserttime: EntityColumn<Date>;
|
|
1995
|
+
dt_lu: EntityColumn<Date>;
|
|
1996
|
+
vc_webinsuser: EntityColumn<string>;
|
|
1997
|
+
vc_webluuser: EntityColumn<string>;
|
|
1998
|
+
vc_insuser: EntityColumn<string>;
|
|
1999
|
+
vc_luuser: EntityColumn<string>;
|
|
2000
|
+
c_fileprocess_id: EntityColumn<string>;
|
|
2001
|
+
};
|
|
2002
|
+
views: {
|
|
2003
|
+
ipr_brwStandard: {
|
|
2004
|
+
name: string;
|
|
2005
|
+
keyMappings: {
|
|
2006
|
+
c_import_process: number;
|
|
2007
|
+
};
|
|
2008
|
+
};
|
|
2009
|
+
};
|
|
2010
|
+
lookups: {
|
|
2011
|
+
FileStoreProcess: {
|
|
2012
|
+
name: string;
|
|
2013
|
+
viewMapping: {
|
|
2014
|
+
keyIndex: number;
|
|
2015
|
+
descriptionIndex: number;
|
|
2016
|
+
};
|
|
2017
|
+
entityConstructor: (client: MicroMClient, parentKeys?: ValuesObject) => FileStoreProcess;
|
|
2018
|
+
};
|
|
2019
|
+
};
|
|
2020
|
+
constructor();
|
|
2021
|
+
}
|
|
2022
|
+
export interface CircleFilledIconProps {
|
|
2023
|
+
backColor?: MantineColor;
|
|
2024
|
+
color?: MantineColor;
|
|
2025
|
+
width?: string | number;
|
|
2026
|
+
minWidth?: string | number;
|
|
2027
|
+
icon: ReactNode;
|
|
2028
|
+
mr?: string;
|
|
2029
|
+
}
|
|
2030
|
+
export const CircleFilledIconDefaultProps: Partial<CircleFilledIconProps>;
|
|
2031
|
+
export const CircleFilledIcon: ForwardRefExoticComponent<CircleFilledIconProps & RefAttributes<HTMLInputElement>>;
|
|
2032
|
+
export interface ImportEntityDataFormProps extends FormOptions<ImportEntityData> {
|
|
2033
|
+
importEntity?: Entity<EntityDefinition>;
|
|
2034
|
+
entityProcName?: string;
|
|
2035
|
+
excludedImportDestinations?: string[];
|
|
2036
|
+
onImportSuccess?: () => Promise<void>;
|
|
2037
|
+
importInfoLabel?: string;
|
|
2038
|
+
csvInstructionsLabel?: string;
|
|
2039
|
+
columnHeaderLabel?: string;
|
|
2040
|
+
dataNameLabel?: string;
|
|
2041
|
+
contentLabel?: string;
|
|
2042
|
+
dataTypeLabel?: string;
|
|
2043
|
+
errorReadingFileLabel?: string;
|
|
2044
|
+
emptyCSVFileLabel?: string;
|
|
2045
|
+
missingColumnsLabel?: string;
|
|
2046
|
+
dateFormatLabel?: string;
|
|
2047
|
+
numberFormatLabel?: string;
|
|
2048
|
+
downloadSampleLabel?: string;
|
|
2049
|
+
importButtonLabel?: string;
|
|
2050
|
+
importHelpAndInstructionsLabel?: string;
|
|
2051
|
+
recordsImportedSusccessfullyLabel?: string;
|
|
2052
|
+
recordsNotImportedDueToErrorsLabel?: string;
|
|
2053
|
+
importTheCSVFileLabel?: string;
|
|
2054
|
+
importedFileLabel?: string;
|
|
2055
|
+
errorColumnTitle?: string;
|
|
2056
|
+
rowColumnTitle?: string;
|
|
2057
|
+
}
|
|
2058
|
+
export const ImportEntityDataFormDefaultProps: Partial<ImportEntityDataFormProps>;
|
|
2059
|
+
export function ImportEntityDataForm(props: ImportEntityDataFormProps): JSX.Element;
|
|
2060
|
+
export interface ImportEntityDataLabels {
|
|
2061
|
+
Icon?: (props: IconProps) => ReactNode;
|
|
2062
|
+
Title?: string;
|
|
2063
|
+
HelpText?: string;
|
|
2064
|
+
}
|
|
2065
|
+
export const ImportEntityDataLabels: Partial<ImportEntityDataLabels>;
|
|
2066
|
+
export class ImportEntityData extends Entity<ImportEntityDataDef> {
|
|
2067
|
+
constructor(client: MicroMClient, parentKeys?: {});
|
|
2068
|
+
}
|
|
2069
|
+
export interface UseImportDataProps {
|
|
2070
|
+
initialFormMode: FormMode;
|
|
2071
|
+
title?: string;
|
|
2072
|
+
element?: HTMLElement;
|
|
2073
|
+
getDataOnInit?: boolean;
|
|
2074
|
+
modalFormSize?: MicroMModalSize;
|
|
2075
|
+
handleModalSaved: (newStatus: OperationStatus<DBStatusResult | null>) => Promise<void>;
|
|
2076
|
+
handleModalCancel: () => Promise<void>;
|
|
2077
|
+
handleModalClosed?: () => void;
|
|
2078
|
+
handleImportSuccess?: () => Promise<void>;
|
|
1982
2079
|
}
|
|
1983
|
-
export
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
2080
|
+
export function useImportDataForm({ initialFormMode, title, element, getDataOnInit, modalFormSize, handleModalCancel, handleModalClosed, handleModalSaved, handleImportSuccess }: UseImportDataProps): {
|
|
2081
|
+
openImportDataForm: (importEntity: Entity<EntityDefinition>, entityProcName?: string, excludedImportDestinations?: string[]) => Promise<void>;
|
|
2082
|
+
};
|
|
2083
|
+
export const ApplyFiltersDefaultLabel = "Apply Filters";
|
|
2084
|
+
export function AutoFiltersForm(props: FormOptions<Entity<EntityDefinition>>): JSX.Element;
|
|
2085
|
+
export function createEntityForm<T extends FormOptions<Entity<EntityDefinition>>>(props: T): Promise<ReactNode>;
|
|
2086
|
+
export interface openEntityFormProps<T extends FormOptions<Entity<EntityDefinition>>> {
|
|
2087
|
+
modals: ModalContextType;
|
|
2088
|
+
title?: string;
|
|
2089
|
+
element?: HTMLElement;
|
|
2090
|
+
handleModalSaved: (newStatus: OperationStatus<DBStatusResult | null>) => Promise<void>;
|
|
2091
|
+
handleModalCancel: () => Promise<void>;
|
|
2092
|
+
handleModalClosed?: () => void;
|
|
2093
|
+
modalFormSize?: MicroMModalSize;
|
|
2094
|
+
withModalFullscreenButton?: boolean;
|
|
2095
|
+
formProps: T;
|
|
1987
2096
|
}
|
|
1988
|
-
export
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
2097
|
+
export function openEntityForm<T extends FormOptions<Entity<EntityDefinition>>>({ modals, title, element, handleModalCancel, handleModalSaved, modalFormSize, formProps, handleModalClosed, withModalFullscreenButton }: openEntityFormProps<T>): Promise<void>;
|
|
2098
|
+
export interface EntityUILabels {
|
|
2099
|
+
addLabel: string;
|
|
2100
|
+
editLabel: string;
|
|
2101
|
+
deleteLabel: string;
|
|
2102
|
+
viewLabel: string;
|
|
2103
|
+
YouWillDeleteLabel: string;
|
|
2104
|
+
recordsLabel: string;
|
|
2105
|
+
recordLabel: string;
|
|
2106
|
+
AreYouSureLabel: string;
|
|
2107
|
+
warningLabel: string;
|
|
2108
|
+
YouMustSelectOneOrMoreRecordsToDelete: string;
|
|
2109
|
+
closeLabel: string;
|
|
2110
|
+
YouMustSelectOneOrMoreRecordsToExecuteAction: string;
|
|
2111
|
+
YouMustSelect: string;
|
|
2112
|
+
YouMustSelectBetween: string;
|
|
2113
|
+
YouMustSelectAtLeast: string;
|
|
2114
|
+
YouMustSelectMaximum: string;
|
|
1994
2115
|
}
|
|
1995
|
-
export
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
enableExport?: boolean;
|
|
2016
|
-
filtersFormSize?: MantineNumberSize;
|
|
2017
|
-
showActions?: boolean;
|
|
2018
|
-
setInitialFiltersFromColumns?: boolean;
|
|
2019
|
-
visibleFilters?: string[];
|
|
2020
|
-
maxSearchTerms?: number;
|
|
2021
|
-
columnBorders?: boolean;
|
|
2022
|
-
rowBorders?: boolean;
|
|
2023
|
-
withBorder?: boolean;
|
|
2024
|
-
autoSizeColumnsOnLoad?: boolean;
|
|
2025
|
-
labels?: DataGridLabels;
|
|
2026
|
-
columnsOverrides?: GridColumnsOverrides;
|
|
2027
|
-
renderOnlyWhenVisible?: boolean;
|
|
2028
|
-
showToolbar?: boolean;
|
|
2029
|
-
showActionsToolbar?: boolean;
|
|
2030
|
-
enableImport?: boolean;
|
|
2031
|
-
gridHeight?: string | number | 'auto' | 'flex-grow';
|
|
2032
|
-
minGridHeight?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'none';
|
|
2033
|
-
autoSelectFirstRow?: boolean;
|
|
2034
|
-
onSelectionChanged?: DataGridSelectionChangedCallback;
|
|
2035
|
-
doubleClickAction?: 'edit' | 'view' | 'none' | ((record: GridRecord) => void);
|
|
2036
|
-
formMode?: FormMode;
|
|
2037
|
-
notExportableColumns?: number[];
|
|
2038
|
-
showColumnsConfigMenu?: boolean;
|
|
2039
|
-
initialHiddenColumns?: number[];
|
|
2040
|
-
showSelectRowsButton?: boolean;
|
|
2041
|
-
initialSelectRowsToggle?: boolean;
|
|
2116
|
+
export interface UseEntityUIProps {
|
|
2117
|
+
entity?: Entity<EntityDefinition>;
|
|
2118
|
+
parentKeys?: ValuesObject;
|
|
2119
|
+
modalFormSize?: MicroMModalSize;
|
|
2120
|
+
withModalFullscreenButton?: boolean;
|
|
2121
|
+
parentFormAPI?: UseEntityFormReturnType;
|
|
2122
|
+
saveFormBeforeAdd?: boolean;
|
|
2123
|
+
onModalSaved?: (new_status: OperationStatus<DBStatusResult | null>) => void;
|
|
2124
|
+
onModalCancelled?: () => void;
|
|
2125
|
+
onRecordsDeleted?: () => void;
|
|
2126
|
+
onActionRefreshOnClose?: () => void;
|
|
2127
|
+
labels?: EntityUILabels;
|
|
2128
|
+
onAddClick?: (gridAddClick: (element?: HTMLElement) => void, element?: HTMLElement) => void;
|
|
2129
|
+
onEditClick?: (keys: ValuesObject, element?: HTMLElement) => void;
|
|
2130
|
+
onDeleteClick?: (keys: ValuesObject[], element?: HTMLElement) => void;
|
|
2131
|
+
onActionExecuted?: (actionName: string, result?: boolean) => void;
|
|
2132
|
+
onModalClosed?: (cancelled?: boolean) => void;
|
|
2133
|
+
entityProcName?: string;
|
|
2134
|
+
excludedImportDestinations?: string[];
|
|
2135
|
+
onImportSuccess?: () => void;
|
|
2042
2136
|
}
|
|
2043
|
-
export
|
|
2044
|
-
|
|
2045
|
-
|
|
2137
|
+
export function useEntityUI(props: UseEntityUIProps): {
|
|
2138
|
+
handleAddClick: (element?: HTMLElement, onClosed?: (cancelled?: boolean) => void) => Promise<void>;
|
|
2139
|
+
handleEditClick: (keys: ValuesObject, element?: HTMLElement, onClosed?: (cancelled?: boolean) => void) => Promise<void>;
|
|
2140
|
+
handleViewClick: (keys: ValuesObject, element?: HTMLElement, onClosed?: (cancelled?: boolean) => void) => Promise<void>;
|
|
2141
|
+
handleDeleteClick: (keys: ValuesObject[], element?: HTMLElement) => Promise<void>;
|
|
2142
|
+
handleExecuteAction: (action: EntityClientAction, keys: ValuesObject[], element?: HTMLElement) => Promise<boolean | undefined>;
|
|
2046
2143
|
handleDeleteRecord: (keys: ValuesObject, element?: HTMLElement) => Promise<void>;
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
handleDeselectRecord: (record_index: number) => Promise<void>;
|
|
2064
|
-
handleSelectRecord: (record_index: number) => Promise<void>;
|
|
2065
|
-
handleSelectAllRecords: () => Promise<void>;
|
|
2066
|
-
selectedRecords: DataViewSelection;
|
|
2067
|
-
toggleSelectable: boolean;
|
|
2068
|
-
handleLoadMore: () => void;
|
|
2069
|
-
displayedItemsCount: number;
|
|
2070
|
-
recordsCount?: number;
|
|
2144
|
+
handleImportDataClick: () => Promise<void>;
|
|
2145
|
+
};
|
|
2146
|
+
export function useExecuteProc(entity: Entity<EntityDefinition>, proc: EntityProc): {
|
|
2147
|
+
execute: (values?: ValuesObject, force_refresh?: boolean) => Promise<OperationStatus<DataResult[]> | undefined>;
|
|
2148
|
+
status: OperationStatus<DataResult[]>;
|
|
2149
|
+
abort: () => void;
|
|
2150
|
+
};
|
|
2151
|
+
export interface SearchFilterInputProps extends MultiSelectProps {
|
|
2152
|
+
onSearchClick: React.MouseEventHandler;
|
|
2153
|
+
size: string;
|
|
2154
|
+
iconsSize: string;
|
|
2155
|
+
placeholder?: string;
|
|
2156
|
+
autoFocus?: boolean;
|
|
2157
|
+
addFilterLabel?: string;
|
|
2158
|
+
iconVariant?: ActionIconVariant;
|
|
2159
|
+
[x: string]: any;
|
|
2071
2160
|
}
|
|
2072
|
-
export
|
|
2161
|
+
export const SearchFilterInputDefaultProps: Partial<SearchFilterInputProps>;
|
|
2162
|
+
export const SearchFilterInput: ForwardRefExoticComponent<Omit<SearchFilterInputProps, "ref"> & RefAttributes<HTMLInputElement>>;
|
|
2163
|
+
export function useFirstVisible(ref: React.RefObject<HTMLElement>, options?: IntersectionObserverInit): boolean;
|
|
2164
|
+
export interface OpenFormProps {
|
|
2165
|
+
entity: Entity<EntityDefinition>;
|
|
2166
|
+
initialFormMode: FormMode;
|
|
2167
|
+
title?: string;
|
|
2168
|
+
element?: HTMLElement;
|
|
2169
|
+
getDataOnInit?: boolean;
|
|
2170
|
+
onModalSaved?: (new_status: OperationStatus<DBStatusResult | null>) => void;
|
|
2171
|
+
onModalCancelled?: () => void;
|
|
2172
|
+
onModalClosed?: () => void;
|
|
2173
|
+
modalFormSize?: MicroMModalSize;
|
|
2174
|
+
OKText?: string;
|
|
2175
|
+
CancelText?: string;
|
|
2176
|
+
showCancel?: boolean;
|
|
2177
|
+
otherFormProps?: any;
|
|
2178
|
+
dontAddEntityTitle?: boolean;
|
|
2179
|
+
withFullscreenButton?: boolean;
|
|
2180
|
+
closeOnEscape?: boolean;
|
|
2181
|
+
closeOnClickOutside?: boolean;
|
|
2182
|
+
}
|
|
2183
|
+
export function useOpenForm(): (props: OpenFormProps) => Promise<void>;
|
|
2073
2184
|
export interface DataViewPageProps extends Omit<DataViewProps, 'entity'> {
|
|
2074
2185
|
client: MicroMClient;
|
|
2075
2186
|
entityConstructor: (client: MicroMClient) => Entity<EntityDefinition>;
|
|
2076
2187
|
}
|
|
2077
2188
|
export function DataViewPage(props: DataViewPageProps): JSX.Element;
|
|
2189
|
+
type DataViewPanelBaseProps = Omit<DataViewProps, "entity" | "title" | "viewName" | "Card" | "RowsContainer" | "RowsContainerProps"> & {
|
|
2190
|
+
client: MicroMClient;
|
|
2191
|
+
parentKeys?: ValuesObject;
|
|
2192
|
+
Card?: DataViewProps["Card"];
|
|
2193
|
+
retainSearch?: string;
|
|
2194
|
+
onSearchTextChange?: DataViewProps["onSearch"];
|
|
2195
|
+
bgLight?: DefaultMantineColor;
|
|
2196
|
+
bgDark?: DefaultMantineColor;
|
|
2197
|
+
rowsContainerProps?: SimpleGridProps;
|
|
2198
|
+
/** Props for the wrapping Card. Replaces the default object entirely when set per instance */
|
|
2199
|
+
containerCardProps?: Omit<CardProps, 'children'>;
|
|
2200
|
+
/** Component shown while the entity is being resolved */
|
|
2201
|
+
loadingComponent?: ReactNode;
|
|
2202
|
+
};
|
|
2203
|
+
export type DataViewPanelProps = DataViewPanelBaseProps & EntityBuilderSourceProps;
|
|
2204
|
+
export const DataViewPanelDefaultProps: Partial<DataViewPanelProps>;
|
|
2205
|
+
export function DataViewPanel(props: DataViewPanelProps): JSX.Element;
|
|
2078
2206
|
export function useViewState(search?: string[], limit?: DataViewLimit): {
|
|
2079
2207
|
searchText: string[] | undefined;
|
|
2080
2208
|
setSearchText: Dispatch<SetStateAction<string[] | undefined>>;
|
|
@@ -3312,16 +3440,6 @@ export function useMultiDataMapGrid({ dataMapView, viewState, selectionMode, map
|
|
|
3312
3440
|
onModalSaved: (new_status: _OperationStatus1<_DBStatusResult1 | null>) => void;
|
|
3313
3441
|
modalFormSize: string | number | undefined;
|
|
3314
3442
|
onModalCancelled: () => void;
|
|
3315
|
-
labels: _DataGridLabels1;
|
|
3316
|
-
notExportableColumns: number[];
|
|
3317
|
-
withModalFullscreenButton: boolean;
|
|
3318
|
-
saveFormBeforeAdd: boolean;
|
|
3319
|
-
onRecordsDeleted: () => void;
|
|
3320
|
-
onActionRefreshOnClose: () => void;
|
|
3321
|
-
onAddClick: (gridAddClick: (element?: HTMLElement) => void, element?: HTMLElement) => void;
|
|
3322
|
-
onEditClick: (keys: _ValuesObject1, element?: HTMLElement) => void;
|
|
3323
|
-
onDeleteClick: (keys: _ValuesObject1[], element?: HTMLElement) => void;
|
|
3324
|
-
limit: "0" | "10000" | "50" | "100" | "500" | "1000" | undefined;
|
|
3325
3443
|
columnsOverrides: _GridColumnsOverrides1;
|
|
3326
3444
|
autoSizeColumnsOnLoad: boolean;
|
|
3327
3445
|
preserveSelection: boolean;
|
|
@@ -3334,26 +3452,39 @@ export function useMultiDataMapGrid({ dataMapView, viewState, selectionMode, map
|
|
|
3334
3452
|
maxSearchTerms: number;
|
|
3335
3453
|
enableImport: boolean;
|
|
3336
3454
|
showSelectRowsButton: boolean;
|
|
3455
|
+
limit: "0" | "50" | "100" | "500" | "1000" | "10000" | undefined;
|
|
3337
3456
|
viewName: string;
|
|
3457
|
+
refreshOnInit: boolean;
|
|
3458
|
+
onDataRefresh: (result: _OperationStatus1<_DataResult1[]>) => void;
|
|
3459
|
+
onSearch: _DataViewSearchCallback1;
|
|
3460
|
+
allwaysRefreshOnEntityClose: boolean;
|
|
3461
|
+
actionsButtonVariant: "white" | "filled" | "outline" | "light" | "default" | "gradient" | "subtle" | undefined;
|
|
3338
3462
|
enableAdd: boolean;
|
|
3339
3463
|
enableEdit: boolean;
|
|
3340
3464
|
enableDelete: boolean;
|
|
3341
3465
|
enableView: boolean;
|
|
3342
3466
|
showActions: boolean;
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3467
|
+
setInitialFiltersFromColumns: boolean;
|
|
3468
|
+
onAddClick: (gridAddClick: (element?: HTMLElement) => void, element?: HTMLElement) => void;
|
|
3469
|
+
onEditClick: (keys: _ValuesObject1, element?: HTMLElement) => void;
|
|
3470
|
+
onDeleteClick: (keys: _ValuesObject1[], element?: HTMLElement) => void;
|
|
3471
|
+
labels: _DataGridLabels1;
|
|
3472
|
+
saveFormBeforeAdd: boolean;
|
|
3346
3473
|
doubleClickAction: (("view" | "none" | "edit" | ((record: _GridRecord1) => void)) & NonNullable<"view" | "none" | "edit" | ((record: _GridRecord1) => void) | undefined>) | undefined;
|
|
3474
|
+
notExportableColumns: number[];
|
|
3475
|
+
withModalFullscreenButton: boolean;
|
|
3347
3476
|
initialHiddenColumns: number[];
|
|
3348
3477
|
initialSelectRowsToggle: boolean;
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3478
|
+
entityProcName: string;
|
|
3479
|
+
excludedImportDestinations: string[];
|
|
3480
|
+
onRecordsDeleted: () => void;
|
|
3481
|
+
onActionRefreshOnClose: () => void;
|
|
3352
3482
|
renderOnlyWhenVisible: boolean;
|
|
3353
3483
|
showToolbar: boolean;
|
|
3354
3484
|
showActionsToolbar: boolean;
|
|
3355
3485
|
minGridHeight: "xs" | "sm" | "md" | "lg" | "xl" | "none";
|
|
3356
3486
|
showColumnsConfigMenu: boolean;
|
|
3487
|
+
onImportSuccess: () => void;
|
|
3357
3488
|
};
|
|
3358
3489
|
viewState: {
|
|
3359
3490
|
searchText: string[] | undefined;
|
|
@@ -4036,50 +4167,16 @@ export class MicromEntitiesTypesDef extends EntityDefinition {
|
|
|
4036
4167
|
};
|
|
4037
4168
|
constructor();
|
|
4038
4169
|
}
|
|
4039
|
-
export interface DeveloperToolsPanelProps extends Omit<
|
|
4040
|
-
client: MicroMClient;
|
|
4170
|
+
export interface DeveloperToolsPanelProps extends Omit<DataGridPanelProps, 'parentKeys'> {
|
|
4041
4171
|
}
|
|
4042
|
-
export
|
|
4172
|
+
export const DeveloperToolsPanelDefaultProps: Partial<DeveloperToolsPanelProps>;
|
|
4173
|
+
export function DeveloperToolsPanel(props: DeveloperToolsPanelProps): JSX.Element;
|
|
4043
4174
|
export interface CustomWindowEventDefinition {
|
|
4044
4175
|
eventName: string;
|
|
4045
4176
|
payload: ValuesObject;
|
|
4046
4177
|
}
|
|
4047
4178
|
export type CustomWindowEvent<T extends CustomWindowEventDefinition> = T;
|
|
4048
4179
|
export function triggerCustomWindowEvent<T extends CustomWindowEventDefinition>(eventName: T["eventName"], payload: T["payload"]): void;
|
|
4049
|
-
export type EntityBuilderProps = {
|
|
4050
|
-
entity: Entity<EntityDefinition>;
|
|
4051
|
-
view: string;
|
|
4052
|
-
Card: ComponentType<EntityCardProps<ValuesObject>>;
|
|
4053
|
-
};
|
|
4054
|
-
export type EntityGridBuilderProps = Omit<EntityBuilderProps, 'Card'>;
|
|
4055
|
-
export type EntityLoader = (client: MicroMClient, parentKeys?: ValuesObject) => Promise<Entity<EntityDefinition>>;
|
|
4056
|
-
export type EntityBuilder<TEntity, TClient> = new (client: TClient, parentKeys?: ValuesObject) => TEntity;
|
|
4057
|
-
export type EntitySource<TResult> = {
|
|
4058
|
-
/** Builds the result synchronously */
|
|
4059
|
-
entityConstructor: (client: MicroMClient, parentKeys?: ValuesObject) => TResult;
|
|
4060
|
-
entityLoader?: never;
|
|
4061
|
-
} | {
|
|
4062
|
-
entityConstructor?: never;
|
|
4063
|
-
/** Loads the result asynchronously (e.g. via dynamic import) */
|
|
4064
|
-
entityLoader: (client: MicroMClient, parentKeys?: ValuesObject) => Promise<TResult>;
|
|
4065
|
-
};
|
|
4066
|
-
export type EntitySourceProps = EntitySource<Entity<EntityDefinition>>;
|
|
4067
|
-
export type EntityBuilderSourceProps = EntitySource<EntityBuilderProps>;
|
|
4068
|
-
export type EntityGridSourceProps = EntitySource<EntityGridBuilderProps>;
|
|
4069
|
-
export function importEntity<TClient, TEntity, TModule>(importModule: () => Promise<TModule>, getEntity: (module: TModule) => EntityBuilder<TEntity, TClient>): (client: TClient, parentKeys?: ValuesObject) => Promise<TEntity>;
|
|
4070
|
-
export function getEntity<TClient, TEntity, TModule, TCard>(importModule: () => Promise<TModule>, getEntity: (module: TModule) => EntityBuilder<TEntity, TClient>, getView: (entity: TEntity) => string, importCard: () => Promise<TCard>): (client: TClient, parentKeys?: ValuesObject) => Promise<EntityBuilderProps>;
|
|
4071
|
-
export function getEntity<TClient, TEntity, TModule>(importModule: () => Promise<TModule>, getEntity: (module: TModule) => EntityBuilder<TEntity, TClient>, getView: (entity: TEntity) => string): (client: TClient, parentKeys?: ValuesObject) => Promise<EntityGridBuilderProps>;
|
|
4072
|
-
export interface UseResolvedEntityBuilderResult<TResult> {
|
|
4073
|
-
result: TResult | null;
|
|
4074
|
-
ready: boolean;
|
|
4075
|
-
}
|
|
4076
|
-
export function useResolvedEntityBuilder<TResult>(client: MicroMClient, parentKeys: ValuesObject | undefined, source: EntitySource<TResult>): UseResolvedEntityBuilderResult<TResult>;
|
|
4077
|
-
export interface UseResolvedEntityConstructorResult {
|
|
4078
|
-
entityConstructor: EntityConstructor | null;
|
|
4079
|
-
loading: boolean;
|
|
4080
|
-
error: unknown | null;
|
|
4081
|
-
}
|
|
4082
|
-
export function useResolvedEntityConstructor(client: MicroMClient, parentKeys: ValuesObject | undefined, source: EntitySourceProps): UseResolvedEntityConstructorResult;
|
|
4083
4180
|
export interface MenuHostProps {
|
|
4084
4181
|
client: MicroMClient;
|
|
4085
4182
|
mainMenuId: string;
|
|
@@ -4283,9 +4380,9 @@ export interface MenuCardNavBarPanelProps extends Omit<NavbarProps, 'children' |
|
|
|
4283
4380
|
searchLabel?: string;
|
|
4284
4381
|
brandColor?: DefaultMantineColor;
|
|
4285
4382
|
/** Navbar width in icons mode */
|
|
4286
|
-
widthIcons?: number;
|
|
4383
|
+
widthIcons?: string | number;
|
|
4287
4384
|
/** Navbar width in text mode */
|
|
4288
|
-
widthText?: number;
|
|
4385
|
+
widthText?: string | number;
|
|
4289
4386
|
/** Icon for the home item */
|
|
4290
4387
|
homeIcon?: ReactNode;
|
|
4291
4388
|
/** Icon for the search item */
|
|
@@ -4474,7 +4571,7 @@ export class MicroMClient {
|
|
|
4474
4571
|
proctoexcel(entity_name: string, parent_keys: ValuesObject | null, values: ValuesObject, recordsSelection: ValuesObject[] | null, proc_name: string, abort_signal?: AbortSignal | null): Promise<Blob>;
|
|
4475
4572
|
process(entity_name: string, parent_keys: ValuesObject | null, values: ValuesObject, recordsSelection: ValuesObject[] | null, proc_name: string, abort_signal?: AbortSignal | null): Promise<DBStatusResult>;
|
|
4476
4573
|
action<TReturn>(entity_name: string, parent_keys: ValuesObject | null, values: ValuesObject, action_name: string, abort_signal?: AbortSignal | null): Promise<TReturn>;
|
|
4477
|
-
import(entity_name: string, parent_keys: ValuesObject | null, values: ValuesObject, import_procname: string | null, abort_signal?: AbortSignal | null): Promise<ImpDataResult>;
|
|
4574
|
+
import(entity_name: string, parent_keys: ValuesObject | null, values: ValuesObject, import_procname: string | null, abort_signal?: AbortSignal | null, excelImportMapping?: ExcelImportMapping, initialRow?: number): Promise<ImpDataResult>;
|
|
4478
4575
|
}
|
|
4479
4576
|
export class RecordReader {
|
|
4480
4577
|
constructor(dataResult: DataResult);
|