{"id":13807920,"url":"https://github.com/akovac35/BlazorMergely","last_synced_at":"2025-05-14T00:32:22.594Z","repository":{"id":144474581,"uuid":"383906855","full_name":"akovac35/BlazorMergely","owner":"akovac35","description":"An implementation of Blazor diff and merge component based on Mergely with server side support.","archived":false,"fork":false,"pushed_at":"2021-07-08T18:11:45.000Z","size":2011,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-18T23:53:49.036Z","etag":null,"topics":["blazor","blazor-server","diff","merge"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akovac35.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-07-07T19:36:51.000Z","updated_at":"2023-11-21T09:51:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"394d2807-c485-40de-a3e7-4259d2386f0d","html_url":"https://github.com/akovac35/BlazorMergely","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akovac35%2FBlazorMergely","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akovac35%2FBlazorMergely/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akovac35%2FBlazorMergely/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akovac35%2FBlazorMergely/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akovac35","download_url":"https://codeload.github.com/akovac35/BlazorMergely/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254046480,"owners_count":22005605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blazor","blazor-server","diff","merge"],"created_at":"2024-08-04T01:01:32.190Z","updated_at":"2025-05-14T00:32:17.582Z","avatar_url":"https://github.com/akovac35.png","language":"HTML","funding_links":[],"categories":["Libraries \u0026 Extensions"],"sub_categories":["2D/3D Rendering engines"],"readme":"# BlazorMergely\n\nAn implementation of Blazor diff and merge component based on Mergely with server side support.\n\n![this](Resources/.NET_Core_Logo_small.png)\n\n* [com.github.akovac35.BlazorMergely](https://www.nuget.org/packages/com.github.akovac35.BlazorMergely/)\n\n\t[![NuGet Version](http://img.shields.io/nuget/v/com.github.akovac35.BlazorMergely.svg?style=flat)](https://www.nuget.org/packages/com.github.akovac35.BlazorMergely/)\n\nBrowser functionality:\n\n![this](Resources/simple-showcase.gif)\n\nInteraction with the server:\n\n![this](Resources/save-to-server-console.gif)\n\n## Status\n\nPRODUCTION READY starting from version 1.0.0.\n\n## Usage\n\nUpdate _Host.cshtml file with static file references as follows:\n\n```cshtml\n@using com.github.akovac35.BlazorMergely\n\n@* BlazorMergely CSS references *@\n\u003ccomponent type=\"typeof(BlazorMergelyCssReferences)\" render-mode=\"Static\"/\u003e\n\n@* BlazorMergely JS references *@\n\u003ccomponent type=\"typeof(BlazorMergelyJsReferences)\" render-mode=\"Static\"/\u003e\n```\n\nThe above may not meet some specific application criteria like jQuery version etc. In that case simply add the required static file references manually, as per the following examples:\n\n* [BlazorMergelyCssReferences](src/com.github.akovac35.BlazorMergely/BlazorMergelyCssReferences.razor)\n* [BlazorMergelyJsReferences](src/com.github.akovac35.BlazorMergely/BlazorMergelyJsReferences.cs)\n\nThen use the component as follows:\n\n```razor\n@using com.github.akovac35.BlazorMergely\n\n\u003cdiv class=\"form-row\"\u003e\n\t\u003cdiv class=\"col-3\"\u003e\n\t\t\u003cbutton @onclick=@PrintContentsToConsoleOnServerSide\u003ePrint contents to console on server side\u003c/button\u003e\n\t\u003c/div\u003e\n\u003c/div\u003e\n\n\u003chr /\u003e\n\u003cbr /\u003e\n\n\u003cdiv class=\"form-row\"\u003e\n\t\u003cdiv class=\"col\" style=\"height:400px\"\u003e\n\t\t\u003cBlazorMergelyComponent @ref=\"BlazorMergelyComponentInstance\" MergelyOptions=@MergelyOptions /\u003e\n\t\u003c/div\u003e\n\u003c/div\u003e\n\n@code{\n\tprivate BlazorMergelyComponent? BlazorMergelyComponentInstance { get; set; }\n\tprivate string MergelyOptions { get; set; } = \"{\\\"cmsettings\\\":{\\\"mode\\\":\\\"text/javascript\\\",\\\"readOnly\\\":false,\\\"styleSelectedText\\\": true}}\"; // This is optional\n\t\n\tprivate TestModel TestModelInstance { get; set; } = new() { LeftValue = \"var x = 0;\", RightValue = \"var y = 0;\" };\n\n\tprotected override async Task OnAfterRenderAsync(bool firstRender)\n\t{\n\t\tawait base.OnAfterRenderAsync(firstRender);\n\t\t\n\t\t// Component reference is set after the first render\n\t\tif(firstRender)\n\t\t{\n\t\t\tawait BlazorMergelyComponentInstance!.SetValueAsync(TestModelInstance.LeftValue, TestModelInstance.RightValue);\n\t\t}\n\t}\n\n\tprivate async Task PrintContentsToConsoleOnServerSide(MouseEventArgs args)\n\t{\n\t\tvar contents = await BlazorMergelyComponentInstance!.GetValuesAsync();\n\t\tConsole.WriteLine(contents.Left);\n\t\tConsole.WriteLine(contents.Right);\n\t}\n}\n```\n\nAll methods and properties are listed here: [BlazorMergelyComponent.razor.cs](src/com.github.akovac35.BlazorMergely/BlazorMergelyComponent.razor.cs)\n\n## Samples\n\nReview the following samples:\n\n* [BlazorMergelySimpleTest](instance/BlazorMergelyWebApp/Pages/BlazorMergelySimpleTest.razor)\n* [BlazorMergelyTest](instance/BlazorMergelyWebApp/Pages/BlazorMergelyTest.razor)\n\nClone this repository locally, navigate to `instance/BlazorMergelyWebApp` and issue the `dotnet run` command.\n\n## Release history\n\n* 1.0.0 - Production ready.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## Credits\n\nBased on Mergely javascript library: [www.mergely.com](https://mergely.com/)\n\n## License\n[LGPL-2.1](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakovac35%2FBlazorMergely","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakovac35%2FBlazorMergely","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakovac35%2FBlazorMergely/lists"}