@mcurros2/microm 1.1.426-0 → 1.1.428-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 +98 -94
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +388 -274
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlertProps, DefaultMantineColor, ProgressProps, MantineNumberSize, ButtonProps,
|
|
1
|
+
import { AlertProps, DefaultMantineColor, ProgressProps, MantineNumberSize, ButtonProps, SelectItem, BadgeVariant, MantineSize, Variants, StepperProps, CardProps, MantineTheme, ImageProps, MantineColor, TextareaProps, TextInputProps, PasswordInputProps, NotificationProps, CheckboxProps, ActionIconProps, NumberInputProps, 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
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";
|
|
@@ -6,7 +6,7 @@ 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
8
|
import { AccordionVariant } from "@mantine/core/lib/Accordion/Accordion.types";
|
|
9
|
-
import { UseEntityFormReturnType as _UseEntityFormReturnType1, EntityClientAction as _EntityClientAction1, 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,
|
|
9
|
+
import { UseEntityFormReturnType as _UseEntityFormReturnType1, EntityClientAction as _EntityClientAction1, 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, DataViewSearchCallback as _DataViewSearchCallback1, DBStatusResult as _DBStatusResult1, GridColumnsOverrides as _GridColumnsOverrides1, DataGridSelectionChangedCallback as _DataGridSelectionChangedCallback1, EntityUIAddClick as _EntityUIAddClick1, EntityUIActionClosedCallback as _EntityUIActionClosedCallback1, DataGridLabels as _DataGridLabels1, GridRecord as _GridRecord1, GridSelectionChangedCallback as _GridSelectionChangedCallback1, GridDoubleClickCallback as _GridDoubleClickCallback1, GridColumn as _GridColumn1 } from "src";
|
|
10
10
|
import { DropzoneProps } from "@mantine/dropzone";
|
|
11
11
|
import { PrismProps } from "@mantine/prism";
|
|
12
12
|
import { DateInputProps, TimeInputProps, CalendarProps } from "@mantine/dates";
|
|
@@ -467,6 +467,7 @@ export interface UseEntityFormReturnType {
|
|
|
467
467
|
formMode: FormMode;
|
|
468
468
|
handleCancel: () => Promise<void> | void;
|
|
469
469
|
handleSubmit: (event?: React.FormEvent<HTMLFormElement>) => Promise<void>;
|
|
470
|
+
handleExecuteMappedAction: (buttonName: 'OK' | 'Cancel', actionName: string, requireValidation: boolean, element?: HTMLElement) => Promise<void>;
|
|
470
471
|
performGetData: () => Promise<boolean>;
|
|
471
472
|
saveAndGet: (get_data_if_saved: boolean, override_values?: ValuesObject, requestOptions?: MicroMRequestOptions) => Promise<OperationStatus<DBStatusResult>>;
|
|
472
473
|
configureField: (column: EntityColumn<Value>, validation?: ValidationRule) => void;
|
|
@@ -484,6 +485,92 @@ export interface UseEntityFormReturnType {
|
|
|
484
485
|
}
|
|
485
486
|
export const UseEntityFormDefaultProps: Partial<UseEntityFormOptions>;
|
|
486
487
|
export function useEntityForm(props: UseEntityFormOptions): UseEntityFormReturnType;
|
|
488
|
+
export interface UseDataGridToolbarFiltersProps {
|
|
489
|
+
filterValues: ValuesObject | undefined;
|
|
490
|
+
setFilterValues: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
491
|
+
filtersDescription: ValuesObject | undefined;
|
|
492
|
+
setFiltersDescription: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
493
|
+
client?: MicroMClient;
|
|
494
|
+
parentKeys?: ValuesObject;
|
|
495
|
+
FiltersEntity?: EntityConstructor;
|
|
496
|
+
searchData: SelectItem[];
|
|
497
|
+
setSearchData: Dispatch<SetStateAction<SelectItem[]>>;
|
|
498
|
+
setSearchText: Dispatch<SetStateAction<string[] | undefined>>;
|
|
499
|
+
onRefreshClick: (searchText: string[] | undefined) => void;
|
|
500
|
+
onSearchTextChange?: (text: string[] | undefined) => void;
|
|
501
|
+
filtersFormSize: MantineNumberSize;
|
|
502
|
+
visibleFilters?: string[];
|
|
503
|
+
initialColumnFilters?: ColumnsObject;
|
|
504
|
+
filterInputRef: RefObject<HTMLInputElement>;
|
|
505
|
+
}
|
|
506
|
+
export function useDataGridToolbarFilters(props: UseDataGridToolbarFiltersProps): {
|
|
507
|
+
handleFilterButtonClick: (e: React.MouseEvent) => Promise<void>;
|
|
508
|
+
handleSearchFilterInputEnter: (e: React.KeyboardEvent) => void;
|
|
509
|
+
handleClearFiltersClick: (e: React.MouseEvent) => void;
|
|
510
|
+
createSearchPhrase: (filter: string) => {
|
|
511
|
+
value: string;
|
|
512
|
+
label: string;
|
|
513
|
+
};
|
|
514
|
+
queryText: string;
|
|
515
|
+
filtersDescription: ValuesObject | undefined;
|
|
516
|
+
setFiltersDescription: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
517
|
+
setQueryText: Dispatch<SetStateAction<string>>;
|
|
518
|
+
handleSearchFilterInputOnChange: (searchFilter: string[]) => void;
|
|
519
|
+
updateFilterValuesAndDescription: (columns: ColumnsObject) => void;
|
|
520
|
+
};
|
|
521
|
+
export type DataGridToolbarSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
522
|
+
export interface DataGridToolbarOptions {
|
|
523
|
+
size?: DataGridToolbarSizes;
|
|
524
|
+
client?: MicroMClient;
|
|
525
|
+
searchPlaceholder?: string;
|
|
526
|
+
hideCheckboxToggle?: boolean;
|
|
527
|
+
onCheckboxToggle?: () => void;
|
|
528
|
+
onSearchTextChange?: (text: string[] | undefined) => void;
|
|
529
|
+
onRefreshClick: (searchText: string[] | undefined) => void;
|
|
530
|
+
onExportClick: () => void;
|
|
531
|
+
autoFocus?: boolean;
|
|
532
|
+
toolbarIconVariant?: ActionIconVariant;
|
|
533
|
+
enableExport?: boolean;
|
|
534
|
+
refreshTooltip?: string;
|
|
535
|
+
exportTooltip?: string;
|
|
536
|
+
selectRowsTooltip?: string;
|
|
537
|
+
searchText: string[] | undefined;
|
|
538
|
+
setSearchText: Dispatch<SetStateAction<string[] | undefined>>;
|
|
539
|
+
searchData: SelectItem[];
|
|
540
|
+
setSearchData: Dispatch<SetStateAction<SelectItem[]>>;
|
|
541
|
+
maxSearchTerms?: number;
|
|
542
|
+
FiltersEntity?: EntityConstructor;
|
|
543
|
+
filterTooltip?: string;
|
|
544
|
+
parentKeys?: ValuesObject;
|
|
545
|
+
filterValues: ValuesObject | undefined;
|
|
546
|
+
setFilterValues: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
547
|
+
filtersDescription: ValuesObject | undefined;
|
|
548
|
+
setFiltersDescription: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
549
|
+
clearFiltersTooltip?: string;
|
|
550
|
+
filtersFormSize: MantineNumberSize;
|
|
551
|
+
enableImport?: boolean;
|
|
552
|
+
importTooltip?: string;
|
|
553
|
+
onImportClick?: () => void;
|
|
554
|
+
filtersBadgeSize?: MantineSize;
|
|
555
|
+
filtersBadgeVariant?: BadgeVariant;
|
|
556
|
+
showAppliedFilters?: boolean;
|
|
557
|
+
showRefreshButton?: boolean;
|
|
558
|
+
showSelectRowsButton?: boolean;
|
|
559
|
+
showFiltersButton?: boolean;
|
|
560
|
+
showSearchInput?: boolean;
|
|
561
|
+
visibleFilters?: string[];
|
|
562
|
+
initialColumnFilters?: ColumnsObject;
|
|
563
|
+
filtersTitle?: string;
|
|
564
|
+
editFiltersLabel?: string;
|
|
565
|
+
clearFiltersLabel?: string;
|
|
566
|
+
filtersAccordionVariant?: AccordionVariant;
|
|
567
|
+
showColumnsConfig?: boolean;
|
|
568
|
+
configMenuOpened?: boolean;
|
|
569
|
+
setConfigMenuOpened?: Dispatch<SetStateAction<boolean>>;
|
|
570
|
+
configMenuDropdown?: ReactNode;
|
|
571
|
+
}
|
|
572
|
+
export const DataGridToolbarDefaultProps: Partial<DataGridToolbarOptions>;
|
|
573
|
+
export function DataGridToolbar(props: DataGridToolbarOptions): JSX.Element;
|
|
487
574
|
export interface EntityFormProps extends PropsWithChildren {
|
|
488
575
|
showOK?: boolean;
|
|
489
576
|
showCancel?: boolean;
|
|
@@ -493,6 +580,8 @@ export interface EntityFormProps extends PropsWithChildren {
|
|
|
493
580
|
OKText?: ReactNode;
|
|
494
581
|
CancelText?: ReactNode;
|
|
495
582
|
CloseText?: ReactNode;
|
|
583
|
+
OKActionName?: string;
|
|
584
|
+
CancelActionName?: string;
|
|
496
585
|
formAPI: UseEntityFormReturnType;
|
|
497
586
|
invalidFieldsLabel?: string;
|
|
498
587
|
showHelpButton?: boolean;
|
|
@@ -751,92 +840,6 @@ export const DefaultGridProps: Partial<GridOptions>;
|
|
|
751
840
|
export const DefaultGridColumnProps: Partial<GridColumn>;
|
|
752
841
|
export const Grid: ForwardRefExoticComponent<GridOptions & RefAttributes<GridImperative>>;
|
|
753
842
|
export function GridGlobalStyles(): JSX.Element;
|
|
754
|
-
export interface UseDataGridToolbarFiltersProps {
|
|
755
|
-
filterValues: ValuesObject | undefined;
|
|
756
|
-
setFilterValues: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
757
|
-
filtersDescription: ValuesObject | undefined;
|
|
758
|
-
setFiltersDescription: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
759
|
-
client?: MicroMClient;
|
|
760
|
-
parentKeys?: ValuesObject;
|
|
761
|
-
FiltersEntity?: EntityConstructor;
|
|
762
|
-
searchData: SelectItem[];
|
|
763
|
-
setSearchData: Dispatch<SetStateAction<SelectItem[]>>;
|
|
764
|
-
setSearchText: Dispatch<SetStateAction<string[] | undefined>>;
|
|
765
|
-
onRefreshClick: (searchText: string[] | undefined) => void;
|
|
766
|
-
onSearchTextChange?: (text: string[] | undefined) => void;
|
|
767
|
-
filtersFormSize: MantineNumberSize;
|
|
768
|
-
visibleFilters?: string[];
|
|
769
|
-
initialColumnFilters?: ColumnsObject;
|
|
770
|
-
filterInputRef: RefObject<HTMLInputElement>;
|
|
771
|
-
}
|
|
772
|
-
export function useDataGridToolbarFilters(props: UseDataGridToolbarFiltersProps): {
|
|
773
|
-
handleFilterButtonClick: (e: React.MouseEvent) => Promise<void>;
|
|
774
|
-
handleSearchFilterInputEnter: (e: React.KeyboardEvent) => void;
|
|
775
|
-
handleClearFiltersClick: (e: React.MouseEvent) => void;
|
|
776
|
-
createSearchPhrase: (filter: string) => {
|
|
777
|
-
value: string;
|
|
778
|
-
label: string;
|
|
779
|
-
};
|
|
780
|
-
queryText: string;
|
|
781
|
-
filtersDescription: ValuesObject | undefined;
|
|
782
|
-
setFiltersDescription: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
783
|
-
setQueryText: Dispatch<SetStateAction<string>>;
|
|
784
|
-
handleSearchFilterInputOnChange: (searchFilter: string[]) => void;
|
|
785
|
-
updateFilterValuesAndDescription: (columns: ColumnsObject) => void;
|
|
786
|
-
};
|
|
787
|
-
export type DataGridToolbarSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
788
|
-
export interface DataGridToolbarOptions {
|
|
789
|
-
size?: DataGridToolbarSizes;
|
|
790
|
-
client?: MicroMClient;
|
|
791
|
-
searchPlaceholder?: string;
|
|
792
|
-
hideCheckboxToggle?: boolean;
|
|
793
|
-
onCheckboxToggle?: () => void;
|
|
794
|
-
onSearchTextChange?: (text: string[] | undefined) => void;
|
|
795
|
-
onRefreshClick: (searchText: string[] | undefined) => void;
|
|
796
|
-
onExportClick: () => void;
|
|
797
|
-
autoFocus?: boolean;
|
|
798
|
-
toolbarIconVariant?: ActionIconVariant;
|
|
799
|
-
enableExport?: boolean;
|
|
800
|
-
refreshTooltip?: string;
|
|
801
|
-
exportTooltip?: string;
|
|
802
|
-
selectRowsTooltip?: string;
|
|
803
|
-
searchText: string[] | undefined;
|
|
804
|
-
setSearchText: Dispatch<SetStateAction<string[] | undefined>>;
|
|
805
|
-
searchData: SelectItem[];
|
|
806
|
-
setSearchData: Dispatch<SetStateAction<SelectItem[]>>;
|
|
807
|
-
maxSearchTerms?: number;
|
|
808
|
-
FiltersEntity?: EntityConstructor;
|
|
809
|
-
filterTooltip?: string;
|
|
810
|
-
parentKeys?: ValuesObject;
|
|
811
|
-
filterValues: ValuesObject | undefined;
|
|
812
|
-
setFilterValues: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
813
|
-
filtersDescription: ValuesObject | undefined;
|
|
814
|
-
setFiltersDescription: Dispatch<SetStateAction<ValuesObject | undefined>>;
|
|
815
|
-
clearFiltersTooltip?: string;
|
|
816
|
-
filtersFormSize: MantineNumberSize;
|
|
817
|
-
enableImport?: boolean;
|
|
818
|
-
importTooltip?: string;
|
|
819
|
-
onImportClick?: () => void;
|
|
820
|
-
filtersBadgeSize?: MantineSize;
|
|
821
|
-
filtersBadgeVariant?: BadgeVariant;
|
|
822
|
-
showAppliedFilters?: boolean;
|
|
823
|
-
showRefreshButton?: boolean;
|
|
824
|
-
showSelectRowsButton?: boolean;
|
|
825
|
-
showFiltersButton?: boolean;
|
|
826
|
-
showSearchInput?: boolean;
|
|
827
|
-
visibleFilters?: string[];
|
|
828
|
-
initialColumnFilters?: ColumnsObject;
|
|
829
|
-
filtersTitle?: string;
|
|
830
|
-
editFiltersLabel?: string;
|
|
831
|
-
clearFiltersLabel?: string;
|
|
832
|
-
filtersAccordionVariant?: AccordionVariant;
|
|
833
|
-
showColumnsConfig?: boolean;
|
|
834
|
-
configMenuOpened?: boolean;
|
|
835
|
-
setConfigMenuOpened?: Dispatch<SetStateAction<boolean>>;
|
|
836
|
-
configMenuDropdown?: ReactNode;
|
|
837
|
-
}
|
|
838
|
-
export const DataGridToolbarDefaultProps: Partial<DataGridToolbarOptions>;
|
|
839
|
-
export function DataGridToolbar(props: DataGridToolbarOptions): JSX.Element;
|
|
840
843
|
export interface DataGridStateProps {
|
|
841
844
|
setRefresh: React.Dispatch<React.SetStateAction<boolean>>;
|
|
842
845
|
setSearchText: React.Dispatch<React.SetStateAction<string[] | undefined>>;
|
|
@@ -1024,6 +1027,7 @@ export const DataView: ForwardRefExoticComponent<DataViewProps & RefAttributes<H
|
|
|
1024
1027
|
export interface DataViewCardContainerProps extends EntityCardProps<ValuesObject> {
|
|
1025
1028
|
EntityCard?: ComponentType<EntityCardProps<ValuesObject>>;
|
|
1026
1029
|
CardProps?: Omit<CardProps, 'children'>;
|
|
1030
|
+
labels?: Pick<EntityUILabels, 'editLabel' | 'deleteLabel' | 'viewLabel'>;
|
|
1027
1031
|
}
|
|
1028
1032
|
export const DataViewCardContainerDefaultProps: Partial<DataViewCardContainerProps>;
|
|
1029
1033
|
export function DataViewCardContainer(props: DataViewCardContainerProps): JSX.Element;
|
|
@@ -3705,6 +3709,12 @@ export function useMultiDataMapGrid({ dataMapView, viewState, selectionMode, map
|
|
|
3705
3709
|
entity: _Entity1<_EntityDefinition1>;
|
|
3706
3710
|
formMode: "view" | "add" | "edit" | undefined;
|
|
3707
3711
|
parentKeys: _ValuesObject1;
|
|
3712
|
+
onSearchTextChange: _DataViewSearchCallback1;
|
|
3713
|
+
visibleFilters: string[];
|
|
3714
|
+
maxSearchTerms: number;
|
|
3715
|
+
enableImport: boolean;
|
|
3716
|
+
showSelectRowsButton: boolean;
|
|
3717
|
+
limit: "0" | "50" | "100" | "500" | "1000" | "10000" | undefined;
|
|
3708
3718
|
onModalClosed: (cancelled?: boolean) => void;
|
|
3709
3719
|
onModalSaved: (new_status: _OperationStatus1<_DBStatusResult1 | null>) => void;
|
|
3710
3720
|
modalFormSize: string | number | undefined;
|
|
@@ -3716,12 +3726,6 @@ export function useMultiDataMapGrid({ dataMapView, viewState, selectionMode, map
|
|
|
3716
3726
|
columnBorders: boolean;
|
|
3717
3727
|
rowBorders: boolean;
|
|
3718
3728
|
autoSelectFirstRow: boolean;
|
|
3719
|
-
onSearchTextChange: _DataViewSearchCallback1;
|
|
3720
|
-
visibleFilters: string[];
|
|
3721
|
-
maxSearchTerms: number;
|
|
3722
|
-
enableImport: boolean;
|
|
3723
|
-
showSelectRowsButton: boolean;
|
|
3724
|
-
limit: "0" | "50" | "100" | "500" | "1000" | "10000" | undefined;
|
|
3725
3729
|
viewName: string;
|
|
3726
3730
|
refreshOnInit: boolean;
|
|
3727
3731
|
onDataRefresh: (result: _OperationStatus1<_DataResult1[]>) => void;
|