anvil/striker-ui/types/CommonFenceInputGroup.d.ts
Tsu-ba-me 488ed99370 fix(striker-ui): correct fence management; see details
* add input validation to fix fields, i.e., select agent, and dynamic
  fields, i.e., fence parameters (according to param type)
* connect add, update, delete dialogs to respective back-end endpoints
2023-07-03 04:46:07 -04:00

33 lines
979 B
TypeScript

type FenceParameterInputBuilderParameters<M extends MapToInputTestID> = {
formUtils: FormUtils<M>;
id: string;
isChecked?: boolean;
isRequired?: boolean;
isSensitive?: boolean;
label?: string;
name?: string;
selectOptions?: string[];
value?: string;
};
type FenceParameterInputBuilder<M extends MapToInputTestID> = (
args: FenceParameterInputBuilderParameters<M>,
) => ReactElement;
type MapToInputBuilder<M extends MapToInputTestID> = Partial<
Record<Exclude<FenceParameterType, 'string'>, FenceParameterInputBuilder<M>>
> & { string: FenceParameterInputBuilder<M> };
type CommonFenceInputGroupOptionalProps = {
fenceId?: string;
fenceTemplate?: APIFenceTemplate;
previousFenceName?: string;
previousFenceParameters?: FenceParameters;
fenceParameterTooltipProps?: import('@mui/material').TooltipProps;
};
type CommonFenceInputGroupProps<M extends MapToInputTestID> =
CommonFenceInputGroupOptionalProps & {
formUtils: FormUtils<M>;
};