From 012f3fb629e16be4f373827f0f297637b28e6dcf Mon Sep 17 00:00:00 2001 From: Oleksandr Melnychenko Date: Thu, 19 May 2022 01:12:47 +0300 Subject: [PATCH 1/6] [Fix] Issue with {0:F2} display format --- easydata.js/packs/core/src/i18n/i18n.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/easydata.js/packs/core/src/i18n/i18n.ts b/easydata.js/packs/core/src/i18n/i18n.ts index 9ea60cdd..d9e2cb87 100644 --- a/easydata.js/packs/core/src/i18n/i18n.ts +++ b/easydata.js/packs/core/src/i18n/i18n.ts @@ -430,7 +430,7 @@ export namespace i18n { } else if (['D', 'F', 'C'].indexOf(type) >= 0) { const locale = getCurrentLocale(); - return number.toLocaleString(locale, getNumberFromatOptions(format)); + return number.toLocaleString(locale, getNumberFormatOptions(format)); } else { return convertWithMask(Math.trunc(number), format); @@ -519,7 +519,7 @@ export namespace i18n { return result.split('').reverse().join(''); } - function getNumberFromatOptions(format: string): Intl.NumberFormatOptions { + function getNumberFormatOptions(format: string): Intl.NumberFormatOptions { const localeSettings = getLocaleSettings(); const type = format[0].toUpperCase(); const digits = (format.length > 1) @@ -542,7 +542,8 @@ export namespace i18n { default: return { style: 'decimal', - minimumFractionDigits: digits + minimumFractionDigits: digits, + maximumFractionDigits: digits } } } From 5c7c9dbb95db12a60947de7fbaf785e22dcfe4f9 Mon Sep 17 00:00:00 2001 From: Sergiy Korzh Date: Fri, 20 May 2022 23:52:12 +0300 Subject: [PATCH 2/6] Version 1.4.6-rc01 --- easydata.js/version.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easydata.js/version.json b/easydata.js/version.json index c3d63a30..4587127d 100644 --- a/easydata.js/version.json +++ b/easydata.js/version.json @@ -1,6 +1,6 @@ { - "version": "1.4.5", - "baseVersion": "1.4.5", - "assetVersion": "01_04_05", - "tag": "latest" + "version": "1.4.6-rc01", + "baseVersion": "1.4.6", + "assetVersion": "01_04_06", + "tag": "beta" } From 98234ca77bfe01ac9afaa9c69bdb4b669b3d5527 Mon Sep 17 00:00:00 2001 From: Sergiy Korzh Date: Sun, 22 May 2022 15:57:07 +0300 Subject: [PATCH 3/6] Update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f51461cf..f6f530c1 100644 --- a/.gitignore +++ b/.gitignore @@ -372,3 +372,5 @@ dist/ /easydata.net/src/**/EasyData*.xml /playground/EasyDataTest /playground/EasyDataTest02 +/playground/EasyDataAspNetCoreTest04 +/EasyData.Dev2.sln From 9fccfdcf71a30b94fc764ddf6d2d12873238f0e3 Mon Sep 17 00:00:00 2001 From: Sergiy Korzh Date: Mon, 23 May 2022 21:41:27 +0300 Subject: [PATCH 4/6] [fix] Auto-resize didn't work propery for columns with Unknown type --- easydata.js/packs/ui/src/grid/easy_grid.ts | 1 + .../MetaDataLoader/DbContextMetaDataLoader.cs | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easydata.js/packs/ui/src/grid/easy_grid.ts b/easydata.js/packs/ui/src/grid/easy_grid.ts index ab480c14..9bd62435 100644 --- a/easydata.js/packs/ui/src/grid/easy_grid.ts +++ b/easydata.js/packs/ui/src/grid/easy_grid.ts @@ -187,6 +187,7 @@ export class EasyGrid { widthOptions[dataType] = { ...widthOptions.otherColumns, ...widthOptions[dataType] }; } }); + widthOptions[DataType.Unknown] = widthOptions.otherColumns; } private setSlot(slot: HTMLElement | string) { diff --git a/easydata.net/src/EasyData.EntityFrameworkCore.Relational/MetaDataLoader/DbContextMetaDataLoader.cs b/easydata.net/src/EasyData.EntityFrameworkCore.Relational/MetaDataLoader/DbContextMetaDataLoader.cs index 6cfc8411..cb36532e 100644 --- a/easydata.net/src/EasyData.EntityFrameworkCore.Relational/MetaDataLoader/DbContextMetaDataLoader.cs +++ b/easydata.net/src/EasyData.EntityFrameworkCore.Relational/MetaDataLoader/DbContextMetaDataLoader.cs @@ -403,8 +403,7 @@ protected virtual MetaEntityAttr CreateEntityAttribute(MetaEntity entity, IEntit var propertyName = property.Name; var columnName = property.GetDbColumnName(); - var entityAttr = Model.CreateEntityAttr(new MetaEntityAttrDescriptor() - { + var entityAttr = Model.CreateEntityAttr(new MetaEntityAttrDescriptor() { Parent = entity }); From 5df4d1590d746717ce8cdf16dd99f8bb485e08b6 Mon Sep 17 00:00:00 2001 From: Sergiy Korzh Date: Mon, 23 May 2022 23:15:09 +0300 Subject: [PATCH 5/6] [upd] Automatically ignore columns with unknown types --- .../MetaDataLoader/DbContextMetaDataLoader.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/easydata.net/src/EasyData.EntityFrameworkCore.Relational/MetaDataLoader/DbContextMetaDataLoader.cs b/easydata.net/src/EasyData.EntityFrameworkCore.Relational/MetaDataLoader/DbContextMetaDataLoader.cs index cb36532e..9cfc4f43 100644 --- a/easydata.net/src/EasyData.EntityFrameworkCore.Relational/MetaDataLoader/DbContextMetaDataLoader.cs +++ b/easydata.net/src/EasyData.EntityFrameworkCore.Relational/MetaDataLoader/DbContextMetaDataLoader.cs @@ -400,6 +400,10 @@ private bool ApplyMetaEntityAttrAnnotation(MetaEntityAttr entityAttr, PropertyIn /// MetaEntityAttr. protected virtual MetaEntityAttr CreateEntityAttribute(MetaEntity entity, IEntityType entityType, IProperty property) { + var columnType = DataUtils.GetDataTypeBySystemType(property.ClrType); + + if (columnType == DataType.Unknown) return null; + var propertyName = property.Name; var columnName = property.GetDbColumnName(); @@ -410,7 +414,7 @@ protected virtual MetaEntityAttr CreateEntityAttribute(MetaEntity entity, IEntit entityAttr.Id = DataUtils.ComposeKey(entity.Id, propertyName); entityAttr.Expr = columnName; entityAttr.Caption = propertyName; - entityAttr.DataType = DataUtils.GetDataTypeBySystemType(property.ClrType); + entityAttr.DataType = columnType; entityAttr.PropInfo = property.PropertyInfo; entityAttr.PropName = property.Name; From e8611bcee2881fddb8086dd718ba96db34a1844c Mon Sep 17 00:00:00 2001 From: Sergiy Korzh Date: Mon, 23 May 2022 23:19:58 +0300 Subject: [PATCH 6/6] Version 1.4.6 --- easydata.js/version.json | 4 ++-- easydata.net/version.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/easydata.js/version.json b/easydata.js/version.json index 4587127d..bb10053b 100644 --- a/easydata.js/version.json +++ b/easydata.js/version.json @@ -1,6 +1,6 @@ { - "version": "1.4.6-rc01", + "version": "1.4.6", "baseVersion": "1.4.6", "assetVersion": "01_04_06", - "tag": "beta" + "tag": "latest" } diff --git a/easydata.net/version.json b/easydata.net/version.json index 9c6906d5..615700f5 100644 --- a/easydata.net/version.json +++ b/easydata.net/version.json @@ -1,5 +1,5 @@ { - "assemblyVersion": "1.4.5.3", - "packageVersion": "1.4.5", - "assetVersion": "01_04_05" + "assemblyVersion": "1.4.6.1", + "packageVersion": "1.4.6", + "assetVersion": "01_04_06" }