-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Håvard Dagenborg
committed
Oct 3, 2024
0 parents
commit 4952fdd
Showing
29 changed files
with
2,063 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Empty file.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Nested package.json's are only needed for development. | ||
**/package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
ngx-cron-editor | ||
=== | ||
|
||
An Angular 15+ component for building cron expressions graphically. It is meant | ||
to be used in reactive forms and support Angular Material Design styling. | ||
|
||
|
||
## Demo | ||
|
||
A demo can be found [here](https://haavardj.github.io/ngx-cron-editor/) | ||
|
||
## Usage | ||
|
||
1. Install the npm package: | ||
``` | ||
$ npm i ngx-cron-editor -S | ||
``` | ||
2. Import the module in your own module: | ||
```ts | ||
import { CronEditorModule } from 'ngx-cron-editor'; | ||
@NgModule({ | ||
imports: [..., CronEditorModule], | ||
... | ||
}) | ||
export class MyModule { | ||
} | ||
``` | ||
3. Setup the FormControl in you component's typescript file: | ||
```ts | ||
ngOnInit(): void { | ||
this.cronForm = new FormControl('0 0 1/1 * *'); | ||
} | ||
``` | ||
|
||
4. Include the component in your html code: | ||
|
||
```html | ||
<cron-editor [formControl]="cronForm"></cron-editor> | ||
``` | ||
|
||
or use the `formControlName='...'` directive if your form controller | ||
lives in a FormGroup. | ||
|
||
## Options | ||
|
||
```html | ||
<cron-editor [formControl]="cronForm" [options]="cronOptions"></cron-editor> | ||
``` | ||
|
||
```ts | ||
import { CronOptions } from 'ngx-cron-editor'; | ||
|
||
@Component({ | ||
... | ||
}) | ||
export class MyComponent { | ||
public cronOptions: CronOptions = { | ||
defaultTime: "00:00:00", | ||
|
||
hideMinutesTab: false, | ||
hideHourlyTab: false, | ||
hideDailyTab: false, | ||
hideWeeklyTab: false, | ||
hideMonthlyTab: false, | ||
hideYearlyTab: false, | ||
hideAdvancedTab: true, | ||
hideSpecificWeekDayTab: false, | ||
hideSpecificMonthWeekTab : false, | ||
|
||
use24HourTime: true, | ||
hideSeconds: false, | ||
|
||
cronFlavor: "quartz" //standard or quartz | ||
}; | ||
} | ||
``` | ||
|
||
## History | ||
|
||
The ngx-cron-editor is a fork of the vincentjames501's [angular-cron-gen](https://github.com/vincentjames501/angular-cron-gen) for AngularJS 1.5+ and claudiuconstantin's [cron-editor(https://github.com/claudiuconstantin/cron-editor)]. | ||
|
||
**The main additions of this fork is support for Angular 8+ and material design.** | ||
|
||
|
||
## License: | ||
Licensed under the MIT license |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
export * from './public_api'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNyb24tZWRpdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vbGlicy9uZ3gtY3Jvbi1lZGl0b3Ivbmd4LWNyb24tZWRpdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Public API Surface | ||
*/ | ||
export * from './src/cron-editor.module'; | ||
export * from './src/CronOptions'; | ||
export * from './src/enums'; | ||
export * from './src/cron-editor.component'; | ||
export * from './src/cron-time-picker.component'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYnMvbmd4LWNyb24tZWRpdG9yL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLDBCQUEwQixDQUFDO0FBQ3pDLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxjQUFjLGtDQUFrQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZVxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vc3JjL2Nyb24tZWRpdG9yLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9Dcm9uT3B0aW9ucyc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9lbnVtcyc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9jcm9uLWVkaXRvci5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY3Jvbi10aW1lLXBpY2tlci5jb21wb25lbnQnO1xuIl19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export class DefaultOptions { | ||
constructor() { | ||
this.cronFlavor = 'standard'; | ||
this.defaultTime = '00:00:00'; | ||
this.hideAdvancedTab = false; | ||
this.hideDailyTab = false; | ||
this.hideHourlyTab = false; | ||
this.hideMinutesTab = false; | ||
this.hideMonthlyTab = false; | ||
this.hideSeconds = false; | ||
this.hideSpecificMonthWeekTab = false; | ||
this.hideSpecificWeekDayTab = false; | ||
this.hideWeeklyTab = false; | ||
this.hideYearlyTab = false; | ||
this.use24HourTime = true; | ||
} | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3Jvbk9wdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL25neC1jcm9uLWVkaXRvci9zcmMvQ3Jvbk9wdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEJBLE1BQU0sT0FBTyxjQUFjO0lBQTNCO1FBRUUsZUFBVSxHQUFlLFVBQVUsQ0FBQztRQUNwQyxnQkFBVyxHQUFHLFVBQVUsQ0FBQztRQUN6QixvQkFBZSxHQUFHLEtBQUssQ0FBQztRQUN4QixpQkFBWSxHQUFHLEtBQUssQ0FBQztRQUNyQixrQkFBYSxHQUFHLEtBQUssQ0FBQztRQUN0QixtQkFBYyxHQUFHLEtBQUssQ0FBQztRQUN2QixtQkFBYyxHQUFHLEtBQUssQ0FBQztRQUN2QixnQkFBVyxHQUFHLEtBQUssQ0FBQztRQUNwQiw2QkFBd0IsR0FBRyxLQUFLLENBQUM7UUFDakMsMkJBQXNCLEdBQUcsS0FBSyxDQUFDO1FBQy9C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