rama creada apartir de master en j
This commit is contained in:
@@ -5,6 +5,12 @@ using MongoDB.Bson;
|
||||
|
||||
namespace adas_core.Domain.Models.MongoModels;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a configuration class for display settings and options.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This class encapsulates the configuration data used to manage display-related properties and behavior.
|
||||
/// </remarks>
|
||||
public class DisplayConfig
|
||||
{
|
||||
public ObjectId Id { get; set; }
|
||||
@@ -47,91 +53,135 @@ public class DisplayConfig
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Merges the current display configuration with the provided default configuration,
|
||||
/// using the current instance's values where they are not null or empty, and falling back
|
||||
/// to the default configuration values otherwise. Simple nullable properties are merged
|
||||
/// via null-coalescing assignment, while collection properties are replaced when they
|
||||
/// are null or empty.
|
||||
/// </summary>
|
||||
/// <param name="defaultConfig">The default configuration to use as a fallback when the current configuration properties are null or empty.</param>
|
||||
/// <returns>The current <see cref="DisplayConfig"/> instance with merged configuration values.</returns>
|
||||
public virtual DisplayConfig MergeConfig(DisplayConfig defaultConfig)
|
||||
{
|
||||
// CardConfig ??= defaultConfig.CardConfig;
|
||||
CardConfigId ??= defaultConfig.CardConfigId;
|
||||
HomeConfig ??= defaultConfig.HomeConfig;
|
||||
HeaderConfig ??= defaultConfig.HeaderConfig;
|
||||
DetailConfigId ??= defaultConfig.DetailConfigId;
|
||||
Hospital ??= defaultConfig.Hospital;
|
||||
ColorConfig ??= defaultConfig.ColorConfig;
|
||||
MediaFolder ??= defaultConfig.MediaFolder;
|
||||
GroupedFieldList ??= defaultConfig.GroupedFieldList;
|
||||
if (SensorList?.Count == 0) SensorList = defaultConfig.SensorList;
|
||||
if (AlarmFieldList?.Count == 0) AlarmFieldList = defaultConfig.AlarmFieldList;
|
||||
if (FieldList.Count == 0) FieldList = defaultConfig.FieldList;
|
||||
if (GroupedFieldList?.Count == 0) GroupedFieldList = defaultConfig.GroupedFieldList;
|
||||
if (RequestGroupedFieldList?.Count == 0) RequestGroupedFieldList = defaultConfig.RequestGroupedFieldList;
|
||||
if (ChartConfig?.Count == 0) ChartConfig = defaultConfig.ChartConfig;
|
||||
return this;
|
||||
}
|
||||
{
|
||||
// CardConfig ??= defaultConfig.CardConfig;
|
||||
CardConfigId ??= defaultConfig.CardConfigId;
|
||||
HomeConfig ??= defaultConfig.HomeConfig;
|
||||
HeaderConfig ??= defaultConfig.HeaderConfig;
|
||||
DetailConfigId ??= defaultConfig.DetailConfigId;
|
||||
Hospital ??= defaultConfig.Hospital;
|
||||
ColorConfig ??= defaultConfig.ColorConfig;
|
||||
MediaFolder ??= defaultConfig.MediaFolder;
|
||||
GroupedFieldList ??= defaultConfig.GroupedFieldList;
|
||||
if (SensorList?.Count == 0) SensorList = defaultConfig.SensorList;
|
||||
if (AlarmFieldList?.Count == 0) AlarmFieldList = defaultConfig.AlarmFieldList;
|
||||
if (FieldList.Count == 0) FieldList = defaultConfig.FieldList;
|
||||
if (GroupedFieldList?.Count == 0) GroupedFieldList = defaultConfig.GroupedFieldList;
|
||||
if (RequestGroupedFieldList?.Count == 0) RequestGroupedFieldList = defaultConfig.RequestGroupedFieldList;
|
||||
if (ChartConfig?.Count == 0) ChartConfig = defaultConfig.ChartConfig;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Represents a standard display configuration, extending the base <see cref="DisplayConfig"/> class to provide default display settings.
|
||||
/// </summary>
|
||||
public class StandarDisplay : DisplayConfig
|
||||
{
|
||||
public SectionConfig? SectionConfig { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Merges the provided default display configuration into the current instance when it is a <see cref="StandarDisplay"/>, applying the default home configuration if none is set and overriding color and rotation settings; otherwise returns the current instance unchanged.
|
||||
/// </summary>
|
||||
/// <param name="defaultConfig">The default display configuration to merge from. Only values from a <see cref="StandarDisplay"/> instance are applied.</param>
|
||||
/// <returns>The merged <see cref="DisplayConfig"/>, or the current instance if the provided configuration is not a <see cref="StandarDisplay"/>.</returns>
|
||||
public override DisplayConfig MergeConfig(DisplayConfig defaultConfig)
|
||||
{
|
||||
if (defaultConfig is not StandarDisplay defaultStandarConfig)
|
||||
return this; // Si no es de tipo DisplayNurse, no combinar.
|
||||
|
||||
HomeConfig ??= defaultStandarConfig.HomeConfig;
|
||||
ColorConfig = defaultStandarConfig.ColorConfig;
|
||||
IsRotationEnabled = defaultStandarConfig.IsRotationEnabled;
|
||||
return base.MergeConfig(defaultConfig);
|
||||
}
|
||||
{
|
||||
if (defaultConfig is not StandarDisplay defaultStandarConfig)
|
||||
return this; // Si no es de tipo DisplayNurse, no combinar.
|
||||
|
||||
HomeConfig ??= defaultStandarConfig.HomeConfig;
|
||||
ColorConfig = defaultStandarConfig.ColorConfig;
|
||||
IsRotationEnabled = defaultStandarConfig.IsRotationEnabled;
|
||||
return base.MergeConfig(defaultConfig);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Represents a display configuration specific to nurses, inheriting common display behavior from the <see cref="DisplayConfig"/> base class.
|
||||
/// </summary>
|
||||
public class DisplayNurse : DisplayConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Merges the current display configuration with the provided default configuration, populating HomeBanner, ColorConfig, and FormConfig with the default values when they are not already set. If the defaultConfig is not a DisplayNurse instance, the current configuration is returned unchanged before delegating to the base merge behavior.
|
||||
/// </summary>
|
||||
/// <param name="defaultConfig">The default DisplayConfig to merge values from. Only DisplayNurse instances contribute fallback values for nurse-specific settings.</param>
|
||||
/// <returns>A DisplayConfig containing the merged configuration.</returns>
|
||||
public override DisplayConfig MergeConfig(DisplayConfig defaultConfig)
|
||||
{
|
||||
if (defaultConfig is not DisplayNurse defaultNurseConfig) return this;
|
||||
HomeBanner ??= defaultNurseConfig.HomeBanner;
|
||||
ColorConfig ??= defaultNurseConfig.ColorConfig;
|
||||
FormConfig ??= defaultNurseConfig.FormConfig;
|
||||
return base.MergeConfig(defaultConfig);
|
||||
}
|
||||
{
|
||||
if (defaultConfig is not DisplayNurse defaultNurseConfig) return this;
|
||||
HomeBanner ??= defaultNurseConfig.HomeBanner;
|
||||
ColorConfig ??= defaultNurseConfig.ColorConfig;
|
||||
FormConfig ??= defaultNurseConfig.FormConfig;
|
||||
return base.MergeConfig(defaultConfig);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a display configuration tailored for a pump, providing settings that determine how pump-related information is rendered.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Inherits from <see cref="DisplayConfig"/>, extending its general display configuration behavior with pump-specific context.
|
||||
/// </remarks>
|
||||
public class PumpDisplay : DisplayConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Merges the specified display configuration into the current instance, applying default values from the provided <see cref="PumpDisplay"/> configuration when the current values are null or empty. Returns the current instance unchanged if the supplied configuration is not a <see cref="PumpDisplay"/>.
|
||||
/// </summary>
|
||||
/// <param name="config">The display configuration to merge from. Only <see cref="PumpDisplay"/> instances are processed; any other type results in the current instance being returned as-is.</param>
|
||||
/// <returns>The merged <see cref="DisplayConfig"/> result produced by chaining the base merge operation.</returns>
|
||||
public override DisplayConfig MergeConfig(DisplayConfig config)
|
||||
{
|
||||
if (config is not PumpDisplay defaultConfig) return this;
|
||||
CardConfigId ??= defaultConfig.CardConfigId;
|
||||
HomeConfig ??= defaultConfig.HomeConfig;
|
||||
ColorConfig = defaultConfig.ColorConfig;
|
||||
|
||||
GraphLayout ??= defaultConfig.GraphLayout;
|
||||
Pumps ??= defaultConfig.Pumps;
|
||||
if (FieldList.Count == 0) FieldList = defaultConfig.FieldList;
|
||||
if (GroupedFieldList?.Count == 0) GroupedFieldList = defaultConfig.GroupedFieldList;
|
||||
if (RequestGroupedFieldList?.Count == 0) RequestGroupedFieldList = defaultConfig.RequestGroupedFieldList;
|
||||
if (ChartConfig?.Count == 0) ChartConfig = defaultConfig.ChartConfig;
|
||||
|
||||
return base.MergeConfig(config);
|
||||
}
|
||||
{
|
||||
if (config is not PumpDisplay defaultConfig) return this;
|
||||
CardConfigId ??= defaultConfig.CardConfigId;
|
||||
HomeConfig ??= defaultConfig.HomeConfig;
|
||||
ColorConfig = defaultConfig.ColorConfig;
|
||||
|
||||
GraphLayout ??= defaultConfig.GraphLayout;
|
||||
Pumps ??= defaultConfig.Pumps;
|
||||
if (FieldList.Count == 0) FieldList = defaultConfig.FieldList;
|
||||
if (GroupedFieldList?.Count == 0) GroupedFieldList = defaultConfig.GroupedFieldList;
|
||||
if (RequestGroupedFieldList?.Count == 0) RequestGroupedFieldList = defaultConfig.RequestGroupedFieldList;
|
||||
if (ChartConfig?.Count == 0) ChartConfig = defaultConfig.ChartConfig;
|
||||
|
||||
return base.MergeConfig(config);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a smart display configuration that extends the base <see cref="DisplayConfig"/> behavior.
|
||||
/// </summary>
|
||||
public class SmartDisplay : DisplayConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Merges the provided default configuration into this <see cref="SmartDisplay"/> instance, applying default values for any properties that are currently <see langword="null"/>. If the supplied configuration is not a <see cref="SmartDisplay"/>, the current instance is returned unchanged and the merge is delegated to the base implementation.
|
||||
/// </summary>
|
||||
/// <param name="defaultConfigToCast">The default <see cref="DisplayConfig"/> to merge; it is cast to <see cref="SmartDisplay"/> to access smart display-specific properties.</param>
|
||||
/// <returns>The merged <see cref="DisplayConfig"/> produced by the base merge operation.</returns>
|
||||
public override DisplayConfig MergeConfig(DisplayConfig defaultConfigToCast)
|
||||
{
|
||||
if (defaultConfigToCast is not SmartDisplay defaultConfig) return this;
|
||||
ColorConfig = defaultConfig.ColorConfig;
|
||||
HasCameras ??= defaultConfig.HasCameras;
|
||||
HasSound ??= defaultConfig.HasSound;
|
||||
IsRotationEnabled ??= defaultConfig.IsRotationEnabled;
|
||||
CanChangeCameraMode ??= defaultConfig.CanChangeCameraMode;
|
||||
CamerasAreActive ??= defaultConfig.CamerasAreActive;
|
||||
CameraStreamType ??= defaultConfig.CameraStreamType;
|
||||
GraphLayout ??= defaultConfig.GraphLayout;
|
||||
Pumps ??= defaultConfig.Pumps;
|
||||
ObservationForIndicator ??= defaultConfig.ObservationForIndicator;
|
||||
CardRotatingLayout ??= defaultConfig.CardRotatingLayout;
|
||||
return base.MergeConfig(defaultConfig);
|
||||
}
|
||||
{
|
||||
if (defaultConfigToCast is not SmartDisplay defaultConfig) return this;
|
||||
ColorConfig = defaultConfig.ColorConfig;
|
||||
HasCameras ??= defaultConfig.HasCameras;
|
||||
HasSound ??= defaultConfig.HasSound;
|
||||
IsRotationEnabled ??= defaultConfig.IsRotationEnabled;
|
||||
CanChangeCameraMode ??= defaultConfig.CanChangeCameraMode;
|
||||
CamerasAreActive ??= defaultConfig.CamerasAreActive;
|
||||
CameraStreamType ??= defaultConfig.CameraStreamType;
|
||||
GraphLayout ??= defaultConfig.GraphLayout;
|
||||
Pumps ??= defaultConfig.Pumps;
|
||||
ObservationForIndicator ??= defaultConfig.ObservationForIndicator;
|
||||
CardRotatingLayout ??= defaultConfig.CardRotatingLayout;
|
||||
return base.MergeConfig(defaultConfig);
|
||||
}
|
||||
|
||||
// TO TEST
|
||||
public List<string> GetDifferentProperties(SmartDisplay? other)
|
||||
@@ -154,38 +204,47 @@ public class SmartDisplay : DisplayConfig
|
||||
}
|
||||
|
||||
// Método para comparar valores de diferentes tipos de propiedades
|
||||
/// <summary>
|
||||
/// Determines whether two values are considered equal, handling null cases, performing element-wise comparison for enumerables, and falling back to <see cref="object.Equals(object, object)"/> for same-type values or string comparison for different types.
|
||||
/// </summary>
|
||||
/// <param name="value1">The first value to compare.</param>
|
||||
/// <param name="value2">The second value to compare.</param>
|
||||
/// <returns><c>true</c> if both values are null, deeply equal as enumerables, equal via <see cref="object.Equals(object, object)"/> when their types match, or have matching string representations; otherwise, <c>false</c>.</returns>
|
||||
private static bool AreEqual(object? value1, object? value2)
|
||||
{
|
||||
if (value1 == null && value2 == null) return true;
|
||||
|
||||
if (value1 == null || value2 == null) return false;
|
||||
if (value1 is IEnumerable enumerable1 && value2 is IEnumerable enumerable2)
|
||||
{
|
||||
var enumerator1 = enumerable1.GetEnumerator();
|
||||
var enumerator2 = enumerable2.GetEnumerator();
|
||||
|
||||
try
|
||||
if (value1 == null && value2 == null) return true;
|
||||
|
||||
if (value1 == null || value2 == null) return false;
|
||||
if (value1 is IEnumerable enumerable1 && value2 is IEnumerable enumerable2)
|
||||
{
|
||||
while (enumerator1.MoveNext() && enumerator2.MoveNext())
|
||||
if (!AreEqual(enumerator1.Current, enumerator2.Current))
|
||||
return false;
|
||||
|
||||
return !enumerator1.MoveNext() && !enumerator2.MoveNext();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (enumerator1 is IDisposable disposable1) disposable1.Dispose();
|
||||
if (enumerator2 is IDisposable disposable2) disposable2.Dispose();
|
||||
var enumerator1 = enumerable1.GetEnumerator();
|
||||
var enumerator2 = enumerable2.GetEnumerator();
|
||||
|
||||
try
|
||||
{
|
||||
while (enumerator1.MoveNext() && enumerator2.MoveNext())
|
||||
if (!AreEqual(enumerator1.Current, enumerator2.Current))
|
||||
return false;
|
||||
|
||||
return !enumerator1.MoveNext() && !enumerator2.MoveNext();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (enumerator1 is IDisposable disposable1) disposable1.Dispose();
|
||||
if (enumerator2 is IDisposable disposable2) disposable2.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
// Si ambos valores son del mismo tipo, usa Equals para comparar
|
||||
if (value1.GetType() == value2.GetType()) return value1.Equals(value2);
|
||||
|
||||
// Si los tipos son diferentes, convierte a string y compara
|
||||
return value1.ToString() == value2.ToString();
|
||||
}
|
||||
|
||||
// Si ambos valores son del mismo tipo, usa Equals para comparar
|
||||
if (value1.GetType() == value2.GetType()) return value1.Equals(value2);
|
||||
|
||||
// Si los tipos son diferentes, convierte a string y compara
|
||||
return value1.ToString() == value2.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Represents a configuration class for defining header-related settings.
|
||||
/// </summary>
|
||||
public class HeaderConfig
|
||||
{
|
||||
public HeaderItem? PartnerLogo { get; set; }
|
||||
@@ -212,6 +271,9 @@ public class HeaderConfig
|
||||
|
||||
public HeaderItem? SectionTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Represents a single item contained within a header.
|
||||
/// </summary>
|
||||
public class HeaderItem
|
||||
{
|
||||
public string? LogoUrl { get; set; }
|
||||
@@ -219,12 +281,18 @@ public class HeaderConfig
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a display section that provides a minimal rendering configuration.
|
||||
/// </summary>
|
||||
public class MinimalDisplaySection
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public ObjectId Id { get; set; }
|
||||
public bool IsSelected { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Represents the configuration settings for a section.
|
||||
/// </summary>
|
||||
public class SectionConfig
|
||||
{
|
||||
public int? Columns { get; set; }
|
||||
@@ -234,6 +302,9 @@ public class SectionConfig
|
||||
public UiFontData? DesignProperties { get; set; }
|
||||
public List<Step>? Steps { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Represents a banner item, typically used to encapsulate data related to a banner display element such as a notification, advertisement, or promotional content.
|
||||
/// </summary>
|
||||
public class BannerItem
|
||||
{
|
||||
public DisplayConfigEnums.BannerType? Type { get; set; }
|
||||
@@ -241,6 +312,12 @@ public class BannerItem
|
||||
public BannerItemConfig? Config { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the configuration settings for a banner item, defining its properties and behavior.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This class is used to store and manage configuration data related to individual banner items within the application.
|
||||
/// </remarks>
|
||||
public class BannerItemConfig
|
||||
{
|
||||
public BannerItemTableConfig? BannerItemTableConfig { get; set; }
|
||||
@@ -248,6 +325,9 @@ public class BannerItemConfig
|
||||
public MedicalStaffConfig? MedicalStaffConfig { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the configuration settings for a banner item table.
|
||||
/// </summary>
|
||||
public class BannerItemTableConfig
|
||||
{
|
||||
public List<HeaderBannerItemTableConfig>? Config { get; set; }
|
||||
@@ -255,12 +335,18 @@ public class BannerItemTableConfig
|
||||
public string? TextColor { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the configuration settings for medical staff.
|
||||
/// </summary>
|
||||
public class MedicalStaffConfig
|
||||
{
|
||||
public bool? HasTeams { get; set; }
|
||||
public int? StaffAmount { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents an overview of form items, providing a consolidated view or summary of form-related data.
|
||||
/// </summary>
|
||||
public class FormItemOverview
|
||||
{
|
||||
public bool Nhc { get; set; }
|
||||
@@ -288,6 +374,9 @@ public class FormItemOverview
|
||||
public bool? UciDays { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the configuration settings for a table that displays header banner items.
|
||||
/// </summary>
|
||||
public class HeaderBannerItemTableConfig
|
||||
{
|
||||
public DisplayConfigEnums.CellType? Type { get; set; }
|
||||
@@ -300,6 +389,9 @@ public class HeaderBannerItemTableConfig
|
||||
public string? Title { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a sensor, which is a device or component used to detect and measure physical phenomena such as temperature, pressure, or motion.
|
||||
/// </summary>
|
||||
public class Sensor
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
@@ -308,6 +400,9 @@ public class Sensor
|
||||
public bool IsGeneral { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a configuration that defines color-related settings or values.
|
||||
/// </summary>
|
||||
public class ColorConfig
|
||||
{
|
||||
public LevelColors? Level { get; set; }
|
||||
@@ -357,6 +452,9 @@ public class ColorConfig
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Represents configuration settings that define the visual appearance of an application or user interface element.
|
||||
/// </summary>
|
||||
public class AppearanceSettings
|
||||
{
|
||||
public string? TextColor { get; set; }
|
||||
@@ -395,6 +493,9 @@ public class ColorConfig
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the set of colors used to display numbers within a status box.
|
||||
/// </summary>
|
||||
public class StatusBoxNumberColors
|
||||
{
|
||||
public AppearanceSettings? Reserved { get; set; }
|
||||
@@ -433,6 +534,9 @@ public class ColorConfig
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of colors used for therapy-related visuals or themes.
|
||||
/// </summary>
|
||||
public class TherapyColors
|
||||
{
|
||||
public AppearanceSettings? Default { get; set; }
|
||||
@@ -464,6 +568,9 @@ public class ColorConfig
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a test class for color-related operations or values.
|
||||
/// </summary>
|
||||
public class TestColors
|
||||
{
|
||||
public AppearanceSettings? Default { get; set; }
|
||||
@@ -496,6 +603,9 @@ public class ColorConfig
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a set of colors used to define or customize the appearance of a procedure.
|
||||
/// </summary>
|
||||
public class ProcedureColors
|
||||
{
|
||||
public AppearanceSettings? Default { get; set; }
|
||||
@@ -528,6 +638,9 @@ public class ColorConfig
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection or definition of colors associated with different levels.
|
||||
/// </summary>
|
||||
public class LevelColors
|
||||
{
|
||||
public string? Level1 { get; set; }
|
||||
@@ -563,6 +676,9 @@ public class ColorConfig
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides a collection of predefined color values used for styling or rendering text.
|
||||
/// </summary>
|
||||
public class TextColors
|
||||
{
|
||||
public string? Normal { get; set; }
|
||||
@@ -598,6 +714,9 @@ public class ColorConfig
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection or definition of colors used for rendering arrows.
|
||||
/// </summary>
|
||||
public class ArrowColors
|
||||
{
|
||||
public string? Normal { get; set; }
|
||||
@@ -630,6 +749,9 @@ public class ColorConfig
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection or definition of colors used for indicators.
|
||||
/// </summary>
|
||||
public class IndicatorColors
|
||||
{
|
||||
public string? Empty { get; set; }
|
||||
@@ -668,6 +790,9 @@ public class ColorConfig
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection or definition of colors used for rendering graphs.
|
||||
/// </summary>
|
||||
public class GraphColors
|
||||
{
|
||||
public string? Normal { get; set; }
|
||||
@@ -698,6 +823,12 @@ public class ColorConfig
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents configuration settings for a form.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This class encapsulates the configuration data required to define or manage form-related properties.
|
||||
/// </remarks>
|
||||
public class FormConfig
|
||||
{
|
||||
public FormItemOverview? Admission { get; set; }
|
||||
@@ -709,6 +840,9 @@ public class FormConfig
|
||||
// ======================
|
||||
// Axis Components
|
||||
// ======================
|
||||
/// <summary>
|
||||
/// Represents a label associated with an axis, typically used in charting or graphing scenarios to describe or identify the axis.
|
||||
/// </summary>
|
||||
public class AxisLabel
|
||||
{
|
||||
public bool? Show { get; set; }
|
||||
@@ -718,6 +852,12 @@ public class AxisLabel
|
||||
public bool? Silent { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the style configuration used to render an axis line.
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a line associated with an axis, typically used in charting or graphing scenarios to render or define axis-related visual elements.
|
||||
/// </summary>
|
||||
public class AxisLineStyle
|
||||
{
|
||||
public string? Color { get; set; }
|
||||
@@ -729,6 +869,9 @@ public class AxisLine
|
||||
public AxisLineStyle? LineStyle { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a single tick mark on an axis, typically used in charting or graphing scenarios.
|
||||
/// </summary>
|
||||
public class AxisTick
|
||||
{
|
||||
public bool? Show { get; set; }
|
||||
@@ -737,6 +880,9 @@ public class AxisTick
|
||||
public int? Interval { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the configuration settings for a chart, defining its visual and behavioral properties.
|
||||
/// </summary>
|
||||
public class ChartConfig
|
||||
{
|
||||
public ObjectId Id { get; set; }
|
||||
@@ -750,6 +896,10 @@ public class ChartConfig
|
||||
// ======================
|
||||
// Series Implementations
|
||||
// ======================
|
||||
/// <summary>
|
||||
/// Serves as the base class for configuration types that define settings for a series.
|
||||
/// Provides a common foundation for derived series configuration implementations.
|
||||
/// </summary>
|
||||
public class SeriesConfigBase
|
||||
{
|
||||
public string? Key { get; set; }
|
||||
@@ -791,6 +941,9 @@ public class SeriesConfigBase
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a visual mapping that handles the rendering or display logic for map-related data.
|
||||
/// </summary>
|
||||
public class VisualMap
|
||||
{
|
||||
public bool Show { get; set; } //Mostrar en la leyenda
|
||||
@@ -799,6 +952,9 @@ public class VisualMap
|
||||
public List<Piece>? Pieces { get; set; } //Rangos de colores y configuraciones de tipos
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a single piece, serving as a general-purpose entity within its containing system.
|
||||
/// </summary>
|
||||
public class Piece
|
||||
{
|
||||
public double? Opacity { get; set; } //Valor de la opacidad
|
||||
@@ -871,6 +1027,9 @@ public class Piece
|
||||
// return HashCode.Combine(AboveBaselineColor, BelowBaselineColor);
|
||||
// }
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// Represents a candle entity within the system.
|
||||
// /// </summary>
|
||||
// public class CandlestickSeriesConfig : SeriesConfigBase
|
||||
// {
|
||||
// public List<Candle>? CandleKeyList { get; set; }
|
||||
@@ -902,6 +1061,12 @@ public enum CandleValueType
|
||||
// ======================
|
||||
// Chart Configurations
|
||||
// ======================
|
||||
/// <summary>
|
||||
/// Serves as the base class for chart configuration objects, providing common configuration properties and behavior shared by all chart types.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This class is intended to be inherited by specialized chart configuration types to ensure consistent configuration handling across the charting system.
|
||||
/// </remarks>
|
||||
public class ChartBaseConfig
|
||||
{
|
||||
public string? Title { get; set; }
|
||||
@@ -919,6 +1084,9 @@ public class ChartBaseConfig
|
||||
public float BaselineOffset { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the configuration settings for an axis.
|
||||
/// </summary>
|
||||
public class AxisConfig
|
||||
{
|
||||
public DisplayConfigEnums.AxisType Type { get; set; }
|
||||
@@ -938,6 +1106,12 @@ public class AxisConfig
|
||||
public GroupedObservationEnum.Regularity Regularity { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a layout configuration for arranging elements of a graph, such as positioning nodes and routing edges.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This class serves as a base type for specific graph layout strategies and is intended to be used to control the visual or logical arrangement of graph components.
|
||||
/// </remarks>
|
||||
public class GraphLayout
|
||||
{
|
||||
public string? Layout { get; set; }
|
||||
@@ -947,6 +1121,9 @@ public class GraphLayout
|
||||
public List<string>? ObservationName { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a layout configuration for arranging section boxes.
|
||||
/// </summary>
|
||||
public class SectionBoxLayout
|
||||
{
|
||||
public DisplayConfigEnums.RowType Type { get; set; }
|
||||
@@ -971,12 +1148,18 @@ public class SectionBoxLayout
|
||||
public List<RowBoxLayout>? Rows { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a configuration class that defines conditions.
|
||||
/// </summary>
|
||||
public class ConditionsConfig
|
||||
{
|
||||
public string? Condition { get; set; }
|
||||
public string? FieldCondition { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a layout manager that arranges child elements in a row-based box configuration.
|
||||
/// </summary>
|
||||
public class RowBoxLayout
|
||||
{
|
||||
public double? GrowPriority { get; set; }
|
||||
@@ -991,6 +1174,9 @@ public class RowBoxLayout
|
||||
public DisplayConfigEnums.DirectionEnum Direction { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a box layout configuration for displaying observation rows.
|
||||
/// </summary>
|
||||
public class ObservationRowBoxLayout
|
||||
{
|
||||
public List<ObservationTextRule>? TextRules { get; set; }
|
||||
@@ -1027,6 +1213,9 @@ public class ObservationRowBoxLayout
|
||||
public DisplayConfigEnums.DirectionEnum? Direction { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a layout that arranges cards with a rotating behavior, likely managing the visual positioning and orientation of card elements within a container.
|
||||
/// </summary>
|
||||
public class CardRotatingLayout
|
||||
{
|
||||
// In MS
|
||||
@@ -1040,6 +1229,9 @@ public class CardRotatingLayout
|
||||
public CardConfig Data { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a rule used to validate or process observation text.
|
||||
/// </summary>
|
||||
public class ObservationTextRule
|
||||
{
|
||||
public ObservationEnum.ValueType ValueType { get; set; }
|
||||
@@ -1056,17 +1248,26 @@ public class ObservationTextRule
|
||||
public decimal? MaxNum { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a configuration object that defines layout settings for a legend.
|
||||
/// </summary>
|
||||
public class LegendLayoutConfig
|
||||
{
|
||||
public List<LegendLayoutRow>? Rows { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a single row within a legend layout, typically used to organize and arrange legend items in a structured, row-based configuration.
|
||||
/// </summary>
|
||||
public class LegendLayoutRow
|
||||
{
|
||||
public decimal? GrowPriority { get; set; }
|
||||
public List<LegendLayoutColumn>? Columns { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a column within a legend layout, defining a vertical arrangement of legend entries or items.
|
||||
/// </summary>
|
||||
public class LegendLayoutColumn
|
||||
{
|
||||
public string? Key { get; set; }
|
||||
@@ -1074,6 +1275,9 @@ public class LegendLayoutColumn
|
||||
public LegendLabel? Label { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a label associated with a legend, typically used to describe or identify an entry in a chart, graph, or similar visual component.
|
||||
/// </summary>
|
||||
public class LegendLabel
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user