Skip to content

JJMasterData 3.1 - Saturn Version 🪐#37

Merged
gumbarros merged 169 commits intomainfrom
Saturn
Jan 19, 2023
Merged

JJMasterData 3.1 - Saturn Version 🪐#37
gumbarros merged 169 commits intomainfrom
Saturn

Conversation

@LucioPelinson
Copy link
Copy Markdown
Member

Saturn (3.1 version) is coming

@LucioPelinson LucioPelinson marked this pull request as draft October 27, 2022 02:26
@gumbarros
Copy link
Copy Markdown
Member

gumbarros commented Oct 27, 2022

Expected Changelog

version

Release Notes 🪐

HTML Rendering

  • JJMasterData.Core no longer contains hard-coded HTML Strings
  • Added HtmlBuilder class, responsible to render a node in the HTML tree

Meta

  • Removed JJMasterData.Web.Bootstraper, now JJMasterData.Web.Example is used at development
  • Added a single appsettings.json for every project

.NET

  • .NET 7 is officially supported with C# 11.

DI

  • Added IDataDictionary and IEntityRepository

TagHelpers

  • Added TagHelpers to some JJMasterData components like <jj-formview element-name="YourDictionary"\>

Application Options

  • Now have a web UI
  • You can also test your connection at this view
  • appsettings.json now can be saved at runtime
  • Implement IWritableOptions if you want to write your settings somewhere

L10N

  • You no longer need to truncate your resources table after every update
  • Now uses IStringLocalizer internally

WebApi

  • Now have a File manipulation route

First time setup

  • Automatically creates everything now

Example Project

  • Now have new examples
  • Added validation if the example dictionary does not exist
  • Bootstrap agnostic layout

Data Dictionary

Home

  • Now showcase the dictionary info
  • You can now Render your dictionary from the grid without clicking on edit (finally 🙏)
  • If you export only a single dictionary, a .json exported instead of a .zip

Repository Support

  • MongoDB support 🍃
    You can now store your metadata at MongoDB! Just install JJMasterData.MongoDB
  • File System
    Just use with FileSystemDataDictionaryRepository

Validations

  • Only fields of type VarChar or Text can have a filter of the type Contains.

FormEvents

  • Now support FormEventAttribute to have any class name
  • Python events now support debugging on VSCode
  • Created IFormEventResolver to any custom implementation
  • WebApi can now have FormElement customizations using OnMetadataLoad

Logger

  • Removed Console, EventViewer and Trace from JJMasterData.Commons, just use Microsoft Loggers enabling at your IConfiguration source
  • Splitted file and database into DbLogger and FileLogger
  • New log levels following Microsoft conventions
  • Better log messages using ILogger formatter

Added support to DateTime2

  • A recommended SQLServer DateTime type with milliseconds support

Dependency Injection

  • Added WebComponentFactory, with this class, you can instantiate the most important components
  • Internally, TagHelpers also use dependency injection

Breaking Changes

DataAccess

  • Removed methods ValueExists, ValueExistsAsync, GetValue, GetValueAsync
  • Removed KeepConnAlive Property

JJBaseView

  • Removed RenderHtml, please use RenderHtmlElement

JJUploadFile

  • The event OnPostFile parameter JJFormFile was changed to another class called FormFileContent

JJDataImp

  • OnAfterImport is removed, please use OnAfterUpdate, OnAfterInsert and OnAfterDelete

The events:

  • OnBeforeDelete
  • OnAfterDelete
  • OnBeforeInsert
  • OnAfterInsert
  • OnBeforeUpdate
  • OnAfterUpdate
  • OnBeforeImport

are now fired on JJFormView, JJDataImp and WebApi via FormService.

JJDataPanel

  • JJDataPanel UI related properties moved to UISettings class

JJComboBox

  • Renamed Itens to Items on JJComboBox

JJGridView

  • Renamed SizeTitle to TitleSize
  • Renamed TotalReg to TotalRecords
  • Renamed Erros to Errors
  • Moved DoSqlCommand to ActionManager.ExecuteSqlCommand
  • Moved DoPythonScriptAction to ActionManager.ExecutePythonScriptAction
  • Padronized all public HTML methods to suffix with Html (correct english convention).
  • GridConfigSorting renamed to GridSortingConfig

JJLinkButton

  • Removed property IsSubmit please use LinkButtonType
public enum LinkButtonType
{
    Link = 0,
    Button = 1,
    Submit = 2
}

EventArgs Classes

  • Renamed ResultHtml to HtmlResult 💣

FormEvents

  • Removed OnInstanceCreated please use OnMetadataLoad

WebApi

  • Renamed masterApi/{elementName}/{id}/file/{fieldName}/ route to masterApi/{elementName}/{id}/{fieldName}/file (IMPORTANT @🐍) 💣

Logger

Important ⚠️

  • Default constructors of the components maybe removed in the next version, give a preference to TagHelpers 💣
  • This change will be made to remove the service locator anti-pattern.
  • Using TagHelpers with the Fluent configuration methods, you will see that your code quality will improve without instantiating a JJFormView.

Miscellaneous

  • Removed JJDate,JJDateTime and JJHour, please add the needed attributes to JJTextBox 💣
  • Removed IDataAccess, please use DataAccess
  • Removed ISettings please use IOptions<JJMasterDataOptions>
  • Removed ITranslator please use ILocalizationProvider
  • Renamed JJUploadFile to JJUploadArea
  • Removed TripAdvisor icon ( they were angry with FontAwesome)
  • Moved XUnit Test from FromElement to Metadata
  • Renamed DicParser and related classes to Metadata
  • Renamed method StringManager.NoAccents to StringManager.GetStringWithoutAccents
  • Renamed DataDictionaryManager to FormService
  • Renamed DataDictionaryManagerResult to FormLetter
  • Renamed Factory to EntityRepository 💣
  • Renamed DictionaryDao to DatabaseDataDictionaryRepository 💣

@LucioPelinson LucioPelinson added this to the Saturn Version milestone Oct 28, 2022
gumbarros and others added 26 commits October 31, 2022 15:29
* HtmlBuilder

* up

* refactoring

* sync

* up

* Refactor JJAlert.cs and JJIcon.cs

* Refactor JJText.cs & JJTitle.cs

* indented text html builder

* JJTextTel

* Refactor translate jjalert

* JJLinkButton JJSpinner JJTextBox

* bug fix JJTextBox

* up

* fine

* JJTextBox refactoring

* TextBox Refactoring

* CollapsePanel

* Collapse panel dev

* JJTextArea

* JJTextFile

* JJLinkButtonGroup

* JJCollapsePanel.cs

* JJTabNav

* JJCheckBox

* JJSlider

* JJComboBox.cs

* BugFix JJTextBox.cs

* Finished JJLegendView.cs

* GridUI.cs

* GridUI.cs & Alert fix.

* BugFix Lookup when null & Fix Icon

* JJModalDialog

* bug fix

* bug fix JJTabNav on BS3

* JJMessageBox

* JJSearchBox.cs

* JJSearchBox refactor and docs

* LinkButton docs, FeedbackIcon TypeScript & LookUp HTML Builder

* DataExp loading

* JJDataImpProcess

* DataImpHelp

* DataImpLog

* JJDataExp.cs finished

* HtmlBuilder Refactoring

* JJCollapsePanel Bug fix

* JJSearchBox Refactoring

* JJDataImp

* Refactoring .AppendElement(JJBaseView)

* del temp images

* Rename JJMasterData.Web.DataDictionary.csproj to JJMasterData.Web.Bootstraper.csproj and migrated JJDownloadFile.cs

* BugFix JJDataExp.cs with files.

* GridConfigSorting.cs HTML Element.

* JJDataPanel +refactoring

* Sync

* FieldManager

* Added GridPagination.cs HtmlElement

* DataPanelControl

* law of the west

* GridToolbar.cs and renamed GetHtmlElement to RenderHtmlElement.

* Segregate Action execution

* JJCard

* Fix comment layout

* DataPanelGroup

* Fix stackoverflow exception when initialize without ConnectionString

* Fix JJAlert on grid

* Sync

* JJDataPanel JS

* Added GridTable.cs & GridTableHeader.cs

* Sync

* Added GridTableBody.cs

* JJDataPanel

* LinkButtonType

* Refactoring

* GridToolbar.cs refactor

* Finished GridTable & fixed default button

* GridTable refactors

* Finished GridActions

* ReSharper - Use string interpolation

* Added RenderHtmlElement method to GridView

* Removed StringBuilder from GridView table.

* JJTollbar.cs

* Correct english spelling (Tollbar->Toolbar)

* FormUpload GalleryView

* JJDataPanel

* rename DataDictionaryManaget to FormService

* Components factory plan

* Prepare DataPanelControl to JJTextRange on filter

* Adjust date format

* JJFormLog

* GridFilter.cs HtmlElement

* GridFilter

* JJFormUpload

* Sync

* HtmlElement is now HtmlBuilder

* HtmlElement.GetHtml() is now HtmlBuilder.ToString()

* bug fix on display number of records selected in the grid correctly closes #40

* HtmlBuilder indentation tests

* fix GridPagination layout

* bug fix

* Removed StringBuilders from JJMasterData.Web and refactored JJMasterData.Core

* Bug fix JJFormUpload rename file action

* remove unused class

Co-authored-by: Lucio Pelinson <lucio@jjconsulting.com.br>
Co-authored-by: Ivan <ivanilsonsantosoliveira@gmail.com>
# Conflicts:
#	src/JJMasterData.Commons/JJMasterData.Commons.csproj
#	src/JJMasterData.Web/JJMasterData.Web.csproj
#	src/JJMasterData.Web/wwwroot/js/jjmasterdata/jjmasterdata.js.map
* Refactors & Removed some SQL injections

* Removed all warnings from DataAccess.cs and all SQL injection risks

* Refactors DataAccess.cs

* Refactors DataAccess.cs

* Refactors DataAccess.cs

* Code re-utilization

* Code quality

* Remove unused imports
* JJFormUpload

* JJFormUpload

* sync

* Breaking Change
Renamed:
 OnCreateFile => OnBeforeCreateFile;
 OnDeleteFile => OnBeforeDeleteFile;
 OnRenameFile => OnBeforeRenameFile;
 OnDownloadFile => OnBeforeDownloadFile;

* DataHelper

* Rename variables

* refactoring FormManager
GetTriggerValues => MergeWithExpressionValues
ApplyDefaultValues => MergeWithDefaultValues

* FormManager

* Sync

* Segregate the responsibility of building a file path into a new class;
Moved save files rules from FormService to FormFileService;

* new method InsertOrReplace in FormService

* events still need to be resolved

* return number of rows affected on update command

* move Models/CultureHandler.cs to Handlers/CultureHandler.cs

* static method to recover UserId

* AuditLogData now is DataContext and is used do fired sender events this causes a big breaking change ___ooooo___

* removed get methods from FormService

* MasterApiService

* indent files

* Sync

* up

* MasterApiService

* bug fix on review

* review checked

* Removed AutoPostBack from JJBaseView
…t. (#49)

* Enabled C#11 for the entire project and .NET 7 for the example project.

* Delete global.json

* Use TargetFrameworks instead of TargetFramework
# Conflicts:
#	src/JJMasterData.Commons/JJMasterData.Commons.csproj
#	src/JJMasterData.Core/JJMasterData.Core.csproj
#	src/JJMasterData.Web/JJMasterData.Web.csproj
#	src/JJMasterData.Web/wwwroot/js/jjmasterdata/jjmasterdata.js
#	src/JJMasterData.Web/wwwroot/js/jjmasterdata/jjmasterdata.js.map
#	src/JJMasterData.Web/wwwroot/ts/jjupload.ts
@gumbarros gumbarros changed the title Saturn (3.1 version) Saturn (3.1 version) 🪐 Dec 22, 2022
End-user tutorials

Co-authored-by: AndreSequinel <andresequinel@gmail.com>
Co-authored-by: Lucio Pelinson <lucio.pelinson@gmail.com>
@LucioPelinson LucioPelinson changed the title Saturn (3.1 version) 🪐 Saturn (3.1 RC version ) 🪐 Jan 12, 2023
gumbarros and others added 4 commits January 16, 2023 14:56
* Use IEnumerable instead of List for HtmlBuilder

* Split Options into the respective Assemblies

* BugFix DatabaseDataDictionaryRepository.cs

* BugFix & HtmlAgilityPack at tests

* BugFix DataHelper

* BugFix CheckBox & CollapsePanel

* Fix DataExp

* BugFix _DataItem.cshtml

* Cript backing field

* BugFix && modifier

* Removed unused fields

* Rename Repository

* adjusts

* Rename Options

* refactoring

* DbLogger tableExists cache

* BootstrapHelper.cs refactor

* Remove unused line

* Revert HtmlAgilityPack

* DbLogger BugFix

* BugFix Lookup

* Refactoring

Co-authored-by: Lucio Pelinson <lucio.pelinson@gmail.com>
* AutoDipose DataAccess.cs

* Convert method to property

* Rename

* Use interfaces of IEnumerable instead of hard-coded types.

* Remove unused ToList

* Dispose DataReader

* Update docs
# Conflicts:
#	src/JJMasterData.Commons/DI/JJServiceBuilder.cs
#	src/JJMasterData.Web/Scripts/jjloadform.ts
#	src/JJMasterData.Web/wwwroot/js/jjmasterdata/jjmasterdata.js
#	src/JJMasterData.Web/wwwroot/js/jjmasterdata/jjmasterdata.js.map
@LucioPelinson LucioPelinson marked this pull request as ready for review January 17, 2023 14:24
@gumbarros
Copy link
Copy Markdown
Member

@LucioPelinson LGTM 😁

@gumbarros gumbarros merged commit 8a19ee4 into main Jan 19, 2023
@gumbarros gumbarros deleted the Saturn branch January 19, 2023 19:56
@gumbarros gumbarros changed the title Saturn (3.1 RC version ) 🪐 JJMasterData 3.1 - Saturn Version 🪐 Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants