ListForm EditorScript ve EditorOptions düzenlemeleri
This commit is contained in:
parent
e4cecc8a62
commit
422e32489f
18 changed files with 1641 additions and 297 deletions
|
|
@ -27047,6 +27047,192 @@
|
|||
"key": "App.ListFormTodoBoard.InvalidJson",
|
||||
"en": "The stored value is not in a valid JSON format; it will be overwritten when saved.",
|
||||
"tr": "Kayıtlı değer geçerli JSON biçiminde değil; kaydedildiğinde üzerine yazılacak."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderCalc.CalcTitle",
|
||||
"en": "Calculation",
|
||||
"tr": "Hesaplama"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderData.DataTitle",
|
||||
"en": "Data",
|
||||
"tr": "Veri"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderIntegration.IntegrationTitle",
|
||||
"en": "Integration",
|
||||
"tr": "Entegrasyon"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderMultiply.LeftLabel",
|
||||
"en": "First field",
|
||||
"tr": "Birinci alan"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderRate.RateLabel",
|
||||
"en": "Rate",
|
||||
"tr": "Oran"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderRate.RatePlaceholder",
|
||||
"en": "20 or VatRate",
|
||||
"tr": "20 veya KdvOrani"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderSum.SumLabel",
|
||||
"en": "Sum",
|
||||
"tr": "Toplama"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderCopy.SourcePlaceholder",
|
||||
"en": "unitPrice or Customer.Name",
|
||||
"tr": "unitPrice veya Customer.Name"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderReadOnly.ReadOnlyLabel",
|
||||
"en": "Make read-only",
|
||||
"tr": "Salt okunur yap"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderReadOnly.TargetLabel",
|
||||
"en": "Field to lock",
|
||||
"tr": "Kilitlenecek alan"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderOpenUrl.TargetLabel",
|
||||
"en": "Target",
|
||||
"tr": "Hedef"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderApiToField.ApiToFieldLabel",
|
||||
"en": "Write API result to field",
|
||||
"tr": "API sonucunu alana yaz"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderApiToField.UrlLabel",
|
||||
"en": "API address",
|
||||
"tr": "API adresi"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderApiToField.PathLabel",
|
||||
"en": "Response path",
|
||||
"tr": "Cevap yolu"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilderCustom.CodeLabel",
|
||||
"en": "Code",
|
||||
"tr": "Kod"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.SpecText.TextTitle",
|
||||
"en": "Text / Mask",
|
||||
"tr": "Metin / Maske"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.SpecWidth.WidthPlaceholder",
|
||||
"en": "100% or 240",
|
||||
"tr": "100% veya 240"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.SpecFirstDayOfWeek.Help",
|
||||
"en": "0 Sunday, 1 Monday.",
|
||||
"tr": "0 Pazar, 1 Pazartesi."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.SpecFormatText.FormatTextPlaceholder",
|
||||
"en": "dd/MM/yyyy or currency",
|
||||
"tr": "dd/MM/yyyy veya currency"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.PresetReadOnly.ReadOnlyLabel",
|
||||
"en": "Read-only",
|
||||
"tr": "Salt okunur"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.PresetDisabled.DisabledLabel",
|
||||
"en": "Disabled",
|
||||
"tr": "Pasif"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.PresetFixedPoint2.FixedPoint2Description",
|
||||
"en": "format.type fixedPoint, precision 2.",
|
||||
"tr": "format.type fixedPoint, precision 2."
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.PresetCurrency.CurrencyLabel",
|
||||
"en": "Currency (TRY)",
|
||||
"tr": "Para birimi (TRY)"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.PresetPhoneMask.PhoneMaskLabel",
|
||||
"en": "Phone mask",
|
||||
"tr": "Telefon maskesi"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.PresetSearchableList.SearchableListLabel",
|
||||
"en": "Searchable list",
|
||||
"tr": "Aranabilir liste"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.PresetHeight100.Height100Description",
|
||||
"en": "height: 100",
|
||||
"tr": "height: 100"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.PresetHeight200.Height200Description",
|
||||
"en": "height: 200",
|
||||
"tr": "height: 200"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ListFormEditorOptions.RawJson",
|
||||
"en": "Raw JSON",
|
||||
"tr": "Ham JSON"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilder.When",
|
||||
"en": "When",
|
||||
"tr": "Ne zaman"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilder.Optional",
|
||||
"en": "optional",
|
||||
"tr": "opsiyonel"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.ScriptBuilder.ValuePlaceholder",
|
||||
"en": "Active / 1000",
|
||||
"tr": "Aktif / 1000"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using System.Text.Json;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Sozsoft.Languages.Languages;
|
||||
using Sozsoft.Platform.Editors;
|
||||
using Sozsoft.Platform.Entities;
|
||||
using Sozsoft.Platform.Enums;
|
||||
using Sozsoft.Platform.ListForms;
|
||||
|
|
@ -277,7 +278,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.ParentId",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -304,7 +305,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.GroupName",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -334,7 +335,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 4,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.DisplayName",
|
||||
Width = 0,
|
||||
ListOrderNo = 5,
|
||||
|
|
@ -381,7 +382,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 6,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.MultiTenancySide",
|
||||
Width = 0,
|
||||
ListOrderNo = 7,
|
||||
|
|
@ -546,7 +547,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.ValueType",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -986,7 +987,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxImageUpload,
|
||||
ColSpan = 2,
|
||||
EditorOptions = EditorOptionValues.ImageUploadOptions(false),
|
||||
EditorOptions = EditorOptions.ImageUpload(false),
|
||||
CaptionName = "App.Listform.ListformField.Avatar",
|
||||
Width = 0,
|
||||
ListOrderNo = 1,
|
||||
|
|
@ -1120,7 +1121,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||
EditorOptions = EditorOptions.Phone(),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -1136,7 +1137,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 7,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.WorkHour",
|
||||
Width = 0,
|
||||
ListOrderNo = 7,
|
||||
|
|
@ -1162,7 +1163,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 8,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Department",
|
||||
Width = 0,
|
||||
ListOrderNo = 8,
|
||||
|
|
@ -1194,7 +1195,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 9,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.JobPositionId",
|
||||
Width = 0,
|
||||
ListOrderNo = 9,
|
||||
|
|
@ -1864,7 +1865,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 5,
|
||||
EditorType2 = EditorTypes.dxHtmlEditor,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.HtmlEditorOptions,
|
||||
EditorOptions = EditorOptions.Html(),
|
||||
CaptionName = "App.Listform.ListformField.HtmlContent",
|
||||
Width = 0,
|
||||
ListOrderNo = 6,
|
||||
|
|
@ -2082,7 +2083,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxDateBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.TimeSpanOptions,
|
||||
EditorOptions = EditorOptions.Time(),
|
||||
CaptionName = "App.Listform.ListformField.StartTime",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -2103,7 +2104,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxDateBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.TimeSpanOptions,
|
||||
EditorOptions = EditorOptions.Time(),
|
||||
CaptionName = "App.Listform.ListformField.EndTime",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -2334,7 +2335,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.ResourceType",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -2369,7 +2370,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.ResourceId",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -2704,7 +2705,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.ParentId",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -2823,7 +2824,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.ParentId",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -2853,7 +2854,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Department",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -3023,7 +3024,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxHtmlEditor,
|
||||
ColSpan = 2,
|
||||
EditorOptions = EditorOptionValues.HtmlEditorOptions,
|
||||
EditorOptions = EditorOptions.Html(),
|
||||
CaptionName = "App.Listform.ListformField.Content",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -3044,7 +3045,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 4,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Category",
|
||||
Width = 0,
|
||||
ListOrderNo = 5,
|
||||
|
|
@ -3077,7 +3078,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 5,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "Abp.Mailing.Smtp.UserName",
|
||||
Width = 0,
|
||||
ListOrderNo = 6,
|
||||
|
|
@ -3162,7 +3163,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 9,
|
||||
EditorType2 = EditorTypes.dxImageUpload,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ImageUploadOptions(),
|
||||
EditorOptions = EditorOptions.ImageUpload(),
|
||||
CaptionName = "App.Listform.ListformField.ImageUrl",
|
||||
Width = 0,
|
||||
ListOrderNo = 10,
|
||||
|
|
@ -3574,7 +3575,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Status",
|
||||
Width = 0,
|
||||
ListOrderNo = 5,
|
||||
|
|
@ -3753,7 +3754,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Type",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -4032,7 +4033,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "Abp.Mailing.Smtp.UserName",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -4166,7 +4167,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.QuestionId",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -4331,7 +4332,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "Abp.Mailing.Smtp.UserName",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -4358,7 +4359,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 5,
|
||||
EditorType2 = EditorTypes.dxHtmlEditor,
|
||||
ColSpan = 2,
|
||||
EditorOptions = EditorOptionValues.HtmlEditorOptions,
|
||||
EditorOptions = EditorOptions.Html(),
|
||||
CaptionName = "App.Listform.ListformField.Content",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -4526,7 +4527,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.SocialPostId",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -4942,7 +4943,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Category",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -4965,7 +4966,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Type",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -5075,7 +5076,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 6,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "Abp.Mailing.Smtp.UserName",
|
||||
Width = 0,
|
||||
ListOrderNo = 8,
|
||||
|
|
@ -5141,7 +5142,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 7,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Status",
|
||||
Width = 0,
|
||||
ListOrderNo = 11,
|
||||
|
|
@ -5172,7 +5173,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 10,
|
||||
EditorType2 = EditorTypes.dxImageUpload,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ImageUploadOptions(),
|
||||
EditorOptions = EditorOptions.ImageUpload(),
|
||||
CaptionName = "App.Listform.ListformField.Photos",
|
||||
Width = 0,
|
||||
ListOrderNo = 12,
|
||||
|
|
@ -5654,7 +5655,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
EditOrderNo = 6,
|
||||
EditorType2 = EditorTypes.dxTextBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||
EditorOptions = EditorOptions.Phone(),
|
||||
CaptionName = "Abp.Identity.User.UserInformation.PhoneNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 9,
|
||||
|
|
@ -5799,7 +5800,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat()
|
||||
EditorOptions=EditorOptions.Number()
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
|
|
@ -5819,7 +5820,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat()
|
||||
EditorOptions=EditorOptions.Number()
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
|
|
@ -5839,7 +5840,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat()
|
||||
EditorOptions=EditorOptions.Number()
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
|
|
@ -5859,7 +5860,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat()
|
||||
EditorOptions=EditorOptions.Number()
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
|
|
@ -5879,7 +5880,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
TotalSummaryJson = DefaultColumnTotalSummaryJson("VatAmount")
|
||||
},
|
||||
new ListFormField
|
||||
|
|
@ -5900,7 +5901,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions=EditorOptions.Number(),
|
||||
TotalSummaryJson = DefaultColumnTotalSummaryJson("TotalPrice")
|
||||
},
|
||||
new ListFormField
|
||||
|
|
@ -6035,7 +6036,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.Disabled
|
||||
EditorOptions = EditorOptions.Disabled()
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
|
|
@ -6056,7 +6057,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.Disabled
|
||||
EditorOptions = EditorOptions.Disabled()
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
|
|
@ -6112,7 +6113,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.Disabled
|
||||
EditorOptions = EditorOptions.Disabled()
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
|
|
@ -6153,7 +6154,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.HtmlEditorOptions
|
||||
EditorOptions = EditorOptions.Html()
|
||||
},
|
||||
|
||||
new() {
|
||||
|
|
@ -6203,7 +6204,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.Disabled
|
||||
EditorOptions = EditorOptions.Disabled()
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
|
|
@ -6342,7 +6343,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.Disabled
|
||||
EditorOptions = EditorOptions.Disabled()
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Sozsoft.Languages.Languages;
|
||||
using Sozsoft.Platform.Editors;
|
||||
using Sozsoft.Platform.Entities;
|
||||
using Sozsoft.Platform.Enums;
|
||||
using Sozsoft.Platform.ListForms;
|
||||
|
|
@ -260,7 +261,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 13,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Country",
|
||||
Width = 0,
|
||||
ListOrderNo = 7,
|
||||
|
|
@ -290,7 +291,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 14,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.City",
|
||||
Width = 0,
|
||||
ListOrderNo = 8,
|
||||
|
|
@ -323,7 +324,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 15,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.District",
|
||||
Width = 0,
|
||||
ListOrderNo = 9,
|
||||
|
|
@ -356,8 +357,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 16,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorScript = PlatformConsts.EditorScriptValues.SourceFieldItemWritetoDestination("Township", "Group", "PostalCode"),
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
EditorScript = EditorScript.Copy("Group", "PostalCode").OnChange(),
|
||||
CaptionName = "App.Listform.ListformField.Township",
|
||||
Width = 0,
|
||||
ListOrderNo = 10,
|
||||
|
|
@ -430,7 +431,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 17,
|
||||
EditorType2 = EditorTypes.dxTextBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.PostalCode",
|
||||
Width = 0,
|
||||
ListOrderNo = 13,
|
||||
|
|
@ -493,7 +494,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 7,
|
||||
EditorType2 = EditorTypes.dxTextBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||
EditorOptions = EditorOptions.Phone(),
|
||||
CaptionName = "Abp.Identity.User.UserInformation.PhoneNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 16,
|
||||
|
|
@ -515,7 +516,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 6,
|
||||
EditorType2 = EditorTypes.dxTextBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||
EditorOptions = EditorOptions.Phone(),
|
||||
CaptionName = "App.Listform.ListformField.MobileNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 17,
|
||||
|
|
@ -536,7 +537,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 8,
|
||||
EditorType2 = EditorTypes.dxTextBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||
EditorOptions = EditorOptions.Phone(),
|
||||
CaptionName = "App.Listform.ListformField.FaxNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 18,
|
||||
|
|
@ -576,7 +577,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 9,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.MenuGroup",
|
||||
Width = 0,
|
||||
ListOrderNo = 20,
|
||||
|
|
@ -687,7 +688,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 3,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.TenantId",
|
||||
Width = 0,
|
||||
ListOrderNo = 1,
|
||||
|
|
@ -798,7 +799,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Country",
|
||||
Width = 0,
|
||||
ListOrderNo = 6,
|
||||
|
|
@ -829,7 +830,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.City",
|
||||
Width = 0,
|
||||
ListOrderNo = 7,
|
||||
|
|
@ -863,7 +864,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.District",
|
||||
Width = 0,
|
||||
ListOrderNo = 8,
|
||||
|
|
@ -897,7 +898,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 4,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Township",
|
||||
Width = 0,
|
||||
ListOrderNo = 9,
|
||||
|
|
@ -1037,7 +1038,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 7,
|
||||
EditorType2 = EditorTypes.dxTextBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||
EditorOptions = EditorOptions.Phone(),
|
||||
CaptionName = "Abp.Identity.User.UserInformation.PhoneNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 15,
|
||||
|
|
@ -1060,7 +1061,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 6,
|
||||
EditorType2 = EditorTypes.dxTextBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||
EditorOptions = EditorOptions.Phone(),
|
||||
CaptionName = "App.Listform.ListformField.MobileNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 16,
|
||||
|
|
@ -1082,7 +1083,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 8,
|
||||
EditorType2 = EditorTypes.dxTextBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||
EditorOptions = EditorOptions.Phone(),
|
||||
CaptionName = "App.Listform.ListformField.FaxNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 17,
|
||||
|
|
@ -1239,7 +1240,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Term",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -1286,7 +1287,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 5,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.Weight",
|
||||
Width = 0,
|
||||
ListOrderNo = 6,
|
||||
|
|
@ -1443,7 +1444,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 5,
|
||||
EditorType2 = EditorTypes.dxHtmlEditor,
|
||||
ColSpan = 2,
|
||||
EditorOptions = EditorOptionValues.HtmlEditorOptions,
|
||||
EditorOptions = EditorOptions.Html(),
|
||||
CaptionName = "App.Listform.ListformField.Description",
|
||||
Width = 0,
|
||||
ListOrderNo = 5,
|
||||
|
|
@ -1730,7 +1731,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat()
|
||||
EditorOptions=EditorOptions.Number()
|
||||
},
|
||||
new()
|
||||
{
|
||||
|
|
@ -1946,7 +1947,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.GroupName",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -1968,7 +1969,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 4,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Currency",
|
||||
Width = 0,
|
||||
ListOrderNo = 5,
|
||||
|
|
@ -2206,7 +2207,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Country",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -2349,7 +2350,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Country",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -2379,7 +2380,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.City",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -2677,7 +2678,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Type",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -2722,7 +2723,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat()
|
||||
EditorOptions=EditorOptions.Number()
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
|
|
@ -2746,7 +2747,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat()
|
||||
EditorOptions=EditorOptions.Number()
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
|
|
@ -3021,7 +3022,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 7,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.ResetPeriod",
|
||||
Width = 0,
|
||||
ListOrderNo = 9,
|
||||
|
|
@ -3329,7 +3330,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSlider,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.SliderOptions,
|
||||
EditorOptions = EditorOptions.Slider(),
|
||||
CaptionName = "App.Listform.ListformField.Progress",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -3594,7 +3595,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.MainGroupKey",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -3624,7 +3625,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.SubGroupKey",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -3675,7 +3676,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 4,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.NameKey",
|
||||
Width = 0,
|
||||
ListOrderNo = 6,
|
||||
|
|
@ -3704,7 +3705,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 5,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.DescriptionKey",
|
||||
Width = 0,
|
||||
ListOrderNo = 7,
|
||||
|
|
@ -3733,7 +3734,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 11,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.RequiredPermissionName",
|
||||
Width = 0,
|
||||
ListOrderNo = 8,
|
||||
|
|
@ -3817,7 +3818,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 12,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.DataType",
|
||||
Width = 0,
|
||||
ListOrderNo = 11,
|
||||
|
|
@ -4181,7 +4182,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.CultureName",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -4205,7 +4206,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.ResourceName",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -4238,7 +4239,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Key",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -4383,7 +4384,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.DataSourceType",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -4413,7 +4414,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxTextArea,
|
||||
ColSpan = 1,
|
||||
EditorOptions = "{\"height\":200}",
|
||||
EditorOptions = EditorOptions.Multiline(200),
|
||||
CaptionName = "App.Listform.ListformField.ConnectionString",
|
||||
Width = 0,
|
||||
ListOrderNo = 5,
|
||||
|
|
@ -4528,7 +4529,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.CultureName",
|
||||
Width = 0,
|
||||
ListOrderNo = 1,
|
||||
|
|
@ -4561,7 +4562,12 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorScript = EditorScript.Build(
|
||||
EditorScript.SetValue("ListFormCode", "{Name}").OnChange(),
|
||||
EditorScript.SetValue("Title", "{Name}").OnChange(),
|
||||
EditorScript.SetValue("Description", "{Name}").OnChange()
|
||||
)
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
|
|
@ -4596,7 +4602,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 4,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.ListFormType",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -4627,7 +4633,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 5,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.DataSourceCode",
|
||||
Width = 0,
|
||||
ListOrderNo = 5,
|
||||
|
|
@ -4650,7 +4656,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 6,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.SelectCommandType",
|
||||
Width = 0,
|
||||
ListOrderNo = 6,
|
||||
|
|
@ -4746,7 +4752,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 10,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.KeyFieldDbSourceType",
|
||||
Width = 0,
|
||||
ListOrderNo = 10,
|
||||
|
|
@ -4842,7 +4848,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 13,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.SortMode",
|
||||
Width = 0,
|
||||
ListOrderNo = 13,
|
||||
|
|
@ -5285,7 +5291,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.NotificationTypeId",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -5308,7 +5314,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.RecipientType",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -5363,7 +5369,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Channel",
|
||||
Width = 0,
|
||||
ListOrderNo = 5,
|
||||
|
|
@ -5491,7 +5497,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxHtmlEditor,
|
||||
ColSpan = 2,
|
||||
EditorOptions = EditorOptionValues.HtmlEditorOptions,
|
||||
EditorOptions = EditorOptions.Html(),
|
||||
Visible = false,
|
||||
IsActive = false,
|
||||
ListOrderNo = 11,
|
||||
|
|
@ -5617,7 +5623,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.NotificationTypeId",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -5876,7 +5882,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.WorkerType",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -6326,7 +6332,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 5,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.RouteType",
|
||||
Width = 0,
|
||||
ListOrderNo = 6,
|
||||
|
|
@ -6359,7 +6365,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 6,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Authority",
|
||||
Width = 0,
|
||||
ListOrderNo = 7,
|
||||
|
|
@ -6569,7 +6575,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.DisplayName",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -6619,7 +6625,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 4,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Path",
|
||||
Width = 0,
|
||||
ListOrderNo = 5,
|
||||
|
|
@ -6669,7 +6675,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 6,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.ParentCode",
|
||||
Width = 0,
|
||||
ListOrderNo = 7,
|
||||
|
|
@ -6718,7 +6724,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 8,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.RequiredPermissionName",
|
||||
Width = 0,
|
||||
ListOrderNo = 8,
|
||||
|
|
@ -6929,7 +6935,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 8,
|
||||
EditorType2 = EditorTypes.dxTextArea,
|
||||
ColSpan = 2,
|
||||
EditorOptions = "{\"height\":100}",
|
||||
EditorOptions = EditorOptions.Multiline(100),
|
||||
CaptionName = "App.Listform.ListformField.Description",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -6971,7 +6977,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Method",
|
||||
Width = 0,
|
||||
ListOrderNo = 5,
|
||||
|
|
@ -7007,7 +7013,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 4,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.DataSourceCode",
|
||||
Width = 0,
|
||||
ListOrderNo = 6,
|
||||
|
|
@ -7030,7 +7036,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 5,
|
||||
EditorType2 = EditorTypes.dxTextArea,
|
||||
ColSpan = 2,
|
||||
EditorOptions = "{ \"height\" : 60 }",
|
||||
EditorOptions = EditorOptions.Multiline(60),
|
||||
CaptionName = "App.Listform.ListformField.Sql",
|
||||
Width = 0,
|
||||
ListOrderNo = 7,
|
||||
|
|
@ -7051,7 +7057,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 6,
|
||||
EditorType2 = EditorTypes.dxTextArea,
|
||||
ColSpan = 2,
|
||||
EditorOptions = "{ \"height\" : 60 }",
|
||||
EditorOptions = EditorOptions.Multiline(60),
|
||||
CaptionName = "App.Listform.ListformField.ParametersJson",
|
||||
Width = 0,
|
||||
ListOrderNo = 8,
|
||||
|
|
@ -7072,7 +7078,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 7,
|
||||
EditorType2 = EditorTypes.dxTextArea,
|
||||
ColSpan = 2,
|
||||
EditorOptions = "{ \"height\" : 60 }",
|
||||
EditorOptions = EditorOptions.Multiline(60),
|
||||
CaptionName = "App.Listform.ListformField.PermissionsJson",
|
||||
Width = 0,
|
||||
ListOrderNo = 9,
|
||||
|
|
@ -7167,7 +7173,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Name",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -7197,7 +7203,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Description",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -7226,7 +7232,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Category",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -7272,7 +7278,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat()
|
||||
EditorOptions=EditorOptions.Number()
|
||||
},
|
||||
new()
|
||||
{
|
||||
|
|
@ -7284,7 +7290,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 5,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.MonthlyPrice",
|
||||
Alignment = "right",
|
||||
Width = 0,
|
||||
|
|
@ -7308,7 +7314,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 6,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.YearlyPrice",
|
||||
Alignment = "right",
|
||||
Width = 0,
|
||||
|
|
@ -7332,7 +7338,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 7,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.VatRate",
|
||||
Alignment = "right",
|
||||
Width = 0,
|
||||
|
|
@ -7493,7 +7499,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.Commission",
|
||||
Alignment = "right",
|
||||
Width = 0,
|
||||
|
|
@ -7656,7 +7662,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.Commission",
|
||||
Alignment = "right",
|
||||
Width = 0,
|
||||
|
|
@ -7803,7 +7809,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.TenantId",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -7895,7 +7901,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 4,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.BillingCycle",
|
||||
Width = 0,
|
||||
ListOrderNo = 6,
|
||||
|
|
@ -8076,7 +8082,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 9,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Country",
|
||||
Width = 0,
|
||||
ListOrderNo = 14,
|
||||
|
|
@ -8107,7 +8113,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 10,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.City",
|
||||
Width = 0,
|
||||
ListOrderNo = 15,
|
||||
|
|
@ -8141,7 +8147,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 11,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.District",
|
||||
Width = 0,
|
||||
ListOrderNo = 16,
|
||||
|
|
@ -8175,8 +8181,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 12,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorScript = PlatformConsts.EditorScriptValues.SourceFieldItemWritetoDestination("Township", "Group", "PostalCode"),
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
EditorScript = EditorScript.Copy("Group", "PostalCode").OnChange(),
|
||||
CaptionName = "App.Listform.ListformField.Township",
|
||||
Width = 0,
|
||||
ListOrderNo = 17,
|
||||
|
|
@ -8208,7 +8214,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 14,
|
||||
EditorType2 = EditorTypes.dxTextBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||
EditorOptions = EditorOptions.Phone(),
|
||||
CaptionName = "Abp.Identity.User.UserInformation.PhoneNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 18,
|
||||
|
|
@ -8231,7 +8237,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 15,
|
||||
EditorType2 = EditorTypes.dxTextBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||
EditorOptions = EditorOptions.Phone(),
|
||||
CaptionName = "App.Listform.ListformField.MobileNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 19,
|
||||
|
|
@ -8253,7 +8259,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 16,
|
||||
EditorType2 = EditorTypes.dxTextBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||
EditorOptions = EditorOptions.Phone(),
|
||||
CaptionName = "App.Listform.ListformField.FaxNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 20,
|
||||
|
|
@ -8297,7 +8303,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 9,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.Subtotal",
|
||||
Alignment = "right",
|
||||
Width = 0,
|
||||
|
|
@ -8321,7 +8327,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 10,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.VatTotal",
|
||||
Alignment = "right",
|
||||
Width = 0,
|
||||
|
|
@ -8345,7 +8351,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 11,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.Commission",
|
||||
Alignment = "right",
|
||||
Width = 0,
|
||||
|
|
@ -8369,7 +8375,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 12,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.Total",
|
||||
Alignment = "right",
|
||||
Width = 0,
|
||||
|
|
@ -8393,7 +8399,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.PaymentMethodId",
|
||||
Width = 0,
|
||||
ListOrderNo = 26,
|
||||
|
|
@ -8417,7 +8423,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Installment",
|
||||
Width = 0,
|
||||
ListOrderNo = 27,
|
||||
|
|
@ -8644,7 +8650,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.ProductId",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -8673,7 +8679,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 2,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.BillingCycle",
|
||||
Width = 0,
|
||||
ListOrderNo = 3,
|
||||
|
|
@ -8717,7 +8723,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat()
|
||||
EditorOptions=EditorOptions.Number()
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
|
|
@ -8741,7 +8747,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat()
|
||||
EditorOptions=EditorOptions.Number()
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
|
|
@ -8765,7 +8771,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat()
|
||||
EditorOptions=EditorOptions.Number()
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
|
|
@ -8789,7 +8795,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat()
|
||||
EditorOptions=EditorOptions.Number()
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
|
|
@ -8813,7 +8819,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
TotalSummaryJson = DefaultColumnTotalSummaryJson("VatAmount")
|
||||
},
|
||||
new ListFormField
|
||||
|
|
@ -8838,7 +8844,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions=EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions=EditorOptions.Number(),
|
||||
TotalSummaryJson = DefaultColumnTotalSummaryJson("TotalPrice")
|
||||
},
|
||||
new() {
|
||||
|
|
@ -8939,7 +8945,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Name",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -8991,7 +8997,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Description",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -9161,7 +9167,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 1,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Title",
|
||||
Width = 0,
|
||||
ListOrderNo = 2,
|
||||
|
|
@ -9213,7 +9219,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 3,
|
||||
EditorType2 = EditorTypes.dxAutocomplete,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Summary",
|
||||
Width = 0,
|
||||
ListOrderNo = 4,
|
||||
|
|
@ -9287,7 +9293,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 6,
|
||||
EditorType2 = EditorTypes.dxSelectBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||
EditorOptions = EditorOptions.ShowClearButton(),
|
||||
CaptionName = "App.Listform.ListformField.Category",
|
||||
Width = 0,
|
||||
ListOrderNo = 7,
|
||||
|
|
@ -9333,7 +9339,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 8,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.ViewCount",
|
||||
Width = 0,
|
||||
ListOrderNo = 9,
|
||||
|
|
@ -9355,7 +9361,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 9,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.LikeCount",
|
||||
Width = 0,
|
||||
ListOrderNo = 10,
|
||||
|
|
@ -9377,7 +9383,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 10,
|
||||
EditorType2 = EditorTypes.dxNumberBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.NumberStandartFormat(),
|
||||
EditorOptions = EditorOptions.Number(),
|
||||
CaptionName = "App.Listform.ListformField.CommentCount",
|
||||
Width = 0,
|
||||
ListOrderNo = 11,
|
||||
|
|
@ -9441,7 +9447,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 13,
|
||||
EditorType2 = EditorTypes.dxHtmlEditor,
|
||||
ColSpan = 2,
|
||||
EditorOptions = EditorOptionValues.HtmlEditorOptions,
|
||||
EditorOptions = EditorOptions.Html(),
|
||||
CaptionName = "App.Listform.ListformField.ContentTr",
|
||||
Width = 0,
|
||||
ListOrderNo = 14,
|
||||
|
|
@ -9464,7 +9470,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 14,
|
||||
EditorType2 = EditorTypes.dxHtmlEditor,
|
||||
ColSpan = 2,
|
||||
EditorOptions = EditorOptionValues.HtmlEditorOptions,
|
||||
EditorOptions = EditorOptions.Html(),
|
||||
CaptionName = "App.Listform.ListformField.ContentEn",
|
||||
Width = 0,
|
||||
ListOrderNo = 15,
|
||||
|
|
@ -9628,7 +9634,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
EditOrderNo = 4,
|
||||
EditorType2 = EditorTypes.dxTextBox,
|
||||
ColSpan = 1,
|
||||
EditorOptions = EditorOptionValues.PhoneEditorOptions,
|
||||
EditorOptions = EditorOptions.Phone(),
|
||||
CaptionName = "Abp.Identity.User.UserInformation.PhoneNumber",
|
||||
Width = 0,
|
||||
ListOrderNo = 5,
|
||||
|
|
@ -9830,7 +9836,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.Disabled
|
||||
EditorOptions = EditorOptions.Disabled()
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
|
|
@ -9851,7 +9857,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.Disabled
|
||||
EditorOptions = EditorOptions.Disabled()
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
|
|
@ -9906,7 +9912,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.Disabled
|
||||
EditorOptions = EditorOptions.Disabled()
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
|
|
@ -9947,7 +9953,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.HtmlEditorOptions
|
||||
EditorOptions = EditorOptions.Html()
|
||||
},
|
||||
|
||||
new() {
|
||||
|
|
@ -9997,7 +10003,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||
EditorOptions = EditorOptionValues.Disabled
|
||||
EditorOptions = EditorOptions.Disabled()
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
|
|
|
|||
99
api/src/Sozsoft.Platform.Domain.Shared/Editors/EditorJson.cs
Normal file
99
api/src/Sozsoft.Platform.Domain.Shared/Editors/EditorJson.cs
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
namespace Sozsoft.Platform.Editors;
|
||||
|
||||
/// <summary>
|
||||
/// Editor script ve editor options ureticilerinin ortak JSON yardimcilari.
|
||||
/// Cikti JS tarafindaki JSON.stringify ile ayni olmali; bu yuzden burada
|
||||
/// System.Text.Json degil, elle yazilmis minimal bir kacis kullaniliyor.
|
||||
/// </summary>
|
||||
internal static class EditorJson
|
||||
{
|
||||
/// <summary>JS tarafindaki JSON.stringify(text) ile ayni ciktiyi verir.</summary>
|
||||
internal static string Quote(string text)
|
||||
{
|
||||
var value = text ?? string.Empty;
|
||||
var builder = new StringBuilder(value.Length + 2);
|
||||
builder.Append('"');
|
||||
|
||||
foreach (var character in value)
|
||||
{
|
||||
switch (character)
|
||||
{
|
||||
case '"': builder.Append("\\\""); break;
|
||||
case '\\': builder.Append("\\\\"); break;
|
||||
case '\b': builder.Append("\\b"); break;
|
||||
case '\f': builder.Append("\\f"); break;
|
||||
case '\n': builder.Append("\\n"); break;
|
||||
case '\r': builder.Append("\\r"); break;
|
||||
case '\t': builder.Append("\\t"); break;
|
||||
default:
|
||||
if (character < ' ')
|
||||
{
|
||||
builder.Append("\\u").Append(((int)character).ToString("x4", CultureInfo.InvariantCulture));
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.Append(character);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
builder.Append('"');
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
/// <summary>JS tarafindaki /^-?\d+(\.\d+)?$/ karsiligi.</summary>
|
||||
internal static bool IsNumericLiteral(string text)
|
||||
{
|
||||
var value = (text ?? string.Empty).Trim();
|
||||
if (value.Length == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var index = value[0] == '-' ? 1 : 0;
|
||||
var digitsBeforeDot = 0;
|
||||
var digitsAfterDot = 0;
|
||||
var seenDot = false;
|
||||
|
||||
for (; index < value.Length; index++)
|
||||
{
|
||||
var character = value[index];
|
||||
|
||||
if (character == '.')
|
||||
{
|
||||
if (seenDot || digitsBeforeDot == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
seenDot = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (character < '0' || character > '9')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (seenDot)
|
||||
{
|
||||
digitsAfterDot++;
|
||||
}
|
||||
else
|
||||
{
|
||||
digitsBeforeDot++;
|
||||
}
|
||||
}
|
||||
|
||||
return digitsBeforeDot > 0 && (!seenDot || digitsAfterDot > 0);
|
||||
}
|
||||
|
||||
internal static string Number(int value) => value.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
internal static string Bool(bool value) => value ? "true" : "false";
|
||||
}
|
||||
146
api/src/Sozsoft.Platform.Domain.Shared/Editors/EditorOptions.cs
Normal file
146
api/src/Sozsoft.Platform.Domain.Shared/Editors/EditorOptions.cs
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Sozsoft.Platform.Editors;
|
||||
|
||||
/// <summary>
|
||||
/// ListForm alanlarinin DevExtreme editor options JSON'unu uretir.
|
||||
///
|
||||
/// Buradaki metotlar hazir bir baslangic dondurur; uzerine
|
||||
/// <see cref="EditorOptionsBuilder"/> metotlariyla ekleme yapilabilir ve sonuc
|
||||
/// string'e ortuk donustugu icin dogrudan atanabilir:
|
||||
///
|
||||
/// <code>
|
||||
/// EditorOptions = EditorOptions.ShowClearButton(),
|
||||
/// EditorOptions = EditorOptions.Number(4).ShowClearButton(),
|
||||
/// EditorOptions = EditorOptions.Multiline(60).Placeholder("Aciklama"),
|
||||
/// EditorOptions = EditorOptions.New().Flag("acceptCustomValue", true),
|
||||
/// </code>
|
||||
/// </summary>
|
||||
public static class EditorOptions
|
||||
{
|
||||
/// <summary>Bos baslangic; secenekler elle eklenir.</summary>
|
||||
public static EditorOptionsBuilder New() => new EditorOptionsBuilder();
|
||||
|
||||
/// <summary>Alan pasif: kullanici degistiremez.</summary>
|
||||
public static EditorOptionsBuilder Disabled() => New().Disabled();
|
||||
|
||||
/// <summary>Alan salt okunur: deger gorunur ve gonderilir, degistirilemez.</summary>
|
||||
public static EditorOptionsBuilder ReadOnly() => New().ReadOnly();
|
||||
|
||||
/// <summary>Temizleme (x) dugmesi.</summary>
|
||||
public static EditorOptionsBuilder ShowClearButton() => New().ShowClearButton();
|
||||
|
||||
/// <summary>Cok satirli metin alani icin yukseklik.</summary>
|
||||
public static EditorOptionsBuilder Multiline(int height) => New().Height(height);
|
||||
|
||||
/// <summary>Sabit ondalikli sayi: bicim, maske davranisi ve artir/azalt dugmeleri.</summary>
|
||||
public static EditorOptionsBuilder Number(int precision = 2)
|
||||
=> New().FixedPointFormat(precision).UseMaskBehavior().ShowSpinButtons();
|
||||
|
||||
/// <summary>Yuzde alani.</summary>
|
||||
public static EditorOptionsBuilder Percent()
|
||||
=> New().Format("#0.##'%'").UseMaskBehavior().ShowSpinButtons();
|
||||
|
||||
/// <summary>Tarih alani (gun/ay/yil).</summary>
|
||||
public static EditorOptionsBuilder Date()
|
||||
=> New().Format("dd/MM/yyyy").DisplayFormat("dd/MM/yyyy");
|
||||
|
||||
/// <summary>Tarih + saat alani.</summary>
|
||||
public static EditorOptionsBuilder DateTime()
|
||||
=> New().Format("dd/MM/yyyy HH:mm").DisplayFormat("dd/MM/yyyy HH:mm");
|
||||
|
||||
/// <summary>Listeden secilen saat alani.</summary>
|
||||
public static EditorOptionsBuilder Time(int intervalMinutes = 5)
|
||||
=> New()
|
||||
.Text("type", "time")
|
||||
.Text("pickerType", "list")
|
||||
.DisplayFormat("HH:mm")
|
||||
.DateSerializationFormat("yyyy-MM-ddTHH:mm:ss")
|
||||
.Number("interval", intervalMinutes)
|
||||
.Width("100%");
|
||||
|
||||
/// <summary>Telefon alani: global bicim, maske ve ornek deger.</summary>
|
||||
public static EditorOptionsBuilder Phone(string invalidMessage = "Lütfen geçerli bir telefon numarası girin")
|
||||
=> New()
|
||||
.Format("phoneGlobal")
|
||||
.Mask("(000) 000-0000", invalidMessage)
|
||||
.Raw("maskRules", "{\"X\":\"[0-9]\"}")
|
||||
.Placeholder("(555) 123-4567");
|
||||
|
||||
/// <summary>Kaydirma cubugu; degeri ipucu olarak gosterir.</summary>
|
||||
public static EditorOptionsBuilder Slider()
|
||||
=> New().Raw("tooltip", "{\"enabled\":true}");
|
||||
|
||||
/// <summary>Gorsel yukleme alani.</summary>
|
||||
public static EditorOptionsBuilder ImageUpload(bool multiple = true, int width = 80, int height = 80)
|
||||
=> New().Width(width).Height(height).Flag("multiple", multiple);
|
||||
|
||||
/// <summary>Zengin metin (HTML) editoru; tam arac cubugu ile.</summary>
|
||||
public static EditorOptionsBuilder Html(int height = 200)
|
||||
=> New()
|
||||
.Raw("mediaResizing", "{\"enabled\":true}")
|
||||
.Raw("imageUpload", "{\"tabs\":[\"file\",\"url\"],\"fileUploadMode\":\"base64\"}")
|
||||
.Raw("toolbar", "{\"multiline\":true,\"items\":[" + string.Join(",", HtmlToolbarItems()) + "]}")
|
||||
.Flag("encodeHtml", true)
|
||||
.Height(height);
|
||||
|
||||
private static IEnumerable<string> HtmlToolbarItems()
|
||||
{
|
||||
var fontSizes = new[] { "8pt", "10pt", "12pt", "14pt", "18pt", "24pt", "36pt" };
|
||||
var fontFamilies = new[]
|
||||
{
|
||||
"Arial", "Courier New", "Georgia", "Impact",
|
||||
"Lucida Console", "Tahoma", "Times New Roman", "Verdana"
|
||||
};
|
||||
|
||||
yield return Item("undo");
|
||||
yield return Item("redo");
|
||||
yield return Item("separator");
|
||||
yield return Picker("size", fontSizes, "Font size");
|
||||
yield return Picker("font", fontFamilies, "Font family");
|
||||
yield return Item("separator");
|
||||
yield return Item("bold");
|
||||
yield return Item("italic");
|
||||
yield return Item("strike");
|
||||
yield return Item("underline");
|
||||
yield return Item("separator");
|
||||
yield return Item("alignLeft");
|
||||
yield return Item("alignCenter");
|
||||
yield return Item("alignRight");
|
||||
yield return Item("alignJustify");
|
||||
yield return Item("separator");
|
||||
yield return Item("orderedList");
|
||||
yield return Item("bulletList");
|
||||
yield return Item("separator");
|
||||
yield return "{\"name\":\"header\",\"acceptedValues\":[false,1,2,3,4,5]}";
|
||||
yield return Item("separator");
|
||||
yield return Item("color");
|
||||
yield return Item("background");
|
||||
yield return Item("separator");
|
||||
yield return Item("link");
|
||||
yield return Item("image");
|
||||
yield return Item("separator");
|
||||
yield return Item("clear");
|
||||
yield return Item("codeBlock");
|
||||
yield return Item("blockquote");
|
||||
yield return Item("separator");
|
||||
yield return Item("insertTable");
|
||||
yield return Item("deleteTable");
|
||||
yield return Item("insertRowAbove");
|
||||
yield return Item("insertRowBelow");
|
||||
yield return Item("deleteRow");
|
||||
yield return Item("insertColumnLeft");
|
||||
yield return Item("insertColumnRight");
|
||||
yield return Item("deleteColumn");
|
||||
yield return Item("cellProperties");
|
||||
yield return Item("tableProperties");
|
||||
}
|
||||
|
||||
private static string Item(string name) => "{\"name\":" + EditorJson.Quote(name) + "}";
|
||||
|
||||
private static string Picker(string name, IEnumerable<string> values, string ariaLabel)
|
||||
=> "{\"name\":" + EditorJson.Quote(name) +
|
||||
",\"acceptedValues\":[" + string.Join(",", values.Select(EditorJson.Quote)) + "]" +
|
||||
",\"options\":{\"inputAttr\":{\"aria-label\":" + EditorJson.Quote(ariaLabel) + "}}}";
|
||||
}
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
namespace Sozsoft.Platform.Editors;
|
||||
|
||||
/// <summary>
|
||||
/// DevExtreme editor options JSON'unu adim adim kuran akici yapi.
|
||||
/// <see cref="EditorOptions"/> uzerindeki hazir baslangiclarla olusturulur ve
|
||||
/// string'e ortuk (implicit) donusur; ListForm alanlarina dogrudan atanabilir.
|
||||
///
|
||||
/// Ayni anahtar iki kez verilirse sonuncusu gecerlidir; anahtar sirasi yazildigi
|
||||
/// sirayla korunur.
|
||||
/// </summary>
|
||||
public sealed class EditorOptionsBuilder
|
||||
{
|
||||
private readonly List<KeyValuePair<string, string>> _options = new List<KeyValuePair<string, string>>();
|
||||
|
||||
internal EditorOptionsBuilder()
|
||||
{
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Genel davranis
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>Alani pasif yapar (kullanici degistiremez, forma da gonderilmez).</summary>
|
||||
public EditorOptionsBuilder Disabled(bool value = true) => Flag("disabled", value);
|
||||
|
||||
/// <summary>Alani salt okunur yapar (deger gonderilir).</summary>
|
||||
public EditorOptionsBuilder ReadOnly(bool value = true) => Flag("readOnly", value);
|
||||
|
||||
/// <summary>Temizleme (x) dugmesini gosterir.</summary>
|
||||
public EditorOptionsBuilder ShowClearButton(bool value = true) => Flag("showClearButton", value);
|
||||
|
||||
/// <summary>Sayi alanlarinda artir/azalt dugmelerini gosterir.</summary>
|
||||
public EditorOptionsBuilder ShowSpinButtons(bool value = true) => Flag("showSpinButtons", value);
|
||||
|
||||
/// <summary>Maske davranisini acar (sayi ve maskeli metin alanlarinda).</summary>
|
||||
public EditorOptionsBuilder UseMaskBehavior(bool value = true) => Flag("useMaskBehavior", value);
|
||||
|
||||
/// <summary>Bos alanda gosterilecek ipucu metni.</summary>
|
||||
public EditorOptionsBuilder Placeholder(string text) => Text("placeholder", text);
|
||||
|
||||
/// <summary>Girilebilecek en fazla karakter sayisi.</summary>
|
||||
public EditorOptionsBuilder MaxLength(int length) => Number("maxLength", length);
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Olcu
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>Yukseklik (piksel).</summary>
|
||||
public EditorOptionsBuilder Height(int pixels) => Number("height", pixels);
|
||||
|
||||
/// <summary>Yukseklik (CSS degeri, ornek: "100%").</summary>
|
||||
public EditorOptionsBuilder Height(string value) => Text("height", value);
|
||||
|
||||
/// <summary>Genislik (piksel).</summary>
|
||||
public EditorOptionsBuilder Width(int pixels) => Number("width", pixels);
|
||||
|
||||
/// <summary>Genislik (CSS degeri, ornek: "100%").</summary>
|
||||
public EditorOptionsBuilder Width(string value) => Text("width", value);
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Bicim
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>DevExtreme format string'i (ornek: "dd/MM/yyyy").</summary>
|
||||
public EditorOptionsBuilder Format(string format) => Text("format", format);
|
||||
|
||||
/// <summary>Sabit ondalikli sayi bicimi.</summary>
|
||||
public EditorOptionsBuilder FixedPointFormat(int precision)
|
||||
=> Raw("format", "{\"type\":\"fixedPoint\",\"precision\":" + EditorJson.Number(precision) + "}");
|
||||
|
||||
/// <summary>Ekranda gosterilecek bicim (ornek: "dd/MM/yyyy HH:mm").</summary>
|
||||
public EditorOptionsBuilder DisplayFormat(string format) => Text("displayFormat", format);
|
||||
|
||||
/// <summary>Sunucuya gonderilecek tarih bicimi.</summary>
|
||||
public EditorOptionsBuilder DateSerializationFormat(string format) => Text("dateSerializationFormat", format);
|
||||
|
||||
/// <summary>Giris maskesi. invalidMessage bos birakilirsa DevExtreme varsayilani kullanilir.</summary>
|
||||
public EditorOptionsBuilder Mask(string mask, string invalidMessage = null, bool useMaskedValue = false)
|
||||
{
|
||||
Text("mask", mask);
|
||||
|
||||
if (!string.IsNullOrEmpty(invalidMessage))
|
||||
{
|
||||
Text("maskInvalidMessage", invalidMessage);
|
||||
}
|
||||
|
||||
return Flag("useMaskedValue", useMaskedValue);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Serbest anahtarlar
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>Metin degerli secenek.</summary>
|
||||
public EditorOptionsBuilder Text(string key, string value) => Put(key, EditorJson.Quote(value));
|
||||
|
||||
/// <summary>Sayi degerli secenek.</summary>
|
||||
public EditorOptionsBuilder Number(string key, int value) => Put(key, EditorJson.Number(value));
|
||||
|
||||
/// <summary>Mantiksal degerli secenek.</summary>
|
||||
public EditorOptionsBuilder Flag(string key, bool value) => Put(key, EditorJson.Bool(value));
|
||||
|
||||
/// <summary>Ham JSON degerli secenek (nesne, dizi ya da sayi). Deger gecerli JSON olmalidir.</summary>
|
||||
public EditorOptionsBuilder Raw(string key, string json) => Put(key, json);
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Cikti
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>Secenekleri JSON metnine cevirir. Hic secenek yoksa bos metin doner.</summary>
|
||||
public string Build()
|
||||
=> _options.Count == 0
|
||||
? string.Empty
|
||||
: "{" + string.Join(",", _options.Select(pair => EditorJson.Quote(pair.Key) + ":" + pair.Value)) + "}";
|
||||
|
||||
public override string ToString() => Build();
|
||||
|
||||
/// <summary>ListForm alanlarina dogrudan atanabilmesi icin.</summary>
|
||||
public static implicit operator string(EditorOptionsBuilder builder) => builder?.Build() ?? string.Empty;
|
||||
|
||||
private EditorOptionsBuilder Put(string key, string json)
|
||||
{
|
||||
if (string.IsNullOrEmpty(key))
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
var index = _options.FindIndex(pair => pair.Key == key);
|
||||
var entry = new KeyValuePair<string, string>(key, json);
|
||||
|
||||
if (index >= 0)
|
||||
{
|
||||
_options[index] = entry;
|
||||
}
|
||||
else
|
||||
{
|
||||
_options.Add(entry);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
202
api/src/Sozsoft.Platform.Domain.Shared/Editors/EditorScript.cs
Normal file
202
api/src/Sozsoft.Platform.Domain.Shared/Editors/EditorScript.cs
Normal file
|
|
@ -0,0 +1,202 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
namespace Sozsoft.Platform.Editors;
|
||||
|
||||
/// <summary>
|
||||
/// ListForm "Editor Script" ureticisi.
|
||||
///
|
||||
/// UI tarafindaki Script Builder (EditorScriptBuilderDialog) ile birebir ayni
|
||||
/// ciktiyi verir: ilk satirda kurallari saklayan <c>// @builder</c> basligi,
|
||||
/// gerekiyorsa <c>// @runOnOpen</c> direktifi, ardindan her kural icin tek
|
||||
/// satirlik runtime cagrisi.
|
||||
///
|
||||
/// Bu sayede seeder ile basilan script'ler dialogda acilip gorsel olarak
|
||||
/// duzenlenebilir. Cikti metni, dialogun ayni kurallardan uretecegi metinle
|
||||
/// birebir ayni olmak zorundadir; aksi halde dialog script'i "elle duzenlenmis"
|
||||
/// sayip kural editorunu kapatir. Bu yuzden buradaki kod
|
||||
/// ui/src/views/admin/listForm/edit/json-row-operations/editor-script/scriptRecipes.ts
|
||||
/// dosyasinin portudur; orada bir tarif degisirse burasi da guncellenmelidir.
|
||||
/// </summary>
|
||||
public static class EditorScript
|
||||
{
|
||||
private const string BuilderHeader = "// @builder ";
|
||||
private const string RunOnOpenDirective = "// @runOnOpen";
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Hesaplama (calc) - varsayilan tetikleyici: both
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>target = round(left * right, digits)</summary>
|
||||
public static EditorScriptRule Multiply(string left, string right, string target, int? digits = null)
|
||||
=> new EditorScriptRule("multiply")
|
||||
.Set("left", left).Set("right", right).Set("target", target).SetNumber("digits", digits);
|
||||
|
||||
/// <summary>target = round(left - right, digits)</summary>
|
||||
public static EditorScriptRule Subtract(string left, string right, string target, int? digits = null)
|
||||
=> new EditorScriptRule("subtract")
|
||||
.Set("left", left).Set("right", right).Set("target", target).SetNumber("digits", digits);
|
||||
|
||||
/// <summary>
|
||||
/// Yuzde hesabi. rate sabit sayi ("20") ya da alan adi ("KdvOrani") olabilir.
|
||||
/// mode icin <see cref="EditorScriptPercentMode"/> degerlerini kullanin.
|
||||
/// </summary>
|
||||
public static EditorScriptRule Percent(string amount, string rate, string target, int? digits = null, string mode = null)
|
||||
=> new EditorScriptRule("percent")
|
||||
.Set("amount", amount).Set("rate", rate).Set("target", target)
|
||||
.SetNumber("digits", digits).Set("mode", mode);
|
||||
|
||||
/// <summary>target = round(sum(sources), digits)</summary>
|
||||
public static EditorScriptRule Sum(string target, IEnumerable<string> sources, int? digits = null)
|
||||
=> new EditorScriptRule("sum").Set("target", target).SetFields(sources).SetNumber("digits", digits);
|
||||
|
||||
/// <summary>target = round(sum(sources), 2)</summary>
|
||||
public static EditorScriptRule Sum(string target, params string[] sources)
|
||||
=> Sum(target, (IEnumerable<string>)sources);
|
||||
|
||||
/// <summary>Serbest ifade: set(target, expression). Ornek expression: num('Gross') * 0.18</summary>
|
||||
public static EditorScriptRule Formula(string target, string expression)
|
||||
=> new EditorScriptRule("formula").Set("target", target).Set("expression", expression);
|
||||
|
||||
/// <summary>Bugunun tarihini (yyyy-MM-dd) yazar. offsetDays ile ileri/geri kaydirilir.</summary>
|
||||
public static EditorScriptRule Today(string target, int offsetDays = 0)
|
||||
=> new EditorScriptRule("today").Set("target", target)
|
||||
.SetNumber("offset", offsetDays == 0 ? (int?)null : offsetDays);
|
||||
|
||||
/// <summary>Iki tarih arasindaki gun sayisi (bitis dahil).</summary>
|
||||
public static EditorScriptRule Days(string start, string end, string target)
|
||||
=> new EditorScriptRule("days").Set("start", start).Set("end", end).Set("target", target);
|
||||
|
||||
/// <summary>Iki saat arasindaki fark; bitis baslangictan kucukse ertesi gune tasar.</summary>
|
||||
public static EditorScriptRule Hours(string start, string end, string target)
|
||||
=> new EditorScriptRule("hours").Set("start", start).Set("end", end).Set("target", target);
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Veri (data) - varsayilan tetikleyici: both
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>
|
||||
/// Lookup/GridBox ile secilen kaydin bir kolonunu form alanina tasir.
|
||||
/// sourcePath secili kayittaki kolon ya da yoldur ("Name", "Customer.Name").
|
||||
/// </summary>
|
||||
public static EditorScriptRule Copy(string sourcePath, string target)
|
||||
=> new EditorScriptRule("copy").Set("source", sourcePath).Set("target", target);
|
||||
|
||||
/// <summary>
|
||||
/// Sabit ya da sablonlu deger yazar. text icinde {Alan}, {value} ve
|
||||
/// {selected.Yol} token'lari kullanilabilir.
|
||||
/// </summary>
|
||||
public static EditorScriptRule SetValue(string target, string text)
|
||||
=> new EditorScriptRule("setValue").Set("target", target).Set("text", text);
|
||||
|
||||
/// <summary>Verilen alanlari bosaltir.</summary>
|
||||
public static EditorScriptRule Clear(IEnumerable<string> fields)
|
||||
=> new EditorScriptRule("clear").SetFields(fields);
|
||||
|
||||
/// <summary>Verilen alanlari bosaltir.</summary>
|
||||
public static EditorScriptRule Clear(params string[] fields) => Clear((IEnumerable<string>)fields);
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Gorunum (view) - varsayilan tetikleyici: both
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>
|
||||
/// Alani kosula gore kilitler. Kosul <see cref="EditorScriptRule.When"/> ile verilir;
|
||||
/// kosul verilmezse alan her zaman kilitlidir. invert true ise kosul saglandiginda
|
||||
/// alan kilitlenmek yerine duzenlenebilir olur.
|
||||
/// </summary>
|
||||
public static EditorScriptRule ReadOnly(string target, bool invert = false)
|
||||
=> new EditorScriptRule("readOnly").Set("target", target).Set("invert", invert ? "true" : null);
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Etkilesim (interaction) - varsayilan tetikleyici: change
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>Kullaniciya uyari gosterir. Mesajda {Alan} / {value} kullanilabilir.</summary>
|
||||
public static EditorScriptRule Notify(string message)
|
||||
=> new EditorScriptRule("notify").Set("message", message);
|
||||
|
||||
/// <summary>Onay ister; kullanici vazgecerse alan eski degerine doner ve script durur.</summary>
|
||||
public static EditorScriptRule Ask(string message)
|
||||
=> new EditorScriptRule("ask").Set("message", message);
|
||||
|
||||
/// <summary>Adres acar. URL icinde {Alan} / {value} kullanilabilir.</summary>
|
||||
public static EditorScriptRule OpenUrl(string url, string target = null)
|
||||
=> new EditorScriptRule("openUrl").Set("url", url).Set("target", target);
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Entegrasyon (integration) - varsayilan tetikleyici: change
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>
|
||||
/// API cagirir ve cevabin bir parcasini alana yazar. responsePath cevap
|
||||
/// icindeki yoldur ("data.name"); bos birakilirsa cevabin tamami yazilir.
|
||||
/// </summary>
|
||||
public static EditorScriptRule ApiToField(string target, string url, string responsePath = null)
|
||||
=> new EditorScriptRule("apiToField").Set("target", target).Set("url", url).Set("path", responsePath);
|
||||
|
||||
/// <summary>Serbest JS satiri. Runtime yardimcilari (get/set/num/...) burada da kullanilabilir.</summary>
|
||||
public static EditorScriptRule Custom(string code)
|
||||
=> new EditorScriptRule("custom").Set("code", code);
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Uretim
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>
|
||||
/// Kurallari tek bir editor script metnine cevirir. Zorunlu parametresi bos
|
||||
/// kalan kurallar - dialogda oldugu gibi - atlanir.
|
||||
/// </summary>
|
||||
public static string Build(params EditorScriptRule[] rules) => Build((IEnumerable<EditorScriptRule>)rules);
|
||||
|
||||
/// <summary>Kurallari tek bir editor script metnine cevirir.</summary>
|
||||
public static string Build(IEnumerable<EditorScriptRule> rules)
|
||||
{
|
||||
var usable = (rules ?? Enumerable.Empty<EditorScriptRule>())
|
||||
.Where(rule => rule != null && rule.IsComplete())
|
||||
.ToList();
|
||||
|
||||
if (usable.Count == 0)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
// Kural kimlikleri script icinde tekil ve deterministik olmali; dialog
|
||||
// kurallari bu kimliklerle geri okur.
|
||||
for (var index = 0; index < usable.Count; index++)
|
||||
{
|
||||
usable[index].EnsureId(index + 1);
|
||||
}
|
||||
|
||||
var runsOnOpen = usable.Any(rule => rule.EffectiveTrigger() != EditorScriptTrigger.Change);
|
||||
|
||||
var lines = new List<string>
|
||||
{
|
||||
BuilderHeader + "{\"v\":1,\"rules\":[" + string.Join(",", usable.Select(rule => rule.ToJson())) + "]}"
|
||||
};
|
||||
|
||||
if (runsOnOpen)
|
||||
{
|
||||
lines.Add(RunOnOpenDirective);
|
||||
}
|
||||
|
||||
lines.AddRange(usable.Select(rule => rule.ToCode(runsOnOpen)).Where(line => !string.IsNullOrEmpty(line)));
|
||||
|
||||
return string.Join("\n", lines);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Ortak yardimcilar (scriptRecipes.ts portu)
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>JS tarafindaki JSON.stringify(text) ile ayni ciktiyi verir.</summary>
|
||||
internal static string Quote(string text) => EditorJson.Quote(text);
|
||||
|
||||
/// <summary>JS tarafindaki /^-?\d+(\.\d+)?$/ karsiligi.</summary>
|
||||
internal static bool IsNumericLiteral(string text) => EditorJson.IsNumericLiteral(text);
|
||||
|
||||
/// <summary>Sayi sabiti oldugu gibi, alan adi ise num('Alan') olarak gecer.</summary>
|
||||
internal static string NumberOrField(string text)
|
||||
=> IsNumericLiteral(text) ? text : "num(" + Quote(text) + ")";
|
||||
}
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
namespace Sozsoft.Platform.Editors;
|
||||
|
||||
/// <summary>Script Builder kurallarinin ne zaman calisacagi.</summary>
|
||||
public enum EditorScriptTrigger
|
||||
{
|
||||
/// <summary>Tarifin grup varsayilani kullanilir (calc/data/view: Both, interaction/integration: Change).</summary>
|
||||
Default,
|
||||
|
||||
/// <summary>Yalnizca alanin degeri degistiginde.</summary>
|
||||
Change,
|
||||
|
||||
/// <summary>Yalnizca form acilirken - varsayilan deger uretmek icin.</summary>
|
||||
Open,
|
||||
|
||||
/// <summary>Hem acilista hem deger degistiginde.</summary>
|
||||
Both
|
||||
}
|
||||
|
||||
/// <summary><see cref="EditorScript.Percent"/> icin hesap modu.</summary>
|
||||
public static class EditorScriptPercentMode
|
||||
{
|
||||
/// <summary>Yalnizca yuzde tutari yazilir.</summary>
|
||||
public const string Only = null;
|
||||
|
||||
/// <summary>Tutarin uzerine eklenir (KDV dahil).</summary>
|
||||
public const string Add = "add";
|
||||
|
||||
/// <summary>Tutardan dusulur (iskonto).</summary>
|
||||
public const string Subtract = "subtract";
|
||||
}
|
||||
|
||||
/// <summary>Bir kuralin calismasi icin saglanmasi gereken kosul.</summary>
|
||||
public sealed class EditorScriptCondition
|
||||
{
|
||||
private EditorScriptCondition(string @operator, string source, string value)
|
||||
{
|
||||
Operator = @operator;
|
||||
Source = source ?? string.Empty;
|
||||
Value = value ?? string.Empty;
|
||||
}
|
||||
|
||||
internal string Operator { get; }
|
||||
|
||||
internal string Source { get; }
|
||||
|
||||
internal string Value { get; }
|
||||
|
||||
/// <summary>Kosulsuz - kural her zaman calisir.</summary>
|
||||
public static EditorScriptCondition Always()
|
||||
=> new EditorScriptCondition("always", string.Empty, string.Empty);
|
||||
|
||||
/// <summary>Alanin metin degeri verilen degere esitse.</summary>
|
||||
public static EditorScriptCondition Is(string source, string value)
|
||||
=> new EditorScriptCondition("equals", source, value);
|
||||
|
||||
/// <summary>Alanin metin degeri verilen degere esit degilse.</summary>
|
||||
public static EditorScriptCondition IsNot(string source, string value)
|
||||
=> new EditorScriptCondition("notEquals", source, value);
|
||||
|
||||
/// <summary>Alanin metin degeri verilen parcayi iceriyorsa.</summary>
|
||||
public static EditorScriptCondition Contains(string source, string value)
|
||||
=> new EditorScriptCondition("contains", source, value);
|
||||
|
||||
/// <summary>Alan bos ise.</summary>
|
||||
public static EditorScriptCondition IsEmpty(string source)
|
||||
=> new EditorScriptCondition("empty", source, string.Empty);
|
||||
|
||||
/// <summary>Alan dolu ise.</summary>
|
||||
public static EditorScriptCondition IsNotEmpty(string source)
|
||||
=> new EditorScriptCondition("notEmpty", source, string.Empty);
|
||||
|
||||
/// <summary>Alanin sayisal degeri verilenden buyukse. value sabit sayi ya da alan adi olabilir.</summary>
|
||||
public static EditorScriptCondition GreaterThan(string source, string value)
|
||||
=> new EditorScriptCondition("greaterThan", source, value);
|
||||
|
||||
/// <summary>Alanin sayisal degeri verilenden kucukse. value sabit sayi ya da alan adi olabilir.</summary>
|
||||
public static EditorScriptCondition LessThan(string source, string value)
|
||||
=> new EditorScriptCondition("lessThan", source, value);
|
||||
|
||||
/// <summary>Alan true / 1 / "true" ise.</summary>
|
||||
public static EditorScriptCondition IsTrue(string source)
|
||||
=> new EditorScriptCondition("isTrue", source, string.Empty);
|
||||
|
||||
/// <summary>Alan true degilse.</summary>
|
||||
public static EditorScriptCondition IsFalse(string source)
|
||||
=> new EditorScriptCondition("isFalse", source, string.Empty);
|
||||
|
||||
/// <summary>Kosulun eksiksiz olup olmadigi (deger isteyen operatorlerde deger girilmis mi).</summary>
|
||||
internal bool IsComplete()
|
||||
{
|
||||
if (Operator == "always")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(Source))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (Operator)
|
||||
{
|
||||
case "empty":
|
||||
case "notEmpty":
|
||||
case "isTrue":
|
||||
case "isFalse":
|
||||
return true;
|
||||
default:
|
||||
return Value.Trim().Length > 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Kosulu runtime yardimcilariyla tek satirlik bir JS ifadesine cevirir.</summary>
|
||||
internal string ToExpression()
|
||||
{
|
||||
if (Operator == "always" || string.IsNullOrEmpty(Source))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
var source = EditorScript.Quote(Source);
|
||||
|
||||
switch (Operator)
|
||||
{
|
||||
case "empty":
|
||||
return "!get(" + source + ")";
|
||||
case "notEmpty":
|
||||
return "!!get(" + source + ")";
|
||||
case "isTrue":
|
||||
return "bool(" + source + ")";
|
||||
case "isFalse":
|
||||
return "!bool(" + source + ")";
|
||||
case "contains":
|
||||
return "str(" + source + ").includes(" + EditorScript.Quote(Value) + ")";
|
||||
case "greaterThan":
|
||||
return "num(" + source + ") > " + Literal(Value);
|
||||
case "lessThan":
|
||||
return "num(" + source + ") < " + Literal(Value);
|
||||
case "notEquals":
|
||||
return "str(" + source + ") !== " + EditorScript.Quote(Value);
|
||||
default:
|
||||
return "str(" + source + ") === " + EditorScript.Quote(Value);
|
||||
}
|
||||
}
|
||||
|
||||
internal string ToJson()
|
||||
=> "{\"operator\":" + EditorScript.Quote(Operator) +
|
||||
",\"source\":" + EditorScript.Quote(Source) +
|
||||
",\"value\":" + EditorScript.Quote(Value) + "}";
|
||||
|
||||
private static string Literal(string value)
|
||||
=> EditorScript.IsNumericLiteral(value) ? value : EditorScript.Quote(value);
|
||||
}
|
||||
|
|
@ -0,0 +1,402 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
namespace Sozsoft.Platform.Editors;
|
||||
|
||||
/// <summary>
|
||||
/// Tek bir Script Builder kurali. <see cref="EditorScript"/> uzerindeki tarif
|
||||
/// metotlariyla olusturulur, akici metotlarla kosul ve tetikleyici eklenir.
|
||||
/// </summary>
|
||||
public sealed class EditorScriptRule
|
||||
{
|
||||
/// <summary>Zorunlu parametreler. Dialogdaki isRuleComplete kontrolunun karsiligi.</summary>
|
||||
private static readonly Dictionary<string, string[]> RequiredParams = new Dictionary<string, string[]>
|
||||
{
|
||||
["multiply"] = new[] { "left", "right", "target" },
|
||||
["subtract"] = new[] { "left", "right", "target" },
|
||||
["percent"] = new[] { "amount", "rate", "target" },
|
||||
["sum"] = new[] { "target" },
|
||||
["formula"] = new[] { "target", "expression" },
|
||||
["today"] = new[] { "target" },
|
||||
["days"] = new[] { "start", "end", "target" },
|
||||
["hours"] = new[] { "start", "end", "target" },
|
||||
["copy"] = new[] { "source", "target" },
|
||||
["setValue"] = new[] { "target", "text" },
|
||||
["clear"] = new string[0],
|
||||
["readOnly"] = new[] { "target" },
|
||||
["notify"] = new[] { "message" },
|
||||
["ask"] = new[] { "message" },
|
||||
["openUrl"] = new[] { "url" },
|
||||
["apiToField"] = new[] { "target", "url" },
|
||||
["custom"] = new[] { "code" }
|
||||
};
|
||||
|
||||
/// <summary>Alan listesi isteyen tarifler.</summary>
|
||||
private static readonly HashSet<string> FieldListRecipes = new HashSet<string> { "sum", "clear" };
|
||||
|
||||
/// <summary>
|
||||
/// Grup bazli varsayilan tetikleyici. Deger ureten kurallar form acilirken de
|
||||
/// calisir; kullaniciya bir sey gosteren ya da dis cagri yapan kurallar
|
||||
/// yalnizca deger degistiginde calisir.
|
||||
/// </summary>
|
||||
private static readonly Dictionary<string, EditorScriptTrigger> GroupDefaultTrigger =
|
||||
new Dictionary<string, EditorScriptTrigger>
|
||||
{
|
||||
["multiply"] = EditorScriptTrigger.Both,
|
||||
["subtract"] = EditorScriptTrigger.Both,
|
||||
["percent"] = EditorScriptTrigger.Both,
|
||||
["sum"] = EditorScriptTrigger.Both,
|
||||
["formula"] = EditorScriptTrigger.Both,
|
||||
["today"] = EditorScriptTrigger.Both,
|
||||
["days"] = EditorScriptTrigger.Both,
|
||||
["hours"] = EditorScriptTrigger.Both,
|
||||
["copy"] = EditorScriptTrigger.Both,
|
||||
["setValue"] = EditorScriptTrigger.Both,
|
||||
["clear"] = EditorScriptTrigger.Both,
|
||||
["readOnly"] = EditorScriptTrigger.Both,
|
||||
["notify"] = EditorScriptTrigger.Change,
|
||||
["ask"] = EditorScriptTrigger.Change,
|
||||
["openUrl"] = EditorScriptTrigger.Change,
|
||||
["apiToField"] = EditorScriptTrigger.Change,
|
||||
["custom"] = EditorScriptTrigger.Change
|
||||
};
|
||||
|
||||
private readonly string _recipe;
|
||||
private readonly List<KeyValuePair<string, string>> _params = new List<KeyValuePair<string, string>>();
|
||||
private readonly List<string> _fields = new List<string>();
|
||||
private readonly List<EditorScriptCondition> _conditions = new List<EditorScriptCondition>();
|
||||
|
||||
private string _id;
|
||||
private bool _anyCondition;
|
||||
private EditorScriptTrigger _trigger = EditorScriptTrigger.Default;
|
||||
|
||||
internal EditorScriptRule(string recipe)
|
||||
{
|
||||
_recipe = recipe;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Akici yapilandirma
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
/// <summary>Kural yalnizca verilen kosullarin <b>hepsi</b> saglandiginda calisir.</summary>
|
||||
public EditorScriptRule When(params EditorScriptCondition[] conditions) => AddConditions(conditions, false);
|
||||
|
||||
/// <summary>Kural verilen kosullardan <b>herhangi biri</b> saglandiginda calisir.</summary>
|
||||
public EditorScriptRule WhenAny(params EditorScriptCondition[] conditions) => AddConditions(conditions, true);
|
||||
|
||||
/// <summary>Yalnizca alanin degeri degistiginde calissin.</summary>
|
||||
public EditorScriptRule OnChange() => WithTrigger(EditorScriptTrigger.Change);
|
||||
|
||||
/// <summary>Yalnizca form acilirken calissin (varsayilan deger uretmek icin).</summary>
|
||||
public EditorScriptRule OnOpen() => WithTrigger(EditorScriptTrigger.Open);
|
||||
|
||||
/// <summary>Hem acilista hem deger degistiginde calissin.</summary>
|
||||
public EditorScriptRule OnOpenAndChange() => WithTrigger(EditorScriptTrigger.Both);
|
||||
|
||||
/// <summary>Tetikleyiciyi acikca belirler. Default ise tarifin grup varsayilani kullanilir.</summary>
|
||||
public EditorScriptRule WithTrigger(EditorScriptTrigger trigger)
|
||||
{
|
||||
_trigger = trigger;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Kural kimligini sabitler. Verilmezse Build sirasinda tarif adi ve sira
|
||||
/// numarasindan uretilir (ornek: "multiply_1").
|
||||
/// </summary>
|
||||
public EditorScriptRule WithId(string id)
|
||||
{
|
||||
_id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Tek kurallik script metni. Birden fazla kural icin <see cref="EditorScript.Build(EditorScriptRule[])"/> kullanin.</summary>
|
||||
public string ToScript() => EditorScript.Build(this);
|
||||
|
||||
/// <summary>Kurali dogrudan EditorScript alanina atanabilir hale getirir.</summary>
|
||||
public static implicit operator string(EditorScriptRule rule) => rule?.ToScript() ?? string.Empty;
|
||||
|
||||
/* ---------------------------------------------------------------- *
|
||||
* Ic kullanim
|
||||
* ---------------------------------------------------------------- */
|
||||
|
||||
internal EditorScriptRule Set(string key, string value)
|
||||
{
|
||||
// Bos parametreler dialogda da yazilmaz; JSON'un birebir esit kalmasi icin atlanir.
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
{
|
||||
_params.Add(new KeyValuePair<string, string>(key, value));
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
internal EditorScriptRule SetNumber(string key, int? value)
|
||||
=> value.HasValue ? Set(key, value.Value.ToString(CultureInfo.InvariantCulture)) : this;
|
||||
|
||||
internal EditorScriptRule SetFields(IEnumerable<string> fields)
|
||||
{
|
||||
if (fields != null)
|
||||
{
|
||||
_fields.AddRange(fields.Where(field => !string.IsNullOrEmpty(field)));
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
internal void EnsureId(int order)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_id))
|
||||
{
|
||||
_id = _recipe + "_" + order.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
}
|
||||
|
||||
internal EditorScriptTrigger EffectiveTrigger()
|
||||
{
|
||||
if (_trigger != EditorScriptTrigger.Default)
|
||||
{
|
||||
return _trigger;
|
||||
}
|
||||
|
||||
return GroupDefaultTrigger.TryGetValue(_recipe, out var trigger) ? trigger : EditorScriptTrigger.Change;
|
||||
}
|
||||
|
||||
internal bool IsComplete()
|
||||
{
|
||||
if (!RequiredParams.TryGetValue(_recipe, out var required))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_conditions.Any(condition => !condition.IsComplete()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (FieldListRecipes.Contains(_recipe) && _fields.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return required.All(key => _params.Any(pair => pair.Key == key && pair.Value.Trim().Length > 0));
|
||||
}
|
||||
|
||||
internal string ToJson()
|
||||
{
|
||||
var conditions = EffectiveConditions();
|
||||
|
||||
var json = "{\"id\":" + EditorScript.Quote(_id) +
|
||||
",\"recipe\":" + EditorScript.Quote(_recipe) +
|
||||
",\"condition\":" + conditions[0].ToJson();
|
||||
|
||||
if (conditions.Count > 1)
|
||||
{
|
||||
json += ",\"conditions\":[" + string.Join(",", conditions.Skip(1).Select(c => c.ToJson())) + "]" +
|
||||
",\"join\":" + EditorScript.Quote(_anyCondition ? "or" : "and");
|
||||
}
|
||||
|
||||
json += ",\"params\":{" +
|
||||
string.Join(",", _params.Select(pair => EditorScript.Quote(pair.Key) + ":" + EditorScript.Quote(pair.Value))) +
|
||||
"}";
|
||||
|
||||
json += ",\"fields\":[" + string.Join(",", _fields.Select(EditorScript.Quote)) + "]";
|
||||
|
||||
if (_trigger != EditorScriptTrigger.Default)
|
||||
{
|
||||
json += ",\"trigger\":" + EditorScript.Quote(TriggerName(_trigger));
|
||||
}
|
||||
|
||||
return json + "}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Kuralin tek satirlik kodu. runsOnOpen yalnizca script'in tamami acilista da
|
||||
/// calisiyorsa true gelir; o durumda her kuralin ne zaman calisacagi isReady
|
||||
/// ile ayristirilir.
|
||||
/// </summary>
|
||||
internal string ToCode(bool runsOnOpen)
|
||||
{
|
||||
var body = BuildBody();
|
||||
if (string.IsNullOrEmpty(body))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
var guards = new List<string>();
|
||||
|
||||
if (runsOnOpen)
|
||||
{
|
||||
var trigger = EffectiveTrigger();
|
||||
if (trigger == EditorScriptTrigger.Change)
|
||||
{
|
||||
guards.Add("!isReady");
|
||||
}
|
||||
else if (trigger == EditorScriptTrigger.Open)
|
||||
{
|
||||
guards.Add("isReady");
|
||||
}
|
||||
}
|
||||
|
||||
// readOnly'de kosul dogrudan aksiyonun argumanidir, if ile sarmalanmaz.
|
||||
if (_recipe != "readOnly")
|
||||
{
|
||||
var condition = ConditionExpression();
|
||||
if (!string.IsNullOrEmpty(condition))
|
||||
{
|
||||
guards.Add(condition);
|
||||
}
|
||||
}
|
||||
|
||||
return guards.Count > 0 ? "if (" + string.Join(" && ", guards) + ") " + body : body;
|
||||
}
|
||||
|
||||
private List<EditorScriptCondition> EffectiveConditions()
|
||||
=> _conditions.Count > 0 ? _conditions : new List<EditorScriptCondition> { EditorScriptCondition.Always() };
|
||||
|
||||
private string ConditionExpression()
|
||||
{
|
||||
var parts = EffectiveConditions()
|
||||
.Select(condition => condition.ToExpression())
|
||||
.Where(expression => !string.IsNullOrEmpty(expression))
|
||||
.ToList();
|
||||
|
||||
if (parts.Count == 0)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
if (parts.Count == 1)
|
||||
{
|
||||
return parts[0];
|
||||
}
|
||||
|
||||
return string.Join(_anyCondition ? " || " : " && ", parts.Select(part => "(" + part + ")"));
|
||||
}
|
||||
|
||||
private EditorScriptRule AddConditions(EditorScriptCondition[] conditions, bool any)
|
||||
{
|
||||
if (conditions != null)
|
||||
{
|
||||
_conditions.AddRange(conditions.Where(condition => condition != null));
|
||||
}
|
||||
|
||||
if (_conditions.Count > 1)
|
||||
{
|
||||
_anyCondition = any;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private string Param(string key)
|
||||
{
|
||||
var match = _params.FirstOrDefault(pair => pair.Key == key);
|
||||
return match.Key == null ? string.Empty : match.Value;
|
||||
}
|
||||
|
||||
private string Digits() => Param("digits").Length > 0 ? Param("digits") : "2";
|
||||
|
||||
private string BuildBody()
|
||||
{
|
||||
var q = new System.Func<string, string>(EditorScript.Quote);
|
||||
var n = new System.Func<string, string>(EditorScript.NumberOrField);
|
||||
|
||||
switch (_recipe)
|
||||
{
|
||||
case "multiply":
|
||||
return "set(" + q(Param("target")) + ", round(" + n(Param("left")) + " * " + n(Param("right")) + ", " + Digits() + "))";
|
||||
|
||||
case "subtract":
|
||||
return "set(" + q(Param("target")) + ", round(" + n(Param("left")) + " - " + n(Param("right")) + ", " + Digits() + "))";
|
||||
|
||||
case "percent":
|
||||
{
|
||||
var amount = n(Param("amount"));
|
||||
var portion = amount + " * " + n(Param("rate")) + " / 100";
|
||||
var expression = Param("mode") == "add"
|
||||
? amount + " + " + portion
|
||||
: Param("mode") == "subtract"
|
||||
? amount + " - " + portion
|
||||
: portion;
|
||||
return "set(" + q(Param("target")) + ", round(" + expression + ", " + Digits() + "))";
|
||||
}
|
||||
|
||||
case "sum":
|
||||
return "set(" + q(Param("target")) + ", round(sum(" + string.Join(", ", _fields.Select(q)) + "), " + Digits() + "))";
|
||||
|
||||
case "formula":
|
||||
return "set(" + q(Param("target")) + ", " + (Param("expression").Length > 0 ? Param("expression") : "null") + ")";
|
||||
|
||||
case "today":
|
||||
{
|
||||
var offset = Param("offset");
|
||||
var parsed = int.TryParse(offset, NumberStyles.Integer, CultureInfo.InvariantCulture, out var value) ? value : 0;
|
||||
var start = parsed != 0
|
||||
? "new Date(Date.now() + " + parsed.ToString(CultureInfo.InvariantCulture) + " * 86400000)"
|
||||
: "new Date()";
|
||||
return "set(" + q(Param("target")) + ", " + start + ".toISOString().slice(0, 10))";
|
||||
}
|
||||
|
||||
case "days":
|
||||
return "set(" + q(Param("target")) + ", days(" + q(Param("start")) + ", " + q(Param("end")) + "))";
|
||||
|
||||
case "hours":
|
||||
return "set(" + q(Param("target")) + ", hours(" + q(Param("start")) + ", " + q(Param("end")) + "))";
|
||||
|
||||
case "copy":
|
||||
return "copy(" + q(Param("source")) + ", " + q(Param("target")) + ")";
|
||||
|
||||
case "setValue":
|
||||
return "set(" + q(Param("target")) + ", tpl(" + q(Param("text")) + "))";
|
||||
|
||||
case "clear":
|
||||
return "clear(" + string.Join(", ", _fields.Select(q)) + ")";
|
||||
|
||||
case "readOnly":
|
||||
{
|
||||
var expression = ConditionExpression();
|
||||
if (expression.Length == 0)
|
||||
{
|
||||
expression = "true";
|
||||
}
|
||||
|
||||
var flag = Param("invert") == "true" ? "!(" + expression + ")" : expression;
|
||||
return "readOnly(" + q(Param("target")) + ", " + flag + ")";
|
||||
}
|
||||
|
||||
case "notify":
|
||||
return "notify(" + q(Param("message")) + ")";
|
||||
|
||||
case "ask":
|
||||
return "if (!ask(" + q(Param("message")) + ")) return";
|
||||
|
||||
case "openUrl":
|
||||
return Param("target").Length > 0 && Param("target") != "_blank"
|
||||
? "openUrl(" + q(Param("url")) + ", " + q(Param("target")) + ")"
|
||||
: "openUrl(" + q(Param("url")) + ")";
|
||||
|
||||
case "apiToField":
|
||||
return "set(" + q(Param("target")) + ", await api(" + q(Param("url")) +
|
||||
(Param("path").Length > 0 ? ", " + q(Param("path")) : string.Empty) + "))";
|
||||
|
||||
case "custom":
|
||||
return Param("code").Trim().TrimEnd(';');
|
||||
|
||||
default:
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
private static string TriggerName(EditorScriptTrigger trigger)
|
||||
{
|
||||
switch (trigger)
|
||||
{
|
||||
case EditorScriptTrigger.Change: return "change";
|
||||
case EditorScriptTrigger.Open: return "open";
|
||||
default: return "both";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -21,30 +21,6 @@ public static class PlatformConsts
|
|||
External
|
||||
}
|
||||
|
||||
public static class EditorOptionValues
|
||||
{
|
||||
public static string Disabled = "{ \"disabled\" : true }";
|
||||
public static string ShowClearButton = "{ \"showClearButton\" : true }";
|
||||
public static string HtmlEditorOptions = """{"mediaResizing":{"enabled":true},"imageUpload":{"tabs":["file","url"],"fileUploadMode":"base64"},"toolbar":{"multiline":true,"items":[{"name":"undo"},{"name":"redo"},{"name":"separator"},{"name":"size","acceptedValues":["8pt","10pt","12pt","14pt","18pt","24pt","36pt"],"options":{"inputAttr":{"aria-label":"Font size"}}},{"name":"font","acceptedValues":["Arial","Courier New","Georgia","Impact","Lucida Console","Tahoma","Times New Roman","Verdana"],"options":{"inputAttr":{"aria-label":"Font family"}}},{"name":"separator"},{"name":"bold"},{"name":"italic"},{"name":"strike"},{"name":"underline"},{"name":"separator"},{"name":"alignLeft"},{"name":"alignCenter"},{"name":"alignRight"},{"name":"alignJustify"},{"name":"separator"},{"name":"orderedList"},{"name":"bulletList"},{"name":"separator"},{"name":"header","acceptedValues":[false,1,2,3,4,5]},{"name":"separator"},{"name":"color"},{"name":"background"},{"name":"separator"},{"name":"link"},{"name":"image"},{"name":"separator"},{"name":"clear"},{"name":"codeBlock"},{"name":"blockquote"},{"name":"separator"},{"name":"insertTable"},{"name":"deleteTable"},{"name":"insertRowAbove"},{"name":"insertRowBelow"},{"name":"deleteRow"},{"name":"insertColumnLeft"},{"name":"insertColumnRight"},{"name":"deleteColumn"},{"name":"cellProperties"},{"name":"tableProperties"}]},"encodeHtml":true,"height":200}""";
|
||||
public static string PhoneEditorOptions = "{\"format\": \"phoneGlobal\", \"mask\":\"(000) 000-0000\", \"maskInvalidMessage\":\"Lütfen geçerli bir telefon numarası girin\", \"useMaskedValue\":false, \"maskRules\": { \"X\": \"[0-9]\" }, \"placeholder\": \"(555) 123-4567\" }";
|
||||
public static string TimeSpanOptions = "{\"type\":\"time\",\"pickerType\":\"list\",\"displayFormat\":\"HH:mm\",\"dateSerializationFormat\":\"yyyy-MM-ddTHH:mm:ss\",\"interval\":5,\"width\":\"100%\"}";
|
||||
public static string NumberStandartFormat(int precision = 2) => "{ \"format\": { \"type\": \"fixedPoint\", \"precision\": " + precision + " }, \"useMaskBehavior\": true, \"showSpinButtons\": true }";
|
||||
public static string NumberPercentFormat = "{ \"format\": \"#0.##'%'\", \"useMaskBehavior\": true, \"showSpinButtons\": true }";
|
||||
public static string DateFormat = "{ \"format\": \"dd/MM/yyyy\", \"displayFormat\" : \"dd/MM/yyyy\" }";
|
||||
public static string DateTimeFormat = "{ \"format\": \"dd/MM/yyyy HH:mm\", \"displayFormat\" : \"dd/MM/yyyy HH:mm\" }";
|
||||
public static string SliderOptions = "{\"tooltip\": { \"enabled\": true }}";
|
||||
public static string ImageUploadOptions(bool multiple = true) => $"{{\"width\": 80, \"height\": 80, \"multiple\": {multiple.ToString().ToLower()}}}";
|
||||
}
|
||||
|
||||
public static class EditorScriptValues
|
||||
{
|
||||
public static string CalcTotalDaysFromDates = "(() => {const d=v=>!v?null:(v instanceof Date?v:new Date(v));const nf={...formData,[editor.dataField]:e?.value};const s=d(nf.StartDate),t=d(nf.EndDate);setFormData({...formData,TotalDays: s&&t?Math.max(0,Math.floor((Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-Date.UTC(s.getFullYear(),s.getMonth(),s.getDate()))/(24*60*60*1000))+1):null});})();";
|
||||
public static string CalcTotalHoursFromTimes = "(()=>{const toD=v=>!v?null:(v instanceof Date?v:new Date(v));const next={...formData,[e.dataField]:e.value};const s=toD(next.StartTime),t=toD(next.EndTime);let h=null;if(s&&t){h=(t-s)/36e5;if(h<0)h+=24;h=Math.round(h*10)/10;}setFormData({...next,TotalHours:h});})();";
|
||||
public static string MaterialOnChange = "(() => { const p=e.component.option('selectedItem')||{}; const q=Math.round((parseFloat(p.Quantity)||0)*100); const u=Math.round((parseFloat(p.UnitPrice)||0)*100); setFormData({ ...formData, Quantity:q/100, UnitPrice:u/100, UomId:p.UomId, TotalAmount:Math.round((q*u)/100)/100 }); })();";
|
||||
public static string CalcTotalAmount = "(() => { const n={...formData,[e.dataField]:e.value}; const q=Math.round((parseFloat(n.Quantity)||0)*100); const u=Math.round((parseFloat(n.UnitPrice)||0)*100); setFormData({ ...n, TotalAmount:Math.round((q*u)/100)/100 }); })();";
|
||||
public static string SourceFieldItemWritetoDestination(string sourceField = "Township", string itemName = "Group", string destinationField = "PostalCode") => $"(async()=>{{const townshipField=\"{sourceField}\",groupField=\"{itemName}\",postalCodeField=\"{destinationField}\";const currentField=(typeof editor!=='undefined'&&editor?.dataField)||e?.dataField||townshipField;const next={{...formData,[currentField]:e?.value}};const isReady=e?.scriptEvent===\"contentReady\";const selectedItem=(()=>{{try{{return e?.component?.option?e.component.option(\"selectedItem\"):null;}}catch{{return null;}}}})();if(!isReady)next[postalCodeField]=selectedItem?selectedItem[groupField]:next[postalCodeField];if(!isReady&&typeof setFormData===\"function\")setFormData(next);}})();";
|
||||
}
|
||||
|
||||
public static class Prefix
|
||||
{
|
||||
public const string App = "App";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { Button, Dialog, Select } from '@/components/ui'
|
|||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||
import Editor, { type Monaco } from '@monaco-editor/react'
|
||||
import type * as monacoApi from 'monaco-editor'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import {
|
||||
FaArrowDown,
|
||||
FaArrowUp,
|
||||
|
|
@ -41,7 +41,7 @@ export type ScriptBuilderDialogProps = {
|
|||
}
|
||||
|
||||
const controlClass =
|
||||
'w-full min-w-0 h-9 px-2 rounded border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 text-sm text-gray-700 dark:text-gray-100 focus:outline-none focus:border-indigo-400'
|
||||
'w-full min-w-0 h-8 px-2 rounded border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 text-sm text-gray-700 dark:text-gray-100 focus:outline-none focus:border-indigo-400'
|
||||
|
||||
const cardClass =
|
||||
'rounded-lg border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-900'
|
||||
|
|
@ -277,9 +277,9 @@ function ScriptBuilderDialog({
|
|||
}
|
||||
return (
|
||||
<Select
|
||||
isClearable
|
||||
size="sm"
|
||||
className="w-full"
|
||||
isClearable
|
||||
placeholder={placeholder}
|
||||
menuPortalTarget={document.body}
|
||||
options={options.map((option) => ({ value: option, label: option }))}
|
||||
|
|
@ -298,8 +298,8 @@ function ScriptBuilderDialog({
|
|||
const selectedFields = rule.fields ?? []
|
||||
const options = dialect.getOptions(param.optionSource || '')
|
||||
return (
|
||||
<div key={param.key} className="col-span-12 min-w-0">
|
||||
<span className="mb-1 block text-xs text-gray-500">{param.label}</span>
|
||||
<div key={param.key} className="min-w-0 sm:col-span-2 xl:col-span-3">
|
||||
{fieldLabel(param.label, param.help)}
|
||||
<div className="flex flex-wrap items-center gap-1.5">
|
||||
{selectedFields.map((fieldName) => (
|
||||
<span
|
||||
|
|
@ -343,10 +343,14 @@ function ScriptBuilderDialog({
|
|||
const currentValue = rule.params[param.key] ?? ''
|
||||
|
||||
return (
|
||||
<label key={param.key} className="col-span-12 min-w-0 md:col-span-4">
|
||||
<label key={param.key} className="min-w-0">
|
||||
<span className="mb-1 block truncate text-xs text-gray-500" title={param.help}>
|
||||
{param.label}
|
||||
{param.optional && <span className="ml-1 text-gray-300">(ops.)</span>}
|
||||
{param.optional && (
|
||||
<span className="ml-1 text-gray-300">
|
||||
({translate('::App.ScriptBuilder.Optional')})
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
{param.type === 'option' &&
|
||||
renderOptionInput(
|
||||
|
|
@ -411,19 +415,28 @@ function ScriptBuilderDialog({
|
|||
label: item.label,
|
||||
}))
|
||||
|
||||
/** Ayar satirindaki her alan ayni yukseklikte, dar panelde alt satira sarar. */
|
||||
const fieldClass = 'min-w-0 basis-[9.5rem] grow'
|
||||
|
||||
const fieldLabel = (text: string, title?: string) => (
|
||||
<span className="mb-1 block truncate text-xs text-gray-500" title={title}>
|
||||
{text}
|
||||
</span>
|
||||
)
|
||||
|
||||
const renderCondition = (rule: ScriptRule, condition: ScriptRuleCondition, index: number) => {
|
||||
const operator = dialect.operators.find((item) => item.value === condition.operator)
|
||||
const kind =
|
||||
dialect.conditionKinds.find((item) => item.value === condition.kind) ||
|
||||
dialect.conditionKinds[0]
|
||||
|
||||
// Kosul parcalari tek bir sarmalayici yerine dogrudan ust flex satirina
|
||||
// giriyor; boylece tetikleyici ve kosullar yan yana dizilip birlikte sarar.
|
||||
return (
|
||||
<div key={index} className="grid grid-cols-12 items-end gap-2">
|
||||
<Fragment key={index}>
|
||||
{index > 0 ? (
|
||||
<label className="col-span-12 min-w-0 md:col-span-2">
|
||||
<span className="mb-1 block text-xs text-gray-500">
|
||||
{translate('::App.ScriptBuilder.Conjunction')}
|
||||
</span>
|
||||
<label className="min-w-0 basis-[6.5rem] grow-0">
|
||||
{fieldLabel(translate('::App.ScriptBuilder.Conjunction'))}
|
||||
<Select
|
||||
size="sm"
|
||||
className="w-full"
|
||||
|
|
@ -436,20 +449,16 @@ function ScriptBuilderDialog({
|
|||
/>
|
||||
</label>
|
||||
) : (
|
||||
<div className="col-span-12 hidden md:col-span-2 md:block">
|
||||
<span className="mb-1 block text-xs text-gray-500">
|
||||
{translate('::App.ScriptBuilder.Condition')}
|
||||
</span>
|
||||
<div className="min-w-0 shrink-0">
|
||||
{fieldLabel(translate('::App.ScriptBuilder.Condition'))}
|
||||
<div className="flex h-9 items-center text-xs font-semibold text-gray-400">
|
||||
{translate('::App.ScriptBuilder.If')}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<label className="col-span-12 min-w-0 md:col-span-3">
|
||||
<span className="mb-1 block text-xs text-gray-500">
|
||||
{translate('::App.ScriptBuilder.Comparison')}
|
||||
</span>
|
||||
<label className={fieldClass}>
|
||||
{fieldLabel(translate('::App.ScriptBuilder.Comparison'))}
|
||||
<Select
|
||||
size="sm"
|
||||
className="w-full"
|
||||
|
|
@ -463,10 +472,8 @@ function ScriptBuilderDialog({
|
|||
</label>
|
||||
|
||||
{operator?.needsSource && dialect.conditionKinds.length > 1 && (
|
||||
<label className="col-span-12 min-w-0 md:col-span-2">
|
||||
<span className="mb-1 block text-xs text-gray-500">
|
||||
{translate('::App.Listform.ListformField.SourceId')}
|
||||
</span>
|
||||
<label className={fieldClass}>
|
||||
{fieldLabel(translate('::App.Listform.ListformField.SourceId'))}
|
||||
<Select
|
||||
size="sm"
|
||||
className="w-full"
|
||||
|
|
@ -484,10 +491,8 @@ function ScriptBuilderDialog({
|
|||
)}
|
||||
|
||||
{operator?.needsSource && (
|
||||
<label className="col-span-12 min-w-0 md:col-span-3">
|
||||
<span className="mb-1 block text-xs text-gray-500">
|
||||
{translate('::App.Platform.Field')}
|
||||
</span>
|
||||
<label className={fieldClass}>
|
||||
{fieldLabel(translate('::App.Platform.Field'))}
|
||||
{renderOptionInput(
|
||||
kind?.optionSource,
|
||||
condition.source,
|
||||
|
|
@ -498,34 +503,31 @@ function ScriptBuilderDialog({
|
|||
)}
|
||||
|
||||
{operator?.needsValue && (
|
||||
<label className="col-span-12 min-w-0 md:col-span-2">
|
||||
<span className="mb-1 block text-xs text-gray-500">
|
||||
{translate('::App.Listform.ListformField.Value')}
|
||||
</span>
|
||||
<label className={fieldClass}>
|
||||
{fieldLabel(translate('::App.Listform.ListformField.Value'))}
|
||||
<Input
|
||||
unstyle
|
||||
className={controlClass}
|
||||
value={condition.value}
|
||||
placeholder="Aktif / 1000"
|
||||
placeholder={translate('::App.ScriptBuilder.ValuePlaceholder')}
|
||||
onChange={(event) => updateCondition(rule, index, { value: event.target.value })}
|
||||
/>
|
||||
</label>
|
||||
)}
|
||||
|
||||
{index > 0 && (
|
||||
<div className="col-span-12 flex md:col-span-1">
|
||||
<Button
|
||||
shape="circle"
|
||||
size="xs"
|
||||
type="button"
|
||||
variant="plain"
|
||||
title={translate('::App.ScriptBuilder.RemoveCondition')}
|
||||
icon={<FaTimes />}
|
||||
onClick={() => removeCondition(rule, index)}
|
||||
/>
|
||||
</div>
|
||||
<Button
|
||||
className="mb-0.5 shrink-0"
|
||||
shape="circle"
|
||||
size="xs"
|
||||
type="button"
|
||||
variant="plain"
|
||||
title={translate('::App.ScriptBuilder.RemoveCondition')}
|
||||
icon={<FaTimes />}
|
||||
onClick={() => removeCondition(rule, index)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</Fragment>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -620,10 +622,11 @@ function ScriptBuilderDialog({
|
|||
<div className="border-t border-gray-100 px-3 py-3 dark:border-gray-800">
|
||||
<p className="mb-3 text-[11px] text-gray-400">{recipe.summary}</p>
|
||||
|
||||
<div className="mb-3 flex flex-col gap-2 rounded-md bg-gray-50 p-2 dark:bg-gray-800/40">
|
||||
{/* Tetikleyici ve kosullar tek bir akan satirda; dar panelde sarar. */}
|
||||
<div className="mb-3 flex flex-wrap items-end gap-x-2 gap-y-2 rounded-md bg-gray-50 p-2 dark:bg-gray-800/40">
|
||||
{dialect.triggers && (
|
||||
<label className="w-full md:w-56">
|
||||
<span className="mb-1 block text-xs text-gray-500">Ne zaman</span>
|
||||
<label className={fieldClass}>
|
||||
{fieldLabel(translate('::App.ScriptBuilder.When'), triggerInfo?.help)}
|
||||
<Select
|
||||
size="sm"
|
||||
className="w-full"
|
||||
|
|
@ -643,20 +646,19 @@ function ScriptBuilderDialog({
|
|||
renderCondition(rule, condition, conditionIndex),
|
||||
)}
|
||||
|
||||
<div>
|
||||
<Button
|
||||
size="xs"
|
||||
type="button"
|
||||
icon={<FaPlus />}
|
||||
title={translate('::App.ScriptBuilder.AddConditionHint')}
|
||||
onClick={() => addCondition(rule)}
|
||||
>
|
||||
{translate('::App.ScriptBuilder.AddCondition')}
|
||||
</Button>
|
||||
</div>
|
||||
<Button
|
||||
className="mb-0.5 shrink-0"
|
||||
size="xs"
|
||||
type="button"
|
||||
icon={<FaPlus />}
|
||||
title={translate('::App.ScriptBuilder.AddConditionHint')}
|
||||
onClick={() => addCondition(rule)}
|
||||
>
|
||||
{translate('::App.ScriptBuilder.AddCondition')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-x-3 gap-y-3">
|
||||
<div className="grid grid-cols-1 gap-x-3 gap-y-3 sm:grid-cols-2 xl:grid-cols-3">
|
||||
{recipe.params.map((param) => renderParam(rule, param))}
|
||||
</div>
|
||||
|
||||
|
|
@ -806,7 +808,7 @@ function ScriptBuilderDialog({
|
|||
}`}
|
||||
onClick={() => setView('code')}
|
||||
>
|
||||
<FaCode /> Kod
|
||||
<FaCode /> {translate('::App.Platform.Code')}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ export const scriptRuleConditions = (rule: ScriptRule): ScriptRuleCondition[] =>
|
|||
]
|
||||
|
||||
export const DEFAULT_SCRIPT_OPERATORS: ScriptOperator[] = [
|
||||
{ value: 'always', label: 'Her zaman' },
|
||||
{ value: 'always', label: 'App.Platform.Always' },
|
||||
{
|
||||
value: 'equals',
|
||||
label: 'App.ScriptBuilderOperator.Equals',
|
||||
|
|
|
|||
|
|
@ -272,12 +272,13 @@ export const createDesignerScriptDialect = (
|
|||
describeDesignerCondition(condition as unknown as DesignerRuleCondition, t),
|
||||
)
|
||||
.filter((text) => text !== always)
|
||||
// Kosulsuz kuralda "Her zaman ->" oneki bilgi tasimiyor, yalnizca gurultu.
|
||||
if (!conditions.length) return action
|
||||
const joiner =
|
||||
rule.join === 'or'
|
||||
? ` ${t('::App.Platform.Or')} `
|
||||
: ` ${t('::App.Platform.And')} `
|
||||
const prefix = conditions.length ? conditions.join(joiner) : always
|
||||
return `${prefix} → ${action}`
|
||||
return `${conditions.join(joiner)} → ${action}`
|
||||
},
|
||||
getRuleWarning: (rule) => {
|
||||
const recipe = designerRecipesById.get(rule.recipe as DesignerRecipeId)
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ function EditorOptionsBuilderDialog({
|
|||
className={tabButtonClass(tab === 'json')}
|
||||
onClick={() => goToTab('json')}
|
||||
>
|
||||
<FaCode /> Ham JSON
|
||||
<FaCode /> {translate('::App.ListFormEditorOptions.RawJson')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ export const optionGroups: { key: OptionGroupKey; title: string; description: st
|
|||
},
|
||||
{
|
||||
key: 'text',
|
||||
title: 'Metin / Maske',
|
||||
title: 'App.SpecText.TextTitle',
|
||||
description: 'App.SpecText.TextDescription',
|
||||
},
|
||||
{
|
||||
|
|
@ -244,7 +244,7 @@ export const optionSpecs: OptionSpec[] = [
|
|||
label: 'width',
|
||||
type: 'size',
|
||||
group: 'appearance',
|
||||
placeholder: '100% veya 240',
|
||||
placeholder: 'App.SpecWidth.WidthPlaceholder',
|
||||
help: 'App.SpecWidth.Help',
|
||||
},
|
||||
{ path: 'height', label: 'height', type: 'size', group: 'appearance', placeholder: '200' },
|
||||
|
|
@ -547,7 +547,7 @@ export const optionSpecs: OptionSpec[] = [
|
|||
type: 'number',
|
||||
group: 'date',
|
||||
editors: DATE_EDITORS,
|
||||
help: '0 Pazar, 1 Pazartesi.',
|
||||
help: 'App.SpecFirstDayOfWeek.Help',
|
||||
},
|
||||
{
|
||||
path: 'calendarOptions.zoomLevel',
|
||||
|
|
@ -933,10 +933,10 @@ export const optionSpecs: OptionSpec[] = [
|
|||
// ── Liste sütununu da etkileyenler ───────────────────────────────
|
||||
{
|
||||
path: 'format',
|
||||
label: 'format (metin)',
|
||||
label: 'format (string)',
|
||||
type: 'text',
|
||||
group: 'grid',
|
||||
placeholder: 'dd/MM/yyyy veya currency',
|
||||
placeholder: 'App.SpecFormatText.FormatTextPlaceholder',
|
||||
help: 'App.SpecFormat.Help',
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -95,13 +95,13 @@ const buildHtmlEditorOptions = (): JsonObject => ({
|
|||
export const editorOptionsPresets: EditorOptionsPreset[] = [
|
||||
{
|
||||
key: 'readOnly',
|
||||
label: 'Salt okunur',
|
||||
label: 'App.PresetReadOnly.ReadOnlyLabel',
|
||||
description: 'App.PresetReadOnly.ReadOnlyDescription',
|
||||
value: { readOnly: true },
|
||||
},
|
||||
{
|
||||
key: 'disabled',
|
||||
label: 'Pasif',
|
||||
label: 'App.PresetDisabled.DisabledLabel',
|
||||
description: 'App.PresetDisabled.DisabledDescription',
|
||||
value: { disabled: true },
|
||||
},
|
||||
|
|
@ -114,7 +114,7 @@ export const editorOptionsPresets: EditorOptionsPreset[] = [
|
|||
{
|
||||
key: 'fixedPoint2',
|
||||
label: 'App.PresetFixedPoint2.FixedPoint2Label',
|
||||
description: 'format.type fixedPoint, precision 2.',
|
||||
description: 'App.PresetFixedPoint2.FixedPoint2Description',
|
||||
editors: ['dxNumberBox'],
|
||||
value: { format: { type: 'fixedPoint', precision: 2 } },
|
||||
},
|
||||
|
|
@ -131,7 +131,7 @@ export const editorOptionsPresets: EditorOptionsPreset[] = [
|
|||
},
|
||||
{
|
||||
key: 'currency',
|
||||
label: 'Para birimi (TRY)',
|
||||
label: 'App.PresetCurrency.CurrencyLabel',
|
||||
description: 'App.PresetCurrency.CurrencyDescription',
|
||||
editors: ['dxNumberBox'],
|
||||
value: { format: { type: 'currency', precision: 2, currency: 'TRY' } },
|
||||
|
|
@ -174,7 +174,7 @@ export const editorOptionsPresets: EditorOptionsPreset[] = [
|
|||
},
|
||||
{
|
||||
key: 'phoneMask',
|
||||
label: 'Telefon maskesi',
|
||||
label: 'App.PresetPhoneMask.PhoneMaskLabel',
|
||||
description: 'App.PresetPhoneMask.PhoneMaskDescription',
|
||||
editors: ['dxTextBox', 'dxAutocomplete'],
|
||||
value: {
|
||||
|
|
@ -194,7 +194,7 @@ export const editorOptionsPresets: EditorOptionsPreset[] = [
|
|||
},
|
||||
{
|
||||
key: 'searchableList',
|
||||
label: 'Aranabilir liste',
|
||||
label: 'App.PresetSearchableList.SearchableListLabel',
|
||||
description: 'App.PresetSearchableList.SearchableListDescription',
|
||||
editors: [
|
||||
'dxSelectBox',
|
||||
|
|
@ -267,13 +267,13 @@ export const editorOptionsPresets: EditorOptionsPreset[] = [
|
|||
{
|
||||
key: 'height100',
|
||||
label: 'App.PresetHeight100.Height100Label',
|
||||
description: 'height: 100',
|
||||
description: 'App.PresetHeight100.Height100Description',
|
||||
value: { height: 100 },
|
||||
},
|
||||
{
|
||||
key: 'height200',
|
||||
label: 'App.PresetHeight200.Height200Label',
|
||||
description: 'height: 200',
|
||||
description: 'App.PresetHeight200.Height200Description',
|
||||
value: { height: 200 },
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -151,6 +151,28 @@ export const createFormScriptDialect = (context: FormScriptDialectContext): Scri
|
|||
|
||||
const asFormRule = (rule: ScriptRule) => rule as unknown as FormScriptRule
|
||||
|
||||
// Tarif listesi hem "Kural ekle" seçicisinde hem de kural kartında kullanılıyor.
|
||||
// Tek bir çevrilmiş liste üretip ikisini de buradan besliyoruz; aksi halde kart
|
||||
// ham çeviri anahtarlarını gösterir.
|
||||
const localizedRecipes: ScriptRecipeView[] = recipeViews.map((recipe) => ({
|
||||
...recipe,
|
||||
label: t('::' + recipe.label),
|
||||
summary: t('::' + recipe.summary),
|
||||
params: recipe.params.map((param) => ({
|
||||
...param,
|
||||
label: t('::' + param.label),
|
||||
help: param.help ? t('::' + param.help) : undefined,
|
||||
placeholder: param.placeholder?.startsWith('App.')
|
||||
? t('::' + param.placeholder)
|
||||
: param.placeholder,
|
||||
// `_blank` gibi teknik degerler oldugu gibi kalmali; yalnizca anahtarlar cevrilir.
|
||||
choices: param.choices?.map((choice) => ({
|
||||
...choice,
|
||||
label: choice.label.startsWith('App.') ? t('::' + choice.label) : choice.label,
|
||||
})),
|
||||
})),
|
||||
}))
|
||||
|
||||
return {
|
||||
id: 'form',
|
||||
title: 'Editor Script',
|
||||
|
|
@ -163,19 +185,7 @@ export const createFormScriptDialect = (context: FormScriptDialectContext): Scri
|
|||
description: t('::' + group.description),
|
||||
icon: groupIcons[group.key],
|
||||
})),
|
||||
recipes: recipeViews.map((recipe) => ({
|
||||
...recipe,
|
||||
label: t('::' + recipe.label),
|
||||
summary: t('::' + recipe.summary),
|
||||
params: recipe.params.map((param) => ({
|
||||
...param,
|
||||
label: t('::' + param.label),
|
||||
help: param.help ? t('::' + param.help) : undefined,
|
||||
placeholder: param.placeholder?.startsWith('ListForms.')
|
||||
? t('::' + param.placeholder)
|
||||
: param.placeholder,
|
||||
})),
|
||||
})),
|
||||
recipes: localizedRecipes,
|
||||
operators: DEFAULT_SCRIPT_OPERATORS,
|
||||
conditionKinds: [
|
||||
{
|
||||
|
|
@ -200,7 +210,7 @@ export const createFormScriptDialect = (context: FormScriptDialectContext): Scri
|
|||
description: t('::' + snippet.description),
|
||||
})),
|
||||
getOptions: (optionSource) => (optionSource === FIELD_SOURCE ? fields : []),
|
||||
getRecipe: (recipeId) => recipeViews.find((recipe) => recipe.id === recipeId),
|
||||
getRecipe: (recipeId) => localizedRecipes.find((recipe) => recipe.id === recipeId),
|
||||
createRule: (recipeId) => createRule(recipeId as RecipeId) as unknown as ScriptRule,
|
||||
isRuleComplete: (rule) => isRuleComplete(asFormRule(rule)),
|
||||
// Guard'ların gerekip gerekmediği script'in tamamına bağlı, o yüzden tek bir
|
||||
|
|
@ -228,12 +238,13 @@ export const createFormScriptDialect = (context: FormScriptDialectContext): Scri
|
|||
describeCondition(condition as unknown as FormScriptRule['condition'], t),
|
||||
)
|
||||
.filter((text) => text !== always)
|
||||
// Kosulsuz kuralda "Her zaman ->" oneki bilgi tasimiyor, yalnizca gurultu.
|
||||
if (!conditions.length) return action
|
||||
const joiner =
|
||||
rule.join === 'or'
|
||||
? ` ${t('::App.Platform.Or')} `
|
||||
: ` ${t('::App.Platform.And')} `
|
||||
const prefix = conditions.length ? conditions.join(joiner) : always
|
||||
return `${prefix} → ${action}`
|
||||
return `${conditions.join(joiner)} → ${action}`
|
||||
},
|
||||
getTrigger: (rule) => effectiveTrigger(asFormRule(rule)),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,8 +121,16 @@ export type RecipeId =
|
|||
| 'custom'
|
||||
|
||||
export const recipeGroups: { key: RecipeGroupKey; title: string; description: string }[] = [
|
||||
{ key: 'calc', title: 'Hesaplama', description: 'App.ScriptBuilderCalc.CalcDescription' },
|
||||
{ key: 'data', title: 'Veri', description: 'App.ScriptBuilderData.DataDescription' },
|
||||
{
|
||||
key: 'calc',
|
||||
title: 'App.ScriptBuilderCalc.CalcTitle',
|
||||
description: 'App.ScriptBuilderCalc.CalcDescription',
|
||||
},
|
||||
{
|
||||
key: 'data',
|
||||
title: 'App.ScriptBuilderData.DataTitle',
|
||||
description: 'App.ScriptBuilderData.DataDescription',
|
||||
},
|
||||
{
|
||||
key: 'view',
|
||||
title: 'App.StaticLookup.View',
|
||||
|
|
@ -135,7 +143,7 @@ export const recipeGroups: { key: RecipeGroupKey; title: string; description: st
|
|||
},
|
||||
{
|
||||
key: 'integration',
|
||||
title: 'Entegrasyon',
|
||||
title: 'App.ScriptBuilderIntegration.IntegrationTitle',
|
||||
description: 'App.ScriptBuilderIntegration.IntegrationDescription',
|
||||
},
|
||||
]
|
||||
|
|
@ -232,7 +240,7 @@ export const recipes: Recipe[] = [
|
|||
summary: 'App.ScriptBuilderMultiply.MultiplySummary',
|
||||
example: "set('TotalAmount', round(num('Quantity') * num('UnitPrice'), 2))",
|
||||
params: [
|
||||
{ key: 'left', label: 'Birinci alan', type: 'field' },
|
||||
{ key: 'left', label: 'App.ScriptBuilderMultiply.LeftLabel', type: 'field' },
|
||||
{ key: 'right', label: 'App.ScriptBuilderRight.RightLabel', type: 'field' },
|
||||
{ key: 'target', label: 'App.ScriptBuilderTarget.TargetLabel', type: 'field' },
|
||||
{
|
||||
|
|
@ -294,9 +302,9 @@ export const recipes: Recipe[] = [
|
|||
{ key: 'amount', label: 'App.ScriptBuilderAmount.AmountLabel', type: 'field' },
|
||||
{
|
||||
key: 'rate',
|
||||
label: 'Oran',
|
||||
label: 'App.ScriptBuilderRate.RateLabel',
|
||||
type: 'text',
|
||||
placeholder: '20 veya KdvOrani',
|
||||
placeholder: 'App.ScriptBuilderRate.RatePlaceholder',
|
||||
help: 'App.ScriptBuilderRate.Help',
|
||||
},
|
||||
{ key: 'target', label: 'App.ScriptBuilderTarget.TargetLabel', type: 'field' },
|
||||
|
|
@ -375,7 +383,7 @@ export const recipes: Recipe[] = [
|
|||
},
|
||||
{
|
||||
id: 'sum',
|
||||
label: 'Toplama',
|
||||
label: 'App.ScriptBuilderSum.SumLabel',
|
||||
group: 'calc',
|
||||
summary: 'App.ScriptBuilderSum.SumSummary',
|
||||
example: "set('Total', round(sum('Net', 'Tax'), 2))",
|
||||
|
|
@ -472,7 +480,7 @@ export const recipes: Recipe[] = [
|
|||
key: 'source',
|
||||
label: 'App.ScriptBuilderSource.SourceLabel',
|
||||
type: 'text',
|
||||
placeholder: 'unitPrice veya Customer.Name',
|
||||
placeholder: 'App.ScriptBuilderCopy.SourcePlaceholder',
|
||||
},
|
||||
{ key: 'target', label: 'App.ScriptBuilderTarget.TargetLabel2', type: 'field' },
|
||||
],
|
||||
|
|
@ -523,13 +531,13 @@ export const recipes: Recipe[] = [
|
|||
},
|
||||
{
|
||||
id: 'readOnly',
|
||||
label: 'Salt okunur yap',
|
||||
label: 'App.ScriptBuilderReadOnly.ReadOnlyLabel',
|
||||
group: 'view',
|
||||
summary: 'App.ScriptBuilderReadOnly.ReadOnlySummary',
|
||||
conditionIsArgument: true,
|
||||
example: "readOnly('SatisSebebi', str('Durum') === 'Aktif')",
|
||||
params: [
|
||||
{ key: 'target', label: 'Kilitlenecek alan', type: 'field' },
|
||||
{ key: 'target', label: 'App.ScriptBuilderReadOnly.TargetLabel', type: 'field' },
|
||||
{
|
||||
key: 'invert',
|
||||
label: 'App.ScriptBuilderInvert.InvertLabel',
|
||||
|
|
@ -608,7 +616,7 @@ export const recipes: Recipe[] = [
|
|||
{ key: 'url', label: 'URL', type: 'text', placeholder: '/report?id={Id}' },
|
||||
{
|
||||
key: 'target',
|
||||
label: 'Hedef',
|
||||
label: 'App.ScriptBuilderOpenUrl.TargetLabel',
|
||||
type: 'select',
|
||||
optional: true,
|
||||
choices: [
|
||||
|
|
@ -628,16 +636,21 @@ export const recipes: Recipe[] = [
|
|||
},
|
||||
{
|
||||
id: 'apiToField',
|
||||
label: 'API sonucunu alana yaz',
|
||||
label: 'App.ScriptBuilderApiToField.ApiToFieldLabel',
|
||||
group: 'integration',
|
||||
summary: 'App.ScriptBuilderApiToField.ApiToFieldSummary',
|
||||
example: "set('Unvan', await api('/api/musteri/{value}', 'data.name'))",
|
||||
params: [
|
||||
{ key: 'target', label: 'App.ScriptBuilderTarget.TargetLabel2', type: 'field' },
|
||||
{ key: 'url', label: 'API adresi', type: 'text', placeholder: '/api/musteri/{value}' },
|
||||
{
|
||||
key: 'url',
|
||||
label: 'App.ScriptBuilderApiToField.UrlLabel',
|
||||
type: 'text',
|
||||
placeholder: '/api/musteri/{value}',
|
||||
},
|
||||
{
|
||||
key: 'path',
|
||||
label: 'Cevap yolu',
|
||||
label: 'App.ScriptBuilderApiToField.PathLabel',
|
||||
type: 'text',
|
||||
optional: true,
|
||||
placeholder: 'data.name',
|
||||
|
|
@ -663,7 +676,7 @@ export const recipes: Recipe[] = [
|
|||
params: [
|
||||
{
|
||||
key: 'code',
|
||||
label: 'Kod',
|
||||
label: 'App.ScriptBuilderCustom.CodeLabel',
|
||||
type: 'text',
|
||||
placeholder: 'UiEvalService.ApiGenerateBackgroundWorkers()',
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue