@opengeoweb/warnings 9.24.0 → 9.25.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/warnings",
3
- "version": "9.24.0",
3
+ "version": "9.25.0",
4
4
  "description": "GeoWeb warinings library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -13,7 +13,6 @@
13
13
  "@opengeoweb/store": "*",
14
14
  "@opengeoweb/webmap-react": "*",
15
15
  "react-redux": "^8.1.3",
16
- "@mui/material": "^5.16.0",
17
16
  "@opengeoweb/theme": "*",
18
17
  "@opengeoweb/form-fields": "*",
19
18
  "react-hook-form": "^7.50.1",
@@ -28,6 +27,7 @@
28
27
  "@opengeoweb/authentication": "*",
29
28
  "react-i18next": "^14.1.2",
30
29
  "i18next": "^23.11.5",
30
+ "@mui/material": "^5.16.0",
31
31
  "immer": "^10.0.3"
32
32
  },
33
33
  "peerDependencies": {
@@ -3,6 +3,8 @@ import { HeaderSize, Position, DraggableSize } from '@opengeoweb/shared';
3
3
  import { uiTypes } from '@opengeoweb/store';
4
4
  import { DrawingListItem } from '../../store/drawings/types';
5
5
  import { AreaObjectFilterProps } from './AreaObjectFilter';
6
+ import { Area } from '../../store/publicWarningForm/types';
7
+ export declare const areaErrorType = "area";
6
8
  export declare const AreaObjectLoader: React.FC<{
7
9
  bounds?: string;
8
10
  title?: string;
@@ -15,6 +17,11 @@ export declare const AreaObjectLoader: React.FC<{
15
17
  startPosition?: Position;
16
18
  headerSize?: HeaderSize;
17
19
  drawingListItems: DrawingListItem[];
18
- error?: string;
20
+ error?: uiTypes.UISetErrorPayload;
19
21
  isLoading?: boolean;
22
+ onAddArea?: (drawingListItem: DrawingListItem) => void;
23
+ onRemoveArea?: (drawingListItem: DrawingListItem) => void;
24
+ selectedAreas?: Area[];
25
+ isChangeAreaDisabled?: boolean;
26
+ onRetryRequest?: (errorType: string) => void;
20
27
  } & AreaObjectFilterProps>;
@@ -4,3 +4,4 @@ declare const _default: {
4
4
  };
5
5
  export default _default;
6
6
  export declare const AreaObjectLoaderDemo: () => React.ReactElement;
7
+ export declare const AreaObjectLoaderDemoWithError: () => React.ReactElement;
@@ -1,6 +1,7 @@
1
1
  import React, { FC } from 'react';
2
2
  import { TFunction } from 'i18next';
3
3
  import { DrawingListItem } from '../../store/drawings/types';
4
+ import { Area } from '../../store/publicWarningForm/types';
4
5
  interface ObjectAreaList {
5
6
  title: string;
6
7
  items: DrawingListItem[];
@@ -15,5 +16,9 @@ export declare const AreasObjects: FC<{
15
16
  isLoading?: boolean;
16
17
  hasError?: boolean;
17
18
  filterRef?: React.MutableRefObject<HTMLElement>;
19
+ onAddArea?: (drawingListItem: DrawingListItem) => void;
20
+ onRemoveArea?: (drawingListItem: DrawingListItem) => void;
21
+ selectedAreas?: Area[];
22
+ isChangeAreaDisabled?: boolean;
18
23
  }>;
19
24
  export {};
@@ -5,3 +5,4 @@ declare const _default: {
5
5
  export default _default;
6
6
  export declare const PublicWarningsFormDialogConnectMap: () => React.ReactElement;
7
7
  export declare const PublicWarningsFormDialogConnectWithoutMap: () => React.ReactElement;
8
+ export declare const PublicWarningsFormDialogConnectWithoutMapWithValues: () => React.ReactElement;
@@ -1,7 +1,7 @@
1
1
  import { PayloadAction, Draft } from '@reduxjs/toolkit';
2
2
  import { AlertColor } from '@mui/material';
3
3
  import { DrawingListItem } from '../drawings/types';
4
- import { PublicWarning } from './types';
4
+ import { Area, PublicWarning } from './types';
5
5
  export type FormAction = '' | 'saving' | 'publishing' | 'readonly';
6
6
  export interface FormError {
7
7
  severity?: AlertColor;
@@ -24,6 +24,12 @@ export declare const publicWarningFormActions: import("@reduxjs/toolkit").CaseRe
24
24
  publicWarning?: PublicWarning;
25
25
  formState?: FormAction;
26
26
  }>) => void;
27
+ addArea: (draft: Draft<PublicWarningFormState>, action: PayloadAction<{
28
+ area: Area;
29
+ }>) => void;
30
+ removeArea: (draft: Draft<PublicWarningFormState>, action: PayloadAction<{
31
+ area: Area;
32
+ }>) => void;
27
33
  openPublicWarningFormDialog: (draft: Draft<PublicWarningFormState>, action: PayloadAction<{
28
34
  object?: DrawingListItem;
29
35
  formState?: FormAction;
@@ -21,6 +21,16 @@ export declare const getPublicWarningEditor: ((state: WarningModuleStore) => str
21
21
  }> & {
22
22
  clearCache: () => void;
23
23
  };
24
+ export declare const getPublicWarningId: ((state: WarningModuleStore) => string | undefined) & import("reselect").OutputSelectorFields<(args_0: PublicWarningFormState) => string | undefined, {
25
+ clearCache: () => void;
26
+ }> & {
27
+ clearCache: () => void;
28
+ };
29
+ export declare const getPublicWarningAreas: ((state: WarningModuleStore) => import("./types").Area[]) & import("reselect").OutputSelectorFields<(args_0: PublicWarningFormState) => import("./types").Area[], {
30
+ clearCache: () => void;
31
+ }> & {
32
+ clearCache: () => void;
33
+ };
24
34
  export declare const getPublicWarningFormState: ((state: WarningModuleStore) => "" | "saving" | "publishing" | "readonly") & import("reselect").OutputSelectorFields<(args_0: PublicWarningFormState) => "" | "saving" | "publishing" | "readonly", {
25
35
  clearCache: () => void;
26
36
  }> & {
@@ -1,4 +1,4 @@
1
- interface Area {
1
+ export interface Area {
2
2
  objectName: string;
3
3
  geoJSON: GeoJSON.FeatureCollection;
4
4
  }
@@ -28,4 +28,3 @@ export interface PublicWarning {
28
28
  id?: string;
29
29
  lastUpdatedTime?: string;
30
30
  }
31
- export {};