diff --git a/src/process/hiddenChildren.ts b/src/process/hideChildren.ts similarity index 82% rename from src/process/hiddenChildren.ts rename to src/process/hideChildren.ts index b20ab191..2d2c81de 100644 --- a/src/process/hiddenChildren.ts +++ b/src/process/hideChildren.ts @@ -13,7 +13,7 @@ import { componentInfo, eachComponentData, getComponentPath } from 'utils/formUt /** * This processor function checks components for the `hidden` property and, if children are present, sets them to hidden as well. */ -export const hiddenChildrenProcessor: ProcessorFnSync = (context) => { +export const hideChildrenProcessor: ProcessorFnSync = (context) => { const { component, path, row, scope } = context; // Check if there's a conditional set for the component and if it's marked as conditionally hidden const isConditionallyHidden = scope.conditionals?.find((cond) => { @@ -44,13 +44,13 @@ export const hiddenChildrenProcessor: ProcessorFnSync = (contex } } -export const hiddenChildrenProcessorAsync: ProcessorFn = async (context) => { - return hiddenChildrenProcessor(context); +export const hideChildrenProcessorAsync: ProcessorFn = async (context) => { + return hideChildrenProcessor(context); }; -export const hiddenChildrenProcessorInfo: ProcessorInfo, void> = { - name: 'hiddenChildren', +export const hideChildrenProcessorInfo: ProcessorInfo, void> = { + name: 'hideChildren', shouldProcess: () => true, - processSync: hiddenChildrenProcessor, - process: hiddenChildrenProcessorAsync, + processSync: hideChildrenProcessor, + process: hideChildrenProcessorAsync, } diff --git a/src/process/index.ts b/src/process/index.ts index ad881c99..423b0417 100644 --- a/src/process/index.ts +++ b/src/process/index.ts @@ -11,4 +11,4 @@ export * from './process'; export * from './normalize'; export * from './dereference'; export * from './clearHidden'; -export * from './hiddenChildren' +export * from './hideChildren'; diff --git a/src/process/process.ts b/src/process/process.ts index b7ac0e56..8843b42d 100644 --- a/src/process/process.ts +++ b/src/process/process.ts @@ -28,7 +28,7 @@ import { filterProcessInfo } from './filter'; import { normalizeProcessInfo } from './normalize'; import { dereferenceProcessInfo } from './dereference'; import { clearHiddenProcessInfo } from './clearHidden'; -import { hiddenChildrenProcessorInfo } from './hiddenChildren'; +import { hideChildrenProcessorInfo } from './hideChildren'; export async function process( context: ProcessContext @@ -131,7 +131,7 @@ export const ProcessorMap: Record> = { validate: validateProcessInfo, validateCustom: validateCustomProcessInfo, validateServer: validateServerProcessInfo, - hiddenChildren: hiddenChildrenProcessorInfo + hideChildren: hideChildrenProcessorInfo }; export const ProcessTargets: ProcessTarget = { @@ -149,7 +149,7 @@ export const ProcessTargets: ProcessTarget = { calculateProcessInfo, logicProcessInfo, conditionProcessInfo, - hiddenChildrenProcessorInfo, + hideChildrenProcessorInfo, clearHiddenProcessInfo, validateProcessInfo, ],