@opengeoweb/warnings 9.22.0 → 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/index.esm.js +6961 -3943
- package/package.json +1 -1
- package/src/lib/components/AreaObjectLoader/AreaObjectFilter.d.ts +9 -0
- package/src/lib/components/AreaObjectLoader/AreaObjectFilter.spec.d.ts +1 -0
- package/src/lib/components/AreaObjectLoader/AreaObjectLoader.d.ts +20 -0
- package/src/lib/components/AreaObjectLoader/AreaObjectLoader.spec.d.ts +1 -0
- package/src/lib/components/AreaObjectLoader/AreaObjectLoader.stories.d.ts +40 -0
- package/src/lib/components/AreaObjectLoader/AreaObjectLoaderConnect.d.ts +6 -0
- package/src/lib/components/AreaObjectLoader/AreaObjectLoaderConnect.integration.spec.d.ts +1 -0
- package/src/lib/components/AreaObjectLoader/AreaObjectLoaderConnect.stories.d.ts +6 -0
- package/src/lib/components/AreaObjectLoader/AreasObjects.d.ts +19 -0
- package/src/lib/components/AreaObjectLoader/AreasObjects.spec.d.ts +1 -0
- package/src/lib/components/DrawingTool/DrawingToolConnect.d.ts +3 -0
- package/src/lib/components/FilterList/FilterChipWithOptions.d.ts +7 -0
- package/src/lib/components/FilterList/FilterChipWithOptions.spec.d.ts +1 -0
- package/src/lib/components/FilterList/FilterChipWithOptions.stories.d.ts +19 -0
- package/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +2 -0
- package/src/lib/store/drawings/types.d.ts +5 -0
- package/src/lib/store/drawings/utils.d.ts +1 -0
- package/src/lib/store/publicWarningForm/types.d.ts +6 -1
- package/src/lib/utils/api.d.ts +5 -2
- package/src/lib/utils/fakeApi/index.d.ts +2 -1
package/package.json
CHANGED
|
@@ -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>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { HeaderSize, Position, DraggableSize } from '@opengeoweb/shared';
|
|
3
|
+
import { uiTypes } from '@opengeoweb/store';
|
|
4
|
+
import { DrawingListItem } from '../../store/drawings/types';
|
|
5
|
+
import { AreaObjectFilterProps } from './AreaObjectFilter';
|
|
6
|
+
export declare const AreaObjectLoader: React.FC<{
|
|
7
|
+
bounds?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
onMouseDown?: () => void;
|
|
11
|
+
isOpen: boolean;
|
|
12
|
+
order?: number;
|
|
13
|
+
source?: uiTypes.Source;
|
|
14
|
+
size?: DraggableSize;
|
|
15
|
+
startPosition?: Position;
|
|
16
|
+
headerSize?: HeaderSize;
|
|
17
|
+
drawingListItems: DrawingListItem[];
|
|
18
|
+
error?: string;
|
|
19
|
+
isLoading?: boolean;
|
|
20
|
+
} & AreaObjectFilterProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const AreaObjectLoaderSmall: {
|
|
7
|
+
(): React.ReactElement;
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export declare const AreaObjectLoaderLight: {
|
|
11
|
+
(): React.ReactElement;
|
|
12
|
+
parameters: {
|
|
13
|
+
zeplinLink: {
|
|
14
|
+
name: string;
|
|
15
|
+
link: string;
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
18
|
+
tags: string[];
|
|
19
|
+
};
|
|
20
|
+
export declare const AreaObjectLoaderDark: {
|
|
21
|
+
(): React.ReactElement;
|
|
22
|
+
tags: string[];
|
|
23
|
+
};
|
|
24
|
+
export declare const AreaObjectLoaderLightNoResults: {
|
|
25
|
+
(): React.ReactElement;
|
|
26
|
+
tags: string[];
|
|
27
|
+
};
|
|
28
|
+
export declare const AreaObjectLoaderDarkNoResults: {
|
|
29
|
+
(): React.ReactElement;
|
|
30
|
+
tags: string[];
|
|
31
|
+
};
|
|
32
|
+
export declare const AreaObjectLoaderLoading: () => React.ReactElement;
|
|
33
|
+
export declare const AreaObjectLoaderErrorLight: {
|
|
34
|
+
(): React.ReactElement;
|
|
35
|
+
tags: string[];
|
|
36
|
+
};
|
|
37
|
+
export declare const AreaObjectLoaderErrorDark: {
|
|
38
|
+
(): React.ReactElement;
|
|
39
|
+
tags: string[];
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { TFunction } from 'i18next';
|
|
3
|
+
import { DrawingListItem } from '../../store/drawings/types';
|
|
4
|
+
interface ObjectAreaList {
|
|
5
|
+
title: string;
|
|
6
|
+
items: DrawingListItem[];
|
|
7
|
+
}
|
|
8
|
+
export declare const getListInclHeaders: (items: DrawingListItem[], translateFn: TFunction) => {
|
|
9
|
+
objects: ObjectAreaList;
|
|
10
|
+
areas: ObjectAreaList;
|
|
11
|
+
};
|
|
12
|
+
export declare const getDisplayDate: (date: string) => string;
|
|
13
|
+
export declare const AreasObjects: FC<{
|
|
14
|
+
drawingListItems: DrawingListItem[];
|
|
15
|
+
isLoading?: boolean;
|
|
16
|
+
hasError?: boolean;
|
|
17
|
+
filterRef?: React.MutableRefObject<HTMLElement>;
|
|
18
|
+
}>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,6 +26,7 @@ interface FormProps {
|
|
|
25
26
|
isReadOnly?: boolean;
|
|
26
27
|
onFormDirty?: (isFormDirty: boolean) => void;
|
|
27
28
|
isSnapshot?: boolean;
|
|
29
|
+
onAddObject?: () => void;
|
|
28
30
|
}
|
|
29
31
|
export declare const PublicWarningsForm: React.FC<FormProps>;
|
|
30
32
|
export {};
|
|
@@ -15,6 +15,7 @@ export interface BaseDrawingListItem {
|
|
|
15
15
|
export interface DrawingListItem extends BaseDrawingListItem {
|
|
16
16
|
scope: DrawingScope;
|
|
17
17
|
geoJSON: GeoJSON.FeatureCollection;
|
|
18
|
+
keywords?: string;
|
|
18
19
|
}
|
|
19
20
|
export interface DrawingFromBE extends DrawingListItem {
|
|
20
21
|
username: string;
|
|
@@ -24,5 +25,9 @@ export interface DrawingDetails extends Omit<DrawingFromBE, 'id' | 'lastUpdatedT
|
|
|
24
25
|
lastUpdatedTime?: string;
|
|
25
26
|
}
|
|
26
27
|
export type DrawingFromFE = Omit<DrawingDetails, 'username'>;
|
|
28
|
+
export interface FetchDrawingParams {
|
|
29
|
+
keywords?: string;
|
|
30
|
+
search?: string;
|
|
31
|
+
}
|
|
27
32
|
export type SetDrawValuesPayload = DrawItem;
|
|
28
33
|
export type SubmitDrawValuesPayload = DrawingFromFE;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { uiTypes } from '@opengeoweb/store';
|
|
2
2
|
export declare const objectDialogType = uiTypes.DialogTypes.ObjectManager;
|
|
3
3
|
export declare const drawingDialogType = uiTypes.DialogTypes.DrawingTool;
|
|
4
|
+
export declare const areaObjectLoaderType = uiTypes.DialogTypes.AreaObjectLoader;
|
|
@@ -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
|
-
|
|
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 {};
|
package/src/lib/utils/api.d.ts
CHANGED
|
@@ -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
|
-
|
|
6
|
+
declare const areaKeywordList: string[];
|
|
7
|
+
export { drawingList, drawingsListFullContent, warningList, areaKeywordList };
|