@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.
- package/README.md +43 -0
- package/index.d.ts +1 -0
- package/index.esm.js +8391 -0
- package/package.json +38 -0
- package/src/index.d.ts +10 -0
- package/src/lib/components/Bulletin/Bulletin.d.ts +10 -0
- package/src/lib/components/Bulletin/Bulletin.noNewBulletins.stories.d.ts +8 -0
- package/src/lib/components/Bulletin/Bulletin.spec.d.ts +1 -0
- package/src/lib/components/Bulletin/Bulletin.stories.d.ts +8 -0
- package/src/lib/components/Bulletin/BulletinControls.d.ts +6 -0
- package/src/lib/components/Bulletin/BulletinControls.spec.d.ts +1 -0
- package/src/lib/components/Bulletin/BulletinHistoryDialog.d.ts +7 -0
- package/src/lib/components/Bulletin/BulletinHistoryDialog.spec.d.ts +1 -0
- package/src/lib/components/Bulletin/BulletinHistoryDialog.stories.d.ts +7 -0
- package/src/lib/components/Bulletin/BulletinHistoryList.d.ts +8 -0
- package/src/lib/components/Bulletin/BulletinHistoryList.spec.d.ts +1 -0
- package/src/lib/components/Bulletin/BulletinTabs.d.ts +11 -0
- package/src/lib/components/Bulletin/BulletinTabs.spec.d.ts +1 -0
- package/src/lib/components/Bulletin/BulletinViewer.d.ts +8 -0
- package/src/lib/components/Bulletin/BulletinViewer.spec.d.ts +1 -0
- package/src/lib/components/Bulletin/index.d.ts +4 -0
- package/src/lib/components/ComponentsLookUp/ComponentsLookUp.d.ts +15 -0
- package/src/lib/components/ComponentsLookUp/ComponentsLookUp.spec.d.ts +1 -0
- package/src/lib/components/ComponentsLookUp/index.d.ts +1 -0
- package/src/lib/components/ContentDialog/ContentDialog.d.ts +12 -0
- package/src/lib/components/ContentDialog/ContentDialog.spec.d.ts +1 -0
- package/src/lib/components/ContentDialog/ContentDialog.stories.d.ts +12 -0
- package/src/lib/components/ContentDialog/index.d.ts +1 -0
- package/src/lib/components/Layout/Layout.d.ts +18 -0
- package/src/lib/components/Layout/Layout.spec.d.ts +1 -0
- package/src/lib/components/Layout/index.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/CategoryLabelStatusTag.d.ts +7 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/DataSourceStatusTag.d.ts +7 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/EditFormFields.styles.d.ts +15 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/EventLevel.d.ts +3 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/GScaleStatusTag.d.ts +8 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/PeakFlux.d.ts +3 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/PeakFlux.spec.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/StartTimeEndTime.d.ts +10 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/StartTimeEndTime.spec.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/SuddenImpulse.d.ts +3 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/SuddenImpulse.spec.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/Threshold.d.ts +7 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/XrayClassPeakClass.d.ts +8 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/XrayClassPeakClass.spec.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/index.d.ts +9 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/validations.d.ts +5 -0
- package/src/lib/components/LifeCycleDialog/EditFormFields/validations.spec.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/FormWrapper.d.ts +9 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleActions.d.ts +7 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleActions.spec.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleColumn.d.ts +10 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleColumn.spec.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleDialog.d.ts +12 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleDialog.spec.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleDialog.stories.d.ts +34 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleDisplay.d.ts +11 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleDisplay.spec.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleEdit.d.ts +19 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleEdit.spec.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleEdit.unregister.spec.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleEditOptions.d.ts +8 -0
- package/src/lib/components/LifeCycleDialog/LifeCycleEditOptions.spec.d.ts +1 -0
- package/src/lib/components/LifeCycleDialog/index.d.ts +5 -0
- package/src/lib/components/LifeCycleDialog/utils.d.ts +10 -0
- package/src/lib/components/LifeCycleDialog/utils.spec.d.ts +1 -0
- package/src/lib/components/NotificationTrigger/NotificationTrigger.d.ts +3 -0
- package/src/lib/components/NotificationTrigger/NotificationTrigger.spec.d.ts +1 -0
- package/src/lib/components/NotificationTrigger/NotificationTrigger.stories.d.ts +7 -0
- package/src/lib/components/NotificationTrigger/NotificationTriggerContext.d.ts +14 -0
- package/src/lib/components/NotificationTrigger/NotificationTriggerContext.spec.d.ts +1 -0
- package/src/lib/components/NotificationTrigger/index.d.ts +2 -0
- package/src/lib/components/Notifications/NotificationList.d.ts +13 -0
- package/src/lib/components/Notifications/NotificationList.spec.d.ts +1 -0
- package/src/lib/components/Notifications/NotificationRow.d.ts +8 -0
- package/src/lib/components/Notifications/NotificationRow.spec.d.ts +7 -0
- package/src/lib/components/Notifications/NotificationRow.stories.d.ts +8 -0
- package/src/lib/components/Notifications/NotificationTabs.d.ts +9 -0
- package/src/lib/components/Notifications/NotificationTabs.spec.d.ts +1 -0
- package/src/lib/components/Notifications/Notifications.d.ts +10 -0
- package/src/lib/components/Notifications/Notifications.spec.d.ts +1 -0
- package/src/lib/components/Notifications/Notifications.stories.d.ts +15 -0
- package/src/lib/components/Notifications/index.d.ts +3 -0
- package/src/lib/components/Notifications/utils.d.ts +2 -0
- package/src/lib/components/Notifications/utils.spec.d.ts +1 -0
- package/src/lib/components/Providers/Providers.d.ts +4 -0
- package/src/lib/components/Providers/index.d.ts +1 -0
- package/src/lib/components/TimeSeries/GraphErrors.d.ts +12 -0
- package/src/lib/components/TimeSeries/Graphs.d.ts +12 -0
- package/src/lib/components/TimeSeries/Graphs.spec.d.ts +1 -0
- package/src/lib/components/TimeSeries/Graphs.stories.d.ts +10 -0
- package/src/lib/components/TimeSeries/TimeSeries.d.ts +3 -0
- package/src/lib/components/TimeSeries/TimeSeries.spec.d.ts +1 -0
- package/src/lib/components/TimeSeries/TimeSeries.stories.d.ts +9 -0
- package/src/lib/components/TimeSeries/TimeSeries.utils.d.ts +4 -0
- package/src/lib/components/TimeSeries/TimeSeries.utils.spec.d.ts +1 -0
- package/src/lib/components/TimeSeries/TimeSeriesHeader.d.ts +3 -0
- package/src/lib/components/TimeSeries/createChartSeriesData.d.ts +4 -0
- package/src/lib/components/TimeSeries/createChartSeriesData.spec.d.ts +1 -0
- package/src/lib/components/TimeSeries/index.d.ts +1 -0
- package/src/lib/components/TimeSeries/styles.d.ts +14 -0
- package/src/lib/components/TimeSeries/types.d.ts +34 -0
- package/src/lib/components/TimeSeries/utils.d.ts +22 -0
- package/src/lib/components/TimeSeries/utils.spec.d.ts +1 -0
- package/src/lib/demo.stories.d.ts +5 -0
- package/src/lib/types.d.ts +207 -0
- package/src/lib/utils/DummyData.d.ts +367 -0
- package/src/lib/utils/defaultTimeRange.d.ts +4 -0
- package/src/lib/utils/fakedata.d.ts +21 -0
- package/src/lib/utils/i18n.d.ts +7 -0
- package/src/lib/utils/spaceweather-api/api.d.ts +16 -0
- package/src/lib/utils/spaceweather-api/fakeApi.d.ts +8 -0
- package/src/lib/utils/spaceweather-api/hooks.d.ts +38 -0
- 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,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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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;
|