@opengeoweb/taf 14.3.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.
- package/index.esm.js +3101 -2786
- package/package.json +7 -7
- package/src/lib/components/AutoTaf/AutoTaf.d.ts +1 -1
- package/src/lib/components/ComponentsLookUp/ComponentsLookUp.d.ts +2 -2
- package/src/lib/components/IssuesPane/IssuesButton.d.ts +3 -3
- package/src/lib/components/IssuesPane/IssuesPane.d.ts +2 -2
- package/src/lib/components/IssuesPane/IssuesPaneWrapper.d.ts +2 -2
- package/src/lib/components/IssuesPane/types.d.ts +1 -1
- package/src/lib/components/IssuesPane/utils.d.ts +3 -3
- package/src/lib/components/Providers/Providers.d.ts +4 -4
- package/src/lib/components/ResponsiveWrapper/ResponsiveWrapper.d.ts +2 -2
- package/src/lib/components/Spinner/Spinner.d.ts +1 -1
- package/src/lib/components/Spinner/Spinner.stories.d.ts +1 -1
- package/src/lib/components/StatusIcon/StatusIcon.d.ts +2 -2
- package/src/lib/components/TabPanel/TabPanel.d.ts +1 -1
- package/src/lib/components/TafAvatar/TafAvatar.d.ts +2 -2
- package/src/lib/components/TafForm/TafForm.d.ts +2 -2
- package/src/lib/components/TafForm/TafForm.stories.d.ts +2 -2
- package/src/lib/components/TafForm/TafFormButtons/TafFormButtons.d.ts +1 -1
- package/src/lib/components/TafForm/TafFormButtons/TafFormOptionsButton.d.ts +1 -1
- package/src/lib/components/TafForm/TafFormRow/TafFormRow.d.ts +1 -1
- package/src/lib/components/TafForm/TafFormRow/TafFormTextField.d.ts +2 -2
- package/src/lib/components/TafForm/TafFormRow/types.d.ts +2 -2
- package/src/lib/components/TafForm/TafFormRow/validations/clouds.d.ts +1 -1
- package/src/lib/components/TafForm/TafFormRow/validations/validField.d.ts +1 -1
- package/src/lib/components/TafForm/TafFormRow/validations/visibility.d.ts +1 -1
- package/src/lib/components/TafForm/TafFormRow/validations/weather.d.ts +1 -1
- package/src/lib/components/TafForm/TafFormRow/validations/wind.d.ts +1 -1
- package/src/lib/components/TafForm/utils.d.ts +5 -5
- package/src/lib/components/TafHeader/TafHeader.d.ts +1 -1
- package/src/lib/components/TafLayout/LocationTabs/LocationTabs.d.ts +2 -2
- package/src/lib/components/TafLayout/TacOverview/AdverseWeatherTacMessage.d.ts +1 -1
- package/src/lib/components/TafLayout/TacOverview/TacContainer.d.ts +1 -1
- package/src/lib/components/TafLayout/TacOverview/TacOverview.d.ts +1 -1
- package/src/lib/components/TafLayout/TacOverview/TacOverviewMobile.d.ts +2 -2
- package/src/lib/components/TafLayout/TafLayout.d.ts +1 -1
- package/src/lib/components/TafLayout/TafPanel/TafPanel.d.ts +3 -3
- package/src/lib/components/TafLayout/TafPanel/TafPanel.stories.d.ts +1 -1
- package/src/lib/components/TafLayout/TopTabs/TopTabs.d.ts +1 -1
- package/src/lib/components/TafLayout/utils.d.ts +3 -3
- package/src/lib/components/TafModule/TafModule.d.ts +3 -3
- package/src/lib/components/TafModule/TafModuleProvider.d.ts +3 -3
- package/src/lib/components/TafWrapper/TafConfigWrapper.d.ts +1 -1
- package/src/lib/components/TafWrapper/TafWrapper.d.ts +1 -2
- package/src/lib/types.d.ts +1 -1
- package/src/lib/utils/i18n.d.ts +1 -1
- package/src/lib/utils/mockdata/fakeTafList.d.ts +1 -1
- package/src/lib/utils/taf-api/api.d.ts +2 -2
- package/src/lib/utils/taf-api/fakeApi.d.ts +1 -1
- package/src/lib/utils/taf-api/hooks.d.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/taf",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.5.0",
|
|
4
4
|
"description": "GeoWeb TAF library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/api": "14.
|
|
12
|
-
"@opengeoweb/shared": "14.
|
|
11
|
+
"@opengeoweb/api": "14.5.0",
|
|
12
|
+
"@opengeoweb/shared": "14.5.0",
|
|
13
13
|
"react-hook-form": "^7.50.1",
|
|
14
|
-
"@opengeoweb/theme": "14.
|
|
15
|
-
"@opengeoweb/form-fields": "14.
|
|
16
|
-
"@opengeoweb/authentication": "14.
|
|
14
|
+
"@opengeoweb/theme": "14.5.0",
|
|
15
|
+
"@opengeoweb/form-fields": "14.5.0",
|
|
16
|
+
"@opengeoweb/authentication": "14.5.0",
|
|
17
17
|
"@reduxjs/toolkit": "^2.6.1",
|
|
18
18
|
"react-redux": "^9.2.0",
|
|
19
|
-
"@opengeoweb/snackbar": "14.
|
|
19
|
+
"@opengeoweb/snackbar": "14.5.0",
|
|
20
20
|
"react-sortablejs": "^6.1.4",
|
|
21
21
|
"sortablejs": "^1.15.1",
|
|
22
22
|
"@emotion/react": "^11.11.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { FieldErrors } from 'react-hook-form';
|
|
3
|
-
import { IssuesPanePosition } from './types';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FieldErrors } from 'react-hook-form';
|
|
3
|
+
import type { IssuesPanePosition } from './types';
|
|
4
4
|
interface IssuesButtonProps {
|
|
5
5
|
errors?: FieldErrors;
|
|
6
6
|
isIssuesPaneOpen?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { IssuesPaneProps, IssuesPanePosition, CustomErrorField } from './types';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IssuesPaneProps, IssuesPanePosition, CustomErrorField } from './types';
|
|
3
3
|
export declare const humanizeErrorMessage: (errorTitle: string, fieldNumberedValue: number) => string;
|
|
4
4
|
export declare const getErrorMessage: (error: CustomErrorField, index: number) => string;
|
|
5
5
|
export declare const MODAL_DIALOG_ELEMENT = "modal-dialog";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { CustomErrorField } from './types';
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
2
|
+
import type { FieldError, FieldErrors } from 'react-hook-form';
|
|
3
|
+
import type { CustomErrorField } from './types';
|
|
4
4
|
export declare const getCustomError: (error: FieldError, isChangeGroup: boolean, rowIndex: number) => CustomErrorField;
|
|
5
5
|
export declare const getIssuesLabel: (sumOfErrors: number, t: TFunction) => string;
|
|
6
6
|
export declare const getErrorValues: (fieldErrors: FieldErrors, isChangeGroup?: boolean, rowIndex?: number) => FieldError[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { UseFormProps } from 'react-hook-form';
|
|
1
|
+
import type { Theme } from '@mui/material';
|
|
2
|
+
import type { Store } from '@reduxjs/toolkit';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import type { UseFormProps } from 'react-hook-form';
|
|
5
5
|
export interface TafThemeApiProviderProps {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
theme?: Theme;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Taf, TafActions, TafFromBackend, TafFromFrontEnd } from '../../types';
|
|
3
|
-
import { IssuesPanePosition } from '../IssuesPane/types';
|
|
2
|
+
import type { Taf, TafActions, TafFromBackend, TafFromFrontEnd } from '../../types';
|
|
3
|
+
import type { IssuesPanePosition } from '../IssuesPane/types';
|
|
4
4
|
export interface TafFormProps {
|
|
5
5
|
isDisabled?: boolean;
|
|
6
6
|
setIsDisabled?: (isDisabled: boolean) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { StoryObj } from '@storybook/react-webpack5';
|
|
3
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { TafFromBackend } from '../../types';
|
|
4
4
|
interface WrapperProps {
|
|
5
5
|
tafFromBackend: TafFromBackend;
|
|
6
6
|
isDisabled?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TafActions, TafCanbe } from '../../../types';
|
|
2
|
+
import type { TafActions, TafCanbe } from '../../../types';
|
|
3
3
|
export declare const tafActionToDraftAction: (tafAction: TafActions) => TafActions;
|
|
4
4
|
interface TafFormButtonsProps {
|
|
5
5
|
isFormDisabled?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TafFormRowProps } from './types';
|
|
2
|
+
import type { TafFormRowProps } from './types';
|
|
3
3
|
declare const TafFormRow: React.ForwardRefExoticComponent<Omit<TafFormRowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export default TafFormRow;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TextFieldProps } from '@mui/material';
|
|
1
|
+
import type { TextFieldProps } from '@mui/material';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { RegisterOptions } from 'react-hook-form';
|
|
3
|
+
import type { RegisterOptions } from 'react-hook-form';
|
|
4
4
|
export declare const getDisplayValue: (value: string, disabled: boolean) => string;
|
|
5
5
|
type BaseTextFieldProps = TextFieldProps & {
|
|
6
6
|
shouldPreventUppercase?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GridProps } from '@mui/material';
|
|
2
|
-
import { FieldValues } from 'react-hook-form';
|
|
1
|
+
import type { GridProps } from '@mui/material';
|
|
2
|
+
import type { FieldValues } from 'react-hook-form';
|
|
3
3
|
export interface TafFormRowProps extends GridProps {
|
|
4
4
|
isNotRequiredForAction: (value: string) => boolean | string;
|
|
5
5
|
isChangeGroup?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeGroupFormData, Valid } from '../../../../types';
|
|
1
|
+
import type { ChangeGroupFormData, Valid } from '../../../../types';
|
|
2
2
|
export declare const FORMAT_DAYS_HOURS_MINUTES = "ddHHmm";
|
|
3
3
|
export declare const formatValidToString: (valid: Valid) => string;
|
|
4
4
|
export declare const parseValidToObject: (value: string, tafStart: string, tafEnd: string) => Valid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Visibility } from '../../../../types';
|
|
1
|
+
import type { Visibility } from '../../../../types';
|
|
2
2
|
export declare const formatVisibilityToString: (value: Visibility | boolean) => string;
|
|
3
3
|
export declare const parseVisibilityToObject: (value: string) => {
|
|
4
4
|
visibility?: Visibility;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Weather, WeatherStrings } from '../../../../types';
|
|
1
|
+
import type { Weather, WeatherStrings } from '../../../../types';
|
|
2
2
|
export declare const invalidWeatherMessage = "Invalid weather input, expected NSW or a valid weather code";
|
|
3
3
|
export declare const invalidWeatherCodeMessage = "Invalid weather input, invalid weather code";
|
|
4
4
|
export declare const invalidWeatherNSWMessage = "Invalid weather input, NSW is not allowed in the baseforecast and can only be used in the first weather group";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wind } from '../../../../types';
|
|
1
|
+
import type { Wind } from '../../../../types';
|
|
2
2
|
export declare const formatWindValues: (key: string, value: number | string) => string;
|
|
3
3
|
export declare const formatWindToString: (value: Wind) => string;
|
|
4
4
|
export declare const parseWindToObject: (value: string) => Wind;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { BaseForecast, BaseForecastFormData, ChangeGroup, ChangeGroupFormData, TAC, Taf, TafActions, TafFormData, TafStatus } from '../../types';
|
|
4
|
-
import { FieldNames } from './TafFormRow/types';
|
|
5
|
-
import { IssuesPanePosition } from '../IssuesPane/types';
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
2
|
+
import type Sortable from 'sortablejs';
|
|
3
|
+
import type { BaseForecast, BaseForecastFormData, ChangeGroup, ChangeGroupFormData, TAC, Taf, TafActions, TafFormData, TafStatus } from '../../types';
|
|
4
|
+
import type { FieldNames } from './TafFormRow/types';
|
|
5
|
+
import type { IssuesPanePosition } from '../IssuesPane/types';
|
|
6
6
|
export declare const emptyBaseForecast: {
|
|
7
7
|
wind: string;
|
|
8
8
|
visibility: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TafFromBackend, TimeSlot } from '../../../types';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TafFromBackend, TimeSlot } from '../../../types';
|
|
3
3
|
interface LocationTabsProps {
|
|
4
4
|
tafList: TafFromBackend[];
|
|
5
5
|
timeSlot: TimeSlot;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TafFromBackend } from '../../../types';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TafFromBackend } from '../../../types';
|
|
3
3
|
interface TacOverviewMobileProps {
|
|
4
4
|
upcomingTafs: TafFromBackend[];
|
|
5
5
|
currentTafs: TafFromBackend[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TafFromBackend, Taf, TafActions, TafStatus, TafFromFrontEnd } from '../../../types';
|
|
3
|
-
import { IssuesPanePosition } from '../../IssuesPane/types';
|
|
4
|
-
import { TafError } from '../utils';
|
|
2
|
+
import type { TafFromBackend, Taf, TafActions, TafStatus, TafFromFrontEnd } from '../../../types';
|
|
3
|
+
import type { IssuesPanePosition } from '../../IssuesPane/types';
|
|
4
|
+
import type { TafError } from '../utils';
|
|
5
5
|
export declare const fromActionToStatus: (tafAction: TafActions) => TafStatus;
|
|
6
6
|
interface TafPanelProps {
|
|
7
7
|
tafFromBackend: TafFromBackend;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { AutoTAFlocations, Taf, TafConfig, TafConfigLocation, TafConfigLocations, TafFromBackend, TafFromFrontEnd, TafStatus, TimeSlot } from '../../types';
|
|
1
|
+
import type { AxiosError } from 'axios';
|
|
2
|
+
import type { TFunction } from 'i18next';
|
|
3
|
+
import type { AutoTAFlocations, Taf, TafConfig, TafConfigLocation, TafConfigLocations, TafFromBackend, TafFromFrontEnd, TafStatus, TimeSlot } from '../../types';
|
|
4
4
|
export declare const getLocationSetting: (location: string, locationSettings: TafConfigLocations) => TafConfigLocation;
|
|
5
5
|
export declare const sortTafsOnLocation: (tafList?: TafFromBackend[], locationOrder?: string[]) => TafFromBackend[];
|
|
6
6
|
export declare const sortTafsOnIssueDate: (tafList?: TafFromBackend[]) => TafFromBackend[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TafModuleProviderProps } from './TafModuleProvider';
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { TafModuleProviderProps } from './TafModuleProvider';
|
|
3
3
|
export declare const getCurrentDate: () => string;
|
|
4
|
-
declare const Wrapper:
|
|
4
|
+
declare const Wrapper: FC<TafModuleProviderProps & {
|
|
5
5
|
isAutoTafEnabled?: boolean;
|
|
6
6
|
}>;
|
|
7
7
|
export default Wrapper;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { FieldValues, UseFieldArrayReturn } from 'react-hook-form';
|
|
3
|
-
import { BaseTaf, TafActions } from '../../types';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FieldValues, UseFieldArrayReturn } from 'react-hook-form';
|
|
3
|
+
import type { BaseTaf, TafActions } from '../../types';
|
|
4
4
|
type ValidateFormPromise = () => Promise<void | BaseTaf>;
|
|
5
5
|
interface TafModuleMethods {
|
|
6
6
|
onPreventCloseView?: (shouldPreventClose: boolean) => void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TafModuleProviderProps } from '../TafModule/TafModuleProvider';
|
|
1
|
+
import type { TafModuleProviderProps } from '../TafModule/TafModuleProvider';
|
|
3
2
|
declare const TafWrapper: React.FC<TafModuleProviderProps>;
|
|
4
3
|
export default TafWrapper;
|
package/src/lib/types.d.ts
CHANGED
package/src/lib/utils/i18n.d.ts
CHANGED
|
@@ -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 TAF_NAMESPACE = "taf";
|
|
4
4
|
export declare const initTafI18n: () => 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 { TAC, Taf, TafConfig, TafFromBackend, TafFromFrontEnd } from '../../types';
|
|
1
|
+
import type { Credentials } from '@opengeoweb/authentication';
|
|
2
|
+
import type { TAC, Taf, TafConfig, TafFromBackend, TafFromFrontEnd } from '../../types';
|
|
3
3
|
export declare const getTafList: (auth: Credentials) => Promise<TafFromBackend[]>;
|
|
4
4
|
export declare const postTaf: (auth: Credentials, data: TafFromFrontEnd) => Promise<Response>;
|
|
5
5
|
export declare const patchTaf: (auth: Credentials, data: TafFromFrontEnd, force?: boolean) => Promise<Response>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdverseWeatherTAC, TafFromBackend, TafConfig } from '../../types';
|
|
1
|
+
import type { AdverseWeatherTAC, TafFromBackend, TafConfig } from '../../types';
|
|
2
2
|
export declare const getFakeUpdatedList: () => TafFromBackend[];
|
|
3
3
|
export declare const fakeTafTac = "TAF EHAM 0812/0918 20020G35KT 0500 SN BKN040 BECMG 0814/0816 0700 BKN001=";
|
|
4
4
|
export declare const fakeTafTacJson: AdverseWeatherTAC;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UseMutationResult, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { UseMutationResult, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { TafError } from '../../components/TafLayout/utils';
|
|
3
|
+
import type { TAC, Taf, TafFromBackend, TafFromFrontEnd, TafConfig } from '../../types';
|
|
4
4
|
export declare const useTafList: (disabled?: boolean) => UseQueryResult<TafFromBackend[]>;
|
|
5
5
|
export declare const useTafConfig: (disabled?: boolean) => UseQueryResult<TafConfig>;
|
|
6
6
|
type PostReturnType<T> = UseMutationResult<Response | null, Error, T>;
|