Files
mixtape/zero.Core/Entities/Tree/TreeItem.cs
T

104 lines
2.3 KiB
C#
Raw Normal View History

2020-04-06 15:53:32 +02:00
namespace zero.Core.Entities
{
/// <summary>
/// Represents an item in a tree
/// </summary>
public class TreeItem
{
/// <summary>
/// Id of the item
/// </summary>
public string Id { get; set; }
/// <summary>
/// Parent id of the item
/// </summary>
public string ParentId { get; set; }
/// <summary>
/// Sort order
/// </summary>
2020-05-18 11:53:23 +02:00
public uint Sort { get; set; }
2020-04-06 15:53:32 +02:00
/// <summary>
/// Name of the item
/// </summary>
public string Name { get; set; }
/// <summary>
/// Displays a description on hover
/// </summary>
public string Description { get; set; }
/// <summary>
/// Icon to display alongside the name
/// </summary>
public string Icon { get; set; }
/// <summary>
/// Whether this item is open in case it contains children
/// </summary>
public bool IsOpen { get; set; }
/// <summary>
/// Displays a small icon (with hover text) next to the main item icon
/// </summary>
public TreeItemModifier Modifier { get; set; }
/// <summary>
/// Whether this item has children
/// </summary>
public bool HasChildren { get; set; }
2020-05-19 15:53:01 +02:00
2020-05-20 11:53:18 +02:00
/// <summary>
/// Count of children
/// </summary>
public int ChildCount { get; set; }
2020-05-19 15:53:01 +02:00
/// <summary>
/// Whether this item is published or not
/// </summary>
public bool IsInactive { get; set; }
2020-05-20 13:49:50 +02:00
2021-03-23 14:55:27 +01:00
/// <summary>
/// Whether to display the item icon with a dashed line
/// </summary>
public bool IsDashed { get; set; }
2020-05-20 13:49:50 +02:00
/// <summary>
/// Whether to show actions menu. This will only work when the onActionsRequested cb is implemented in the component
/// </summary>
public bool HasActions { get; set; }
2021-04-16 14:09:39 +02:00
/// <summary>
/// Output an additional count value.
/// </summary>
public int? CountOutput { get; set; }
2020-04-06 15:53:32 +02:00
}
/// <summary>
/// The modifier displays a small icon (with hover text) next to the main item icon
/// </summary>
public class TreeItemModifier
{
/// <summary>
/// Name of the modifier
/// </summary>
public string Name { get; set; }
/// <summary>
/// Icon to display
/// </summary>
public string Icon { get; set; }
2020-09-01 11:08:37 +02:00
public TreeItemModifier() { }
public TreeItemModifier(string name, string icon)
{
Name = name;
Icon = icon;
}
2020-04-06 15:53:32 +02:00
}
}