react-ui-mat
Version:
- ANIMATE - BADGES ( success, danger, info, light, primary, green ) - BEHAVIOR - BUTTONS - CHECKBOX - COLLAPSE - CONTEXT PANEL - DATE PICKER - DATEPICKER - DATEUTIL - DIVIDER - DRAGABLE MODAL - INCORRECT_ENTRY - INPUT - INPUT_FIELDS - MULTISELECT - MUPLAY
137 lines (136 loc) • 4.89 kB
TypeScript
import * as React from "react";
import { GeomertyLatLng, MModalProps, MAlertProps, ValidationMessage } from "./types";
interface Options {
graphics?: boolean;
}
export declare const printer: {
elementName: (name: any, options?: Options) => void;
element: (element: HTMLElement, options?: Options) => void;
html: (html: string, options?: Options) => void;
};
interface FullScreenOptions {
navigationUI?: "auto" | "hide" | "show";
}
export declare const fullScreen: {
isActive: () => boolean;
query: (query: string, options?: FullScreenOptions) => void;
elementId: (id: string, options?: FullScreenOptions) => void;
element: (element: HTMLElement | Element, options?: FullScreenOptions) => void;
exit: () => void;
};
interface FullScreenCtxProps {
children?: JSX.Element | React.ReactNode | React.ReactElement;
}
export declare function FullScreenCt(props: FullScreenCtxProps): JSX.Element;
export declare function MAlertConfirmContainer(): JSX.Element;
type MAlertRN = {
fitDms: (width: boolean, height: boolean) => MAlertRN;
setCloseOnClickOutside: (status: boolean) => MAlertRN;
refresh: () => MAlertRN;
close: () => MAlertRN;
};
declare function showMAlertConfirm(properties: MModalProps): MAlertRN;
declare function closeAllMAlertConfirm(): void;
declare function refreshAllMAlertConfirm(): void;
declare function setMAlertConfirmIndex(value: number): number;
export declare const mModal: {
show: typeof showMAlertConfirm;
closeAll: typeof closeAllMAlertConfirm;
setIndex: typeof setMAlertConfirmIndex;
refresh: typeof refreshAllMAlertConfirm;
};
export declare function MAlertContainer(): JSX.Element;
declare function showMAlert(properties: MAlertProps): void;
declare function closeAllMAlert(): void;
declare function setMAlertIndex(value: number): number;
export declare const mAlert: {
show: typeof showMAlert;
closeAll: typeof closeAllMAlert;
setIndex: typeof setMAlertIndex;
};
type ComponentType<T> = (props: T) => JSX.Element;
export declare function MComponent<Props>(Component: ComponentType<Props>): ComponentType<Props>;
interface UmStorage {
save(key: string, val: any): void;
item(key: string): any | null;
obj<T extends any>(key: string): T | null;
str(key: string): string;
num(key: string): number;
bool(key: string): boolean;
del(key: string): void;
clear(): void;
}
declare class Safety {
add(key: string, comp?: (oldValue: any, newValue: any) => boolean): this;
keys(keys: string[]): this;
active(): this;
deactive(): this;
}
declare class Sdb implements UmStorage {
private st;
constructor(p: "mxsec" | "local", v: string);
load(): void;
private rl;
set(provider?: "mxsec" | "local", version?: string): this;
log(value: boolean): void;
addListener(fn: () => void): () => void;
time(): number | null;
use(provider?: "mxsec" | "local", version?: string): UmStorage;
save(key: string, value: any): any;
item<R = any>(key: string): R | null;
obj<R = any>(key: string): R | null;
str(key: string): string | null;
num(key: string): number | null;
bool(key: string): boolean | null;
del(key: string): void;
clear(): void;
safe(): Readonly<Safety>;
}
export declare const sds: Readonly<Sdb>;
export declare const useSds: () => {
time: number;
sds: Readonly<Sdb>;
};
export declare const useInitSds: () => any;
interface State {
load: number;
previous?: "focus" | "leave";
current: "focus" | "leave";
previousTime?: number;
currentTime: number;
}
export declare function overseer(): {
listen: (cb: (e: State) => void) => void;
leave: () => void;
};
export declare function useOverseer(): {
listen: (cb: (e: State) => void) => void;
leave: () => void;
};
interface Config {
duration: number;
type: 'flatten' | 'audit' | 'debounce' | 'batch' | 'interval';
}
export declare function flattenSequencer(duration: number): () => Config;
export declare function auditSequencer(duration: number): () => Config;
export declare function debounceSequencer(duration: number): () => Config;
export declare function batchSequencer(duration: number): () => Config;
export declare function intervalSequencer(duration: number): () => Config;
export declare class Behavior<T> {
private items;
private opt;
private publish;
runner(operator: () => Config): this;
next(value: T): this;
subscribe(cb: (value: T) => void): () => void;
}
export declare const _dt: Readonly<{
run: (active: boolean) => void;
}>;
export declare function toggleDevtool(active: boolean): void;
export declare const geomeryUtil: {
encode: (path: GeomertyLatLng[]) => string;
decode: (encoded: string) => GeomertyLatLng[];
};
export declare function validatePassword(password: string): ValidationMessage | undefined;
export {};