Skip to content

Commit b323b31

Browse files
paodbjavier-godoy
authored andcommitted
refactor: component renamed to CronExpressionField
Close #3
1 parent 45a6e97 commit b323b31

File tree

20 files changed

+132
-135
lines changed

20 files changed

+132
-135
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Bug Report
2-
description: Please report issues related to Cron Expression Editor Add-on here.
2+
description: Please report issues related to Cron Expression Field Add-on here.
33
body:
44
- type: textarea
55
id: problem-description

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Feature Request
2-
description: Please add feature suggestions related to Cron Expression Editor Add-on here.
2+
description: Please add feature suggestions related to Cron Expression Field Add-on here.
33
body:
44
- type: textarea
55
id: feature-proposal

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/cron-expression-editor-add-on)
2-
[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/cron-expression-editor-add-on.svg)](https://vaadin.com/directory/component/cron-expression-editor-add-on)
3-
[![Build Status](https://jenkins.flowingcode.com/job/CronExpressionEditor-addon/badge/icon)](https://jenkins.flowingcode.com/job/CronExpressionEditor-addon)
4-
[![Maven Central](https://img.shields.io/maven-central/v/com.flowingcode.vaadin.addons/cron-expression-editor-addon)](https://mvnrepository.com/artifact/com.flowingcode.vaadin.addons/cron-expression-editor-addon)
5-
[![Javadoc](https://img.shields.io/badge/javadoc-00b4f0)](https://javadoc.flowingcode.com/artifact/com.flowingcode.vaadin.addons/cron-expression-editor-addon)
1+
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/cron-expression-field-add-on)
2+
[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/cron-expression-field-add-on.svg)](https://vaadin.com/directory/component/cron-expression-field-add-on)
3+
[![Build Status](https://jenkins.flowingcode.com/job/CronExpressionField-addon/badge/icon)](https://jenkins.flowingcode.com/job/CronExpressionField-addon)
4+
[![Maven Central](https://img.shields.io/maven-central/v/com.flowingcode.vaadin.addons/cron-expression-field-addon)](https://mvnrepository.com/artifact/com.flowingcode.vaadin.addons/cron-expression-field-addon)
5+
[![Javadoc](https://img.shields.io/badge/javadoc-00b4f0)](https://javadoc.flowingcode.com/artifact/com.flowingcode.vaadin.addons/cron-expression-field-addon)
66

7-
# Cron Expression Editor Add-on
7+
# Cron Expression Field Add-on
88

9-
A component for Vaadin 24 that assists in the generation of cron expressions
9+
A component for Vaadin 24 that assists in the generation of cron expressions.
1010

1111
## Features
1212

13-
* A mode to input daily, weekly and monthly expressions with the assistance of UI components
14-
* An advanced mode to input cron expressions directly
15-
* Calculation of the next dates scheduled by the generated cron expression
16-
* Allows the configuration of a list of frequently used cron expressions
13+
* A mode to input daily, weekly and monthly expressions with the assistance of UI components.
14+
* An advanced mode to input cron expressions directly.
15+
* Calculation of the next dates scheduled by the generated cron expression.
16+
* Allows the configuration of a list of frequently used cron expressions.
1717

1818
## Online demo
1919

20-
[Online demo here](http://addonsv24.flowingcode.com/cron-expression-editor)
20+
[Online demo here](http://addonsv24.flowingcode.com/cron-expression-field)
2121

2222
## Download release
2323

24-
[Available in Vaadin Directory](https://vaadin.com/directory/component/cron-expression-editor-add-on)
24+
[Available in Vaadin Directory](https://vaadin.com/directory/component/cron-expression-field-add-on)
2525

2626
### Maven install
2727

@@ -30,7 +30,7 @@ Add the following dependencies in your pom.xml file:
3030
```xml
3131
<dependency>
3232
<groupId>com.flowingcode.vaadin.addons</groupId>
33-
<artifactId>cron-expression-editor-addon</artifactId>
33+
<artifactId>cron-expression-field-addon</artifactId>
3434
<version>X.Y.Z</version>
3535
</dependency>
3636
```
@@ -47,7 +47,7 @@ To see the demo, navigate to http://localhost:8080/
4747

4848
## Release notes
4949

50-
See [here](https://github.com/FlowingCode/CronExpressionEditor/releases)
50+
See [here](https://github.com/FlowingCode/CronExpressionField/releases)
5151

5252
## Issue tracking
5353

@@ -87,7 +87,7 @@ Then, follow these steps for creating a contribution:
8787

8888
This add-on is distributed under Apache License 2.0. For license terms, see LICENSE.txt.
8989

90-
CronExpressionEditor Add-on is written by Flowing Code S.A.
90+
Cron Expression Field Add-on is written by Flowing Code S.A.
9191

9292
## Third-Party Dependencies
9393

@@ -101,13 +101,13 @@ This project includes the following third-party dependency:
101101

102102
```java
103103
// Create a new instance
104-
CronExpressionEditor editor = new CronExpressionEditor();
104+
CronExpressionField field = new CronExpressionField();
105105

106106
// Set default expression (optional)
107-
editor.setDefaultExpression("0 0 12 * * ?");
107+
field.setDefaultExpression("0 0 12 * * ?");
108108

109109
// Add to your layout
110-
add(editor);
110+
add(field);
111111
```
112112

113113
## Special configuration when using Spring

pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<modelVersion>4.0.0</modelVersion>
66

77
<groupId>com.flowingcode.vaadin.addons</groupId>
8-
<artifactId>cron-expression-editor-addon</artifactId>
8+
<artifactId>cron-expression-field-addon</artifactId>
99
<version>1.0.0-SNAPSHOT</version>
10-
<name>Cron Expression Editor Add-on</name>
10+
<name>Cron Expression Field Add-on</name>
1111
<description>Component that assists in the generation of cron expressions</description>
1212
<url>https://www.flowingcode.com/en/open-source/</url>
1313

@@ -41,9 +41,9 @@
4141
</licenses>
4242

4343
<scm>
44-
<url>https://github.com/FlowingCode/AddonStarter24</url>
45-
<connection>scm:git:git://github.com/FlowingCode/AddonStarter24.git</connection>
46-
<developerConnection>scm:git:ssh://[email protected]:/FlowingCode/AddonStarter24.git</developerConnection>
44+
<url>https://github.com/FlowingCode/CronExpressionField</url>
45+
<connection>scm:git:git://github.com/FlowingCode/CronExpressionField.git</connection>
46+
<developerConnection>scm:git:ssh://[email protected]:/FlowingCode/CronExpressionField.git</developerConnection>
4747
<tag>master</tag>
4848
</scm>
4949

@@ -288,7 +288,7 @@
288288
<vaadin.frontend.hotdeploy>true</vaadin.frontend.hotdeploy>
289289
<systemProperty>
290290
<key>vaadin.i18n.provider</key>
291-
<value>com.flowingcode.vaadin.addons.cronexpressioneditor.TranslationProvider</value>
291+
<value>com.flowingcode.vaadin.addons.cronexpressionfield.TranslationProvider</value>
292292
</systemProperty>
293293
</systemProperties>
294294
</configuration>
Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-
22
* #%L
3-
* Cron Expression Editor Add-on
3+
* Cron Expression Field Add-on
44
* %%
55
* Copyright (C) 2025 Flowing Code
66
* %%
@@ -18,7 +18,7 @@
1818
* #L%
1919
*/
2020

21-
package com.flowingcode.vaadin.addons.cronexpressioneditor;
21+
package com.flowingcode.vaadin.addons.cronexpressionfield;
2222

2323
import java.time.DayOfWeek;
2424
import java.time.Duration;
@@ -58,7 +58,6 @@
5858
import com.vaadin.flow.internal.JsonSerializer;
5959
import com.vaadin.flow.theme.lumo.LumoUtility;
6060
import elemental.json.JsonObject;
61-
import org.springframework.format.annotation.DurationFormat.Unit;
6261
import org.springframework.scheduling.support.CronExpression;
6362
import it.burning.cron.CronExpressionDescriptor;
6463
import it.burning.cron.CronExpressionParser.CronExpressionParseException;
@@ -71,8 +70,8 @@
7170
* @author Sofia Nuñez / Flowing Code
7271
*/
7372
@SuppressWarnings("serial")
74-
@CssImport(value = "./styles/cron-expression-editor-styles.css")
75-
public class CronExpressionEditor extends CustomField<String> {
73+
@CssImport(value = "./styles/cron-expression-field-styles.css")
74+
public class CronExpressionField extends CustomField<String> {
7675

7776
/**
7877
* Default value used only when {@code inputExpressionTf} and {@code defaultExpression} are empty. Represents every
@@ -94,24 +93,24 @@ protected enum Units {
9493
SECONDS, MINUTES, HOURS;
9594
}
9695

97-
private CronExpressionEditorI18n i18n;
96+
private CronExpressionFieldI18n i18n;
9897
private boolean helpEnabled;
9998
private boolean commonExpressionsVisible;
10099
private boolean cronInputEnabled;
101100

102-
/** Creates a new instance of {@code CronExpressionEditor} */
103-
public CronExpressionEditor() {
104-
this.setClassName("fc-cron-expression-editor");
101+
/** Creates a new instance of {@code CronExpressionField} */
102+
public CronExpressionField() {
103+
this.setClassName("fc-cron-expression-field");
105104
setI18n(null);
106105
configureLayout();
107106
}
108107

109108
/**
110-
* Creates a new instance of {@code CronExpressionEditor} with a default expression.
109+
* Creates a new instance of {@code CronExpressionField} with a default expression.
111110
*
112111
* @param defaultExpression a {@code String} representing the default cron expression to be set
113112
*/
114-
public CronExpressionEditor(String defaultExpression) {
113+
public CronExpressionField(String defaultExpression) {
115114
this();
116115
setDefaultExpression(defaultExpression);
117116
}
@@ -567,15 +566,15 @@ public void setLocale(Locale locale) {
567566
}
568567

569568
/**
570-
* Sets the internationalization settings for the editor.
569+
* Sets the internationalization settings for the field.
571570
* <p>
572571
* If {@code i18n} is {@code null}, default internationalization to english.
573572
* </p>
574573
*
575-
* @param i18n the {@link CronExpressionEditorI18n} to use, or {@code null} for default
574+
* @param i18n the {@link CronExpressionFieldI18n} to use, or {@code null} for default
576575
*/
577-
public void setI18n(CronExpressionEditorI18n i18n) {
578-
this.i18n = (i18n != null) ? i18n : CronExpressionEditorI18n.createDefault();
576+
public void setI18n(CronExpressionFieldI18n i18n) {
577+
this.i18n = (i18n != null) ? i18n : CronExpressionFieldI18n.createDefault();
579578
getUI().ifPresent(ui -> setI18nWithJS());
580579
}
581580

0 commit comments

Comments
 (0)