@opengeoweb/sigmet-airmet 12.1.2 → 12.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/sigmet-airmet",
3
- "version": "12.1.2",
3
+ "version": "12.3.0",
4
4
  "description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,25 +8,25 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/api": "12.1.2",
12
- "@opengeoweb/shared": "12.1.2",
13
- "@opengeoweb/theme": "12.1.2",
14
- "@opengeoweb/store": "12.1.2",
15
- "@opengeoweb/webmap": "12.1.2",
16
- "@opengeoweb/webmap-react": "12.1.2",
17
- "react-redux": "^8.1.3",
18
- "@opengeoweb/core": "12.1.2",
19
- "@opengeoweb/authentication": "12.1.2",
20
- "@mui/system": "^6.1.1",
21
- "@opengeoweb/form-fields": "12.1.2",
11
+ "@opengeoweb/api": "12.3.0",
12
+ "@opengeoweb/shared": "12.3.0",
13
+ "@opengeoweb/theme": "12.3.0",
14
+ "@opengeoweb/store": "12.3.0",
15
+ "@opengeoweb/webmap": "12.3.0",
16
+ "@opengeoweb/webmap-react": "12.3.0",
17
+ "react-redux": "^9.2.0",
18
+ "@opengeoweb/core": "12.3.0",
19
+ "@opengeoweb/authentication": "12.3.0",
20
+ "@mui/system": "^7.0.1",
21
+ "@opengeoweb/form-fields": "12.3.0",
22
22
  "react-hook-form": "^7.50.1",
23
23
  "axios": "^1.7.7",
24
24
  "lodash": "^4.17.21",
25
- "@reduxjs/toolkit": "^1.9.7",
25
+ "@reduxjs/toolkit": "^2.6.1",
26
26
  "i18next": "^23.11.5",
27
- "@mui/material": "^6.1.1",
27
+ "@mui/material": "^7.0.1",
28
28
  "react-i18next": "^15.1.1",
29
- "@tanstack/react-query": "^5.67.1"
29
+ "@tanstack/react-query": "^5.69.2"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": "18",
package/src/index.d.ts CHANGED
@@ -1,16 +1,18 @@
1
1
  import saTranslations from '../locales/sigmet-airmet.json';
2
+ export * from './lib/components/ComponentsLookUp';
3
+ export * from './lib/components/MapViewGeoJson';
4
+ export * from './lib/components/MetInfoWrapper';
2
5
  export * from './lib/components/ProductForms';
3
6
  export * from './lib/components/ProductForms/ProductFormDialog';
7
+ export * from './lib/components/ProductForms/ProductFormDialogContent';
4
8
  export * from './lib/components/ProductForms/ProductFormFields/ValidUntil';
9
+ export * from './lib/components/ProductForms/SigmetForm/SigmetCancelVolcanicMovements';
5
10
  export * from './lib/components/ProductForms/utils';
6
- export * from './lib/components/ContentDialog';
7
- export * from './lib/components/MapViewGeoJson';
8
11
  export * from './lib/components/ProductList';
9
- export * from './lib/components/MetInfoWrapper';
10
- export { createApi } from './lib/utils/api';
11
- export { createApi as createFakeApi, fakeSigmetList, fakeAirmetList, } from './lib/utils/fakeApi';
12
- export { sigmetConfig, airmetConfig } from './lib/utils/config';
12
+ export * from './lib/hooks/useShortTestHelpers';
13
13
  export * from './lib/types';
14
- export * from './lib/components/ComponentsLookUp';
14
+ export { createApi } from './lib/utils/api';
15
+ export { airmetConfig, sigmetConfig } from './lib/utils/config';
16
+ export { createApi as createFakeApi, fakeAirmetList, fakeSigmetList, } from './lib/utils/fakeApi';
15
17
  export { SA_NAMESPACE } from './lib/utils/i18n';
16
18
  export { saTranslations };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { FormMode, Airmet, CancelAirmet, ProductConfig, AviationProduct } from '../../../types';
2
+ import { Airmet, AviationProduct, CancelAirmet, FormMode, ProductConfig } from '../../../types';
3
3
  export interface AirmetFormProps {
4
4
  mode: FormMode;
5
5
  isCancelAirmet?: boolean;
@@ -11,6 +11,7 @@ export interface AirmetFormProps {
11
11
  getTAC?: (product: AviationProduct) => Promise<{
12
12
  data: string;
13
13
  }>;
14
+ storedGeoJSON?: GeoJSON.FeatureCollection;
14
15
  }
15
16
  declare const AirmetForm: React.FC<AirmetFormProps>;
16
17
  export default AirmetForm;
@@ -1,5 +1,7 @@
1
1
  import * as React from 'react';
2
- import { AviationProduct, FormMode, ProductType, ProductConfig } from '../../types';
2
+ import { AviationProduct, FormMode, ProductAction, ProductConfig, ProductType, Sigmet } from '../../types';
3
+ export declare const isVAPhenomenon: (product: AviationProduct, action: ProductAction) => boolean;
4
+ export declare const prepareCancelSigmet: (sigmet: Sigmet, movement: string) => Sigmet;
3
5
  export interface ProductFormDialogContentProps {
4
6
  isOpen: boolean;
5
7
  toggleDialogStatus: (shouldRefreshList?: boolean) => void;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { Grid2Props } from '@mui/material';
3
- interface ProductFormFieldLayoutProps extends Grid2Props {
2
+ import { GridProps } from '@mui/material';
3
+ interface ProductFormFieldLayoutProps extends GridProps {
4
4
  title?: string;
5
5
  children: React.ReactNode;
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CancelSigmet, Sigmet, FormMode, ProductConfig, AviationProduct } from '../../../types';
2
+ import { AviationProduct, CancelSigmet, FormMode, ProductConfig, Sigmet } from '../../../types';
3
3
  export interface SigmetFormProps {
4
4
  mode: FormMode;
5
5
  isCancelSigmet?: boolean;
@@ -12,6 +12,8 @@ export interface SigmetFormProps {
12
12
  getTAC?: (product: AviationProduct) => Promise<{
13
13
  data: string;
14
14
  }>;
15
+ storedGeoJSON?: GeoJSON.FeatureCollection;
16
+ storedEndGeoJSON?: GeoJSON.FeatureCollection;
15
17
  }
16
18
  declare const SigmetForm: React.FC<SigmetFormProps>;
17
19
  export default SigmetForm;
@@ -0,0 +1,25 @@
1
+ import { DrawMode } from '@opengeoweb/webmap-react';
2
+ import { FeatureCollection, Geometry } from 'geojson';
3
+ interface UseGeoJSONHandlingProps {
4
+ storedGeoJSON: FeatureCollection<Geometry> | undefined;
5
+ storedEndGeoJSON?: FeatureCollection<Geometry> | undefined;
6
+ startGeoJSON: FeatureCollection<Geometry>;
7
+ endGeoJSON?: FeatureCollection<Geometry>;
8
+ setGeoJSON: (geoJSON: FeatureCollection<Geometry>) => void;
9
+ setEndGeoJSON?: (geoJSON: FeatureCollection<Geometry>) => void;
10
+ updateStartGeoJson: (geoJSON: FeatureCollection<Geometry>) => void;
11
+ updateEndGeoJson?: (geoJSON: FeatureCollection<Geometry>) => void;
12
+ deactivateStartTool: () => void;
13
+ deactivateEndTool?: () => void;
14
+ changeActiveStartTool: (newTool: DrawMode) => void;
15
+ changeActiveEndTool?: (newTool: DrawMode) => void;
16
+ startEditModes: DrawMode[];
17
+ endEditModes?: DrawMode[];
18
+ currentStartDrawTool?: string;
19
+ currentEndDrawTool?: string;
20
+ }
21
+ export declare const useGeoJSONHandling: ({ storedGeoJSON, storedEndGeoJSON, startGeoJSON, endGeoJSON, updateStartGeoJson, updateEndGeoJson, deactivateStartTool, deactivateEndTool, changeActiveStartTool, changeActiveEndTool, startEditModes, endEditModes, currentStartDrawTool, currentEndDrawTool, }: UseGeoJSONHandlingProps) => {
22
+ onChangeStartTool: (newTool: DrawMode) => void;
23
+ onChangeEndTool: (newTool: DrawMode) => void;
24
+ };
25
+ export {};
@@ -1,9 +1,10 @@
1
- import * as React from 'react';
2
- import { TFunction } from 'i18next';
3
- import { FieldValues, UseFormGetValues, UseFormTrigger } from 'react-hook-form';
1
+ import { HeaderAction } from '@opengeoweb/shared';
4
2
  import { layerTypes, mapTypes } from '@opengeoweb/store';
5
3
  import { DrawMode, OpenLayersLayerProps } from '@opengeoweb/webmap-react';
6
- 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';
4
+ import { TFunction } from 'i18next';
5
+ import * as React from 'react';
6
+ import { FieldValues, UseFormGetValues, UseFormTrigger } from 'react-hook-form';
7
+ import { ATSRLocation, Airmet, AirmetConfig, AirmetFromBackend, AirmetFromFrontend, AviationPhenomenon, AviationProduct, CancelAirmet, CancelSigmet, FIRConfigAirmet, FIRConfigSigmet, FIRLocationGeoJson, Firareas, ICAOLocation, LevelUnits, ProductAction, ProductCanbe, ProductConfig, ProductStatus, ProductType, Sigmet, SigmetFromBackend, SigmetFromFrontend, StartOrEndDrawing } from '../../types';
7
8
  export declare const getDefaultPhenomena: (productConfig: ProductConfig, currentFir?: string) => {
8
9
  phenomena: AviationPhenomenon[];
9
10
  };
@@ -39,13 +40,15 @@ export declare const isLevelLower: (ownValue: number | string, ownUnit: LevelUni
39
40
  export declare const getPhenomenon: (selectedFIR: string, phenomenon: string, productConfig: ProductConfig) => string | undefined;
40
41
  export declare const getDialogtitle: (t: TFunction, product: AviationProduct, productType: ProductType, productConfig: ProductConfig) => string;
41
42
  export declare const getProductFormMode: (canBeOptions: ProductCanbe[] | undefined, productListItem: SigmetFromBackend | AirmetFromBackend | null) => string;
43
+ export declare const getLifecycleActions: ({ canBe, onButtonPress, productType, areActionsDisabled, t, }: ProductFormLifecycleButtonsProps & {
44
+ t: TFunction;
45
+ }) => HeaderAction[];
42
46
  interface ProductFormLifecycleButtonsProps {
43
47
  canBe: string[];
44
48
  productType: ProductType;
45
49
  onButtonPress: (newStatus: ProductAction) => void;
46
50
  areActionsDisabled?: boolean;
47
51
  }
48
- export declare const ProductFormLifecycleButtons: React.FC<ProductFormLifecycleButtonsProps>;
49
52
  export declare const hasValue: (value: number | string) => boolean;
50
53
  export declare const prepareFormValues: <T extends AviationProduct>(product: T) => T;
51
54
  export declare const createSigmetPostParameter: (sigmetToPost: Sigmet | CancelSigmet, newStatus: ProductStatus, previousUuid: string) => SigmetFromFrontend;
@@ -3,7 +3,6 @@ import { ThemeProviderProps } from '@opengeoweb/theme';
3
3
  import { CreateApiFn } from '@opengeoweb/api';
4
4
  import { Store } from '@reduxjs/toolkit';
5
5
  import { AxiosError } from 'axios';
6
- import { uiTypes, WebMapStateModuleState } from '@opengeoweb/store';
7
6
  import { AviationPhenomenon } from '../types';
8
7
  export declare const ThemeWrapperWithModules: React.FC<ThemeProviderProps>;
9
8
  interface StoryWrapperProps {
@@ -31,5 +30,4 @@ export declare const testFir: GeoJSON.FeatureCollection;
31
30
  export declare const createFakeApiWithErrors: () => any;
32
31
  export declare const fakeAirmetPhenomenaList: AviationPhenomenon[];
33
32
  export declare const fakeSigmetPhenomenaList: AviationPhenomenon[];
34
- export declare const createMockStore: (mockState: uiTypes.UIModuleState & WebMapStateModuleState) => Store;
35
33
  export {};
@@ -1,13 +0,0 @@
1
- import * as React from 'react';
2
- import { DialogProps } from '@mui/material';
3
- interface ContentDialogProps extends DialogProps {
4
- open: boolean;
5
- toggleDialogStatus: () => void;
6
- title: string;
7
- children?: React.ReactNode;
8
- options?: React.ReactNode;
9
- alertBanner?: React.ReactNode;
10
- onClose?: () => void;
11
- }
12
- declare const ContentDialog: React.FC<ContentDialogProps>;
13
- export default ContentDialog;
@@ -1,95 +0,0 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- tags: string[];
5
- };
6
- export default _default;
7
- export declare const ContentDialogDemo: () => React.ReactElement;
8
- export declare const NewDialogDemoLight: {
9
- (): React.ReactElement;
10
- storyName: string;
11
- tags: string[];
12
- parameters: {
13
- zeplinLink: {
14
- name: string;
15
- link: string;
16
- }[];
17
- };
18
- };
19
- export declare const NewDialogDemoDark: {
20
- (): React.ReactElement;
21
- storyName: string;
22
- tags: string[];
23
- parameters: {
24
- zeplinLink: {
25
- name: string;
26
- link: string;
27
- }[];
28
- };
29
- };
30
- export declare const ViewDialogDemoLight: {
31
- (): React.ReactElement;
32
- storyName: string;
33
- tags: string[];
34
- parameters: {
35
- zeplinLink: {
36
- name: string;
37
- link: string;
38
- }[];
39
- };
40
- };
41
- export declare const ViewDialogDemoDark: {
42
- (): React.ReactElement;
43
- storyName: string;
44
- tags: string[];
45
- parameters: {
46
- zeplinLink: {
47
- name: string;
48
- link: string;
49
- }[];
50
- };
51
- };
52
- export declare const ExpiredDialogDemoLight: {
53
- (): React.ReactElement;
54
- storyName: string;
55
- tags: string[];
56
- parameters: {
57
- zeplinLink: {
58
- name: string;
59
- link: string;
60
- }[];
61
- };
62
- };
63
- export declare const ExpiredDialogDemoDark: {
64
- (): React.ReactElement;
65
- storyName: string;
66
- tags: string[];
67
- parameters: {
68
- zeplinLink: {
69
- name: string;
70
- link: string;
71
- }[];
72
- };
73
- };
74
- export declare const EditDialogDemoLight: {
75
- (): React.ReactElement;
76
- storyName: string;
77
- tags: string[];
78
- parameters: {
79
- zeplinLink: {
80
- name: string;
81
- link: string;
82
- }[];
83
- };
84
- };
85
- export declare const EditDialogDemoDark: {
86
- (): React.ReactElement;
87
- storyName: string;
88
- tags: string[];
89
- parameters: {
90
- zeplinLink: {
91
- name: string;
92
- link: string;
93
- }[];
94
- };
95
- };
@@ -1 +0,0 @@
1
- export { default as ContentDialog } from './ContentDialog';