Skip to content

Commit

Permalink
change hiddenChildren to hideChildren
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanbond committed Aug 5, 2024
1 parent af70a1a commit 1cd06e7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions src/process/hiddenChildren.ts → src/process/hideChildren.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ConditionsScope> = (context) => {
export const hideChildrenProcessor: ProcessorFnSync<ConditionsScope> = (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) => {
Expand Down Expand Up @@ -44,13 +44,13 @@ export const hiddenChildrenProcessor: ProcessorFnSync<ConditionsScope> = (contex
}
}

export const hiddenChildrenProcessorAsync: ProcessorFn<ProcessorScope> = async (context) => {
return hiddenChildrenProcessor(context);
export const hideChildrenProcessorAsync: ProcessorFn<ProcessorScope> = async (context) => {
return hideChildrenProcessor(context);
};

export const hiddenChildrenProcessorInfo: ProcessorInfo<ProcessorContext<ProcessorScope>, void> = {
name: 'hiddenChildren',
export const hideChildrenProcessorInfo: ProcessorInfo<ProcessorContext<ProcessorScope>, void> = {
name: 'hideChildren',
shouldProcess: () => true,
processSync: hiddenChildrenProcessor,
process: hiddenChildrenProcessorAsync,
processSync: hideChildrenProcessor,
process: hideChildrenProcessorAsync,
}
2 changes: 1 addition & 1 deletion src/process/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export * from './process';
export * from './normalize';
export * from './dereference';
export * from './clearHidden';
export * from './hiddenChildren'
export * from './hideChildren';
6 changes: 3 additions & 3 deletions src/process/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ProcessScope>(
context: ProcessContext<ProcessScope>
Expand Down Expand Up @@ -131,7 +131,7 @@ export const ProcessorMap: Record<string, ProcessorInfo<any, any>> = {
validate: validateProcessInfo,
validateCustom: validateCustomProcessInfo,
validateServer: validateServerProcessInfo,
hiddenChildren: hiddenChildrenProcessorInfo
hideChildren: hideChildrenProcessorInfo
};

export const ProcessTargets: ProcessTarget = {
Expand All @@ -149,7 +149,7 @@ export const ProcessTargets: ProcessTarget = {
calculateProcessInfo,
logicProcessInfo,
conditionProcessInfo,
hiddenChildrenProcessorInfo,
hideChildrenProcessorInfo,
clearHiddenProcessInfo,
validateProcessInfo,
],
Expand Down

0 comments on commit 1cd06e7

Please sign in to comment.