@opengeoweb/sigmet-airmet 8.4.1 → 9.1.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 +28 -27
- package/package.json +2 -27
- package/src/lib/components/ComponentsLookUp/AviationProductApiWrapper.d.ts +1 -1
- package/src/lib/components/MetInfoWrapper/DownloadSigmetAirmetConfigWrapper.d.ts +1 -1
- package/src/lib/components/ProductForms/utils.d.ts +0 -3
- package/src/lib/utils/api.d.ts +2 -2
package/index.esm.js
CHANGED
|
@@ -4,16 +4,16 @@ 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 { defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultPoint, defaultBox, defaultPolygon, DRAWMODE, addFeatureProperties, defaultDelete, getIcon, MapControls, MapViewLayer, useMapDrawTool } from '@opengeoweb/webmap-react';
|
|
7
|
+
import { defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultPoint, defaultBox, defaultPolygon, DRAWMODE, addFeatureProperties, defaultDelete, getIcon, MapControls, MapViewLayer, useMapDrawTool, rewindGeometry } from '@opengeoweb/webmap-react';
|
|
8
8
|
import { dateUtils, ToggleMenu, CustomTooltip, useIsMounted, StatusTag, AlertBanner, ConfirmationServiceProvider, usePreventBrowserClose, useConfirmationDialog, isAxiosError, getAxiosErrorMessage, usePoller, ErrorBoundary } from '@opengeoweb/shared';
|
|
9
|
-
import { polygonToLineString, booleanClockwise, rewind } from '@turf/turf';
|
|
10
9
|
import { DrawFIRLand, ChevronLeft, Edit, Success, Clock } from '@opengeoweb/theme';
|
|
11
10
|
import { LayerType, webmapUtils } from '@opengeoweb/webmap';
|
|
12
11
|
import moment from 'moment';
|
|
13
12
|
import { debounce } from 'lodash';
|
|
14
13
|
import 'react-dom';
|
|
15
14
|
import { mapSelectors, syncGroupsActions, mapStoreActions, defaultLayers, syncConstants } from '@opengeoweb/store';
|
|
16
|
-
import { LayerManagerMapButtonConnect, LegendMapButtonConnect, MultiDimensionSelectMapButtonsConnect, MapViewConnect,
|
|
15
|
+
import { LayerManagerMapButtonConnect, LegendMapButtonConnect, MultiDimensionSelectMapButtonsConnect, MapViewConnect, LegendConnect, LayerManagerConnect } from '@opengeoweb/core';
|
|
16
|
+
import { TimeSliderConnect } from '@opengeoweb/timeslider';
|
|
17
17
|
import { jsx } from 'react/jsx-runtime';
|
|
18
18
|
|
|
19
19
|
function _iterableToArrayLimit(r, l) {
|
|
@@ -814,8 +814,6 @@ var Change = function Change(_ref) {
|
|
|
814
814
|
}))));
|
|
815
815
|
};
|
|
816
816
|
|
|
817
|
-
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);
|
|
818
|
-
|
|
819
817
|
/* *
|
|
820
818
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
821
819
|
* you may not use this file except in compliance with the License.
|
|
@@ -1262,18 +1260,6 @@ var getFir = function getFir(productConfig, firName) {
|
|
|
1262
1260
|
var isFir = function isFir(geojson) {
|
|
1263
1261
|
return geojson && geojson.features && geojson.features.length > 0 && geojson.features[0].properties['selectionType'] === 'fir';
|
|
1264
1262
|
};
|
|
1265
|
-
var rewindGeometry = function rewindGeometry(geoJSON) {
|
|
1266
|
-
return fn(geoJSON, function (geoJSONDraft) {
|
|
1267
|
-
if (geoJSONDraft && geoJSONDraft.features.length > 0 && geoJSONDraft.features[0].geometry.type === 'Polygon' && geoJSONDraft.features[0].geometry.coordinates[0].length > 1) {
|
|
1268
|
-
var geometry = geoJSON.features[0].geometry;
|
|
1269
|
-
var lineString = polygonToLineString(geometry);
|
|
1270
|
-
if (booleanClockwise(lineString.geometry.coordinates)) {
|
|
1271
|
-
// eslint-disable-next-line no-param-reassign
|
|
1272
|
-
geoJSONDraft.features[0].geometry = rewind(geoJSONDraft.features[0].geometry);
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
});
|
|
1276
|
-
};
|
|
1277
1263
|
var getFieldLabel = function getFieldLabel(title, isDisabled) {
|
|
1278
1264
|
var action = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Select';
|
|
1279
1265
|
return isDisabled ? title : "".concat(action, " ").concat(title.toLowerCase());
|
|
@@ -1407,7 +1393,7 @@ var DrawTools = function DrawTools(_ref) {
|
|
|
1407
1393
|
icon: getToolIcon(tool.drawModeId),
|
|
1408
1394
|
value: true,
|
|
1409
1395
|
checkedIcon: getToolIcon(tool.drawModeId),
|
|
1410
|
-
checked:
|
|
1396
|
+
checked: activeTool === tool.drawModeId,
|
|
1411
1397
|
onChange: function onChange() {
|
|
1412
1398
|
onChangeTool(tool);
|
|
1413
1399
|
},
|
|
@@ -2520,16 +2506,20 @@ var SelectFIR = function SelectFIR(_ref) {
|
|
|
2520
2506
|
}, fir.FIR);
|
|
2521
2507
|
})), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
2522
2508
|
name: "locationIndicatorATSU",
|
|
2523
|
-
defaultValue: locationIndicatorATSU
|
|
2509
|
+
defaultValue: locationIndicatorATSU,
|
|
2510
|
+
"data-testid": "locationIndicatorATSU"
|
|
2524
2511
|
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
2525
2512
|
name: "locationIndicatorMWO",
|
|
2526
|
-
defaultValue: locationIndicatorMWO
|
|
2513
|
+
defaultValue: locationIndicatorMWO,
|
|
2514
|
+
"data-testid": "locationIndicatorMWO"
|
|
2527
2515
|
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
2528
2516
|
name: "firName",
|
|
2529
|
-
defaultValue: firName
|
|
2517
|
+
defaultValue: firName,
|
|
2518
|
+
"data-testid": "firName"
|
|
2530
2519
|
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
2531
2520
|
name: "firGeometry",
|
|
2532
|
-
defaultValue: firGeometry
|
|
2521
|
+
defaultValue: firGeometry,
|
|
2522
|
+
"data-testid": "firGeometry"
|
|
2533
2523
|
}));
|
|
2534
2524
|
};
|
|
2535
2525
|
|
|
@@ -8351,7 +8341,7 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
8351
8341
|
isDisabled = _React$useState2[0],
|
|
8352
8342
|
setIsDisabled = _React$useState2[1];
|
|
8353
8343
|
var isReadOnly = mode === 'view';
|
|
8354
|
-
var helperText =
|
|
8344
|
+
var helperText = isReadOnly ? '' : 'Optional';
|
|
8355
8345
|
var _useTAC = useTAC(initialSigmet !== null ? initialSigmet : initialCancelSigmet, api.getSigmetTAC, getHasFormErrors, getOmitChangeFromConfig(productConfig)),
|
|
8356
8346
|
_useTAC2 = _slicedToArray(_useTAC, 2),
|
|
8357
8347
|
tac = _useTAC2[0],
|
|
@@ -8621,7 +8611,7 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
8621
8611
|
isDisabled = _React$useState2[0],
|
|
8622
8612
|
setIsDisabled = _React$useState2[1];
|
|
8623
8613
|
var isReadOnly = mode === 'view';
|
|
8624
|
-
var helperText =
|
|
8614
|
+
var helperText = isReadOnly ? '' : 'Optional';
|
|
8625
8615
|
var _useTAC = useTAC(initialAirmet !== null ? initialAirmet : initialCancelAirmet, api.getAirmetTAC, getHasFormErrors),
|
|
8626
8616
|
_useTAC2 = _slicedToArray(_useTAC, 2),
|
|
8627
8617
|
tac = _useTAC2[0],
|
|
@@ -8804,6 +8794,11 @@ var ContentDialog = function ContentDialog(_a) {
|
|
|
8804
8794
|
onClose: handleClose,
|
|
8805
8795
|
maxWidth: other.maxWidth ? other.maxWidth : 'lg'
|
|
8806
8796
|
}, other, {
|
|
8797
|
+
PaperProps: {
|
|
8798
|
+
sx: {
|
|
8799
|
+
height: '100%'
|
|
8800
|
+
}
|
|
8801
|
+
},
|
|
8807
8802
|
sx: {
|
|
8808
8803
|
'> div > .MuiPaper-root': {
|
|
8809
8804
|
minWidth: 300
|
|
@@ -12728,7 +12723,7 @@ tags.forEach(function (tagName) {
|
|
|
12728
12723
|
});
|
|
12729
12724
|
|
|
12730
12725
|
/**
|
|
12731
|
-
* @mui/styled-engine v5.14.
|
|
12726
|
+
* @mui/styled-engine v5.14.16
|
|
12732
12727
|
*
|
|
12733
12728
|
* @license MIT
|
|
12734
12729
|
* This source code is licensed under the MIT license found in the
|
|
@@ -14415,7 +14410,10 @@ var DownloadSigmetAirmetConfigWrapper = function DownloadSigmetAirmetConfigWrapp
|
|
|
14415
14410
|
var getApiRoutes$1 = function getApiRoutes(axiosInstance, nonAuthAxiosInstance) {
|
|
14416
14411
|
return {
|
|
14417
14412
|
getSigmetConfiguration: function getSigmetConfiguration(productConfigKey) {
|
|
14418
|
-
|
|
14413
|
+
if (productConfigKey) {
|
|
14414
|
+
return nonAuthAxiosInstance.get("/assets/".concat(productConfigKey));
|
|
14415
|
+
}
|
|
14416
|
+
return axiosInstance.get('/sigmet-config');
|
|
14419
14417
|
},
|
|
14420
14418
|
getSigmetList: function getSigmetList() {
|
|
14421
14419
|
return axiosInstance.get('/sigmetlist');
|
|
@@ -14427,7 +14425,10 @@ var getApiRoutes$1 = function getApiRoutes(axiosInstance, nonAuthAxiosInstance)
|
|
|
14427
14425
|
return axiosInstance.post('/sigmet2tac', Object.assign({}, sigmetData));
|
|
14428
14426
|
},
|
|
14429
14427
|
getAirmetConfiguration: function getAirmetConfiguration(productConfigKey) {
|
|
14430
|
-
|
|
14428
|
+
if (productConfigKey) {
|
|
14429
|
+
return nonAuthAxiosInstance.get("/assets/".concat(productConfigKey));
|
|
14430
|
+
}
|
|
14431
|
+
return axiosInstance.get('/airmet-config');
|
|
14431
14432
|
},
|
|
14432
14433
|
getAirmetList: function getAirmetList() {
|
|
14433
14434
|
return axiosInstance.get('/airmetlist');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,30 +9,5 @@
|
|
|
9
9
|
},
|
|
10
10
|
"module": "./index.esm.js",
|
|
11
11
|
"type": "module",
|
|
12
|
-
"main": "./index.esm.js"
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"@mui/material": "5.12.0",
|
|
15
|
-
"@mui/system": "5.14.14",
|
|
16
|
-
"@opengeoweb/api": "8.4.1",
|
|
17
|
-
"@opengeoweb/authentication": "8.4.1",
|
|
18
|
-
"@opengeoweb/core": "8.4.1",
|
|
19
|
-
"@opengeoweb/form-fields": "8.4.1",
|
|
20
|
-
"@opengeoweb/shared": "8.4.1",
|
|
21
|
-
"@opengeoweb/store": "8.4.1",
|
|
22
|
-
"@opengeoweb/theme": "8.4.1",
|
|
23
|
-
"@opengeoweb/webmap": "8.4.1",
|
|
24
|
-
"@opengeoweb/webmap-react": "8.4.1",
|
|
25
|
-
"@redux-eggs/redux-toolkit": "2.2.0",
|
|
26
|
-
"@redux-eggs/saga-extension": "2.2.0",
|
|
27
|
-
"@reduxjs/toolkit": "1.9.7",
|
|
28
|
-
"@turf/turf": "6.5.0",
|
|
29
|
-
"axios": "1.5.0",
|
|
30
|
-
"immer": "9.0.21",
|
|
31
|
-
"lodash": "4.17.21",
|
|
32
|
-
"moment": "2.29.4",
|
|
33
|
-
"react": "18.2.0",
|
|
34
|
-
"react-hook-form": "7.47.0",
|
|
35
|
-
"react-redux": "8.1.3"
|
|
36
|
-
},
|
|
37
|
-
"peerDependencies": {}
|
|
12
|
+
"main": "./index.esm.js"
|
|
38
13
|
}
|
|
@@ -3,7 +3,7 @@ import { ApiModule, ApiUrls } from '@opengeoweb/api';
|
|
|
3
3
|
import { ProductType } from '../../types';
|
|
4
4
|
export interface ApiModuleProps extends ApiModule {
|
|
5
5
|
config: ApiUrls;
|
|
6
|
-
productConfigKey
|
|
6
|
+
productConfigKey?: string;
|
|
7
7
|
productType: ProductType;
|
|
8
8
|
}
|
|
9
9
|
export declare const AviationProductApiWrapper: React.FC<ApiModuleProps>;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { ProductType } from '../../types';
|
|
3
3
|
interface ModuleWrapperProps {
|
|
4
4
|
productType: ProductType;
|
|
5
|
-
productConfigKey
|
|
5
|
+
productConfigKey?: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const ERROR_TITLE = "Something went wrong with loading the configuration file";
|
|
8
8
|
declare const DownloadSigmetAirmetConfigWrapper: React.FC<ModuleWrapperProps>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Feature } from '@turf/turf';
|
|
3
|
-
import { FeatureCollection } from 'geojson';
|
|
4
2
|
import { FieldValues, UseFormGetValues, UseFormTrigger } from 'react-hook-form';
|
|
5
3
|
import { layerTypes, mapTypes } from '@opengeoweb/store';
|
|
6
4
|
import { DrawMode } from '@opengeoweb/webmap-react';
|
|
@@ -55,7 +53,6 @@ export declare const getFir: (productConfig: ProductConfig, firName?: string) =>
|
|
|
55
53
|
* Function to check if the given geojson object has 'fir' selectionType property
|
|
56
54
|
*/
|
|
57
55
|
export declare const isFir: (geojson: GeoJSON.FeatureCollection) => boolean;
|
|
58
|
-
export declare const rewindGeometry: (geoJSON: FeatureCollection) => FeatureCollection;
|
|
59
56
|
export declare const getFieldLabel: (title: string, isDisabled: boolean, action?: string) => string;
|
|
60
57
|
export declare const getBaseLayers: (productConfig: ProductConfig) => layerTypes.Layer[];
|
|
61
58
|
export declare const getMaxMovementSpeedValue: (unit: string, selectedFIR: string, productConfig: ProductConfig) => number | null;
|
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: (productConfigKey
|
|
14
|
+
getAirmetConfiguration: (productConfigKey?: string) => Promise<{
|
|
15
15
|
data: ProductConfig;
|
|
16
16
|
}>;
|
|
17
17
|
getAirmetList: () => Promise<{
|