@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
72 lines (71 loc) • 2.62 kB
TypeScript
import type { InputPropTypes } from '../../webComponents/Input/index.js';
import type { ListItemStandardDomRef, ListItemStandardPropTypes } from '../../webComponents/ListItemStandard/index.js';
export interface VariantItemPropTypes extends Pick<ListItemStandardPropTypes, 'accessibleName' | 'selected'> {
/**
* The name of the variant.
*
* __Note:__ Variant names must be unique.
*/
children: string;
/**
* Author of the variant.
*/
author?: string;
/**
* Indicates if favorites can be created.
*
* __Note:__ Has no effect if `showOnlyFavorites` is falsy in the `VariantMangament`.
*/
favorite?: boolean;
/**
* Indicator if a variant is visible for all users (public flag is set).
*/
global?: boolean;
/**
* Indicator if it's the default variant.
*
* __Note:__ There should only be __one__ default variant.
*/
isDefault?: boolean;
/**
* Indicates if the variant title can be changed.
*/
labelReadOnly?: boolean;
/**
* Indicates if the variant should be applied automatically on selection.
*/
applyAutomatically?: boolean;
/**
* Text displayed next to the "Apply Automatically" checkbox inside the "Manage Views" dialog.
*/
applyAutomaticallyText?: string;
/**
* If set to false, the user is allowed to change the item's data.
*
* __Note:__ When set to true, no "Save" button will be displayed for the `VariantItem` when the `VariantManagement` is in `dirtyState`.
*/
readOnly?: boolean;
/**
* Indicates if the variant can be deleted.
*
* __Note:__ If not set, a delete button is shown for all variants except for variants with `global={true}`.
*/
hideDelete?: boolean;
/**
* Defines the props of the input rendered with the `VariantItem` inside the "Manage Views" dialog.
*
* __Note:__ It is possible to overwrite internally used props. Please use with caution!
*/
manageViewsInputProps?: Omit<InputPropTypes, 'value'>;
/**
* Defines the props of the input rendered with the `VariantItem` inside the "Save View" dialog.
*
* __Note:__ It is possible to overwrite internally used props. Please use with caution!
*/
saveViewInputProps?: Omit<InputPropTypes, 'value' | 'id'>;
}
/**
* The `VariantItem` describes a variant/view of the `VariantManagement` component.
*/
declare const VariantItem: import("react").ForwardRefExoticComponent<VariantItemPropTypes & import("react").RefAttributes<ListItemStandardDomRef>>;
export { VariantItem };