@opengeoweb/space-weather 13.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 (114) hide show
  1. package/README.md +43 -0
  2. package/index.d.ts +1 -0
  3. package/index.esm.js +8391 -0
  4. package/package.json +38 -0
  5. package/src/index.d.ts +10 -0
  6. package/src/lib/components/Bulletin/Bulletin.d.ts +10 -0
  7. package/src/lib/components/Bulletin/Bulletin.noNewBulletins.stories.d.ts +8 -0
  8. package/src/lib/components/Bulletin/Bulletin.spec.d.ts +1 -0
  9. package/src/lib/components/Bulletin/Bulletin.stories.d.ts +8 -0
  10. package/src/lib/components/Bulletin/BulletinControls.d.ts +6 -0
  11. package/src/lib/components/Bulletin/BulletinControls.spec.d.ts +1 -0
  12. package/src/lib/components/Bulletin/BulletinHistoryDialog.d.ts +7 -0
  13. package/src/lib/components/Bulletin/BulletinHistoryDialog.spec.d.ts +1 -0
  14. package/src/lib/components/Bulletin/BulletinHistoryDialog.stories.d.ts +7 -0
  15. package/src/lib/components/Bulletin/BulletinHistoryList.d.ts +8 -0
  16. package/src/lib/components/Bulletin/BulletinHistoryList.spec.d.ts +1 -0
  17. package/src/lib/components/Bulletin/BulletinTabs.d.ts +11 -0
  18. package/src/lib/components/Bulletin/BulletinTabs.spec.d.ts +1 -0
  19. package/src/lib/components/Bulletin/BulletinViewer.d.ts +8 -0
  20. package/src/lib/components/Bulletin/BulletinViewer.spec.d.ts +1 -0
  21. package/src/lib/components/Bulletin/index.d.ts +4 -0
  22. package/src/lib/components/ComponentsLookUp/ComponentsLookUp.d.ts +15 -0
  23. package/src/lib/components/ComponentsLookUp/ComponentsLookUp.spec.d.ts +1 -0
  24. package/src/lib/components/ComponentsLookUp/index.d.ts +1 -0
  25. package/src/lib/components/ContentDialog/ContentDialog.d.ts +12 -0
  26. package/src/lib/components/ContentDialog/ContentDialog.spec.d.ts +1 -0
  27. package/src/lib/components/ContentDialog/ContentDialog.stories.d.ts +12 -0
  28. package/src/lib/components/ContentDialog/index.d.ts +1 -0
  29. package/src/lib/components/Layout/Layout.d.ts +18 -0
  30. package/src/lib/components/Layout/Layout.spec.d.ts +1 -0
  31. package/src/lib/components/Layout/index.d.ts +1 -0
  32. package/src/lib/components/LifeCycleDialog/EditFormFields/CategoryLabelStatusTag.d.ts +7 -0
  33. package/src/lib/components/LifeCycleDialog/EditFormFields/DataSourceStatusTag.d.ts +7 -0
  34. package/src/lib/components/LifeCycleDialog/EditFormFields/EditFormFields.styles.d.ts +15 -0
  35. package/src/lib/components/LifeCycleDialog/EditFormFields/EventLevel.d.ts +3 -0
  36. package/src/lib/components/LifeCycleDialog/EditFormFields/GScaleStatusTag.d.ts +8 -0
  37. package/src/lib/components/LifeCycleDialog/EditFormFields/PeakFlux.d.ts +3 -0
  38. package/src/lib/components/LifeCycleDialog/EditFormFields/PeakFlux.spec.d.ts +1 -0
  39. package/src/lib/components/LifeCycleDialog/EditFormFields/StartTimeEndTime.d.ts +10 -0
  40. package/src/lib/components/LifeCycleDialog/EditFormFields/StartTimeEndTime.spec.d.ts +1 -0
  41. package/src/lib/components/LifeCycleDialog/EditFormFields/SuddenImpulse.d.ts +3 -0
  42. package/src/lib/components/LifeCycleDialog/EditFormFields/SuddenImpulse.spec.d.ts +1 -0
  43. package/src/lib/components/LifeCycleDialog/EditFormFields/Threshold.d.ts +7 -0
  44. package/src/lib/components/LifeCycleDialog/EditFormFields/XrayClassPeakClass.d.ts +8 -0
  45. package/src/lib/components/LifeCycleDialog/EditFormFields/XrayClassPeakClass.spec.d.ts +1 -0
  46. package/src/lib/components/LifeCycleDialog/EditFormFields/index.d.ts +9 -0
  47. package/src/lib/components/LifeCycleDialog/EditFormFields/validations.d.ts +5 -0
  48. package/src/lib/components/LifeCycleDialog/EditFormFields/validations.spec.d.ts +1 -0
  49. package/src/lib/components/LifeCycleDialog/FormWrapper.d.ts +9 -0
  50. package/src/lib/components/LifeCycleDialog/LifeCycleActions.d.ts +7 -0
  51. package/src/lib/components/LifeCycleDialog/LifeCycleActions.spec.d.ts +1 -0
  52. package/src/lib/components/LifeCycleDialog/LifeCycleColumn.d.ts +10 -0
  53. package/src/lib/components/LifeCycleDialog/LifeCycleColumn.spec.d.ts +1 -0
  54. package/src/lib/components/LifeCycleDialog/LifeCycleDialog.d.ts +12 -0
  55. package/src/lib/components/LifeCycleDialog/LifeCycleDialog.spec.d.ts +1 -0
  56. package/src/lib/components/LifeCycleDialog/LifeCycleDialog.stories.d.ts +34 -0
  57. package/src/lib/components/LifeCycleDialog/LifeCycleDisplay.d.ts +11 -0
  58. package/src/lib/components/LifeCycleDialog/LifeCycleDisplay.spec.d.ts +1 -0
  59. package/src/lib/components/LifeCycleDialog/LifeCycleEdit.d.ts +19 -0
  60. package/src/lib/components/LifeCycleDialog/LifeCycleEdit.spec.d.ts +1 -0
  61. package/src/lib/components/LifeCycleDialog/LifeCycleEdit.unregister.spec.d.ts +1 -0
  62. package/src/lib/components/LifeCycleDialog/LifeCycleEditOptions.d.ts +8 -0
  63. package/src/lib/components/LifeCycleDialog/LifeCycleEditOptions.spec.d.ts +1 -0
  64. package/src/lib/components/LifeCycleDialog/index.d.ts +5 -0
  65. package/src/lib/components/LifeCycleDialog/utils.d.ts +10 -0
  66. package/src/lib/components/LifeCycleDialog/utils.spec.d.ts +1 -0
  67. package/src/lib/components/NotificationTrigger/NotificationTrigger.d.ts +3 -0
  68. package/src/lib/components/NotificationTrigger/NotificationTrigger.spec.d.ts +1 -0
  69. package/src/lib/components/NotificationTrigger/NotificationTrigger.stories.d.ts +7 -0
  70. package/src/lib/components/NotificationTrigger/NotificationTriggerContext.d.ts +14 -0
  71. package/src/lib/components/NotificationTrigger/NotificationTriggerContext.spec.d.ts +1 -0
  72. package/src/lib/components/NotificationTrigger/index.d.ts +2 -0
  73. package/src/lib/components/Notifications/NotificationList.d.ts +13 -0
  74. package/src/lib/components/Notifications/NotificationList.spec.d.ts +1 -0
  75. package/src/lib/components/Notifications/NotificationRow.d.ts +8 -0
  76. package/src/lib/components/Notifications/NotificationRow.spec.d.ts +7 -0
  77. package/src/lib/components/Notifications/NotificationRow.stories.d.ts +8 -0
  78. package/src/lib/components/Notifications/NotificationTabs.d.ts +9 -0
  79. package/src/lib/components/Notifications/NotificationTabs.spec.d.ts +1 -0
  80. package/src/lib/components/Notifications/Notifications.d.ts +10 -0
  81. package/src/lib/components/Notifications/Notifications.spec.d.ts +1 -0
  82. package/src/lib/components/Notifications/Notifications.stories.d.ts +15 -0
  83. package/src/lib/components/Notifications/index.d.ts +3 -0
  84. package/src/lib/components/Notifications/utils.d.ts +2 -0
  85. package/src/lib/components/Notifications/utils.spec.d.ts +1 -0
  86. package/src/lib/components/Providers/Providers.d.ts +4 -0
  87. package/src/lib/components/Providers/index.d.ts +1 -0
  88. package/src/lib/components/TimeSeries/GraphErrors.d.ts +12 -0
  89. package/src/lib/components/TimeSeries/Graphs.d.ts +12 -0
  90. package/src/lib/components/TimeSeries/Graphs.spec.d.ts +1 -0
  91. package/src/lib/components/TimeSeries/Graphs.stories.d.ts +10 -0
  92. package/src/lib/components/TimeSeries/TimeSeries.d.ts +3 -0
  93. package/src/lib/components/TimeSeries/TimeSeries.spec.d.ts +1 -0
  94. package/src/lib/components/TimeSeries/TimeSeries.stories.d.ts +9 -0
  95. package/src/lib/components/TimeSeries/TimeSeries.utils.d.ts +4 -0
  96. package/src/lib/components/TimeSeries/TimeSeries.utils.spec.d.ts +1 -0
  97. package/src/lib/components/TimeSeries/TimeSeriesHeader.d.ts +3 -0
  98. package/src/lib/components/TimeSeries/createChartSeriesData.d.ts +4 -0
  99. package/src/lib/components/TimeSeries/createChartSeriesData.spec.d.ts +1 -0
  100. package/src/lib/components/TimeSeries/index.d.ts +1 -0
  101. package/src/lib/components/TimeSeries/styles.d.ts +14 -0
  102. package/src/lib/components/TimeSeries/types.d.ts +34 -0
  103. package/src/lib/components/TimeSeries/utils.d.ts +22 -0
  104. package/src/lib/components/TimeSeries/utils.spec.d.ts +1 -0
  105. package/src/lib/demo.stories.d.ts +5 -0
  106. package/src/lib/types.d.ts +207 -0
  107. package/src/lib/utils/DummyData.d.ts +367 -0
  108. package/src/lib/utils/defaultTimeRange.d.ts +4 -0
  109. package/src/lib/utils/fakedata.d.ts +21 -0
  110. package/src/lib/utils/i18n.d.ts +7 -0
  111. package/src/lib/utils/spaceweather-api/api.d.ts +16 -0
  112. package/src/lib/utils/spaceweather-api/fakeApi.d.ts +8 -0
  113. package/src/lib/utils/spaceweather-api/hooks.d.ts +38 -0
  114. package/src/lib/utils/storybookUtils.d.ts +2 -0
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@opengeoweb/space-weather",
3
+ "version": "13.0.0",
4
+ "description": "GeoWeb Spaceweather library for the opengeoweb project",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
+ },
10
+ "dependencies": {
11
+ "@opengeoweb/api": "13.0.0",
12
+ "@opengeoweb/shared": "13.0.0",
13
+ "@opengeoweb/theme": "13.0.0",
14
+ "react-hook-form": "^7.50.1",
15
+ "@opengeoweb/form-fields": "13.0.0",
16
+ "echarts-for-react": "^3.0.2",
17
+ "echarts": "^5.4.3",
18
+ "lodash": "^4.17.21",
19
+ "i18next": "^25.0.1",
20
+ "react-i18next": "^15.1.1",
21
+ "@mui/material": "^7.0.1",
22
+ "@mui/system": "^7.3.2",
23
+ "@tanstack/react-query": "^5.85.5",
24
+ "@opengeoweb/authentication": "13.0.0"
25
+ },
26
+ "peerDependencies": {
27
+ "react": "18",
28
+ "@emotion/react": "*",
29
+ "@emotion/styled": "*"
30
+ },
31
+ "devDependencies": {
32
+ "eslint-plugin-storybook": "9.0.17"
33
+ },
34
+ "module": "./index.esm.js",
35
+ "type": "module",
36
+ "main": "./index.esm.js",
37
+ "types": "./index.d.ts"
38
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import swTranslations from '../locales/spaceweather.json';
2
+ export { Bulletin } from './lib/components/Bulletin';
3
+ export { Layout } from './lib/components/Layout';
4
+ export { Notifications } from './lib/components/Notifications';
5
+ export { NotificationTrigger, NotificationTriggerProvider, useNotificationTriggerContext, } from './lib/components/NotificationTrigger';
6
+ export { TimeSeries } from './lib/components/TimeSeries';
7
+ export { SPACE_WEATHER_NAMESPACE } from './lib/utils/i18n';
8
+ export { swTranslations };
9
+ export { requestHandlers as spaceweatherEndPoints } from './lib/utils/spaceweather-api/fakeApi';
10
+ export * from './lib/components/ComponentsLookUp';
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Bulletin
4
+ * View the latest bulletin from Met Office, and access the history list
5
+ *
6
+ * @example
7
+ * ``` <Bulletin /> ```
8
+ */
9
+ declare const BulletinComponent: React.FC;
10
+ export default BulletinComponent;
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { Bulletin } from '.';
3
+ declare const meta: Meta<typeof Bulletin>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Bulletin>;
6
+ export declare const Component: Story;
7
+ export declare const BulletinStoryNoIncomingLast24h: Story;
8
+ export declare const BulletinDarkStoryNoIncomingLast24h: Story;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { Bulletin } from '.';
3
+ declare const meta: Meta<typeof Bulletin>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Bulletin>;
6
+ export declare const Component: Story;
7
+ export declare const BulletinStory: Story;
8
+ export declare const BulletinDarkStory: Story;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ interface BulletinControlsProps {
3
+ onOpenBulletinHistory?: () => void;
4
+ }
5
+ export declare const BulletinControls: React.FC<BulletinControlsProps>;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ interface BulletinHistoryDialogProps {
3
+ open: boolean;
4
+ toggleStatus: () => void;
5
+ }
6
+ declare const BulletinHistoryDialog: React.FC<BulletinHistoryDialogProps>;
7
+ export default BulletinHistoryDialog;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import BulletinHistoryDialog from './BulletinHistoryDialog';
3
+ declare const meta: Meta<typeof BulletinHistoryDialog>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof BulletinHistoryDialog>;
6
+ export declare const BulletinHistoryStory: Story;
7
+ export declare const BulletinHistoryDarkStory: Story;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { Bulletin } from '../../types';
3
+ export interface BulletinHistoryListProps {
4
+ selectedBulletin: string;
5
+ bulletinHistoryList: Bulletin[];
6
+ onSelectBulletin: (bulletin: string) => void;
7
+ }
8
+ export declare const BulletinHistoryList: React.FC<BulletinHistoryListProps>;
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ export declare enum BulletinType {
3
+ technical = "TECHNICAL",
4
+ plain = "PLAIN"
5
+ }
6
+ interface BulletinTabsProps {
7
+ selected: BulletinType;
8
+ onSetBulletinType: (bulletinType: BulletinType) => void;
9
+ }
10
+ export declare const BulletinTabs: React.FC<BulletinTabsProps>;
11
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { Bulletin, BulletinType } from '../../types';
3
+ export interface BulletinViewerProps {
4
+ bulletinType: BulletinType;
5
+ smallContent?: boolean;
6
+ bulletin: Bulletin;
7
+ }
8
+ export declare const BulletinViewer: React.FC<BulletinViewerProps>;
@@ -0,0 +1,4 @@
1
+ export { default as Bulletin } from './Bulletin';
2
+ export { BulletinControls } from './BulletinControls';
3
+ export { BulletinViewer } from './BulletinViewer';
4
+ export { BulletinTabs } from './BulletinTabs';
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { ApiModule, ApiUrls } from '@opengeoweb/api';
3
+ type SpaceweatherComponentType = 'SpaceweatherModule';
4
+ export interface ComponentsLookUpPayload {
5
+ componentType: SpaceweatherComponentType;
6
+ id: string;
7
+ title?: string;
8
+ initialProps: Record<string, never>;
9
+ }
10
+ export interface ApiModuleProps extends ApiModule {
11
+ config: ApiUrls;
12
+ }
13
+ export declare const SpaceweatherWrapper: React.FC;
14
+ export declare const componentsLookUp: (payload: ComponentsLookUpPayload) => React.ReactElement;
15
+ export {};
@@ -0,0 +1 @@
1
+ export * from './ComponentsLookUp';
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { DialogProps } from '@mui/material';
3
+ interface ContentDialogProps extends DialogProps {
4
+ open: boolean;
5
+ toggleStatus: () => void;
6
+ title: string;
7
+ children?: React.ReactNode;
8
+ alertBanner?: React.ReactNode;
9
+ onClose?: () => void;
10
+ }
11
+ declare const ContentDialog: React.FC<ContentDialogProps>;
12
+ export default ContentDialog;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ tags: string[];
5
+ };
6
+ export default _default;
7
+ export declare const ContentDialogDemo: () => React.ReactElement;
8
+ export declare const OpenDialogDemo: () => React.ReactElement;
9
+ export declare const DialogWithNotificationAndError: {
10
+ (): React.ReactElement;
11
+ tags: string[];
12
+ };
@@ -0,0 +1 @@
1
+ export { default as ContentDialog } from './ContentDialog';
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ interface LayoutProps {
3
+ leftTop: React.ReactNode;
4
+ leftBottom: React.ReactNode;
5
+ right: React.ReactNode;
6
+ }
7
+ /**
8
+ * Layout
9
+ * Creates a grid with one component at the top, two on the left and one on the right.
10
+ * IMPORTANT: WHEN USING THIS COMPONENT PLEASE WRAP INSIDE OF <NotificationTriggerProvider/>
11
+ * @param {ReactNode} leftTop leftTop: ReactNode - React component to show on the left top
12
+ * @param {ReactNode} leftBottom leftBottom: ReactNode - React component to show on the left bottom
13
+ * @param {ReactNode} right right: ReactNode - React component to show on the right
14
+ * @example
15
+ * ``` <Layout leftTop={<Bulletin />} leftBottom={<Notifications />} right={<TimeSeries />} /> ```
16
+ */
17
+ declare const Layout: React.FC<LayoutProps>;
18
+ export default Layout;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { default as Layout } from './Layout';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface CategoryLabelProps {
3
+ statusTagText: string;
4
+ setStatusTagText: React.Dispatch<React.SetStateAction<string>>;
5
+ }
6
+ declare const CategoryLabelStatusTag: React.FC<CategoryLabelProps>;
7
+ export default CategoryLabelStatusTag;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface DataSourceStatustagProps {
3
+ statusTagText: string;
4
+ eventTypeDisabled: boolean;
5
+ }
6
+ declare const DataSourceStatustag: React.FC<DataSourceStatustagProps>;
7
+ export default DataSourceStatustag;
@@ -0,0 +1,15 @@
1
+ export declare const styles: {
2
+ inputField: {
3
+ width: number;
4
+ marginTop: string;
5
+ marginBottom: string;
6
+ };
7
+ inputFieldLongLabel: {
8
+ width: number;
9
+ marginTop: string;
10
+ marginBottom: string;
11
+ };
12
+ hide: {
13
+ opacity: number;
14
+ };
15
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const EventLevel: React.FC;
3
+ export default EventLevel;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface GScaleStatusTagProps {
3
+ statusTagText: string;
4
+ actionMode: string;
5
+ eventTypeDisabled: boolean;
6
+ }
7
+ declare const GScaleStatusTag: React.FC<GScaleStatusTagProps>;
8
+ export default GScaleStatusTag;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const PeakFlux: React.FC;
3
+ export default PeakFlux;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { TFunction } from 'i18next';
3
+ export declare const isInFuture: (t: TFunction, ownDate: string, isAllowed: boolean) => boolean | string;
4
+ export declare const isAfterStart: (t: TFunction, ownDate: string, otherDate: string) => boolean | string;
5
+ export declare const isEndDateRequired: (t: TFunction, ownValue: string, label: string, actionMode?: string) => boolean | string;
6
+ interface StartTimeEndTimeProps {
7
+ actionMode: string;
8
+ }
9
+ declare const StartTimeEndTime: React.FC<StartTimeEndTimeProps>;
10
+ export default StartTimeEndTime;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SuddenImpulse: React.FC;
3
+ export default SuddenImpulse;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface ThresholdProps {
3
+ hasEventLevel: boolean;
4
+ hasThresholdUnit: boolean;
5
+ }
6
+ declare const Threshold: React.FC<ThresholdProps>;
7
+ export default Threshold;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { TFunction } from 'i18next';
3
+ export declare const isValidPeakClass: (t: TFunction, value: string) => boolean | string;
4
+ interface XrayClassPeakClassProps {
5
+ actionMode: string;
6
+ }
7
+ declare const XrayClassPeakClass: React.FC<XrayClassPeakClassProps>;
8
+ export default XrayClassPeakClass;
@@ -0,0 +1,9 @@
1
+ export { default as CategoryLabelStatusTag } from './CategoryLabelStatusTag';
2
+ export { default as PeakFlux } from './PeakFlux';
3
+ export { default as StartTimeEndTime } from './StartTimeEndTime';
4
+ export { default as XrayClassPeakClass } from './XrayClassPeakClass';
5
+ export { default as Threshold } from './Threshold';
6
+ export { default as EventLevel } from './EventLevel';
7
+ export { default as SuddenImpulse } from './SuddenImpulse';
8
+ export { default as DataSourceStatusTag } from './DataSourceStatusTag';
9
+ export { default as GScaleStatusTag } from './GScaleStatusTag';
@@ -0,0 +1,5 @@
1
+ import { FieldValues } from 'react-hook-form';
2
+ import { TFunction } from 'i18next';
3
+ export declare const isCategoryDetailRequired: (t: TFunction, value: string, category: string) => boolean | string;
4
+ export declare const isRecentPast: (t: TFunction, ownDate: string) => boolean | string;
5
+ export declare const isInPastOrFutureAllowed: (t: TFunction, ownDate: string, isFutureAllowed?: boolean | FieldValues) => boolean | string;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { SWEvent } from '../../types';
3
+ interface FormWrapperProps {
4
+ baseNotificationData?: SWEvent;
5
+ baseNotificationType: string;
6
+ children: React.ReactNode;
7
+ }
8
+ declare const FormWrapper: React.FC<FormWrapperProps>;
9
+ export default FormWrapper;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ interface LifeCycleActionsProps {
3
+ actions: string[];
4
+ onAction: (actionType: string) => void;
5
+ }
6
+ declare const LifeCycleActions: React.FC<LifeCycleActionsProps>;
7
+ export default LifeCycleActions;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { SWEventLifeCycle } from '../../types';
3
+ export interface LifeCycleColumnProps {
4
+ lifeCycle: SWEventLifeCycle;
5
+ categoryDetail: string;
6
+ type: string;
7
+ }
8
+ export declare const formatDateWithUTC: (value: string) => string | null | undefined;
9
+ declare const LifeCycleColumn: React.FC<LifeCycleColumnProps>;
10
+ export default LifeCycleColumn;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { TFunction } from 'i18next';
3
+ import { SWEvent } from '../../types';
4
+ export declare const getDialogTitle: (t: TFunction, dialogMode: string, event: SWEvent) => string;
5
+ export interface LifeCycleDialogProps {
6
+ open: boolean;
7
+ toggleStatus: () => void;
8
+ dialogMode?: string;
9
+ event?: SWEvent;
10
+ }
11
+ declare const LifeCycleDialog: React.FC<LifeCycleDialogProps>;
12
+ export default LifeCycleDialog;
@@ -0,0 +1,34 @@
1
+ import * as React from 'react';
2
+ import { Meta, StoryObj } from '@storybook/react/*';
3
+ import LifeCycleDialog from './LifeCycleDialog';
4
+ declare const meta: Meta<typeof LifeCycleDialog>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof LifeCycleDialog>;
7
+ export declare const NewNotification: Story;
8
+ export declare const MetOfficeRadioBlackoutEvent: Story;
9
+ export declare const MetOfficeSummarisedEvent: Story;
10
+ export declare const MetOfficeCancelledEvent: Story;
11
+ export declare const MetOfficeGeomagneticSuddenImpulseAlert: Story;
12
+ export declare const MetOfficeGeomagneticSuddenImpulseWarning: Story;
13
+ export declare const MetOfficeGeomagneticKpIndexAlert: Story;
14
+ export declare const KNMIGeomagneticKpIndexWarning: Story;
15
+ export declare const MetOfficeGeomagneticStormWatch: Story;
16
+ export declare const MetOfficeProtonFlux100AlertSummary: Story;
17
+ export declare const MetOfficeProtonFlux100Warning: Story;
18
+ export declare const MetOfficeProtonFlux10Warning: Story;
19
+ export declare const MetOfficeProtonFlux10AlertSummary: Story;
20
+ export declare const MetOfficeElectronFlux2AlertSummary: Story;
21
+ export declare const MetOfficeElectronFluenceWarning: () => React.ReactElement;
22
+ export declare const NewNotificationWithTrigger: () => React.ReactElement;
23
+ export declare const WithErrorOnSaveNewNotification: Story;
24
+ export declare const WithErrorOnSaveElectronFluenceWarning: Story;
25
+ export declare const NewNotificationGeomagneticSnap: {
26
+ (): React.ReactElement;
27
+ storyName: string;
28
+ tags: string[];
29
+ };
30
+ export declare const NewNotificationWithTriggerSnap: {
31
+ (): React.ReactElement;
32
+ storyName: string;
33
+ tags: string[];
34
+ };
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ export declare const getActionModeForDraft: (actionMode: string, label: string, changestateto: string) => string;
3
+ interface LifeCycleDisplayProps {
4
+ eventId: string;
5
+ toggleDialogOpen: () => void;
6
+ onFormChange?: (hasChanged: boolean) => void;
7
+ setErrorStoreMessage?: (value: string) => void;
8
+ setErrorRetrievePopulate?: (value: string) => void;
9
+ }
10
+ declare const LifeCycleDisplay: React.FC<LifeCycleDisplayProps>;
11
+ export default LifeCycleDisplay;
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import { SWEvent } from '../../types';
3
+ interface LifeCycleEditProps {
4
+ toggleDialogOpen: (formSaved?: boolean) => void;
5
+ statusTagContent?: string;
6
+ eventTypeDisabled?: boolean;
7
+ onFormChange?: (hasChanged: boolean) => void;
8
+ actionMode?: string;
9
+ baseNotificationType: string;
10
+ setErrorStoreMessage?: (value: string) => void;
11
+ setErrorRetrievePopulate?: (value: string) => void;
12
+ }
13
+ export declare const LifeCycleEditForm: React.FC<LifeCycleEditProps>;
14
+ export interface WrapperProps extends LifeCycleEditProps {
15
+ baseNotificationData?: SWEvent;
16
+ baseNotificationType: string;
17
+ }
18
+ declare const LifeCycleEdit: React.FC<WrapperProps>;
19
+ export default LifeCycleEdit;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ interface LifeCycleEditOptionsProps {
3
+ statusTagContent: string;
4
+ eventTypeDisabled?: boolean;
5
+ actionMode?: string;
6
+ }
7
+ declare const LifeCycleEditOptions: React.FC<LifeCycleEditOptionsProps>;
8
+ export default LifeCycleEditOptions;
@@ -0,0 +1,5 @@
1
+ export { default as LifeCycleDialog } from './LifeCycleDialog';
2
+ export { default as LifeCycleEdit } from './LifeCycleEdit';
3
+ export { default as LifeCycleEditOptions } from './LifeCycleEditOptions';
4
+ export { default as LifeCycleColumn } from './LifeCycleColumn';
5
+ export { default as LifeCycleDisplay } from './LifeCycleDisplay';
@@ -0,0 +1,10 @@
1
+ import { SWNotification, SWEvent } from '../../types';
2
+ export declare const formatDate: (date: string) => string | undefined;
3
+ export declare const getLatestNotification: (event: SWEvent) => SWNotification;
4
+ export declare const constructBaseNotification: (event: SWEvent | null, mode?: string) => SWNotification;
5
+ export declare const constructOutgoingNotification: (_notification: SWNotification, newState: string, draft?: boolean) => SWNotification;
6
+ export interface ConstructRepopulateNotificationType extends SWNotification {
7
+ IS_POPULATE_REQUEST: boolean;
8
+ }
9
+ export declare const constructRepopulateNotification: (_notification: ConstructRepopulateNotificationType, actionMode?: string) => SWNotification;
10
+ export declare const getNewInternalStatusTagContent: (actionMode: string, label: string, categorydetail?: string) => string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ export declare const NotificationTrigger: React.FC;
3
+ export default NotificationTrigger;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const DummyNewNotificationTriggerAlert: () => React.ReactElement;
7
+ export declare const SpaceweatherWithNotificationDemo: () => React.ReactElement;
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { SWEvent } from '../../types';
3
+ declare const NotificationTriggerContext: React.Context<NotificationContextState>;
4
+ interface NotificationContextState {
5
+ notificationTriggers: SWEvent[];
6
+ error: Error | null;
7
+ onFetchNewNotificationTriggerData: () => void;
8
+ }
9
+ interface NotificationContextProps {
10
+ children: React.ReactNode;
11
+ }
12
+ export declare const NotificationTriggerProvider: React.FC<NotificationContextProps>;
13
+ export declare const useNotificationTriggerContext: () => Partial<NotificationContextState>;
14
+ export default NotificationTriggerContext;
@@ -0,0 +1,2 @@
1
+ export { default as NotificationTrigger } from './NotificationTrigger';
2
+ export { NotificationTriggerProvider, useNotificationTriggerContext, } from './NotificationTriggerContext';
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { SWEvent } from '../../types';
3
+ interface NotificationListProps {
4
+ tabValue: string;
5
+ newNotifications: SWEvent[];
6
+ eventList: SWEvent[] | null;
7
+ isLoading: boolean;
8
+ error: Error | null;
9
+ onChangeTabValue: (value: string) => void;
10
+ handleNotificatioNRowClick: (event: SWEvent) => void;
11
+ }
12
+ declare const NotificationList: React.FC<NotificationListProps>;
13
+ export default NotificationList;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { SWEvent } from '../../types';
3
+ interface NotificationRowProps {
4
+ event: SWEvent;
5
+ onNotificationRowClick: (event: SWEvent) => void;
6
+ }
7
+ declare const NotificationRow: React.FC<NotificationRowProps>;
8
+ export default NotificationRow;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ interface SizeWrapperProps {
3
+ children: React.ReactNode;
4
+ width?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
+ }
6
+ export declare const SizeWrapper: React.FC<SizeWrapperProps>;
7
+ export {};