@opengeoweb/taf 2.2.0 → 2.4.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 +1 -3
- package/index.esm.js +1661 -1359
- package/index.umd.js +1778 -1368
- package/lib/TafDemo.stories.d.ts +2 -2
- package/lib/components/IssuesPane/IssuesButton.d.ts +8 -2
- package/lib/components/IssuesPane/IssuesPane.d.ts +5 -0
- package/lib/components/IssuesPane/IssuesPane.stories.d.ts +12 -3
- package/lib/components/Spinner/Spinner.d.ts +2 -1
- package/lib/components/StatusIcon/StatusIcon.d.ts +8 -0
- package/lib/components/{ContentDialog/ContentDialog.spec.d.ts → StatusIcon/StatusIcon.spec.d.ts} +0 -0
- package/lib/components/TabPanel/TabPanel.d.ts +8 -0
- package/lib/components/{TafForm/TafFormDialog/TafFormDialog.spec.d.ts → TabPanel/TabPanel.spec.d.ts} +0 -0
- package/lib/components/TabPanel/index.d.ts +1 -0
- package/lib/components/TafForm/TafForm.d.ts +3 -20
- package/lib/components/TafForm/TafFormButtons/TafFormButtons.d.ts +5 -9
- package/lib/components/TafForm/TafFormButtons/TafFormOptionsButton.d.ts +11 -0
- package/lib/components/TafForm/{TafFormRow/change.spec.d.ts → TafFormButtons/TafFormOptionsButton.spec.d.ts} +0 -0
- package/lib/components/TafForm/TafFormRow/types.d.ts +3 -2
- 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/{utils.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/{validField.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/{visibility.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/{weather.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/TafFormRow/{wind.spec.d.ts → validations/wind.spec.d.ts} +0 -0
- package/lib/components/TafForm/TafFormWrapper.d.ts +3 -6
- package/lib/components/TafForm/TafFormWrapper.stories.d.ts +20 -0
- package/lib/components/TafForm/index.d.ts +0 -1
- package/lib/components/TafForm/utils.d.ts +25 -2
- package/lib/components/TafHeader/TafHeader.d.ts +6 -0
- package/lib/components/{TafList/TafList.spec.d.ts → TafHeader/TafHeader.spec.d.ts} +0 -0
- package/lib/components/TafLayout/LocationTabs/LocationTabs.d.ts +10 -0
- package/lib/components/{TafList/TafListAccordion.spec.d.ts → TafLayout/LocationTabs/LocationTabs.spec.d.ts} +0 -0
- package/lib/components/TafLayout/LocationTabs/LocationTabs.stories.d.ts +13 -0
- package/lib/components/TafLayout/LocationTabs/index.d.ts +1 -0
- package/lib/components/TafLayout/TacOverview/TacContainer.d.ts +8 -0
- package/lib/components/{TafList/TafListButtons.spec.d.ts → TafLayout/TacOverview/TacContainer.spec.d.ts} +0 -0
- package/lib/components/TafLayout/TacOverview/TacOverview.d.ts +11 -0
- package/lib/components/{TafList/TafListRow.spec.d.ts → TafLayout/TacOverview/TacOverview.spec.d.ts} +0 -0
- package/lib/components/TafLayout/TacOverview/TacOverview.stories.d.ts +15 -0
- package/lib/components/TafLayout/TacOverview/TacOverviewMobile.d.ts +11 -0
- package/lib/components/{TafList/TafListSection.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 +2 -0
- package/lib/components/TafLayout/TafLayout.d.ts +8 -0
- package/lib/components/{TafWrapper/TafWrapper.spec.d.ts → TafLayout/TafLayout.spec.d.ts} +0 -0
- package/lib/components/TafLayout/TafLayout.stories.d.ts +7 -0
- package/lib/components/TafLayout/TafPanel/TafPanel.d.ts +10 -0
- package/lib/components/TafLayout/TafPanel/TafPanel.spec.d.ts +1 -0
- package/lib/components/TafLayout/TafPanel/index.d.ts +1 -0
- package/lib/components/TafLayout/TopTabs/TopTabs.d.ts +11 -0
- package/lib/components/TafLayout/TopTabs/TopTabs.spec.d.ts +1 -0
- package/lib/components/TafLayout/TopTabs/TopTabs.stories.d.ts +13 -0
- package/lib/components/TafLayout/TopTabs/index.d.ts +1 -0
- package/lib/components/TafLayout/utils.d.ts +18 -0
- package/lib/components/TafLayout/utils.spec.d.ts +1 -0
- package/lib/components/TafModule/TafModule.d.ts +3 -0
- package/lib/components/TafModule/TafModule.spec.d.ts +1 -0
- package/lib/components/TafModule/TafModule.stories.d.ts +9 -0
- package/lib/components/TafModule/index.d.ts +1 -0
- package/lib/types.d.ts +17 -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 +1 -0
- package/lib/utils/testUtils.d.ts +4 -5
- 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/TafForm/TafForm.styles.d.ts +0 -1
- package/lib/components/TafForm/TafFormDialog/TafFormDialog.d.ts +0 -12
- package/lib/components/TafForm/TafFormDialog/TafFormDialog.stories.d.ts +0 -9
- 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 -9
- 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/components/TafWrapper/TafWrapper.d.ts +0 -13
- package/lib/components/TafWrapper/index.d.ts +0 -1
- 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,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { FieldError } from 'react-hook-form';
|
|
3
|
+
interface CustomErrorField extends FieldError {
|
|
4
|
+
isChangeGroup: boolean;
|
|
5
|
+
row: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const getCustomError: (error: FieldError) => CustomErrorField;
|
|
8
|
+
export declare const filterDuplicateErrors: (errors: CustomErrorField[]) => CustomErrorField[];
|
|
2
9
|
interface IssuesButtonProps {
|
|
3
|
-
|
|
4
|
-
sumOfErrors: number;
|
|
10
|
+
errors?: Record<string, FieldError>;
|
|
5
11
|
}
|
|
6
12
|
declare const IssuesButton: React.FC<IssuesButtonProps>;
|
|
7
13
|
export default IssuesButton;
|
|
@@ -3,10 +3,15 @@ import { FieldError } from 'react-hook-form';
|
|
|
3
3
|
export declare const capitalizeWord: ([firstLetter, ...restOfWord]: string) => string;
|
|
4
4
|
export declare const humanizeErrorMessage: (nameAsString: string) => string;
|
|
5
5
|
export declare const getErrorMessage: (error: FieldError, index: number) => string;
|
|
6
|
+
export declare const MODAL_DIALOG_ELEMENT = "modal-dialog";
|
|
6
7
|
interface IssuesPaneProps {
|
|
7
8
|
isOpen: boolean;
|
|
8
9
|
handleClose: () => void;
|
|
9
10
|
errorList?: FieldError[];
|
|
11
|
+
startPosition?: {
|
|
12
|
+
top: number;
|
|
13
|
+
left?: number;
|
|
14
|
+
};
|
|
10
15
|
}
|
|
11
16
|
declare const IssuesPane: React.FC<IssuesPaneProps>;
|
|
12
17
|
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
|
+
};
|
package/lib/components/{ContentDialog/ContentDialog.spec.d.ts → StatusIcon/StatusIcon.spec.d.ts}
RENAMED
|
File without changes
|
package/lib/components/{TafForm/TafFormDialog/TafFormDialog.spec.d.ts → TabPanel/TabPanel.spec.d.ts}
RENAMED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TabPanel } from './TabPanel';
|
|
@@ -1,28 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BaseTaf, TafActions } from '../../types';
|
|
3
|
-
export declare const emptyChangegroup: {
|
|
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
|
-
};
|
|
2
|
+
import { BaseTaf, TafActions, TafFromBackend } from '../../types';
|
|
21
3
|
export interface TafFormProps {
|
|
22
4
|
isDisabled: boolean;
|
|
23
5
|
tafAction?: TafActions;
|
|
24
6
|
staticTAC?: string;
|
|
25
|
-
|
|
7
|
+
tafFromBackend: TafFromBackend;
|
|
8
|
+
onFormAction?: (action: TafActions, formValues?: BaseTaf) => Promise<boolean>;
|
|
26
9
|
}
|
|
27
10
|
declare const TafForm: React.FC<TafFormProps>;
|
|
28
11
|
export default TafForm;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { TafActions } from '../../../types';
|
|
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';
|
|
10
3
|
interface TafFormButtonsProps {
|
|
4
|
+
isFormDisabled?: boolean;
|
|
11
5
|
tafAction?: TafActions;
|
|
12
|
-
|
|
6
|
+
canBe?: TafCanbe[];
|
|
7
|
+
onTafEditModeButtonPress: (action: TafActions) => void;
|
|
8
|
+
onTafViewModeButtonPress: (action: TafActions) => void;
|
|
13
9
|
}
|
|
14
10
|
declare const TafFormButtons: React.FC<TafFormButtonsProps>;
|
|
15
11
|
export default TafFormButtons;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface TafFormOptionsButtonProps {
|
|
3
|
+
isChangeGroup: boolean;
|
|
4
|
+
addChangeGroupBelow: () => void;
|
|
5
|
+
addChangeGroupAbove: () => void;
|
|
6
|
+
removeChangeGroup: () => void;
|
|
7
|
+
clearRow: () => void;
|
|
8
|
+
index: number;
|
|
9
|
+
}
|
|
10
|
+
declare const TafFormOptionsButton: React.FC<TafFormOptionsButtonProps>;
|
|
11
|
+
export default TafFormOptionsButton;
|
|
File without changes
|
|
@@ -5,9 +5,10 @@ export interface TafFormRowProps extends GridProps {
|
|
|
5
5
|
isChangeGroup?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
index?: number;
|
|
8
|
-
lastRow?: boolean;
|
|
9
8
|
onRemoveChangeGroup?: (index: number) => void;
|
|
10
|
-
|
|
9
|
+
onAddChangeGroupBelow?: (index: number) => void;
|
|
10
|
+
onAddChangeGroupAbove?: (index: number) => void;
|
|
11
|
+
onClearRow?: (index: number) => void;
|
|
11
12
|
field?: Partial<ArrayField>;
|
|
12
13
|
dragHandle?: React.ReactElement;
|
|
13
14
|
}
|
|
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/{utils.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/{validField.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/{visibility.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";
|
package/lib/components/TafForm/TafFormRow/{weather.spec.d.ts → validations/weather.spec.d.ts}
RENAMED
|
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;
|
|
File without changes
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Taf, TafActions,
|
|
3
|
-
export declare const getMessageType: (taf: Taf, tafAction: TafActions) => string;
|
|
4
|
-
export declare const getAmendedCorrectedTafTimes: (taf: Taf, tafAction: TafActions) => Taf;
|
|
5
|
-
export declare const prepareTafValues: (_taf: Taf, tafAction: TafActions, addEmptyChangeGroup?: boolean) => TafFormData;
|
|
2
|
+
import { Taf, TafActions, TafFormViewMode, TafFromBackend } from '../../types';
|
|
6
3
|
export interface TafFormWrapperProps {
|
|
7
|
-
mode:
|
|
4
|
+
mode: TafFormViewMode;
|
|
8
5
|
tafFromBackend: TafFromBackend;
|
|
9
6
|
tafAction?: TafActions;
|
|
10
7
|
TAC?: string;
|
|
11
|
-
onFormAction?: (action: TafActions, formValues?: Taf) =>
|
|
8
|
+
onFormAction?: (action: TafActions, formValues?: Taf) => Promise<boolean>;
|
|
12
9
|
}
|
|
13
10
|
declare const TafFormWrapper: React.FC<TafFormWrapperProps>;
|
|
14
11
|
export default TafFormWrapper;
|
|
@@ -7,19 +7,39 @@ export declare const NewTafForm: {
|
|
|
7
7
|
(): React.ReactElement;
|
|
8
8
|
storyName: string;
|
|
9
9
|
};
|
|
10
|
+
export declare const NewTafFormDark: {
|
|
11
|
+
(): React.ReactElement;
|
|
12
|
+
storyName: string;
|
|
13
|
+
};
|
|
10
14
|
export declare const EditTafForm: {
|
|
11
15
|
(): React.ReactElement;
|
|
12
16
|
storyName: string;
|
|
13
17
|
};
|
|
18
|
+
export declare const EditTafFormDark: {
|
|
19
|
+
(): React.ReactElement;
|
|
20
|
+
storyName: string;
|
|
21
|
+
};
|
|
14
22
|
export declare const ViewTafForm: {
|
|
15
23
|
(): React.ReactElement;
|
|
16
24
|
storyName: string;
|
|
17
25
|
};
|
|
26
|
+
export declare const ViewTafFormDark: {
|
|
27
|
+
(): React.ReactElement;
|
|
28
|
+
storyName: string;
|
|
29
|
+
};
|
|
18
30
|
export declare const EditTafFormWithMultipleSameStartDates: {
|
|
19
31
|
(): React.ReactElement;
|
|
20
32
|
storyName: string;
|
|
21
33
|
};
|
|
34
|
+
export declare const EditTafFormWithMultipleSameStartDatesDark: {
|
|
35
|
+
(): React.ReactElement;
|
|
36
|
+
storyName: string;
|
|
37
|
+
};
|
|
22
38
|
export declare const EditTafFormWithFMOverlap: {
|
|
23
39
|
(): React.ReactElement;
|
|
24
40
|
storyName: string;
|
|
25
41
|
};
|
|
42
|
+
export declare const EditTafFormWithFMOverlapDark: {
|
|
43
|
+
(): React.ReactElement;
|
|
44
|
+
storyName: string;
|
|
45
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Sortable from 'sortablejs';
|
|
2
|
-
import { BaseForecast, BaseForecastFormData, ChangeGroup, ChangeGroupFormData, Taf, TafActions, TafFormData } from '../../types';
|
|
2
|
+
import { BaseForecast, BaseForecastFormData, ChangeGroup, ChangeGroupFormData, Taf, TafActions, TafFormData, TafStatus } from '../../types';
|
|
3
3
|
import { FieldNames } from './TafFormRow/types';
|
|
4
4
|
export declare const formatIssueTime: (issueDate: string) => string;
|
|
5
5
|
declare type BaseForecastOrChangeGroupFormData<T extends BaseForecast | ChangeGroup> = T extends ChangeGroup ? ChangeGroupFormData : BaseForecastFormData;
|
|
@@ -25,6 +25,29 @@ export declare const useDragOrder: (trigger: (name?: string | string[]) => Promi
|
|
|
25
25
|
activeDraggingIndex: number;
|
|
26
26
|
};
|
|
27
27
|
export declare const getConfirmationDialogTitle: (action: TafActions) => string;
|
|
28
|
-
export declare const
|
|
28
|
+
export declare const isTafAmendedCorrectedChanged: (isFormDirty: boolean, originalTaf: Taf, currentTaf: Taf) => boolean;
|
|
29
|
+
export declare const getConfirmationDialogContent: (action: TafActions, isFormDirty: () => boolean) => string;
|
|
29
30
|
export declare const getConfirmationDialogButtonLabel: (action: TafActions) => string;
|
|
31
|
+
export declare const emptyChangegroup: {
|
|
32
|
+
valid: string;
|
|
33
|
+
wind: string;
|
|
34
|
+
visibility: string;
|
|
35
|
+
weather: {
|
|
36
|
+
weather1: any;
|
|
37
|
+
weather2: any;
|
|
38
|
+
weather3: any;
|
|
39
|
+
};
|
|
40
|
+
cloud: {
|
|
41
|
+
cloud1: any;
|
|
42
|
+
cloud2: any;
|
|
43
|
+
cloud3: any;
|
|
44
|
+
cloud4: any;
|
|
45
|
+
};
|
|
46
|
+
change: any;
|
|
47
|
+
probability: any;
|
|
48
|
+
};
|
|
49
|
+
export declare const getTafStatusLabel: (status: TafStatus) => string;
|
|
50
|
+
export declare const getMessageType: (taf: Taf, tafAction: TafActions) => string;
|
|
51
|
+
export declare const getAmendedCorrectedTafTimes: (taf: Taf, tafAction: TafActions) => Taf;
|
|
52
|
+
export declare const prepareTafValues: (_taf: Taf, tafAction: TafActions, addEmptyChangeGroup?: boolean) => TafFormData;
|
|
30
53
|
export {};
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TafFromBackend, TimeSlot } from '../../../types';
|
|
3
|
+
interface LocationTabsProps {
|
|
4
|
+
tafList: TafFromBackend[];
|
|
5
|
+
timeSlot: TimeSlot;
|
|
6
|
+
activeIndex?: number;
|
|
7
|
+
onChangeTab?: (newTabIndex: number) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const LocationTabs: React.FC<LocationTabsProps>;
|
|
10
|
+
export default LocationTabs;
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const TafLayoutLightTheme: {
|
|
7
|
+
(): React.ReactElement;
|
|
8
|
+
storyName: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const TafLayoutDarkTheme: {
|
|
11
|
+
(): React.ReactElement;
|
|
12
|
+
storyName: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LocationTabs } from './LocationTabs';
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TafFromBackend } from '../../../types';
|
|
3
|
+
interface TacOverviewProps {
|
|
4
|
+
upcomingTafs: TafFromBackend[];
|
|
5
|
+
currentTafs: TafFromBackend[];
|
|
6
|
+
expiredTafs: TafFromBackend[];
|
|
7
|
+
hideTitle?: boolean;
|
|
8
|
+
activeTaf?: TafFromBackend;
|
|
9
|
+
}
|
|
10
|
+
declare const TacOverview: React.FC<TacOverviewProps>;
|
|
11
|
+
export default TacOverview;
|
package/lib/components/{TafList/TafListRow.spec.d.ts → TafLayout/TacOverview/TacOverview.spec.d.ts}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const TacOverviewWithError: () => React.ReactElement;
|
|
7
|
+
export declare const TacOverviewWithDifferentTAC: () => React.ReactElement;
|
|
8
|
+
export declare const TacOverviewLightTheme: {
|
|
9
|
+
(): React.ReactElement;
|
|
10
|
+
storyName: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const TacOverviewDarkTheme: {
|
|
13
|
+
(): React.ReactElement;
|
|
14
|
+
storyName: string;
|
|
15
|
+
};
|
|
@@ -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
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TafFromBackend } from '../../../types';
|
|
3
|
+
interface TafPanelProps {
|
|
4
|
+
tafFromBackend: TafFromBackend;
|
|
5
|
+
activeTafIndex: number;
|
|
6
|
+
index: number;
|
|
7
|
+
onPostTaf: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const TafPanel: React.FC<TafPanelProps>;
|
|
10
|
+
export default TafPanel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TafPanel } from './TafPanel';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Moment } from 'moment';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { TafFromBackend, TimeSlot } from '../../../types';
|
|
4
|
+
interface TopTabsProps {
|
|
5
|
+
timeSlot: TimeSlot;
|
|
6
|
+
tafFromBackend: TafFromBackend;
|
|
7
|
+
onChangeTimeSlot?: (timeSlot: TimeSlot) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const formatBaseTime: (time: Moment) => string;
|
|
10
|
+
declare const TopTabs: React.FC<TopTabsProps>;
|
|
11
|
+
export default TopTabs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const TopTabsLightTheme: {
|
|
7
|
+
(): React.ReactElement;
|
|
8
|
+
storyName: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const TopTabsDarkTheme: {
|
|
11
|
+
(): React.ReactElement;
|
|
12
|
+
storyName: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TopTabs } from './TopTabs';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Moment } from 'moment';
|
|
2
|
+
import { TafConfigLocation, TafConfigLocations, TafFromBackend, TafStatus, TimeSlot } from '../../types';
|
|
3
|
+
export declare const getLocationSetting: (location: string, locationSettings?: TafConfigLocations) => TafConfigLocation;
|
|
4
|
+
export declare const sortTafsOnLocation: (tafList: TafFromBackend[], locationOrder?: string[]) => TafFromBackend[];
|
|
5
|
+
export declare const getBaseTime: (baseTime: string, location: string) => {
|
|
6
|
+
currentBaseTime: Moment;
|
|
7
|
+
nextBaseTime: Moment;
|
|
8
|
+
};
|
|
9
|
+
export declare const getTafTimeSlot: (baseTime: string, location: string, status: TafStatus) => TimeSlot;
|
|
10
|
+
export declare const sortTafTimeSlots: (tafList: TafFromBackend[]) => {
|
|
11
|
+
current: TafFromBackend[];
|
|
12
|
+
upcoming: TafFromBackend[];
|
|
13
|
+
expired: TafFromBackend[];
|
|
14
|
+
};
|
|
15
|
+
export declare const muiTabA11yProps: (index: number) => {
|
|
16
|
+
id: string;
|
|
17
|
+
'aria-controls': string;
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TafModule } from './TafModule';
|
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';
|
|
@@ -127,3 +127,19 @@ export interface TafFromFrontEnd {
|
|
|
127
127
|
taf: Taf;
|
|
128
128
|
changeStatusTo: TafStatus;
|
|
129
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* TAF (json) settings (libs/taf/src/lib/utils/tafConfig.json)
|
|
132
|
+
*/
|
|
133
|
+
export declare type TafConfigLocation = {
|
|
134
|
+
validity_duration: number;
|
|
135
|
+
activity_period: number;
|
|
136
|
+
label: string;
|
|
137
|
+
};
|
|
138
|
+
export declare type TafConfigLocations = Record<string, TafConfigLocation>;
|
|
139
|
+
export interface TafConfig {
|
|
140
|
+
location_indicator_mwo: string;
|
|
141
|
+
locations: TafConfigLocations;
|
|
142
|
+
locationOrder: string[];
|
|
143
|
+
}
|
|
144
|
+
export declare type TimeSlot = 'UPCOMING' | 'ACTIVE' | 'EXPIRED';
|
|
145
|
+
export declare type TafFormViewMode = 'edit' | 'view';
|