@opengeoweb/taf 2.3.0 → 2.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/README.md +2 -2
- package/index.d.ts +2 -3
- package/index.esm.js +3089 -1447
- package/index.umd.js +3367 -1631
- package/lib/TafDemo.stories.d.ts +2 -2
- package/lib/components/IssuesPane/IssuesButton.d.ts +5 -2
- package/lib/components/IssuesPane/IssuesPane.d.ts +8 -5
- package/lib/components/IssuesPane/IssuesPane.stories.d.ts +12 -3
- package/lib/components/IssuesPane/IssuesPaneWrapper.d.ts +4 -0
- package/lib/components/{ContentDialog/ContentDialog.spec.d.ts → IssuesPane/IssuesPaneWrapper.spec.d.ts} +0 -0
- package/lib/components/IssuesPane/types.d.ts +11 -0
- package/lib/components/IssuesPane/utils.d.ts +10 -0
- package/lib/components/{TafForm/TafFormRow → IssuesPane}/utils.spec.d.ts +0 -0
- package/lib/components/Spinner/Spinner.d.ts +2 -1
- package/lib/components/{TafLayout → StatusIcon}/StatusIcon.d.ts +0 -0
- package/lib/components/{TafLayout → StatusIcon}/StatusIcon.spec.d.ts +0 -0
- package/lib/components/{TafLayout/TabPanel → TabPanel}/TabPanel.d.ts +0 -0
- package/lib/components/{TafLayout/TabPanel → TabPanel}/TabPanel.spec.d.ts +0 -0
- package/lib/components/{TafLayout/TabPanel → TabPanel}/index.d.ts +0 -0
- package/lib/components/TafForm/TafForm.d.ts +7 -22
- package/lib/components/TafForm/{TafFormDialog/TafFormDialog.spec.d.ts → TafForm.spec.d.ts} +0 -0
- package/lib/components/TafForm/{TafFormRow/change.spec.d.ts → TafForm.statusChanges.spec.d.ts} +0 -0
- package/lib/components/TafForm/{TafFormWrapper.stories.d.ts → TafForm.stories.d.ts} +0 -0
- package/lib/components/TafForm/TafFormButtons/TafFormButtons.d.ts +6 -9
- package/lib/components/TafForm/TafFormRow/{change.d.ts → validations/change.d.ts} +0 -0
- package/lib/components/TafForm/TafFormRow/{clouds.spec.d.ts → validations/change.spec.d.ts} +0 -0
- package/lib/components/TafForm/TafFormRow/{clouds.d.ts → validations/clouds.d.ts} +1 -1
- package/lib/components/TafForm/TafFormRow/{probability.spec.d.ts → validations/clouds.spec.d.ts} +0 -0
- package/lib/components/TafForm/TafFormRow/{probability.d.ts → validations/probability.d.ts} +0 -0
- package/lib/components/TafForm/TafFormRow/{validField.spec.d.ts → validations/probability.spec.d.ts} +0 -0
- package/lib/components/TafForm/TafFormRow/{utils.d.ts → validations/utils.d.ts} +0 -0
- package/lib/components/{TafList → TafForm/TafFormRow/validations}/utils.spec.d.ts +0 -0
- package/lib/components/TafForm/TafFormRow/{validField.d.ts → validations/validField.d.ts} +1 -1
- package/lib/components/TafForm/TafFormRow/{visibility.spec.d.ts → validations/validField.spec.d.ts} +0 -0
- package/lib/components/TafForm/TafFormRow/{visibility.d.ts → validations/visibility.d.ts} +1 -1
- package/lib/components/TafForm/TafFormRow/{weather.spec.d.ts → validations/visibility.spec.d.ts} +0 -0
- package/lib/components/TafForm/TafFormRow/{weather.d.ts → validations/weather.d.ts} +1 -1
- package/lib/components/TafForm/TafFormRow/{wind.spec.d.ts → validations/weather.spec.d.ts} +0 -0
- package/lib/components/TafForm/TafFormRow/{wind.d.ts → validations/wind.d.ts} +1 -1
- package/lib/components/TafForm/{TafFormWrapper.spec.d.ts → TafFormRow/validations/wind.spec.d.ts} +0 -0
- package/lib/components/TafForm/index.d.ts +1 -2
- package/lib/components/TafForm/utils.d.ts +25 -0
- package/lib/components/{TafLayout → TafHeader}/TafHeader.d.ts +0 -0
- package/lib/components/{TafLayout → TafHeader}/TafHeader.spec.d.ts +0 -0
- package/lib/components/TafLayout/TacOverview/ExportButton.d.ts +7 -0
- package/lib/components/{TafList/TafList.spec.d.ts → TafLayout/TacOverview/ExportButton.spec.d.ts} +0 -0
- package/lib/components/TafLayout/TacOverview/TacContainer.d.ts +4 -4
- package/lib/components/TafLayout/TacOverview/TacOverview.d.ts +3 -0
- package/lib/components/TafLayout/TacOverview/TacOverview.stories.d.ts +2 -0
- package/lib/components/TafLayout/TacOverview/TacOverviewMobile.d.ts +11 -0
- package/lib/components/{TafList/TafListAccordion.spec.d.ts → TafLayout/TacOverview/TacOverviewMobile.spec.d.ts} +0 -0
- package/lib/components/TafLayout/TacOverview/TacOverviewMobile.stories.d.ts +23 -0
- package/lib/components/TafLayout/TacOverview/index.d.ts +1 -0
- package/lib/components/TafLayout/TafLayout.d.ts +6 -0
- package/lib/components/{TafList/TafListButtons.spec.d.ts → TafLayout/TafLayout.spec.d.ts} +0 -0
- package/lib/components/TafLayout/TafLayout.stories.d.ts +10 -2
- package/lib/components/TafLayout/TafPanel/TafPanel.d.ts +32 -0
- package/lib/components/{TafList/TafListRow.spec.d.ts → TafLayout/TafPanel/TafPanel.spec.d.ts} +0 -0
- package/lib/components/TafLayout/TafPanel/index.d.ts +1 -0
- package/lib/components/TafLayout/TopTabs/TopTabs.d.ts +0 -2
- package/lib/components/TafLayout/utils.d.ts +17 -1
- package/lib/components/TafModule/TafModule.d.ts +3 -0
- package/lib/components/{TafList/TafListSection.spec.d.ts → TafModule/TafModule.spec.d.ts} +0 -0
- package/lib/components/TafModule/TafModule.stories.d.ts +10 -0
- package/lib/components/TafModule/TafModuleProvider.d.ts +22 -0
- package/lib/components/TafModule/index.d.ts +1 -0
- package/lib/components/TafWrapper/TafWrapper.d.ts +6 -13
- package/lib/types.d.ts +1 -1
- package/lib/utils/__mocks__/api.d.ts +1 -0
- package/lib/utils/fakeApi.d.ts +1 -1
- package/lib/utils/mockdata/fakeTafList.d.ts +9 -3
- package/lib/utils/testUtils.d.ts +7 -10
- package/package.json +7 -6
- package/lib/components/ContentDialog/ContentDialog.d.ts +0 -14
- package/lib/components/ContentDialog/ContentDialog.stories.d.ts +0 -7
- package/lib/components/ContentDialog/index.d.ts +0 -1
- package/lib/components/IssuesPane/IssuesPane.styles.d.ts +0 -1
- package/lib/components/Providers/Providers.d.ts +0 -11
- package/lib/components/TafForm/TafFormDialog/TafFormDialog.d.ts +0 -12
- package/lib/components/TafForm/TafFormDialog/TafFormDialog.stories.d.ts +0 -9
- package/lib/components/TafForm/TafFormWrapper.d.ts +0 -14
- package/lib/components/TafList/TafList.d.ts +0 -11
- package/lib/components/TafList/TafList.stories.d.ts +0 -8
- package/lib/components/TafList/TafListAccordion.d.ts +0 -11
- package/lib/components/TafList/TafListButtons.d.ts +0 -10
- package/lib/components/TafList/TafListRow.d.ts +0 -12
- package/lib/components/TafList/TafListSection.d.ts +0 -12
- package/lib/components/TafList/TafListSection.stories.d.ts +0 -18
- package/lib/components/TafList/index.d.ts +0 -3
- package/lib/components/TafList/utils.d.ts +0 -4
- package/lib/utils/utils.d.ts +0 -3
package/lib/TafDemo.stories.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
6
|
+
export declare const TafModuleLightTheme: () => React.ReactElement;
|
|
7
|
+
export declare const TafModuleDarkTheme: () => React.ReactElement;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { FieldError } from 'react-hook-form';
|
|
3
|
+
import { IssuesPanePosition } from './types';
|
|
2
4
|
interface IssuesButtonProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
errors?: Record<string, FieldError>;
|
|
6
|
+
isIssuesPaneOpen?: boolean;
|
|
7
|
+
setIsIssuesPaneOpen?: (isOpen: boolean, position?: IssuesPanePosition) => void;
|
|
5
8
|
}
|
|
6
9
|
declare const IssuesButton: React.FC<IssuesButtonProps>;
|
|
7
10
|
export default IssuesButton;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FieldError } from 'react-hook-form';
|
|
3
|
+
import { IssuesPaneProps, IssuesPanePosition } from './types';
|
|
3
4
|
export declare const capitalizeWord: ([firstLetter, ...restOfWord]: string) => string;
|
|
4
5
|
export declare const humanizeErrorMessage: (nameAsString: string) => string;
|
|
5
6
|
export declare const getErrorMessage: (error: FieldError, index: number) => string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
export declare const MODAL_DIALOG_ELEMENT = "modal-dialog";
|
|
8
|
+
export declare const useIssuesPane: () => {
|
|
9
|
+
isIssuesPaneOpen: boolean;
|
|
10
|
+
startPosition: IssuesPanePosition;
|
|
11
|
+
onToggleIssuesPane: (isOpen: boolean, newPosition: IssuesPanePosition) => void;
|
|
12
|
+
onCloseIssuesPane: () => void;
|
|
13
|
+
};
|
|
11
14
|
declare const IssuesPane: React.FC<IssuesPaneProps>;
|
|
12
15
|
export default IssuesPane;
|
|
@@ -3,6 +3,15 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const NoIssues:
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export declare const NoIssues: {
|
|
7
|
+
(): React.ReactElement;
|
|
8
|
+
storyName: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const OneIssue: {
|
|
11
|
+
(): React.ReactElement;
|
|
12
|
+
storyName: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const MultipleIssues: {
|
|
15
|
+
(): React.ReactElement;
|
|
16
|
+
storyName: string;
|
|
17
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldError } from 'react-hook-form';
|
|
2
|
+
export declare type IssuesPanePosition = {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
};
|
|
6
|
+
export interface IssuesPaneProps {
|
|
7
|
+
errorList?: FieldError[];
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
handleClose: () => void;
|
|
10
|
+
startPosition?: IssuesPanePosition;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DeepMap, FieldError } from 'react-hook-form';
|
|
2
|
+
interface CustomErrorField extends FieldError {
|
|
3
|
+
isChangeGroup: boolean;
|
|
4
|
+
row: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const getCustomError: (error: FieldError) => CustomErrorField;
|
|
7
|
+
export declare const getIssuesLabel: (sumOfErrors: number) => string;
|
|
8
|
+
export declare const filterDuplicateErrors: (errors: CustomErrorField[]) => CustomErrorField[];
|
|
9
|
+
export declare const getErrors: (errors: DeepMap<Record<string, unknown>, FieldError>) => CustomErrorField[];
|
|
10
|
+
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,29 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseTaf, TafActions, TafFromBackend } from '../../types';
|
|
3
|
-
|
|
4
|
-
valid: string;
|
|
5
|
-
wind: string;
|
|
6
|
-
visibility: string;
|
|
7
|
-
weather: {
|
|
8
|
-
weather1: any;
|
|
9
|
-
weather2: any;
|
|
10
|
-
weather3: any;
|
|
11
|
-
};
|
|
12
|
-
cloud: {
|
|
13
|
-
cloud1: any;
|
|
14
|
-
cloud2: any;
|
|
15
|
-
cloud3: any;
|
|
16
|
-
cloud4: any;
|
|
17
|
-
};
|
|
18
|
-
change: any;
|
|
19
|
-
probability: any;
|
|
20
|
-
};
|
|
3
|
+
import { IssuesPanePosition } from '../IssuesPane/types';
|
|
21
4
|
export interface TafFormProps {
|
|
22
|
-
isDisabled
|
|
23
|
-
|
|
24
|
-
staticTAC?: string;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
setIsDisabled?: (isDisabled: boolean) => void;
|
|
25
7
|
tafFromBackend: TafFromBackend;
|
|
26
|
-
onFormAction?: (action: TafActions, formValues?: BaseTaf) =>
|
|
8
|
+
onFormAction?: (action: TafActions, formValues?: BaseTaf) => Promise<boolean>;
|
|
9
|
+
onFormDirty?: (isFormDirty: boolean) => void;
|
|
10
|
+
isIssuesPaneOpen?: boolean;
|
|
11
|
+
setIsIssuesPaneOpen?: (isOpen: boolean, position?: IssuesPanePosition) => void;
|
|
27
12
|
}
|
|
28
13
|
declare const TafForm: React.FC<TafFormProps>;
|
|
29
14
|
export default TafForm;
|
|
File without changes
|
package/lib/components/TafForm/{TafFormRow/change.spec.d.ts → TafForm.statusChanges.spec.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
interface CustomErrorField extends FieldError {
|
|
5
|
-
isChangeGroup: boolean;
|
|
6
|
-
row: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const getCustomError: (error: FieldError) => CustomErrorField;
|
|
9
|
-
export declare const filterDuplicateErrors: (errors: CustomErrorField[]) => CustomErrorField[];
|
|
2
|
+
import { TafActions, TafCanbe } from '../../../types';
|
|
3
|
+
export declare const tafActionToDraftAction: (tafAction: TafActions) => TafActions;
|
|
10
4
|
interface TafFormButtonsProps {
|
|
5
|
+
isFormDisabled?: boolean;
|
|
11
6
|
tafAction?: TafActions;
|
|
12
|
-
|
|
7
|
+
canBe?: TafCanbe[];
|
|
8
|
+
onTafEditModeButtonPress: (action: TafActions) => void;
|
|
9
|
+
onTafViewModeButtonPress: (action: TafActions) => void;
|
|
13
10
|
}
|
|
14
11
|
declare const TafFormButtons: React.FC<TafFormButtonsProps>;
|
|
15
12
|
export default TafFormButtons;
|
|
File without changes
|
|
File without changes
|
package/lib/components/TafForm/TafFormRow/{probability.spec.d.ts → validations/clouds.spec.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
package/lib/components/TafForm/TafFormRow/{validField.spec.d.ts → validations/probability.spec.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeGroupFormData, Valid } from '
|
|
1
|
+
import { ChangeGroupFormData, Valid } from '../../../../types';
|
|
2
2
|
export declare const FORMAT_DAYS_HOURS = "DDHH";
|
|
3
3
|
export declare const FORMAT_DAYS_HOURS_MINUTES = "DDHHmm";
|
|
4
4
|
export declare const formatValidToString: (valid: Valid) => string;
|
package/lib/components/TafForm/TafFormRow/{visibility.spec.d.ts → validations/validField.spec.d.ts}
RENAMED
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Visibility } from '
|
|
1
|
+
import { 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;
|
package/lib/components/TafForm/TafFormRow/{weather.spec.d.ts → validations/visibility.spec.d.ts}
RENAMED
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Weather } from '
|
|
1
|
+
import { Weather } 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";
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wind } from '
|
|
1
|
+
import { 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;
|
package/lib/components/TafForm/{TafFormWrapper.spec.d.ts → TafFormRow/validations/wind.spec.d.ts}
RENAMED
|
File without changes
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export { default as TafFormDialog } from './TafFormDialog/TafFormDialog';
|
|
1
|
+
export { default as TafForm } from './TafForm';
|
|
@@ -12,6 +12,8 @@ export declare const getFieldNames: (isChangeGroup: boolean, index: number) => F
|
|
|
12
12
|
export declare const TAC_MISSING_DATA = "Missing data: no TAC can be generated";
|
|
13
13
|
export declare const TAC_NOT_AVAILABLE = "No TAC available";
|
|
14
14
|
export declare const TAC_RETRIEVING_DATA = "Retrieving TAC";
|
|
15
|
+
export declare const TAC_FAILED = "Failed to retrieve TAC";
|
|
16
|
+
export declare const tacHasError: (tac: string) => boolean;
|
|
15
17
|
export declare const useTACGenerator: (taf: Taf, requestTAC: (postTaf: unknown) => Promise<{
|
|
16
18
|
data: string;
|
|
17
19
|
}>, standardTAC?: string) => [string, (tafToPost: any) => void];
|
|
@@ -28,5 +30,28 @@ export declare const getConfirmationDialogTitle: (action: TafActions) => string;
|
|
|
28
30
|
export declare const isTafAmendedCorrectedChanged: (isFormDirty: boolean, originalTaf: Taf, currentTaf: Taf) => boolean;
|
|
29
31
|
export declare const getConfirmationDialogContent: (action: TafActions, isFormDirty: () => boolean) => string;
|
|
30
32
|
export declare const getConfirmationDialogButtonLabel: (action: TafActions) => string;
|
|
33
|
+
export declare const emptyChangegroup: {
|
|
34
|
+
valid: string;
|
|
35
|
+
wind: string;
|
|
36
|
+
visibility: string;
|
|
37
|
+
weather: {
|
|
38
|
+
weather1: any;
|
|
39
|
+
weather2: any;
|
|
40
|
+
weather3: any;
|
|
41
|
+
};
|
|
42
|
+
cloud: {
|
|
43
|
+
cloud1: any;
|
|
44
|
+
cloud2: any;
|
|
45
|
+
cloud3: any;
|
|
46
|
+
cloud4: any;
|
|
47
|
+
};
|
|
48
|
+
change: any;
|
|
49
|
+
probability: any;
|
|
50
|
+
};
|
|
31
51
|
export declare const getTafStatusLabel: (status: TafStatus) => string;
|
|
52
|
+
export declare const getMessageType: (taf: Taf, tafAction: TafActions) => string;
|
|
53
|
+
export declare const getAmendedCorrectedTafTimes: (taf: Taf, tafAction: TafActions) => Taf;
|
|
54
|
+
export declare const prepareTafValues: (_taf: Taf, tafAction: TafActions, addEmptyChangeGroup?: boolean) => TafFormData;
|
|
55
|
+
export declare const getIsFormDefaultDisabled: (status: TafStatus) => boolean;
|
|
56
|
+
export declare const fromStatusToAction: (tafStatus: TafStatus) => TafActions;
|
|
32
57
|
export {};
|
|
File without changes
|
|
File without changes
|
package/lib/components/{TafList/TafList.spec.d.ts → TafLayout/TacOverview/ExportButton.spec.d.ts}
RENAMED
|
File without changes
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Taf } from '../../../types';
|
|
3
3
|
interface TacContainerProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
taf: Taf;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
isFormDisabled?: boolean;
|
|
7
7
|
}
|
|
8
8
|
declare const TacContainer: React.FC<TacContainerProps>;
|
|
9
9
|
export default TacContainer;
|
|
@@ -4,6 +4,9 @@ interface TacOverviewProps {
|
|
|
4
4
|
upcomingTafs: TafFromBackend[];
|
|
5
5
|
currentTafs: TafFromBackend[];
|
|
6
6
|
expiredTafs: TafFromBackend[];
|
|
7
|
+
hideTitle?: boolean;
|
|
8
|
+
activeTaf?: TafFromBackend;
|
|
9
|
+
isFormDisabled?: boolean;
|
|
7
10
|
}
|
|
8
11
|
declare const TacOverview: React.FC<TacOverviewProps>;
|
|
9
12
|
export default TacOverview;
|
|
@@ -3,6 +3,8 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
+
export declare const TacOverviewWithError: () => React.ReactElement;
|
|
7
|
+
export declare const TacOverviewWithDifferentTAC: () => React.ReactElement;
|
|
6
8
|
export declare const TacOverviewLightTheme: {
|
|
7
9
|
(): React.ReactElement;
|
|
8
10
|
storyName: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TafFromBackend } from '../../../types';
|
|
3
|
+
interface TacOverviewMobileProps {
|
|
4
|
+
upcomingTafs: TafFromBackend[];
|
|
5
|
+
currentTafs: TafFromBackend[];
|
|
6
|
+
expiredTafs: TafFromBackend[];
|
|
7
|
+
activeTaf?: TafFromBackend;
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const TacOverviewMobile: React.FC<TacOverviewMobileProps>;
|
|
11
|
+
export default TacOverviewMobile;
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const TacOverviewMobileLightTheme: {
|
|
7
|
+
(): React.ReactElement;
|
|
8
|
+
storyName: string;
|
|
9
|
+
parameters: {
|
|
10
|
+
viewport: {
|
|
11
|
+
defaultViewport: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const TacOverviewMobileDarkTheme: {
|
|
16
|
+
(): React.ReactElement;
|
|
17
|
+
storyName: string;
|
|
18
|
+
parameters: {
|
|
19
|
+
viewport: {
|
|
20
|
+
defaultViewport: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TafFromBackend } from '../../types';
|
|
3
|
+
export declare const CONFIRM_DIALOG_OPTIONS: {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
confirmLabel: string;
|
|
7
|
+
};
|
|
3
8
|
interface TafLayoutProps {
|
|
4
9
|
tafList: TafFromBackend[];
|
|
10
|
+
onPostTaf: () => void;
|
|
5
11
|
}
|
|
6
12
|
declare const TafLayout: React.FC<TafLayoutProps>;
|
|
7
13
|
export default TafLayout;
|
|
File without changes
|
|
@@ -3,5 +3,13 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
6
|
+
export declare const DemoTafLayoutLightTheme: () => React.ReactElement;
|
|
7
|
+
export declare const DemoTafLayoutDarkTheme: () => React.ReactElement;
|
|
8
|
+
export declare const TafLayoutLightSnap: {
|
|
9
|
+
(): React.ReactElement;
|
|
10
|
+
storyName: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const TafLayoutDarkSnap: {
|
|
13
|
+
(): React.ReactElement;
|
|
14
|
+
storyName: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AxiosError } from 'axios';
|
|
3
|
+
import { TafFromBackend, TafActions, TafStatus, TafFromFrontEnd } from '../../../types';
|
|
4
|
+
import { IssuesPanePosition } from '../../IssuesPane/types';
|
|
5
|
+
export declare const fromActionToStatus: (tafAction: TafActions) => TafStatus;
|
|
6
|
+
declare type TafError = {
|
|
7
|
+
type: 'CANCELLED' | 'SERVER';
|
|
8
|
+
title: string;
|
|
9
|
+
message?: string;
|
|
10
|
+
testId?: string;
|
|
11
|
+
};
|
|
12
|
+
interface TafPanelProps {
|
|
13
|
+
tafFromBackend: TafFromBackend;
|
|
14
|
+
activeTafIndex: number;
|
|
15
|
+
index: number;
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
postTaf?: (taf: TafFromFrontEnd) => Promise<void>;
|
|
18
|
+
onFormDirty?: (isFormDirty: boolean) => void;
|
|
19
|
+
isIssuesPaneOpen?: boolean;
|
|
20
|
+
setIsIssuesPaneOpen?: (isOpen: boolean, position?: IssuesPanePosition) => void;
|
|
21
|
+
isFormDisabled?: boolean;
|
|
22
|
+
setIsFormDisabled?: (isDisabled: boolean) => void;
|
|
23
|
+
error?: TafError;
|
|
24
|
+
}
|
|
25
|
+
export declare const usePostTafRequest: (request: (params?: unknown) => Promise<void>, errorParser?: (error: AxiosError, params: TafFromFrontEnd) => TafError) => {
|
|
26
|
+
isLoading: boolean;
|
|
27
|
+
error: TafError;
|
|
28
|
+
setError: (newError: AxiosError) => void;
|
|
29
|
+
doRequest: (params?: unknown) => Promise<void>;
|
|
30
|
+
};
|
|
31
|
+
declare const TafPanel: React.FC<TafPanelProps>;
|
|
32
|
+
export default TafPanel;
|
package/lib/components/{TafList/TafListRow.spec.d.ts → TafLayout/TafPanel/TafPanel.spec.d.ts}
RENAMED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TafPanel } from './TafPanel';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Moment } from 'moment';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { TafFromBackend, TimeSlot } from '../../../types';
|
|
4
3
|
interface TopTabsProps {
|
|
@@ -6,6 +5,5 @@ interface TopTabsProps {
|
|
|
6
5
|
tafFromBackend: TafFromBackend;
|
|
7
6
|
onChangeTimeSlot?: (timeSlot: TimeSlot) => void;
|
|
8
7
|
}
|
|
9
|
-
export declare const formatBaseTime: (time: Moment) => string;
|
|
10
8
|
declare const TopTabs: React.FC<TopTabsProps>;
|
|
11
9
|
export default TopTabs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Moment } from 'moment';
|
|
2
|
-
import { TafConfigLocation, TafConfigLocations, TafFromBackend, TafStatus, TimeSlot } from '../../types';
|
|
2
|
+
import { Taf, TafConfigLocation, TafConfigLocations, TafFormData, TafFromBackend, TafStatus, TimeSlot } from '../../types';
|
|
3
3
|
export declare const getLocationSetting: (location: string, locationSettings?: TafConfigLocations) => TafConfigLocation;
|
|
4
4
|
export declare const sortTafsOnLocation: (tafList: TafFromBackend[], locationOrder?: string[]) => TafFromBackend[];
|
|
5
5
|
export declare const getBaseTime: (baseTime: string, location: string) => {
|
|
@@ -16,3 +16,19 @@ export declare const muiTabA11yProps: (index: number) => {
|
|
|
16
16
|
id: string;
|
|
17
17
|
'aria-controls': string;
|
|
18
18
|
};
|
|
19
|
+
export declare const emptyBaseForecast: {
|
|
20
|
+
wind: string;
|
|
21
|
+
visibility: string;
|
|
22
|
+
weather: {
|
|
23
|
+
weather1: string;
|
|
24
|
+
weather2: string;
|
|
25
|
+
weather3: string;
|
|
26
|
+
};
|
|
27
|
+
cloud: {
|
|
28
|
+
cloud1: string;
|
|
29
|
+
cloud2: string;
|
|
30
|
+
cloud3: string;
|
|
31
|
+
cloud4: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const prepareTafExportValues: (tafToCopy: Taf, currentTaf: TafFormData) => TafFormData;
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const TafModuleLightThemeWithErrorOnAction: () => React.ReactElement;
|
|
7
|
+
export declare const TafModuleLightThemeWithErrorOnLoadingList: () => React.ReactElement;
|
|
8
|
+
export declare const TafModuleLightTheme: () => React.ReactElement;
|
|
9
|
+
export declare const TafModuleDarkTheme: () => React.ReactElement;
|
|
10
|
+
export declare const TafModuleToolContainerExample: () => React.ReactElement;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BaseTaf, TafActions } from '../../types';
|
|
3
|
+
declare type ValidateFormPromise = () => Promise<void | BaseTaf>;
|
|
4
|
+
interface TafModuleContextState {
|
|
5
|
+
onValidateForm: ValidateFormPromise;
|
|
6
|
+
registerValidateForm: (promiseToRegister: ValidateFormPromise) => void;
|
|
7
|
+
tafAction: TafActions;
|
|
8
|
+
setTafAction: (action: TafActions) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const TafModuleContext: React.Context<{
|
|
11
|
+
onValidateForm: any;
|
|
12
|
+
registerValidateForm: any;
|
|
13
|
+
tafAction: any;
|
|
14
|
+
setTafAction: any;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const useTafModuleContext: () => Partial<TafModuleContextState>;
|
|
17
|
+
export declare const useTafModuleState: () => TafModuleContextState;
|
|
18
|
+
interface TafModuleProviderProps {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare const TafModuleProvider: React.FC<TafModuleProviderProps>;
|
|
22
|
+
export default TafModuleContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TafModule } from './TafModule';
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* Needs to be wrapped in the ApiProvider.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```<ApiProvider baseURL="http://test.com" appURL="http://app.com" auth={auth} onSetAuth={onSetAuth} createApi={createApi}> authTokenUrl="url/tokenrefresh"<TafWrapper /> </ApiProvider>```
|
|
11
|
-
*/
|
|
12
|
-
declare const ConfirmationWrapper: React.FC;
|
|
13
|
-
export default ConfirmationWrapper;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface TafWrapperProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
declare const TafWrapper: React.FC<TafWrapperProps>;
|
|
6
|
+
export default TafWrapper;
|
package/lib/types.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export interface BaseTaf {
|
|
|
66
66
|
uuid: string;
|
|
67
67
|
issueDate?: TafDate;
|
|
68
68
|
}
|
|
69
|
-
export declare type TafStatus = 'NEW' | 'DRAFT' | '
|
|
69
|
+
export declare type TafStatus = 'NEW' | 'DRAFT' | 'DRAFT_AMENDED' | 'DRAFT_CORRECTED' | 'PUBLISHED' | 'CORRECTED' | 'AMENDED' | 'CANCELLED' | 'EXPIRED';
|
|
70
70
|
export declare type TafActions = 'NEW' | 'DRAFT' | 'DRAFT_AMEND' | 'DRAFT_CORRECT' | 'PUBLISH' | 'CANCEL' | 'CORRECT' | 'AMEND' | 'CLOSE' | 'DISCARD';
|
|
71
71
|
export declare type TafCanbe = 'DRAFTED' | 'DISCARDED' | 'PUBLISHED' | 'CANCELLED' | 'AMENDED' | 'CORRECTED';
|
|
72
72
|
export declare type TafType = 'NORMAL' | 'TEST' | 'EXERCISE';
|
package/lib/utils/fakeApi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const fakeTafTac = "
|
|
1
|
+
export declare const fakeTafTac = "TAF EHAM 0812/0918 20020G35KT 0500 SN BKN040\nBECMG 0814/0816 0700 BKN001=";
|
|
2
2
|
export declare const fakeAxiosInstance: {
|
|
3
3
|
get: (_url: any, _params?: any) => Promise<void>;
|
|
4
4
|
post: (_url: any, _params?: any) => Promise<void>;
|
|
@@ -6,13 +6,19 @@ export declare const fakeNewFixedTaf: TafFromBackend;
|
|
|
6
6
|
export declare const fakeExpiredTaf: TafFromBackend;
|
|
7
7
|
export declare const fakePublishedTaf: TafFromBackend;
|
|
8
8
|
export declare const fakePublishedFixedTaf: TafFromBackend;
|
|
9
|
+
export declare const fakePublishedTafWithoutChangeGroups: TafFromBackend;
|
|
10
|
+
export declare const fakeCancelledTaf: TafFromBackend;
|
|
9
11
|
export declare const fakeDraftTaf: TafFromBackend;
|
|
10
12
|
export declare const fakeDraftFixedTaf: TafFromBackend;
|
|
11
13
|
export declare const fakeDraftAmendmentTaf: TafFromBackend;
|
|
14
|
+
export declare const fakeDraftCorrectedTaf: TafFromBackend;
|
|
12
15
|
export declare const fakeDraftAmendmentFixedTaf: TafFromBackend;
|
|
13
16
|
export declare const fakeAmendmentTaf: TafFromBackend;
|
|
17
|
+
export declare const fakeCorrectedTaf: TafFromBackend;
|
|
14
18
|
export declare const fakeAmendmentFixedTaf: TafFromBackend;
|
|
19
|
+
export declare const fakeCancelledFixedTaf: TafFromBackend;
|
|
20
|
+
export declare const fakeFixedTafList: TafFromBackend[];
|
|
15
21
|
export declare const fakePublishedTafWithChangeGroups: TafFromBackend;
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
22
|
+
export declare const fakeDraftTafWithSameDates: TafFromBackend;
|
|
23
|
+
export declare const fakeDraftTafWithSameDatesFixed: TafFromBackend;
|
|
24
|
+
export declare const fakeDraftTafWithFM: TafFromBackend;
|