{"_id":"@bnuby/react-cron-generator","name":"@bnuby/react-cron-generator","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.4":{"name":"@bnuby/react-cron-generator","version":"0.0.4","description":"Simple react component to generate cron expression","keywords":["React cron generator","cron builder","Scheduler expression builder","cron","React cron","cron builder","cron ui","react cron ","react cron editor","react cron creator"],"author":{"name":"Sojin antony"},"dependencies":{"cronstrue":"^2.12.0"},"main":"build/index.js","module":"build/index.esm.js","repository":{"type":"git","url":"git+https://github.com/bnuby/react-cron-generator.git"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0"},"devDependencies":{"@rollup/plugin-commonjs":"22.0.2","@rollup/plugin-json":"4.1.0","@rollup/plugin-node-resolve":"14.1.0","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^13.4.0","@testing-library/user-event":"^13.5.0","@types/jest":"^27.5.2","@types/node":"^16.11.59","@types/react":"^18.0.20","@types/react-dom":"^18.0.6","postcss":"^8.4.16","react-scripts":"5.0.1","rollup":"2.79.0","rollup-plugin-peer-deps-external":"2.2.4","rollup-plugin-postcss":"4.0.2","rollup-plugin-typescript2":"0.34.0","sass":"^1.54.9","typescript":"^4.8.3","web-vitals":"^2.1.4"},"scripts":{"start":"react-scripts start","build":"rm -rf build && rollup -c","test":"react-scripts test","eject":"react-scripts eject","deploy":"gh-pages -d build","react-build":"CI=false && react-scripts build","prepublishOnly":"npm run build"},"publishConfig":{"registry":"https://npm.pkg.github.com/bnuby"},"homepage":"https://sojinantony01.github.io/react-cron-generator","eslintConfig":{"extends":["react-app","react-app/jest"]},"license":"ISC","browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"types":"./build/index.d.ts","gitHead":"603e2be89e2037e3dc243d8a2a507a9a787a9992","bugs":{"url":"https://github.com/bnuby/react-cron-generator/issues"},"_id":"@bnuby/react-cron-generator@0.0.4","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-/nCwcr8GEclhhj8FZB7JABar/8c/e6HTp9JBM2BnlsQpwsyaE5FJTPSeij1kiBJC6YvSXhgUkvfzwkv0ylppwQ==","shasum":"06d1cafd848c0eb83241b3015047240a42b8d6a1","tarball":"https://registry.npmjs.org/@bnuby/react-cron-generator/-/react-cron-generator-0.0.4.tgz","fileCount":18,"unpackedSize":1617697,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdbvV4WsTPlTMQJH3UKRTGePIjwb2ugVS/SVVUUFnuswIgTvbUZt0pYYtmYEFPiPEnoijHXwsrCZRZ7wDSzeSFxPU="}]},"_npmUser":{"name":"bnuby","email":"gibsonkong6871@gmail.com"},"directories":{},"maintainers":[{"name":"bnuby","email":"gibsonkong6871@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-cron-generator_0.0.4_1688367238729_0.597668236285213"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-03T06:53:58.610Z","0.0.4":"2023-07-03T06:53:58.909Z","modified":"2023-07-03T06:53:59.191Z"},"maintainers":[{"name":"bnuby","email":"gibsonkong6871@gmail.com"}],"description":"Simple react component to generate cron expression","homepage":"https://sojinantony01.github.io/react-cron-generator","keywords":["React cron generator","cron builder","Scheduler expression builder","cron","React cron","cron builder","cron ui","react cron ","react cron editor","react cron creator"],"repository":{"type":"git","url":"git+https://github.com/bnuby/react-cron-generator.git"},"author":{"name":"Sojin antony"},"bugs":{"url":"https://github.com/bnuby/react-cron-generator/issues"},"license":"ISC","readme":"# react-cron-generator\n\nSimple react component to generate cron expression\n\n## Getting Started\n\nPackage helps to build linux scheduler cron expression.\n\n\n```\ndata = '* * * * * * *'\n```\n```\nnpm install react-cron-generator\n\n```\n## demo\n[Live demo](https://sojinantony01.github.io/react-cron-generator/)\n\n![alt text](https://raw.githubusercontent.com/sojinantony01/react-cron-generator/master/public/images/Screenshot%20from%202019-06-08%2000-31-31.png)\n\n![alt text](https://raw.githubusercontent.com/sojinantony01/react-cron-generator/master/public/images/Screenshot%20from%202019-06-08%2000-31-57.png)\n\n\n```\nimport React, { Component } from 'react'\nimport Cron from 'react-cron-generator'\nimport 'react-cron-generator/dist/cron-builder.css'\n\n\nclass App extends Component {\n\n  constructor(props) {\n      super(props);\n      this.state = {\n       \n      };\n  }\n\n  render() {\n    return (<div>\n      <Cron\n        onChange={(e)=> {this.setState({value:e});}}\n        value={this.state.value}\n        showResultText={true}\n        showResultCron={true}\n        />\n                            \n    </div>)\n  }\n}\n\nexport default App;\n\n```\n## props\n\n| Prop | Description | Default | Mandatory\n| --- | --- | -- | -- |\n| value | cron expression  |  |  No |\n| onChange | have 2 arguments, 1st is cron value and 2nd is cron result text from cronstrue  |  | Yes\n| showResultText | show in readable text format | false | No\n| showResultCron | show cron expression | false | No\n| translateFn | translate function callback | method | No\n| locale | locale for cronstrue | en | No\n| options | Options for Cron component, *Must pass a valid cron value for available headers | All available headers | No\n\n\n**translateFn**\n\nExpects a method. Use this prop for localization support. `react-cron-generator` will call this method for every key. List of keys are available [here](https://github.com/sojinantony01/react-cron-generator/tree/master/src/lib/localization/translation.json)\n\n`locale` option should be set for correct `ResultText` translation. Please visit [cronstrue](https://github.com/bradymholt/cRonstrue) for supported locales.\n\n## Options\n\n**options.headers**\n\n```\nimport { HEADER } from 'react-cron-generator';\n\nconst options = {\n  headers: [HEADER.MONTHLY, HEADER.WEEKLY, HEADER.MINUTES, HEADER.HOURLY, HEADER.DAILY, HEADER.CUSTOM]\n};\n\n```\n\n\n## Release notes 2.x.x\n1. Build Procedure updated\n2. Updated to latest react(18)\n3. Migrated to hooks and typescript\n\n[Sojin Antony](https://github.com/sojinantony01)\n\n## Acknowledgments\n\n**cronstrue**\n\n[Viswanath Lekshmanan](https://viswanathl.in/)\n","readmeFilename":"README.md"}