@opengeoweb/form-fields 6.0.0 → 6.0.2

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/package.json CHANGED
@@ -1,25 +1,24 @@
1
1
  {
2
2
  "name": "@opengeoweb/form-fields",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "GeoWeb form-fields library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
- "module": "./index.js",
11
- "main": "./index.js",
10
+ "module": "./index.esm.js",
12
11
  "type": "module",
13
- "types": "./src/index.d.ts",
12
+ "main": "./index.esm.js",
14
13
  "dependencies": {},
15
14
  "peerDependencies": {
16
15
  "@mui/material": "5.12.0",
17
16
  "@mui/x-date-pickers": "6.2.1",
18
- "@opengeoweb/theme": "6.0.0",
17
+ "@opengeoweb/theme": "6.0.2",
19
18
  "lodash": "4.17.21",
20
19
  "moment": "2.29.4",
21
20
  "moment-timezone": "0.5.43",
22
21
  "react": "18.2.0",
23
- "react-hook-form": "7.45.2"
22
+ "react-hook-form": "7.45.4"
24
23
  }
25
24
  }
@@ -5,7 +5,7 @@ import { DateTimePickerProps, DateTimePickerSlotsComponentsProps } from '@mui/x-
5
5
  import { ReactHookFormInput } from './types';
6
6
  export declare const temporaryStripChineseCharacters: (dirtyString: string) => string;
7
7
  export declare const getFormattedValue: (value: Moment | string) => string | Moment;
8
- declare type ReactHookKeyboardDateTimePickerProps = DateTimePickerProps<Moment> & DateTimePickerSlotsComponentsProps<Moment> & ReactHookFormInput<{
8
+ type ReactHookKeyboardDateTimePickerProps = DateTimePickerProps<Moment> & DateTimePickerSlotsComponentsProps<Moment> & ReactHookFormInput<{
9
9
  defaultNullValue?: string | null;
10
10
  value?: string;
11
11
  onChange?: (value: string | Moment) => void;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ReactHookFormInput } from './types';
3
- declare type ReactHookFormHiddenInputProps = ReactHookFormInput<{
3
+ type ReactHookFormHiddenInputProps = ReactHookFormInput<{
4
4
  defaultValue?: unknown;
5
5
  }>;
6
6
  declare const ReactHookFormHiddenInput: React.FC<ReactHookFormHiddenInputProps>;
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { TextFieldProps } from '@mui/material';
3
3
  import { ReactHookFormInput } from './types';
4
- declare type InputMode = 'numeric' | 'decimal';
4
+ type InputMode = 'numeric' | 'decimal';
5
5
  export declare const convertNumericInputValue: (value: string, inputMode: InputMode) => number | null;
6
6
  export declare const getAllowedKeys: (inputMode?: InputMode) => string[];
7
- declare type ReactHookFormNumberFieldProps = Partial<TextFieldProps> & ReactHookFormInput<{
7
+ type ReactHookFormNumberFieldProps = Partial<TextFieldProps> & ReactHookFormInput<{
8
8
  inputMode?: InputMode;
9
9
  }>;
10
10
  declare const ReactHookFormNumberField: React.FC<ReactHookFormNumberFieldProps>;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { RadioGroupProps } from '@mui/material';
3
3
  import { ReactHookFormInput } from './types';
4
- declare type ReactHookFormRadioGroupProps = Partial<RadioGroupProps> & ReactHookFormInput<{
4
+ type ReactHookFormRadioGroupProps = Partial<RadioGroupProps> & ReactHookFormInput<{
5
5
  disabled?: boolean;
6
6
  children?: React.ReactNode;
7
7
  }>;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { SelectProps } from '@mui/material';
3
3
  import { ReactHookFormInput } from './types';
4
- declare type ReactHookFormSelectProps = Partial<SelectProps> & ReactHookFormInput<{
4
+ type ReactHookFormSelectProps = Partial<SelectProps> & ReactHookFormInput<{
5
5
  onChange?: (value: React.ChangeEvent<HTMLInputElement>) => void;
6
6
  }>;
7
7
  declare const ReactHookFormSelect: React.FC<ReactHookFormSelectProps>;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { TextFieldProps } from '@mui/material';
3
3
  import { ReactHookFormInput } from './types';
4
4
  export declare const convertTextInputValue: (value: string, inCapitals: boolean) => number | string;
5
- declare type ReactHookFormTextFieldProps = Partial<TextFieldProps> & ReactHookFormInput<{
5
+ type ReactHookFormTextFieldProps = Partial<TextFieldProps> & ReactHookFormInput<{
6
6
  upperCase?: boolean;
7
7
  }>;
8
8
  declare const ReactHookFormTextField: React.FC<ReactHookFormTextFieldProps>;
@@ -1,5 +1,5 @@
1
1
  import { RegisterOptions } from 'react-hook-form';
2
- export declare type ReactHookFormInput<T> = T & {
2
+ export type ReactHookFormInput<T> = T & {
3
3
  name: string;
4
4
  label?: string;
5
5
  rules?: RegisterOptions;
@@ -1,4 +1,4 @@
1
- import moment from 'moment';
1
+ import { Moment } from 'moment';
2
2
  export declare const defaultProps: {
3
3
  shouldUnregister: boolean;
4
4
  };
@@ -18,24 +18,24 @@ export declare const errorMessages: {
18
18
  isInteger: string;
19
19
  isNumeric: string;
20
20
  };
21
- export declare const isEmpty: (value?: string | number | null | undefined) => boolean;
22
- export declare const isValidDate: (value?: string | moment.Moment | null | undefined) => boolean;
21
+ export declare const isEmpty: (value?: number | string | null) => boolean;
22
+ export declare const isValidDate: (value?: Moment | string | null) => boolean;
23
23
  export declare const isBefore: (ownDate: string, referenceDate: string) => boolean;
24
24
  export declare const isAfter: (ownDate: string, otherDate: string) => boolean;
25
25
  export declare const isBetween: (ownDate: string, otherDateStart: string, otherDateEnd: string) => boolean;
26
26
  export declare const isXHoursBefore: (ownDate: string, otherDate: string, hours?: number) => boolean;
27
27
  export declare const isXHoursAfter: (ownDate: string, otherDate: string, hours?: number) => boolean;
28
- export declare const isLatitude: (lat?: number | null | undefined) => boolean;
29
- export declare const isLongitude: (lng?: number | null | undefined) => boolean;
28
+ export declare const isLatitude: (lat?: number | null) => boolean;
29
+ export declare const isLongitude: (lng?: number | null) => boolean;
30
30
  export declare const isValidMax: (value: number, maxValue: number | null) => boolean;
31
31
  export declare const isValidMin: (value: number, minValue: number | null) => boolean;
32
- export declare const hasValidGeometry: (geojson?: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties> | null | undefined) => boolean;
32
+ export declare const hasValidGeometry: (geojson?: GeoJSON.FeatureCollection | null) => boolean;
33
33
  export declare const isValidGeoJsonCoordinates: (geojson: GeoJSON.FeatureCollection) => boolean;
34
34
  export declare const isMaximumOneDrawing: (geojson: GeoJSON.FeatureCollection) => boolean;
35
35
  export declare const hasIntersectionWithFIR: (geojson: GeoJSON.FeatureCollection, intersection: GeoJSON.FeatureCollection) => boolean;
36
36
  export declare const hasMaxFeaturePoints: (geojson: GeoJSON.FeatureCollection, maxPoints?: number) => boolean;
37
37
  export declare const hasMulitpleIntersections: (geojson: GeoJSON.FeatureCollection) => boolean;
38
- export declare const isGeometryDirty: (geoJSON?: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties> | null | undefined, formGeoJSON?: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties> | null | undefined) => boolean;
38
+ export declare const isGeometryDirty: (geoJSON?: GeoJSON.FeatureCollection | null, formGeoJSON?: GeoJSON.FeatureCollection | null) => boolean;
39
39
  export declare const isInteger: (value: number) => boolean;
40
40
  export declare const isNumeric: (value: any) => boolean;
41
- export declare const isNonOrBothCoordinates: (coordinate?: number | null | undefined, otherCoordinate?: number | null | undefined) => boolean;
41
+ export declare const isNonOrBothCoordinates: (coordinate?: number | null, otherCoordinate?: number | null) => boolean;