import { FormIdentifier, IToolbarItem, IconType } from '@shesha/reactjs'; import { GuidNullableEntityWithDisplayNameDto } from 'apis/admissions/hisHospitals'; import { ISimpleTableColumn } from 'components/global/generalTable/utils/interface'; import { ILabelParams } from 'components/global/interfaces'; import { IGeneralTableStateContext } from 'providers/generalTable/contexts'; import { FormInstance } from 'rc-field-form'; export declare const ACCESS_TOKEN_NAME = "xDFcxiooPQxazdndDsdRSerWQPlincytLDCarcxVxv"; export declare const SESSION_TOKEN = "c87a8ca60f0891b79d192fa86f019916"; export declare const EXCL_FILTER_CACHE_KEY: Array; export interface IInitColumnProps { readonly id: string; readonly name: string; readonly directoryPath: string; readonly icon: string; readonly itemSubType: string; readonly itemType: string; readonly sortOrder: number; readonly onClickCustom?: string; } export interface IDialogToolbarProps { readonly confirmAction?: boolean; readonly dialogTitle?: string; readonly dialogIcon?: IconType; readonly dialogContent?: string; } export interface ITableToolbar extends IToolbarItem { readonly formId?: FormIdentifier; readonly onCustomError?: (form: FormInstance, error?: any) => void; readonly onCustomSuccess?: (form: FormInstance, keepOpen?: boolean) => void; readonly prepareValues?: (values: any) => any; readonly formTitle?: string; readonly allowGetMethod?: boolean; readonly getMethodUrl?: string; readonly successAction?: string; readonly urlPath?: string; readonly verb?: string; } export interface IToolbarInstance extends IDialogToolbarProps, Omit { readonly name?: string; readonly mode?: IToolbarInstanceMode; readonly disabled?: string; readonly hide?: string; readonly icon?: IconType; readonly onClickCustom?: string; readonly formPath?: string; readonly onCustomError?: string; readonly onCustomSuccess?: string; readonly prepareValues?: string; readonly formTitle?: string; readonly allowGetMethod?: boolean; readonly getMethodUrl?: string; readonly successAction?: string; readonly urlPath?: string; readonly verb?: string; } export type StorageType = 'sessionStorage' | 'localStorage'; export type IToolbarInstanceMode = 'dialog' | 'executeScript'; export declare const TBEvents: Readonly<{ FacilityContextChange: "HIS_FACILITY_CONTEXT_CHANGED"; FacilityContextId: "HIS_FACILITY_CONTEXT_ID"; ModalVisible: "HIS_MODAL_VISIBLE"; RefreshTable: "HIS_REFRESH_TABLE"; TableCache: "HIS_TABLE_CACHE"; }>; export declare const confirmActionModal: (callback: () => any, { confirmAction, dialogTitle, dialogIcon, dialogContent }: IDialogToolbarProps) => void; export declare const filteInitialColumns: (item: IInitColumnProps[]) => ISimpleTableColumn[]; export declare const filterTableMenu: (data: any[]) => GuidNullableEntityWithDisplayNameDto[]; export declare const filterTableState: (state: IGeneralTableStateContext) => {}; export declare const filterQueryParams: (queryParams: ILabelParams[], payload?: object) => object; export declare const filterToolbar: (item: IToolbarInstance[], row?: object) => IToolbarItem[]; export declare const getActiveTableMenuItem: (hasCacheValue: boolean, menuItemCache: string, fallbackMenuItem: string) => string; export declare const getBaseUrl: () => any; export declare const getInitialTableState: (isPersisted: boolean, initState: object, cache: object) => object; export declare const getSessionStorage: (key: string, type?: StorageType) => any; export declare const getToolbarBoolean: (exp: string, row: object) => boolean; export declare const getToolbarFunction: (exp: string, row: object, payload?: object) => any; export declare const hasCacheValue: (value: object, isCached: boolean) => boolean;