/** * Add dependencies to activeFields * * @param {Object} activeFields * @param {Object} [dependencies={}] */ export function addFieldDependencies(activeFields: Object, fields: any, dependencies?: Object | undefined): void; /** * Parse the arch to check if is true or false * If the string is empty, 0, False or false it's considered as false * The rest is considered as true * * @param {string} str * @param {boolean} [trueIfEmpty=false] * @returns {boolean} */ export function archParseBoolean(str: string, trueIfEmpty?: boolean | undefined): boolean; /** * @param {Array[] | boolean} modifier * @param {Object} evalContext * @returns {boolean} */ export function evalDomain(modifier: any[][] | boolean, evalContext: Object): boolean; /** * @param {String} fieldName * @param {Object} rawAttrs * @param {Record} record * @returns {String} */ export function getFormattedValue(record: Record, fieldName: string, rawAttrs: Object): 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 {number | number[]} idsList * @returns {number[]} */ export function getIds(idsList: number | number[]): number[]; /** * @param {any} field * @returns {boolean} */ export function isRelational(field: any): boolean; /** * @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; modifiers: any; clickParams: {}; }; /** * 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; /** * @param {any} string * @return {OrderTerm[]} */ export function stringToOrderBy(string: any): OrderTerm[]; /** * 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; /** * Generate a unique identifier (64 bits) in hexadecimal. * * @returns {string} */ export function uuid(): string; export const X2M_TYPES: string[]; /** @typedef {import("./relational_model").OrderTerm} OrderTerm */ /** * @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[]): Object; export type OrderTerm = import('./relational_model').OrderTerm; /** * { */ export type ViewActiveActions = { type: "view"; edit: boolean; create: boolean; delete: boolean; duplicate: boolean; };