@opengeoweb/space-weather 14.4.0 → 14.5.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 (53) hide show
  1. package/index.esm.js +6199 -5974
  2. package/package.json +6 -6
  3. package/src/lib/components/Bulletin/Bulletin.d.ts +1 -1
  4. package/src/lib/components/Bulletin/BulletinControls.d.ts +1 -1
  5. package/src/lib/components/Bulletin/BulletinHistoryDialog.d.ts +1 -1
  6. package/src/lib/components/Bulletin/BulletinHistoryList.d.ts +2 -2
  7. package/src/lib/components/Bulletin/BulletinTabs.d.ts +1 -1
  8. package/src/lib/components/Bulletin/BulletinViewer.d.ts +3 -2
  9. package/src/lib/components/ComponentsLookUp/ComponentsLookUp.d.ts +2 -2
  10. package/src/lib/components/ContentDialog/ContentDialog.d.ts +2 -2
  11. package/src/lib/components/ContentDialog/ContentDialog.stories.d.ts +1 -1
  12. package/src/lib/components/Layout/Layout.d.ts +1 -1
  13. package/src/lib/components/LifeCycleDialog/EditFormFields/StartTimeEndTime.d.ts +1 -1
  14. package/src/lib/components/LifeCycleDialog/EditFormFields/XrayClassPeakClass.d.ts +1 -1
  15. package/src/lib/components/LifeCycleDialog/EditFormFields/validations.d.ts +2 -2
  16. package/src/lib/components/LifeCycleDialog/FormWrapper.d.ts +2 -2
  17. package/src/lib/components/LifeCycleDialog/LifeCycleActions.d.ts +1 -1
  18. package/src/lib/components/LifeCycleDialog/LifeCycleColumn.d.ts +2 -2
  19. package/src/lib/components/LifeCycleDialog/LifeCycleDialog.d.ts +3 -3
  20. package/src/lib/components/LifeCycleDialog/LifeCycleDialog.stories.d.ts +2 -2
  21. package/src/lib/components/LifeCycleDialog/LifeCycleDisplay.d.ts +1 -1
  22. package/src/lib/components/LifeCycleDialog/LifeCycleEdit.d.ts +2 -2
  23. package/src/lib/components/LifeCycleDialog/LifeCycleEditOptions.d.ts +1 -1
  24. package/src/lib/components/LifeCycleDialog/utils.d.ts +1 -1
  25. package/src/lib/components/NotificationTrigger/NotificationTrigger.d.ts +1 -1
  26. package/src/lib/components/NotificationTrigger/NotificationTrigger.stories.d.ts +1 -1
  27. package/src/lib/components/NotificationTrigger/NotificationTriggerContext.d.ts +2 -2
  28. package/src/lib/components/Notifications/NotificationList.d.ts +2 -2
  29. package/src/lib/components/Notifications/NotificationRow.d.ts +2 -2
  30. package/src/lib/components/Notifications/NotificationRow.spec.d.ts +1 -1
  31. package/src/lib/components/Notifications/NotificationRow.stories.d.ts +2 -2
  32. package/src/lib/components/Notifications/NotificationTabs.d.ts +2 -2
  33. package/src/lib/components/Notifications/Notifications.d.ts +1 -1
  34. package/src/lib/components/Notifications/Notifications.stories.d.ts +2 -2
  35. package/src/lib/components/Providers/Providers.d.ts +1 -1
  36. package/src/lib/components/TimeSeries/GraphErrors.d.ts +2 -2
  37. package/src/lib/components/TimeSeries/Graphs.d.ts +2 -2
  38. package/src/lib/components/TimeSeries/Graphs.stories.d.ts +2 -2
  39. package/src/lib/components/TimeSeries/TimeSeries.d.ts +1 -1
  40. package/src/lib/components/TimeSeries/TimeSeries.stories.d.ts +1 -1
  41. package/src/lib/components/TimeSeries/TimeSeries.utils.d.ts +1 -1
  42. package/src/lib/components/TimeSeries/TimeSeriesHeader.d.ts +1 -1
  43. package/src/lib/components/TimeSeries/createChartSeriesData.d.ts +1 -1
  44. package/src/lib/components/TimeSeries/types.d.ts +1 -1
  45. package/src/lib/components/TimeSeries/utils.d.ts +2 -2
  46. package/src/lib/demo.stories.d.ts +2 -2
  47. package/src/lib/utils/DummyData.d.ts +1 -1
  48. package/src/lib/utils/fakedata.d.ts +1 -1
  49. package/src/lib/utils/i18n.d.ts +1 -1
  50. package/src/lib/utils/spaceweather-api/api.d.ts +2 -2
  51. package/src/lib/utils/spaceweather-api/fakeApi.d.ts +1 -1
  52. package/src/lib/utils/spaceweather-api/hooks.d.ts +3 -3
  53. package/src/lib/utils/storybookUtils.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/space-weather",
3
- "version": "14.4.0",
3
+ "version": "14.5.0",
4
4
  "description": "GeoWeb Spaceweather library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,11 +8,11 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/api": "14.4.0",
12
- "@opengeoweb/shared": "14.4.0",
13
- "@opengeoweb/theme": "14.4.0",
11
+ "@opengeoweb/api": "14.5.0",
12
+ "@opengeoweb/shared": "14.5.0",
13
+ "@opengeoweb/theme": "14.5.0",
14
14
  "react-hook-form": "^7.50.1",
15
- "@opengeoweb/form-fields": "14.4.0",
15
+ "@opengeoweb/form-fields": "14.5.0",
16
16
  "echarts-for-react": "^3.0.2",
17
17
  "echarts": "^5.4.3",
18
18
  "lodash": "^4.17.21",
@@ -21,7 +21,7 @@
21
21
  "@mui/material": "^7.0.1",
22
22
  "@mui/system": "^7.3.2",
23
23
  "@tanstack/react-query": "^5.85.5",
24
- "@opengeoweb/authentication": "14.4.0"
24
+ "@opengeoweb/authentication": "14.5.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": "18",
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  /**
3
3
  * Bulletin
4
4
  * View the latest bulletin from Met Office, and access the history list
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface BulletinControlsProps {
3
3
  onOpenBulletinHistory?: () => void;
4
4
  }
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface BulletinHistoryDialogProps {
3
3
  open: boolean;
4
4
  toggleStatus: () => void;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { Bulletin } from '../../types';
1
+ import React from 'react';
2
+ import type { Bulletin } from '../../types';
3
3
  export interface BulletinHistoryListProps {
4
4
  selectedBulletin: string;
5
5
  bulletinHistoryList: Bulletin[];
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export declare enum BulletinType {
3
3
  technical = "TECHNICAL",
4
4
  plain = "PLAIN"
@@ -1,5 +1,6 @@
1
- import * as React from 'react';
2
- import { Bulletin, BulletinType } from '../../types';
1
+ import React from 'react';
2
+ import type { Bulletin } from '../../types';
3
+ import { BulletinType } from '../../types';
3
4
  export interface BulletinViewerProps {
4
5
  bulletinType: BulletinType;
5
6
  smallContent?: boolean;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { ApiModule, ApiUrls } from '@opengeoweb/api';
1
+ import React from 'react';
2
+ import type { ApiModule, ApiUrls } from '@opengeoweb/api';
3
3
  type SpaceweatherComponentType = 'SpaceweatherModule';
4
4
  export interface ComponentsLookUpPayload {
5
5
  componentType: SpaceweatherComponentType;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { DialogProps } from '@mui/material';
1
+ import type { DialogProps } from '@mui/material';
2
+ import React from 'react';
3
3
  interface ContentDialogProps extends DialogProps {
4
4
  open: boolean;
5
5
  toggleStatus: () => void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  declare const _default: {
3
3
  title: string;
4
4
  tags: string[];
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface LayoutProps {
3
3
  leftTop: React.ReactNode;
4
4
  leftBottom: React.ReactNode;
@@ -1,5 +1,5 @@
1
+ import type { TFunction } from 'i18next';
1
2
  import React from 'react';
2
- import { TFunction } from 'i18next';
3
3
  export declare const isInFuture: (t: TFunction, ownDate: string, isAllowed: boolean) => boolean | string;
4
4
  export declare const isAfterStart: (t: TFunction, ownDate: string, otherDate: string) => boolean | string;
5
5
  export declare const isEndDateRequired: (t: TFunction, ownValue: string, label: string, actionMode?: string) => boolean | string;
@@ -1,5 +1,5 @@
1
+ import type { TFunction } from 'i18next';
1
2
  import React from 'react';
2
- import { TFunction } from 'i18next';
3
3
  export declare const isValidPeakClass: (t: TFunction, value: string) => boolean | string;
4
4
  interface XrayClassPeakClassProps {
5
5
  actionMode: string;
@@ -1,5 +1,5 @@
1
- import { FieldValues } from 'react-hook-form';
2
- import { TFunction } from 'i18next';
1
+ import type { TFunction } from 'i18next';
2
+ import type { FieldValues } from 'react-hook-form';
3
3
  export declare const isCategoryDetailRequired: (t: TFunction, value: string, category: string) => boolean | string;
4
4
  export declare const isRecentPast: (t: TFunction, ownDate: string) => boolean | string;
5
5
  export declare const isInPastOrFutureAllowed: (t: TFunction, ownDate: string, isFutureAllowed?: boolean | FieldValues) => boolean | string;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { SWEvent } from '../../types';
1
+ import React from 'react';
2
+ import type { SWEvent } from '../../types';
3
3
  interface FormWrapperProps {
4
4
  baseNotificationData?: SWEvent;
5
5
  baseNotificationType: string;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface LifeCycleActionsProps {
3
3
  actions: string[];
4
4
  onAction: (actionType: string) => void;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { SWEventLifeCycle } from '../../types';
1
+ import React from 'react';
2
+ import type { SWEventLifeCycle } from '../../types';
3
3
  export interface LifeCycleColumnProps {
4
4
  lifeCycle: SWEventLifeCycle;
5
5
  categoryDetail: string;
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
- import { TFunction } from 'i18next';
3
- import { SWEvent } from '../../types';
1
+ import type { TFunction } from 'i18next';
2
+ import React from 'react';
3
+ import type { SWEvent } from '../../types';
4
4
  export declare const getDialogTitle: (t: TFunction, dialogMode: string, event: SWEvent) => string;
5
5
  export interface LifeCycleDialogProps {
6
6
  open: boolean;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { Meta, StoryObj } from '@storybook/react/*';
1
+ import type { Meta, StoryObj } from '@storybook/react/*';
2
+ import React from 'react';
3
3
  import LifeCycleDialog from './LifeCycleDialog';
4
4
  declare const meta: Meta<typeof LifeCycleDialog>;
5
5
  export default meta;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export declare const getActionModeForDraft: (actionMode: string, label: string, changestateto: string) => string;
3
3
  interface LifeCycleDisplayProps {
4
4
  eventId: string;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { SWEvent } from '../../types';
1
+ import React from 'react';
2
+ import type { SWEvent } from '../../types';
3
3
  interface LifeCycleEditProps {
4
4
  toggleDialogOpen: (formSaved?: boolean) => void;
5
5
  statusTagContent?: string;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface LifeCycleEditOptionsProps {
3
3
  statusTagContent: string;
4
4
  eventTypeDisabled?: boolean;
@@ -1,4 +1,4 @@
1
- import { SWNotification, SWEvent } from '../../types';
1
+ import type { SWNotification, SWEvent } from '../../types';
2
2
  export declare const formatDate: (date: string) => string | undefined;
3
3
  export declare const getLatestNotification: (event: SWEvent) => SWNotification;
4
4
  export declare const constructBaseNotification: (event: SWEvent | null, mode?: string) => SWNotification;
@@ -1,3 +1,3 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export declare const NotificationTrigger: React.FC;
3
3
  export default NotificationTrigger;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  declare const _default: {
3
3
  title: string;
4
4
  };
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { SWEvent } from '../../types';
1
+ import React from 'react';
2
+ import type { SWEvent } from '../../types';
3
3
  declare const NotificationTriggerContext: React.Context<NotificationContextState>;
4
4
  interface NotificationContextState {
5
5
  notificationTriggers: SWEvent[];
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { SWEvent } from '../../types';
1
+ import React from 'react';
2
+ import type { SWEvent } from '../../types';
3
3
  interface NotificationListProps {
4
4
  tabValue: string;
5
5
  newNotifications: SWEvent[];
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { SWEvent } from '../../types';
1
+ import React from 'react';
2
+ import type { SWEvent } from '../../types';
3
3
  interface NotificationRowProps {
4
4
  event: SWEvent;
5
5
  onNotificationRowClick: (event: SWEvent) => void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface SizeWrapperProps {
3
3
  children: React.ReactNode;
4
4
  width?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { Meta, StoryObj } from '@storybook/react/*';
1
+ import type { Meta, StoryObj } from '@storybook/react/*';
2
+ import React from 'react';
3
3
  import NotificationRow from './NotificationRow';
4
4
  declare const meta: Meta<typeof NotificationRow>;
5
5
  export default meta;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { SWEvent } from '../../types';
1
+ import React from 'react';
2
+ import type { SWEvent } from '../../types';
3
3
  interface NotificationTabsProps {
4
4
  activeTab: string;
5
5
  newNotifications: SWEvent[];
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  /**
3
3
  * Notifications
4
4
  * View incoming notifications and issue new notifications following the notification lifecycle
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { Meta, StoryObj } from '@storybook/react/*';
1
+ import type { Meta, StoryObj } from '@storybook/react/*';
2
+ import React from 'react';
3
3
  import Notifications from './Notifications';
4
4
  declare const meta: Meta<typeof Notifications>;
5
5
  export default meta;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { ThemeProviderProps } from '@opengeoweb/theme';
2
+ import type { ThemeProviderProps } from '@opengeoweb/theme';
3
3
  export declare const SpaceWeatherThemeWrapper: React.FC<ThemeProviderProps>;
4
4
  export declare const SpaceWeatherStoreWrapper: React.FC<ThemeProviderProps>;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { Parameters } from '../../types';
1
+ import React from 'react';
2
+ import type { Parameters } from '../../types';
3
3
  interface GraphErrorsProps {
4
4
  data: {
5
5
  parameters: (Parameters | undefined)[];
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { GraphItem } from './types';
1
+ import React from 'react';
2
+ import type { GraphItem } from './types';
3
3
  interface GraphsProps {
4
4
  data: GraphItem[];
5
5
  beginTime: Date;
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { Meta, StoryObj } from '@storybook/react/*';
1
+ import type { Meta, StoryObj } from '@storybook/react/*';
2
+ import React from 'react';
3
3
  import { Graphs } from './Graphs';
4
4
  declare const meta: Meta<typeof Graphs>;
5
5
  export default meta;
@@ -1,3 +1,3 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  declare const TimeSeries: React.FC;
3
3
  export default TimeSeries;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react/*';
1
+ import type { Meta, StoryObj } from '@storybook/react/*';
2
2
  import TimeSeries from './TimeSeries';
3
3
  declare const meta: Meta<typeof TimeSeries>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { StreamResponse } from '../../types';
1
+ import type { StreamResponse } from '../../types';
2
2
  export declare const createStreamDict: (streams: StreamResponse[]) => Record<string, StreamResponse>;
3
3
  export declare const useUserSleeping: (delay?: number) => [boolean, () => void];
4
4
  export declare const getGraphHeightInPx: () => number;
@@ -1,3 +1,3 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export declare const TimeSeriesHeader: React.FC<Record<string, unknown>>;
3
3
  export default TimeSeriesHeader;
@@ -1,4 +1,4 @@
1
- import { ChartResponseType, IncomingData, Dataset } from './types';
1
+ import type { ChartResponseType, IncomingData, Dataset } from './types';
2
2
  export declare const createDataset: (data: IncomingData["data"]) => Dataset;
3
3
  export declare const createSeries: (response: ChartResponseType[]) => Dataset[];
4
4
  export declare const mirrorSeries: (dataset: Dataset) => Dataset;
@@ -1,4 +1,4 @@
1
- import { TimeseriesParams } from '../../types';
1
+ import type { TimeseriesParams } from '../../types';
2
2
  export type Dataset = (string | number | undefined)[][];
3
3
  export type IncomingData = ChartResponseType['data'];
4
4
  type GraphType = 'BAR' | 'BAND' | 'LOG' | 'AREA';
@@ -1,5 +1,5 @@
1
- import { GridComponentOption, XAXisComponentOption, SeriesOption, YAXisComponentOption, DefaultLabelFormatterCallbackParams, TooltipComponentOption } from 'echarts';
2
- import { GraphItem } from './types';
1
+ import type { GridComponentOption, XAXisComponentOption, SeriesOption, YAXisComponentOption, DefaultLabelFormatterCallbackParams, TooltipComponentOption } from 'echarts';
2
+ import type { GraphItem } from './types';
3
3
  export declare const dateFormat = "MM-dd HH:mm";
4
4
  export declare const TITLE_KP_FORECAST = "Kp Index Forecast";
5
5
  export declare const TITLE_XRAY = "X-ray Solar Flux (W/m\u00B2)";
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { Meta } from '@storybook/react/*';
1
+ import type { Meta } from '@storybook/react/*';
2
+ import React from 'react';
3
3
  declare const meta: Meta;
4
4
  export default meta;
5
5
  export declare const SpaceWeatherDemo: () => React.ReactElement;
@@ -1,4 +1,4 @@
1
- import { GraphItem } from '../components/TimeSeries/types';
1
+ import type { GraphItem } from '../components/TimeSeries/types';
2
2
  export declare const solarWindSpeedDummyData: {
3
3
  parameter: string;
4
4
  stream: string;
@@ -1,4 +1,4 @@
1
- import { Bulletin, SWEvent } from '../types';
1
+ import type { Bulletin, SWEvent } from '../types';
2
2
  export declare const fakeEventList: SWEvent[];
3
3
  export declare const fakeEventListFixedDates: SWEvent[];
4
4
  export declare const fakeBulletins: Bulletin[];
@@ -1,5 +1,5 @@
1
1
  import i18n from 'i18next';
2
- import { UseTranslationResponse } from 'react-i18next';
2
+ import type { UseTranslationResponse } from 'react-i18next';
3
3
  export declare const SPACE_WEATHER_NAMESPACE = "spaceweather";
4
4
  export declare const initSpaceweatherI18n: () => void;
5
5
  export declare const translateInTestsAndStories: (key: string, params?: Record<string, string | number> | undefined) => string;
@@ -1,5 +1,5 @@
1
- import { Credentials } from '@opengeoweb/authentication';
2
- import { Bulletin, DiscardDraftNotification, EventCategoryParams, StreamResponse, SWEvent, SWNotification, TimeseriesParams, TimeseriesResponseData } from '../../types';
1
+ import type { Credentials } from '@opengeoweb/authentication';
2
+ import type { Bulletin, DiscardDraftNotification, EventCategoryParams, StreamResponse, SWEvent, SWNotification, TimeseriesParams, TimeseriesResponseData } from '../../types';
3
3
  export declare const getBulletinHistoryList: (auth: Credentials) => Promise<Bulletin[]>;
4
4
  export declare const getBulletin: (auth: Credentials) => Promise<Bulletin>;
5
5
  export declare const getEventList: (auth: Credentials, params: EventCategoryParams) => Promise<SWEvent[]>;
@@ -1,4 +1,4 @@
1
- import { TimeseriesResponseData } from '../../types';
1
+ import type { TimeseriesResponseData } from '../../types';
2
2
  export declare const MOCK_USERNAME = "user.name";
3
3
  export declare const getDummyTimeSerie: (stream: string, parameter: string) => TimeseriesResponseData;
4
4
  export declare const bulletinEndpoints: import("msw").HttpHandler[];
@@ -1,6 +1,6 @@
1
- import { UseMutationResult, UseQueryResult } from '@tanstack/react-query';
2
- import { FieldValues, UseFormSetValue } from 'react-hook-form';
3
- import { Bulletin, DiscardDraftNotification, EventCategoryParams, StreamResponse, SWEvent, SWNotification, TimeseriesParams, TimeseriesResponseData } from '../../types';
1
+ import type { UseMutationResult, UseQueryResult } from '@tanstack/react-query';
2
+ import type { FieldValues, UseFormSetValue } from 'react-hook-form';
3
+ import type { Bulletin, DiscardDraftNotification, EventCategoryParams, StreamResponse, SWEvent, SWNotification, TimeseriesParams, TimeseriesResponseData } from '../../types';
4
4
  export declare const useBulletin: () => UseQueryResult<Bulletin>;
5
5
  export declare const useBulletinHistory: () => UseQueryResult<Bulletin[]>;
6
6
  export declare const useEventList: (params: EventCategoryParams) => UseQueryResult<SWEvent[]>;
@@ -1,2 +1,2 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export declare const ToggleThemeButton: React.FC;