From a4aa9d949c02b377b744a5c8b60477ddf3f35f5b Mon Sep 17 00:00:00 2001 From: Martin Lopez Date: Thu, 17 Oct 2024 17:56:19 -0300 Subject: [PATCH 1/2] deprecate: correct typo on DataColorMode enum value Fixes #3 --- .../addons/markdown/BaseMarkdownComponent.java | 13 +++++++++++-- .../vaadin/addons/markdown/MarkdownEditorDemo.java | 2 +- .../vaadin/addons/markdown/MarkdownViewerDemo.java | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/flowingcode/vaadin/addons/markdown/BaseMarkdownComponent.java b/src/main/java/com/flowingcode/vaadin/addons/markdown/BaseMarkdownComponent.java index 97c8d9b..f27f7c0 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/markdown/BaseMarkdownComponent.java +++ b/src/main/java/com/flowingcode/vaadin/addons/markdown/BaseMarkdownComponent.java @@ -41,11 +41,19 @@ public class BaseMarkdownComponent extends ReactAdapterComponent implements HasS * * */ - public enum DataColorMode {DARK,LIGTH,AUTO}; + public enum DataColorMode { + DARK, + LIGHT, + /** + * @deprecated Use LIGHT instead + */ + @Deprecated + LIGTH, + AUTO}; /** * Base constructor that receives the content of the markdown component. @@ -85,6 +93,7 @@ public void setDataColorMode(DataColorMode mode) { getElement().setAttribute("data-color-mode", "dark"); break; case LIGTH: + case LIGHT: getElement().setAttribute("data-color-mode", "light"); break; case AUTO: diff --git a/src/test/java/com/flowingcode/vaadin/addons/markdown/MarkdownEditorDemo.java b/src/test/java/com/flowingcode/vaadin/addons/markdown/MarkdownEditorDemo.java index 61ad7cd..6c7d944 100644 --- a/src/test/java/com/flowingcode/vaadin/addons/markdown/MarkdownEditorDemo.java +++ b/src/test/java/com/flowingcode/vaadin/addons/markdown/MarkdownEditorDemo.java @@ -49,7 +49,7 @@ public MarkdownEditorDemo() { mde.setDataColorMode(DataColorMode.DARK); break; case "Light": - mde.setDataColorMode(DataColorMode.LIGTH); + mde.setDataColorMode(DataColorMode.LIGHT); break; case "Automatic": mde.setDataColorMode(DataColorMode.AUTO); diff --git a/src/test/java/com/flowingcode/vaadin/addons/markdown/MarkdownViewerDemo.java b/src/test/java/com/flowingcode/vaadin/addons/markdown/MarkdownViewerDemo.java index 31a8c40..f60ec19 100644 --- a/src/test/java/com/flowingcode/vaadin/addons/markdown/MarkdownViewerDemo.java +++ b/src/test/java/com/flowingcode/vaadin/addons/markdown/MarkdownViewerDemo.java @@ -212,7 +212,7 @@ public MarkdownViewerDemo() { mdv.setDataColorMode(DataColorMode.DARK); break; case "Light": - mdv.setDataColorMode(DataColorMode.LIGTH); + mdv.setDataColorMode(DataColorMode.LIGHT); break; case "Automatic": mdv.setDataColorMode(DataColorMode.AUTO); From 2a099264e479f069b1bc69a86f3e071d69c4a05c Mon Sep 17 00:00:00 2001 From: Martin Lopez Date: Thu, 17 Oct 2024 18:02:08 -0300 Subject: [PATCH 2/2] build: update version to 1.1.0-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a15cb9d..a9e080e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.flowingcode.vaadin.addons markdown-editor-addon - 1.0.1-SNAPSHOT + 1.1.0-SNAPSHOT Markdown Editor Add-on Markdown Editor for Vaadin Flow https://www.flowingcode.com/en/open-source/