@opengeoweb/warnings 19.2.0 → 19.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/dist/index.esm.js +4722 -3261
- package/dist/src/index.d.ts +2 -0
- package/dist/src/lib/api/warning-api/api.d.ts +6 -1
- package/dist/src/lib/components/PublicWarningList/PublicWarningListConnect.d.ts +0 -1
- package/dist/src/lib/components/PublicWarningList/useWarningListFeatureSync.d.ts +15 -0
- package/dist/src/lib/components/PublicWarningList/warningListFeatureSyncUtils.d.ts +15 -0
- package/dist/src/lib/components/WarningEvents/WarningEventDialog/WarningEventDialog.d.ts +16 -0
- package/dist/src/lib/components/WarningEvents/WarningEventDialog/WarningEventDialogConnect.d.ts +11 -0
- package/dist/src/lib/components/WarningEvents/WarningEventDialog/index.d.ts +4 -0
- package/dist/src/lib/components/WarningEvents/WarningEventForm/WarningEventFormContent.d.ts +11 -0
- package/dist/src/lib/components/WarningEvents/WarningEventForm/WarningEventItem.d.ts +9 -0
- package/dist/src/lib/components/WarningEvents/WarningEventForm/WarningEventTimeline/WarningEventTimeline.d.ts +16 -0
- package/dist/src/lib/components/WarningEvents/WarningEventForm/WarningEventTimeline/WarningEventTimelineBlock.d.ts +12 -0
- package/dist/src/lib/components/WarningEvents/WarningEventForm/WarningEventTimeline/WarningEventTimelineContext.d.ts +7 -0
- package/dist/src/lib/components/WarningEvents/WarningEventForm/WarningEventTimeline/getTimelineRange.d.ts +5 -0
- package/dist/src/lib/components/WarningEvents/WarningEventForm/WarningEventTimeline/index.d.ts +3 -0
- package/dist/src/lib/components/WarningEvents/WarningEventForm/index.d.ts +2 -0
- package/dist/src/lib/components/WarningEvents/WarningEventForm/types.d.ts +11 -0
- package/dist/src/lib/components/WarningEvents/WarningEventForm/warningEventStoryData.d.ts +14 -0
- package/dist/src/lib/components/WarningEvents/WarningEventSummaryDialog/WarningEventSummaryDialog.d.ts +15 -0
- package/dist/src/lib/components/WarningEvents/WarningEventSummaryDialog/WarningEventSummaryForm.d.ts +12 -0
- package/dist/src/lib/components/WarningEvents/WarningEventSummaryDialog/index.d.ts +1 -0
- package/dist/src/lib/store/warningsForm/types.d.ts +28 -1
- package/dist/src/lib/store/warningsForm/utils.d.ts +1 -0
- package/dist/src/lib/utils/fakeApi/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/src/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export * from './lib/components/ObjectManager';
|
|
|
3
3
|
export * from './lib/components/DrawingTool';
|
|
4
4
|
export * from './lib/components/DrawingToolForm';
|
|
5
5
|
export * from './lib/components/PublicWarningsFormDialog';
|
|
6
|
+
export * from './lib/components/WarningEvents/WarningEventForm';
|
|
7
|
+
export * from './lib/components/WarningEvents/WarningEventDialog';
|
|
6
8
|
export * from './lib/components/ComponentsLookUp';
|
|
7
9
|
export * from './lib/components/WarningsTimeline';
|
|
8
10
|
export * from './lib/store';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Credentials } from '@opengeoweb/authentication';
|
|
2
2
|
import type { MaritimeWarningsConfig } from '../../components/MaritimeWarningsForm/types';
|
|
3
3
|
import type { DrawingFromBE, DrawingFromFE, DrawingListItem, FetchDrawingParams } from '../../store/warningsDrawings/types';
|
|
4
|
-
import type { MaritimeWarning, MaritimeWarningsType, PublicWarning } from '../../store/warningsForm/types';
|
|
4
|
+
import type { MaritimeWarning, MaritimeWarningsType, PublicWarning, WarningEvent } from '../../store/warningsForm/types';
|
|
5
5
|
export declare const getPublicWarningList: (auth: Credentials, apiParams?: Record<string, string>) => Promise<PublicWarning[]>;
|
|
6
6
|
export declare const updatePublicWarningEditor: (warningId: string, isEditor: boolean, auth: Credentials, force?: boolean) => Promise<Headers | null>;
|
|
7
7
|
export declare const updatePublicWarning: (warningId: string, auth: Credentials, data: PublicWarning) => Promise<Headers | null>;
|
|
@@ -17,3 +17,8 @@ export declare const saveDrawingAs: (auth: Credentials, data: DrawingFromFE) =>
|
|
|
17
17
|
export declare const updateDrawing: (auth: Credentials, drawingId: string, data: DrawingFromFE) => Promise<void>;
|
|
18
18
|
export declare const deleteDrawing: (auth: Credentials, drawingId: string) => Promise<void>;
|
|
19
19
|
export declare const getMaritimeWarningsConfig: (auth: Credentials) => Promise<MaritimeWarningsConfig>;
|
|
20
|
+
export declare const getWarningEventList: (auth: Credentials, apiParams?: Record<string, string>) => Promise<WarningEvent[]>;
|
|
21
|
+
export declare const updateWarningEventEditor: (eventId: string, isEditor: boolean, auth: Credentials, force?: boolean) => Promise<Headers | null>;
|
|
22
|
+
export declare const updateWarningEvent: (eventId: string, auth: Credentials, data: WarningEvent) => Promise<Headers | null>;
|
|
23
|
+
export declare const postWarningEvent: (auth: Credentials, data: WarningEvent) => Promise<Headers | null>;
|
|
24
|
+
export declare const deleteWarningEvent: (eventId: string, auth: Credentials) => Promise<null>;
|
|
@@ -6,5 +6,4 @@ export interface PublicWarningListConnectProps {
|
|
|
6
6
|
presetFilterState?: PickedFilterState;
|
|
7
7
|
presetExpandedSections?: ExpandedWarningSections;
|
|
8
8
|
}
|
|
9
|
-
export declare const WARNING_HOVER_DISPATCH_DELAY = 50;
|
|
10
9
|
export declare const PublicWarningListConnect: React.FC<PublicWarningListConnectProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Warning } from '../../store/warningsForm/types';
|
|
2
|
+
export declare const WARNING_HOVER_DISPATCH_DELAY = 50;
|
|
3
|
+
interface UseWarningListFeatureSyncProps {
|
|
4
|
+
filteredWarningsByExpandedSections: Warning[];
|
|
5
|
+
hiddenWarningIds: Set<string>;
|
|
6
|
+
panelId: string;
|
|
7
|
+
selectedFormWarning?: Warning;
|
|
8
|
+
selectedWarningId?: string;
|
|
9
|
+
}
|
|
10
|
+
interface UseWarningListFeatureSyncResult {
|
|
11
|
+
handleHoverWarning: (warningId?: string) => void;
|
|
12
|
+
hoveredFeatureId?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const useWarningListFeatureSync: ({ filteredWarningsByExpandedSections, hiddenWarningIds, panelId, selectedFormWarning, selectedWarningId, }: UseWarningListFeatureSyncProps) => UseWarningListFeatureSyncResult;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { syncGroupsTypes } from '@opengeoweb/store';
|
|
2
|
+
import type { Warning } from '../../store/warningsForm/types';
|
|
3
|
+
export interface SyncedWarningFeature {
|
|
4
|
+
id: string;
|
|
5
|
+
originalId: string;
|
|
6
|
+
geoJSON: GeoJSON.FeatureCollection;
|
|
7
|
+
}
|
|
8
|
+
export declare const getSelectedFormAreaIds: (selectedFormWarning?: Warning) => Set<string>;
|
|
9
|
+
export declare const shouldExcludeWarningFromFeatureSync: ({ hiddenWarningIds, hasMatchingAreaId, selectedWarningId, warningIds, }: {
|
|
10
|
+
hiddenWarningIds: Set<string>;
|
|
11
|
+
hasMatchingAreaId: boolean;
|
|
12
|
+
selectedWarningId?: string;
|
|
13
|
+
warningIds: string[];
|
|
14
|
+
}) => boolean;
|
|
15
|
+
export declare const createWarningFeatureCollection: (allFeatures: SyncedWarningFeature[]) => GeoJSON.FeatureCollection<GeoJSON.Geometry, syncGroupsTypes.PotentialDataProperties | null>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DraggableSize, HeaderSize, Position } from '@opengeoweb/shared';
|
|
3
|
+
import type { uiTypes } from '@opengeoweb/store';
|
|
4
|
+
export interface WarningEventDialogProps {
|
|
5
|
+
bounds?: string;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onMouseDown?: () => void;
|
|
9
|
+
order?: number;
|
|
10
|
+
source?: uiTypes.Source;
|
|
11
|
+
size?: DraggableSize;
|
|
12
|
+
startPosition?: Position;
|
|
13
|
+
headerSize?: HeaderSize;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare const WarningEventDialog: React.FC<WarningEventDialogProps>;
|
package/dist/src/lib/components/WarningEvents/WarningEventDialog/WarningEventDialogConnect.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Position } from '@opengeoweb/shared';
|
|
3
|
+
import type { uiTypes } from '@opengeoweb/store';
|
|
4
|
+
import type { WarningEvent } from '../../../store/warningsForm/types';
|
|
5
|
+
export interface WarningEventDialogConnectProps {
|
|
6
|
+
bounds?: string;
|
|
7
|
+
source?: uiTypes.Source;
|
|
8
|
+
startPosition?: Position;
|
|
9
|
+
initialValues?: Partial<WarningEvent>;
|
|
10
|
+
}
|
|
11
|
+
export declare const WarningEventDialogConnect: React.FC<WarningEventDialogConnectProps>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { WarningEventDialog } from './WarningEventDialog';
|
|
2
|
+
export type { WarningEventDialogProps } from './WarningEventDialog';
|
|
3
|
+
export { WarningEventDialogConnect } from './WarningEventDialogConnect';
|
|
4
|
+
export type { WarningEventDialogConnectProps } from './WarningEventDialogConnect';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WarningEvent } from '../../../store/warningsForm/types';
|
|
3
|
+
export interface WarningEventFormContentProps {
|
|
4
|
+
isReadOnly?: boolean;
|
|
5
|
+
onCancel?: () => void;
|
|
6
|
+
onDelete?: () => void;
|
|
7
|
+
onOpenWarningSummary?: () => void;
|
|
8
|
+
onSaveAsDraft?: (formValues: WarningEvent) => void;
|
|
9
|
+
onPublish?: (formValues: WarningEvent) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const WarningEventFormContent: React.FC<WarningEventFormContentProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WarningEventBody } from '../../../store/warningsForm/types';
|
|
3
|
+
export declare const warningEventItemDefaultValues: WarningEventBody;
|
|
4
|
+
export declare const WarningEventItem: React.FC<{
|
|
5
|
+
index: number;
|
|
6
|
+
isReadOnly: boolean;
|
|
7
|
+
onDeleteWarning: (index: number) => void;
|
|
8
|
+
}>;
|
|
9
|
+
export default WarningEventItem;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface WarningEventTimelineProps {
|
|
3
|
+
start: Date;
|
|
4
|
+
end: Date;
|
|
5
|
+
validFrom: string;
|
|
6
|
+
validUntil: string;
|
|
7
|
+
level: string;
|
|
8
|
+
now?: Date;
|
|
9
|
+
}
|
|
10
|
+
interface AxisIntervals {
|
|
11
|
+
tickHours: number;
|
|
12
|
+
labelHours: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const getAxisIntervals: (rangeDays: number) => AxisIntervals;
|
|
15
|
+
export declare const WarningEventTimeline: React.FC<WarningEventTimelineProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface WarningEventTimelineBlockProps {
|
|
3
|
+
start: Date;
|
|
4
|
+
end: Date;
|
|
5
|
+
now: Date;
|
|
6
|
+
drawableWidth: number;
|
|
7
|
+
validFrom: string;
|
|
8
|
+
validUntil: string;
|
|
9
|
+
level: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const WarningEventTimelineBlock: React.FC<WarningEventTimelineBlockProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TimelineRange } from './getTimelineRange';
|
|
3
|
+
export declare const WarningEventTimelineRangeProvider: React.FC<{
|
|
4
|
+
range: TimelineRange;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const useTimelineRange: () => TimelineRange;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WarningEvent } from '../../../store/warningsForm/types';
|
|
2
|
+
import { WarningEventType } from '../../../store/warningsForm/types';
|
|
3
|
+
export declare const warningEventTypes: {
|
|
4
|
+
translationKey: string;
|
|
5
|
+
key: WarningEventType;
|
|
6
|
+
defaultDayRange: [number, number];
|
|
7
|
+
minSelectableDay: number;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const getDefaultDayRangeForType: (type: WarningEventType) => [number, number];
|
|
10
|
+
export declare const getMinSelectableDayForType: (type: WarningEventType) => number;
|
|
11
|
+
export declare const defaultValues: WarningEvent;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WarningEvent } from '../../../store/warningsForm/types';
|
|
2
|
+
export declare const emptyWarning: {
|
|
3
|
+
incident: string;
|
|
4
|
+
validFrom: string;
|
|
5
|
+
validUntil: string;
|
|
6
|
+
level: string;
|
|
7
|
+
domain: string;
|
|
8
|
+
warningProposalSource: string;
|
|
9
|
+
authority: string;
|
|
10
|
+
phenomenon: string;
|
|
11
|
+
type: number;
|
|
12
|
+
warning_handle_uuid: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const buildLiveInitialValues: () => Partial<WarningEvent>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HeaderSize, Position, DraggableSize } from '@opengeoweb/shared';
|
|
3
|
+
import type { uiTypes } from '@opengeoweb/store';
|
|
4
|
+
export declare const WarningEventSummaryDialog: React.FC<{
|
|
5
|
+
bounds?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onMouseDown?: () => void;
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
order?: number;
|
|
11
|
+
source?: uiTypes.Source;
|
|
12
|
+
size?: DraggableSize;
|
|
13
|
+
startPosition?: Position;
|
|
14
|
+
headerSize?: HeaderSize;
|
|
15
|
+
}>;
|
package/dist/src/lib/components/WarningEvents/WarningEventSummaryDialog/WarningEventSummaryForm.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const RemainingChars: React.FC<{
|
|
4
|
+
curValue: string;
|
|
5
|
+
limit: number;
|
|
6
|
+
t: TFunction<'warn'>;
|
|
7
|
+
}>;
|
|
8
|
+
interface FormProps {
|
|
9
|
+
isReadOnly?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const WarningEventSummaryForm: React.FC<FormProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WarningEventSummaryDialog } from './WarningEventSummaryDialog';
|
|
@@ -40,7 +40,7 @@ export declare enum MaritimeWarningAction {
|
|
|
40
40
|
EXTEND = "EXTEND"
|
|
41
41
|
}
|
|
42
42
|
export type MaritimeWarningsType = 'maritimeWarningCoastal' | 'maritimeWarningNorthSea';
|
|
43
|
-
export type WarningType = 'public' | 'airmet' | 'sigmet' | MaritimeWarningsType;
|
|
43
|
+
export type WarningType = 'public' | 'airmet' | 'sigmet' | MaritimeWarningsType | 'warningEvent';
|
|
44
44
|
interface BaseWarning {
|
|
45
45
|
status?: PublicWarningStatus;
|
|
46
46
|
productStatus?: ProductStatus;
|
|
@@ -69,5 +69,32 @@ export interface MaritimeWarning extends BaseWarning {
|
|
|
69
69
|
windDirectionTo?: string;
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
+
export type WarningEventBody = Omit<PublicWarningDetail, 'descriptionOriginal' | 'descriptionTranslation'>;
|
|
73
|
+
export interface WarningEventTexts {
|
|
74
|
+
headlineOriginal: string;
|
|
75
|
+
headlineTranslation: string;
|
|
76
|
+
conciseSummaryOriginal: string;
|
|
77
|
+
conciseSummaryTranslation: string;
|
|
78
|
+
descriptionOriginal: string;
|
|
79
|
+
descriptionTranslation: string;
|
|
80
|
+
}
|
|
81
|
+
export declare enum WarningEventType {
|
|
82
|
+
WARNING = "WARNING",
|
|
83
|
+
EARLY_WARNING = "EARLY_WARNING"
|
|
84
|
+
}
|
|
85
|
+
export interface WarningEvent {
|
|
86
|
+
eventId?: string;
|
|
87
|
+
status?: PublicWarningStatus;
|
|
88
|
+
editor?: string;
|
|
89
|
+
lastUpdatedTime?: string;
|
|
90
|
+
phenomenon: string;
|
|
91
|
+
validFrom: string;
|
|
92
|
+
validUntil: string;
|
|
93
|
+
incident?: string;
|
|
94
|
+
type?: 'public';
|
|
95
|
+
warningEventType: WarningEventType;
|
|
96
|
+
warnings: WarningEventBody[];
|
|
97
|
+
texts: WarningEventTexts;
|
|
98
|
+
}
|
|
72
99
|
export type Warning = PublicWarning | AirmetWarning | SigmetWarning | MaritimeWarning;
|
|
73
100
|
export {};
|
|
@@ -16,6 +16,7 @@ declare const areaKeywordList: string[];
|
|
|
16
16
|
export declare const publicWarningEndpoints: import("msw").HttpHandler[];
|
|
17
17
|
export declare const maritimeWarningEndpoints: import("msw").HttpHandler[];
|
|
18
18
|
export declare const drawingEndpoints: import("msw").HttpHandler[];
|
|
19
|
+
export declare const warningEventsEndpoints: import("msw").HttpHandler[];
|
|
19
20
|
export declare const makeWarningsHandler: (result: Warning[]) => RequestHandler;
|
|
20
21
|
declare const requestHandlers: import("msw").HttpHandler[];
|
|
21
22
|
export { drawingList, predefinedAreaList, drawingsListFullContent, warningList, lengthWarningListWithoutExpiredWithdrawn, sigmetList, airmetList, combinedWarnings, areaKeywordList, requestHandlers, maritimeList, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/warnings",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.3.0",
|
|
4
4
|
"description": "GeoWeb warinings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@reduxjs/toolkit": "^2.6.1",
|
|
34
34
|
"@opengeoweb/snackbar": "*",
|
|
35
35
|
"react-window": "^2.2.6",
|
|
36
|
-
"axios": "^1.
|
|
36
|
+
"axios": "^1.18.0",
|
|
37
37
|
"@opengeoweb/core": "*",
|
|
38
38
|
"@opengeoweb/webmap": "*",
|
|
39
39
|
"@opengeoweb/authentication": "*",
|