MCPcopy Create free account
hub / github.com/eclipsesource/jsonforms / evalVisibility

Function evalVisibility

packages/core/src/util/runtime.ts:121–139  ·  view source on GitHub ↗
(
  uischema: UISchemaElement,
  data: any,
  path: string = undefined,
  ajv: Ajv,
  config: unknown
)

Source from the content-addressed store, hash-verified

119};
120
121export const evalVisibility = (
122 uischema: UISchemaElement,
123 data: any,
124 path: string = undefined,
125 ajv: Ajv,
126 config: unknown
127): boolean => {
128 const fulfilled = isRuleFulfilled(uischema, data, path, ajv, config);
129
130 switch (uischema.rule.effect) {
131 case RuleEffect.HIDE:
132 return !fulfilled;
133 case RuleEffect.SHOW:
134 return fulfilled;
135 // visible by default
136 default:
137 return true;
138 }
139};
140
141export const evalEnablement = (
142 uischema: UISchemaElement,

Callers 2

runtime.test.tsFile · 0.90
isVisibleFunction · 0.85

Calls 1

isRuleFulfilledFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…