@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.
Files changed (95) hide show
  1. package/README.md +2 -2
  2. package/index.d.ts +1 -3
  3. package/index.esm.js +1661 -1359
  4. package/index.umd.js +1778 -1368
  5. package/lib/TafDemo.stories.d.ts +2 -2
  6. package/lib/components/IssuesPane/IssuesButton.d.ts +8 -2
  7. package/lib/components/IssuesPane/IssuesPane.d.ts +5 -0
  8. package/lib/components/IssuesPane/IssuesPane.stories.d.ts +12 -3
  9. package/lib/components/Spinner/Spinner.d.ts +2 -1
  10. package/lib/components/StatusIcon/StatusIcon.d.ts +8 -0
  11. package/lib/components/{ContentDialog/ContentDialog.spec.d.ts → StatusIcon/StatusIcon.spec.d.ts} +0 -0
  12. package/lib/components/TabPanel/TabPanel.d.ts +8 -0
  13. package/lib/components/{TafForm/TafFormDialog/TafFormDialog.spec.d.ts → TabPanel/TabPanel.spec.d.ts} +0 -0
  14. package/lib/components/TabPanel/index.d.ts +1 -0
  15. package/lib/components/TafForm/TafForm.d.ts +3 -20
  16. package/lib/components/TafForm/TafFormButtons/TafFormButtons.d.ts +5 -9
  17. package/lib/components/TafForm/TafFormButtons/TafFormOptionsButton.d.ts +11 -0
  18. package/lib/components/TafForm/{TafFormRow/change.spec.d.ts → TafFormButtons/TafFormOptionsButton.spec.d.ts} +0 -0
  19. package/lib/components/TafForm/TafFormRow/types.d.ts +3 -2
  20. package/lib/components/TafForm/TafFormRow/{change.d.ts → validations/change.d.ts} +0 -0
  21. package/lib/components/TafForm/TafFormRow/{clouds.spec.d.ts → validations/change.spec.d.ts} +0 -0
  22. package/lib/components/TafForm/TafFormRow/{clouds.d.ts → validations/clouds.d.ts} +1 -1
  23. package/lib/components/TafForm/TafFormRow/{probability.spec.d.ts → validations/clouds.spec.d.ts} +0 -0
  24. package/lib/components/TafForm/TafFormRow/{probability.d.ts → validations/probability.d.ts} +0 -0
  25. package/lib/components/TafForm/TafFormRow/{utils.spec.d.ts → validations/probability.spec.d.ts} +0 -0
  26. package/lib/components/TafForm/TafFormRow/{utils.d.ts → validations/utils.d.ts} +0 -0
  27. package/lib/components/{TafList → TafForm/TafFormRow/validations}/utils.spec.d.ts +0 -0
  28. package/lib/components/TafForm/TafFormRow/{validField.d.ts → validations/validField.d.ts} +1 -1
  29. package/lib/components/TafForm/TafFormRow/{validField.spec.d.ts → validations/validField.spec.d.ts} +0 -0
  30. package/lib/components/TafForm/TafFormRow/{visibility.d.ts → validations/visibility.d.ts} +1 -1
  31. package/lib/components/TafForm/TafFormRow/{visibility.spec.d.ts → validations/visibility.spec.d.ts} +0 -0
  32. package/lib/components/TafForm/TafFormRow/{weather.d.ts → validations/weather.d.ts} +1 -1
  33. package/lib/components/TafForm/TafFormRow/{weather.spec.d.ts → validations/weather.spec.d.ts} +0 -0
  34. package/lib/components/TafForm/TafFormRow/{wind.d.ts → validations/wind.d.ts} +1 -1
  35. package/lib/components/TafForm/TafFormRow/{wind.spec.d.ts → validations/wind.spec.d.ts} +0 -0
  36. package/lib/components/TafForm/TafFormWrapper.d.ts +3 -6
  37. package/lib/components/TafForm/TafFormWrapper.stories.d.ts +20 -0
  38. package/lib/components/TafForm/index.d.ts +0 -1
  39. package/lib/components/TafForm/utils.d.ts +25 -2
  40. package/lib/components/TafHeader/TafHeader.d.ts +6 -0
  41. package/lib/components/{TafList/TafList.spec.d.ts → TafHeader/TafHeader.spec.d.ts} +0 -0
  42. package/lib/components/TafLayout/LocationTabs/LocationTabs.d.ts +10 -0
  43. package/lib/components/{TafList/TafListAccordion.spec.d.ts → TafLayout/LocationTabs/LocationTabs.spec.d.ts} +0 -0
  44. package/lib/components/TafLayout/LocationTabs/LocationTabs.stories.d.ts +13 -0
  45. package/lib/components/TafLayout/LocationTabs/index.d.ts +1 -0
  46. package/lib/components/TafLayout/TacOverview/TacContainer.d.ts +8 -0
  47. package/lib/components/{TafList/TafListButtons.spec.d.ts → TafLayout/TacOverview/TacContainer.spec.d.ts} +0 -0
  48. package/lib/components/TafLayout/TacOverview/TacOverview.d.ts +11 -0
  49. package/lib/components/{TafList/TafListRow.spec.d.ts → TafLayout/TacOverview/TacOverview.spec.d.ts} +0 -0
  50. package/lib/components/TafLayout/TacOverview/TacOverview.stories.d.ts +15 -0
  51. package/lib/components/TafLayout/TacOverview/TacOverviewMobile.d.ts +11 -0
  52. package/lib/components/{TafList/TafListSection.spec.d.ts → TafLayout/TacOverview/TacOverviewMobile.spec.d.ts} +0 -0
  53. package/lib/components/TafLayout/TacOverview/TacOverviewMobile.stories.d.ts +23 -0
  54. package/lib/components/TafLayout/TacOverview/index.d.ts +2 -0
  55. package/lib/components/TafLayout/TafLayout.d.ts +8 -0
  56. package/lib/components/{TafWrapper/TafWrapper.spec.d.ts → TafLayout/TafLayout.spec.d.ts} +0 -0
  57. package/lib/components/TafLayout/TafLayout.stories.d.ts +7 -0
  58. package/lib/components/TafLayout/TafPanel/TafPanel.d.ts +10 -0
  59. package/lib/components/TafLayout/TafPanel/TafPanel.spec.d.ts +1 -0
  60. package/lib/components/TafLayout/TafPanel/index.d.ts +1 -0
  61. package/lib/components/TafLayout/TopTabs/TopTabs.d.ts +11 -0
  62. package/lib/components/TafLayout/TopTabs/TopTabs.spec.d.ts +1 -0
  63. package/lib/components/TafLayout/TopTabs/TopTabs.stories.d.ts +13 -0
  64. package/lib/components/TafLayout/TopTabs/index.d.ts +1 -0
  65. package/lib/components/TafLayout/utils.d.ts +18 -0
  66. package/lib/components/TafLayout/utils.spec.d.ts +1 -0
  67. package/lib/components/TafModule/TafModule.d.ts +3 -0
  68. package/lib/components/TafModule/TafModule.spec.d.ts +1 -0
  69. package/lib/components/TafModule/TafModule.stories.d.ts +9 -0
  70. package/lib/components/TafModule/index.d.ts +1 -0
  71. package/lib/types.d.ts +17 -1
  72. package/lib/utils/__mocks__/api.d.ts +1 -0
  73. package/lib/utils/fakeApi.d.ts +1 -1
  74. package/lib/utils/mockdata/fakeTafList.d.ts +1 -0
  75. package/lib/utils/testUtils.d.ts +4 -5
  76. package/package.json +7 -6
  77. package/lib/components/ContentDialog/ContentDialog.d.ts +0 -14
  78. package/lib/components/ContentDialog/ContentDialog.stories.d.ts +0 -7
  79. package/lib/components/ContentDialog/index.d.ts +0 -1
  80. package/lib/components/IssuesPane/IssuesPane.styles.d.ts +0 -1
  81. package/lib/components/TafForm/TafForm.styles.d.ts +0 -1
  82. package/lib/components/TafForm/TafFormDialog/TafFormDialog.d.ts +0 -12
  83. package/lib/components/TafForm/TafFormDialog/TafFormDialog.stories.d.ts +0 -9
  84. package/lib/components/TafList/TafList.d.ts +0 -11
  85. package/lib/components/TafList/TafList.stories.d.ts +0 -8
  86. package/lib/components/TafList/TafListAccordion.d.ts +0 -11
  87. package/lib/components/TafList/TafListButtons.d.ts +0 -9
  88. package/lib/components/TafList/TafListRow.d.ts +0 -12
  89. package/lib/components/TafList/TafListSection.d.ts +0 -12
  90. package/lib/components/TafList/TafListSection.stories.d.ts +0 -18
  91. package/lib/components/TafList/index.d.ts +0 -3
  92. package/lib/components/TafList/utils.d.ts +0 -4
  93. package/lib/components/TafWrapper/TafWrapper.d.ts +0 -13
  94. package/lib/components/TafWrapper/index.d.ts +0 -1
  95. package/lib/utils/utils.d.ts +0 -3
@@ -3,5 +3,5 @@ declare const _default: {
3
3
  title: string;
4
4
  };
5
5
  export default _default;
6
- export declare const TafDialogDemo: () => React.ReactElement;
7
- export declare const TafDialogDemoWithErrorOnAction: () => React.ReactElement;
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
- togglePane: () => void;
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: () => React.ReactElement;
7
- export declare const OneIssue: () => React.ReactElement;
8
- export declare const MultipleIssues: () => React.ReactElement;
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
+ };
@@ -1,3 +1,4 @@
1
+ import { CircularProgressProps } from '@mui/material';
1
2
  import React from 'react';
2
- declare const Spinner: React.FC;
3
+ declare const Spinner: React.FC<CircularProgressProps>;
3
4
  export default Spinner;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { TafStatus, TimeSlot } from '../../types';
3
+ interface StatusIconProps {
4
+ timeSlot: TimeSlot;
5
+ status: TafStatus;
6
+ }
7
+ declare const StatusIcon: React.FC<StatusIconProps>;
8
+ export default StatusIcon;
@@ -0,0 +1,8 @@
1
+ import { BoxProps } from '@mui/material';
2
+ import React from 'react';
3
+ interface TabPanelProps extends BoxProps {
4
+ index: number;
5
+ value: number;
6
+ }
7
+ declare const TabPanel: React.FC<TabPanelProps>;
8
+ export default TabPanel;
@@ -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
- onFormAction?: (action: TafActions, formValues?: BaseTaf) => void;
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 { FieldError } from 'react-hook-form';
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
- onTafFormButtonPress: (action: any) => void;
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;
@@ -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
- onAddChangeGroup?: (index: number) => void;
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
  }
@@ -1,4 +1,4 @@
1
- import { Clouds } from '../../../types';
1
+ import { Clouds } from '../../../../types';
2
2
  declare type CloudStrings = {
3
3
  cloud1: string;
4
4
  cloud2?: string;
@@ -1,4 +1,4 @@
1
- import { ChangeGroupFormData, Valid } from '../../../types';
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;
@@ -1,4 +1,4 @@
1
- import { Visibility } from '../../../types';
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;
@@ -1,4 +1,4 @@
1
- import { Weather } from '../../../types';
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";
@@ -1,4 +1,4 @@
1
- import { Wind } from '../../../types';
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;
@@ -1,14 +1,11 @@
1
1
  import React from 'react';
2
- import { Taf, TafActions, TafFormData, TafFromBackend } from '../../types';
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: string;
4
+ mode: TafFormViewMode;
8
5
  tafFromBackend: TafFromBackend;
9
6
  tafAction?: TafActions;
10
7
  TAC?: string;
11
- onFormAction?: (action: TafActions, formValues?: Taf) => void;
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,2 +1 @@
1
1
  export { default as TafFormWrapper } from './TafFormWrapper';
2
- export { default as TafFormDialog } from './TafFormDialog/TafFormDialog';
@@ -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 getConfirmationDialogContent: (action: TafActions, isFormDirty?: boolean) => string;
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 {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface TafHeaderProps {
3
+ title: string;
4
+ }
5
+ declare const TafHeader: React.FC<TafHeaderProps>;
6
+ export default TafHeader;
@@ -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;
@@ -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';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Taf } from '../../../types';
3
+ interface TacContainerProps {
4
+ taf: Taf;
5
+ isActive?: boolean;
6
+ }
7
+ declare const TacContainer: React.FC<TacContainerProps>;
8
+ export default TacContainer;
@@ -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;
@@ -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;
@@ -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
+ };
@@ -0,0 +1,2 @@
1
+ export { default as TacOverview } from './TacOverview';
2
+ export { default as TacOverviewMobile } from './TacOverviewMobile';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { TafFromBackend } from '../../types';
3
+ interface TafLayoutProps {
4
+ tafList: TafFromBackend[];
5
+ onPostTaf: () => void;
6
+ }
7
+ declare const TafLayout: React.FC<TafLayoutProps>;
8
+ export default TafLayout;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const TafLayoutLightTheme: () => React.ReactElement;
7
+ export declare const TafLayoutDarkTheme: () => React.ReactElement;
@@ -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 { 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,3 @@
1
+ import * as React from 'react';
2
+ declare const Wrapper: React.FC;
3
+ export default Wrapper;
@@ -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' | 'PUBLISHED' | 'CORRECTED' | 'AMENDED' | 'CANCELLED' | 'EXPIRED' | 'DRAFT_AMENDED' | 'DRAFT_CORRECTED';
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';