diff --git a/.github/workflows/netcore-build.yml b/.github/workflows/netcore-build.yml index be11e6d2..471a3200 100644 --- a/.github/workflows/netcore-build.yml +++ b/.github/workflows/netcore-build.yml @@ -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: @@ -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 @@ -104,7 +112,7 @@ jobs: steps: - name: Download artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: packs path: packs diff --git a/.gitignore b/.gitignore index 53b552cd..31f1937e 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/easydata.js/packs/core/package.json b/easydata.js/packs/core/package.json index 8b144aee..cbea10ff 100644 --- a/easydata.js/packs/core/package.json +++ b/easydata.js/packs/core/package.json @@ -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", @@ -30,4 +30,4 @@ "files": [ "dist" ] -} +} \ No newline at end of file diff --git a/easydata.js/packs/crud/package.json b/easydata.js/packs/crud/package.json index 03565405..c3e1cf37 100644 --- a/easydata.js/packs/crud/package.json +++ b/easydata.js/packs/crud/package.json @@ -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", @@ -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" diff --git a/easydata.js/packs/ui/assets/css/easy-dialog.css b/easydata.js/packs/ui/assets/css/easy-dialog.css index 9b4474b6..ca83e51e 100644 --- a/easydata.js/packs/ui/assets/css/easy-dialog.css +++ b/easydata.js/packs/ui/assets/css/easy-dialog.css @@ -85,6 +85,7 @@ justify-content: flex-start; padding: 20px; position: relative; + width: 100%; } .kdlg-footer.align-right { @@ -190,6 +191,7 @@ padding: 20px; font-size: 1em; color: #4a4a4a; + width: 100%; } diff --git a/easydata.js/packs/ui/package.json b/easydata.js/packs/ui/package.json index 20dbcd4d..eb07bfa1 100644 --- a/easydata.js/packs/ui/package.json +++ b/easydata.js/packs/ui/package.json @@ -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", @@ -35,7 +35,7 @@ "defaults" ], "peerDependencies": { - "@easydata/core": "^1.5.2" + "@easydata/core": "*" }, "files": [ "dist" diff --git a/easydata.js/version.json b/easydata.js/version.json index 96538026..6dd0b69d 100644 --- a/easydata.js/version.json +++ b/easydata.js/version.json @@ -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" } diff --git a/easydata.net/src/EasyData.AspNetCore/EasyData.AspNetCore.csproj b/easydata.net/src/EasyData.AspNetCore/EasyData.AspNetCore.csproj index 4151d1f1..6cc8f484 100644 --- a/easydata.net/src/EasyData.AspNetCore/EasyData.AspNetCore.csproj +++ b/easydata.net/src/EasyData.AspNetCore/EasyData.AspNetCore.csproj @@ -1,7 +1,7 @@  - netstandard2.0;netcoreapp3.1;net5.0;net6.0;net8.0 + netstandard2.0;netcoreapp3.1;net5.0;net6.0;net8.0;net9.0 false EasyData.AspNetCore ASP.NET Core classes for EasyData library. diff --git a/easydata.net/src/EasyData.Core/EasyData.Core.csproj b/easydata.net/src/EasyData.Core/EasyData.Core.csproj index dd86c185..deca7edd 100644 --- a/easydata.net/src/EasyData.Core/EasyData.Core.csproj +++ b/easydata.net/src/EasyData.Core/EasyData.Core.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net6.0;net8.0 + netstandard2.0;net6.0;net8.0;net9.0 EasyData Basic classes of EasyData library. EasyData.Core.xml diff --git a/easydata.net/src/EasyData.Core/Export/IDataExporter.cs b/easydata.net/src/EasyData.Core/Export/IDataExporter.cs index 9a843942..42e13208 100644 --- a/easydata.net/src/EasyData.Core/Export/IDataExporter.cs +++ b/easydata.net/src/EasyData.Core/Export/IDataExporter.cs @@ -53,6 +53,12 @@ public interface IDataExporter /// Gets the MIME content type of the exporting format. /// /// System.String. - string GetContentType(); + string GetContentType(); + + /// + /// Gets the preferred file extension by the exporting format. + /// + /// A string object that represents the file extension (without the dot) + string GetFileExtension(); } } diff --git a/easydata.net/src/EasyData.EntityFrameworkCore.Relational/EasyData.EntityFrameworkCore.Relational.csproj b/easydata.net/src/EasyData.EntityFrameworkCore.Relational/EasyData.EntityFrameworkCore.Relational.csproj index cf881d6b..c0443b25 100644 --- a/easydata.net/src/EasyData.EntityFrameworkCore.Relational/EasyData.EntityFrameworkCore.Relational.csproj +++ b/easydata.net/src/EasyData.EntityFrameworkCore.Relational/EasyData.EntityFrameworkCore.Relational.csproj @@ -1,7 +1,7 @@  - netstandard2.0;netstandard2.1;net5.0;net6.0;net8.0 + netstandard2.0;netstandard2.1;net5.0;net6.0;net8.0;net9.0 false EasyData.EntityFrameworkCore Entity Framework Core classes for EasyData library. @@ -32,6 +32,10 @@ + + + + diff --git a/easydata.net/src/EasyData.Exporters.ClosedXML/EasyData.Exporters.ClosedXML.csproj b/easydata.net/src/EasyData.Exporters.ClosedXML/EasyData.Exporters.ClosedXML.csproj index e81e167e..771d9476 100644 --- a/easydata.net/src/EasyData.Exporters.ClosedXML/EasyData.Exporters.ClosedXML.csproj +++ b/easydata.net/src/EasyData.Exporters.ClosedXML/EasyData.Exporters.ClosedXML.csproj @@ -12,11 +12,12 @@ - + + - + diff --git a/easydata.net/src/EasyData.Exporters.ClosedXML/Excel/ExcelDataExporter.cs b/easydata.net/src/EasyData.Exporters.ClosedXML/Excel/ExcelDataExporter.cs index b23fa25b..725bcc45 100644 --- a/easydata.net/src/EasyData.Exporters.ClosedXML/Excel/ExcelDataExporter.cs +++ b/easydata.net/src/EasyData.Exporters.ClosedXML/Excel/ExcelDataExporter.cs @@ -25,6 +25,15 @@ public string GetContentType() return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; } + /// + /// Gets the preferred file extension by the exporting format. + /// + /// A string object that represents the file extension (without the dot) + public string GetFileExtension() + { + return "xlsx"; + } + /// /// Gets default settings /// diff --git a/easydata.net/src/EasyData.Exporters.Default/Csv/CsvDataExporter.cs b/easydata.net/src/EasyData.Exporters.Default/Csv/CsvDataExporter.cs index 028ab49e..30e78aad 100644 --- a/easydata.net/src/EasyData.Exporters.Default/Csv/CsvDataExporter.cs +++ b/easydata.net/src/EasyData.Exporters.Default/Csv/CsvDataExporter.cs @@ -188,6 +188,15 @@ public string GetContentType() } + /// + /// Gets the preferred file extension by the exporting format. + /// + /// A string object that represents the file extension (without the dot) + public string GetFileExtension() + { + return "csv"; + } + /// /// Converts string into CVS format. /// diff --git a/easydata.net/src/EasyData.Exporters.Default/ExcelHtml/ExcelHtmlDataExporter.cs b/easydata.net/src/EasyData.Exporters.Default/ExcelHtml/ExcelHtmlDataExporter.cs index 70f548c5..05699d1b 100644 --- a/easydata.net/src/EasyData.Exporters.Default/ExcelHtml/ExcelHtmlDataExporter.cs +++ b/easydata.net/src/EasyData.Exporters.Default/ExcelHtml/ExcelHtmlDataExporter.cs @@ -31,5 +31,15 @@ public override string GetContentType() { return "application/vnd.ms-excel"; } + + + /// + /// Gets the preferred file extension by the exporting format. + /// + /// A string object that represents the file extension (without the dot) + public new string GetFileExtension() + { + return "xls"; + } } } diff --git a/easydata.net/src/EasyData.Exporters.Default/Html/HtmlDataExporter.cs b/easydata.net/src/EasyData.Exporters.Default/Html/HtmlDataExporter.cs index a8ee82b1..63b7c3f5 100644 --- a/easydata.net/src/EasyData.Exporters.Default/Html/HtmlDataExporter.cs +++ b/easydata.net/src/EasyData.Exporters.Default/Html/HtmlDataExporter.cs @@ -241,6 +241,14 @@ public virtual string GetContentType() return "text/html"; } + /// + /// Gets the preferred file extension by the exporting format. + /// + /// A string object that represents the file extension (without the dot) + public string GetFileExtension() + { + return "html"; + } /// /// Converts string into HTML format. diff --git a/easydata.net/src/EasyData.Exporters.PdfSharp/EasyData.Exporters.PdfSharp.csproj b/easydata.net/src/EasyData.Exporters.PdfSharp/EasyData.Exporters.PdfSharp.csproj index 85becdf5..a726f478 100644 --- a/easydata.net/src/EasyData.Exporters.PdfSharp/EasyData.Exporters.PdfSharp.csproj +++ b/easydata.net/src/EasyData.Exporters.PdfSharp/EasyData.Exporters.PdfSharp.csproj @@ -12,7 +12,8 @@ - + + diff --git a/easydata.net/src/EasyData.Exporters.PdfSharp/Pdf/PdfDataExporter.cs b/easydata.net/src/EasyData.Exporters.PdfSharp/Pdf/PdfDataExporter.cs index fc39f0fc..af3fedb8 100644 --- a/easydata.net/src/EasyData.Exporters.PdfSharp/Pdf/PdfDataExporter.cs +++ b/easydata.net/src/EasyData.Exporters.PdfSharp/Pdf/PdfDataExporter.cs @@ -26,6 +26,14 @@ public string GetContentType() return "application/pdf"; } + /// + /// Gets the preferred file extension by the exporting format. + /// + /// A string object that represents the file extension (without the dot) + public string GetFileExtension() + { + return "pdf"; + } /// /// Gets default settings /// @@ -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); @@ -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(); diff --git a/easydata.net/version.json b/easydata.net/version.json index 420a7b6d..3c8a1666 100644 --- a/easydata.net/version.json +++ b/easydata.net/version.json @@ -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" } diff --git a/playground/EasyDataAspNetCoreTest01/EasyDataAspNetCoreTest01.csproj b/playground/EasyDataAspNetCoreTest01/EasyDataAspNetCoreTest01.csproj index d0b15939..ff8fcfa0 100644 --- a/playground/EasyDataAspNetCoreTest01/EasyDataAspNetCoreTest01.csproj +++ b/playground/EasyDataAspNetCoreTest01/EasyDataAspNetCoreTest01.csproj @@ -9,12 +9,14 @@ - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + diff --git a/playground/EasyDataAspNetCoreTest01/Startup.cs b/playground/EasyDataAspNetCoreTest01/Startup.cs index 08e43085..4b97e25a 100644 --- a/playground/EasyDataAspNetCoreTest01/Startup.cs +++ b/playground/EasyDataAspNetCoreTest01/Startup.cs @@ -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(options => - options.UseSqlServer(Configuration.GetConnectionString("EasyDataDB"))); + options.UseSqlite(connectionString) + //options.UseSqlServer(connectionString) + ); services.AddRazorPages(); } @@ -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(); diff --git a/playground/EasyDataAspNetCoreTest01/appsettings.json b/playground/EasyDataAspNetCoreTest01/appsettings.json index c476c1fc..0539b82a 100644 --- a/playground/EasyDataAspNetCoreTest01/appsettings.json +++ b/playground/EasyDataAspNetCoreTest01/appsettings.json @@ -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" + } } diff --git a/playground/EasyDataAspNetCoreTest01/package.json b/playground/EasyDataAspNetCoreTest01/package.json index 9a11e08d..f0a9e632 100644 --- a/playground/EasyDataAspNetCoreTest01/package.json +++ b/playground/EasyDataAspNetCoreTest01/package.json @@ -9,7 +9,7 @@ "watch": "rollup --config -w" }, "dependencies": { - "@easydata/ui": "^1.4.20", - "@easydata/crud": "^1.4.20" + "@easydata/ui": "*", + "@easydata/crud": "*" } } diff --git a/playground/EasyDataAspNetCoreTest03/EasyDataAspNetCoreTest03.csproj b/playground/EasyDataAspNetCoreTest03/EasyDataAspNetCoreTest03.csproj index 7d0c1818..ae2298bf 100644 --- a/playground/EasyDataAspNetCoreTest03/EasyDataAspNetCoreTest03.csproj +++ b/playground/EasyDataAspNetCoreTest03/EasyDataAspNetCoreTest03.csproj @@ -1,7 +1,7 @@  - net6.0 + net9.0 disable @@ -9,9 +9,9 @@ - - - + + + diff --git a/setup_dev.bat b/setup-dev.bat similarity index 94% rename from setup_dev.bat rename to setup-dev.bat index 19ac95e0..c46aa118 100644 --- a/setup_dev.bat +++ b/setup-dev.bat @@ -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