Claude güncellemesi SqlDataSource Event geliştirmesi
This commit is contained in:
parent
93e337b9b2
commit
38e3ef5797
9 changed files with 1540 additions and 443 deletions
|
|
@ -196,8 +196,8 @@ public class PlatformDbContext :
|
||||||
|
|
||||||
b.Property(a => a.Name).IsRequired().HasMaxLength(128);
|
b.Property(a => a.Name).IsRequired().HasMaxLength(128);
|
||||||
b.Property(a => a.ApiUrl).HasMaxLength(256);
|
b.Property(a => a.ApiUrl).HasMaxLength(256);
|
||||||
b.Property(a => a.Description).HasColumnType("ntext");
|
b.Property(a => a.Description).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.Tenants).HasColumnType("ntext");
|
b.Property(a => a.Tenants).HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasIndex(x => new { x.Name }).IsUnique().HasFilter(null);
|
b.HasIndex(x => new { x.Name }).IsUnique().HasFilter(null);
|
||||||
});
|
});
|
||||||
|
|
@ -349,60 +349,60 @@ public class PlatformDbContext :
|
||||||
b.Property(a => a.ListFormType).HasMaxLength(20);
|
b.Property(a => a.ListFormType).HasMaxLength(20);
|
||||||
|
|
||||||
// Uzun JSON alanları için nvarchar(max)
|
// Uzun JSON alanları için nvarchar(max)
|
||||||
b.Property(a => a.SelectCommand).HasColumnType("ntext");
|
b.Property(a => a.SelectCommand).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.SelectFieldsDefaultValueJson).HasColumnType("ntext");
|
b.Property(a => a.SelectFieldsDefaultValueJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.DefaultFilter).IsUnicode(true);
|
b.Property(a => a.DefaultFilter).IsUnicode(true);
|
||||||
b.Property(a => a.ColumnOptionJson).HasColumnType("ntext");
|
b.Property(a => a.ColumnOptionJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.PivotOptionJson).HasColumnType("ntext");
|
b.Property(a => a.PivotOptionJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.FilterRowJson).HasColumnType("ntext");
|
b.Property(a => a.FilterRowJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.HeaderFilterJson).HasColumnType("ntext");
|
b.Property(a => a.HeaderFilterJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.FilterPanelJson).HasColumnType("ntext");
|
b.Property(a => a.FilterPanelJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.SearchPanelJson).HasColumnType("ntext");
|
b.Property(a => a.SearchPanelJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.GroupPanelJson).HasColumnType("ntext");
|
b.Property(a => a.GroupPanelJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.SelectionJson).HasColumnType("ntext");
|
b.Property(a => a.SelectionJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.PagerOptionJson).HasColumnType("ntext");
|
b.Property(a => a.PagerOptionJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.EditingOptionJson).HasColumnType("ntext");
|
b.Property(a => a.EditingOptionJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.EditingFormJson).HasColumnType("ntext");
|
b.Property(a => a.EditingFormJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.PermissionJson).HasColumnType("ntext");
|
b.Property(a => a.PermissionJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.InsertFieldsDefaultValueJson).HasColumnType("ntext");
|
b.Property(a => a.InsertFieldsDefaultValueJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.UpdateFieldsDefaultValueJson).HasColumnType("ntext");
|
b.Property(a => a.UpdateFieldsDefaultValueJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.DeleteFieldsDefaultValueJson).HasColumnType("ntext");
|
b.Property(a => a.DeleteFieldsDefaultValueJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.CommandColumnJson).HasColumnType("ntext");
|
b.Property(a => a.CommandColumnJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.StateStoringJson).HasColumnType("ntext");
|
b.Property(a => a.StateStoringJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.DeleteCommand).HasColumnType("ntext");
|
b.Property(a => a.DeleteCommand).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.UpdateCommand).HasColumnType("ntext");
|
b.Property(a => a.UpdateCommand).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.InsertCommand).HasColumnType("ntext");
|
b.Property(a => a.InsertCommand).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.CustomJsSourcesJson).HasColumnType("ntext");
|
b.Property(a => a.CustomJsSourcesJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.CustomStyleSourcesJson).HasColumnType("ntext");
|
b.Property(a => a.CustomStyleSourcesJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.FormFieldsDefaultValueJson).HasColumnType("ntext");
|
b.Property(a => a.FormFieldsDefaultValueJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.SubFormsJson).HasColumnType("ntext");
|
b.Property(a => a.SubFormsJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.WidgetsJson).HasColumnType("ntext");
|
b.Property(a => a.WidgetsJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.WorkflowJson).HasColumnType("ntext");
|
b.Property(a => a.WorkflowJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.ExtraFilterJson).HasColumnType("ntext");
|
b.Property(a => a.ExtraFilterJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.LayoutJson).HasColumnType("ntext");
|
b.Property(a => a.LayoutJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.TodoOptionJson).HasColumnType("ntext");
|
b.Property(a => a.TodoOptionJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.CommonJson).HasColumnType("ntext");
|
b.Property(a => a.CommonJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.DataSourceJson).HasColumnType("ntext");
|
b.Property(a => a.DataSourceJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.AdaptiveLayoutJson).HasColumnType("ntext");
|
b.Property(a => a.AdaptiveLayoutJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.AnimationJson).HasColumnType("ntext");
|
b.Property(a => a.AnimationJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.AnnotationsJson).HasColumnType("ntext");
|
b.Property(a => a.AnnotationsJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.ArgumentAxisJson).HasColumnType("ntext");
|
b.Property(a => a.ArgumentAxisJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.CommonAnnotationsSettingsJson).HasColumnType("ntext");
|
b.Property(a => a.CommonAnnotationsSettingsJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.CommonAxisSettingsJson).HasColumnType("ntext");
|
b.Property(a => a.CommonAxisSettingsJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.CommonPaneSettingsJson).HasColumnType("ntext");
|
b.Property(a => a.CommonPaneSettingsJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.CommonSeriesSettingsJson).HasColumnType("ntext");
|
b.Property(a => a.CommonSeriesSettingsJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.CrosshairJson).HasColumnType("ntext");
|
b.Property(a => a.CrosshairJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.ExportJson).HasColumnType("ntext");
|
b.Property(a => a.ExportJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.LegendJson).HasColumnType("ntext");
|
b.Property(a => a.LegendJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.MarginJson).HasColumnType("ntext");
|
b.Property(a => a.MarginJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.PanesJson).HasColumnType("ntext");
|
b.Property(a => a.PanesJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.ScrollBarJson).HasColumnType("ntext");
|
b.Property(a => a.ScrollBarJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.SeriesJson).HasColumnType("ntext");
|
b.Property(a => a.SeriesJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.SizeJson).HasColumnType("ntext");
|
b.Property(a => a.SizeJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.TitleJson).HasColumnType("ntext");
|
b.Property(a => a.TitleJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.TooltipJson).HasColumnType("ntext");
|
b.Property(a => a.TooltipJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.ValueAxisJson).HasColumnType("ntext");
|
b.Property(a => a.ValueAxisJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.ZoomAndPanJson).HasColumnType("ntext");
|
b.Property(a => a.ZoomAndPanJson).HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasIndex(x => new { x.ListFormCode }).IsUnique().HasFilter(null);
|
b.HasIndex(x => new { x.ListFormCode }).IsUnique().HasFilter(null);
|
||||||
|
|
||||||
|
|
@ -438,27 +438,27 @@ public class PlatformDbContext :
|
||||||
b.Property(a => a.BandName).HasMaxLength(128);
|
b.Property(a => a.BandName).HasMaxLength(128);
|
||||||
|
|
||||||
// JSON alanlar
|
// JSON alanlar
|
||||||
b.Property(a => a.ColumnFilterJson).HasColumnType("ntext");
|
b.Property(a => a.ColumnFilterJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.ColumnHeaderJson).HasColumnType("ntext");
|
b.Property(a => a.ColumnHeaderJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.GroupingJson).HasColumnType("ntext");
|
b.Property(a => a.GroupingJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.ColumnCustomizationJson).HasColumnType("ntext");
|
b.Property(a => a.ColumnCustomizationJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.TotalSummaryJson).HasColumnType("ntext");
|
b.Property(a => a.TotalSummaryJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.GroupSummaryJson).HasColumnType("ntext");
|
b.Property(a => a.GroupSummaryJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.JoinTableJson).HasColumnType("ntext");
|
b.Property(a => a.JoinTableJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.LookupJson).HasColumnType("ntext");
|
b.Property(a => a.LookupJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.ValidationRuleJson).HasColumnType("ntext");
|
b.Property(a => a.ValidationRuleJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.ColumnStylingJson).HasColumnType("ntext");
|
b.Property(a => a.ColumnStylingJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.PermissionJson).HasColumnType("ntext");
|
b.Property(a => a.PermissionJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.PivotSettingsJson).HasColumnType("ntext");
|
b.Property(a => a.PivotSettingsJson).HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
// Stil ve format
|
// Stil ve format
|
||||||
b.Property(a => a.ColumnCssClass).HasMaxLength(128);
|
b.Property(a => a.ColumnCssClass).HasMaxLength(128);
|
||||||
b.Property(a => a.ColumnCssValue).HasMaxLength(256);
|
b.Property(a => a.ColumnCssValue).HasMaxLength(256);
|
||||||
b.Property(a => a.Alignment).HasMaxLength(20).HasDefaultValue("left");
|
b.Property(a => a.Alignment).HasMaxLength(20).HasDefaultValue("left");
|
||||||
b.Property(a => a.Format).HasMaxLength(128);
|
b.Property(a => a.Format).HasMaxLength(128);
|
||||||
b.Property(a => a.EditorOptions).HasColumnType("ntext");
|
b.Property(a => a.EditorOptions).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.EditorType2).HasMaxLength(64);
|
b.Property(a => a.EditorType2).HasMaxLength(64);
|
||||||
b.Property(a => a.EditorScript).HasColumnType("ntext");
|
b.Property(a => a.EditorScript).HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasIndex(x => new { x.ListFormCode, x.UserId, x.RoleId, x.CultureName, x.FieldName }).IsUnique().HasFilter(null);
|
b.HasIndex(x => new { x.ListFormCode, x.UserId, x.RoleId, x.CultureName, x.FieldName }).IsUnique().HasFilter(null);
|
||||||
});
|
});
|
||||||
|
|
@ -472,7 +472,7 @@ public class PlatformDbContext :
|
||||||
b.Property(a => a.UserId).HasMaxLength(256);
|
b.Property(a => a.UserId).HasMaxLength(256);
|
||||||
b.Property(a => a.RoleId).HasMaxLength(256);
|
b.Property(a => a.RoleId).HasMaxLength(256);
|
||||||
b.Property(a => a.FilterName).HasMaxLength(128);
|
b.Property(a => a.FilterName).HasMaxLength(128);
|
||||||
b.Property(a => a.CustomizationData).HasColumnType("ntext");
|
b.Property(a => a.CustomizationData).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.CustomizationType).IsRequired();
|
b.Property(a => a.CustomizationType).IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -496,7 +496,7 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.ImportId).IsRequired();
|
b.Property(x => x.ImportId).IsRequired();
|
||||||
b.Property(x => x.BlobName).IsRequired().HasMaxLength(256);
|
b.Property(x => x.BlobName).IsRequired().HasMaxLength(256);
|
||||||
b.Property(x => x.Status).IsRequired().HasMaxLength(64);
|
b.Property(x => x.Status).IsRequired().HasMaxLength(64);
|
||||||
b.Property(x => x.ErrorsJson).HasColumnType("ntext");
|
b.Property(x => x.ErrorsJson).HasColumnType("nvarchar(max)");
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<ListFormWorkflow>(b =>
|
builder.Entity<ListFormWorkflow>(b =>
|
||||||
|
|
@ -519,7 +519,7 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.NextOnReject).IsRequired().HasMaxLength(128);
|
b.Property(x => x.NextOnReject).IsRequired().HasMaxLength(128);
|
||||||
b.Property(x => x.PositionX).IsRequired();
|
b.Property(x => x.PositionX).IsRequired();
|
||||||
b.Property(x => x.PositionY).IsRequired();
|
b.Property(x => x.PositionY).IsRequired();
|
||||||
b.Property(x => x.CompareOutcomesJson).HasColumnType("ntext");
|
b.Property(x => x.CompareOutcomesJson).HasColumnType("nvarchar(max)");
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<Note>(b =>
|
builder.Entity<Note>(b =>
|
||||||
|
|
@ -546,7 +546,7 @@ public class PlatformDbContext :
|
||||||
b.Property(a => a.DataSourceCode).HasMaxLength(64);
|
b.Property(a => a.DataSourceCode).HasMaxLength(64);
|
||||||
b.Property(a => a.BeforeSp).HasMaxLength(128);
|
b.Property(a => a.BeforeSp).HasMaxLength(128);
|
||||||
b.Property(a => a.AfterSp).HasMaxLength(128);
|
b.Property(a => a.AfterSp).HasMaxLength(128);
|
||||||
b.Property(a => a.Options).HasColumnType("ntext");
|
b.Property(a => a.Options).HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasIndex(x => new { x.Name }).IsUnique().HasFilter("[IsDeleted] = 0");
|
b.HasIndex(x => new { x.Name }).IsUnique().HasFilter("[IsDeleted] = 0");
|
||||||
});
|
});
|
||||||
|
|
@ -638,8 +638,8 @@ public class PlatformDbContext :
|
||||||
b.Property(a => a.Method).IsRequired().HasMaxLength(10);
|
b.Property(a => a.Method).IsRequired().HasMaxLength(10);
|
||||||
b.Property(a => a.DataSourceCode).IsRequired().HasMaxLength(128);
|
b.Property(a => a.DataSourceCode).IsRequired().HasMaxLength(128);
|
||||||
b.Property(a => a.Sql).IsRequired();
|
b.Property(a => a.Sql).IsRequired();
|
||||||
b.Property(a => a.ParametersJson).HasColumnType("ntext");
|
b.Property(a => a.ParametersJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(a => a.PermissionsJson).HasColumnType("ntext");
|
b.Property(a => a.PermissionsJson).HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasIndex(x => new { x.TenantId, x.Name }).IsUnique().HasFilter("[IsDeleted] = 0");
|
b.HasIndex(x => new { x.TenantId, x.Name }).IsUnique().HasFilter("[IsDeleted] = 0");
|
||||||
});
|
});
|
||||||
|
|
@ -933,9 +933,9 @@ public class PlatformDbContext :
|
||||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.About)), Prefix.DbSchema);
|
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.About)), Prefix.DbSchema);
|
||||||
b.ConfigureByConvention();
|
b.ConfigureByConvention();
|
||||||
|
|
||||||
b.Property(x => x.StatsJson).HasColumnType("ntext");
|
b.Property(x => x.StatsJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(x => x.DescriptionsJson).HasColumnType("ntext");
|
b.Property(x => x.DescriptionsJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(x => x.SectionsJson).HasColumnType("ntext");
|
b.Property(x => x.SectionsJson).HasColumnType("nvarchar(max)");
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<Home>(b =>
|
builder.Entity<Home>(b =>
|
||||||
|
|
@ -953,9 +953,9 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.CtaTitleKey).HasMaxLength(256);
|
b.Property(x => x.CtaTitleKey).HasMaxLength(256);
|
||||||
b.Property(x => x.CtaSubtitleKey).HasMaxLength(256);
|
b.Property(x => x.CtaSubtitleKey).HasMaxLength(256);
|
||||||
b.Property(x => x.CtaButtonLabelKey).HasMaxLength(256);
|
b.Property(x => x.CtaButtonLabelKey).HasMaxLength(256);
|
||||||
b.Property(x => x.SlidesJson).HasColumnType("ntext");
|
b.Property(x => x.SlidesJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(x => x.FeaturesJson).HasColumnType("ntext");
|
b.Property(x => x.FeaturesJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(x => x.SolutionsJson).HasColumnType("ntext");
|
b.Property(x => x.SolutionsJson).HasColumnType("nvarchar(max)");
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<Service>(b =>
|
builder.Entity<Service>(b =>
|
||||||
|
|
@ -1145,9 +1145,9 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.Email).HasMaxLength(128);
|
b.Property(x => x.Email).HasMaxLength(128);
|
||||||
b.Property(x => x.Location).HasMaxLength(256);
|
b.Property(x => x.Location).HasMaxLength(256);
|
||||||
|
|
||||||
b.Property(x => x.BankJson).HasColumnType("ntext");
|
b.Property(x => x.BankJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(x => x.WorkHoursJson).HasColumnType("ntext");
|
b.Property(x => x.WorkHoursJson).HasColumnType("nvarchar(max)");
|
||||||
b.Property(x => x.MapJson).HasColumnType("ntext");
|
b.Property(x => x.MapJson).HasColumnType("nvarchar(max)");
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<LogEntry>(b =>
|
builder.Entity<LogEntry>(b =>
|
||||||
|
|
@ -1164,10 +1164,10 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.Name).IsRequired().HasMaxLength(256);
|
b.Property(x => x.Name).IsRequired().HasMaxLength(256);
|
||||||
b.Property(x => x.DisplayName).HasMaxLength(512);
|
b.Property(x => x.DisplayName).HasMaxLength(512);
|
||||||
b.Property(x => x.Description).HasMaxLength(2048);
|
b.Property(x => x.Description).HasMaxLength(2048);
|
||||||
b.Property(x => x.Code).IsRequired().HasColumnType("ntext"); // Uzun C# kod metni için
|
b.Property(x => x.Code).IsRequired().HasColumnType("nvarchar(max)"); // Uzun C# kod metni için
|
||||||
b.Property(x => x.IsActive).IsRequired().HasDefaultValue(true);
|
b.Property(x => x.IsActive).IsRequired().HasDefaultValue(true);
|
||||||
b.Property(x => x.CompilationStatus).IsRequired().HasConversion<string>().HasMaxLength(20);
|
b.Property(x => x.CompilationStatus).IsRequired().HasConversion<string>().HasMaxLength(20);
|
||||||
b.Property(x => x.LastCompilationError).HasColumnType("ntext"); // Uzun hata mesajları için
|
b.Property(x => x.LastCompilationError).HasColumnType("nvarchar(max)"); // Uzun hata mesajları için
|
||||||
b.Property(x => x.LastSuccessfulCompilation).IsRequired(false);
|
b.Property(x => x.LastSuccessfulCompilation).IsRequired(false);
|
||||||
b.Property(x => x.Version).IsRequired().HasDefaultValue(1);
|
b.Property(x => x.Version).IsRequired().HasDefaultValue(1);
|
||||||
b.Property(x => x.CodeHash).HasMaxLength(64);
|
b.Property(x => x.CodeHash).HasMaxLength(64);
|
||||||
|
|
@ -1189,7 +1189,7 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.PublishDate).IsRequired();
|
b.Property(x => x.PublishDate).IsRequired();
|
||||||
b.Property(x => x.Attachments).HasMaxLength(2048);
|
b.Property(x => x.Attachments).HasMaxLength(2048);
|
||||||
b.Property(x => x.ViewCount).HasDefaultValue(0);
|
b.Property(x => x.ViewCount).HasDefaultValue(0);
|
||||||
b.Property(x => x.ImageUrl).HasColumnType("ntext");
|
b.Property(x => x.ImageUrl).HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasIndex(x => new { x.TenantId, x.Title }).IsUnique().HasFilter("[IsDeleted] = 0");
|
b.HasIndex(x => new { x.TenantId, x.Title }).IsUnique().HasFilter("[IsDeleted] = 0");
|
||||||
});
|
});
|
||||||
|
|
@ -1405,7 +1405,7 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.Description).HasMaxLength(1024);
|
b.Property(x => x.Description).HasMaxLength(1024);
|
||||||
b.Property(x => x.Status).HasMaxLength(20);
|
b.Property(x => x.Status).HasMaxLength(20);
|
||||||
b.Property(x => x.isPublished).HasDefaultValue(false);
|
b.Property(x => x.isPublished).HasDefaultValue(false);
|
||||||
b.Property(x => x.Photos).HasColumnType("ntext");
|
b.Property(x => x.Photos).HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasIndex(x => new { x.TenantId, x.CategoryId, x.TypeId, x.Name }).IsUnique().HasFilter("[IsDeleted] = 0");
|
b.HasIndex(x => new { x.TenantId, x.CategoryId, x.TypeId, x.Name }).IsUnique().HasFilter("[IsDeleted] = 0");
|
||||||
|
|
||||||
|
|
@ -1454,7 +1454,7 @@ public class PlatformDbContext :
|
||||||
|
|
||||||
b.Property(x => x.Title).HasMaxLength(256);
|
b.Property(x => x.Title).HasMaxLength(256);
|
||||||
b.Property(x => x.ParticipantKey).IsRequired().HasMaxLength(512);
|
b.Property(x => x.ParticipantKey).IsRequired().HasMaxLength(512);
|
||||||
b.Property(x => x.ParticipantIdsJson).IsRequired().HasColumnType("ntext");
|
b.Property(x => x.ParticipantIdsJson).IsRequired().HasColumnType("nvarchar(max)");
|
||||||
b.Property(x => x.LastMessagePreview).HasMaxLength(512);
|
b.Property(x => x.LastMessagePreview).HasMaxLength(512);
|
||||||
b.Property(x => x.MessageCount).HasDefaultValue(0);
|
b.Property(x => x.MessageCount).HasDefaultValue(0);
|
||||||
|
|
||||||
|
|
@ -1471,9 +1471,9 @@ public class PlatformDbContext :
|
||||||
|
|
||||||
b.Property(x => x.SenderUserName).IsRequired().HasMaxLength(256);
|
b.Property(x => x.SenderUserName).IsRequired().HasMaxLength(256);
|
||||||
b.Property(x => x.SenderName).IsRequired().HasMaxLength(256);
|
b.Property(x => x.SenderName).IsRequired().HasMaxLength(256);
|
||||||
b.Property(x => x.RecipientIdsJson).IsRequired().HasColumnType("ntext");
|
b.Property(x => x.RecipientIdsJson).IsRequired().HasColumnType("nvarchar(max)");
|
||||||
b.Property(x => x.Text).HasMaxLength(4096);
|
b.Property(x => x.Text).HasMaxLength(4096);
|
||||||
b.Property(x => x.AttachmentsJson).IsRequired().HasColumnType("ntext");
|
b.Property(x => x.AttachmentsJson).IsRequired().HasColumnType("nvarchar(max)");
|
||||||
b.Property(x => x.SentAt).IsRequired();
|
b.Property(x => x.SentAt).IsRequired();
|
||||||
|
|
||||||
b.HasIndex(x => new { x.TenantId, x.ConversationId, x.SentAt });
|
b.HasIndex(x => new { x.TenantId, x.ConversationId, x.SentAt });
|
||||||
|
|
@ -1577,7 +1577,7 @@ public class PlatformDbContext :
|
||||||
b.Property(x => x.ResourceName).HasMaxLength(64);
|
b.Property(x => x.ResourceName).HasMaxLength(64);
|
||||||
b.Property(x => x.MaxForms).HasDefaultValue(500);
|
b.Property(x => x.MaxForms).HasDefaultValue(500);
|
||||||
b.Property(x => x.CacheKey).HasMaxLength(512).IsRequired();
|
b.Property(x => x.CacheKey).HasMaxLength(512).IsRequired();
|
||||||
b.Property(x => x.JsonData).IsRequired().HasColumnType("ntext");
|
b.Property(x => x.JsonData).IsRequired().HasColumnType("nvarchar(max)");
|
||||||
b.Property(x => x.FormCount).HasDefaultValue(0);
|
b.Property(x => x.FormCount).HasDefaultValue(0);
|
||||||
b.Property(x => x.FieldCount).HasDefaultValue(0);
|
b.Property(x => x.FieldCount).HasDefaultValue(0);
|
||||||
b.Property(x => x.JsonLength).HasDefaultValue(0);
|
b.Property(x => x.JsonLength).HasDefaultValue(0);
|
||||||
|
|
@ -1596,7 +1596,7 @@ public class PlatformDbContext :
|
||||||
|
|
||||||
b.Property(e => e.Title).HasMaxLength(512).IsRequired();
|
b.Property(e => e.Title).HasMaxLength(512).IsRequired();
|
||||||
b.Property(e => e.Status).HasMaxLength(64).IsRequired();
|
b.Property(e => e.Status).HasMaxLength(64).IsRequired();
|
||||||
b.Property(e => e.Description).HasColumnType("ntext");
|
b.Property(e => e.Description).HasColumnType("nvarchar(max)");
|
||||||
b.Property(e => e.Tags).HasMaxLength(256);
|
b.Property(e => e.Tags).HasMaxLength(256);
|
||||||
b.Property(e => e.Assignees).HasMaxLength(512);
|
b.Property(e => e.Assignees).HasMaxLength(512);
|
||||||
b.Property(e => e.Priority).HasMaxLength(64);
|
b.Property(e => e.Priority).HasMaxLength(64);
|
||||||
|
|
@ -1612,10 +1612,10 @@ public class PlatformDbContext :
|
||||||
b.Property(e => e.UserName).HasMaxLength(256).IsRequired();
|
b.Property(e => e.UserName).HasMaxLength(256).IsRequired();
|
||||||
|
|
||||||
b.Property(e => e.Text).HasMaxLength(512).IsRequired();
|
b.Property(e => e.Text).HasMaxLength(512).IsRequired();
|
||||||
b.Property(e => e.Description).HasColumnType("ntext");
|
b.Property(e => e.Description).HasColumnType("nvarchar(max)");
|
||||||
b.Property(e => e.AllDay).HasDefaultValue(false);
|
b.Property(e => e.AllDay).HasDefaultValue(false);
|
||||||
b.Property(e => e.RecurrenceRule).HasMaxLength(512);
|
b.Property(e => e.RecurrenceRule).HasMaxLength(512);
|
||||||
b.Property(e => e.RecurrenceException).HasColumnType("ntext");
|
b.Property(e => e.RecurrenceException).HasColumnType("nvarchar(max)");
|
||||||
});
|
});
|
||||||
|
|
||||||
ConfigureProviderSpecificModel(builder);
|
ConfigureProviderSpecificModel(builder);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Sozsoft.Platform.Migrations
|
namespace Sozsoft.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20260805202101_Initial")]
|
[Migration("20260808210009_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -652,7 +652,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("DeletionTime");
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
b.Property<string>("DescriptionsJson")
|
b.Property<string>("DescriptionsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("IsDeleted")
|
b.Property<bool>("IsDeleted")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
|
@ -669,10 +669,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("LastModifierId");
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
b.Property<string>("SectionsJson")
|
b.Property<string>("SectionsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("StatsJson")
|
b.Property<string>("StatsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -706,7 +706,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("DeletionTime");
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<DateTime>("EndDate")
|
b.Property<DateTime>("EndDate")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
@ -726,7 +726,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("LastModifierId");
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
b.Property<string>("RecurrenceException")
|
b.Property<string>("RecurrenceException")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("RecurrenceRule")
|
b.Property<string>("RecurrenceRule")
|
||||||
.HasMaxLength(512)
|
.HasMaxLength(512)
|
||||||
|
|
@ -764,7 +764,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(256)");
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("IsActive")
|
b.Property<bool>("IsActive")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
@ -775,7 +775,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(128)");
|
.HasColumnType("nvarchar(128)");
|
||||||
|
|
||||||
b.Property<string>("Tenants")
|
b.Property<string>("Tenants")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -829,7 +829,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<string>("ImageUrl")
|
b.Property<string>("ImageUrl")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("IsDeleted")
|
b.Property<bool>("IsDeleted")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
|
@ -1059,7 +1059,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(128)");
|
.HasColumnType("nvarchar(128)");
|
||||||
|
|
||||||
b.Property<string>("Options")
|
b.Property<string>("Options")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("WorkerType")
|
b.Property<int>("WorkerType")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
@ -1453,7 +1453,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(512)");
|
.HasColumnType("nvarchar(512)");
|
||||||
|
|
||||||
b.Property<string>("BankJson")
|
b.Property<string>("BankJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
b.Property<DateTime>("CreationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
|
|
@ -1494,7 +1494,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(256)");
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
b.Property<string>("MapJson")
|
b.Property<string>("MapJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber")
|
b.Property<string>("PhoneNumber")
|
||||||
.HasMaxLength(20)
|
.HasMaxLength(20)
|
||||||
|
|
@ -1504,7 +1504,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("WorkHoursJson")
|
b.Property<string>("WorkHoursJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -1977,10 +1977,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(128)");
|
.HasColumnType("nvarchar(128)");
|
||||||
|
|
||||||
b.Property<string>("ParametersJson")
|
b.Property<string>("ParametersJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PermissionsJson")
|
b.Property<string>("PermissionsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("Sql")
|
b.Property<string>("Sql")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -2102,7 +2102,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("JsonData")
|
b.Property<string>("JsonData")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("JsonLength")
|
b.Property<int>("JsonLength")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
|
@ -2322,7 +2322,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("DeletionTime");
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<DateTime?>("DueDate")
|
b.Property<DateTime?>("DueDate")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
@ -2457,7 +2457,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("Code")
|
b.Property<string>("Code")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CodeHash")
|
b.Property<string>("CodeHash")
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
|
|
@ -2508,7 +2508,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("IsDeleted");
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
b.Property<string>("LastCompilationError")
|
b.Property<string>("LastCompilationError")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<DateTime?>("LastModificationTime")
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
|
|
@ -2605,7 +2605,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("Photos")
|
b.Property<string>("Photos")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("Place")
|
b.Property<string>("Place")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -2936,7 +2936,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("DeletionTime");
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
b.Property<string>("FeaturesJson")
|
b.Property<string>("FeaturesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("FeaturesSubtitleKey")
|
b.Property<string>("FeaturesSubtitleKey")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -2973,10 +2973,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("LastModifierId");
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
b.Property<string>("SlidesJson")
|
b.Property<string>("SlidesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SolutionsJson")
|
b.Property<string>("SolutionsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SolutionsSubtitleKey")
|
b.Property<string>("SolutionsSubtitleKey")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -3179,40 +3179,40 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("AdaptiveLayoutJson")
|
b.Property<string>("AdaptiveLayoutJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("AnimationJson")
|
b.Property<string>("AnimationJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("AnnotationsJson")
|
b.Property<string>("AnnotationsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ArgumentAxisJson")
|
b.Property<string>("ArgumentAxisJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ColumnOptionJson")
|
b.Property<string>("ColumnOptionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CommandColumnJson")
|
b.Property<string>("CommandColumnJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CommonAnnotationsSettingsJson")
|
b.Property<string>("CommonAnnotationsSettingsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CommonAxisSettingsJson")
|
b.Property<string>("CommonAxisSettingsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CommonJson")
|
b.Property<string>("CommonJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CommonPaneSettingsJson")
|
b.Property<string>("CommonPaneSettingsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CommonSeriesSettingsJson")
|
b.Property<string>("CommonSeriesSettingsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CrosshairJson")
|
b.Property<string>("CrosshairJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CultureName")
|
b.Property<string>("CultureName")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -3220,17 +3220,17 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(10)");
|
.HasColumnType("nvarchar(10)");
|
||||||
|
|
||||||
b.Property<string>("CustomJsSourcesJson")
|
b.Property<string>("CustomJsSourcesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CustomStyleSourcesJson")
|
b.Property<string>("CustomStyleSourcesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("DataSourceCode")
|
b.Property<string>("DataSourceCode")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(128)
|
||||||
.HasColumnType("nvarchar(128)");
|
.HasColumnType("nvarchar(128)");
|
||||||
|
|
||||||
b.Property<string>("DataSourceJson")
|
b.Property<string>("DataSourceJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("DefaultFilter")
|
b.Property<string>("DefaultFilter")
|
||||||
.IsUnicode(true)
|
.IsUnicode(true)
|
||||||
|
|
@ -3243,10 +3243,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("DeleteCommand")
|
b.Property<string>("DeleteCommand")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("DeleteFieldsDefaultValueJson")
|
b.Property<string>("DeleteFieldsDefaultValueJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("DeleteServiceAddress")
|
b.Property<string>("DeleteServiceAddress")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -3257,25 +3257,25 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(512)");
|
.HasColumnType("nvarchar(512)");
|
||||||
|
|
||||||
b.Property<string>("EditingFormJson")
|
b.Property<string>("EditingFormJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("EditingOptionJson")
|
b.Property<string>("EditingOptionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ExportJson")
|
b.Property<string>("ExportJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ExtraFilterJson")
|
b.Property<string>("ExtraFilterJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("FilterPanelJson")
|
b.Property<string>("FilterPanelJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("FilterRowJson")
|
b.Property<string>("FilterRowJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("FormFieldsDefaultValueJson")
|
b.Property<string>("FormFieldsDefaultValueJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("FullHeight")
|
b.Property<bool>("FullHeight")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
@ -3284,10 +3284,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("GroupPanelJson")
|
b.Property<string>("GroupPanelJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("HeaderFilterJson")
|
b.Property<string>("HeaderFilterJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int?>("Height")
|
b.Property<int?>("Height")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
@ -3299,10 +3299,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("InsertCommand")
|
b.Property<string>("InsertCommand")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("InsertFieldsDefaultValueJson")
|
b.Property<string>("InsertFieldsDefaultValueJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("InsertServiceAddress")
|
b.Property<string>("InsertServiceAddress")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -3328,10 +3328,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(64)");
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.Property<string>("LayoutJson")
|
b.Property<string>("LayoutJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("LegendJson")
|
b.Property<string>("LegendJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ListFormCode")
|
b.Property<string>("ListFormCode")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -3343,7 +3343,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(20)");
|
.HasColumnType("nvarchar(20)");
|
||||||
|
|
||||||
b.Property<string>("MarginJson")
|
b.Property<string>("MarginJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(128)
|
||||||
|
|
@ -3355,16 +3355,16 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasDefaultValue(50);
|
.HasDefaultValue(50);
|
||||||
|
|
||||||
b.Property<string>("PagerOptionJson")
|
b.Property<string>("PagerOptionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PanesJson")
|
b.Property<string>("PanesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PermissionJson")
|
b.Property<string>("PermissionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PivotOptionJson")
|
b.Property<string>("PivotOptionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -3377,41 +3377,41 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ScrollBarJson")
|
b.Property<string>("ScrollBarJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SearchPanelJson")
|
b.Property<string>("SearchPanelJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SelectCommand")
|
b.Property<string>("SelectCommand")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("SelectCommandType")
|
b.Property<int>("SelectCommandType")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("SelectFieldsDefaultValueJson")
|
b.Property<string>("SelectFieldsDefaultValueJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SelectionJson")
|
b.Property<string>("SelectionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SeriesJson")
|
b.Property<string>("SeriesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("ShowNote")
|
b.Property<bool>("ShowNote")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<string>("SizeJson")
|
b.Property<string>("SizeJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SortMode")
|
b.Property<string>("SortMode")
|
||||||
.HasMaxLength(20)
|
.HasMaxLength(20)
|
||||||
.HasColumnType("nvarchar(20)");
|
.HasColumnType("nvarchar(20)");
|
||||||
|
|
||||||
b.Property<string>("StateStoringJson")
|
b.Property<string>("StateStoringJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SubFormsJson")
|
b.Property<string>("SubFormsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SubFormsListFormType")
|
b.Property<string>("SubFormsListFormType")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
@ -3425,13 +3425,13 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(256)");
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
b.Property<string>("TitleJson")
|
b.Property<string>("TitleJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("TodoOptionJson")
|
b.Property<string>("TodoOptionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("TooltipJson")
|
b.Property<string>("TooltipJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("TreeOptionJson")
|
b.Property<string>("TreeOptionJson")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
@ -3443,10 +3443,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("UpdateCommand")
|
b.Property<string>("UpdateCommand")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("UpdateFieldsDefaultValueJson")
|
b.Property<string>("UpdateFieldsDefaultValueJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("UpdateServiceAddress")
|
b.Property<string>("UpdateServiceAddress")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -3457,19 +3457,19 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(256)");
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
b.Property<string>("ValueAxisJson")
|
b.Property<string>("ValueAxisJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("WidgetsJson")
|
b.Property<string>("WidgetsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int?>("Width")
|
b.Property<int?>("Width")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("WorkflowJson")
|
b.Property<string>("WorkflowJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ZoomAndPanJson")
|
b.Property<string>("ZoomAndPanJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -3493,7 +3493,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("CreatorId");
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
b.Property<string>("CustomizationData")
|
b.Property<string>("CustomizationData")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("CustomizationType")
|
b.Property<int>("CustomizationType")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
@ -3590,16 +3590,16 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(256)");
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
b.Property<string>("ColumnCustomizationJson")
|
b.Property<string>("ColumnCustomizationJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ColumnFilterJson")
|
b.Property<string>("ColumnFilterJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ColumnHeaderJson")
|
b.Property<string>("ColumnHeaderJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ColumnStylingJson")
|
b.Property<string>("ColumnStylingJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CultureName")
|
b.Property<string>("CultureName")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -3613,10 +3613,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("EditorOptions")
|
b.Property<string>("EditorOptions")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("EditorScript")
|
b.Property<string>("EditorScript")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("EditorType2")
|
b.Property<string>("EditorType2")
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
|
|
@ -3632,10 +3632,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(128)");
|
.HasColumnType("nvarchar(128)");
|
||||||
|
|
||||||
b.Property<string>("GroupSummaryJson")
|
b.Property<string>("GroupSummaryJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("GroupingJson")
|
b.Property<string>("GroupingJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool?>("IsActive")
|
b.Property<bool?>("IsActive")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
|
@ -3643,7 +3643,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasDefaultValue(true);
|
.HasDefaultValue(true);
|
||||||
|
|
||||||
b.Property<string>("JoinTableJson")
|
b.Property<string>("JoinTableJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ListFormCode")
|
b.Property<string>("ListFormCode")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -3656,13 +3656,13 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasDefaultValue(30);
|
.HasDefaultValue(30);
|
||||||
|
|
||||||
b.Property<string>("LookupJson")
|
b.Property<string>("LookupJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PermissionJson")
|
b.Property<string>("PermissionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PivotSettingsJson")
|
b.Property<string>("PivotSettingsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PlaceHolder")
|
b.Property<string>("PlaceHolder")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -3683,14 +3683,14 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("TotalSummaryJson")
|
b.Property<string>("TotalSummaryJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("nvarchar(256)");
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
b.Property<string>("ValidationRuleJson")
|
b.Property<string>("ValidationRuleJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool?>("Visible")
|
b.Property<bool?>("Visible")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
|
@ -3800,7 +3800,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("ErrorsJson")
|
b.Property<string>("ErrorsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("ExecRows")
|
b.Property<int>("ExecRows")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
@ -3862,7 +3862,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(20)");
|
.HasColumnType("nvarchar(20)");
|
||||||
|
|
||||||
b.Property<string>("CompareOutcomesJson")
|
b.Property<string>("CompareOutcomesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<decimal>("CompareValue")
|
b.Property<decimal>("CompareValue")
|
||||||
.HasPrecision(18, 2)
|
.HasPrecision(18, 2)
|
||||||
|
|
@ -4094,7 +4094,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("ParticipantIdsJson")
|
b.Property<string>("ParticipantIdsJson")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ParticipantKey")
|
b.Property<string>("ParticipantKey")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -4121,7 +4121,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("AttachmentsJson")
|
b.Property<string>("AttachmentsJson")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<Guid>("ConversationId")
|
b.Property<Guid>("ConversationId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
@ -4158,7 +4158,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("RecipientIdsJson")
|
b.Property<string>("RecipientIdsJson")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<Guid>("SenderId")
|
b.Property<Guid>("SenderId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
@ -489,12 +489,12 @@ namespace Sozsoft.Platform.Migrations
|
||||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||||
Text = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
Text = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
||||||
Description = table.Column<string>(type: "ntext", nullable: true),
|
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
AllDay = table.Column<bool>(type: "bit", nullable: true, defaultValue: false),
|
AllDay = table.Column<bool>(type: "bit", nullable: true, defaultValue: false),
|
||||||
RecurrenceRule = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
RecurrenceRule = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||||
RecurrenceException = table.Column<string>(type: "ntext", nullable: true),
|
RecurrenceException = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
|
@ -517,7 +517,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||||
Excerpt = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
Excerpt = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
||||||
Content = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: false),
|
Content = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: false),
|
||||||
ImageUrl = table.Column<string>(type: "ntext", nullable: true),
|
ImageUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
Category = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
Category = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
PublishDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
PublishDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
|
@ -630,7 +630,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
ParticipantKey = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
ParticipantKey = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
||||||
ParticipantIdsJson = table.Column<string>(type: "ntext", nullable: false),
|
ParticipantIdsJson = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
IsGroup = table.Column<bool>(type: "bit", nullable: false),
|
IsGroup = table.Column<bool>(type: "bit", nullable: false),
|
||||||
LastSenderId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
LastSenderId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
LastMessagePreview = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
LastMessagePreview = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||||
|
|
@ -926,9 +926,9 @@ namespace Sozsoft.Platform.Migrations
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
StatsJson = table.Column<string>(type: "ntext", nullable: true),
|
StatsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
DescriptionsJson = table.Column<string>(type: "ntext", nullable: true),
|
DescriptionsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
SectionsJson = table.Column<string>(type: "ntext", nullable: true),
|
SectionsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
|
@ -950,8 +950,8 @@ namespace Sozsoft.Platform.Migrations
|
||||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||||
ApiUrl = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
ApiUrl = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
Description = table.Column<string>(type: "ntext", nullable: true),
|
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
Tenants = table.Column<string>(type: "ntext", nullable: true)
|
Tenants = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
|
|
@ -970,7 +970,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
DataSourceCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
DataSourceCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||||
BeforeSp = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
BeforeSp = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
AfterSp = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
AfterSp = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
Options = table.Column<string>(type: "ntext", nullable: true),
|
Options = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
|
@ -1045,9 +1045,9 @@ namespace Sozsoft.Platform.Migrations
|
||||||
Email = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
Email = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
Location = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
Location = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
TaxNumber = table.Column<long>(type: "bigint", nullable: true),
|
TaxNumber = table.Column<long>(type: "bigint", nullable: true),
|
||||||
BankJson = table.Column<string>(type: "ntext", nullable: true),
|
BankJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
WorkHoursJson = table.Column<string>(type: "ntext", nullable: true),
|
WorkHoursJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
MapJson = table.Column<string>(type: "ntext", nullable: true),
|
MapJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
|
@ -1187,8 +1187,8 @@ namespace Sozsoft.Platform.Migrations
|
||||||
Method = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
|
Method = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
|
||||||
DataSourceCode = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
DataSourceCode = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||||
Sql = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
Sql = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
ParametersJson = table.Column<string>(type: "ntext", nullable: true),
|
ParametersJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
PermissionsJson = table.Column<string>(type: "ntext", nullable: true),
|
PermissionsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
|
@ -1237,7 +1237,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
ResourceName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
ResourceName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||||
MaxForms = table.Column<int>(type: "int", nullable: false, defaultValue: 500),
|
MaxForms = table.Column<int>(type: "int", nullable: false, defaultValue: 500),
|
||||||
CacheKey = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
CacheKey = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
||||||
JsonData = table.Column<string>(type: "ntext", nullable: false),
|
JsonData = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
FormCount = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
FormCount = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
||||||
FieldCount = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
FieldCount = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
||||||
JsonLength = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
JsonLength = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
||||||
|
|
@ -1287,7 +1287,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
RequestDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
RequestDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
Title = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
Title = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
||||||
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
Description = table.Column<string>(type: "ntext", nullable: true),
|
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
DueDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
DueDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
Tags = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
Tags = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
Assignees = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
Assignees = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||||
|
|
@ -1316,10 +1316,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||||
DisplayName = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
DisplayName = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||||
Description = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: true),
|
Description = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: true),
|
||||||
Code = table.Column<string>(type: "ntext", nullable: false),
|
Code = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||||
CompilationStatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
CompilationStatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||||
LastCompilationError = table.Column<string>(type: "ntext", nullable: true),
|
LastCompilationError = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
LastSuccessfulCompilation = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LastSuccessfulCompilation = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
Version = table.Column<int>(type: "int", nullable: false, defaultValue: 1),
|
Version = table.Column<int>(type: "int", nullable: false, defaultValue: 1),
|
||||||
CodeHash = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
CodeHash = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||||
|
|
@ -1353,9 +1353,9 @@ namespace Sozsoft.Platform.Migrations
|
||||||
CtaTitleKey = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
CtaTitleKey = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
CtaSubtitleKey = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
CtaSubtitleKey = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
CtaButtonLabelKey = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
CtaButtonLabelKey = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
SlidesJson = table.Column<string>(type: "ntext", nullable: true),
|
SlidesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
FeaturesJson = table.Column<string>(type: "ntext", nullable: true),
|
FeaturesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
SolutionsJson = table.Column<string>(type: "ntext", nullable: true),
|
SolutionsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
|
@ -1432,10 +1432,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
DataSourceCode = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
DataSourceCode = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
SelectCommandType = table.Column<int>(type: "int", nullable: false),
|
SelectCommandType = table.Column<int>(type: "int", nullable: false),
|
||||||
TableName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
TableName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
SelectCommand = table.Column<string>(type: "ntext", nullable: true),
|
SelectCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
KeyFieldName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
KeyFieldName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||||
KeyFieldDbSourceType = table.Column<int>(type: "int", nullable: false),
|
KeyFieldDbSourceType = table.Column<int>(type: "int", nullable: false),
|
||||||
SelectFieldsDefaultValueJson = table.Column<string>(type: "ntext", nullable: true),
|
SelectFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||||
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
|
|
@ -1445,43 +1445,43 @@ namespace Sozsoft.Platform.Migrations
|
||||||
Height = table.Column<int>(type: "int", nullable: true),
|
Height = table.Column<int>(type: "int", nullable: true),
|
||||||
FullHeight = table.Column<bool>(type: "bit", nullable: false),
|
FullHeight = table.Column<bool>(type: "bit", nullable: false),
|
||||||
DefaultFilter = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
DefaultFilter = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ColumnOptionJson = table.Column<string>(type: "ntext", nullable: true),
|
ColumnOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
PivotOptionJson = table.Column<string>(type: "ntext", nullable: true),
|
PivotOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
TreeOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
TreeOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
GanttOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
GanttOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
SchedulerOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
SchedulerOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
TodoOptionJson = table.Column<string>(type: "ntext", nullable: true),
|
TodoOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
FilterRowJson = table.Column<string>(type: "ntext", nullable: true),
|
FilterRowJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
RowJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
RowJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
HeaderFilterJson = table.Column<string>(type: "ntext", nullable: true),
|
HeaderFilterJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
FilterPanelJson = table.Column<string>(type: "ntext", nullable: true),
|
FilterPanelJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
SearchPanelJson = table.Column<string>(type: "ntext", nullable: true),
|
SearchPanelJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
GroupPanelJson = table.Column<string>(type: "ntext", nullable: true),
|
GroupPanelJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
SelectionJson = table.Column<string>(type: "ntext", nullable: true),
|
SelectionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
PagerOptionJson = table.Column<string>(type: "ntext", nullable: true),
|
PagerOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
EditingOptionJson = table.Column<string>(type: "ntext", nullable: true),
|
EditingOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
EditingFormJson = table.Column<string>(type: "ntext", nullable: true),
|
EditingFormJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
PermissionJson = table.Column<string>(type: "ntext", nullable: true),
|
PermissionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
InsertFieldsDefaultValueJson = table.Column<string>(type: "ntext", nullable: true),
|
InsertFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
UpdateFieldsDefaultValueJson = table.Column<string>(type: "ntext", nullable: true),
|
UpdateFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
DeleteFieldsDefaultValueJson = table.Column<string>(type: "ntext", nullable: true),
|
DeleteFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CommandColumnJson = table.Column<string>(type: "ntext", nullable: true),
|
CommandColumnJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
StateStoringJson = table.Column<string>(type: "ntext", nullable: true),
|
StateStoringJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
DeleteCommand = table.Column<string>(type: "ntext", nullable: true),
|
DeleteCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
DeleteBeforeCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
DeleteBeforeCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
DeleteAfterCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
DeleteAfterCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
UpdateCommand = table.Column<string>(type: "ntext", nullable: true),
|
UpdateCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
UpdateBeforeCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
UpdateBeforeCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
UpdateAfterCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
UpdateAfterCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
InsertCommand = table.Column<string>(type: "ntext", nullable: true),
|
InsertCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
InsertBeforeCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
InsertBeforeCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
InsertAfterCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
InsertAfterCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
UpdateServiceAddress = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
UpdateServiceAddress = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
InsertServiceAddress = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
InsertServiceAddress = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
DeleteServiceAddress = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
DeleteServiceAddress = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
CustomJsSourcesJson = table.Column<string>(type: "ntext", nullable: true),
|
CustomJsSourcesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CustomStyleSourcesJson = table.Column<string>(type: "ntext", nullable: true),
|
CustomStyleSourcesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
FormFieldsDefaultValueJson = table.Column<string>(type: "ntext", nullable: true),
|
FormFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
IsTenant = table.Column<bool>(type: "bit", nullable: false),
|
IsTenant = table.Column<bool>(type: "bit", nullable: false),
|
||||||
IsBranch = table.Column<bool>(type: "bit", nullable: false),
|
IsBranch = table.Column<bool>(type: "bit", nullable: false),
|
||||||
IsOrganizationUnit = table.Column<bool>(type: "bit", nullable: false),
|
IsOrganizationUnit = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
|
@ -1489,35 +1489,35 @@ namespace Sozsoft.Platform.Migrations
|
||||||
IsSubForm = table.Column<bool>(type: "bit", nullable: false),
|
IsSubForm = table.Column<bool>(type: "bit", nullable: false),
|
||||||
SubFormsListFormType = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
SubFormsListFormType = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ShowNote = table.Column<bool>(type: "bit", nullable: false),
|
ShowNote = table.Column<bool>(type: "bit", nullable: false),
|
||||||
SubFormsJson = table.Column<string>(type: "ntext", nullable: true),
|
SubFormsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
WidgetsJson = table.Column<string>(type: "ntext", nullable: true),
|
WidgetsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
WorkflowJson = table.Column<string>(type: "ntext", nullable: true),
|
WorkflowJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ExtraFilterJson = table.Column<string>(type: "ntext", nullable: true),
|
ExtraFilterJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
LayoutJson = table.Column<string>(type: "ntext", nullable: true),
|
LayoutJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
UserId = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
UserId = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
RoleId = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
RoleId = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
CommonJson = table.Column<string>(type: "ntext", nullable: true),
|
CommonJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
DataSourceJson = table.Column<string>(type: "ntext", nullable: true),
|
DataSourceJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
AdaptiveLayoutJson = table.Column<string>(type: "ntext", nullable: true),
|
AdaptiveLayoutJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
AnimationJson = table.Column<string>(type: "ntext", nullable: true),
|
AnimationJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
AnnotationsJson = table.Column<string>(type: "ntext", nullable: true),
|
AnnotationsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ArgumentAxisJson = table.Column<string>(type: "ntext", nullable: true),
|
ArgumentAxisJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CommonAnnotationsSettingsJson = table.Column<string>(type: "ntext", nullable: true),
|
CommonAnnotationsSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CommonAxisSettingsJson = table.Column<string>(type: "ntext", nullable: true),
|
CommonAxisSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CommonPaneSettingsJson = table.Column<string>(type: "ntext", nullable: true),
|
CommonPaneSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CommonSeriesSettingsJson = table.Column<string>(type: "ntext", nullable: true),
|
CommonSeriesSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CrosshairJson = table.Column<string>(type: "ntext", nullable: true),
|
CrosshairJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ExportJson = table.Column<string>(type: "ntext", nullable: true),
|
ExportJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
LegendJson = table.Column<string>(type: "ntext", nullable: true),
|
LegendJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
MarginJson = table.Column<string>(type: "ntext", nullable: true),
|
MarginJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
PanesJson = table.Column<string>(type: "ntext", nullable: true),
|
PanesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ScrollBarJson = table.Column<string>(type: "ntext", nullable: true),
|
ScrollBarJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
SeriesJson = table.Column<string>(type: "ntext", nullable: true),
|
SeriesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
SizeJson = table.Column<string>(type: "ntext", nullable: true),
|
SizeJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
TitleJson = table.Column<string>(type: "ntext", nullable: true),
|
TitleJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
TooltipJson = table.Column<string>(type: "ntext", nullable: true),
|
TooltipJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ValueAxisJson = table.Column<string>(type: "ntext", nullable: true),
|
ValueAxisJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ZoomAndPanJson = table.Column<string>(type: "ntext", nullable: true)
|
ZoomAndPanJson = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
|
|
@ -2250,7 +2250,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
ParticipantsCount = table.Column<int>(type: "int", nullable: false),
|
ParticipantsCount = table.Column<int>(type: "int", nullable: false),
|
||||||
Likes = table.Column<int>(type: "int", nullable: false),
|
Likes = table.Column<int>(type: "int", nullable: false),
|
||||||
isPublished = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
isPublished = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||||
Photos = table.Column<string>(type: "ntext", nullable: true),
|
Photos = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
|
@ -2286,9 +2286,9 @@ namespace Sozsoft.Platform.Migrations
|
||||||
SenderId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
SenderId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
SenderUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
SenderUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||||
SenderName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
SenderName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||||
RecipientIdsJson = table.Column<string>(type: "ntext", nullable: false),
|
RecipientIdsJson = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
Text = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
|
Text = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
|
||||||
AttachmentsJson = table.Column<string>(type: "ntext", nullable: false),
|
AttachmentsJson = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
SentAt = table.Column<DateTime>(type: "datetime2", nullable: false),
|
SentAt = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
|
@ -2789,7 +2789,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
UserId = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
UserId = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
RoleId = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
RoleId = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
FilterName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
FilterName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
CustomizationData = table.Column<string>(type: "ntext", nullable: true),
|
CustomizationData = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CustomizationType = table.Column<int>(type: "int", nullable: false),
|
CustomizationType = table.Column<int>(type: "int", nullable: false),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
|
@ -2833,28 +2833,28 @@ namespace Sozsoft.Platform.Migrations
|
||||||
AllowEditing = table.Column<bool>(type: "bit", nullable: true, defaultValue: true),
|
AllowEditing = table.Column<bool>(type: "bit", nullable: true, defaultValue: true),
|
||||||
AllowAdding = table.Column<bool>(type: "bit", nullable: true, defaultValue: true),
|
AllowAdding = table.Column<bool>(type: "bit", nullable: true, defaultValue: true),
|
||||||
BandName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
BandName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
ColumnFilterJson = table.Column<string>(type: "ntext", nullable: true),
|
ColumnFilterJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ColumnHeaderJson = table.Column<string>(type: "ntext", nullable: true),
|
ColumnHeaderJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
GroupingJson = table.Column<string>(type: "ntext", nullable: true),
|
GroupingJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ColumnCustomizationJson = table.Column<string>(type: "ntext", nullable: true),
|
ColumnCustomizationJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
TotalSummaryJson = table.Column<string>(type: "ntext", nullable: true),
|
TotalSummaryJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
GroupSummaryJson = table.Column<string>(type: "ntext", nullable: true),
|
GroupSummaryJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ColumnCssClass = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
ColumnCssClass = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
ColumnCssValue = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
ColumnCssValue = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||||
JoinTableJson = table.Column<string>(type: "ntext", nullable: true),
|
JoinTableJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
LookupJson = table.Column<string>(type: "ntext", nullable: true),
|
LookupJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ValidationRuleJson = table.Column<string>(type: "ntext", nullable: true),
|
ValidationRuleJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ColumnStylingJson = table.Column<string>(type: "ntext", nullable: true),
|
ColumnStylingJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
PermissionJson = table.Column<string>(type: "ntext", nullable: true),
|
PermissionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
PivotSettingsJson = table.Column<string>(type: "ntext", nullable: true),
|
PivotSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
Alignment = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, defaultValue: "left"),
|
Alignment = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, defaultValue: "left"),
|
||||||
Format = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
Format = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
|
||||||
EditOrderNo = table.Column<int>(type: "int", nullable: true),
|
EditOrderNo = table.Column<int>(type: "int", nullable: true),
|
||||||
EditGroupOrderNo = table.Column<int>(type: "int", nullable: true),
|
EditGroupOrderNo = table.Column<int>(type: "int", nullable: true),
|
||||||
EditorType2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
EditorType2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||||
ColSpan = table.Column<int>(type: "int", nullable: true),
|
ColSpan = table.Column<int>(type: "int", nullable: true),
|
||||||
EditorScript = table.Column<string>(type: "ntext", nullable: true),
|
EditorScript = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
EditorOptions = table.Column<string>(type: "ntext", nullable: true)
|
EditorOptions = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
|
|
@ -2914,7 +2914,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
NextOnReject = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
NextOnReject = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||||
PositionX = table.Column<int>(type: "int", nullable: false),
|
PositionX = table.Column<int>(type: "int", nullable: false),
|
||||||
PositionY = table.Column<int>(type: "int", nullable: false),
|
PositionY = table.Column<int>(type: "int", nullable: false),
|
||||||
CompareOutcomesJson = table.Column<string>(type: "ntext", nullable: true)
|
CompareOutcomesJson = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
|
|
@ -3392,7 +3392,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
ValidRows = table.Column<int>(type: "int", nullable: false),
|
ValidRows = table.Column<int>(type: "int", nullable: false),
|
||||||
ErrorRows = table.Column<int>(type: "int", nullable: false),
|
ErrorRows = table.Column<int>(type: "int", nullable: false),
|
||||||
Progress = table.Column<double>(type: "float", nullable: false),
|
Progress = table.Column<double>(type: "float", nullable: false),
|
||||||
ErrorsJson = table.Column<string>(type: "ntext", nullable: true),
|
ErrorsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
|
@ -649,7 +649,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("DeletionTime");
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
b.Property<string>("DescriptionsJson")
|
b.Property<string>("DescriptionsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("IsDeleted")
|
b.Property<bool>("IsDeleted")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
|
@ -666,10 +666,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("LastModifierId");
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
b.Property<string>("SectionsJson")
|
b.Property<string>("SectionsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("StatsJson")
|
b.Property<string>("StatsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -703,7 +703,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("DeletionTime");
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<DateTime>("EndDate")
|
b.Property<DateTime>("EndDate")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
@ -723,7 +723,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("LastModifierId");
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
b.Property<string>("RecurrenceException")
|
b.Property<string>("RecurrenceException")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("RecurrenceRule")
|
b.Property<string>("RecurrenceRule")
|
||||||
.HasMaxLength(512)
|
.HasMaxLength(512)
|
||||||
|
|
@ -761,7 +761,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(256)");
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("IsActive")
|
b.Property<bool>("IsActive")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
@ -772,7 +772,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(128)");
|
.HasColumnType("nvarchar(128)");
|
||||||
|
|
||||||
b.Property<string>("Tenants")
|
b.Property<string>("Tenants")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -826,7 +826,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<string>("ImageUrl")
|
b.Property<string>("ImageUrl")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("IsDeleted")
|
b.Property<bool>("IsDeleted")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
|
@ -1056,7 +1056,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(128)");
|
.HasColumnType("nvarchar(128)");
|
||||||
|
|
||||||
b.Property<string>("Options")
|
b.Property<string>("Options")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("WorkerType")
|
b.Property<int>("WorkerType")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
@ -1450,7 +1450,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(512)");
|
.HasColumnType("nvarchar(512)");
|
||||||
|
|
||||||
b.Property<string>("BankJson")
|
b.Property<string>("BankJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<DateTime>("CreationTime")
|
b.Property<DateTime>("CreationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
|
|
@ -1491,7 +1491,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(256)");
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
b.Property<string>("MapJson")
|
b.Property<string>("MapJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PhoneNumber")
|
b.Property<string>("PhoneNumber")
|
||||||
.HasMaxLength(20)
|
.HasMaxLength(20)
|
||||||
|
|
@ -1501,7 +1501,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("WorkHoursJson")
|
b.Property<string>("WorkHoursJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -1974,10 +1974,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(128)");
|
.HasColumnType("nvarchar(128)");
|
||||||
|
|
||||||
b.Property<string>("ParametersJson")
|
b.Property<string>("ParametersJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PermissionsJson")
|
b.Property<string>("PermissionsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("Sql")
|
b.Property<string>("Sql")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -2099,7 +2099,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("JsonData")
|
b.Property<string>("JsonData")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("JsonLength")
|
b.Property<int>("JsonLength")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
|
@ -2319,7 +2319,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("DeletionTime");
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<DateTime?>("DueDate")
|
b.Property<DateTime?>("DueDate")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
@ -2454,7 +2454,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("Code")
|
b.Property<string>("Code")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CodeHash")
|
b.Property<string>("CodeHash")
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
|
|
@ -2505,7 +2505,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("IsDeleted");
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
b.Property<string>("LastCompilationError")
|
b.Property<string>("LastCompilationError")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<DateTime?>("LastModificationTime")
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
|
|
@ -2602,7 +2602,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("Photos")
|
b.Property<string>("Photos")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("Place")
|
b.Property<string>("Place")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -2933,7 +2933,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("DeletionTime");
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
b.Property<string>("FeaturesJson")
|
b.Property<string>("FeaturesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("FeaturesSubtitleKey")
|
b.Property<string>("FeaturesSubtitleKey")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -2970,10 +2970,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("LastModifierId");
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
b.Property<string>("SlidesJson")
|
b.Property<string>("SlidesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SolutionsJson")
|
b.Property<string>("SolutionsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SolutionsSubtitleKey")
|
b.Property<string>("SolutionsSubtitleKey")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -3176,40 +3176,40 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("AdaptiveLayoutJson")
|
b.Property<string>("AdaptiveLayoutJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("AnimationJson")
|
b.Property<string>("AnimationJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("AnnotationsJson")
|
b.Property<string>("AnnotationsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ArgumentAxisJson")
|
b.Property<string>("ArgumentAxisJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ColumnOptionJson")
|
b.Property<string>("ColumnOptionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CommandColumnJson")
|
b.Property<string>("CommandColumnJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CommonAnnotationsSettingsJson")
|
b.Property<string>("CommonAnnotationsSettingsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CommonAxisSettingsJson")
|
b.Property<string>("CommonAxisSettingsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CommonJson")
|
b.Property<string>("CommonJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CommonPaneSettingsJson")
|
b.Property<string>("CommonPaneSettingsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CommonSeriesSettingsJson")
|
b.Property<string>("CommonSeriesSettingsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CrosshairJson")
|
b.Property<string>("CrosshairJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CultureName")
|
b.Property<string>("CultureName")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -3217,17 +3217,17 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(10)");
|
.HasColumnType("nvarchar(10)");
|
||||||
|
|
||||||
b.Property<string>("CustomJsSourcesJson")
|
b.Property<string>("CustomJsSourcesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CustomStyleSourcesJson")
|
b.Property<string>("CustomStyleSourcesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("DataSourceCode")
|
b.Property<string>("DataSourceCode")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(128)
|
||||||
.HasColumnType("nvarchar(128)");
|
.HasColumnType("nvarchar(128)");
|
||||||
|
|
||||||
b.Property<string>("DataSourceJson")
|
b.Property<string>("DataSourceJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("DefaultFilter")
|
b.Property<string>("DefaultFilter")
|
||||||
.IsUnicode(true)
|
.IsUnicode(true)
|
||||||
|
|
@ -3240,10 +3240,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("DeleteCommand")
|
b.Property<string>("DeleteCommand")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("DeleteFieldsDefaultValueJson")
|
b.Property<string>("DeleteFieldsDefaultValueJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("DeleteServiceAddress")
|
b.Property<string>("DeleteServiceAddress")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -3254,25 +3254,25 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(512)");
|
.HasColumnType("nvarchar(512)");
|
||||||
|
|
||||||
b.Property<string>("EditingFormJson")
|
b.Property<string>("EditingFormJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("EditingOptionJson")
|
b.Property<string>("EditingOptionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ExportJson")
|
b.Property<string>("ExportJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ExtraFilterJson")
|
b.Property<string>("ExtraFilterJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("FilterPanelJson")
|
b.Property<string>("FilterPanelJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("FilterRowJson")
|
b.Property<string>("FilterRowJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("FormFieldsDefaultValueJson")
|
b.Property<string>("FormFieldsDefaultValueJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("FullHeight")
|
b.Property<bool>("FullHeight")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
@ -3281,10 +3281,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("GroupPanelJson")
|
b.Property<string>("GroupPanelJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("HeaderFilterJson")
|
b.Property<string>("HeaderFilterJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int?>("Height")
|
b.Property<int?>("Height")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
@ -3296,10 +3296,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("InsertCommand")
|
b.Property<string>("InsertCommand")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("InsertFieldsDefaultValueJson")
|
b.Property<string>("InsertFieldsDefaultValueJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("InsertServiceAddress")
|
b.Property<string>("InsertServiceAddress")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -3325,10 +3325,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(64)");
|
.HasColumnType("nvarchar(64)");
|
||||||
|
|
||||||
b.Property<string>("LayoutJson")
|
b.Property<string>("LayoutJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("LegendJson")
|
b.Property<string>("LegendJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ListFormCode")
|
b.Property<string>("ListFormCode")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -3340,7 +3340,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(20)");
|
.HasColumnType("nvarchar(20)");
|
||||||
|
|
||||||
b.Property<string>("MarginJson")
|
b.Property<string>("MarginJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(128)
|
||||||
|
|
@ -3352,16 +3352,16 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasDefaultValue(50);
|
.HasDefaultValue(50);
|
||||||
|
|
||||||
b.Property<string>("PagerOptionJson")
|
b.Property<string>("PagerOptionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PanesJson")
|
b.Property<string>("PanesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PermissionJson")
|
b.Property<string>("PermissionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PivotOptionJson")
|
b.Property<string>("PivotOptionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -3374,41 +3374,41 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ScrollBarJson")
|
b.Property<string>("ScrollBarJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SearchPanelJson")
|
b.Property<string>("SearchPanelJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SelectCommand")
|
b.Property<string>("SelectCommand")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("SelectCommandType")
|
b.Property<int>("SelectCommandType")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("SelectFieldsDefaultValueJson")
|
b.Property<string>("SelectFieldsDefaultValueJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SelectionJson")
|
b.Property<string>("SelectionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SeriesJson")
|
b.Property<string>("SeriesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("ShowNote")
|
b.Property<bool>("ShowNote")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<string>("SizeJson")
|
b.Property<string>("SizeJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SortMode")
|
b.Property<string>("SortMode")
|
||||||
.HasMaxLength(20)
|
.HasMaxLength(20)
|
||||||
.HasColumnType("nvarchar(20)");
|
.HasColumnType("nvarchar(20)");
|
||||||
|
|
||||||
b.Property<string>("StateStoringJson")
|
b.Property<string>("StateStoringJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SubFormsJson")
|
b.Property<string>("SubFormsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("SubFormsListFormType")
|
b.Property<string>("SubFormsListFormType")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
@ -3422,13 +3422,13 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(256)");
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
b.Property<string>("TitleJson")
|
b.Property<string>("TitleJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("TodoOptionJson")
|
b.Property<string>("TodoOptionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("TooltipJson")
|
b.Property<string>("TooltipJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("TreeOptionJson")
|
b.Property<string>("TreeOptionJson")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
@ -3440,10 +3440,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("UpdateCommand")
|
b.Property<string>("UpdateCommand")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("UpdateFieldsDefaultValueJson")
|
b.Property<string>("UpdateFieldsDefaultValueJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("UpdateServiceAddress")
|
b.Property<string>("UpdateServiceAddress")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -3454,19 +3454,19 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(256)");
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
b.Property<string>("ValueAxisJson")
|
b.Property<string>("ValueAxisJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("WidgetsJson")
|
b.Property<string>("WidgetsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int?>("Width")
|
b.Property<int?>("Width")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("WorkflowJson")
|
b.Property<string>("WorkflowJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ZoomAndPanJson")
|
b.Property<string>("ZoomAndPanJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|
@ -3490,7 +3490,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnName("CreatorId");
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
b.Property<string>("CustomizationData")
|
b.Property<string>("CustomizationData")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("CustomizationType")
|
b.Property<int>("CustomizationType")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
@ -3587,16 +3587,16 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(256)");
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
b.Property<string>("ColumnCustomizationJson")
|
b.Property<string>("ColumnCustomizationJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ColumnFilterJson")
|
b.Property<string>("ColumnFilterJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ColumnHeaderJson")
|
b.Property<string>("ColumnHeaderJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ColumnStylingJson")
|
b.Property<string>("ColumnStylingJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CultureName")
|
b.Property<string>("CultureName")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -3610,10 +3610,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("EditorOptions")
|
b.Property<string>("EditorOptions")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("EditorScript")
|
b.Property<string>("EditorScript")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("EditorType2")
|
b.Property<string>("EditorType2")
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
|
|
@ -3629,10 +3629,10 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(128)");
|
.HasColumnType("nvarchar(128)");
|
||||||
|
|
||||||
b.Property<string>("GroupSummaryJson")
|
b.Property<string>("GroupSummaryJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("GroupingJson")
|
b.Property<string>("GroupingJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool?>("IsActive")
|
b.Property<bool?>("IsActive")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
|
@ -3640,7 +3640,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasDefaultValue(true);
|
.HasDefaultValue(true);
|
||||||
|
|
||||||
b.Property<string>("JoinTableJson")
|
b.Property<string>("JoinTableJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ListFormCode")
|
b.Property<string>("ListFormCode")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -3653,13 +3653,13 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasDefaultValue(30);
|
.HasDefaultValue(30);
|
||||||
|
|
||||||
b.Property<string>("LookupJson")
|
b.Property<string>("LookupJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PermissionJson")
|
b.Property<string>("PermissionJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PivotSettingsJson")
|
b.Property<string>("PivotSettingsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("PlaceHolder")
|
b.Property<string>("PlaceHolder")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
|
|
@ -3680,14 +3680,14 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("TotalSummaryJson")
|
b.Property<string>("TotalSummaryJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasMaxLength(256)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("nvarchar(256)");
|
.HasColumnType("nvarchar(256)");
|
||||||
|
|
||||||
b.Property<string>("ValidationRuleJson")
|
b.Property<string>("ValidationRuleJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool?>("Visible")
|
b.Property<bool?>("Visible")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
|
@ -3797,7 +3797,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("ErrorsJson")
|
b.Property<string>("ErrorsJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("ExecRows")
|
b.Property<int>("ExecRows")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
@ -3859,7 +3859,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(20)");
|
.HasColumnType("nvarchar(20)");
|
||||||
|
|
||||||
b.Property<string>("CompareOutcomesJson")
|
b.Property<string>("CompareOutcomesJson")
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<decimal>("CompareValue")
|
b.Property<decimal>("CompareValue")
|
||||||
.HasPrecision(18, 2)
|
.HasPrecision(18, 2)
|
||||||
|
|
@ -4091,7 +4091,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("ParticipantIdsJson")
|
b.Property<string>("ParticipantIdsJson")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ParticipantKey")
|
b.Property<string>("ParticipantKey")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
|
@ -4118,7 +4118,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("AttachmentsJson")
|
b.Property<string>("AttachmentsJson")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<Guid>("ConversationId")
|
b.Property<Guid>("ConversationId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
@ -4155,7 +4155,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
|
|
||||||
b.Property<string>("RecipientIdsJson")
|
b.Property<string>("RecipientIdsJson")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("ntext");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<Guid>("SenderId")
|
b.Property<Guid>("SenderId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import * as UiKit from '@/components/ui'
|
||||||
import PlatformViewHost, {
|
import PlatformViewHost, {
|
||||||
type PlatformViewName,
|
type PlatformViewName,
|
||||||
} from '@/components/componentEditor/PlatformViewHost'
|
} from '@/components/componentEditor/PlatformViewHost'
|
||||||
|
import apiService from '@/services/api.service'
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import { formatLocaleValue } from '@/utils/localeFormat'
|
import { formatLocaleValue } from '@/utils/localeFormat'
|
||||||
import { FaArrowDown, FaArrowUp, FaClone, FaGripVertical, FaTrash } from 'react-icons/fa'
|
import { FaArrowDown, FaArrowUp, FaClone, FaGripVertical, FaTrash } from 'react-icons/fa'
|
||||||
|
|
@ -147,11 +148,136 @@ const resolveUiComponent = (name: string): React.ElementType | null => {
|
||||||
return component ? (component as React.ElementType) : null
|
return component ? (component as React.ElementType) : null
|
||||||
}
|
}
|
||||||
|
|
||||||
const executeEvent = (script: string, event: unknown, node: DesignerNode) => {
|
/** Prop that turns a component off; react-select spells it differently. */
|
||||||
|
const getDisabledProperty = (type: string) => (type === 'Select' ? 'isDisabled' : 'disabled')
|
||||||
|
|
||||||
|
export interface DesignerRefOverride {
|
||||||
|
props?: Record<string, unknown>
|
||||||
|
hidden?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Design time counterpart of the `refs` object the code generator emits. It lets
|
||||||
|
* an event script drive the other components on the canvas — value, visibility,
|
||||||
|
* enabled state, any prop — so the behaviour can be tried out before the
|
||||||
|
* component is ever saved and compiled.
|
||||||
|
*/
|
||||||
|
interface DesignerRefStore {
|
||||||
|
state: Record<string, DesignerRefOverride>
|
||||||
|
nodes: Record<string, DesignerNode>
|
||||||
|
patch: (ref: string, override: DesignerRefOverride) => void
|
||||||
|
}
|
||||||
|
|
||||||
|
const DesignerRefContext = React.createContext<DesignerRefStore | null>(null)
|
||||||
|
|
||||||
|
const buildDesignerRefs = (store: DesignerRefStore | null) => {
|
||||||
|
const refs: Record<string, unknown> = {}
|
||||||
|
if (!store) return refs
|
||||||
|
Object.entries(store.nodes).forEach(([ref, node]) => {
|
||||||
|
const overrideProps = () => store.state[ref]?.props || {}
|
||||||
|
const disabledProperty = getDisabledProperty(node.type)
|
||||||
|
const valueProperty =
|
||||||
|
'checked' in node.props ? 'checked' : 'value' in node.props ? 'value' : 'children'
|
||||||
|
const designTimeOnly = (action: string) => () =>
|
||||||
|
console.info(`refs.${ref}.${action}() yalnızca çalışma zamanında endpoint çağırır.`)
|
||||||
|
refs[ref] = {
|
||||||
|
name: ref,
|
||||||
|
type: node.type,
|
||||||
|
getValue: () => overrideProps()[valueProperty] ?? node.props[valueProperty],
|
||||||
|
setValue: (value: unknown) => store.patch(ref, { props: { [valueProperty]: value } }),
|
||||||
|
getProps: () => overrideProps(),
|
||||||
|
setProps: (patch: Record<string, unknown>) => store.patch(ref, { props: patch || {} }),
|
||||||
|
setProp: (property: string, value: unknown) =>
|
||||||
|
store.patch(ref, { props: { [property]: value } }),
|
||||||
|
isVisible: () => !store.state[ref]?.hidden,
|
||||||
|
setVisible: (visible: unknown) => store.patch(ref, { hidden: visible === false }),
|
||||||
|
show: () => store.patch(ref, { hidden: false }),
|
||||||
|
hide: () => store.patch(ref, { hidden: true }),
|
||||||
|
isEnabled: () =>
|
||||||
|
(overrideProps()[disabledProperty] ?? Boolean(node.props[disabledProperty])) !== true,
|
||||||
|
setEnabled: (enabled: unknown) =>
|
||||||
|
store.patch(ref, { props: { [disabledProperty]: enabled === false } }),
|
||||||
|
setReadOnly: (readOnly: unknown) =>
|
||||||
|
store.patch(ref, { props: { readOnly: readOnly !== false } }),
|
||||||
|
setText: (text: unknown) => store.patch(ref, { props: { children: text } }),
|
||||||
|
reset: () => store.patch(ref, { props: null as unknown as Record<string, unknown> }),
|
||||||
|
...(isSqlDataSourceNode(node.type)
|
||||||
|
? {
|
||||||
|
getRecord: () => ({}),
|
||||||
|
setField: designTimeOnly('setField'),
|
||||||
|
reload: designTimeOnly('reload'),
|
||||||
|
newRecord: designTimeOnly('newRecord'),
|
||||||
|
save: designTimeOnly('save'),
|
||||||
|
remove: designTimeOnly('remove'),
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return refs
|
||||||
|
}
|
||||||
|
|
||||||
|
const notifyFromScript = (message: unknown, type: unknown = 'info') =>
|
||||||
|
UiKit.toast.push(
|
||||||
|
<UiKit.Notification
|
||||||
|
duration={2500}
|
||||||
|
type={(type as 'success' | 'warning' | 'danger' | 'info') || 'info'}
|
||||||
|
>
|
||||||
|
{typeof message === 'string' ? message : JSON.stringify(message)}
|
||||||
|
</UiKit.Notification>,
|
||||||
|
{ placement: 'bottom-end' },
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Design time `api`. Reads go through, exactly like the endpoint test button in
|
||||||
|
* the data panel does, so a script can be tried out on the canvas. Writes are
|
||||||
|
* refused: the designer must never insert, update or delete real records while
|
||||||
|
* a component is only being laid out.
|
||||||
|
*/
|
||||||
|
const blockedDesignTimeCall = (method: string) => (url: string) => {
|
||||||
|
console.warn(`Tasarım modunda ${method} çağrısı yapılmaz: ${url}`)
|
||||||
|
return Promise.resolve(null)
|
||||||
|
}
|
||||||
|
|
||||||
|
const designTimeApi = {
|
||||||
|
get: (url: string, params?: Record<string, unknown>) =>
|
||||||
|
apiService.fetchData({ url, method: 'GET', params }).then((response) => response.data),
|
||||||
|
post: blockedDesignTimeCall('POST'),
|
||||||
|
put: blockedDesignTimeCall('PUT'),
|
||||||
|
patch: blockedDesignTimeCall('PATCH'),
|
||||||
|
delete: blockedDesignTimeCall('DELETE'),
|
||||||
|
remove: blockedDesignTimeCall('DELETE'),
|
||||||
|
request: (config: { url: string; method?: string }) =>
|
||||||
|
String(config?.method || 'GET').toUpperCase() === 'GET'
|
||||||
|
? apiService.fetchData(config).then((response) => response.data)
|
||||||
|
: blockedDesignTimeCall(String(config?.method))(config?.url),
|
||||||
|
errorMessage: (error: {
|
||||||
|
response?: { data?: { error?: { message?: string }; message?: string } }
|
||||||
|
message?: string
|
||||||
|
}) =>
|
||||||
|
error?.response?.data?.error?.message ||
|
||||||
|
error?.response?.data?.message ||
|
||||||
|
error?.message ||
|
||||||
|
'İşlem tamamlanamadı.',
|
||||||
|
}
|
||||||
|
|
||||||
|
const AsyncFunction = Object.getPrototypeOf(async () => {}).constructor as FunctionConstructor
|
||||||
|
|
||||||
|
const executeEvent = (
|
||||||
|
script: string,
|
||||||
|
event: unknown,
|
||||||
|
node: DesignerNode,
|
||||||
|
refs: Record<string, unknown>,
|
||||||
|
) => {
|
||||||
if (!script.trim()) return
|
if (!script.trim()) return
|
||||||
try {
|
try {
|
||||||
const run = new Function('event', 'component', 'props', script)
|
// `await` is only legal inside an async function, and scripts that call the
|
||||||
run(event, node, node.props)
|
// API are expected to use it.
|
||||||
|
const construct = /\bawait\b/.test(script) ? AsyncFunction : Function
|
||||||
|
const run = construct('event', 'component', 'props', 'refs', 'api', 'notify', script)
|
||||||
|
const result = run(event, node, node.props, refs, designTimeApi, notifyFromScript)
|
||||||
|
if (result instanceof Promise) {
|
||||||
|
result.catch((error) => console.error(`Designer event error (${node.type}):`, error))
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Designer event error (${node.type}):`, error)
|
console.error(`Designer event error (${node.type}):`, error)
|
||||||
}
|
}
|
||||||
|
|
@ -246,6 +372,8 @@ const getPreviewProps = (
|
||||||
onNodePropChange?: (id: string, propertyName: string, value: unknown) => void,
|
onNodePropChange?: (id: string, propertyName: string, value: unknown) => void,
|
||||||
translate: (key: string) => string = (key) => key,
|
translate: (key: string) => string = (key) => key,
|
||||||
formScope?: DesignerFormScope,
|
formScope?: DesignerFormScope,
|
||||||
|
refs: Record<string, unknown> = {},
|
||||||
|
refOverrides: Record<string, unknown> = {},
|
||||||
) => {
|
) => {
|
||||||
const props: Record<string, unknown> = {}
|
const props: Record<string, unknown> = {}
|
||||||
Object.entries(node.props).forEach(([key, value]) => {
|
Object.entries(node.props).forEach(([key, value]) => {
|
||||||
|
|
@ -267,7 +395,7 @@ const getPreviewProps = (
|
||||||
: undefined,
|
: undefined,
|
||||||
}
|
}
|
||||||
: args[0]
|
: args[0]
|
||||||
executeEvent(script, event, node)
|
executeEvent(script, event, node, refs)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Object.entries(node.bindings || {}).forEach(([propertyName, binding]) => {
|
Object.entries(node.bindings || {}).forEach(([propertyName, binding]) => {
|
||||||
|
|
@ -416,6 +544,9 @@ const getPreviewProps = (
|
||||||
} else if ('value' in props) {
|
} else if ('value' in props) {
|
||||||
chainHandler('onChange', (value) => updateProp('value', eventValue(value)))
|
chainHandler('onChange', (value) => updateProp('value', eventValue(value)))
|
||||||
}
|
}
|
||||||
|
// Applied last: a script that disabled or refilled this component has to win
|
||||||
|
// over both the toolbox defaults and the values set in the property panel.
|
||||||
|
Object.assign(props, refOverrides)
|
||||||
props.key = node.id
|
props.key = node.id
|
||||||
return props
|
return props
|
||||||
}
|
}
|
||||||
|
|
@ -760,6 +891,30 @@ const SqlDataSourceView = ({
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A node's own content, resolved in the order the runtime uses: a `setText`
|
||||||
|
* override beats a data binding, which beats the static `children` prop. Child
|
||||||
|
* nodes are not considered here — the caller decides whether they take over.
|
||||||
|
*/
|
||||||
|
const resolveNodeContent = (
|
||||||
|
node: DesignerNode,
|
||||||
|
dataValues: Record<string, unknown>,
|
||||||
|
currentItem: unknown,
|
||||||
|
translate: (key: string) => string,
|
||||||
|
refOverrides: Record<string, unknown> = {},
|
||||||
|
): React.ReactNode => {
|
||||||
|
if (refOverrides.children !== undefined) return refOverrides.children as React.ReactNode
|
||||||
|
const childrenBinding = node.bindings?.children
|
||||||
|
const boundChildren = childrenBinding?.sourceId
|
||||||
|
? getBindingValue(childrenBinding, dataValues, currentItem)
|
||||||
|
: undefined
|
||||||
|
if (boundChildren === null || boundChildren === undefined) {
|
||||||
|
return (resolveStaticLanguageKeys(node.props.children, translate) as React.ReactNode) || undefined
|
||||||
|
}
|
||||||
|
if (React.isValidElement(boundChildren)) return boundChildren
|
||||||
|
return typeof boundChildren === 'object' ? JSON.stringify(boundChildren) : String(boundChildren)
|
||||||
|
}
|
||||||
|
|
||||||
const renderElement = (
|
const renderElement = (
|
||||||
node: DesignerNode,
|
node: DesignerNode,
|
||||||
children: React.ReactNode,
|
children: React.ReactNode,
|
||||||
|
|
@ -770,6 +925,8 @@ const renderElement = (
|
||||||
onNodePropChange?: (id: string, propertyName: string, value: unknown) => void,
|
onNodePropChange?: (id: string, propertyName: string, value: unknown) => void,
|
||||||
renderCustomComponent?: (name: string, props?: Record<string, unknown>) => React.ReactNode,
|
renderCustomComponent?: (name: string, props?: Record<string, unknown>) => React.ReactNode,
|
||||||
formScope?: DesignerFormScope,
|
formScope?: DesignerFormScope,
|
||||||
|
refs: Record<string, unknown> = {},
|
||||||
|
refOverrides: Record<string, unknown> = {},
|
||||||
) => {
|
) => {
|
||||||
// Built in NodeView so the container can own the record state and expose it to
|
// Built in NodeView so the container can own the record state and expose it to
|
||||||
// its children through an augmented `dataValues` map.
|
// its children through an augmented `dataValues` map.
|
||||||
|
|
@ -867,21 +1024,19 @@ const renderElement = (
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
const childrenBinding = node.bindings?.children
|
// Own content and child nodes coexist, exactly as the generator emits them:
|
||||||
const boundChildren = childrenBinding?.sourceId
|
// the text first, then the nodes dropped underneath it.
|
||||||
? getBindingValue(childrenBinding, dataValues, currentItem)
|
const ownContent = resolveNodeContent(node, dataValues, currentItem, translate, refOverrides)
|
||||||
: undefined
|
const hasOwnContent = ownContent !== undefined && ownContent !== null && ownContent !== ''
|
||||||
const content: React.ReactNode =
|
const content: React.ReactNode =
|
||||||
React.Children.count(children) > 0
|
React.Children.count(children) > 0
|
||||||
? children
|
? hasOwnContent
|
||||||
: boundChildren === null || boundChildren === undefined
|
? <>
|
||||||
? (resolveStaticLanguageKeys(node.props.children, translate) as React.ReactNode) ||
|
{ownContent}
|
||||||
undefined
|
{children}
|
||||||
: React.isValidElement(boundChildren)
|
</>
|
||||||
? boundChildren
|
: children
|
||||||
: typeof boundChildren === 'object'
|
: ownContent
|
||||||
? JSON.stringify(boundChildren)
|
|
||||||
: String(boundChildren)
|
|
||||||
const props = getPreviewProps(
|
const props = getPreviewProps(
|
||||||
node,
|
node,
|
||||||
dataValues,
|
dataValues,
|
||||||
|
|
@ -889,6 +1044,8 @@ const renderElement = (
|
||||||
onNodePropChange,
|
onNodePropChange,
|
||||||
translate,
|
translate,
|
||||||
formScope,
|
formScope,
|
||||||
|
refs,
|
||||||
|
refOverrides,
|
||||||
)
|
)
|
||||||
if (node.kind === 'custom') {
|
if (node.kind === 'custom') {
|
||||||
return renderCustomComponent?.(node.type, { ...props, children: content }) || null
|
return renderCustomComponent?.(node.type, { ...props, children: content }) || null
|
||||||
|
|
@ -1033,6 +1190,13 @@ const NodeView = ({
|
||||||
formScope?: DesignerFormScope
|
formScope?: DesignerFormScope
|
||||||
}) => {
|
}) => {
|
||||||
const { translate } = useLocalization()
|
const { translate } = useLocalization()
|
||||||
|
const refStore = React.useContext(DesignerRefContext)
|
||||||
|
// Rebuilt on every render so the accessors read the current override state;
|
||||||
|
// memoising it would hand the scripts a stale snapshot.
|
||||||
|
const refs = buildDesignerRefs(refStore)
|
||||||
|
const refOverride = node.ref ? refStore?.state[node.ref] : undefined
|
||||||
|
const refOverrides = refOverride?.props || {}
|
||||||
|
const refHidden = Boolean(refOverride?.hidden)
|
||||||
const selected = interactive && selectedId === node.id
|
const selected = interactive && selectedId === node.id
|
||||||
// A nested node can always move: at the edge of its container it is lifted out.
|
// A nested node can always move: at the edge of its container it is lifted out.
|
||||||
// Only the first/last node at the root has nowhere left to go.
|
// Only the first/last node at the root has nowhere left to go.
|
||||||
|
|
@ -1123,6 +1287,8 @@ const NodeView = ({
|
||||||
onNodePropChange,
|
onNodePropChange,
|
||||||
translate,
|
translate,
|
||||||
formScope,
|
formScope,
|
||||||
|
refs,
|
||||||
|
refOverrides,
|
||||||
)
|
)
|
||||||
const options = getTabOptions(tabsProps)
|
const options = getTabOptions(tabsProps)
|
||||||
delete tabsProps.items
|
delete tabsProps.items
|
||||||
|
|
@ -1421,12 +1587,17 @@ const NodeView = ({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
// While a Card holds no child node the drop target stays visible below its own
|
||||||
|
// content — otherwise a Card filled by its `children` text looks like it takes
|
||||||
|
// no components. renderElement keeps that text above whatever is passed here.
|
||||||
const contentChildren =
|
const contentChildren =
|
||||||
interactive && node.type === 'Card' && node.children.length === 0
|
interactive && node.type === 'Card' && node.children.length === 0
|
||||||
? [
|
? [
|
||||||
<div
|
<div
|
||||||
key={`card_drop_${node.id}`}
|
key={`card_drop_${node.id}`}
|
||||||
className="rounded border border-dashed border-slate-300 px-3 py-4 text-center text-xs text-slate-400 dark:border-slate-700"
|
className={`rounded border border-dashed border-slate-300 px-3 py-4 text-center text-xs text-slate-400 dark:border-slate-700 ${
|
||||||
|
hasStaticChildren || hasChildrenBinding ? 'mt-3' : ''
|
||||||
|
}`}
|
||||||
{...containerDropZoneProps}
|
{...containerDropZoneProps}
|
||||||
>
|
>
|
||||||
Bileşeni buraya bırakın
|
Bileşeni buraya bırakın
|
||||||
|
|
@ -1434,12 +1605,16 @@ const NodeView = ({
|
||||||
]
|
]
|
||||||
: renderedChildren
|
: renderedChildren
|
||||||
|
|
||||||
|
// A script hid this node. In preview it is gone, exactly like at runtime; while
|
||||||
|
// designing it stays selectable so the property panel can still reach it.
|
||||||
|
if (refHidden && !interactive) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`group/node relative min-h-[28px] rounded-md ${
|
className={`group/node relative min-h-[28px] rounded-md ${refHidden ? 'opacity-40' : ''} ${
|
||||||
interactive
|
interactive
|
||||||
? selected
|
? selected
|
||||||
? 'z-40 outline outline-2 outline-sky-500 outline-offset-2'
|
? 'z-10 outline outline-2 outline-sky-500 outline-offset-2'
|
||||||
: 'outline outline-1 outline-transparent hover:outline-sky-300'
|
: 'outline outline-1 outline-transparent hover:outline-sky-300'
|
||||||
: ''
|
: ''
|
||||||
}`}
|
}`}
|
||||||
|
|
@ -1497,7 +1672,7 @@ const NodeView = ({
|
||||||
>
|
>
|
||||||
{interactive && (
|
{interactive && (
|
||||||
<div
|
<div
|
||||||
className={`absolute right-1 top-1 z-50 items-center overflow-hidden rounded-md bg-sky-600 text-white shadow-lg ${selected ? 'flex' : 'hidden'}`}
|
className={`absolute right-1 top-1 z-20 items-center overflow-hidden rounded-md bg-sky-600 text-white shadow-lg ${selected ? 'flex' : 'hidden'}`}
|
||||||
>
|
>
|
||||||
<span className="flex items-center gap-1 px-2 text-[10px] font-semibold">
|
<span className="flex items-center gap-1 px-2 text-[10px] font-semibold">
|
||||||
<FaGripVertical /> {node.type}
|
<FaGripVertical /> {node.type}
|
||||||
|
|
@ -1550,6 +1725,11 @@ const NodeView = ({
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{interactive && refHidden && (
|
||||||
|
<span className="absolute left-1 top-1 z-10 rounded bg-slate-700 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wider text-white">
|
||||||
|
Gizli
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
<PreviewBoundary
|
<PreviewBoundary
|
||||||
name={node.type}
|
name={node.type}
|
||||||
resetKey={JSON.stringify([node.props, node.bindings, node.events])}
|
resetKey={JSON.stringify([node.props, node.bindings, node.events])}
|
||||||
|
|
@ -1564,6 +1744,8 @@ const NodeView = ({
|
||||||
onNodePropChange,
|
onNodePropChange,
|
||||||
renderCustomComponent,
|
renderCustomComponent,
|
||||||
formScope,
|
formScope,
|
||||||
|
refs,
|
||||||
|
refOverrides,
|
||||||
)}
|
)}
|
||||||
</PreviewBoundary>
|
</PreviewBoundary>
|
||||||
{/* Tabs has a drop zone inside every tab, so it needs no outer placeholder. */}
|
{/* Tabs has a drop zone inside every tab, so it needs no outer placeholder. */}
|
||||||
|
|
@ -1603,8 +1785,45 @@ const VisualCanvas = ({
|
||||||
dataValues = {},
|
dataValues = {},
|
||||||
}: VisualCanvasProps) => {
|
}: VisualCanvasProps) => {
|
||||||
const previewDataValues = dataValues
|
const previewDataValues = dataValues
|
||||||
|
const [refState, setRefState] = React.useState<Record<string, DesignerRefOverride>>({})
|
||||||
|
const nodesByRef = React.useMemo(() => {
|
||||||
|
const map: Record<string, DesignerNode> = {}
|
||||||
|
const visit = (list: DesignerNode[]) =>
|
||||||
|
list.forEach((node) => {
|
||||||
|
if (node.ref) map[node.ref] = node
|
||||||
|
visit(node.children || [])
|
||||||
|
})
|
||||||
|
visit(nodes)
|
||||||
|
return map
|
||||||
|
}, [nodes])
|
||||||
|
// Overrides are preview state, not document state: adding, removing or
|
||||||
|
// renaming a component starts from a clean sheet, while editing a property
|
||||||
|
// leaves whatever the last event script set in place.
|
||||||
|
const refFingerprint = Object.keys(nodesByRef).sort().join('|')
|
||||||
|
React.useEffect(() => setRefState({}), [refFingerprint])
|
||||||
|
const refStore = React.useMemo<DesignerRefStore>(
|
||||||
|
() => ({
|
||||||
|
state: refState,
|
||||||
|
nodes: nodesByRef,
|
||||||
|
patch: (ref, override) =>
|
||||||
|
setRefState((current) => ({
|
||||||
|
...current,
|
||||||
|
[ref]: {
|
||||||
|
...current[ref],
|
||||||
|
...override,
|
||||||
|
// `props: null` resets; anything else is merged on top.
|
||||||
|
props:
|
||||||
|
override.props === null
|
||||||
|
? {}
|
||||||
|
: { ...(current[ref]?.props || {}), ...(override.props || {}) },
|
||||||
|
},
|
||||||
|
})),
|
||||||
|
}),
|
||||||
|
[nodesByRef, refState],
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<DesignerRefContext.Provider value={refStore}>
|
||||||
<div
|
<div
|
||||||
className="min-h-full p-8 text-slate-900 dark:text-slate-100"
|
className="min-h-full p-8 text-slate-900 dark:text-slate-100"
|
||||||
onClick={() => interactive && onSelect?.('')}
|
onClick={() => interactive && onSelect?.('')}
|
||||||
|
|
@ -1689,6 +1908,7 @@ const VisualCanvas = ({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</DesignerRefContext.Provider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,10 @@ export const DESIGNER_PRIMARY_EVENTS: Record<string, string[]> = {
|
||||||
const DESIGNER_EVENT_SNIPPETS: Record<string, Record<string, string>> = {
|
const DESIGNER_EVENT_SNIPPETS: Record<string, Record<string, string>> = {
|
||||||
Button: {
|
Button: {
|
||||||
onClick: `// Butona tıklandığında çalışır.
|
onClick: `// Butona tıklandığında çalışır.
|
||||||
|
// Sayfadaki diğer komponentlere ref adlarıyla erişebilirsiniz:
|
||||||
|
// refs.input1.setValue('Merhaba')
|
||||||
|
// refs.input1.setEnabled(false)
|
||||||
|
// refs.card1.setVisible(false)
|
||||||
console.log('Button clicked', event)`,
|
console.log('Button clicked', event)`,
|
||||||
},
|
},
|
||||||
Checkbox: {
|
Checkbox: {
|
||||||
|
|
@ -131,6 +135,215 @@ console.log({ selectedValue, selectedLabel })`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The script API, as copy/paste ready examples. This is the single source of
|
||||||
|
* truth behind the designer's "Script API" panel, so anything an event script
|
||||||
|
* can do is discoverable without reading the code generator.
|
||||||
|
*
|
||||||
|
* `{{ref}}`, `{{sql}}` and `{{url}}` are replaced by the designer with real
|
||||||
|
* names from the page being edited, so a copied example runs as it is.
|
||||||
|
*/
|
||||||
|
export interface DesignerScriptRecipe {
|
||||||
|
group: string
|
||||||
|
title: string
|
||||||
|
description: string
|
||||||
|
code: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export const DESIGNER_SCRIPT_RECIPE_GROUPS = [
|
||||||
|
'Komponent erişimi',
|
||||||
|
'API çağrıları',
|
||||||
|
'SqlDataSource',
|
||||||
|
'Event ve sayfa',
|
||||||
|
] as const
|
||||||
|
|
||||||
|
export const DESIGNER_SCRIPT_RECIPES: DesignerScriptRecipe[] = [
|
||||||
|
{
|
||||||
|
group: 'Komponent erişimi',
|
||||||
|
title: 'Değer atama ve okuma',
|
||||||
|
description: 'Her komponent kendi ref adıyla adreslenir.',
|
||||||
|
code: `refs.{{ref}}.setValue('Merhaba')
|
||||||
|
const value = refs.{{ref}}.getValue()
|
||||||
|
console.log(value)`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'Komponent erişimi',
|
||||||
|
title: 'Aktif / pasif yapma',
|
||||||
|
description: 'Kaydet butonunu koşula göre kilitlemek için.',
|
||||||
|
code: `refs.{{ref}}.setEnabled(false)
|
||||||
|
console.log(refs.{{ref}}.isEnabled())`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'Komponent erişimi',
|
||||||
|
title: 'Gösterme / gizleme',
|
||||||
|
description: 'Gizlenen komponent sayfada hiç render edilmez.',
|
||||||
|
code: `refs.{{ref}}.setVisible(false)
|
||||||
|
// veya: refs.{{ref}}.hide() / refs.{{ref}}.show()`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'Komponent erişimi',
|
||||||
|
title: 'Salt okunur yapma',
|
||||||
|
description: 'Değeri görünür kalsın ama düzenlenemesin.',
|
||||||
|
code: `refs.{{ref}}.setReadOnly(true)`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'Komponent erişimi',
|
||||||
|
title: 'Etiket / metin değiştirme',
|
||||||
|
description: 'Buton ve etiket yazısını çalışma anında değiştirir.',
|
||||||
|
code: `refs.{{ref}}.setText('Kaydediliyor…')`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'Komponent erişimi',
|
||||||
|
title: 'Serbest property atama',
|
||||||
|
description: 'Property panelindeki her property script ile de yazılabilir.',
|
||||||
|
code: `refs.{{ref}}.setProps({ placeholder: 'Ara…', className: 'border-red-500' })
|
||||||
|
refs.{{ref}}.setProp('size', 'sm')`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'Komponent erişimi',
|
||||||
|
title: 'Script ile yapılanları geri alma',
|
||||||
|
description: 'Komponenti tasarımdaki haline döndürür.',
|
||||||
|
code: `refs.{{ref}}.reset()`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'API çağrıları',
|
||||||
|
title: 'GET — kayıt okuma',
|
||||||
|
description: 'Sonuç doğrudan response body’sidir.',
|
||||||
|
code: `const rows = await api.get('{{url}}')
|
||||||
|
console.log(rows)`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'API çağrıları',
|
||||||
|
title: 'GET — parametre ile',
|
||||||
|
description: 'İkinci argüman query string olarak gönderilir.',
|
||||||
|
code: `const rows = await api.get('{{url}}', { maxResultCount: 10 })
|
||||||
|
console.log(rows)`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'API çağrıları',
|
||||||
|
title: 'POST — yeni kayıt',
|
||||||
|
description: 'Gövde ikinci argüman olarak verilir.',
|
||||||
|
code: `const created = await api.post('{{url}}', {
|
||||||
|
name: refs.{{ref}}.getValue(),
|
||||||
|
})
|
||||||
|
console.log(created)`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'API çağrıları',
|
||||||
|
title: 'PUT ve DELETE',
|
||||||
|
description: 'Güncelleme ve silme aynı imzayı kullanır.',
|
||||||
|
code: `await api.put('{{url}}/5', { name: 'Yeni ad' })
|
||||||
|
await api.delete('{{url}}/5')`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'API çağrıları',
|
||||||
|
title: 'Hata yönetimi ve bildirim',
|
||||||
|
description: 'notify tipleri: success, info, warning, danger.',
|
||||||
|
code: `try {
|
||||||
|
await api.post('{{url}}', { name: refs.{{ref}}.getValue() })
|
||||||
|
notify('Kayıt tamamlandı', 'success')
|
||||||
|
} catch (error) {
|
||||||
|
notify(api.errorMessage(error), 'danger')
|
||||||
|
}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'API çağrıları',
|
||||||
|
title: 'Çağrı boyunca butonu kilitleme',
|
||||||
|
description: 'Çift tıklamayı ve mükerrer isteği önler.',
|
||||||
|
code: `refs.{{ref}}.setEnabled(false)
|
||||||
|
refs.{{ref}}.setText('Gönderiliyor…')
|
||||||
|
try {
|
||||||
|
await api.get('{{url}}')
|
||||||
|
notify('Tamamlandı', 'success')
|
||||||
|
} catch (error) {
|
||||||
|
notify(api.errorMessage(error), 'danger')
|
||||||
|
} finally {
|
||||||
|
refs.{{ref}}.setEnabled(true)
|
||||||
|
refs.{{ref}}.setText('Gönder')
|
||||||
|
}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'API çağrıları',
|
||||||
|
title: 'Serbest istek',
|
||||||
|
description: 'Header, timeout gibi ayarlar gerektiğinde.',
|
||||||
|
code: `const result = await api.request({
|
||||||
|
url: '{{url}}',
|
||||||
|
method: 'GET',
|
||||||
|
params: { skipCount: 0 },
|
||||||
|
})
|
||||||
|
console.log(result)`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'SqlDataSource',
|
||||||
|
title: 'Kaydet / sil / yenile',
|
||||||
|
description: 'Toolbar’ı gizleyip kendi butonlarınızı kullanabilirsiniz.',
|
||||||
|
code: `await refs.{{sql}}.save()
|
||||||
|
// await refs.{{sql}}.remove()
|
||||||
|
// await refs.{{sql}}.reload()
|
||||||
|
// refs.{{sql}}.newRecord()`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'SqlDataSource',
|
||||||
|
title: 'Aktif kaydı okuma ve yazma',
|
||||||
|
description: 'Alan adı Select sonucundaki sütun adıdır.',
|
||||||
|
code: `const record = refs.{{sql}}.getRecord()
|
||||||
|
console.log(record)
|
||||||
|
refs.{{sql}}.setField('name', 'Yeni ad')`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'SqlDataSource',
|
||||||
|
title: 'Kayıtlar arasında gezinme',
|
||||||
|
description: 'Select birden fazla satır döndürdüğünde.',
|
||||||
|
code: `const rows = refs.{{sql}}.getRows()
|
||||||
|
refs.{{sql}}.goToRow(rows.length - 1)`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'SqlDataSource',
|
||||||
|
title: 'Kaydetmeden önce doğrulama',
|
||||||
|
description: 'Zorunlu alan boşsa işlemi durdurur.',
|
||||||
|
code: `const record = refs.{{sql}}.getRecord()
|
||||||
|
if (!record.name) {
|
||||||
|
notify('Ad alanı zorunludur', 'warning')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await refs.{{sql}}.save()`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'SqlDataSource',
|
||||||
|
title: 'Durum bilgisi',
|
||||||
|
description: 'Yeni kayıt / düzenleme, meşgul ve hata durumu.',
|
||||||
|
code: `console.log(refs.{{sql}}.getMode(), refs.{{sql}}.isBusy(), refs.{{sql}}.getError())`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'Event ve sayfa',
|
||||||
|
title: 'Event verisi',
|
||||||
|
description: 'event içeriği komponent tipine göre değişir.',
|
||||||
|
code: `// Input: event.target.value · Checkbox: event.checked
|
||||||
|
// Select/Dropdown/Menu: seçilen değer · Button: tıklama eventi
|
||||||
|
console.log(event)`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'Event ve sayfa',
|
||||||
|
title: 'Komponentin kendi bilgileri',
|
||||||
|
description: 'Scriptin bağlı olduğu komponent ve tasarım property’leri.',
|
||||||
|
code: `console.log(component.type, component.ref)
|
||||||
|
console.log(props)`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'Event ve sayfa',
|
||||||
|
title: 'Sayfa yönlendirme',
|
||||||
|
description: 'Kayıt sonrası liste sayfasına dönmek için.',
|
||||||
|
code: `window.location.href = '/app/orders'`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'Event ve sayfa',
|
||||||
|
title: 'URL parametresi okuma',
|
||||||
|
description: 'Detay sayfasında anahtar değerini almak için.',
|
||||||
|
code: `const id = new URLSearchParams(window.location.search).get('id')
|
||||||
|
console.log(id)`,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
export const getDesignerEventSnippet = (componentName: string, eventName: string) =>
|
export const getDesignerEventSnippet = (componentName: string, eventName: string) =>
|
||||||
DESIGNER_EVENT_SNIPPETS[componentName]?.[eventName] ||
|
DESIGNER_EVENT_SNIPPETS[componentName]?.[eventName] ||
|
||||||
`// ${componentName}.${eventName}(event)\nconsole.log(event)`
|
`// ${componentName}.${eventName}(event)\nconsole.log(event)`
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,24 @@ const safeIdentifier = (value: string) => {
|
||||||
return /^[A-Za-z_$]/.test(cleaned) ? cleaned : `Component_${cleaned}`
|
return /^[A-Za-z_$]/.test(cleaned) ? cleaned : `Component_${cleaned}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the emitted component carries the `refs` runtime. It is switched on by
|
||||||
|
* `generateDesignerCode` for the whole pass when a script actually addresses
|
||||||
|
* another component, so a page that uses no refs keeps its previous output byte
|
||||||
|
* for byte instead of paying for a state hook and a guard around every node.
|
||||||
|
*/
|
||||||
|
let refRuntimeEnabled = false
|
||||||
|
|
||||||
|
/** Prop that turns a component off; react-select spells it differently. */
|
||||||
|
const getDisabledProperty = (type: string) => (type === 'Select' ? 'isDisabled' : 'disabled')
|
||||||
|
|
||||||
|
/** A script with `await` in it has to be wrapped in an async function. */
|
||||||
|
export const usesAwait = (script: string) => /\bawait\b/.test(script || '')
|
||||||
|
|
||||||
|
const refPropsExpression = (ref: string) => `designerRefProps(${JSON.stringify(ref)})`
|
||||||
|
|
||||||
|
const isRefControlled = (node: DesignerNode) => refRuntimeEnabled && Boolean(node.ref)
|
||||||
|
|
||||||
const staticValueExpression = (value: unknown): string => {
|
const staticValueExpression = (value: unknown): string => {
|
||||||
if (typeof value === 'string') {
|
if (typeof value === 'string') {
|
||||||
return value.startsWith('::') ? `translate(${JSON.stringify(value)})` : JSON.stringify(value)
|
return value.startsWith('::') ? `translate(${JSON.stringify(value)})` : JSON.stringify(value)
|
||||||
|
|
@ -142,6 +160,7 @@ const getFormScopeField = (node: DesignerNode, formScope?: FormScope) => {
|
||||||
eventName: node.type === 'AutoComplete' ? 'onInputChange' : 'onChange',
|
eventName: node.type === 'AutoComplete' ? 'onInputChange' : 'onChange',
|
||||||
path: node.bindings[propertyName].path,
|
path: node.bindings[propertyName].path,
|
||||||
setterName: formScope.setterName,
|
setterName: formScope.setterName,
|
||||||
|
sourceId: formScope.sourceId,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -254,7 +273,10 @@ const propsToCode = (
|
||||||
|
|
||||||
// Spread first so anything configured on the node overrides the defaults.
|
// Spread first so anything configured on the node overrides the defaults.
|
||||||
const leading = node.type === 'Select' ? ['{...selectMenuProps}'] : []
|
const leading = node.type === 'Select' ? ['{...selectMenuProps}'] : []
|
||||||
const allProps = [...leading, ...props]
|
// …and the ref overrides spread last, because a script that disables or
|
||||||
|
// refills a component has to win over both the defaults and the design values.
|
||||||
|
const trailing = isRefControlled(node) ? [`{...${refPropsExpression(node.ref as string)}}`] : []
|
||||||
|
const allProps = [...leading, ...props, ...trailing]
|
||||||
return allProps.length ? ` ${allProps.join(' ')}` : ''
|
return allProps.length ? ` ${allProps.join(' ')}` : ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -513,11 +535,41 @@ ${children}${toolbar}${error}
|
||||||
${indent('</div>', level)}`
|
${indent('</div>', level)}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wraps a node in its visibility guard. Tabs is the one component emitted as a
|
||||||
|
* braced expression rather than an element, so its outer `{…}` is turned into
|
||||||
|
* parentheses — inside the ternary the code is read as an expression, not as a
|
||||||
|
* JSX child.
|
||||||
|
*/
|
||||||
|
const withVisibilityGuard = (code: string, node: DesignerNode, level: number) => {
|
||||||
|
if (!isRefControlled(node)) return code
|
||||||
|
const trimmed = code.trim()
|
||||||
|
const body =
|
||||||
|
trimmed.startsWith('{') && trimmed.endsWith('}')
|
||||||
|
? code.replace(/^(\s*)\{/, '$1(').replace(/\}(\s*)$/, ')$1')
|
||||||
|
: code
|
||||||
|
return `${indent(`{designerRefHidden(${JSON.stringify(node.ref)}) ? null : (`, level)}
|
||||||
|
${body}
|
||||||
|
${indent(')}', level)}`
|
||||||
|
}
|
||||||
|
|
||||||
const nodeToCode = (
|
const nodeToCode = (
|
||||||
node: DesignerNode,
|
node: DesignerNode,
|
||||||
level = 0,
|
level = 0,
|
||||||
itemVariable?: string,
|
itemVariable?: string,
|
||||||
formScope?: FormScope,
|
formScope?: FormScope,
|
||||||
|
): string =>
|
||||||
|
withVisibilityGuard(
|
||||||
|
renderNodeToCode(node, isRefControlled(node) ? level + 1 : level, itemVariable, formScope),
|
||||||
|
node,
|
||||||
|
level,
|
||||||
|
)
|
||||||
|
|
||||||
|
const renderNodeToCode = (
|
||||||
|
node: DesignerNode,
|
||||||
|
level = 0,
|
||||||
|
itemVariable?: string,
|
||||||
|
formScope?: FormScope,
|
||||||
): string => {
|
): string => {
|
||||||
if (isSqlDataSourceNode(node.type)) return sqlDataSourceToCode(node, level, itemVariable)
|
if (isSqlDataSourceNode(node.type)) return sqlDataSourceToCode(node, level, itemVariable)
|
||||||
if (node.type === 'Spacer') {
|
if (node.type === 'Spacer') {
|
||||||
|
|
@ -837,17 +889,188 @@ ${indent('})()}', level)}`
|
||||||
const nested = node.children
|
const nested = node.children
|
||||||
.map((child) => nodeToCode(child, level + 1, itemVariable, formScope))
|
.map((child) => nodeToCode(child, level + 1, itemVariable, formScope))
|
||||||
.join('\n')
|
.join('\n')
|
||||||
|
// Static text is emitted through the ref override so `setText` reaches it: a
|
||||||
|
// spread `children` prop loses to JSX children, which is what a label is.
|
||||||
|
const staticText = isRefControlled(node)
|
||||||
|
? `${refPropsExpression(node.ref as string)}.children ?? ${staticValueExpression(childrenText)}`
|
||||||
|
: staticValueExpression(childrenText)
|
||||||
const text = childrenBinding
|
const text = childrenBinding
|
||||||
? indent(`{${childrenBinding}}`, level + 1)
|
? indent(`{${childrenBinding}}`, level + 1)
|
||||||
: childrenText
|
: childrenText
|
||||||
? indent(`{${staticValueExpression(childrenText)}}`, level + 1)
|
? indent(`{${staticText}}`, level + 1)
|
||||||
: ''
|
: ''
|
||||||
const body = [text, nested].filter(Boolean).join('\n')
|
const body = [text, nested].filter(Boolean).join('\n')
|
||||||
return `${indent(`<${tag}${propCode}>`, level)}\n${body}\n${indent(`</${tag}>`, level)}`
|
return `${indent(`<${tag}${propCode}>`, level)}\n${body}\n${indent(`</${tag}>`, level)}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Every script of the document, so ref usage can be detected before emitting. */
|
||||||
|
const collectDesignerScripts = (document: DesignerDocument) => {
|
||||||
|
const scripts: string[] = [document.lifecycle?.onMount || '']
|
||||||
|
const visit = (nodes: DesignerNode[]) =>
|
||||||
|
nodes.forEach((node) => {
|
||||||
|
Object.values(node.events || {}).forEach((script) => scripts.push(script || ''))
|
||||||
|
visit(node.children || [])
|
||||||
|
})
|
||||||
|
visit(document.nodes)
|
||||||
|
return scripts.join('\n')
|
||||||
|
}
|
||||||
|
|
||||||
|
interface RefTarget {
|
||||||
|
node: DesignerNode
|
||||||
|
/** Reads the node's current value, whatever holds it. */
|
||||||
|
getExpression: string
|
||||||
|
/** Statement that writes a new value back to that same holder. */
|
||||||
|
setStatement: string
|
||||||
|
extras: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* `refs.<name>` entry of a node: the value accessor is wired to whichever state
|
||||||
|
* actually owns the value — the enclosing SqlDataSource record, the node's own
|
||||||
|
* runtime state, or the ref override store for a component that has neither.
|
||||||
|
*/
|
||||||
|
const refTargetFor = (
|
||||||
|
node: DesignerNode,
|
||||||
|
formField: ReturnType<typeof getFormScopeField>,
|
||||||
|
runtimeState: RuntimeStateSpec | null,
|
||||||
|
): RefTarget => {
|
||||||
|
const ref = node.ref as string
|
||||||
|
const extras: string[] = []
|
||||||
|
if (isSqlDataSourceNode(node.type)) {
|
||||||
|
const names = sqlIdentifiers(node)
|
||||||
|
extras.push(
|
||||||
|
` getRecord: () => ${names.record}`,
|
||||||
|
` setField: (path, value) => ${names.setField}(path, value)`,
|
||||||
|
` getRows: () => ${names.rows}`,
|
||||||
|
` getMode: () => ${names.mode}`,
|
||||||
|
` isBusy: () => ${names.busy}`,
|
||||||
|
` getError: () => ${names.error}`,
|
||||||
|
` goToRow: (index) => ${names.setIndex}(Number(index) || 0)`,
|
||||||
|
` reload: () => ${names.refresh}()`,
|
||||||
|
` newRecord: () => ${names.create}()`,
|
||||||
|
` save: () => ${names.save}()`,
|
||||||
|
` remove: () => ${names.remove}()`,
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
node,
|
||||||
|
getExpression: names.record,
|
||||||
|
setStatement: `${names.setRecord}(value)`,
|
||||||
|
extras,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (formField) {
|
||||||
|
return {
|
||||||
|
node,
|
||||||
|
getExpression: `getByPath(data_${safeIdentifier(formField.sourceId)}, ${JSON.stringify(formField.path)})`,
|
||||||
|
setStatement: `${formField.setterName}(${JSON.stringify(formField.path)}, value)`,
|
||||||
|
extras,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (runtimeState) {
|
||||||
|
return {
|
||||||
|
node,
|
||||||
|
getExpression: runtimeState.stateName,
|
||||||
|
setStatement: `${runtimeState.setterName}(value)`,
|
||||||
|
extras,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const valueProperty =
|
||||||
|
'checked' in node.props ? 'checked' : 'value' in node.props ? 'value' : 'children'
|
||||||
|
return {
|
||||||
|
node,
|
||||||
|
getExpression: `${refPropsExpression(ref)}.${valueProperty} ?? ${staticValueExpression(node.props[valueProperty])}`,
|
||||||
|
setStatement: `patchDesignerRef(${JSON.stringify(ref)}, { props: { ${valueProperty}: value } })`,
|
||||||
|
extras,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The `refs` object handed to every event script and to `onMount`. Overrides are
|
||||||
|
* kept in one state map keyed by ref name, so a script can change any prop of any
|
||||||
|
* other component without that component needing a hook of its own.
|
||||||
|
*/
|
||||||
|
const refRuntimeCode = (targets: RefTarget[]) => {
|
||||||
|
const entries = targets
|
||||||
|
.map((target) => {
|
||||||
|
const ref = target.node.ref as string
|
||||||
|
const key = JSON.stringify(ref)
|
||||||
|
const disabledProperty = JSON.stringify(getDisabledProperty(target.node.type))
|
||||||
|
return ` ${key}: {
|
||||||
|
name: ${key},
|
||||||
|
type: ${JSON.stringify(target.node.type)},
|
||||||
|
getValue: () => ${target.getExpression},
|
||||||
|
setValue: (value) => { ${target.setStatement} },
|
||||||
|
getProps: () => designerRefProps(${key}),
|
||||||
|
setProps: (patch) => patchDesignerRef(${key}, { props: patch || {} }),
|
||||||
|
setProp: (property, value) => patchDesignerRef(${key}, { props: { [property]: value } }),
|
||||||
|
isVisible: () => !designerRefHidden(${key}),
|
||||||
|
setVisible: (visible) => patchDesignerRef(${key}, { hidden: visible === false }),
|
||||||
|
show: () => patchDesignerRef(${key}, { hidden: false }),
|
||||||
|
hide: () => patchDesignerRef(${key}, { hidden: true }),
|
||||||
|
isEnabled: () => (designerRefProps(${key})[${disabledProperty}] ?? ${JSON.stringify(Boolean(target.node.props[getDisabledProperty(target.node.type)]))}) !== true,
|
||||||
|
setEnabled: (enabled) => patchDesignerRef(${key}, { props: { [${disabledProperty}]: enabled === false } }),
|
||||||
|
setReadOnly: (readOnly) => patchDesignerRef(${key}, { props: { readOnly: readOnly !== false } }),
|
||||||
|
setText: (text) => patchDesignerRef(${key}, { props: { children: text } }),
|
||||||
|
reset: () => patchDesignerRef(${key}, { props: null, hidden: false }),${
|
||||||
|
target.extras.length ? `\n${target.extras.join(',\n')},` : ''
|
||||||
|
}
|
||||||
|
}`
|
||||||
|
})
|
||||||
|
.join(',\n')
|
||||||
|
|
||||||
|
return ` // Component references. Every node on the canvas is addressable by its ref,
|
||||||
|
// so an event script can read or change another component without prop drilling.
|
||||||
|
const [designerRefState, setDesignerRefState] = React.useState({})
|
||||||
|
const designerRefProps = (name) => designerRefState[name]?.props || {}
|
||||||
|
const designerRefHidden = (name) => Boolean(designerRefState[name]?.hidden)
|
||||||
|
const patchDesignerRef = (name, patch) => setDesignerRefState((current) => ({
|
||||||
|
...current,
|
||||||
|
[name]: {
|
||||||
|
...current[name],
|
||||||
|
...patch,
|
||||||
|
// \`props: null\` resets the overrides; anything else is merged on top.
|
||||||
|
props: patch.props === null ? {} : { ...(current[name]?.props || {}), ...(patch.props || {}) },
|
||||||
|
},
|
||||||
|
}))
|
||||||
|
const refs = {
|
||||||
|
${entries}
|
||||||
|
}`
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* `api` and `notify`, the two helpers an event script needs to do something that
|
||||||
|
* is not just moving values between components. `apiService`, `toast` and
|
||||||
|
* `Notification` are already in the compiled component's scope, so this is only
|
||||||
|
* about giving the scripts a small, obvious surface over them.
|
||||||
|
*/
|
||||||
|
const SCRIPT_API_CODE = ` const api = {
|
||||||
|
get: (url, params) => apiService.fetchData({ url, method: "GET", params }).then((response) => response.data),
|
||||||
|
post: (url, data, params) => apiService.fetchData({ url, method: "POST", data, params }).then((response) => response.data),
|
||||||
|
put: (url, data, params) => apiService.fetchData({ url, method: "PUT", data, params }).then((response) => response.data),
|
||||||
|
patch: (url, data, params) => apiService.fetchData({ url, method: "PATCH", data, params }).then((response) => response.data),
|
||||||
|
delete: (url, params) => apiService.fetchData({ url, method: "DELETE", params }).then((response) => response.data),
|
||||||
|
remove: (url, params) => apiService.fetchData({ url, method: "DELETE", params }).then((response) => response.data),
|
||||||
|
request: (config) => apiService.fetchData(config).then((response) => response.data),
|
||||||
|
errorMessage: (error) => error?.response?.data?.error?.message || error?.response?.data?.message || error?.message || "İşlem tamamlanamadı.",
|
||||||
|
}`
|
||||||
|
|
||||||
|
const SCRIPT_NOTIFY_CODE = ` const notify = (message, type = "info") => toast.push(
|
||||||
|
<Notification type={type} duration={2500}>{typeof message === "string" ? message : JSON.stringify(message)}</Notification>,
|
||||||
|
{ placement: "bottom-end" },
|
||||||
|
)`
|
||||||
|
|
||||||
export const generateDesignerCode = (name: string, document: DesignerDocument) => {
|
export const generateDesignerCode = (name: string, document: DesignerDocument) => {
|
||||||
const componentName = safeIdentifier(name || 'VisualComponent')
|
const componentName = safeIdentifier(name || 'VisualComponent')
|
||||||
|
const scripts = collectDesignerScripts(document)
|
||||||
|
// Only pages whose scripts address a ref pay for the ref runtime.
|
||||||
|
refRuntimeEnabled = /\brefs\b/.test(scripts)
|
||||||
|
const scriptHelpers = [
|
||||||
|
/\bapi\b/.test(scripts) ? SCRIPT_API_CODE : '',
|
||||||
|
/\bnotify\b/.test(scripts) ? SCRIPT_NOTIFY_CODE : '',
|
||||||
|
]
|
||||||
|
.filter(Boolean)
|
||||||
|
.join('\n\n')
|
||||||
|
const refTargets: RefTarget[] = []
|
||||||
const handlers: string[] = []
|
const handlers: string[] = []
|
||||||
const runtimeStateHooks: string[] = []
|
const runtimeStateHooks: string[] = []
|
||||||
let hasSelect = false
|
let hasSelect = false
|
||||||
|
|
@ -875,6 +1098,9 @@ export const generateDesignerCode = (name: string, document: DesignerDocument) =
|
||||||
}
|
}
|
||||||
const formField = getFormScopeField(node, formScope)
|
const formField = getFormScopeField(node, formScope)
|
||||||
const runtimeState = getRuntimeStateSpec(node)
|
const runtimeState = getRuntimeStateSpec(node)
|
||||||
|
if (refRuntimeEnabled && node.ref) {
|
||||||
|
refTargets.push(refTargetFor(node, formField, runtimeState))
|
||||||
|
}
|
||||||
if (runtimeState) {
|
if (runtimeState) {
|
||||||
// Date pickers hold a Date in state but an ISO string in the document.
|
// Date pickers hold a Date in state but an ISO string in the document.
|
||||||
const initialExpression = isDesignerDateProperty(node.type, runtimeState.propertyName)
|
const initialExpression = isDesignerDateProperty(node.type, runtimeState.propertyName)
|
||||||
|
|
@ -938,8 +1164,11 @@ export const generateDesignerCode = (name: string, document: DesignerDocument) =
|
||||||
node.type === 'Checkbox' && eventName === 'onChange'
|
node.type === 'Checkbox' && eventName === 'onChange'
|
||||||
? ' const event = { checked: Boolean(valueOrEvent), originalEvent, target: originalEvent?.target }'
|
? ' const event = { checked: Boolean(valueOrEvent), originalEvent, target: originalEvent?.target }'
|
||||||
: ' const event = valueOrEvent'
|
: ' const event = valueOrEvent'
|
||||||
|
// A script that awaits an API call needs an async handler, otherwise the
|
||||||
|
// `await` is a syntax error the user only finds out about at compile time.
|
||||||
|
const asyncPrefix = usesAwait(script) ? 'async ' : ''
|
||||||
handlers.push(
|
handlers.push(
|
||||||
` const handle_${safeIdentifier(node.id)}_${eventName} = (valueOrEvent, originalEvent) => {\n${stateUpdate ? ` ${stateUpdate}\n` : ''}${eventDeclaration}${script ? `\n${indent(script, 2)}` : ''}\n }`,
|
` const handle_${safeIdentifier(node.id)}_${eventName} = ${asyncPrefix}(valueOrEvent, originalEvent) => {\n${stateUpdate ? ` ${stateUpdate}\n` : ''}${eventDeclaration}${script ? `\n${indent(script, 2)}` : ''}\n }`,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
visit(
|
visit(
|
||||||
|
|
@ -1185,12 +1414,19 @@ export const generateDesignerCode = (name: string, document: DesignerDocument) =
|
||||||
})
|
})
|
||||||
.join('\n\n')
|
.join('\n\n')
|
||||||
|
|
||||||
|
// Declared after the data/SQL/runtime state it reads, and before the handlers
|
||||||
|
// and the mount effect that call into it.
|
||||||
|
const refRuntime = refTargets.length ? refRuntimeCode(refTargets) : ''
|
||||||
|
// An effect callback must not return a promise, so an awaiting onMount is run
|
||||||
|
// through an async IIFE instead of being made async itself.
|
||||||
const mount = document.lifecycle.onMount.trim()
|
const mount = document.lifecycle.onMount.trim()
|
||||||
? ` React.useEffect(() => {\n${indent(document.lifecycle.onMount, 2)}\n }, [])`
|
? usesAwait(document.lifecycle.onMount)
|
||||||
|
? ` React.useEffect(() => {\n void (async () => {\n${indent(document.lifecycle.onMount, 3)}\n })()\n }, [])`
|
||||||
|
: ` React.useEffect(() => {\n${indent(document.lifecycle.onMount, 2)}\n }, [])`
|
||||||
: ''
|
: ''
|
||||||
const body = document.nodes.map((node) => nodeToCode(node, 3)).join('\n')
|
const body = document.nodes.map((node) => nodeToCode(node, 3)).join('\n')
|
||||||
|
|
||||||
const designerBackup = encodeURIComponent(JSON.stringify(document))
|
const designerBackup = encodeURIComponent(JSON.stringify(document))
|
||||||
|
|
||||||
return `/*__SOZSOFT_VISUAL_DESIGNER__${designerBackup}__*/\nconst ${componentName} = () => {\n${[dataHelpers, selectHelpers, dropdownHelpers, selectValueHelpers, selectMenuHelpers, localeHelpers, dateHelpers, tabHelpers, sqlHelpers, dataHooks, sqlHooks, ...runtimeStateHooks, mount, ...handlers].filter(Boolean).join('\n\n')}\n\n return (\n <>\n${body}\n </>\n )\n}\n\nexport default ${componentName}\n`
|
return `/*__SOZSOFT_VISUAL_DESIGNER__${designerBackup}__*/\nconst ${componentName} = () => {\n${[dataHelpers, scriptHelpers,selectHelpers, dropdownHelpers, selectValueHelpers, selectMenuHelpers, localeHelpers, dateHelpers, tabHelpers, sqlHelpers, dataHooks, sqlHooks, ...runtimeStateHooks, refRuntime, mount, ...handlers].filter(Boolean).join('\n\n')}\n\n return (\n <>\n${body}\n </>\n )\n}\n\nexport default ${componentName}\n`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,12 @@ export interface DesignerNode {
|
||||||
type: string
|
type: string
|
||||||
kind: DesignerNodeKind
|
kind: DesignerNodeKind
|
||||||
slot?: string
|
slot?: string
|
||||||
|
/**
|
||||||
|
* Human readable handle of the node. Assigned automatically on every commit and
|
||||||
|
* renameable from the property panel; event scripts address each other through
|
||||||
|
* it (`refs.btnSave.setEnabled(false)`) instead of through the opaque `id`.
|
||||||
|
*/
|
||||||
|
ref?: string
|
||||||
props: Record<string, unknown>
|
props: Record<string, unknown>
|
||||||
events: Record<string, string>
|
events: Record<string, string>
|
||||||
bindings: Record<string, DesignerBinding>
|
bindings: Record<string, DesignerBinding>
|
||||||
|
|
@ -262,6 +268,97 @@ export const createEmptyDesignerDocument = (
|
||||||
export const createDesignerId = () =>
|
export const createDesignerId = () =>
|
||||||
`cmp_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 7)}`
|
`cmp_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 7)}`
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A ref is emitted as a JavaScript property name in the generated component, so
|
||||||
|
* it has to be a plain identifier.
|
||||||
|
*/
|
||||||
|
const DESIGNER_REF_PATTERN = /^[A-Za-z_$][A-Za-z0-9_$]*$/
|
||||||
|
|
||||||
|
export const isValidDesignerRef = (value: string) => DESIGNER_REF_PATTERN.test(value)
|
||||||
|
|
||||||
|
/** `Radio.Group` → `radioGroup`, `SqlDataSource` → `sqlDataSource`, `div` → `div`. */
|
||||||
|
export const toDesignerRefBase = (type: string) => {
|
||||||
|
const camelCased = String(type || '')
|
||||||
|
.replace(/[^A-Za-z0-9]+([A-Za-z0-9])?/g, (_match, next?: string) =>
|
||||||
|
next ? next.toLocaleUpperCase('en') : '',
|
||||||
|
)
|
||||||
|
.replace(/^[0-9]+/, '')
|
||||||
|
const base = camelCased.charAt(0).toLocaleLowerCase('en') + camelCased.slice(1)
|
||||||
|
return isValidDesignerRef(base) ? base : 'component'
|
||||||
|
}
|
||||||
|
|
||||||
|
/** First free `<base><n>` name; `taken` holds every ref already used on the page. */
|
||||||
|
export const createDesignerRefName = (type: string, taken: Set<string>) => {
|
||||||
|
const base = toDesignerRefBase(type)
|
||||||
|
let index = 1
|
||||||
|
while (taken.has(`${base}${index}`)) index += 1
|
||||||
|
return `${base}${index}`
|
||||||
|
}
|
||||||
|
|
||||||
|
export const collectDesignerRefs = (nodes: DesignerNode[]) => {
|
||||||
|
const refs = new Map<string, DesignerNode>()
|
||||||
|
walkDesignerNodes(nodes, (node) => {
|
||||||
|
if (node.ref && !refs.has(node.ref)) refs.set(node.ref, node)
|
||||||
|
})
|
||||||
|
return refs
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fills in every missing or duplicated ref. Applied on each document commit, so
|
||||||
|
* a node can never end up without a unique handle however it got onto the canvas
|
||||||
|
* — toolbox drop, duplicate, drag between containers or an older saved document.
|
||||||
|
* Untouched branches keep their identity so React does not re-render them.
|
||||||
|
*/
|
||||||
|
export const withDesignerRefs = (nodes: DesignerNode[]): DesignerNode[] => {
|
||||||
|
const taken = new Set<string>()
|
||||||
|
const assign = (list: DesignerNode[]): DesignerNode[] => {
|
||||||
|
let changed = false
|
||||||
|
const next = list.map((node) => {
|
||||||
|
const current = String(node.ref ?? '').trim()
|
||||||
|
const ref =
|
||||||
|
current && isValidDesignerRef(current) && !taken.has(current)
|
||||||
|
? current
|
||||||
|
: createDesignerRefName(node.type, taken)
|
||||||
|
taken.add(ref)
|
||||||
|
const children = assign(node.children || [])
|
||||||
|
if (ref === node.ref && children === node.children) return node
|
||||||
|
changed = true
|
||||||
|
return { ...node, ref, children }
|
||||||
|
})
|
||||||
|
return changed ? next : list
|
||||||
|
}
|
||||||
|
return assign(nodes)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rewrites `refs.old` / `refs["old"]` occurrences after a rename, so renaming a
|
||||||
|
* component from the property panel does not silently break the scripts that
|
||||||
|
* already drive it.
|
||||||
|
*/
|
||||||
|
export const renameDesignerRefInScript = (script: string, from: string, to: string) => {
|
||||||
|
if (!script || !from || from === to) return script
|
||||||
|
const escaped = from.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
||||||
|
return script
|
||||||
|
.replace(new RegExp(`(\\brefs\\s*\\.\\s*)${escaped}\\b`, 'g'), `$1${to}`)
|
||||||
|
.replace(new RegExp(`(\\brefs\\s*\\[\\s*)(['"\`])${escaped}\\2(\\s*\\])`, 'g'), `$1$2${to}$2$3`)
|
||||||
|
}
|
||||||
|
|
||||||
|
export const renameDesignerRefInNodes = (
|
||||||
|
nodes: DesignerNode[],
|
||||||
|
from: string,
|
||||||
|
to: string,
|
||||||
|
): DesignerNode[] =>
|
||||||
|
nodes.map((node) => ({
|
||||||
|
...node,
|
||||||
|
events: Object.fromEntries(
|
||||||
|
Object.entries(node.events || {}).map(([eventName, script]) => [
|
||||||
|
eventName,
|
||||||
|
renameDesignerRefInScript(script, from, to),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
children: renameDesignerRefInNodes(node.children || [], from, to),
|
||||||
|
}))
|
||||||
|
|
||||||
export const walkDesignerNodes = (
|
export const walkDesignerNodes = (
|
||||||
nodes: DesignerNode[],
|
nodes: DesignerNode[],
|
||||||
callback: (node: DesignerNode, parentId: string | null) => void,
|
callback: (node: DesignerNode, parentId: string | null) => void,
|
||||||
|
|
|
||||||
|
|
@ -40,16 +40,22 @@ import { Button, Notification, toast } from '@/components/ui'
|
||||||
import StyleModal from '@/components/codeLayout/StyleModal'
|
import StyleModal from '@/components/codeLayout/StyleModal'
|
||||||
import VisualCanvas, { DESIGNER_DRAG_TYPE } from '@/components/visualDesigner/VisualCanvas'
|
import VisualCanvas, { DESIGNER_DRAG_TYPE } from '@/components/visualDesigner/VisualCanvas'
|
||||||
import {
|
import {
|
||||||
DESIGNER_DATA_COMPONENT_NAMES,
|
|
||||||
DESIGNER_PRIMARY_EVENTS,
|
DESIGNER_PRIMARY_EVENTS,
|
||||||
|
DESIGNER_SCRIPT_RECIPES,
|
||||||
|
DESIGNER_SCRIPT_RECIPE_GROUPS,
|
||||||
getDesignerCatalog,
|
getDesignerCatalog,
|
||||||
getDesignerEventSnippet,
|
getDesignerEventSnippet,
|
||||||
} from '@/components/visualDesigner/catalog'
|
} from '@/components/visualDesigner/catalog'
|
||||||
import { generateDesignerCode } from '@/components/visualDesigner/codeGenerator'
|
import { generateDesignerCode } from '@/components/visualDesigner/codeGenerator'
|
||||||
import {
|
import {
|
||||||
|
collectDesignerRefs,
|
||||||
createDesignerId,
|
createDesignerId,
|
||||||
createEmptyDesignerDocument,
|
createEmptyDesignerDocument,
|
||||||
findDesignerNode,
|
findDesignerNode,
|
||||||
|
isValidDesignerRef,
|
||||||
|
renameDesignerRefInNodes,
|
||||||
|
renameDesignerRefInScript,
|
||||||
|
withDesignerRefs,
|
||||||
getDesignerCollectionProperty,
|
getDesignerCollectionProperty,
|
||||||
getDesignerValueByPath,
|
getDesignerValueByPath,
|
||||||
getSqlDataSourceEndpointId,
|
getSqlDataSourceEndpointId,
|
||||||
|
|
@ -150,6 +156,13 @@ const getSqlRecordFieldOrder = (propertyName: string) =>
|
||||||
const isOptionDataComponent = isDesignerOptionComponent
|
const isOptionDataComponent = isDesignerOptionComponent
|
||||||
const getOptionDataProperty = getDesignerCollectionProperty
|
const getOptionDataProperty = getDesignerCollectionProperty
|
||||||
const isTabularDataComponent = isDesignerTabularComponent
|
const isTabularDataComponent = isDesignerTabularComponent
|
||||||
|
/**
|
||||||
|
* The inspector's Data tab follows the toolbox category, not the collection
|
||||||
|
* registry: everything filed under `data` is expected to be data driven, even
|
||||||
|
* when it carries no collection property of its own.
|
||||||
|
*/
|
||||||
|
const isDataCategoryComponent = (definition?: DesignerComponentDefinition) =>
|
||||||
|
definition?.toolboxGroup === 'data'
|
||||||
|
|
||||||
const PROPERTY_EXAMPLE_VALUES: Record<string, unknown> = {
|
const PROPERTY_EXAMPLE_VALUES: Record<string, unknown> = {
|
||||||
children: 'Örnek içerik',
|
children: 'Örnek içerik',
|
||||||
|
|
@ -602,7 +615,9 @@ const normalizeDesignerDocument = (document: DesignerDocument): DesignerDocument
|
||||||
})
|
})
|
||||||
return {
|
return {
|
||||||
...document,
|
...document,
|
||||||
nodes: normalizeNodes(document.nodes),
|
// Documents saved before refs existed get theirs here, so every component is
|
||||||
|
// addressable from a script the moment it is opened.
|
||||||
|
nodes: withDesignerRefs(normalizeNodes(document.nodes)),
|
||||||
canvas: { width: document.canvas?.width || 'responsive' },
|
canvas: { width: document.canvas?.width || 'responsive' },
|
||||||
// Documents saved before non-GET sources existed have no usable method value.
|
// Documents saved before non-GET sources existed have no usable method value.
|
||||||
dataSources: (Array.isArray(document.dataSources) ? document.dataSources : []).map(
|
dataSources: (Array.isArray(document.dataSources) ? document.dataSources : []).map(
|
||||||
|
|
@ -1124,6 +1139,14 @@ const VisualComponentDesigner = () => {
|
||||||
const [selectedId, setSelectedId] = useState<string | null>(null)
|
const [selectedId, setSelectedId] = useState<string | null>(null)
|
||||||
const [workspaceTab, setWorkspaceTab] = useState<WorkspaceTab>('design')
|
const [workspaceTab, setWorkspaceTab] = useState<WorkspaceTab>('design')
|
||||||
const [inspectorTab, setInspectorTab] = useState<InspectorTab>('properties')
|
const [inspectorTab, setInspectorTab] = useState<InspectorTab>('properties')
|
||||||
|
// Editing buffer of the selected component's ref; committed on blur/Enter so a
|
||||||
|
// half typed name never lands in the document.
|
||||||
|
const [refDraft, setRefDraft] = useState('')
|
||||||
|
const [refError, setRefError] = useState('')
|
||||||
|
const [scriptApiOpen, setScriptApiOpen] = useState(false)
|
||||||
|
const [scriptApiSearch, setScriptApiSearch] = useState('')
|
||||||
|
/** Last focused event editor, so a Script API example lands in the right one. */
|
||||||
|
const [focusedEventName, setFocusedEventName] = useState('')
|
||||||
const [search, setSearch] = useState('')
|
const [search, setSearch] = useState('')
|
||||||
const [expandedToolboxGroups, setExpandedToolboxGroups] = useState<
|
const [expandedToolboxGroups, setExpandedToolboxGroups] = useState<
|
||||||
Record<DesignerComponentDefinition['toolboxGroup'], boolean>
|
Record<DesignerComponentDefinition['toolboxGroup'], boolean>
|
||||||
|
|
@ -1254,7 +1277,11 @@ const VisualComponentDesigner = () => {
|
||||||
undoStack.current.push(clone(current))
|
undoStack.current.push(clone(current))
|
||||||
if (undoStack.current.length > 80) undoStack.current.shift()
|
if (undoStack.current.length > 80) undoStack.current.shift()
|
||||||
redoStack.current = []
|
redoStack.current = []
|
||||||
return updater(current)
|
const next = updater(current)
|
||||||
|
// Single choke point for ref assignment: whichever way a node reaches the
|
||||||
|
// document — toolbox drop, duplicate, drag or paste — it leaves here with a
|
||||||
|
// unique handle that the event scripts can address.
|
||||||
|
return { ...next, nodes: withDesignerRefs(next.nodes) }
|
||||||
})
|
})
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|
@ -1320,6 +1347,93 @@ const VisualComponentDesigner = () => {
|
||||||
[document.nodes, selectedId],
|
[document.nodes, selectedId],
|
||||||
)
|
)
|
||||||
const selectedDefinition = selectedNode ? catalogByName.get(selectedNode.type) : undefined
|
const selectedDefinition = selectedNode ? catalogByName.get(selectedNode.type) : undefined
|
||||||
|
/** Every addressable component of the page, keyed by ref. */
|
||||||
|
const documentRefs = useMemo(() => collectDesignerRefs(document.nodes), [document.nodes])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setRefDraft(selectedNode?.ref || '')
|
||||||
|
setRefError('')
|
||||||
|
}, [selectedNode?.id, selectedNode?.ref])
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renames the selected component's handle and rewrites the scripts that use
|
||||||
|
* it, so `refs.button1` does not silently stop resolving once the ref is given
|
||||||
|
* a meaningful name.
|
||||||
|
*/
|
||||||
|
const commitRefRename = () => {
|
||||||
|
if (!selectedNode) return
|
||||||
|
const previous = selectedNode.ref || ''
|
||||||
|
const next = refDraft.trim()
|
||||||
|
if (!next || next === previous) {
|
||||||
|
setRefDraft(previous)
|
||||||
|
setRefError('')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!isValidDesignerRef(next)) {
|
||||||
|
setRefError('Ref bir JavaScript adı olmalıdır: harf ile başlamalı, boşluk içermemelidir.')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (documentRefs.has(next)) {
|
||||||
|
setRefError('Bu ref sayfadaki başka bir komponente ait.')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
setRefError('')
|
||||||
|
commitDocument((current) => ({
|
||||||
|
...current,
|
||||||
|
lifecycle: { onMount: renameDesignerRefInScript(current.lifecycle.onMount, previous, next) },
|
||||||
|
nodes: renameDesignerRefInNodes(
|
||||||
|
updateNodeTree(current.nodes, selectedNode.id, (node) => ({ ...node, ref: next })),
|
||||||
|
previous,
|
||||||
|
next,
|
||||||
|
),
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
|
const copyToClipboard = (text: string, message: string) => {
|
||||||
|
void navigator.clipboard?.writeText(text)
|
||||||
|
toast.push(
|
||||||
|
<Notification type="success" duration={1800}>
|
||||||
|
{message}
|
||||||
|
</Notification>,
|
||||||
|
{ placement: 'bottom-end' },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const copyRefName = (ref: string) => copyToClipboard(`refs.${ref}`, `refs.${ref} panoya kopyalandı.`)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fills the `{{ref}}` / `{{sql}}` / `{{url}}` placeholders of a Script API
|
||||||
|
* example with names that actually exist on this page, so a copied example
|
||||||
|
* runs without being edited first.
|
||||||
|
*/
|
||||||
|
const resolveRecipeCode = useCallback(
|
||||||
|
(code: string) => {
|
||||||
|
const entries = [...documentRefs.entries()]
|
||||||
|
const sqlRef = entries.find(([, node]) => isSqlDataSourceNode(node.type))?.[0]
|
||||||
|
const selectedRef =
|
||||||
|
selectedNode && !isSqlDataSourceNode(selectedNode.type) ? selectedNode.ref : undefined
|
||||||
|
const componentRef =
|
||||||
|
selectedRef ||
|
||||||
|
entries.find(([, node]) => !isSqlDataSourceNode(node.type) && node.kind === 'ui')?.[0] ||
|
||||||
|
entries.find(([, node]) => !isSqlDataSourceNode(node.type))?.[0]
|
||||||
|
const url = document.dataSources.find((source) => source.method === 'GET')?.url
|
||||||
|
return code
|
||||||
|
.replace(/\{\{ref\}\}/g, componentRef || 'button1')
|
||||||
|
.replace(/\{\{sql\}\}/g, sqlRef || 'sqlDataSource1')
|
||||||
|
.replace(/\{\{url\}\}/g, url || '/api/app/orders')
|
||||||
|
},
|
||||||
|
[document.dataSources, documentRefs, selectedNode],
|
||||||
|
)
|
||||||
|
|
||||||
|
const filteredScriptRecipes = useMemo(() => {
|
||||||
|
const query = scriptApiSearch.trim().toLocaleLowerCase('tr')
|
||||||
|
if (!query) return DESIGNER_SCRIPT_RECIPES
|
||||||
|
return DESIGNER_SCRIPT_RECIPES.filter((recipe) =>
|
||||||
|
`${recipe.group} ${recipe.title} ${recipe.description} ${recipe.code}`
|
||||||
|
.toLocaleLowerCase('tr')
|
||||||
|
.includes(query),
|
||||||
|
)
|
||||||
|
}, [scriptApiSearch])
|
||||||
/**
|
/**
|
||||||
* Record of every SqlDataSource on the canvas, derived from the tested Select
|
* Record of every SqlDataSource on the canvas, derived from the tested Select
|
||||||
* endpoint. Children bind to it through the container's node id, so it is
|
* endpoint. Children bind to it through the container's node id, so it is
|
||||||
|
|
@ -1397,9 +1511,7 @@ const VisualComponentDesigner = () => {
|
||||||
)
|
)
|
||||||
const selectedIsDataComponent = Boolean(
|
const selectedIsDataComponent = Boolean(
|
||||||
selectedNode &&
|
selectedNode &&
|
||||||
(DESIGNER_DATA_COMPONENT_NAMES.has(selectedNode.type) ||
|
(isDataCategoryComponent(selectedDefinition) || selectedIsSqlDataSource || sqlScopeNode),
|
||||||
selectedIsSqlDataSource ||
|
|
||||||
sqlScopeNode),
|
|
||||||
)
|
)
|
||||||
const selectedProperties = useMemo<DesignerPropertyInfo[]>(() => {
|
const selectedProperties = useMemo<DesignerPropertyInfo[]>(() => {
|
||||||
if (!selectedNode) return []
|
if (!selectedNode) return []
|
||||||
|
|
@ -2137,6 +2249,11 @@ const VisualComponentDesigner = () => {
|
||||||
if (event.key === 'Delete' && !isPropertyEditing && selectedId && workspaceTab === 'design') {
|
if (event.key === 'Delete' && !isPropertyEditing && selectedId && workspaceTab === 'design') {
|
||||||
deleteNode(selectedId)
|
deleteNode(selectedId)
|
||||||
}
|
}
|
||||||
|
if ((event.ctrlKey || event.metaKey) && event.shiftKey && event.key.toLowerCase() === 'k') {
|
||||||
|
event.preventDefault()
|
||||||
|
setScriptApiOpen((current) => !current)
|
||||||
|
}
|
||||||
|
if (event.key === 'Escape') setScriptApiOpen(false)
|
||||||
}
|
}
|
||||||
window.addEventListener('keydown', keyHandler)
|
window.addEventListener('keydown', keyHandler)
|
||||||
return () => window.removeEventListener('keydown', keyHandler)
|
return () => window.removeEventListener('keydown', keyHandler)
|
||||||
|
|
@ -2473,7 +2590,7 @@ const VisualComponentDesigner = () => {
|
||||||
const dataBindableProperties =
|
const dataBindableProperties =
|
||||||
selectedNode &&
|
selectedNode &&
|
||||||
selectedDefinition &&
|
selectedDefinition &&
|
||||||
(DESIGNER_DATA_COMPONENT_NAMES.has(selectedNode.type) || Boolean(sqlScopeNode))
|
(isDataCategoryComponent(selectedDefinition) || Boolean(sqlScopeNode))
|
||||||
? selectedDefinition.properties.filter(
|
? selectedDefinition.properties.filter(
|
||||||
(property) =>
|
(property) =>
|
||||||
property.category !== 'events' &&
|
property.category !== 'events' &&
|
||||||
|
|
@ -3536,6 +3653,21 @@ const VisualComponentDesigner = () => {
|
||||||
const activeJavaScriptTarget =
|
const activeJavaScriptTarget =
|
||||||
javascriptEventTargets.find((target) => target.node.id === selectedId) ||
|
javascriptEventTargets.find((target) => target.node.id === selectedId) ||
|
||||||
javascriptEventTargets[0]
|
javascriptEventTargets[0]
|
||||||
|
// A Script API example is appended to the editor the user last worked in,
|
||||||
|
// falling back to the first event of the selected component.
|
||||||
|
const activeEventName = activeJavaScriptTarget?.eventNames.includes(focusedEventName)
|
||||||
|
? focusedEventName
|
||||||
|
: activeJavaScriptTarget?.eventNames[0] || ''
|
||||||
|
|
||||||
|
const appendScriptToEvent = (snippet: string) => {
|
||||||
|
if (!activeJavaScriptTarget || !activeEventName) return
|
||||||
|
const current = activeJavaScriptTarget.node.events[activeEventName] || ''
|
||||||
|
updateNodeEvent(
|
||||||
|
activeJavaScriptTarget.node.id,
|
||||||
|
activeEventName,
|
||||||
|
current.trim() ? `${current.replace(/\s+$/, '')}\n\n${snippet}` : snippet,
|
||||||
|
)
|
||||||
|
}
|
||||||
const endpointResultText = endpointResultModal
|
const endpointResultText = endpointResultModal
|
||||||
? typeof endpointResultModal.result === 'string'
|
? typeof endpointResultModal.result === 'string'
|
||||||
? endpointResultModal.result
|
? endpointResultModal.result
|
||||||
|
|
@ -3737,33 +3869,53 @@ const VisualComponentDesigner = () => {
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{workspaceTab === 'design' && (
|
<div className="flex items-center gap-2">
|
||||||
<div className="flex items-center rounded-md border border-slate-200 p-0.5 dark:border-slate-700">
|
{workspaceTab === 'design' && (
|
||||||
{(
|
<div className="flex items-center rounded-md border border-slate-200 p-0.5 dark:border-slate-700">
|
||||||
[
|
{(
|
||||||
['responsive', <FaDesktop key="r" />, 'Responsive'],
|
[
|
||||||
['desktop', <FaDesktop key="d" />, 'Desktop'],
|
['responsive', <FaDesktop key="r" />, 'Responsive'],
|
||||||
['tablet', <FaTabletAlt key="t" />, 'Tablet'],
|
['desktop', <FaDesktop key="d" />, 'Desktop'],
|
||||||
['mobile', <FaMobileAlt key="m" />, 'Mobile'],
|
['tablet', <FaTabletAlt key="t" />, 'Tablet'],
|
||||||
] as [DesignerDocument['canvas']['width'], React.ReactNode, string][]
|
['mobile', <FaMobileAlt key="m" />, 'Mobile'],
|
||||||
).map(([width, icon, label]) => (
|
] as [DesignerDocument['canvas']['width'], React.ReactNode, string][]
|
||||||
<button
|
).map(([width, icon, label]) => (
|
||||||
key={width}
|
<button
|
||||||
className={`rounded p-1.5 ${document.canvas.width === width ? 'bg-sky-100 text-sky-600 dark:bg-sky-950' : 'text-slate-400 hover:text-slate-700 dark:hover:text-slate-200'}`}
|
key={width}
|
||||||
title={label}
|
className={`rounded p-1.5 ${document.canvas.width === width ? 'bg-sky-100 text-sky-600 dark:bg-sky-950' : 'text-slate-400 hover:text-slate-700 dark:hover:text-slate-200'}`}
|
||||||
type="button"
|
title={label}
|
||||||
onClick={() =>
|
type="button"
|
||||||
commitDocument((current) => ({
|
onClick={() =>
|
||||||
...current,
|
commitDocument((current) => ({
|
||||||
canvas: { ...current.canvas, width },
|
...current,
|
||||||
}))
|
canvas: { ...current.canvas, width },
|
||||||
}
|
}))
|
||||||
>
|
}
|
||||||
{icon}
|
>
|
||||||
</button>
|
{icon}
|
||||||
))}
|
</button>
|
||||||
</div>
|
))}
|
||||||
)}
|
</div>
|
||||||
|
)}
|
||||||
|
{/* Reachable from every tab: the examples are just as useful while
|
||||||
|
laying out the page as they are inside the event editor. */}
|
||||||
|
<button
|
||||||
|
className={`flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs font-medium ${
|
||||||
|
scriptApiOpen
|
||||||
|
? 'border-sky-500 bg-sky-50 text-sky-600 dark:bg-sky-950'
|
||||||
|
: 'border-slate-200 text-slate-500 hover:text-slate-800 dark:border-slate-700 dark:hover:text-white'
|
||||||
|
}`}
|
||||||
|
title="Script API örnekleri (Ctrl+Shift+K)"
|
||||||
|
type="button"
|
||||||
|
onClick={() => setScriptApiOpen((current) => !current)}
|
||||||
|
>
|
||||||
|
<FaBolt />
|
||||||
|
Script API
|
||||||
|
<span className="rounded bg-sky-100 px-1 py-0.5 text-[9px] font-semibold text-sky-700 dark:bg-sky-900 dark:text-sky-300">
|
||||||
|
{DESIGNER_SCRIPT_RECIPES.length}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="min-h-0 flex-1 overflow-auto bg-slate-200 p-5 dark:bg-slate-950">
|
<div className="min-h-0 flex-1 overflow-auto bg-slate-200 p-5 dark:bg-slate-950">
|
||||||
|
|
@ -3881,6 +4033,38 @@ const VisualComponentDesigner = () => {
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{/* Every component on the page is addressable from any script,
|
||||||
|
which is what makes cross component behaviour possible. */}
|
||||||
|
<div className="mt-4 border-t border-slate-200 pt-3 dark:border-slate-800">
|
||||||
|
<h3 className="text-[11px] font-semibold uppercase tracking-wider text-slate-400">
|
||||||
|
Referanslar
|
||||||
|
</h3>
|
||||||
|
<p className="mb-2 mt-1 text-[10px] leading-4 text-slate-500">
|
||||||
|
Script içinden <code className="text-sky-600">refs.ad</code> ile erişin:{' '}
|
||||||
|
<code>setValue</code>, <code>setVisible</code>, <code>setEnabled</code>,{' '}
|
||||||
|
<code>setReadOnly</code>, <code>setText</code>, <code>setProps</code>,{' '}
|
||||||
|
<code>getValue</code>.
|
||||||
|
</p>
|
||||||
|
<div className="max-h-64 space-y-1 overflow-y-auto">
|
||||||
|
{[...documentRefs.entries()].map(([ref, node]) => (
|
||||||
|
<button
|
||||||
|
key={ref}
|
||||||
|
className="flex w-full items-center gap-2 rounded border border-transparent px-2 py-1 text-left hover:border-slate-200 hover:bg-white dark:hover:border-slate-700 dark:hover:bg-slate-900"
|
||||||
|
title="refs adını panoya kopyala"
|
||||||
|
type="button"
|
||||||
|
onClick={() => copyRefName(ref)}
|
||||||
|
>
|
||||||
|
<code className="min-w-0 flex-1 truncate text-[10px] text-sky-600">
|
||||||
|
{ref}
|
||||||
|
</code>
|
||||||
|
<span className="shrink-0 text-[9px] text-slate-400">{node.type}</span>
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
{!documentRefs.size && (
|
||||||
|
<p className="text-[10px] text-slate-400">Henüz komponent eklenmedi.</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="min-w-0 flex-1 overflow-y-auto p-5">
|
<div className="min-w-0 flex-1 overflow-y-auto p-5">
|
||||||
|
|
@ -3935,7 +4119,8 @@ const VisualComponentDesigner = () => {
|
||||||
{activeJavaScriptTarget.eventNames.map((eventName) => (
|
{activeJavaScriptTarget.eventNames.map((eventName) => (
|
||||||
<label
|
<label
|
||||||
key={eventName}
|
key={eventName}
|
||||||
className="overflow-hidden rounded-lg border border-slate-200 dark:border-slate-800"
|
className={`overflow-hidden rounded-lg border dark:border-slate-800 ${eventName === activeEventName ? 'border-amber-400' : 'border-slate-200'}`}
|
||||||
|
onFocus={() => setFocusedEventName(eventName)}
|
||||||
>
|
>
|
||||||
<span className="flex items-center justify-between bg-slate-50 px-3 py-2 text-xs font-semibold text-slate-700 dark:bg-slate-950 dark:text-slate-200">
|
<span className="flex items-center justify-between bg-slate-50 px-3 py-2 text-xs font-semibold text-slate-700 dark:bg-slate-950 dark:text-slate-200">
|
||||||
<code>{eventName}(event)</code>
|
<code>{eventName}(event)</code>
|
||||||
|
|
@ -4059,6 +4244,37 @@ const VisualComponentDesigner = () => {
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<code className="text-[10px] text-slate-400">{selectedNode.id}</code>
|
<code className="text-[10px] text-slate-400">{selectedNode.id}</code>
|
||||||
|
<div className="mt-2 border-t border-slate-200 pt-2 dark:border-slate-800">
|
||||||
|
<span className="flex items-center justify-between text-[10px] font-semibold uppercase tracking-wider text-slate-400">
|
||||||
|
Ref
|
||||||
|
<button
|
||||||
|
className="font-mono text-[10px] font-normal normal-case tracking-normal text-sky-600 hover:underline"
|
||||||
|
title="Panoya kopyala"
|
||||||
|
type="button"
|
||||||
|
onClick={() => copyRefName(selectedNode.ref || '')}
|
||||||
|
>
|
||||||
|
refs.{selectedNode.ref}
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
<input
|
||||||
|
className="mt-1 w-full rounded border border-slate-300 bg-white px-2 py-1 font-mono text-[11px] text-slate-700 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200"
|
||||||
|
spellCheck={false}
|
||||||
|
value={refDraft}
|
||||||
|
onBlur={commitRefRename}
|
||||||
|
onChange={(event) => setRefDraft(event.target.value)}
|
||||||
|
onKeyDown={(event) => {
|
||||||
|
if (event.key === 'Enter') event.currentTarget.blur()
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{refError ? (
|
||||||
|
<p className="mt-1 text-[10px] leading-4 text-red-500">{refError}</p>
|
||||||
|
) : (
|
||||||
|
<p className="mt-1 text-[10px] leading-4 text-slate-400">
|
||||||
|
Event scriptlerinden bu isimle erişilir. Yeniden adlandırdığınızda mevcut
|
||||||
|
scriptler otomatik güncellenir.
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
{selectedDefinition?.interfaceName && (
|
{selectedDefinition?.interfaceName && (
|
||||||
<div className="mt-2 border-t border-slate-200 pt-2 dark:border-slate-800">
|
<div className="mt-2 border-t border-slate-200 pt-2 dark:border-slate-800">
|
||||||
<div className="text-[10px] font-semibold text-sky-600">
|
<div className="text-[10px] font-semibold text-sky-600">
|
||||||
|
|
@ -4135,7 +4351,7 @@ const VisualComponentDesigner = () => {
|
||||||
>
|
>
|
||||||
<FaBolt />
|
<FaBolt />
|
||||||
</button>
|
</button>
|
||||||
<span className="pointer-events-none absolute right-0 top-full z-30 mt-1 hidden w-56 rounded-md border border-slate-200 bg-white p-2 text-left font-mono text-[9px] leading-4 text-sky-700 shadow-lg group-hover/snippet:block dark:border-slate-700 dark:bg-slate-950 dark:text-sky-300">
|
<span className="pointer-events-none absolute right-0 top-full z-20 mt-1 hidden w-56 rounded-md border border-slate-200 bg-white p-2 text-left font-mono text-[9px] leading-4 text-sky-700 shadow-lg group-hover/snippet:block dark:border-slate-700 dark:bg-slate-950 dark:text-sky-300">
|
||||||
{snippet}
|
{snippet}
|
||||||
<span className="mt-1 block font-sans text-[9px] text-slate-400">
|
<span className="mt-1 block font-sans text-[9px] text-slate-400">
|
||||||
Tıklayınca property değerine uygulanır.
|
Tıklayınca property değerine uygulanır.
|
||||||
|
|
@ -4184,6 +4400,121 @@ const VisualComponentDesigner = () => {
|
||||||
</aside>
|
</aside>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Everything an event script can do, as copy/paste examples filled in
|
||||||
|
with this page's own ref names and endpoints. It is a drawer rather
|
||||||
|
than a dialog on purpose: no backdrop, so the editor underneath stays
|
||||||
|
usable while an example is being read or pasted. */}
|
||||||
|
{scriptApiOpen && (
|
||||||
|
<aside className="fixed inset-y-0 right-0 z-[90] flex w-full max-w-md flex-col border-l border-slate-200 bg-white shadow-2xl dark:border-slate-700 dark:bg-slate-900">
|
||||||
|
<div className="flex shrink-0 items-start justify-between gap-3 border-b border-slate-200 px-4 py-3 dark:border-slate-800">
|
||||||
|
<div className="min-w-0">
|
||||||
|
<h2 className="flex items-center gap-2 text-sm font-semibold text-slate-800 dark:text-white">
|
||||||
|
<FaBolt className="text-amber-500" /> Script API — yapabilecekleriniz
|
||||||
|
<span className="shrink-0 rounded bg-sky-100 px-1.5 py-0.5 text-[9px] font-semibold text-sky-700 dark:bg-sky-950 dark:text-sky-300">
|
||||||
|
{DESIGNER_SCRIPT_RECIPES.length} örnek
|
||||||
|
</span>
|
||||||
|
</h2>
|
||||||
|
<code className="mt-1 block text-[10px] text-slate-400">
|
||||||
|
event · component · props · refs · api · notify
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
className="rounded p-1.5 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-slate-800 dark:hover:text-white"
|
||||||
|
title="Kapat (Esc)"
|
||||||
|
type="button"
|
||||||
|
onClick={() => setScriptApiOpen(false)}
|
||||||
|
>
|
||||||
|
×
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div className="shrink-0 border-b border-slate-200 px-4 py-3 dark:border-slate-800">
|
||||||
|
<input
|
||||||
|
className="w-full rounded-md border border-slate-300 bg-white px-3 py-1.5 text-xs text-slate-700 dark:border-slate-700 dark:bg-slate-950 dark:text-slate-200"
|
||||||
|
placeholder="Örnek ara: api, gizle, kaydet, ref…"
|
||||||
|
value={scriptApiSearch}
|
||||||
|
onChange={(event) => setScriptApiSearch(event.target.value)}
|
||||||
|
/>
|
||||||
|
{activeEventName ? (
|
||||||
|
<p className="mt-2 text-[10px] text-slate-500">
|
||||||
|
“Ekle” seçilen örneği{' '}
|
||||||
|
<code className="text-amber-600 dark:text-amber-400">{activeEventName}</code>{' '}
|
||||||
|
scriptinin sonuna yazar.
|
||||||
|
</p>
|
||||||
|
) : (
|
||||||
|
<p className="mt-2 text-[10px] text-slate-400">
|
||||||
|
Event sekmesinde bir script alanına tıklarsanız örnekleri doğrudan oraya
|
||||||
|
ekleyebilirsiniz.
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="min-h-0 flex-1 overflow-auto px-4 py-3">
|
||||||
|
{DESIGNER_SCRIPT_RECIPE_GROUPS.map((group) => {
|
||||||
|
const recipes = filteredScriptRecipes.filter((recipe) => recipe.group === group)
|
||||||
|
if (!recipes.length) return null
|
||||||
|
return (
|
||||||
|
<div key={group} className="mb-4 last:mb-0">
|
||||||
|
<h4 className="mb-2 text-[10px] font-semibold uppercase tracking-wider text-slate-400">
|
||||||
|
{group}
|
||||||
|
</h4>
|
||||||
|
<div className="grid gap-2">
|
||||||
|
{recipes.map((recipe) => {
|
||||||
|
const recipeCode = resolveRecipeCode(recipe.code)
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
key={recipe.title}
|
||||||
|
className="overflow-hidden rounded-md border border-slate-200 dark:border-slate-800"
|
||||||
|
>
|
||||||
|
<div className="flex items-start justify-between gap-2 px-3 pt-2">
|
||||||
|
<div className="min-w-0">
|
||||||
|
<div className="text-xs font-semibold text-slate-700 dark:text-slate-200">
|
||||||
|
{recipe.title}
|
||||||
|
</div>
|
||||||
|
<p className="text-[10px] leading-4 text-slate-400">
|
||||||
|
{recipe.description}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<span className="flex shrink-0 items-center gap-1">
|
||||||
|
{activeEventName && (
|
||||||
|
<button
|
||||||
|
className="rounded bg-amber-100 px-2 py-1 text-[9px] font-semibold text-amber-700 hover:bg-amber-200 dark:bg-amber-950 dark:text-amber-300"
|
||||||
|
title={`${activeEventName} scriptinin sonuna ekle`}
|
||||||
|
type="button"
|
||||||
|
onClick={() => appendScriptToEvent(recipeCode)}
|
||||||
|
>
|
||||||
|
Ekle
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
<button
|
||||||
|
className="rounded bg-sky-100 px-2 py-1 text-[9px] font-semibold text-sky-700 hover:bg-sky-200 dark:bg-sky-950 dark:text-sky-300"
|
||||||
|
type="button"
|
||||||
|
onClick={() =>
|
||||||
|
copyToClipboard(recipeCode, 'Örnek panoya kopyalandı.')
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Kopyala
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<pre className="mt-2 overflow-x-auto bg-slate-950 px-3 py-2 font-mono text-[10px] leading-4 text-sky-200">
|
||||||
|
{recipeCode}
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
{!filteredScriptRecipes.length && (
|
||||||
|
<p className="rounded-md border border-dashed border-slate-300 p-4 text-center text-xs text-slate-500 dark:border-slate-700">
|
||||||
|
Aramanızla eşleşen örnek yok.
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
)}
|
||||||
|
|
||||||
{catalogSourceEditor && (
|
{catalogSourceEditor && (
|
||||||
<div className="fixed inset-0 z-[100] flex items-center justify-center bg-slate-950/70 p-4">
|
<div className="fixed inset-0 z-[100] flex items-center justify-center bg-slate-950/70 p-4">
|
||||||
<div className="w-full max-w-2xl overflow-hidden rounded-xl border border-slate-200 bg-white shadow-2xl dark:border-slate-700 dark:bg-slate-900">
|
<div className="w-full max-w-2xl overflow-hidden rounded-xl border border-slate-200 bg-white shadow-2xl dark:border-slate-700 dark:bg-slate-900">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue