@opengeoweb/taf 2.3.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 (82) hide show
  1. package/README.md +2 -2
  2. package/index.d.ts +1 -3
  3. package/index.esm.js +1470 -1287
  4. package/index.umd.js +1572 -1287
  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/{TafLayout → StatusIcon}/StatusIcon.d.ts +0 -0
  11. package/lib/components/{TafLayout → StatusIcon}/StatusIcon.spec.d.ts +0 -0
  12. package/lib/components/{TafLayout/TabPanel → TabPanel}/TabPanel.d.ts +0 -0
  13. package/lib/components/{TafLayout/TabPanel → TabPanel}/TabPanel.spec.d.ts +0 -0
  14. package/lib/components/{TafLayout/TabPanel → TabPanel}/index.d.ts +0 -0
  15. package/lib/components/TafForm/TafForm.d.ts +1 -19
  16. package/lib/components/TafForm/TafFormButtons/TafFormButtons.d.ts +5 -9
  17. package/lib/components/TafForm/TafFormRow/{change.d.ts → validations/change.d.ts} +0 -0
  18. package/lib/components/TafForm/TafFormRow/{change.spec.d.ts → validations/change.spec.d.ts} +0 -0
  19. package/lib/components/TafForm/TafFormRow/{clouds.d.ts → validations/clouds.d.ts} +1 -1
  20. package/lib/components/TafForm/TafFormRow/{clouds.spec.d.ts → validations/clouds.spec.d.ts} +0 -0
  21. package/lib/components/TafForm/TafFormRow/{probability.d.ts → validations/probability.d.ts} +0 -0
  22. package/lib/components/TafForm/TafFormRow/{probability.spec.d.ts → validations/probability.spec.d.ts} +0 -0
  23. package/lib/components/TafForm/TafFormRow/{utils.d.ts → validations/utils.d.ts} +0 -0
  24. package/lib/components/TafForm/TafFormRow/{utils.spec.d.ts → validations/utils.spec.d.ts} +0 -0
  25. package/lib/components/TafForm/TafFormRow/{validField.d.ts → validations/validField.d.ts} +1 -1
  26. package/lib/components/TafForm/TafFormRow/{validField.spec.d.ts → validations/validField.spec.d.ts} +0 -0
  27. package/lib/components/TafForm/TafFormRow/{visibility.d.ts → validations/visibility.d.ts} +1 -1
  28. package/lib/components/TafForm/TafFormRow/{visibility.spec.d.ts → validations/visibility.spec.d.ts} +0 -0
  29. package/lib/components/TafForm/TafFormRow/{weather.d.ts → validations/weather.d.ts} +1 -1
  30. package/lib/components/TafForm/TafFormRow/{weather.spec.d.ts → validations/weather.spec.d.ts} +0 -0
  31. package/lib/components/TafForm/TafFormRow/{wind.d.ts → validations/wind.d.ts} +1 -1
  32. package/lib/components/TafForm/TafFormRow/{wind.spec.d.ts → validations/wind.spec.d.ts} +0 -0
  33. package/lib/components/TafForm/TafFormWrapper.d.ts +3 -6
  34. package/lib/components/TafForm/index.d.ts +0 -1
  35. package/lib/components/TafForm/utils.d.ts +21 -0
  36. package/lib/components/{TafLayout → TafHeader}/TafHeader.d.ts +0 -0
  37. package/lib/components/{TafLayout → TafHeader}/TafHeader.spec.d.ts +0 -0
  38. package/lib/components/TafLayout/TacOverview/TacContainer.d.ts +3 -4
  39. package/lib/components/TafLayout/TacOverview/TacOverview.d.ts +2 -0
  40. package/lib/components/TafLayout/TacOverview/TacOverview.stories.d.ts +2 -0
  41. package/lib/components/TafLayout/TacOverview/TacOverviewMobile.d.ts +11 -0
  42. package/lib/components/{ContentDialog/ContentDialog.spec.d.ts → TafLayout/TacOverview/TacOverviewMobile.spec.d.ts} +0 -0
  43. package/lib/components/TafLayout/TacOverview/TacOverviewMobile.stories.d.ts +23 -0
  44. package/lib/components/TafLayout/TacOverview/index.d.ts +1 -0
  45. package/lib/components/TafLayout/TafLayout.d.ts +1 -0
  46. package/lib/components/{TafForm/TafFormDialog/TafFormDialog.spec.d.ts → TafLayout/TafLayout.spec.d.ts} +0 -0
  47. package/lib/components/TafLayout/TafPanel/TafPanel.d.ts +10 -0
  48. package/lib/components/{TafList/TafList.spec.d.ts → TafLayout/TafPanel/TafPanel.spec.d.ts} +0 -0
  49. package/lib/components/TafLayout/TafPanel/index.d.ts +1 -0
  50. package/lib/components/TafModule/TafModule.d.ts +3 -0
  51. package/lib/components/{TafList/TafListAccordion.spec.d.ts → TafModule/TafModule.spec.d.ts} +0 -0
  52. package/lib/components/TafModule/TafModule.stories.d.ts +9 -0
  53. package/lib/components/TafModule/index.d.ts +1 -0
  54. package/lib/types.d.ts +2 -1
  55. package/lib/utils/__mocks__/api.d.ts +1 -0
  56. package/lib/utils/fakeApi.d.ts +1 -1
  57. package/lib/utils/mockdata/fakeTafList.d.ts +1 -0
  58. package/lib/utils/testUtils.d.ts +1 -10
  59. package/package.json +7 -6
  60. package/lib/components/ContentDialog/ContentDialog.d.ts +0 -14
  61. package/lib/components/ContentDialog/ContentDialog.stories.d.ts +0 -7
  62. package/lib/components/ContentDialog/index.d.ts +0 -1
  63. package/lib/components/IssuesPane/IssuesPane.styles.d.ts +0 -1
  64. package/lib/components/TafForm/TafFormDialog/TafFormDialog.d.ts +0 -12
  65. package/lib/components/TafForm/TafFormDialog/TafFormDialog.stories.d.ts +0 -9
  66. package/lib/components/TafList/TafList.d.ts +0 -11
  67. package/lib/components/TafList/TafList.stories.d.ts +0 -8
  68. package/lib/components/TafList/TafListAccordion.d.ts +0 -11
  69. package/lib/components/TafList/TafListButtons.d.ts +0 -10
  70. package/lib/components/TafList/TafListButtons.spec.d.ts +0 -1
  71. package/lib/components/TafList/TafListRow.d.ts +0 -12
  72. package/lib/components/TafList/TafListRow.spec.d.ts +0 -1
  73. package/lib/components/TafList/TafListSection.d.ts +0 -12
  74. package/lib/components/TafList/TafListSection.spec.d.ts +0 -1
  75. package/lib/components/TafList/TafListSection.stories.d.ts +0 -18
  76. package/lib/components/TafList/index.d.ts +0 -3
  77. package/lib/components/TafList/utils.d.ts +0 -4
  78. package/lib/components/TafList/utils.spec.d.ts +0 -1
  79. package/lib/components/TafWrapper/TafWrapper.d.ts +0 -13
  80. package/lib/components/TafWrapper/TafWrapper.spec.d.ts +0 -1
  81. package/lib/components/TafWrapper/index.d.ts +0 -1
  82. 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;
@@ -1,29 +1,11 @@
1
1
  import React from 'react';
2
2
  import { BaseTaf, TafActions, TafFromBackend } 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
- };
21
3
  export interface TafFormProps {
22
4
  isDisabled: boolean;
23
5
  tafAction?: TafActions;
24
6
  staticTAC?: string;
25
7
  tafFromBackend: TafFromBackend;
26
- onFormAction?: (action: TafActions, formValues?: BaseTaf) => void;
8
+ onFormAction?: (action: TafActions, formValues?: BaseTaf) => Promise<boolean>;
27
9
  }
28
10
  declare const TafForm: React.FC<TafFormProps>;
29
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;
@@ -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;
@@ -1,2 +1 @@
1
1
  export { default as TafFormWrapper } from './TafFormWrapper';
2
- export { default as TafFormDialog } from './TafFormDialog/TafFormDialog';
@@ -28,5 +28,26 @@ export declare const getConfirmationDialogTitle: (action: TafActions) => string;
28
28
  export declare const isTafAmendedCorrectedChanged: (isFormDirty: boolean, originalTaf: Taf, currentTaf: Taf) => boolean;
29
29
  export declare const getConfirmationDialogContent: (action: TafActions, isFormDirty: () => boolean) => string;
30
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
+ };
31
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;
32
53
  export {};
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import { TafStatus, TimeSlot } from '../../../types';
2
+ import { Taf } from '../../../types';
3
3
  interface TacContainerProps {
4
- timeSlot: TimeSlot;
5
- status: TafStatus;
6
- location: string;
4
+ taf: Taf;
5
+ isActive?: boolean;
7
6
  }
8
7
  declare const TacContainer: React.FC<TacContainerProps>;
9
8
  export default TacContainer;
@@ -4,6 +4,8 @@ interface TacOverviewProps {
4
4
  upcomingTafs: TafFromBackend[];
5
5
  currentTafs: TafFromBackend[];
6
6
  expiredTafs: TafFromBackend[];
7
+ hideTitle?: boolean;
8
+ activeTaf?: TafFromBackend;
7
9
  }
8
10
  declare const TacOverview: React.FC<TacOverviewProps>;
9
11
  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;
@@ -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 +1,2 @@
1
1
  export { default as TacOverview } from './TacOverview';
2
+ export { default as TacOverviewMobile } from './TacOverviewMobile';
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { TafFromBackend } from '../../types';
3
3
  interface TafLayoutProps {
4
4
  tafList: TafFromBackend[];
5
+ onPostTaf: () => void;
5
6
  }
6
7
  declare const TafLayout: React.FC<TafLayoutProps>;
7
8
  export default TafLayout;
@@ -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,3 @@
1
+ import * as React from 'react';
2
+ declare const Wrapper: React.FC;
3
+ export default Wrapper;
@@ -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';
@@ -142,3 +142,4 @@ export interface TafConfig {
142
142
  locationOrder: string[];
143
143
  }
144
144
  export declare type TimeSlot = 'UPCOMING' | 'ACTIVE' | 'EXPIRED';
145
+ export declare type TafFormViewMode = 'edit' | 'view';
@@ -1,4 +1,5 @@
1
1
  import { TafFromBackend } from '../../types';
2
+ export declare const fakeTestTac = "TAF EHAM 0812/0918 20020G35KT 0500 SN BKN040=";
2
3
  export declare const api: {
3
4
  postTaf: () => Promise<void>;
4
5
  getTafList: () => Promise<{
@@ -1,4 +1,4 @@
1
- export declare const fakeTafTac = "FTNL99 EHDB 081100 TAF EHAM 080747Z 0812/0918 20020G35KT 0500 SN BKN040=";
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>;
@@ -12,6 +12,7 @@ export declare const fakeDraftAmendmentTaf: TafFromBackend;
12
12
  export declare const fakeDraftAmendmentFixedTaf: TafFromBackend;
13
13
  export declare const fakeAmendmentTaf: TafFromBackend;
14
14
  export declare const fakeAmendmentFixedTaf: TafFromBackend;
15
+ export declare const fakeFixedTafList: TafFromBackend[];
15
16
  export declare const fakePublishedTafWithChangeGroups: TafFromBackend;
16
17
  export declare const fakePublishedTafWithSameDates: TafFromBackend;
17
18
  export declare const fakePublishedTafWithSameDatesFixed: TafFromBackend;
@@ -1,15 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { UseFormOptions } from 'react-hook-form';
3
3
  import { Theme } from '@mui/material';
4
- export declare const getActiveStartEndValidSlot: () => {
5
- start: string;
6
- end: string;
7
- };
8
4
  interface WrapperProps {
9
5
  children: React.ReactNode;
10
6
  theme?: Theme;
11
7
  }
12
- interface TestWrapperProps extends WrapperProps {
8
+ export interface TestWrapperProps extends WrapperProps {
13
9
  createApiFunc?: () => void;
14
10
  }
15
11
  export declare const TestWrapper: React.FC<TestWrapperProps>;
@@ -20,9 +16,4 @@ interface TestFormWrapperProps {
20
16
  }
21
17
  export declare const TestFormWrapper: React.FC<TestFormWrapperProps>;
22
18
  export declare const StoryWrapper: React.FC<WrapperProps>;
23
- interface ThemeWrapperProps {
24
- theme?: Theme;
25
- children: React.ReactNode;
26
- }
27
- export declare const StoryWrapperWithTheme: React.FC<ThemeWrapperProps>;
28
19
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/taf",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "GeoWeb TAF library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -14,21 +14,22 @@
14
14
  "peerDependencies": {
15
15
  "react": "^17.0.2",
16
16
  "@mui/material": "^5.2.8",
17
- "@opengeoweb/theme": "2.3.0",
17
+ "react-hook-form": "^6.12.1",
18
+ "@opengeoweb/shared": "2.4.0",
19
+ "@opengeoweb/theme": "2.4.0",
18
20
  "@mui/styles": "^5.2.3",
19
21
  "@mui/icons-material": "^5.2.5",
20
- "react-hook-form": "^6.12.1",
21
- "@opengeoweb/shared": "2.3.0",
22
22
  "react-draggable": "^4.4.3",
23
23
  "re-resizable": "^6.9.0",
24
24
  "lodash": "^4.17.20",
25
- "@opengeoweb/form-fields": "2.3.0",
25
+ "@opengeoweb/form-fields": "2.4.0",
26
26
  "moment": "^2.29.0",
27
27
  "moment-timezone": "^0.5.31",
28
28
  "@mui/lab": "^5.0.0-alpha.64",
29
29
  "axios": "^0.25.0",
30
+ "react-dom": "^17.0.2",
30
31
  "react-sortablejs": "^6.0.0",
31
- "@opengeoweb/api": "2.3.0",
32
+ "@opengeoweb/api": "2.4.0",
32
33
  "sortablejs": "^1.14.0"
33
34
  }
34
35
  }
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import { DialogProps } from '@mui/material';
3
- import { Taf, TafActions } from '../../types';
4
- interface ContentDialogProps extends DialogProps {
5
- open: boolean;
6
- toggleDialogStatus: () => void;
7
- titleComponent?: React.ReactNode;
8
- children?: React.ReactNode;
9
- alertBanner?: React.ReactNode;
10
- onClose?: () => void;
11
- onFormAction?: (action: TafActions, formValues?: Taf) => void;
12
- }
13
- declare const ContentDialog: React.FC<ContentDialogProps>;
14
- export default ContentDialog;
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const ContentDialogDemo: () => React.ReactElement;
7
- export declare const OpenDialogDemo: () => React.ReactElement;
@@ -1 +0,0 @@
1
- export { default as ContentDialog } from './ContentDialog';
@@ -1 +0,0 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles/withStyles").ClassNameMap<"paneContent" | "image">;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { Taf, TafActions, TafFromBackend } from '../../../types';
3
- interface TafFormDialogProps {
4
- open: boolean;
5
- toggleFormDialog: () => void;
6
- tafFromBackend: TafFromBackend;
7
- children?: React.ReactNode;
8
- alertBanner?: React.ReactNode;
9
- onFormAction?: (action: TafActions, formValues?: Taf) => void;
10
- }
11
- declare const TafFormDialog: React.FC<TafFormDialogProps>;
12
- export default TafFormDialog;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const DialogNewTaf: () => React.ReactElement;
7
- export declare const DialogPublishedTaf: () => React.ReactElement;
8
- export declare const DialogDraftTaf: () => React.ReactElement;
9
- export declare const DialogDraftTafError: () => React.ReactElement;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { TafActions, TafFromBackend } from '../../types';
3
- interface TafListProps {
4
- tafList: TafFromBackend[];
5
- isLoading: boolean;
6
- error: Error;
7
- errorCancelTaf?: string[];
8
- onClickTafActionButton: (tafUuid: string, action: TafActions) => void;
9
- }
10
- declare const TafList: React.FC<TafListProps>;
11
- export default TafList;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const TafListWithData: React.FC;
7
- export declare const TafListWithError: React.FC;
8
- export declare const TafListLoading: React.FC;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { TafActions, TafFromBackend } from '../../types';
3
- import { ListState } from './TafListRow';
4
- interface TafListAccordionProps {
5
- tafListItem: TafFromBackend;
6
- listType: ListState;
7
- errorCancelTaf?: string[];
8
- onClickTafActionButton: (action: TafActions, tafUuid: string) => void;
9
- }
10
- declare const TafListAccordion: React.FC<TafListAccordionProps>;
11
- export default TafListAccordion;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { TafActions, TafCanbe } from '../../types';
3
- interface TafListButtonsProps {
4
- uuid: string;
5
- canBe: TafCanbe[];
6
- onClickTafActionButton: (action: TafActions, tafUuid: string) => void;
7
- testId?: string;
8
- }
9
- declare const TafListButtons: React.FC<TafListButtonsProps>;
10
- export default TafListButtons;
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { Taf, TafStatus } from '../../types';
3
- export declare type ListState = 'UPCOMING' | 'ACTIVE' | 'EXPIRED';
4
- export declare const getDraftTitle: (status: TafStatus) => string;
5
- export interface TafListRowProps {
6
- taf: Taf;
7
- listType: ListState;
8
- showTac?: boolean;
9
- TAC?: string;
10
- }
11
- declare const TafListRow: React.FC<TafListRowProps>;
12
- export default TafListRow;
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { TafActions, TafFromBackend } from '../../types';
3
- import { ListState } from './TafListRow';
4
- interface TafListSectionProps {
5
- tafList: TafFromBackend[];
6
- title: string;
7
- listType: ListState;
8
- errorCancelTaf?: string[];
9
- onClickTafActionButton: (tafUuid: string, action: TafActions) => void;
10
- }
11
- declare const TafListSection: React.FC<TafListSectionProps>;
12
- export default TafListSection;
@@ -1 +0,0 @@
1
- export {};