@opengeoweb/taf 9.28.1 → 9.29.1

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 (122) hide show
  1. package/index.esm.js +188 -180
  2. package/package.json +1 -1
  3. package/src/index.d.ts +8 -8
  4. package/src/lib/TafDemo.stories.d.ts +23 -23
  5. package/src/lib/components/ComponentsLookUp/ComponentsLookUp.d.ts +32 -32
  6. package/src/lib/components/ComponentsLookUp/ComponentsLookUp.spec.d.ts +1 -1
  7. package/src/lib/components/ComponentsLookUp/index.d.ts +1 -1
  8. package/src/lib/components/IssuesPane/IssuesButton.d.ts +10 -10
  9. package/src/lib/components/IssuesPane/IssuesButton.spec.d.ts +1 -1
  10. package/src/lib/components/IssuesPane/IssuesPane.d.ts +14 -14
  11. package/src/lib/components/IssuesPane/IssuesPane.spec.d.ts +1 -1
  12. package/src/lib/components/IssuesPane/IssuesPane.stories.d.ts +17 -17
  13. package/src/lib/components/IssuesPane/IssuesPaneWrapper.d.ts +4 -4
  14. package/src/lib/components/IssuesPane/IssuesPaneWrapper.spec.d.ts +1 -1
  15. package/src/lib/components/IssuesPane/index.d.ts +2 -2
  16. package/src/lib/components/IssuesPane/types.d.ts +16 -16
  17. package/src/lib/components/IssuesPane/utils.d.ts +8 -8
  18. package/src/lib/components/IssuesPane/utils.spec.d.ts +1 -1
  19. package/src/lib/components/Providers/Providers.d.ts +19 -19
  20. package/src/lib/components/Providers/index.d.ts +1 -1
  21. package/src/lib/components/ResponsiveWrapper/ResponsiveWrapper.d.ts +4 -4
  22. package/src/lib/components/ResponsiveWrapper/ResponsiveWrapper.spec.d.ts +1 -1
  23. package/src/lib/components/Spinner/Spinner.d.ts +4 -4
  24. package/src/lib/components/Spinner/Spinner.spec.d.ts +1 -1
  25. package/src/lib/components/Spinner/Spinner.stories.d.ts +6 -6
  26. package/src/lib/components/StatusIcon/StatusIcon.d.ts +8 -8
  27. package/src/lib/components/StatusIcon/StatusIcon.spec.d.ts +1 -1
  28. package/src/lib/components/TabPanel/TabPanel.d.ts +8 -8
  29. package/src/lib/components/TabPanel/TabPanel.spec.d.ts +1 -1
  30. package/src/lib/components/TabPanel/index.d.ts +1 -1
  31. package/src/lib/components/TafAvatar/TafAvatar.d.ts +8 -8
  32. package/src/lib/components/TafAvatar/index.d.ts +1 -1
  33. package/src/lib/components/TafForm/TafForm.d.ts +16 -16
  34. package/src/lib/components/TafForm/TafForm.editor.spec.d.ts +1 -1
  35. package/src/lib/components/TafForm/TafForm.spec.d.ts +1 -1
  36. package/src/lib/components/TafForm/TafForm.statusChanges.spec.d.ts +1 -1
  37. package/src/lib/components/TafForm/TafForm.stories.d.ts +45 -45
  38. package/src/lib/components/TafForm/TafForm.validations.spec.d.ts +1 -1
  39. package/src/lib/components/TafForm/TafFormButtons/TafFormButtons.d.ts +12 -12
  40. package/src/lib/components/TafForm/TafFormButtons/TafFormButtons.spec.d.ts +1 -1
  41. package/src/lib/components/TafForm/TafFormButtons/TafFormOptionsButton.d.ts +11 -11
  42. package/src/lib/components/TafForm/TafFormButtons/TafFormOptionsButton.spec.d.ts +1 -1
  43. package/src/lib/components/TafForm/TafFormRow/DragHandle.d.ts +8 -8
  44. package/src/lib/components/TafForm/TafFormRow/DragHandle.spec.d.ts +1 -1
  45. package/src/lib/components/TafForm/TafFormRow/TafFormRow.d.ts +4 -4
  46. package/src/lib/components/TafForm/TafFormRow/TafFormRow.spec.d.ts +1 -1
  47. package/src/lib/components/TafForm/TafFormRow/TafFormTextField.d.ts +26 -26
  48. package/src/lib/components/TafForm/TafFormRow/TafFormTextField.spec.d.ts +1 -1
  49. package/src/lib/components/TafForm/TafFormRow/types.d.ts +32 -32
  50. package/src/lib/components/TafForm/TafFormRow/validations/change.d.ts +4 -4
  51. package/src/lib/components/TafForm/TafFormRow/validations/change.spec.d.ts +1 -1
  52. package/src/lib/components/TafForm/TafFormRow/validations/clouds.d.ts +34 -34
  53. package/src/lib/components/TafForm/TafFormRow/validations/clouds.spec.d.ts +1 -1
  54. package/src/lib/components/TafForm/TafFormRow/validations/probability.d.ts +2 -2
  55. package/src/lib/components/TafForm/TafFormRow/validations/probability.spec.d.ts +1 -1
  56. package/src/lib/components/TafForm/TafFormRow/validations/utils.d.ts +2 -2
  57. package/src/lib/components/TafForm/TafFormRow/validations/utils.spec.d.ts +1 -1
  58. package/src/lib/components/TafForm/TafFormRow/validations/validField.d.ts +21 -21
  59. package/src/lib/components/TafForm/TafFormRow/validations/validField.spec.d.ts +1 -1
  60. package/src/lib/components/TafForm/TafFormRow/validations/visibility.d.ts +12 -12
  61. package/src/lib/components/TafForm/TafFormRow/validations/visibility.spec.d.ts +1 -1
  62. package/src/lib/components/TafForm/TafFormRow/validations/weather.d.ts +15 -15
  63. package/src/lib/components/TafForm/TafFormRow/validations/weather.spec.d.ts +1 -1
  64. package/src/lib/components/TafForm/TafFormRow/validations/wind.d.ts +16 -16
  65. package/src/lib/components/TafForm/TafFormRow/validations/wind.spec.d.ts +1 -1
  66. package/src/lib/components/TafForm/index.d.ts +1 -1
  67. package/src/lib/components/TafForm/utils.d.ts +74 -74
  68. package/src/lib/components/TafForm/utils.spec.d.ts +1 -1
  69. package/src/lib/components/TafHeader/TafHeader.d.ts +8 -8
  70. package/src/lib/components/TafHeader/TafHeader.spec.d.ts +1 -1
  71. package/src/lib/components/TafLayout/LocationTabs/LocationTabs.d.ts +10 -10
  72. package/src/lib/components/TafLayout/LocationTabs/LocationTabs.spec.d.ts +1 -1
  73. package/src/lib/components/TafLayout/LocationTabs/LocationTabs.stories.d.ts +13 -13
  74. package/src/lib/components/TafLayout/LocationTabs/index.d.ts +1 -1
  75. package/src/lib/components/TafLayout/TacOverview/AdverseWeatherTacMessage.d.ts +8 -8
  76. package/src/lib/components/TafLayout/TacOverview/AdverseWeatherTacMessage.spec.d.ts +1 -1
  77. package/src/lib/components/TafLayout/TacOverview/AdverseWeatherTacMessage.stories.d.ts +25 -25
  78. package/src/lib/components/TafLayout/TacOverview/ExportButton.d.ts +7 -7
  79. package/src/lib/components/TafLayout/TacOverview/ExportButton.spec.d.ts +1 -1
  80. package/src/lib/components/TafLayout/TacOverview/TacContainer.d.ts +9 -9
  81. package/src/lib/components/TafLayout/TacOverview/TacContainer.spec.d.ts +1 -1
  82. package/src/lib/components/TafLayout/TacOverview/TacOverview.d.ts +12 -12
  83. package/src/lib/components/TafLayout/TacOverview/TacOverview.spec.d.ts +1 -1
  84. package/src/lib/components/TafLayout/TacOverview/TacOverview.stories.d.ts +23 -23
  85. package/src/lib/components/TafLayout/TacOverview/TacOverviewMobile.d.ts +11 -11
  86. package/src/lib/components/TafLayout/TacOverview/TacOverviewMobile.spec.d.ts +1 -1
  87. package/src/lib/components/TafLayout/TacOverview/TacOverviewMobile.stories.d.ts +23 -23
  88. package/src/lib/components/TafLayout/TacOverview/index.d.ts +2 -2
  89. package/src/lib/components/TafLayout/TafLayout.d.ts +16 -16
  90. package/src/lib/components/TafLayout/TafLayout.issuespane.spec.d.ts +1 -1
  91. package/src/lib/components/TafLayout/TafLayout.snackbar.spec.d.ts +1 -1
  92. package/src/lib/components/TafLayout/TafLayout.spec.d.ts +1 -1
  93. package/src/lib/components/TafLayout/TafLayout.stories.d.ts +15 -15
  94. package/src/lib/components/TafLayout/TafLayout.tacoverview.spec.d.ts +1 -1
  95. package/src/lib/components/TafLayout/TafPanel/TafPanel.d.ts +35 -35
  96. package/src/lib/components/TafLayout/TafPanel/TafPanel.spec.d.ts +1 -1
  97. package/src/lib/components/TafLayout/TafPanel/TafPanel.stories.d.ts +22 -22
  98. package/src/lib/components/TafLayout/TafPanel/index.d.ts +1 -1
  99. package/src/lib/components/TafLayout/TopTabs/TopTabs.d.ts +10 -10
  100. package/src/lib/components/TafLayout/TopTabs/TopTabs.spec.d.ts +1 -1
  101. package/src/lib/components/TafLayout/TopTabs/TopTabs.stories.d.ts +13 -13
  102. package/src/lib/components/TafLayout/TopTabs/index.d.ts +1 -1
  103. package/src/lib/components/TafLayout/utils.d.ts +23 -23
  104. package/src/lib/components/TafLayout/utils.spec.d.ts +1 -1
  105. package/src/lib/components/TafModule/TafModule.d.ts +5 -5
  106. package/src/lib/components/TafModule/TafModule.spec.d.ts +1 -1
  107. package/src/lib/components/TafModule/TafModule.stories.d.ts +28 -28
  108. package/src/lib/components/TafModule/TafModuleProvider.d.ts +23 -23
  109. package/src/lib/components/TafModule/index.d.ts +1 -1
  110. package/src/lib/components/TafWrapper/TafWrapper.d.ts +4 -4
  111. package/src/lib/components/TafWrapper/TafWrapper.spec.d.ts +1 -1
  112. package/src/lib/components/TafWrapper/index.d.ts +1 -1
  113. package/src/lib/types.d.ts +158 -158
  114. package/src/lib/utils/__mocks__/api.d.ts +15 -15
  115. package/src/lib/utils/api.d.ts +13 -13
  116. package/src/lib/utils/api.spec.d.ts +1 -1
  117. package/src/lib/utils/dateFormats.d.ts +2 -2
  118. package/src/lib/utils/fakeApi.d.ts +3 -3
  119. package/src/lib/utils/fakeApi.spec.d.ts +1 -1
  120. package/src/lib/utils/i18n.d.ts +6 -6
  121. package/src/lib/utils/mockdata/fakeTafList.d.ts +25 -25
  122. package/src/lib/utils/weatherPhenomena.d.ts +422 -422
@@ -1,28 +1,28 @@
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 TafModuleWithNewData: () => React.ReactElement;
9
- export declare const TafModuleLightTheme: {
10
- (): React.ReactElement;
11
- parameters: {
12
- zeplinLink: {
13
- name: string;
14
- link: string;
15
- }[];
16
- };
17
- };
18
- export declare const TafModuleDarkTheme: {
19
- (): React.ReactElement;
20
- parameters: {
21
- zeplinLink: {
22
- name: string;
23
- link: string;
24
- }[];
25
- };
26
- };
27
- export declare const TafModuleToolContainerExample: () => React.ReactElement;
28
- export declare const TafModulePublishDraftAmendmentExample: () => React.ReactElement;
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 TafModuleWithNewData: () => React.ReactElement;
9
+ export declare const TafModuleLightTheme: {
10
+ (): React.ReactElement;
11
+ parameters: {
12
+ zeplinLink: {
13
+ name: string;
14
+ link: string;
15
+ }[];
16
+ };
17
+ };
18
+ export declare const TafModuleDarkTheme: {
19
+ (): React.ReactElement;
20
+ parameters: {
21
+ zeplinLink: {
22
+ name: string;
23
+ link: string;
24
+ }[];
25
+ };
26
+ };
27
+ export declare const TafModuleToolContainerExample: () => React.ReactElement;
28
+ export declare const TafModulePublishDraftAmendmentExample: () => React.ReactElement;
@@ -1,23 +1,23 @@
1
- import * as React from 'react';
2
- import { FieldValues, UseFieldArrayReturn } from 'react-hook-form';
3
- import { BaseTaf, TafActions } from '../../types';
4
- type ValidateFormPromise = () => Promise<void | BaseTaf>;
5
- interface TafModuleMethods {
6
- onPreventCloseView?: (shouldPreventClose: boolean) => void;
7
- }
8
- interface TafModuleContextState {
9
- onValidateForm: ValidateFormPromise;
10
- registerValidateForm: (promiseToRegister: ValidateFormPromise) => void;
11
- tafAction: TafActions;
12
- setTafAction: (action: TafActions) => void;
13
- onPreventCloseView: (shouldPreventClose: boolean) => void;
14
- useFieldArrayMethods: UseFieldArrayReturn<FieldValues, string>;
15
- }
16
- declare const TafModuleContext: React.Context<TafModuleContextState>;
17
- export declare const useTafModuleContext: () => Partial<TafModuleContextState>;
18
- export declare const useTafModuleState: ({ onPreventCloseView, }: TafModuleMethods) => TafModuleContextState;
19
- export interface TafModuleProviderProps extends TafModuleMethods {
20
- children?: React.ReactNode;
21
- }
22
- export declare const TafModuleProvider: React.FC<TafModuleProviderProps>;
23
- export default TafModuleContext;
1
+ import * as React from 'react';
2
+ import { FieldValues, UseFieldArrayReturn } from 'react-hook-form';
3
+ import { BaseTaf, TafActions } from '../../types';
4
+ type ValidateFormPromise = () => Promise<void | BaseTaf>;
5
+ interface TafModuleMethods {
6
+ onPreventCloseView?: (shouldPreventClose: boolean) => void;
7
+ }
8
+ interface TafModuleContextState {
9
+ onValidateForm: ValidateFormPromise;
10
+ registerValidateForm: (promiseToRegister: ValidateFormPromise) => void;
11
+ tafAction: TafActions;
12
+ setTafAction: (action: TafActions) => void;
13
+ onPreventCloseView: (shouldPreventClose: boolean) => void;
14
+ useFieldArrayMethods: UseFieldArrayReturn<FieldValues, string>;
15
+ }
16
+ declare const TafModuleContext: React.Context<TafModuleContextState>;
17
+ export declare const useTafModuleContext: () => Partial<TafModuleContextState>;
18
+ export declare const useTafModuleState: ({ onPreventCloseView, }: TafModuleMethods) => TafModuleContextState;
19
+ export interface TafModuleProviderProps extends TafModuleMethods {
20
+ children?: React.ReactNode;
21
+ }
22
+ export declare const TafModuleProvider: React.FC<TafModuleProviderProps>;
23
+ export default TafModuleContext;
@@ -1 +1 @@
1
- export { default as TafModule } from './TafModule';
1
+ export { default as TafModule } from './TafModule';
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
2
- import { TafModuleProviderProps } from '../TafModule/TafModuleProvider';
3
- declare const TafWrapper: React.FC<TafModuleProviderProps>;
4
- export default TafWrapper;
1
+ import * as React from 'react';
2
+ import { TafModuleProviderProps } from '../TafModule/TafModuleProvider';
3
+ declare const TafWrapper: React.FC<TafModuleProviderProps>;
4
+ export default TafWrapper;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +1 @@
1
- export { default as TafWrapper } from './TafWrapper';
1
+ export { default as TafWrapper } from './TafWrapper';
@@ -1,158 +1,158 @@
1
- import { WeatherPhenomena } from './utils/weatherPhenomena';
2
- export interface Visibility {
3
- range: number;
4
- unit: string;
5
- }
6
- export interface Wind {
7
- direction: number | string;
8
- speed: number | string;
9
- gust?: number | string;
10
- unit: 'KT';
11
- }
12
- export type NSW = 'NSW';
13
- export interface Weather {
14
- weather1: WeatherPhenomena | NSW;
15
- weather2?: WeatherPhenomena | NSW;
16
- weather3?: WeatherPhenomena | NSW;
17
- }
18
- export type CloudCoverage = 'FEW' | 'SCT' | 'BKN' | 'OVC';
19
- export type CloudType = 'CB' | 'TCU';
20
- export interface Cloud {
21
- coverage: CloudCoverage;
22
- height: number | null;
23
- type?: CloudType;
24
- }
25
- export type NSC = 'NSC';
26
- export interface VerticalVisibility {
27
- verticalVisibility: number;
28
- }
29
- export interface Clouds {
30
- cloud1: Cloud | VerticalVisibility | NSC;
31
- cloud2?: Cloud;
32
- cloud3?: Cloud;
33
- cloud4?: Cloud;
34
- }
35
- export type TafDate = string;
36
- export interface Valid {
37
- start: TafDate;
38
- end?: TafDate;
39
- }
40
- export interface BaseForecast {
41
- valid: Valid;
42
- visibility?: Visibility;
43
- wind?: Wind;
44
- weather?: Weather;
45
- cloud?: Clouds;
46
- cavOK?: boolean;
47
- }
48
- export type Change = 'TEMPO' | 'BECMG' | 'FM';
49
- export interface ChangeGroup extends BaseForecast {
50
- change: Change;
51
- probability?: 'PROB30' | 'PROB40';
52
- }
53
- export type MessageType = 'ORG' | 'AMD' | 'COR' | 'CNL';
54
- export type Location = 'EHAM' | 'EHRD' | 'EHGG' | 'EHBK' | 'EHLE' | 'TNCB';
55
- export interface BaseTaf {
56
- validDateStart: TafDate;
57
- validDateEnd: TafDate;
58
- baseTime: TafDate;
59
- previousId?: string;
60
- previousValidDateStart?: TafDate;
61
- previousValidDateEnd?: TafDate;
62
- location: Location;
63
- baseForecast: BaseForecast;
64
- changeGroups?: ChangeGroup[];
65
- messageType: MessageType;
66
- uuid: string;
67
- issueDate?: TafDate;
68
- }
69
- export type TafStatus = 'NEW' | 'DRAFT' | 'DRAFT_AMENDED' | 'DRAFT_CORRECTED' | 'PUBLISHED' | 'CORRECTED' | 'AMENDED' | 'CANCELLED' | 'EXPIRED';
70
- export type TafActions = 'NEW' | 'DRAFT' | 'DRAFT_AMEND' | 'DRAFT_CORRECT' | 'PUBLISH' | 'CANCEL' | 'CORRECT' | 'AMEND' | 'CLOSE' | 'CLEAR';
71
- export type TafCanbe = 'DRAFTED' | 'DISCARDED' | 'PUBLISHED' | 'CANCELLED' | 'AMENDED' | 'CORRECTED';
72
- export interface Taf extends BaseTaf {
73
- status: TafStatus;
74
- }
75
- export interface BaseForecastFormData {
76
- valid: string;
77
- visibility?: string;
78
- wind?: string;
79
- weather?: WeatherStrings;
80
- cloud?: CloudStrings;
81
- cavOK?: boolean;
82
- }
83
- export interface ChangeGroupFormData extends BaseForecastFormData {
84
- probability?: string;
85
- change: string;
86
- }
87
- export interface TafFormData {
88
- IS_DRAFT?: boolean;
89
- validDateStart: string;
90
- validDateEnd: string;
91
- baseTime: string;
92
- previousId?: string;
93
- previousValidDateStart?: string;
94
- previousValidDateEnd?: string;
95
- location: Location;
96
- baseForecast: BaseForecastFormData;
97
- changeGroups?: ChangeGroupFormData[];
98
- messageType: MessageType;
99
- uuid: string;
100
- issueDate?: string;
101
- status: TafStatus;
102
- }
103
- /**
104
- * Type with TAF info from the backend
105
- */
106
- export interface TafFromBackend {
107
- taf: Taf;
108
- creationDate: TafDate;
109
- canbe: TafCanbe[];
110
- editor: string;
111
- }
112
- /**
113
- * Type with TAF info sent to the backend
114
- */
115
- export interface TafFromFrontEnd {
116
- taf: Taf;
117
- changeStatusTo?: TafStatus;
118
- editor?: string;
119
- }
120
- /**
121
- * TAF (json) settings (libs/taf/src/lib/utils/tafConfig.json)
122
- */
123
- export interface TafConfigLocation {
124
- validity_duration: number;
125
- activity_period: number;
126
- label: string;
127
- }
128
- export type TafConfigLocations = Record<string, TafConfigLocation>;
129
- export interface TafConfig {
130
- location_indicator_mwo: string;
131
- locations: TafConfigLocations;
132
- locationOrder: string[];
133
- }
134
- export type TimeSlot = 'UPCOMING' | 'ACTIVE' | 'EXPIRED';
135
- export interface AdverseWeatherTAC {
136
- tac: {
137
- text: string;
138
- type?: string;
139
- }[][];
140
- }
141
- export type TAC = string | AdverseWeatherTAC;
142
- export interface CloudStrings {
143
- cloud1: string;
144
- cloud2?: string;
145
- cloud3?: string;
146
- cloud4?: string;
147
- }
148
- export interface WeatherStrings {
149
- weather1: string;
150
- weather2?: string;
151
- weather3?: string;
152
- }
153
- export interface ConfigKey {
154
- key: string;
155
- size: number;
156
- minSize?: number;
157
- maxSize?: number;
158
- }
1
+ import { WeatherPhenomena } from './utils/weatherPhenomena';
2
+ export interface Visibility {
3
+ range: number;
4
+ unit: string;
5
+ }
6
+ export interface Wind {
7
+ direction: number | string;
8
+ speed: number | string;
9
+ gust?: number | string;
10
+ unit: 'KT';
11
+ }
12
+ export type NSW = 'NSW';
13
+ export interface Weather {
14
+ weather1: WeatherPhenomena | NSW;
15
+ weather2?: WeatherPhenomena | NSW;
16
+ weather3?: WeatherPhenomena | NSW;
17
+ }
18
+ export type CloudCoverage = 'FEW' | 'SCT' | 'BKN' | 'OVC';
19
+ export type CloudType = 'CB' | 'TCU';
20
+ export interface Cloud {
21
+ coverage: CloudCoverage;
22
+ height: number | null;
23
+ type?: CloudType;
24
+ }
25
+ export type NSC = 'NSC';
26
+ export interface VerticalVisibility {
27
+ verticalVisibility: number;
28
+ }
29
+ export interface Clouds {
30
+ cloud1: Cloud | VerticalVisibility | NSC;
31
+ cloud2?: Cloud;
32
+ cloud3?: Cloud;
33
+ cloud4?: Cloud;
34
+ }
35
+ export type TafDate = string;
36
+ export interface Valid {
37
+ start: TafDate;
38
+ end?: TafDate;
39
+ }
40
+ export interface BaseForecast {
41
+ valid: Valid;
42
+ visibility?: Visibility;
43
+ wind?: Wind;
44
+ weather?: Weather;
45
+ cloud?: Clouds;
46
+ cavOK?: boolean;
47
+ }
48
+ export type Change = 'TEMPO' | 'BECMG' | 'FM';
49
+ export interface ChangeGroup extends BaseForecast {
50
+ change: Change;
51
+ probability?: 'PROB30' | 'PROB40';
52
+ }
53
+ export type MessageType = 'ORG' | 'AMD' | 'COR' | 'CNL';
54
+ export type Location = 'EHAM' | 'EHRD' | 'EHGG' | 'EHBK' | 'EHLE' | 'TNCB';
55
+ export interface BaseTaf {
56
+ validDateStart: TafDate;
57
+ validDateEnd: TafDate;
58
+ baseTime: TafDate;
59
+ previousId?: string;
60
+ previousValidDateStart?: TafDate;
61
+ previousValidDateEnd?: TafDate;
62
+ location: Location;
63
+ baseForecast: BaseForecast;
64
+ changeGroups?: ChangeGroup[];
65
+ messageType: MessageType;
66
+ uuid: string;
67
+ issueDate?: TafDate;
68
+ }
69
+ export type TafStatus = 'NEW' | 'DRAFT' | 'DRAFT_AMENDED' | 'DRAFT_CORRECTED' | 'PUBLISHED' | 'CORRECTED' | 'AMENDED' | 'CANCELLED' | 'EXPIRED';
70
+ export type TafActions = 'NEW' | 'DRAFT' | 'DRAFT_AMEND' | 'DRAFT_CORRECT' | 'PUBLISH' | 'CANCEL' | 'CORRECT' | 'AMEND' | 'CLOSE' | 'CLEAR';
71
+ export type TafCanbe = 'DRAFTED' | 'DISCARDED' | 'PUBLISHED' | 'CANCELLED' | 'AMENDED' | 'CORRECTED';
72
+ export interface Taf extends BaseTaf {
73
+ status: TafStatus;
74
+ }
75
+ export interface BaseForecastFormData {
76
+ valid: string;
77
+ visibility?: string;
78
+ wind?: string;
79
+ weather?: WeatherStrings;
80
+ cloud?: CloudStrings;
81
+ cavOK?: boolean;
82
+ }
83
+ export interface ChangeGroupFormData extends BaseForecastFormData {
84
+ probability?: string;
85
+ change: string;
86
+ }
87
+ export interface TafFormData {
88
+ IS_DRAFT?: boolean;
89
+ validDateStart: string;
90
+ validDateEnd: string;
91
+ baseTime: string;
92
+ previousId?: string;
93
+ previousValidDateStart?: string;
94
+ previousValidDateEnd?: string;
95
+ location: Location;
96
+ baseForecast: BaseForecastFormData;
97
+ changeGroups?: ChangeGroupFormData[];
98
+ messageType: MessageType;
99
+ uuid: string;
100
+ issueDate?: string;
101
+ status: TafStatus;
102
+ }
103
+ /**
104
+ * Type with TAF info from the backend
105
+ */
106
+ export interface TafFromBackend {
107
+ taf: Taf;
108
+ creationDate: TafDate;
109
+ canbe: TafCanbe[];
110
+ editor: string;
111
+ }
112
+ /**
113
+ * Type with TAF info sent to the backend
114
+ */
115
+ export interface TafFromFrontEnd {
116
+ taf: Taf;
117
+ changeStatusTo?: TafStatus;
118
+ editor?: string;
119
+ }
120
+ /**
121
+ * TAF (json) settings (libs/taf/src/lib/utils/tafConfig.json)
122
+ */
123
+ export interface TafConfigLocation {
124
+ validity_duration: number;
125
+ activity_period: number;
126
+ label: string;
127
+ }
128
+ export type TafConfigLocations = Record<string, TafConfigLocation>;
129
+ export interface TafConfig {
130
+ location_indicator_mwo: string;
131
+ locations: TafConfigLocations;
132
+ locationOrder: string[];
133
+ }
134
+ export type TimeSlot = 'UPCOMING' | 'ACTIVE' | 'EXPIRED';
135
+ export interface AdverseWeatherTAC {
136
+ tac: {
137
+ text: string;
138
+ type?: string;
139
+ }[][];
140
+ }
141
+ export type TAC = string | AdverseWeatherTAC;
142
+ export interface CloudStrings {
143
+ cloud1: string;
144
+ cloud2?: string;
145
+ cloud3?: string;
146
+ cloud4?: string;
147
+ }
148
+ export interface WeatherStrings {
149
+ weather1: string;
150
+ weather2?: string;
151
+ weather3?: string;
152
+ }
153
+ export interface ConfigKey {
154
+ key: string;
155
+ size: number;
156
+ minSize?: number;
157
+ maxSize?: number;
158
+ }
@@ -1,15 +1,15 @@
1
- import { AdverseWeatherTAC, TAC, Taf, TafFromBackend } from '../../types';
2
- import { TafApi } from '../api';
3
- export declare const fakeTestTac = "TAF EHAM 0812/0918 20020G35KT 0500 SN BKN040=";
4
- export declare const fakeTestTacJson: AdverseWeatherTAC;
5
- export declare const api: {
6
- postTaf: () => Promise<void>;
7
- patchTaf: () => Promise<void>;
8
- getTafList: () => Promise<{
9
- data: TafFromBackend[];
10
- }>;
11
- getTAC: (taf: Taf, getJSON: boolean) => Promise<{
12
- data: TAC;
13
- }>;
14
- };
15
- export declare const createApi: () => TafApi;
1
+ import { AdverseWeatherTAC, TAC, Taf, TafFromBackend } from '../../types';
2
+ import { TafApi } from '../api';
3
+ export declare const fakeTestTac = "TAF EHAM 0812/0918 20020G35KT 0500 SN BKN040=";
4
+ export declare const fakeTestTacJson: AdverseWeatherTAC;
5
+ export declare const api: {
6
+ postTaf: () => Promise<void>;
7
+ patchTaf: () => Promise<void>;
8
+ getTafList: () => Promise<{
9
+ data: TafFromBackend[];
10
+ }>;
11
+ getTAC: (taf: Taf, getJSON: boolean) => Promise<{
12
+ data: TAC;
13
+ }>;
14
+ };
15
+ export declare const createApi: () => TafApi;
@@ -1,13 +1,13 @@
1
- import { CreateApiProps } from '@opengeoweb/api';
2
- import { TAC, Taf, TafFromBackend, TafFromFrontEnd } from '../types';
3
- export interface TafApi {
4
- getTafList: () => Promise<{
5
- data: TafFromBackend[];
6
- }>;
7
- postTaf: (formData: TafFromFrontEnd) => Promise<void>;
8
- getTAC: (tafData: Taf, getJSON?: boolean, signal?: AbortSignal) => Promise<{
9
- data: TAC;
10
- }>;
11
- patchTaf: (formData: TafFromFrontEnd) => Promise<void>;
12
- }
13
- export declare const createApi: (props: CreateApiProps) => TafApi;
1
+ import { CreateApiProps } from '@opengeoweb/api';
2
+ import { TAC, Taf, TafFromBackend, TafFromFrontEnd } from '../types';
3
+ export interface TafApi {
4
+ getTafList: () => Promise<{
5
+ data: TafFromBackend[];
6
+ }>;
7
+ postTaf: (formData: TafFromFrontEnd) => Promise<void>;
8
+ getTAC: (tafData: Taf, getJSON?: boolean, signal?: AbortSignal) => Promise<{
9
+ data: TAC;
10
+ }>;
11
+ patchTaf: (formData: TafFromFrontEnd) => Promise<void>;
12
+ }
13
+ export declare const createApi: (props: CreateApiProps) => TafApi;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,2 +1,2 @@
1
- export declare const DATE_FORMAT_ISSUE_TIME = "ddHHmm'Z";
2
- export declare const DATE_FORMAT_BASE_TIME = "HH:mm dd MMM";
1
+ export declare const DATE_FORMAT_ISSUE_TIME = "ddHHmm'Z";
2
+ export declare const DATE_FORMAT_BASE_TIME = "HH:mm dd MMM";
@@ -1,3 +1,3 @@
1
- import { TafApi } from './api';
2
- export declare const fakeTafTac = "TAF EHAM 0812/0918 20020G35KT 0500 SN BKN040\nBECMG 0814/0816 0700 BKN001=";
3
- export declare const createApi: () => TafApi;
1
+ import { TafApi } from './api';
2
+ export declare const fakeTafTac = "TAF EHAM 0812/0918 20020G35KT 0500 SN BKN040\nBECMG 0814/0816 0700 BKN001=";
3
+ export declare const createApi: () => TafApi;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,6 +1,6 @@
1
- import i18n from 'i18next';
2
- import { UseTranslationResponse } from 'react-i18next';
3
- export declare const TAF_NAMESPACE = "taf";
4
- export declare const initTafI18n: () => void;
5
- export declare const translateKeyOutsideComponents: (key: string, params?: Record<string, string | number> | undefined) => string;
6
- export declare const useTafTranslation: () => UseTranslationResponse<typeof TAF_NAMESPACE, typeof i18n>;
1
+ import i18n from 'i18next';
2
+ import { UseTranslationResponse } from 'react-i18next';
3
+ export declare const TAF_NAMESPACE = "taf";
4
+ export declare const initTafI18n: () => void;
5
+ export declare const translateKeyOutsideComponents: (key: string, params?: Record<string, string | number> | undefined) => string;
6
+ export declare const useTafTranslation: () => UseTranslationResponse<typeof TAF_NAMESPACE, typeof i18n>;
@@ -1,25 +1,25 @@
1
- import { TafFromBackend } from '../../types';
2
- export declare const MOCK_USERNAME = "user.name";
3
- export declare const fakeTafList: TafFromBackend[];
4
- export declare const fakeNewTaf: TafFromBackend;
5
- export declare const fakeNewFixedTaf: TafFromBackend;
6
- export declare const fakeExpiredTaf: TafFromBackend;
7
- export declare const fakePublishedTaf: TafFromBackend;
8
- export declare const fakePublishedFixedTaf: TafFromBackend;
9
- export declare const fakePublishedTafWithoutChangeGroups: TafFromBackend;
10
- export declare const fakeCancelledTaf: TafFromBackend;
11
- export declare const fakeDraftTaf: TafFromBackend;
12
- export declare const fakeDraftFixedTaf: TafFromBackend;
13
- export declare const fakeDraftAmendmentTaf: TafFromBackend;
14
- export declare const fakeDraftCorrectedTaf: TafFromBackend;
15
- export declare const fakeDraftAmendmentFixedTaf: TafFromBackend;
16
- export declare const previousTafForfakeDraftAmendmentFixedTaf: TafFromBackend;
17
- export declare const fakeAmendmentTaf: TafFromBackend;
18
- export declare const fakeCorrectedTaf: TafFromBackend;
19
- export declare const fakeAmendmentFixedTaf: TafFromBackend;
20
- export declare const fakeCancelledFixedTaf: TafFromBackend;
21
- export declare const fakeFixedTafList: TafFromBackend[];
22
- export declare const fakePublishedTafWithChangeGroups: TafFromBackend;
23
- export declare const fakeDraftTafWithSameDates: TafFromBackend;
24
- export declare const fakeDraftTafWithSameDatesFixed: TafFromBackend;
25
- export declare const fakeDraftTafWithFM: TafFromBackend;
1
+ import { TafFromBackend } from '../../types';
2
+ export declare const MOCK_USERNAME = "user.name";
3
+ export declare const fakeTafList: TafFromBackend[];
4
+ export declare const fakeNewTaf: TafFromBackend;
5
+ export declare const fakeNewFixedTaf: TafFromBackend;
6
+ export declare const fakeExpiredTaf: TafFromBackend;
7
+ export declare const fakePublishedTaf: TafFromBackend;
8
+ export declare const fakePublishedFixedTaf: TafFromBackend;
9
+ export declare const fakePublishedTafWithoutChangeGroups: TafFromBackend;
10
+ export declare const fakeCancelledTaf: TafFromBackend;
11
+ export declare const fakeDraftTaf: TafFromBackend;
12
+ export declare const fakeDraftFixedTaf: TafFromBackend;
13
+ export declare const fakeDraftAmendmentTaf: TafFromBackend;
14
+ export declare const fakeDraftCorrectedTaf: TafFromBackend;
15
+ export declare const fakeDraftAmendmentFixedTaf: TafFromBackend;
16
+ export declare const previousTafForfakeDraftAmendmentFixedTaf: TafFromBackend;
17
+ export declare const fakeAmendmentTaf: TafFromBackend;
18
+ export declare const fakeCorrectedTaf: TafFromBackend;
19
+ export declare const fakeAmendmentFixedTaf: TafFromBackend;
20
+ export declare const fakeCancelledFixedTaf: TafFromBackend;
21
+ export declare const fakeFixedTafList: TafFromBackend[];
22
+ export declare const fakePublishedTafWithChangeGroups: TafFromBackend;
23
+ export declare const fakeDraftTafWithSameDates: TafFromBackend;
24
+ export declare const fakeDraftTafWithSameDatesFixed: TafFromBackend;
25
+ export declare const fakeDraftTafWithFM: TafFromBackend;