oneframe-react
Version:
Oneframe React ## Components, Hooks, Helper Functions & State Management
201 lines (200 loc) • 5.3 kB
TypeScript
import React from 'react';
/**
* Left Adornments
*
* @static
* @param {Function} leftAdornments
* @returns {*} Return the object props
*/
export declare const getStartAdornments: (leftAdornments?: (() => React.ReactNode) | undefined) => {
startAdornment: JSX.Element;
} | {
startAdornment?: undefined;
};
/**
* Right Adornments
*
* @static
* @param {Function} rightAdornments
* @returns {*} Returns the object props
*/
export declare const getEndAdornments: (rightAdornments?: (() => React.ReactNode) | undefined) => {
endAdornment: JSX.Element;
} | {
endAdornment?: undefined;
};
/**
* Underline status
*
* @static
* @param {string} variant
* @param {boolean} disabledUnderline
* @returns {*} Returns the object props
*/
export declare const disabledunderline: (variant?: string | undefined, disabledUnderline?: boolean | undefined) => any;
/**
* All input adornments
*
* @static
* @param {Function} leftAdornments
* @param {Function} rightAdornments
* @param {string} variant
* @param {boolean} disabledUnderline
* @param {Object} numberFormat
* @param {Object} mask
* @returns {*} Returns the adorments node
*/
export declare const getAdornments: (leftAdornments: any, rightAdornments: any, variant: any, disabledUnderline: any, numberFormat: any, mask: any) => any;
/**
* Selectbox custom view value
*
* @static
* @param {*} selected
* @param {*} data
* @param {string} displayField
* @param {string} displayValue
* @param {boolean} viewChip
* @returns {*} Object
*/
export declare const getMultipleCustomRender: (selected: any[], data: any[], displayValue: string, displayField: string, viewChip?: boolean) => string | 0 | any[];
/**
* Error status
*
* @static
* @param {*} messages
* @param {string} name
* @param {string} errorText
* @returns {boolean} Returns the `true` or `false`.
*/
export declare const getErrorStatus: (messages: any, name: string, errorText: any) => boolean;
/**
* Error message
*
* @static
* @param {*} messages
* @param {string} name
* @param {string} errorText
* @param {string} helperText
* @returns {boolean} Returns the error text message.
*/
export declare const getErrorMessage: (messages: any, name: string, errorText: any, helperText?: React.ReactNode) => any;
/**
* Label text
*
* @static
* @param {string} multipleSelectCountText
* @param {*} multiValue
* @param {string} caption
* @returns {boolean} Returns the label text.
*/
export declare const getMultiSelectLabel: (multipleSelectCountText: any, multiValue: any, caption?: any) => any;
/**
* Input custom props
*
* @static
* @param {number} labelWidth
* @param {*} id
* @param {string} name
* @param {boolean} readOnly
* @param {*} leftAdornments
* @param {*} rightAdornments
* @param {boolean} captionActive
* @param {string} variant
* @param {boolean} disableUnderline
* @returns {Object} Returns the input props.
*/
export declare const getInputProps: (labelWidth: string | number, id: any, name: string, readOnly: any, leftAdornments: any, rightAdornments: any, captionActive: any, variant: string, disableUnderline: boolean) => {
input: JSX.Element;
inputProps?: undefined;
} | {
inputProps: {
name: string;
id: any;
readOnly: any;
};
input?: undefined;
};
/**
* Input return value
*
* @static
* @param {*} id
* @param {string} name
* @param {*} value
* @returns {*} Returns the input value
*/
export declare const getTargetValue: (id: any, name: string, value: any) => any;
/**
* Inputs-Multiselect return value
*
* @static
* @param {*} id
* @param {string} name
* @param {*} value
* @param {*} valueObject
* @returns {*} Returns the select input value
*/
export declare const getTargetSelectValue: (id: any, name: string, value: any, valueObject: any) => any;
/**
* Checked return value
*
* @static
* @param {*} id
* @param {string} name
* @param {*} value
* @returns {*} Returns the checked input value
*/
export declare const getTargetChecked: (id: any, name: string, value: any) => any;
/**
* State management initial error
*
* @static
* @returns {*} Returns initial error value
*/
export declare const initialError: () => null;
/**
* State management initial status code
*
* @static
* @returns {*} Returns initial status code value
*/
export declare const initialStatusCode: () => null;
/**
* State management loading
*
* @static
* @returns {*} Returns initial loading
*/
export declare const initialLoading: () => boolean;
/**
* State management initial data
*
* @static
* @param {*} val
* @returns {*} Returns the initial value for state management
*/
export declare const initialData: (val: any) => any;
/**
* State management initial data
*
* @static
* @param {*} prevData
* @param {*} data
* @returns {*} Returns the initial value for state management initial state
*/
export declare const firstTimeData: (prevData: any, data: any) => any;
/**
* State management default value
*
* @static
*/
export declare const defaultSetParameters: {
loading: boolean;
error: null;
payload: null;
statusCode: null;
headers: null;
onSuccess: () => void;
onError: () => void;
};
export declare const getTargetTimeValue: (id: any, name: string, value: any, valueObject: any) => any;