@opengeoweb/sigmet-airmet 7.0.0 → 8.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 +0 -0
- package/index.esm.d.ts +0 -0
- package/index.esm.js +81 -70
- package/package.json +10 -10
- package/src/index.d.ts +0 -0
- package/src/lib/AirmetDemo.stories.d.ts +0 -0
- package/src/lib/SigmetDemo.stories.d.ts +0 -0
- package/src/lib/components/ComponentsLookUp/AirmetComponentsLookUp.d.ts +0 -0
- package/src/lib/components/ComponentsLookUp/AirmetComponentsLookUp.spec.d.ts +0 -0
- package/src/lib/components/ComponentsLookUp/AviationProductApiWrapper.d.ts +0 -0
- package/src/lib/components/ComponentsLookUp/AviationProductApiWrapper.spec.d.ts +0 -0
- package/src/lib/components/ComponentsLookUp/SigmetComponentsLookUp.d.ts +0 -0
- package/src/lib/components/ComponentsLookUp/SigmetComponentsLookUp.spec.d.ts +0 -0
- package/src/lib/components/ComponentsLookUp/index.d.ts +0 -0
- package/src/lib/components/ContentDialog/ContentDialog.d.ts +0 -0
- package/src/lib/components/ContentDialog/ContentDialog.spec.d.ts +0 -0
- package/src/lib/components/ContentDialog/ContentDialog.stories.d.ts +0 -0
- package/src/lib/components/ContentDialog/index.d.ts +0 -0
- package/src/lib/components/MapViewGeoJson/MapViewGeoJson.d.ts +0 -0
- package/src/lib/components/MapViewGeoJson/MapViewGeoJson.spec.d.ts +0 -0
- package/src/lib/components/MapViewGeoJson/MapViewGeoJson.stories.d.ts +0 -0
- package/src/lib/components/MapViewGeoJson/constants.d.ts +0 -0
- package/src/lib/components/MapViewGeoJson/index.d.ts +0 -0
- package/src/lib/components/MetInfoWrapper/DownloadSigmetAirmetConfigWrapper.d.ts +0 -0
- package/src/lib/components/MetInfoWrapper/DownloadSigmetAirmetConfigWrapper.spec.d.ts +0 -0
- package/src/lib/components/MetInfoWrapper/MetInfoWrapper.d.ts +0 -0
- package/src/lib/components/MetInfoWrapper/MetInfoWrapper.spec.d.ts +0 -0
- package/src/lib/components/MetInfoWrapper/MetInfoWrapper.stories.d.ts +0 -0
- package/src/lib/components/MetInfoWrapper/MetInfoWrapper.tac.spec.d.ts +0 -0
- package/src/lib/components/MetInfoWrapper/index.d.ts +0 -0
- package/src/lib/components/MetInfoWrapper/utils.d.ts +0 -0
- package/src/lib/components/MetInfoWrapper/utils.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/AirmetForm/AirmetForm.d.ts +0 -0
- package/src/lib/components/ProductForms/AirmetForm/AirmetForm.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/AirmetForm/AirmetForm.stories.d.ts +0 -0
- package/src/lib/components/ProductForms/AirmetForm/AirmetForm.validations.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductForm.styles.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormDialog.Airmet.stories.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormDialog.Draw.stories.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormDialog.Sigmet.stories.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormDialog.actions.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormDialog.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormDialog.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormDialogContent.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormDialogContent.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/Change.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/Change.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/CloudLevels.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/CloudLevels.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/DrawTools.d.ts +3 -3
- package/src/lib/components/ProductForms/ProductFormFields/DrawTools.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/IssuedAt.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/IssuedAt.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/Levels.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/Levels.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/ObservationForecast.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/ObservationForecast.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/ObservationForecastTime.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/ObservationForecastTime.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/Phenomenon.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/Phenomenon.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/ProductFormFieldLayout.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/ProductFormFieldLayout.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/Progress.d.ts +3 -3
- package/src/lib/components/ProductForms/ProductFormFields/Progress.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/RadioButtonAndLabel.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/RadioButtonAndLabel.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/SelectFIR.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/SelectFIR.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/StartGeometry.d.ts +3 -3
- package/src/lib/components/ProductForms/ProductFormFields/StartGeometry.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/SurfaceVisibility.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/SurfaceVisibility.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/SurfaceWind.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/SurfaceWind.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/Tac.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/Tac.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/Type.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/Type.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/ValidFrom.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/ValidFrom.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/ValidUntil.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/ValidUntil.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/VolcanicFields.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/VolcanicFields.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormFields/index.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormLayout.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormLayout.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormTac.d.ts +0 -0
- package/src/lib/components/ProductForms/ProductFormTac.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/SigmetForm/SigmetCancelVolcanicMovements.d.ts +0 -0
- package/src/lib/components/ProductForms/SigmetForm/SigmetForm.d.ts +0 -0
- package/src/lib/components/ProductForms/SigmetForm/SigmetForm.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/SigmetForm/SigmetForm.stories.d.ts +0 -0
- package/src/lib/components/ProductForms/SigmetForm/SigmetForm.validations.spec.d.ts +0 -0
- package/src/lib/components/ProductForms/index.d.ts +0 -0
- package/src/lib/components/ProductForms/utils.d.ts +8 -7
- package/src/lib/components/ProductForms/utils.spec.d.ts +0 -0
- package/src/lib/components/ProductList/ProductList.d.ts +0 -0
- package/src/lib/components/ProductList/ProductList.spec.d.ts +0 -0
- package/src/lib/components/ProductList/ProductList.stories.d.ts +0 -0
- package/src/lib/components/ProductList/ProductListRow.d.ts +0 -0
- package/src/lib/components/ProductList/ProductListRow.spec.d.ts +0 -0
- package/src/lib/components/ProductList/index.d.ts +0 -0
- package/src/lib/storyshots/Storyshots.spec.d.ts +0 -0
- package/src/lib/types.d.ts +3 -2
- package/src/lib/utils/api.d.ts +2 -2
- package/src/lib/utils/api.spec.d.ts +0 -0
- package/src/lib/utils/config/config.d.ts +0 -0
- package/src/lib/utils/config/config.spec.d.ts +0 -0
- package/src/lib/utils/config/index.d.ts +0 -0
- package/src/lib/utils/fakeApi.d.ts +0 -0
- package/src/lib/utils/fakeApi.spec.d.ts +0 -0
- package/src/lib/utils/mockdata/fakeAirmetList.d.ts +0 -0
- package/src/lib/utils/mockdata/fakeSigmetList.d.ts +0 -0
- package/src/lib/utils/store.d.ts +0 -0
- package/src/lib/utils/testUtils.d.ts +0 -0
package/README.md
CHANGED
|
File without changes
|
package/index.esm.d.ts
CHANGED
|
File without changes
|
package/index.esm.js
CHANGED
|
@@ -4,9 +4,8 @@ import { FormControlLabel, Radio, Grid, Typography, Box as Box$2, Button, Checkb
|
|
|
4
4
|
import { useFormContext } from 'react-hook-form';
|
|
5
5
|
import { useDraftFormHelpers, ReactHookFormRadioGroup, ReactHookFormSelect, ReactHookFormNumberField, isInteger, isValidMax, isValidMin, isEmpty, ReactHookFormDateTime, isValidDate, isBefore, isBetween, hasMaxFeaturePoints, hasMulitpleIntersections, ReactHookFormHiddenInput, isMaximumOneDrawing, hasIntersectionWithFIR, isValidGeoJsonCoordinates, isXHoursBefore, isAfter, isXHoursAfter, ReactHookFormTextField, isLatitude, isNonOrBothCoordinates, isLongitude, ReactHookFormFormControl, isGeometryDirty, ReactHookFormProvider, defaultFormOptions } from '@opengeoweb/form-fields';
|
|
6
6
|
import { useApiContext, useApi, createApiInstance, createNonAuthApiInstance, createFakeApiInstance, ApiProvider } from '@opengeoweb/api';
|
|
7
|
-
import { defaultIntersectionStyleProperties, defaultPoint, defaultBox, defaultPolygon,
|
|
8
|
-
import {
|
|
9
|
-
import { CustomTooltip, dateUtils, ToggleMenu, useIsMounted, StatusTag, AlertBanner, ConfirmationServiceProvider, usePreventBrowserClose, useConfirmationDialog, isAxiosError, getAxiosErrorMessage, usePoller, ErrorBoundary } from '@opengeoweb/shared';
|
|
7
|
+
import { defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultPoint, defaultBox, defaultPolygon, DRAWMODE, addFeatureProperties, defaultDelete, getIcon, MapControls, MapViewLayer, useMapDrawTool } from '@opengeoweb/webmap-react';
|
|
8
|
+
import { dateUtils, ToggleMenu, CustomTooltip, useIsMounted, StatusTag, AlertBanner, ConfirmationServiceProvider, usePreventBrowserClose, useConfirmationDialog, isAxiosError, getAxiosErrorMessage, usePoller, ErrorBoundary } from '@opengeoweb/shared';
|
|
10
9
|
import { polygonToLineString, booleanClockwise, rewind } from '@turf/turf';
|
|
11
10
|
import { DrawFIRLand, ChevronLeft, Edit, Success, Clock } from '@opengeoweb/theme';
|
|
12
11
|
import { LayerType, webmapUtils } from '@opengeoweb/webmap';
|
|
@@ -14,6 +13,7 @@ import moment from 'moment';
|
|
|
14
13
|
import { debounce } from 'lodash';
|
|
15
14
|
import 'react-dom';
|
|
16
15
|
import { mapSelectors, syncGroupsActions, mapStoreActions, defaultLayers, syncConstants } from '@opengeoweb/store';
|
|
16
|
+
import { LayerManagerMapButtonConnect, LegendMapButtonConnect, MultiDimensionSelectMapButtonsConnect, MapViewConnect, TimeSliderConnect, LegendConnect, LayerManagerConnect } from '@opengeoweb/core';
|
|
17
17
|
import { jsx } from 'react/jsx-runtime';
|
|
18
18
|
|
|
19
19
|
function _iterableToArrayLimit(r, l) {
|
|
@@ -502,6 +502,7 @@ var ProductStatusDescription;
|
|
|
502
502
|
ProductStatusDescription["PUBLISHED"] = "Published";
|
|
503
503
|
ProductStatusDescription["CANCELLED"] = "Cancelled";
|
|
504
504
|
ProductStatusDescription["EXPIRED"] = "Expired";
|
|
505
|
+
ProductStatusDescription["DISCARDED"] = "Discarded";
|
|
505
506
|
})(ProductStatusDescription || (ProductStatusDescription = {}));
|
|
506
507
|
var CloudLevelUnits;
|
|
507
508
|
(function (CloudLevelUnits) {
|
|
@@ -774,65 +775,6 @@ var Change = function Change(_ref) {
|
|
|
774
775
|
}))));
|
|
775
776
|
};
|
|
776
777
|
|
|
777
|
-
/* *
|
|
778
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
779
|
-
* you may not use this file except in compliance with the License.
|
|
780
|
-
* You may obtain a copy of the License at
|
|
781
|
-
*
|
|
782
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
783
|
-
*
|
|
784
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
785
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
786
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
787
|
-
* See the License for the specific language governing permissions and
|
|
788
|
-
* limitations under the License.
|
|
789
|
-
*
|
|
790
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
791
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
792
|
-
* */
|
|
793
|
-
var styles$1 = {
|
|
794
|
-
radioInput: {
|
|
795
|
-
padding: 1,
|
|
796
|
-
borderRadius: '5px',
|
|
797
|
-
backgroundColor: 'geowebColors.buttons.tool.default.fill',
|
|
798
|
-
color: 'geowebColors.buttons.tool.default.color',
|
|
799
|
-
'&.Mui-checked': {
|
|
800
|
-
backgroundColor: 'geowebColors.buttons.primary.default.fill',
|
|
801
|
-
color: 'geowebColors.buttons.primary.default.color'
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
};
|
|
805
|
-
var DrawTools = function DrawTools(_ref) {
|
|
806
|
-
var activeTool = _ref.activeTool,
|
|
807
|
-
tools = _ref.tools,
|
|
808
|
-
onChangeTool = _ref.onChangeTool;
|
|
809
|
-
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
810
|
-
item: true,
|
|
811
|
-
xs: 12,
|
|
812
|
-
container: true,
|
|
813
|
-
justifyContent: "space-between",
|
|
814
|
-
"data-testid": "drawtools",
|
|
815
|
-
spacing: 1
|
|
816
|
-
}, tools.map(function (tool) {
|
|
817
|
-
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
818
|
-
key: tool.id,
|
|
819
|
-
item: true
|
|
820
|
-
}, /*#__PURE__*/React__default.createElement(CustomTooltip, {
|
|
821
|
-
title: tool.title
|
|
822
|
-
}, /*#__PURE__*/React__default.createElement(Radio, {
|
|
823
|
-
icon: tool.icon,
|
|
824
|
-
value: true,
|
|
825
|
-
checkedIcon: tool.icon,
|
|
826
|
-
checked: tool.isSelectable && activeTool === tool.id,
|
|
827
|
-
onChange: function onChange() {
|
|
828
|
-
onChangeTool(tool);
|
|
829
|
-
},
|
|
830
|
-
"data-testid": tool.id,
|
|
831
|
-
sx: styles$1.radioInput
|
|
832
|
-
})));
|
|
833
|
-
}));
|
|
834
|
-
};
|
|
835
|
-
|
|
836
778
|
function n$5(n){for(var r=arguments.length,t=Array(r>1?r-1:0),e=1;e<r;e++)t[e-1]=arguments[e];if("production"!==process.env.NODE_ENV){var i=Y[n],o=i?"function"==typeof i?i.apply(null,t):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+n+(t.length?" "+t.map((function(n){return "'"+n+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r$5(n){return !!n&&!!n[Q]}function t$5(n){var r;return !!n&&(function(n){if(!n||"object"!=typeof n)return !1;var r=Object.getPrototypeOf(n);if(null===r)return !0;var t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return t===Object||"function"==typeof t&&Function.toString.call(t)===Z}(n)||Array.isArray(n)||!!n[L]||!!(null===(r=n.constructor)||void 0===r?void 0:r[L])||s(n)||v$4(n))}function i(n,r,t){void 0===t&&(t=!1),0===o(n)?(t?Object.keys:nn)(n).forEach((function(e){t&&"symbol"==typeof e||r(e,n[e],n);})):n.forEach((function(t,e){return r(e,t,n)}));}function o(n){var r=n[Q];return r?r.i>3?r.i-4:r.i:Array.isArray(n)?1:s(n)?2:v$4(n)?3:0}function u$3(n,r){return 2===o(n)?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function a(n,r){return 2===o(n)?n.get(r):n[r]}function f$3(n,r,t){var e=o(n);2===e?n.set(r,t):3===e?n.add(t):n[r]=t;}function c$3(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v$4(n){return q$5&&n instanceof Set}function p$5(n){return n.o||n.t}function l$4(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e<t.length;e++){var i=t[e],o=r[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]});}return Object.create(Object.getPrototypeOf(n),r)}function d$3(n,e){return void 0===e&&(e=!1),y$2(n)||r$5(n)||!t$5(n)||(o(n)>1&&(n.set=n.add=n.clear=n.delete=h$5),Object.freeze(n),e&&i(n,(function(n,r){return d$3(r,!0)}),!0)),n}function h$5(){n$5(2);}function y$2(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b$3(r){var t=tn[r];return t||n$5(18,r),t}function _(){return "production"===process.env.NODE_ENV||U||n$5(0),U}function j(n,r){r&&(b$3("Patches"),n.u=[],n.s=[],n.v=r);}function g$3(n){O(n),n.p.forEach(S),n.p=null;}function O(n){n===U&&(U=n.l);}function w$3(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.g=!0;}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.O||b$3("ES5").S(e,r,o),o?(i[Q].P&&(g$3(e),n$5(4)),t$5(r)&&(r=M(e,r),e.l||x$2(e,r)),e.u&&b$3("Patches").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),g$3(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y$2(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A$2(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x$2(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l$4(e.k):e.o,u=o,a=!1;3===e.i&&(u=new Set(o),o.clear(),a=!0),i(u,(function(r,i){return A$2(n,e,o,r,i,t,a)})),x$2(n,o,!1),t&&n.u&&b$3("Patches").N(e,t,n.u,n.s);}return e.o}function A$2(e,i,o,a,c,s,v){if("production"!==process.env.NODE_ENV&&c===o&&n$5(5),r$5(c)){var p=M(e,c,s&&i&&3!==i.i&&!u$3(i.R,a)?s.concat(a):void 0);if(f$3(o,a,p),!r$5(p))return;e.m=!1;}else v&&o.add(c);if(t$5(c)&&!y$2(c)){if(!e.h.D&&e._<1)return;M(e,c),i&&i.A.l||x$2(e,c);}}function x$2(n,r,t){void 0===t&&(t=!1),!n.l&&n.h.D&&n.m&&d$3(r,t);}function z$2(n,r){var t=n[Q];return (t?p$5(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t);}}function k$4(n){n.P||(n.P=!0,n.l&&k$4(n.l));}function E(n){n.o||(n.o=l$4(n.t));}function N(n,r,t){var e=s(r)?b$3("MapSet").F(r,t):v$4(r)?b$3("MapSet").T(r,t):n.O?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,R:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b$3("ES5").J(r,t);return (t?t.A:_()).p.push(e),e}function R(e){return r$5(e)||n$5(22,e),function n(r){if(!t$5(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b$3("ES5").K(u)))return u.t;u.I=!0,e=D(r,c),u.I=!1;}else e=D(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f$3(e,r,n(t));})),3===c?new Set(e):e}(e)}function D(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l$4(n)}var G,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X="undefined"!=typeof Map,q$5="undefined"!=typeof Set,B="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=W?Symbol.for("immer-nothing"):((G={})["immer-nothing"]=!0,G),L=W?Symbol.for("immer-draftable"):"__$immer_draftable",Q=W?Symbol.for("immer-state"):"__$immer_state",Y={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return "Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return "Unsupported patch operation: "+n},18:function(n){return "The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(n){return "produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+n+"'"},22:function(n){return "'current' expects a draft, got: "+n},23:function(n){return "'original' expects a draft, got: "+n},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Z=""+Object.prototype.constructor,nn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,rn=Object.getOwnPropertyDescriptors||function(n){var r={};return nn(n).forEach((function(t){r[t]=Object.getOwnPropertyDescriptor(n,t);})),r},tn={},en={get:function(n,r){if(r===Q)return n;var e=p$5(n);if(!u$3(e,r))return function(n,r,t){var e,i=I(r,t);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,r);var i=e[r];return n.I||!t$5(i)?i:i===z$2(n.t,r)?(E(n),n.o[r]=N(n.A.h,i,n)):i},has:function(n,r){return r in p$5(n)},ownKeys:function(n){return Reflect.ownKeys(p$5(n))},set:function(n,r,t){var e=I(p$5(n),r);if(null==e?void 0:e.set)return e.set.call(n.k,t),!0;if(!n.P){var i=z$2(p$5(n),r),o=null==i?void 0:i[Q];if(o&&o.t===t)return n.o[r]=t,n.R[r]=!1,!0;if(c$3(t,i)&&(void 0!==t||u$3(n.t,r)))return !0;E(n),k$4(n);}return n.o[r]===t&&(void 0!==t||r in n.o)||Number.isNaN(t)&&Number.isNaN(n.o[r])||(n.o[r]=t,n.R[r]=!0),!0},deleteProperty:function(n,r){return void 0!==z$2(n.t,r)||r in n.t?(n.R[r]=!1,E(n),k$4(n)):delete n.R[r],n.o&&delete n.o[r],!0},getOwnPropertyDescriptor:function(n,r){var t=p$5(n),e=Reflect.getOwnPropertyDescriptor(t,r);return e?{writable:!0,configurable:1!==n.i||"length"!==r,enumerable:e.enumerable,value:t[r]}:e},defineProperty:function(){n$5(11);},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n$5(12);}},on={};i(en,(function(n,r){on[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)};})),on.deleteProperty=function(r,t){return "production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&n$5(13),on.set.call(this,r,t,void 0)},on.set=function(r,t,e){return "production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&n$5(14),en.set.call(this,r[0],t,e,r[0])};var un=function(){function e(r){var e=this;this.O=B,this.D=!0,this.produce=function(r,i,o){if("function"==typeof r&&"function"!=typeof i){var u=i;i=r;var a=e;return function(n){var r=this;void 0===n&&(n=u);for(var t=arguments.length,e=Array(t>1?t-1:0),o=1;o<t;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var t;return (t=i).call.apply(t,[r,n].concat(e))}))}}var f;if("function"!=typeof i&&n$5(6),void 0!==o&&"function"!=typeof o&&n$5(7),t$5(r)){var c=w$3(e),s=N(e,r,void 0),v=!0;try{f=i(s),v=!1;}finally{v?g$3(c):O(c);}return "undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw g$3(c),n})):(j(c,o),P(f,c))}if(!r||"object"!=typeof r){if(void 0===(f=i(r))&&(f=r),f===H&&(f=void 0),e.D&&d$3(f,!0),o){var p=[],l=[];b$3("Patches").M(r,f,p,l),o(p,l);}return f}n$5(21,r);},this.produceWithPatches=function(n,r){if("function"==typeof n)return function(r){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];return e.produceWithPatches(r,(function(r){return n.apply(void 0,[r].concat(i))}))};var t,i,o=e.produce(n,r,(function(n,r){t=n,i=r;}));return "undefined"!=typeof Promise&&o instanceof Promise?o.then((function(n){return [n,t,i]})):[o,t,i]},"boolean"==typeof(null==r?void 0:r.useProxies)&&this.setUseProxies(r.useProxies),"boolean"==typeof(null==r?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze);}var i=e.prototype;return i.createDraft=function(e){t$5(e)||n$5(8),r$5(e)&&(e=R(e));var i=w$3(this),o=N(this,e,void 0);return o[Q].C=!0,O(i),o},i.finishDraft=function(r,t){var e=r&&r[Q];"production"!==process.env.NODE_ENV&&(e&&e.C||n$5(9),e.I&&n$5(10));var i=e.A;return j(i,t),P(void 0,i)},i.setAutoFreeze=function(n){this.D=n;},i.setUseProxies=function(r){r&&!B&&n$5(20),this.O=r;},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}e>-1&&(t=t.slice(e+1));var o=b$3("Patches").$;return r$5(n)?o(n,t):this.produce(n,(function(n){return o(n,t)}))},e}(),an=new un,fn=an.produce;an.produceWithPatches.bind(an);an.setAutoFreeze.bind(an);an.setUseProxies.bind(an);an.applyPatches.bind(an);an.createDraft.bind(an);an.finishDraft.bind(an);
|
|
837
779
|
|
|
838
780
|
/* *
|
|
@@ -860,7 +802,7 @@ var srsAndBboxDefault = {
|
|
|
860
802
|
},
|
|
861
803
|
srs: 'EPSG:3857'
|
|
862
804
|
};
|
|
863
|
-
var featurePropsStart =
|
|
805
|
+
var featurePropsStart = defaultGeoJSONStyleProperties;
|
|
864
806
|
var featurePropsEnd = {
|
|
865
807
|
stroke: '#6e1e91',
|
|
866
808
|
'stroke-width': 1.5,
|
|
@@ -1158,7 +1100,7 @@ var prepareFormValues = function prepareFormValues(product) {
|
|
|
1158
1100
|
// check if nested object has value
|
|
1159
1101
|
if (_typeof(value) === 'object' && value !== null && value !== undefined) {
|
|
1160
1102
|
var hasNaNValue = Object.keys(value).reduce(function (total, valKey) {
|
|
1161
|
-
return !hasValue(value[valKey]) || total;
|
|
1103
|
+
return !hasValue(String(value[valKey])) || total;
|
|
1162
1104
|
}, false);
|
|
1163
1105
|
return Object.assign(Object.assign({}, list), !hasNaNValue && _defineProperty({}, key, value));
|
|
1164
1106
|
}
|
|
@@ -1344,11 +1286,10 @@ var getDrawTools = function getDrawTools(type, firShape) {
|
|
|
1344
1286
|
title: "Draw a shape as ".concat(type, " position"),
|
|
1345
1287
|
shape: getShapeWithProperties(defaultPolygon.shape, defaultStyleProperties)
|
|
1346
1288
|
}), {
|
|
1347
|
-
|
|
1289
|
+
drawModeId: firID,
|
|
1348
1290
|
title: "Set FIR as ".concat(type, " position"),
|
|
1349
1291
|
isSelectable: false,
|
|
1350
1292
|
value: DRAWMODE.POLYGON,
|
|
1351
|
-
icon: /*#__PURE__*/React.createElement(DrawFIRLand, null),
|
|
1352
1293
|
shape: addFeatureProperties(firShape, defaultStyleProperties)
|
|
1353
1294
|
}, Object.assign(Object.assign({}, defaultDelete), {
|
|
1354
1295
|
title: 'Remove geometry'
|
|
@@ -1356,7 +1297,7 @@ var getDrawTools = function getDrawTools(type, firShape) {
|
|
|
1356
1297
|
};
|
|
1357
1298
|
var updateDrawToolsWithFir = function updateDrawToolsWithFir(drawTools, newFirShape) {
|
|
1358
1299
|
return drawTools.map(function (mode) {
|
|
1359
|
-
if (mode.
|
|
1300
|
+
if (mode.drawModeId === firID) {
|
|
1360
1301
|
return Object.assign(Object.assign({}, mode), {
|
|
1361
1302
|
shape: newFirShape
|
|
1362
1303
|
});
|
|
@@ -1364,6 +1305,75 @@ var updateDrawToolsWithFir = function updateDrawToolsWithFir(drawTools, newFirSh
|
|
|
1364
1305
|
return mode;
|
|
1365
1306
|
});
|
|
1366
1307
|
};
|
|
1308
|
+
var getToolIcon = function getToolIcon(id) {
|
|
1309
|
+
var defaultIcon = getIcon(id);
|
|
1310
|
+
if (defaultIcon) {
|
|
1311
|
+
return defaultIcon;
|
|
1312
|
+
}
|
|
1313
|
+
if (id === firID) {
|
|
1314
|
+
return /*#__PURE__*/React.createElement(DrawFIRLand, null);
|
|
1315
|
+
}
|
|
1316
|
+
return /*#__PURE__*/React.createElement(DrawFIRLand, null);
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1319
|
+
/* *
|
|
1320
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1321
|
+
* you may not use this file except in compliance with the License.
|
|
1322
|
+
* You may obtain a copy of the License at
|
|
1323
|
+
*
|
|
1324
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1325
|
+
*
|
|
1326
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1327
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1328
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1329
|
+
* See the License for the specific language governing permissions and
|
|
1330
|
+
* limitations under the License.
|
|
1331
|
+
*
|
|
1332
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1333
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
1334
|
+
* */
|
|
1335
|
+
var styles$1 = {
|
|
1336
|
+
radioInput: {
|
|
1337
|
+
padding: 1,
|
|
1338
|
+
borderRadius: '5px',
|
|
1339
|
+
backgroundColor: 'geowebColors.buttons.tool.default.fill',
|
|
1340
|
+
color: 'geowebColors.buttons.tool.default.color',
|
|
1341
|
+
'&.Mui-checked': {
|
|
1342
|
+
backgroundColor: 'geowebColors.buttons.primary.default.fill',
|
|
1343
|
+
color: 'geowebColors.buttons.primary.default.color'
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
};
|
|
1347
|
+
var DrawTools = function DrawTools(_ref) {
|
|
1348
|
+
var activeTool = _ref.activeTool,
|
|
1349
|
+
tools = _ref.tools,
|
|
1350
|
+
onChangeTool = _ref.onChangeTool;
|
|
1351
|
+
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
1352
|
+
item: true,
|
|
1353
|
+
xs: 12,
|
|
1354
|
+
container: true,
|
|
1355
|
+
justifyContent: "space-between",
|
|
1356
|
+
"data-testid": "drawtools",
|
|
1357
|
+
spacing: 1
|
|
1358
|
+
}, tools.map(function (tool) {
|
|
1359
|
+
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
1360
|
+
key: tool.drawModeId,
|
|
1361
|
+
item: true
|
|
1362
|
+
}, /*#__PURE__*/React__default.createElement(CustomTooltip, {
|
|
1363
|
+
title: tool.title
|
|
1364
|
+
}, /*#__PURE__*/React__default.createElement(Radio, {
|
|
1365
|
+
icon: getToolIcon(tool.drawModeId),
|
|
1366
|
+
value: true,
|
|
1367
|
+
checkedIcon: getToolIcon(tool.drawModeId),
|
|
1368
|
+
checked: tool.isSelectable && activeTool === tool.drawModeId,
|
|
1369
|
+
onChange: function onChange() {
|
|
1370
|
+
onChangeTool(tool);
|
|
1371
|
+
},
|
|
1372
|
+
"data-testid": tool.drawModeId,
|
|
1373
|
+
sx: styles$1.radioInput
|
|
1374
|
+
})));
|
|
1375
|
+
}));
|
|
1376
|
+
};
|
|
1367
1377
|
|
|
1368
1378
|
/* *
|
|
1369
1379
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -2001,7 +2011,7 @@ var Phenomenon = function Phenomenon(_ref) {
|
|
|
2001
2011
|
return /*#__PURE__*/React__default.createElement(MenuItem, {
|
|
2002
2012
|
value: key,
|
|
2003
2013
|
key: key
|
|
2004
|
-
}, phenomenaList[key]);
|
|
2014
|
+
}, productType === 'sigmet' ? phenomenaList[key] : phenomenaList[key]);
|
|
2005
2015
|
})));
|
|
2006
2016
|
};
|
|
2007
2017
|
|
|
@@ -8856,6 +8866,7 @@ var ProductListRow = function ProductListRow(_ref2) {
|
|
|
8856
8866
|
var apiCall = productType === 'sigmet' ? api.getSigmetTAC : api.getAirmetTAC;
|
|
8857
8867
|
React__default.useEffect(function () {
|
|
8858
8868
|
var retrieveTAC = function retrieveTAC(productToPost) {
|
|
8869
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8859
8870
|
apiCall(productToPost).then(function (result) {
|
|
8860
8871
|
if (isMounted.current) {
|
|
8861
8872
|
setTAC(result.data);
|
|
@@ -9116,7 +9127,7 @@ var ProductList = function ProductList(_ref) {
|
|
|
9116
9127
|
containerType: 'inline-size'
|
|
9117
9128
|
}
|
|
9118
9129
|
}, productList.map(function (productListItem, index) {
|
|
9119
|
-
var product = productListItem[productType];
|
|
9130
|
+
var product = productType === 'sigmet' ? productListItem[productType] : productListItem[productType];
|
|
9120
9131
|
return /*#__PURE__*/React__default.createElement(ListItemButton, {
|
|
9121
9132
|
"data-testid": "productListItem",
|
|
9122
9133
|
onClick: function onClick() {
|
|
@@ -14072,7 +14083,7 @@ var ProductFormDialog = function ProductFormDialog(_ref) {
|
|
|
14072
14083
|
if (!isOpen) {
|
|
14073
14084
|
return null;
|
|
14074
14085
|
}
|
|
14075
|
-
var product = productListItem !== null ? prepareProductValues(productListItem[productType], productType, productConfig) : null;
|
|
14086
|
+
var product = productListItem !== null ? prepareProductValues(productType === 'sigmet' ? productListItem[productType] : productListItem[productType], productType, productConfig) : null;
|
|
14076
14087
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
14077
14088
|
isOpen: isOpen,
|
|
14078
14089
|
toggleDialogStatus: toggleDialogStatus,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@mui/material": "5.12.0",
|
|
15
15
|
"@mui/system": "5.14.8",
|
|
16
|
-
"@opengeoweb/api": "
|
|
17
|
-
"@opengeoweb/authentication": "
|
|
18
|
-
"@opengeoweb/core": "
|
|
19
|
-
"@opengeoweb/form-fields": "
|
|
20
|
-
"@opengeoweb/shared": "
|
|
21
|
-
"@opengeoweb/store": "
|
|
22
|
-
"@opengeoweb/theme": "
|
|
23
|
-
"@opengeoweb/webmap": "
|
|
24
|
-
"@opengeoweb/webmap-react": "
|
|
16
|
+
"@opengeoweb/api": "8.0.0",
|
|
17
|
+
"@opengeoweb/authentication": "8.0.0",
|
|
18
|
+
"@opengeoweb/core": "8.0.0",
|
|
19
|
+
"@opengeoweb/form-fields": "8.0.0",
|
|
20
|
+
"@opengeoweb/shared": "8.0.0",
|
|
21
|
+
"@opengeoweb/store": "8.0.0",
|
|
22
|
+
"@opengeoweb/theme": "8.0.0",
|
|
23
|
+
"@opengeoweb/webmap": "8.0.0",
|
|
24
|
+
"@opengeoweb/webmap-react": "8.0.0",
|
|
25
25
|
"@redux-eggs/redux-toolkit": "2.2.0",
|
|
26
26
|
"@redux-eggs/saga-extension": "2.2.0",
|
|
27
27
|
"@reduxjs/toolkit": "1.9.5",
|
package/src/index.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
3
3
|
interface DrawToolsProps {
|
|
4
4
|
activeTool: string;
|
|
5
|
-
tools:
|
|
6
|
-
onChangeTool: (newToolMode:
|
|
5
|
+
tools: DrawMode[];
|
|
6
|
+
onChangeTool: (newToolMode: DrawMode) => void;
|
|
7
7
|
}
|
|
8
8
|
declare const DrawTools: React.FC<DrawToolsProps>;
|
|
9
9
|
export default DrawTools;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
3
3
|
import { ConfigurableFormFieldProps, ProductConfig } from '../../../types';
|
|
4
4
|
export declare const DEFAULT_ROUNDING_MOVEMENT_KT = 5;
|
|
5
5
|
export declare const DEFAULT_ROUNDING_MOVEMENT_KMH = 10;
|
|
@@ -13,8 +13,8 @@ interface ProgressProps extends ConfigurableFormFieldProps {
|
|
|
13
13
|
geoJSON?: GeoJSON.FeatureCollection;
|
|
14
14
|
geoJSONIntersection?: GeoJSON.FeatureCollection;
|
|
15
15
|
activeTool?: string;
|
|
16
|
-
tools?:
|
|
17
|
-
onChangeTool?: (newToolMode:
|
|
16
|
+
tools?: DrawMode[];
|
|
17
|
+
onChangeTool?: (newToolMode: DrawMode) => void;
|
|
18
18
|
}
|
|
19
19
|
declare const Progress: React.FC<ProgressProps>;
|
|
20
20
|
export default Progress;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
3
3
|
export declare const coordinatesEmptyMessage = "A start position drawing is required";
|
|
4
4
|
export declare const noIntersectionMessage = "The start position needs to be (partly) inside the FIR";
|
|
5
5
|
export declare const maximum6PointsMessage = "The start position drawing allows a maximum of 6 individual points";
|
|
@@ -11,8 +11,8 @@ interface StartGeometryProps {
|
|
|
11
11
|
geoJSON: GeoJSON.FeatureCollection;
|
|
12
12
|
geoJSONIntersection: GeoJSON.FeatureCollection | undefined;
|
|
13
13
|
activeTool: string;
|
|
14
|
-
tools:
|
|
15
|
-
onChangeTool: (newToolMode:
|
|
14
|
+
tools: DrawMode[];
|
|
15
|
+
onChangeTool: (newToolMode: DrawMode) => void;
|
|
16
16
|
}
|
|
17
17
|
declare const StartGeometry: React.FC<StartGeometryProps>;
|
|
18
18
|
export default StartGeometry;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ import { Feature } from '@turf/turf';
|
|
|
3
3
|
import { FeatureCollection } from 'geojson';
|
|
4
4
|
import { FieldValues, UseFormGetValues, UseFormTrigger } from 'react-hook-form';
|
|
5
5
|
import { layerTypes, mapTypes } from '@opengeoweb/store';
|
|
6
|
-
import {
|
|
6
|
+
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
7
7
|
import { LevelUnits, ATSRLocation, ICAOLocation, ProductStatus, CancelSigmet, Sigmet, ProductCanbe, SigmetFromBackend, SigmetFromFrontend, ProductActions, Airmet, CancelAirmet, ProductConfig, Firareas, FIRConfigSigmet, AirmetFromBackend, AirmetFromFrontend, ProductType, AviationProduct, FIRLocationGeoJson, AirmetConfig, FIRConfigAirmet, StartOrEndDrawing } from '../../types';
|
|
8
8
|
export declare const getHoursBeforeValidity: (phenomenon: string, fir: string, config: ProductConfig) => number;
|
|
9
9
|
export declare const getMaxHoursOfValidity: (phenomenon: string, fir: string, config: ProductConfig) => number;
|
|
@@ -14,11 +14,11 @@ export declare const getActiveFIRArea: (selectedFIR: string, productConfig: Prod
|
|
|
14
14
|
export declare const DEFAULT_MINIMUM_SURFACE_LEVEL = 0;
|
|
15
15
|
export declare const getMinCloudLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
16
16
|
export declare const getMinCloudLowerLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
17
|
-
export declare const getMaxCloudLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
18
|
-
export declare const getMaxCloudLowerLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
17
|
+
export declare const getMaxCloudLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number | null;
|
|
18
|
+
export declare const getMaxCloudLowerLevelValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number | null;
|
|
19
19
|
export declare const getMaxLevelValue: (unit: string, selectedFIR: string, productConfig: ProductConfig) => number | null;
|
|
20
20
|
export declare const getMinLevelValue: (unit: string, selectedFIR: string, productConfig: ProductConfig) => number;
|
|
21
|
-
export declare const getMaxWindSpeedValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
21
|
+
export declare const getMaxWindSpeedValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number | null;
|
|
22
22
|
export declare const DEFAULT_MIN_WIND_SPEED = 0;
|
|
23
23
|
export declare const getMinWindSpeedValue: (unit: string, selectedFIR: string, productConfig: AirmetConfig) => number;
|
|
24
24
|
export declare const getMaxVisibilityValue: (selectedFIR: string, productConfig: AirmetConfig) => number | null;
|
|
@@ -33,7 +33,7 @@ export declare const getLevelInFeet: (level: number, unit: string) => number;
|
|
|
33
33
|
export declare const isLevelLower: (ownValue: number | string, ownUnit: LevelUnits, otherValue: number, otherUnit: LevelUnits) => boolean;
|
|
34
34
|
export declare const getDialogtitle: (product: AviationProduct, productType: ProductType) => string;
|
|
35
35
|
export declare const getProductFormMode: (canBeOptions: ProductCanbe[], productListItem: SigmetFromBackend | AirmetFromBackend) => string;
|
|
36
|
-
export declare const getProductFormLifecycleButtons:
|
|
36
|
+
export declare const getProductFormLifecycleButtons: React.FC;
|
|
37
37
|
export declare const hasValue: (value: number | string) => boolean;
|
|
38
38
|
export declare const prepareFormValues: <T extends AviationProduct>(product: T) => T;
|
|
39
39
|
export declare const createSigmetPostParameter: (sigmetToPost: Sigmet | CancelSigmet, newStatus: ProductStatus, previousUuid: string) => SigmetFromFrontend;
|
|
@@ -65,5 +65,6 @@ export declare const triggerValidations: (fieldNames: string[], getValues: UseFo
|
|
|
65
65
|
export declare const getProjection: (productConfig: ProductConfig) => mapTypes.MapPreset['proj'];
|
|
66
66
|
export declare const getShapeWithProperties: (shape: GeoJSON.Feature, properties: GeoJSON.GeoJsonProperties) => GeoJSON.Feature;
|
|
67
67
|
export declare const firID = "drawtools-fir";
|
|
68
|
-
export declare const getDrawTools: (type: StartOrEndDrawing, firShape: GeoJSON.FeatureCollection) =>
|
|
69
|
-
export declare const updateDrawToolsWithFir: (drawTools:
|
|
68
|
+
export declare const getDrawTools: (type: StartOrEndDrawing, firShape: GeoJSON.FeatureCollection) => DrawMode[];
|
|
69
|
+
export declare const updateDrawToolsWithFir: (drawTools: DrawMode[], newFirShape: GeoJSON.FeatureCollection) => DrawMode[];
|
|
70
|
+
export declare const getToolIcon: (id: string) => React.ReactElement;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/lib/types.d.ts
CHANGED
|
@@ -92,13 +92,14 @@ export type DateType = string;
|
|
|
92
92
|
*
|
|
93
93
|
* Note: ProductStatus from the backend should be refreshed regularly to display status updates.
|
|
94
94
|
*/
|
|
95
|
-
export type ProductStatus = 'DRAFT' | 'PUBLISHED' | 'CANCELLED' | 'EXPIRED';
|
|
95
|
+
export type ProductStatus = 'DRAFT' | 'PUBLISHED' | 'CANCELLED' | 'EXPIRED' | 'DISCARDED';
|
|
96
96
|
export type ProductActions = 'DRAFT' | 'PUBLISHED' | 'CANCELLED' | 'EXPIRED' | 'DISCARDED' | 'CLOSED';
|
|
97
97
|
export declare enum ProductStatusDescription {
|
|
98
98
|
'DRAFT' = "Draft",
|
|
99
99
|
'PUBLISHED' = "Published",
|
|
100
100
|
'CANCELLED' = "Cancelled",
|
|
101
|
-
'EXPIRED' = "Expired"
|
|
101
|
+
'EXPIRED' = "Expired",
|
|
102
|
+
'DISCARDED' = "Discarded"
|
|
102
103
|
}
|
|
103
104
|
/**
|
|
104
105
|
* A Cancel Sigmet/Airmet (a sigmet/airmet which cancels another sigmet/airmet) can only have the status 'PUBLISHED',
|
package/src/lib/utils/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateApiProps } from '@opengeoweb/api';
|
|
2
2
|
import { Airmet, AirmetFromBackend, AirmetFromFrontend, ProductConfig, Sigmet, SigmetFromBackend, SigmetFromFrontend } from '../types';
|
|
3
3
|
export type SigmetAirmetApi = {
|
|
4
|
-
getSigmetConfiguration: (productConfigKey:
|
|
4
|
+
getSigmetConfiguration: (productConfigKey: string) => Promise<{
|
|
5
5
|
data: ProductConfig;
|
|
6
6
|
}>;
|
|
7
7
|
getSigmetList: () => Promise<{
|
|
@@ -11,7 +11,7 @@ export type SigmetAirmetApi = {
|
|
|
11
11
|
getSigmetTAC: (sigmetData: Sigmet) => Promise<{
|
|
12
12
|
data: string;
|
|
13
13
|
}>;
|
|
14
|
-
getAirmetConfiguration: (
|
|
14
|
+
getAirmetConfiguration: (productConfigKey: string) => Promise<{
|
|
15
15
|
data: ProductConfig;
|
|
16
16
|
}>;
|
|
17
17
|
getAirmetList: () => Promise<{
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/lib/utils/store.d.ts
CHANGED
|
File without changes
|
|
File without changes
|