@opengeoweb/taf 4.10.0 → 4.12.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.
@@ -8,6 +8,7 @@ export declare const useIssuesPane: () => {
8
8
  startPosition: IssuesPanePosition;
9
9
  onToggleIssuesPane: (isOpen: boolean, newPosition: IssuesPanePosition) => void;
10
10
  onCloseIssuesPane: () => void;
11
+ onUserHasDragged: () => void;
11
12
  };
12
13
  declare const IssuesPane: React.FC<IssuesPaneProps>;
13
14
  export default IssuesPane;
@@ -12,4 +12,5 @@ export interface IssuesPaneProps {
12
12
  isOpen: boolean;
13
13
  handleClose: () => void;
14
14
  startPosition?: IssuesPanePosition;
15
+ onUserHasDragged?: () => void;
15
16
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { BaseTaf, TafActions, TafFromBackend, TafFromFrontEnd } from '../../types';
2
+ import { BaseTaf, Taf, TafActions, TafFromBackend, TafFromFrontEnd } from '../../types';
3
3
  import { IssuesPanePosition } from '../IssuesPane/types';
4
4
  export declare const getSnackbarMessage: (isChecked: boolean, location: string) => string;
5
5
  export interface TafFormProps {
@@ -11,6 +11,7 @@ export interface TafFormProps {
11
11
  setIsIssuesPaneOpen?: (isOpen: boolean, position?: IssuesPanePosition) => void;
12
12
  onSwitchEditor?: (formValues: TafFromFrontEnd) => Promise<boolean>;
13
13
  fetchNewTafList?: () => Promise<TafFromBackend[]>;
14
+ previousTaf?: Taf;
14
15
  }
15
16
  declare const TafForm: React.FC<TafFormProps>;
16
17
  export default TafForm;
@@ -1 +1,2 @@
1
1
  export declare const prependZeroes: (value: string | number, totalDigits: number) => string;
2
+ export declare const getFieldValue: (fieldValue: string) => string;
@@ -1,6 +1,7 @@
1
1
  import Sortable from 'sortablejs';
2
2
  import { BaseForecast, BaseForecastFormData, ChangeGroup, ChangeGroupFormData, TAC, Taf, TafActions, TafFormData, TafStatus } from '../../types';
3
3
  import { FieldNames } from './TafFormRow/types';
4
+ import { IssuesPanePosition } from '../IssuesPane/types';
4
5
  export declare const emptyBaseForecast: {
5
6
  wind: string;
6
7
  visibility: string;
@@ -43,7 +44,7 @@ export declare const useDragOrder: (trigger: (name?: string | string[]) => Promi
43
44
  activeDraggingIndex: number;
44
45
  };
45
46
  export declare const getConfirmationDialogTitle: (action: TafActions) => string;
46
- export declare const isTafAmendedCorrectedChanged: (isFormDirty: boolean, originalTaf: Taf, currentTaf: Taf) => boolean;
47
+ export declare const isTafAmendedCorrectedChanged: (originalTaf: Taf, currentTaf: Taf) => boolean;
47
48
  export declare const getConfirmationDialogContent: (action: TafActions, isFormDirty: () => boolean) => string;
48
49
  export declare const getConfirmationDialogButtonLabel: (action: TafActions) => string;
49
50
  export declare const emptyChangegroup: {
@@ -64,7 +65,7 @@ export declare const emptyChangegroup: {
64
65
  change: string;
65
66
  probability: string;
66
67
  };
67
- export declare const getTafStatusLabel: (status: TafStatus) => string;
68
+ export declare const getTafStatusLabel: (status: TafStatus, action?: TafActions, isFormDisabled?: boolean) => string;
68
69
  export declare const getMessageType: (taf: Taf, tafAction: TafActions) => string;
69
70
  export declare const getAmendedCorrectedTafTimes: (taf: Taf, tafAction: TafActions) => Taf;
70
71
  export declare const createChangeGroup: (changeGroup: ChangeGroupFormData) => ChangeGroupFormData;
@@ -72,4 +73,8 @@ export declare const prepareTafValues: (_taf: Taf, tafAction: TafActions, addEmp
72
73
  export declare const clearTafFormData: (tafFormValues: TafFormData) => TafFormData;
73
74
  export declare const getIsFormDefaultDisabled: (status: TafStatus) => boolean;
74
75
  export declare const fromStatusToAction: (tafStatus: TafStatus) => TafActions;
76
+ export declare const isFormDirty: (dirtyFields: Partial<Readonly<{
77
+ [x: string]: unknown;
78
+ }>>) => boolean;
79
+ export declare const getFormRowPosition: (formRow: Element) => IssuesPanePosition;
75
80
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { AxiosError } from 'axios';
3
- import { TafFromBackend, TafActions, TafStatus, TafFromFrontEnd } from '../../../types';
3
+ import { TafFromBackend, Taf, TafActions, TafStatus, TafFromFrontEnd } from '../../../types';
4
4
  import { IssuesPanePosition } from '../../IssuesPane/types';
5
5
  export declare const fromActionToStatus: (tafAction: TafActions) => TafStatus;
6
6
  export declare type TafError = {
@@ -22,6 +22,8 @@ interface TafPanelProps {
22
22
  setIsFormDisabled?: (isDisabled: boolean) => void;
23
23
  error?: TafError;
24
24
  fetchNewTafList?: () => Promise<TafFromBackend[]>;
25
+ previousTaf: Taf;
26
+ tafAction: TafActions;
25
27
  }
26
28
  export declare const isWarning: (error: TafError) => boolean;
27
29
  export declare const usePostTafRequest: (request: (params?: unknown) => Promise<void>, errorParser?: (error: AxiosError | Error, params: TafFromFrontEnd) => TafError) => {
@@ -19,3 +19,4 @@ export declare const muiTabA11yProps: (index: number) => {
19
19
  };
20
20
  export declare const prepareTafExportValues: (tafToCopy: Taf, currentTaf: TafFormData) => TafFormData;
21
21
  export declare const getNewTafLocationIndex: (tafLocations: TafFromBackend[], previousTafLocationUUID: string) => number;
22
+ export declare const getPreviousTaf: (tafList: TafFromBackend[], currentTaf: TafFromBackend) => Taf;
@@ -14,6 +14,7 @@ export declare const fakeDraftFixedTaf: TafFromBackend;
14
14
  export declare const fakeDraftAmendmentTaf: TafFromBackend;
15
15
  export declare const fakeDraftCorrectedTaf: TafFromBackend;
16
16
  export declare const fakeDraftAmendmentFixedTaf: TafFromBackend;
17
+ export declare const previousTafForfakeDraftAmendmentFixedTaf: TafFromBackend;
17
18
  export declare const fakeAmendmentTaf: TafFromBackend;
18
19
  export declare const fakeCorrectedTaf: TafFromBackend;
19
20
  export declare const fakeAmendmentFixedTaf: TafFromBackend;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/taf",
3
- "version": "4.10.0",
3
+ "version": "4.12.0",
4
4
  "description": "GeoWeb TAF library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -12,25 +12,25 @@
12
12
  "typings": "./index.d.ts",
13
13
  "dependencies": {},
14
14
  "peerDependencies": {
15
- "@opengeoweb/api": "4.10.0",
16
- "react": "^17.0.2",
15
+ "@opengeoweb/api": "4.12.0",
16
+ "react": "^18.2.0",
17
17
  "axios": "^0.25.0",
18
- "@opengeoweb/shared": "4.10.0",
18
+ "@opengeoweb/shared": "4.12.0",
19
19
  "@mui/material": "^5.10.8",
20
- "@opengeoweb/theme": "4.10.0",
20
+ "@opengeoweb/theme": "4.12.0",
21
21
  "react-draggable": "^4.4.5",
22
22
  "re-resizable": "^6.9.0",
23
23
  "@redux-eggs/core": "^2.2.0",
24
24
  "react-redux": "^8.0.4",
25
- "@opengeoweb/form-fields": "4.10.0",
25
+ "@opengeoweb/form-fields": "4.12.0",
26
26
  "react-hook-form": "^7.41.5",
27
27
  "moment": "^2.29.0",
28
28
  "moment-timezone": "^0.5.31",
29
29
  "@mui/x-date-pickers": "^5.0.4",
30
30
  "lodash": "^4.17.20",
31
31
  "date-fns": "^2.29.3",
32
- "@opengeoweb/core": "4.10.0",
33
- "@opengeoweb/webmap": "4.10.0",
32
+ "@opengeoweb/core": "4.12.0",
33
+ "@opengeoweb/webmap": "4.12.0",
34
34
  "throttle-debounce": "^3.0.1",
35
35
  "proj4": "^2.6.2",
36
36
  "react-intl": "^5.17.5",
@@ -45,8 +45,8 @@
45
45
  "redux-saga": "^1.2.1",
46
46
  "@redux-eggs/redux-toolkit": "^2.2.0",
47
47
  "@redux-eggs/saga-extension": "^2.2.0",
48
- "react-dom": "^17.0.2",
49
- "@opengeoweb/authentication": "4.10.0",
48
+ "react-dom": "^18.2.0",
49
+ "@opengeoweb/authentication": "4.12.0",
50
50
  "react-router-dom": "^6.4.2",
51
51
  "query-string": "^6.13.7"
52
52
  }