Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* A submission object to search.
* @param {String} key
* A for components API key to search for.
*/
getValue: formioUtils.getValue.bind(formioUtils),
/**
* Determine if a component is a layout component or not.
*
* @param {Object} component
* The component to check.
*
* @returns {Boolean}
* Whether or not the component is a layout component.
*/
isLayoutComponent: formioUtils.isLayoutComponent.bind(formioUtils),
/**
* Apply JSON logic functionality.
*
* @param component
* @param row
* @param data
*/
jsonLogic: formioUtils.jsonLogic,
/**
* Check if the condition for a component is true or not.
*
* @param component
* @param row
* @param data
*
* @returns {Object}
* The component that matches the given key, or undefined if not found.
*/
getComponent: formioUtils.getComponent.bind(formioUtils),
/**
* Define if component should be considered input component
*
* @param {Object} componentJson
* JSON of component to check
*
* @returns {Boolean}
* If component is input or not
*/
isInputComponent: formioUtils.isInputComponent.bind(formioUtils),
/**
* Flatten the form components for data manipulation.
*
* @param {Object} components
* The components to iterate.
* @param {Boolean} includeAll
* Whether or not to include layout components.
*
* @returns {Object}
* The flattened components map.
*/
flattenComponents: formioUtils.flattenComponents.bind(formioUtils),
/**
* Get the value for a component key, in the given submission.
return childReq;
},
/**
* Iterate through each component within a form.
*
* @param {Object} components
* The components to iterate.
* @param {Function} fn
* The iteration function to invoke for each component.
* @param {Boolean} includeAll
* Whether or not to include layout components.
* @param {String} path
*/
eachComponent: formioUtils.eachComponent.bind(formioUtils),
/**
* Get a component by its key
*
* @param {Object} components
* The components to iterate.
* @param {String} key
* The key of the component to get.
*
* @returns {Object}
* The component that matches the given key, or undefined if not found.
*/
getComponent: formioUtils.getComponent.bind(formioUtils),
/**
* Define if component should be considered input component
* If component is input or not
*/
isInputComponent: formioUtils.isInputComponent.bind(formioUtils),
/**
* Flatten the form components for data manipulation.
*
* @param {Object} components
* The components to iterate.
* @param {Boolean} includeAll
* Whether or not to include layout components.
*
* @returns {Object}
* The flattened components map.
*/
flattenComponents: formioUtils.flattenComponents.bind(formioUtils),
/**
* Get the value for a component key, in the given submission.
*
* @param {Object} submission
* A submission object to search.
* @param {String} key
* A for components API key to search for.
*/
getValue: formioUtils.getValue.bind(formioUtils),
/**
* Determine if a component is a layout component or not.
*
* @param {Object} component
* The component to check.
* Apply JSON logic functionality.
*
* @param component
* @param row
* @param data
*/
jsonLogic: formioUtils.jsonLogic,
/**
* Check if the condition for a component is true or not.
*
* @param component
* @param row
* @param data
*/
checkCondition: formioUtils.checkCondition.bind(formioUtils),
/**
* Return the objectId.
*
* @param id
* @returns {*}
* @constructor
*/
ObjectId(id) {
try {
return _.isObject(id)
? id
: mongoose.Types.ObjectId(id);
}
catch (e) {
return id;
* Whether or not to include layout components.
*
* @returns {Object}
* The flattened components map.
*/
flattenComponents: formioUtils.flattenComponents.bind(formioUtils),
/**
* Get the value for a component key, in the given submission.
*
* @param {Object} submission
* A submission object to search.
* @param {String} key
* A for components API key to search for.
*/
getValue: formioUtils.getValue.bind(formioUtils),
/**
* Determine if a component is a layout component or not.
*
* @param {Object} component
* The component to check.
*
* @returns {Boolean}
* Whether or not the component is a layout component.
*/
isLayoutComponent: formioUtils.isLayoutComponent.bind(formioUtils),
/**
* Apply JSON logic functionality.
*
* @param component
* @param {String} path
*/
eachComponent: formioUtils.eachComponent.bind(formioUtils),
/**
* Get a component by its key
*
* @param {Object} components
* The components to iterate.
* @param {String} key
* The key of the component to get.
*
* @returns {Object}
* The component that matches the given key, or undefined if not found.
*/
getComponent: formioUtils.getComponent.bind(formioUtils),
/**
* Define if component should be considered input component
*
* @param {Object} componentJson
* JSON of component to check
*
* @returns {Boolean}
* If component is input or not
*/
isInputComponent: formioUtils.isInputComponent.bind(formioUtils),
/**
* Flatten the form components for data manipulation.
*
* @param {Object} components