@zydon/common 2.0.26 → 2.0.27

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.
@@ -1,25 +1,7 @@
1
1
  import * as react from 'react';
2
- import { SourceInfo } from 'react-number-format';
3
- import { TextFieldProps } from '@mui/material/TextField';
4
-
5
- type NumberInputProps = Omit<TextFieldProps, 'onChange'> & {
6
- name: string;
7
- decimalScale?: number;
8
- fixedDecimalScale?: boolean;
9
- prefix?: string;
10
- allowNegative?: boolean;
11
- minValue?: number;
12
- maxValue?: number;
13
- maxLength?: number;
14
- value?: number | null | undefined;
15
- onChange?: (e: {
16
- target: {
17
- name: string;
18
- value: number | undefined;
19
- };
20
- event: SourceInfo;
21
- }) => void;
22
- };
2
+ import { NumberInputProps } from '../../types/numberInputProps.js';
3
+ import 'react-number-format';
4
+ import '@mui/material/TextField';
23
5
 
24
6
  declare const NumberInput: react.ForwardRefExoticComponent<Omit<NumberInputProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
25
7
 
@@ -1,18 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
- import { DatePickerProps as DatePickerProps$1 } from '@mui/x-date-pickers-pro';
4
- import { Dayjs } from 'dayjs';
5
- import { BaseField } from '../../../types/baseField.js';
2
+ import { DatePickerProps } from '../../../types/datePickerProps.js';
3
+ import 'react';
4
+ import '@mui/x-date-pickers-pro';
5
+ import 'dayjs';
6
+ import '../../../types/baseField.js';
6
7
  import 'react-hook-form';
7
8
 
8
- type DatePickerProps = BaseField<Omit<DatePickerProps$1<Dayjs>, 'value' | 'onChange'>> & {
9
- tabIndex?: number;
10
- helperText?: ReactNode;
11
- required?: boolean;
12
- value?: Date | null | undefined;
13
- onChange?(value: Date | null | undefined): void;
14
- };
15
-
16
9
  declare const DatePicker: ({ name, rules, tabIndex, helperText, required, ...other }: DatePickerProps) => react_jsx_runtime.JSX.Element;
17
10
 
18
11
  export { DatePicker as default };
@@ -1,22 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
- import { DateRangePickerProps as DateRangePickerProps$1 } from '@mui/x-date-pickers-pro';
4
- import { Dayjs } from 'dayjs';
5
- import { BaseField } from '../../../types/baseField.js';
2
+ import { DateRangePickerProps } from '../../../types/dateRangePickerProps.js';
3
+ import 'react';
4
+ import '@mui/x-date-pickers-pro';
5
+ import 'dayjs';
6
+ import '../../../types/baseField.js';
6
7
  import 'react-hook-form';
7
8
 
8
- type DateRange = {
9
- startDate?: Date | null | undefined;
10
- endDate?: Date | null | undefined;
11
- };
12
- type DateRangePickerProps = BaseField<Omit<DateRangePickerProps$1<Dayjs>, 'value' | 'onChange'>> & {
13
- value?: DateRange;
14
- onChange?(value?: DateRange): void;
15
- tabIndex?: number;
16
- helperText?: ReactNode;
17
- required?: boolean;
18
- };
19
-
20
9
  declare const DateRangePicker: ({ name, label, rules, tabIndex, helperText, required, ...other }: DateRangePickerProps) => react_jsx_runtime.JSX.Element;
21
10
 
22
11
  export { DateRangePicker as default };
@@ -1,18 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
- import { DateTimePickerProps as DateTimePickerProps$1 } from '@mui/x-date-pickers-pro';
4
- import { Dayjs } from 'dayjs';
5
- import { BaseField } from '../../../types/baseField.js';
2
+ import { DateTimePickerProps } from '../../../types/dateTimePickerProps.js';
3
+ import 'react';
4
+ import '@mui/x-date-pickers-pro';
5
+ import 'dayjs';
6
+ import '../../../types/baseField.js';
6
7
  import 'react-hook-form';
7
8
 
8
- type DateTimePickerProps = BaseField<Omit<DateTimePickerProps$1<Dayjs>, 'value' | 'onChange'>> & {
9
- tabIndex?: number;
10
- helperText?: ReactNode;
11
- required?: boolean;
12
- value?: Date | null | undefined;
13
- onChange?(value: Date | null | undefined): void;
14
- };
15
-
16
9
  declare const DateTimePicker: ({ name, rules, tabIndex, helperText, required, ...other }: DateTimePickerProps) => react_jsx_runtime.JSX.Element;
17
10
 
18
11
  export { DateTimePicker as default };
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ import { DatePickerProps as DatePickerProps$1 } from '@mui/x-date-pickers-pro';
3
+ import { Dayjs } from 'dayjs';
4
+ import { BaseField } from './baseField.js';
5
+ import 'react-hook-form';
6
+
7
+ type DatePickerProps = BaseField<Omit<DatePickerProps$1<Dayjs>, 'value' | 'onChange'>> & {
8
+ tabIndex?: number;
9
+ helperText?: ReactNode;
10
+ required?: boolean;
11
+ value?: Date | null | undefined;
12
+ onChange?(value: Date | null | undefined): void;
13
+ };
14
+
15
+ export { DatePickerProps };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ import { DateRangePickerProps as DateRangePickerProps$1 } from '@mui/x-date-pickers-pro';
3
+ import { Dayjs } from 'dayjs';
4
+ import { BaseField } from './baseField.js';
5
+ import 'react-hook-form';
6
+
7
+ type DateRange = {
8
+ startDate?: Date | null | undefined;
9
+ endDate?: Date | null | undefined;
10
+ };
11
+ type DateRangePickerProps = BaseField<Omit<DateRangePickerProps$1<Dayjs>, 'value' | 'onChange'>> & {
12
+ value?: DateRange;
13
+ onChange?(value?: DateRange): void;
14
+ tabIndex?: number;
15
+ helperText?: ReactNode;
16
+ required?: boolean;
17
+ };
18
+
19
+ export { DateRangePickerProps };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ import { DateTimePickerProps as DateTimePickerProps$1 } from '@mui/x-date-pickers-pro';
3
+ import { Dayjs } from 'dayjs';
4
+ import { BaseField } from './baseField.js';
5
+ import 'react-hook-form';
6
+
7
+ type DateTimePickerProps = BaseField<Omit<DateTimePickerProps$1<Dayjs>, 'value' | 'onChange'>> & {
8
+ tabIndex?: number;
9
+ helperText?: ReactNode;
10
+ required?: boolean;
11
+ value?: Date | null | undefined;
12
+ onChange?(value: Date | null | undefined): void;
13
+ };
14
+
15
+ export { DateTimePickerProps };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,23 @@
1
+ import { SourceInfo } from 'react-number-format';
2
+ import { TextFieldProps } from '@mui/material/TextField';
3
+
4
+ type NumberInputProps = Omit<TextFieldProps, 'onChange'> & {
5
+ name: string;
6
+ decimalScale?: number;
7
+ fixedDecimalScale?: boolean;
8
+ prefix?: string;
9
+ allowNegative?: boolean;
10
+ minValue?: number;
11
+ maxValue?: number;
12
+ maxLength?: number;
13
+ value?: number | null | undefined;
14
+ onChange?: (e: {
15
+ target: {
16
+ name: string;
17
+ value: number | undefined;
18
+ };
19
+ event: SourceInfo;
20
+ }) => void;
21
+ };
22
+
23
+ export { NumberInputProps };
@@ -0,0 +1 @@
1
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.0.26",
3
+ "version": "2.0.27",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",