/** * @param {string?} viewType * @param {Element?} rootNode * @param {string[]} additionalClassList * @returns {string} */ export function computeViewClassName(viewType: string | null, rootNode: Element | null, additionalClassList?: string[]): string; /** * @param {Record} record * @param {String} fieldName * @param {Object} [fieldInfo] * @returns {String} */ export function getFormattedValue(record: Record, fieldName: string, fieldInfo?: Object | undefined): string; /** * @param {Element} rootNode * @returns {ViewActiveActions} */ export function getActiveActions(rootNode: Element): ViewActiveActions; export function getClassNameFromDecoration(decoration: any): string; export function getDecoration(rootNode: any): { class: string; condition: any; }[]; /** * @param {any} field * @returns {boolean} */ export function isX2Many(field: any): boolean; /** * @param {Object} field * @returns {boolean} true iff the given field is a numeric field */ export function isNumeric(field: Object): boolean; /** * @param {any} value * @returns {boolean} */ export function isNull(value: any): boolean; export function processButton(node: any): { className: any; disabled: boolean; icon: any; title: any; string: any; options: any; display: any; clickParams: {}; column_invisible: any; invisible: any; readonly: any; required: any; attrs: {}; }; /** * In the preview implementation of reporting views, the virtual field used to * display the number of records was named __count__, whereas __count is * actually the one used in xml. So basically, activating a filter specifying * __count as measures crashed. Unfortunately, as __count__ was used in the JS, * all filters saved as favorite at that time were saved with __count__, and * not __count. So in order the make them still work with the new * implementation, we handle both __count__ and __count. * * This function replaces occurences of '__count__' by '__count' in the given * element(s). * * @param {any | any[]} [measures] * @returns {any} */ export function processMeasure(measure: any): any; /** * Transforms a string into a valid expression to be injected * in a template as a props via setAttribute. * Example: myString = `Some weird language quote (") `; * should become in the template: * * which should be interpreted by owl as a JS expression being a string: * `Some weird language quote (") ` * * @param {string} str The initial value: a pure string to be interpreted as such * @return {string} the valid string to be injected into a component's node props. */ export function toStringExpression(str: string): string; /** * Given an array of values and an aggregator function, returns the aggregated * value. * * @param {number[]} values * @param {'sum'|'avg'|'min'|'max'|'count'|'count_distinct'} aggregator * @returns number * @throws {Error} if the aggregator function given isn't supported */ export function computeAggregatedValue(values: number[], aggregator: "sum" | "avg" | "min" | "max" | "count" | "count_distinct"): number; export const X2M_TYPES: string[]; /** * @typedef ViewActiveActions { * @property {"view"} type * @property {boolean} edit * @property {boolean} create * @property {boolean} delete * @property {boolean} duplicate */ export const BUTTON_CLICK_PARAMS: string[]; export function computeReportMeasures(fields: Object, fieldAttrs: Object, activeMeasures: string[], { sumAggregatorOnly }?: { sumAggregatorOnly?: boolean | undefined; }): Object; /** * { */ export type ViewActiveActions = { type: "view"; edit: boolean; create: boolean; delete: boolean; duplicate: boolean; };