@opengeoweb/warnings 9.14.0 → 9.15.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.
Files changed (34) hide show
  1. package/index.esm.js +1263 -595
  2. package/package.json +5 -2
  3. package/src/lib/components/DrawingTool/useObjectDrawDialogAction.d.ts +3 -7
  4. package/src/lib/components/DrawingToolForm/DrawingToolFormContents.d.ts +0 -6
  5. package/src/lib/components/ObjectManager/ConfirmDeleteDialog.d.ts +3 -5
  6. package/src/lib/components/ObjectManager/ObjectManager.d.ts +0 -1
  7. package/src/lib/components/ObjectManager/ObjectManagerConnect.d.ts +0 -4
  8. package/src/lib/components/ObjectManager/Objects.d.ts +0 -6
  9. package/src/lib/components/Providers/Providers.d.ts +6 -0
  10. package/src/lib/components/PublicWarningList/ConfirmWarningDialog.d.ts +0 -1
  11. package/src/lib/components/PublicWarningList/PublicWarningList.d.ts +0 -6
  12. package/src/lib/components/PublicWarningList/PublicWarningListConnect.d.ts +0 -8
  13. package/src/lib/components/PublicWarningsForm/AreaField/AreaField.d.ts +0 -8
  14. package/src/lib/components/PublicWarningsForm/LevelField/LevelField.d.ts +15 -5
  15. package/src/lib/components/PublicWarningsForm/PhenomenonField/PhenomenonField.d.ts +6 -4
  16. package/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +5 -6
  17. package/src/lib/components/PublicWarningsForm/PublicWarningsFormConnect.d.ts +9 -1
  18. package/src/lib/components/PublicWarningsForm/ValidFromField/ValidFromField.d.ts +4 -5
  19. package/src/lib/components/PublicWarningsForm/ValidUntilField/ValidUntilField.d.ts +6 -7
  20. package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialog.d.ts +0 -1
  21. package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialogConnect.d.ts +8 -8
  22. package/src/lib/components/WarningsMapView/WarningsMapView.d.ts +13 -0
  23. package/src/lib/store/config.d.ts +6 -14
  24. package/src/lib/store/drawings/listener.d.ts +2 -0
  25. package/src/lib/store/drawings/selectors.d.ts +1 -1
  26. package/src/lib/store/drawings/types.d.ts +2 -7
  27. package/src/lib/store/publicWarningForm/sagas.d.ts +0 -2
  28. package/src/lib/store/publicWarningForm/selectors.d.ts +1 -1
  29. package/src/lib/store/publicWarnings/selectors.d.ts +1 -1
  30. package/src/lib/store/types.d.ts +9 -0
  31. package/src/lib/utils/api.d.ts +3 -3
  32. package/src/lib/utils/i18n.d.ts +411 -0
  33. package/src/lib/store/drawings/sagas.d.ts +0 -8
  34. /package/src/lib/{store/drawings/sagas.spec.d.ts → components/WarningsMapView/WarningsMapView.spec.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/warnings",
3
- "version": "9.14.0",
3
+ "version": "9.15.0",
4
4
  "description": "GeoWeb warinings library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -27,7 +27,10 @@
27
27
  "axios": "1.5.0",
28
28
  "@opengeoweb/core": "*",
29
29
  "@opengeoweb/webmap": "*",
30
- "@opengeoweb/authentication": "*"
30
+ "@opengeoweb/authentication": "*",
31
+ "react-i18next": "^13.5.0",
32
+ "i18next": "^23.7.19",
33
+ "immer": "^10.0.3"
31
34
  },
32
35
  "peerDependencies": {
33
36
  "react": "18"
@@ -1,11 +1,7 @@
1
1
  import { uiTypes } from '@opengeoweb/store';
2
- export declare const confirmationDialogOptions: {
3
- cancelLabel: string;
4
- title: string;
5
- description: string;
6
- confirmLabel: string;
7
- catchOnCancel: boolean;
8
- };
2
+ import { ConfirmationOptions } from '@opengeoweb/shared';
3
+ import { TFunction } from 'i18next';
4
+ export declare const confirmationDialogOptions: (t: TFunction) => ConfirmationOptions;
9
5
  export declare const useCloseDrawDialog: ({ mapId, source, }: {
10
6
  mapId: string;
11
7
  source?: uiTypes.Source | undefined;
@@ -3,12 +3,6 @@ import { SelectChangeEvent } from '@mui/material';
3
3
  import { DrawMode } from '@opengeoweb/webmap-react';
4
4
  import { FieldErrors, FieldValues } from 'react-hook-form';
5
5
  export declare const opacityOptions: number[];
6
- export declare const SAVE_OBJECT_BUTTON = "Save new object";
7
- export declare const UPDATE_OBJECT_BUTTON = "Update object";
8
- export declare const INPUT_OBJECT = "Object name";
9
- export declare const INPUT_OPACITY = "Opacity";
10
- export declare const DRAW_EXIT_MODE_MESSAGE = "press ESC to exit draw mode";
11
- export declare const coordinatesEmptyMessage = "An object drawing is required";
12
6
  export interface DrawingToolFormValues {
13
7
  objectName: string;
14
8
  geoJSON: GeoJSON.FeatureCollection;
@@ -1,9 +1,7 @@
1
1
  import React from 'react';
2
- export declare const DELETE_TITLE = "Delete object";
3
- export declare const DELETE_CONFIRM = "Delete";
4
- export declare const CANCEL = "Cancel";
5
- export declare const getDeleteDescription: (objectName: string) => string;
6
- export declare const getDeleteSucces: (objectName: string) => string;
2
+ import { TFunction } from 'i18next';
3
+ export declare const getDeleteDescription: (objectName: string, t: TFunction) => string;
4
+ export declare const getDeleteSucces: (objectName: string, t: TFunction) => string;
7
5
  export declare const ConfirmDeleteDialog: React.FC<{
8
6
  objectId: string;
9
7
  objectName: string;
@@ -2,7 +2,6 @@ import * as React from 'react';
2
2
  import { HeaderSize, Position, DraggableSize } from '@opengeoweb/shared';
3
3
  import { uiTypes } from '@opengeoweb/store';
4
4
  import { DrawingListItem } from '../../store/drawings/types';
5
- export declare const BUTTON_ADD_OBJECT = "Add a new object";
6
5
  export declare const ObjectManager: React.FC<{
7
6
  bounds?: string;
8
7
  title?: string;
@@ -1,9 +1,5 @@
1
1
  import { uiTypes } from '@opengeoweb/store';
2
2
  import React from 'react';
3
- export declare const DELETE_TITLE = "Delete object";
4
- export declare const DELETE_CONFIRM = "Delete";
5
- export declare const getDeleteDescription: (objectName: string) => string;
6
- export declare const getDeleteSucces: (objectName: string) => string;
7
3
  export declare const ObjectManagerConnect: React.FC<{
8
4
  bounds?: string;
9
5
  source?: uiTypes.Source;
@@ -1,13 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { DrawingListItem } from '../../store/drawings/types';
3
- export declare const NO_OBJECTS_FOUND = "No objects found";
4
- export declare const BUTTON_EDIT = "Edit";
5
- export declare const BUTTON_DELETE = "Delete";
6
- export declare const BUTTON_SHARE = "Share";
7
3
  export declare const BUTTON_AIRMET = "AIRMET";
8
4
  export declare const BUTTON_SIGMET = "SIGMET";
9
- export declare const BUTTON_PUBLIC_WARNING = "PUBLIC WARNING";
10
- export declare const MENU_SHARE = "Share object to";
11
5
  type ListInclHeadersType = {
12
6
  isObject: boolean;
13
7
  index: number;
@@ -12,3 +12,9 @@ export interface WarningsThemeStoreProviderProps extends WarningsThemeProviderPr
12
12
  createApi?: () => WarningsApi;
13
13
  }
14
14
  export declare const WarningsThemeStoreProvider: React.FC<WarningsThemeStoreProviderProps>;
15
+ interface WarningsTranslationsWrapperProps {
16
+ children?: React.ReactNode;
17
+ }
18
+ export declare const WarningsTranslationsWrapper: React.FC<WarningsTranslationsWrapperProps>;
19
+ export declare const WarningsI18nProvider: React.FC<WarningsTranslationsWrapperProps>;
20
+ export {};
@@ -6,7 +6,6 @@ export interface ConfirmDialogProps {
6
6
  confirmLabel: string;
7
7
  callback: (data?: unknown) => void;
8
8
  }
9
- export declare const CANCEL = "Go back";
10
9
  export declare const ConfirmDeleteWarningDialog: React.FC<{
11
10
  onClose: () => void;
12
11
  } & ConfirmDialogProps>;
@@ -1,12 +1,6 @@
1
1
  import { GridProps } from '@mui/material';
2
2
  import React from 'react';
3
3
  import { PublicWarning, PublicWarningStatus } from '../../store/publicWarningForm/types';
4
- export declare const CREATE_WARNING = "Create a warning";
5
- export declare const BUTTON_EDIT = "Edit";
6
- export declare const BUTTON_DELETE = "Delete";
7
- export declare const BUTTON_USE = "Use";
8
- export declare const BUTTON_IGNORE = "Ignore";
9
- export declare const BUTTON_OPTIONS = "Options";
10
4
  export declare const getWarningWithoutId: (warning: PublicWarning) => PublicWarning;
11
5
  export declare const WarningListColumnContent: React.FC<GridProps & {
12
6
  title?: string;
@@ -1,11 +1,3 @@
1
1
  import React from 'react';
2
- export declare const DELETE_WARNING_SUCCESS_MESSAGE = "Warning has been deleted";
3
- export declare const DELETE_TITLE = "Delete warning";
4
- export declare const DELETE_CONFIRM = "Delete";
5
- export declare const DELETE_DESCRIPTION = "Are you sure you want to delete this warning?";
6
- export declare const IGNORE_WARNING_SUCCESS_MESSAGE = "Warning has been ignored";
7
- export declare const IGNORE_TITLE = "Ignore warning";
8
- export declare const IGNORE_CONFIRM = "Ignore";
9
- export declare const IGNORE_DESCRIPTION = "Are you sure you want to ignore this warning?";
10
2
  export declare const PublicWarningListConnect: React.FC;
11
3
  export default PublicWarningListConnect;
@@ -1,12 +1,4 @@
1
1
  import React from 'react';
2
- export declare const LABEL_AREA = "Area";
3
- export declare const BUTTON_ADD_OBJECT = "Add object";
4
- export declare const BUTTON_DELETE = "Delete";
5
- export declare const BUTTON_VIEW = "View";
6
- export declare const BUTTON_EDIT = "Edit";
7
- export declare const OBJECTS_MENU = "Object options";
8
- export declare const NO_OBJECT = "(no object selected)";
9
- export declare const OBJECT_SELECTED = "object selected";
10
2
  export declare const formatDate: (lastUpdatedTime: string) => string;
11
3
  export declare const AreaField: React.FC<{
12
4
  onEditObject: () => void;
@@ -1,12 +1,22 @@
1
1
  import * as React from 'react';
2
- export declare const LABEL_LEVEL = "Level";
3
- export declare const levelOptions: {
4
- title: string;
5
- key: string;
2
+ import { TFunction } from 'i18next';
3
+ export interface LevelColor {
6
4
  color: string;
7
5
  textColor: string;
8
- }[];
6
+ }
7
+ interface LevelDetails extends LevelColor {
8
+ title: string;
9
+ key: string;
10
+ }
11
+ export declare enum WarningLevel {
12
+ moderate = "moderate",
13
+ severe = "severe",
14
+ extreme = "extreme"
15
+ }
16
+ export declare const LevelColors: Record<WarningLevel, LevelColor>;
17
+ export declare const levelOptions: (t: TFunction) => LevelDetails[];
9
18
  export declare const LevelField: React.FC<{
10
19
  isDisabled?: boolean;
11
20
  isReadOnly?: boolean;
12
21
  }>;
22
+ export {};
@@ -1,11 +1,13 @@
1
1
  import * as React from 'react';
2
- export declare const LABEL_PHENOMENON = "Phenomenon";
3
- export declare const warningPhenomena: {
2
+ import { TFunction } from 'i18next';
3
+ interface PhenomenonDetails {
4
4
  title: string;
5
5
  key: string;
6
- icon: React.JSX.Element;
7
- }[];
6
+ icon: JSX.Element;
7
+ }
8
+ export declare const warningPhenomena: (t: TFunction) => PhenomenonDetails[];
8
9
  export declare const Phenomenon: React.FC<{
9
10
  isDisabled?: boolean;
10
11
  isReadOnly?: boolean;
11
12
  }>;
13
+ export {};
@@ -1,15 +1,10 @@
1
1
  import * as React from 'react';
2
+ import { Bbox } from '@opengeoweb/webmap';
2
3
  import { PublicWarningDetail } from '../../store/publicWarningForm/types';
3
4
  import { BaseDrawingListItem, DrawingListItem } from '../../store/drawings/types';
4
5
  import { FormAction, FormError } from '../../store/publicWarningForm/reducer';
5
6
  export declare const getEmptyPublicWarning: () => PublicWarningDetail;
6
7
  export declare const getFormData: (publicWarningsDetails: PublicWarningDetail | undefined, object?: DrawingListItem) => FormData;
7
- export declare const LABEL_PROBABILITY = "Probability";
8
- export declare const BUTTON_CLEAR = "Clear";
9
- export declare const BUTTON_SAVE = "Save";
10
- export declare const BUTTON_SAVING = "Saving";
11
- export declare const BUTTON_PUBLISH = "Publish";
12
- export declare const BUTTON_PUBLISHING = "Publishing";
13
8
  interface FormData extends PublicWarningDetail {
14
9
  IS_DRAFT?: boolean | string;
15
10
  object?: BaseDrawingListItem;
@@ -18,6 +13,10 @@ interface FormData extends PublicWarningDetail {
18
13
  export declare const prepareFormValues: (data: FormData) => PublicWarningDetail;
19
14
  interface FormProps {
20
15
  formAction?: FormAction;
16
+ defaultBbox?: {
17
+ srs: string;
18
+ bbox: Bbox;
19
+ };
21
20
  onSaveForm?: (formValues: PublicWarningDetail) => void;
22
21
  onPublishForm?: (formValues: PublicWarningDetail) => void;
23
22
  object?: DrawingListItem;
@@ -1,2 +1,10 @@
1
1
  import * as React from 'react';
2
- export declare const PublicWarningsFormConnect: React.FC;
2
+ import { Bbox } from '@opengeoweb/webmap';
3
+ interface PublicWarningsFormConnectProps {
4
+ defaultBbox?: {
5
+ srs: string;
6
+ bbox: Bbox;
7
+ };
8
+ }
9
+ export declare const PublicWarningsFormConnect: React.FC<PublicWarningsFormConnectProps>;
10
+ export {};
@@ -1,9 +1,8 @@
1
1
  import * as React from 'react';
2
- export declare const LABEL_VALID_FROM = "Valid from";
3
- export declare const VALID_FROM_ERROR_BEFORE_CURRENT = "Valid from time cannot be before current time";
4
- export declare const VALID_FROM_ERROR_AFTER_CURRENT: string;
5
- export declare const isValueBeforeCurrentTime: (value: string) => boolean | string;
6
- export declare const isMaxHoursAfterCurrentTime: (value: string) => boolean | string;
2
+ import { TFunction } from 'i18next';
3
+ export declare const VALID_FROM_MAX_HOURS_AFTER_CURRENT = 168;
4
+ export declare const isValueBeforeCurrentTime: (value: string, t: TFunction) => boolean | string;
5
+ export declare const isMaxHoursAfterCurrentTime: (value: string, t: TFunction) => boolean | string;
7
6
  export declare const ValidFrom: React.FC<{
8
7
  isDisabled?: boolean;
9
8
  isReadOnly?: boolean;
@@ -1,11 +1,10 @@
1
1
  import * as React from 'react';
2
- export declare const LABEL_VALID_UNTIL = "Valid until";
3
- export declare const VALID_UNTIL_ERROR_BEFORE_CURRENT = "Valid until time cannot be before current time";
4
- export declare const VALID_UNTIL_ERROR_AFTER_CURRENT: string;
5
- export declare const VALID_UNTIL_ERROR_AFTER_VALID_FROM: string;
6
- export declare const isValueBeforeCurrentTime: (value: string) => boolean | string;
7
- export declare const isMaxHoursAfterCurrentTime: (value: string) => boolean | string;
8
- export declare const isMinHoursAfterValidFrom: (value: string, validFromValue: string) => boolean | string;
2
+ import { TFunction } from 'i18next';
3
+ export declare const VALID_UNTIL_MAX_HOURS_AFTER_CURRENT = 180;
4
+ export declare const VALID_UNTIL_MIN_HOURS_AFTER_VALID_FROM = 1;
5
+ export declare const isValueBeforeCurrentTime: (value: string, t: TFunction) => boolean | string;
6
+ export declare const isMaxHoursAfterCurrentTime: (value: string, t: TFunction) => boolean | string;
7
+ export declare const isMinHoursAfterValidFrom: (value: string, validFromValue: string, t: TFunction) => boolean | string;
9
8
  export declare const ValidUntil: React.FC<{
10
9
  isDisabled?: boolean;
11
10
  isReadOnly?: boolean;
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Position, DraggableSize, HeaderSize } from '@opengeoweb/shared';
3
3
  import { uiTypes } from '@opengeoweb/store';
4
- export declare const DIALOG_TITLE = "Public Warning";
5
4
  export declare const PublicWarningsFormDialog: React.FC<{
6
5
  bounds?: string;
7
6
  title?: string;
@@ -1,16 +1,16 @@
1
1
  import React from 'react';
2
2
  import { uiTypes } from '@opengeoweb/store';
3
- import { Position } from '@opengeoweb/shared';
4
- export declare const warningFormConfirmationOptions: {
5
- cancelLabel: string;
6
- title: string;
7
- description: string;
8
- confirmLabel: string;
9
- catchOnCancel: boolean;
10
- };
3
+ import { ConfirmationOptions, Position } from '@opengeoweb/shared';
4
+ import { TFunction } from 'i18next';
5
+ import { Bbox } from '@opengeoweb/webmap';
6
+ export declare const warningFormConfirmationOptions: (t: TFunction) => ConfirmationOptions;
11
7
  export declare const isAlreadyEdited: (publicWarningEditor: string | undefined, username: string | undefined) => boolean;
12
8
  export declare const PublicWarningsFormDialogConnect: React.FC<{
13
9
  bounds?: string;
14
10
  source?: uiTypes.Source;
15
11
  startPosition?: Position;
12
+ defaultBbox?: {
13
+ srs: string;
14
+ bbox: Bbox;
15
+ };
16
16
  }>;
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { Bbox } from '@opengeoweb/webmap';
3
+ import { FeatureCollection } from 'geojson';
4
+ export declare const zoomToFeature: (mapId: string, geojsonFeature: FeatureCollection | undefined) => void;
5
+ interface WarningsMapViewProps {
6
+ geojsonFeature: FeatureCollection | undefined;
7
+ defaultBbox?: {
8
+ srs: string;
9
+ bbox: Bbox;
10
+ };
11
+ }
12
+ export declare const WarningsMapView: React.FC<WarningsMapViewProps>;
13
+ export {};
@@ -1,20 +1,12 @@
1
- import { CoreAppStore } from '@opengeoweb/store';
2
- import drawingSagas from './drawings/sagas';
3
- import { DrawState } from './drawings/types';
4
- import { PublicWarningFormState } from './publicWarningForm/reducer';
5
- import { PublicWarningsState } from './publicWarnings/types';
6
- export interface WarningModuleStore extends CoreAppStore {
7
- drawings?: DrawState;
8
- publicWarningForm?: PublicWarningFormState;
9
- publicWarnings?: PublicWarningsState;
10
- }
1
+ import publicWarningFormSagas from './publicWarningForm/sagas';
11
2
  export declare const drawingModuleConfig: {
12
3
  id: string;
13
4
  reducersMap: {
14
- drawings: import("redux").Reducer<DrawState, import("redux").AnyAction>;
15
- publicWarningForm: import("redux").Reducer<PublicWarningFormState, import("redux").AnyAction>;
16
- publicWarnings: import("redux").Reducer<PublicWarningsState, import("redux").AnyAction>;
5
+ drawings: import("redux").Reducer<import("./drawings/types").DrawState, import("redux").AnyAction>;
6
+ publicWarningForm: import("redux").Reducer<import("./publicWarningForm/reducer").PublicWarningFormState, import("redux").AnyAction>;
7
+ publicWarnings: import("redux").Reducer<import("./publicWarnings/types").PublicWarningsState, import("redux").AnyAction>;
17
8
  };
18
- sagas: (typeof drawingSagas)[];
9
+ sagas: (typeof publicWarningFormSagas)[];
10
+ middlewares: import("@reduxjs/toolkit").ListenerMiddleware<import("./types").WarningModuleStore, import("redux-thunk").ThunkDispatch<import("./types").WarningModuleStore, unknown, import("redux").AnyAction>, unknown>[];
19
11
  };
20
12
  export default drawingModuleConfig;
@@ -0,0 +1,2 @@
1
+ import { WarningModuleStore } from '../types';
2
+ export declare const drawingsListener: import("@reduxjs/toolkit").ListenerMiddlewareInstance<WarningModuleStore, import("@reduxjs/toolkit").ThunkDispatch<WarningModuleStore, unknown, import("redux").AnyAction>, unknown>;
@@ -1,5 +1,5 @@
1
1
  import { DrawState } from './types';
2
- import { WarningModuleStore } from '../config';
2
+ import { WarningModuleStore } from '../types';
3
3
  export declare const getDrawStore: (store: WarningModuleStore) => DrawState;
4
4
  export declare const selectDrawByInstanceId: (state: WarningModuleStore, id: import("@reduxjs/toolkit").EntityId) => import("./types").DrawItem | undefined;
5
5
  export declare const getWarningFormDirty: ((state: WarningModuleStore, id: import("@reduxjs/toolkit").EntityId) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").DrawItem | undefined) => boolean, {
@@ -23,11 +23,6 @@ export interface DrawingDetails extends Omit<DrawingFromBE, 'id' | 'lastUpdatedT
23
23
  id?: string;
24
24
  lastUpdatedTime?: string;
25
25
  }
26
+ export type DrawingFromFE = Omit<DrawingDetails, 'username'>;
26
27
  export type SetDrawValuesPayload = DrawItem;
27
- export interface SubmitDrawValuesPayload {
28
- id?: string;
29
- geoJSON: GeoJSON.FeatureCollection;
30
- objectName: string;
31
- lastUpdatedTime?: string;
32
- scope: DrawingScope;
33
- }
28
+ export type SubmitDrawValuesPayload = DrawingFromFE;
@@ -1,8 +1,6 @@
1
1
  import { SagaIterator } from 'redux-saga';
2
2
  import { publicWarningFormActions } from './reducer';
3
3
  import { PublicWarning } from './types';
4
- export declare const PUBLISH_SUCCES = "Public warning has succesfully been published!";
5
- export declare const SAVE_SUCCES = "Public warning has succesfully been saved!";
6
4
  export declare function saveOrUpdateWarning(publicWarning: PublicWarning): SagaIterator<PublicWarning>;
7
5
  export declare const getToggleEditorSuccessMessage: (isEditor: boolean) => string;
8
6
  export declare function toggleEditorWarningSaga({ payload, }: ReturnType<typeof publicWarningFormActions.toggleEditorWarning>): SagaIterator;
@@ -1,4 +1,4 @@
1
- import { WarningModuleStore } from '../config';
1
+ import { WarningModuleStore } from '../types';
2
2
  import { PublicWarningFormState } from './reducer';
3
3
  export declare const getPublicWarningStore: (store: WarningModuleStore) => PublicWarningFormState;
4
4
  export declare const getPublicWarningObject: ((state: WarningModuleStore) => import("../drawings/types").DrawingListItem | undefined) & import("reselect").OutputSelectorFields<(args_0: PublicWarningFormState) => import("../drawings/types").DrawingListItem | undefined, {
@@ -1,5 +1,5 @@
1
1
  import { PublicWarningsState } from './types';
2
- import { WarningModuleStore } from '../config';
2
+ import { WarningModuleStore } from '../types';
3
3
  export declare const getPublicWarningsStore: (store: WarningModuleStore) => PublicWarningsState;
4
4
  export declare const selectAllPublicWarnings: (state: WarningModuleStore) => import("../publicWarningForm/types").PublicWarning[];
5
5
  export declare const isPublicWarningsLoading: ((state: WarningModuleStore) => boolean) & import("reselect").OutputSelectorFields<(args_0: PublicWarningsState) => boolean, {
@@ -0,0 +1,9 @@
1
+ import { CoreAppStore } from '@opengeoweb/store';
2
+ import { DrawState } from './drawings/types';
3
+ import { PublicWarningFormState } from './publicWarningForm/reducer';
4
+ import { PublicWarningsState } from './publicWarnings/types';
5
+ export interface WarningModuleStore extends CoreAppStore {
6
+ drawings?: DrawState;
7
+ publicWarningForm?: PublicWarningFormState;
8
+ publicWarnings?: PublicWarningsState;
9
+ }
@@ -1,6 +1,6 @@
1
1
  import { CreateApiProps } from '@opengeoweb/api';
2
2
  import { AxiosInstance } from 'axios';
3
- import { DrawingDetails, DrawingFromBE, DrawingListItem } from '../store/drawings/types';
3
+ import { DrawingFromBE, DrawingFromFE, DrawingListItem } from '../store/drawings/types';
4
4
  import { PublicWarning } from '../store/publicWarningForm/types';
5
5
  export declare const API_NAME = "warnings";
6
6
  export declare const getIdFromUrl: (url: string) => string;
@@ -11,8 +11,8 @@ export interface WarningsApi {
11
11
  getDrawingDetails: (drawingId: string) => Promise<{
12
12
  data: DrawingFromBE;
13
13
  }>;
14
- updateDrawing: (drawingId: string, data: DrawingFromBE) => Promise<void>;
15
- saveDrawingAs: (data: DrawingDetails) => Promise<string>;
14
+ updateDrawing: (drawingId: string, data: DrawingFromFE) => Promise<void>;
15
+ saveDrawingAs: (data: DrawingFromFE) => Promise<string>;
16
16
  deleteDrawing: (drawingId: string) => Promise<void>;
17
17
  getWarnings: () => Promise<{
18
18
  data: PublicWarning[];