/* eslint-disable @typescript-eslint/no-explicit-any */ import { SYSTEM_DEFAULT } from "../../../../constant"; import { View } from "../../data/userView"; import FactoryRenderer from "../../../../Renderer"; type ViewItem = { view: View; selectedView?: View; onDelete: (id: string) => void; onSave: (id: string) => void; markAsSelected: (view: View) => void; setDefault: (id: string) => void; onDeleteRequest?: (view: View) => void; /** * Raises the rename to the container, which opens the view dialog in edit * mode. The row does not own the editor — same shape as `onDeleteRequest`, * which raises to the confirmation alert. */ onRenameRequest?: (view: View) => void; }; const ViewItem = ({ view, selectedView, onSave, markAsSelected, setDefault, onDeleteRequest, onRenameRequest, }: ViewItem) => { const isSelected = view.id === selectedView?.id; const isDefault = view.id === SYSTEM_DEFAULT; // Every action in this row stops propagation: the row's own click selects the // view, and Kendo's
{view.name}
{/* The actions are one group, so the space BETWEEN them and the space between them and the name are two different measures rather than one shared gap — see `.tmpl-screen-view-actions`. */}