2022-01-31 20:02:59 +01:00
|
|
|
import { Helpers } from "@budibase/bbui"
|
2024-03-06 14:33:00 +01:00
|
|
|
import { processObjectSync } from "@budibase/string-templates"
|
2020-11-25 10:50:51 +01:00
|
|
|
|
|
|
|
/**
|
2021-01-21 11:42:14 +01:00
|
|
|
* Recursively enriches all props in a props object and returns the new props.
|
|
|
|
* Props are deeply cloned so that no mutation is done to the source object.
|
2020-11-25 10:50:51 +01:00
|
|
|
*/
|
2021-06-01 15:59:42 +02:00
|
|
|
export const enrichDataBindings = (props, context) => {
|
2024-03-14 17:16:24 +01:00
|
|
|
return processObjectSync(Helpers.cloneDeep(props), context, { cache: true })
|
2021-01-21 11:42:14 +01:00
|
|
|
}
|