@opengeoweb/sigmet-airmet 9.36.0 → 10.0.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/README.md +2 -2
- package/index.esm.js +24 -6
- package/package.json +1 -2
- package/src/lib/components/ProductForms/utils.d.ts +2 -1
- package/src/lib/utils/store.d.ts +0 -2
package/README.md
CHANGED
|
@@ -172,6 +172,6 @@ const StartGeometry: React.FC<StartGeometryProps> = ({
|
|
|
172
172
|
|
|
173
173
|
3. After all is working add the unit tests and make sure typescript linting will pass again, as `ConfigurableFormFieldProps` makes sure you're not forgetting to pass the config.
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
### TypeScript Documentation
|
|
176
176
|
|
|
177
|
-
https://opengeoweb.gitlab.io/opengeoweb/docs/sigmet-airmet/
|
|
177
|
+
- [TypeScript Docs](https://opengeoweb.gitlab.io/opengeoweb/typescript-docs/sigmet-airmet/)
|
package/index.esm.js
CHANGED
|
@@ -10,11 +10,11 @@ import i18n from 'i18next';
|
|
|
10
10
|
import { initReactI18next, useTranslation } from 'react-i18next';
|
|
11
11
|
import { SHARED_NAMESPACE, sharedTranslations, PROJECTION, ToggleMenu, useIsMounted, dateUtils, CustomTooltip, ConfirmationServiceProvider, usePreventBrowserClose, useConfirmationDialog, AlertBanner, isAxiosError, getAxiosErrorMessage, StatusTag, usePoller, ErrorBoundary } from '@opengeoweb/shared';
|
|
12
12
|
import { CORE_NAMESPACE, coreTranslations, LayerManagerMapButtonConnect, LegendMapButtonConnect, MultiDimensionSelectMapButtonsConnect, MapViewConnect, TimeSliderConnect, LegendConnect, LayerManagerConnect } from '@opengeoweb/core';
|
|
13
|
+
import { useSelector, useDispatch, shallowEqual } from 'react-redux';
|
|
14
|
+
import { uiSelectors, useUpdateSharedData, mapSelectors, syncGroupsActions, mapStoreActions, defaultLayers, syncConstants } from '@opengeoweb/store';
|
|
13
15
|
import { DrawFIRLand, ChevronLeft, Edit, Success, Clock } from '@opengeoweb/theme';
|
|
14
16
|
import { LayerType, webmapUtils } from '@opengeoweb/webmap';
|
|
15
17
|
import { debounce } from 'lodash';
|
|
16
|
-
import { useDispatch, useSelector, shallowEqual } from 'react-redux';
|
|
17
|
-
import { mapSelectors, syncGroupsActions, mapStoreActions, defaultLayers, syncConstants } from '@opengeoweb/store';
|
|
18
18
|
import { Box as Box$1 } from '@mui/system';
|
|
19
19
|
import { useAuthenticationContext } from '@opengeoweb/authentication';
|
|
20
20
|
|
|
@@ -1997,6 +1997,22 @@ var getToolIcon = function getToolIcon(selectionType) {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
return jsx(DrawFIRLand, {});
|
|
1999
1999
|
};
|
|
2000
|
+
var useFormLayers = function useFormLayers(layers) {
|
|
2001
|
+
var formLayers = layers.map(function (layer) {
|
|
2002
|
+
return {
|
|
2003
|
+
id: layer.id,
|
|
2004
|
+
geoJSON: layer.geojson
|
|
2005
|
+
};
|
|
2006
|
+
}).filter(function (layer) {
|
|
2007
|
+
return layer.geoJSON !== undefined;
|
|
2008
|
+
});
|
|
2009
|
+
var sourcePanelId = useSelector(function (store) {
|
|
2010
|
+
return uiSelectors.getSourcePanelId(store, 'publicWarnings');
|
|
2011
|
+
});
|
|
2012
|
+
useUpdateSharedData({
|
|
2013
|
+
formFeatures: formLayers
|
|
2014
|
+
}, sourcePanelId);
|
|
2015
|
+
};
|
|
2000
2016
|
|
|
2001
2017
|
var styles$1 = {
|
|
2002
2018
|
radioInput: {
|
|
@@ -3404,7 +3420,7 @@ var ValidFrom = function ValidFrom(_ref) {
|
|
|
3404
3420
|
var getDefaultValidUntilValue = function getDefaultValidUntilValue(productConfig, phenomenon, fir, validFrom) {
|
|
3405
3421
|
var maxHoursOfValidity = getMaxHoursOfValidity(phenomenon, fir || '', productConfig);
|
|
3406
3422
|
// Set default validity to 2 hours for thunderstorms, otherwise use maxHoursOfValidity
|
|
3407
|
-
var defaultHoursOfValidity = ['EMBD_TS', 'EMBD_TSGR', 'FRQ_TS', 'FRQ_TSGR', 'OBSC_TS', 'OBSC_TSGR', 'SQL_TSGR', 'ISOL_TS', 'ISOL_TSGR', 'OCNL_TS', 'OCNL_TSGR'].includes(phenomenon) ? 2 : maxHoursOfValidity;
|
|
3423
|
+
var defaultHoursOfValidity = ['EMBD_TS', 'EMBD_TSGR', 'FRQ_TS', 'FRQ_TSGR', 'OBSC_TS', 'OBSC_TSGR', 'SQL_TS', 'SQL_TSGR', 'ISOL_TS', 'ISOL_TSGR', 'OCNL_TS', 'OCNL_TSGR'].includes(phenomenon) ? 2 : maxHoursOfValidity;
|
|
3408
3424
|
// Use validFrom if provided, otherwise use current UTC time
|
|
3409
3425
|
var baseDate = validFrom ? new Date(validFrom) : dateUtils.utc();
|
|
3410
3426
|
var dateWithValidity = dateUtils.add(baseDate, {
|
|
@@ -4860,7 +4876,7 @@ var fir_areas$1 = {
|
|
|
4860
4876
|
},
|
|
4861
4877
|
{
|
|
4862
4878
|
code: "SQL_TS",
|
|
4863
|
-
description: "Squall line"
|
|
4879
|
+
description: "Squall line thunderstorm(s)"
|
|
4864
4880
|
},
|
|
4865
4881
|
{
|
|
4866
4882
|
code: "SQL_TSGR",
|
|
@@ -6181,7 +6197,7 @@ var fir_areas$1 = {
|
|
|
6181
6197
|
},
|
|
6182
6198
|
{
|
|
6183
6199
|
code: "SQL_TS",
|
|
6184
|
-
description: "Squall line"
|
|
6200
|
+
description: "Squall line thunderstorm(s)"
|
|
6185
6201
|
},
|
|
6186
6202
|
{
|
|
6187
6203
|
code: "SQL_TSGR",
|
|
@@ -8115,6 +8131,7 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
8115
8131
|
}), Object.assign({}, getStartLayer('geoJSON', 'geojsonlayer-start'), {
|
|
8116
8132
|
exitDrawModeCallback: onExitDrawMode
|
|
8117
8133
|
}), getEndLayer('geoJSONIntersection', 'geojsonlayer-intersection-end'), getStartLayer('geoJSONIntersection', 'geojsonlayer-intersection-start')];
|
|
8134
|
+
useFormLayers(layers);
|
|
8118
8135
|
var _useFormContext2 = useFormContext(),
|
|
8119
8136
|
watch = _useFormContext2.watch,
|
|
8120
8137
|
setValue = _useFormContext2.setValue,
|
|
@@ -8399,6 +8416,7 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
8399
8416
|
var layers = [getStartLayer('geoJSONIntersectionBounds', 'geojsonlayer-fir'), Object.assign({}, getStartLayer('geoJSON', 'geojsonlayer-start'), {
|
|
8400
8417
|
exitDrawModeCallback: onExitDrawMode
|
|
8401
8418
|
}), getStartLayer('geoJSONIntersection', 'geojsonlayer-intersection-start')];
|
|
8419
|
+
useFormLayers(layers);
|
|
8402
8420
|
var _useFormContext2 = useFormContext(),
|
|
8403
8421
|
watch = _useFormContext2.watch,
|
|
8404
8422
|
setValue = _useFormContext2.setValue,
|
|
@@ -12215,4 +12233,4 @@ ConnectedModuleWrapper) {
|
|
|
12215
12233
|
}
|
|
12216
12234
|
};
|
|
12217
12235
|
|
|
12218
|
-
export { AirmetComponentsLookUp, AirmetForm, AirmetType, CloudLevelUnits, ContentDialog, DEFAULT_MINIMUM_SURFACE_LEVEL, DEFAULT_MIN_MOVEMENT_SPEED, DEFAULT_MIN_VISIBILITY, DEFAULT_MIN_WIND_SPEED, Direction, DownloadSigmetAirmetConfigWrapper, LevelUnits, MapViewGeoJson, MetInfoWrapper, MovementUnit, ProductAction, ProductFormDialog, ProductList, ProductListRow, ProductStatusDescription, SA_NAMESPACE, SigmetComponentsLookUp, SigmetForm, SigmetType, StartOrEndDrawing, VisibilityCause, WindUnit, airmetConfig, createAirmetPostParameter, createApi$1 as createApi, createApi as createFakeApi, createSigmetPostParameter, extractUnitsToShow, firSelectionType, getActiveFIRArea, getAllFirAreas, getAllowedUnits, getBaseLayers, getConfirmationDialogButtonLabel, getConfirmationDialogCancelLabel, getConfirmationDialogContent, getConfirmationDialogTitle, getDefaultPhenomena, getDefaultValidityMinutesFromConfig, getDialogtitle, getDrawTools, getFieldLabel, getFir, getFirArea, getFirOptions, getHoursBeforeValidity, getLevelInFeet, getMaxCloudLevelValue, getMaxCloudLowerLevelValue, getMaxHoursOfValidity, getMaxLevelValue, getMaxMovementSpeedValue, getMaxPolygonPoints, getMaxVisibilityValue, getMaxWindSpeedValue, getMinCloudLevelValue, getMinCloudLowerLevelValue, getMinLevelValue, getMinMovementSpeedValue, getMinVisibilityValue, getMinWindSpeedValue, getOmitChangeFromConfig, getPhenomenon, getProductFormLifecycleButtons, getProductFormMode, getProductIssueDate, getProjection, getToolIcon, getValidFromDelayTimeMinutesFromConfig, hasMaxFeaturePoints, hasValue, isFir, isInstanceOfAirmet, isInstanceOfCancelAirmet, isInstanceOfCancelSigmet, isInstanceOfCancelSigmetOrAirmet, isInstanceOfSigmet, isInstanceOfSigmetOrAirmet, isLevelLower, prepareFormValues, prepareProductValues, sigmetAirmetTranslations as saTranslations, sigmetConfig, triggerValidations, updateDrawToolsWithFir, useDelayedFormValues };
|
|
12236
|
+
export { AirmetComponentsLookUp, AirmetForm, AirmetType, CloudLevelUnits, ContentDialog, DEFAULT_MINIMUM_SURFACE_LEVEL, DEFAULT_MIN_MOVEMENT_SPEED, DEFAULT_MIN_VISIBILITY, DEFAULT_MIN_WIND_SPEED, Direction, DownloadSigmetAirmetConfigWrapper, LevelUnits, MapViewGeoJson, MetInfoWrapper, MovementUnit, ProductAction, ProductFormDialog, ProductList, ProductListRow, ProductStatusDescription, SA_NAMESPACE, SigmetComponentsLookUp, SigmetForm, SigmetType, StartOrEndDrawing, VisibilityCause, WindUnit, airmetConfig, createAirmetPostParameter, createApi$1 as createApi, createApi as createFakeApi, createSigmetPostParameter, extractUnitsToShow, firSelectionType, getActiveFIRArea, getAllFirAreas, getAllowedUnits, getBaseLayers, getConfirmationDialogButtonLabel, getConfirmationDialogCancelLabel, getConfirmationDialogContent, getConfirmationDialogTitle, getDefaultPhenomena, getDefaultValidityMinutesFromConfig, getDialogtitle, getDrawTools, getFieldLabel, getFir, getFirArea, getFirOptions, getHoursBeforeValidity, getLevelInFeet, getMaxCloudLevelValue, getMaxCloudLowerLevelValue, getMaxHoursOfValidity, getMaxLevelValue, getMaxMovementSpeedValue, getMaxPolygonPoints, getMaxVisibilityValue, getMaxWindSpeedValue, getMinCloudLevelValue, getMinCloudLowerLevelValue, getMinLevelValue, getMinMovementSpeedValue, getMinVisibilityValue, getMinWindSpeedValue, getOmitChangeFromConfig, getPhenomenon, getProductFormLifecycleButtons, getProductFormMode, getProductIssueDate, getProjection, getToolIcon, getValidFromDelayTimeMinutesFromConfig, hasMaxFeaturePoints, hasValue, isFir, isInstanceOfAirmet, isInstanceOfCancelAirmet, isInstanceOfCancelSigmet, isInstanceOfCancelSigmetOrAirmet, isInstanceOfSigmet, isInstanceOfSigmetOrAirmet, isLevelLower, prepareFormValues, prepareProductValues, sigmetAirmetTranslations as saTranslations, sigmetConfig, triggerValidations, updateDrawToolsWithFir, useDelayedFormValues, useFormLayers };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"react-hook-form": "^7.50.1",
|
|
23
23
|
"axios": "^1.7.7",
|
|
24
24
|
"lodash": "^4.17.21",
|
|
25
|
-
"@redux-eggs/redux-toolkit": "^2.2.0",
|
|
26
25
|
"@reduxjs/toolkit": "^1.9.7",
|
|
27
26
|
"i18next": "^23.11.5",
|
|
28
27
|
"@mui/material": "^6.1.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FieldValues, UseFormGetValues, UseFormTrigger } from 'react-hook-form';
|
|
3
3
|
import { layerTypes, mapTypes } from '@opengeoweb/store';
|
|
4
|
-
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
4
|
+
import { DrawMode, MapViewLayerProps } from '@opengeoweb/webmap-react';
|
|
5
5
|
import { LevelUnits, ATSRLocation, ICAOLocation, ProductStatus, CancelSigmet, Sigmet, ProductCanbe, SigmetFromBackend, SigmetFromFrontend, ProductAction, Airmet, CancelAirmet, ProductConfig, Firareas, FIRConfigSigmet, AirmetFromBackend, AirmetFromFrontend, ProductType, AviationProduct, FIRLocationGeoJson, AirmetConfig, FIRConfigAirmet, StartOrEndDrawing, AviationPhenomenon } from '../../types';
|
|
6
6
|
export declare const getDefaultPhenomena: (productConfig: ProductConfig, currentFir?: string) => {
|
|
7
7
|
phenomena: AviationPhenomenon[];
|
|
@@ -77,4 +77,5 @@ export declare const firSelectionType = "fir";
|
|
|
77
77
|
export declare const getDrawTools: (type: StartOrEndDrawing, firShape: GeoJSON.FeatureCollection) => DrawMode[];
|
|
78
78
|
export declare const updateDrawToolsWithFir: (drawTools: DrawMode[], newFirShape: GeoJSON.FeatureCollection) => DrawMode[];
|
|
79
79
|
export declare const getToolIcon: (selectionType: string) => React.ReactElement;
|
|
80
|
+
export declare const useFormLayers: (layers: MapViewLayerProps[]) => void;
|
|
80
81
|
export {};
|
package/src/lib/utils/store.d.ts
DELETED