This repository has been archived by the owner on Sep 21, 2024. It is now read-only.
forked from vincentjames501/angular-cron-gen
-
Notifications
You must be signed in to change notification settings - Fork 56
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
1 parent
5142024
commit 055c4f6
Showing
69 changed files
with
9,517 additions
and
6,438 deletions.
There are no files selected for viewing
This file was deleted.
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
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
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 |
---|---|---|
@@ -1,76 +1,19 @@ | ||
cron-editor | ||
=== | ||
|
||
A library that helps the user graphically build a CRON expression using Angular 2+. It is a fork of the vincentjames501's [angular-cron-gen](https://github.com/vincentjames501/angular-cron-gen) for AngularJS 1.5+. | ||
`cron-editor` is library that helps the user graphically build a CRON expression (quartz format only) in an Angular application. It is a fork of [angular-cron-gen](https://github.com/vincentjames501/angular-cron-gen) for AngularJS, ported to Angular 2+ and heavily improved. | ||
|
||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.2.0. To run the sample app just run `npm run start` and go to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. | ||
This project contains the library along with an app to ease development and testing. It was generated with [Angular CLI](https://github.com/angular/angular-cli), following the awesome [Ng Library Series]() written by Todd Palmer. | ||
|
||
To run the app just run `npm install`, then `npm run start` and go to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. | ||
|
||
## Demo | ||
|
||
A work-in-progress demo can be found [here](https://claudiuconstantin.github.io/cron-editor/) | ||
A quick demo of this app can be found [here](https://claudiuconstantin.github.io/cron-editor/). | ||
|
||
## Usage | ||
## Sample app | ||
|
||
1. Install the npm package: | ||
``` | ||
$ npm i cron-editor -S | ||
``` | ||
2. Import the module in your own module: | ||
```ts | ||
import { CronEditorModule } from "cron-editor/cron-editor"; | ||
@NgModule({ | ||
imports: [..., CronEditorModule], | ||
... | ||
}) | ||
export class MyModule { | ||
} | ||
``` | ||
3. Use the component in your html code: | ||
```html | ||
<cron-editor [(cron)]="cronExpression"></cron-editor> | ||
``` | ||
4. That's it, you're done! | ||
## Options | ||
```html | ||
<cron-editor [(cron)]="cronExpression" [options]="cronOptions"></cron-editor> | ||
``` | ||
|
||
```ts | ||
import { CronOptions } from "cron-editor/cron-editor"; | ||
|
||
@Component({ | ||
... | ||
}) | ||
export class MyComponent { | ||
public cronOptions: CronOptions = { | ||
formInputClass: 'form-control cron-editor-input', | ||
formSelectClass: 'form-control cron-editor-select', | ||
formRadioClass: 'cron-editor-radio', | ||
formCheckboxClass: 'cron-editor-checkbox', | ||
|
||
defaultTime: "10:00:00", | ||
|
||
hideMinutesTab: false, | ||
hideHourlyTab: false, | ||
hideDailyTab: false, | ||
hideWeeklyTab: false, | ||
hideMonthlyTab: false, | ||
hideYearlyTab: false, | ||
hideAdvancedTab: true, | ||
use24HourTime: true, | ||
hideSeconds: false | ||
}; | ||
} | ||
``` | ||
This library is published as a [npm package](https://www.npmjs.com/package/cron-editor) you can directly include in your app. You can find a sample app [here](https://github.com/claudiuconstantin/cron-editor-sample). | ||
|
||
## License: | ||
Licensed under the MIT 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,171 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"cron-editor-app": { | ||
"root": "", | ||
"sourceRoot": "src", | ||
"projectType": "application", | ||
"prefix": "app", | ||
"schematics": {}, | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:browser", | ||
"options": { | ||
"outputPath": "dist/cron-editor-app", | ||
"index": "src/index.html", | ||
"main": "src/main.ts", | ||
"polyfills": "src/polyfills.ts", | ||
"tsConfig": "src/tsconfig.app.json", | ||
"assets": [ | ||
"src/favicon.ico", | ||
"src/assets" | ||
], | ||
"styles": [ | ||
"./node_modules/bootstrap/dist/css/bootstrap.min.css", | ||
"src/styles.css" | ||
], | ||
"scripts": [] | ||
}, | ||
"configurations": { | ||
"production": { | ||
"fileReplacements": [ | ||
{ | ||
"replace": "src/environments/environment.ts", | ||
"with": "src/environments/environment.prod.ts" | ||
} | ||
], | ||
"optimization": true, | ||
"outputHashing": "all", | ||
"sourceMap": false, | ||
"extractCss": true, | ||
"namedChunks": false, | ||
"aot": true, | ||
"extractLicenses": true, | ||
"vendorChunk": false, | ||
"buildOptimizer": true, | ||
"budgets": [ | ||
{ | ||
"type": "initial", | ||
"maximumWarning": "2mb", | ||
"maximumError": "5mb" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"serve": { | ||
"builder": "@angular-devkit/build-angular:dev-server", | ||
"options": { | ||
"browserTarget": "cron-editor-app:build" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"browserTarget": "cron-editor-app:build:production" | ||
} | ||
} | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n", | ||
"options": { | ||
"browserTarget": "cron-editor-app:build" | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "src/test.ts", | ||
"polyfills": "src/polyfills.ts", | ||
"tsConfig": "src/tsconfig.spec.json", | ||
"karmaConfig": "src/karma.conf.js", | ||
"styles": [ | ||
"src/styles.css" | ||
], | ||
"scripts": [], | ||
"assets": [ | ||
"src/favicon.ico", | ||
"src/assets" | ||
] | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"src/tsconfig.app.json", | ||
"src/tsconfig.spec.json" | ||
], | ||
"exclude": [ | ||
"**/node_modules/**" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"cron-editor-app-e2e": { | ||
"root": "e2e/", | ||
"projectType": "application", | ||
"prefix": "", | ||
"architect": { | ||
"e2e": { | ||
"builder": "@angular-devkit/build-angular:protractor", | ||
"options": { | ||
"protractorConfig": "e2e/protractor.conf.js", | ||
"devServerTarget": "cron-editor-app:serve" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"devServerTarget": "cron-editor-app:serve:production" | ||
} | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": "e2e/tsconfig.e2e.json", | ||
"exclude": [ | ||
"**/node_modules/**" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"cron-editor": { | ||
"root": "projects/cron-editor", | ||
"sourceRoot": "projects/cron-editor/src", | ||
"projectType": "library", | ||
"prefix": "cron", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-ng-packagr:build", | ||
"options": { | ||
"tsConfig": "projects/cron-editor/tsconfig.lib.json", | ||
"project": "projects/cron-editor/ng-package.json" | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "projects/cron-editor/src/test.ts", | ||
"tsConfig": "projects/cron-editor/tsconfig.spec.json", | ||
"karmaConfig": "projects/cron-editor/karma.conf.js" | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"projects/cron-editor/tsconfig.lib.json", | ||
"projects/cron-editor/tsconfig.spec.json" | ||
], | ||
"exclude": [ | ||
"**/node_modules/**" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"defaultProject": "cron-editor-app" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.