Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.5.7 #195

Merged
merged 21 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/netcore-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,18 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Setup .NET 7
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'
- name: Setup .NET 6
uses: actions/setup-dotnet@v4
with:
Expand Down Expand Up @@ -70,7 +78,7 @@ jobs:
run: dotnet test EasyData.Dev.sln --no-restore --verbosity minimal

- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: packs
path: ./easydata.net/packs/**/*.nupkg
Expand Down Expand Up @@ -104,7 +112,7 @@ jobs:

steps:
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: packs
path: packs
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -392,4 +392,6 @@ docs2
/playground/EasyDataAspNetCoreTest01/wwwroot/js/easydata-all.js
/playground/EasyDataAspNetCoreTest01/wwwroot/js/easydata-all.min.js
easydata.js/.npmrc
/playground/EasyDataAspNetCoreTest01
/playground/EasyDataAspNetCoreTest01/eqdemo-sqlite.db
/playground/EasyDataAspNetCoreTest01/eqdemo-sqlite.db-shm
/playground/EasyDataAspNetCoreTest01/eqdemo-sqlite.db-wal
4 changes: 2 additions & 2 deletions easydata.js/packs/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@easydata/core",
"version": "1.5.2",
"version": "1.5.5",
"description": "EasyData.JS core functions, classes, and data structures",
"types": "./dist/types/public_api.d.ts",
"main": "./dist/easydata.core.cjs.js",
Expand Down Expand Up @@ -30,4 +30,4 @@
"files": [
"dist"
]
}
}
6 changes: 3 additions & 3 deletions easydata.js/packs/crud/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@easydata/crud",
"version": "1.5.2",
"version": "1.5.5",
"description": "EasyData.JS UI widgets and views for CRUD manipulations",
"types": "./dist/types/public_api.d.ts",
"main": "./dist/easydata.crud.cjs.js",
Expand Down Expand Up @@ -31,8 +31,8 @@
"defaults and supports es6-module"
],
"peerDependencies": {
"@easydata/core": "^1.5.2",
"@easydata/ui": "^1.5.2"
"@easydata/core": "*",
"@easydata/ui": "*"
},
"files": [
"dist"
Expand Down
2 changes: 2 additions & 0 deletions easydata.js/packs/ui/assets/css/easy-dialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
justify-content: flex-start;
padding: 20px;
position: relative;
width: 100%;
}

.kdlg-footer.align-right {
Expand Down Expand Up @@ -190,6 +191,7 @@
padding: 20px;
font-size: 1em;
color: #4a4a4a;
width: 100%;
}


Expand Down
4 changes: 2 additions & 2 deletions easydata.js/packs/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@easydata/ui",
"version": "1.5.2",
"version": "1.5.5",
"description": "EasyData.JS: DOM manipulation functions and UI widgets",
"types": "./dist/types/public_api.d.ts",
"main": "./dist/easydata.ui.cjs.js",
Expand Down Expand Up @@ -35,7 +35,7 @@
"defaults"
],
"peerDependencies": {
"@easydata/core": "^1.5.2"
"@easydata/core": "*"
},
"files": [
"dist"
Expand Down
6 changes: 3 additions & 3 deletions easydata.js/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "1.5.5",
"baseVersion": "1.5.5",
"assetVersion": "01_05_05",
"version": "1.5.7",
"baseVersion": "1.5.7",
"assetVersion": "01_05_07",
"tag": "latest"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0;net6.0;net8.0;net9.0</TargetFrameworks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<RootNamespace>EasyData.AspNetCore</RootNamespace>
<Description>ASP.NET Core classes for EasyData library.</Description>
Expand Down
2 changes: 1 addition & 1 deletion easydata.net/src/EasyData.Core/EasyData.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0;net8.0;net9.0</TargetFrameworks>
<RootNamespace>EasyData</RootNamespace>
<Description>Basic classes of EasyData library.</Description>
<DocumentationFile>EasyData.Core.xml</DocumentationFile>
Expand Down
8 changes: 7 additions & 1 deletion easydata.net/src/EasyData.Core/Export/IDataExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ public interface IDataExporter
/// Gets the MIME content type of the exporting format.
/// </summary>
/// <returns>System.String.</returns>
string GetContentType();
string GetContentType();

/// <summary>
/// Gets the preferred file extension by the exporting format.
/// </summary>
/// <returns>A string object that represents the file extension (without the dot)</returns>
string GetFileExtension();
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0;net8.0;net9.0</TargetFrameworks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<RootNamespace>EasyData.EntityFrameworkCore</RootNamespace>
<Description>Entity Framework Core classes for EasyData library.</Description>
Expand Down Expand Up @@ -32,6 +32,10 @@
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0'">
<Compile Remove="Extensions\EfCore2Extensions.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClosedXML" Version="0.102.2" />
<PackageReference Include="System.Memory" Version="4.5.5" />
<PackageReference Include="ClosedXML" Version="0.104.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\EasyData.Core\EasyData.Core.csproj" />
<ProjectReference Include="..\EasyData.Core\EasyData.Core.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ public string GetContentType()
return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
}

/// <summary>
/// Gets the preferred file extension by the exporting format.
/// </summary>
/// <returns>A string object that represents the file extension (without the dot)</returns>
public string GetFileExtension()
{
return "xlsx";
}

/// <summary>
/// Gets default settings
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@ public string GetContentType()
}


/// <summary>
/// Gets the preferred file extension by the exporting format.
/// </summary>
/// <returns>A string object that represents the file extension (without the dot)</returns>
public string GetFileExtension()
{
return "csv";
}

/// <summary>
/// Converts string into CVS format.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,15 @@ public override string GetContentType()
{
return "application/vnd.ms-excel";
}


/// <summary>
/// Gets the preferred file extension by the exporting format.
/// </summary>
/// <returns>A string object that represents the file extension (without the dot)</returns>
public new string GetFileExtension()
{
return "xls";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,14 @@ public virtual string GetContentType()
return "text/html";
}

/// <summary>
/// Gets the preferred file extension by the exporting format.
/// </summary>
/// <returns>A string object that represents the file extension (without the dot)</returns>
public string GetFileExtension()
{
return "html";
}

/// <summary>
/// Converts string into HTML format.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PdfSharp.MigraDoc.Standard" Version="1.51.15" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.1" />
<PackageReference Include="PDFsharp-MigraDoc" Version="6.1.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ public string GetContentType()
return "application/pdf";
}

/// <summary>
/// Gets the preferred file extension by the exporting format.
/// </summary>
/// <returns>A string object that represents the file extension (without the dot)</returns>
public string GetFileExtension()
{
return "pdf";
}
/// <summary>
/// Gets default settings
/// </summary>
Expand Down Expand Up @@ -91,8 +99,9 @@ public async Task ExportAsync(IEasyDataResultSet data, Stream stream, IDataExpor

var document = new Document();
document.Info.Title = pdfSettings.Title;
document.DefaultPageSetup.Orientation = pdfSettings.Orientation;
document.DefaultPageSetup.PageFormat = pdfSettings.PageFormat;
var pageSetup = document.DefaultPageSetup.Clone();
pageSetup.Orientation = pdfSettings.Orientation;
pageSetup.PageFormat = pdfSettings.PageFormat;

ApplyStyles(document, pdfSettings);

Expand Down Expand Up @@ -261,8 +270,10 @@ Task WriteRowAsync(EasyDataRow row, bool isExtra = false,
await pdfSettings.BeforeRowInsert(null, WriteExtraRowAsync, ct);
}

System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);

// rendering pdf
var pdfRenderer = new PdfDocumentRenderer(true);
var pdfRenderer = new PdfDocumentRenderer();
pdfRenderer.Document = document;
pdfRenderer.RenderDocument();

Expand Down
6 changes: 3 additions & 3 deletions easydata.net/version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"assemblyVersion": "1.5.6.1",
"packageVersion": "1.5.6",
"assetVersion": "01_05_06"
"assemblyVersion": "1.5.7.3",
"packageVersion": "1.5.7",
"assetVersion": "01_05_07"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
<ItemGroup>
<PackageReference Include="Korzh.DbUtils.Import" Version="1.4.1" />
<PackageReference Include="Korzh.DbUtils.SqlServer" Version="1.4.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.19">
<PackageReference Include="Korzh.DbUtils.Sqlite" Version="1.4.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.19">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.19" />
</ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.19" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\easydata.net\src\EasyData.AspNetCore\EasyData.AspNetCore.csproj" />
Expand Down
9 changes: 7 additions & 2 deletions playground/EasyDataAspNetCoreTest01/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ public Startup(IConfiguration configuration)
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
var connectionString = Configuration.GetConnectionString("EasyDataDb");
services.AddDbContext<AppDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("EasyDataDB")));
options.UseSqlite(connectionString)
//options.UseSqlServer(connectionString)
);

services.AddRazorPages();
}
Expand Down Expand Up @@ -128,7 +131,9 @@ private static void EnsureDbInitialized(IApplicationBuilder app, IConfiguration
if (context.Database.EnsureCreated())
{
DbInitializer.Create(options => {
options.UseSqlServer(config.GetConnectionString("EasyDataDB"));
//options.UseSqlServer(config.GetConnectionString("EasyDataDB"));

options.UseSqlite(config.GetConnectionString("EasyDataDB"));
options.UseZipPacker(System.IO.Path.Combine(env.ContentRootPath, "App_Data", "EdDemoData.zip"));
})
.Seed();
Expand Down
4 changes: 3 additions & 1 deletion playground/EasyDataAspNetCoreTest01/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"EasyDataDB": "Server=(localdb)\\MSSQLLocalDB;Database=EasyDataDB01;Trusted_Connection=True;"
//"EasyDataDb": "Server=(localdb)\\MSSQLLocalDB;Database=EasyDataDB01;Trusted_Connection=True;",
"EasyDataDb": "Data Source=eqdemo-sqlite.db"

}
}
4 changes: 2 additions & 2 deletions playground/EasyDataAspNetCoreTest01/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"watch": "rollup --config -w"
},
"dependencies": {
"@easydata/ui": "^1.4.20",
"@easydata/crud": "^1.4.20"
"@easydata/ui": "*",
"@easydata/crud": "*"
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Korzh.DbUtils.Import" Version="1.4.1" />
<PackageReference Include="Korzh.DbUtils.SqlServer" Version="1.4.1" />

<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions setup_dev.bat → setup-dev.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
call npm install
call npm run build
call npm link -ws
call npm install
call npm run build
call npm link -ws
Loading