@opengeoweb/cap 9.6.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 (75) hide show
  1. package/README.md +10 -0
  2. package/index.esm.d.ts +1 -0
  3. package/index.esm.js +990 -0
  4. package/package.json +37 -0
  5. package/src/index.d.ts +1 -0
  6. package/src/lib/CapDemo.stories.d.ts +7 -0
  7. package/src/lib/components/CapMapAndList.integration.spec.d.ts +1 -0
  8. package/src/lib/components/ComponentsLookUp/componentsLookUp.d.ts +34 -0
  9. package/src/lib/components/ComponentsLookUp/componentsLookUp.spec.d.ts +1 -0
  10. package/src/lib/components/ComponentsLookUp/index.d.ts +1 -0
  11. package/src/lib/components/GanttChart/Gantt.d.ts +40 -0
  12. package/src/lib/components/GanttChart/GanttModule.d.ts +7 -0
  13. package/src/lib/components/GanttChart/GanttModule.spec.d.ts +1 -0
  14. package/src/lib/components/GanttChart/GanttModule.stories.d.ts +6 -0
  15. package/src/lib/components/GanttChart/GanttReactWrapper.d.ts +37 -0
  16. package/src/lib/components/GanttChart/GanttWrapper.d.ts +9 -0
  17. package/src/lib/components/GanttChart/GanttWrapper.spec.d.ts +1 -0
  18. package/src/lib/components/GanttChart/GanttWrapper.stories.d.ts +8 -0
  19. package/src/lib/components/GanttChart/Task.d.ts +29 -0
  20. package/src/lib/components/GanttChart/ViewMode.d.ts +9 -0
  21. package/src/lib/components/GanttChart/mockTasks.d.ts +2 -0
  22. package/src/lib/components/GanttChart/utils.d.ts +5 -0
  23. package/src/lib/components/GanttChart/utils.spec.d.ts +1 -0
  24. package/src/lib/components/MapViewCap/MapViewCapConnect.d.ts +18 -0
  25. package/src/lib/components/MapViewCap/MapViewCapConnect.spec.d.ts +1 -0
  26. package/src/lib/components/MapViewCap/MapViewCapConnect.stories.d.ts +6 -0
  27. package/src/lib/components/MapViewCap/MapViewCapConnectWrapper.d.ts +17 -0
  28. package/src/lib/components/MapViewCap/MapViewCapConnectWrapper.spec.d.ts +1 -0
  29. package/src/lib/components/MapViewCap/index.d.ts +1 -0
  30. package/src/lib/components/Providers/Providers.d.ts +30 -0
  31. package/src/lib/components/Providers/index.d.ts +1 -0
  32. package/src/lib/components/WarningListCap/WarningListCap.d.ts +8 -0
  33. package/src/lib/components/WarningListCap/WarningListCap.spec.d.ts +1 -0
  34. package/src/lib/components/WarningListCap/WarningListCap.stories.d.ts +6 -0
  35. package/src/lib/components/WarningListCap/WarningListCapConnect.d.ts +7 -0
  36. package/src/lib/components/WarningListCap/WarningListCapConnectWrapper.d.ts +6 -0
  37. package/src/lib/components/WarningListCap/WarningListCapConnectWrapper.spec.d.ts +1 -0
  38. package/src/lib/components/WarningListCap/WarningListRowCap/WarningListRowCap.d.ts +7 -0
  39. package/src/lib/components/WarningListCap/WarningListRowCap/WarningListRowCap.spec.d.ts +1 -0
  40. package/src/lib/components/WarningListCap/WarningListRowCap/WarningListRowCap.stories.d.ts +6 -0
  41. package/src/lib/components/WarningListCap/WarningListRowCap/WarningListRowCapConnect.d.ts +8 -0
  42. package/src/lib/components/WarningListCap/WarningListRowCap/WarningListRowCapConnect.spec.d.ts +1 -0
  43. package/src/lib/components/WarningListCap/index.d.ts +1 -0
  44. package/src/lib/components/WarningListCap/types.d.ts +47 -0
  45. package/src/lib/components/types.d.ts +73 -0
  46. package/src/lib/index.d.ts +4 -0
  47. package/src/lib/store/config.d.ts +6 -0
  48. package/src/lib/store/index.d.ts +3 -0
  49. package/src/lib/store/mockStore.d.ts +21 -0
  50. package/src/lib/store/reducer.d.ts +13 -0
  51. package/src/lib/store/reducer.spec.d.ts +1 -0
  52. package/src/lib/store/selector.spec.d.ts +1 -0
  53. package/src/lib/store/selectors.d.ts +15 -0
  54. package/src/lib/store/types.d.ts +42 -0
  55. package/src/lib/store.d.ts +4 -0
  56. package/src/lib/utils/addColors.d.ts +2 -0
  57. package/src/lib/utils/addColors.spec.d.ts +1 -0
  58. package/src/lib/utils/addFeedAddressToCustomGeoJsonFeature.d.ts +2 -0
  59. package/src/lib/utils/addFeedAddressToCustomGeoJsonFeature.spec.d.ts +1 -0
  60. package/src/lib/utils/api.d.ts +20 -0
  61. package/src/lib/utils/api.spec.d.ts +1 -0
  62. package/src/lib/utils/fakeApi.d.ts +2 -0
  63. package/src/lib/utils/fakeApi.spec.d.ts +1 -0
  64. package/src/lib/utils/feedLanguageUtils.d.ts +1 -0
  65. package/src/lib/utils/feedLanguageUtils.spec.d.ts +1 -0
  66. package/src/lib/utils/findEventIndexInLanguage.d.ts +10 -0
  67. package/src/lib/utils/findEventIndexInLanguage.spec.d.ts +1 -0
  68. package/src/lib/utils/highlightGeoJson.d.ts +3 -0
  69. package/src/lib/utils/highlightGeoJson.spec.d.ts +1 -0
  70. package/src/lib/utils/i18n.d.ts +2 -0
  71. package/src/lib/utils/mockAlert.d.ts +19 -0
  72. package/src/lib/utils/mockCapData.d.ts +6 -0
  73. package/src/lib/utils/mockGeoJson.d.ts +4 -0
  74. package/src/lib/utils/mockGeoJsonMultipleFeatures.d.ts +3 -0
  75. package/src/lib/utils/store.d.ts +2 -0
@@ -0,0 +1,42 @@
1
+ import { EntityState } from '@reduxjs/toolkit';
2
+ import { CoreAppStore } from '@opengeoweb/store';
3
+ import { Language } from '../components/types';
4
+ export interface CapAlert {
5
+ feedAddress: string;
6
+ identifier: string;
7
+ severity: string;
8
+ certainty: string;
9
+ onset: string;
10
+ expires: string;
11
+ languages: Language[];
12
+ }
13
+ export type CapAlertState = EntityState<CapAlert>;
14
+ export interface CapFeed {
15
+ id: string;
16
+ lastUpdated: number;
17
+ alertIds: string[];
18
+ }
19
+ export type CapFeedState = EntityState<CapFeed>;
20
+ export interface CapStore {
21
+ feeds: CapFeedState;
22
+ alerts: CapAlertState;
23
+ }
24
+ export interface CapModule {
25
+ capStore?: CapStore;
26
+ }
27
+ export interface AddAllFeedAlertsPayload {
28
+ feedId: string;
29
+ alertUrls: string[];
30
+ }
31
+ export interface AddManyAlertsToFeedPayload {
32
+ feedId: string;
33
+ alertIds: string[];
34
+ }
35
+ export interface FeedLastUpdatedPayload {
36
+ id: string;
37
+ changes: {
38
+ lastUpdated: number;
39
+ };
40
+ }
41
+ export interface AppStore extends CoreAppStore, CapModule {
42
+ }
@@ -0,0 +1,4 @@
1
+ import { EggExt } from '@redux-eggs/core';
2
+ import { AnyAction, Store } from '@reduxjs/toolkit';
3
+ declare const store: () => EggExt & Store<unknown, AnyAction>;
4
+ export { store };
@@ -0,0 +1,2 @@
1
+ import { CustomFeature } from '../components/types';
2
+ export declare const addColors: (features: CustomFeature[]) => CustomFeature[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { CustomFeature } from '../components/types';
2
+ export declare const addFeedAdressToCustomGeoJSonFeature: (feedAddress: string, features: CustomFeature[]) => CustomFeature[];
@@ -0,0 +1,20 @@
1
+ import { CreateApiProps } from '@opengeoweb/api';
2
+ import { CapFeatures, CapPresets, CapWarnings, FeedLastUpdated } from '../components/types';
3
+ export type CapApi = {
4
+ getCapConfiguration?: (productConfigKey: string) => Promise<{
5
+ data: CapPresets;
6
+ }>;
7
+ getAllAlerts?: (thirdPartyApiUrl: string) => Promise<{
8
+ data: CapFeatures;
9
+ }>;
10
+ getFeedLinks?: (thirdPartyApiUrl: string) => Promise<{
11
+ data: string[];
12
+ }>;
13
+ getSingleAlert?: (alertUrl: string) => Promise<{
14
+ data: CapWarnings;
15
+ }>;
16
+ getLastUpdated?: (thirdPartyApiUrl: string) => Promise<{
17
+ data: FeedLastUpdated;
18
+ }>;
19
+ };
20
+ export declare const createApi: (props: CreateApiProps) => CapApi;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { CapApi } from './api';
2
+ export declare const createApi: () => CapApi;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const feedLanguage: (languagePriority?: string) => string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import { CapPresets } from '../components/types';
2
+ interface Languages {
3
+ language: string;
4
+ event: string;
5
+ senderName: string;
6
+ headline: string;
7
+ description: string;
8
+ }
9
+ export declare const findEventIndexInLanguage: (languages: Languages[], capWarningPresets: CapPresets, feedAddressFromProps: string) => number;
10
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { FeatureEvent } from '@opengeoweb/webmap-react';
2
+ import { CustomFeature } from '../components/types';
3
+ export declare const highlightGeoJson: (currentFeatures: Record<string, CustomFeature[]>, featureResults: FeatureEvent) => Record<string, CustomFeature[]>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const CAP_NAMESPACE = "cap";
2
+ export declare const initCapTestI18n: () => void;
@@ -0,0 +1,19 @@
1
+ import { CapAlert } from '../components/types';
2
+ export declare const mockAlert: CapAlert;
3
+ export declare const mockAlert2: CapAlert;
4
+ export declare const mockAlert3: {
5
+ identifier: string;
6
+ feedAddress: string;
7
+ severity: string;
8
+ certainty: string;
9
+ onset: string;
10
+ expires: string;
11
+ languages: {
12
+ areaDesc: string;
13
+ language: string;
14
+ event: string;
15
+ senderName: string;
16
+ headline: string;
17
+ description: string;
18
+ }[];
19
+ };
@@ -0,0 +1,6 @@
1
+ import { CapPresets, CapWarnings, FeedLastUpdated } from '../components/types';
2
+ export declare const mockCapWarningPresets: CapPresets;
3
+ export declare const mockCapWarnings: CapWarnings;
4
+ export declare const mockCapWarnings2: CapWarnings;
5
+ export declare const mockCapWarnings3: CapWarnings;
6
+ export declare const mockLastUpdated: FeedLastUpdated;
@@ -0,0 +1,4 @@
1
+ import { CapFeatures } from '../components/types';
2
+ export declare const mockGeoJson: CapFeatures;
3
+ export declare const mockGeoJson2: CapFeatures;
4
+ export declare const mockGeoJson3: CapFeatures;
@@ -0,0 +1,3 @@
1
+ import { CapFeatures, CustomFeature } from '../components/types';
2
+ export declare const mockGeoJsonMultipleFeatures: CapFeatures;
3
+ export declare const mockGeoJsonMultipleFeaturesById: Record<string, CustomFeature[]>;
@@ -0,0 +1,2 @@
1
+ declare const store: import("@redux-eggs/core").EggExt & import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<any, import("redux").AnyAction, [import("redux-thunk").ThunkMiddleware<any, import("redux").AnyAction, undefined>]>;
2
+ export { store };