@opengeoweb/sigmet-airmet 4.7.1 → 4.8.0
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/index.esm.js +21 -20
- package/index.umd.js +19 -18
- package/lib/components/ProductList/ProductList.stories.d.ts +1 -0
- package/package.json +8 -8
package/index.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { FormControlLabel, Radio, Grid, Typography, Box, Button, Checkbox, MenuItem, FormHelperText, useTheme, Dialog, DialogTitle, DialogContent, Card, List, ListItem,
|
|
3
|
+
import { FormControlLabel, Radio, Grid, Typography, Box, Button, Checkbox, MenuItem, FormHelperText, useTheme, Dialog, DialogTitle, DialogContent, Card, LinearProgress, List, ListItem, Backdrop, CircularProgress } from '@mui/material';
|
|
4
4
|
import { useFormContext } from 'react-hook-form';
|
|
5
|
-
import { ReactHookFormRadioGroup, ReactHookFormSelect, ReactHookFormNumberField, isInteger, isValidMax, isValidMin, isEmpty, ReactHookFormDateTime, isValidDate, isBefore, isBetween, hasMaxFeaturePoints, hasMulitpleIntersections, ReactHookFormHiddenInput, isMaximumOneDrawing, hasIntersectionWithFIR, isValidGeoJsonCoordinates, isXHoursBefore, isAfter, isXHoursAfter, ReactHookFormTextField,
|
|
5
|
+
import { ReactHookFormRadioGroup, ReactHookFormSelect, ReactHookFormNumberField, isInteger, isValidMax, isValidMin, isEmpty, ReactHookFormDateTime, isValidDate, isBefore, isBetween, hasMaxFeaturePoints, hasMulitpleIntersections, ReactHookFormHiddenInput, isMaximumOneDrawing, hasIntersectionWithFIR, isValidGeoJsonCoordinates, isXHoursBefore, isAfter, isXHoursAfter, ReactHookFormTextField, isLatitude, isNonOrBothCoordinates, isLongitude, errorMessages, ReactHookFormFormControl, isGeometryDirty, ReactHookFormProvider, defaultFormOptions } from '@opengeoweb/form-fields';
|
|
6
6
|
import { useApiContext, useApi, createApiInstance } from '@opengeoweb/api';
|
|
7
7
|
import produce, { produce as produce$1 } from 'immer';
|
|
8
8
|
import * as turf from '@turf/turf';
|
|
@@ -1775,15 +1775,14 @@ var Levels = function Levels(_ref) {
|
|
|
1775
1775
|
reset(Object.assign(Object.assign({}, currentValues), {
|
|
1776
1776
|
level: {
|
|
1777
1777
|
unit: 'FL',
|
|
1778
|
-
value:
|
|
1778
|
+
value: null
|
|
1779
1779
|
}
|
|
1780
1780
|
}), {
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
isValid: false
|
|
1781
|
+
keepErrors: true,
|
|
1782
|
+
keepDirty: true,
|
|
1783
|
+
keepIsSubmitted: false,
|
|
1784
|
+
keepTouched: false,
|
|
1785
|
+
keepIsValid: false
|
|
1787
1786
|
}); // Clear out errors for the levels
|
|
1788
1787
|
|
|
1789
1788
|
clearErrors(['level', 'lowerLevel']);
|
|
@@ -2348,7 +2347,7 @@ var StartGeometry = function StartGeometry(_ref) {
|
|
|
2348
2347
|
setDrawModeType = _ref.setDrawModeType;
|
|
2349
2348
|
|
|
2350
2349
|
var _useFormContext = useFormContext(),
|
|
2351
|
-
errors = _useFormContext.errors,
|
|
2350
|
+
errors = _useFormContext.formState.errors,
|
|
2352
2351
|
watch = _useFormContext.watch;
|
|
2353
2352
|
|
|
2354
2353
|
var _useDraftFormHelpers = useDraftFormHelpers(),
|
|
@@ -2476,7 +2475,7 @@ var Progress = function Progress(_ref) {
|
|
|
2476
2475
|
watch = _useFormContext.watch,
|
|
2477
2476
|
getValues = _useFormContext.getValues,
|
|
2478
2477
|
trigger = _useFormContext.trigger,
|
|
2479
|
-
errors = _useFormContext.errors;
|
|
2478
|
+
errors = _useFormContext.formState.errors;
|
|
2480
2479
|
|
|
2481
2480
|
var _useDraftFormHelpers = useDraftFormHelpers(),
|
|
2482
2481
|
isRequired = _useDraftFormHelpers.isRequired,
|
|
@@ -3014,7 +3013,6 @@ var VolcanicFields = function VolcanicFields(_ref) {
|
|
|
3014
3013
|
rules: {
|
|
3015
3014
|
required: false,
|
|
3016
3015
|
validate: {
|
|
3017
|
-
containsNoCommas: containsNoCommas,
|
|
3018
3016
|
isLatitude: isLatitude,
|
|
3019
3017
|
isNonOrBothCoordinates: function isNonOrBothCoordinates$1(value) {
|
|
3020
3018
|
return isNonOrBothCoordinates(value, getValues('vaSigmetVolcanoCoordinates.longitude'));
|
|
@@ -3039,7 +3037,6 @@ var VolcanicFields = function VolcanicFields(_ref) {
|
|
|
3039
3037
|
rules: {
|
|
3040
3038
|
required: false,
|
|
3041
3039
|
validate: {
|
|
3042
|
-
containsNoCommas: containsNoCommas,
|
|
3043
3040
|
isLongitude: isLongitude,
|
|
3044
3041
|
isNonOrBothCoordinates: function isNonOrBothCoordinates$1(value) {
|
|
3045
3042
|
return isNonOrBothCoordinates(value, getValues('vaSigmetVolcanoCoordinates.latitude'));
|
|
@@ -4922,7 +4919,14 @@ var ProductList = function ProductList(_ref) {
|
|
|
4922
4919
|
width: '100%',
|
|
4923
4920
|
minHeight: '600px'
|
|
4924
4921
|
}
|
|
4925
|
-
},
|
|
4922
|
+
}, isLoading && /*#__PURE__*/React__default.createElement(LinearProgress, {
|
|
4923
|
+
"data-testid": "productlist-loadingbar",
|
|
4924
|
+
color: "secondary",
|
|
4925
|
+
sx: {
|
|
4926
|
+
marginTop: '28px',
|
|
4927
|
+
marginBottom: '-32px'
|
|
4928
|
+
}
|
|
4929
|
+
}), error && /*#__PURE__*/React__default.createElement(AlertBanner, {
|
|
4926
4930
|
severity: "error",
|
|
4927
4931
|
title: "An error has occurred while retrieving the list, please try again",
|
|
4928
4932
|
info: error.message ? error.message : '',
|
|
@@ -4948,11 +4952,7 @@ var ProductList = function ProductList(_ref) {
|
|
|
4948
4952
|
product: product,
|
|
4949
4953
|
productType: productType
|
|
4950
4954
|
}));
|
|
4951
|
-
}))
|
|
4952
|
-
"data-testid": "productList-skeleton",
|
|
4953
|
-
variant: "rectangular",
|
|
4954
|
-
height: "660px"
|
|
4955
|
-
})));
|
|
4955
|
+
}))));
|
|
4956
4956
|
};
|
|
4957
4957
|
|
|
4958
4958
|
/* *
|
|
@@ -5040,7 +5040,8 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
|
|
|
5040
5040
|
formState = _useFormContext.formState,
|
|
5041
5041
|
watch = _useFormContext.watch;
|
|
5042
5042
|
|
|
5043
|
-
var
|
|
5043
|
+
var dirtyFields = formState.dirtyFields;
|
|
5044
|
+
var isDirty = Object.keys(dirtyFields).length > 0;
|
|
5044
5045
|
|
|
5045
5046
|
var _useDraftFormHelpers = useDraftFormHelpers(),
|
|
5046
5047
|
toggleIsDraft = _useDraftFormHelpers.toggleIsDraft,
|
package/index.umd.js
CHANGED
|
@@ -1768,15 +1768,14 @@
|
|
|
1768
1768
|
reset(__assign(__assign({}, currentValues), {
|
|
1769
1769
|
level: {
|
|
1770
1770
|
unit: 'FL',
|
|
1771
|
-
value:
|
|
1771
|
+
value: null
|
|
1772
1772
|
}
|
|
1773
1773
|
}), {
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
isValid: false
|
|
1774
|
+
keepErrors: true,
|
|
1775
|
+
keepDirty: true,
|
|
1776
|
+
keepIsSubmitted: false,
|
|
1777
|
+
keepTouched: false,
|
|
1778
|
+
keepIsValid: false
|
|
1780
1779
|
}); // Clear out errors for the levels
|
|
1781
1780
|
|
|
1782
1781
|
clearErrors(['level', 'lowerLevel']);
|
|
@@ -2321,7 +2320,7 @@
|
|
|
2321
2320
|
setDrawModeType = _a.setDrawModeType;
|
|
2322
2321
|
|
|
2323
2322
|
var _c = reactHookForm.useFormContext(),
|
|
2324
|
-
errors = _c.errors,
|
|
2323
|
+
errors = _c.formState.errors,
|
|
2325
2324
|
watch = _c.watch;
|
|
2326
2325
|
|
|
2327
2326
|
var isDraft = shared.useDraftFormHelpers().isDraft;
|
|
@@ -2447,7 +2446,7 @@
|
|
|
2447
2446
|
watch = _e.watch,
|
|
2448
2447
|
getValues = _e.getValues,
|
|
2449
2448
|
trigger = _e.trigger,
|
|
2450
|
-
errors = _e.errors;
|
|
2449
|
+
errors = _e.formState.errors;
|
|
2451
2450
|
|
|
2452
2451
|
var _f = shared.useDraftFormHelpers(),
|
|
2453
2452
|
isRequired = _f.isRequired,
|
|
@@ -2950,7 +2949,6 @@
|
|
|
2950
2949
|
rules: {
|
|
2951
2950
|
required: false,
|
|
2952
2951
|
validate: {
|
|
2953
|
-
containsNoCommas: formFields.containsNoCommas,
|
|
2954
2952
|
isLatitude: formFields.isLatitude,
|
|
2955
2953
|
isNonOrBothCoordinates: function isNonOrBothCoordinates(value) {
|
|
2956
2954
|
return formFields.isNonOrBothCoordinates(value, getValues('vaSigmetVolcanoCoordinates.longitude'));
|
|
@@ -2975,7 +2973,6 @@
|
|
|
2975
2973
|
rules: {
|
|
2976
2974
|
required: false,
|
|
2977
2975
|
validate: {
|
|
2978
|
-
containsNoCommas: formFields.containsNoCommas,
|
|
2979
2976
|
isLongitude: formFields.isLongitude,
|
|
2980
2977
|
isNonOrBothCoordinates: function isNonOrBothCoordinates(value) {
|
|
2981
2978
|
return formFields.isNonOrBothCoordinates(value, getValues('vaSigmetVolcanoCoordinates.latitude'));
|
|
@@ -4822,7 +4819,14 @@
|
|
|
4822
4819
|
width: '100%',
|
|
4823
4820
|
minHeight: '600px'
|
|
4824
4821
|
}
|
|
4825
|
-
},
|
|
4822
|
+
}, isLoading && /*#__PURE__*/React__default["default"].createElement(material.LinearProgress, {
|
|
4823
|
+
"data-testid": "productlist-loadingbar",
|
|
4824
|
+
color: "secondary",
|
|
4825
|
+
sx: {
|
|
4826
|
+
marginTop: '28px',
|
|
4827
|
+
marginBottom: '-32px'
|
|
4828
|
+
}
|
|
4829
|
+
}), error && /*#__PURE__*/React__default["default"].createElement(shared.AlertBanner, {
|
|
4826
4830
|
severity: "error",
|
|
4827
4831
|
title: "An error has occurred while retrieving the list, please try again",
|
|
4828
4832
|
info: error.message ? error.message : '',
|
|
@@ -4848,11 +4852,7 @@
|
|
|
4848
4852
|
product: product,
|
|
4849
4853
|
productType: productType
|
|
4850
4854
|
}));
|
|
4851
|
-
}))
|
|
4852
|
-
"data-testid": "productList-skeleton",
|
|
4853
|
-
variant: "rectangular",
|
|
4854
|
-
height: "660px"
|
|
4855
|
-
})));
|
|
4855
|
+
}))));
|
|
4856
4856
|
};
|
|
4857
4857
|
|
|
4858
4858
|
/* *
|
|
@@ -4932,7 +4932,8 @@
|
|
|
4932
4932
|
formState = _b.formState,
|
|
4933
4933
|
watch = _b.watch;
|
|
4934
4934
|
|
|
4935
|
-
var
|
|
4935
|
+
var dirtyFields = formState.dirtyFields;
|
|
4936
|
+
var isDirty = Object.keys(dirtyFields).length > 0;
|
|
4936
4937
|
|
|
4937
4938
|
var _c = shared.useDraftFormHelpers(),
|
|
4938
4939
|
toggleIsDraft = _c.toggleIsDraft,
|
|
@@ -4,6 +4,7 @@ declare const _default: {
|
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const SigmetListDemo: () => React.ReactElement;
|
|
7
|
+
export declare const SigmetListLoading: () => React.ReactElement;
|
|
7
8
|
export declare const SigmetListDemoSnapshot: {
|
|
8
9
|
(): React.ReactElement;
|
|
9
10
|
storyName: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,24 +14,24 @@
|
|
|
14
14
|
"react": "^17.0.2",
|
|
15
15
|
"react-redux": "^8.0.4",
|
|
16
16
|
"@mui/material": "^5.10.8",
|
|
17
|
-
"@opengeoweb/shared": "4.
|
|
18
|
-
"@opengeoweb/theme": "4.
|
|
17
|
+
"@opengeoweb/shared": "4.8.0",
|
|
18
|
+
"@opengeoweb/theme": "4.8.0",
|
|
19
19
|
"react-draggable": "^4.4.5",
|
|
20
20
|
"re-resizable": "^6.9.0",
|
|
21
21
|
"@redux-eggs/core": "^2.2.0",
|
|
22
|
-
"@opengeoweb/form-fields": "4.
|
|
23
|
-
"react-hook-form": "^
|
|
22
|
+
"@opengeoweb/form-fields": "4.8.0",
|
|
23
|
+
"react-hook-form": "^7.41.5",
|
|
24
24
|
"moment": "^2.29.0",
|
|
25
25
|
"moment-timezone": "^0.5.31",
|
|
26
26
|
"@mui/x-date-pickers": "^5.0.4",
|
|
27
27
|
"lodash": "^4.17.20",
|
|
28
28
|
"axios": "^0.25.0",
|
|
29
29
|
"date-fns": "^2.29.3",
|
|
30
|
-
"@opengeoweb/core": "4.
|
|
31
|
-
"@opengeoweb/webmap": "4.
|
|
30
|
+
"@opengeoweb/core": "4.8.0",
|
|
31
|
+
"@opengeoweb/webmap": "4.8.0",
|
|
32
32
|
"throttle-debounce": "^3.0.1",
|
|
33
33
|
"proj4": "^2.6.2",
|
|
34
|
-
"@opengeoweb/api": "4.
|
|
34
|
+
"@opengeoweb/api": "4.8.0",
|
|
35
35
|
"react-intl": "^5.17.5",
|
|
36
36
|
"react-sortablejs": "^6.1.4",
|
|
37
37
|
"sortablejs": "^1.15.0",
|