@opengeoweb/sigmet-airmet 9.0.0 → 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 CHANGED
@@ -8341,7 +8341,7 @@ var SigmetForm = function SigmetForm(_ref) {
8341
8341
  isDisabled = _React$useState2[0],
8342
8342
  setIsDisabled = _React$useState2[1];
8343
8343
  var isReadOnly = mode === 'view';
8344
- var helperText = isDisabled ? '' : 'Optional';
8344
+ var helperText = isReadOnly ? '' : 'Optional';
8345
8345
  var _useTAC = useTAC(initialSigmet !== null ? initialSigmet : initialCancelSigmet, api.getSigmetTAC, getHasFormErrors, getOmitChangeFromConfig(productConfig)),
8346
8346
  _useTAC2 = _slicedToArray(_useTAC, 2),
8347
8347
  tac = _useTAC2[0],
@@ -8611,7 +8611,7 @@ var AirmetForm = function AirmetForm(_ref) {
8611
8611
  isDisabled = _React$useState2[0],
8612
8612
  setIsDisabled = _React$useState2[1];
8613
8613
  var isReadOnly = mode === 'view';
8614
- var helperText = isDisabled ? '' : 'Optional';
8614
+ var helperText = isReadOnly ? '' : 'Optional';
8615
8615
  var _useTAC = useTAC(initialAirmet !== null ? initialAirmet : initialCancelAirmet, api.getAirmetTAC, getHasFormErrors),
8616
8616
  _useTAC2 = _slicedToArray(_useTAC, 2),
8617
8617
  tac = _useTAC2[0],
@@ -8794,6 +8794,11 @@ var ContentDialog = function ContentDialog(_a) {
8794
8794
  onClose: handleClose,
8795
8795
  maxWidth: other.maxWidth ? other.maxWidth : 'lg'
8796
8796
  }, other, {
8797
+ PaperProps: {
8798
+ sx: {
8799
+ height: '100%'
8800
+ }
8801
+ },
8797
8802
  sx: {
8798
8803
  '> div > .MuiPaper-root': {
8799
8804
  minWidth: 300
@@ -14405,7 +14410,10 @@ var DownloadSigmetAirmetConfigWrapper = function DownloadSigmetAirmetConfigWrapp
14405
14410
  var getApiRoutes$1 = function getApiRoutes(axiosInstance, nonAuthAxiosInstance) {
14406
14411
  return {
14407
14412
  getSigmetConfiguration: function getSigmetConfiguration(productConfigKey) {
14408
- return nonAuthAxiosInstance.get("/assets/".concat(productConfigKey));
14413
+ if (productConfigKey) {
14414
+ return nonAuthAxiosInstance.get("/assets/".concat(productConfigKey));
14415
+ }
14416
+ return axiosInstance.get('/sigmet-config');
14409
14417
  },
14410
14418
  getSigmetList: function getSigmetList() {
14411
14419
  return axiosInstance.get('/sigmetlist');
@@ -14417,7 +14425,10 @@ var getApiRoutes$1 = function getApiRoutes(axiosInstance, nonAuthAxiosInstance)
14417
14425
  return axiosInstance.post('/sigmet2tac', Object.assign({}, sigmetData));
14418
14426
  },
14419
14427
  getAirmetConfiguration: function getAirmetConfiguration(productConfigKey) {
14420
- return nonAuthAxiosInstance.get("/assets/".concat(productConfigKey));
14428
+ if (productConfigKey) {
14429
+ return nonAuthAxiosInstance.get("/assets/".concat(productConfigKey));
14430
+ }
14431
+ return axiosInstance.get('/airmet-config');
14421
14432
  },
14422
14433
  getAirmetList: function getAirmetList() {
14423
14434
  return axiosInstance.get('/airmetlist');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/sigmet-airmet",
3
- "version": "9.0.0",
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": {
@@ -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: string;
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: string;
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,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: string) => Promise<{
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: string) => Promise<{
14
+ getAirmetConfiguration: (productConfigKey?: string) => Promise<{
15
15
  data: ProductConfig;
16
16
  }>;
17
17
  getAirmetList: () => Promise<{