@opengeoweb/form-fields 4.7.1 → 4.9.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.
@@ -6,5 +6,6 @@ interface ReactHookFormFormControlProps extends FormControlProps {
6
6
  errors?: FieldErrors;
7
7
  isReadOnly?: boolean;
8
8
  }
9
+ export declare const getErrorMessage: (errors: FieldErrors) => string;
9
10
  declare const ReactHookFormFormControl: React.FC<ReactHookFormFormControlProps>;
10
11
  export default ReactHookFormFormControl;
@@ -2,8 +2,7 @@ import * as React from 'react';
2
2
  import { TextFieldProps } from '@mui/material';
3
3
  import { ReactHookFormInput } from './types';
4
4
  declare type InputMode = 'numeric' | 'decimal';
5
- export declare const convertNumericInputValue: (value: string, inputMode: InputMode) => number | string;
6
- export declare const parseInput: (value?: string | number | null | undefined) => string;
5
+ export declare const convertNumericInputValue: (value: string, inputMode: InputMode) => number | null;
7
6
  export declare const getAllowedKeys: (inputMode?: InputMode) => string[];
8
7
  declare type ReactHookFormNumberFieldProps = Partial<TextFieldProps> & ReactHookFormInput<{
9
8
  inputMode?: InputMode;
@@ -1,20 +1,9 @@
1
1
  import React from 'react';
2
- import { UseFormOptions } from 'react-hook-form';
2
+ import { UseFormProps } from 'react-hook-form';
3
3
  interface WrapperProps {
4
4
  children: React.ReactNode;
5
- options?: UseFormOptions;
5
+ options?: UseFormProps;
6
6
  }
7
- export declare const defaultFormOptions: Partial<{
8
- mode: keyof import("react-hook-form").ValidationMode;
9
- reValidateMode: "onBlur" | "onChange" | "onSubmit";
10
- defaultValues: {
11
- [x: string]: any;
12
- };
13
- resolver: import("react-hook-form").Resolver<import("react-hook-form").FieldValues, object>;
14
- context: object;
15
- shouldFocusError: boolean;
16
- shouldUnregister: boolean;
17
- criteriaMode: "all" | "firstError";
18
- }>;
7
+ export declare const defaultFormOptions: UseFormProps;
19
8
  declare const ReactHookFormProviderWrapper: React.FC<WrapperProps>;
20
9
  export default ReactHookFormProviderWrapper;
@@ -7,5 +7,5 @@ export { default as ReactHookFormDateTime } from './ReactHookFormDateTime';
7
7
  export { default as ReactHookFormProvider } from './ReactHookFormProvider';
8
8
  export { default as ReactHookFormHiddenInput } from './ReactHookFormHiddenInput';
9
9
  export { defaultFormOptions } from './ReactHookFormProvider';
10
- export { errorMessages, isMaximumOneDrawing, isGeometryDirty, isValidGeoJsonCoordinates, hasIntersectionWithFIR, isValidMax, isValidMin, isInteger, isAfter, isBefore, isBetween, isValidDate, hasMaxFeaturePoints, hasMulitpleIntersections, isXHoursBefore, isXHoursAfter, isLatitude, isLongitude, isNonOrBothCoordinates, containsNoCommas, isEmpty, } from './utils';
10
+ export { errorMessages, isMaximumOneDrawing, isGeometryDirty, isValidGeoJsonCoordinates, hasIntersectionWithFIR, isValidMax, isValidMin, isInteger, isAfter, isBefore, isBetween, isValidDate, hasMaxFeaturePoints, hasMulitpleIntersections, isXHoursBefore, isXHoursAfter, isLatitude, isLongitude, isNonOrBothCoordinates, isEmpty, } from './utils';
11
11
  export { getDeepProperty } from './formUtils';
@@ -1,4 +1,7 @@
1
1
  import moment from 'moment';
2
+ export declare const defaultProps: {
3
+ shouldUnregister: boolean;
4
+ };
2
5
  export declare const errorMessages: {
3
6
  required: string;
4
7
  isValidDate: string;
@@ -14,7 +17,6 @@ export declare const errorMessages: {
14
17
  isNonOrBothCoordinates: string;
15
18
  isInteger: string;
16
19
  isNumeric: string;
17
- containsNoCommas: string;
18
20
  minVisibility: string;
19
21
  maxVisibility: string;
20
22
  };
@@ -39,4 +41,3 @@ export declare const isGeometryDirty: (geoJSON?: import("geojson").FeatureCollec
39
41
  export declare const isInteger: (value: number) => boolean;
40
42
  export declare const isNumeric: (value: any) => boolean;
41
43
  export declare const isNonOrBothCoordinates: (coordinate?: number | null | undefined, otherCoordinate?: number | null | undefined) => boolean;
42
- export declare const containsNoCommas: (val: string | number) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/form-fields",
3
- "version": "4.7.1",
3
+ "version": "4.9.1",
4
4
  "description": "GeoWeb form-fields library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -12,10 +12,10 @@
12
12
  "typings": "./index.d.ts",
13
13
  "dependencies": {},
14
14
  "peerDependencies": {
15
- "react-hook-form": "^6.12.1",
15
+ "react-hook-form": "^7.41.5",
16
16
  "react": "^17.0.2",
17
17
  "@mui/material": "^5.10.8",
18
- "@opengeoweb/theme": "4.7.1",
18
+ "@opengeoweb/theme": "4.9.1",
19
19
  "moment": "^2.29.0",
20
20
  "moment-timezone": "^0.5.31",
21
21
  "@mui/x-date-pickers": "^5.0.4",