@opengeoweb/warnings 20.0.0 → 20.0.1

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.
Files changed (28) hide show
  1. package/dist/index.esm.js +2763 -2172
  2. package/dist/src/lib/api/aviation-api/hooks.d.ts +4 -4
  3. package/dist/src/lib/api/warning-api/hooks.d.ts +8 -7
  4. package/dist/src/lib/components/AreaDrawingLoader/AreaDrawingLoader.d.ts +2 -0
  5. package/dist/src/lib/components/AreaDrawingLoader/AreasDrawings.d.ts +2 -0
  6. package/dist/src/lib/components/AreaDrawingManager/Drawings.d.ts +1 -3
  7. package/dist/src/lib/components/AreaDrawingManager/shareDrawing.d.ts +21 -0
  8. package/dist/src/lib/components/DrawingToolForm/DrawingToolForm.d.ts +6 -0
  9. package/dist/src/lib/components/DrawingToolForm/DrawingToolFormConnect.d.ts +5 -1
  10. package/dist/src/lib/components/DrawingToolForm/DrawingToolFormContents.d.ts +5 -1
  11. package/dist/src/lib/components/DrawingToolForm/ShareDrawingButton.d.ts +6 -0
  12. package/dist/src/lib/components/DrawingToolForm/drawingObjectUtils.d.ts +33 -0
  13. package/dist/src/lib/components/DrawingToolForm/maskUtils.d.ts +1 -1
  14. package/dist/src/lib/components/PublicWarningList/SelectAllButton/selectAllButtonUtils.d.ts +1 -0
  15. package/dist/src/lib/components/PublicWarningsForm/PhenomenonField/PhenomenonField.d.ts +1 -0
  16. package/dist/src/lib/components/WarningEvents/WarningEventDialog/WarningEventFormDialog.d.ts +1 -0
  17. package/dist/src/lib/components/WarningEvents/WarningEventDialog/useWarningEventDrawing.d.ts +10 -0
  18. package/dist/src/lib/components/WarningEvents/WarningEventForm/WarningEventFormContent.d.ts +2 -0
  19. package/dist/src/lib/components/WarningEvents/WarningEventForm/WarningEventItem.d.ts +8 -1
  20. package/dist/src/lib/components/WarningEvents/WarningEventForm/warningEventStoryData.d.ts +2 -0
  21. package/dist/src/lib/components/WarningEvents/WarningEventSummaryDialog/WarningEventSummaryForm.d.ts +1 -0
  22. package/dist/src/lib/components/WarningsMapView/WarningsMapView.d.ts +2 -0
  23. package/dist/src/lib/components/WarningsTimeline/WarningBlock.d.ts +2 -1
  24. package/dist/src/lib/store/warningsDrawings/types.d.ts +1 -1
  25. package/dist/src/lib/store/warningsEventForm/reducer.d.ts +4 -0
  26. package/dist/src/lib/store/warningsEventForm/selectors.d.ts +21 -0
  27. package/dist/src/lib/utils/useFormDirty.d.ts +3 -3
  28. package/package.json +12 -12
@@ -1,5 +1,5 @@
1
- import type { UseMutationResult, UseQueryResult } from '@tanstack/react-query';
2
- import type { AirmetConfig, AirmetFromBackend, SigmetConfig, SigmetFromBackend } from '@opengeoweb/api';
1
+ import type { UseQueryResult } from '@tanstack/react-query';
2
+ import type { UseMutationReturnType, AirmetConfig, AirmetFromBackend, SigmetConfig, SigmetFromBackend } from '@opengeoweb/api';
3
3
  import type { AirmetFromFrontend, AviationProduct, SigmetFromFrontend } from '@opengeoweb/sigmet-airmet';
4
4
  import type { TimeFilter } from '../../components/FilterList/filter-utils';
5
5
  import type { WarningType } from '../../store/warningsForm/types';
@@ -31,7 +31,7 @@ export declare const useTACApi: () => UseTACApi;
31
31
  * @param onDialogClose - Optional callback to close a dialog.
32
32
  * @returns A mutation result for posting a SIGMET.
33
33
  */
34
- export declare const usePostSigmet: () => UseMutationResult<SigmetFromBackend, Error, SigmetFromFrontend>;
34
+ export declare const usePostSigmet: () => UseMutationReturnType<SigmetFromBackend, SigmetFromFrontend>;
35
35
  /**
36
36
  * Hook for posting an AIRMET, with feedback.
37
37
  *
@@ -39,5 +39,5 @@ export declare const usePostSigmet: () => UseMutationResult<SigmetFromBackend, E
39
39
  * @param onDialogClose - Optional callback to close a dialog.
40
40
  * @returns A mutation result for posting an AIRMET.
41
41
  */
42
- export declare const usePostAirmet: () => UseMutationResult<AirmetFromBackend, Error, AirmetFromFrontend>;
42
+ export declare const usePostAirmet: () => UseMutationReturnType<AirmetFromBackend, AirmetFromFrontend>;
43
43
  export {};
@@ -1,4 +1,5 @@
1
- import type { QueryKey, UseMutationResult, UseQueryResult } from '@tanstack/react-query';
1
+ import type { QueryKey, UseQueryResult } from '@tanstack/react-query';
2
+ import type { UseMutationReturnType } from '@opengeoweb/api';
2
3
  import type { TimeFilter } from '../../components/FilterList/filter-utils';
3
4
  import type { MaritimeWarningsConfig } from '../../components/MaritimeWarningsForm/types';
4
5
  import type { DrawingFromBE, DrawingFromFE, DrawingListItem, FetchDrawingParams } from '../../store/warningsDrawings/types';
@@ -8,12 +9,12 @@ import type { MaritimeWarning, MaritimeWarningsType, PublicWarning, WarningEvent
8
9
  * https://tanstack.com/query/v4/docs/framework/react/guides/disabling-queries
9
10
  */
10
11
  export declare const usePublicWarnings: (disabled?: boolean, timeFilter?: TimeFilter) => UseQueryResult<(PublicWarning | MaritimeWarning)[]>;
11
- type MutationReturnType<T> = UseMutationResult<Headers | null, Error, T, {
12
+ type MutationReturnType<T> = UseMutationReturnType<Headers | null, T, {
12
13
  previousData: [QueryKey, PublicWarning[] | undefined][];
13
14
  }>;
14
- type DrawingMutationReturnType<T> = UseMutationResult<{
15
+ type DrawingMutationReturnType<T> = UseMutationReturnType<{
15
16
  id: string;
16
- }, Error, T, void>;
17
+ }, T, void>;
17
18
  interface MutateEditorProps {
18
19
  id: string;
19
20
  isEditor: boolean;
@@ -43,9 +44,9 @@ interface DeleteDrawingParams {
43
44
  drawingId: string;
44
45
  objectName: string;
45
46
  }
46
- export declare const useMutateDeleteDrawing: () => UseMutationResult<{
47
+ export declare const useMutateDeleteDrawing: () => UseMutationReturnType<{
47
48
  id: string;
48
- }, Error, DeleteDrawingParams>;
49
+ }, DeleteDrawingParams>;
49
50
  export declare const BE_EDITOR_WARNING = "Warning is being edited by another user and cannot be updated";
50
51
  export declare const usePostMaritimeWarnings: () => MutationReturnType<MaritimeWarning[]>;
51
52
  interface MutateMaritimeEditorParams {
@@ -56,7 +57,7 @@ interface MutateMaritimeEditorParams {
56
57
  export declare const useMutateMaritimeWarningsEditor: () => MutationReturnType<MutateMaritimeEditorParams>;
57
58
  export declare const useMaritimeWarningsConfig: (disabled?: boolean) => UseQueryResult<MaritimeWarningsConfig>;
58
59
  export declare const useWarningEventsList: (disabled?: boolean, timeFilter?: TimeFilter) => UseQueryResult<WarningEvent[]>;
59
- type EventMutationReturnType<T> = UseMutationResult<Headers | null, Error, T, {
60
+ type EventMutationReturnType<T> = UseMutationReturnType<Headers | null, T, {
60
61
  previousData: [QueryKey, WarningEvent[] | undefined][];
61
62
  }>;
62
63
  interface UpdateWarningEventProps {
@@ -21,6 +21,8 @@ export declare const AreaDrawingLoader: React.FC<{
21
21
  isLoading?: boolean;
22
22
  onAddArea?: (drawingListItem: DrawingListItem) => void;
23
23
  onRemoveArea?: (drawingListItem: DrawingListItem) => void;
24
+ onHoverDrawing?: (drawingListItem: DrawingListItem) => void;
25
+ onHoverDrawingEnd?: () => void;
24
26
  selectedAreas?: Area[];
25
27
  isChangeAreaDisabled?: boolean;
26
28
  onRetryRequest?: (errorType: string) => void;
@@ -21,6 +21,8 @@ export declare const AreasDrawings: FC<{
21
21
  filterRef?: React.RefObject<HTMLElement>;
22
22
  onAddArea?: (drawingListItem: DrawingListItem) => void;
23
23
  onRemoveArea?: (drawingListItem: DrawingListItem) => void;
24
+ onHoverDrawing?: (drawingListItem: DrawingListItem) => void;
25
+ onHoverDrawingEnd?: () => void;
24
26
  selectedAreas?: Area[];
25
27
  isChangeAreaDisabled?: boolean;
26
28
  shouldDisableRemoveWarning?: boolean;
@@ -9,8 +9,7 @@ export declare const DEFAULT_AREA_DRAWING_MANAGER_MIN_SIZE: {
9
9
  width: number;
10
10
  height: number;
11
11
  };
12
- export declare const BUTTON_AIRMET = "AIRMET";
13
- export declare const BUTTON_SIGMET = "SIGMET";
12
+ export { BUTTON_AIRMET, BUTTON_SIGMET } from './shareDrawing';
14
13
  type ListInclHeadersType = {
15
14
  isDrawing: boolean;
16
15
  index: number;
@@ -33,4 +32,3 @@ export declare const Drawings: FC<{
33
32
  isLoading?: boolean;
34
33
  dialogWidth?: number;
35
34
  }>;
36
- export {};
@@ -0,0 +1,21 @@
1
+ import type { MenuItemType } from '@opengeoweb/shared';
2
+ import type { DrawingListItem } from '../../store/warningsDrawings/types';
3
+ import type { WarningType } from '../../store/warningsForm/types';
4
+ export declare const BUTTON_AIRMET = "AIRMET";
5
+ export declare const BUTTON_SIGMET = "SIGMET";
6
+ export type ShareDrawing = (drawing: DrawingListItem, type: WarningType) => void;
7
+ /**
8
+ * Shares a stored drawing with a warning form: it opens the form for the given
9
+ * warning type, prefilled with the drawing. Used from every place where a
10
+ * drawing can be shared, so sharing always results in the same form.
11
+ * @returns callback which shares a drawing with a warning form
12
+ */
13
+ export declare const useShareDrawing: () => ShareDrawing;
14
+ /**
15
+ * Builds the menu items for sharing a drawing with a warning form, so every
16
+ * share menu offers the same options.
17
+ * @param t translation function
18
+ * @param onShare callback for the chosen warning type
19
+ * @returns share menu items
20
+ */
21
+ export declare const getShareDrawingMenuItems: (t: (key: string) => string, onShare: (type: WarningType) => void) => MenuItemType[];
@@ -1,14 +1,17 @@
1
1
  import type { FeatureCollection, GeoJsonProperties, Geometry } from 'geojson';
2
2
  import React from 'react';
3
3
  import type { DrawMode } from '@opengeoweb/webmap-react';
4
+ import type { ComparableDrawing } from './drawingObjectUtils';
4
5
  import type { DrawingToolFormValues } from './DrawingToolFormContents';
5
6
  import type { DrawingListItem } from '../../store/warningsDrawings/types';
7
+ import type { WarningType } from '../../store/warningsForm/types';
6
8
  export declare const opacityOptions: number[];
7
9
  export declare const getDrawingName: (drawingName: string) => string;
8
10
  export interface DrawingToolFormComponentProps {
9
11
  onSubmitForm: (formValues: DrawingToolFormValues) => void;
10
12
  drawingName?: string;
11
13
  isLoading?: boolean;
14
+ isLoadingSavedDrawing?: boolean;
12
15
  dialogError?: string;
13
16
  id?: string;
14
17
  drawModes: DrawMode[];
@@ -24,6 +27,9 @@ export interface DrawingToolFormComponentProps {
24
27
  onDeleteFeature: (featureId: string) => void;
25
28
  onFormDirty?: (isFormDirty: boolean) => void;
26
29
  geoJSON: FeatureCollection<Geometry, GeoJsonProperties> | undefined;
30
+ savedDrawing?: ComparableDrawing;
31
+ selectedMask?: FeatureCollection<Geometry, GeoJsonProperties>;
32
+ onClickShare?: (type: WarningType) => void;
27
33
  masks?: DrawingListItem[];
28
34
  isLoadingMasks?: boolean;
29
35
  maskError?: string;
@@ -1,3 +1,7 @@
1
1
  import React from 'react';
2
2
  export declare const SAVED_MASK_ID = "saved-mask";
3
- export declare const DrawingToolFormConnect: React.FC;
3
+ export interface DrawingToolFormConnectProps {
4
+ /** called after the drawing has been shared with a warning form */
5
+ onShared?: () => void;
6
+ }
7
+ export declare const DrawingToolFormConnect: React.FC<DrawingToolFormConnectProps>;
@@ -4,6 +4,7 @@ import type { FieldArrayWithId, FieldErrors, FieldValues } from 'react-hook-form
4
4
  import type { DrawMode } from '@opengeoweb/webmap-react';
5
5
  import type { DrawingObject } from './drawingObjectUtils';
6
6
  import type { DrawingListItem } from '../../store/warningsDrawings/types';
7
+ import type { WarningType } from '../../store/warningsForm/types';
7
8
  export declare const opacityOptions: number[];
8
9
  export interface DrawingToolObjectFormValue {
9
10
  featureId: string;
@@ -17,16 +18,19 @@ export interface DrawingToolFormValues {
17
18
  }
18
19
  export interface DrawingToolFormContentsProps {
19
20
  isLoading?: boolean;
21
+ isLoadingSavedDrawing?: boolean;
20
22
  dialogError?: string;
21
23
  id?: string;
22
24
  drawModes: DrawMode[];
23
25
  activeDrawModeId: string;
24
26
  opacity: number;
25
27
  isInEditMode: boolean;
26
- isDirty: boolean;
28
+ isShareable: boolean;
29
+ hasBeenModified: boolean;
27
30
  errors: FieldErrors<FieldValues>;
28
31
  drawingObjects: DrawingObject[];
29
32
  fields: FieldArrayWithId<DrawingToolFormValues, 'features', 'id'>[];
33
+ onClickShare?: (type: WarningType) => void;
30
34
  onChangeDrawMode: (newMode: DrawMode) => void;
31
35
  onChangeOpacity: (event: SelectChangeEvent<unknown>) => void;
32
36
  onBlurName: (event: React.FocusEvent<HTMLInputElement>) => void;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { WarningType } from '../../store/warningsForm/types';
3
+ export interface ShareDrawingButtonProps {
4
+ onClickShare: (type: WarningType) => void;
5
+ }
6
+ export declare const ShareDrawingButton: React.FC<ShareDrawingButtonProps>;
@@ -1,5 +1,6 @@
1
1
  import type { FieldValues } from 'react-hook-form';
2
2
  import type { DrawingToolFormValues } from './DrawingToolFormContents';
3
+ import type { DrawingTransformation } from '../../store/warningsDrawings/types';
3
4
  export declare const MAX_OBJECT_NAME_LENGTH = 64;
4
5
  export interface DrawingObject {
5
6
  featureId: string;
@@ -10,6 +11,13 @@ export interface DrawingObject {
10
11
  }
11
12
  export declare const formatDefaultObjectName: (position: number) => string;
12
13
  export declare const getDefaultObjectNamePosition: (name: string) => number | undefined;
14
+ /**
15
+ * Creates a generator of default object names. The generator remembers the name
16
+ * it handed out for a feature, so a feature keeps its generated name, and
17
+ * continues numbering after the highest default name which is already taken.
18
+ * @returns generator of default object names, to pass to `getDrawingObjects`
19
+ */
20
+ export declare const createDefaultObjectNameGenerator: () => ((featureId: string, takenNames: string[]) => string);
13
21
  /**
14
22
  * Maps the features of a drawing to the objects shown in the form. Features
15
23
  * without a geometry are skipped: these are placeholders for a shape which
@@ -40,4 +48,29 @@ export declare const isDuplicateObjectName: (objectName: string, objectNames: st
40
48
  * @returns geoJSON including the object names
41
49
  */
42
50
  export declare const addObjectNamesToGeoJSON: (geoJSON: GeoJSON.FeatureCollection, objectNamesByFeatureId: Record<string, string>) => GeoJSON.FeatureCollection;
51
+ export interface ComparableDrawing {
52
+ objectName: string;
53
+ geoJSON: GeoJSON.FeatureCollection;
54
+ /**
55
+ * the geometries of the applied mask, undefined when no mask is applied. Only
56
+ * the geometries are compared, the same mask can be stored inside the drawing
57
+ * and fetched as a separate drawing, which differ in their other properties.
58
+ */
59
+ maskGeometries?: GeoJSON.Geometry[];
60
+ }
61
+ /**
62
+ * Generate a reference to the data that gets stored so you can compare
63
+ * two drawings to see whether there are unsaved changes. Transient properties
64
+ * are left out, as well as ids, undrawn shapes and winding order.
65
+ * A masked drawing stores the clipped result in `geoJSON` and the drawing the
66
+ * user actually made in `transformation.original`, so the original is compared,
67
+ * together with the geometries of the mask
68
+ * @param drawing drawing to reduce to its stored data
69
+ * @returns the drawing, containing only the data which gets stored
70
+ */
71
+ export declare const getComparableDrawing: (drawing: {
72
+ objectName?: string;
73
+ geoJSON?: GeoJSON.FeatureCollection;
74
+ transformation?: DrawingTransformation | null;
75
+ }) => ComparableDrawing;
43
76
  export declare const getDrawingToSubmit: (formValues: FieldValues) => Omit<DrawingToolFormValues, "id" | "features">;
@@ -10,6 +10,6 @@ export declare const restoreMaskedFillProperties: (properties: GeoJSON.GeoJsonPr
10
10
  export declare const restoreMaskedFill: (geoJSON: FeatureCollection) => FeatureCollection;
11
11
  export declare const getMaskPolygon: (mask: FeatureCollection) => MaskPolygon | null;
12
12
  export declare const clipGeoJSONWithMask: (geoJSON: FeatureCollection, mask: FeatureCollection) => FeatureCollection;
13
- export declare const findMaskForTransformation: (masks: DrawingListItem[], transformation?: DrawingTransformation) => DrawingListItem | undefined;
13
+ export declare const findMaskForTransformation: (masks: DrawingListItem[], transformation?: DrawingTransformation | null) => DrawingListItem | undefined;
14
14
  export declare const buildClippedHighlightGeoJSON: (clipped: FeatureCollection) => FeatureCollection;
15
15
  export {};
@@ -4,4 +4,5 @@ export type BatchSelectionState = 'none' | 'some' | 'all';
4
4
  export declare const getWarningStatus: (warning: Warning) => PublicWarningStatus;
5
5
  export declare const isWarningSelectableForBatchDelete: (warning: Warning) => boolean;
6
6
  export declare const getBatchDeletableWarningIds: (warnings: Warning[]) => string[];
7
+ export declare const getBatchDeleteToggleIds: (warningId: string, warnings: Warning[]) => string[];
7
8
  export declare const getBatchSelectionState: (selectedIds: string[], deletableIds: string[]) => BatchSelectionState;
@@ -10,4 +10,5 @@ export declare const Phenomenon: React.FC<{
10
10
  isDisabled?: boolean;
11
11
  isReadOnly?: boolean;
12
12
  isWarningEvent?: boolean;
13
+ onChange?: () => void;
13
14
  }>;
@@ -21,6 +21,7 @@ export interface WarningEventFormDialogProps {
21
21
  source?: uiTypes.Source;
22
22
  startPosition?: Position;
23
23
  selectedDrawing?: DrawingListItem;
24
+ hoveredDrawing?: DrawingListItem;
24
25
  onAddDrawing?: () => void;
25
26
  onClose: () => void;
26
27
  onChangeFormMode?: (isReadOnly: boolean) => void;
@@ -0,0 +1,10 @@
1
+ import type { DrawingListItem } from '../../../store/warningsDrawings/types';
2
+ import type { Area } from '../../../store/warningsForm/types';
3
+ export interface WarningEventDrawing {
4
+ selectedAreas: Area[];
5
+ select: (drawing: DrawingListItem) => void;
6
+ deselect: () => void;
7
+ hover: (drawing: DrawingListItem) => void;
8
+ hoverEnd: () => void;
9
+ }
10
+ export declare const useWarningEventDrawing: (isLoaderOpen: boolean) => WarningEventDrawing | undefined;
@@ -4,6 +4,7 @@ import type { MapPreset } from '@opengeoweb/store';
4
4
  import type { DrawingListItem } from '../../../store/warningsDrawings/types';
5
5
  import type { FormError } from '../../../store/warningsEventForm/reducer';
6
6
  import type { WarningEvent } from '../../../store/warningsForm/types';
7
+ export declare const INCIDENT_MAX_LENGTH = 50;
7
8
  export declare const CROSS_FIELD_VALIDATIONS: Record<string, {
8
9
  fields: string[];
9
10
  translationKey: string;
@@ -15,6 +16,7 @@ export interface WarningEventFormContentProps {
15
16
  currentEventEditor?: string;
16
17
  isSummaryDialogOpen?: boolean;
17
18
  selectedDrawing?: DrawingListItem;
19
+ hoveredDrawing?: DrawingListItem;
18
20
  selectedEvent?: WarningEvent;
19
21
  shouldHideFormToggleMode?: boolean;
20
22
  isReadOnly?: boolean;
@@ -2,9 +2,15 @@ import React from 'react';
2
2
  import type { MapPreset } from '@opengeoweb/store';
3
3
  import type { DrawingListItem } from '../../../store/warningsDrawings/types';
4
4
  import { PublicWarningStatus } from '../../../store/warningsForm/types';
5
+ export declare enum Probability {
6
+ TEN_TO_THIRTY = 10,
7
+ THIRTY_TO_SIXTY = 30,
8
+ SIXTY_TO_NINETY = 60,
9
+ NINETY_TO_HUNDRED = 100
10
+ }
5
11
  export declare const probablityOptions: {
6
12
  name: string;
7
- value: number;
13
+ value: Probability;
8
14
  }[];
9
15
  export declare const WarningEventItem: React.FC<{
10
16
  defaultMapPreset?: MapPreset;
@@ -14,6 +20,7 @@ export declare const WarningEventItem: React.FC<{
14
20
  isCompact: boolean;
15
21
  isDeleteButtonDisabled: boolean;
16
22
  selectedDrawing?: DrawingListItem;
23
+ hoveredDrawing?: DrawingListItem;
17
24
  onExpireWithdraw: (status: PublicWarningStatus, index: number) => void;
18
25
  onToggleCompact: () => void;
19
26
  onAddDrawing: () => void;
@@ -1,3 +1,4 @@
1
+ import type { DrawingListItem } from '../../../store/warningsDrawings/types';
1
2
  import type { Area, WarningEvent } from '../../../store/warningsForm/types';
2
3
  export declare const emptyWarning: {
3
4
  incident: string;
@@ -22,5 +23,6 @@ export declare const eventTexts: {
22
23
  export declare const warningAreas1: Area[];
23
24
  export declare const warningAreas2: Area[];
24
25
  export declare const warningAreas3: Area[];
26
+ export declare const hoveredDrawing: DrawingListItem;
25
27
  export declare const buildEarlyWarningInitialValues: () => Partial<WarningEvent>;
26
28
  export declare const buildLiveInitialValues: () => Partial<WarningEvent>;
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  export declare const SUMMARY_HEADLINE_LIMIT = 150;
4
4
  export declare const SUMMARY_CONCISE_SUMMARY_LIMIT = 1500;
5
5
  export declare const SUMMARY_DESCRIPTION_LIMIT = 2500;
6
+ export declare const SUMMARY_FIELDS_MIN_LENGTH = 20;
6
7
  export declare const RemainingChars: React.FC<{
7
8
  name: string;
8
9
  limit: number;
@@ -5,6 +5,8 @@ import type { ClickOnFeature, HoverSelect } from '@opengeoweb/webmap-react';
5
5
  export declare const EXTENT_PADDING = 50;
6
6
  interface WarningsMapViewProps {
7
7
  geojsonFeature?: FeatureCollection | undefined;
8
+ previewGeojsonFeature?: FeatureCollection | undefined;
9
+ shouldFitPreviewIntoView?: boolean;
8
10
  defaultMapPreset?: MapPreset;
9
11
  isSnapshot?: boolean;
10
12
  size?: {
@@ -4,6 +4,7 @@ import type { WarningListItemActions } from '../PublicWarningList/WarningListIte
4
4
  interface WarningBlockProps {
5
5
  warning: Warning;
6
6
  highlighted?: boolean;
7
+ selected?: boolean;
7
8
  left: number;
8
9
  onHoverWarning?: (warningId?: string) => void;
9
10
  onSelectWarning?: (warning: Warning) => void;
@@ -11,5 +12,5 @@ interface WarningBlockProps {
11
12
  top: number;
12
13
  width: number;
13
14
  }
14
- export declare const WarningBlock: React.MemoExoticComponent<({ warning, highlighted, left, onHoverWarning, onSelectWarning, top, warningListItemActions, width, }: WarningBlockProps) => React.JSX.Element>;
15
+ export declare const WarningBlock: React.MemoExoticComponent<({ warning, highlighted, selected, left, onHoverWarning, onSelectWarning, top, warningListItemActions, width, }: WarningBlockProps) => React.JSX.Element>;
15
16
  export {};
@@ -20,7 +20,7 @@ export interface DrawingListItem extends BaseDrawingListItem {
20
20
  scope: DrawingScope;
21
21
  geoJSON: GeoJSON.FeatureCollection;
22
22
  keywords?: string;
23
- transformation?: DrawingTransformation;
23
+ transformation?: DrawingTransformation | null;
24
24
  }
25
25
  export interface AreaListItem extends BaseDrawingListItem {
26
26
  scope: DrawingScope;
@@ -16,6 +16,7 @@ export interface WarningsEventFormState {
16
16
  warningType?: 'warningsEvent';
17
17
  panelId?: string;
18
18
  selectedDrawing?: DrawingListItem;
19
+ hoveredDrawing?: DrawingListItem;
19
20
  }
20
21
  export declare const TAKEOVER_MESSAGE = "You are no longer the editor of this warning";
21
22
  export declare const initialState: WarningsEventFormState;
@@ -39,4 +40,7 @@ export declare const warningsEventFormReducer: import("redux").Reducer<WarningsE
39
40
  setSelectedDrawing: (draft: Draft<WarningsEventFormState>, action: PayloadAction<{
40
41
  drawing?: DrawingListItem;
41
42
  }>) => void;
43
+ setHoveredDrawing: (draft: Draft<WarningsEventFormState>, action: PayloadAction<{
44
+ drawing?: DrawingListItem;
45
+ }>) => void;
42
46
  }, "warningsEventForm">;
@@ -85,3 +85,24 @@ export declare const getWarningsEventSelectedDrawing: ((state: WarningModuleStor
85
85
  argsMemoize: typeof import("reselect").weakMapMemoize;
86
86
  memoize: typeof import("reselect").weakMapMemoize;
87
87
  };
88
+ export declare const getWarningsEventHoveredDrawing: ((state: WarningModuleStore) => import("../warningsDrawings/types").DrawingListItem | undefined) & {
89
+ clearCache: () => void;
90
+ resultsCount: () => number;
91
+ resetResultsCount: () => void;
92
+ } & {
93
+ resultFunc: (resultFuncArgs_0: WarningsEventFormState) => import("../warningsDrawings/types").DrawingListItem | undefined;
94
+ memoizedResultFunc: ((resultFuncArgs_0: WarningsEventFormState) => import("../warningsDrawings/types").DrawingListItem | undefined) & {
95
+ clearCache: () => void;
96
+ resultsCount: () => number;
97
+ resetResultsCount: () => void;
98
+ };
99
+ lastResult: () => import("../warningsDrawings/types").DrawingListItem | undefined;
100
+ dependencies: [(store: WarningModuleStore) => WarningsEventFormState];
101
+ recomputations: () => number;
102
+ resetRecomputations: () => void;
103
+ dependencyRecomputations: () => number;
104
+ resetDependencyRecomputations: () => void;
105
+ } & {
106
+ argsMemoize: typeof import("reselect").weakMapMemoize;
107
+ memoize: typeof import("reselect").weakMapMemoize;
108
+ };
@@ -1,7 +1,7 @@
1
1
  export declare const useFormDirty: ({ isDirty, isLoading, error, onFormDirty, onSuccess, }: {
2
2
  isDirty: boolean;
3
- isLoading: boolean;
4
- error: string | undefined;
3
+ isLoading?: boolean;
4
+ error?: string;
5
5
  onFormDirty: (isFormDirty: boolean) => void;
6
- onSuccess: () => void;
6
+ onSuccess?: () => void;
7
7
  }) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/warnings",
3
- "version": "20.0.0",
3
+ "version": "20.0.1",
4
4
  "description": "GeoWeb warinings library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -20,24 +20,24 @@
20
20
  }
21
21
  },
22
22
  "dependencies": {
23
- "@opengeoweb/api": "20.0.0",
24
- "@opengeoweb/shared": "20.0.0",
25
- "@opengeoweb/store": "20.0.0",
26
- "@opengeoweb/webmap-react": "20.0.0",
23
+ "@opengeoweb/api": "20.0.1",
24
+ "@opengeoweb/shared": "20.0.1",
25
+ "@opengeoweb/store": "20.0.1",
26
+ "@opengeoweb/webmap-react": "20.0.1",
27
27
  "@tanstack/react-query": "^5.85.5",
28
28
  "react-redux": "^9.2.0",
29
- "@opengeoweb/theme": "20.0.0",
30
- "@opengeoweb/form-fields": "20.0.0",
29
+ "@opengeoweb/theme": "20.0.1",
30
+ "@opengeoweb/form-fields": "20.0.1",
31
31
  "react-hook-form": "^7.50.1",
32
32
  "lodash": "^4.18.1",
33
33
  "@reduxjs/toolkit": "^2.6.1",
34
- "@opengeoweb/snackbar": "20.0.0",
34
+ "@opengeoweb/snackbar": "20.0.1",
35
35
  "react-window": "^2.2.6",
36
36
  "axios": "^1.18.0",
37
- "@opengeoweb/core": "20.0.0",
38
- "@opengeoweb/webmap": "20.0.0",
39
- "@opengeoweb/authentication": "20.0.0",
40
- "@opengeoweb/sigmet-airmet": "20.0.0",
37
+ "@opengeoweb/core": "20.0.1",
38
+ "@opengeoweb/webmap": "20.0.1",
39
+ "@opengeoweb/authentication": "20.0.1",
40
+ "@opengeoweb/sigmet-airmet": "20.0.1",
41
41
  "react-i18next": "^15.1.1",
42
42
  "i18next": "^25.0.1",
43
43
  "@mui/material": "^9.0.1",