@opengeoweb/warnings 9.23.1 → 9.24.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.23.1",
3
+ "version": "9.24.0",
4
4
  "description": "GeoWeb warinings library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -0,0 +1,9 @@
1
+ import { ListFilter } from '@opengeoweb/shared';
2
+ import React from 'react';
3
+ export interface AreaObjectFilterProps {
4
+ filters: ListFilter[];
5
+ onClickFilterChip?: (id: string, selected: boolean) => void;
6
+ searchQuery: string;
7
+ onSearch?: (searchQuery: string) => void;
8
+ }
9
+ export declare const AreaObjectFilter: React.ForwardRefExoticComponent<AreaObjectFilterProps & React.RefAttributes<HTMLElement>>;
@@ -2,6 +2,7 @@ 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
+ import { AreaObjectFilterProps } from './AreaObjectFilter';
5
6
  export declare const AreaObjectLoader: React.FC<{
6
7
  bounds?: string;
7
8
  title?: string;
@@ -16,4 +17,4 @@ export declare const AreaObjectLoader: React.FC<{
16
17
  drawingListItems: DrawingListItem[];
17
18
  error?: string;
18
19
  isLoading?: boolean;
19
- }>;
20
+ } & AreaObjectFilterProps>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const AreaObjectLoaderDemo: () => React.ReactElement;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import React, { FC } from 'react';
2
2
  import { TFunction } from 'i18next';
3
3
  import { DrawingListItem } from '../../store/drawings/types';
4
4
  interface ObjectAreaList {
@@ -14,5 +14,6 @@ export declare const AreasObjects: FC<{
14
14
  drawingListItems: DrawingListItem[];
15
15
  isLoading?: boolean;
16
16
  hasError?: boolean;
17
+ filterRef?: React.MutableRefObject<HTMLElement>;
17
18
  }>;
18
19
  export {};
@@ -1,6 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { uiTypes } from '@opengeoweb/store';
3
+ import { DrawMode } from '@opengeoweb/webmap-react';
4
+ import { TFunction } from 'i18next';
3
5
  export declare const getDialogType: (mapId: string, isMultiMap: boolean) => string;
6
+ export declare const translateDrawModes: (drawModes: DrawMode[], translateFn: TFunction) => DrawMode[];
4
7
  interface DrawingToolConnectProps {
5
8
  mapId?: string;
6
9
  bounds?: string;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { FilterListItemProps, FilterChipProps } from '@opengeoweb/shared';
3
+ export interface FilterChipWithOptionsProps extends FilterChipProps {
4
+ children?: React.ReactNode;
5
+ filterList?: FilterListItemProps[];
6
+ }
7
+ export declare const FilterChipWithOptions: React.FC<FilterChipWithOptionsProps>;
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const FilterChipWithOptionsLight: {
7
+ (): React.ReactElement;
8
+ parameters: {
9
+ zeplinLink: {
10
+ name: string;
11
+ link: string;
12
+ }[];
13
+ };
14
+ tags: string[];
15
+ };
16
+ export declare const FilterChipWithOptionsDark: {
17
+ (): React.ReactElement;
18
+ tags: string[];
19
+ };
@@ -3,6 +3,7 @@ import { Bbox } from '@opengeoweb/webmap';
3
3
  import { PublicWarningDetail } from '../../store/publicWarningForm/types';
4
4
  import { BaseDrawingListItem, DrawingListItem } from '../../store/drawings/types';
5
5
  import { FormAction, FormError } from '../../store/publicWarningForm/reducer';
6
+ export declare const useScrollTopOnError: (error: FormError) => React.RefObject<HTMLDivElement>;
6
7
  export declare const getEmptyPublicWarning: () => PublicWarningDetail;
7
8
  export declare const getFormData: (publicWarningsDetails: PublicWarningDetail | undefined, object?: DrawingListItem) => FormData;
8
9
  interface FormData extends PublicWarningDetail {
@@ -25,5 +25,9 @@ export interface DrawingDetails extends Omit<DrawingFromBE, 'id' | 'lastUpdatedT
25
25
  lastUpdatedTime?: string;
26
26
  }
27
27
  export type DrawingFromFE = Omit<DrawingDetails, 'username'>;
28
+ export interface FetchDrawingParams {
29
+ keywords?: string;
30
+ search?: string;
31
+ }
28
32
  export type SetDrawValuesPayload = DrawItem;
29
33
  export type SubmitDrawValuesPayload = DrawingFromFE;
@@ -1,7 +1,11 @@
1
+ interface Area {
2
+ objectName: string;
3
+ geoJSON: GeoJSON.FeatureCollection;
4
+ }
1
5
  export interface PublicWarningDetail {
2
6
  id?: string;
3
7
  phenomenon: string;
4
- geoJSON: GeoJSON.FeatureCollection;
8
+ areas: Area[];
5
9
  validFrom: string;
6
10
  validUntil: string;
7
11
  level: string;
@@ -24,3 +28,4 @@ export interface PublicWarning {
24
28
  id?: string;
25
29
  lastUpdatedTime?: string;
26
30
  }
31
+ export {};
@@ -1,11 +1,11 @@
1
1
  import { CreateApiProps } from '@opengeoweb/api';
2
2
  import { AxiosInstance } from 'axios';
3
- import { DrawingFromBE, DrawingFromFE, DrawingListItem } from '../store/drawings/types';
3
+ import { DrawingFromBE, DrawingFromFE, DrawingListItem, FetchDrawingParams } 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;
7
7
  export interface WarningsApi {
8
- getDrawings: () => Promise<{
8
+ getDrawings: (params?: FetchDrawingParams) => Promise<{
9
9
  data: DrawingListItem[];
10
10
  }>;
11
11
  getDrawingDetails: (drawingId: string) => Promise<{
@@ -14,6 +14,9 @@ export interface WarningsApi {
14
14
  updateDrawing: (drawingId: string, data: DrawingFromFE) => Promise<void>;
15
15
  saveDrawingAs: (data: DrawingFromFE) => Promise<string>;
16
16
  deleteDrawing: (drawingId: string) => Promise<void>;
17
+ getAreaKeywords: () => Promise<{
18
+ data: string[];
19
+ }>;
17
20
  getWarnings: () => Promise<{
18
21
  data: PublicWarning[];
19
22
  }>;
@@ -3,4 +3,5 @@ import type { PublicWarning } from '../../store/publicWarningForm/types';
3
3
  declare const drawingList: DrawingListItem[];
4
4
  declare const drawingsListFullContent: DrawingFromBE[];
5
5
  declare const warningList: PublicWarning[];
6
- export { drawingList, drawingsListFullContent, warningList };
6
+ declare const areaKeywordList: string[];
7
+ export { drawingList, drawingsListFullContent, warningList, areaKeywordList };