From 6e60e2e58cb21c8e7239ba1f0907265bb2b7abe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Thu, 22 Feb 2024 14:13:20 +0100 Subject: [PATCH 01/95] Update NuGet versions to pre-release. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 481233512..de44fca9d 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -34,8 +34,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 4fe5c3c97..a9c7cc4dc 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -41,9 +41,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index d8020ba2f..d99eaf578 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From fc8bb6bb03af2a711bbb577d071c885a322c77fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 24 Feb 2024 02:05:26 +0100 Subject: [PATCH 02/95] Remove "using Newtonsoft.Json" --- .../Controllers/Api/RowsController.cs | 6 +- .../Controllers/TableController.cs | 6 +- .../DataTableDataProviderExtensions.cs | 4 +- .../Liquid/ActionsLiquidFilter.cs | 4 +- Lombiq.DataTables/Lombiq.DataTables.csproj | 1 - .../Models/DataTableChildRowResponse.cs | 5 +- Lombiq.DataTables/Models/DataTableColumn.cs | 5 +- .../Models/DataTableDataRequest.cs | 5 +- .../Models/DataTableDataResponse.cs | 7 +- Lombiq.DataTables/Models/DataTableOrder.cs | 5 +- Lombiq.DataTables/Models/DataTableRow.cs | 13 +- .../Models/DataTableSearchParameters.cs | 5 +- Lombiq.DataTables/Models/ExportDate.cs | 9 +- Lombiq.DataTables/Models/ExportLink.cs | 14 +- Lombiq.DataTables/Models/VueModel.cs | 47 +++--- Lombiq.DataTables/Models/VueModelCheckbox.cs | 12 +- .../Services/DataTableDataProviderBase.cs | 21 ++- .../Services/ExcelDataTableExportService.cs | 39 +++-- .../IndexBasedDataTableDataProvider.cs | 6 +- .../DataTableDefinitionViewModel.cs | 6 +- .../Views/Lombiq.DataTable.cshtml | 156 ++++++++---------- 21 files changed, 184 insertions(+), 192 deletions(-) diff --git a/Lombiq.DataTables/Controllers/Api/RowsController.cs b/Lombiq.DataTables/Controllers/Api/RowsController.cs index ab162dd16..3555f78a6 100644 --- a/Lombiq.DataTables/Controllers/Api/RowsController.cs +++ b/Lombiq.DataTables/Controllers/Api/RowsController.cs @@ -3,9 +3,9 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Localization; -using Newtonsoft.Json; using System.Collections.Generic; using System.Linq; +using System.Text.Json; using System.Threading.Tasks; namespace Lombiq.DataTables.Controllers.Api; @@ -57,7 +57,7 @@ public async Task> Get(string requestJson) { if (string.IsNullOrEmpty(requestJson)) return BadRequest(); - var request = JsonConvert.DeserializeObject(requestJson); + var request = JsonSerializer.Deserialize(requestJson); var dataProvider = _dataTableDataProviderAccessor.GetDataProvider(request.DataProvider); if (dataProvider == null) { @@ -90,7 +90,7 @@ public async Task> Export( string name = null, bool exportAll = true) { - var request = JsonConvert.DeserializeObject(requestJson); + var request = JsonSerializer.Deserialize(requestJson); if (exportAll) { request.Start = 0; diff --git a/Lombiq.DataTables/Controllers/TableController.cs b/Lombiq.DataTables/Controllers/TableController.cs index d1e39360c..8825f2f0e 100644 --- a/Lombiq.DataTables/Controllers/TableController.cs +++ b/Lombiq.DataTables/Controllers/TableController.cs @@ -2,10 +2,10 @@ using Lombiq.DataTables.ViewModels; using Lombiq.HelpfulLibraries.OrchardCore.Mvc; using Microsoft.AspNetCore.Mvc; -using Newtonsoft.Json.Linq; using OrchardCore.Admin; using System.Collections.Generic; using System.Linq; +using System.Text.Json; using System.Threading.Tasks; namespace Lombiq.DataTables.Controllers; @@ -23,7 +23,9 @@ public async Task Get(string providerName, string queryId = null, { var provider = _dataTableDataProviders.Single(provider => provider.Name == providerName); if (string.IsNullOrEmpty(queryId)) queryId = providerName; - var definition = new DataTableDefinitionViewModel(JObject.FromObject(new { paging, viewAction })) + + var additionalDatatableOptions = JsonSerializer.SerializeToNode(new { paging, viewAction })!.AsObject(); + var definition = new DataTableDefinitionViewModel(additionalDatatableOptions) { DataProvider = providerName, QueryId = queryId, diff --git a/Lombiq.DataTables/Extensions/DataTableDataProviderExtensions.cs b/Lombiq.DataTables/Extensions/DataTableDataProviderExtensions.cs index 6d120e0a8..9521f396c 100644 --- a/Lombiq.DataTables/Extensions/DataTableDataProviderExtensions.cs +++ b/Lombiq.DataTables/Extensions/DataTableDataProviderExtensions.cs @@ -5,13 +5,13 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Localization; -using Newtonsoft.Json; using OrchardCore.Mvc.Core.Utilities; using OrchardCore.Security.Permissions; using System; using System.Collections.Generic; using System.Linq; using System.Security.Claims; +using System.Text.Json; using System.Threading.Tasks; using static Lombiq.DataTables.Constants.SortingDirection; @@ -167,7 +167,7 @@ public static string GetCustomActionsJson( IHttpContextAccessor hca, LinkGenerator linkGenerator, IStringLocalizer actionsStringLocalizer) => - JsonConvert.SerializeObject(GetCustomActions( + JsonSerializer.Serialize(GetCustomActions( dataProvider, contentItemId, canDelete, diff --git a/Lombiq.DataTables/Liquid/ActionsLiquidFilter.cs b/Lombiq.DataTables/Liquid/ActionsLiquidFilter.cs index 3a4928467..4c4b5289e 100644 --- a/Lombiq.DataTables/Liquid/ActionsLiquidFilter.cs +++ b/Lombiq.DataTables/Liquid/ActionsLiquidFilter.cs @@ -5,13 +5,13 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Localization; -using Newtonsoft.Json.Linq; using OrchardCore.ContentManagement; using OrchardCore.DisplayManagement; using OrchardCore.Liquid; using System; using System.IO; using System.Text.Encodings.Web; +using System.Text.Json.Nodes; using System.Threading.Tasks; namespace Lombiq.DataTables.Liquid; @@ -71,7 +71,7 @@ public ValueTask ProcessAsync(FluidValue input, FilterArguments argu FluidValues.Object => input!.ToObjectValue() switch { ActionsDescriptor model => FromObjectAsync(model, title, returnUrl), - JToken jToken => FromObjectAsync(jToken.ToObject(), title, returnUrl), + JsonNode jsonNode => FromObjectAsync(jsonNode.ToObject(), title, returnUrl), { } unknown => throw GetException(unknown), _ => throw new ArgumentNullException(nameof(input)), }, diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index ef5fe5a95..76860d36f 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,7 +39,6 @@ - diff --git a/Lombiq.DataTables/Models/DataTableChildRowResponse.cs b/Lombiq.DataTables/Models/DataTableChildRowResponse.cs index 39858db81..69cdf84c8 100644 --- a/Lombiq.DataTables/Models/DataTableChildRowResponse.cs +++ b/Lombiq.DataTables/Models/DataTableChildRowResponse.cs @@ -1,9 +1,8 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; +using System.Text.Json.Serialization; namespace Lombiq.DataTables.Models; -[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] +[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableChildRowResponse { public string Error { get; set; } diff --git a/Lombiq.DataTables/Models/DataTableColumn.cs b/Lombiq.DataTables/Models/DataTableColumn.cs index 3f68b4e8f..e126bd22f 100644 --- a/Lombiq.DataTables/Models/DataTableColumn.cs +++ b/Lombiq.DataTables/Models/DataTableColumn.cs @@ -1,9 +1,8 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; +using System.Text.Json.Serialization; namespace Lombiq.DataTables.Models; -[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] +[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableColumn { public string Data { get; set; } diff --git a/Lombiq.DataTables/Models/DataTableDataRequest.cs b/Lombiq.DataTables/Models/DataTableDataRequest.cs index 97634a552..5f9f78715 100644 --- a/Lombiq.DataTables/Models/DataTableDataRequest.cs +++ b/Lombiq.DataTables/Models/DataTableDataRequest.cs @@ -1,11 +1,10 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; using System.Collections.Generic; using System.Linq; +using System.Text.Json.Serialization; namespace Lombiq.DataTables.Models; -[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] +[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableDataRequest { public string QueryId { get; set; } diff --git a/Lombiq.DataTables/Models/DataTableDataResponse.cs b/Lombiq.DataTables/Models/DataTableDataResponse.cs index 0a228a5ca..68f9b09a0 100644 --- a/Lombiq.DataTables/Models/DataTableDataResponse.cs +++ b/Lombiq.DataTables/Models/DataTableDataResponse.cs @@ -1,11 +1,10 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; using System; using System.Collections.Generic; +using System.Text.Json.Serialization; namespace Lombiq.DataTables.Models; -[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] +[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableDataResponse { /// @@ -15,7 +14,7 @@ public class DataTableDataResponse /// /// For internal use only. It's overwritten during normal use. /// - [JsonProperty] + [JsonInclude] internal int Draw { get; set; } /// diff --git a/Lombiq.DataTables/Models/DataTableOrder.cs b/Lombiq.DataTables/Models/DataTableOrder.cs index 8184a3700..7dead8238 100644 --- a/Lombiq.DataTables/Models/DataTableOrder.cs +++ b/Lombiq.DataTables/Models/DataTableOrder.cs @@ -1,10 +1,9 @@ using Lombiq.DataTables.Constants; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; +using System.Text.Json.Serialization; namespace Lombiq.DataTables.Models; -[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] +[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableOrder { public string Column { get; set; } diff --git a/Lombiq.DataTables/Models/DataTableRow.cs b/Lombiq.DataTables/Models/DataTableRow.cs index 6bdde4cd7..23fa03e17 100644 --- a/Lombiq.DataTables/Models/DataTableRow.cs +++ b/Lombiq.DataTables/Models/DataTableRow.cs @@ -1,16 +1,15 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using Newtonsoft.Json.Serialization; using System.Collections.Generic; using System.Linq; +using System.Text.Json.Nodes; +using System.Text.Json.Serialization; namespace Lombiq.DataTables.Models; -[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] +[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableRow { [JsonExtensionData] - internal IDictionary ValuesDictionary { get; set; } + internal IDictionary ValuesDictionary { get; set; } public int Id { get; set; } @@ -20,9 +19,9 @@ public string this[string name] set => ValuesDictionary[name] = value; } - public DataTableRow() => ValuesDictionary = new Dictionary(); + public DataTableRow() => ValuesDictionary = new Dictionary(); - public DataTableRow(int id, IDictionary valuesDictionary) + public DataTableRow(int id, IDictionary valuesDictionary) { Id = id; ValuesDictionary = valuesDictionary; diff --git a/Lombiq.DataTables/Models/DataTableSearchParameters.cs b/Lombiq.DataTables/Models/DataTableSearchParameters.cs index a43b9cd18..908f84918 100644 --- a/Lombiq.DataTables/Models/DataTableSearchParameters.cs +++ b/Lombiq.DataTables/Models/DataTableSearchParameters.cs @@ -1,9 +1,8 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; +using System.Text.Json.Serialization; namespace Lombiq.DataTables.Models; -[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))] +[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableSearchParameters { public string Value { get; set; } diff --git a/Lombiq.DataTables/Models/ExportDate.cs b/Lombiq.DataTables/Models/ExportDate.cs index b8b82671a..d454e3907 100644 --- a/Lombiq.DataTables/Models/ExportDate.cs +++ b/Lombiq.DataTables/Models/ExportDate.cs @@ -1,7 +1,7 @@ -using Newtonsoft.Json.Linq; using NodaTime; using System; using System.Diagnostics.CodeAnalysis; +using System.Text.Json.Nodes; namespace Lombiq.DataTables.Models; @@ -21,10 +21,11 @@ public class ExportDate public int Day { get; set; } public string ExcelFormat { get; set; } - public static bool IsInstance(JObject jObject) => - jObject[nameof(Type)]?.ToString() == nameof(ExportDate); + public static bool IsInstance(JsonObject jsonObject) => + jsonObject[nameof(Type)]?.ToString() == nameof(ExportDate); - public static string GetText(JObject jObject) => ((LocalDate)jObject.ToObject()).ToShortDateString(); + public static string GetText(JsonObject jsonObject) => + ((LocalDate)jsonObject.ToObject()).ToShortDateString(); public static implicit operator ExportDate(LocalDate localDate) => new() diff --git a/Lombiq.DataTables/Models/ExportLink.cs b/Lombiq.DataTables/Models/ExportLink.cs index e03388470..2316f2e04 100644 --- a/Lombiq.DataTables/Models/ExportLink.cs +++ b/Lombiq.DataTables/Models/ExportLink.cs @@ -1,9 +1,9 @@ #nullable enable -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Text.Json.Nodes; +using System.Text.Json.Serialization; namespace Lombiq.DataTables.Models; @@ -18,12 +18,12 @@ public class ExportLink #pragma warning restore IDE0079 // Remove unnecessary suppression public string Type => nameof(ExportLink); public string Url { get; set; } - public JToken Text { get; set; } + public JsonNode Text { get; set; } - [JsonProperty] + [JsonInclude] public IDictionary Attributes { get; internal set; } = new Dictionary(); - public ExportLink(string url, JToken text, IDictionary? attributes = null) + public ExportLink(string url, JsonNode text, IDictionary? attributes = null) { Url = url; Text = text; @@ -32,8 +32,8 @@ public ExportLink(string url, JToken text, IDictionary? attribut public override string ToString() => Text.ToString(); - public static bool IsInstance(JObject jObject) => + public static bool IsInstance(JsonObject jObject) => jObject[nameof(Type)]?.ToString() == nameof(ExportLink); - public static string? GetText(JObject jObject) => jObject[nameof(Text)]?.ToString(); + public static string? GetText(JsonObject jObject) => jObject[nameof(Text)]?.ToString(); } diff --git a/Lombiq.DataTables/Models/VueModel.cs b/Lombiq.DataTables/Models/VueModel.cs index 44fbcf852..6d7570140 100644 --- a/Lombiq.DataTables/Models/VueModel.cs +++ b/Lombiq.DataTables/Models/VueModel.cs @@ -1,14 +1,15 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Localization; using Microsoft.AspNetCore.Mvc.Routing; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using OrchardCore.ContentManagement; using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; +using System.Text.Json; +using System.Text.Json.Nodes; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Lombiq.DataTables.Models; @@ -20,44 +21,51 @@ public class VueModel /// component property client-side. Even then, you need to provide either this or if the /// column is meant to be . /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("text")] public string Text { get; set; } /// /// Gets or sets the HTML content to be rendered inside the cell. When used and are ignored. /// - [JsonProperty("html", NullValueHandling = NullValueHandling.Ignore)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("html")] public string Html { get; set; } /// /// Gets or sets the value used for sorting. If or empty, the value of is /// used for sorting. /// - [JsonProperty("sort", NullValueHandling = NullValueHandling.Ignore)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("sort")] public object Sort { get; set; } /// /// Gets or sets the URL to be used in the href attributes. When this is used is ignored. /// - [JsonProperty("href", NullValueHandling = NullValueHandling.Ignore)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("href")] public string Href { get; set; } - [JsonProperty("multipleLinks", NullValueHandling = NullValueHandling.Ignore)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("multipleLinks")] public IEnumerable MultipleLinks { get; set; } /// /// Gets or sets the Bootstrap badge class of the cell. To be used along with and optionally . /// - [JsonProperty("badge", NullValueHandling = NullValueHandling.Ignore)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("badge")] public object Badge { get; set; } /// /// Gets or sets the data used as extra information to be consumed by special event so the contents can be /// updated with JavaScript on client side before each render. /// - [JsonProperty("special", NullValueHandling = NullValueHandling.Ignore)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("special")] public object Special { get; set; } /// @@ -75,8 +83,9 @@ public class VueModel [JsonIgnore] public IEnumerable HiddenInputs { get; set; } - [JsonProperty("hiddenInput", NullValueHandling = NullValueHandling.Ignore)] - [SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "It's used by JSON.NET.")] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("hiddenInput")] + [SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "It's used by STJ.")] private object HiddenInputSerialize { get => (object)HiddenInput ?? HiddenInputs; @@ -84,10 +93,10 @@ private object HiddenInputSerialize { switch (value) { - case JArray hiddenInputs: + case JsonArray hiddenInputs: HiddenInputs = hiddenInputs.ToObject>(); break; - case JObject hiddenInput: + case JsonObject hiddenInput: HiddenInput = hiddenInput.ToObject(); break; case null: @@ -126,14 +135,14 @@ public VueModel SetHiddenInput(string name, string value) return this; } - public static async Task TableToJsonAsync( + public static async Task TableToJsonAsync( IEnumerable collection, Func>> select) { var rows = (await collection.AwaitEachAsync(select)) .Select((row, rowIndex) => { - var castRow = row.ToDictionary(pair => pair.Key, pair => JToken.FromObject(pair.Value)); + var castRow = row.ToDictionary(pair => pair.Key, pair => JsonSerializer.SerializeToNode(pair.Value)); castRow["$rowIndex"] = rowIndex; return castRow; }); @@ -153,19 +162,19 @@ public static IDictionary CreateTextForIcbinDataTable(IHtmlLocal public class HiddenInputValue { - [JsonProperty("name")] + [JsonPropertyName("name")] public string Name { get; set; } - [JsonProperty("value")] + [JsonPropertyName("value")] public string Value { get; set; } } public class MultipleHrefValue { - [JsonProperty("url")] + [JsonPropertyName("url")] public string Url { get; set; } - [JsonProperty("text")] + [JsonPropertyName("text")] public string Text { get; set; } } diff --git a/Lombiq.DataTables/Models/VueModelCheckbox.cs b/Lombiq.DataTables/Models/VueModelCheckbox.cs index 1d3192292..7361ff5b7 100644 --- a/Lombiq.DataTables/Models/VueModelCheckbox.cs +++ b/Lombiq.DataTables/Models/VueModelCheckbox.cs @@ -1,5 +1,5 @@ -using Newtonsoft.Json; using System.Diagnostics.CodeAnalysis; +using System.Text.Json.Serialization; namespace Lombiq.DataTables.Models; @@ -13,18 +13,18 @@ public class VueModelCheckbox "CA1822:Mark members as static", Justification = "It's necessary to be instance-level for JSON serialization.")] #pragma warning restore IDE0079 // Remove unnecessary suppression - [JsonProperty("type")] + [JsonPropertyName("type")] public string Type => "checkbox"; - [JsonProperty("name")] + [JsonPropertyName("name")] public string Name { get; set; } - [JsonProperty("text")] + [JsonPropertyName("text")] public string Text { get; set; } - [JsonProperty("value")] + [JsonPropertyName("value")] public bool? Value { get; set; } - [JsonProperty("classes")] + [JsonPropertyName("classes")] public string Classes { get; set; } = string.Empty; } diff --git a/Lombiq.DataTables/Services/DataTableDataProviderBase.cs b/Lombiq.DataTables/Services/DataTableDataProviderBase.cs index fce61c3fa..b4d2669b7 100644 --- a/Lombiq.DataTables/Services/DataTableDataProviderBase.cs +++ b/Lombiq.DataTables/Services/DataTableDataProviderBase.cs @@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Localization; -using Newtonsoft.Json.Linq; using OrchardCore.ContentManagement; using OrchardCore.DisplayManagement; using OrchardCore.Liquid; @@ -14,6 +13,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json.Nodes; using System.Text.RegularExpressions; using System.Threading.Tasks; using YesSql; @@ -86,17 +86,12 @@ protected virtual DataTableColumnsDefinition GetColumnsDefinitionInner(string qu $"You must override {nameof(GetColumnsDefinitionAsync)} or {nameof(GetColumnsDefinitionInner)}."); protected static IEnumerable SubstituteByColumn( - IEnumerable json, + IEnumerable json, IList columns) => json.Select((result, index) => new DataTableRow(index, columns - .Select(column => (column.Name, column.Regex, Token: result.SelectToken(column.Name, errorWhenNoMatch: false))) - .ToDictionary( - cell => cell.Name, - cell => cell.Regex is { } regex - ? new JValue(cell.Token?.ToString().RegexReplace(regex.From, regex.To, RegexOptions.Singleline) // #spell-check-ignore-line - ?? string.Empty) - : cell.Token))); + .Select(column => new DataTableCell(column.Name, column.Regex, Token: result.SelectNode(column.Name))) + .ToDictionary(cell => cell.Name, cell => cell.ApplyRegexToToken()))); protected async Task RenderLiquidAsync(IEnumerable rowList, IList liquidColumns) { @@ -120,4 +115,12 @@ protected async Task RenderLiquidAsync(IEnumerable rowList, IList< protected static Task> PaginateAsync(IQuery query, DataTableDataRequest request) where T : class => query.PaginateAsync(request.Start / request.Length, request.Length); + + private sealed record DataTableCell(string Name, (string From, string To)? Regex, JsonNode Token) + { + public JsonNode ApplyRegexToToken() => + Regex is var (from, to) && Token?.ToString() is { } value + ? JsonValue.Create(value.RegexReplace(from, to, RegexOptions.Singleline)) + : Token; + } } diff --git a/Lombiq.DataTables/Services/ExcelDataTableExportService.cs b/Lombiq.DataTables/Services/ExcelDataTableExportService.cs index 90c78e3da..65e44724a 100644 --- a/Lombiq.DataTables/Services/ExcelDataTableExportService.cs +++ b/Lombiq.DataTables/Services/ExcelDataTableExportService.cs @@ -1,11 +1,12 @@ using ClosedXML.Excel; using Lombiq.DataTables.Models; using Microsoft.Extensions.Localization; -using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text.Json; +using System.Text.Json.Nodes; using System.Threading.Tasks; namespace Lombiq.DataTables.Services; @@ -61,7 +62,7 @@ public async Task ExportAsync( public static Stream CollectionToStream( string worksheetName, string[] columns, - JToken[][] results, + JsonNode[][] results, IStringLocalizer localizer, string error = null, IDictionary customNumberFormat = null) @@ -110,34 +111,32 @@ public static Stream CollectionToStream( return Save(workbook); } - private static void CreateTableCell(IXLCell cell, JToken value, string dateFormat, IStringLocalizer localizer) + private static void CreateTableCell(IXLCell cell, JsonNode node, string dateFormat, IStringLocalizer localizer) { - if (value is JObject linkJObject && ExportLink.IsInstance(linkJObject)) + if (node is JsonObject linkObject && ExportLink.IsInstance(linkObject)) { - var link = linkJObject.ToObject(); + var link = linkObject.ToObject(); if (link != null) cell.FormulaA1 = $"HYPERLINK(\"{link.Url}\",\"{link.Text}\")"; } - else if (value is JObject dateJObject && ExportDate.IsInstance(dateJObject)) + else if (node is JsonObject dateObject && ExportDate.IsInstance(dateObject)) { - var date = dateJObject.ToObject(); + var date = dateObject.ToObject(); cell.Value = (DateTime)date!; cell.Style.DateFormat.Format = date?.ExcelFormat ?? dateFormat; } - else + else if (node is JsonArray array) { - if (value.Type == JTokenType.Date) cell.Style.DateFormat.Format = dateFormat; - - cell.Value = value.Type switch + cell.Value = string.Join(", ", array.Select(item => item.ToString())); + } + else if (node is JsonValue value) + { + cell.Value = value.GetValueKind() switch { - JTokenType.Boolean => value.ToObject() - ? localizer["Yes"].Value - : localizer["No"].Value, - JTokenType.Date => value.ToObject(), - JTokenType.Float => value.ToObject(), - JTokenType.Integer => value.ToObject(), - JTokenType.Null => Blank.Value, - JTokenType.TimeSpan => value.ToObject(), - JTokenType.Array => string.Join(", ", ((JArray)value).Select(item => item.ToString())), + JsonValueKind.True => localizer["Yes"].Value, + JsonValueKind.False => localizer["No"].Value, + JsonValueKind.Undefined => string.Empty, + JsonValueKind.Null => string.Empty, + JsonValueKind.Number => value.ToString().Contains('.') ? value.Value() : value.Value(), _ => value.ToString(), }; } diff --git a/Lombiq.DataTables/Services/IndexBasedDataTableDataProvider.cs b/Lombiq.DataTables/Services/IndexBasedDataTableDataProvider.cs index 33361abf8..f0238233f 100644 --- a/Lombiq.DataTables/Services/IndexBasedDataTableDataProvider.cs +++ b/Lombiq.DataTables/Services/IndexBasedDataTableDataProvider.cs @@ -2,11 +2,11 @@ using Lombiq.DataTables.Constants; using Lombiq.DataTables.Models; using Microsoft.AspNetCore.Authorization; -using Newtonsoft.Json.Linq; using OrchardCore.ContentManagement; using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json; using System.Threading.Tasks; using YesSql; using YesSql.Indexes; @@ -60,9 +60,9 @@ public override async Task GetRowsAsync(DataTableDataRequ var queryResults = await transaction.Connection.QueryAsync(sql, query.Parameters, transaction); var rowList = SubstituteByColumn( - (await TransformAsync(queryResults)).Select(JObject.FromObject), + (await TransformAsync(queryResults)).Select(item => JsonSerializer.SerializeToNode(item)?.AsObject()), columnsDefinition.Columns.ToList()) - .Select((item, index) => new DataTableRow(index, JObject.FromObject(item))) + .Select((item, index) => new DataTableRow(index, JsonSerializer.SerializeToNode(item)?.AsObject())) .ToList(); var liquidColumns = columnsDefinition diff --git a/Lombiq.DataTables/ViewModels/DataTableDefinitionViewModel.cs b/Lombiq.DataTables/ViewModels/DataTableDefinitionViewModel.cs index 1a8111c52..d3c411113 100644 --- a/Lombiq.DataTables/ViewModels/DataTableDefinitionViewModel.cs +++ b/Lombiq.DataTables/ViewModels/DataTableDefinitionViewModel.cs @@ -1,4 +1,4 @@ -using Newtonsoft.Json.Linq; +using System.Text.Json.Nodes; namespace Lombiq.DataTables.ViewModels; @@ -11,9 +11,9 @@ public class DataTableDefinitionViewModel : DataTableDataViewModel public string QueryStringParametersLocalStorageKey { get; set; } public string DataProvider { get; set; } public string DataTableCssClasses { get; set; } - public JObject AdditionalDatatableOptions { get; } + public JsonObject AdditionalDatatableOptions { get; } - public DataTableDefinitionViewModel(JObject additionalDatatableOptions = null) + public DataTableDefinitionViewModel(JsonObject additionalDatatableOptions = null) { if (additionalDatatableOptions != null) AdditionalDatatableOptions = additionalDatatableOptions; } diff --git a/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml b/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml index 6787c32d2..74662c879 100644 --- a/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml +++ b/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml @@ -1,7 +1,7 @@ @using OrchardCore.ResourceManagement @using System.Globalization -@using Newtonsoft.Json.Linq @using Lombiq.DataTables.Services +@using System.Text.Json.Nodes @inject IEnumerable Providers @@ -31,7 +31,7 @@ var defaultSortingDirection = columnsDefinition?.DefaultSortingDirection ?? SortingDirection.Ascending; var defaultSortingDirectionValue = defaultSortingDirection == SortingDirection.Ascending ? "asc" : "desc"; - var rowApiUrl = Url.Action(nameof(RowsController.Get), typeof(RowsController).ControllerName(), new { Area = FeatureIds.Area }); + var rowsApiUrl = Url.Action(nameof(RowsController.Get), typeof(RowsController).ControllerName(), new { Area = FeatureIds.Area }); var childRowApiUrl = Url.Action(nameof(ChildRowsController.Get), typeof(ChildRowsController).ControllerName(), new { Area = FeatureIds.Area }); var exportApiUrl = Url.Action(nameof(RowsController.Export), typeof(RowsController).ControllerName(), new { Area = FeatureIds.Area }); @@ -50,6 +50,55 @@ dynamic additionalOptions = viewModel?.AdditionalDatatableOptions; var hasViewAction = (bool)(additionalOptions?.viewAction == true); + + var defaultOrder = new[] { new[] { defaultSortingColumnIndex.ToString(), defaultSortingDirectionValue } }; + var dataTablesOptions = new Dictionary { ["order"] = defaultOrder }; + if (pageSize > 0) { dataTablesOptions["pageLength"] = pageSize; } + if (additionalOptions is JsonObject options) + { + foreach (var (key, value) in options) + { + dataTablesOptions[key] = value; + } + } + + var pluginOptions = new Dictionary + { + ["rowClassName"] = ElementNames.DataTableRowElementName, + ["dataProvider"] = dataProvider, + ["rowsApiUrl"] = rowsApiUrl, + ["export"] = new + { + textAll = T["Export All"].Value, + textVisible = T["Export Visible"].Value, + api = exportApiUrl, + }, + ["texts"] = new + { + yes = T["Yes"].Value, + no = T["No"].Value, + }, + ["errorsSelector"] = '.' + errorsElementName, + ["serverSidePagingEnabled"] = !progressiveLoadingEnabled, + ["queryStringParametersLocalStorageKey"] = queryStringParametersLocalStorageKey, + ["progressiveLoadingOptions"] = new + { + progressiveLoadingEnabled, + skip, + batchSize = pageSize, + }, + ["childRowOptions"] = new + { + childRowsEnabled, + asyncLoading = true, + apiUrl = childRowApiUrl, + childRowClassName = childRowElementName, + toggleChildRowButtonClassName = toggleChildRowButtonElementName, + childRowVisibleClassName = rowElementWithChildRowVisibleModifier, + }, + ["culture"] = Orchard.CultureName(), + }; + if (!string.IsNullOrWhiteSpace(queryId)) { pluginOptions["queryId"] = queryId; } } @await DisplayAsync(await New.Lombiq_DataTable_Resources(ViewModel: viewModel)) @@ -97,88 +146,25 @@ From 0e0d7c66c968caa408d2a60e0c106ca6978379db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 24 Feb 2024 12:55:08 +0100 Subject: [PATCH 03/95] Use naming strategy. --- Lombiq.DataTables/Models/VueModel.cs | 13 +++---------- Lombiq.DataTables/Models/VueModelCheckbox.cs | 6 +----- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/Lombiq.DataTables/Models/VueModel.cs b/Lombiq.DataTables/Models/VueModel.cs index 6d7570140..3bb6cbd49 100644 --- a/Lombiq.DataTables/Models/VueModel.cs +++ b/Lombiq.DataTables/Models/VueModel.cs @@ -14,6 +14,7 @@ namespace Lombiq.DataTables.Models; +[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class VueModel { /// @@ -22,7 +23,6 @@ public class VueModel /// column is meant to be . /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("text")] public string Text { get; set; } /// @@ -30,7 +30,6 @@ public class VueModel /// cref="Badge"/> are ignored. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("html")] public string Html { get; set; } /// @@ -38,14 +37,12 @@ public class VueModel /// used for sorting. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("sort")] public object Sort { get; set; } /// /// Gets or sets the URL to be used in the href attributes. When this is used is ignored. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("href")] public string Href { get; set; } [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] @@ -57,7 +54,6 @@ public class VueModel /// cref="Href"/>. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("badge")] public object Badge { get; set; } /// @@ -65,7 +61,6 @@ public class VueModel /// updated with JavaScript on client side before each render. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("special")] public object Special { get; set; } /// @@ -160,21 +155,19 @@ public static IDictionary CreateTextForIcbinDataTable(IHtmlLocal ["all"] = localizer["All"].Value, }; + [JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class HiddenInputValue { - [JsonPropertyName("name")] public string Name { get; set; } - [JsonPropertyName("value")] public string Value { get; set; } } + [JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class MultipleHrefValue { - [JsonPropertyName("url")] public string Url { get; set; } - [JsonPropertyName("text")] public string Text { get; set; } } diff --git a/Lombiq.DataTables/Models/VueModelCheckbox.cs b/Lombiq.DataTables/Models/VueModelCheckbox.cs index 7361ff5b7..dd6d4d287 100644 --- a/Lombiq.DataTables/Models/VueModelCheckbox.cs +++ b/Lombiq.DataTables/Models/VueModelCheckbox.cs @@ -4,6 +4,7 @@ namespace Lombiq.DataTables.Models; // This class is used in . +[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class VueModelCheckbox { // While the warning doesn't show up in VS it does with dotnet build, but inconsistently. @@ -13,18 +14,13 @@ public class VueModelCheckbox "CA1822:Mark members as static", Justification = "It's necessary to be instance-level for JSON serialization.")] #pragma warning restore IDE0079 // Remove unnecessary suppression - [JsonPropertyName("type")] public string Type => "checkbox"; - [JsonPropertyName("name")] public string Name { get; set; } - [JsonPropertyName("text")] public string Text { get; set; } - [JsonPropertyName("value")] public bool? Value { get; set; } - [JsonPropertyName("classes")] public string Classes { get; set; } = string.Empty; } From 83afa77385e1c107543f9c70e7b93af9c1f78185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 24 Feb 2024 13:16:45 +0100 Subject: [PATCH 04/95] Fix compilation errors. --- .../Models/DataTableSearchParameters.cs | 2 +- .../Services/DataTableDataProviderBase.cs | 2 +- .../JsonResultDataTableDataProvider.cs | 39 ++++++++++--------- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/Lombiq.DataTables/Models/DataTableSearchParameters.cs b/Lombiq.DataTables/Models/DataTableSearchParameters.cs index 908f84918..50e05706b 100644 --- a/Lombiq.DataTables/Models/DataTableSearchParameters.cs +++ b/Lombiq.DataTables/Models/DataTableSearchParameters.cs @@ -7,6 +7,6 @@ public class DataTableSearchParameters { public string Value { get; set; } - [JsonProperty(PropertyName = "regex")] + [JsonPropertyName("regex")] public bool IsRegex { get; set; } } diff --git a/Lombiq.DataTables/Services/DataTableDataProviderBase.cs b/Lombiq.DataTables/Services/DataTableDataProviderBase.cs index b4d2669b7..f5353848e 100644 --- a/Lombiq.DataTables/Services/DataTableDataProviderBase.cs +++ b/Lombiq.DataTables/Services/DataTableDataProviderBase.cs @@ -120,7 +120,7 @@ private sealed record DataTableCell(string Name, (string From, string To)? Regex { public JsonNode ApplyRegexToToken() => Regex is var (from, to) && Token?.ToString() is { } value - ? JsonValue.Create(value.RegexReplace(from, to, RegexOptions.Singleline)) + ? value.RegexReplace(from, to, RegexOptions.Singleline) : Token; } } diff --git a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs index a5ae833d4..bc3a3bc5f 100644 --- a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs +++ b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs @@ -1,9 +1,10 @@ using Lombiq.DataTables.Models; using Microsoft.Extensions.Localization; -using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json; +using System.Text.Json.Nodes; using System.Threading.Tasks; namespace Lombiq.DataTables.Services; @@ -41,7 +42,9 @@ public override async Task GetRowsAsync(DataTableDataRequ if (metaData.CountFiltered >= 0) recordsFiltered = metaData.CountFiltered; - var json = results[0] is JObject ? results.Cast() : results.Select(JObject.FromObject); + var json = results[0] is JsonObject + ? results.Cast() + : results.Select(result => JsonSerializer.SerializeToNode(result)?.AsObject()); if (!string.IsNullOrEmpty(order.Column)) json = OrderByColumn(json, order); if (request.Search?.IsRegex == true) @@ -101,12 +104,12 @@ private static (IEnumerable Results, int Count) Search( string searchValue, IReadOnlyCollection columnFilters) { - static string PrepareToken(JToken token) => - token switch + static string PrepareToken(JsonNode node) => + node switch { - JObject link when ExportLink.IsInstance(link) => ExportLink.GetText(link), - JObject date when ExportDate.IsInstance(date) => ExportDate.GetText(date), - { } => token.ToString(), + JsonObject link when ExportLink.IsInstance(link) => ExportLink.GetText(link), + JsonObject date when ExportDate.IsInstance(date) => ExportDate.GetText(date), + { } => node.ToString(), null => null, }; @@ -139,38 +142,38 @@ JObject date when ExportDate.IsInstance(date) => ExportDate.GetText(date), } /// - /// When overridden in a derived class it gets the content which is then turned into if + /// When overridden in a derived class it gets the content which is then turned into if /// necessary and then queried down using the column names into a dictionary. /// /// The input of . /// A list of results or s. protected abstract Task GetResultsAsync(DataTableDataRequest request); - private IEnumerable OrderByColumn(IEnumerable json, DataTableOrder order) + private IEnumerable OrderByColumn(IEnumerable json, DataTableOrder order) { var orderColumnName = order.Column.Replace('_', '.'); - JToken Selector(JObject x) + JsonNode Selector(JsonObject item) { - var jToken = x.SelectToken(orderColumnName); + var node = item.SelectNode(orderColumnName); - if (jToken is JObject jObject) + if (node is JsonObject jObject) { - if (jObject.ContainsKey(nameof(ExportLink.Text))) + if (jObject.TryGetPropertyValue(nameof(ExportLink.Text), out var textValue)) { - jToken = jObject[nameof(ExportLink.Text)]; + node = textValue; } else if (ExportDate.IsInstance(jObject)) { - jToken = (DateTime)jToken.ToObject(); + node = (DateTime)node.ToObject(); } } - return jToken switch + return node switch { null => null, - JValue jValue when jValue.Type != JTokenType.String => jValue, - _ => jToken.ToString().ToUpperInvariant(), + JsonValue value when value.GetValueKind() == JsonValueKind.String => value, + _ => node.ToString().ToUpperInvariant(), }; } From 23f1f7901fed0f48b9d27c7f56d7ed69a0eb1aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 24 Feb 2024 16:28:08 +0100 Subject: [PATCH 05/95] Replace JsonConvert.SerializeObject. --- .../Tests/Lombiq.DataTables.Tests/MockDataProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs index 0ef35cfd9..8f599895f 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs @@ -4,7 +4,6 @@ using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Localization; using Microsoft.Extensions.Options; -using Newtonsoft.Json.Linq; using OrchardCore.DisplayManagement.Liquid; using OrchardCore.Liquid.Services; using OrchardCore.Localization; @@ -12,6 +11,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json; using System.Threading.Tasks; namespace Lombiq.DataTables.Tests; @@ -53,7 +53,7 @@ protected override async Task GetResultsA .Select((item, index) => new { item.Name, Index = index }); return new(_dataSet.Select(row => - JObject.FromObject(columns.ToDictionary(column => column.Name, column => row[column.Index])))); + JsonSerializer.SerializeToNode(columns.ToDictionary(column => column.Name, column => row[column.Index])))); } protected override DataTableColumnsDefinition GetColumnsDefinitionInner(string queryId) => Definition; From dd79c828387ca62d56c18ebff8cf0177ab2adaaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 25 Feb 2024 02:13:06 +0100 Subject: [PATCH 06/95] Clarify SuppressMessage Justification. --- Lombiq.DataTables/Models/VueModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Models/VueModel.cs b/Lombiq.DataTables/Models/VueModel.cs index 3bb6cbd49..604b066d6 100644 --- a/Lombiq.DataTables/Models/VueModel.cs +++ b/Lombiq.DataTables/Models/VueModel.cs @@ -80,7 +80,7 @@ public class VueModel [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("hiddenInput")] - [SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "It's used by STJ.")] + [SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "It's used for JSON conversion.")] private object HiddenInputSerialize { get => (object)HiddenInput ?? HiddenInputs; From 9f271ffd47b4ab8f2aed224a00d1c0770b425d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 25 Feb 2024 14:39:54 +0100 Subject: [PATCH 07/95] Fix OrderByColumn. --- Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs index bc3a3bc5f..3450e98e5 100644 --- a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs +++ b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs @@ -172,7 +172,7 @@ JsonNode Selector(JsonObject item) return node switch { null => null, - JsonValue value when value.GetValueKind() == JsonValueKind.String => value, + JsonValue value when value.GetValueKind() == JsonValueKind.String => value.Value(), _ => node.ToString().ToUpperInvariant(), }; } From f260ace0997429a515e7495da580ac2cfef79791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 25 Feb 2024 14:40:27 +0100 Subject: [PATCH 08/95] Simplify OrderByColumn.Selector. --- Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs index 3450e98e5..307d8539c 100644 --- a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs +++ b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs @@ -153,7 +153,7 @@ private IEnumerable OrderByColumn(IEnumerable json, Data { var orderColumnName = order.Column.Replace('_', '.'); - JsonNode Selector(JsonObject item) + string Selector(JsonObject item) { var node = item.SelectNode(orderColumnName); From 865e77fa643f87e7691f702fa4447eeedff9833b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 25 Feb 2024 14:47:04 +0100 Subject: [PATCH 09/95] Clean up unit test. --- .../UnitTests/Services/ExportTests.cs | 65 ++++++++++--------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs index 76a5a9568..577ada9f1 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs @@ -70,9 +70,7 @@ public async Task ExportTableShouldMatchExpectation( } while (columnIndex < columns.Length && columns[columnIndex - 1].Name != "Time"); - Stream stream = null; - - stream = OperatingSystem.IsWindows() + var stream = OperatingSystem.IsWindows() // On non-Windows platforms, we need to specify a fallback font manually for ClosedXML to work. ? await service.ExportAsync(provider, request, customNumberFormat: customNumberFormat) : await TryExportWithFallbackFontsAsync(service, provider, request, customNumberFormat); @@ -133,19 +131,19 @@ public static IEnumerable Data() ("MagicWords", "Magic Words", true), }; - yield return new object[] - { + yield return + [ "Show full data set.", dataset, columns, - "1,z,foo;2,y,bar;10,x,baz".Split(';').Select(row => row.Split(',')).ToArray(), + GetPattern("1,z,foo;2,y,bar;10,x,baz"), 0, 10, 0, - }; + ]; - yield return new object[] - { + yield return + [ "Make last column not exportable.", dataset, new[] @@ -154,47 +152,47 @@ public static IEnumerable Data() ("Letters", "Letters", true), ("MagicWords", "Magic Words", false), }, - "1,z;2,y;10,x".Split(';').Select(row => row.Split(',')).ToArray(), + GetPattern("1,z;2,y;10,x"), 0, 10, 0, - }; + ]; - yield return new object[] - { + yield return + [ "Test pagination.", dataset, columns, - new[] { "10,x,baz".Split(',') }, + GetPattern("10;x;baz"), 2, 10, 0, - }; + ]; - yield return new object[] - { + yield return + [ "Test sorting on 2nd column.", dataset, columns, - "10,x,baz;2,y,bar;1,z,foo".Split(';').Select(row => row.Split(',')).ToArray(), + GetPattern("10,x,baz;2,y,bar;1,z,foo"), 0, 10, 1, - }; + ]; - yield return new object[] - { + yield return + [ "Test sorting on 3nd column.", dataset, columns, - "2,y,bar;10,x,baz;1,z,foo".Split(';').Select(row => row.Split(',')).ToArray(), + GetPattern("2,y,bar;10,x,baz;1,z,foo"), 0, 10, 2, - }; + ]; - yield return new object[] - { + yield return + [ "Verify boolean formatting.", new[] { @@ -203,11 +201,11 @@ public static IEnumerable Data() new object[] { 3, false }, }, new[] { ("Num", "Numbers", true), ("Bool", "Booleans", true) }, - "1,Yes;2,Yes;3,No".Split(';').Select(row => row.Split(',')).ToArray(), + GetPattern("1,Yes;2,Yes;3,No"), 0, 10, 0, - }; + ]; var date1 = new DateTime(2020, 11, 26, 23, 42, 01, DateTimeKind.Utc); var date2 = new DateTime(2020, 11, 26, 13, 42, 01, DateTimeKind.Utc); @@ -217,13 +215,13 @@ public static IEnumerable Data() // consistency. #pragma warning disable IDE0300 // Simplify collection initialization // The date value should be the same, only the formatting changes. - yield return new object[] - { + yield return + [ "Verify custom number formatting.", new[] { - new object[] { 1, date1 }, - new object[] { 2, date2 }, + [1, date1], + [2, date2], new object[] { 3, date3 }, }, new[] { ("Num", "Numbers", true), ("Time", "Time", true) }, @@ -239,7 +237,7 @@ public static IEnumerable Data() 0, 10, 0, - }; + ]; #pragma warning restore IDE0300 // Simplify collection initialization } @@ -285,4 +283,7 @@ private static async Task TryExportWithFallbackFontsAsync( return null; } + + private static string[][] GetPattern(string patternString) => + patternString.Split(';').Select(row => row.Split(',')).ToArray(); } From b5c4d19a42be2605a5c8bd0a881453afc99499d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 25 Feb 2024 15:44:20 +0100 Subject: [PATCH 10/95] Make result mismatches clearer by only comparing the final matrix. --- .../UnitTests/Services/ExportTests.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs index 577ada9f1..37b988d8a 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs @@ -91,15 +91,16 @@ public async Task ExportTableShouldMatchExpectation( } } + var results = new List(); for (var rowIndex = 0; rowIndex < pattern.Length; rowIndex++) { - Enumerable.Range(1, pattern[0].Length) - .Select(index => worksheet.Cell(2 + rowIndex, index).GetFormattedString()) - .ToArray() - .ShouldBe( - pattern[rowIndex], - StringHelper.CreateInvariant($"Row {rowIndex + 1} didn't match expectation.")); + results.Add( + Enumerable.Range(1, pattern[0].Length) + .Select(index => worksheet.Cell(2 + rowIndex, index).GetFormattedString()) + .ToArray()); } + + results.ToArray().ShouldBe(pattern); } public static IEnumerable Data() From 3b7ff139d0af0b0169d53e1cf0f63d8ac906d037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 25 Feb 2024 16:24:07 +0100 Subject: [PATCH 11/95] Sort numbers numerically. --- Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs index 307d8539c..03253a07e 100644 --- a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs +++ b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs @@ -153,7 +153,7 @@ private IEnumerable OrderByColumn(IEnumerable json, Data { var orderColumnName = order.Column.Replace('_', '.'); - string Selector(JsonObject item) + IComparable Selector(JsonObject item) { var node = item.SelectNode(orderColumnName); @@ -172,7 +172,7 @@ string Selector(JsonObject item) return node switch { null => null, - JsonValue value when value.GetValueKind() == JsonValueKind.String => value.Value(), + JsonValue value => value.ToComparable(), _ => node.ToString().ToUpperInvariant(), }; } From 5d45583271073b47402abe08db3b5aa909e37de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 25 Feb 2024 16:24:20 +0100 Subject: [PATCH 12/95] More cleanup. --- .../UnitTests/Services/ExportTests.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs index 37b988d8a..b49bf5617 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs @@ -226,15 +226,12 @@ public static IEnumerable Data() new object[] { 3, date3 }, }, new[] { ("Num", "Numbers", true), ("Time", "Time", true) }, - string.Format( + GetPattern(string.Format( _worksheetCulture, "1,{0:h:mm:ss tt};2,{1:h:mm:ss tt};3,{2:h:mm:ss tt}", date1, date2, - date3) - .Split(';') - .Select(row => row.Split(',')) - .ToArray(), + date3)), 0, 10, 0, From 53445f5aebe429ef51a5c6155862752c76dfaacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 25 Feb 2024 16:31:50 +0100 Subject: [PATCH 13/95] Fix newly introduced mistake. --- .../Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs index b49bf5617..816af5da5 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs @@ -164,7 +164,7 @@ public static IEnumerable Data() "Test pagination.", dataset, columns, - GetPattern("10;x;baz"), + GetPattern("10,x,baz"), 2, 10, 0, From bcb0ebda58dc4ace73ef5448b673187d6edb0f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 25 Feb 2024 17:18:12 +0100 Subject: [PATCH 14/95] Add HasTypeProperty extension method. --- Lombiq.DataTables/Extensions/JsonNodeExtensions.cs | 11 +++++++++++ Lombiq.DataTables/Models/ExportDate.cs | 2 +- Lombiq.DataTables/Models/ExportLink.cs | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 Lombiq.DataTables/Extensions/JsonNodeExtensions.cs diff --git a/Lombiq.DataTables/Extensions/JsonNodeExtensions.cs b/Lombiq.DataTables/Extensions/JsonNodeExtensions.cs new file mode 100644 index 000000000..14ee50d6c --- /dev/null +++ b/Lombiq.DataTables/Extensions/JsonNodeExtensions.cs @@ -0,0 +1,11 @@ +namespace System.Text.Json.Nodes; + +public static class JsonNodeExtensions +{ + /// + /// Checks if the provided is object and has a Type property, and if its value + /// matches . + /// + public static bool HasTypeProperty(this JsonNode node) => + node?.AsObject()?["Type"]?.ToString() == typeof(T).Name; +} diff --git a/Lombiq.DataTables/Models/ExportDate.cs b/Lombiq.DataTables/Models/ExportDate.cs index d454e3907..566148e8b 100644 --- a/Lombiq.DataTables/Models/ExportDate.cs +++ b/Lombiq.DataTables/Models/ExportDate.cs @@ -22,7 +22,7 @@ public class ExportDate public string ExcelFormat { get; set; } public static bool IsInstance(JsonObject jsonObject) => - jsonObject[nameof(Type)]?.ToString() == nameof(ExportDate); + jsonObject.HasTypeProperty(); public static string GetText(JsonObject jsonObject) => ((LocalDate)jsonObject.ToObject()).ToShortDateString(); diff --git a/Lombiq.DataTables/Models/ExportLink.cs b/Lombiq.DataTables/Models/ExportLink.cs index 2316f2e04..5822dddc5 100644 --- a/Lombiq.DataTables/Models/ExportLink.cs +++ b/Lombiq.DataTables/Models/ExportLink.cs @@ -32,8 +32,8 @@ public ExportLink(string url, JsonNode text, IDictionary? attrib public override string ToString() => Text.ToString(); - public static bool IsInstance(JsonObject jObject) => - jObject[nameof(Type)]?.ToString() == nameof(ExportLink); + public static bool IsInstance(JsonObject jsonObject) => + jsonObject.HasTypeProperty(); public static string? GetText(JsonObject jObject) => jObject[nameof(Text)]?.ToString(); } From 371f76e51d8de5b8ad67fcc47707391348d73b9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 25 Feb 2024 20:00:51 +0100 Subject: [PATCH 15/95] Fix broken DateTime conversion during tests and broken mixed type numeric sorting everywhere. --- .../Extensions/JsonNodeExtensions.cs | 2 +- .../Services/DateTimeJsonConverter.cs | 45 ++++++++++++++ .../Services/ExcelDataTableExportService.cs | 13 ++-- .../JsonResultDataTableDataProvider.cs | 59 +++++++++++++++---- .../MockDataProvider.cs | 14 ++++- 5 files changed, 113 insertions(+), 20 deletions(-) create mode 100644 Lombiq.DataTables/Services/DateTimeJsonConverter.cs diff --git a/Lombiq.DataTables/Extensions/JsonNodeExtensions.cs b/Lombiq.DataTables/Extensions/JsonNodeExtensions.cs index 14ee50d6c..ca7c8d1c8 100644 --- a/Lombiq.DataTables/Extensions/JsonNodeExtensions.cs +++ b/Lombiq.DataTables/Extensions/JsonNodeExtensions.cs @@ -7,5 +7,5 @@ public static class JsonNodeExtensions /// matches . /// public static bool HasTypeProperty(this JsonNode node) => - node?.AsObject()?["Type"]?.ToString() == typeof(T).Name; + node is JsonObject jsonObject && jsonObject["Type"]?.ToString() == typeof(T).Name; } diff --git a/Lombiq.DataTables/Services/DateTimeJsonConverter.cs b/Lombiq.DataTables/Services/DateTimeJsonConverter.cs new file mode 100644 index 000000000..90a371233 --- /dev/null +++ b/Lombiq.DataTables/Services/DateTimeJsonConverter.cs @@ -0,0 +1,45 @@ +using Lombiq.DataTables.Models; +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Nodes; +using System.Text.Json.Serialization; + +namespace Lombiq.DataTables.Services; + +public class DateTimeJsonConverter : JsonConverter +{ + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var node = JsonNode.Parse(ref reader); + + if (node?.GetValueKind() == JsonValueKind.String) + { + return DateTime.Parse(node.GetValue(), CultureInfo.InvariantCulture); + } + + if (node.HasTypeProperty()) + { + return node.ToObject().ToDateTime(); + } + + if (node.HasTypeProperty()) + { + return (DateTime)node.ToObject(); + } + + throw new InvalidOperationException("Unable to parse JSON!"); + } + + public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) => + JsonSerializer + .SerializeToNode(new DateTimeTicks(value.Ticks, value.Kind))! + .WriteTo(writer, options); + + public sealed record DateTimeTicks(long Ticks, DateTimeKind Kind) + { + public string Type => nameof(DateTimeTicks); + + public DateTime ToDateTime() => new(Ticks, Kind); + } +} diff --git a/Lombiq.DataTables/Services/ExcelDataTableExportService.cs b/Lombiq.DataTables/Services/ExcelDataTableExportService.cs index 65e44724a..a417c0a74 100644 --- a/Lombiq.DataTables/Services/ExcelDataTableExportService.cs +++ b/Lombiq.DataTables/Services/ExcelDataTableExportService.cs @@ -113,17 +113,22 @@ public static Stream CollectionToStream( private static void CreateTableCell(IXLCell cell, JsonNode node, string dateFormat, IStringLocalizer localizer) { - if (node is JsonObject linkObject && ExportLink.IsInstance(linkObject)) + if (node.HasTypeProperty()) { - var link = linkObject.ToObject(); + var link = node.ToObject(); if (link != null) cell.FormulaA1 = $"HYPERLINK(\"{link.Url}\",\"{link.Text}\")"; } - else if (node is JsonObject dateObject && ExportDate.IsInstance(dateObject)) + else if (node.HasTypeProperty()) { - var date = dateObject.ToObject(); + var date = node.ToObject(); cell.Value = (DateTime)date!; cell.Style.DateFormat.Format = date?.ExcelFormat ?? dateFormat; } + else if (node.HasTypeProperty()) + { + cell.Value = node.ToObject().ToDateTime(); + cell.Style.DateFormat.Format = dateFormat; + } else if (node is JsonArray array) { cell.Value = string.Join(", ", array.Select(item => item.ToString())); diff --git a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs index 03253a07e..e4931ac9f 100644 --- a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs +++ b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs @@ -153,30 +153,63 @@ private IEnumerable OrderByColumn(IEnumerable json, Data { var orderColumnName = order.Column.Replace('_', '.'); - IComparable Selector(JsonObject item) + var intermediate = json.Select(item => OrderByColumnItem.Create(item, orderColumnName)); + + return (order.IsAscending ? intermediate.Order() : intermediate.OrderDescending()).Select(item => item.Original); + } + + private record OrderByColumnItem(JsonObject Original, IComparable OrderBy) : IComparable + { + public static OrderByColumnItem Create(JsonObject item, string jsonPathQuery) { - var node = item.SelectNode(orderColumnName); + if (item.SelectNode(jsonPathQuery) is not { } node) return new(item, OrderBy: null); - if (node is JsonObject jObject) + if (node.HasTypeProperty()) { - if (jObject.TryGetPropertyValue(nameof(ExportLink.Text), out var textValue)) - { - node = textValue; - } - else if (ExportDate.IsInstance(jObject)) - { - node = (DateTime)node.ToObject(); - } + node = ExportLink.GetText(node.AsObject()); + } + else if (node.HasTypeProperty()) + { + node = (DateTime)node.ToObject(); + } + else if (node.HasTypeProperty()) + { + node = node.ToObject().ToDateTime(); } - return node switch + var orderBy = node switch { null => null, JsonValue value => value.ToComparable(), _ => node.ToString().ToUpperInvariant(), }; + + return new(item, orderBy); } - return order.IsAscending ? json.OrderBy(Selector) : json.OrderByDescending(Selector); + public int CompareTo(object obj) + { + var thisOrderBy = OrderBy ?? string.Empty; + var thatOrderBy = (obj as OrderByColumnItem)?.OrderBy ?? string.Empty; + + if (thisOrderBy.GetType() != thatOrderBy.GetType()) + { + if (thisOrderBy is decimal && decimal.TryParse(thatOrderBy.ToString(), out var thatDecimal)) + { + thatOrderBy = thatDecimal; + } + else if (thatOrderBy is decimal && decimal.TryParse(thisOrderBy.ToString(), out var thisDecimal)) + { + thisOrderBy = thisDecimal; + } + else + { + thisOrderBy = thisOrderBy.ToString() ?? string.Empty; + thatOrderBy = thatOrderBy.ToString() ?? string.Empty; + } + } + + return thisOrderBy.CompareTo(thatOrderBy); + } } } diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs index 8f599895f..4eb5acc1e 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs @@ -18,6 +18,14 @@ namespace Lombiq.DataTables.Tests; public class MockDataProvider : JsonResultDataTableDataProvider { + private static readonly JsonSerializerOptions _options = new() + { + Converters = + { + new DateTimeJsonConverter(), + }, + }; + public DataTableColumnsDefinition Definition { get; set; } private readonly object[][] _dataSet; @@ -52,8 +60,10 @@ protected override async Task GetResultsA .Columns .Select((item, index) => new { item.Name, Index = index }); - return new(_dataSet.Select(row => - JsonSerializer.SerializeToNode(columns.ToDictionary(column => column.Name, column => row[column.Index])))); + return new(_dataSet.Select(row => JsonSerializer.SerializeToNode( + columns.ToDictionary(column => column.Name, column => row[column.Index]), + _options + ))); } protected override DataTableColumnsDefinition GetColumnsDefinitionInner(string queryId) => Definition; From 01099379e900ece92cc0e2a4c83ab4207ff95c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 25 Feb 2024 20:37:21 +0100 Subject: [PATCH 16/95] Fix warnings --- Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs index e4931ac9f..3b48b501d 100644 --- a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs +++ b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs @@ -149,7 +149,7 @@ JsonObject date when ExportDate.IsInstance(date) => ExportDate.GetText(date), /// A list of results or s. protected abstract Task GetResultsAsync(DataTableDataRequest request); - private IEnumerable OrderByColumn(IEnumerable json, DataTableOrder order) + private static IEnumerable OrderByColumn(IEnumerable json, DataTableOrder order) { var orderColumnName = order.Column.Replace('_', '.'); @@ -158,7 +158,7 @@ private IEnumerable OrderByColumn(IEnumerable json, Data return (order.IsAscending ? intermediate.Order() : intermediate.OrderDescending()).Select(item => item.Original); } - private record OrderByColumnItem(JsonObject Original, IComparable OrderBy) : IComparable + private sealed record OrderByColumnItem(JsonObject Original, IComparable OrderBy) : IComparable { public static OrderByColumnItem Create(JsonObject item, string jsonPathQuery) { From 7e6019cc44386d01230573bb8a9b328d66cce175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 25 Feb 2024 21:00:19 +0100 Subject: [PATCH 17/95] unusing --- .../Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs index 816af5da5..09dedd31f 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs @@ -3,7 +3,6 @@ using Lombiq.DataTables.Models; using Lombiq.DataTables.Services; using Lombiq.DataTables.Tests.Helpers; -using Lombiq.HelpfulLibraries.Common.Utilities; using Lombiq.Tests.Helpers; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; From b8f1cf6e84ab8a337b0e9ff392f945126ad4034e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 26 Feb 2024 19:26:43 +0100 Subject: [PATCH 18/95] Fix data table request serialization. --- Lombiq.DataTables/Controllers/Api/RowsController.cs | 10 ++++------ Lombiq.DataTables/Models/DataTableDataRequest.cs | 3 +-- Lombiq.DataTables/Models/DataTableOrder.cs | 10 +++++++++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Lombiq.DataTables/Controllers/Api/RowsController.cs b/Lombiq.DataTables/Controllers/Api/RowsController.cs index 3555f78a6..b1e17c4da 100644 --- a/Lombiq.DataTables/Controllers/Api/RowsController.cs +++ b/Lombiq.DataTables/Controllers/Api/RowsController.cs @@ -1,11 +1,11 @@ using Lombiq.DataTables.Models; using Lombiq.DataTables.Services; +using Lombiq.HelpfulLibraries.AspNetCore.Mvc; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Localization; using System.Collections.Generic; using System.Linq; -using System.Text.Json; using System.Threading.Tasks; namespace Lombiq.DataTables.Controllers.Api; @@ -53,11 +53,10 @@ public RowsController( /// [IgnoreAntiforgeryToken] [HttpGet] - public async Task> Get(string requestJson) + public async Task> Get([FromJsonQueryString(Name = "requestJson")] DataTableDataRequest request) { - if (string.IsNullOrEmpty(requestJson)) return BadRequest(); + if (request == null) return BadRequest(); - var request = JsonSerializer.Deserialize(requestJson); var dataProvider = _dataTableDataProviderAccessor.GetDataProvider(request.DataProvider); if (dataProvider == null) { @@ -86,11 +85,10 @@ public async Task> Get(string requestJson) } public async Task> Export( - string requestJson, + [FromJsonQueryString(Name = "requestJson")] DataTableDataRequest request, string name = null, bool exportAll = true) { - var request = JsonSerializer.Deserialize(requestJson); if (exportAll) { request.Start = 0; diff --git a/Lombiq.DataTables/Models/DataTableDataRequest.cs b/Lombiq.DataTables/Models/DataTableDataRequest.cs index 5f9f78715..ea0ed223c 100644 --- a/Lombiq.DataTables/Models/DataTableDataRequest.cs +++ b/Lombiq.DataTables/Models/DataTableDataRequest.cs @@ -1,10 +1,8 @@ using System.Collections.Generic; using System.Linq; -using System.Text.Json.Serialization; namespace Lombiq.DataTables.Models; -[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableDataRequest { public string QueryId { get; set; } @@ -23,3 +21,4 @@ public IReadOnlyCollection GetColumnSearches() => .Where(filter => !string.IsNullOrWhiteSpace(filter.Search?.Value)) .ToList() ?? []; } + diff --git a/Lombiq.DataTables/Models/DataTableOrder.cs b/Lombiq.DataTables/Models/DataTableOrder.cs index 7dead8238..1c28ee076 100644 --- a/Lombiq.DataTables/Models/DataTableOrder.cs +++ b/Lombiq.DataTables/Models/DataTableOrder.cs @@ -3,12 +3,20 @@ namespace Lombiq.DataTables.Models; -[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableOrder { public string Column { get; set; } + + [JsonIgnore] public SortingDirection Direction { get; set; } + [JsonPropertyName("direction")] + private string DirectionString + { + get => IsAscending ? "ascending" : "descending"; + set => Direction = value == "descending" ? SortingDirection.Descending : SortingDirection.Ascending; + } + [JsonIgnore] public bool IsAscending => Direction == SortingDirection.Ascending; } From 9126e1fbd0c4aa4c185273d60b3bb2b1bb222c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 26 Feb 2024 23:12:55 +0100 Subject: [PATCH 19/95] Fix JsonExtensionData related problems. --- .../Controllers/Api/RowsController.cs | 2 +- Lombiq.DataTables/Models/DataTableRow.cs | 27 +++++++++++++++---- .../Services/ExcelDataTableExportService.cs | 2 +- .../JsonResultDataTableDataProvider.cs | 6 ++--- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/Lombiq.DataTables/Controllers/Api/RowsController.cs b/Lombiq.DataTables/Controllers/Api/RowsController.cs index b1e17c4da..e30cd2682 100644 --- a/Lombiq.DataTables/Controllers/Api/RowsController.cs +++ b/Lombiq.DataTables/Controllers/Api/RowsController.cs @@ -32,7 +32,7 @@ public RowsController( /// /// Gets the current table view's rows. /// - /// The request to fulfill serialized as JSON. + /// The request to fulfill serialized as JSON. /// The response for this API call. /// /// diff --git a/Lombiq.DataTables/Models/DataTableRow.cs b/Lombiq.DataTables/Models/DataTableRow.cs index 23fa03e17..20e6ca8d3 100644 --- a/Lombiq.DataTables/Models/DataTableRow.cs +++ b/Lombiq.DataTables/Models/DataTableRow.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using System.Text.Json; using System.Text.Json.Nodes; using System.Text.Json.Serialization; @@ -9,27 +10,43 @@ namespace Lombiq.DataTables.Models; public class DataTableRow { [JsonExtensionData] - internal IDictionary ValuesDictionary { get; set; } + [JsonInclude] + internal IDictionary ValuesDictionary { get; set; } = new Dictionary(); public int Id { get; set; } public string this[string name] { - get => ValuesDictionary.TryGetValue(name, out var value) ? value.Value() : null; + get => ValuesDictionary.GetMaybe(name)?.ToString(); set => ValuesDictionary[name] = value; } - public DataTableRow() => ValuesDictionary = new Dictionary(); + public DataTableRow() { } public DataTableRow(int id, IDictionary valuesDictionary) { Id = id; - ValuesDictionary = valuesDictionary; + + if (valuesDictionary != null) + { + foreach (var (key, value) in valuesDictionary) + { + ValuesDictionary[key] = value; + } + } } public IEnumerable GetValues() => - ValuesDictionary.Values.Select(value => value.Value()); + ValuesDictionary.Values.Select(value => value.ToString()); public IEnumerable GetValuesOrderedByColumns(IEnumerable columnDefinitions) => columnDefinitions.Select(columnDefinition => this[columnDefinition.Name] ?? string.Empty); + + internal JsonNode GetValueAsJsonNode(string name) => + ValuesDictionary.GetMaybe(name) switch + { + JsonNode node => node, + { } otherValue => JsonSerializer.SerializeToNode(otherValue), + null => null, + }; } diff --git a/Lombiq.DataTables/Services/ExcelDataTableExportService.cs b/Lombiq.DataTables/Services/ExcelDataTableExportService.cs index a417c0a74..4f5eabb99 100644 --- a/Lombiq.DataTables/Services/ExcelDataTableExportService.cs +++ b/Lombiq.DataTables/Services/ExcelDataTableExportService.cs @@ -30,7 +30,7 @@ public async Task ExportAsync( var columns = columnsDefinition.Columns.Where(column => column.Exportable).ToList(); var response = await dataProvider.GetRowsAsync(request); var results = response.Data - .Select(item => columns.Select(column => item.ValuesDictionary[column.Name]).ToArray()) + .Select(item => columns.Select(column => item.GetValueAsJsonNode(column.Name)).ToArray()) .ToArray(); return CollectionToStream( diff --git a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs index 3b48b501d..916cbb43b 100644 --- a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs +++ b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs @@ -120,7 +120,7 @@ JsonObject date when ExportDate.IsInstance(date) => ExportDate.GetText(date), filteredRows = filteredRows.Where(row => columnFilters.All(filter => row.ValuesDictionary.TryGetValue(filter.Name, out var token) && - token?.ToString().Contains(filter.Search.Value, StringComparison.InvariantCulture) == true)); + token?.ToString()?.Contains(filter.Search.Value, StringComparison.InvariantCulture) == true)); } if (hasSearch) @@ -133,8 +133,8 @@ JsonObject date when ExportDate.IsInstance(date) => ExportDate.GetText(date), words.TrueForAll(word => columns.Any(filter => filter.Searchable && - row.ValuesDictionary.TryGetValue(filter.Name, out var token) && - PrepareToken(token)?.Contains(word, StringComparison.InvariantCultureIgnoreCase) == true))); + row.GetValueAsJsonNode(filter.Name) is { } jsonNode && + PrepareToken(jsonNode)?.Contains(word, StringComparison.InvariantCultureIgnoreCase) == true))); } var list = filteredRows.ToList(); From 2bdcdc5cfc088ab10306fcc998af21cf6eee32f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 26 Feb 2024 23:20:06 +0100 Subject: [PATCH 20/95] Code cleanup in Lombiq.DataTable.cshtml --- .../Views/Lombiq.DataTable.cshtml | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml b/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml index 74662c879..5327f2896 100644 --- a/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml +++ b/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml @@ -1,29 +1,27 @@ @using OrchardCore.ResourceManagement -@using System.Globalization @using Lombiq.DataTables.Services -@using System.Text.Json.Nodes @inject IEnumerable Providers @inject IResourceManager ResourceManager @{ - var viewModel = Model.ViewModel as DataTableDefinitionViewModel; + var viewModel = Model.ViewModel as DataTableDefinitionViewModel ?? new DataTableDefinitionViewModel(); - var pageSize = viewModel?.PageSize ?? Site.PageSize; - var skip = viewModel?.Skip ?? 0; + var pageSize = viewModel.PageSize ?? Site.PageSize; + var skip = viewModel.Skip ?? 0; - string queryId = viewModel?.QueryId ?? Model.QueryId?.ToString() ?? ""; - string dataProvider = viewModel?.DataProvider ?? Model.Provider?.ToString() ?? ""; - var columnsDefinition = viewModel?.ColumnsDefinition ?? await Providers + string queryId = viewModel.QueryId ?? Model.QueryId?.ToString() ?? ""; + string dataProvider = viewModel.DataProvider ?? Model.Provider?.ToString() ?? ""; + var columnsDefinition = viewModel.ColumnsDefinition ?? await Providers .Single(provider => provider.GetType().Name == dataProvider) .GetColumnsDefinitionAsync(queryId); var columns = columnsDefinition?.Columns.ToList() ?? new List(); - var childRowsEnabled = viewModel?.ChildRowsEnabled ?? false; - var progressiveLoadingEnabled = viewModel?.ProgressiveLoadingEnabled ?? false; - var queryStringParametersLocalStorageKey = viewModel?.QueryStringParametersLocalStorageKey ?? ""; - var dataTableId = string.IsNullOrEmpty(viewModel?.DataTableId) ? ElementNames.DataTableElementName : viewModel.DataTableId; - var dataTableCssClasses = string.IsNullOrEmpty(viewModel?.DataTableCssClasses) ? "" : viewModel.DataTableCssClasses; + var childRowsEnabled = viewModel.ChildRowsEnabled; + var progressiveLoadingEnabled = viewModel.ProgressiveLoadingEnabled; + var queryStringParametersLocalStorageKey = viewModel.QueryStringParametersLocalStorageKey ?? ""; + var dataTableId = string.IsNullOrEmpty(viewModel.DataTableId) ? ElementNames.DataTableElementName : viewModel.DataTableId; + var dataTableCssClasses = string.IsNullOrEmpty(viewModel.DataTableCssClasses) ? "" : viewModel.DataTableCssClasses; var defaultSortingColumnIndex = Math.Max( 0, Math.Max(columns.FindIndex(column => column.Orderable), columns.FindIndex(column => column.Name == columnsDefinition?.DefaultSortingColumnName))); @@ -31,9 +29,9 @@ var defaultSortingDirection = columnsDefinition?.DefaultSortingDirection ?? SortingDirection.Ascending; var defaultSortingDirectionValue = defaultSortingDirection == SortingDirection.Ascending ? "asc" : "desc"; - var rowsApiUrl = Url.Action(nameof(RowsController.Get), typeof(RowsController).ControllerName(), new { Area = FeatureIds.Area }); - var childRowApiUrl = Url.Action(nameof(ChildRowsController.Get), typeof(ChildRowsController).ControllerName(), new { Area = FeatureIds.Area }); - var exportApiUrl = Url.Action(nameof(RowsController.Export), typeof(RowsController).ControllerName(), new { Area = FeatureIds.Area }); + var rowsApiUrl = Url.Action(nameof(RowsController.Get), typeof(RowsController).ControllerName(), new { FeatureIds.Area }); + var childRowApiUrl = Url.Action(nameof(ChildRowsController.Get), typeof(ChildRowsController).ControllerName(), new { FeatureIds.Area }); + var exportApiUrl = Url.Action(nameof(RowsController.Export), typeof(RowsController).ControllerName(), new { FeatureIds.Area }); const string rowElementWithChildRowVisibleModifier = ElementNames.DataTableRowElementName + "_childRowVisible"; const string childRowElementName = ElementNames.DataTableElementName + "__childRow"; @@ -48,13 +46,13 @@ ResourceManager.RegisterResource("stylesheet", ResourceNames.DataTables.Bootstrap4); ResourceManager.RegisterResource("stylesheet", ResourceNames.DataTables.Bootstrap4Buttons); - dynamic additionalOptions = viewModel?.AdditionalDatatableOptions; + dynamic additionalOptions = viewModel.AdditionalDatatableOptions; var hasViewAction = (bool)(additionalOptions?.viewAction == true); var defaultOrder = new[] { new[] { defaultSortingColumnIndex.ToString(), defaultSortingDirectionValue } }; var dataTablesOptions = new Dictionary { ["order"] = defaultOrder }; if (pageSize > 0) { dataTablesOptions["pageLength"] = pageSize; } - if (additionalOptions is JsonObject options) + if (viewModel.AdditionalDatatableOptions is { } options) { foreach (var (key, value) in options) { From 9a7ce3a8206da2ad0a35da49b4db3a77ed856f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 26 Feb 2024 23:29:55 +0100 Subject: [PATCH 21/95] View bug fix. --- Lombiq.DataTables/Views/Lombiq.DataTable.cshtml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml b/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml index 5327f2896..706918676 100644 --- a/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml +++ b/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml @@ -1,5 +1,7 @@ @using OrchardCore.ResourceManagement @using Lombiq.DataTables.Services +@using System.Text.Json +@using System.Text.Json.Nodes @inject IEnumerable Providers @@ -46,8 +48,7 @@ ResourceManager.RegisterResource("stylesheet", ResourceNames.DataTables.Bootstrap4); ResourceManager.RegisterResource("stylesheet", ResourceNames.DataTables.Bootstrap4Buttons); - dynamic additionalOptions = viewModel.AdditionalDatatableOptions; - var hasViewAction = (bool)(additionalOptions?.viewAction == true); + var hasViewAction = viewModel.AdditionalDatatableOptions?["viewAction"].GetValueKind() == JsonValueKind.True; var defaultOrder = new[] { new[] { defaultSortingColumnIndex.ToString(), defaultSortingDirectionValue } }; var dataTablesOptions = new Dictionary { ["order"] = defaultOrder }; From 3ca9a6356a22ecc21d6444ba3121033dbeffba14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 26 Feb 2024 23:30:13 +0100 Subject: [PATCH 22/95] Unusing. --- Lombiq.DataTables/Views/Lombiq.DataTable.cshtml | 1 - 1 file changed, 1 deletion(-) diff --git a/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml b/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml index 706918676..e492a0dbd 100644 --- a/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml +++ b/Lombiq.DataTables/Views/Lombiq.DataTable.cshtml @@ -1,7 +1,6 @@ @using OrchardCore.ResourceManagement @using Lombiq.DataTables.Services @using System.Text.Json -@using System.Text.Json.Nodes @inject IEnumerable Providers From 1c1f75807f21304a27670cfd6b85ef8f14af5406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 26 Feb 2024 23:50:24 +0100 Subject: [PATCH 23/95] Code cleanup. --- Lombiq.DataTables/Models/DataTableDataRequest.cs | 1 - Lombiq.DataTables/Models/DataTableOrder.cs | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Models/DataTableDataRequest.cs b/Lombiq.DataTables/Models/DataTableDataRequest.cs index ea0ed223c..c19ada8bd 100644 --- a/Lombiq.DataTables/Models/DataTableDataRequest.cs +++ b/Lombiq.DataTables/Models/DataTableDataRequest.cs @@ -21,4 +21,3 @@ public IReadOnlyCollection GetColumnSearches() => .Where(filter => !string.IsNullOrWhiteSpace(filter.Search?.Value)) .ToList() ?? []; } - diff --git a/Lombiq.DataTables/Models/DataTableOrder.cs b/Lombiq.DataTables/Models/DataTableOrder.cs index 1c28ee076..1ff7e0f61 100644 --- a/Lombiq.DataTables/Models/DataTableOrder.cs +++ b/Lombiq.DataTables/Models/DataTableOrder.cs @@ -11,6 +11,8 @@ public class DataTableOrder public SortingDirection Direction { get; set; } [JsonPropertyName("direction")] + [JsonInclude] + [SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "It's used for JSON conversion.")] private string DirectionString { get => IsAscending ? "ascending" : "descending"; From c6006d46688b41d1429eb2a5df073842551eb014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 27 Feb 2024 00:19:56 +0100 Subject: [PATCH 24/95] Add missing using. --- Lombiq.DataTables/Models/DataTableOrder.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Lombiq.DataTables/Models/DataTableOrder.cs b/Lombiq.DataTables/Models/DataTableOrder.cs index 1ff7e0f61..dc2891e42 100644 --- a/Lombiq.DataTables/Models/DataTableOrder.cs +++ b/Lombiq.DataTables/Models/DataTableOrder.cs @@ -1,4 +1,5 @@ using Lombiq.DataTables.Constants; +using System.Diagnostics.CodeAnalysis; using System.Text.Json.Serialization; namespace Lombiq.DataTables.Models; From b8967e19fcabcfb7360cd44ea1c071b800f65a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 4 Mar 2024 00:22:18 +0100 Subject: [PATCH 25/95] Update OC to latest (because of bug fix for WorkflowTypeStep) --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index de44fca9d..b6491c780 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -34,8 +34,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 76860d36f..8ed05e131 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -40,9 +40,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index d99eaf578..b4b83c9f0 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 3a53d30563821bf4bce3869e83e567a31a4d2c5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 8 Mar 2024 00:09:18 +0100 Subject: [PATCH 26/95] Update OC preview version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index b6491c780..a397faff7 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -34,8 +34,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 8ed05e131..8d60dbd19 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -40,9 +40,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index b4b83c9f0..016ab1eb4 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 5f5817860f1d0f22097afe4e60fbdb2523c24f9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 13 Mar 2024 06:15:19 +0100 Subject: [PATCH 27/95] Update OC package --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index a397faff7..6003e7ab5 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -34,8 +34,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 8d60dbd19..b0b818491 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -40,9 +40,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 016ab1eb4..f24e03d30 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 06a84d2c3ca7154d916ceba2699cf420aff1878f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 18 Mar 2024 01:28:21 +0100 Subject: [PATCH 28/95] Replace AdminRouteAttribute with AdminAttribute. --- Lombiq.DataTables/Controllers/TableController.cs | 3 +-- Lombiq.DataTables/Startup.cs | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Lombiq.DataTables/Controllers/TableController.cs b/Lombiq.DataTables/Controllers/TableController.cs index 8825f2f0e..ba7d93f7b 100644 --- a/Lombiq.DataTables/Controllers/TableController.cs +++ b/Lombiq.DataTables/Controllers/TableController.cs @@ -1,6 +1,5 @@ using Lombiq.DataTables.Services; using Lombiq.DataTables.ViewModels; -using Lombiq.HelpfulLibraries.OrchardCore.Mvc; using Microsoft.AspNetCore.Mvc; using OrchardCore.Admin; using System.Collections.Generic; @@ -18,7 +17,7 @@ public class TableController : Controller public TableController(IEnumerable dataTableDataProviders) => _dataTableDataProviders = dataTableDataProviders; - [AdminRoute("DataTable/{providerName}/{queryId?}")] + [Admin("DataTable/{providerName}/{queryId?}")] public async Task Get(string providerName, string queryId = null, bool paging = true, bool viewAction = false) { var provider = _dataTableDataProviders.Single(provider => provider.Name == providerName); diff --git a/Lombiq.DataTables/Startup.cs b/Lombiq.DataTables/Startup.cs index 29eddb224..ac7134351 100644 --- a/Lombiq.DataTables/Startup.cs +++ b/Lombiq.DataTables/Startup.cs @@ -4,7 +4,6 @@ using Lombiq.DataTables.TagHelpers; using Lombiq.HelpfulLibraries.AspNetCore.Middlewares; using Lombiq.HelpfulLibraries.OrchardCore.DependencyInjection; -using Lombiq.HelpfulLibraries.OrchardCore.Mvc; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; @@ -41,8 +40,6 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(); services.AddDataTableDataProvider(); - - AdminRouteAttributeRouteMapper.AddToServices(services); } public override void Configure(IApplicationBuilder app, IEndpointRouteBuilder routes, IServiceProvider serviceProvider) => From da4fa136b123d3a134124682d68d9c2c29c0f983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 2 Apr 2024 14:53:22 +0200 Subject: [PATCH 29/95] Use JObject.FromObject instead of JsonSerializer.SerializeToNode where applicable. --- Lombiq.DataTables/Controllers/TableController.cs | 4 ++-- Lombiq.DataTables/Models/DataTableRow.cs | 3 +-- Lombiq.DataTables/Services/DateTimeJsonConverter.cs | 4 ++-- .../Services/IndexBasedDataTableDataProvider.cs | 6 +++--- .../Services/JsonResultDataTableDataProvider.cs | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Lombiq.DataTables/Controllers/TableController.cs b/Lombiq.DataTables/Controllers/TableController.cs index ba7d93f7b..6c86cdf6c 100644 --- a/Lombiq.DataTables/Controllers/TableController.cs +++ b/Lombiq.DataTables/Controllers/TableController.cs @@ -4,7 +4,7 @@ using OrchardCore.Admin; using System.Collections.Generic; using System.Linq; -using System.Text.Json; +using System.Text.Json.Nodes; using System.Threading.Tasks; namespace Lombiq.DataTables.Controllers; @@ -23,7 +23,7 @@ public async Task Get(string providerName, string queryId = null, var provider = _dataTableDataProviders.Single(provider => provider.Name == providerName); if (string.IsNullOrEmpty(queryId)) queryId = providerName; - var additionalDatatableOptions = JsonSerializer.SerializeToNode(new { paging, viewAction })!.AsObject(); + var additionalDatatableOptions = JObject.FromObject(new { paging, viewAction })!.AsObject(); var definition = new DataTableDefinitionViewModel(additionalDatatableOptions) { DataProvider = providerName, diff --git a/Lombiq.DataTables/Models/DataTableRow.cs b/Lombiq.DataTables/Models/DataTableRow.cs index 20e6ca8d3..71c225c36 100644 --- a/Lombiq.DataTables/Models/DataTableRow.cs +++ b/Lombiq.DataTables/Models/DataTableRow.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using System.Text.Json; using System.Text.Json.Nodes; using System.Text.Json.Serialization; @@ -46,7 +45,7 @@ internal JsonNode GetValueAsJsonNode(string name) => ValuesDictionary.GetMaybe(name) switch { JsonNode node => node, - { } otherValue => JsonSerializer.SerializeToNode(otherValue), + { } otherValue => JObject.FromObject(otherValue), null => null, }; } diff --git a/Lombiq.DataTables/Services/DateTimeJsonConverter.cs b/Lombiq.DataTables/Services/DateTimeJsonConverter.cs index 90a371233..5d326e46f 100644 --- a/Lombiq.DataTables/Services/DateTimeJsonConverter.cs +++ b/Lombiq.DataTables/Services/DateTimeJsonConverter.cs @@ -32,8 +32,8 @@ public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, Jso } public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) => - JsonSerializer - .SerializeToNode(new DateTimeTicks(value.Ticks, value.Kind))! + JObject + .FromObject(new DateTimeTicks(value.Ticks, value.Kind))! .WriteTo(writer, options); public sealed record DateTimeTicks(long Ticks, DateTimeKind Kind) diff --git a/Lombiq.DataTables/Services/IndexBasedDataTableDataProvider.cs b/Lombiq.DataTables/Services/IndexBasedDataTableDataProvider.cs index f0238233f..e72106ed2 100644 --- a/Lombiq.DataTables/Services/IndexBasedDataTableDataProvider.cs +++ b/Lombiq.DataTables/Services/IndexBasedDataTableDataProvider.cs @@ -6,7 +6,7 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text.Json; +using System.Text.Json.Nodes; using System.Threading.Tasks; using YesSql; using YesSql.Indexes; @@ -60,9 +60,9 @@ public override async Task GetRowsAsync(DataTableDataRequ var queryResults = await transaction.Connection.QueryAsync(sql, query.Parameters, transaction); var rowList = SubstituteByColumn( - (await TransformAsync(queryResults)).Select(item => JsonSerializer.SerializeToNode(item)?.AsObject()), + (await TransformAsync(queryResults)).Select(item => JObject.FromObject(item)), columnsDefinition.Columns.ToList()) - .Select((item, index) => new DataTableRow(index, JsonSerializer.SerializeToNode(item)?.AsObject())) + .Select((item, index) => new DataTableRow(index, JObject.FromObject(item))) .ToList(); var liquidColumns = columnsDefinition diff --git a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs index 916cbb43b..a13baee90 100644 --- a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs +++ b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs @@ -44,7 +44,7 @@ public override async Task GetRowsAsync(DataTableDataRequ var json = results[0] is JsonObject ? results.Cast() - : results.Select(result => JsonSerializer.SerializeToNode(result)?.AsObject()); + : results.Select(result => JObject.FromObject(result)); if (!string.IsNullOrEmpty(order.Column)) json = OrderByColumn(json, order); if (request.Search?.IsRegex == true) From 013408f691ef935dac2d8afe25e1a658390265b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 23 Apr 2024 17:17:29 +0200 Subject: [PATCH 30/95] Update OC preview version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 6003e7ab5..89264af15 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -34,8 +34,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index b0b818491..325bae338 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -40,9 +40,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index f24e03d30..c5cd3a540 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From ecbad33971e3b14425bca83d6e5695b10c2ecab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 27 Apr 2024 19:31:49 +0200 Subject: [PATCH 31/95] Update OC package version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 89264af15..2c84c93a4 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -34,8 +34,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 325bae338..28adaeb8e 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -40,9 +40,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index c5cd3a540..34428505b 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 9c42051cf0dd38672e69f40d6ed4f790e072c678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 4 May 2024 12:57:04 +0200 Subject: [PATCH 32/95] Update OC versions --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 2c84c93a4..2af1c6f52 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -34,8 +34,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 28adaeb8e..2cc77478f 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -40,9 +40,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 34428505b..858745e97 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 6f68666bf6fe784aedd319c5ed1c7337c3688c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 7 May 2024 21:08:58 +0200 Subject: [PATCH 33/95] Update OC to the latest preview. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 2af1c6f52..f144afd72 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -34,8 +34,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 2cc77478f..525a8adae 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -40,9 +40,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 858745e97..8f173ef24 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 5a478568d1ee62667c8e065daeaf27103a1abbfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 12 May 2024 18:17:17 +0200 Subject: [PATCH 34/95] Update Lombiq.DataTables/Models/VueModel.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: József Horváth --- Lombiq.DataTables/Models/VueModel.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Lombiq.DataTables/Models/VueModel.cs b/Lombiq.DataTables/Models/VueModel.cs index 604b066d6..e297783ee 100644 --- a/Lombiq.DataTables/Models/VueModel.cs +++ b/Lombiq.DataTables/Models/VueModel.cs @@ -80,6 +80,7 @@ public class VueModel [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("hiddenInput")] + [JsonInclude] [SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "It's used for JSON conversion.")] private object HiddenInputSerialize { From 18aef9f6dfdc36a30221d8f8c7c52093f8b16f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 12 May 2024 18:17:47 +0200 Subject: [PATCH 35/95] Update Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: József Horváth --- .../Tests/Lombiq.DataTables.Tests/MockDataProvider.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs index 4eb5acc1e..7b431fd6d 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/MockDataProvider.cs @@ -62,8 +62,7 @@ protected override async Task GetResultsA return new(_dataSet.Select(row => JsonSerializer.SerializeToNode( columns.ToDictionary(column => column.Name, column => row[column.Index]), - _options - ))); + _options))); } protected override DataTableColumnsDefinition GetColumnsDefinitionInner(string queryId) => Definition; From 0d0ec5047ab0e89a7b37083321b037f5913955d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 12 May 2024 18:18:42 +0200 Subject: [PATCH 36/95] Update Lombiq.DataTables/Extensions/JsonNodeExtensions.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: József Horváth --- Lombiq.DataTables/Extensions/JsonNodeExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Extensions/JsonNodeExtensions.cs b/Lombiq.DataTables/Extensions/JsonNodeExtensions.cs index ca7c8d1c8..3c6a3b5ee 100644 --- a/Lombiq.DataTables/Extensions/JsonNodeExtensions.cs +++ b/Lombiq.DataTables/Extensions/JsonNodeExtensions.cs @@ -6,6 +6,6 @@ public static class JsonNodeExtensions /// Checks if the provided is object and has a Type property, and if its value /// matches . /// - public static bool HasTypeProperty(this JsonNode node) => + public static bool HasMatchingTypeProperty(this JsonNode node) => node is JsonObject jsonObject && jsonObject["Type"]?.ToString() == typeof(T).Name; } From 80e17736bcd33c2695e87b74751e6cf894d7bbd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 12 May 2024 18:21:11 +0200 Subject: [PATCH 37/95] Rename HasTypeProperty to HasMatchingTypeProperty --- Lombiq.DataTables/Models/ExportDate.cs | 2 +- Lombiq.DataTables/Models/ExportLink.cs | 2 +- Lombiq.DataTables/Services/DateTimeJsonConverter.cs | 4 ++-- Lombiq.DataTables/Services/ExcelDataTableExportService.cs | 6 +++--- .../Services/JsonResultDataTableDataProvider.cs | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Lombiq.DataTables/Models/ExportDate.cs b/Lombiq.DataTables/Models/ExportDate.cs index 566148e8b..f24d9b7e9 100644 --- a/Lombiq.DataTables/Models/ExportDate.cs +++ b/Lombiq.DataTables/Models/ExportDate.cs @@ -22,7 +22,7 @@ public class ExportDate public string ExcelFormat { get; set; } public static bool IsInstance(JsonObject jsonObject) => - jsonObject.HasTypeProperty(); + jsonObject.HasMatchingTypeProperty(); public static string GetText(JsonObject jsonObject) => ((LocalDate)jsonObject.ToObject()).ToShortDateString(); diff --git a/Lombiq.DataTables/Models/ExportLink.cs b/Lombiq.DataTables/Models/ExportLink.cs index 5822dddc5..14028a0aa 100644 --- a/Lombiq.DataTables/Models/ExportLink.cs +++ b/Lombiq.DataTables/Models/ExportLink.cs @@ -33,7 +33,7 @@ public ExportLink(string url, JsonNode text, IDictionary? attrib public override string ToString() => Text.ToString(); public static bool IsInstance(JsonObject jsonObject) => - jsonObject.HasTypeProperty(); + jsonObject.HasMatchingTypeProperty(); public static string? GetText(JsonObject jObject) => jObject[nameof(Text)]?.ToString(); } diff --git a/Lombiq.DataTables/Services/DateTimeJsonConverter.cs b/Lombiq.DataTables/Services/DateTimeJsonConverter.cs index 5d326e46f..cc628e2b9 100644 --- a/Lombiq.DataTables/Services/DateTimeJsonConverter.cs +++ b/Lombiq.DataTables/Services/DateTimeJsonConverter.cs @@ -18,12 +18,12 @@ public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, Jso return DateTime.Parse(node.GetValue(), CultureInfo.InvariantCulture); } - if (node.HasTypeProperty()) + if (node.HasMatchingTypeProperty()) { return node.ToObject().ToDateTime(); } - if (node.HasTypeProperty()) + if (node.HasMatchingTypeProperty()) { return (DateTime)node.ToObject(); } diff --git a/Lombiq.DataTables/Services/ExcelDataTableExportService.cs b/Lombiq.DataTables/Services/ExcelDataTableExportService.cs index 4f5eabb99..b2a1d9cb8 100644 --- a/Lombiq.DataTables/Services/ExcelDataTableExportService.cs +++ b/Lombiq.DataTables/Services/ExcelDataTableExportService.cs @@ -113,18 +113,18 @@ public static Stream CollectionToStream( private static void CreateTableCell(IXLCell cell, JsonNode node, string dateFormat, IStringLocalizer localizer) { - if (node.HasTypeProperty()) + if (node.HasMatchingTypeProperty()) { var link = node.ToObject(); if (link != null) cell.FormulaA1 = $"HYPERLINK(\"{link.Url}\",\"{link.Text}\")"; } - else if (node.HasTypeProperty()) + else if (node.HasMatchingTypeProperty()) { var date = node.ToObject(); cell.Value = (DateTime)date!; cell.Style.DateFormat.Format = date?.ExcelFormat ?? dateFormat; } - else if (node.HasTypeProperty()) + else if (node.HasMatchingTypeProperty()) { cell.Value = node.ToObject().ToDateTime(); cell.Style.DateFormat.Format = dateFormat; diff --git a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs index a13baee90..c1fefdcfb 100644 --- a/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs +++ b/Lombiq.DataTables/Services/JsonResultDataTableDataProvider.cs @@ -164,15 +164,15 @@ public static OrderByColumnItem Create(JsonObject item, string jsonPathQuery) { if (item.SelectNode(jsonPathQuery) is not { } node) return new(item, OrderBy: null); - if (node.HasTypeProperty()) + if (node.HasMatchingTypeProperty()) { node = ExportLink.GetText(node.AsObject()); } - else if (node.HasTypeProperty()) + else if (node.HasMatchingTypeProperty()) { node = (DateTime)node.ToObject(); } - else if (node.HasTypeProperty()) + else if (node.HasMatchingTypeProperty()) { node = node.ToObject().ToDateTime(); } From 938446908d029f41239ae5ae99b984296e92aaea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 12 May 2024 18:36:42 +0200 Subject: [PATCH 38/95] Get rid of `[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]`. --- .../Models/DataTableChildRowResponse.cs | 4 +++- Lombiq.DataTables/Models/DataTableColumn.cs | 10 +++++++++- Lombiq.DataTables/Models/DataTableDataResponse.cs | 6 +++++- Lombiq.DataTables/Models/DataTableRow.cs | 3 ++- .../Models/DataTableSearchParameters.cs | 2 +- Lombiq.DataTables/Models/VueModel.cs | 13 ++++++++++--- Lombiq.DataTables/Models/VueModelCheckbox.cs | 6 +++++- 7 files changed, 35 insertions(+), 9 deletions(-) diff --git a/Lombiq.DataTables/Models/DataTableChildRowResponse.cs b/Lombiq.DataTables/Models/DataTableChildRowResponse.cs index 69cdf84c8..b27ae234f 100644 --- a/Lombiq.DataTables/Models/DataTableChildRowResponse.cs +++ b/Lombiq.DataTables/Models/DataTableChildRowResponse.cs @@ -2,10 +2,12 @@ namespace Lombiq.DataTables.Models; -[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableChildRowResponse { + [JsonPropertyName("error")] public string Error { get; set; } + + [JsonPropertyName("content")] public string Content { get; set; } public static DataTableChildRowResponse ErrorResult(string errorText) => new() { Error = errorText }; diff --git a/Lombiq.DataTables/Models/DataTableColumn.cs b/Lombiq.DataTables/Models/DataTableColumn.cs index e126bd22f..6cd7ee9fc 100644 --- a/Lombiq.DataTables/Models/DataTableColumn.cs +++ b/Lombiq.DataTables/Models/DataTableColumn.cs @@ -2,12 +2,20 @@ namespace Lombiq.DataTables.Models; -[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableColumn { + [JsonPropertyName("data")] public string Data { get; set; } + + [JsonPropertyName("name")] public string Name { get; set; } + + [JsonPropertyName("searchable")] public bool Searchable { get; set; } + + [JsonPropertyName("orderable")] public bool Orderable { get; set; } + + [JsonPropertyName("search")] public DataTableSearchParameters Search { get; set; } } diff --git a/Lombiq.DataTables/Models/DataTableDataResponse.cs b/Lombiq.DataTables/Models/DataTableDataResponse.cs index 68f9b09a0..78d9a4084 100644 --- a/Lombiq.DataTables/Models/DataTableDataResponse.cs +++ b/Lombiq.DataTables/Models/DataTableDataResponse.cs @@ -4,7 +4,6 @@ namespace Lombiq.DataTables.Models; -[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableDataResponse { /// @@ -14,6 +13,7 @@ public class DataTableDataResponse /// /// For internal use only. It's overwritten during normal use. /// + [JsonPropertyName("draw")] [JsonInclude] internal int Draw { get; set; } @@ -21,21 +21,25 @@ public class DataTableDataResponse /// Gets or sets the extra informational field that shows the actual total if filtering (such as keyword /// search) is used. When not filtering it must be the same as . /// + [JsonPropertyName("recordsTotal")] public int RecordsTotal { get; set; } /// /// Gets or sets the total number of results; used for paging. /// + [JsonPropertyName("recordsFiltered")] public int RecordsFiltered { get; set; } /// /// Gets or sets the table contents of the current page. /// + [JsonPropertyName("data")] public IEnumerable Data { get; set; } /// /// Gets or sets the user-facing error message in case something went wrong. /// + [JsonPropertyName("error")] public string Error { get; set; } /// diff --git a/Lombiq.DataTables/Models/DataTableRow.cs b/Lombiq.DataTables/Models/DataTableRow.cs index 71c225c36..c064e5fbd 100644 --- a/Lombiq.DataTables/Models/DataTableRow.cs +++ b/Lombiq.DataTables/Models/DataTableRow.cs @@ -5,13 +5,14 @@ namespace Lombiq.DataTables.Models; -[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableRow { [JsonExtensionData] [JsonInclude] + [JsonPropertyName("valuesDictionary")] internal IDictionary ValuesDictionary { get; set; } = new Dictionary(); + [JsonPropertyName("id")] public int Id { get; set; } public string this[string name] diff --git a/Lombiq.DataTables/Models/DataTableSearchParameters.cs b/Lombiq.DataTables/Models/DataTableSearchParameters.cs index 50e05706b..ac58821b0 100644 --- a/Lombiq.DataTables/Models/DataTableSearchParameters.cs +++ b/Lombiq.DataTables/Models/DataTableSearchParameters.cs @@ -2,9 +2,9 @@ namespace Lombiq.DataTables.Models; -[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class DataTableSearchParameters { + [JsonPropertyName("value")] public string Value { get; set; } [JsonPropertyName("regex")] diff --git a/Lombiq.DataTables/Models/VueModel.cs b/Lombiq.DataTables/Models/VueModel.cs index e297783ee..eb9e7384d 100644 --- a/Lombiq.DataTables/Models/VueModel.cs +++ b/Lombiq.DataTables/Models/VueModel.cs @@ -14,7 +14,6 @@ namespace Lombiq.DataTables.Models; -[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class VueModel { /// @@ -22,6 +21,7 @@ public class VueModel /// component property client-side. Even then, you need to provide either this or if the /// column is meant to be . /// + [JsonPropertyName("text")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Text { get; set; } @@ -29,6 +29,7 @@ public class VueModel /// Gets or sets the HTML content to be rendered inside the cell. When used and are ignored. /// + [JsonPropertyName("html")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Html { get; set; } @@ -36,12 +37,14 @@ public class VueModel /// Gets or sets the value used for sorting. If or empty, the value of is /// used for sorting. /// + [JsonPropertyName("sort")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public object Sort { get; set; } /// /// Gets or sets the URL to be used in the href attributes. When this is used is ignored. /// + [JsonPropertyName("href")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string Href { get; set; } @@ -53,6 +56,7 @@ public class VueModel /// Gets or sets the Bootstrap badge class of the cell. To be used along with and optionally . /// + [JsonPropertyName("badge")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public object Badge { get; set; } @@ -60,6 +64,7 @@ public class VueModel /// Gets or sets the data used as extra information to be consumed by special event so the contents can be /// updated with JavaScript on client side before each render. /// + [JsonPropertyName("special")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public object Special { get; set; } @@ -156,19 +161,21 @@ public static IDictionary CreateTextForIcbinDataTable(IHtmlLocal ["all"] = localizer["All"].Value, }; - [JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class HiddenInputValue { + [JsonPropertyName("name")] public string Name { get; set; } + [JsonPropertyName("value")] public string Value { get; set; } } - [JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class MultipleHrefValue { + [JsonPropertyName("url")] public string Url { get; set; } + [JsonPropertyName("text")] public string Text { get; set; } } diff --git a/Lombiq.DataTables/Models/VueModelCheckbox.cs b/Lombiq.DataTables/Models/VueModelCheckbox.cs index dd6d4d287..7361ff5b7 100644 --- a/Lombiq.DataTables/Models/VueModelCheckbox.cs +++ b/Lombiq.DataTables/Models/VueModelCheckbox.cs @@ -4,7 +4,6 @@ namespace Lombiq.DataTables.Models; // This class is used in . -[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public class VueModelCheckbox { // While the warning doesn't show up in VS it does with dotnet build, but inconsistently. @@ -14,13 +13,18 @@ public class VueModelCheckbox "CA1822:Mark members as static", Justification = "It's necessary to be instance-level for JSON serialization.")] #pragma warning restore IDE0079 // Remove unnecessary suppression + [JsonPropertyName("type")] public string Type => "checkbox"; + [JsonPropertyName("name")] public string Name { get; set; } + [JsonPropertyName("text")] public string Text { get; set; } + [JsonPropertyName("value")] public bool? Value { get; set; } + [JsonPropertyName("classes")] public string Classes { get; set; } = string.Empty; } From efbd9a8927f15a17cb221b629336989473f1d5bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Thu, 16 May 2024 08:36:06 +0200 Subject: [PATCH 39/95] Fix consolidation. --- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 410bc14b1..7978a06be 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From dcff71f428a5e0d2761216d79c67f10940acf0f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 28 May 2024 11:47:45 +0200 Subject: [PATCH 40/95] Update OC preview version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index f144afd72..29050bc20 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -34,8 +34,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 8ccd01436..9c22daa8d 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -40,9 +40,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 7978a06be..528c52bb3 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 36f1a5576906c1c6e179b2eda6bfa86f7db413fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 28 May 2024 13:43:52 +0200 Subject: [PATCH 41/95] Fix NotSupportedException saying "CFF2 Fonts are not currently supported" on Linux. --- .../Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs index 49f7b4549..af395c694 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/UnitTests/Services/ExportTests.cs @@ -253,11 +253,11 @@ private static async Task TryExportWithFallbackFontsAsync( { return await service.ExportAsync(provider, request, customNumberFormat: customNumberFormat); } - catch (MissingFontTableException missingFontTableException) + catch (Exception exception) when (exception is MissingFontTableException or NotSupportedException) { DebugHelper.WriteLineTimestamped( $"Attempt {(i + 1).ToTechnicalString()} of exporting the data table with the font " + - $"{fallbackFont} failed with the MissingFontTableException: {missingFontTableException.Message}."); + $"{fallbackFont} failed with the {exception.GetType().Name}: {exception.Message}."); if (i + 1 < maxAttempts) { From 21b2b04b8fc4ffd288d7466269385b815f9d79ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Thu, 30 May 2024 13:48:52 +0200 Subject: [PATCH 42/95] Update OC preview version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 29050bc20..ae44f455b 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -34,8 +34,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 9c22daa8d..62e8f3046 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -40,9 +40,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 528c52bb3..257728cd3 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From c2e6aeb5bc27b74d4f61568e94182b46b29f387f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Thu, 30 May 2024 14:57:39 +0200 Subject: [PATCH 43/95] Fix new "Obsolete" warnings. --- .../Services/DeletedContentItemDataTableDataProvider.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lombiq.DataTables/Services/DeletedContentItemDataTableDataProvider.cs b/Lombiq.DataTables/Services/DeletedContentItemDataTableDataProvider.cs index 5976f41e8..278b41142 100644 --- a/Lombiq.DataTables/Services/DeletedContentItemDataTableDataProvider.cs +++ b/Lombiq.DataTables/Services/DeletedContentItemDataTableDataProvider.cs @@ -7,7 +7,6 @@ using Microsoft.Extensions.Localization; using OrchardCore.ContentManagement; using OrchardCore.ContentManagement.Records; -using OrchardCore.Contents; using OrchardCore.Mvc.Core.Utilities; using OrchardCore.Navigation; using OrchardCore.Security.Permissions; @@ -15,6 +14,7 @@ using System.Linq; using System.Threading.Tasks; using YesSql; +using static OrchardCore.Contents.CommonPermissions; namespace Lombiq.DataTables.Services; @@ -38,7 +38,7 @@ public DeletedContentItemDataTableDataProvider( public override LocalizedString Description => T["Deleted Content Items"]; public override IEnumerable AllowedPermissions => - new[] { Permissions.DeleteContent }; + new[] { DeleteContent }; protected override async Task GetResultsAsync(DataTableDataRequest request) => new(await GetDeletedContentItemIndicesAsync(_session, request.QueryId)); @@ -71,7 +71,7 @@ public static NavigationItemBuilder AddMenuItem( providerName = nameof(DeletedContentItemDataTableDataProvider), queryId, }) - .Permission(Permissions.DeleteContent) + .Permission(DeleteContent) .LocalNav(); /// From a91c9e07fe9543fb93b174f546b21d9ecc56fbab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 31 May 2024 13:54:49 +0200 Subject: [PATCH 44/95] Remove redundant attribute. --- Lombiq.DataTables/Controllers/TableController.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Lombiq.DataTables/Controllers/TableController.cs b/Lombiq.DataTables/Controllers/TableController.cs index 6c86cdf6c..6f9845308 100644 --- a/Lombiq.DataTables/Controllers/TableController.cs +++ b/Lombiq.DataTables/Controllers/TableController.cs @@ -9,7 +9,6 @@ namespace Lombiq.DataTables.Controllers; -[Admin] public class TableController : Controller { private readonly IEnumerable _dataTableDataProviders; From 5be21fe378c684189a3189d55719a76242bc6565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 31 May 2024 16:25:55 +0200 Subject: [PATCH 45/95] Remove unused private field. --- Lombiq.DataTables/Startup.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Lombiq.DataTables/Startup.cs b/Lombiq.DataTables/Startup.cs index ac7134351..a479c35b8 100644 --- a/Lombiq.DataTables/Startup.cs +++ b/Lombiq.DataTables/Startup.cs @@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -using OrchardCore.Admin; using OrchardCore.Data.Migration; using OrchardCore.Liquid; using OrchardCore.Modules; @@ -19,10 +18,6 @@ namespace Lombiq.DataTables; public class Startup : StartupBase { - private readonly AdminOptions _adminOptions; - - public Startup(IOptions adminOptions) => _adminOptions = adminOptions.Value; - public override void ConfigureServices(IServiceCollection services) { services.AddDataTableExportService(); From d4824c79cf11199207e44f0a328208d306f84dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 5 Jun 2024 12:11:39 +0200 Subject: [PATCH 46/95] Update OC preview version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index ae44f455b..cd5be7ece 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -34,8 +34,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 62e8f3046..be74db837 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -40,9 +40,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 257728cd3..5b8211aab 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 49dae535053075b7a90b86f7c1decfada4304609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 17 Jun 2024 22:03:30 +0200 Subject: [PATCH 47/95] Fix error S6964. --- Lombiq.DataTables/Models/DataTableDataRequest.cs | 11 +++++++++++ Lombiq.DataTables/Models/DataTableSearchParameters.cs | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Models/DataTableDataRequest.cs b/Lombiq.DataTables/Models/DataTableDataRequest.cs index c19ada8bd..b44565680 100644 --- a/Lombiq.DataTables/Models/DataTableDataRequest.cs +++ b/Lombiq.DataTables/Models/DataTableDataRequest.cs @@ -1,17 +1,28 @@ using System.Collections.Generic; using System.Linq; +using System.Text.Json.Serialization; namespace Lombiq.DataTables.Models; public class DataTableDataRequest { public string QueryId { get; set; } + public string DataProvider { get; set; } + + [JsonRequired] public int Draw { get; set; } + + [JsonRequired] public int Start { get; set; } + + [JsonRequired] public int Length { get; set; } + public IEnumerable ColumnFilters { get; set; } + public DataTableSearchParameters Search { get; set; } + public IEnumerable Order { get; set; } public bool HasSearch => !string.IsNullOrWhiteSpace(Search?.Value); diff --git a/Lombiq.DataTables/Models/DataTableSearchParameters.cs b/Lombiq.DataTables/Models/DataTableSearchParameters.cs index ac58821b0..598c273fd 100644 --- a/Lombiq.DataTables/Models/DataTableSearchParameters.cs +++ b/Lombiq.DataTables/Models/DataTableSearchParameters.cs @@ -8,5 +8,5 @@ public class DataTableSearchParameters public string Value { get; set; } [JsonPropertyName("regex")] - public bool IsRegex { get; set; } + public bool? IsRegex { get; set; } } From ebc9a315b3b59da6c777265a6523fb7d2ffb7fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 18 Jun 2024 10:55:11 +0200 Subject: [PATCH 48/95] Update OC version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 728b54a6e..68ce2f0b5 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 13e8f72cf..c3c4d26c6 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 5b8211aab..55eca56e8 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 22acd4f8679fb6bbc3726373429042c4fda66a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 19 Jun 2024 11:19:54 +0200 Subject: [PATCH 49/95] Update OC version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 68ce2f0b5..4338cf2d8 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index c3c4d26c6..e8f159b7d 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 55eca56e8..dc88df081 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 4a1a2bdbde96158b1cf5e11ce17833d002784744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 21 Jun 2024 13:11:40 +0200 Subject: [PATCH 50/95] Update OC preview version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 4338cf2d8..c0874fdef 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index e8f159b7d..a7afe0632 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index dc88df081..be486658d 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 685dfd08358d55d07b2c699d5318ae343b34c6a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Thu, 11 Jul 2024 20:16:29 +0200 Subject: [PATCH 51/95] Update OC preview version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index c0874fdef..1020c5690 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index a7afe0632..ce9239adb 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index be486658d..744559e02 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From f0556e59b9ae87d849d7fd446dba8383c909fe6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Thu, 11 Jul 2024 20:49:52 +0200 Subject: [PATCH 52/95] Fix package consolidation. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++-- .../Lombiq.DataTables.Tests.UI.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index ce9239adb..7d64bc646 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -51,8 +51,8 @@ - - + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index ea2b53f7f..21e6485d5 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -25,7 +25,7 @@ - + From bb1c0aa02e23a81474a3b4d552aba10dd35ee8f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 13 Jul 2024 17:10:02 +0200 Subject: [PATCH 53/95] Update HL version. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 7d64bc646..ca26abaec 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -51,8 +51,8 @@ - - + + From b3bb526023834915ad17948b8f17e3bc187e01df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 13 Jul 2024 17:16:10 +0200 Subject: [PATCH 54/95] Update UITT version. --- .../Lombiq.DataTables.Tests.UI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index 21e6485d5..41da2669f 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -25,7 +25,7 @@ - + From ceb11bd24aa0fab4526e780e6b951e3c051fabb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 16 Jul 2024 19:43:39 +0200 Subject: [PATCH 55/95] Update HL nuget version. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index ca26abaec..914fa439a 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -51,8 +51,8 @@ - - + + From 9afcc49e2a7a65c674a0c52ec4dd564dbe57108b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 16 Jul 2024 19:54:30 +0200 Subject: [PATCH 56/95] Update all UITT Nuget versions. --- .../Lombiq.DataTables.Tests.UI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index 41da2669f..1ea05581c 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -25,7 +25,7 @@ - + From 20c1adeba6898b1d1a6221a5f17fc45e3e12c3a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 16 Jul 2024 22:40:58 +0200 Subject: [PATCH 57/95] Update package version. --- .../Lombiq.DataTables.Tests.UI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index 1ea05581c..fc5bb863c 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -25,7 +25,7 @@ - + From 6245483a6ebf8a4c3f526b47ff93d3739a28b904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 24 Jul 2024 11:02:09 +0200 Subject: [PATCH 58/95] Update OC preview versions. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 1020c5690..93c7acb06 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 914fa439a..de8d44c36 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 744559e02..1f178099f 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 04dbb26ad1a2b94c9581583073e90140a3cce291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 24 Jul 2024 11:12:40 +0200 Subject: [PATCH 59/95] Add *.orig to gitignore. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0d410d770..937ca0665 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ wwwroot/ node_modules/ *.user .pnpm-debug.log +*.orig From 6965145eee3067873615079eb2d2b1339053c119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 26 Jul 2024 22:03:02 +0200 Subject: [PATCH 60/95] Update HL preview version. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index de8d44c36..47b3a5c4f 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -51,8 +51,8 @@ - - + + From e8c90643de5c6931ee2774c7ce688589cd124c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 26 Jul 2024 22:13:49 +0200 Subject: [PATCH 61/95] Update UITT preview version. --- .../Lombiq.DataTables.Tests.UI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index fc5bb863c..3ac383826 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -25,7 +25,7 @@ - + From 44160822713e97cd6e24e90df5a4ae28815967a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 27 Jul 2024 11:32:16 +0200 Subject: [PATCH 62/95] Update HL preview. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 47b3a5c4f..6f49dd4f3 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -51,8 +51,8 @@ - - + + From 71b8e7340784ea72c9373ec0607affe9d2331369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 27 Jul 2024 11:45:10 +0200 Subject: [PATCH 63/95] Update UITT version. --- .../Lombiq.DataTables.Tests.UI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index 3ac383826..3b7af9738 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -25,7 +25,7 @@ - + From 075be2c679ac1f61606b27f91c8c71cf774e00db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 27 Jul 2024 13:42:52 +0200 Subject: [PATCH 64/95] Update UITT preview version. --- .../Lombiq.DataTables.Tests.UI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index 3b7af9738..f2f96d080 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -25,7 +25,7 @@ - + From a51f18c8dd8e045795b6589e4d56dd4f3589bf73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 27 Jul 2024 14:35:27 +0200 Subject: [PATCH 65/95] NuGet.config --- NuGet.config | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 NuGet.config diff --git a/NuGet.config b/NuGet.config new file mode 100644 index 000000000..ba8c556e7 --- /dev/null +++ b/NuGet.config @@ -0,0 +1,10 @@ + + + + + + + + + + From 4cab9a0a50f2c582b9f01c5fb19d72e21624f8df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 27 Jul 2024 14:58:10 +0200 Subject: [PATCH 66/95] wat --- Lombiq.DataTables/Lombiq.DataTables.csproj | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 6f49dd4f3..641833ee9 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -1,7 +1,5 @@ - - net8.0 true @@ -44,18 +42,10 @@ - - - - - - - + - - From 90d9763c8e2361b481a3d3269bbbf4453a5a0ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 27 Jul 2024 15:03:39 +0200 Subject: [PATCH 67/95] Revert "wat" This reverts commit 4cab9a0a50f2c582b9f01c5fb19d72e21624f8df. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 641833ee9..6f49dd4f3 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -1,5 +1,7 @@ + + net8.0 true @@ -42,10 +44,18 @@ - + + + + + + + + + From 06e9c748e00340a9ebb5e7129930a858a59e94a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 27 Jul 2024 19:00:26 +0200 Subject: [PATCH 68/95] Update HL nuget version. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 6f49dd4f3..9989d9496 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -51,8 +51,8 @@ - - + + From 8ed428bef53f34c054fbe397ece6914eee9bf8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sat, 27 Jul 2024 21:35:45 +0200 Subject: [PATCH 69/95] Update HL. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 9989d9496..97bdc9444 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -51,8 +51,8 @@ - - + + From e2f3e25ec0b92bfe70a7e2006c19d7b37d684e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 29 Jul 2024 23:23:18 +0200 Subject: [PATCH 70/95] Update OC preview version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 93c7acb06..9659b7eba 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 97bdc9444..da9be8220 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index cf896f294..2effd7cc0 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 5fb53c6eeed959da776ea22c37a5bf2ce9b28898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 30 Jul 2024 12:30:49 +0200 Subject: [PATCH 71/95] Update OC preview versions. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 9659b7eba..48a61d240 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index da9be8220..63a5c2f63 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 2effd7cc0..e4b18b432 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 18cec952afe51a4a3145060e84f295c2ac619e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 7 Aug 2024 01:55:32 +0200 Subject: [PATCH 72/95] Update OC preview version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 48a61d240..e60e5c987 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 63a5c2f63..9aa56f1da 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index e4b18b432..fb376136a 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From dd7ecd5d64c963ec0446cf17260dc51cb6e055bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 7 Aug 2024 13:53:57 +0200 Subject: [PATCH 73/95] Update HL alpha version. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 9aa56f1da..6338b8a4c 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -51,8 +51,8 @@ - - + + From cf230e4cf8f824d1ccc7651313f197037757509b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 7 Aug 2024 14:49:04 +0200 Subject: [PATCH 74/95] Update UITT alpha version. --- .../Lombiq.DataTables.Tests.UI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index f2f96d080..59e62e970 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -25,7 +25,7 @@ - + From ad5c92d0a3368d8a0c6772948e9609de6a4b5134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 7 Aug 2024 17:27:55 +0200 Subject: [PATCH 75/95] wut --- Lombiq.DataTables/Lombiq.DataTables.csproj | 12 +----------- .../Lombiq.DataTables.Tests.UI.csproj | 6 +----- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 6338b8a4c..5319b1880 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -1,7 +1,5 @@ - - net8.0 true @@ -44,18 +42,10 @@ - - - - - - - + - - diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index 59e62e970..62f687455 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -20,11 +20,7 @@ - - - - - + From 0c36a80c3d5abd81d2457c11c7d34121c1dd1720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 7 Aug 2024 17:31:22 +0200 Subject: [PATCH 76/95] Revert "wut" This reverts commit ad5c92d0a3368d8a0c6772948e9609de6a4b5134. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 12 +++++++++++- .../Lombiq.DataTables.Tests.UI.csproj | 6 +++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 5319b1880..6338b8a4c 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -1,5 +1,7 @@ + + net8.0 true @@ -42,10 +44,18 @@ - + + + + + + + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index 62f687455..59e62e970 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -20,7 +20,11 @@ - + + + + + From 8ab58218b1fb98986b038d383408a328b32d040a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 7 Aug 2024 17:38:12 +0200 Subject: [PATCH 77/95] Update OC preview version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index e60e5c987..74bdd267f 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 6338b8a4c..23233a6a7 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index fb376136a..fef32eb51 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 82d0f44b21a92b20424c8261d53bddb6a58d8253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Thu, 8 Aug 2024 23:15:42 +0200 Subject: [PATCH 78/95] Update OC preview. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 74bdd267f..3ebae5950 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 23233a6a7..5c871f233 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index fef32eb51..51bcddf3a 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From a6c2aa71527b657ef68b65cf48ff2f950504c1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 9 Aug 2024 14:30:24 +0200 Subject: [PATCH 79/95] Update HL alpha version. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 5c871f233..63081cd94 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -51,8 +51,8 @@ - - + + From 596aacebbfe62c3aab29a585d98e17208203dee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 9 Aug 2024 14:54:15 +0200 Subject: [PATCH 80/95] Update UITT alpha version. --- .../Lombiq.DataTables.Tests.UI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index 59e62e970..0a0ceed6d 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -25,7 +25,7 @@ - + From c1b0df6ff1d694c991579bc9a0e16b636a995ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 20 Aug 2024 18:13:59 +0200 Subject: [PATCH 81/95] Update OC preview version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 3ebae5950..01eaedee8 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 63081cd94..ebe936cc5 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 51bcddf3a..96867e782 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 107951ef068de0762da99150033ae6fc2fe418f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 21 Aug 2024 18:04:23 +0200 Subject: [PATCH 82/95] Update OC --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 01eaedee8..06dbd57c5 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index ebe936cc5..480d33965 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 96867e782..8e84b83f9 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 2ff45e8ca9528462e63dcb336f6b2ec28ac39fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 23 Aug 2024 10:26:27 +0200 Subject: [PATCH 83/95] Update OC preview version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 06dbd57c5..560df7813 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 480d33965..eb2e23908 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index 8e84b83f9..eb24f6baf 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 9bb62ae064dad4c171ce9998aa1fe477a00c3699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 22 Sep 2024 23:02:21 +0200 Subject: [PATCH 84/95] Use OC release version. --- Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj | 4 ++-- Lombiq.DataTables/Lombiq.DataTables.csproj | 6 +++--- .../Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj index 560df7813..ae6bd4038 100644 --- a/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj +++ b/Lombiq.DataTables.Samples/Lombiq.DataTables.Samples.csproj @@ -33,8 +33,8 @@ - - + + diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index eb2e23908..4d8030825 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -39,9 +39,9 @@ - - - + + + diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj index eb24f6baf..16728da8a 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests/Lombiq.DataTables.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 21999629ee2769ae7f2529ea8906c93e9179bbf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 23 Sep 2024 18:47:00 +0200 Subject: [PATCH 85/95] Update HL preview. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 4d8030825..94950fe51 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -51,8 +51,8 @@ - - + + From a820b5c77eb55469bc2f3db46a5d1f97908a8fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 23 Sep 2024 20:22:03 +0200 Subject: [PATCH 86/95] Update HL. --- .../Lombiq.DataTables.Tests.UI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index 0a0ceed6d..67dce6281 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -25,7 +25,7 @@ - + From 63b00ccf3f1b086db6f196e3012e699139af5964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 23 Sep 2024 22:12:55 +0200 Subject: [PATCH 87/95] Temp commit. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 94950fe51..5bd47dbab 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -1,7 +1,5 @@ - - net8.0 true @@ -56,6 +54,4 @@ - - From 227b172f377cf43ca75d7b51d5bcd4d3394fc6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 23 Sep 2024 22:13:25 +0200 Subject: [PATCH 88/95] Revert "Temp commit." This reverts commit 63b00ccf3f1b086db6f196e3012e699139af5964. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 5bd47dbab..94950fe51 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -1,5 +1,7 @@ + + net8.0 true @@ -54,4 +56,6 @@ + + From 07fb499b088988c54b177c77621ae84efe91f872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 24 Sep 2024 10:35:02 +0200 Subject: [PATCH 89/95] Use AddNavigationProvider everywhere. --- Lombiq.DataTables.Samples/Startup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables.Samples/Startup.cs b/Lombiq.DataTables.Samples/Startup.cs index a19b8d819..d1fd23311 100644 --- a/Lombiq.DataTables.Samples/Startup.cs +++ b/Lombiq.DataTables.Samples/Startup.cs @@ -28,7 +28,7 @@ public override void ConfigureServices(IServiceCollection services) EmployeeDataTableMigrations, SampleIndexBasedDataTableDataProvider>(); - services.AddScoped(); + services.AddNavigationProvider(); } } From 713938b31cdf4f77585093e9a497a009a7c517e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 24 Sep 2024 10:49:15 +0200 Subject: [PATCH 90/95] Make migrations and background tasks sealed. --- .../Migrations/EmployeeDataTableMigrations.cs | 2 +- Lombiq.DataTables.Samples/Migrations/EmployeeMigrations.cs | 2 +- Lombiq.DataTables/Migrations/ColumnsDefinitionMigrations.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Lombiq.DataTables.Samples/Migrations/EmployeeDataTableMigrations.cs b/Lombiq.DataTables.Samples/Migrations/EmployeeDataTableMigrations.cs index 419678ff4..b71c15227 100644 --- a/Lombiq.DataTables.Samples/Migrations/EmployeeDataTableMigrations.cs +++ b/Lombiq.DataTables.Samples/Migrations/EmployeeDataTableMigrations.cs @@ -7,7 +7,7 @@ namespace Lombiq.DataTables.Samples.Migrations; // The migration for the data table index must inherit from IndexDataMigration so they can all be registered // together in Startup in a tightly coupled fashion that reduces the chance of mistakes. -public class EmployeeDataTableMigrations : IndexDataMigration +public sealed class EmployeeDataTableMigrations : IndexDataMigration { protected override void CreateIndex(ICreateTableCommand table) => table diff --git a/Lombiq.DataTables.Samples/Migrations/EmployeeMigrations.cs b/Lombiq.DataTables.Samples/Migrations/EmployeeMigrations.cs index 5a53c3530..343262d36 100644 --- a/Lombiq.DataTables.Samples/Migrations/EmployeeMigrations.cs +++ b/Lombiq.DataTables.Samples/Migrations/EmployeeMigrations.cs @@ -11,7 +11,7 @@ namespace Lombiq.DataTables.Samples.Migrations; // Just the bare minimum to set up the content type for storing the sample data. -public class EmployeeMigrations : DataMigration +public sealed class EmployeeMigrations : DataMigration { private readonly IContentDefinitionManager _contentDefinitionManager; diff --git a/Lombiq.DataTables/Migrations/ColumnsDefinitionMigrations.cs b/Lombiq.DataTables/Migrations/ColumnsDefinitionMigrations.cs index f9cac6604..d6f449541 100644 --- a/Lombiq.DataTables/Migrations/ColumnsDefinitionMigrations.cs +++ b/Lombiq.DataTables/Migrations/ColumnsDefinitionMigrations.cs @@ -6,7 +6,7 @@ namespace Lombiq.DataTables.Migrations; -public class ColumnsDefinitionMigrations : DataMigration +public sealed class ColumnsDefinitionMigrations : DataMigration { private readonly IContentDefinitionManager _contentDefinitionManager; From 4ac4faf13d8a6c6541e8d08e353a2303f9b17bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 24 Sep 2024 11:05:39 +0200 Subject: [PATCH 91/95] Seal INavigationProvider, IAsyncResultFilter, IPermissionProvider, StartupBase, IRecipeStepHandler, DisplayDriver, Controller classes. --- Lombiq.DataTables.Samples/Controllers/SampleController.cs | 2 +- Lombiq.DataTables.Samples/Startup.cs | 2 +- Lombiq.DataTables/Controllers/Api/ChildRowsController.cs | 2 +- Lombiq.DataTables/Controllers/Api/RowsController.cs | 2 +- Lombiq.DataTables/Controllers/TableController.cs | 2 +- Lombiq.DataTables/LombiqTests/Services/TestingFilter.cs | 2 +- Lombiq.DataTables/LombiqTests/Startup.cs | 2 +- Lombiq.DataTables/Startup.cs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Lombiq.DataTables.Samples/Controllers/SampleController.cs b/Lombiq.DataTables.Samples/Controllers/SampleController.cs index 30e1057a7..34ece028e 100644 --- a/Lombiq.DataTables.Samples/Controllers/SampleController.cs +++ b/Lombiq.DataTables.Samples/Controllers/SampleController.cs @@ -9,7 +9,7 @@ namespace Lombiq.DataTables.Samples.Controllers; -public class SampleController : Controller +public sealed class SampleController : Controller { private readonly ISession _session; diff --git a/Lombiq.DataTables.Samples/Startup.cs b/Lombiq.DataTables.Samples/Startup.cs index d1fd23311..ad670dc7a 100644 --- a/Lombiq.DataTables.Samples/Startup.cs +++ b/Lombiq.DataTables.Samples/Startup.cs @@ -10,7 +10,7 @@ namespace Lombiq.DataTables.Samples; -public class Startup : StartupBase +public sealed class Startup : StartupBase { public override void ConfigureServices(IServiceCollection services) { diff --git a/Lombiq.DataTables/Controllers/Api/ChildRowsController.cs b/Lombiq.DataTables/Controllers/Api/ChildRowsController.cs index a288eda7e..d33a541a5 100644 --- a/Lombiq.DataTables/Controllers/Api/ChildRowsController.cs +++ b/Lombiq.DataTables/Controllers/Api/ChildRowsController.cs @@ -8,7 +8,7 @@ namespace Lombiq.DataTables.Controllers.Api; -public class ChildRowsController : Controller +public sealed class ChildRowsController : Controller { private readonly IEnumerable _dataTableDataProviderAccessor; private readonly IAuthorizationService _authorizationService; diff --git a/Lombiq.DataTables/Controllers/Api/RowsController.cs b/Lombiq.DataTables/Controllers/Api/RowsController.cs index 0949e13b5..d12ed720a 100644 --- a/Lombiq.DataTables/Controllers/Api/RowsController.cs +++ b/Lombiq.DataTables/Controllers/Api/RowsController.cs @@ -10,7 +10,7 @@ namespace Lombiq.DataTables.Controllers.Api; -public class RowsController : Controller +public sealed class RowsController : Controller { private readonly IEnumerable _dataTableDataProviderAccessor; private readonly Dictionary _exportServices; diff --git a/Lombiq.DataTables/Controllers/TableController.cs b/Lombiq.DataTables/Controllers/TableController.cs index 5f79318b3..dc774948f 100644 --- a/Lombiq.DataTables/Controllers/TableController.cs +++ b/Lombiq.DataTables/Controllers/TableController.cs @@ -9,7 +9,7 @@ namespace Lombiq.DataTables.Controllers; -public class TableController : Controller +public sealed class TableController : Controller { private readonly IEnumerable _dataTableDataProviders; diff --git a/Lombiq.DataTables/LombiqTests/Services/TestingFilter.cs b/Lombiq.DataTables/LombiqTests/Services/TestingFilter.cs index 9db13d7be..c2b39ccd5 100644 --- a/Lombiq.DataTables/LombiqTests/Services/TestingFilter.cs +++ b/Lombiq.DataTables/LombiqTests/Services/TestingFilter.cs @@ -7,7 +7,7 @@ namespace Lombiq.DataTables.LombiqTests.Services; -public class TestingFilter : IAsyncResultFilter +public sealed class TestingFilter : IAsyncResultFilter { private readonly ILayoutAccessor _layoutAccessor; private readonly IShapeFactory _shapeFactory; diff --git a/Lombiq.DataTables/LombiqTests/Startup.cs b/Lombiq.DataTables/LombiqTests/Startup.cs index 4ad9a8946..171f4f733 100644 --- a/Lombiq.DataTables/LombiqTests/Startup.cs +++ b/Lombiq.DataTables/LombiqTests/Startup.cs @@ -6,7 +6,7 @@ namespace Lombiq.DataTables.LombiqTests; [RequireFeatures("Lombiq.Tests.UI.Shortcuts")] -public class Startup : StartupBase +public sealed class Startup : StartupBase { public override void ConfigureServices(IServiceCollection services) => services.Configure(options => options.Filters.Add(typeof(TestingFilter))); diff --git a/Lombiq.DataTables/Startup.cs b/Lombiq.DataTables/Startup.cs index a479c35b8..bcdd332f2 100644 --- a/Lombiq.DataTables/Startup.cs +++ b/Lombiq.DataTables/Startup.cs @@ -16,7 +16,7 @@ namespace Lombiq.DataTables; -public class Startup : StartupBase +public sealed class Startup : StartupBase { public override void ConfigureServices(IServiceCollection services) { From 36e4397d3f1fd6c1ae7344d10bb7dc3245277aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 25 Sep 2024 16:34:28 +0200 Subject: [PATCH 92/95] Update HL NuGet version. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 94950fe51..73960064b 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -51,8 +51,8 @@ - - + + From ea9d13ac113a0cd8bfbdf137f4cb3cdb66e2b663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 25 Sep 2024 16:38:01 +0200 Subject: [PATCH 93/95] Update UITT version. --- .../Lombiq.DataTables.Tests.UI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj index 67dce6281..80ec6909e 100644 --- a/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj +++ b/Lombiq.DataTables/Tests/Lombiq.DataTables.Tests.UI/Lombiq.DataTables.Tests.UI.csproj @@ -25,7 +25,7 @@ - + From 192fb0653712617672a2c435b9b7631a913fcfdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 25 Sep 2024 18:18:40 +0200 Subject: [PATCH 94/95] why --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 73960064b..1057c6e0f 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -1,7 +1,5 @@ - - net8.0 true @@ -56,6 +54,4 @@ - - From 56266ceb5a221bf5883019257f26f0cc1b7bb40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 25 Sep 2024 18:20:08 +0200 Subject: [PATCH 95/95] Revert "why" This reverts commit 192fb0653712617672a2c435b9b7631a913fcfdb. --- Lombiq.DataTables/Lombiq.DataTables.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lombiq.DataTables/Lombiq.DataTables.csproj b/Lombiq.DataTables/Lombiq.DataTables.csproj index 1057c6e0f..73960064b 100644 --- a/Lombiq.DataTables/Lombiq.DataTables.csproj +++ b/Lombiq.DataTables/Lombiq.DataTables.csproj @@ -1,5 +1,7 @@ + + net8.0 true @@ -54,4 +56,6 @@ + +