@opengeoweb/sigmet-airmet 4.6.1 → 4.7.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 +29 -44
- package/index.umd.js +26 -45
- package/lib/components/MapViewGeoJson/utils.d.ts +2 -2
- package/package.json +8 -7
package/index.esm.js
CHANGED
|
@@ -12,7 +12,7 @@ import { Location, DrawRegion, DrawPolygon, DrawFIRLand, Delete, ChevronLeft, Ed
|
|
|
12
12
|
import moment from 'moment';
|
|
13
13
|
import { debounce } from 'lodash';
|
|
14
14
|
import { useDispatch, useSelector, shallowEqual } from 'react-redux';
|
|
15
|
-
import { mapTypes, mapSelectors, generateMapId, generateTimesliderId, SyncGroups, generateLayerId, mapActions, publicLayers, MapControls, LayerManagerMapButtonConnect, LegendMapButtonConnect, MultiDimensionSelectMapButtonsConnect, MapViewConnect, MapViewLayer, TimeSliderConnect, LegendConnect } from '@opengeoweb/core';
|
|
15
|
+
import { mapTypes, mapSelectors, generateMapId, generateTimesliderId, SyncGroups, generateLayerId, mapActions, publicLayers, MapControls, LayerManagerMapButtonConnect, LegendMapButtonConnect, MultiDimensionSelectMapButtonsConnect, MapViewConnect, MapViewLayer, TimeSliderConnect, LegendConnect, DockedLayerManagerConnect } from '@opengeoweb/core';
|
|
16
16
|
|
|
17
17
|
function _typeof(obj) {
|
|
18
18
|
"@babel/helpers - typeof";
|
|
@@ -259,7 +259,8 @@ var features = [
|
|
|
259
259
|
FIRname: "AMSTERDAM FIR",
|
|
260
260
|
StateCode: "NLD",
|
|
261
261
|
centlat: 52.8618788,
|
|
262
|
-
ICAOCODE: "EHAA"
|
|
262
|
+
ICAOCODE: "EHAA",
|
|
263
|
+
selectionType: "fir"
|
|
263
264
|
}
|
|
264
265
|
}
|
|
265
266
|
];
|
|
@@ -650,9 +651,7 @@ var addFeatureProperties = function addFeatureProperties(geojson, featurePropert
|
|
|
650
651
|
});
|
|
651
652
|
};
|
|
652
653
|
|
|
653
|
-
var useDrawMode = function useDrawMode() {
|
|
654
|
-
var initialGeometry = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
655
|
-
|
|
654
|
+
var useDrawMode = function useDrawMode(initialGeometry) {
|
|
656
655
|
var getInitialLayerDrawModes = function getInitialLayerDrawModes(startorEnd) {
|
|
657
656
|
return initialGeometry && initialGeometry[startorEnd] ? getDrawModeFromSelectionType(initialGeometry[startorEnd].features[0].properties.selectionType) : null;
|
|
658
657
|
};
|
|
@@ -681,10 +680,10 @@ var useDrawMode = function useDrawMode() {
|
|
|
681
680
|
|
|
682
681
|
var _React$useState5 = React.useState(function () {
|
|
683
682
|
return {
|
|
684
|
-
start: addFeatureProperties(initialGeometry
|
|
685
|
-
end: addFeatureProperties(initialGeometry
|
|
686
|
-
intersectionStart: addFeatureProperties(initialGeometry
|
|
687
|
-
intersectionEnd: addFeatureProperties(initialGeometry
|
|
683
|
+
start: addFeatureProperties(initialGeometry === null || initialGeometry === void 0 ? void 0 : initialGeometry.start, featurePropsStart),
|
|
684
|
+
end: addFeatureProperties(initialGeometry === null || initialGeometry === void 0 ? void 0 : initialGeometry.end, featurePropsEnd),
|
|
685
|
+
intersectionStart: addFeatureProperties(initialGeometry === null || initialGeometry === void 0 ? void 0 : initialGeometry.intersectionStart, featurePropsIntersectionStart),
|
|
686
|
+
intersectionEnd: addFeatureProperties(initialGeometry === null || initialGeometry === void 0 ? void 0 : initialGeometry.intersectionEnd, featurePropsIntersectionEnd),
|
|
688
687
|
fir: addFeatureProperties(getFir(), featurePropsFIR)
|
|
689
688
|
};
|
|
690
689
|
}),
|
|
@@ -1733,9 +1732,7 @@ var Levels = function Levels(_ref) {
|
|
|
1733
1732
|
var isDisabled = _ref.isDisabled,
|
|
1734
1733
|
isReadOnly = _ref.isReadOnly,
|
|
1735
1734
|
_ref$onChange = _ref.onChange,
|
|
1736
|
-
_onChange = _ref$onChange === void 0 ? function () {
|
|
1737
|
-
return null;
|
|
1738
|
-
} : _ref$onChange,
|
|
1735
|
+
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
1739
1736
|
productType = _ref.productType;
|
|
1740
1737
|
|
|
1741
1738
|
var _useFormContext = useFormContext(),
|
|
@@ -2235,15 +2232,13 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
|
|
|
2235
2232
|
isReadOnly = _ref.isReadOnly,
|
|
2236
2233
|
helperText = _ref.helperText,
|
|
2237
2234
|
_ref$onChange = _ref.onChange,
|
|
2238
|
-
onChange = _ref$onChange === void 0 ? function () {
|
|
2239
|
-
return null;
|
|
2240
|
-
} : _ref$onChange;
|
|
2235
|
+
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
|
2241
2236
|
|
|
2242
2237
|
var _useFormContext = useFormContext(),
|
|
2243
2238
|
watch = _useFormContext.watch;
|
|
2244
2239
|
|
|
2245
2240
|
var label = getFieldLabel('Date and time', isReadOnly);
|
|
2246
|
-
return
|
|
2241
|
+
return !isReadOnly || watch('observationOrForecastTime') !== null ? /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
2247
2242
|
title: "At"
|
|
2248
2243
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormDateTime, {
|
|
2249
2244
|
disablePast: watch('isObservationOrForecast') === 'FCST',
|
|
@@ -2266,7 +2261,7 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
|
|
|
2266
2261
|
helperText: helperText,
|
|
2267
2262
|
onChange: onChange,
|
|
2268
2263
|
sx: styles$2.helperText
|
|
2269
|
-
}));
|
|
2264
|
+
})) : null;
|
|
2270
2265
|
};
|
|
2271
2266
|
|
|
2272
2267
|
var Phenomenon = function Phenomenon(_ref) {
|
|
@@ -2274,9 +2269,7 @@ var Phenomenon = function Phenomenon(_ref) {
|
|
|
2274
2269
|
isDisabled = _ref.isDisabled,
|
|
2275
2270
|
isReadOnly = _ref.isReadOnly,
|
|
2276
2271
|
_ref$onChange = _ref.onChange,
|
|
2277
|
-
_onChange = _ref$onChange === void 0 ? function () {
|
|
2278
|
-
return null;
|
|
2279
|
-
} : _ref$onChange;
|
|
2272
|
+
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
|
2280
2273
|
|
|
2281
2274
|
var _useFormContext = useFormContext(),
|
|
2282
2275
|
getValues = _useFormContext.getValues,
|
|
@@ -2361,7 +2354,7 @@ var StartGeometry = function StartGeometry(_ref) {
|
|
|
2361
2354
|
var _useDraftFormHelpers = useDraftFormHelpers(),
|
|
2362
2355
|
isDraft = _useDraftFormHelpers.isDraft;
|
|
2363
2356
|
|
|
2364
|
-
return !isReadOnly
|
|
2357
|
+
return !isReadOnly ? /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
2365
2358
|
title: "Start position",
|
|
2366
2359
|
sx: styles$2.drawSection,
|
|
2367
2360
|
"data-testid": "startGeometry"
|
|
@@ -2403,7 +2396,7 @@ var StartGeometry = function StartGeometry(_ref) {
|
|
|
2403
2396
|
}
|
|
2404
2397
|
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
2405
2398
|
name: "startGeometryIntersect"
|
|
2406
|
-
}));
|
|
2399
|
+
})) : null;
|
|
2407
2400
|
};
|
|
2408
2401
|
|
|
2409
2402
|
/* *
|
|
@@ -2477,9 +2470,7 @@ var Progress = function Progress(_ref) {
|
|
|
2477
2470
|
geoJSONs = _ref.geoJSONs,
|
|
2478
2471
|
setDrawModeType = _ref.setDrawModeType,
|
|
2479
2472
|
_ref$onChange = _ref.onChange,
|
|
2480
|
-
_onChange = _ref$onChange === void 0 ? function () {
|
|
2481
|
-
return null;
|
|
2482
|
-
} : _ref$onChange;
|
|
2473
|
+
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
|
2483
2474
|
|
|
2484
2475
|
var _useFormContext = useFormContext(),
|
|
2485
2476
|
watch = _useFormContext.watch,
|
|
@@ -2832,9 +2823,7 @@ var ValidFrom = function ValidFrom(_ref) {
|
|
|
2832
2823
|
isDisabled = _ref.isDisabled,
|
|
2833
2824
|
isReadOnly = _ref.isReadOnly,
|
|
2834
2825
|
_ref$onChange = _ref.onChange,
|
|
2835
|
-
_onChange = _ref$onChange === void 0 ? function () {
|
|
2836
|
-
return null;
|
|
2837
|
-
} : _ref$onChange;
|
|
2826
|
+
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
|
2838
2827
|
|
|
2839
2828
|
var _useFormContext = useFormContext(),
|
|
2840
2829
|
getValues = _useFormContext.getValues,
|
|
@@ -2910,9 +2899,7 @@ var ValidUntil = function ValidUntil(_ref) {
|
|
|
2910
2899
|
isDisabled = _ref.isDisabled,
|
|
2911
2900
|
isReadOnly = _ref.isReadOnly,
|
|
2912
2901
|
_ref$onChange = _ref.onChange,
|
|
2913
|
-
_onChange = _ref$onChange === void 0 ? function () {
|
|
2914
|
-
return null;
|
|
2915
|
-
} : _ref$onChange;
|
|
2902
|
+
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
|
2916
2903
|
|
|
2917
2904
|
var _useFormContext = useFormContext(),
|
|
2918
2905
|
getValues = _useFormContext.getValues,
|
|
@@ -3103,9 +3090,7 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
|
|
|
3103
3090
|
var isDisabled = _ref.isDisabled,
|
|
3104
3091
|
isReadOnly = _ref.isReadOnly,
|
|
3105
3092
|
_ref$onChange = _ref.onChange,
|
|
3106
|
-
_onChange = _ref$onChange === void 0 ? function () {
|
|
3107
|
-
return null;
|
|
3108
|
-
} : _ref$onChange;
|
|
3093
|
+
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
|
3109
3094
|
|
|
3110
3095
|
var _useDraftFormHelpers = useDraftFormHelpers(),
|
|
3111
3096
|
isRequired = _useDraftFormHelpers.isRequired;
|
|
@@ -3367,9 +3352,7 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
3367
3352
|
var isDisabled = _ref.isDisabled,
|
|
3368
3353
|
isReadOnly = _ref.isReadOnly,
|
|
3369
3354
|
_ref$onChange = _ref.onChange,
|
|
3370
|
-
_onChange = _ref$onChange === void 0 ? function () {
|
|
3371
|
-
return null;
|
|
3372
|
-
} : _ref$onChange;
|
|
3355
|
+
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
|
3373
3356
|
|
|
3374
3357
|
var _useFormContext = useFormContext(),
|
|
3375
3358
|
watch = _useFormContext.watch,
|
|
@@ -4058,6 +4041,10 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
|
|
|
4058
4041
|
})), /*#__PURE__*/React.createElement(LegendConnect, {
|
|
4059
4042
|
showMapId: true,
|
|
4060
4043
|
mapId: mapId
|
|
4044
|
+
}), /*#__PURE__*/React.createElement(DockedLayerManagerConnect, {
|
|
4045
|
+
mapId: mapId,
|
|
4046
|
+
bounds: "parent",
|
|
4047
|
+
source: "module"
|
|
4061
4048
|
}));
|
|
4062
4049
|
};
|
|
4063
4050
|
|
|
@@ -4145,7 +4132,7 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
4145
4132
|
end: initialSigmet.endGeometry,
|
|
4146
4133
|
intersectionStart: initialSigmet.startGeometryIntersect,
|
|
4147
4134
|
intersectionEnd: initialSigmet.endGeometryIntersect
|
|
4148
|
-
} :
|
|
4135
|
+
} : undefined;
|
|
4149
4136
|
|
|
4150
4137
|
var _useDrawMode = useDrawMode(initialGeometry),
|
|
4151
4138
|
drawMode = _useDrawMode.drawMode,
|
|
@@ -4358,7 +4345,7 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
4358
4345
|
var initialGeometry = initialAirmet && !isCancelAirmet ? {
|
|
4359
4346
|
start: initialAirmet.startGeometry,
|
|
4360
4347
|
intersectionStart: initialAirmet.startGeometryIntersect
|
|
4361
|
-
} :
|
|
4348
|
+
} : undefined;
|
|
4362
4349
|
|
|
4363
4350
|
var _useDrawMode = useDrawMode(initialGeometry),
|
|
4364
4351
|
drawMode = _useDrawMode.drawMode,
|
|
@@ -4626,9 +4613,7 @@ var getActiveStatus = function getActiveStatus(product) {
|
|
|
4626
4613
|
});
|
|
4627
4614
|
};
|
|
4628
4615
|
|
|
4629
|
-
var getStatusTagList = function getStatusTagList(product) {
|
|
4630
|
-
var cancelsSeqId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
4631
|
-
|
|
4616
|
+
var getStatusTagList = function getStatusTagList(product, cancelsSeqId) {
|
|
4632
4617
|
if (cancelsSeqId !== null) {
|
|
4633
4618
|
return /*#__PURE__*/React__default.createElement(StatusTag, {
|
|
4634
4619
|
content: "cancels ".concat(cancelsSeqId),
|
|
@@ -5261,10 +5246,10 @@ var prepareProductValues = function prepareProductValues(product, productType) {
|
|
|
5261
5246
|
// Ensure there is a valid start/end date
|
|
5262
5247
|
if (!isInstanceOfCancelSigmetOrAirmet(product) && (!product.validDateStart || !product.validDateEnd)) {
|
|
5263
5248
|
var defaultHoursValid = getDefaultHoursValid(productType);
|
|
5264
|
-
return Object.assign({
|
|
5249
|
+
return Object.assign(Object.assign({}, product), {
|
|
5265
5250
|
validDateStart: moment.utc().add(VALID_FROM_TIME_DELAY_IN_MINUTES, 'minutes').format('YYYY-MM-DDTHH:mm:ss[Z]'),
|
|
5266
5251
|
validDateEnd: moment.utc().add(defaultHoursValid, 'hour').add(VALID_FROM_TIME_DELAY_IN_MINUTES, 'minutes').format('YYYY-MM-DDTHH:mm:ss[Z]')
|
|
5267
|
-
}
|
|
5252
|
+
});
|
|
5268
5253
|
}
|
|
5269
5254
|
|
|
5270
5255
|
return product;
|
package/index.umd.js
CHANGED
|
@@ -275,7 +275,8 @@
|
|
|
275
275
|
FIRname: "AMSTERDAM FIR",
|
|
276
276
|
StateCode: "NLD",
|
|
277
277
|
centlat: 52.8618788,
|
|
278
|
-
ICAOCODE: "EHAA"
|
|
278
|
+
ICAOCODE: "EHAA",
|
|
279
|
+
selectionType: "fir"
|
|
279
280
|
}
|
|
280
281
|
}
|
|
281
282
|
];
|
|
@@ -667,10 +668,6 @@
|
|
|
667
668
|
};
|
|
668
669
|
|
|
669
670
|
var useDrawMode = function useDrawMode(initialGeometry) {
|
|
670
|
-
if (initialGeometry === void 0) {
|
|
671
|
-
initialGeometry = null;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
671
|
var getInitialLayerDrawModes = function getInitialLayerDrawModes(startorEnd) {
|
|
675
672
|
return initialGeometry && initialGeometry[startorEnd] ? getDrawModeFromSelectionType(initialGeometry[startorEnd].features[0].properties.selectionType) : null;
|
|
676
673
|
};
|
|
@@ -697,10 +694,10 @@
|
|
|
697
694
|
|
|
698
695
|
var _c = __read(React__namespace.useState(function () {
|
|
699
696
|
return {
|
|
700
|
-
start: addFeatureProperties(initialGeometry
|
|
701
|
-
end: addFeatureProperties(initialGeometry
|
|
702
|
-
intersectionStart: addFeatureProperties(initialGeometry
|
|
703
|
-
intersectionEnd: addFeatureProperties(initialGeometry
|
|
697
|
+
start: addFeatureProperties(initialGeometry === null || initialGeometry === void 0 ? void 0 : initialGeometry.start, featurePropsStart),
|
|
698
|
+
end: addFeatureProperties(initialGeometry === null || initialGeometry === void 0 ? void 0 : initialGeometry.end, featurePropsEnd),
|
|
699
|
+
intersectionStart: addFeatureProperties(initialGeometry === null || initialGeometry === void 0 ? void 0 : initialGeometry.intersectionStart, featurePropsIntersectionStart),
|
|
700
|
+
intersectionEnd: addFeatureProperties(initialGeometry === null || initialGeometry === void 0 ? void 0 : initialGeometry.intersectionEnd, featurePropsIntersectionEnd),
|
|
704
701
|
fir: addFeatureProperties(getFir(), featurePropsFIR)
|
|
705
702
|
};
|
|
706
703
|
}), 2),
|
|
@@ -1733,9 +1730,7 @@
|
|
|
1733
1730
|
var isDisabled = _a.isDisabled,
|
|
1734
1731
|
isReadOnly = _a.isReadOnly,
|
|
1735
1732
|
_b = _a.onChange,
|
|
1736
|
-
_onChange = _b === void 0 ? function () {
|
|
1737
|
-
return null;
|
|
1738
|
-
} : _b,
|
|
1733
|
+
_onChange = _b === void 0 ? function () {} : _b,
|
|
1739
1734
|
productType = _a.productType;
|
|
1740
1735
|
|
|
1741
1736
|
var _c = reactHookForm.useFormContext(),
|
|
@@ -2213,12 +2208,10 @@
|
|
|
2213
2208
|
isReadOnly = _a.isReadOnly,
|
|
2214
2209
|
helperText = _a.helperText,
|
|
2215
2210
|
_b = _a.onChange,
|
|
2216
|
-
onChange = _b === void 0 ? function () {
|
|
2217
|
-
return null;
|
|
2218
|
-
} : _b;
|
|
2211
|
+
onChange = _b === void 0 ? function () {} : _b;
|
|
2219
2212
|
var watch = reactHookForm.useFormContext().watch;
|
|
2220
2213
|
var label = getFieldLabel('Date and time', isReadOnly);
|
|
2221
|
-
return
|
|
2214
|
+
return !isReadOnly || watch('observationOrForecastTime') !== null ? /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2222
2215
|
title: "At"
|
|
2223
2216
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormDateTime, {
|
|
2224
2217
|
disablePast: watch('isObservationOrForecast') === 'FCST',
|
|
@@ -2241,7 +2234,7 @@
|
|
|
2241
2234
|
helperText: helperText,
|
|
2242
2235
|
onChange: onChange,
|
|
2243
2236
|
sx: styles$2.helperText
|
|
2244
|
-
}));
|
|
2237
|
+
})) : null;
|
|
2245
2238
|
};
|
|
2246
2239
|
|
|
2247
2240
|
var Phenomenon = function Phenomenon(_a) {
|
|
@@ -2249,9 +2242,7 @@
|
|
|
2249
2242
|
isDisabled = _a.isDisabled,
|
|
2250
2243
|
isReadOnly = _a.isReadOnly,
|
|
2251
2244
|
_b = _a.onChange,
|
|
2252
|
-
_onChange = _b === void 0 ? function () {
|
|
2253
|
-
return null;
|
|
2254
|
-
} : _b;
|
|
2245
|
+
_onChange = _b === void 0 ? function () {} : _b;
|
|
2255
2246
|
|
|
2256
2247
|
var _c = reactHookForm.useFormContext(),
|
|
2257
2248
|
getValues = _c.getValues,
|
|
@@ -2334,7 +2325,7 @@
|
|
|
2334
2325
|
watch = _c.watch;
|
|
2335
2326
|
|
|
2336
2327
|
var isDraft = shared.useDraftFormHelpers().isDraft;
|
|
2337
|
-
return !isReadOnly
|
|
2328
|
+
return !isReadOnly ? /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2338
2329
|
title: "Start position",
|
|
2339
2330
|
sx: styles$2.drawSection,
|
|
2340
2331
|
"data-testid": "startGeometry"
|
|
@@ -2376,7 +2367,7 @@
|
|
|
2376
2367
|
}
|
|
2377
2368
|
}), /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
|
|
2378
2369
|
name: "startGeometryIntersect"
|
|
2379
|
-
}));
|
|
2370
|
+
})) : null;
|
|
2380
2371
|
};
|
|
2381
2372
|
|
|
2382
2373
|
/* *
|
|
@@ -2450,9 +2441,7 @@
|
|
|
2450
2441
|
geoJSONs = _a.geoJSONs,
|
|
2451
2442
|
setDrawModeType = _a.setDrawModeType,
|
|
2452
2443
|
_d = _a.onChange,
|
|
2453
|
-
_onChange = _d === void 0 ? function () {
|
|
2454
|
-
return null;
|
|
2455
|
-
} : _d;
|
|
2444
|
+
_onChange = _d === void 0 ? function () {} : _d;
|
|
2456
2445
|
|
|
2457
2446
|
var _e = reactHookForm.useFormContext(),
|
|
2458
2447
|
watch = _e.watch,
|
|
@@ -2791,9 +2780,7 @@
|
|
|
2791
2780
|
isDisabled = _a.isDisabled,
|
|
2792
2781
|
isReadOnly = _a.isReadOnly,
|
|
2793
2782
|
_b = _a.onChange,
|
|
2794
|
-
_onChange = _b === void 0 ? function () {
|
|
2795
|
-
return null;
|
|
2796
|
-
} : _b;
|
|
2783
|
+
_onChange = _b === void 0 ? function () {} : _b;
|
|
2797
2784
|
|
|
2798
2785
|
var _c = reactHookForm.useFormContext(),
|
|
2799
2786
|
getValues = _c.getValues,
|
|
@@ -2867,9 +2854,7 @@
|
|
|
2867
2854
|
isDisabled = _a.isDisabled,
|
|
2868
2855
|
isReadOnly = _a.isReadOnly,
|
|
2869
2856
|
_b = _a.onChange,
|
|
2870
|
-
_onChange = _b === void 0 ? function () {
|
|
2871
|
-
return null;
|
|
2872
|
-
} : _b;
|
|
2857
|
+
_onChange = _b === void 0 ? function () {} : _b;
|
|
2873
2858
|
|
|
2874
2859
|
var _c = reactHookForm.useFormContext(),
|
|
2875
2860
|
getValues = _c.getValues,
|
|
@@ -3041,9 +3026,7 @@
|
|
|
3041
3026
|
var isDisabled = _a.isDisabled,
|
|
3042
3027
|
isReadOnly = _a.isReadOnly,
|
|
3043
3028
|
_b = _a.onChange,
|
|
3044
|
-
_onChange = _b === void 0 ? function () {
|
|
3045
|
-
return null;
|
|
3046
|
-
} : _b;
|
|
3029
|
+
_onChange = _b === void 0 ? function () {} : _b;
|
|
3047
3030
|
|
|
3048
3031
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
3049
3032
|
var visibilityLabel = getFieldLabel('Visibility', isReadOnly);
|
|
@@ -3297,9 +3280,7 @@
|
|
|
3297
3280
|
var isDisabled = _a.isDisabled,
|
|
3298
3281
|
isReadOnly = _a.isReadOnly,
|
|
3299
3282
|
_b = _a.onChange,
|
|
3300
|
-
_onChange = _b === void 0 ? function () {
|
|
3301
|
-
return null;
|
|
3302
|
-
} : _b;
|
|
3283
|
+
_onChange = _b === void 0 ? function () {} : _b;
|
|
3303
3284
|
|
|
3304
3285
|
var _c = reactHookForm.useFormContext(),
|
|
3305
3286
|
watch = _c.watch,
|
|
@@ -3949,6 +3930,10 @@
|
|
|
3949
3930
|
})), /*#__PURE__*/React__namespace.createElement(core.LegendConnect, {
|
|
3950
3931
|
showMapId: true,
|
|
3951
3932
|
mapId: mapId
|
|
3933
|
+
}), /*#__PURE__*/React__namespace.createElement(core.DockedLayerManagerConnect, {
|
|
3934
|
+
mapId: mapId,
|
|
3935
|
+
bounds: "parent",
|
|
3936
|
+
source: "module"
|
|
3952
3937
|
}));
|
|
3953
3938
|
};
|
|
3954
3939
|
|
|
@@ -4034,7 +4019,7 @@
|
|
|
4034
4019
|
end: initialSigmet.endGeometry,
|
|
4035
4020
|
intersectionStart: initialSigmet.startGeometryIntersect,
|
|
4036
4021
|
intersectionEnd: initialSigmet.endGeometryIntersect
|
|
4037
|
-
} :
|
|
4022
|
+
} : undefined;
|
|
4038
4023
|
|
|
4039
4024
|
var _j = useDrawMode(initialGeometry),
|
|
4040
4025
|
drawMode = _j.drawMode,
|
|
@@ -4243,7 +4228,7 @@
|
|
|
4243
4228
|
var initialGeometry = initialAirmet && !isCancelAirmet ? {
|
|
4244
4229
|
start: initialAirmet.startGeometry,
|
|
4245
4230
|
intersectionStart: initialAirmet.startGeometryIntersect
|
|
4246
|
-
} :
|
|
4231
|
+
} : undefined;
|
|
4247
4232
|
|
|
4248
4233
|
var _j = useDrawMode(initialGeometry),
|
|
4249
4234
|
drawMode = _j.drawMode,
|
|
@@ -4530,10 +4515,6 @@
|
|
|
4530
4515
|
};
|
|
4531
4516
|
|
|
4532
4517
|
var getStatusTagList = function getStatusTagList(product, cancelsSeqId) {
|
|
4533
|
-
if (cancelsSeqId === void 0) {
|
|
4534
|
-
cancelsSeqId = null;
|
|
4535
|
-
}
|
|
4536
|
-
|
|
4537
4518
|
if (cancelsSeqId !== null) {
|
|
4538
4519
|
return /*#__PURE__*/React__default["default"].createElement(shared.StatusTag, {
|
|
4539
4520
|
content: "cancels " + cancelsSeqId,
|
|
@@ -5138,10 +5119,10 @@
|
|
|
5138
5119
|
// Ensure there is a valid start/end date
|
|
5139
5120
|
if (!isInstanceOfCancelSigmetOrAirmet(product) && (!product.validDateStart || !product.validDateEnd)) {
|
|
5140
5121
|
var defaultHoursValid = getDefaultHoursValid(productType);
|
|
5141
|
-
return __assign({
|
|
5122
|
+
return __assign(__assign({}, product), {
|
|
5142
5123
|
validDateStart: moment__default["default"].utc().add(VALID_FROM_TIME_DELAY_IN_MINUTES, 'minutes').format('YYYY-MM-DDTHH:mm:ss[Z]'),
|
|
5143
5124
|
validDateEnd: moment__default["default"].utc().add(defaultHoursValid, 'hour').add(VALID_FROM_TIME_DELAY_IN_MINUTES, 'minutes').format('YYYY-MM-DDTHH:mm:ss[Z]')
|
|
5144
|
-
}
|
|
5125
|
+
});
|
|
5145
5126
|
}
|
|
5146
5127
|
|
|
5147
5128
|
return product;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { SetMapDrawModes, MapGeoJSONS, MapDrawMode, StartOrEndDrawing } from '../../types';
|
|
2
|
-
export declare const useDrawMode: (initialGeometry?:
|
|
2
|
+
export declare const useDrawMode: (initialGeometry?: MapGeoJSONS | undefined) => {
|
|
3
3
|
geoJSONs: MapGeoJSONS;
|
|
4
4
|
setLayerGeoJSONs: (geoJSONs: MapGeoJSONS) => void;
|
|
5
5
|
layerDrawModes: SetMapDrawModes;
|
|
6
6
|
setLayersDrawModes: (layerDrawModes: SetMapDrawModes) => void;
|
|
7
7
|
drawMode: SetMapDrawModes;
|
|
8
8
|
setDrawMode: (drawMode: SetMapDrawModes) => void;
|
|
9
|
-
setDrawModeType: (mapDrawMode: MapDrawMode, startOrEnd: StartOrEndDrawing, updateCallback?: (mapGeoJSONS: MapGeoJSONS) => void) => void;
|
|
9
|
+
setDrawModeType: (mapDrawMode: MapDrawMode, startOrEnd: StartOrEndDrawing, updateCallback?: ((mapGeoJSONS: MapGeoJSONS) => void) | undefined) => void;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* Returns the intersection of two features. In case of a polygon, only the first feature is used.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.0",
|
|
4
4
|
"description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,23 +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.7.0",
|
|
18
|
+
"@opengeoweb/theme": "4.7.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.
|
|
22
|
+
"@opengeoweb/form-fields": "4.7.0",
|
|
23
23
|
"react-hook-form": "^6.12.1",
|
|
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
|
-
"
|
|
30
|
-
"@opengeoweb/
|
|
29
|
+
"date-fns": "^2.29.3",
|
|
30
|
+
"@opengeoweb/core": "4.7.0",
|
|
31
|
+
"@opengeoweb/webmap": "4.7.0",
|
|
31
32
|
"throttle-debounce": "^3.0.1",
|
|
32
33
|
"proj4": "^2.6.2",
|
|
33
|
-
"@opengeoweb/api": "4.
|
|
34
|
+
"@opengeoweb/api": "4.7.0",
|
|
34
35
|
"react-intl": "^5.17.5",
|
|
35
36
|
"react-sortablejs": "^6.1.4",
|
|
36
37
|
"sortablejs": "^1.15.0",
|