@opengeoweb/warnings 16.0.0 → 17.0.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 (219) hide show
  1. package/index.esm.js +2173 -935
  2. package/package.json +13 -13
  3. package/src/index.d.ts +0 -12
  4. package/src/lib/Warnings.stories.d.ts +0 -7
  5. package/src/lib/api/api-utils.d.ts +0 -12
  6. package/src/lib/api/api-utils.spec.d.ts +0 -1
  7. package/src/lib/api/aviation-api/api.d.ts +0 -23
  8. package/src/lib/api/aviation-api/errorHandling.d.ts +0 -1
  9. package/src/lib/api/aviation-api/fakeApi.d.ts +0 -8
  10. package/src/lib/api/aviation-api/hooks.d.ts +0 -43
  11. package/src/lib/api/aviation-api/queryOptions.d.ts +0 -68
  12. package/src/lib/api/hooks.spec.d.ts +0 -1
  13. package/src/lib/api/warning-api/api.d.ts +0 -18
  14. package/src/lib/api/warning-api/hooks.d.ts +0 -57
  15. package/src/lib/components/AreaObjectLoader/AreaObjectFilter.d.ts +0 -9
  16. package/src/lib/components/AreaObjectLoader/AreaObjectFilter.spec.d.ts +0 -1
  17. package/src/lib/components/AreaObjectLoader/AreaObjectLoader.d.ts +0 -28
  18. package/src/lib/components/AreaObjectLoader/AreaObjectLoader.spec.d.ts +0 -1
  19. package/src/lib/components/AreaObjectLoader/AreaObjectLoader.stories.d.ts +0 -16
  20. package/src/lib/components/AreaObjectLoader/AreaObjectLoaderConnect.d.ts +0 -6
  21. package/src/lib/components/AreaObjectLoader/AreaObjectLoaderConnect.integration.spec.d.ts +0 -1
  22. package/src/lib/components/AreaObjectLoader/AreaObjectLoaderConnect.stories.d.ts +0 -15
  23. package/src/lib/components/AreaObjectLoader/AreasObjects.d.ts +0 -28
  24. package/src/lib/components/AreaObjectLoader/AreasObjects.spec.d.ts +0 -1
  25. package/src/lib/components/ComponentsLookUp/ComponentsLookUp.d.ts +0 -20
  26. package/src/lib/components/ComponentsLookUp/ComponentsLookUp.spec.d.ts +0 -1
  27. package/src/lib/components/ComponentsLookUp/index.d.ts +0 -1
  28. package/src/lib/components/DrawingTool/DrawingTool.stories.d.ts +0 -11
  29. package/src/lib/components/DrawingTool/DrawingToolConnect.d.ts +0 -16
  30. package/src/lib/components/DrawingTool/DrawingToolConnect.spec.d.ts +0 -1
  31. package/src/lib/components/DrawingTool/DrawingToolConnect.stories.d.ts +0 -6
  32. package/src/lib/components/DrawingTool/DrawingToolDialog.d.ts +0 -19
  33. package/src/lib/components/DrawingTool/DrawingToolDialog.spec.d.ts +0 -1
  34. package/src/lib/components/DrawingTool/DrawingToolMapButtonConnect.d.ts +0 -8
  35. package/src/lib/components/DrawingTool/DrawingToolMapButtonConnect.spec.d.ts +0 -1
  36. package/src/lib/components/DrawingTool/index.d.ts +0 -3
  37. package/src/lib/components/DrawingTool/useObjectDrawDialogAction.d.ts +0 -25
  38. package/src/lib/components/DrawingTool/useObjectDrawDialogAction.spec.d.ts +0 -1
  39. package/src/lib/components/DrawingToolForm/DrawingToolForm.d.ts +0 -26
  40. package/src/lib/components/DrawingToolForm/DrawingToolForm.spec.d.ts +0 -1
  41. package/src/lib/components/DrawingToolForm/DrawingToolFormConnect.d.ts +0 -2
  42. package/src/lib/components/DrawingToolForm/DrawingToolFormConnect.integration.spec.d.ts +0 -1
  43. package/src/lib/components/DrawingToolForm/DrawingToolFormContents.d.ts +0 -28
  44. package/src/lib/components/DrawingToolForm/index.d.ts +0 -2
  45. package/src/lib/components/FilterList/ExpandableFilterChip.d.ts +0 -9
  46. package/src/lib/components/FilterList/ExpandableFilterChip.spec.d.ts +0 -1
  47. package/src/lib/components/FilterList/ExpandableFilterChip.stories.d.ts +0 -20
  48. package/src/lib/components/FilterList/FilterList.d.ts +0 -13
  49. package/src/lib/components/FilterList/TimeFilterChip.d.ts +0 -7
  50. package/src/lib/components/FilterList/filter-hooks.d.ts +0 -30
  51. package/src/lib/components/FilterList/filter-hooks.spec.d.ts +0 -1
  52. package/src/lib/components/FilterList/filter-styles.d.ts +0 -2
  53. package/src/lib/components/FilterList/filter-utils.d.ts +0 -111
  54. package/src/lib/components/FilterList/filter-utils.spec.d.ts +0 -1
  55. package/src/lib/components/MaritimeWarningsForm/AreaList/AreaList.d.ts +0 -11
  56. package/src/lib/components/MaritimeWarningsForm/AreaList/AreaList.spec.d.ts +0 -1
  57. package/src/lib/components/MaritimeWarningsForm/AreaList/index.d.ts +0 -1
  58. package/src/lib/components/MaritimeWarningsForm/AssignedAreas/AssignedAreas.d.ts +0 -13
  59. package/src/lib/components/MaritimeWarningsForm/AssignedAreas/AssignedAreas.spec.d.ts +0 -1
  60. package/src/lib/components/MaritimeWarningsForm/MaritimeWarningsAvatar.d.ts +0 -8
  61. package/src/lib/components/MaritimeWarningsForm/MaritimeWarningsForm.d.ts +0 -33
  62. package/src/lib/components/MaritimeWarningsForm/MaritimeWarningsForm.spec.d.ts +0 -1
  63. package/src/lib/components/MaritimeWarningsForm/MaritimeWarningsForm.stories.d.ts +0 -15
  64. package/src/lib/components/MaritimeWarningsForm/MaritimeWarningsFormConnect.d.ts +0 -8
  65. package/src/lib/components/MaritimeWarningsForm/MaritimeWarningsFormConnect.spec.d.ts +0 -1
  66. package/src/lib/components/MaritimeWarningsForm/MaritimeWarningsFormConnect.stories.d.ts +0 -14
  67. package/src/lib/components/MaritimeWarningsForm/WarningList/WarningList.d.ts +0 -18
  68. package/src/lib/components/MaritimeWarningsForm/WarningList/WarningListDragHandle.d.ts +0 -2
  69. package/src/lib/components/MaritimeWarningsForm/WarningList/WarningListItem.d.ts +0 -17
  70. package/src/lib/components/MaritimeWarningsForm/WarningList/WarningListItem.spec.d.ts +0 -1
  71. package/src/lib/components/MaritimeWarningsForm/WarningList/WarningListSelect.d.ts +0 -21
  72. package/src/lib/components/MaritimeWarningsForm/WarningList/WarningListSelect.spec.d.ts +0 -1
  73. package/src/lib/components/MaritimeWarningsForm/WarningList/WindForceSelect.d.ts +0 -24
  74. package/src/lib/components/MaritimeWarningsForm/WarningList/WindForceSelect.spec.d.ts +0 -1
  75. package/src/lib/components/MaritimeWarningsForm/index.d.ts +0 -1
  76. package/src/lib/components/MaritimeWarningsForm/testUtils.d.ts +0 -3
  77. package/src/lib/components/MaritimeWarningsForm/types.d.ts +0 -51
  78. package/src/lib/components/MaritimeWarningsForm/useConfirmDeleteDialog.d.ts +0 -12
  79. package/src/lib/components/MaritimeWarningsForm/useFilterChipSelect.d.ts +0 -12
  80. package/src/lib/components/MaritimeWarningsForm/useFilterChipSelect.spec.d.ts +0 -1
  81. package/src/lib/components/MaritimeWarningsForm/useMaritimeWarningsFormState.d.ts +0 -63
  82. package/src/lib/components/MaritimeWarningsForm/useMaritimeWarningsFormState.spec.d.ts +0 -1
  83. package/src/lib/components/MaritimeWarningsForm/utils.d.ts +0 -7
  84. package/src/lib/components/MaritimeWarningsForm/utils.spec.d.ts +0 -1
  85. package/src/lib/components/ObjectManager/ConfirmDeleteDialog.d.ts +0 -10
  86. package/src/lib/components/ObjectManager/ConfirmDeleteDialog.spec.d.ts +0 -1
  87. package/src/lib/components/ObjectManager/ObjectManager.d.ts +0 -25
  88. package/src/lib/components/ObjectManager/ObjectManager.spec.d.ts +0 -1
  89. package/src/lib/components/ObjectManager/ObjectManager.stories.d.ts +0 -38
  90. package/src/lib/components/ObjectManager/ObjectManagerConnect.d.ts +0 -6
  91. package/src/lib/components/ObjectManager/ObjectManagerConnect.integration.spec.d.ts +0 -1
  92. package/src/lib/components/ObjectManager/ObjectManagerConnect.stories.d.ts +0 -10
  93. package/src/lib/components/ObjectManager/ObjectManagerConnectErrors.stories.d.ts +0 -38
  94. package/src/lib/components/ObjectManager/ObjectManagerMapButtonConnect.d.ts +0 -6
  95. package/src/lib/components/ObjectManager/ObjectManagerMapButtonConnect.spec.d.ts +0 -1
  96. package/src/lib/components/ObjectManager/Objects.d.ts +0 -22
  97. package/src/lib/components/ObjectManager/Objects.spec.d.ts +0 -1
  98. package/src/lib/components/ObjectManager/index.d.ts +0 -2
  99. package/src/lib/components/Providers/Providers.d.ts +0 -29
  100. package/src/lib/components/Providers/Providers.spec.d.ts +0 -1
  101. package/src/lib/components/PublicWarningList/ConfirmWarningDialog.d.ts +0 -14
  102. package/src/lib/components/PublicWarningList/ConfirmWarningDialog.spec.d.ts +0 -1
  103. package/src/lib/components/PublicWarningList/NewWarningButton/NewWarningButton.d.ts +0 -9
  104. package/src/lib/components/PublicWarningList/NewWarningButton/NewWarningButton.stories.d.ts +0 -12
  105. package/src/lib/components/PublicWarningList/PublicWarningList.d.ts +0 -23
  106. package/src/lib/components/PublicWarningList/PublicWarningList.spec.d.ts +0 -1
  107. package/src/lib/components/PublicWarningList/PublicWarningList.stories.d.ts +0 -64
  108. package/src/lib/components/PublicWarningList/PublicWarningListConnect.aviation.drawTools.integration.spec.d.ts +0 -1
  109. package/src/lib/components/PublicWarningList/PublicWarningListConnect.aviation.saveAndPublish.integration.spec.d.ts +0 -1
  110. package/src/lib/components/PublicWarningList/PublicWarningListConnect.confirmation.integration.spec.d.ts +0 -1
  111. package/src/lib/components/PublicWarningList/PublicWarningListConnect.d.ts +0 -7
  112. package/src/lib/components/PublicWarningList/PublicWarningListConnect.draft.integration.spec.d.ts +0 -1
  113. package/src/lib/components/PublicWarningList/PublicWarningListConnect.editorToggle.integration.spec.d.ts +0 -1
  114. package/src/lib/components/PublicWarningList/PublicWarningListConnect.filter.integration.spec.d.ts +0 -1
  115. package/src/lib/components/PublicWarningList/PublicWarningListConnect.integration.spec.d.ts +0 -1
  116. package/src/lib/components/PublicWarningList/PublicWarningListConnect.maritime.integration.spec.d.ts +0 -1
  117. package/src/lib/components/PublicWarningList/PublicWarningListConnect.published.integration.spec.d.ts +0 -1
  118. package/src/lib/components/PublicWarningList/PublicWarningListConnect.stories.d.ts +0 -60
  119. package/src/lib/components/PublicWarningList/WarningListColumnContent.d.ts +0 -10
  120. package/src/lib/components/PublicWarningList/WarningListHeaderContent.d.ts +0 -11
  121. package/src/lib/components/PublicWarningList/WarningListHeaderContent.spec.d.ts +0 -1
  122. package/src/lib/components/PublicWarningList/WarningListItem.d.ts +0 -12
  123. package/src/lib/components/PublicWarningList/WarningListItem.spec.d.ts +0 -1
  124. package/src/lib/components/PublicWarningList/WarningListItemMenu.d.ts +0 -20
  125. package/src/lib/components/PublicWarningList/WarningListItemMenu.spec.d.ts +0 -1
  126. package/src/lib/components/PublicWarningList/WarningListItemSeperator.d.ts +0 -11
  127. package/src/lib/components/PublicWarningList/index.d.ts +0 -2
  128. package/src/lib/components/PublicWarningsForm/AreaField/AreaField.d.ts +0 -9
  129. package/src/lib/components/PublicWarningsForm/AreaField/AreaField.spec.d.ts +0 -1
  130. package/src/lib/components/PublicWarningsForm/AreaField/AreaField.stories.d.ts +0 -24
  131. package/src/lib/components/PublicWarningsForm/AreaField/index.d.ts +0 -1
  132. package/src/lib/components/PublicWarningsForm/DescriptionField/DescriptionField.d.ts +0 -5
  133. package/src/lib/components/PublicWarningsForm/DescriptionField/DescriptionField.spec.d.ts +0 -1
  134. package/src/lib/components/PublicWarningsForm/DescriptionField/DescriptionField.stories.d.ts +0 -10
  135. package/src/lib/components/PublicWarningsForm/DescriptionField/index.d.ts +0 -1
  136. package/src/lib/components/PublicWarningsForm/LevelField/LevelField.d.ts +0 -22
  137. package/src/lib/components/PublicWarningsForm/LevelField/LevelField.spec.d.ts +0 -1
  138. package/src/lib/components/PublicWarningsForm/LevelField/index.d.ts +0 -1
  139. package/src/lib/components/PublicWarningsForm/PhenomenonField/PhenomenonField.d.ts +0 -11
  140. package/src/lib/components/PublicWarningsForm/PhenomenonField/PhenomenonField.spec.d.ts +0 -1
  141. package/src/lib/components/PublicWarningsForm/PhenomenonField/index.d.ts +0 -1
  142. package/src/lib/components/PublicWarningsForm/ProbabilityField/ProbabilityField.d.ts +0 -7
  143. package/src/lib/components/PublicWarningsForm/ProbabilityField/ProbabilityField.spec.d.ts +0 -1
  144. package/src/lib/components/PublicWarningsForm/ProbabilityField/index.d.ts +0 -1
  145. package/src/lib/components/PublicWarningsForm/PublicWarningsForm.d.ts +0 -45
  146. package/src/lib/components/PublicWarningsForm/PublicWarningsForm.spec.d.ts +0 -1
  147. package/src/lib/components/PublicWarningsForm/PublicWarningsForm.stories.d.ts +0 -34
  148. package/src/lib/components/PublicWarningsForm/PublicWarningsFormConnect.d.ts +0 -14
  149. package/src/lib/components/PublicWarningsForm/PublicWarningsFormConnect.spec.d.ts +0 -1
  150. package/src/lib/components/PublicWarningsForm/PublicWarningsFormConnect.stories.d.ts +0 -8
  151. package/src/lib/components/PublicWarningsForm/PublicWarningsFormConnectErrors.stories.d.ts +0 -24
  152. package/src/lib/components/PublicWarningsForm/ValidFromField/ValidFromField.d.ts +0 -19
  153. package/src/lib/components/PublicWarningsForm/ValidFromField/ValidFromField.spec.d.ts +0 -1
  154. package/src/lib/components/PublicWarningsForm/ValidFromField/index.d.ts +0 -1
  155. package/src/lib/components/PublicWarningsForm/ValidUntilField/ValidUntilField.d.ts +0 -11
  156. package/src/lib/components/PublicWarningsForm/ValidUntilField/ValidUntilField.spec.d.ts +0 -1
  157. package/src/lib/components/PublicWarningsForm/ValidUntilField/index.d.ts +0 -1
  158. package/src/lib/components/PublicWarningsForm/index.d.ts +0 -2
  159. package/src/lib/components/PublicWarningsFormDialog/AviationWarningCancelDialogContent.d.ts +0 -8
  160. package/src/lib/components/PublicWarningsFormDialog/AviationWarningCancelDialogContent.spec.d.ts +0 -1
  161. package/src/lib/components/PublicWarningsFormDialog/CancelAviationConfirmDialog.d.ts +0 -18
  162. package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialog.d.ts +0 -25
  163. package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialog.spec.d.ts +0 -1
  164. package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialog.stories.d.ts +0 -18
  165. package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialogConnect.d.ts +0 -13
  166. package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialogConnect.spec.d.ts +0 -1
  167. package/src/lib/components/PublicWarningsFormDialog/PublicWarningsFormDialogConnect.stories.d.ts +0 -9
  168. package/src/lib/components/PublicWarningsFormDialog/WarningsAvatar.d.ts +0 -9
  169. package/src/lib/components/PublicWarningsFormDialog/index.d.ts +0 -2
  170. package/src/lib/components/WarningsMapView/WarningsMapView.d.ts +0 -11
  171. package/src/lib/components/WarningsMapView/WarningsMapView.spec.d.ts +0 -1
  172. package/src/lib/components/WarningsTimeline/WarningBlock.d.ts +0 -10
  173. package/src/lib/components/WarningsTimeline/WarningsTimeline.d.ts +0 -6
  174. package/src/lib/components/WarningsTimeline/WarningsTimeline.spec.d.ts +0 -1
  175. package/src/lib/components/WarningsTimeline/WarningsTimeline.stories.d.ts +0 -12
  176. package/src/lib/components/WarningsTimeline/WarningsTimelineConnect.d.ts +0 -5
  177. package/src/lib/components/WarningsTimeline/WarningsTimelineConnect.spec.d.ts +0 -1
  178. package/src/lib/components/WarningsTimeline/index.d.ts +0 -4
  179. package/src/lib/components/WarningsTimeline/warningBlockColors.d.ts +0 -16
  180. package/src/lib/components/WarningsTimeline/warningBlockColors.spec.d.ts +0 -1
  181. package/src/lib/components/WarningsTimeline/warningsTimelineUtils.d.ts +0 -15
  182. package/src/lib/components/WarningsTimeline/warningsTimelineUtils.spec.d.ts +0 -1
  183. package/src/lib/store/index.d.ts +0 -4
  184. package/src/lib/store/store.d.ts +0 -17
  185. package/src/lib/store/types.d.ts +0 -9
  186. package/src/lib/store/warningsDrawings/index.d.ts +0 -1
  187. package/src/lib/store/warningsDrawings/reducer.d.ts +0 -12
  188. package/src/lib/store/warningsDrawings/reducer.spec.d.ts +0 -1
  189. package/src/lib/store/warningsDrawings/selectors.d.ts +0 -45
  190. package/src/lib/store/warningsDrawings/selectors.spec.d.ts +0 -1
  191. package/src/lib/store/warningsDrawings/types.d.ts +0 -33
  192. package/src/lib/store/warningsDrawings/utils.d.ts +0 -4
  193. package/src/lib/store/warningsFilters/index.d.ts +0 -1
  194. package/src/lib/store/warningsFilters/reducer.d.ts +0 -11
  195. package/src/lib/store/warningsFilters/selectors.d.ts +0 -62
  196. package/src/lib/store/warningsFilters/selectors.spec.d.ts +0 -1
  197. package/src/lib/store/warningsFilters/types.d.ts +0 -7
  198. package/src/lib/store/warningsForm/index.d.ts +0 -2
  199. package/src/lib/store/warningsForm/listener.d.ts +0 -2
  200. package/src/lib/store/warningsForm/reducer.d.ts +0 -53
  201. package/src/lib/store/warningsForm/reducer.spec.d.ts +0 -1
  202. package/src/lib/store/warningsForm/selectors.d.ts +0 -192
  203. package/src/lib/store/warningsForm/selectors.spec.d.ts +0 -1
  204. package/src/lib/store/warningsForm/types.d.ts +0 -72
  205. package/src/lib/store/warningsForm/utils.d.ts +0 -2
  206. package/src/lib/storybookUtils/SimpleLinkMenu.d.ts +0 -6
  207. package/src/lib/storybookUtils/defaultStorySettings.d.ts +0 -18
  208. package/src/lib/storybookUtils/storyComponents.d.ts +0 -5
  209. package/src/lib/storybookUtils/testUtils.d.ts +0 -11
  210. package/src/lib/utils/constants.d.ts +0 -1
  211. package/src/lib/utils/fakeApi/index.d.ts +0 -20
  212. package/src/lib/utils/fakeSigmetAirmet.d.ts +0 -3
  213. package/src/lib/utils/i18n.d.ts +0 -7
  214. package/src/lib/utils/sig-airmet-util.d.ts +0 -20
  215. package/src/lib/utils/sig-airmet-util.spec.d.ts +0 -1
  216. package/src/lib/utils/useFormDirty.d.ts +0 -7
  217. package/src/lib/utils/useFormDirty.spec.d.ts +0 -1
  218. package/src/lib/utils/warningUtils.d.ts +0 -18
  219. package/src/lib/utils/warningUtils.spec.d.ts +0 -1
@@ -1,28 +0,0 @@
1
- import type { SelectChangeEvent } from '@mui/material';
2
- import React from 'react';
3
- import type { FieldErrors, FieldValues } from 'react-hook-form';
4
- import type { DrawMode } from '@opengeoweb/webmap-react';
5
- export declare const opacityOptions: number[];
6
- export interface DrawingToolFormValues {
7
- objectName: string;
8
- geoJSON: GeoJSON.FeatureCollection;
9
- id: string;
10
- }
11
- export interface DrawingToolFormContentsProps {
12
- isLoading?: boolean;
13
- dialogError?: string;
14
- id?: string;
15
- drawModes: DrawMode[];
16
- activeDrawModeId: string;
17
- opacity: number;
18
- isInEditMode: boolean;
19
- isDirty: boolean;
20
- errors: FieldErrors<FieldValues>;
21
- onChangeDrawMode: (newMode: DrawMode) => void;
22
- onChangeOpacity: (event: SelectChangeEvent<unknown>) => void;
23
- onBlurName: (event: React.FocusEvent<HTMLInputElement>) => void;
24
- onSubmit: () => void;
25
- geoJSON?: GeoJSON.FeatureCollection;
26
- }
27
- export declare const DrawingToolFormContentsNoMemo: React.FC<DrawingToolFormContentsProps>;
28
- export declare const DrawingToolFormContents: React.NamedExoticComponent<DrawingToolFormContentsProps>;
@@ -1,2 +0,0 @@
1
- export { default as DrawingToolForm } from './DrawingToolForm';
2
- export { DrawingToolFormConnect } from './DrawingToolFormConnect';
@@ -1,9 +0,0 @@
1
- import type { PickedFilterState, UpdateFilter } from './filter-hooks';
2
- type IdType = Exclude<keyof PickedFilterState, 'time'>;
3
- export interface ExpandableFilterChipProps {
4
- id: IdType;
5
- options: PickedFilterState[IdType];
6
- updateFilter: UpdateFilter;
7
- }
8
- declare const ExpandableFilterChip: React.FC<ExpandableFilterChipProps>;
9
- export default ExpandableFilterChip;
@@ -1,20 +0,0 @@
1
- import type { StoryObj } from '@storybook/react/*';
2
- import React from 'react';
3
- import type { ExpandableFilterChipProps } from './ExpandableFilterChip';
4
- import ExpandableFilterChip from './ExpandableFilterChip';
5
- declare const _default: {
6
- title: string;
7
- component: React.FC<ExpandableFilterChipProps>;
8
- parameters: {
9
- docs: {
10
- description: {
11
- component: string;
12
- };
13
- };
14
- };
15
- };
16
- export default _default;
17
- type Story = StoryObj<typeof ExpandableFilterChip>;
18
- export declare const Component: Story;
19
- export declare const ExpandableFilterChipLight: Story;
20
- export declare const ExpandableFilterChipDark: Story;
@@ -1,13 +0,0 @@
1
- import type { FC } from 'react';
2
- import type { PickedFilterState, UpdateFilter } from './filter-hooks';
3
- import type { TimeFilter } from './filter-utils';
4
- interface FilterListProps {
5
- onClickAll?: (isChecked: boolean) => void;
6
- isAllSelected?: boolean;
7
- filterState: PickedFilterState;
8
- updateFilter: UpdateFilter;
9
- timeFilter: TimeFilter;
10
- onUpdateTimeFilter: (timeFilter: TimeFilter) => void;
11
- }
12
- declare const FilterList: FC<FilterListProps>;
13
- export default FilterList;
@@ -1,7 +0,0 @@
1
- import type { TimeFilter } from './filter-utils';
2
- interface TimeFilterChipProps {
3
- timeFilter: TimeFilter;
4
- onUpdateTimeFilter: (timeFilter: TimeFilter) => void;
5
- }
6
- declare const TimeFilterChip: React.FC<TimeFilterChipProps>;
7
- export default TimeFilterChip;
@@ -1,30 +0,0 @@
1
- import type { defaultDomainFilter, defaultPhenomenonFilter, TimeFilter } from './filter-utils';
2
- import { AllPhenomenaKeys, defaultEmptyFilter, defaultLevelFilter, Domain } from './filter-utils';
3
- import type { Warning } from '../../store/warningsForm/types';
4
- export interface PickedFilterState {
5
- source: Partial<typeof defaultEmptyFilter>;
6
- domain: Partial<typeof defaultDomainFilter>;
7
- phenomenon: Partial<typeof defaultPhenomenonFilter>;
8
- level: Partial<typeof defaultLevelFilter>;
9
- time: TimeFilter;
10
- }
11
- export interface FilterState extends PickedFilterState {
12
- source: typeof defaultEmptyFilter;
13
- domain: typeof defaultDomainFilter;
14
- phenomenon: typeof defaultPhenomenonFilter;
15
- level: typeof defaultLevelFilter;
16
- time: TimeFilter;
17
- }
18
- export type FilterKeyType = keyof FilterState;
19
- export type OptionKey<T extends FilterKeyType> = keyof FilterState[T];
20
- export type UpdateFilter = <T extends FilterKeyType>(filterKey: T | 'ALL', optionKey: OptionKey<T> | 'ALL', value: boolean, only?: boolean) => void;
21
- export interface FilterHookState {
22
- allSelected: boolean;
23
- updateFilter: UpdateFilter;
24
- updateTimeFilter: (timeFilter: TimeFilter) => void;
25
- byFilterState: (warning: Warning) => boolean;
26
- filterState: PickedFilterState;
27
- timeFilter: TimeFilter;
28
- }
29
- export declare const getPhenomenaForDomainFilter: (domainFilter: Record<Domain, boolean>) => (keyof typeof AllPhenomenaKeys)[];
30
- export declare const useWarningFilters: (warnings: Warning[], onUpdateFilters: (filterState: Partial<FilterState>, systemUpdate?: boolean) => void, savedFilterState: FilterState, presetFilterState?: PickedFilterState) => FilterHookState;
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import type { ColorDefinition } from '../PublicWarningsForm/LevelField';
2
- export declare const warningColors: Record<string, ColorDefinition | undefined>;
@@ -1,111 +0,0 @@
1
- import { AirmetPhenomena, SigmetPhenomena } from '@opengeoweb/api';
2
- import type { Warning } from '../../store/warningsForm/types';
3
- export declare enum Domain {
4
- aviation = "aviation",
5
- maritime = "maritime",
6
- public = "public"
7
- }
8
- export declare enum Level {
9
- extreme = "extreme",
10
- moderate = "moderate",
11
- severe = "severe",
12
- airmet = "AIR",
13
- sigmet = "SIG"
14
- }
15
- export declare enum Phenomenon {
16
- wind = "wind",
17
- fog = "fog",
18
- thunderstorm = "thunderstorm",
19
- snowIce = "snowIce",
20
- rain = "rain",
21
- highTemp = "highTemp",
22
- lowTemp = "lowTemp",
23
- coastalEvent = "coastalEvent"
24
- }
25
- export declare const emptyFilterId = "unspecified";
26
- export declare const defaultDomainFilter: Record<Domain, boolean>;
27
- export declare const domainLevels: Record<Domain, Level[]>;
28
- export declare const defaultLevelFilter: Record<Level | 'unspecified', boolean>;
29
- export declare const defaultEmptyFilter: Record<string, boolean>;
30
- export declare const makeFilterFromList: <T extends string>(options: T[], value?: boolean) => Record<T | "unspecified", boolean>;
31
- declare const AllPhenomena: {
32
- readonly wind: Phenomenon.wind;
33
- readonly fog: Phenomenon.fog;
34
- readonly thunderstorm: Phenomenon.thunderstorm;
35
- readonly snowIce: Phenomenon.snowIce;
36
- readonly rain: Phenomenon.rain;
37
- readonly highTemp: Phenomenon.highTemp;
38
- readonly lowTemp: Phenomenon.lowTemp;
39
- readonly coastalEvent: Phenomenon.coastalEvent;
40
- readonly EMBD_TS: SigmetPhenomena.EMBD_TS;
41
- readonly EMBD_TSGR: SigmetPhenomena.EMBD_TSGR;
42
- readonly FRQ_TS: SigmetPhenomena.FRQ_TS;
43
- readonly FRQ_TSGR: SigmetPhenomena.FRQ_TSGR;
44
- readonly HVY_DS: SigmetPhenomena.HVY_DS;
45
- readonly HVY_SS: SigmetPhenomena.HVY_SS;
46
- readonly OBSC_TS: SigmetPhenomena.OBSC_TS;
47
- readonly OBSC_TSGR: SigmetPhenomena.OBSC_TSGR;
48
- readonly RDOACT_CLD: SigmetPhenomena.RDOACT_CLD;
49
- readonly SEV_ICE: SigmetPhenomena.SEV_ICE;
50
- readonly SEV_ICE_FRZ_RN: SigmetPhenomena.SEV_ICE_FRZ_RN;
51
- readonly SEV_MTW: SigmetPhenomena.SEV_MTW;
52
- readonly SEV_TURB: SigmetPhenomena.SEV_TURB;
53
- readonly SQL_TS: SigmetPhenomena.SQL_TS;
54
- readonly SQL_TSGR: SigmetPhenomena.SQL_TSGR;
55
- readonly VA_CLD: SigmetPhenomena.VA_CLD;
56
- readonly SFC_VIS: AirmetPhenomena.SFC_VIS;
57
- readonly SFC_WIND: AirmetPhenomena.SFC_WIND;
58
- readonly OVC_CLD: AirmetPhenomena.OVC_CLD;
59
- readonly BKN_CLD: AirmetPhenomena.BKN_CLD;
60
- readonly ISOL_CB: AirmetPhenomena.ISOL_CB;
61
- readonly OCNL_CB: AirmetPhenomena.OCNL_CB;
62
- readonly FRQ_CB: AirmetPhenomena.FRQ_CB;
63
- readonly ISOL_TS: AirmetPhenomena.ISOL_TS;
64
- readonly OCNL_TS: AirmetPhenomena.OCNL_TS;
65
- readonly ISOL_TSGR: AirmetPhenomena.ISOL_TSGR;
66
- readonly OCNL_TSGR: AirmetPhenomena.OCNL_TSGR;
67
- readonly ISOL_TCU: AirmetPhenomena.ISOL_TCU;
68
- readonly OCNL_TCU: AirmetPhenomena.OCNL_TCU;
69
- readonly FRQ_TCU: AirmetPhenomena.FRQ_TCU;
70
- readonly MOD_ICE: AirmetPhenomena.MOD_ICE;
71
- readonly MOD_MTW: AirmetPhenomena.MOD_MTW;
72
- readonly MOD_TURB: AirmetPhenomena.MOD_TURB;
73
- readonly MT_OBSC: AirmetPhenomena.MT_OBSC;
74
- };
75
- export declare const AllPhenomenaKeys: Record<keyof typeof AllPhenomena, keyof typeof AllPhenomena>;
76
- export declare const domainPhenomena: Record<Domain, Partial<keyof typeof AllPhenomenaKeys>[]>;
77
- export declare const defaultPhenomenonFilter: Record<string, boolean>;
78
- type OptionsType = Partial<Record<Domain | Level | Phenomenon, boolean>>;
79
- interface OptionsMetadata {
80
- /** The number of selected options */
81
- noSelectedOptions: number;
82
- /** Whether or not all options are selected */
83
- allSelected: boolean;
84
- }
85
- export declare const getSelectedOptions: (options?: OptionsType) => OptionsMetadata;
86
- export declare const updateState: <T extends string>(state: Record<T, boolean>, optionKey: T | "ALL", value: boolean, only?: boolean) => Record<T, boolean>;
87
- /** Make sure our value is in the filter */
88
- export declare const getValue: <T>(values: Record<string, T>, value: string) => T | "unspecified";
89
- export declare const getFiltersFromWarnings: (warnings: Warning[], filterKey: string) => string[];
90
- export declare enum TimeFilterMode {
91
- all = "all",
92
- today = "today",
93
- tomorrow = "tomorrow",
94
- custom = "custom"
95
- }
96
- export interface TimeFilter {
97
- mode: TimeFilterMode;
98
- customStart?: string;
99
- customEnd?: string;
100
- }
101
- export declare const defaultTimeFilter: TimeFilter;
102
- export declare const isWarningWithinInterval: (warning: Warning, timeFilter: TimeFilter) => boolean;
103
- export declare const getApiParams: (timeFilter: TimeFilter) => Record<string, string>;
104
- export declare const initialFilters: {
105
- source: Record<string, boolean>;
106
- domain: Record<Domain, boolean>;
107
- phenomenon: Record<string, boolean>;
108
- level: Record<"unspecified" | Level, boolean>;
109
- time: TimeFilter;
110
- };
111
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import type { DistrictsType } from '../types';
3
- export interface AreaListProps {
4
- areas: DistrictsType[];
5
- selected: string[];
6
- disabled: string[];
7
- isReadOnly?: boolean;
8
- onToggleSelectArea?: (id: string) => void;
9
- onSelectMultipleAreas: (ids: string[]) => void;
10
- }
11
- export declare const AreaList: React.MemoExoticComponent<({ areas, selected, disabled, isReadOnly, onToggleSelectArea, onSelectMultipleAreas, }: AreaListProps) => import("react/jsx-runtime").JSX.Element>;
@@ -1 +0,0 @@
1
- export * from './AreaList';
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import type { DistrictsType } from '../types';
3
- export interface AssignedAreasProps {
4
- assignedAreas: DistrictsType[];
5
- selectedAreaIds: string[];
6
- onAddClick: () => void;
7
- onDeleteClick: (id: string) => void;
8
- onToggleSelectArea: (id: string) => void;
9
- onSelectMultipleAreas: (id: string[]) => void;
10
- shouldShowDistricts?: boolean;
11
- isReadOnly?: boolean;
12
- }
13
- export declare const AssignedAreas: React.FC<AssignedAreasProps>;
@@ -1,8 +0,0 @@
1
- import type { TooltipProps } from '@mui/material';
2
- import React from 'react';
3
- export interface MaritimeWarningAvatarProps {
4
- editor: string;
5
- tooltipPlacement?: TooltipProps['placement'];
6
- }
7
- declare const MaritimeWarningAvatar: React.FC<MaritimeWarningAvatarProps>;
8
- export default MaritimeWarningAvatar;
@@ -1,33 +0,0 @@
1
- import type { AlertColor } from '@mui/material';
2
- import type { TFunction } from 'i18next';
3
- import React from 'react';
4
- import type { MaritimeWarningItem, MaritimeWarningItemAttributes, MaritimeWarningsConfig, DistrictsType } from './types';
5
- export declare const getWarningsValidity: (t: TFunction, warnings: MaritimeWarningItem[]) => string;
6
- export interface MaritimeWarningsFormProps {
7
- areas: DistrictsType[];
8
- selectedAreaIds: string[];
9
- warnings: MaritimeWarningItem[];
10
- modified: boolean;
11
- onToggleSelectArea: (id: string) => void;
12
- onSelectMultipleAreas: (ids: string[]) => void;
13
- onAddSelectedAreas: (id: string) => void;
14
- onRemoveWarning: (id: string) => void;
15
- onRemoveArea: (id: string) => void;
16
- onAddWarning: () => void;
17
- onChangeWarning: (id: string, newValues: Partial<MaritimeWarningItemAttributes>) => void;
18
- onMoveWarning: (oldIndex: number, newIndex: number) => void;
19
- onSubmit: (shouldExtend?: boolean) => Promise<void>;
20
- onClear: () => void;
21
- onToggleReadOnly: (isReadOnly: boolean) => void;
22
- isReadOnly: boolean;
23
- shouldHideEditorToggle: boolean;
24
- shouldShowDistricts?: boolean;
25
- editor?: string;
26
- error?: {
27
- title: string;
28
- severity: AlertColor;
29
- };
30
- maritimeConfig: MaritimeWarningsConfig;
31
- lastUpdatedTime?: string;
32
- }
33
- export declare const MaritimeWarningsForm: React.FC<MaritimeWarningsFormProps>;
@@ -1,15 +0,0 @@
1
- import type { StoryObj, Meta } from '@storybook/react-webpack5';
2
- import { MaritimeWarningsForm } from './MaritimeWarningsForm';
3
- type Story = StoryObj<typeof MaritimeWarningsForm>;
4
- declare const meta: Meta<typeof MaritimeWarningsForm>;
5
- export default meta;
6
- export declare const ViewerLightMode: Story;
7
- export declare const EditorLightMode: Story;
8
- export declare const ViewerDarkMode: Story;
9
- export declare const EditorDarkMode: Story;
10
- export declare const MaritimeWarningsFormViewerMobileLight: Story;
11
- export declare const MaritimeWarningsFormEditorMobileLight: Story;
12
- export declare const MaritimeWarningsFormViewerMobileDark: Story;
13
- export declare const MaritimeWarningsFormEditorMobileDark: Story;
14
- export declare const ErrorExample: Story;
15
- export declare const WarningExample: Story;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { MaritimeWarningsDomain } from './types';
3
- export interface MaritimeWarningsFormConnectProps {
4
- domain: MaritimeWarningsDomain;
5
- onPreventCloseView?: (on: boolean) => void;
6
- onModifyForm?: (isFormDirty: boolean) => void;
7
- }
8
- export declare const MaritimeWarningsFormConnect: React.FC<MaritimeWarningsFormConnectProps>;
@@ -1,14 +0,0 @@
1
- import type { StoryObj, Meta } from '@storybook/react-webpack5';
2
- import React from 'react';
3
- import type { MaritimeWarningsFormConnectProps } from './MaritimeWarningsFormConnect';
4
- declare const MaritimeWarningsFormConnectDemo: React.FC<MaritimeWarningsFormConnectProps>;
5
- type Story = StoryObj<typeof MaritimeWarningsFormConnectDemo>;
6
- declare const meta: Meta<typeof MaritimeWarningsFormConnectDemo>;
7
- export default meta;
8
- export declare const LightMode: Story;
9
- export declare const DarkMode: Story;
10
- export declare const CoastalWatersLight: Story;
11
- export declare const CoastalWatersDark: Story;
12
- export declare const EditorToggleDemo: Story;
13
- export declare const EditorTakeoverDemo: Story;
14
- export declare const PublishErrorDemo: Story;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import type { DistrictsType, MaritimeWarningItem, MaritimeWarningItemAttributes, MaritimeWarningsConfig } from '../types';
3
- export interface WarningListProps {
4
- warnings: MaritimeWarningItem[];
5
- onAddSelectedAreas: (id: string) => void;
6
- onRemoveArea: (areaId: string) => void;
7
- onRemoveWarning: (id: string) => void;
8
- onChangeWarning: (id: string, newValues: Partial<MaritimeWarningItemAttributes>) => void;
9
- onToggleSelectArea: (areaId: string) => void;
10
- onSelectMultipleAreas: (areaIds: string[]) => void;
11
- onMoveWarning: (oldIndex: number, newIndex: number) => void;
12
- selectedAreaIds: string[];
13
- areas: DistrictsType[];
14
- isReadOnly: boolean;
15
- shouldShowDistricts?: boolean;
16
- maritimeConfig: MaritimeWarningsConfig;
17
- }
18
- export declare const WarningList: React.FC<WarningListProps>;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const WarningListDragHandle: React.FC;
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import type { DistrictsType, MaritimeWarningItem, MaritimeWarningItemAttributes, MaritimeWarningsConfig } from '../types';
3
- export interface WarningListItemProps {
4
- warning: MaritimeWarningItem;
5
- areas: DistrictsType[];
6
- selectedAreaIds: string[];
7
- isReadOnly: boolean;
8
- onAddClick: (id: string) => void;
9
- onRemove: (id: string) => void;
10
- onChange: (id: string, values: MaritimeWarningItemAttributes) => void;
11
- onToggleSelectArea: (id: string) => void;
12
- onSelectMultipleAreas: (ids: string[]) => void;
13
- onRemoveArea: (id: string) => void;
14
- shouldShowDistricts?: boolean;
15
- maritimeConfig: MaritimeWarningsConfig;
16
- }
17
- export declare const WarningListItem: React.MemoExoticComponent<({ warning, areas, selectedAreaIds, onAddClick, onRemove, onChange, onToggleSelectArea, onSelectMultipleAreas, onRemoveArea, isReadOnly, shouldShowDistricts, maritimeConfig, }: WarningListItemProps) => import("react/jsx-runtime").JSX.Element>;
@@ -1,21 +0,0 @@
1
- import type { SxProps } from '@mui/material';
2
- import type { TFunction } from 'i18next';
3
- import React from 'react';
4
- export interface WarningListSelectOption {
5
- value: string;
6
- label: string | ((t: TFunction) => string);
7
- }
8
- export interface WarningListSelectProps {
9
- options: WarningListSelectOption[];
10
- label: string;
11
- value?: string;
12
- onChange: (value: string) => void;
13
- renderOption?: (option: WarningListSelectOption, index: number) => React.ReactNode;
14
- renderValue?: (option: unknown) => React.ReactNode;
15
- gridArea: string;
16
- additionalStyling?: SxProps;
17
- isReadOnly?: boolean;
18
- emptyMessage?: string;
19
- validationResult?: true | 'error' | 'warning';
20
- }
21
- export declare const WarningListSelect: React.MemoExoticComponent<({ options, value, label, onChange, renderOption, renderValue, gridArea, additionalStyling, isReadOnly, emptyMessage, validationResult, }: WarningListSelectProps) => import("react/jsx-runtime").JSX.Element>;
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- export declare enum WindForceLevel {
3
- moderate = "moderate",
4
- severe = "severe",
5
- extreme = "extreme"
6
- }
7
- export interface ColorDefinition {
8
- color: string;
9
- textColor: string;
10
- borderColor: string;
11
- }
12
- export declare const windForceStyles: Record<WindForceLevel, ColorDefinition>;
13
- export interface WindForceOption {
14
- level: WindForceLevel;
15
- value: string;
16
- }
17
- export interface WindForceSelectProps {
18
- value?: string;
19
- onChange: (value: string) => void;
20
- gridArea: string;
21
- options: WindForceOption[];
22
- isReadOnly?: boolean;
23
- }
24
- export declare const WindForceSelect: React.FC<WindForceSelectProps>;
@@ -1 +0,0 @@
1
- export * from './MaritimeWarningsForm';
@@ -1,3 +0,0 @@
1
- import type { WarningListSelectOption } from './WarningList/WarningListSelect';
2
- export declare function getLabelFromOptionLabel(label: WarningListSelectOption['label']): string;
3
- export declare function selectOption(container: HTMLElement, comboboxLabel: string, optionLabel: WarningListSelectOption['label']): Promise<void>;
@@ -1,51 +0,0 @@
1
- export interface Area {
2
- label: string;
3
- id: string;
4
- }
5
- export interface MaritimeWarningItemAttributes {
6
- windDirectionFrom?: string;
7
- windForce?: string;
8
- changeType?: string;
9
- windDirectionTo?: string;
10
- validFrom?: string;
11
- validUntil?: string;
12
- }
13
- export interface MaritimeWarningItem extends MaritimeWarningItemAttributes {
14
- id: string;
15
- assignedAreaIds: string[];
16
- }
17
- export type MaritimeWarningsDomain = 'northSeaDistricts' | 'coastalWaters';
18
- export interface WindDirectionType {
19
- value: string;
20
- label: string;
21
- degrees: number;
22
- }
23
- export interface DistrictsType {
24
- geoJSON: GeoJSON.FeatureCollection;
25
- districtName: string;
26
- }
27
- export interface LevelDefinitionType {
28
- windForce: string;
29
- level: string;
30
- }
31
- export interface ChangeType {
32
- label: string;
33
- key: string;
34
- }
35
- export type MaritimeLevelTiming = 'maritimeLevelsSummer' | 'maritimeLevelsWinter';
36
- export interface ValidationItem {
37
- level: 'error' | 'warning';
38
- value: number;
39
- }
40
- export interface MaritimeWarningsConfig {
41
- districtList: Record<MaritimeWarningsDomain, DistrictsType[]>;
42
- maritimeLevelDefinition: Record<MaritimeLevelTiming, LevelDefinitionType[]>;
43
- windDirectionDefinition: WindDirectionType[];
44
- changeType: ChangeType[];
45
- validation: {
46
- dirTo: {
47
- min_wind_change: ValidationItem;
48
- max_wind_change: ValidationItem;
49
- };
50
- };
51
- }
@@ -1,12 +0,0 @@
1
- import type { DistrictsType, MaritimeWarningItem, MaritimeWarningsConfig } from './types';
2
- interface UseConfirmDeleteDialogProps {
3
- areas: DistrictsType[];
4
- warnings: MaritimeWarningItem[];
5
- maritimeConfig: MaritimeWarningsConfig;
6
- onRemoveWarning: (id: string) => void;
7
- }
8
- interface UseConfirmDeleteDialog {
9
- onRemoveWarningWithConfirmation: (id: string) => Promise<void>;
10
- }
11
- export declare function useConfirmDeleteDialog({ areas, warnings, maritimeConfig, onRemoveWarning, }: UseConfirmDeleteDialogProps): UseConfirmDeleteDialog;
12
- export {};
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- export interface UseFilterChipSelectProps {
3
- selectedIds: string[];
4
- assignedIds: string[];
5
- onToggleSelect?: (id: string) => void;
6
- onSelectMultiple?: (ids: string[]) => void;
7
- }
8
- interface UseFilterChipSelect {
9
- handleChipClick: (id: string, event: React.MouseEvent) => void;
10
- }
11
- export declare function useFilterChipSelect({ selectedIds, assignedIds, onToggleSelect, onSelectMultiple, }: UseFilterChipSelectProps): UseFilterChipSelect;
12
- export {};
@@ -1,63 +0,0 @@
1
- import React from 'react';
2
- import type { MaritimeWarningItem, MaritimeWarningItemAttributes } from './types';
3
- export declare function createWarning(): MaritimeWarningItem;
4
- export declare function isPublishedWarning(warning: MaritimeWarningItem): boolean;
5
- interface State {
6
- selectedAreaIds: string[];
7
- warnings: MaritimeWarningItem[];
8
- modified: boolean;
9
- }
10
- export declare const initialState: State;
11
- interface Initialize {
12
- type: 'initialize';
13
- warnings: MaritimeWarningItem[];
14
- }
15
- interface ToggleSelectArea {
16
- type: 'toggleSelectArea';
17
- id: string;
18
- }
19
- interface SelectMultipleAreas {
20
- type: 'selectMultipleAreas';
21
- ids: string[];
22
- }
23
- interface NewWarning {
24
- type: 'newWarning';
25
- }
26
- interface AddSelectedAreasToWarning {
27
- type: 'addSelectedAreasToWarning';
28
- id: string;
29
- }
30
- interface RemoveWarning {
31
- type: 'removeWarning';
32
- id: string;
33
- }
34
- interface ChangeWarning {
35
- type: 'changeWarning';
36
- id: string;
37
- newValues: Partial<MaritimeWarningItemAttributes>;
38
- }
39
- interface RemoveArea {
40
- type: 'removeArea';
41
- areaId: string;
42
- }
43
- interface ClearWarnings {
44
- type: 'clearWarnings';
45
- }
46
- interface MoveWarning {
47
- type: 'moveWarning';
48
- oldIndex: number;
49
- newIndex: number;
50
- }
51
- interface MergeWarnings {
52
- type: 'mergeWarnings';
53
- }
54
- interface SubmitWarnings {
55
- type: 'submitWarnings';
56
- }
57
- type Action = ToggleSelectArea | NewWarning | Initialize | AddSelectedAreasToWarning | ChangeWarning | RemoveWarning | RemoveArea | ClearWarnings | MoveWarning | SelectMultipleAreas | MergeWarnings | SubmitWarnings;
58
- export declare function reducer(state: State, action: Action): State;
59
- export declare function useMaritimeWarningsFormState(): [
60
- State,
61
- React.Dispatch<Action>
62
- ];
63
- export {};
@@ -1,7 +0,0 @@
1
- import type { MaritimeWarningItem, MaritimeWarningsConfig, MaritimeWarningsDomain } from './types';
2
- import type { MaritimeWarning, MaritimeWarningsType } from '../../store/warningsForm/types';
3
- export declare const isWarningsValid: (warnings: MaritimeWarningItem[], config: MaritimeWarningsConfig, allowEmpty?: boolean) => boolean;
4
- export declare const getType: (domain: MaritimeWarningsDomain) => MaritimeWarningsType;
5
- export declare const mapItemsToMaritimeWarnings: (warnings: MaritimeWarningItem[], domain: MaritimeWarningsDomain, maritimeConfig: MaritimeWarningsConfig, editor?: string, shouldExtend?: boolean) => MaritimeWarning[];
6
- export declare const mapMaritimeWarningsToItems: (warnings: MaritimeWarning[]) => MaritimeWarningItem[];
7
- export declare const validateWindDirectionChange: (directionFrom: string | undefined, directionTo: string | undefined, changeType: string | undefined, config?: MaritimeWarningsConfig) => true | "warning" | "error";