@opengeoweb/taf 2.4.0 → 2.4.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.
- package/index.d.ts +1 -0
- package/index.esm.js +1427 -264
- package/index.umd.js +1449 -294
- package/lib/components/IssuesPane/IssuesButton.d.ts +3 -6
- package/lib/components/IssuesPane/IssuesPane.d.ts +7 -9
- package/lib/components/IssuesPane/IssuesPaneWrapper.d.ts +4 -0
- package/lib/components/{TafForm/TafFormWrapper.spec.d.ts → IssuesPane/IssuesPaneWrapper.spec.d.ts} +0 -0
- package/lib/components/IssuesPane/types.d.ts +11 -0
- package/lib/components/IssuesPane/utils.d.ts +10 -0
- package/lib/components/IssuesPane/utils.spec.d.ts +1 -0
- package/lib/components/TafForm/TafForm.d.ts +5 -3
- package/lib/components/TafForm/TafForm.spec.d.ts +1 -0
- package/lib/components/TafForm/{TafFormWrapper.stories.d.ts → TafForm.stories.d.ts} +0 -0
- package/lib/components/TafForm/index.d.ts +1 -1
- package/lib/components/TafLayout/TafLayout.stories.d.ts +10 -2
- package/lib/components/TafLayout/TafPanel/TafPanel.d.ts +4 -0
- package/lib/components/TafLayout/TopTabs/TopTabs.d.ts +0 -2
- package/lib/components/TafWrapper/TafWrapper.d.ts +6 -0
- package/lib/components/TafWrapper/TafWrapper.spec.d.ts +1 -0
- package/lib/components/TafWrapper/index.d.ts +1 -0
- package/lib/utils/mockdata/fakeTafList.d.ts +2 -0
- package/package.json +5 -5
- package/lib/components/TafForm/TafFormWrapper.d.ts +0 -11
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FieldError } from 'react-hook-form';
|
|
3
|
-
|
|
4
|
-
isChangeGroup: boolean;
|
|
5
|
-
row: number;
|
|
6
|
-
}
|
|
7
|
-
export declare const getCustomError: (error: FieldError) => CustomErrorField;
|
|
8
|
-
export declare const filterDuplicateErrors: (errors: CustomErrorField[]) => CustomErrorField[];
|
|
3
|
+
import { IssuesPanePosition } from './types';
|
|
9
4
|
interface IssuesButtonProps {
|
|
10
5
|
errors?: Record<string, FieldError>;
|
|
6
|
+
isIssuesPaneOpen?: boolean;
|
|
7
|
+
setIsIssuesPaneOpen?: (isOpen: boolean, position?: IssuesPanePosition) => void;
|
|
11
8
|
}
|
|
12
9
|
declare const IssuesButton: React.FC<IssuesButtonProps>;
|
|
13
10
|
export default IssuesButton;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FieldError } from 'react-hook-form';
|
|
3
|
+
import { IssuesPaneProps, IssuesPanePosition } from './types';
|
|
3
4
|
export declare const capitalizeWord: ([firstLetter, ...restOfWord]: string) => string;
|
|
4
5
|
export declare const humanizeErrorMessage: (nameAsString: string) => string;
|
|
5
6
|
export declare const getErrorMessage: (error: FieldError, index: number) => string;
|
|
6
7
|
export declare const MODAL_DIALOG_ELEMENT = "modal-dialog";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
left?: number;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
8
|
+
export declare const useIssuesPane: () => {
|
|
9
|
+
isIssuesPaneOpen: boolean;
|
|
10
|
+
startPosition: IssuesPanePosition;
|
|
11
|
+
onToggleIssuesPane: (isOpen: boolean, newPosition: IssuesPanePosition) => void;
|
|
12
|
+
onCloseIssuesPane: () => void;
|
|
13
|
+
};
|
|
16
14
|
declare const IssuesPane: React.FC<IssuesPaneProps>;
|
|
17
15
|
export default IssuesPane;
|
package/lib/components/{TafForm/TafFormWrapper.spec.d.ts → IssuesPane/IssuesPaneWrapper.spec.d.ts}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldError } from 'react-hook-form';
|
|
2
|
+
export declare type IssuesPanePosition = {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
};
|
|
6
|
+
export interface IssuesPaneProps {
|
|
7
|
+
errorList?: FieldError[];
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
handleClose: () => void;
|
|
10
|
+
startPosition?: IssuesPanePosition;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DeepMap, FieldError } from 'react-hook-form';
|
|
2
|
+
interface CustomErrorField extends FieldError {
|
|
3
|
+
isChangeGroup: boolean;
|
|
4
|
+
row: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const getCustomError: (error: FieldError) => CustomErrorField;
|
|
7
|
+
export declare const getIssuesLabel: (sumOfErrors: number) => string;
|
|
8
|
+
export declare const filterDuplicateErrors: (errors: CustomErrorField[]) => CustomErrorField[];
|
|
9
|
+
export declare const getErrors: (errors: DeepMap<Record<string, unknown>, FieldError>) => CustomErrorField[];
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseTaf, TafActions, TafFromBackend } from '../../types';
|
|
3
|
+
import { IssuesPanePosition } from '../IssuesPane/types';
|
|
3
4
|
export interface TafFormProps {
|
|
4
|
-
isDisabled
|
|
5
|
-
tafAction?: TafActions;
|
|
6
|
-
staticTAC?: string;
|
|
5
|
+
isDisabled?: boolean;
|
|
7
6
|
tafFromBackend: TafFromBackend;
|
|
8
7
|
onFormAction?: (action: TafActions, formValues?: BaseTaf) => Promise<boolean>;
|
|
8
|
+
onFormDirty?: (isFormDirty: boolean) => void;
|
|
9
|
+
isIssuesPaneOpen?: boolean;
|
|
10
|
+
setIsIssuesPaneOpen?: (isOpen: boolean, position?: IssuesPanePosition) => void;
|
|
9
11
|
}
|
|
10
12
|
declare const TafForm: React.FC<TafFormProps>;
|
|
11
13
|
export default TafForm;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as TafForm } from './TafForm';
|
|
@@ -3,5 +3,13 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
6
|
+
export declare const DemoTafLayoutLightTheme: () => React.ReactElement;
|
|
7
|
+
export declare const DemoTafLayoutDarkTheme: () => React.ReactElement;
|
|
8
|
+
export declare const TafLayoutLightSnap: {
|
|
9
|
+
(): React.ReactElement;
|
|
10
|
+
storyName: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const TafLayoutDarkSnap: {
|
|
13
|
+
(): React.ReactElement;
|
|
14
|
+
storyName: string;
|
|
15
|
+
};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TafFromBackend } from '../../../types';
|
|
3
|
+
import { IssuesPanePosition } from '../../IssuesPane/types';
|
|
3
4
|
interface TafPanelProps {
|
|
4
5
|
tafFromBackend: TafFromBackend;
|
|
5
6
|
activeTafIndex: number;
|
|
6
7
|
index: number;
|
|
7
8
|
onPostTaf: () => void;
|
|
9
|
+
onFormDirty?: (isFormDirty: boolean) => void;
|
|
10
|
+
isIssuesPaneOpen?: boolean;
|
|
11
|
+
setIsIssuesPaneOpen?: (isOpen: boolean, position?: IssuesPanePosition) => void;
|
|
8
12
|
}
|
|
9
13
|
declare const TafPanel: React.FC<TafPanelProps>;
|
|
10
14
|
export default TafPanel;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Moment } from 'moment';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { TafFromBackend, TimeSlot } from '../../../types';
|
|
4
3
|
interface TopTabsProps {
|
|
@@ -6,6 +5,5 @@ interface TopTabsProps {
|
|
|
6
5
|
tafFromBackend: TafFromBackend;
|
|
7
6
|
onChangeTimeSlot?: (timeSlot: TimeSlot) => void;
|
|
8
7
|
}
|
|
9
|
-
export declare const formatBaseTime: (time: Moment) => string;
|
|
10
8
|
declare const TopTabs: React.FC<TopTabsProps>;
|
|
11
9
|
export default TopTabs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TafWrapper } from './TafWrapper';
|
|
@@ -9,9 +9,11 @@ export declare const fakePublishedFixedTaf: TafFromBackend;
|
|
|
9
9
|
export declare const fakeDraftTaf: TafFromBackend;
|
|
10
10
|
export declare const fakeDraftFixedTaf: TafFromBackend;
|
|
11
11
|
export declare const fakeDraftAmendmentTaf: TafFromBackend;
|
|
12
|
+
export declare const fakeDraftCorrectedTaf: TafFromBackend;
|
|
12
13
|
export declare const fakeDraftAmendmentFixedTaf: TafFromBackend;
|
|
13
14
|
export declare const fakeAmendmentTaf: TafFromBackend;
|
|
14
15
|
export declare const fakeAmendmentFixedTaf: TafFromBackend;
|
|
16
|
+
export declare const fakeCancelledFixedTaf: TafFromBackend;
|
|
15
17
|
export declare const fakeFixedTafList: TafFromBackend[];
|
|
16
18
|
export declare const fakePublishedTafWithChangeGroups: TafFromBackend;
|
|
17
19
|
export declare const fakePublishedTafWithSameDates: TafFromBackend;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/taf",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "GeoWeb TAF library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -15,21 +15,21 @@
|
|
|
15
15
|
"react": "^17.0.2",
|
|
16
16
|
"@mui/material": "^5.2.8",
|
|
17
17
|
"react-hook-form": "^6.12.1",
|
|
18
|
-
"@opengeoweb/shared": "2.4.
|
|
19
|
-
"@opengeoweb/theme": "2.4.
|
|
18
|
+
"@opengeoweb/shared": "2.4.1",
|
|
19
|
+
"@opengeoweb/theme": "2.4.1",
|
|
20
20
|
"@mui/styles": "^5.2.3",
|
|
21
21
|
"@mui/icons-material": "^5.2.5",
|
|
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.4.
|
|
25
|
+
"@opengeoweb/form-fields": "2.4.1",
|
|
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
30
|
"react-dom": "^17.0.2",
|
|
31
31
|
"react-sortablejs": "^6.0.0",
|
|
32
|
-
"@opengeoweb/api": "2.4.
|
|
32
|
+
"@opengeoweb/api": "2.4.1",
|
|
33
33
|
"sortablejs": "^1.14.0"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Taf, TafActions, TafFormViewMode, TafFromBackend } from '../../types';
|
|
3
|
-
export interface TafFormWrapperProps {
|
|
4
|
-
mode: TafFormViewMode;
|
|
5
|
-
tafFromBackend: TafFromBackend;
|
|
6
|
-
tafAction?: TafActions;
|
|
7
|
-
TAC?: string;
|
|
8
|
-
onFormAction?: (action: TafActions, formValues?: Taf) => Promise<boolean>;
|
|
9
|
-
}
|
|
10
|
-
declare const TafFormWrapper: React.FC<TafFormWrapperProps>;
|
|
11
|
-
export default TafFormWrapper;
|