react-cron-generator 1.3.13 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,10 +6,6 @@ Simple react component to generate cron expression
6
6
 
7
7
  Package helps to build linux scheduler cron expression.
8
8
 
9
- Make sure you have include bootstrap(4.x) in your project.
10
-
11
- For old bootstrap(3.x) version support, please use cron generator version "1.2.12"
12
-
13
9
 
14
10
  ```
15
11
  data = '* * * * * * *'
@@ -89,22 +85,11 @@ const options = {
89
85
 
90
86
  ```
91
87
 
92
- ## Ref
93
-
94
- Added `ref` to the component now you can access state and functions using ref.
95
-
96
- add the new prop ` onRef={ref => (this.cronGen = ref)} `
97
-
98
- ```
99
- <Cron
100
- onRef={ref => (this.cronGen = ref)}
101
- onChange={(e)=> {this.setState({value:e}); console.log(e)}}
102
- value={this.state.value}
103
- showResultText={true}
104
- showResultCron={true}
105
- />
106
- ```
107
88
 
89
+ ## Release notes 2.x.x
90
+ 1. Build Procedure updated
91
+ 2. Updated to latest react(18)
92
+ 3. Migrated to hooks and typescript
108
93
 
109
94
  [Sojin Antony](https://github.com/sojinantony01)
110
95
 
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface CustomCronProp {
3
+ onChange(e: string[]): void;
4
+ value: string[];
5
+ translate(e: string): string;
6
+ }
7
+ declare const CustomCron: React.FunctionComponent<CustomCronProp>;
8
+ export default CustomCron;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'react';
2
+ interface DailyCronProp {
3
+ onChange(e?: string[]): void;
4
+ value: string[];
5
+ translate(e: string): string;
6
+ }
7
+ declare const DailyCron: FunctionComponent<DailyCronProp>;
8
+ export default DailyCron;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'react';
2
+ interface HourlyCronProp {
3
+ onChange(e?: string[]): void;
4
+ value: string[];
5
+ translate(e: string): string;
6
+ }
7
+ declare const HourlyCron: FunctionComponent<HourlyCronProp>;
8
+ export default HourlyCron;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'react';
2
+ interface MinutesCronProp {
3
+ onChange(e: string[]): void;
4
+ value: string[];
5
+ translate(e: string): string;
6
+ }
7
+ declare const MinutesCron: FunctionComponent<MinutesCronProp>;
8
+ export default MinutesCron;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'react';
2
+ interface MonthlyCronProp {
3
+ onChange(e?: string[]): void;
4
+ value: string[];
5
+ translate(e: string): string;
6
+ }
7
+ declare const MonthlyCron: FunctionComponent<MonthlyCronProp>;
8
+ export default MonthlyCron;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'react';
2
+ interface WeeklyCronProp {
3
+ onChange(e?: string[]): void;
4
+ value: string[];
5
+ translate(e: string): string;
6
+ }
7
+ declare const WeeklyCron: FunctionComponent<WeeklyCronProp>;
8
+ export default WeeklyCron;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { HeaderKeyType } from './meta';
3
+ import './cron-builder.css';
4
+ interface CronProp {
5
+ value?: string;
6
+ onChange(val: string, text: string): void;
7
+ showResultText: boolean;
8
+ showResultCron: boolean;
9
+ translateFn?(key: string): string;
10
+ locale?: string;
11
+ options?: {
12
+ headers: HeaderKeyType[];
13
+ };
14
+ }
15
+ declare const Cron: React.FunctionComponent<CronProp>;
16
+ export default Cron;
@@ -0,0 +1,8 @@
1
+ import React, { ChangeEvent } from 'react';
2
+ interface HourSelectProp {
3
+ disabled?: boolean;
4
+ onChange(event: ChangeEvent<HTMLSelectElement>): void;
5
+ value: string;
6
+ }
7
+ declare const HourSelect: React.FunctionComponent<HourSelectProp>;
8
+ export default HourSelect;
@@ -1,4 +1,4 @@
1
- import Cron from './cron';
2
- import { HEADER } from './meta';
3
- export { HEADER };
4
- export default Cron;
1
+ import Cron from './cron';
2
+ import { HEADER } from './meta';
3
+ export { HEADER };
4
+ export default Cron;