diff --git a/CellTypes/AvatarCellType.cs b/CellTypes/AvatarCellType.cs index 10a91b0f238ded7e4c86ac16d6e0b626da277fed..3fd16c86ecae4331f559f306260ee5a82c6f4ef2 100644 --- a/CellTypes/AvatarCellType.cs +++ b/CellTypes/AvatarCellType.cs @@ -7,6 +7,7 @@ using System.ComponentModel; using System.Windows; using ElementUI.Properties; using ElementUI.WpfControls; +using GrapeCity.Forguncy.Plugin.Attributes; namespace ElementUI { @@ -49,10 +50,12 @@ namespace ElementUI } [SRDisplayName(nameof(Resources.AvatarCellType_shape))] + [DiffDefaultValueInclude] public AvatarShape shape { get; set; } = AvatarShape.circle; [SRDisplayName(nameof(Resources.AvatarCellType_fit))] [DefaultValue(AvatarFit.cover)] + [DiffDefaultValueInclude] public AvatarFit fit { get; set; } = AvatarFit.cover; [FormulaProperty] diff --git a/CellTypes/CalendarCellType.cs b/CellTypes/CalendarCellType.cs index 5502f65742e50f75a1a11eefb63d4b8f96acee55..1bf6e25047f428d056bc49ce29d1fc29b82a1af4 100644 --- a/CellTypes/CalendarCellType.cs +++ b/CellTypes/CalendarCellType.cs @@ -11,6 +11,8 @@ using System.Text; using System.Threading.Tasks; using System.Windows; using ElementUI.Properties; +using GrapeCity.Forguncy.Plugin.Attributes; +using System.Diagnostics.CodeAnalysis; namespace ElementUI { @@ -28,7 +30,10 @@ namespace ElementUI [OrderWeight((int)Utils.OrderWeight.Calendar)] public class CalendarCellType : ElementCellTypeBase, ICommandCellType, ISupportDefaultValue { + private const string _valueList = "1|2|3|4|5|6|7"; + [Browsable(false)] + [DiffJsonIgnore] public List CommandList { get @@ -64,10 +69,13 @@ namespace ElementUI [SRBindingDataSourceProperty(Columns = nameof(Resources.CalendarCellType_bindingOptions_Columns))] [SRDisplayName(nameof(Resources.CalendarCellType_bindingOptions))] + [DiffTypeNameIgnore] public object bindingOptions { get; set; } [SRDisplayName(nameof(Resources.CalendarCellType_firstDayOfWeek))] - [SRComboProperty(ValueList = "1|2|3|4|5|6|7", DisplayList = nameof(Resources.DatePickerCellType_firstDayWeek_DisplayList))] + [SRComboProperty(ValueList = _valueList, DisplayList = nameof(Resources.DatePickerCellType_firstDayWeek_DisplayList))] + [DiffJsonIgnore] + [SuppressMessage("属性注解", "活字格插件:DefaultValue", Justification = "")] public int firstDayOfWeek { get; set; } = 1; public bool NeedFormatDefaultValue => true; @@ -76,6 +84,19 @@ namespace ElementUI { return Resources.Calendar; } + public override DiffUpdateInfo GetDiffUpdateInfo() + { + var result = base.GetDiffUpdateInfo(); + + result.Properties = result.Properties.Append( + new DiffAddPropertyInfo() + { + PropertyName = Resources.DatePickerCellType_firstDayOfWeek, + PropertyValue = GetSelectorDisplay(firstDayOfWeek.ToString(), _valueList, Resources.DatePickerCellType_firstDayWeek_DisplayList) + }); + + return result; + } } public class CalendarOptionItem diff --git a/CellTypes/CascaderCellType.cs b/CellTypes/CascaderCellType.cs index cde542bd4aafa0ec3aa3d42e6212e963368b1c49..6489c34552bfbcf70d33c762a6389d437a16cc6e 100644 --- a/CellTypes/CascaderCellType.cs +++ b/CellTypes/CascaderCellType.cs @@ -12,6 +12,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows; using ElementUI.Properties; +using GrapeCity.Forguncy.Plugin.Attributes; namespace ElementUI { @@ -43,7 +44,7 @@ namespace ElementUI public override List UIPermissions { get => base.UIPermissions; set => base.UIPermissions = value; } public override object DefaultValue { get => base.DefaultValue; set => base.DefaultValue = value; } public override bool NeedFormatDefaultValue => false; - + public override SupportFeatures SupportFeatures => base.SupportFeatures | SupportFeatures.AllowSetFormat | SupportFeatures.AllowSetTabOrder; #endregion [SRDisplayName(nameof(Resources.CascaderCellType_useBinding))] @@ -53,12 +54,15 @@ namespace ElementUI [SRTreeProperty(IndentLevel = 1, NodeType = typeof(TreeNode), DefaultNodeName = nameof(Resources.CascaderCellType_options_DefaultNodeName))] [SRDisplayName(nameof(Resources.CascaderCellType_options))] + [DiffTypeNameIgnore] public List options { get; set; } = new List(); - [SRBindingDataSourceProperty(Columns = nameof(Resources.CascaderCellType_bindingOptions_Columns), IndentLevel = 1, IsIdPidStructure = true)] + [SRBindingDataSourceProperty(Columns = nameof(Resources.CascaderCellType_bindingOptions_Columns), IndentLevel = 1, IsIdPidStructure = true, TreeIdColumnName = "value", TreePidColumnName = "parentValue")] [SRDisplayName(nameof(Resources.CascaderCellType_bindingOptions))] + [DiffTypeNameIgnore] public object bindingOptions { get; set; } [SRDisplayName(nameof(Resources.CascaderCellType_expandTrigger))] + [DiffDefaultValueInclude] public ExpendTrigger expandTrigger { get; set; } = ExpendTrigger.Click; [SRDisplayName(nameof(Resources.CascaderCellType_placeholder))] @@ -119,7 +123,7 @@ namespace ElementUI if (propertyName == nameof(tagType)) { return multiple; - } + } if (propertyName == nameof(emitPath)) { return !multiple; @@ -207,6 +211,7 @@ namespace ElementUI [SRDisplayName(nameof(Resources.CascaderCellType_CheckedItems))] public object CheckedItems { get; set; } } + } public enum ExpendTrigger @@ -234,18 +239,19 @@ namespace ElementUI public class TreeNode : TreeNodeBase { - + } public class TreeNodeBase : ITreeNode, ICloneable where T : ITreeNode { [SRDisplayName(nameof(Resources.CascaderCellType_value))] [Required] - public string value { get; set; } + public virtual string value { get; set; } [SRDisplayName(nameof(Resources.CascaderCellType_label))] [Required] - public string label { get; set; } + public virtual string label { get; set; } + [SRDisplayName(nameof(Resources.Children_Diff))] public List children { get; set; } = new List(); public bool ShouldSerializechildren() diff --git a/CellTypes/Common.cs b/CellTypes/Common.cs index 2feb4a37b17bb9bf0346f54e7d9629950f1456a4..f4dee1cf2362daf776948f6f95adc4a618b1671e 100644 --- a/CellTypes/Common.cs +++ b/CellTypes/Common.cs @@ -7,16 +7,17 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; +using System.Runtime.Remoting; using System.Text; using System.Threading.Tasks; using System.Windows.Input; namespace ElementUI { - [DependenceRuntimModule("vue3")] + [DependenceRuntimeModule("vue3")] [SRCategory(nameof(Resources.ElementUI_DisplayName))] [SupportUsingScope(PageScope.AllPCPage, ListViewScope.None)] - public abstract class ElementCellTypeBase : CellType, IDisablePropertySettings + public abstract class ElementCellTypeBase : CellType, IDisablePropertySettings, ISupportDiff { public virtual ForguncyDisabledSettings GetDisabledPropertySettings(ForguncyPageKind pageType) { @@ -30,6 +31,34 @@ namespace ElementUI ForguncyDisabledSettings.CenterAlignment | ForguncyDisabledSettings.LeftAlignment; } + public virtual DiffUpdateInfo GetDiffUpdateInfo() + { + return new DiffUpdateInfo() + { + Properties = new List() + }; + } + + public string GetSelectorDisplay(string value, string valueList, string displayList) + { + if (string.IsNullOrWhiteSpace(value) + || string.IsNullOrWhiteSpace(valueList) + || string.IsNullOrWhiteSpace(displayList)) + { + return string.Empty; + } + + var displayIndex = valueList.Split('|')?.ToList()?.IndexOf(value) ?? -1; + + var displays = displayList.Split('|')?.ToList(); + + if (displayIndex != -1 && displays.Count > displayIndex) + { + return displays[displayIndex]; + } + + return string.Empty; + } } public abstract class InputCellTypeBase : ElementCellTypeBase, @@ -58,7 +87,8 @@ namespace ElementUI if (_uIPermissions == null) { List permissions = new List() { UIPermissionScope.Enable, UIPermissionScope.Visible }; - if(this is ISupportReadOnly) + var inputCellTypeBase = this; + if (inputCellTypeBase is ISupportReadOnly) { permissions.Add(UIPermissionScope.Editable); } @@ -74,7 +104,8 @@ namespace ElementUI { if (i.Scope == UIPermissionScope.Editable) { - return this is ISupportReadOnly; + var inputCellTypeBase = this; + return inputCellTypeBase is ISupportReadOnly; } return true; }).ToList(); @@ -133,9 +164,9 @@ namespace ElementUI public SRFormulaPropertyAttribute() { } - public override string ContextVariables - { - get => ResourceHelper.GetString(base.ContextVariables); + public override string ContextVariables + { + get => ResourceHelper.GetString(base.ContextVariables); set => base.ContextVariables = value; } } @@ -169,6 +200,12 @@ namespace ElementUI get => ResourceHelper.GetString(base.InitParamValues); set => base.InitParamValues = value; } + + public override string ParameterDescriptions + { + get => ResourceHelper.GetString(base.ParameterDescriptions); + set => base.ParameterDescriptions = value; + } } internal class SRBindingDataSourcePropertyAttribute : BindingDataSourcePropertyAttribute { @@ -176,7 +213,7 @@ namespace ElementUI { get => ResourceHelper.GetString(base.Columns); set => base.Columns = value; - } + } public override string ColumnsDescription { get => ResourceHelper.GetString(base.ColumnsDescription); @@ -190,7 +227,7 @@ namespace ElementUI get => ResourceHelper.GetString(base.DefaultNodeName); set => base.DefaultNodeName = value; } - } + } internal class SRComboPropertyAttribute : ComboPropertyAttribute { public override string DisplayList @@ -203,7 +240,7 @@ namespace ElementUI get => ResourceHelper.GetString(base.ValueList); set => base.ValueList = value; } - } + } internal class SRRadioGroupPropertyAttribute : RadioGroupPropertyAttribute { public override string DisplayList @@ -216,7 +253,7 @@ namespace ElementUI get => ResourceHelper.GetString(base.ValueList); set => base.ValueList = value; } - } + } internal class SRCategoryHeaderAttribute : CategoryHeaderAttribute { public SRCategoryHeaderAttribute(string name) @@ -226,18 +263,26 @@ namespace ElementUI } internal class SRIntPropertyAttribute : IntPropertyAttribute { - public override string Watermark + public override string Watermark { - get => ResourceHelper.GetString(base.Watermark); - set => base.Watermark = value; + get => ResourceHelper.GetString(base.Watermark); + set => base.Watermark = value; } } internal class SRDoublePropertyAttribute : DoublePropertyAttribute { - public override string Watermark + public override string Watermark { - get => ResourceHelper.GetString(base.Watermark); - set => base.Watermark = value; + get => ResourceHelper.GetString(base.Watermark); + set => base.Watermark = value; + } + } + internal class SRObjectListPropertyAttribute : ObjectListPropertyAttribute + { + public override string DefaultName + { + get => ResourceHelper.GetString(base.DefaultName); + set => base.DefaultName = value; } } internal class IconPropertyAttribute : ImageValuePropertyAttribute @@ -258,11 +303,17 @@ namespace ElementUI return name; } var srStr = Resources.ResourceManager.GetString(name); - if(srStr == null) + if (srStr == null) { return name; } return srStr; } } + internal class ComboItem + { + public string Name { get; set; } + + public string Value { get; set; } + } } diff --git a/CellTypes/DatePickerCellType.cs b/CellTypes/DatePickerCellType.cs index 12d8cfce6b33d560c468cb2fcbdbd995d2f72b2b..8ae0aa3667f743b5892f078606ce56451761ae14 100644 --- a/CellTypes/DatePickerCellType.cs +++ b/CellTypes/DatePickerCellType.cs @@ -11,6 +11,8 @@ using System.Text; using System.Threading.Tasks; using System.Windows; using ElementUI.Properties; +using GrapeCity.Forguncy.Plugin.Attributes; +using System.Diagnostics.CodeAnalysis; namespace ElementUI { @@ -51,8 +53,10 @@ namespace ElementUI public override DataValidationLink DataValidationLink { get => base.DataValidationLink; set => base.DataValidationLink = value; } public override List UIPermissions { get => base.UIPermissions; set => base.UIPermissions = value; } public override object DefaultValue { get => base.DefaultValue; set => base.DefaultValue = value; } + public override SupportFeatures SupportFeatures => base.SupportFeatures | SupportFeatures.AllowSetTabOrder; #endregion + private const string _valueList = "1|2|3|4|5|6|7"; [SRDisplayName(nameof(Resources.DatePickerCellType_type))] [SRComboProperty(ValueList = "year|month|date|week|datetime|monthrange|daterange|datetimerange", DisplayList = nameof(Resources.DatePickerCellType_type_DisplayList))] @@ -74,8 +78,10 @@ namespace ElementUI [SRComboProperty(ValueList = nameof(Resources.DatePickerCellType_format_ValueList), IsSelectOnly = false)] public string format { get; set; } - [SRComboProperty(ValueList = "1|2|3|4|5|6|7", DisplayList = nameof(Resources.DatePickerCellType_firstDayWeek_DisplayList))] + [SRComboProperty(ValueList = _valueList, DisplayList = nameof(Resources.DatePickerCellType_firstDayWeek_DisplayList))] [SRDisplayName(nameof(Resources.DatePickerCellType_firstDayOfWeek))] + [DiffJsonIgnore] + [SuppressMessage("属性注解", "活字格插件:DefaultValue", Justification = "")] public int firstDayOfWeek { get; set; } = 1; private object _prefixIcon; @@ -159,5 +165,22 @@ namespace ElementUI } return base.GetRunTimeMethodVisible(name); } + + public override DiffUpdateInfo GetDiffUpdateInfo() + { + var result = base.GetDiffUpdateInfo(); + + if (type.Contains("date") || type == "week") + { + result.Properties = result.Properties.Append( + new DiffAddPropertyInfo() + { + PropertyName = Resources.DatePickerCellType_firstDayOfWeek, + PropertyValue = GetSelectorDisplay(firstDayOfWeek.ToString(), _valueList, Resources.DatePickerCellType_firstDayWeek_DisplayList) + }); + } + + return result; + } } } diff --git a/CellTypes/Input.cs b/CellTypes/Input.cs index 81f2452b71c19046604f736d68319a9e6850079d..a9e0105969baf343ad971fdc9945d927df5996a6 100644 --- a/CellTypes/Input.cs +++ b/CellTypes/Input.cs @@ -30,6 +30,7 @@ namespace ElementUI public override DataValidationLink DataValidationLink { get => base.DataValidationLink; set => base.DataValidationLink = value; } public override List UIPermissions { get => base.UIPermissions; set => base.UIPermissions = value; } public override object DefaultValue { get => base.DefaultValue; set => base.DefaultValue = value; } + public override SupportFeatures SupportFeatures => base.SupportFeatures | SupportFeatures.AllowSetTabOrder; #endregion [SRDisplayName(nameof(Resources.Input_type))] @@ -97,7 +98,10 @@ namespace ElementUI [SRDisplayName(nameof(Resources.Input_clearable))] public bool clearable { get; set; } - + + [SRDisplayName(nameof(Resources.SelectAllOnFocus))] + public bool IsSelectAllOnFocus { get; set; } + [SRDisplayName(nameof(Resources.Input_showPassword))] [Browsable(false)] public bool showPassword diff --git a/CellTypes/InputNumberCellType.cs b/CellTypes/InputNumberCellType.cs index 46d49dbc6e74424e42062e5d98ef9d5075b62423..0354cf1b142f5b08e9e3f99b61843fb3d380ab19 100644 --- a/CellTypes/InputNumberCellType.cs +++ b/CellTypes/InputNumberCellType.cs @@ -42,6 +42,7 @@ namespace ElementUI public override DataValidationLink DataValidationLink { get => base.DataValidationLink; set => base.DataValidationLink = value; } public override List UIPermissions { get => base.UIPermissions; set => base.UIPermissions = value; } public override object DefaultValue { get => base.DefaultValue; set => base.DefaultValue = value; } + public override SupportFeatures SupportFeatures => base.SupportFeatures | SupportFeatures.AllowSetTabOrder; #endregion [SRDisplayName(nameof(Resources.InputNumberCellType_min))] @@ -75,6 +76,9 @@ namespace ElementUI [SRDisplayName(nameof(Resources.InputNumberCellType_IsDisabled))] public override bool IsDisabled { get; set; } + + [SRDisplayName(nameof(Resources.SelectAllOnFocus))] + public bool IsSelectAllOnFocus { get; set; } public override string ToString() { diff --git a/CellTypes/NavMenuCellType.cs b/CellTypes/NavMenuCellType.cs index d25215c49d53601fce4699df489be5f12ff3686e..accaa954e920b70a6efec6ce5a1509abf7238155 100644 --- a/CellTypes/NavMenuCellType.cs +++ b/CellTypes/NavMenuCellType.cs @@ -5,10 +5,12 @@ using GrapeCity.Forguncy.Plugin; using Newtonsoft.Json; using System.Collections.Generic; using System.ComponentModel; +using System.ComponentModel.DataAnnotations; using System.Linq; using System.Windows; using ElementUI.Properties; using ElementUI.WpfControls; +using GrapeCity.Forguncy.Plugin.Attributes; namespace ElementUI { @@ -30,21 +32,41 @@ namespace ElementUI } this.CellType.options = list.OfType().ToList(); this.CellType.backgroundColor = "#ffffff"; + this.CellType.HideBorder = true; + } + } + + public class MenuNodeDesigner : ObjectDesigner + { + public override EditorSetting GetEditorSetting(PropertyDescriptor property, IBuilderContextBase contextBase) + { + if (property.Name == nameof(MenuNode.CanVisitRoleList)) + { + return new RolePermissionEditorSetting(); + } + return base.GetEditorSetting(property, contextBase); } } [Icon("pack://application:,,,/ElementUI;component/Resources/Images/NavMenu.png")] [OrderWeight((int)Utils.OrderWeight.NavMenu)] [Designer("ElementUI.NavMenuCellTypeDesigner, ElementUI")] - public class NavMenuCellType : ElementCellTypeBase + public class NavMenuCellType : ElementCellTypeBase, ISupportUIPermission { [SRDisplayName(nameof(Resources.NavMenuCellType_SelectCommand))] - [SRCustomCommandObject(InitParamProperties = "value|label|parentId", InitParamValues = nameof(Resources.NavMenuCellType_SelectCommand_InitParamValues))] - public object SelectCommand { get; set; } - + [SRCustomCommandObject( + InitParamProperties = "value|label|parentId", + InitParamValues = nameof(Resources.NavMenuCellType_SelectCommand_InitParamValues), + BindingDataSourceWithCustomColumnsPropertyName = nameof(bindingOptions))] + public CustomCommandObject SelectCommand { get; set; } + + public bool HideBorder { get; set; } + [SRDisplayName(nameof(Resources.NavMenuCellType_ClicktCommand))] - [SRCustomCommandObject(InitParamProperties = "value|label|parentId", InitParamValues = nameof(Resources.NavMenuCellType_SelectCommand_InitParamValues))] - public object ClickCommand { get; set; } + [SRCustomCommandObject(InitParamProperties = "value|label|parentId", + InitParamValues = nameof(Resources.NavMenuCellType_SelectCommand_InitParamValues), + BindingDataSourceWithCustomColumnsPropertyName = nameof(bindingOptions))] + public CustomCommandObject ClickCommand { get; set; } [SRDisplayName(nameof(Resources.NavMenuCellType_useBinding))] [BoolProperty] @@ -53,14 +75,23 @@ namespace ElementUI [SRTreeProperty(IndentLevel = 1, NodeType = typeof(MenuNode), DefaultNodeName = nameof(Resources.NavMenuCellType_options_DefaultNodeName))] [SRDisplayName(nameof(Resources.NavMenuCellType_options))] + [DiffTypeNameIgnore] public List options { get; set; } = new List(); - [SRBindingDataSourceProperty(Columns = nameof(Resources.NavMenuCellType_bindingOptions_Columns), IndentLevel = 1, IsIdPidStructure = true)] + [SRBindingDataSourceProperty( + Columns = nameof(Resources.NavMenuCellType_bindingOptions_Columns), + IndentLevel = 1, + IsIdPidStructure = true, + TreeIdColumnName = "value", + TreePidColumnName = "parentValue", + AllowAddCustomColumns = true)] [SRDisplayName(nameof(Resources.NavMenuCellType_bindingOptions))] + [DiffTypeNameIgnore] public object bindingOptions { get; set; } [SRDisplayName(nameof(Resources.NavMenuCellType_mode))] [SRRadioGroupProperty(ValueList = "vertical|horizontal", DisplayList = nameof(Resources.NavMenuCellType_mode_DisplayList))] + [DiffDefaultValueInclude] public string mode { get; set; } = "vertical"; [SRDisplayName(nameof(Resources.NavMenuCellType_collapse))] @@ -135,7 +166,7 @@ namespace ElementUI public string lastCustomActiveTextColor { get; set; } [SRDisplayName(nameof(Resources.NavMenuCellType_backgroundColor))] - [ColorProperty(SupportNoFill=true)] + [ColorProperty(SupportNoFill = true)] public string backgroundColor { get; set; } [SRDisplayName(nameof(Resources.NavMenuCellType_textColor))] @@ -146,6 +177,92 @@ namespace ElementUI [ColorProperty] public string activeTextColor { get; set; } = "Accent 1"; + [Browsable(false)] + [SaveJsonIgnore] + [PageMetadataJsonIgnore] + public List UIPermissions + { + get + { + if (useBinding) + { + return new List(); + } + var permission = new UIPermission() + { + Scope = UIPermissionScope.Visible, + Enabled = true, + Ignore = true, + AllowRoles = new List() { DefaultRoleManager.FGC_Anonymous }, + Children = GetSubUIPermisison(this.options.OfType().ToList()) + }; + + return new List() { permission }; + } + set + { + //When get server ui permissions will set values + var visiblePermission = value?.FirstOrDefault(item => item.Scope == UIPermissionScope.Visible); + if (visiblePermission == null) + { + return; + } + SetSubUIPermission(this.options?.OfType().ToList(), visiblePermission.Children); + } + } + + private void SetSubUIPermission(List menuItems, List uiPermissions) + { + if (menuItems == null || uiPermissions == null) + { + return; + } + + var doMigratingList = new List(uiPermissions); + foreach (var item in menuItems) + { + var permission = doMigratingList.FirstOrDefault(p => p.Name == item.label); + if (permission == null) + { + continue; + } + + // Because the menu has the same name, you need to remove it from the list each time you query the result + doMigratingList.Remove(permission); + //Find menu item with same name + item.CanVisitRoleList.Clear(); + var allowRoles = permission.AllowRoles; + if (allowRoles != null) + { + item.CanVisitRoleList.AddRange(allowRoles.Select(r => r)); + } + + SetSubUIPermission(item.children, permission.Children); + } + } + + private List GetSubUIPermisison(List items) + { + var list = new List(); + foreach (var item in items) + { + var itemPermission = new SubUIPermission() + { + Name = item.label, + AllowRoles = item.CanVisitRoleList.Select(r => r).ToList() + }; + + if (item.children?.Any() == true) + { + itemPermission.Children = GetSubUIPermisison(item.children); + } + list.Add(itemPermission); + } + + return list; + } + + public override bool GetDesignerPropertyVisible(string propertyName) { if (propertyName == nameof(backgroundColor) || @@ -161,7 +278,7 @@ namespace ElementUI if (propertyName == nameof(menuTrigger)) { return mode == "horizontal"; - } + } if (propertyName == nameof(collapseTransition)) { return mode == "vertical"; @@ -175,9 +292,16 @@ namespace ElementUI { return mode == "vertical"; } - if (propertyName == nameof(DefaultExpansion)) { + if (propertyName == nameof(DefaultExpansion)) + { return mode == "vertical" && !uniqueOpened && useBinding; } + + if (propertyName == nameof(HideBorder)) + { + return false; + } + return base.GetDesignerPropertyVisible(propertyName); } @@ -186,6 +310,50 @@ namespace ElementUI return Resources.NavMenu; } + [RunTimeMethod] + [SRDisplayName(nameof(Resources.CascaderCellType_SetDataSourceByObjTree))] + [SRDescription(nameof(Resources.CascaderCellType_SetDataSourceByObjTree_Description))] + public void SetDataSourceByObjTree( + [SRItemDisplayName(nameof(Resources.CascaderCellType_dataSource))] + [Required] + string dataSource, + [SRItemDisplayName(nameof(Resources.CascaderCellType_valueProperty))] + [Required] + string valueProperty = "value", + [SRItemDisplayName(nameof(Resources.CascaderCellType_labelProperty))] + [SRDescription(nameof(Resources.NavMenuCellType_labelProperty_Description))] + string labelProperty = "label", + [SRItemDisplayName(nameof(Resources.CascaderCellType_childrenProperty))] + [Required] + string childrenProperty = "children", + [SRItemDisplayName(nameof(Resources.IconProperty))] + string iconProperty = "icon" + ) + { + + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.CascaderCellType_SetDataSourceByIdPidTable))] + [SRDescription(nameof(Resources.CascaderCellType_SetDataSourceByIdPidTable_Description))] + public void SetDataSourceByIdPidTable( + [SRItemDisplayName(nameof(Resources.CascaderCellType_dataSource))] + [Required] + string dataSource, + [SRItemDisplayName(nameof(Resources.CascaderCellType_valueProperty))] + [Required] + string valueProperty = "value", + [SRItemDisplayName(nameof(Resources.CascaderCellType_labelProperty))] + string labelProperty = "label", + [SRItemDisplayName(nameof(Resources.CascaderCellType_parentValue))] + [Required] + string parentValue = "parentValue", + [SRItemDisplayName(nameof(Resources.IconProperty))] + string iconProperty = "icon") + { + + } + [SRDisplayName(nameof(Resources.NavMenuCellType_GetSelectPath))] [RunTimeMethod] [SRDescription(nameof(Resources.NavMenuCellType_GetSelectPath_Description))] @@ -219,6 +387,15 @@ namespace ElementUI { } + [RunTimeMethod] + [SRDisplayName(nameof(Resources.ShowItems_Display))] + public void ShowItems( + [SRItemDisplayName(nameof(Resources.HideItemsParam_Items))] + [SRDescription(nameof(Resources.HideItemsParam_ItemsDescription))] + object items) + { + } + [RunTimeMethod] [SRDisplayName(nameof(Resources.RunTimeMethod_SetBadge))] public void SetBadge( @@ -249,18 +426,71 @@ namespace ElementUI public object PathArray { get; set; } } } + + + [Designer("ElementUI.MenuNodeDesigner, ElementUI")] public class MenuNode : TreeNodeBase { + public MenuNode() + { + CanVisitRoleList = new List() + { + DefaultRoleManager.FGC_Anonymous + }; + } + + public override string value { get => base.value; set => base.value = value; } + public override string label { get => base.label; set => base.label = value; } + + [SRDisplayName(nameof(Resources.NavMenuCellType_icon))] [IconProperty(SupportUseCellColor = true)] public ImageValue icon { get; set; } - [SRDisplayName(nameof(Resources.NavMenuCellType_notification))] [FormulaProperty] public object notification { get; set; } + private List _canVisitRoleList; + + [PageMetadataJsonIgnore] + [SRDisplayName(nameof(Resources.NavMenuCellType_Permission))] + [JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace)] + [DiffRoleList] + public List CanVisitRoleList + { + get + { + if (_canVisitRoleList == null) + { + _canVisitRoleList = new List(); + } + + return _canVisitRoleList; + } + set + { + if (value == null) + { + _canVisitRoleList = new List() + { + DefaultRoleManager.FGC_Anonymous + }; + } + else + { + _canVisitRoleList = value; + } + } + } + [SRDisplayName(nameof(Resources.NavMenuCellType_expend))] public bool expend { get; set; } } + + public class DefaultRoleManager + { + public static readonly string FGC_Anonymous = "FGC_Anonymous"; + public static readonly string FGC_LoginUser = "FGC_LoginUser"; + } } diff --git a/CellTypes/PaginationCellType.cs b/CellTypes/PaginationCellType.cs index e0f4a7b005f5c30406ee8d02d6f1e2c93fbe4373..c41c0ced870b525bec2281f935cdd5284ab73186 100644 --- a/CellTypes/PaginationCellType.cs +++ b/CellTypes/PaginationCellType.cs @@ -13,7 +13,8 @@ using System.ComponentModel.DataAnnotations; namespace ElementUI.CellTypes { - public class PaginationCellTypeDesigner : CellTypeDesigner, ISupportPropertyInitialize + public class PaginationCellTypeDesigner : CellTypeDesigner, ISupportPropertyInitialize, + ICellTypeChecker { public void InitDefaultPropertyValues(IBuilderContext context) { @@ -25,35 +26,124 @@ namespace ElementUI.CellTypes layoutItem = item }); } + var pageSizes = new List { 10, 20, 30, 40, 50, 100 }; foreach (var pageSize in pageSizes) { this.CellType.pageSizes.Add(new PageSize() { value = pageSize }); } + this.CellType.ListviewName = context.EnumAllListViewInfos(context.PageName).FirstOrDefault()?.ListViewName; + var allCellTypes = context.EnumAllCellTypes(context.PageName); + var firstElementTable = allCellTypes?.FirstOrDefault(cell => + cell.GetType() == typeof(TableCellType) || cell.GetType() == typeof(VirtualizedTableCellType)); + + if (firstElementTable is TableCellType elementTable) + { + this.CellType.ElementTableName = elementTable.ElTableName; + } + + else if (firstElementTable is VirtualizedTableCellType virtualizedTable) + { + this.CellType.ElementTableName = virtualizedTable.TableName; + } } + + public override FrameworkElement GetDrawingControl(ICellInfo cellInfo, IDrawingHelper drawingHelper) { var cellStyle = StyleHelper.CreateStyleViewModel(cellInfo, drawingHelper); var control = new PaginationDrawingControl(cellStyle, this.CellType, drawingHelper); return control; } + + public override EditorSetting GetEditorSetting(PropertyDescriptor property, IBuilderContext builderContext) + { + if (property.Name == nameof(CellType.ElementTableName)) + { + var allElementTableNames = builderContext.EnumAllCellTypes(builderContext.PageName) + ?.Where(cell => + cell.GetType() == typeof(TableCellType) || cell.GetType() == typeof(VirtualizedTableCellType)) + .Select(cell => + { + var name = cell switch + { + TableCellType tableCellType => tableCellType.ElTableName, + VirtualizedTableCellType virtualizedTableCellType => virtualizedTableCellType.TableName, + _ => "" + }; + + return new ComboItem() + { + Name = name, + Value = name + }; + }); + List source = new List(); + source.Add(new ComboItem() { Name = Resources.ElementCellType_None, Value = null }); + if (allElementTableNames != null) + { + source.AddRange(allElementTableNames.Where(x => !string.IsNullOrEmpty(x.Value))); + } + + return new ComboEditorSetting(source, nameof(ComboItem.Name), nameof(ComboItem.Value)); + } + + return base.GetEditorSetting(property, builderContext); + } + + public IEnumerable CheckCellTypeErrors(IBuilderContext context) + { + var result = new List(); + + if (CellType.ElementTableName != null) + { + var virtualizedTableCellType = context.EnumAllCellTypes(context.PageName) + .Where(cell => cell.GetType() == typeof(VirtualizedTableCellType)) + .Select(i => i as VirtualizedTableCellType) + .FirstOrDefault(i => i?.TableName == CellType.ElementTableName); + + if (virtualizedTableCellType != null) + { + if (virtualizedTableCellType.IsTreeTable) + { + result.Add(new ForguncyErrorInfo() + { + ErrorType = ForguncyErrorType.Error, + Message = Resources.PaginationErrorBindingTreeTable + }); + } + } + } + + return result; + } } [Icon("pack://application:,,,/ElementUI;component/Resources/Images/Pagination.png")] [OrderWeight((int)Utils.OrderWeight.Pagination)] [Designer("ElementUI.CellTypes.PaginationCellTypeDesigner, ElementUI")] - public class PaginationCellType : ElementCellTypeBase, ISupportDisable, IPagingCellType + public class PaginationCellType : ElementCellTypeBase, ISupportDisable, IPagingCellType, IReferenceListView { [SRCustomCommandObject(InitParamProperties = "currentPage|pageSize|total", InitParamValues = nameof(Resources.PaginationCellType_PagingChangeCommands_InitParamValues))] [SRDisplayName(nameof(Resources.PaginationCellType_PagingChangeCommands))] public object PagingChangeCommands { get; set; } + [SRDisplayName(nameof(Resources.PaginationCellType_SelectElementTable))] + [BoolProperty] + [DefaultValue(false)] + public bool AttachElementTable { get; set; } + [SRDisplayName(nameof(Resources.PaginationCellType_ListviewName))] [ListviewProperty] public string ListviewName { get; set; } + [DefaultValue(null)] + [SRDisplayName(nameof(Resources.PaginationCellType_ElementTable))] + [SRComboProperty] + public string ElementTableName { get; set; } + [IntProperty(Min = 1)] [SRDisplayName(nameof(Resources.PaginationCellType_pageSize))] [DefaultValue(10)] @@ -110,7 +200,7 @@ namespace ElementUI.CellTypes [SRDisplayName(nameof(Resources.PaginationCellType_hideOnSinglePage))] public bool hideOnSinglePage { get; set; } - + [SRDisplayName(nameof(Resources.PaginationCellType_IsDisabled))] public bool IsDisabled { get; set; } @@ -130,7 +220,7 @@ namespace ElementUI.CellTypes [RunTimeMethod] [SRDisplayName(nameof(Resources.PaginationCellType_SetTotal))] - public void SetTotal([Required][SRItemDisplayName(nameof(Resources.PaginationCellType_Total_Param))]int total) + public void SetTotal([Required][SRItemDisplayName(nameof(Resources.PaginationCellType_Total_Param))] int total) { } @@ -174,8 +264,32 @@ namespace ElementUI.CellTypes { return this.layout.Any(i => i.layoutItem == "next"); } + if (propertyName == nameof(ListviewName)) + { + return !AttachElementTable; + } + if (propertyName == nameof(ElementTableName)) + { + return AttachElementTable; + } return base.GetDesignerPropertyVisible(propertyName); } + + public IEnumerable GetListViewNames() + { + if (!AttachElementTable && !string.IsNullOrEmpty(ListviewName)) + { + yield return ListviewName; + } + } + + public void RenameListviewName(string oldName, string newName) + { + if (!AttachElementTable && oldName == ListviewName) + { + ListviewName = newName; + } + } } public class PageLayout : ObjectPropertyBase diff --git a/CellTypes/ProgressCellType.cs b/CellTypes/ProgressCellType.cs index b0a3634286854bf8b9ce2cf738469ee13ec46388..dadd5486ffe85d7c18062338aa31e6778853eb93 100644 --- a/CellTypes/ProgressCellType.cs +++ b/CellTypes/ProgressCellType.cs @@ -8,6 +8,7 @@ using ElementUI.Properties; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using GrapeCity.Forguncy.Commands; +using GrapeCity.Forguncy.Plugin.Attributes; namespace ElementUI { @@ -59,6 +60,7 @@ namespace ElementUI public CommandExcuteKind CommandExcuteKind => CommandExcuteKind.OnValueChanged; [SRDisplayName(nameof(Resources.ProgressCellType_type))] + [DiffDefaultValueInclude] public ProgressType type { get; set; } = ProgressType.line; [SRDisplayName(nameof(Resources.ProgressCellType_strokeWidth))] @@ -66,6 +68,7 @@ namespace ElementUI public double strokeWidth { get; set; } = 6; [SRDisplayName(nameof(Resources.ProgressCellType_status))] + [DiffDefaultValueInclude] public ProgressStatus status { get; set; } = ProgressStatus.none; [SRDisplayName(nameof(Resources.ProgressCellType_color))] diff --git a/CellTypes/RateCellType.cs b/CellTypes/RateCellType.cs index 9bc1ec301b76c4860235e107150967c1bd317242..290c294a26d04c33bd6c9d22647c0176f652de04 100644 --- a/CellTypes/RateCellType.cs +++ b/CellTypes/RateCellType.cs @@ -7,6 +7,7 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Windows; using ElementUI.Properties; +using GrapeCity.Forguncy.Plugin.Attributes; namespace ElementUI { @@ -64,6 +65,7 @@ namespace ElementUI public int highThreshold { get; set; } = 4; [SRDisplayName(nameof(Resources.RateCellType_DisplayContentType))] + [DiffDefaultValueInclude] public DisplayContentType DisplayContentType { get; set; } = DisplayContentType.None; [SRDisplayName(nameof(Resources.RateCellType_texts))] diff --git a/CellTypes/SelectCellType.cs b/CellTypes/SelectCellType.cs index 384eca00e4240bc18df3d2ee628d6470f7bd3fc7..95e2ba3698b43166ea90b55cb9f2970a695d0c7a 100644 --- a/CellTypes/SelectCellType.cs +++ b/CellTypes/SelectCellType.cs @@ -12,6 +12,7 @@ using System.Threading.Tasks; using System.Windows; using ElementUI.Properties; using System.ComponentModel.DataAnnotations; +using GrapeCity.Forguncy.Plugin.Attributes; namespace ElementUI { @@ -53,6 +54,7 @@ namespace ElementUI public override List UIPermissions { get => base.UIPermissions; set => base.UIPermissions = value; } public override object DefaultValue { get => base.DefaultValue; set => base.DefaultValue = value; } public override bool NeedFormatDefaultValue => false; + public override SupportFeatures SupportFeatures => base.SupportFeatures | SupportFeatures.AllowSetFormat | SupportFeatures.AllowSetTabOrder; #endregion [SRDisplayName(nameof(Resources.SelectCellType_useBinding))] @@ -66,6 +68,7 @@ namespace ElementUI [SRBindingDataSourceProperty(Columns = nameof(Resources.SelectCellType_bindingOptions_Columns), IndentLevel = 1)] [SRDisplayName(nameof(Resources.SelectCellType_bindingOptions))] + [DiffTypeNameIgnore] public object bindingOptions { get; set; } [SRDisplayName(nameof(Resources.Select_AllowAddEmptyItem))] @@ -164,7 +167,8 @@ namespace ElementUI { return useBinding && AllowAddEmptyItem; } - if (propertyName == nameof(noDataText)) { + if (propertyName == nameof(noDataText)) + { return !AllowAddEmptyItem || !useBinding; } return base.GetDesignerPropertyVisible(propertyName); diff --git a/CellTypes/StepsCellType.cs b/CellTypes/StepsCellType.cs index 059f3d3b1cc41d0563d591d025e4f4d1e0d55e89..0e69c3578241765d514351182474212adf7ce643 100644 --- a/CellTypes/StepsCellType.cs +++ b/CellTypes/StepsCellType.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Windows; using ElementUI.Properties; +using GrapeCity.Forguncy.Plugin.Attributes; namespace ElementUI { @@ -64,18 +65,21 @@ namespace ElementUI [SRBindingDataSourceProperty(Columns = nameof(Resources.StepsCellType_bindingOptions_Columns), IndentLevel = 1)] [SRDisplayName(nameof(Resources.StepsCellType_bindingOptions))] + [DiffTypeNameIgnore] public object bindingOptions { get; set; } [SRDisplayName(nameof(Resources.StepsCellType_processStatus))] [DefaultValue(Status.process)] + [DiffDefaultValueInclude] public Status processStatus { get; set; } = Status.process; [SRDisplayName(nameof(Resources.StepsCellType_finishStatus))] [DefaultValue(Status.finish)] + [DiffDefaultValueInclude] public Status finishStatus { get; set; } = Status.finish; [SRDisplayName(nameof(Resources.layout))] - [SRRadioGroupProperty( ValueList ="horizontal|vertical", DisplayList = nameof(Resources.layout_DisplayList))] + [SRRadioGroupProperty(ValueList = "horizontal|vertical", DisplayList = nameof(Resources.layout_DisplayList))] public string layout { get; set; } = "horizontal"; [SRDisplayName(nameof(Resources.StepsCellType_simple))] @@ -97,7 +101,8 @@ namespace ElementUI public override bool GetDesignerPropertyVisible(string propertyName) { - if (propertyName == nameof(options)) { + if (propertyName == nameof(options)) + { return !useBinding; } if (propertyName == nameof(bindingOptions)) diff --git a/CellTypes/TabHeader.cs b/CellTypes/TabHeader.cs index e6468d8bf2d8dc5c1b820359fbba0aa2f8837f92..e41bcc20583b9f1e33855e33095570ead9399875 100644 --- a/CellTypes/TabHeader.cs +++ b/CellTypes/TabHeader.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using System.Windows; using ElementUI.Properties; using System.ComponentModel.DataAnnotations; +using GrapeCity.Forguncy.Plugin.Attributes; namespace ElementUI { @@ -59,6 +60,7 @@ namespace ElementUI [SRBindingDataSourceProperty(Columns = nameof(Resources.TabHeader_bindingOptions_Columns), IndentLevel = 1)] [SRDisplayName(nameof(Resources.SelectCellType_bindingOptions))] + [DiffTypeNameIgnore] public object bindingOptions { get; set; } [SRDisplayName(nameof(Resources.TabHeader_type))] @@ -84,6 +86,15 @@ namespace ElementUI { } + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TabHeader_ShowItems_Display))] + public void ShowItems( + [SRItemDisplayName(nameof(Resources.TabHeader_HideItemsParam_Items))] + [SRDescription(nameof(Resources.TabHeader_HideItemsParam_ItemsDescription))] + object items) + { + } + public override bool GetDesignerPropertyVisible(string propertyName) { if (propertyName == nameof(stretch)) diff --git a/CellTypes/TableCellType.cs b/CellTypes/TableCellType.cs new file mode 100644 index 0000000000000000000000000000000000000000..360bad782c259e7e0abc67ce4f9fb034d75b0d25 --- /dev/null +++ b/CellTypes/TableCellType.cs @@ -0,0 +1,628 @@ +using GrapeCity.Forguncy.CellTypes; +using GrapeCity.Forguncy.Commands; +using GrapeCity.Forguncy.Plugin; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Windows.Input; +using ElementUI.Properties; +using System.Windows; +using ElementUI.WpfControls; +using GrapeCity.Forguncy.Plugin.Attributes; + +namespace ElementUI +{ + public class TableCellTypeDesigner : CellTypeDesigner, ISupportPropertyInitialize, ICellTypeChecker, IPostGenerate + { + public void InitDefaultPropertyValues(IBuilderContext context) + { + this.CellType.actionButtons.Add(new ActionButton() + { + Name = Resources.TableCellType_Edit, + type = "button", + shape = "default", + iconWidth = 18, + iconHeight = 18 + }); + this.CellType.actionButtons.Add(new ActionButton() + { + Name = Resources.TableCellType_Delete, + styleType = "Accent 5", + type = "button", + shape = "default", + iconWidth = 18, + iconHeight = 18 + }); + CellType.sumText = Resources.TableCellType_Summary; + CellType.emptyText = Resources.TableCellType_NoData; + CellType.operationColumnWidth = 200; + + CellType.ElTableName = GetUniqueDefaultTableName(context); + } + + private string GetUniqueDefaultTableName(IBuilderContext context) + { + var allElTableCellTypes = context.EnumAllCellTypes(context.PageName).Where(x => x is TableCellType && x != CellType); + var allElTableNames = allElTableCellTypes.Where(x => !string.IsNullOrEmpty((x as TableCellType).ElTableName)).Select(x => (x as TableCellType).ElTableName); + int order = 1; + while (true) + { + string name = string.Format(Resources.TableCellType_DefaultTableName, order); + if (allElTableNames.Contains(name)) + { + order++; + } + else + { + return name; + } + } + + } + + public override FrameworkElement GetDrawingControl(ICellInfo cellInfo, IDrawingHelper drawingHelper) + { + var cellStyle = StyleHelper.CreateStyleViewModel(cellInfo, drawingHelper); + var control = new TableDrawingControl(cellStyle, CellType, drawingHelper); + return control; + } + + public IEnumerable CheckCellTypeErrors(IBuilderContext context) + { + if (string.IsNullOrEmpty(CellType.ElTableName)) + { + yield break; + } + var allElTableCellTypes = context.EnumAllCellTypes(context.PageName).Where(x => x is TableCellType && x != CellType); + var allElTableNames = allElTableCellTypes.Where(x => !string.IsNullOrEmpty((x as TableCellType).ElTableName)).Select(x => (x as TableCellType).ElTableName); + if (allElTableNames.Contains(CellType.ElTableName)) + { + yield return new ForguncyErrorInfo() + { + Message = String.Format(Resources.TableCellType_TableNameDuplicateError, CellType.ElTableName), + ErrorType = ForguncyErrorType.Error + }; + } + } + + public override EditorSetting GetEditorSetting(PropertyDescriptor property, IBuilderContext builderContext) + { + if (property.Name == nameof(CellType.RowClickCommand) || + property.Name == nameof(CellType.RowDoubleClickCommand) || + property.Name == nameof(CellType.CurrentRowChangedCommand)) + { + var initParams = new Dictionary(); + var pointer = Resources.TableCellType_RowData + "."; + initParams.Add("dataRow", Resources.TableCellType_RowData); + if (CellType.bindingOptions != null) + { + var columnNames = CellType.autoGenerateColumnsByDataSource + ? CellType.bindingOptions.Columns.Select(x => x.ColumnName) + : CellType.columns.Select(x => x.Name); + int index = 0; + foreach (var columnName in columnNames) + { + initParams.Add(columnName + index, pointer + columnName); + index++; + } + } + return new HyperlinkEditorSetting(builderContext.CreateCustomCommand(initParams)); + } + return base.GetEditorSetting(property, builderContext); + } + + public void PostGenerate(IBuilderContextBase builderContext) + { + if (!CellType.autoGenerateColumnsByDataSource) + { + return; + } + + var columnSettings = new List(); + if (CellType.bindingOptions?.TableName != null) + { + var tables = new Dictionary(); + + foreach (var item in builderContext.EnumAllTableInfos()) + { + tables[item.TableName] = item; + } + foreach (var item in CellType.bindingOptions.Columns) + { + var columnSetting = new ColumnSetting(); + columnSetting.label = item.ColumnName; + columnSetting.dataColumnName = item.ColumnName; + if (item.BindingInfo != null && tables.TryGetValue(item.BindingInfo.GetLastTableName(), out var tableInfo)) + { + var column = tableInfo.Columns.FirstOrDefault(i => i.ColumnName == item.BindingInfo.GetLastColumnName()); + if (column != null) + { + columnSetting.formatStr = CellType.GetDefaultFormat(column.ColumnType); + } + else if (item.BindingInfo.ColumnName == "FGC_CreateDate" && + item.BindingInfo.GetExtendColumnName() == null) + { + columnSetting.formatStr = + VirtualizedTableCellType.GetDefaultFormat(ForguncyTableColumnType.DateTime); + } + } + columnSettings.Add(columnSetting); + } + } + CellType.bindingColumns = columnSettings; + } + } + + [Icon("pack://application:,,,/ElementUI;component/Resources/Images/Table.png")] + [OrderWeight((int)Utils.OrderWeight.Table)] + [Designer("ElementUI.TableCellTypeDesigner, ElementUI")] + public class TableCellType : ElementCellTypeBase + { + [SRDisplayName(nameof(Resources.TableCellType_TableName))] + [DefaultValue(null)] + public string ElTableName { get; set; } + + [SRDisplayName(nameof(Resources.TableCellType_RowClickCommand))] + [CustomCommandObject] + public object RowClickCommand { get; set; } + + [SRDisplayName(nameof(Resources.TableCellType_RowDoubleClickCommand))] + [CustomCommandObject] + public object RowDoubleClickCommand { get; set; } + + [SRDisplayName(nameof(Resources.TableCellType_CurrentRowChangedCommand))] + [CustomCommandObject] + public object CurrentRowChangedCommand { get; set; } + + [SRDisplayName(nameof(Resources.TableCellType_SelectionChangedCommand))] + [SRCustomCommandObject(InitParamProperties = "selection", InitParamValues = nameof(Resources.TableCellType_Selection))] + public object SelectionChangedCommand { get; set; } + + [BindingDataSourceProperty] + [SRDisplayName(nameof(Resources.TableCellType_DataSource))] + [DiffTypeNameIgnore] + public IBindingDataSource bindingOptions { get; set; } + + bool _autoGenerateColumnsByDataSource = true; + [DefaultValue(true)] + [SRDisplayName(nameof(Resources.TableCellType_AutoGenerateColumnByDataSource))] + public bool autoGenerateColumnsByDataSource + { + get + { + return _autoGenerateColumnsByDataSource; + } + set + { + if (_autoGenerateColumnsByDataSource != value) + { + _autoGenerateColumnsByDataSource = value; + if (!value) + { + if (bindingOptions == null) + { + columns = new List(); + } + else + { + var bindableFields = new List(); + bindableFields.AddRange(bindingOptions.Columns.Select(x => x.ColumnName)); + columns = bindingOptions.Columns.Select(i => + new ColumnSetting() + { + dataColumnName = i.ColumnName, + label = i.ColumnName, + }).OfType().ToList(); + } + } + } + } + } + + [JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace)] + [SRDisplayName(nameof(Resources.TableCellType_GenerateColumnManually))] + [SRObjectListProperty(DefaultName = nameof(Resources.TableCellType_TableColumn), ItemType = typeof(ColumnSetting), IndentLevel = 1)] + [DiffTypeNameIgnore] + public List columns { get; set; } = new List(); + + [Browsable(false)] + [SaveJsonIgnore] + public IEnumerable bindingColumns { get; set; } + + internal string GetDefaultFormat(ForguncyTableColumnType columnType) + { + switch (columnType) + { + case ForguncyTableColumnType.Time: + return "HH:mm"; + case ForguncyTableColumnType.DateTime: + return Resources.TableCellType_DateTimeFormat; + default: + return null; + } + } + + [SRDisplayName(nameof(Resources.TableCellType_ShowActionButtons))] + [BoolProperty] + [DefaultValue(false)] + public bool showActionButtons { get; set; } = false; + + [SRObjectListProperty(DefaultName = nameof(Resources.TableCellType_Button), ItemType = typeof(ActionButton), IndentLevel = 1)] + [SRDisplayName(nameof(Resources.TableCellType_ConfigActionButtons))] + [DiffTypeNameIgnore] + public List actionButtons { get; set; } = new List(); + + [IntProperty(Min = 0, AllowNull = true)] + [DefaultValue(200)] + [SRDisplayName(nameof(Resources.TableCellType_OperationColumnWidth))] + public int? operationColumnWidth { get; set; } = 200; + + [SRDisplayName(nameof(Resources.TableCellType_ShowSummary))] + [BoolProperty] + [DefaultValue(false)] + public bool showSummary { get; set; } = false; + + [SRDisplayName(nameof(Resources.TableCellType_SummaryText))] + [DefaultValue(null)] + public string sumText { get; set; } + + [SRDisplayName(nameof(Resources.TableCellType_tableSize))] + [SRComboProperty(ValueList = "large|default|small", DisplayList = nameof(Resources.TableCellType_tableSizeDisplayList))] + public string size { get; set; } = "default"; + + [Browsable(false)] + [DefaultValue(null)] + [DiffJsonIgnore] + public string emptyText { get; set; } + + [SRCategoryHeader(nameof(Resources.Category_Options))] + [SRDisplayName(nameof(Resources.TableCellType_ShowHeader))] + [DefaultValue(true)] + public bool showHeader { get; set; } = true; + + [SRDisplayName(nameof(Resources.TableCellType_ShowIndexColumn))] + [DefaultValue(false)] + public bool showIndexColumn { get; set; } = false; + + [SRDisplayName(nameof(Resources.TableCellType_ShowSelectColumn))] + [DefaultValue(false)] + public bool showSelectColumn { get; set; } = false; + + [SRDisplayName(nameof(Resources.TableCellType_ColumnAutoSize))] + [DefaultValue(true)] + public bool fit { get; set; } = true; + + [SRDisplayName(nameof(Resources.TableCellType_Border))] + [DefaultValue(true)] + public bool border { get; set; } = true; + + [SRDisplayName(nameof(Resources.TableCellType_Stripe))] + [DefaultValue(true)] + public bool stripe { get; set; } = true; + + [SRDisplayName(nameof(Resources.TableCellType_HighlightCurrentRow))] + [DefaultValue(false)] + public bool highlightCurrentRow { get; set; } = false; + + [Browsable(false)] + [SaveJsonIgnore] + public string operationColumnName { get; set; } = Resources.TableCellType_Operations; + public override bool GetDesignerPropertyVisible(string propertyName) + { + if (propertyName == nameof(actionButtons) || propertyName == nameof(operationColumnWidth)) + { + return showActionButtons; + } + if (propertyName == nameof(columns)) + { + return !autoGenerateColumnsByDataSource; + } + if (propertyName == nameof(sumText)) + { + return showSummary; + } + return base.GetDesignerPropertyVisible(propertyName); + } + + public override bool GetRunTimeMethodVisible(string name) + { + if (name == nameof(ClearSelection) || name == nameof(GetSelectedRow)) + { + return showSelectColumn; + } + if (name == nameof(SetJsonDataSource)) + { + return bindingOptions == null; + } + return base.GetRunTimeMethodVisible(name); + } + + public override string ToString() + { + return Resources.TableCellType_DisplayName; + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TableCellType_SetJsonDataSource))] + [SRDescription(nameof(Resources.TableCellType_SetJsonDataSource_Description))] + public void SetJsonDataSource( + [SRItemDisplayName(nameof(Resources.CascaderCellType_dataSource))] [Required] + string dataSource) + { + // + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TableCellType_ConfigColumnProperties))] + public void SetTableColumnSetting( + [FormulaProperty] + [SRItemDisplayName(nameof(Resources.TableCellType_ColumnNameFromDataSource))] + string dataColumnName, + [SRItemDisplayName(nameof(Resources.TableCellType_ConfigColumnProperties))] + [ObjectProperty(ObjType = typeof(ColumnSettingBase))] + ColumnSettingBase columnSetting = null) + { + // + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TableCellType_ClearSelection))] + public void ClearSelection() + { + // + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TableCellType_SetCurrentRow))] + public void SetCurrentRow([SRItemDisplayName(nameof(Resources.TableCellType_RowIndex))] int rowIndex) + { + // + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TableCellType_GetSelectedRow))] + public GetSelectedRowResult GetSelectedRow() + { + return null; + } + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TableCellType_ResetTable))] + public void ResetTable( + [BoolProperty][SRItemDisplayName(nameof(Resources.TableCellType_ClearSort))] bool clearSort = true, + [BoolProperty][SRItemDisplayName(nameof(Resources.TableCellType_ClearFilter))] bool clearFilter = true + ) + { + // + } + } + + public class GetSelectedRowResult + { + [SRDisplayName(nameof(Resources.TableCellType_SelectedRow))] + public string SelectedRow { get; set; } + } + + public class ColumnSettingDesigner : ObjectDesigner + { + public override EditorSetting GetEditorSetting(PropertyDescriptor property, IBuilderContextBase contextBase) + { + if (property.Name == nameof(ColumnSetting.dataColumnName)) + { + List source = new List(); + + if (contextBase is IBuilderContext context) + { + if (context.Cell?.CellType is TableCellType table && + table.bindingOptions != null && + table.bindingOptions.Columns != null) + { + source.AddRange(table.bindingOptions.Columns.Select(i => i.ColumnName)); + } + } + return new ComboEditorSetting(source) { IsReadOnly = false }; + } + return base.GetEditorSetting(property, contextBase); + } + } + + [Designer("ElementUI.ColumnSettingDesigner, ElementUI")] + sealed public class ColumnSetting : ColumnSettingBase, INamedObject, ICloneable + { + [OrderWeight(1)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnNameFromDataSource))] + public string dataColumnName { get; set; } + + [OrderWeight(7)] + [SRDisplayName(nameof(Resources.TableCellType_Sortable))] + [DefaultValue(false)] + public bool sortable { get; set; } = false; + + string INamedObject.Name + { + get + { + return label; + } + set + { + label = value; + } + } + + public override object Clone() + { + return new ColumnSetting() + { + label = label, + resizable = resizable, + key = key, + align = align, + headerAlign = headerAlign, + minWidth = minWidth, + formatStr = formatStr, + showOverflowTooltip = showOverflowTooltip, + dataColumnName = dataColumnName, + width = width, + sortable = sortable, + filter = filter, + multipleFilter = multipleFilter + }; + } + } + + public class ColumnSettingBase : ObjectPropertyBase + { + public ColumnSettingBase() + { + key = Guid.NewGuid().ToString(); + } + + [OrderWeight(0)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnName))] + public string label { get; set; } + + [OrderWeight(2)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnFormatString))] + [SRComboProperty(ValueList = nameof(Resources.TableCellType_ColumnFormatStringValueList), IsSelectOnly = false)] + public string formatStr { get; set; } + + [OrderWeight(3)] + [DefaultValue(null)] + [IntProperty(Min = 1, AllowNull = true)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnWidth))] + public int? width { get; set; } + + [OrderWeight(4)] + [DefaultValue(null)] + [IntProperty(Min = 1, AllowNull = true)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnMinWidth))] + public int? minWidth { get; set; } + + [OrderWeight(5)] + [SRComboProperty(ValueList = "left|center|right", DisplayList = nameof(Resources.TableCellType_ColumnAlignDisplayList))] + [SRDisplayName(nameof(Resources.TableCellType_ColumnAlign))] + public string align { get; set; } = "left"; + + [OrderWeight(6)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnHeaderAlign))] + [SRComboProperty(ValueList = "left|center|right", DisplayList = nameof(Resources.TableCellType_ColumnAlignDisplayList))] + public string headerAlign { get; set; } = "center"; + + [OrderWeight(8)] + [SRDisplayName(nameof(Resources.TableCellType_Filter))] + [SRDescription(nameof(Resources.TableCellType_FilterDescription))] + [DefaultValue(false)] + public bool filter { get; set; } = false; + + [OrderWeight(9)] + [SRDisplayName(nameof(Resources.TableCellType_MultipleFilter))] + [DefaultValue(false)] + public bool multipleFilter { get; set; } = false; + + [OrderWeight(10)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnResizable))] + [DefaultValue(true)] + public bool resizable { get; set; } = true; + + [OrderWeight(11)] + [SRDisplayName(nameof(Resources.TableCellType_ShowColumnOverflowTooltip))] + [DefaultValue(false)] + public bool showOverflowTooltip { get; set; } = false; + + [Browsable(false)] + [DiffJsonIgnore] + public string key { get; set; } + + public override bool GetDesignerPropertyVisible(string propertyName) + { + if (propertyName == nameof(multipleFilter)) + { + return filter; + } + return base.GetDesignerPropertyVisible(propertyName); + } + } + + public enum TableMode + { + [SRDescription(nameof(Resources.TableCellType_HorizontalMode))] + horizontal, + [SRDescription(nameof(Resources.TableCellType_VerticalMode))] + vertical + } + + public class ActionButton : ObjectPropertyBase, INamedObject + { + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonType))] + [SRComboProperty(ValueList = "button|link|icon", DisplayList = nameof(Resources.TableCellType_ActionButtonTypeDisplayList))] + public string type { get; set; } = "button"; + + [Required] + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonText))] + public string Name { get; set; } + + private object _icon; + [IconProperty] + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonIcon))] + public object icon + { + get + { + return _icon; + } + set + { + if (value is ImageValue || value is null) + { + _icon = value; + } + } + } + + [IntProperty(Min = 1)] + [DefaultValue(18)] + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonIconWidth))] + public int iconWidth { get; set; } = 18; + + [IntProperty(Min = 1)] + [DefaultValue(18)] + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonIconHeight))] + public int iconHeight { get; set; } = 18; + + [ColorProperty(SupportNoFill = true)] + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonStyle))] + public string styleType { get; set; } + + [SRComboProperty(ValueList = "default|round|circle", DisplayList = nameof(Resources.TableCellType_ActionButtonShapeDisplayList))] + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonShape))] + public string shape { get; set; } = "default"; + + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonCommand))] + [SRCustomCommandObject(InitParamProperties = "dataRow", InitParamValues = nameof(Resources.TableCellType_RowData))] + public object Commands { get; set; } + + public override bool GetDesignerPropertyVisible(string propertyName) + { + if (propertyName == nameof(icon)) + { + return type != "link"; + } + if (propertyName == nameof(styleType)) + { + return type != "icon"; + } + if (propertyName == nameof(shape)) + { + return type == "button"; + } + if (propertyName == nameof(iconWidth) || propertyName == nameof(iconHeight)) + { + return type == "icon"; + } + return base.GetDesignerPropertyVisible(propertyName); + } + } +} diff --git a/CellTypes/Tag.cs b/CellTypes/Tag.cs index 15c3e6ad64f4ef2fedab801dc6b4f7b8d01a4443..7bb33d73983b0a00fd3a9fb8838ae05c249086db 100644 --- a/CellTypes/Tag.cs +++ b/CellTypes/Tag.cs @@ -2,12 +2,8 @@ using GrapeCity.Forguncy.CellTypes; using GrapeCity.Forguncy.Commands; using GrapeCity.Forguncy.Plugin; -using System; using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows; using ElementUI.Properties; @@ -113,7 +109,6 @@ namespace ElementUI public bool distinct { get; set; } = true; [SRDisplayName(nameof(Resources.Tag_disableTransitions))] - [Browsable(false)] public bool disableTransitions { get; set; } [SRDisplayName(nameof(Resources.Tag_hit))] @@ -140,6 +135,16 @@ namespace ElementUI return Resources.Tag; } + public override ForguncyDisabledSettings GetDisabledPropertySettings(ForguncyPageKind pageType) + { + return ForguncyDisabledSettings.Bold | + ForguncyDisabledSettings.Underline | + ForguncyDisabledSettings.Italic | + ForguncyDisabledSettings.TopAlignment | + ForguncyDisabledSettings.MiddleAlignment | + ForguncyDisabledSettings.BottomAlignment; + } + public override bool NeedFormatDefaultValue => false; } @@ -156,5 +161,13 @@ namespace ElementUI [DefaultValue(20d)] [DoubleProperty(Min = 0)] public double space { get; set; } = 20; + + [SRDisplayName(nameof(Resources.Tag_InputMaxLength))] + [FormulaProperty] + public object InputMaxLength { get; set; } + + [SRDisplayName(nameof(Resources.Tag_InputPlaceholder))] + [FormulaProperty] + public object InputPlaceHolder { get; set; } } } diff --git a/CellTypes/TimePickerCellType.cs b/CellTypes/TimePickerCellType.cs index f36e084830e4685360636be54ed585bc2f562781..2f05b4561c4738713ad3d9daf806eafe85812add 100644 --- a/CellTypes/TimePickerCellType.cs +++ b/CellTypes/TimePickerCellType.cs @@ -55,6 +55,7 @@ namespace ElementUI public override DataValidationLink DataValidationLink { get => base.DataValidationLink; set => base.DataValidationLink = value; } public override List UIPermissions { get => base.UIPermissions; set => base.UIPermissions = value; } public override object DefaultValue { get => base.DefaultValue; set => base.DefaultValue = value; } + public override SupportFeatures SupportFeatures => base.SupportFeatures | SupportFeatures.AllowSetTabOrder; #endregion [SRDisplayName(nameof(Resources.TimePickerCellType_StartTime))] diff --git a/CellTypes/TimelineCellType.cs b/CellTypes/TimelineCellType.cs index 137be172aa5ab71452fca901febe2fb0bd3e7511..c45502cec44e3226d51c81b1a102ef32c6453b18 100644 --- a/CellTypes/TimelineCellType.cs +++ b/CellTypes/TimelineCellType.cs @@ -7,6 +7,7 @@ using System.ComponentModel; using System.Windows; using ElementUI.Properties; using System.ComponentModel.DataAnnotations; +using GrapeCity.Forguncy.Plugin.Attributes; namespace ElementUI { @@ -64,8 +65,9 @@ namespace ElementUI [ListProperty(IndentLevel = 1)] public List options { get; set; } = new List(); - [SRBindingDataSourceProperty(Columns = nameof(Resources.Timeline_bindingOptions_Columns), ColumnsDescription= nameof(Resources.Timeline_bindingOptions_Columns_Description), IndentLevel = 1)] + [SRBindingDataSourceProperty(Columns = nameof(Resources.Timeline_bindingOptions_Columns), ColumnsDescription = nameof(Resources.Timeline_bindingOptions_Columns_Description), IndentLevel = 1)] [SRDisplayName(nameof(Resources.TimelineCellType_bindingOptions))] + [DiffTypeNameIgnore] public object bindingOptions { get; set; } [SRDisplayName(nameof(Resources.TimelineCellType_Sort))] @@ -82,6 +84,7 @@ namespace ElementUI [SRDisplayName(nameof(Resources.TimelineCellType_placement))] [DefaultValue(Placement.bottom)] + [DiffDefaultValueInclude] public Placement placement { get; set; } = Placement.bottom; [SRDisplayName(nameof(Resources.TimelineCellType_format))] diff --git a/CellTypes/TransferCellTyle.cs b/CellTypes/TransferCellTyle.cs index 556d6ffe3f9175fca283483c957a7337856fa4cc..1915b4f9c43b3bb9ede3bfcf96063d5a2a1200fe 100644 --- a/CellTypes/TransferCellTyle.cs +++ b/CellTypes/TransferCellTyle.cs @@ -7,6 +7,7 @@ using System.ComponentModel; using System.Windows; using ElementUI.Properties; using System.Linq; +using GrapeCity.Forguncy.Plugin.Attributes; namespace ElementUI { @@ -65,6 +66,7 @@ namespace ElementUI [SRBindingDataSourceProperty(Columns = nameof(Resources.TransferCellType_bindingOptions_Columns), IndentLevel = 1)] [SRDisplayName(nameof(Resources.TransferCellTyle_bindingOptions))] + [DiffTypeNameIgnore] public object bindingOptions { get; set; } [SRDisplayName(nameof(Resources.TransferCellTyle_leftTitle))] @@ -74,6 +76,7 @@ namespace ElementUI public string rightTitle { get; set; } [SRDisplayName(nameof(Resources.TransferCellTyle_targetOrder))] + [DiffDefaultValueInclude] public TargetOrder targetOrder { get; set; } = TargetOrder.original; [SRDisplayName(nameof(Resources.TransferCellTyle_filterable))] @@ -126,7 +129,8 @@ namespace ElementUI public override string ToString() { return Resources.Transfer; - } + } + public override SupportFeatures SupportFeatures => base.SupportFeatures | SupportFeatures.AllowSetFormat; } public enum TargetOrder diff --git a/CellTypes/TreeCellType.cs b/CellTypes/TreeCellType.cs new file mode 100644 index 0000000000000000000000000000000000000000..acfa86e26a1890fc79f0406bced927c883832997 --- /dev/null +++ b/CellTypes/TreeCellType.cs @@ -0,0 +1,596 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Media; +using ElementUI.Properties; +using GrapeCity.Forguncy.CellTypes; +using GrapeCity.Forguncy.Plugin; +using GrapeCity.Forguncy.Plugin.Attributes; +using Newtonsoft.Json; +using static System.Double; + +namespace ElementUI; + +public class TreeCellTypeDesigner : CellTypeDesigner, ISupportPropertyInitialize +{ + private readonly Brush _styleColor = new SolidColorBrush(Color.FromRgb(96, 98, 102)); + + public void InitDefaultPropertyValues(IBuilderContext context) + { + var initDataList = JsonConvert.DeserializeObject>(Resources.TreeCellType_DefaultDataSource); + CellType.ConfigTreeNodeOptions = initDataList?.OfType()?.ToList() ?? new List(0); + } + + public override FrameworkElement GetDrawingControl(ICellInfo cellInfo, IDrawingHelper drawingHelper) + { + var items = CellType.ConfigTreeNodeOptions; + var treeView = new TreeView() + { + IsHitTestVisible = false, + }; + ScrollViewer.SetHorizontalScrollBarVisibility(treeView, ScrollBarVisibility.Disabled); + ScrollViewer.SetVerticalScrollBarVisibility(treeView, ScrollBarVisibility.Disabled); + + var itemControls = new List(); + GenerateTreeViewItemControlsRecursively(items, drawingHelper, cellInfo, new HashSet(), itemControls); + itemControls.ForEach(p => treeView.Items.Add(p)); + + treeView.Background = !string.IsNullOrWhiteSpace(cellInfo.BackgroundStr) + ? drawingHelper.GetBrush(cellInfo.BackgroundStr) + : Brushes.Transparent; + + return treeView; + } + + private void GenerateTreeViewItemControlsRecursively( + List items, + IDrawingHelper drawingHelper, + ICellInfo cellInfo, + HashSet parentSet, + List result) + { + if (items == null || !items.Any()) + { + return; + } + + foreach (var item in items) + { + if (item is not TreeCellTypeNode treeNode) + { + continue; + } + if (treeNode.value == null || string.IsNullOrWhiteSpace(treeNode.value) || parentSet.Contains(item)) + { + continue; + } + + var textBlock = new TextBlock + { + Text = treeNode.label, + FontSize = 14, + Foreground = _styleColor, + }; + var treeViewItem = new ElTreeViewItem() + { + Header = textBlock, + IsExpanded = CellType.IsExpandAllNodes, + }; + + FrameworkElement arrowIcon = null; + FrameworkElement icon = null; + + if (treeNode.children != null && treeNode.children.Any()) + { + // 展开箭头 + arrowIcon = GenerateIconControl(drawingHelper, new ImageValue() + { + Name = CellType.IsExpandAllNodes ? "ExpandCollapse/475_expand_3.svg" : "ExpandCollapse/476_collapse_3.svg", + BuiltIn = true, + UseCellTypeForeColor = true, + Color = "Background 1 -25" + }, cellInfo); + } + + if (treeNode.Icon != null) + { + // 节点图标 + icon = GenerateIconControl(drawingHelper, treeNode.Icon, cellInfo); + } + + BuildElTreeViewItem(treeViewItem, textBlock, arrowIcon, icon); + + if (treeNode.children != null && treeNode.children.Any()) + { + var newParent = new HashSet(parentSet) { item }; + var childResult = new List(); + GenerateTreeViewItemControlsRecursively( + treeNode.children.OfType().ToList(), + drawingHelper, + cellInfo, + newParent, + childResult); + childResult.ForEach(p => treeViewItem.Items.Add(p)); + } + + result.Add(treeViewItem); + } + } + + private void BuildElTreeViewItem( + ElTreeViewItem treeViewItem, + TextBlock textBlock, + FrameworkElement arrowIcon, + FrameworkElement icon) + { + textBlock.Measure(new Size(PositiveInfinity, PositiveInfinity)); + textBlock.Arrange(new Rect(textBlock.DesiredSize)); + + var gridPanel = new Grid + { + HorizontalAlignment = HorizontalAlignment.Center, + VerticalAlignment = VerticalAlignment.Center, + }; + + var row1 = new RowDefinition(); + + var gridLengthConverter = new GridLengthConverter(); + row1.Height = (GridLength)gridLengthConverter.ConvertFrom(textBlock.ActualHeight * 1.5)!; + gridPanel.RowDefinitions.Add(row1); + + var column1 = new ColumnDefinition(); + var column2 = new ColumnDefinition(); + var column3 = new ColumnDefinition(); + + gridPanel.ColumnDefinitions.Add(column1); + gridPanel.ColumnDefinitions.Add(column2); + gridPanel.ColumnDefinitions.Add(column3); + + treeViewItem.Header = null; + if (CellType.IsMultiSelection) + { + var checkbox = new CheckBox + { + BorderBrush = _styleColor, + BorderThickness = new Thickness(1), + Margin = new Thickness(3, 1, 3, 0) + }; + + gridPanel.Children.Add(checkbox); + Grid.SetColumn(checkbox, 0); + } + + if (icon != null) + { + icon.Height = 14; + icon.Width = 14; + icon.Margin = new Thickness(3, 0, 3, 0); + gridPanel.Children.Add(icon); + Grid.SetColumn(icon, 1); + } + + textBlock.Margin = new Thickness(3, 4, 0, 0); + gridPanel.Children.Add(textBlock); + Grid.SetColumn(textBlock, 2); + treeViewItem.Header = gridPanel; + + if (arrowIcon != null) + { + arrowIcon.Width = 8; + arrowIcon.Height = 8; + treeViewItem.ArrowIcon = arrowIcon; + } + } + + private FrameworkElement GenerateIconControl(IDrawingHelper drawingHelper, ImageValue icon, ICellInfo cellInfo) + { + if (icon == null || string.IsNullOrWhiteSpace(icon.Name)) + { + return null; + } + + try + { + var iconColor = icon.UseCellTypeForeColor ? cellInfo.ForegroundStr ?? "black" : icon.Color; + return drawingHelper.GetForguncyImageControl(drawingHelper.GetForguncyImageFullFileName(icon.Name, icon.BuiltIn), iconColor); + } + catch (Exception) + { + // do nothing + return null; + } + } +} + +public class ElTreeViewItem : TreeViewItem +{ + public FrameworkElement ArrowIcon { get; set; } + + public override void OnApplyTemplate() + { + if (ArrowIcon != null) + { + var grid = FindVisualChildRecursively(this); + if (grid != null) + { + var tmpIcon = FindVisualChildRecursively(grid); + if (tmpIcon != null) + { + grid.Children.Remove(tmpIcon); + grid.Children.Insert(0, ArrowIcon); + } + } + } + base.OnApplyTemplate(); + } + + private T FindVisualChildRecursively(DependencyObject obj) where T : Visual + { + switch (obj) + { + case null: + return null; + case T visual: + return visual; + } + + for (var i = 0; i < VisualTreeHelper.GetChildrenCount(obj); i++) + { + var child = FindVisualChildRecursively(VisualTreeHelper.GetChild(obj, i)); + + if (child != null) + { + return child; + } + } + + return null; + } +} + +public class TreeCellTypeNode : TreeNodeBase +{ + #region 必须要重载,不然属性位置会改变 + public override string value { get => base.value; set => base.value = value; } + public override string label { get => base.label; set => base.label = value; } + #endregion + + [JsonProperty(PropertyName = "icon")] + [IconProperty(SupportUseCellColor = true)] + [SRDisplayName(nameof(Resources.TreeCellType_Icon))] + public ImageValue Icon { get; set; } +} + +[Icon("pack://application:,,,/ElementUI;component/Resources/images/Tree.png")] +[OrderWeight((int)Utils.OrderWeight.Tree)] +[Designer("ElementUI.TreeCellTypeDesigner, ElementUI")] +public class TreeCellType : ElementCellTypeBase +{ + /// + /// 值变更命令的最终字段 + /// 由于显示的文本不同必须要对外暴露两个属性 + /// 但是内容一模一样,因此提供此字段 + /// + private object _selectCommand; + + /// + /// 编辑选择命令 + /// + [SRDisplayName(nameof(Resources.NavMenuCellType_SelectCommand))] + [SRCustomCommandObject( + InitParamProperties = "value|label|parentValue", + InitParamValues = nameof(Resources.TreeCellType_SelectCommand_InitParamValues), + BindingDataSourceWithCustomColumnsPropertyName = nameof(BindingDataSource))] + [JsonProperty(PropertyName = "selectCommand")] + public object SelectCommand + { + get => IsMultiSelection ? null : _selectCommand; + set => _selectCommand = value; + } + + /// + /// 编辑多选选择命令 + /// 由于单选模式和多选模式的值变更命令的返回值类型和描述完全不同 + /// 因此不得不做两个属性 + /// + [SRDisplayName(nameof(Resources.NavMenuCellType_SelectCommand))] + [SRCustomCommandObject( + InitParamProperties = "resultArray", + InitParamValues = nameof(Resources.TreeCellType_MultiSelectCommand_InitParamValues))] + [SRDescription(nameof(Resources.TreeCellType_MultiSelectCommand_InitParamValues_Description))] + [JsonProperty(PropertyName = "multiSelectCommand")] + public object MultiSelectCommand + { + get => IsMultiSelection ? _selectCommand : null; + set => _selectCommand = value; + } + + /// + /// 编辑点击命令 + /// + [SRDisplayName(nameof(Resources.NavMenuCellType_ClicktCommand))] + [SRCustomCommandObject( + InitParamProperties = "value|label|parentValue", + InitParamValues = nameof(Resources.TreeCellType_SelectCommand_InitParamValues), + BindingDataSourceWithCustomColumnsPropertyName = nameof(BindingDataSource))] + [JsonProperty(PropertyName = "clickCommand")] + public object ClickCommand { get; set; } + + /// + /// 编辑拖拽命令 + /// + [SRDisplayName(nameof(Resources.TreeCellType_DragCommand))] + [SRCustomCommandObject( + InitParamProperties = "draggingNodeValue|dropNodeValue|dragType", + InitParamValues = nameof(Resources.TreeCellType_DragCommand_InitParamValues), + ParameterDescriptions = nameof(Resources.TreeCellType_DragCommand_ParameterDescriptions))] + [JsonProperty(PropertyName = "dragCommand")] + public object DragCommand { get; set; } + + /// + /// 是否从数据库生成树节点 + /// + [BoolProperty] + [MergableProperty(false)] + [SRDisplayName(nameof(Resources.TreeCellType_IsTreeNodeGeneratedFromDb))] + [JsonProperty(PropertyName = "isTreeNodeFromDb")] + public bool IsTreeNodeGeneratedFromDb { get; set; } + + /// + /// 配置树节点选项 + /// + [SRDisplayName(nameof(Resources.TreeCellType_ConfigTreeNodeOptions))] + [SRTreeProperty( + IndentLevel = 1, + NodeType = typeof(TreeCellTypeNode), + DefaultNodeName = nameof(Resources.NavMenuCellType_options_DefaultNodeName))] + [JsonProperty(PropertyName = "configTreeNodeOptions")] + [DiffTypeNameIgnore] + public List ConfigTreeNodeOptions { get; set; } + + /// + /// 绑定数据源 + /// + [SRDisplayName(nameof(Resources.TreeCellType_BindingDataSource))] + [SRBindingDataSourceProperty( + Columns = nameof(Resources.TreeCellType_BindingDataSource_Columns), + IndentLevel = 1, + IsIdPidStructure = true, + TreeIdColumnName = "value", + TreePidColumnName = "parentValue", + AllowAddCustomColumns = true)] + [JsonProperty(PropertyName = "bindingDataSource")] + [DiffTypeNameIgnore] + public object BindingDataSource { get; set; } + + /// + /// 内容为空的时候展示的文本 + /// empty-text: string + /// + [SRDisplayName(nameof(Resources.TreeCellType_EmptyText))] + [JsonProperty(PropertyName = "emptyText")] + public string EmptyText { get; set; } + + /// + /// 节点支持多选 + /// show-checkbox: boolean - default: false + /// + [SRCategoryHeader(nameof(Resources.Other))] + [SRDisplayName(nameof(Resources.TreeCellType_IsMultiSelection))] + [JsonProperty(PropertyName = "isMultiSelection")] + public bool IsMultiSelection { get; set; } + + /// + /// 是否在只点击 checkbox 的时候才会选中节点 - 只在 IsMultiSelection 为 true 的啥情况下才会显示 + /// check-on-click-node: boolean - default: false + /// + [SRDisplayName(nameof(Resources.TreeCellType_IsNodeCheckedOnlyByCheckbox))] + [JsonProperty(PropertyName = "isCheckedByCheckbox")] + public bool IsNodeCheckedOnlyByCheckbox { get; set; } + + [SRDisplayName(nameof(Resources.CascaderCellType_checkStrictly))] + [SRDescription(nameof(Resources.CascaderCellType_checkStrictly_Description))] + [DefaultValue(false)] + [JsonProperty(PropertyName = "isCheckStrictly")] + public bool IsCheckStrictly { get; set; } = false; + + /// + /// 是否默认展开所有节点 + /// default-expand-all: boolean - default: false + /// + [SRDisplayName(nameof(Resources.TreeCellType_IsExpandAllNodes))] + [JsonProperty(PropertyName = "isDefaultExpandAll")] + public bool IsExpandAllNodes { get; set; } + + /// + /// 是否点击节点可以展开/收起节点 + /// expand-on-click-node: boolean - default: true + /// + [DefaultValue(true)] + [SRDisplayName(nameof(Resources.TreeCellType_IsClickCanExpandNode))] + [JsonProperty(PropertyName = "isClickCanExpandNode")] + public bool IsClickCanExpandNode { get; set; } = true; + + /// + /// 是否同级节点只能展开一个(即:手风琴模式) + /// accordion: boolean - default: false + /// + [SRDisplayName(nameof(Resources.TreeCellType_IsOnlyExpandOneLevel))] + [JsonProperty(PropertyName = "isOnlyExpandOneLevel")] + public bool IsOnlyExpandOneLevel { get; set; } + + /// + /// 是否高亮当前选中节点 + /// highlight-current: boolean - default: false + /// + [SRDisplayName(nameof(Resources.TreeCellType_IsHighlightCurrent))] + [JsonProperty(PropertyName = "isHighlightCurrent")] + public bool IsHighlightCurrent { get; set; } + + /// + /// 是否开启节点拖拽功能 + /// draggable: boolean - default: false + /// + [SRDisplayName(nameof(Resources.TreeCellType_IsDraggable))] + [JsonProperty(PropertyName = "isDraggable")] + public bool IsDraggable { get; set; } + + public override bool GetDesignerPropertyVisible(string propertyName) + { + if (propertyName == nameof(ConfigTreeNodeOptions)) + { + return !IsTreeNodeGeneratedFromDb; + } + + if (propertyName == nameof(BindingDataSource)) + { + return IsTreeNodeGeneratedFromDb; + } + + if (propertyName == nameof(IsNodeCheckedOnlyByCheckbox)) + { + return IsMultiSelection; + } + + if (propertyName == nameof(IsCheckStrictly)) + { + return IsMultiSelection; + } + + if (propertyName == nameof(DragCommand)) + { + return IsDraggable; + } + + if (propertyName == nameof(SelectCommand)) + { + return !IsMultiSelection; + } + + if (propertyName == nameof(MultiSelectCommand)) + { + return IsMultiSelection; + } + + return base.GetDesignerPropertyVisible(propertyName); + } + + public override bool GetRunTimeMethodVisible(string name) + { + if (name is nameof(GetSelectedNodes) or nameof(SetSelectedNodes) or nameof(GetHalfSelectedNodes) or nameof(SetNodeSelectedStatus)) + { + return IsMultiSelection; + } + return base.GetRunTimeMethodVisible(name); + } + + public override string ToString() + { + return Resources.Tree; + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.CascaderCellType_SetDataSourceByObjTree))] + [SRDescription(nameof(Resources.CascaderCellType_SetDataSourceByObjTree_Description))] + public void SetDataSourceByObjTree( + [Required] + [SRItemDisplayName(nameof(Resources.CascaderCellType_dataSource))] + string dataSource, + [Required] + [SRItemDisplayName(nameof(Resources.CascaderCellType_valueProperty))] + [SRDescription(nameof(Resources.CascaderCellType_valueProperty_Description))] + string valueProperty = "value", + [SRItemDisplayName(nameof(Resources.CascaderCellType_labelProperty))] + [SRDescription(nameof(Resources.CascaderCellType_labelProperty_Description))] + string labelProperty = "label", + [SRItemDisplayName(nameof(Resources.IconProperty))] + string iconProperty = "icon", + [Required] + [SRItemDisplayName(nameof(Resources.CascaderCellType_childrenProperty))] + [SRDescription(nameof(Resources.CascaderCellType_childrenProperty_Description))] + string childrenProperty = "children") { } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.CascaderCellType_SetDataSourceByIdPidTable))] + [SRDescription(nameof(Resources.CascaderCellType_SetDataSourceByIdPidTable_Description))] + public void SetDataSourceByIdPidTable( + [Required] + [SRItemDisplayName(nameof(Resources.CascaderCellType_dataSource))] + string dataSource, + [Required] + [SRItemDisplayName(nameof(Resources.CascaderCellType_valueProperty))] + string valueProperty = "value", + [SRItemDisplayName(nameof(Resources.CascaderCellType_labelProperty))] + [SRDescription(nameof(Resources.CascaderCellType_SetDataSourceByIdPidTable_labelProperty_Description))] + string labelProperty = "label", + [SRItemDisplayName(nameof(Resources.IconProperty))] + string iconProperty = "icon", + [Required] + [SRItemDisplayName(nameof(Resources.CascaderCellType_parentValue))] + string parentValue = "parentValue") { } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TreeCellType_GetSelectedNodes))] + [SRDescription(nameof(Resources.TreeCellType_GetSelectedNodes_Description))] + public NodeGettingResult GetSelectedNodes( + [BoolProperty] + [SRItemDisplayName(nameof(Resources.TreeCellType_GetSelectedNodes_IsLeafNodeOnly))] + bool isLeafOnly = false, + [BoolProperty] + [SRItemDisplayName(nameof(Resources.TreeCellType_GetSelectedNodes_IsContainsHalf))] + bool isContainsHalf = false) => null; + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TreeCellType_SetSelectedNodes))] + public void SetSelectedNodes( + [BoolProperty] + [SRItemDisplayName(nameof(Resources.TreeCellType_SetSelectedNodes_IsLeafNodeOnly))] + bool isLeafOnly = false, + [SRItemDisplayName(nameof(Resources.TreeCellType_SetSelectedNodes_SelectedIndexes))] + [SRDescription(nameof(Resources.TreeCellType_SelectedIndexes_Descrption))] + string selectedIndexes = null) { } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TreeCellType_GetCurrentNodes))] + public NodeGettingResult GetCurrentNode() => null; + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TreeCellType_SetCurrentNodes))] + public void SetCurrentNode( + [SRItemDisplayName(nameof(Resources.TreeCellType_SetSelectedNodes_SelectedIndexes))] + [SRDescription(nameof(Resources.TreeCellType_SelectedIndexes_Descrption))] + string currentNodeValue) { } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TreeCellType_GetHalfSelectedNodes))] + public NodeGettingResult GetHalfSelectedNodes() => null; + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TreeCellType_SetNodeSelections))] + public void SetNodeSelectedStatus( + [SRItemDisplayName(nameof(Resources.TreeCellType_SetNodeSelections_NodeValue))] + string nodeValue, + [BoolProperty] + [SRItemDisplayName(nameof(Resources.TreeCellType_SetNodeSelections_IsNodeSelected))] + bool isSelected = false, + [BoolProperty] + [SRItemDisplayName(nameof(Resources.TreeCellType_SetNodeSelections_IsSubNodeSelected))] + bool isRecurseSubNodes = false) { } + + [SRDisplayName(nameof(Resources.MethodName_ReloadBindingItems))] + [SRDescription(nameof(Resources.MethodName_ReloadBindingItems_Description))] + [RunTimeMethod] + public void ReloadBinding() { } +} + +public class NodeGettingResult +{ + [SRDisplayName(nameof(Resources.TreeCellType_SelectedNodeResult))] + [SRDescription(nameof(Resources.TreeCellType_SelectedResult_Descrption))] + public object Result { get; set; } +} \ No newline at end of file diff --git a/CellTypes/TreeSelect.cs b/CellTypes/TreeSelect.cs new file mode 100644 index 0000000000000000000000000000000000000000..fe9dfa6ba699486cbd0bbdd5b9cffc234a24b6f5 --- /dev/null +++ b/CellTypes/TreeSelect.cs @@ -0,0 +1,229 @@ +using System.Collections.Generic; +using GrapeCity.Forguncy.Plugin; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Windows; +using ElementUI.Properties; +using ElementUI.WpfControls; +using GrapeCity.Forguncy.CellTypes; +using GrapeCity.Forguncy.Commands; +using Newtonsoft.Json; +using GrapeCity.Forguncy.Plugin.Attributes; + +namespace ElementUI +{ + public class TreeSelectCellTypeDesigner : CellTypeDesigner, ISupportPropertyInitialize + { + public override FrameworkElement GetDrawingControl(ICellInfo cellInfo, IDrawingHelper drawingHelper) + { + var control = new InputBoxDrawingControl(cellInfo, drawingHelper, + StyleHelper.CreateStyleViewModel(cellInfo, drawingHelper), this.CellType); + return control; + } + + public void InitDefaultPropertyValues(IBuilderContext context) + { + var list = JsonConvert.DeserializeObject>(Resources.DefaultTreeSource); + CellType.options = list.OfType().ToList(); + CellType.placeholder = Resources.CascaderCellType_placeholder_DefaultValue; + } + } + + [Icon("pack://application:,,,/ElementUI;component/Resources/Images/TreeSelect.png")] + [OrderWeight((int)Utils.OrderWeight.TreeSelect)] + [Designer("ElementUI.TreeSelectCellTypeDesigner, ElementUI")] + public class TreeSelectCellType : InputCellTypeBase + { + #region Override基类属性,仅仅是为了确保属性顺序 + + public override List CommandList + { + get => base.CommandList; + set => base.CommandList = value; + } + + public override DataValidationLink DataValidationLink + { + get => base.DataValidationLink; + set => base.DataValidationLink = value; + } + + public override List UIPermissions + { + get => base.UIPermissions; + set => base.UIPermissions = value; + } + + public override object DefaultValue + { + get => base.DefaultValue; + set => base.DefaultValue = value; + } + + public override bool NeedFormatDefaultValue => false; + + public override SupportFeatures SupportFeatures => base.SupportFeatures | SupportFeatures.AllowSetFormat | SupportFeatures.AllowSetTabOrder; + #endregion + + [SRDisplayName(nameof(Resources.SelectCellType_useBinding))] + [BoolProperty] + [MergableProperty(false)] + public bool useBinding { get; set; } = false; + + [SRTreeProperty(IndentLevel = 1, NodeType = typeof(TreeNode), + DefaultNodeName = nameof(Resources.CascaderCellType_options_DefaultNodeName))] + [SRDisplayName(nameof(Resources.CascaderCellType_options))] + [DiffTypeNameIgnore] + public List options { get; set; } = new List(); + + [SRBindingDataSourceProperty(Columns = nameof(Resources.CascaderCellType_bindingOptions_Columns), + IndentLevel = 1, IsIdPidStructure = true, TreeIdColumnName = "value", TreePidColumnName = "parentValue")] + [SRDisplayName(nameof(Resources.CascaderCellType_bindingOptions))] + [DiffTypeNameIgnore] + public object bindingOptions { get; set; } + + [SRDisplayName(nameof(Resources.SelectCellType_placeholder))] + [SearchableProperty] + public string placeholder { get; set; } + + [SRDisplayName(nameof(Resources.SelectCellType_multiple))] + [BoolProperty] + public bool multiple { get; set; } + + [SRDisplayName(nameof(Resources.SelectCellType_collapseTags))] + [BoolProperty] + public bool collapseTags { get; set; } + + [SRDisplayName(nameof(Resources.SelectCellType_multipleLimit))] + [SRIntProperty(AllowNull = true, Min = 1, Watermark = nameof(Resources.NoLimit))] + public int? multipleLimit { get; set; } + + [SRDisplayName(nameof(Resources.TreeSelect_TreeSettings))] + [ObjectProperty(ObjType = typeof(TreeSettings))] + public TreeSettings TreeSettings { get; set; } = new TreeSettings(); + + [SRCategoryHeader(nameof(Resources.Other))] + [SRDisplayName(nameof(Resources.CascaderCellType_checkStrictly))] + [SRDescription(nameof(Resources.CascaderCellType_checkStrictly_Description))] + [DefaultValue(false)] + public bool checkStrictly { get; set; } = false; + + [SRDisplayName(nameof(Resources.SelectCellType_filterable))] + public bool filterable { get; set; } + + [SRDisplayName(nameof(Resources.SelectCellType_clearable))] + public bool clearable { get; set; } + + [SRDisplayName(nameof(Resources.SelectCellType_IsDisabled))] + public override bool IsDisabled { get; set; } + + public override bool GetDesignerPropertyVisible(string propertyName) + { + if (propertyName == nameof(options)) + { + return !useBinding; + } + + if (propertyName == nameof(bindingOptions)) + { + return useBinding; + } + + if (propertyName == nameof(collapseTags) || + propertyName == nameof(multipleLimit)) + { + return multiple; + } + + return base.GetDesignerPropertyVisible(propertyName); + } + + public override string ToString() + { + return Resources.TreeSelect; + } + + #region Run Time Method + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.CascaderCellType_SetDataSourceByObjTree))] + [SRDescription(nameof(Resources.CascaderCellType_SetDataSourceByObjTree_Description))] + public void SetDataSourceByObjTree( + [SRItemDisplayName(nameof(Resources.CascaderCellType_dataSource))] [Required] + string dataSource, + [SRItemDisplayName(nameof(Resources.CascaderCellType_valueProperty))] + [SRDescription(nameof(Resources.CascaderCellType_valueProperty_Description))] + [Required] + string valueProperty = "value", + [SRItemDisplayName(nameof(Resources.CascaderCellType_labelProperty))] + [SRDescription(nameof(Resources.CascaderCellType_labelProperty_Description))] + string labelProperty = "label", + [SRItemDisplayName(nameof(Resources.CascaderCellType_childrenProperty))] + [SRDescription(nameof(Resources.CascaderCellType_childrenProperty_Description))] + [Required] + string childrenProperty = "children") + { + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.CascaderCellType_SetDataSourceByIdPidTable))] + [SRDescription(nameof(Resources.CascaderCellType_SetDataSourceByIdPidTable_Description))] + public void SetDataSourceByIdPidTable( + [SRItemDisplayName(nameof(Resources.CascaderCellType_dataSource))] [Required] + string dataSource, + [SRItemDisplayName(nameof(Resources.CascaderCellType_valueProperty))] [Required] + string valueProperty = "value", + [SRItemDisplayName(nameof(Resources.CascaderCellType_labelProperty))] + [SRDescription(nameof(Resources.CascaderCellType_SetDataSourceByIdPidTable_labelProperty_Description))] + string labelProperty = "label", + [SRItemDisplayName(nameof(Resources.CascaderCellType_parentValue))] [Required] + string parentValue = "parentValue") + { + } + + [SRDisplayName(nameof(Resources.MethodName_ReloadBindingItems))] + [SRDescription(nameof(Resources.MethodName_ReloadBindingItems_Description))] + [RunTimeMethod] + public void ReloadBindingItems() + { + } + + public override bool GetRunTimeMethodVisible(string name) + { + if (name == nameof(ReloadBindingItems)) + { + return useBinding; + } + + return base.GetRunTimeMethodVisible(name); + } + + #endregion + } + + public class TreeSettings : ObjectPropertyBase + { + [SRDisplayName(nameof(Resources.TreeSelect_indent))] + [DefaultValue(16)] + public int indent { get; set; } = 16; + + [SRDisplayName(nameof(Resources.TreeSelect_highlightCurrent))] + [DefaultValue(true)] + public bool highlightCurrent { get; set; } = true; + + [SRDisplayName(nameof(Resources.TreeSelect_defaultExpandAll))] + public bool defaultExpandAll { get; set; } + + [SRDisplayName(nameof(Resources.TreeSelect_expandOnClickNode))] + [SRDescription(nameof(Resources.TreeSelect_expandOnClickNode_Desc))] + [DefaultValue(true)] + public bool expandOnClickNode { get; set; } = true; + + [SRDisplayName(nameof(Resources.TreeSelect_accordion))] + public bool accordion { get; set; } + + [SRDisplayName(nameof(Resources.TreeSelect_showCheckbox))] + public bool showCheckBox { get; set; } + } +} \ No newline at end of file diff --git a/CellTypes/UploadCellType.cs b/CellTypes/UploadCellType.cs index 94fd10e2ad81ee89260a56838249047f0b76f6a8..a5fbe54f0e6ece63caa7061c9c86f0e9582a6ca4 100644 --- a/CellTypes/UploadCellType.cs +++ b/CellTypes/UploadCellType.cs @@ -12,6 +12,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows; using ElementUI.Properties; +using GrapeCity.Forguncy.Plugin.Attributes; namespace ElementUI { @@ -50,7 +51,7 @@ namespace ElementUI [Icon("pack://application:,,,/ElementUI;component/Resources/Images/Upload.png")] [OrderWeight((int)Utils.OrderWeight.Upload)] [Designer("ElementUI.UploadCellTypeDesigner, ElementUI")] - public class UploadCellType : InputCellTypeBase,ISupportReadOnly + public class UploadCellType : InputCellTypeBase, ISupportReadOnly { #region Override基类属性,仅仅是为了确保属性顺序 [Browsable(false)] @@ -60,6 +61,7 @@ namespace ElementUI public override List UIPermissions { get => base.UIPermissions; set => base.UIPermissions = value; } [Browsable(false)] public override object DefaultValue { get => base.DefaultValue; set => base.DefaultValue = value; } + public override SupportFeatures SupportFeatures => base.SupportFeatures | SupportFeatures.AllowSetTabOrder; #endregion [SRDisplayName(nameof(Resources.UploadCellType_limit))] @@ -80,7 +82,7 @@ namespace ElementUI } set { - if(value == 0) + if (value == 0) { value = null; } @@ -89,6 +91,7 @@ namespace ElementUI } [SRDisplayName(nameof(Resources.UploadCellType_listType))] + [DiffDefaultValueInclude] public UploadListType listType { get; set; } = UploadListType.upload; [SRDisplayName(nameof(Resources.UploadCellType_buttonText))] diff --git a/CellTypes/Utils.cs b/CellTypes/Utils.cs index 7f707dcd0e852feb7e3b5d72c6dae8e6d8aee517..fbc4a68a81138a5786ec52243e4ce37638106cd9 100644 --- a/CellTypes/Utils.cs +++ b/CellTypes/Utils.cs @@ -11,6 +11,7 @@ namespace ElementUI Input, InputNumber, Select, + TreeSelect, Cascader, DatePicker, TimePicker, @@ -28,7 +29,10 @@ namespace ElementUI Steps, Timeline, Transfer, - BackupTop + BackupTop, + Table, + VirtualizedTable, + Tree }; public static List GetDefaultPermission(params UIPermissionScope[] scopes) diff --git a/CellTypes/VirtualizedTableCellType.cs b/CellTypes/VirtualizedTableCellType.cs new file mode 100644 index 0000000000000000000000000000000000000000..74bbb2ba896b3217d491b79ae42b56ad895a474e --- /dev/null +++ b/CellTypes/VirtualizedTableCellType.cs @@ -0,0 +1,788 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Windows; +using ElementUI.Properties; +using ElementUI.WpfControls; +using GrapeCity.Forguncy.CellTypes; +using GrapeCity.Forguncy.Commands; +using GrapeCity.Forguncy.Plugin; +using GrapeCity.Forguncy.Plugin.Attributes; +using Newtonsoft.Json; + +namespace ElementUI; + +[Icon("pack://application:,,,/ElementUI;component/Resources/Images/VirtualizedTable.png")] +[OrderWeight((int)Utils.OrderWeight.VirtualizedTable)] +[Designer("ElementUI.VirtualizedTableCellTypeDesigner, ElementUI")] +public class VirtualizedTableCellType : ElementCellTypeBase +{ + private string _dataType = "table"; + + private bool _autoGenerateColumnsByDataSource = true; + + private IBindingDataSource _bindingTableOptions; + + private IBindingDataSource _bindingTreeTableOptions; + + /// + /// 根据数据源生成相关列信息 + /// + private void GenerateColumnsByDataSources() + { + if (!IsTreeTable && AutoGenerateColumnsByDataSource) + { + return; + } + + var dataSource = IsTreeTable ? BindingTreeTableOptions : BindingTableOptions; + + if (dataSource == null) + { + Columns = new List(); + } + else + { + Columns = dataSource + .Columns + .Where(i => i.ColumnName != "value" && i.ColumnName != "parentValue") + .Select(i => + new VirtualizedTableColumnSetting() + { + DataColumnName = i.ColumnName, + Label = i.ColumnName, + }) + .OfType() + .ToList(); + } + } + + [SaveJsonIgnore] public bool IsTreeTable => DataType == "treeTable"; + + internal static string GetDefaultFormat(ForguncyTableColumnType columnType) + { + return columnType switch + { + ForguncyTableColumnType.Time => "HH:mm", + ForguncyTableColumnType.DateTime => Resources.TableCellType_DateTimeFormat, + _ => null + }; + } + + [SRDisplayName(nameof(Resources.TableCellType_TableName))] + [DefaultValue(null)] + public string TableName { get; set; } + + [SRDisplayName(nameof(Resources.TableCellType_RowClickCommand))] + [CustomCommandObject] + public object RowClickCommand { get; set; } + + [SRDisplayName(nameof(Resources.TableCellType_RowDoubleClickCommand))] + [CustomCommandObject] + public object RowDoubleClickCommand { get; set; } + + [SRDisplayName(nameof(Resources.TableCellType_SelectionChangedCommand))] + [SRCustomCommandObject(InitParamProperties = "selection", + InitParamValues = nameof(Resources.TableCellType_Selection))] + public object SelectionChangedCommand { get; set; } + + [SRDisplayName(nameof(Resources.VirtualizedTableDataTypeTitle))] + [SRRadioGroupProperty(ValueList = "table|treeTable", DisplayList = nameof(Resources.VirtualizedTableDataType))] + public string DataType + { + get => _dataType; + set + { + _dataType = value; + + if (!AutoGenerateColumnsByDataSource || IsTreeTable) + { + GenerateColumnsByDataSources(); + } + } + } + + [BindingDataSourceProperty(IndentLevel = 1)] + [SRDisplayName(nameof(Resources.TableCellType_DataSource))] + public IBindingDataSource BindingTableOptions + { + get => _bindingTableOptions; + set + { + _bindingTableOptions = value; + + if (Columns == null || !Columns.Any()) + { + GenerateColumnsByDataSources(); + } + } + } + + [SRBindingDataSourceProperty( + Columns = nameof(Resources.VirtualizedTableCellType_bindingOptions_Columns), + IndentLevel = 1, + IsIdPidStructure = true, + TreeIdColumnName = "value", + TreePidColumnName = "parentValue", + AllowAddCustomColumns = true)] + [SRDisplayName(nameof(Resources.TableCellType_DataSource))] + public IBindingDataSource BindingTreeTableOptions + { + get => _bindingTreeTableOptions; + set + { + _bindingTreeTableOptions = value; + + if (Columns == null || !Columns.Any()) + { + GenerateColumnsByDataSources(); + } + } + } + + [SRDisplayName(nameof(Resources.TableCellType_AutoGenerateColumnByDataSource))] + [DefaultValue(true)] + [BoolProperty] + public bool AutoGenerateColumnsByDataSource + { + get => _autoGenerateColumnsByDataSource; + set + { + if (_autoGenerateColumnsByDataSource != value) + { + _autoGenerateColumnsByDataSource = value; + + if (value) + { + return; + } + + GenerateColumnsByDataSources(); + } + } + } + + [JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace)] + [SRDisplayName(nameof(Resources.TableCellType_GenerateColumnManually))] + [SRObjectListProperty(DefaultName = nameof(Resources.TableCellType_TableColumn), + ItemType = typeof(VirtualizedTableColumnSetting))] + [DiffTypeNameIgnore] + public List Columns { get; set; } = new(); + + [SRDisplayName(nameof(Resources.VirtualizedTable_TreeTableDefaultExpansion))] + [SRComboProperty(ValueList = "expandAll|expandToSpecifiedLevel|collapseAll", + DisplayList = nameof(Resources.VirtualizedTable_DefaultExpansion_DisplayName))] + public string DefaultExpansion { get; set; } = "collapseAll"; + + [SRDisplayName(nameof(Resources.VirtualizedTable_TreeTableExpandToSpecifiedLevel))] + [IntProperty(Min = 1, Max = int.MaxValue)] + [DefaultValue(1)] + public int ExpandToSpecifiedLevel { get; set; } = 1; + + [SRDisplayName(nameof(Resources.TableCellType_ShowLineNumberColumn))] + [DefaultValue(false)] + [BoolProperty] + public bool ShowLineNumberColumn { get; set; } = false; + + [SRDisplayName(nameof(Resources.TableCellType_LineNumberColumnSetting))] + [ObjectProperty(IndentLevel = 2, ObjType = typeof(ExtraColumnSettings))] + public ExtraColumnSettings LineNumberColumnSetting { get; set; } = new(); + + [SRDisplayName(nameof(Resources.TableCellType_ShowSelectColumn))] + [BoolProperty] + [DefaultValue(false)] + public bool ShowSelectionColumn { get; set; } = false; + + [SRDisplayName(nameof(Resources.TableCellType_SelectColumnSettings))] + [ObjectProperty(IndentLevel = 2, ObjType = typeof(SelectColumnSettings))] + public SelectColumnSettings SelectColumnSettings { get; set; } = new(); + + [SRDisplayName(nameof(Resources.TableCellType_ShowOperationColumn))] + [BoolProperty] + [DefaultValue(false)] + public bool ShowOperationColumn { get; set; } = false; + + [SRDisplayName(nameof(Resources.TableCellType_OperationColumnSettings))] + [ObjectProperty(IndentLevel = 2, ObjType = typeof(OperationColumnSettings))] + public OperationColumnSettings OperationColumnSettings { get; set; } + + public override bool GetDesignerPropertyVisible(string propertyName) + { + if (propertyName is nameof(BindingTableOptions) or nameof(AutoGenerateColumnsByDataSource)) + { + return !IsTreeTable; + } + + if (propertyName == nameof(BindingTreeTableOptions)) + { + return IsTreeTable; + } + + if (propertyName == nameof(Columns) && !IsTreeTable) + { + return !AutoGenerateColumnsByDataSource; + } + + if (propertyName == nameof(LineNumberColumnSetting)) + { + return ShowLineNumberColumn; + } + + if (propertyName == nameof(SelectColumnSettings)) + { + return ShowSelectionColumn && !IsTreeTable; + } + + if (propertyName == nameof(OperationColumnSettings)) + { + return ShowOperationColumn; + } + + if (propertyName is nameof(ShowSelectionColumn)) + { + return !IsTreeTable; + } + + if (propertyName is nameof(SelectionChangedCommand)) + { + return !IsTreeTable; + } + + if (propertyName is nameof(DefaultExpansion)) + { + return IsTreeTable; + } + + if (propertyName is nameof(ExpandToSpecifiedLevel)) + { + return DefaultExpansion == "expandToSpecifiedLevel" && IsTreeTable; + } + + return base.GetDesignerPropertyVisible(propertyName); + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TableCellType_SetJsonDataSource))] + [SRDescription(nameof(Resources.TableCellType_SetJsonDataSource_Description))] + public void SetJsonDataSource( + [SRItemDisplayName(nameof(Resources.CascaderCellType_dataSource))] [Required] string dataSource) + { + // + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.VirtualizedTableSetDataSourceByObjTree))] + [SRDescription(nameof(Resources.VirtualizedTableCellType_SetDataSourceByObjTree_Description))] + public void SetDataSourceByObjTree( + [SRItemDisplayName(nameof(Resources.CascaderCellType_dataSource))] [Required] + string dataSource, + [SRItemDisplayName(nameof(Resources.CascaderCellType_valueProperty))] + [SRDescription(nameof(Resources.CascaderCellType_valueProperty_Description))] + [Required] + string valueProperty = "value", + [SRItemDisplayName(nameof(Resources.CascaderCellType_childrenProperty))] + [SRDescription(nameof(Resources.CascaderCellType_childrenProperty_Description))] + [Required] + string childrenProperty = "children") + { + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.VirtualizedTableSetDataSourceByIdPidTable))] + [SRDescription(nameof(Resources.CascaderCellType_SetDataSourceByIdPidTable_Description))] + public void SetDataSourceByIdPidTable( + [SRItemDisplayName(nameof(Resources.CascaderCellType_dataSource))] [Required] + string dataSource, + [SRItemDisplayName(nameof(Resources.CascaderCellType_valueProperty))] [Required] + string valueProperty = "value", + [SRItemDisplayName(nameof(Resources.CascaderCellType_parentValue))] [Required] + string parentValue = "parentValue") + { + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TableCellType_ConfigColumnProperties))] + public void SetTableColumnSetting( + [FormulaProperty] [SRItemDisplayName(nameof(Resources.TableCellType_ColumnNameFromDataSource))] + string dataColumnName, + [SRItemDisplayName(nameof(Resources.TableCellType_ConfigColumnProperties))] + [ObjectProperty(ObjType = typeof(VirtualizedTableColumnSettingBase))] + VirtualizedTableColumnSettingBase columnSetting = null) + { + // + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TableCellType_ClearSelection))] + public void ClearSelection() + { + // + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TableCellType_GetSelectedRow))] + public GetSelectedRowResult GetSelectedRow() + { + return null; + } + + [RunTimeMethod] + [SRDisplayName(nameof(Resources.TableCellType_ResetTable))] + public void ResetTable() + { + // + } + + public override bool GetRunTimeMethodVisible(string name) + { + if (name is nameof(ClearSelection) or nameof(GetSelectedRow)) + { + return ShowSelectionColumn && !IsTreeTable; + } + + if (name is nameof(SetDataSourceByObjTree) or nameof(SetDataSourceByIdPidTable)) + { + return IsTreeTable; + } + + if (name is nameof(SetJsonDataSource)) + { + return !IsTreeTable; + } + + return base.GetRunTimeMethodVisible(name); + } + + public override string ToString() + { + return Resources.TVirtualizedableCellType_DisplayName; + } +} + +public class VirtualizedTableColumnSettingBase : ObjectPropertyBase +{ + [OrderWeight((int)VirtualizedTableColumnSettingOrderWeight.Label)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnName))] + public string Label { get; set; } + + [OrderWeight((int)VirtualizedTableColumnSettingOrderWeight.FormatStr)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnFormatString))] + [SRComboProperty(ValueList = nameof(Resources.TableCellType_ColumnFormatStringValueList), IsSelectOnly = false)] + public string FormatStr { get; set; } + + [OrderWeight((int)VirtualizedTableColumnSettingOrderWeight.Width)] + [DefaultValue(null)] + [IntProperty(Min = 1, AllowNull = true)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnWidth))] + public int? Width { get; set; } + + [SRDisplayName(nameof(Resources.TableCellType_Fixed))] + [OrderWeight((int)VirtualizedTableColumnSettingOrderWeight.Fixed)] + [SRComboProperty(ValueList = "none|left|right", DisplayList = nameof(Resources.TableCellType_Fixed_Display))] + public string Fixed { get; set; } = "none"; + + [OrderWeight((int)VirtualizedTableColumnSettingOrderWeight.Align)] + [SRComboProperty(ValueList = "left|center|right", + DisplayList = nameof(Resources.TableCellType_ColumnAlignDisplayList))] + [SRDisplayName(nameof(Resources.TableCellType_ColumnAlign))] + public string Align { get; set; } = "left"; + + [OrderWeight((int)VirtualizedTableColumnSettingOrderWeight.HeaderAlign)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnHeaderAlign))] + [SRComboProperty(ValueList = "left|center|right", + DisplayList = nameof(Resources.TableCellType_ColumnAlignDisplayList))] + public string HeaderAlign { get; set; } = "left"; +} + +[Designer("ElementUI.VirtualizedTableColumnSettingDesigner, ElementUI")] +public class VirtualizedTableColumnSetting : VirtualizedTableColumnSettingBase, INamedObject +{ + [OrderWeight((int)VirtualizedTableColumnSettingOrderWeight.DataColumnName)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnNameFromDataSource))] + public string DataColumnName { get; set; } + + string INamedObject.Name + { + get => Label; + set => Label = value; + } + + public override object Clone() + { + return new VirtualizedTableColumnSetting() + { + Label = Label, + FormatStr = FormatStr, + Width = Width, + Fixed = Fixed, + Align = Align, + HeaderAlign = HeaderAlign, + DataColumnName = DataColumnName, + }; + } +} + +public class VirtualizedTableColumnSettingDesigner : ObjectDesigner +{ + public override EditorSetting GetEditorSetting(PropertyDescriptor property, IBuilderContextBase contextBase) + { + if (property.Name == nameof(VirtualizedTableColumnSetting.DataColumnName)) + { + var source = new List(); + + if (contextBase is IBuilderContext context) + { + if (context.Cell.CellType is VirtualizedTableCellType table) + { + var bindingDataSource = + table.IsTreeTable ? table.BindingTreeTableOptions : table.BindingTableOptions; + + if (bindingDataSource?.Columns != null) + { + source.AddRange(bindingDataSource.Columns.Select(i => i.ColumnName)); + } + } + } + + return new ComboEditorSetting(source) { IsReadOnly = false }; + } + + return base.GetEditorSetting(property, contextBase); + } +} + +public class VirtualizedTableCellTypeDesigner : CellTypeDesigner, ISupportPropertyInitialize, + ICellTypeChecker, IPostGenerate +{ + public void InitDefaultPropertyValues(IBuilderContext context) + { + CellType.SelectColumnSettings = new SelectColumnSettings() + { + Width = 62, + Align = "left", + Fixed = "none", + HeaderAlign = "left", + }; + + CellType.LineNumberColumnSetting = new ExtraColumnSettings() + { + Width = 62, + Align = "left", + Fixed = "none", + HeaderAlign = "left", + }; + + CellType.OperationColumnSettings = new OperationColumnSettings + { + Width = 200, + Align = "left", + Fixed = "none", + HeaderAlign = "center", + Label = Resources.TableCellType_Operations + }; + + CellType.OperationColumnSettings.ActionButtons.Add(new VirtualizedTableActionButton() + { + Name = Resources.TableCellType_Edit, + Type = "button", + Shape = "default", + IconWidth = 18, + IconHeight = 18 + }); + + CellType.OperationColumnSettings.ActionButtons.Add(new VirtualizedTableActionButton() + { + Name = Resources.TableCellType_Delete, + StyleType = "Accent 5", + Type = "button", + Shape = "default", + IconWidth = 18, + IconHeight = 18 + }); + + CellType.TableName = GetUniqueDefaultTableName(context); + } + + public override FrameworkElement GetDrawingControl(ICellInfo cellInfo, IDrawingHelper drawingHelper) + { + var cellStyle = StyleHelper.CreateStyleViewModel(cellInfo, drawingHelper); + var control = new VirtualizedTableDrawingControl(cellStyle, CellType, drawingHelper); + return control; + } + + public override EditorSetting GetEditorSetting(PropertyDescriptor property, IBuilderContext builderContext) + { + if (property.Name == nameof(CellType.RowClickCommand) || + property.Name == nameof(CellType.RowDoubleClickCommand)) + { + var initParams = new Dictionary(); + var pointer = Resources.TableCellType_RowData + "."; + initParams.Add("dataRow", Resources.TableCellType_RowData); + + var dataSource = CellType.IsTreeTable ? CellType.BindingTreeTableOptions : CellType.BindingTableOptions; + + var fromBindingDataSource = CellType.IsTreeTable || CellType.AutoGenerateColumnsByDataSource; + + var columnNames = fromBindingDataSource + ? dataSource?.Columns.Select(x => x.ColumnName) + : CellType.Columns.Select(x => x.Name); + + var index = 0; + + if (columnNames != null) + { + foreach (var columnName in columnNames) + { + initParams.Add(columnName + index, pointer + columnName); + index++; + } + } + + return new HyperlinkEditorSetting(builderContext.CreateCustomCommand(initParams)); + } + + return base.GetEditorSetting(property, builderContext); + } + + public void PostGenerate(IBuilderContextBase builderContext) + { + if (!CellType.AutoGenerateColumnsByDataSource) + { + return; + } + + var columnSettings = new List(); + + if (!CellType.IsTreeTable && CellType.BindingTableOptions?.TableName != null) + { + var tables = new Dictionary(); + + foreach (var item in builderContext.EnumAllTableInfos()) + { + tables[item.TableName] = item; + } + + foreach (var item in CellType.BindingTableOptions.Columns) + { + var columnSetting = new VirtualizedTableColumnSetting + { + Label = item.ColumnName, + DataColumnName = item.ColumnName + }; + if (item.BindingInfo != null && + tables.TryGetValue(item.BindingInfo.GetLastTableName(), out var tableInfo)) + { + var column = + tableInfo.Columns.FirstOrDefault(i => i.ColumnName == item.BindingInfo.GetLastColumnName()); + if (column != null) + { + columnSetting.FormatStr = VirtualizedTableCellType.GetDefaultFormat(column.ColumnType); + } + else if (item.BindingInfo.ColumnName == "FGC_CreateDate" && + item.BindingInfo.GetExtendColumnName() == null) + { + columnSetting.FormatStr = + VirtualizedTableCellType.GetDefaultFormat(ForguncyTableColumnType.DateTime); + } + } + + columnSettings.Add(columnSetting); + } + + CellType.Columns = new List(columnSettings); + } + } + + private string GetUniqueDefaultTableName(IBuilderContext context) + { + var allElTableCellTypes = + context.EnumAllCellTypes(context.PageName).Where(x => x is VirtualizedTableCellType && x != CellType); + var allElTableNames = allElTableCellTypes + .Where(x => !string.IsNullOrEmpty((x as VirtualizedTableCellType)?.TableName)) + .Select(x => (x as VirtualizedTableCellType)?.TableName); + int order = 1; + while (true) + { + var name = string.Format(Resources.VirtualizedTableCellType_DefaultTableName, order); + var elTableNames = allElTableNames as string[] ?? allElTableNames.ToArray(); + if (elTableNames.Contains(name)) + { + order++; + } + else + { + return name; + } + } + } + + public IEnumerable CheckCellTypeErrors(IBuilderContext context) + { + if (string.IsNullOrEmpty(CellType.TableName)) + { + yield break; + } + + var allElTableCellTypes = + context.EnumAllCellTypes(context.PageName).Where(x => x is VirtualizedTableCellType && x != CellType); + var allElTableNames = allElTableCellTypes + .Where(x => !string.IsNullOrEmpty((x as VirtualizedTableCellType)?.TableName)) + .Select(x => (x as VirtualizedTableCellType)?.TableName); + if (allElTableNames.Contains(CellType.TableName)) + { + yield return new ForguncyErrorInfo() + { + Message = String.Format(Resources.TableCellType_TableNameDuplicateError, CellType.TableName), + ErrorType = ForguncyErrorType.Error + }; + } + } +} + +public class VirtualizedTableActionButton : ObjectPropertyBase, INamedObject +{ + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonType))] + [SRComboProperty(ValueList = "button|link|icon", + DisplayList = nameof(Resources.TableCellType_ActionButtonTypeDisplayList))] + public string Type { get; set; } = "button"; + + [Required] + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonText))] + public string Name { get; set; } + + private object _icon; + + [IconProperty] + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonIcon))] + public object Icon + { + get => _icon; + set + { + if (value is ImageValue or null) + { + _icon = value; + } + } + } + + [IntProperty(Min = 1)] + [DefaultValue(18)] + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonIconWidth))] + public int IconWidth { get; set; } = 18; + + [IntProperty(Min = 1)] + [DefaultValue(18)] + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonIconHeight))] + public int IconHeight { get; set; } = 18; + + [ColorProperty(SupportNoFill = true)] + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonStyle))] + public string StyleType { get; set; } + + [SRComboProperty(ValueList = "default|round|circle", + DisplayList = nameof(Resources.TableCellType_ActionButtonShapeDisplayList))] + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonShape))] + public string Shape { get; set; } = "default"; + + [SRDisplayName(nameof(Resources.TableCellType_ActionButtonCommand))] + [SRCustomCommandObject(InitParamProperties = "dataRow", InitParamValues = nameof(Resources.TableCellType_RowData))] + public object Commands { get; set; } + + public override bool GetDesignerPropertyVisible(string propertyName) + { + if (propertyName == nameof(Icon)) + { + return Type != "link"; + } + + if (propertyName == nameof(StyleType)) + { + return Type != "icon"; + } + + if (propertyName == nameof(Shape)) + { + return Type == "button"; + } + + if (propertyName is nameof(IconWidth) or nameof(IconHeight)) + { + return Type == "icon"; + } + + return base.GetDesignerPropertyVisible(propertyName); + } +} + +public class ExtraColumnSettings : ObjectPropertyBase +{ + [OrderWeight((int)OperationColumnSettingOrderWeight.Label)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnName))] + public virtual string Label { get; set; } + + [OrderWeight((int)OperationColumnSettingOrderWeight.Width)] + [DefaultValue(null)] + [IntProperty(Min = 1, AllowNull = true)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnWidth))] + public int? Width { get; set; } + + [OrderWeight((int)OperationColumnSettingOrderWeight.Align)] + [SRComboProperty(ValueList = "left|center|right", + DisplayList = nameof(Resources.TableCellType_ColumnAlignDisplayList))] + [SRDisplayName(nameof(Resources.TableCellType_ColumnAlign))] + public string Align { get; set; } + + [SRDisplayName(nameof(Resources.TableCellType_Fixed))] + [OrderWeight((int)OperationColumnSettingOrderWeight.Fixed)] + [SRComboProperty(ValueList = "none|left|right", + DisplayList = nameof(Resources.TableCellType_Fixed_Display))] + public string Fixed { get; set; } + + [OrderWeight((int)OperationColumnSettingOrderWeight.HeaderAlign)] + [SRDisplayName(nameof(Resources.TableCellType_ColumnHeaderAlign))] + [SRComboProperty(ValueList = "left|center|right", + DisplayList = nameof(Resources.TableCellType_ColumnAlignDisplayList))] + public string HeaderAlign { get; set; } +} + +public class SelectColumnSettings : ExtraColumnSettings +{ + [Browsable(false)] [JsonIgnore] public override string Label { get; set; } +} + +public class OperationColumnSettings : ExtraColumnSettings +{ + [OrderWeight((int)OperationColumnSettingOrderWeight.ActionButtons)] + [SRObjectListProperty(DefaultName = nameof(Resources.TableCellType_Button), + ItemType = typeof(VirtualizedTableActionButton))] + [SRDisplayName(nameof(Resources.TableCellType_ConfigActionButtons))] + [DiffTypeNameIgnore] + public List ActionButtons { get; set; } = new(); +} + +public enum OperationColumnSettingOrderWeight +{ + Label, + Width, + Align, + Fixed, + HeaderAlign, + ActionButtons, +} + +public enum VirtualizedTableColumnSettingOrderWeight +{ + Label, + DataColumnName, + FormatStr, + Width, + Fixed, + Align, + HeaderAlign, + Sortable, + Filter, + MultipleFilter +} \ No newline at end of file diff --git a/Commands/ELCommandBase.cs b/Commands/ELCommandBase.cs index 9f27471d647b7522f45b0b7a5ea294cab4cca902..8aa0fe19baa8801aad17993d9857e6315980ca4d 100644 --- a/Commands/ELCommandBase.cs +++ b/Commands/ELCommandBase.cs @@ -11,14 +11,14 @@ using System.Threading.Tasks; namespace ElementUI { - [DependenceRuntimModule("vue3")] - [SRCategory(nameof(Resources.ElementUI_DisplayName))] - [CommandSupportUsingScope(CommandPageScope.AllPCPage)] + [DependenceRuntimeModule("vue3")] + [SRCategory(nameof(Resources.ElementUI_DisplayName))] + [CommandSupportUsingScope(CommandPageScope.AllPCPage)] public abstract class ELCommandBase : Command { public override CommandScope GetCommandScope() { - return CommandScope.Cell | CommandScope.ListView | CommandScope.PageLoad | CommandScope.ShareCommand; + return CommandScope.Cell | CommandScope.ListView | CommandScope.PageLoad | CommandScope.ShareCommand | CommandScope.ValueChangedCommandInListview; } } } diff --git a/ElementUI.csproj b/ElementUI.csproj index d0a51a95fba3b7458095866d710ad466b81cd8c7..d7e55257e9c1100c714cf40d4755174107602081 100644 --- a/ElementUI.csproj +++ b/ElementUI.csproj @@ -1,407 +1,181 @@ - - - - - Debug - AnyCPU - {8610D734-E7C8-4041-9E42-1224922EEE06} - Library - Properties - ElementUI - ElementUI - v4.7.2 - 512 - SAK - SAK - SAK - SAK - - true - Latest - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - False - True - True - ES5 - None - - False - Resources/dist.js - - False - True - - - - - pdbonly - true - bin\ - TRACE - prompt - 4 - - - true - - - key.snk - - - - C:\Program Files\Forguncy 8\Website\designerBin\Forguncy.Commands.dll - False - - - C:\Program Files\Forguncy 8\Website\designerBin\GrapeCity.Forguncy.CellTypes.dll - False - - - C:\Program Files\Forguncy 8\Website\designerBin\GrapeCity.Forguncy.CellTypes.Design.dll - False - - - C:\Program Files\Forguncy 8\Website\designerBin\GrapeCity.Forguncy.Plugin.dll - False - - - C:\Program Files\Forguncy 8\Website\designerBin\GrapeCity.Forguncy.Plugin.Design.dll - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Resources.resx - - - CellStyleTextBlock.xaml - - - BackupTopDrawingObject.xaml - - - AvatarDrawingObject.xaml - - - BreadcrumbDrawingObject.xaml - - - TabHeaderDrawingObject.xaml - - - TagDrawingObject.xaml - - - CalendarCellTypeDrawingControl.xaml - - - - DateTimePickerDrawingControl.xaml - - - PaginationDrawingControl.xaml - - - TimelineDrawingControl.xaml - - - NavMenuDrawingControl.xaml - - - RateDrawingObject.xaml - - - StepsDrawingControl.xaml - - - UploadFileDrawingObject.xaml - - - UploadPictureListDrawingObject.xaml - - - DialogWindow.xaml - - - InputNumberDrawingControl.xaml - - - InputBoxDrawingControl.xaml - - - CircleProgressDrawingObject.xaml - - - LineProgressDrawingObject.xaml - - - SliderDrawingControl.xaml - - - TransferDrawingControl.xaml - - - TransferListControl.xaml - - - - - PreserveNewest - - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - Resources.resx - - - PublicResXFileCodeGenerator - Designer - Resources.Designer.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 13.0.1 - runtime - compile; build; native; contentfiles; analyzers; buildtransitive - - - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - - - "$(ProjectDir)PackageTool\PluginPackageTool.exe" "$(ProjectDir)\" "$(ConfigurationName)" - + + + net6.0-windows + Library + SAK + SAK + SAK + SAK + true + false + true + true + true + false + + + bin\ + + + bin\ + + + true + + + key.snk + + + + + PreserveNewest + + + + + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + 13.0.1 + runtime + compile; build; native; contentfiles; analyzers; buildtransitive + + + + + + + ReferForguncyDLL\Forguncy.Commands.dll + False + + + ReferForguncyDLL\GrapeCity.Forguncy.CellTypes.dll + False + + + ReferForguncyDLL\GrapeCity.Forguncy.CellTypes.Design.dll + False + + + ReferForguncyDLL\GrapeCity.Forguncy.Plugin.dll + False + + + ReferForguncyDLL\GrapeCity.Forguncy.Plugin.Design.dll + False + + + + + + True + True + Resources.resx + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + MSBuild:Compile + Wpf + Designer + + + + + \ No newline at end of file diff --git a/PackageTool/PluginPackageTool.deps.json b/PackageTool/ForguncyPluginPackageTool.deps.json similarity index 30% rename from PackageTool/PluginPackageTool.deps.json rename to PackageTool/ForguncyPluginPackageTool.deps.json index 96c87c49dde24f102b3a89f2c8e3851f1aa113b2..4db428cfc8eae9b21669c90da0736b6f2bbaf097 100644 --- a/PackageTool/PluginPackageTool.deps.json +++ b/PackageTool/ForguncyPluginPackageTool.deps.json @@ -1,23 +1,41 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v6.0", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v6.0": { - "PluginPackageTool/1.0.0": { - "runtime": { - "PluginPackageTool.dll": {} - } - } - } - }, - "libraries": { - "PluginPackageTool/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - } - } +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v6.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v6.0": { + "ForguncyPluginPackageTool/1.0.0": { + "dependencies": { + "Newtonsoft.Json": "13.0.1" + }, + "runtime": { + "ForguncyPluginPackageTool.dll": {} + } + }, + "Newtonsoft.Json/13.0.1": { + "runtime": { + "lib/netstandard2.0/Newtonsoft.Json.dll": { + "assemblyVersion": "13.0.0.0", + "fileVersion": "13.0.1.25517" + } + } + } + } + }, + "libraries": { + "ForguncyPluginPackageTool/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "Newtonsoft.Json/13.0.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==", + "path": "newtonsoft.json/13.0.1", + "hashPath": "newtonsoft.json.13.0.1.nupkg.sha512" + } + } } \ No newline at end of file diff --git a/PackageTool/ForguncyPluginPackageTool.dll b/PackageTool/ForguncyPluginPackageTool.dll new file mode 100644 index 0000000000000000000000000000000000000000..9956ef19683d8390da30210f9e3fcb31fd02ffdb Binary files /dev/null and b/PackageTool/ForguncyPluginPackageTool.dll differ diff --git a/PackageTool/ForguncyPluginPackageTool.exe b/PackageTool/ForguncyPluginPackageTool.exe new file mode 100644 index 0000000000000000000000000000000000000000..f489f9e22d8ec10950eca0744326bb94d1bd2c6e Binary files /dev/null and b/PackageTool/ForguncyPluginPackageTool.exe differ diff --git a/PackageTool/ForguncyPluginPackageTool.runtimeconfig.json b/PackageTool/ForguncyPluginPackageTool.runtimeconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..4986d16ee61c8c404217a18f260bf3a9f8a944b5 --- /dev/null +++ b/PackageTool/ForguncyPluginPackageTool.runtimeconfig.json @@ -0,0 +1,9 @@ +{ + "runtimeOptions": { + "tfm": "net6.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "6.0.0" + } + } +} \ No newline at end of file diff --git a/PackageTool/Newtonsoft.Json.dll b/PackageTool/Newtonsoft.Json.dll new file mode 100644 index 0000000000000000000000000000000000000000..1ffeabe658acc1d8a23ac7545ae329814a7e0f2f Binary files /dev/null and b/PackageTool/Newtonsoft.Json.dll differ diff --git a/PackageTool/PluginAnalyzer.deps.json b/PackageTool/PluginAnalyzer.deps.json new file mode 100644 index 0000000000000000000000000000000000000000..64e236848ff2bcc5840998664677e7f31e2a5149 --- /dev/null +++ b/PackageTool/PluginAnalyzer.deps.json @@ -0,0 +1,315 @@ +{ + "runtimeTarget": { + "name": ".NETStandard,Version=v2.0/", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETStandard,Version=v2.0": {}, + ".NETStandard,Version=v2.0/": { + "PluginAnalyzer/1.0.0": { + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "2.9.8", + "Microsoft.CodeAnalysis.CSharp": "3.3.1", + "NETStandard.Library": "2.0.3" + }, + "runtime": { + "PluginAnalyzer.dll": {} + } + }, + "Microsoft.CodeAnalysis.Analyzers/2.9.8": {}, + "Microsoft.CodeAnalysis.Common/3.3.1": { + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "2.9.8", + "System.Collections.Immutable": "1.5.0", + "System.Memory": "4.5.3", + "System.Reflection.Metadata": "1.6.0", + "System.Runtime.CompilerServices.Unsafe": "4.5.2", + "System.Text.Encoding.CodePages": "4.5.1", + "System.Threading.Tasks.Extensions": "4.5.3" + }, + "runtime": { + "lib/netstandard2.0/Microsoft.CodeAnalysis.dll": { + "assemblyVersion": "3.3.0.0", + "fileVersion": "3.300.119.46211" + } + }, + "resources": { + "lib/netstandard2.0/cs/Microsoft.CodeAnalysis.resources.dll": { + "locale": "cs" + }, + "lib/netstandard2.0/de/Microsoft.CodeAnalysis.resources.dll": { + "locale": "de" + }, + "lib/netstandard2.0/es/Microsoft.CodeAnalysis.resources.dll": { + "locale": "es" + }, + "lib/netstandard2.0/fr/Microsoft.CodeAnalysis.resources.dll": { + "locale": "fr" + }, + "lib/netstandard2.0/it/Microsoft.CodeAnalysis.resources.dll": { + "locale": "it" + }, + "lib/netstandard2.0/ja/Microsoft.CodeAnalysis.resources.dll": { + "locale": "ja" + }, + "lib/netstandard2.0/ko/Microsoft.CodeAnalysis.resources.dll": { + "locale": "ko" + }, + "lib/netstandard2.0/pl/Microsoft.CodeAnalysis.resources.dll": { + "locale": "pl" + }, + "lib/netstandard2.0/pt-BR/Microsoft.CodeAnalysis.resources.dll": { + "locale": "pt-BR" + }, + "lib/netstandard2.0/ru/Microsoft.CodeAnalysis.resources.dll": { + "locale": "ru" + }, + "lib/netstandard2.0/tr/Microsoft.CodeAnalysis.resources.dll": { + "locale": "tr" + }, + "lib/netstandard2.0/zh-Hans/Microsoft.CodeAnalysis.resources.dll": { + "locale": "zh-Hans" + }, + "lib/netstandard2.0/zh-Hant/Microsoft.CodeAnalysis.resources.dll": { + "locale": "zh-Hant" + } + } + }, + "Microsoft.CodeAnalysis.CSharp/3.3.1": { + "dependencies": { + "Microsoft.CodeAnalysis.Common": "3.3.1" + }, + "runtime": { + "lib/netstandard2.0/Microsoft.CodeAnalysis.CSharp.dll": { + "assemblyVersion": "3.3.0.0", + "fileVersion": "3.300.119.46211" + } + }, + "resources": { + "lib/netstandard2.0/cs/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "cs" + }, + "lib/netstandard2.0/de/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "de" + }, + "lib/netstandard2.0/es/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "es" + }, + "lib/netstandard2.0/fr/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "fr" + }, + "lib/netstandard2.0/it/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "it" + }, + "lib/netstandard2.0/ja/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "ja" + }, + "lib/netstandard2.0/ko/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "ko" + }, + "lib/netstandard2.0/pl/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "pl" + }, + "lib/netstandard2.0/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "pt-BR" + }, + "lib/netstandard2.0/ru/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "ru" + }, + "lib/netstandard2.0/tr/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "tr" + }, + "lib/netstandard2.0/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "zh-Hans" + }, + "lib/netstandard2.0/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll": { + "locale": "zh-Hant" + } + } + }, + "Microsoft.NETCore.Platforms/1.1.0": {}, + "NETStandard.Library/2.0.3": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0" + } + }, + "System.Buffers/4.4.0": { + "runtime": { + "lib/netstandard2.0/System.Buffers.dll": { + "assemblyVersion": "4.0.2.0", + "fileVersion": "4.6.25519.3" + } + } + }, + "System.Collections.Immutable/1.5.0": { + "runtime": { + "lib/netstandard2.0/System.Collections.Immutable.dll": { + "assemblyVersion": "1.2.3.0", + "fileVersion": "4.6.26515.6" + } + } + }, + "System.Memory/4.5.3": { + "dependencies": { + "System.Buffers": "4.4.0", + "System.Numerics.Vectors": "4.4.0", + "System.Runtime.CompilerServices.Unsafe": "4.5.2" + }, + "runtime": { + "lib/netstandard2.0/System.Memory.dll": { + "assemblyVersion": "4.0.1.1", + "fileVersion": "4.6.27617.2" + } + } + }, + "System.Numerics.Vectors/4.4.0": { + "runtime": { + "lib/netstandard2.0/System.Numerics.Vectors.dll": { + "assemblyVersion": "4.1.3.0", + "fileVersion": "4.6.25519.3" + } + } + }, + "System.Reflection.Metadata/1.6.0": { + "dependencies": { + "System.Collections.Immutable": "1.5.0" + }, + "runtime": { + "lib/netstandard2.0/System.Reflection.Metadata.dll": { + "assemblyVersion": "1.4.3.0", + "fileVersion": "4.6.26515.6" + } + } + }, + "System.Runtime.CompilerServices.Unsafe/4.5.2": { + "runtime": { + "lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": { + "assemblyVersion": "4.0.4.1", + "fileVersion": "4.6.26919.2" + } + } + }, + "System.Text.Encoding.CodePages/4.5.1": { + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "4.5.2" + }, + "runtime": { + "lib/netstandard2.0/System.Text.Encoding.CodePages.dll": { + "assemblyVersion": "4.1.1.0", + "fileVersion": "4.6.27129.4" + } + } + }, + "System.Threading.Tasks.Extensions/4.5.3": { + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "4.5.2" + }, + "runtime": { + "lib/netstandard2.0/System.Threading.Tasks.Extensions.dll": { + "assemblyVersion": "4.2.0.1", + "fileVersion": "4.6.27818.1" + } + } + } + } + }, + "libraries": { + "PluginAnalyzer/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "Microsoft.CodeAnalysis.Analyzers/2.9.8": { + "type": "package", + "serviceable": true, + "sha512": "sha512-7ZFIPFQRcL9VEkhm2v7bsIV5Klz/NwvLzhzB/1bEXjvsuTiQA3I9vSS9DOQOMt+iGhT6jxa+djBc6PmSXgIvNw==", + "path": "microsoft.codeanalysis.analyzers/2.9.8", + "hashPath": "microsoft.codeanalysis.analyzers.2.9.8.nupkg.sha512" + }, + "Microsoft.CodeAnalysis.Common/3.3.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-N5yQdGy+M4kimVG7hwCeGTCfgYjK2o5b/Shumkb/rCC+/SAkvP1HUAYK+vxPFS7dLJNtXLRsmPHKj3fnyNWnrw==", + "path": "microsoft.codeanalysis.common/3.3.1", + "hashPath": "microsoft.codeanalysis.common.3.3.1.nupkg.sha512" + }, + "Microsoft.CodeAnalysis.CSharp/3.3.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-WDUIhTHem38H6VJ98x2Ssq0fweakJHnHYl7vbG8ARnsAwLoJKCQCy78EeY1oRrCKG42j0v6JVljKkeqSDA28UA==", + "path": "microsoft.codeanalysis.csharp/3.3.1", + "hashPath": "microsoft.codeanalysis.csharp.3.3.1.nupkg.sha512" + }, + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", + "path": "microsoft.netcore.platforms/1.1.0", + "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" + }, + "NETStandard.Library/2.0.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", + "path": "netstandard.library/2.0.3", + "hashPath": "netstandard.library.2.0.3.nupkg.sha512" + }, + "System.Buffers/4.4.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-AwarXzzoDwX6BgrhjoJsk6tUezZEozOT5Y9QKF94Gl4JK91I4PIIBkBco9068Y9/Dra8Dkbie99kXB8+1BaYKw==", + "path": "system.buffers/4.4.0", + "hashPath": "system.buffers.4.4.0.nupkg.sha512" + }, + "System.Collections.Immutable/1.5.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-EXKiDFsChZW0RjrZ4FYHu9aW6+P4MCgEDCklsVseRfhoO0F+dXeMSsMRAlVXIo06kGJ/zv+2w1a2uc2+kxxSaQ==", + "path": "system.collections.immutable/1.5.0", + "hashPath": "system.collections.immutable.1.5.0.nupkg.sha512" + }, + "System.Memory/4.5.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==", + "path": "system.memory/4.5.3", + "hashPath": "system.memory.4.5.3.nupkg.sha512" + }, + "System.Numerics.Vectors/4.4.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==", + "path": "system.numerics.vectors/4.4.0", + "hashPath": "system.numerics.vectors.4.4.0.nupkg.sha512" + }, + "System.Reflection.Metadata/1.6.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==", + "path": "system.reflection.metadata/1.6.0", + "hashPath": "system.reflection.metadata.1.6.0.nupkg.sha512" + }, + "System.Runtime.CompilerServices.Unsafe/4.5.2": { + "type": "package", + "serviceable": true, + "sha512": "sha512-wprSFgext8cwqymChhrBLu62LMg/1u92bU+VOwyfBimSPVFXtsNqEWC92Pf9ofzJFlk4IHmJA75EDJn1b2goAQ==", + "path": "system.runtime.compilerservices.unsafe/4.5.2", + "hashPath": "system.runtime.compilerservices.unsafe.4.5.2.nupkg.sha512" + }, + "System.Text.Encoding.CodePages/4.5.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-4J2JQXbftjPMppIHJ7IC+VXQ9XfEagN92vZZNoG12i+zReYlim5dMoXFC1Zzg7tsnKDM7JPo5bYfFK4Jheq44w==", + "path": "system.text.encoding.codepages/4.5.1", + "hashPath": "system.text.encoding.codepages.4.5.1.nupkg.sha512" + }, + "System.Threading.Tasks.Extensions/4.5.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-+MvhNtcvIbqmhANyKu91jQnvIRVSTiaOiFNfKWwXGHG48YAb4I/TyH8spsySiPYla7gKal5ZnF3teJqZAximyQ==", + "path": "system.threading.tasks.extensions/4.5.3", + "hashPath": "system.threading.tasks.extensions.4.5.3.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/PackageTool/PluginAnalyzer.dll b/PackageTool/PluginAnalyzer.dll new file mode 100644 index 0000000000000000000000000000000000000000..0be9d23987056a30d01ed7e4a0984f7821f4e111 Binary files /dev/null and b/PackageTool/PluginAnalyzer.dll differ diff --git a/PackageTool/PluginPackageTool.dll b/PackageTool/PluginPackageTool.dll deleted file mode 100644 index c151878d1c3a40c0644c5196fae251154f3b0d5b..0000000000000000000000000000000000000000 Binary files a/PackageTool/PluginPackageTool.dll and /dev/null differ diff --git a/PackageTool/PluginPackageTool.dll.config b/PackageTool/PluginPackageTool.dll.config deleted file mode 100644 index ecdcf8a54da312b76ada87a3054152b813ce1f9d..0000000000000000000000000000000000000000 --- a/PackageTool/PluginPackageTool.dll.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/PackageTool/PluginPackageTool.exe b/PackageTool/PluginPackageTool.exe deleted file mode 100644 index 63c6b84f9e18f5b41952240e2e5260fa48c62cdc..0000000000000000000000000000000000000000 Binary files a/PackageTool/PluginPackageTool.exe and /dev/null differ diff --git a/PackageTool/PluginPackageTool.runtimeconfig.json b/PackageTool/PluginPackageTool.runtimeconfig.json deleted file mode 100644 index b6062ae513412ec8acb6012e7be1c80fc48400e7..0000000000000000000000000000000000000000 --- a/PackageTool/PluginPackageTool.runtimeconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "runtimeOptions": { - "tfm": "net6.0", - "frameworks": [ - { - "name": "Microsoft.NETCore.App", - "version": "6.0.0" - }, - { - "name": "Microsoft.WindowsDesktop.App", - "version": "6.0.0" - } - ] - } -} \ No newline at end of file diff --git a/PluginConfig.json b/PluginConfig.json index e7a3668fa91f49d6f0ac971b5b85b1394c6df920..d4be7ffc44a820a2eb4c1c96a2ff77dcd4d43381 100644 --- a/PluginConfig.json +++ b/PluginConfig.json @@ -3,18 +3,19 @@ "ElementUI.dll" ], "javascript": [ - "Resources/element-plus@2.1.11.js", + "Resources/element-plus@2.3.8.js", "Resources/locales/zhCN.js", "Resources/locales/en.js", "Resources/locales/ja.js", "Resources/locales/ko.js", - "Resources/dist.js" + "Resources/dist.js", + "Resources/bignumber.min.js" ], "css": [ - "Resources/element-plus@2.1.11.css", + "Resources/element-plus@2.3.8.css", "Resources/customUI.css" ], - "image": "Resources/Images/ElementUI.png", + "image": "Resources/images/ElementUI.png", "description": "ElementUI Components", "description_ja": "", "description_cn": "ElementUI 组件。", @@ -25,8 +26,8 @@ "name_kr": "엘리멘트UI", "pluginType": "cellType,command", "guid": "2CCB2F02-D923-491E-94E4-72C9BD8C5ABE", - "version": "8.0.1.0", - "dependenceVersion": "8.0.1.0", + "version": "9.0.103.0", + "dependenceVersion": "9.0.102.0", "bundleJavaScript": false, "bundleCSS": true -} \ No newline at end of file +} diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 47e999f235271b34317a988749735545d4e63637..548f2778665b8085a52a5f3c1c063d253a61741a 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -69,6 +68,15 @@ namespace ElementUI.Properties { } } + /// + /// Looks up a localized string similar to At least select on item. + /// + public static string AtLeastSelectOneItem { + get { + return ResourceManager.GetString("AtLeastSelectOneItem", resourceCulture); + } + } + /// /// Looks up a localized string similar to Avatar. /// @@ -880,6 +888,15 @@ namespace ElementUI.Properties { } } + /// + /// Looks up a localized string similar to Children. + /// + public static string Children_Diff { + get { + return ResourceManager.GetString("Children_Diff", resourceCulture); + } + } + /// /// Looks up a localized string similar to Edit Commands. /// @@ -944,7 +961,7 @@ namespace ElementUI.Properties { } /// - /// Looks up a localized string similar to Week WW. + /// Looks up a localized string similar to [Week] WW. /// public static string Data_DefautWeekFormat { get { @@ -1194,6 +1211,15 @@ namespace ElementUI.Properties { } } + /// + /// Looks up a localized string similar to None. + /// + public static string ElementCellType_None { + get { + return ResourceManager.GetString("ElementCellType_None", resourceCulture); + } + } + /// /// Looks up a localized string similar to ElementPlus. /// @@ -1248,6 +1274,15 @@ namespace ElementUI.Properties { } } + /// + /// Looks up a localized string similar to IconProperty. + /// + public static string IconProperty { + get { + return ResourceManager.GetString("IconProperty", resourceCulture); + } + } + /// /// Looks up a localized string similar to Input. /// @@ -1563,6 +1598,33 @@ namespace ElementUI.Properties { } } + /// + /// Looks up a localized string similar to Allow Everyone. + /// + public static string MenuItemsEditor_AllRoleCanAccess { + get { + return ResourceManager.GetString("MenuItemsEditor_AllRoleCanAccess", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Anonymous. + /// + public static string MenuItemsEditor_Anonymous { + get { + return ResourceManager.GetString("MenuItemsEditor_Anonymous", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Authenticated Users. + /// + public static string MenuItemsEditor_LoginUser { + get { + return ResourceManager.GetString("MenuItemsEditor_LoginUser", resourceCulture); + } + } + /// /// Looks up a localized string similar to Reload Binding Items. /// @@ -1753,6 +1815,15 @@ namespace ElementUI.Properties { } } + /// + /// Looks up a localized string similar to If you do not set a label property name, the value property is considered equal. + /// + public static string NavMenuCellType_labelProperty_Description { + get { + return ResourceManager.GetString("NavMenuCellType_labelProperty_Description", resourceCulture); + } + } + /// /// Looks up a localized string similar to Menu Trigger. /// @@ -1826,7 +1897,16 @@ namespace ElementUI.Properties { } /// - /// Looks up a localized string similar to Edit ValueChanged Command. + /// Looks up a localized string similar to UI Permission. + /// + public static string NavMenuCellType_Permission { + get { + return ResourceManager.GetString("NavMenuCellType_Permission", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Edit Selection Command. /// public static string NavMenuCellType_SelectCommand { get { @@ -1916,7 +1996,7 @@ namespace ElementUI.Properties { } /// - /// Looks up a localized string similar to Not Limit. + /// Looks up a localized string similar to Unlimited. /// public static string NoLimit { get { @@ -2086,6 +2166,15 @@ namespace ElementUI.Properties { } } + /// + /// Looks up a localized string similar to Element Table. + /// + public static string PaginationCellType_ElementTable { + get { + return ResourceManager.GetString("PaginationCellType_ElementTable", resourceCulture); + } + } + /// /// Looks up a localized string similar to ExecuteCommand. /// @@ -2239,6 +2328,15 @@ namespace ElementUI.Properties { } } + /// + /// Looks up a localized string similar to Select Element Table. + /// + public static string PaginationCellType_SelectElementTable { + get { + return ResourceManager.GetString("PaginationCellType_SelectElementTable", resourceCulture); + } + } + /// /// Looks up a localized string similar to SetCurrentPageIndex. /// @@ -2293,6 +2391,15 @@ namespace ElementUI.Properties { } } + /// + /// Looks up a localized string similar to The pagination function is only applicable to regular table mode and cannot be used in tree-like table mode. To ensure the proper functioning of your system and to achieve the best user experience, you need to bind the pagination plugin to a regular table.. + /// + public static string PaginationErrorBindingTreeTable { + get { + return ResourceManager.GetString("PaginationErrorBindingTreeTable", resourceCulture); + } + } + /// /// Looks up a localized string similar to Go to. /// @@ -2707,6 +2814,15 @@ namespace ElementUI.Properties { } } + /// + /// Looks up a localized string similar to Select text content on focus. + /// + public static string SelectAllOnFocus { + get { + return ResourceManager.GetString("SelectAllOnFocus", resourceCulture); + } + } + /// /// Looks up a localized string similar to Allow Create. /// @@ -3080,6 +3196,15 @@ namespace ElementUI.Properties { } } + /// + /// Looks up a localized string similar to ShowMenuItems. + /// + public static string ShowItems_Display { + get { + return ResourceManager.GetString("ShowItems_Display", resourceCulture); + } + } + /// /// Looks up a localized string similar to ShowMessage. /// @@ -3297,7 +3422,7 @@ namespace ElementUI.Properties { } /// - /// Looks up a localized string similar to Click OK to return the result as confirm, click Cancel to return the result as cancel, click Close button to return the result as close. + /// Looks up a localized string similar to Clicking on OK returns confirm, clicking on cancel and close returns cancel by default, if the "Distinguish Cancel And Close" box is checked, then clicking on cancel returns cancel and close returns close.. /// public static string ShowMessageBox_DialogResultDescription { get { @@ -4016,6 +4141,15 @@ namespace ElementUI.Properties { } } + /// + /// Looks up a localized string similar to ShowItems. + /// + public static string TabHeader_ShowItems_Display { + get { + return ResourceManager.GetString("TabHeader_ShowItems_Display", resourceCulture); + } + } + /// /// Looks up a localized string similar to Stretch. /// @@ -4098,850 +4232,2116 @@ namespace ElementUI.Properties { } /// - /// Looks up a localized string similar to Tag. + /// Looks up a localized string similar to Edit Command. /// - public static string Tag { + public static string TableCellType_ActionButtonCommand { get { - return ResourceManager.GetString("Tag", resourceCulture); + return ResourceManager.GetString("TableCellType_ActionButtonCommand", resourceCulture); } } /// - /// Looks up a localized string similar to Config Add Button Settings. + /// Looks up a localized string similar to Icon. /// - public static string Tag_addButtonSettings { + public static string TableCellType_ActionButtonIcon { get { - return ResourceManager.GetString("Tag_addButtonSettings", resourceCulture); + return ResourceManager.GetString("TableCellType_ActionButtonIcon", resourceCulture); } } /// - /// Looks up a localized string similar to Allow Add. + /// Looks up a localized string similar to Icon Height. /// - public static string Tag_allowAdd { + public static string TableCellType_ActionButtonIconHeight { get { - return ResourceManager.GetString("Tag_allowAdd", resourceCulture); + return ResourceManager.GetString("TableCellType_ActionButtonIconHeight", resourceCulture); } } /// - /// Looks up a localized string similar to Edit Click Command. + /// Looks up a localized string similar to Icon Width. /// - public static string Tag_ClickCommand { + public static string TableCellType_ActionButtonIconWidth { get { - return ResourceManager.GetString("Tag_ClickCommand", resourceCulture); + return ResourceManager.GetString("TableCellType_ActionButtonIconWidth", resourceCulture); } } /// - /// Looks up a localized string similar to Config Color List. + /// Looks up a localized string similar to Shape. /// - public static string Tag_ColorList { + public static string TableCellType_ActionButtonShape { get { - return ResourceManager.GetString("Tag_ColorList", resourceCulture); + return ResourceManager.GetString("TableCellType_ActionButtonShape", resourceCulture); } } /// - /// Looks up a localized string similar to Disable Transitions. + /// Looks up a localized string similar to default|round|circle. /// - public static string Tag_disableTransitions { + public static string TableCellType_ActionButtonShapeDisplayList { get { - return ResourceManager.GetString("Tag_disableTransitions", resourceCulture); + return ResourceManager.GetString("TableCellType_ActionButtonShapeDisplayList", resourceCulture); } } /// - /// Looks up a localized string similar to Distinct. + /// Looks up a localized string similar to Style. /// - public static string Tag_distinct { + public static string TableCellType_ActionButtonStyle { get { - return ResourceManager.GetString("Tag_distinct", resourceCulture); + return ResourceManager.GetString("TableCellType_ActionButtonStyle", resourceCulture); } } /// - /// Looks up a localized string similar to Effect. + /// Looks up a localized string similar to Text. /// - public static string Tag_effect { + public static string TableCellType_ActionButtonText { get { - return ResourceManager.GetString("Tag_effect", resourceCulture); + return ResourceManager.GetString("TableCellType_ActionButtonText", resourceCulture); } } /// - /// Looks up a localized string similar to Hit. + /// Looks up a localized string similar to Type. /// - public static string Tag_hit { + public static string TableCellType_ActionButtonType { get { - return ResourceManager.GetString("Tag_hit", resourceCulture); + return ResourceManager.GetString("TableCellType_ActionButtonType", resourceCulture); } } /// - /// Looks up a localized string similar to Item Space. + /// Looks up a localized string similar to Button|Link|Icon. /// - public static string Tag_itemSpace { + public static string TableCellType_ActionButtonTypeDisplayList { get { - return ResourceManager.GetString("Tag_itemSpace", resourceCulture); + return ResourceManager.GetString("TableCellType_ActionButtonTypeDisplayList", resourceCulture); } } /// - /// Looks up a localized string similar to Read Only. + /// Looks up a localized string similar to Generate Columns By Data Source Automatically. /// - public static string Tag_ReadOnly { + public static string TableCellType_AutoGenerateColumnByDataSource { get { - return ResourceManager.GetString("Tag_ReadOnly", resourceCulture); + return ResourceManager.GetString("TableCellType_AutoGenerateColumnByDataSource", resourceCulture); } } /// - /// Looks up a localized string similar to Separator. + /// Looks up a localized string similar to Vertical Border. /// - public static string Tag_separator { + public static string TableCellType_Border { get { - return ResourceManager.GetString("Tag_separator", resourceCulture); + return ResourceManager.GetString("TableCellType_Border", resourceCulture); } } /// - /// Looks up a localized string similar to Size. + /// Looks up a localized string similar to Button. /// - public static string Tag_size { + public static string TableCellType_Button { get { - return ResourceManager.GetString("Tag_size", resourceCulture); + return ResourceManager.GetString("TableCellType_Button", resourceCulture); } } /// - /// Looks up a localized string similar to Space. + /// Looks up a localized string similar to Clear Filter. /// - public static string Tag_space { + public static string TableCellType_ClearFilter { get { - return ResourceManager.GetString("Tag_space", resourceCulture); + return ResourceManager.GetString("TableCellType_ClearFilter", resourceCulture); } } /// - /// Looks up a localized string similar to Text. + /// Looks up a localized string similar to Clear Selection. /// - public static string Tag_text { + public static string TableCellType_ClearSelection { get { - return ResourceManager.GetString("Tag_text", resourceCulture); + return ResourceManager.GetString("TableCellType_ClearSelection", resourceCulture); } } /// - /// Looks up a localized string similar to Width. + /// Looks up a localized string similar to Clear Sort. /// - public static string Tag_width { + public static string TableCellType_ClearSort { get { - return ResourceManager.GetString("Tag_width", resourceCulture); + return ResourceManager.GetString("TableCellType_ClearSort", resourceCulture); } } /// - /// Looks up a localized string similar to + New Tag. + /// Looks up a localized string similar to Column Align. /// - public static string TagCellType_addButtonText_DefaultValue { + public static string TableCellType_ColumnAlign { get { - return ResourceManager.GetString("TagCellType_addButtonText_DefaultValue", resourceCulture); + return ResourceManager.GetString("TableCellType_ColumnAlign", resourceCulture); } } /// - /// Looks up a localized string similar to TagName. + /// Looks up a localized string similar to left|center|right. /// - public static string TagCellType_ClickCommand_InitParamValues { + public static string TableCellType_ColumnAlignDisplayList { get { - return ResourceManager.GetString("TagCellType_ClickCommand_InitParamValues", resourceCulture); + return ResourceManager.GetString("TableCellType_ColumnAlignDisplayList", resourceCulture); } } /// - /// Looks up a localized string similar to The color of the tag cycles from the first color in the color list. - ///For example, the color list has 3 items, the first three tags will use the first three colors, the fourth will use the first color, and so on. - ///If you want all tags to be the same color, you can keep one item in the color list. + /// Looks up a localized string similar to Fit Column Width Automatically. /// - public static string TagCellType_ColorList_Description { + public static string TableCellType_ColumnAutoSize { get { - return ResourceManager.GetString("TagCellType_ColorList_Description", resourceCulture); + return ResourceManager.GetString("TableCellType_ColumnAutoSize", resourceCulture); } } /// - /// Looks up a localized string similar to Tag 1,Tag 2,Tag 3. + /// Looks up a localized string similar to Format String. /// - public static string TagCellType_DefaultValue { + public static string TableCellType_ColumnFormatString { get { - return ResourceManager.GetString("TagCellType_DefaultValue", resourceCulture); + return ResourceManager.GetString("TableCellType_ColumnFormatString", resourceCulture); } } /// - /// Looks up a localized string similar to If the label text is duplicated, only the first item is displayed. + /// Looks up a localized string similar to yyyy/MM/dd|HH:mm. /// - public static string TagCellType_distinct_Description { + public static string TableCellType_ColumnFormatStringValueList { get { - return ResourceManager.GetString("TagCellType_distinct_Description", resourceCulture); + return ResourceManager.GetString("TableCellType_ColumnFormatStringValueList", resourceCulture); } } /// - /// Looks up a localized string similar to Dark|Light|Plain. + /// Looks up a localized string similar to Column Header Align. /// - public static string TagCellType_effect_DisplayList { + public static string TableCellType_ColumnHeaderAlign { get { - return ResourceManager.GetString("TagCellType_effect_DisplayList", resourceCulture); + return ResourceManager.GetString("TableCellType_ColumnHeaderAlign", resourceCulture); } } /// - /// Looks up a localized string similar to Big|Medium|Small. + /// Looks up a localized string similar to Column Min Width(Pixel). /// - public static string TagCellType_size_DisplayList { + public static string TableCellType_ColumnMinWidth { get { - return ResourceManager.GetString("TagCellType_size_DisplayList", resourceCulture); + return ResourceManager.GetString("TableCellType_ColumnMinWidth", resourceCulture); } } /// - /// Looks up a localized string similar to Timeline. + /// Looks up a localized string similar to Column Name. /// - public static string Timeline { + public static string TableCellType_ColumnName { get { - return ResourceManager.GetString("Timeline", resourceCulture); + return ResourceManager.GetString("TableCellType_ColumnName", resourceCulture); } } /// - /// Looks up a localized string similar to content:Content|timestamp:Timestamp|icon:Icon|color:Color. + /// Looks up a localized string similar to Column Name From Data Source. /// - public static string Timeline_bindingOptions_Columns { + public static string TableCellType_ColumnNameFromDataSource { get { - return ResourceManager.GetString("Timeline_bindingOptions_Columns", resourceCulture); + return ResourceManager.GetString("TableCellType_ColumnNameFromDataSource", resourceCulture); } } /// - /// Looks up a localized string similar to color: node color support color names, such as "red", "black" - ///Supports hexadecimal notation such as "#002316" - ///Support rgb or rgba formats such as: "rgb(0,10,100)" or "rgba(0,10,100,0.5)". + /// Looks up a localized string similar to Column Resizable. /// - public static string Timeline_bindingOptions_Columns_Description { + public static string TableCellType_ColumnResizable { get { - return ResourceManager.GetString("Timeline_bindingOptions_Columns_Description", resourceCulture); + return ResourceManager.GetString("TableCellType_ColumnResizable", resourceCulture); } } /// - /// Looks up a localized string similar to Content Property. + /// Looks up a localized string similar to Column Width(Pixel). /// - public static string Timeline_contentProperty { + public static string TableCellType_ColumnWidth { get { - return ResourceManager.GetString("Timeline_contentProperty", resourceCulture); + return ResourceManager.GetString("TableCellType_ColumnWidth", resourceCulture); } } /// - /// Looks up a localized string similar to Data Source. + /// Looks up a localized string similar to Config Operation Buttons. /// - public static string Timeline_dataSource { + public static string TableCellType_ConfigActionButtons { get { - return ResourceManager.GetString("Timeline_dataSource", resourceCulture); + return ResourceManager.GetString("TableCellType_ConfigActionButtons", resourceCulture); } } /// - /// Looks up a localized string similar to Activity start. + /// Looks up a localized string similar to Config Column Properties. /// - public static string Timeline_Default1 { + public static string TableCellType_ConfigColumnProperties { get { - return ResourceManager.GetString("Timeline_Default1", resourceCulture); + return ResourceManager.GetString("TableCellType_ConfigColumnProperties", resourceCulture); } } /// - /// Looks up a localized string similar to Approved. + /// Looks up a localized string similar to Edit Current Row Changed Command. /// - public static string Timeline_Default2 { + public static string TableCellType_CurrentRowChangedCommand { get { - return ResourceManager.GetString("Timeline_Default2", resourceCulture); + return ResourceManager.GetString("TableCellType_CurrentRowChangedCommand", resourceCulture); } } /// - /// Looks up a localized string similar to Create Success. + /// Looks up a localized string similar to Set Data Source. /// - public static string Timeline_Default3 { + public static string TableCellType_DataSource { get { - return ResourceManager.GetString("Timeline_Default3", resourceCulture); + return ResourceManager.GetString("TableCellType_DataSource", resourceCulture); } } /// - /// Looks up a localized string similar to yyyy|yyyy/MM|yyyy/MM/DD|yyyy/MM/DD HH:mm:ss. + /// Looks up a localized string similar to yyyy/MM/dd. /// - public static string Timeline_format_ValueList { + public static string TableCellType_DateTimeFormat { get { - return ResourceManager.GetString("Timeline_format_ValueList", resourceCulture); + return ResourceManager.GetString("TableCellType_DateTimeFormat", resourceCulture); } } /// - /// Looks up a localized string similar to Automatic sorting based on timestamp, otherwise, use default data order. + /// Looks up a localized string similar to EL Table {0}. /// - public static string Timeline_IsTimestampSort_Description { + public static string TableCellType_DefaultTableName { get { - return ResourceManager.GetString("Timeline_IsTimestampSort_Description", resourceCulture); + return ResourceManager.GetString("TableCellType_DefaultTableName", resourceCulture); } } /// - /// Looks up a localized string similar to Normal|Large. + /// Looks up a localized string similar to Delete. /// - public static string Timeline_NodeSize_DisplayList { + public static string TableCellType_Delete { get { - return ResourceManager.GetString("Timeline_NodeSize_DisplayList", resourceCulture); + return ResourceManager.GetString("TableCellType_Delete", resourceCulture); } } /// - /// Looks up a localized string similar to SetJsonDataSource. + /// Looks up a localized string similar to Sample data are only for display.. /// - public static string Timeline_SetDataSource { + public static string TableCellType_Description_OnlyForDisplay { get { - return ResourceManager.GetString("Timeline_SetDataSource", resourceCulture); + return ResourceManager.GetString("TableCellType_Description_OnlyForDisplay", resourceCulture); } } /// - /// Looks up a localized string similar to Using a dynamic JSON object as a data source for cells, an example of JSON format is as follows - ///[ - /// {"content": "Activity start", "timestamp": "2018-04-15"}, - /// {"content": "Approved", "timestamp": "2018-04-13"}, - /// {"content": "Create Success", "timestamp": "2018-04-11"} - ///] - ///The above data assumes that the 'content attribute' is content and the 'timestamp attribute name' is timestamp - ///Typically, a JSON data source can be obtained from a web service via an HTTP request command, or from a server-side [rest of string was truncated]";. + /// Looks up a localized string similar to Table can work with element pagination.. /// - public static string Timeline_SetDataSource_Description { + public static string TableCellType_Description_WorkWithPagination { get { - return ResourceManager.GetString("Timeline_SetDataSource_Description", resourceCulture); + return ResourceManager.GetString("TableCellType_Description_WorkWithPagination", resourceCulture); } } /// - /// Looks up a localized string similar to Timestamp Property. + /// Looks up a localized string similar to Table. /// - public static string Timeline_timestampProperty { + public static string TableCellType_DisplayName { get { - return ResourceManager.GetString("Timeline_timestampProperty", resourceCulture); + return ResourceManager.GetString("TableCellType_DisplayName", resourceCulture); } } /// - /// Looks up a localized string similar to Config Timeline Binding Items. + /// Looks up a localized string similar to Edit. /// - public static string TimelineCellType_bindingOptions { + public static string TableCellType_Edit { get { - return ResourceManager.GetString("TimelineCellType_bindingOptions", resourceCulture); + return ResourceManager.GetString("TableCellType_Edit", resourceCulture); } } /// - /// Looks up a localized string similar to Bottom. + /// Looks up a localized string similar to Empty Text. /// - public static string TimelineCellType_bottom { + public static string TableCellType_EmptyText { get { - return ResourceManager.GetString("TimelineCellType_bottom", resourceCulture); + return ResourceManager.GetString("TableCellType_EmptyText", resourceCulture); } } /// - /// Looks up a localized string similar to Color. + /// Looks up a localized string similar to Enable Data Filter. /// - public static string TimelineCellType_color { + public static string TableCellType_Filter { get { - return ResourceManager.GetString("TimelineCellType_color", resourceCulture); + return ResourceManager.GetString("TableCellType_Filter", resourceCulture); } } /// - /// Looks up a localized string similar to Content. + /// Looks up a localized string similar to Front-end filtering, only supports filtering of current page data.. /// - public static string TimelineCellType_content { + public static string TableCellType_FilterDescription { get { - return ResourceManager.GetString("TimelineCellType_content", resourceCulture); + return ResourceManager.GetString("TableCellType_FilterDescription", resourceCulture); } } /// - /// Looks up a localized string similar to Format. + /// Looks up a localized string similar to Fixed Column. /// - public static string TimelineCellType_format { + public static string TableCellType_Fixed { get { - return ResourceManager.GetString("TimelineCellType_format", resourceCulture); + return ResourceManager.GetString("TableCellType_Fixed", resourceCulture); } } /// - /// Looks up a localized string similar to Hide Timestamp. + /// Looks up a localized string similar to none|lef|right. /// - public static string TimelineCellType_hideTimestamp { + public static string TableCellType_Fixed_Display { get { - return ResourceManager.GetString("TimelineCellType_hideTimestamp", resourceCulture); + return ResourceManager.GetString("TableCellType_Fixed_Display", resourceCulture); } } /// - /// Looks up a localized string similar to Icon. + /// Looks up a localized string similar to Config Columns. /// - public static string TimelineCellType_icon { + public static string TableCellType_GenerateColumnManually { get { - return ResourceManager.GetString("TimelineCellType_icon", resourceCulture); + return ResourceManager.GetString("TableCellType_GenerateColumnManually", resourceCulture); } } /// - /// Looks up a localized string similar to NodeSize. + /// Looks up a localized string similar to Get Selected Row. /// - public static string TimelineCellType_NodeSize { + public static string TableCellType_GetSelectedRow { get { - return ResourceManager.GetString("TimelineCellType_NodeSize", resourceCulture); + return ResourceManager.GetString("TableCellType_GetSelectedRow", resourceCulture); } } /// - /// Looks up a localized string similar to Config Timeline Items. + /// Looks up a localized string similar to Highlight Current Row. /// - public static string TimelineCellType_options { + public static string TableCellType_HighlightCurrentRow { get { - return ResourceManager.GetString("TimelineCellType_options", resourceCulture); + return ResourceManager.GetString("TableCellType_HighlightCurrentRow", resourceCulture); } } /// - /// Looks up a localized string similar to Placement. + /// Looks up a localized string similar to Horizontal. /// - public static string TimelineCellType_placement { + public static string TableCellType_HorizontalMode { get { - return ResourceManager.GetString("TimelineCellType_placement", resourceCulture); + return ResourceManager.GetString("TableCellType_HorizontalMode", resourceCulture); } } /// - /// Looks up a localized string similar to Sort. + /// Looks up a localized string similar to JSON Data. /// - public static string TimelineCellType_Sort { + public static string TableCellType_JsonData { get { - return ResourceManager.GetString("TimelineCellType_Sort", resourceCulture); + return ResourceManager.GetString("TableCellType_JsonData", resourceCulture); } } /// - /// Looks up a localized string similar to Default|Asc by timestamp|Desc by timestamp. + /// Looks up a localized string similar to Line Number Column Setting. /// - public static string TimelineCellType_Sort_items { + public static string TableCellType_LineNumberColumnSetting { get { - return ResourceManager.GetString("TimelineCellType_Sort_items", resourceCulture); + return ResourceManager.GetString("TableCellType_LineNumberColumnSetting", resourceCulture); } } /// - /// Looks up a localized string similar to Timestamp. + /// Looks up a localized string similar to Mutiple Filter. + /// + public static string TableCellType_MultipleFilter { + get { + return ResourceManager.GetString("TableCellType_MultipleFilter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No Data. + /// + public static string TableCellType_NoData { + get { + return ResourceManager.GetString("TableCellType_NoData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation. + /// + public static string TableCellType_OperationColumnName { + get { + return ResourceManager.GetString("TableCellType_OperationColumnName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation Column Settings. + /// + public static string TableCellType_OperationColumnSettings { + get { + return ResourceManager.GetString("TableCellType_OperationColumnSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation Column Width. + /// + public static string TableCellType_OperationColumnWidth { + get { + return ResourceManager.GetString("TableCellType_OperationColumnWidth", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operations. + /// + public static string TableCellType_Operations { + get { + return ResourceManager.GetString("TableCellType_Operations", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reload Table. + /// + public static string TableCellType_ResetTable { + get { + return ResourceManager.GetString("TableCellType_ResetTable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Edit Row Click Command. + /// + public static string TableCellType_RowClickCommand { + get { + return ResourceManager.GetString("TableCellType_RowClickCommand", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Row Data. + /// + public static string TableCellType_RowData { + get { + return ResourceManager.GetString("TableCellType_RowData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Edit Row Double-click Command. + /// + public static string TableCellType_RowDoubleClickCommand { + get { + return ResourceManager.GetString("TableCellType_RowDoubleClickCommand", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Row Index. + /// + public static string TableCellType_RowIndex { + get { + return ResourceManager.GetString("TableCellType_RowIndex", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to data. + /// + public static string TableCellType_SampleData { + get { + return ResourceManager.GetString("TableCellType_SampleData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select Column Settings. + /// + public static string TableCellType_SelectColumnSettings { + get { + return ResourceManager.GetString("TableCellType_SelectColumnSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Selected Row. + /// + public static string TableCellType_SelectedRow { + get { + return ResourceManager.GetString("TableCellType_SelectedRow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Selection. + /// + public static string TableCellType_Selection { + get { + return ResourceManager.GetString("TableCellType_Selection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Edit Selection Changed Command. + /// + public static string TableCellType_SelectionChangedCommand { + get { + return ResourceManager.GetString("TableCellType_SelectionChangedCommand", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set Current Row. + /// + public static string TableCellType_SetCurrentRow { + get { + return ResourceManager.GetString("TableCellType_SetCurrentRow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set JSON Data Source. + /// + public static string TableCellType_SetJsonDataSource { + get { + return ResourceManager.GetString("TableCellType_SetJsonDataSource", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Using a dynamic JSON string array as the data source for cells, json format example is as follows + ///[ + /// { "ID": 1, "Column": "Column content" }, + /// { "ID": 2, "Column": "Column content" }, + /// { "ID": 3, "Column": "Column content" } + ///] + ///Usually, the data source can be obtained from a web service through an HTTP request command, or it can be obtained through a server-side command. + /// + public static string TableCellType_SetJsonDataSource_Description { + get { + return ResourceManager.GetString("TableCellType_SetJsonDataSource_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show Operation Buttons. + /// + public static string TableCellType_ShowActionButtons { + get { + return ResourceManager.GetString("TableCellType_ShowActionButtons", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show Overflow Tooltip. + /// + public static string TableCellType_ShowColumnOverflowTooltip { + get { + return ResourceManager.GetString("TableCellType_ShowColumnOverflowTooltip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show Table Header. + /// + public static string TableCellType_ShowHeader { + get { + return ResourceManager.GetString("TableCellType_ShowHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show Index Column. + /// + public static string TableCellType_ShowIndexColumn { + get { + return ResourceManager.GetString("TableCellType_ShowIndexColumn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show Line Number Column. + /// + public static string TableCellType_ShowLineNumberColumn { + get { + return ResourceManager.GetString("TableCellType_ShowLineNumberColumn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show Operation Column. + /// + public static string TableCellType_ShowOperationColumn { + get { + return ResourceManager.GetString("TableCellType_ShowOperationColumn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show Select Column. + /// + public static string TableCellType_ShowSelectColumn { + get { + return ResourceManager.GetString("TableCellType_ShowSelectColumn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show Summary At Footer. + /// + public static string TableCellType_ShowSummary { + get { + return ResourceManager.GetString("TableCellType_ShowSummary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enable Sort. + /// + public static string TableCellType_Sortable { + get { + return ResourceManager.GetString("TableCellType_Sortable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stripe. + /// + public static string TableCellType_Stripe { + get { + return ResourceManager.GetString("TableCellType_Stripe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Summary. + /// + public static string TableCellType_Summary { + get { + return ResourceManager.GetString("TableCellType_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Summary Text. + /// + public static string TableCellType_SummaryText { + get { + return ResourceManager.GetString("TableCellType_SummaryText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Table Column. + /// + public static string TableCellType_TableColumn { + get { + return ResourceManager.GetString("TableCellType_TableColumn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Element Table Name. + /// + public static string TableCellType_TableName { + get { + return ResourceManager.GetString("TableCellType_TableName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Element table name '{0}' is repeated. + /// + public static string TableCellType_TableNameDuplicateError { + get { + return ResourceManager.GetString("TableCellType_TableNameDuplicateError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Table Size. + /// + public static string TableCellType_tableSize { + get { + return ResourceManager.GetString("TableCellType_tableSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to large|medium|small. + /// + public static string TableCellType_tableSizeDisplayList { + get { + return ResourceManager.GetString("TableCellType_tableSizeDisplayList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Vertical. + /// + public static string TableCellType_VerticalMode { + get { + return ResourceManager.GetString("TableCellType_VerticalMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tag. + /// + public static string Tag { + get { + return ResourceManager.GetString("Tag", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Config Add Tag Settings. + /// + public static string Tag_addButtonSettings { + get { + return ResourceManager.GetString("Tag_addButtonSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Allow Add. + /// + public static string Tag_allowAdd { + get { + return ResourceManager.GetString("Tag_allowAdd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Edit Click Command. + /// + public static string Tag_ClickCommand { + get { + return ResourceManager.GetString("Tag_ClickCommand", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Config Color List. + /// + public static string Tag_ColorList { + get { + return ResourceManager.GetString("Tag_ColorList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disable Transitions. + /// + public static string Tag_disableTransitions { + get { + return ResourceManager.GetString("Tag_disableTransitions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Distinct. + /// + public static string Tag_distinct { + get { + return ResourceManager.GetString("Tag_distinct", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Effect. + /// + public static string Tag_effect { + get { + return ResourceManager.GetString("Tag_effect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hit. + /// + public static string Tag_hit { + get { + return ResourceManager.GetString("Tag_hit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Input Max Length. + /// + public static string Tag_InputMaxLength { + get { + return ResourceManager.GetString("Tag_InputMaxLength", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Input Placeholder. + /// + public static string Tag_InputPlaceholder { + get { + return ResourceManager.GetString("Tag_InputPlaceholder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Item Space. + /// + public static string Tag_itemSpace { + get { + return ResourceManager.GetString("Tag_itemSpace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Read Only. + /// + public static string Tag_ReadOnly { + get { + return ResourceManager.GetString("Tag_ReadOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Separator. + /// + public static string Tag_separator { + get { + return ResourceManager.GetString("Tag_separator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Size. + /// + public static string Tag_size { + get { + return ResourceManager.GetString("Tag_size", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Space. + /// + public static string Tag_space { + get { + return ResourceManager.GetString("Tag_space", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Button Text. + /// + public static string Tag_text { + get { + return ResourceManager.GetString("Tag_text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Width. + /// + public static string Tag_width { + get { + return ResourceManager.GetString("Tag_width", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + New Tag. + /// + public static string TagCellType_addButtonText_DefaultValue { + get { + return ResourceManager.GetString("TagCellType_addButtonText_DefaultValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TagName. + /// + public static string TagCellType_ClickCommand_InitParamValues { + get { + return ResourceManager.GetString("TagCellType_ClickCommand_InitParamValues", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The color of the tag cycles from the first color in the color list. + ///For example, the color list has 3 items, the first three tags will use the first three colors, the fourth will use the first color, and so on. + ///If you want all tags to be the same color, you can keep one item in the color list. + /// + public static string TagCellType_ColorList_Description { + get { + return ResourceManager.GetString("TagCellType_ColorList_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tag 1,Tag 2,Tag 3. + /// + public static string TagCellType_DefaultValue { + get { + return ResourceManager.GetString("TagCellType_DefaultValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If the label text is duplicated, only the first item is displayed. + /// + public static string TagCellType_distinct_Description { + get { + return ResourceManager.GetString("TagCellType_distinct_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dark|Light|Plain. + /// + public static string TagCellType_effect_DisplayList { + get { + return ResourceManager.GetString("TagCellType_effect_DisplayList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Big|Medium|Small. + /// + public static string TagCellType_size_DisplayList { + get { + return ResourceManager.GetString("TagCellType_size_DisplayList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Timeline. + /// + public static string Timeline { + get { + return ResourceManager.GetString("Timeline", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to content:Content|timestamp:Timestamp|icon:Icon|color:Color. + /// + public static string Timeline_bindingOptions_Columns { + get { + return ResourceManager.GetString("Timeline_bindingOptions_Columns", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to color: node color support color names, such as "red", "black" + ///Supports hexadecimal notation such as "#002316" + ///Support rgb or rgba formats such as: "rgb(0,10,100)" or "rgba(0,10,100,0.5)". + /// + public static string Timeline_bindingOptions_Columns_Description { + get { + return ResourceManager.GetString("Timeline_bindingOptions_Columns_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Content Property. + /// + public static string Timeline_contentProperty { + get { + return ResourceManager.GetString("Timeline_contentProperty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Data Source. + /// + public static string Timeline_dataSource { + get { + return ResourceManager.GetString("Timeline_dataSource", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Activity start. + /// + public static string Timeline_Default1 { + get { + return ResourceManager.GetString("Timeline_Default1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Approved. + /// + public static string Timeline_Default2 { + get { + return ResourceManager.GetString("Timeline_Default2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create Success. + /// + public static string Timeline_Default3 { + get { + return ResourceManager.GetString("Timeline_Default3", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to yyyy|yyyy/MM|yyyy/MM/DD|yyyy/MM/DD HH:mm:ss. + /// + public static string Timeline_format_ValueList { + get { + return ResourceManager.GetString("Timeline_format_ValueList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Automatic sorting based on timestamp, otherwise, use default data order. + /// + public static string Timeline_IsTimestampSort_Description { + get { + return ResourceManager.GetString("Timeline_IsTimestampSort_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Normal|Large. + /// + public static string Timeline_NodeSize_DisplayList { + get { + return ResourceManager.GetString("Timeline_NodeSize_DisplayList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SetJsonDataSource. + /// + public static string Timeline_SetDataSource { + get { + return ResourceManager.GetString("Timeline_SetDataSource", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Using a dynamic JSON object as a data source for cells, an example of JSON format is as follows + ///[ + /// {"content": "Activity start", "timestamp": "2018-04-15"}, + /// {"content": "Approved", "timestamp": "2018-04-13"}, + /// {"content": "Create Success", "timestamp": "2018-04-11"} + ///] + ///The above data assumes that the 'content attribute' is content and the 'timestamp attribute name' is timestamp + ///Typically, a JSON data source can be obtained from a web service via an HTTP request command, or from a server-side [rest of string was truncated]";. + /// + public static string Timeline_SetDataSource_Description { + get { + return ResourceManager.GetString("Timeline_SetDataSource_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Timestamp Property. + /// + public static string Timeline_timestampProperty { + get { + return ResourceManager.GetString("Timeline_timestampProperty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Config Timeline Binding Items. + /// + public static string TimelineCellType_bindingOptions { + get { + return ResourceManager.GetString("TimelineCellType_bindingOptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bottom. + /// + public static string TimelineCellType_bottom { + get { + return ResourceManager.GetString("TimelineCellType_bottom", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Color. + /// + public static string TimelineCellType_color { + get { + return ResourceManager.GetString("TimelineCellType_color", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Content. + /// + public static string TimelineCellType_content { + get { + return ResourceManager.GetString("TimelineCellType_content", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Format. + /// + public static string TimelineCellType_format { + get { + return ResourceManager.GetString("TimelineCellType_format", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hide Timestamp. + /// + public static string TimelineCellType_hideTimestamp { + get { + return ResourceManager.GetString("TimelineCellType_hideTimestamp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Icon. + /// + public static string TimelineCellType_icon { + get { + return ResourceManager.GetString("TimelineCellType_icon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to NodeSize. + /// + public static string TimelineCellType_NodeSize { + get { + return ResourceManager.GetString("TimelineCellType_NodeSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Config Timeline Items. + /// + public static string TimelineCellType_options { + get { + return ResourceManager.GetString("TimelineCellType_options", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Placement. + /// + public static string TimelineCellType_placement { + get { + return ResourceManager.GetString("TimelineCellType_placement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sort. + /// + public static string TimelineCellType_Sort { + get { + return ResourceManager.GetString("TimelineCellType_Sort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Default|Asc by timestamp|Desc by timestamp. + /// + public static string TimelineCellType_Sort_items { + get { + return ResourceManager.GetString("TimelineCellType_Sort_items", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Timestamp. /// public static string TimelineCellType_timestamp { get { - return ResourceManager.GetString("TimelineCellType_timestamp", resourceCulture); + return ResourceManager.GetString("TimelineCellType_timestamp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Top. + /// + public static string TimelineCellType_top { + get { + return ResourceManager.GetString("TimelineCellType_top", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use Binding. + /// + public static string TimelineCellType_useBinding { + get { + return ResourceManager.GetString("TimelineCellType_useBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TimePicker. + /// + public static string TimePicker { + get { + return ResourceManager.GetString("TimePicker", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Clearable. + /// + public static string TimePickerCellType_clearable { + get { + return ResourceManager.GetString("TimePickerCellType_clearable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Editable. + /// + public static string TimePickerCellType_editable { + get { + return ResourceManager.GetString("TimePickerCellType_editable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to End Placeholder. + /// + public static string TimePickerCellType_endPlaceholder { + get { + return ResourceManager.GetString("TimePickerCellType_endPlaceholder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to End Time. + /// + public static string TimePickerCellType_endPlaceholder_DefaultValue { + get { + return ResourceManager.GetString("TimePickerCellType_endPlaceholder_DefaultValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to End Time. + /// + public static string TimePickerCellType_EndTime { + get { + return ResourceManager.GetString("TimePickerCellType_EndTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to End Value. + /// + public static string TimePickerCellType_EndValue { + get { + return ResourceManager.GetString("TimePickerCellType_EndValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to GetSelectedRange. + /// + public static string TimePickerCellType_GetSelectedRange { + get { + return ResourceManager.GetString("TimePickerCellType_GetSelectedRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Is Disabled. + /// + public static string TimePickerCellType_IsDisabled { + get { + return ResourceManager.GetString("TimePickerCellType_IsDisabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Is Range. + /// + public static string TimePickerCellType_isRange { + get { + return ResourceManager.GetString("TimePickerCellType_isRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mode. + /// + public static string TimePickerCellType_mode { + get { + return ResourceManager.GetString("TimePickerCellType_mode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select|Picker. + /// + public static string TimePickerCellType_mode_DisplayList { + get { + return ResourceManager.GetString("TimePickerCellType_mode_DisplayList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Placeholder. + /// + public static string TimePickerCellType_placeholder { + get { + return ResourceManager.GetString("TimePickerCellType_placeholder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prefix Icon. + /// + public static string TimePickerCellType_prefixIcon { + get { + return ResourceManager.GetString("TimePickerCellType_prefixIcon", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Range Separator. + /// + public static string TimePickerCellType_rangeSeparator { + get { + return ResourceManager.GetString("TimePickerCellType_rangeSeparator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To. + /// + public static string TimePickerCellType_rangeSeparator_DefaultValue { + get { + return ResourceManager.GetString("TimePickerCellType_rangeSeparator_DefaultValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Read Only. + /// + public static string TimePickerCellType_ReadOnly { + get { + return ResourceManager.GetString("TimePickerCellType_ReadOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start Placeholder. + /// + public static string TimePickerCellType_startPlaceholder { + get { + return ResourceManager.GetString("TimePickerCellType_startPlaceholder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start Time. + /// + public static string TimePickerCellType_startPlaceholder_DefaultValue { + get { + return ResourceManager.GetString("TimePickerCellType_startPlaceholder_DefaultValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start Time. + /// + public static string TimePickerCellType_StartTime { + get { + return ResourceManager.GetString("TimePickerCellType_StartTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start Value. + /// + public static string TimePickerCellType_StartValue { + get { + return ResourceManager.GetString("TimePickerCellType_StartValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Step. + /// + public static string TimePickerCellType_step { + get { + return ResourceManager.GetString("TimePickerCellType_step", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Transfer. + /// + public static string Transfer { + get { + return ResourceManager.GetString("Transfer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Config Binding Items. + /// + public static string TransferCellTyle_bindingOptions { + get { + return ResourceManager.GetString("TransferCellTyle_bindingOptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disabled. + /// + public static string TransferCellTyle_disabled { + get { + return ResourceManager.GetString("TransferCellTyle_disabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filterable. + /// + public static string TransferCellTyle_filterable { + get { + return ResourceManager.GetString("TransferCellTyle_filterable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter Placeholder. + /// + public static string TransferCellTyle_filterPlaceholder { + get { + return ResourceManager.GetString("TransferCellTyle_filterPlaceholder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Label. + /// + public static string TransferCellTyle_label { + get { + return ResourceManager.GetString("TransferCellTyle_label", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Left Title. + /// + public static string TransferCellTyle_leftTitle { + get { + return ResourceManager.GetString("TransferCellTyle_leftTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Config Items. + /// + public static string TransferCellTyle_options { + get { + return ResourceManager.GetString("TransferCellTyle_options", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Keep same order with datasource. + /// + public static string TransferCellTyle_original { + get { + return ResourceManager.GetString("TransferCellTyle_original", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insert new items to last. + /// + public static string TransferCellTyle_push { + get { + return ResourceManager.GetString("TransferCellTyle_push", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Right Title. + /// + public static string TransferCellTyle_rightTitle { + get { + return ResourceManager.GetString("TransferCellTyle_rightTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Target Order. + /// + public static string TransferCellTyle_targetOrder { + get { + return ResourceManager.GetString("TransferCellTyle_targetOrder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insert new items to first. + /// + public static string TransferCellTyle_unshift { + get { + return ResourceManager.GetString("TransferCellTyle_unshift", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use Binding. + /// + public static string TransferCellTyle_useBinding { + get { + return ResourceManager.GetString("TransferCellTyle_useBinding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to key:Key|label:Label|disabled:Disabled. + /// + public static string TransferCellType_bindingOptions_Columns { + get { + return ResourceManager.GetString("TransferCellType_bindingOptions_Columns", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Item. + /// + public static string TransferCellType_DefaultItemName { + get { + return ResourceManager.GetString("TransferCellType_DefaultItemName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enter keyword. + /// + public static string TransferCellType_filterPlaceholder_DefaultValue { + get { + return ResourceManager.GetString("TransferCellType_filterPlaceholder_DefaultValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to list1. + /// + public static string TransferCellType_leftTitle_DefaultValue { + get { + return ResourceManager.GetString("TransferCellType_leftTitle_DefaultValue", resourceCulture); } } /// - /// Looks up a localized string similar to Top. + /// Looks up a localized string similar to list2. /// - public static string TimelineCellType_top { + public static string TransferCellType_rightTitle_DefaultValue { get { - return ResourceManager.GetString("TimelineCellType_top", resourceCulture); + return ResourceManager.GetString("TransferCellType_rightTitle_DefaultValue", resourceCulture); } } /// - /// Looks up a localized string similar to Use Binding. + /// Looks up a localized string similar to Tree. /// - public static string TimelineCellType_useBinding { + public static string Tree { get { - return ResourceManager.GetString("TimelineCellType_useBinding", resourceCulture); + return ResourceManager.GetString("Tree", resourceCulture); } } /// - /// Looks up a localized string similar to TimePicker. + /// Looks up a localized string similar to Binding DataSource. /// - public static string TimePicker { + public static string TreeCellType_BindingDataSource { get { - return ResourceManager.GetString("TimePicker", resourceCulture); + return ResourceManager.GetString("TreeCellType_BindingDataSource", resourceCulture); } } /// - /// Looks up a localized string similar to Clearable. + /// Looks up a localized string similar to value:Value|label:Label|parentValue:ParentValue|icon:Icon. /// - public static string TimePickerCellType_clearable { + public static string TreeCellType_BindingDataSource_Columns { get { - return ResourceManager.GetString("TimePickerCellType_clearable", resourceCulture); + return ResourceManager.GetString("TreeCellType_BindingDataSource_Columns", resourceCulture); } } /// - /// Looks up a localized string similar to Editable. + /// Looks up a localized string similar to Config Tree Node Options. /// - public static string TimePickerCellType_editable { + public static string TreeCellType_ConfigTreeNodeOptions { get { - return ResourceManager.GetString("TimePickerCellType_editable", resourceCulture); + return ResourceManager.GetString("TreeCellType_ConfigTreeNodeOptions", resourceCulture); } } /// - /// Looks up a localized string similar to End Placeholder. + /// Looks up a localized string similar to [ + /// { + /// "value": "1", + /// "label": "Node1", + /// "icon": { + /// "Name": "Navigation/165_home_3.svg", + /// "BuiltIn": true, + /// "UseCellTypeForeColor": true, + /// "Color": "Background 1 -25" + /// }, + /// "children": [ + /// { + /// "value": "2", + /// "label": "Node1_1", + /// "children": [ + /// { + /// "value": "3", + /// "label": "Node1_1_1" + /// [rest of string was truncated]";. /// - public static string TimePickerCellType_endPlaceholder { + public static string TreeCellType_DefaultDataSource { get { - return ResourceManager.GetString("TimePickerCellType_endPlaceholder", resourceCulture); + return ResourceManager.GetString("TreeCellType_DefaultDataSource", resourceCulture); } } /// - /// Looks up a localized string similar to End Time. + /// Looks up a localized string similar to Edit Drag Command. /// - public static string TimePickerCellType_endPlaceholder_DefaultValue { + public static string TreeCellType_DragCommand { get { - return ResourceManager.GetString("TimePickerCellType_endPlaceholder_DefaultValue", resourceCulture); + return ResourceManager.GetString("TreeCellType_DragCommand", resourceCulture); } } /// - /// Looks up a localized string similar to End Time. + /// Looks up a localized string similar to DraggingNodeValue|DropNodeValue|DragType. /// - public static string TimePickerCellType_EndTime { + public static string TreeCellType_DragCommand_InitParamValues { get { - return ResourceManager.GetString("TimePickerCellType_EndTime", resourceCulture); + return ResourceManager.GetString("TreeCellType_DragCommand_InitParamValues", resourceCulture); } } /// - /// Looks up a localized string similar to End Value. + /// Looks up a localized string similar to draggingNodeValue:The value of the node moving|dropNodeValue:The value of the moving target node|dragType:before - The node being dragged is positioned in front of (above) the target node; inner - The node being dragged is positioned into the target node; after - The node being dragged is positioned in end of (below) the target node. /// - public static string TimePickerCellType_EndValue { + public static string TreeCellType_DragCommand_ParameterDescriptions { get { - return ResourceManager.GetString("TimePickerCellType_EndValue", resourceCulture); + return ResourceManager.GetString("TreeCellType_DragCommand_ParameterDescriptions", resourceCulture); } } /// - /// Looks up a localized string similar to GetSelectedRange. + /// Looks up a localized string similar to Empty Text. /// - public static string TimePickerCellType_GetSelectedRange { + public static string TreeCellType_EmptyText { get { - return ResourceManager.GetString("TimePickerCellType_GetSelectedRange", resourceCulture); + return ResourceManager.GetString("TreeCellType_EmptyText", resourceCulture); } } /// - /// Looks up a localized string similar to Is Disabled. + /// Looks up a localized string similar to Get Current Selected Nodes. /// - public static string TimePickerCellType_IsDisabled { + public static string TreeCellType_GetCurrentNodes { get { - return ResourceManager.GetString("TimePickerCellType_IsDisabled", resourceCulture); + return ResourceManager.GetString("TreeCellType_GetCurrentNodes", resourceCulture); } } /// - /// Looks up a localized string similar to Is Range. + /// Looks up a localized string similar to Get Half-Selected Nodes. /// - public static string TimePickerCellType_isRange { + public static string TreeCellType_GetHalfSelectedNodes { get { - return ResourceManager.GetString("TimePickerCellType_isRange", resourceCulture); + return ResourceManager.GetString("TreeCellType_GetHalfSelectedNodes", resourceCulture); } } /// - /// Looks up a localized string similar to Mode. + /// Looks up a localized string similar to Get Selected Nodes. /// - public static string TimePickerCellType_mode { + public static string TreeCellType_GetSelectedNodes { get { - return ResourceManager.GetString("TimePickerCellType_mode", resourceCulture); + return ResourceManager.GetString("TreeCellType_GetSelectedNodes", resourceCulture); } } /// - /// Looks up a localized string similar to Select|Picker. + /// Looks up a localized string similar to Note: If the [Only Return Leaf Nodes] checkbox is selected, the final return result will ONLY contain LEAF nodes. In other words, if both options are selected simultaneously, only leaf nodes will be returned in the end.. /// - public static string TimePickerCellType_mode_DisplayList { + public static string TreeCellType_GetSelectedNodes_Description { get { - return ResourceManager.GetString("TimePickerCellType_mode_DisplayList", resourceCulture); + return ResourceManager.GetString("TreeCellType_GetSelectedNodes_Description", resourceCulture); } } /// - /// Looks up a localized string similar to Placeholder. + /// Looks up a localized string similar to Contains half-selected nodes. /// - public static string TimePickerCellType_placeholder { + public static string TreeCellType_GetSelectedNodes_IsContainsHalf { get { - return ResourceManager.GetString("TimePickerCellType_placeholder", resourceCulture); + return ResourceManager.GetString("TreeCellType_GetSelectedNodes_IsContainsHalf", resourceCulture); } } /// - /// Looks up a localized string similar to Prefix Icon. + /// Looks up a localized string similar to Only leaf nodes are returned. /// - public static string TimePickerCellType_prefixIcon { + public static string TreeCellType_GetSelectedNodes_IsLeafNodeOnly { get { - return ResourceManager.GetString("TimePickerCellType_prefixIcon", resourceCulture); + return ResourceManager.GetString("TreeCellType_GetSelectedNodes_IsLeafNodeOnly", resourceCulture); } } /// - /// Looks up a localized string similar to Range Separator. + /// Looks up a localized string similar to Returns the value of the selected node. /// - public static string TimePickerCellType_rangeSeparator { + public static string TreeCellType_GetSelectedNodes_IsReturnIndex { get { - return ResourceManager.GetString("TimePickerCellType_rangeSeparator", resourceCulture); + return ResourceManager.GetString("TreeCellType_GetSelectedNodes_IsReturnIndex", resourceCulture); } } /// - /// Looks up a localized string similar to To. + /// Looks up a localized string similar to Node Icon. /// - public static string TimePickerCellType_rangeSeparator_DefaultValue { + public static string TreeCellType_Icon { get { - return ResourceManager.GetString("TimePickerCellType_rangeSeparator_DefaultValue", resourceCulture); + return ResourceManager.GetString("TreeCellType_Icon", resourceCulture); } } /// - /// Looks up a localized string similar to Read Only. + /// Looks up a localized string similar to Auto Expand The Parent Node When Expand The Sub Node. /// - public static string TimePickerCellType_ReadOnly { + public static string TreeCellType_IsAutoExpandParent { get { - return ResourceManager.GetString("TimePickerCellType_ReadOnly", resourceCulture); + return ResourceManager.GetString("TreeCellType_IsAutoExpandParent", resourceCulture); } } /// - /// Looks up a localized string similar to Start Placeholder. + /// Looks up a localized string similar to Expand/Collapse Tree Node When Click The Tree Node. /// - public static string TimePickerCellType_startPlaceholder { + public static string TreeCellType_IsClickCanExpandNode { get { - return ResourceManager.GetString("TimePickerCellType_startPlaceholder", resourceCulture); + return ResourceManager.GetString("TreeCellType_IsClickCanExpandNode", resourceCulture); } } /// - /// Looks up a localized string similar to Start Time. + /// Looks up a localized string similar to Enable The Drag And Drop Function. /// - public static string TimePickerCellType_startPlaceholder_DefaultValue { + public static string TreeCellType_IsDraggable { get { - return ResourceManager.GetString("TimePickerCellType_startPlaceholder_DefaultValue", resourceCulture); + return ResourceManager.GetString("TreeCellType_IsDraggable", resourceCulture); } } /// - /// Looks up a localized string similar to Start Time. + /// Looks up a localized string similar to Expand All Tree Nodes By Default. /// - public static string TimePickerCellType_StartTime { + public static string TreeCellType_IsExpandAllNodes { get { - return ResourceManager.GetString("TimePickerCellType_StartTime", resourceCulture); + return ResourceManager.GetString("TreeCellType_IsExpandAllNodes", resourceCulture); } } /// - /// Looks up a localized string similar to Start Value. + /// Looks up a localized string similar to Highlight The Selected Node. /// - public static string TimePickerCellType_StartValue { + public static string TreeCellType_IsHighlightCurrent { get { - return ResourceManager.GetString("TimePickerCellType_StartValue", resourceCulture); + return ResourceManager.GetString("TreeCellType_IsHighlightCurrent", resourceCulture); } } /// - /// Looks up a localized string similar to Step. + /// Looks up a localized string similar to Tree Nodes Support Multi-Selection. /// - public static string TimePickerCellType_step { + public static string TreeCellType_IsMultiSelection { get { - return ResourceManager.GetString("TimePickerCellType_step", resourceCulture); + return ResourceManager.GetString("TreeCellType_IsMultiSelection", resourceCulture); } } /// - /// Looks up a localized string similar to Transfer. + /// Looks up a localized string similar to Select The Node When Click The Tree Node. /// - public static string Transfer { + public static string TreeCellType_IsNodeCheckedOnlyByCheckbox { get { - return ResourceManager.GetString("Transfer", resourceCulture); + return ResourceManager.GetString("TreeCellType_IsNodeCheckedOnlyByCheckbox", resourceCulture); } } /// - /// Looks up a localized string similar to Config Binding Items. + /// Looks up a localized string similar to Only Can Expand One Level Node. /// - public static string TransferCellTyle_bindingOptions { + public static string TreeCellType_IsOnlyExpandOneLevel { get { - return ResourceManager.GetString("TransferCellTyle_bindingOptions", resourceCulture); + return ResourceManager.GetString("TreeCellType_IsOnlyExpandOneLevel", resourceCulture); } } /// - /// Looks up a localized string similar to Disabled. + /// Looks up a localized string similar to Generate Tree Nodes From Database. /// - public static string TransferCellTyle_disabled { + public static string TreeCellType_IsTreeNodeGeneratedFromDb { get { - return ResourceManager.GetString("TransferCellTyle_disabled", resourceCulture); + return ResourceManager.GetString("TreeCellType_IsTreeNodeGeneratedFromDb", resourceCulture); } } /// - /// Looks up a localized string similar to Filterable. + /// Looks up a localized string similar to ResultArray. /// - public static string TransferCellTyle_filterable { + public static string TreeCellType_MultiSelectCommand_InitParamValues { get { - return ResourceManager.GetString("TransferCellTyle_filterable", resourceCulture); + return ResourceManager.GetString("TreeCellType_MultiSelectCommand_InitParamValues", resourceCulture); } } /// - /// Looks up a localized string similar to Filter Placeholder. + /// Looks up a localized string similar to The resulting array of currently selected tree nodes. Each item in the array has three properties: "Value", "Label", "ParentValue".. /// - public static string TransferCellTyle_filterPlaceholder { + public static string TreeCellType_MultiSelectCommand_InitParamValues_Description { get { - return ResourceManager.GetString("TransferCellTyle_filterPlaceholder", resourceCulture); + return ResourceManager.GetString("TreeCellType_MultiSelectCommand_InitParamValues_Description", resourceCulture); } } /// - /// Looks up a localized string similar to Label. + /// Looks up a localized string similar to Value|Label|ParentValue. /// - public static string TransferCellTyle_label { + public static string TreeCellType_SelectCommand_InitParamValues { get { - return ResourceManager.GetString("TransferCellTyle_label", resourceCulture); + return ResourceManager.GetString("TreeCellType_SelectCommand_InitParamValues", resourceCulture); } } /// - /// Looks up a localized string similar to Left Title. + /// Looks up a localized string similar to Set the selected node based on the node value. If multiple values are selected, you can enter multiple values separated by commas (,).. /// - public static string TransferCellTyle_leftTitle { + public static string TreeCellType_SelectedIndexes_Descrption { get { - return ResourceManager.GetString("TransferCellTyle_leftTitle", resourceCulture); + return ResourceManager.GetString("TreeCellType_SelectedIndexes_Descrption", resourceCulture); } } /// - /// Looks up a localized string similar to Config Items. + /// Looks up a localized string similar to Result. /// - public static string TransferCellTyle_options { + public static string TreeCellType_SelectedNodeResult { get { - return ResourceManager.GetString("TransferCellTyle_options", resourceCulture); + return ResourceManager.GetString("TreeCellType_SelectedNodeResult", resourceCulture); } } /// - /// Looks up a localized string similar to Keep same order with datasource. + /// Looks up a localized string similar to In the case of multi-selections, returns an array of the values of the currently selected nodes.. /// - public static string TransferCellTyle_original { + public static string TreeCellType_SelectedResult_Descrption { get { - return ResourceManager.GetString("TransferCellTyle_original", resourceCulture); + return ResourceManager.GetString("TreeCellType_SelectedResult_Descrption", resourceCulture); } } /// - /// Looks up a localized string similar to Insert new items to last. + /// Looks up a localized string similar to Set Current Selected Nodes. /// - public static string TransferCellTyle_push { + public static string TreeCellType_SetCurrentNodes { get { - return ResourceManager.GetString("TransferCellTyle_push", resourceCulture); + return ResourceManager.GetString("TreeCellType_SetCurrentNodes", resourceCulture); } } /// - /// Looks up a localized string similar to Right Title. + /// Looks up a localized string similar to Set The Selection State For Any Nodes. /// - public static string TransferCellTyle_rightTitle { + public static string TreeCellType_SetNodeSelections { get { - return ResourceManager.GetString("TransferCellTyle_rightTitle", resourceCulture); + return ResourceManager.GetString("TreeCellType_SetNodeSelections", resourceCulture); } } /// - /// Looks up a localized string similar to Target Order. + /// Looks up a localized string similar to Whether to set as selected. /// - public static string TransferCellTyle_targetOrder { + public static string TreeCellType_SetNodeSelections_IsNodeSelected { get { - return ResourceManager.GetString("TransferCellTyle_targetOrder", resourceCulture); + return ResourceManager.GetString("TreeCellType_SetNodeSelections_IsNodeSelected", resourceCulture); } } /// - /// Looks up a localized string similar to Insert new items to first. + /// Looks up a localized string similar to Should all child nodes be recursively configured. /// - public static string TransferCellTyle_unshift { + public static string TreeCellType_SetNodeSelections_IsSubNodeSelected { get { - return ResourceManager.GetString("TransferCellTyle_unshift", resourceCulture); + return ResourceManager.GetString("TreeCellType_SetNodeSelections_IsSubNodeSelected", resourceCulture); } } /// - /// Looks up a localized string similar to Use Binding. + /// Looks up a localized string similar to The value of node. /// - public static string TransferCellTyle_useBinding { + public static string TreeCellType_SetNodeSelections_NodeValue { get { - return ResourceManager.GetString("TransferCellTyle_useBinding", resourceCulture); + return ResourceManager.GetString("TreeCellType_SetNodeSelections_NodeValue", resourceCulture); } } /// - /// Looks up a localized string similar to key:Key|label:Label|disabled:Disabled. + /// Looks up a localized string similar to Set Selected Nodes. /// - public static string TransferCellType_bindingOptions_Columns { + public static string TreeCellType_SetSelectedNodes { get { - return ResourceManager.GetString("TransferCellType_bindingOptions_Columns", resourceCulture); + return ResourceManager.GetString("TreeCellType_SetSelectedNodes", resourceCulture); } } /// - /// Looks up a localized string similar to Item. + /// Looks up a localized string similar to Only leaf nodes are checked. /// - public static string TransferCellType_DefaultItemName { + public static string TreeCellType_SetSelectedNodes_IsLeafNodeOnly { get { - return ResourceManager.GetString("TransferCellType_DefaultItemName", resourceCulture); + return ResourceManager.GetString("TreeCellType_SetSelectedNodes_IsLeafNodeOnly", resourceCulture); } } /// - /// Looks up a localized string similar to Enter keyword. + /// Looks up a localized string similar to Set the value of the selected node. /// - public static string TransferCellType_filterPlaceholder_DefaultValue { + public static string TreeCellType_SetSelectedNodes_SelectedIndexes { get { - return ResourceManager.GetString("TransferCellType_filterPlaceholder_DefaultValue", resourceCulture); + return ResourceManager.GetString("TreeCellType_SetSelectedNodes_SelectedIndexes", resourceCulture); } } /// - /// Looks up a localized string similar to list1. + /// Looks up a localized string similar to TreeSelect. /// - public static string TransferCellType_leftTitle_DefaultValue { + public static string TreeSelect { get { - return ResourceManager.GetString("TransferCellType_leftTitle_DefaultValue", resourceCulture); + return ResourceManager.GetString("TreeSelect", resourceCulture); } } /// - /// Looks up a localized string similar to list2. + /// Looks up a localized string similar to Accordion. /// - public static string TransferCellType_rightTitle_DefaultValue { + public static string TreeSelect_accordion { get { - return ResourceManager.GetString("TransferCellType_rightTitle_DefaultValue", resourceCulture); + return ResourceManager.GetString("TreeSelect_accordion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DefaultExpandAll. + /// + public static string TreeSelect_defaultExpandAll { + get { + return ResourceManager.GetString("TreeSelect_defaultExpandAll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ExpandOnClickNode. + /// + public static string TreeSelect_expandOnClickNode { + get { + return ResourceManager.GetString("TreeSelect_expandOnClickNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If not checked, then expand or collapse node only when clicking on the arrow icon.. + /// + public static string TreeSelect_expandOnClickNode_Desc { + get { + return ResourceManager.GetString("TreeSelect_expandOnClickNode_Desc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HighlightCurrent. + /// + public static string TreeSelect_highlightCurrent { + get { + return ResourceManager.GetString("TreeSelect_highlightCurrent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indent(Unit: pixel). + /// + public static string TreeSelect_indent { + get { + return ResourceManager.GetString("TreeSelect_indent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ShowCheckBox. + /// + public static string TreeSelect_showCheckbox { + get { + return ResourceManager.GetString("TreeSelect_showCheckbox", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tree Options. + /// + public static string TreeSelect_TreeSettings { + get { + return ResourceManager.GetString("TreeSelect_TreeSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to EL-VirtualizedTable. + /// + public static string TVirtualizedableCellType_DisplayName { + get { + return ResourceManager.GetString("TVirtualizedableCellType_DisplayName", resourceCulture); } } @@ -5124,5 +6524,112 @@ namespace ElementUI.Properties { return ResourceManager.GetString("UploadCellType_upload", resourceCulture); } } + + /// + /// Looks up a localized string similar to expand all|expand to specified level|collapse all. + /// + public static string VirtualizedTable_DefaultExpansion_DisplayName { + get { + return ResourceManager.GetString("VirtualizedTable_DefaultExpansion_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Default Expansion. + /// + public static string VirtualizedTable_TreeTableDefaultExpansion { + get { + return ResourceManager.GetString("VirtualizedTable_TreeTableDefaultExpansion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expand to specified level. + /// + public static string VirtualizedTable_TreeTableExpandToSpecifiedLevel { + get { + return ResourceManager.GetString("VirtualizedTable_TreeTableExpandToSpecifiedLevel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to value:Value|parentValue:ParentValue. + /// + public static string VirtualizedTableCellType_bindingOptions_Columns { + get { + return ResourceManager.GetString("VirtualizedTableCellType_bindingOptions_Columns", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to EL Virtualized Table {0}. + /// + public static string VirtualizedTableCellType_DefaultTableName { + get { + return ResourceManager.GetString("VirtualizedTableCellType_DefaultTableName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Using a dynamic JSON object tree as a data source for cell, an example of JSON format is as follows + ///[ + /// { + /// "value":1, + /// "column":"John Doe", + /// "children":[ + /// { + /// "value":2, + /// "column":"Jane Smith", + /// "children":[ + /// { + /// "value":4, + /// "column":"Emily Brown", + /// "children":[] + /// } + /// ] + /// }, + /// [rest of string was truncated]";. + /// + public static string VirtualizedTableCellType_SetDataSourceByObjTree_Description { + get { + return ResourceManager.GetString("VirtualizedTableCellType_SetDataSourceByObjTree_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to table|treeTable. + /// + public static string VirtualizedTableDataType { + get { + return ResourceManager.GetString("VirtualizedTableDataType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DataType. + /// + public static string VirtualizedTableDataTypeTitle { + get { + return ResourceManager.GetString("VirtualizedTableDataTypeTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set Data Source By Id Pid Table. + /// + public static string VirtualizedTableSetDataSourceByIdPidTable { + get { + return ResourceManager.GetString("VirtualizedTableSetDataSourceByIdPidTable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set Data Source By Obj Tree. + /// + public static string VirtualizedTableSetDataSourceByObjTree { + get { + return ResourceManager.GetString("VirtualizedTableSetDataSourceByObjTree", resourceCulture); + } + } } } diff --git a/Properties/Resources.resx b/Properties/Resources.resx index e107f144a412bef89bb8822a826a21fbedc57d95..4058903c18416b026057eac77198e9cf09fd4a4b 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -394,7 +394,7 @@ Focus - Edit ValueChanged Command + Edit Selection Command Use Binding @@ -491,6 +491,12 @@ Value + + + Select Element Table + + + Element Table Type @@ -793,13 +799,19 @@ Allow Add - Config Add Button Settings + Config Add Tag Settings Width + + Input Max Length + + + Input Placeholder + - Text + Button Text Space @@ -1075,7 +1087,7 @@ Dialog Result - Click OK to return the result as confirm, click Cancel to return the result as cancel, click Close button to return the result as close + Clicking on OK returns confirm, clicking on cancel and close returns cancel by default, if the "Distinguish Cancel And Close" box is checked, then clicking on cancel returns cancel and close returns close. Input Box Result @@ -1110,6 +1122,9 @@ NavMenu + + Tree + Pagination @@ -1184,6 +1199,9 @@ Uncheck this option can customize the click behavior by command. value:Value|label:Label|parentValue:ParentValue + + value:Value|parentValue:ParentValue + Node @@ -1232,6 +1250,46 @@ Uncheck this option can customize the click behavior by command. } ] The above data assumes that the 'value attribute' is value, the 'label attribute name' is label, and the 'children attribute name' is 'children' +Typically, a JSON data source can be obtained from a web service via an HTTP request command, or from a server-side command + + + Using a dynamic JSON object tree as a data source for cell, an example of JSON format is as follows +[ + { + "value":1, + "column":"John Doe", + "children":[ + { + "value":2, + "column":"Jane Smith", + "children":[ + { + "value":4, + "column":"Emily Brown", + "children":[] + } + ] + }, + { + "value":3, + "column":"Michael Johnson", + "children":[ + { + "value":5, + "column":"David Lee", + "children":[] + } + ] + } + ] + }, + { + "value":6, + "Column":"Sarah Wang", + "children":[] + } +] +The above data assumes that the 'value attribute' is value, and the 'children attribute name' is 'children' Typically, a JSON data source can be obtained from a web service via an HTTP request command, or from a server-side command @@ -1241,6 +1299,9 @@ Typically, a JSON data source can be obtained from a web service via an HTTP req If you do not set a label property name, the value property is considered equal, and when using different label properties at multiple levels, you can use the | Separation, e.g. 'provinceName|cityName' + + If you do not set a label property name, the value property is considered equal + If multiple children-attributes are different for example the children-attribute of a province is a city, you can use the "|" Separation, e.g. 'provinces|cities|streets' @@ -1302,12 +1363,30 @@ The table format is a common multi-level data preservation format in databases Value|Label|ParentId + + Value|Label|ParentValue + + + ResultArray + + + The resulting array of currently selected tree nodes. Each item in the array has three properties: "Value", "Label", "ParentValue". + + + DraggingNodeValue|DropNodeValue|DragType + + + draggingNodeValue:The value of the node moving|dropNodeValue:The value of the moving target node|dragType:before - The node being dragged is positioned in front of (above) the target node; inner - The node being dragged is positioned into the target node; after - The node being dragged is positioned in end of (below) the target node + Node value:Value|label:Label|parentValue:ParentValue|icon:Icon + + value:Value|label:Label|parentValue:ParentValue|icon:Icon + Vertical|Horizontal @@ -1355,7 +1434,7 @@ Can use formula =TEXTJOIN("/",1,valuePath) convert array to string, or use loop When multiple select and searchable, whether to retain the current search keyword after selecting an option - Not Limit + Unlimited No Match @@ -1557,9 +1636,6 @@ Support rgb or rgba formats such as: "rgb(0,10,100)" or "rgba(0,10,100,0.5)" Choose Icon - - Edit - Delete @@ -1814,6 +1890,70 @@ Support rgb or rgba formats such as: "rgb(0,10,100)" or "rgba(0,10,100,0.5)" + + [ + { + "value": "1", + "label": "Node1", + "icon": { + "Name": "Navigation/165_home_3.svg", + "BuiltIn": true, + "UseCellTypeForeColor": true, + "Color": "Background 1 -25" + }, + "children": [ + { + "value": "2", + "label": "Node1_1", + "children": [ + { + "value": "3", + "label": "Node1_1_1" + }, + { + "value": "4", + "label": "Node1_1_2" + } + ] + }, + { + "value": "5", + "label": "Node1_2" + } + ] + }, + { + "value": "6", + "label": "Node2", + "icon": { + "Name": "Navigation/169_user_2.svg", + "BuiltIn": true, + "UseCellTypeForeColor": true, + "Color": "Background 1 -25" + }, + "children": [ + { + "value": "7", + "label": "Node2_1", + "children": [ + { + "value": "8", + "label": "Node2_1_1" + }, + { + "value": "9", + "label": "Node2_1_2" + } + ] + }, + { + "value": "10", + "label": "Node2_2" + } + ] + }, +] + yyyy MM @@ -2003,6 +2143,9 @@ Typically, a JSON data source can be obtained from a web service via an HTTP req HideMenuItems + + + ShowMenuItems Items @@ -2012,6 +2155,9 @@ Typically, a JSON data source can be obtained from a web service via an HTTP req HideItems + + + ShowItems Items @@ -2058,4 +2204,454 @@ Typically, a JSON data source can be obtained from a web service via an HTTP req Edit Click Command + + Edit Drag Command + + + Children + + + UI Permission + + + Anonymous + + + Allow Everyone + + + Authenticated Users + + + Edit + + + At least select on item + + + Edit + + + Delete + + + Edit Row Click Command + + + Edit Row Double-click Command + + + Edit Current Row Changed Command + + + Edit Selection Changed Command + + + Set Data Source + + + Generate Columns By Data Source Automatically + + + Config Columns + + + Config Column Properties + + + Table Column + + + yyyy/MM/dd + + + Row Data + + + Selection + + + Table Size + + + large|medium|small + + + Empty Text + + + No Data + + + Fit Column Width Automatically + + + Show Table Header + + + Highlight Current Row + + + Stripe + + + Vertical Border + + + Show Index Column + + + Show Line Number Column + + + Show Select Column + + + Show Operation Buttons + + + Button + + + Config Operation Buttons + + + Show Summary At Footer + + + Summary Text + + + Summary + + + Table + + + EL-VirtualizedTable + + + Column Name + + + Column Name From Data Source + + + Column Width(Pixel) + + + Column Min Width(Pixel) + + + Format String + + + yyyy/MM/dd|HH:mm + + + left|center|right + + + Column Align + + + Select Column Settings + + + Line Number Column Setting + + + Operation Column Settings + + + Fixed Column + + + none|lef|right + + + Show Operation Column + + + Column Header Align + + + Column Resizable + + + Show Overflow Tooltip + + + Horizontal + + + Vertical + + + Type + + + Button|Link|Icon + + + Text + + + Icon + + + Icon Width + + + Icon Height + + + Style + + + Shape + + + default|round|circle + + + Edit Command + + + Operations + + + Element Table Name + + + Element table name '{0}' is repeated + + + Operation Column Width + + + None + + + Clear Selection + + + Set Current Row + + + Get Selected Row + + + Reload Table + + + Clear Sort + + + Clear Filter + + + Selected Row + + + Row Index + + + Set JSON Data Source + + + Using a dynamic JSON string array as the data source for cells, json format example is as follows +[ + { "ID": 1, "Column": "Column content" }, + { "ID": 2, "Column": "Column content" }, + { "ID": 3, "Column": "Column content" } +] +Usually, the data source can be obtained from a web service through an HTTP request command, or it can be obtained through a server-side command + + + JSON Data + + + Enable Sort + + + Enable Data Filter + + + Front-end filtering, only supports filtering of current page data. + + + Mutiple Filter + + + Operation + + + data + + + Table can work with element pagination. + + + Sample data are only for display. + + + EL Table {0} + + + EL Virtualized Table {0} + + + Select text content on focus + + + Generate Tree Nodes From Database + + + Config Tree Node Options + + + Binding DataSource + + + Empty Text + + + Tree Nodes Support Multi-Selection + + + Select The Node When Click The Tree Node + + + Expand All Tree Nodes By Default + + + Expand/Collapse Tree Node When Click The Tree Node + + + Auto Expand The Parent Node When Expand The Sub Node + + + Only Can Expand One Level Node + + + Highlight The Selected Node + + + Enable The Drag And Drop Function + + + Node Icon + + + Get Selected Nodes + + + Note: If the [Only Return Leaf Nodes] checkbox is selected, the final return result will ONLY contain LEAF nodes. In other words, if both options are selected simultaneously, only leaf nodes will be returned in the end. + + + Set Selected Nodes + + + Get Current Selected Nodes + + + Set Current Selected Nodes + + + Get Half-Selected Nodes + + + Set The Selection State For Any Nodes + + + In the case of multi-selections, returns an array of the values of the currently selected nodes. + + + Set the selected node based on the node value. If multiple values are selected, you can enter multiple values separated by commas (,). + + + Only leaf nodes are returned + + + Only leaf nodes are checked + + + Contains half-selected nodes + + + Returns the value of the selected node + + + Set the value of the selected node + + + The value of node + + + Whether to set as selected + + + Should all child nodes be recursively configured + + + Result + + + TreeSelect + + + ShowCheckBox + + + Indent(Unit: pixel) + + + HighlightCurrent + + + DefaultExpandAll + + + ExpandOnClickNode + + + If not checked, then expand or collapse node only when clicking on the arrow icon. + + + Accordion + + + Tree Options + + + IconProperty + + + The pagination function is only applicable to regular table mode and cannot be used in tree-like table mode. To ensure the proper functioning of your system and to achieve the best user experience, you need to bind the pagination plugin to a regular table. + + + DataType + + + table|treeTable + + + Set Data Source By ObjTree + + + Set Data Source By Obj Tree + + + Set Data Source By Id Pid Table + + + Default Expansion + + + expand all|expand to specified level|collapse all + + + Expand to specified level + \ No newline at end of file diff --git a/Properties/Resources.zh-CN.resx b/Properties/Resources.zh-CN.resx index f4f86dffc655aa1d533a664e67b49e073dc066a7..5d0a4c5a31529a16806f24cbf43ac972ac0492d0 100644 --- a/Properties/Resources.zh-CN.resx +++ b/Properties/Resources.zh-CN.resx @@ -1,6 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ElementPlus-PC - + 编辑命令 - + 默认头像 - + 头像形状 - + 显示模式 - + 通知角标 - + 圆形 - + 填充 - + 包含 - + 覆盖 - + 原始尺寸 - + 默认点击行为 - + 编辑点击命令 - + 分隔符 - + 日历项目命令 - + 日历日程命令 - + 编辑值变更命令 - + 编辑双击命令 - - + + 编辑单击命令 - + 配置日程 - + 周起始日 - + 日期 - + 文本 - + 选项来自数据库 - + 配置选项 - + 绑定数据源 - + 子菜单展开方式 - + 占位文本 - + 多选 - + 多选下折叠标签 - 严格的遵守父子节点不互相关联 + 允许选择任意一级选项 - + 值返回完整路径 - + 显示清空按钮 - + 输入框中显示完整路径 - + 可搜索选项 - + 选项分隔符 - + 数据源 - + 值属性名 - + 标签属性名 - + 子项目属性名 - + 父节点值 - + 获取选中的节点 - + 只是叶子节点 - + 选中节点 - + 点击 - + - + 显示文本 - + 编辑命令 - + 数据验证 - + 单元格权限 - + 默认值 - - + + - + 禁用 - + 显示类型 - + 占位文本 - + 范围分隔符 - + 开始日期占位文本 - + 结束日期占位文本 - + 显示在输入框中的格式 - + 头部图标 - + 周起始日 - + 只读 - + 文本框可输入 - + 显示清空按钮 - + 获取选择范围 - + 开始日期 - + 结束日期 - + 类型 - + 最大长度 - + 显示输入字数统计 - + 占位文本 - + 只读 - + 显示清空按钮 - + 显示为密码框 - + 头部图标 - + 尾部图标 - + 调整大小 - + 设置焦点 - + 选中文字 - + 最小值 - + 最大值 - + 步长 - + 只能输入步长的倍数 - + 小数位数 - + 禁用 - + 使用控制按钮 - + 控制按钮显示在右侧 - + 占位文本 - + 设置最小值 - + 设置最大值 - + 设置步长 - + 设置焦点 - 编辑值变更命令 + 编辑选择命令 - + 从数据库生成菜单项目 - + 配置菜单项 - + 绑定数据源 - + 布局 - + 主题 - + 背景色 - + 文字颜色 - + 选中文字颜色 - + 只保持一个子菜单的展开 @@ -429,781 +429,799 @@ 全部展开|全部收起 - + 子菜单打开的触发方式 - + 开启折叠动画 - + 水平折叠收起菜单 - + 路径类型 - + 路径结果数组 - + 图标 - + 通知 - + 默认展开 - + 选择表格 - + 每页显示行数 - + 最大页码按钮显示数 - + 控件布局 - + 调整每页显示行数配置 - + 上一页文本 - + 下一页文本 - + 禁用 - + 使用小型分页样式 - + 为分页按钮添加背景色 - + 只有一页时隐藏 - + 分页控件元素 - + 每页显示行数 + + + 选择Element表格 + + + Element表格 显示类型 - + 进度条的宽度 - + 进度条当前状态 - + 进度条背景色 - + 显示进度条文字内容 - + 进度条显示文字内置在进度条内 - + 自定义显示文本 - + 线形 - + 环形 - + - + 成功 - + 异常 - + 警告 - + 编辑命令 - + 最大分值 - + 显示内容 - + 配置辅助文字 - + 低分和中等分数的界限值 - + 高分和中等分数的界限值 - + 未选中图标的颜色 - + 只读时未选中图标的颜色 - + 选中图标的颜色 - + 最大配置三种颜色,分别代表低分时的颜色,中等分数时的颜色,和高分时的颜色 - + 只读 - + 允许半选 - + - + 辅助文字 - + 分数 - + 文字 - + 颜色 - + 从数据库生成选项 - + 配置选项 - + 绑定数据源 - + 占位文本 - + 多选 - + 多选模式下折叠Tag - + 禁用 - + 显示清空按钮 - + 可搜索选项 - + 服务端搜索 - + 服务端搜索配置 - + 允许用户创建新条目 - + 保留搜索关键字 - + 多选时最多选择的项目数 - + 搜索结果为空时显示文本 - + 选项为空时显示的文本 - + 数据源 - + 值属性名 - + 标签属性名 - + 设置焦点 - + 默认最大项目数 - + 查询结果最大项目数 - + 匹配方式 - + 远程加载时显示的文字 - + 文本 - + 最小值 - + 最大值 - + 步长 - + 显示提示信息 - + 自定义提示信息 - + 显示输入框 - + 显示输入框的控制按钮 - + 显示间断点 - + 范围选择 - + 竖向模式 - + 获取选择范围 - + 设置最小值 - + 设置最大值 - + 起始值 - + 终止值 - + 编辑命令 - + 选项来自数据库 - + 配置步骤项目 - + 绑定数据源 - + 当前步骤的状态 - + 结束步骤的状态 - + 竖向模式 - + 居中对齐 - + 简洁风格 - + 标题 - + 描述文字 - + 图标 - + 等待 - + 过程 - + 完成 - + 错误 - + 成功 - + 设置当前步骤的状态 - - + + 状态 - + 编辑标签点击命令 - + 配置颜色列表 - + 尺寸 - + 主题 - + 标签间距 - + 分隔符 - + 只读 - + 自动移除重复项 - + 禁用渐变动画 - + 显示边框描边 - + 允许添加标签 - 添加按钮设置 + 添加标签设置 - + 宽度 + + + 文本框最大长度 + + + 文本占位文本 - 文本 + 按钮文本 - + 按钮间距 - + 从数据库生成项目 - + 配置项目 - + 绑定数据源 - + 排序 - + 默认|按时间戳升序排序|按时间戳降序排序 - + 隐藏时间戳 - + 时间戳显示位置 - + 时间戳格式 - + 节点尺寸 - + 文本上方 - + 文本内容 - + 时间戳 - + 节点图标 - + 节点颜色 - + 模式 - + 占位文本 - + 头部图标 - + 开始时间 - + 结束时间 - + 间隔时间(hh:mm) - + 范围选择 - + 范围分隔符 - + 开始时间占位文本 - + 结束时间占位文本 - + 只读 - + 禁用 - + 文本框可输入 - + 显示清空按钮 - + 获取选择范围 - + 开始时间 - + 结束时间 - + 从数据库生成选项 - + 配置选项 - + 绑定数据源 - + 左侧列表标题 - + 右侧列表标题 - + 可搜索 - + 搜索框占位文本 - + 右侧列表元素的排序策略 - + 保持与数据源相同的顺序 - + 新加入的元素排在最后 - + 新加入的元素排在最前 - + 显示文字 - + 禁用 - + 最大允许上传个数 - + 上传的文件类型 - + 最大文件大小(单位:MB) - + 文件布局类型 - + 上传按钮文本 - + 提示信息 - + 禁用 - - + + 只读 - + 支持在文件对话框中多选文件 - + 文件名 - + 照片墙 - + 图文列表 - + EL-通知 - + 标题 - + 内容 - + 主题样式 - + 显示时长(单位:毫秒) - + 弹出位置 - + 偏移距离(单位:像素) - + 点击通知执行命令 - + 显示关闭按钮 - + EL-消息提示 - + 消息内容 - + 主题样式 - + 显示时长(单位:毫秒) - + 偏移距离(单位:像素) - + 显示关闭按钮 - + 文字居中 - + EL-弹框 - + 标题 - + 正文内容 - + 主题样式 - + 显示输入框 - + 输入框的占位文本 - + 输入框类型 - + 居中布局 - + 显示确定按钮 - + 确定按钮的文本 - + 显示取消按钮 - + 取消按钮的文本 - + 显示关闭按钮 - + 可通过点击遮罩关闭弹框 - + 可通过按下 ESC 键关闭弹框 - + 使用圆角按钮 - + 将取消与关闭进行区分 - + 弹框结果至变量 - - 点击确定返回结果为confirm, 点击取消返回结果为cancel, 点击关闭按钮返回结果为close + + 点击确定返回结果为confirm, 点击取消和关闭按钮默认情况下返回的都是cancel, 如果勾选了"将取消与关闭进行区分", 那么点击取消按钮返回cancel, 关闭按钮为close。 - + 输入框结果至变量 - + 文本 - + 多行文本 - + 密码 - + EL-头像 - + EL-面包屑 - + EL-日历 - + EL-级联选择器 - + EL-日期选择器 - + EL-输入框 - + EL-计数器 - + EL-导航菜单 - + + EL-树形控件 + + EL-分页 - + EL-进度条 - + EL-评分 - + EL-选择器 - + EL-滑块 - + EL-步骤条 - + EL-标签 - + EL-时间线 - + EL-时间选择器 - + EL-穿梭框 - + EL-文件上传 - + EL-通知 - + EL-消息 - + EL-弹框 - + 显示系统用户头像 - + 勾选显示系统用户头像选项后,单元格的值表示系统用户的用户名, 如值为张三表示显示张三的头像,如果指定用户没有设置头像,单元格会显示用户名, 通常配合用户信息视图显示用户列表的头像 如需显示当前用户的头像,可以使用%CurrentUser%关键字作为单元格的值 - + 正方形 - + 缩小 - + 默认点击行为为点击页面名时自动跳转到对应的页面,如果希望定制点击行为,可以配置点击命令 - + 页面名 - + 日期 - + 值|日期|文本 - + value:值|date:日期|text:文本 - + value:值|label:显示文本|parentValue:父节点值 - - 结点 + + value:值|parentValue:父节点值 + + + 节点 - + 请选择 - + 控制选项 - + 可通过勾选此选项来设置父子节点取消选中关联,从而达到选择任意一级选项的目的。 - + 设置数据源(对象树) - + 使用动态JSON对象树作为单元格的数据源,JSON格式示例如下 [ { @@ -1235,22 +1253,66 @@ "label": "部门3" } ] -以上数据假设‘值属性’为value,‘标签属性名’为label,‘下级属性名’为‘children’ +以上数据假设‘值属性名’为value,‘标签属性名’为label,‘子项目属性名’为‘children’ +通常情况下,JSON数据源可以通过HTTP请求命令从Web服务获取,也可以通过服务端命令获取 + + + 使用动态JSON对象树作为单元格的数据源,JSON格式示例如下 +[ + { + "value":1, + "column":"John Doe", + "children":[ + { + "value":2, + "column":"column content", + "children":[ + { + "value":4, + "column":"column content", + "children":[] + } + ] + }, + { + "value":3, + "column":"column content", + "children":[ + { + "value":5, + "column":"column content", + "children":[] + } + ] + } + ] + }, + { + "value":6, + "column":"Sarah Wang", + "children":[] + } +] +以上数据假设‘值属性名’为value,‘子项目属性名’为‘children’ 通常情况下,JSON数据源可以通过HTTP请求命令从Web服务获取,也可以通过服务端命令获取 - + + 多级使用不同值属性名时,可以使用“|”分隔,例如‘provinceId|cityId’ - + 如果不设置标签属性名,则认为和值属性相等,多级使用不同标签属性时,可以使用“|”分隔,例如‘provinceName|cityName’ - + + 如果不设置标签属性名,则认为和值属性相等 + + 如果都有多个下级属性不同例如省的下级属性为市,可以使用“|”分隔,例如 ‘provinces|cities|streets’ - + 设置数据源(二维表) - + 使用二维表JSON对象树作为单元格的数据源,JSON格式示例如下 [ {"value": 1, "label": "部门1", "parentValue": null}, @@ -1260,117 +1322,135 @@ {"value": 5, "label": "部门2", "parentValue": null}, {"value": 6, "label": "部门3", "parentValue": null} ] -以上数据假设‘值属性’为value,‘标签属性名’为label,‘父级值属性’为‘parentValue’ +以上数据假设‘值属性名’为value,‘标签属性名’为label,‘父级值属性名’为‘parentValue’ 二维表格式是数据库中常见的多级数据保存格式 - + 如果不设置标签属性名,则认为和值属性相等 - + 鼠标悬停 - + 年份|月份|日期|周|日期时间|月份范围|日期范围|日期时间范围 - + - + 开始日期 - + 结束日期 - + yyyy 年|yyyy年MM月DD日|yyyy/MM/DD HH:mm:ss - + 文本框|多行文本框|密码框 - + 配合列宽、行高的自适应模式使用 - + 不允许|水平方向|垂直方向|水平和垂直方向 - + 使目标输入框获取键盘焦点 - + 使目标输入框获取键盘焦点并选中全部文字 - + 使目标计数器获取键盘焦点 - + 值|显示文本|父节点值 - - 结点 + + 值|显示文本|父节点值 + + + 结果数组 + + + 当前选中的所有树节点的结果数组,数组中的每一项,都有 “值”,“显示文本” 以及 “父节点值” 三个属性。 + + + 拖拽节点值|目标节点值|拖拽类型 + + + draggingNodeValue:移动节点的值|dropNodeValue:目标节点的值|dragType:before - 表示移动节点在目标节点之前(之上);inner - 表示移动节点在目标节点内部;after - 表示移动节点在目标节点之后(之下) + + + 节点 + + + value:值|label:显示文本|parentValue:父节点值|icon:图标| - + value:值|label:显示文本|parentValue:父节点值|icon:图标| - + 垂直|水平 - + 浅色|深色|自定义 - + 悬停|点击 - + 获取选择项路径 - + 选择路径的结果是一个数组 可以使用 =TEXTJOIN("/",1,路径结果数组) 公式把路径转成字符串使用 也可以使用循环命令遍历路径的每一项分别处理 - + 值路径|显示文本路径 - + 大于等于 5 且小于等于 21 的奇数 - + 调整每页显示行数|上一页|页号|下一页|直接前往|空白间距|总行数 - + 通过公式自定义显示文本,例如 ‘="共使用了"&A1&"G空间" ’,留空会显示百分比,如50% - + 仪表盘形 - + 极差,失望,一般,满意,惊喜 - + 黄金糕,双皮奶,蚵仔煎,龙须面,北京烤鸭 - + value:值|label:显示文本 - + 请选择 - + 多选且可搜索时,是否在选中一个选项后保留当前的搜索关键词 - + 不限制 - + 无匹配数据 - + 无数据 - + 设置数据源(字符串数组) - + 使用动态JSON字符串数组作为单元格的数据源,JSON格式示例如下 [ "香蕉", @@ -1379,10 +1459,10 @@ ] 通常情况下,数据源可以通过HTTP请求命令从Web服务获取,也可以通过服务端命令获取 - + 设置数据源(对象数组) - + 使用动态JSON对象作为单元格的数据源,JSON格式示例如下 [ {"value": 1, "label": "香蕉"}, @@ -1392,225 +1472,225 @@ 以上数据假设‘值属性’为value,‘显示文本’为label 通常情况下,JSON数据源可以通过HTTP请求命令从Web服务获取,也可以通过服务端命令获取 - + 如果不设置标签属性名,则认为和值属性相等 - + 使选择器获取键盘焦点 - + 包含查询字符串|以查询字符串开头 - + 加载中 - + 通常和步长配合使用 - + 步骤一 - + 步骤二 - + 步骤三 - + 我是步骤一的描述性文字 - + 我是步骤二的描述性文字 - + 我是步骤三的描述性文字 - + value:值|title:标题|description:描述文字|icon:图标 - + 标签名 - + 标签的颜色会从颜色列表中的第一颜色开始循环。 例如颜色列表有3项,前三个项目会用前三个颜色,第四个会用第一个颜色,如此循环。 如果希望所有标签用相同颜色,则颜色列表保留一项即可 - + 大|中|小 - + 深色|浅色|线框 - + 如果标签文本重复,只显示第一项 - + 添加标签 - + 标签一,标签二,标签三 - + 标题 - + 通知内容 - + 显示时间, 毫秒。设为 0 则不会自动关闭 - + 在同一时刻,所有的通知框实例应当具有一个相同的偏移量 - + 通知标题|通知内容|通知上下文 - + 上下文 - + 用于保存在‘点击通知命令’里可能用到的上下文信息(如ID) - + 活动按期开始 - + 通过审核 - + 创建成功 - + content:文本内容|timestamp:时间戳|color:节点颜色|icon:节点图标 - + color:节点颜色支持以下格式字符串 颜色名称,如 red,black 16进制表示法,如 #002316 rgb或rgba格式,如 rgb(0,10,100) 或 rgba(0,10,100,0.5) - + 根据时间戳自动排序,反之则是默认的数据顺序 - + yyyy年|yyyy/MM|yyyy/MM/dd|yyyy/MM/dd HH:mm:ss - + 小|大 - + 文本下方 - + 固定时间点|任意时间点 - + - + 开始时间 - + 结束时间 - + 备选项 - + key:主键|label:显示文字|disabled:是否禁用 - + 列表一 - + 列表二 - + 请输入搜索内容 - + 点击上传 - + 只能上传jpg/png文件 - + 消息内容 - + 显示时间, 毫秒。设为 0 则不会自动关闭 - + 消息框距离窗口顶部的偏移量 - + 标题 - + 正文内容 - + 确定 - + 取消 - + 取消(点击取消按钮)关闭(点击关闭按钮或遮罩层、按下ESC键) - + 选择图标 - + 更改 - + 删除 - + 确定 - + 取消 - + 文件 - + 首页/活动管理/活动列表/活动详情 - + 上个月 - + 今天 - + 下个月 - + 菜单一 - + 菜单二 - + 菜单三 - + 共400条 - + 100条/页 - + 前往 - + - + [ { "value": "zhinan", @@ -1890,61 +1970,125 @@ rgb或rgba格式,如 rgb(0,10,100) 或 rgba(0,10,100,0.5) } ] - + + [ + { + "value": "1", + "label": "节点1", + "icon": { + "Name": "Navigation/165_home_3.svg", + "BuiltIn": true, + "UseCellTypeForeColor": true, + "Color": "Background 1 -25" + }, + "children": [ + { + "value": "2", + "label": "节点1_1", + "children": [ + { + "value": "3", + "label": "节点1_1_1" + }, + { + "value": "4", + "label": "节点1_1_2" + } + ] + }, + { + "value": "5", + "label": "节点1_2" + } + ] + }, + { + "value": "6", + "label": "节点2", + "icon": { + "Name": "Navigation/169_user_2.svg", + "BuiltIn": true, + "UseCellTypeForeColor": true, + "Color": "Background 1 -25" + }, + "children": [ + { + "value": "7", + "label": "节点2_1", + "children": [ + { + "value": "8", + "label": "节点2_1_1" + }, + { + "value": "9", + "label": "节点2_1_2" + } + ] + }, + { + "value": "10", + "label": "节点2_2" + } + ] + }, +] + + yyyy"年"MM"月" - + yyyy 第 WW 周 - + 当前限制选择 ${limit} 个文件,本次选择了 ${length} 个文件,共选择了 ${total} 个文件 - + 上传文件的格式不正确 - + 上传文件的大小超出限制 - + 一,二,三,四,五,六,日 - + 其他 - + 编辑值变更命令 - + 更改背景颜色 - + 更改当前状态 - + 设置背景色会将状态置为空。 - + 布局 - + 横向|竖向 - + - + 数据源 - + 内容属性名 - + 时间属性名 - + 设置数据源 - + * 使用动态JSON对象作为单元格的数据源,JSON格式示例如下: [ {"content": "活动按期开始", "timestamp": "2018-04-15"}, @@ -1954,140 +2098,146 @@ rgb或rgba格式,如 rgb(0,10,100) 或 rgba(0,10,100,0.5) 以上数据假设“内容属性名”为content,“时间属性名”为timestamp。 通常情况下,JSON数据源可以通过HTTP请求命令从Web服务获取,也可以通过服务端命令获取。 - + 周一|周二|周三|周四|周五|周六|周日 - + 重新加载绑定项目 - + 如果单元格绑定的数据表值发生了变化但是单元格的绑定选项无法自动刷新时,可以通过此操作强制刷新绑定选项 - + 选择头像 - + 成功|警告|信息|失败 - + 无|成功|警告|信息|失败 - + 右上角|左上角|右下角|左下角 - + 高级设置 - + EL-标签页头 - + 配置标签项 - + Value:值|Name:标题 - + - + 标题 - + 编辑标签点击命令 - + 页签编号|页签值|页签标题 - + 风格类型 - + 下边框线|选项卡|卡片 - + 位置 - + 上|下|左|右 - + 平均分配宽度 - + 用户管理/配置管理/角色管理/任务管理 - + 设置选择项 - + 选中项编号 - + 距离页面底部距离 - + EL-回到顶部 - + 距离页面右边距离 - + 滚动高度达到此参数值才出现 - + 设置每页显示行数 - + 每页显示行数 - + 设置当前页码 - + 页码 - + 设置总行数 - + 总行数 - + 执行命令 - + 页号|每页显示行数|总行数 - + 分页变更命令 - + 设置折叠 - + 折叠 - + 勾选此选项后,取消父子节点关联,可以选择任意一级选项。 - + Value:滑块的值 - + 标签样式 - - + + 成功|信息|警告|危险 隐藏菜单项 + + + 显示菜单项 菜单项 多个菜单项可以用英文逗号分隔,如:菜单1,菜单2。 + + + 显示标签项 隐藏标签项 @@ -2115,26 +2265,470 @@ rgb或rgba格式,如 rgb(0,10,100) 或 rgba(0,10,100,0.5) 添加空项 - + 空项目文本 - + 显示文本 - + 配置标记 - + 设置标记 - + 标记 - + 编辑点击命令 + + 编辑拖拽命令 + + + 子项 + + + 权限设置 + + + 匿名用户 + + + 全部角色可访问 + + + 登录用户 + + + 至少选择一项 + + + 编辑 + + + 删除 + + + 编辑行点击命令 + + + 编辑行双击命令 + + + 编辑当前行变更命令 + + + 编辑选择项变更命令 + + + 设置数据源 + + + 自动根据数据源生成列 + + + 配置表格列 + + + 配置列属性 + + + 表格列 + + + yyyy年MM月dd日 + + + 行数据 + + + 选择项 + + + 表格的尺寸 + + + 大|中|小 + + + 空数据时显示的文本内容 + + + 暂无数据 + + + 列的宽度是否自撑开 + + + 显示表头 + + + 高亮当前行 + + + 斑马纹 + + + 带有纵向边框 + + + 显示行号 + + + 显示行号列 + + + 显示选择列 + + + 显示操作按钮 + + + 按钮 + + + 配置操作按钮 + + + 在表尾显示合计行 + + + 合计行第一列的文本内容 + + + 合计 + + + EL-表格 + + + EL-虚拟表格 + + + 列名 + + + 绑定字段 + + + 列的宽度(单位:像素) + + + 列的最小宽度(单位:像素) + + + 格式字符串 + + + yyyy年MM月dd日|yyyy/MM/dd|HH:mm + + + 左|中|右 + + + 对齐方式 + + + 固定列位置 + + + 不固定|左|右 + + + 选择列设置 + + + 行号列设置 + + + 操作列设置 + + + 显示操作列 + + + 表头对齐方式 + + + 可以通过拖动改变宽度 + + + 当内容过长被隐藏时显示 tooltip + + + 水平 + + + 垂直 + + + 类型 + + + 按钮|链接|图片 + + + 文本 + + + 图标 + + + 图标宽度 + + + 图标高度 + + + 样式 + + + 形状 + + + 默认|圆角|圆形 + + + 编辑命令 + + + 操作 + + + 表格名 + + + Element表格名“{0}”重复 + + + 操作列宽度 + + + + + + 清空用户选择 + + + 设置当前行 + + + 获取选择行 + + + 重载表格 + + + 清空排序 + + + 清空过滤 + + + 选择行 + + + 行号 + + + 设置数据源(二维表) + + + 使用动态JSON字符串数组作为单元格的数据源,JSON格式示例如下 +[ + { "ID": 1, "Column": "Column content" }, + { "ID": 2, "Column": "Column content" }, + { "ID": 3, "Column": "Column content" } +] +通常情况下,数据源可以通过HTTP请求命令从Web服务获取,也可以通过服务端命令获取 + + + JSON数据 + + + 开启排序 + + + 开启数据过滤 + + + 前端过滤,仅支持当前页数据的过滤。 + + + 数据过滤是否多选 + + + 操作 + + + 数据 + + + 可以与element分页组件绑定。 + + + 样例数据仅作展示。 + + + EL表格{0} + + + EL虚拟表格{0} + + + 获得焦点时全选文本内容 + + + 从数据库生成树节点 + + + 配置树节点选项... + + + 绑定数据源 + + + 内容为空时展示的文本 + + + 节点支持多选 + + + 单击节点时选中节点 + + + 默认展开所有节点 + + + 单击节点时展开或收起节点 + + + 展开子节点时自动展开父节点 + + + 展开一个树节点时,折叠其他树节点 + + + 高亮当前选中节点 + + + 开启拖拽节点功能 + + + 节点图标 + + + 获取勾选节点 + + + 注意:只要勾选了 [只返回叶子节点] checkbox,那最终的返回结果就只会存在叶子节点。也就是说,如果同时勾选了两个选项,那最终也仅会返回叶子节点 + + + 设置勾选节点 + + + 获取当前选中节点 + + + 设置当前选中节点 + + + 获取半选中节点 + + + 设置某个节点的勾选状态 + + + 在多选情况下,返回目前选中节点的值组成的数组。 + + + 通过节点的值设置树形图的选中节点,在多选情况下,可以输入多个值,多个值使用英文逗号隔开。 + + + 只返回叶子节点 + + + 只勾选叶子节点 + + + 包含半选节点 + + + 返回选中节点的值 + + + 设置勾选节点的值 + + + 节点的值 + + + 是否设为被勾选 + + + 是否递归设置所有子节点 + + + 获取结果 + + + EL-树形选择 + + + 显示复选框 + + + 相邻节点水平缩进(单位:像素) + + + 高亮当前选中节点 + + + 默认展开所有节点 + + + 单击节点时展开或者收缩节点 + + + 如果不勾选,则只有点箭头图标的时候才会展开或者收缩节点。 + + + 每次只展开一个同级树节点 + + + 下拉树形配置 + + + 图标属性名 + + + 分页功能仅适用于普通表格模式,而无法在树形表格中使用。为确保您的系统正常运行并获得最佳的用户体验,您需要将分页插件绑定到一个普通表格上。 + + + 数据类型 + + + 表格数据|树形数据 + + + 设置数据源(对象树) + + + 设置数据源(二维表) + + + 默认展开方式 + + + 全部展开|展开到指定层级|全部收起 + + + 展开到指定层级 + \ No newline at end of file diff --git a/README.en.md b/README.en.md index 948054ac9988a5dc02a597630268d72f0b39180e..ca887aa087057396b519d94b5d1c3d99eed2f67c 100644 --- a/README.en.md +++ b/README.en.md @@ -4,16 +4,16 @@ 活字格UI组件-ElementPlus插件源代码 #### Software Architecture -Software architecture description +Software architecture description #### Installation -1. xxxx -2. xxxx +1. xxxxx +2. xxxxX 3. xxxx - + #### Instructions - + 1. xxxx 2. xxxx 3. xxxx @@ -33,6 +33,6 @@ Software architecture description 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) 4. The most valuable open source project [GVP](https://gitee.com/gvp) 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) \ No newline at end of file diff --git a/README.md b/README.md index 8b384b1c43b076b399ba26bf37124e0df32036a1..b351357666b493a496e3f79e60b286c9b9273d99 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -# Element Plus Plugin +# Element Plus Plugin ### 快速开始 #### 编译 -- 依赖 typescript 4.4.4, 请确保电脑安装有 4x版本以上的SDK。 +- 依赖 typescript 4.4.4, 请确保电脑安装有 4x版本以上的SDK。 - 插件会在 设计器的默认安装路径下 获取引用,如果你的设计器是自定义的安装路径,需要更新引用的路径,具体可阅读 [活字格-插件开发-插件开发流程](https://help.grapecity.com.cn/pages/viewpage.action?pageId=56534757)。 #### 分支管理 -- master 是发布的最新版本,和[插件商城](https://marketplace.grapecity.com.cn/ApplicationDetails?productID=SP2203310001&productDetailID=D2203310006&tabName=Tabs_detail) 最新版本对应。 +- master 是发布的最新版本,和[插件商城](https://marketplace.grapecity.com.cn/ApplicationDetails?productID=SP2203310001&productDetailID=D2203310006&tabName=Tabs_detail) 最新版本对应。 - dev 开发人员会在该分支上开发,你可以在此分支获取最新的代码,仅限学习和测试,请勿在生产环境中使用。 diff --git a/ReferForguncyDLL/Forguncy.Commands.Design.dll b/ReferForguncyDLL/Forguncy.Commands.Design.dll new file mode 100644 index 0000000000000000000000000000000000000000..ba8d9ee7827094226e334e34e977c69d08e94402 Binary files /dev/null and b/ReferForguncyDLL/Forguncy.Commands.Design.dll differ diff --git a/ReferForguncyDLL/Forguncy.Commands.dll b/ReferForguncyDLL/Forguncy.Commands.dll new file mode 100644 index 0000000000000000000000000000000000000000..2fe3a27a42c72843c6eed4f8429c70976f27433f Binary files /dev/null and b/ReferForguncyDLL/Forguncy.Commands.dll differ diff --git a/ReferForguncyDLL/Forguncy.RbacPermission.Abstractions.dll b/ReferForguncyDLL/Forguncy.RbacPermission.Abstractions.dll new file mode 100644 index 0000000000000000000000000000000000000000..377dc1aa9cf537d69f5aa20e47cb5dc7f3e5884c Binary files /dev/null and b/ReferForguncyDLL/Forguncy.RbacPermission.Abstractions.dll differ diff --git a/ReferForguncyDLL/GrapeCity.Forguncy.CellTypes.Design.dll b/ReferForguncyDLL/GrapeCity.Forguncy.CellTypes.Design.dll new file mode 100644 index 0000000000000000000000000000000000000000..5f15562c19147797ba481d44240c5374cef2d742 Binary files /dev/null and b/ReferForguncyDLL/GrapeCity.Forguncy.CellTypes.Design.dll differ diff --git a/ReferForguncyDLL/GrapeCity.Forguncy.CellTypes.dll b/ReferForguncyDLL/GrapeCity.Forguncy.CellTypes.dll new file mode 100644 index 0000000000000000000000000000000000000000..0e7295bfab766d8293e97b85e0052056658fd0ed Binary files /dev/null and b/ReferForguncyDLL/GrapeCity.Forguncy.CellTypes.dll differ diff --git a/ReferForguncyDLL/GrapeCity.Forguncy.Plugin.Design.dll b/ReferForguncyDLL/GrapeCity.Forguncy.Plugin.Design.dll new file mode 100644 index 0000000000000000000000000000000000000000..51f741467d823621ca35ca8d23c399fdd7c3db77 Binary files /dev/null and b/ReferForguncyDLL/GrapeCity.Forguncy.Plugin.Design.dll differ diff --git a/ReferForguncyDLL/GrapeCity.Forguncy.Plugin.dll b/ReferForguncyDLL/GrapeCity.Forguncy.Plugin.dll new file mode 100644 index 0000000000000000000000000000000000000000..4a733409d43cbb7920c75279947c4b87a25da58d Binary files /dev/null and b/ReferForguncyDLL/GrapeCity.Forguncy.Plugin.dll differ diff --git a/Resources/CellTypes/Avatar.ts b/Resources/CellTypes/Avatar.ts index bddeba96e42a8570f1d45cf332282e0529032c35..370c1dbf9b1ed1e429f74bd7b9e93a5cda6301e8 100644 --- a/Resources/CellTypes/Avatar.ts +++ b/Resources/CellTypes/Avatar.ts @@ -75,8 +75,13 @@ namespace ElementCellTypes { } self.fontDom = $(".el-avatar", self.getContainer()); + + this.calculateSize(); }, methods: { + calculateSize(){ + this.size = Math.min(self.vueContainer.width(), self.vueContainer.height()); + }, getValue() { return this.src; }, @@ -120,14 +125,14 @@ namespace ElementCellTypes { } else { self._defaultSrc = result.icon; } - if (this.isEmpty(this.vue.src)) { + if (this.isEmpty(this.vue.src)) { this.vue.src = self._defaultSrc; } }); } private _defaultSrc: string; public onWindowResized() { - this.vue.size = Math.min(this.vueContainer.width(), this.vueContainer.height()); + this.vue?.calculateSize(); } protected clickable(): boolean { const cellType = this.CellElement.CellType; diff --git a/Resources/CellTypes/Base.ts b/Resources/CellTypes/Base.ts index 3c6a900babf071f7d4d3b238ce5f44f74e9c6feb..0777cb5dc13cba1a5d900ccef93da5176a548b69 100644 --- a/Resources/CellTypes/Base.ts +++ b/Resources/CellTypes/Base.ts @@ -279,13 +279,34 @@ if (icon) { if (typeof (icon) === "string") { let src = icon; - if (ElementCellTypeBase.isAttachment(src)) { + + if (this.isAttachment(src)) { src = Forguncy.Helper.SpecialPath.getUploadImageFolderPathInServer() + encodeURIComponent(src); } - callback({ - icon: src, - isSvg: false - }); + if (src.endsWith(".svg")) { + Forguncy.ImageHelper.requestSvg(src, (svgNode) => { + if (svgNode) { + const svg = $(svgNode); + Forguncy.ImageHelper.preHandleSvg(svg, null); + callback({ + "icon": svg[0].outerHTML, + isSvg: true + }); + } + else { + callback({ + icon: src, + isSvg: false + }); + } + }); + } + else { + callback({ + icon: src, + isSvg: false + }); + } } } if (!icon?.Name) { @@ -299,8 +320,8 @@ src = Forguncy.Helper.SpecialPath.getImageEditorUploadImageFolderPath() + encodeURIComponent(icon.Name); } if (Forguncy.ImageDataHelper.IsSvg(src)) { - $.get(src, (data) => { - const svg = $(data.documentElement); + Forguncy.ImageHelper.requestSvg(src, (svgNode) => { + const svg = $(svgNode); Forguncy.ImageHelper.preHandleSvg(svg, icon.UseCellTypeForeColor ? "currentColor" : icon.Color); callback({ "icon": svg[0].outerHTML, @@ -316,7 +337,7 @@ } } - public static isAttachment(src: string): boolean { + public isAttachment(src: string): boolean { if (typeof src !== "string") { return false; } @@ -375,6 +396,18 @@ } return result; } + + public isPlainObject(obj: any): boolean { + return Object.prototype.toString.call(obj) === "[object Object]"; + } + + public format(value: any) { + if (this.CellElement?.StyleInfo?.Formatter) { + const formatedResult = Forguncy.FormatHelper.format(this.CellElement.StyleInfo.Formatter, value); + return formatedResult.text; + } + return value?.toString(); + } } export enum SlotPath { @@ -386,7 +419,9 @@ calendarCell = "CalendarSlots.Cell", calendarHeader = "CalendarSlots.Header", menuItemContent = "MenuItemSlots.Content", - backTopContent = "BackTopSlots.Content" + backTopContent = "BackTopSlots.Content", + tableColumnContent = "TableColumnSlots.Content", + treeNode = "TreeNodeSlots.Node", } export interface IconResult { @@ -394,7 +429,8 @@ isSvg: boolean; } - export class InputCellTypeBaseParam { + export interface IInputCellTypeBaseParam { + TabIndex: number; } export class InputCellTypeBase extends ElementCellTypeBase { @@ -407,12 +443,22 @@ } this._inputTextCache = this.getValueFromElement()?.toString(); }); + this.setTabIndexToElement(); super.onPageLoaded(info); } public setValueToElement(jElement: JQuery, value: any) { super.setValueToElement(jElement, value); this._inputTextCache = this.getValueFromElement()?.toString(); } + private setTabIndexToElement() { + if (!this.cellType) { + return; + } + if (this.shouldEnableTabIndex()) { + const inputCellType = this.cellType as IInputCellTypeBaseParam; + $('button, input, a, textarea', `#${this.ID}`).attr("tabindex", inputCellType.TabIndex); + } + } } export class SupportDataSourceCellType { @@ -421,13 +467,13 @@ this.refreshDataWithOption(cellType, bindingDataSourceModel, callBack, options); } - public static refreshDataWithOption(cellType: ElementCellTypeBase, bindingDataSourceModel, callBack, options: Forguncy.Plugin.queryDataOption, watchOnDependenceChange: boolean = true) { + public static refreshDataWithOption(cellType: ElementCellTypeBase, bindingDataSourceModel, callBack, options: Forguncy.Plugin.queryDataOption, watchOnDependenceChange: boolean = true, userAction = false) { cellType.getBindingDataSourceValue(bindingDataSourceModel, options, (dataSource) => { - callBack(dataSource); + callBack(dataSource, userAction); }); if (watchOnDependenceChange) { - cellType.onDependenceCellValueChanged(() => { - this.refreshDataWithOption(cellType, bindingDataSourceModel, callBack, options, false); + cellType.onDependenceCellValueChanged((userAction) => { + this.refreshDataWithOption(cellType, bindingDataSourceModel, callBack, options, false, userAction); }); } } diff --git a/Resources/CellTypes/Calendar.ts b/Resources/CellTypes/Calendar.ts index 5fb982406ecc651f7b213b772a8e18bce905d63e..cf384cbd0e19f658803602d633214e10de36b395 100644 --- a/Resources/CellTypes/Calendar.ts +++ b/Resources/CellTypes/Calendar.ts @@ -38,6 +38,10 @@ namespace ElementCellTypes { this._timer = setTimeout(fn, 300); } + onWindowResized() { + this.vue?.calculateHeight(); + } + public onPageLoaded(info: Forguncy.Plugin.CellTypeInfo) { const dateCellStr = this.getCustomSlotByPath(SlotPath.calendarCell); const calendarHeaderStr = this.getCustomSlotByPath(SlotPath.calendarHeader); @@ -65,18 +69,40 @@ namespace ElementCellTypes { }; }, mounted() { - const height = Math.floor($(".el-calendar-day", this.$el).height()); - if (height <= 30) { - this.insufficientHeight = true; - } - this.calendarContainerStyle = `height:${height}px;`; + this.calculateHeight(); + + // fix FORGUNCY-18790 CLONE - [FromCN][EL-日历]Double click command does not work on iOS Mobile app + document.addEventListener("dblclick", () => { + }); }, created() { ElementUtils.Dayjs.toggleLocale({ weekStart: cellType.firstDayOfWeek }); }, methods: { + calculateHeight() { + const tbodyHeight = $(".el-calendar", $(self.getContainer())).height() - 120; + const rowCount = $(".el-calendar-table tbody tr", $(self.getContainer())).length; + // 18: 上下间距均为8,加上border 1px + const height = Math.floor(tbodyHeight / rowCount) - 18; + if (height <= 0) { + return; + } + if (height <= 30) { + this.insufficientHeight = true; + } + this.calendarContainerStyle = `height:${height}px;`; + }, getValue() { - return Forguncy.ConvertDateToOADate(this.value); + if (this.value !== null) { + const newDate = new Date(this.value.getTime()); + newDate.setHours(0); + newDate.setMinutes(0); + newDate.setSeconds(0); + newDate.setMilliseconds(0); + + return Forguncy.ConvertDateToOADate(newDate); + } + return null; }, setValue(value) { self.cacheOldValue = value ? Forguncy.ConvertOADateToDate(value) : null; @@ -156,6 +182,13 @@ namespace ElementCellTypes { if (self.cacheOldValue?.getTime() !== newValue?.getTime()) { self.commitValue(); } + + const newDate = new Date(newValue?.getTime()); + const oldDate = new Date(oldValue?.getTime()); + + if (newDate.getFullYear() !== oldDate.getFullYear() || newDate.getMonth() !== oldDate.getMonth()) { + this.$nextTick(this.calculateHeight); + } }, options(newValue, oldValue) { this.clearScheduleMap(); @@ -200,4 +233,4 @@ namespace ElementCellTypes { } } -Forguncy.Plugin.CellTypeHelper.registerCellType("ElementUI.CalendarCellType, ElementUI", ElementCellTypes.CalendarCellType); \ No newline at end of file +Forguncy.Plugin.CellTypeHelper.registerCellType("ElementUI.CalendarCellType, ElementUI", ElementCellTypes.CalendarCellType); diff --git a/Resources/CellTypes/Cascader.ts b/Resources/CellTypes/Cascader.ts index c4a7465b62ee4aacbb4b2564b2dcb392878188bf..75af8aeb63dd0dd3542e5c8bcd0112da70d8866d 100644 --- a/Resources/CellTypes/Cascader.ts +++ b/Resources/CellTypes/Cascader.ts @@ -5,7 +5,7 @@ namespace ElementCellTypes { Hover } - interface ICascaderCellTypeParam { + interface ICascaderCellTypeParam extends IInputCellTypeBaseParam { useBinding: boolean; options: any; bindingOptions: any; @@ -62,7 +62,7 @@ v-model="value" popper-class="${popperClass}" ref="elInput" @change="handleChange" -style="height:100%;width:100%" +@blur="handleBlur" > ${nodeStr ? "" : ""} @@ -92,6 +92,9 @@ style="height:100%;width:100%" self.commitValue(); self.validate(); }, + handleBlur() { + self.validate(); + }, getValue() { const value = this.value; @@ -137,7 +140,7 @@ style="height:100%;width:100%" // 这里认为字符串数字与数字等价,双等号不能去掉 // eslint-disable-next-line const option = flatOptions.find(o => o.value == value); - this.value = option?.value ?? null; + this.value = option?.value ?? value ?? null; } }, disable() { @@ -148,6 +151,11 @@ style="height:100%;width:100%" }, setOptions(options) { if (options) { + TreeHelper.flat(options).forEach(i => { + if ((i)?.label) { + (i).label = self.format((i).label); + } + }); this.options = options; } else { this.options = []; @@ -244,4 +252,4 @@ style="height:100%;width:100%" } } -Forguncy.Plugin.CellTypeHelper.registerCellType("ElementUI.CascaderCellType, ElementUI", ElementCellTypes.CascaderCellType); \ No newline at end of file +Forguncy.Plugin.CellTypeHelper.registerCellType("ElementUI.CascaderCellType, ElementUI", ElementCellTypes.CascaderCellType); diff --git a/Resources/CellTypes/DatePicker.ts b/Resources/CellTypes/DatePicker.ts index 17ef59ab0a6c91052abc0c916e1b42e8da2c452b..f14e5be6ff3f05ec9beb647c89c809892d3261f8 100644 --- a/Resources/CellTypes/DatePicker.ts +++ b/Resources/CellTypes/DatePicker.ts @@ -3,7 +3,7 @@ namespace ElementCellTypes { - interface IDatePickerCellTypeParam { + interface IDatePickerCellTypeParam extends IInputCellTypeBaseParam { ReadOnly: boolean; IsDisabled: boolean; editable: boolean; @@ -54,7 +54,9 @@ namespace ElementCellTypes { popper-class="${popperClass}" :picker-options="pickerOptions" ${cellType.type.indexOf("range") !== -1 ? rangeTemplate : ""} -@change="handleChange"> +@change="handleChange" +@blur="handleBlur" +> @@ -87,12 +89,15 @@ ${cellType.type.indexOf("range") !== -1 ? rangeTemplate : ""} self.commitValue(); self.validate(); }, + handleBlur() { + self.validate(); + }, getValue() { if (!this.input) { return null; } - if (this.input.length) { - return this.input.map(Forguncy.ConvertDateToOADate).join(","); + if (isRange) { + return this.input.map((item) => Forguncy.ConvertDateToOADate(new Date(item.valueOf()))).join(","); } return Forguncy.ConvertDateToOADate(this.input); }, @@ -119,7 +124,29 @@ ${cellType.type.indexOf("range") !== -1 ? rangeTemplate : ""} return value; }; - this.input = covertValueToInput(); + this.input = this.getLegalValue(covertValueToInput()); + }, + getLegalValue(value) { + const { isInvalidDate } = this; + + if (!value) { + return null; + } + + if (!isRange) { + return isInvalidDate(value) ? null : value; + } + + if (!(value instanceof Array) || value.length !== 2) { + return []; + } + + + if (isInvalidDate(value[0]) || isInvalidDate(value[1])) { + return []; + } + + return value; }, disable() { this.disabled = true; @@ -165,39 +192,7 @@ ${cellType.type.indexOf("range") !== -1 ? rangeTemplate : ""} self.fontDom = $('input', self.vueContainer) .add(".el-date-editor", self.vueContainer); }, - watch: { - input(value: Date | Date[]) { - const { isInvalidDate } = this; - - const getLegalValue = () => { - - if (!value) { - return null; - } - - if (!isRange) { - return isInvalidDate(value) ? null : value; - } - - if (!(value instanceof Array)) { - return []; - } - - if (isInvalidDate(value[0]) || isInvalidDate(value[1])) { - return []; - } - - return value; - - }; - - const legalValue = getLegalValue(); - - if (legalValue !== value) { - this.input = legalValue; - } - } - } + }; this.createVueApp(option); @@ -219,4 +214,4 @@ ${cellType.type.indexOf("range") !== -1 ? rangeTemplate : ""} } } -Forguncy.Plugin.CellTypeHelper.registerCellType("ElementUI.DatePickerCellType, ElementUI", ElementCellTypes.DatePickerCellType); \ No newline at end of file +Forguncy.Plugin.CellTypeHelper.registerCellType("ElementUI.DatePickerCellType, ElementUI", ElementCellTypes.DatePickerCellType); diff --git a/Resources/CellTypes/Input.ts b/Resources/CellTypes/Input.ts index 3aff9d36db6376664fa71171837de8333e14ebf1..c8dacb8809f7cbb340cfa20405dbc62c3fa8a90c 100644 --- a/Resources/CellTypes/Input.ts +++ b/Resources/CellTypes/Input.ts @@ -1,6 +1,6 @@ /// namespace ElementCellTypes { - interface IInputCellTypeParam { + interface IInputCellTypeParam extends IInputCellTypeBaseParam { type: "text" | "password" | "textarea"; maxlength?: object; showWordLimit: boolean; @@ -11,6 +11,7 @@ namespace ElementCellTypes { suffixIcon: Icon; ReadOnly: boolean; resize: string; + IsSelectAllOnFocus:boolean; } export class InputCellType extends InputCellTypeBase { @@ -27,6 +28,7 @@ namespace ElementCellTypes { ref="elInput" :disabled="disabled" :suffixIcon="suffixIcon" :prefixIcon="prefixIcon" @blur="handleBlur" +@focus="handleFocus" @change="handleChange"> `, @@ -49,7 +51,12 @@ ref="elInput" }, methods: { handleBlur() { - self.validate(); + self.validate(); + }, + handleFocus() { + if (self.cellType.IsSelectAllOnFocus) { + self.Select(); + } }, handleChange() { self.commitValue(); @@ -80,9 +87,11 @@ ref="elInput" self.fontDom = inputJqel; if (cellType.type !== "textarea") { Forguncy.FocusMoveHelper.AllowMoveFocusByEnterKey(inputJqel, false); + } else { + inputJqel.css("height", self.getContainer().height() + "px"); } } - } + } }; this.createVueApp(option); @@ -105,7 +114,17 @@ ref="elInput" return null; } return value; + } + + public setFocus() { + this.Focus(); } + + public hasFocus() { + const dom = $(this.vue.$refs.elInput.input); + return dom.length && document.activeElement === dom[0]; + } + public Focus() { this.vue.$refs.elInput.focus(); } diff --git a/Resources/CellTypes/InputNumber.ts b/Resources/CellTypes/InputNumber.ts index 4abafa0de2987ecf3658e08660106e44e636234d..6042e7240d842968e01efb733345de67c25e4133 100644 --- a/Resources/CellTypes/InputNumber.ts +++ b/Resources/CellTypes/InputNumber.ts @@ -1,7 +1,7 @@ /// namespace ElementCellTypes { - interface IInputNumberCellTypeParam { + interface IInputNumberCellTypeParam extends IInputCellTypeBaseParam { min?: any; max?: any; step: any; @@ -11,6 +11,7 @@ namespace ElementCellTypes { controlsPosition: boolean; placeholder: string; controls: boolean; + IsSelectAllOnFocus:boolean; } export class InputNumberCellType extends InputCellTypeBase { @@ -26,6 +27,21 @@ namespace ElementCellTypes { return super.setValueToElement(jelement, value); } + calcMinOrMax(value) { + const calcValue = this.evaluateFormula(value); + + if (this.isEmpty(calcValue) || isNaN(calcValue)) { + /** + * 只能返回 undefined,切勿改成 null!!!! + * + * 在这里,null和undefined不等价,只有是undefined,组件内部才会使用默认值,Infinity 或者 -Infinity + */ + return undefined; + } + + return Number(calcValue); + } + public onPageLoaded(info: Forguncy.Plugin.CellTypeInfo) { const self = this; const cellType = this.cellType; @@ -38,9 +54,10 @@ namespace ElementCellTypes { const option = { template: ` @@ -49,8 +66,8 @@ ref="elInput" data() { return { input: undefined, - min: self.calcNumber(cellType.min), - max: self.calcNumber(cellType.max), + min: self.calcMinOrMax(cellType.min), + max: self.calcMinOrMax(cellType.max), step: self.calcNumber(cellType.step), stepStrictly: cellType.stepStrictly, precision: cellType.precision, @@ -82,10 +99,26 @@ ref="elInput" this.disabled = false; }, blurHandler() { - self.validate(); + self.validate(); + if (this.input === null) { + self.commitValue(); + } + }, + focusHandler(){ + if(self.cellType.IsSelectAllOnFocus){ + $("input",self.vueContainer).select(); + } }, changedHandler() { - self.validate(); + if (!this.stepStrictly) { + self.commitValue(); + return; + } + + // 这只能用双等,不要用三等 + if (window.BigNumber(this.input).mod(window.BigNumber(this.step)) == 0) { + self.commitValue(); + } } }, mounted() { @@ -93,7 +126,7 @@ ref="elInput" self.fontDom = inputJqel; inputJqel.on("input", () => { - self.inputValue = inputJqel.val(); + self.inputValue = inputJqel.val(); }); inputJqel.on("blur", () => { @@ -104,27 +137,16 @@ ref="elInput" Forguncy.FocusMoveHelper.AllowMoveFocusByEnterKey(inputJqel, false); }, - watch: { - input(value) { - if (!this.stepStrictly) { - self.commitValue(); - return; - } - if (value % this.step === 0) { - self.commitValue(); - } - } - } }; this.createVueApp(option); this.onDependenceCellValueChanged(() => { if (this.isFormula(cellType.min)) { - this.vue.min = this.calcNumber(cellType.min); + this.vue.min = this.calcMinOrMax(cellType.min); } if (this.isFormula(cellType.max)) { - this.vue.max = this.calcNumber(cellType.max); + this.vue.max = this.calcMinOrMax(cellType.max); } if (this.isFormula(cellType.step)) { this.vue.step = this.calcNumber(cellType.step); @@ -133,10 +155,10 @@ ref="elInput" super.onPageLoaded(info); } public SetMinValue(value) { - this.vue.min = Number(value); + this.vue.min = this.calcMinOrMax(value); } public SetMaxValue(value) { - this.vue.max = Number(value); + this.vue.max = this.calcMinOrMax(value); } public SetStep(value) { this.vue.step = Number(value); @@ -144,6 +166,15 @@ ref="elInput" public Focus() { this.vue.$refs.elInput.focus(); } + + public setFocus() { + this.Focus(); + } + + public hasFocus() { + const dom = $(this.vue.$refs.elInput.input); + return dom.length && document.activeElement === dom[0]; + } } } diff --git a/Resources/CellTypes/NavMenu.ts b/Resources/CellTypes/NavMenu.ts index 781daff04801d8ceaea64939757be2bae1c0ed6f..a296f1ee490fad7c25b654ba307308ab00853ef0 100644 --- a/Resources/CellTypes/NavMenu.ts +++ b/Resources/CellTypes/NavMenu.ts @@ -15,6 +15,7 @@ namespace ElementCellTypes { collapseTransition: boolean; menuTrigger: "hover" | "click"; DefaultExpansion: "expand" | "collapse"; + HideBorder: boolean; } interface ITreeNode extends ITreeNodeBase { @@ -37,6 +38,8 @@ namespace ElementCellTypes { export class NavMenuCellType extends ElementCellTypeBase { + private _badgeDic = {}; + private _pageName = this.IsInMasterPage ? Page.getMasterPageName() : Page.getPageName(); private _scrollBarDataKey = `${this._pageName}_${this.ID}`; @@ -77,7 +80,9 @@ namespace ElementCellTypes { if (!cellType.useBinding && cellType.options) { - options = this.generateIndex(cellType.options); + const permission = this.getUIPermission(Forguncy.Plugin.UIPermissionScope.Visible); + options = this.filterOptionsByPermission(cellType.options, permission?.Children); + options = this.generateIndex(options); flatOptions = TreeHelper.flat(options); NavMenuCellType.recalcNotice(options, this); @@ -89,11 +94,15 @@ namespace ElementCellTypes { } this.addCustomClass(cellType.mode + "-menu"); + + if(cellType.HideBorder) { + this.addCustomClass("fgc-el-menu-hide-border") + } let intervalTimer = null; let timeoutTimer = null; - + const clearTimers = () => { clearInterval(intervalTimer); clearInterval(timeoutTimer); @@ -127,8 +136,10 @@ namespace ElementCellTypes { @@ -150,7 +161,7 @@ namespace ElementCellTypes { template: ` - `; } + public SetDataSourceByObjTree(dataSource: any[], valueProperty, labelProperty, childrenProperty, iconProperty) { + if (typeof dataSource === "string") { + dataSource = JSON.parse(dataSource); + } + + const flatItems = []; + + const flat = (data, parentValue) => { + data.forEach(item => { + const newItem = { + label: item[labelProperty ?? valueProperty], + value: item[valueProperty], + icon: item[iconProperty], + parentValue: parentValue, + }; + flatItems.push(newItem); + if (item[childrenProperty]) { + flat(item[childrenProperty], newItem.value); + } + }); + } + + flat(dataSource, null); + this.setDataSource(flatItems); + } + + public SetDataSourceByIdPidTable(dataSource: any[], valueProperty, labelProperty, parentValue,iconProperty) { + if (typeof dataSource === "string") { + dataSource = JSON.parse(dataSource); + } + const items = dataSource.map(i => { + ...i, + value: i[valueProperty], + label: i[labelProperty ?? valueProperty], + icon: i[iconProperty], + parentValue: i[parentValue], + }); + this.setDataSource(items); + } + public ReloadBindingItems() { const cellType = this.cellType; if (cellType.useBinding) { - SupportDataSourceCellType.refreshData(this, cellType.bindingOptions, dataSource => this.setDataSource(dataSource)); + SupportDataSourceCellType.refreshData(this, cellType.bindingOptions, dataSource => { + this.setDataSource(dataSource); + Object.keys(this._badgeDic).forEach(key => { + this.SetBadge(key, this._badgeDic[key]); + }); + }); } } static recalcNotice(option: IMenuNode[], cellType: NavMenuCellType) { @@ -455,25 +568,15 @@ namespace ElementCellTypes { const nodes = TreeHelper.flat(option); for (const node of nodes) { const menuNode = node; - if (typeof (menuNode.icon) === "string") { - let src = menuNode.icon; - if (this.isAttachment(menuNode.icon)) { - src = Forguncy.Helper.SpecialPath.getUploadImageFolderPathInServer() + encodeURIComponent(menuNode.icon); - } - menuNode.iconSrc = src; - } - else { - if (menuNode && (menuNode.icon)?.Name) { - - cellType.getIcon(menuNode.icon, icon => { - if (icon.isSvg) { - menuNode.svgIcon = icon.icon; - } - else { - menuNode.iconSrc = icon.icon; - } - }); - } + if (menuNode && menuNode.icon) { + cellType.getIcon(menuNode.icon, icon => { + if (icon.isSvg) { + menuNode.svgIcon = icon.icon; + } + else { + menuNode.iconSrc = icon.icon; + } + }); } } } @@ -557,31 +660,20 @@ namespace ElementCellTypes { return; } - const itemArray = items.split(','); - - const options = this.vue.options; - - this.HideItemsInternal(options, itemArray); + items.split(',').forEach(item => this.vue.hideOptionValues.add(item.toString())); } - // RunTimeMethod - public HideItemsInternal(options: IMenuNode[], hideArray: string[]) { - if (!options) { + + public ShowItems(items) { + if (!items) { return; } - for (let i = options.length - 1; i >= 0; i--) { - const option = options[i]; - // 此处比较需要忽略类型,使用双等号 - // eslint-disable-next-line - if (hideArray.find((value) => option.value == value)) { - options.splice(i, 1); - } - else { - this.HideItemsInternal(option.children, hideArray); - } - } + + items.split(',').forEach(item => this.vue.hideOptionValues.delete(item.toString())); } + // RunTimeMethod public SetBadge(itemValue, badgeValue) { + this._badgeDic[itemValue] = badgeValue; this.SetBadgeInternal(this.vue.options, itemValue, badgeValue); } diff --git a/Resources/CellTypes/Pagination.ts b/Resources/CellTypes/Pagination.ts index 509b33dbbb6214edecba15d7626c986af38c9f46..3b08b966f151645687f149fbac93d1e530566beb 100644 --- a/Resources/CellTypes/Pagination.ts +++ b/Resources/CellTypes/Pagination.ts @@ -12,6 +12,8 @@ namespace ElementCellTypes { small: boolean; background: boolean; hideOnSinglePage: boolean; + ElementTableName?: string; + AttachElementTable: boolean; } interface PageLayout { @@ -24,8 +26,10 @@ namespace ElementCellTypes { CommandList: object[]; valueParamName: string; } + export class PaginationCellType extends ElementCellTypeBase { _listview: Forguncy.ListView; + _elementTable: TableCellType | VirtualizedTableCellType; _pagingChangedCallBack: Function; public createContent() { const cellType = this.cellType; @@ -40,13 +44,17 @@ namespace ElementCellTypes { const self = this; this.addCustomClass("el-pagination-custom"); const cellType = this.cellType; - if (cellType.ListviewName) { + if (cellType.AttachElementTable) { + this._elementTable = PaginationCellType.getElementTableCellTypeByName(cellType.ElementTableName, this.runTimePageName); + } else if (cellType.ListviewName) { this._listview = Forguncy.Page.getListViews(true) .filter(i => i.getName() === cellType.ListviewName && i.getRunTimePageName() === this.runTimePageName)[0]; } const listview = this._listview; + const elementTable = this._elementTable; const option = { - template: `
+ template: ` +
`, @@ -78,13 +87,14 @@ namespace ElementCellTypes { prevText: cellType.prevText, nextText: cellType.nextText, disabled: undefined, - currentPage: 0, + currentPage: 1, hideOnSinglePage: cellType.hideOnSinglePage, }; }, methods: { onSizeChanged(size) { this.pageSize = size; + this.currentPage = 1; this.updateSize(); this.executeCommand(); }, @@ -106,23 +116,27 @@ namespace ElementCellTypes { setValue(value) { let pageIndex = Math.max(1, Number(value)); if (Number.isNaN(pageIndex)) { - pageIndex = 1; + pageIndex = 1; } if (pageIndex !== this.currentPage) { this.currentPage = pageIndex; - this.updatePage(); + this.updatePage(); } }, getValue() { return this.currentPage; }, updateSize() { - if (listview) { + if (elementTable) { + self.queryElTable(); + } else if (listview) { listview.usePaginationDisplay(this.pageSize); } }, updatePage() { - if (listview) { + if (elementTable) { + self.queryElTable(); + } else if (listview) { listview.goToSpecifiedPage(this.currentPage); } }, @@ -131,6 +145,14 @@ namespace ElementCellTypes { }, enable() { this.disabled = false; + }, + calcJumpInputWidth(){ + const pageCount = Math.ceil(this.total / this.pageSize); + + $(".el-pagination__jump .el-input__wrapper", self.vueContainer) + .add(".el-pagination__jump input", self.vueContainer) + .add(".el-pagination__jump .el-input", self.vueContainer) + .css("width", `${(Math.max(pageCount.toString().length, 5.6)) * 10}px`); } }, watch: { @@ -139,12 +161,20 @@ namespace ElementCellTypes { const numerValue = Number(value); this.value = isNaN(numerValue) ? null : numerValue; } + + this.calcJumpInputWidth(); + }, + total() { + this.calcJumpInputWidth(); } } }; this.createVueApp(option); - if (listview) { + if (elementTable) { + elementTable.pager = this.vue; + this.queryElTable(); + } else if (listview) { const currentInfo = listview.getPaginationInfo(); this.vue.total = currentInfo?.TotalRowCount; this.vue.currentPage = currentInfo ? currentInfo.PageIndex : 1; @@ -167,6 +197,26 @@ namespace ElementCellTypes { } } + public static getElementTableCellTypeByName(elTableName: string, pageName: string): TableCellType | VirtualizedTableCellType { + if (elTableName === null || elTableName === undefined || elTableName === "") { + return null; + } + const allCells = Forguncy.ForguncyData.pageInfo.pageElementManager.cells.getAllCells([pageName]); + const allElTableCells = allCells?.filter(cell => cell.cellType instanceof TableCellType || cell.cellType instanceof VirtualizedTableCellType); + + return allElTableCells.find(({cellType}) => { + if (cellType instanceof VirtualizedTableCellType) { + return cellType.cellType.TableName === elTableName; + } else { + return cellType.cellType.ElTableName === elTableName; + } + })?.cellType; + } + + public queryElTable() { + this._elementTable.queryElTable(); + } + // RunTimeMethods SetPageSize(pageSize) { pageSize = Number(pageSize); diff --git a/Resources/CellTypes/Progress.ts b/Resources/CellTypes/Progress.ts index 1bd026859d5633f14be5f96acd74f6d2d9fd8d3c..2889561ceb268f15761321467fcff1b8f943fe21 100644 --- a/Resources/CellTypes/Progress.ts +++ b/Resources/CellTypes/Progress.ts @@ -27,6 +27,10 @@ namespace ElementCellTypes { } export class ProgressCellType extends ElementCellTypeBase { + onWindowResized() { + this.vue?.calculateHeight(); + } + public onPageLoaded(info: Forguncy.Plugin.CellTypeInfo) { const cellType = this.cellType; const self = this; @@ -61,21 +65,23 @@ namespace ElementCellTypes { }; }, mounted() { - const container: HTMLElement = document.getElementById(containerId); - - if (!container) { - return; - } - - const { offsetHeight: height, offsetWidth: width } = container; - - if (this.type !== ProgressType[ProgressType.line]) { - this.width = Math.min(width, height); - } - + this.calculateHeight(); self.fontDom = $(".el-progress__text,.el-progress-bar__innerText", self.getContainer()).find("span"); }, methods: { + calculateHeight() { + const container: HTMLElement = document.getElementById(containerId); + + if (!container) { + return; + } + + const { offsetHeight: height, offsetWidth: width } = container; + + if (this.type !== ProgressType[ProgressType.line]) { + this.width = Math.min(width, height); + } + }, getValue() { return this.percentage; }, @@ -91,17 +97,6 @@ namespace ElementCellTypes { } }; this.createVueApp(option); - this.onDependenceCellValueChanged(() => { - if (this.isFormula(cellType.textFormula)) { - const old = this.vue.percentage; - this.vue.percentage = old + 1; - // 强行触发一次percentage change,否则的话format方法不走 - setTimeout(() => { - this.vue.percentage = old; - }); - } - }); - super.onPageLoaded(info); } protected clickable(): boolean { diff --git a/Resources/CellTypes/Select.ts b/Resources/CellTypes/Select.ts index 4ed6ae438f938274dc78987acbc2b7b7f4ea2f82..5428479dd3c5e17a0590e89e9d8355bd601f5de9 100644 --- a/Resources/CellTypes/Select.ts +++ b/Resources/CellTypes/Select.ts @@ -13,7 +13,7 @@ namespace ElementCellTypes { loadingText: string; } - interface ISelectCellTypeParam { + interface ISelectCellTypeParam extends IInputCellTypeBaseParam { useBinding: boolean; options: INormalItem[]; bindingOptions: any; @@ -36,7 +36,11 @@ namespace ElementCellTypes { export class SelectCellType extends InputCellTypeBase { - public setDataSource(dataSource: any[]) { + public setDataSource(dataSource: any[], userAction: boolean) { + if (userAction) { + this.vue.value = null; + this.commitValue(); + } const cloneDataSource = [...dataSource]; if (this.cellType.AllowAddEmptyItem) { @@ -75,9 +79,9 @@ namespace ElementCellTypes { this.addCustomClass("el-select-custom"); let options = []; if (cellType.options && !cellType.useBinding) { - options = cellType.options.map(o => ({ ...o, value: o.value ?? ""})); + options = cellType.options.map(o => self.convertOption(o)); } - let remoteFilterBinding = ''; + let remoteFilterBinding = ''; if (cellType.useBinding && cellType.filterInServer) { remoteFilterBinding = ':remote-method="remoteMethod"'; } @@ -105,7 +109,9 @@ namespace ElementCellTypes { :loading="loading" default-first-option ref="elInput" - @change="handleChange" style="height:100%;width:100%"> + @change="handleChange" + @blur="handleBlur" + style="height:100%;width:100%"> { if (newOptions && newOptions.length > 0) { for (const newOption of newOptions) { + const originalOptions = [...this.options] + // 在这里需要将newOption push到options里面去是为了正常显示label this.options.push(newOption); + // 等label渲染成功后,在还原options + this.$nextTick(_ => { + this.options = originalOptions; + }); } } this.setValueInternal(this.value); @@ -218,13 +233,37 @@ namespace ElementCellTypes { continue; } let match = false; + + const setValue = (value) => { + arrayValue[i] = value; + match = true; + } + for (const option of this.options) { - if (option.value == value) { - arrayValue[i] = option.value; - match = true; + if (option.value === value) { + setValue(option.value); break; } } + + if (!match) { + for (const option of this.options) { + if (option.value?.toString() === value?.toString()) { + setValue(option.value); + break; + } + } + } + + if (!match) { + for (const option of this.options) { + if (option.value == value) { + setValue(option.value); + break; + } + } + } + if (!match) { notMatchItems.push(value); } @@ -233,7 +272,7 @@ namespace ElementCellTypes { return notMatchItems; }, remoteMethod(query: any) { - let queryDataOption = this.defaultQueryDataOption; + let queryDataOption = self.defaultQueryDataOption; if (query) { queryDataOption = { queryConditions: [{ @@ -248,7 +287,7 @@ namespace ElementCellTypes { } this.loading = true; SupportDataSourceCellType.refreshDataWithOption(self, cellType.bindingOptions, dataSource => { - self.setDataSource(dataSource); + self.setDataSource(dataSource, false); this.loading = false; }, queryDataOption, false); }, @@ -260,26 +299,10 @@ namespace ElementCellTypes { }, setOptions(options) { if (options) { - this.options = options.map(o => ({ ...o, value: o.value ?? "" })); + this.options = options.map(o => self.convertOption(o)); } else { this.options = []; } - if (Array.isArray(this.value)) { - const values = []; - const set = new Set(this.value.map(toString)); - - options.forEach(option=>{ - if(set.has(option.value.toString())){ - values.push(option.value); - } - }) - this.value = values; - } else { - if (!options.find(o => o.value == this.value)) { - this.value = ""; - } - } - self.commitValue(); } }, mounted() { @@ -295,7 +318,7 @@ namespace ElementCellTypes { if (cellType.useBinding) { if (cellType.filterable && cellType.filterInServer) { - SupportDataSourceCellType.refreshDataWithOption(this, cellType.bindingOptions, dataSource => this.setDataSource(dataSource), this.defaultQueryDataOption); + SupportDataSourceCellType.refreshDataWithOption(this, cellType.bindingOptions, (dataSource, userAction) => this.setDataSource(dataSource, userAction), this.defaultQueryDataOption); } else { self.ReloadBindingItems(); } @@ -303,28 +326,44 @@ namespace ElementCellTypes { super.onPageLoaded(info); } - private getSelectedItem() { - const { value, options } = this.vue; - - let filterHandler; - - if (value instanceof Array) { - filterHandler = (option) => value.includes(option.value); + private convertOption(item: INormalItem) { + return { + ...item, + value: item.value ?? "", + label: this.format(item.label) + }; + } + private getSelectedText() { + const {value, options} = this.vue; + if (Array.isArray(value)) { + const optionsMap = new Map(options.map(option => ([option.value, option.label]))); + return value.map(v => optionsMap.has(v) ? optionsMap.get(v) : v).join(","); } else { - filterHandler = (option) => value === option.value; + const option = options.find(option => option.value === value); + return option ? option?.label : value; } - - return options.filter(filterHandler); } public ReloadBindingItems() { const cellType = this.CellElement.CellType; - SupportDataSourceCellType.refreshData(this, cellType.bindingOptions, dataSource => this.setDataSource(dataSource), { + SupportDataSourceCellType.refreshData(this, cellType.bindingOptions, (dataSource, userAction) => this.setDataSource(dataSource, userAction), { + distinct: true + }); + } + + public preReload() { + const cellType = this.CellElement.CellType; + + this.clearBindingDataSourceValueCache(cellType.bindingOptions, { distinct: true }); } public reload() { + if (this.cellType.filterable && this.cellType.filterInServer) { + SupportDataSourceCellType.refreshDataWithOption(this, this.cellType.bindingOptions, (dataSource, userAction) => this.setDataSource(dataSource, userAction), this.defaultQueryDataOption, false, false); + return; + } if (this.cellType.useBinding) { this.ReloadBindingItems(); } @@ -341,7 +380,7 @@ namespace ElementCellTypes { "value": i, "label": i, }); - this.setDataSource(objSource); + this.setDataSource(objSource, false); } public SetDataSourceByObjArray(dataSource: any[], valueProperty: string, labelProperty: string) { @@ -359,16 +398,25 @@ namespace ElementCellTypes { "value": i[valueProperty], "label": i[labelProperty], })); - this.setDataSource(objSource); + this.setDataSource(objSource, false); } public Focus() { this.vue.$refs.elInput.focus(); } - + + public setFocus() { + this.Focus(); + } + + public hasFocus() { + const dom = $(".el-input__inner",this.vueContainer); + return dom.length && document.activeElement === dom[0]; + } + public GetSelectedText() { return { - SelectedText: this.getSelectedItem().map(item => item.label).join(",") + SelectedText: this.getSelectedText() }; } } diff --git a/Resources/CellTypes/Slider.ts b/Resources/CellTypes/Slider.ts index 17420476f734a5eceaf4bdd016ee475a314c8ca7..c17faf7aab9b348433271df5f800d0ae48f9fa48 100644 --- a/Resources/CellTypes/Slider.ts +++ b/Resources/CellTypes/Slider.ts @@ -3,7 +3,7 @@ namespace ElementCellTypes { type TMarks = { Value: number, Label: any }[]; - interface ISliderCellTypeParam { + interface ISliderCellTypeParam extends IInputCellTypeBaseParam { min: any; max: any; step: any; diff --git a/Resources/CellTypes/Steps.ts b/Resources/CellTypes/Steps.ts index 41da9ff650053de227fd19fd06f785bf42e9a1d6..81bab3ab1c1f421ff0ffc0cc7b7c9240aef473df 100644 --- a/Resources/CellTypes/Steps.ts +++ b/Resources/CellTypes/Steps.ts @@ -43,6 +43,7 @@ namespace ElementCellTypes { el: "#" + this.uId, template: `
@@ -70,6 +72,7 @@ namespace ElementCellTypes { direction: cellType.layout, processStatus: StepsStatus[cellType.processStatus], finishStatus: StepsStatus[cellType.finishStatus], + refreshKey: 0 }; }, methods: { @@ -84,6 +87,10 @@ namespace ElementCellTypes { this.options = options; this.updateActive(); self.recalcIcon(); + // element bug, 暂时使用key重新刷新组件,重置step内部错误状态。 + // bug report [Component] [steps] el-steps: 数据源改变之后,步骤条的顺序出错 #12811 + // bug link: https://github.com/element-plus/element-plus/issues/12811 + this.refreshKey = (this.refreshKey + 1) % 2; }, updateActive() { diff --git a/Resources/CellTypes/TabHeader.ts b/Resources/CellTypes/TabHeader.ts index 9613a794d171fb5dc6eadb8cd9dc1c9af2ef0c65..b6246edfc5731ffc84213d60a5e0acef24d1cc90 100644 --- a/Resources/CellTypes/TabHeader.ts +++ b/Resources/CellTypes/TabHeader.ts @@ -51,14 +51,16 @@ namespace ElementCellTypes { const classStr = "fgc-" + cellType.type; const option = { template: ` -