@opengeoweb/taf 2.5.0 → 2.6.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.
- package/index.d.ts +1 -0
- package/index.esm.js +190 -119
- package/index.umd.js +237 -159
- package/lib/components/ComponentsLookUp/ComponentsLookUp.d.ts +34 -0
- package/lib/components/ComponentsLookUp/ComponentsLookUp.spec.d.ts +1 -0
- package/lib/components/ComponentsLookUp/index.d.ts +1 -0
- package/lib/components/TafForm/TafForm.d.ts +0 -1
- package/lib/components/TafForm/utils.d.ts +16 -1
- package/lib/components/TafLayout/TafPanel/TafPanel.d.ts +0 -1
- package/lib/components/TafLayout/utils.d.ts +0 -15
- package/lib/components/TafModule/TafModule.d.ts +2 -1
- package/lib/components/TafModule/TafModuleProvider.d.ts +10 -3
- package/lib/components/TafWrapper/TafWrapper.d.ts +2 -4
- package/package.json +7 -7
|
@@ -6,7 +6,6 @@ export interface TafFormProps {
|
|
|
6
6
|
setIsDisabled?: (isDisabled: boolean) => void;
|
|
7
7
|
tafFromBackend: TafFromBackend;
|
|
8
8
|
onFormAction?: (action: TafActions, formValues?: BaseTaf) => Promise<boolean>;
|
|
9
|
-
onFormDirty?: (isFormDirty: boolean) => void;
|
|
10
9
|
isIssuesPaneOpen?: boolean;
|
|
11
10
|
setIsIssuesPaneOpen?: (isOpen: boolean, position?: IssuesPanePosition) => void;
|
|
12
11
|
}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import Sortable from 'sortablejs';
|
|
2
2
|
import { BaseForecast, BaseForecastFormData, ChangeGroup, ChangeGroupFormData, Taf, TafActions, TafFormData, TafStatus } from '../../types';
|
|
3
3
|
import { FieldNames } from './TafFormRow/types';
|
|
4
|
+
export declare const emptyBaseForecast: {
|
|
5
|
+
wind: string;
|
|
6
|
+
visibility: string;
|
|
7
|
+
weather: {
|
|
8
|
+
weather1: string;
|
|
9
|
+
weather2: string;
|
|
10
|
+
weather3: string;
|
|
11
|
+
};
|
|
12
|
+
cloud: {
|
|
13
|
+
cloud1: string;
|
|
14
|
+
cloud2: string;
|
|
15
|
+
cloud3: string;
|
|
16
|
+
cloud4: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
4
19
|
export declare const formatIssueTime: (issueDate: string) => string;
|
|
5
20
|
declare type BaseForecastOrChangeGroupFormData<T extends BaseForecast | ChangeGroup> = T extends ChangeGroup ? ChangeGroupFormData : BaseForecastFormData;
|
|
6
21
|
export declare function formatFormValues<T extends BaseForecast | ChangeGroup>(row: T): BaseForecastOrChangeGroupFormData<T>;
|
|
@@ -16,7 +31,7 @@ export declare const TAC_FAILED = "Failed to retrieve TAC";
|
|
|
16
31
|
export declare const tacHasError: (tac: string) => boolean;
|
|
17
32
|
export declare const useTACGenerator: (taf: Taf, requestTAC: (postTaf: unknown) => Promise<{
|
|
18
33
|
data: string;
|
|
19
|
-
}
|
|
34
|
+
}>) => [string, (tafToPost: any) => void];
|
|
20
35
|
export declare type SortableField = {
|
|
21
36
|
id: string;
|
|
22
37
|
chosen: boolean;
|
|
@@ -15,7 +15,6 @@ interface TafPanelProps {
|
|
|
15
15
|
index: number;
|
|
16
16
|
isLoading?: boolean;
|
|
17
17
|
postTaf?: (taf: TafFromFrontEnd) => Promise<void>;
|
|
18
|
-
onFormDirty?: (isFormDirty: boolean) => void;
|
|
19
18
|
isIssuesPaneOpen?: boolean;
|
|
20
19
|
setIsIssuesPaneOpen?: (isOpen: boolean, position?: IssuesPanePosition) => void;
|
|
21
20
|
isFormDisabled?: boolean;
|
|
@@ -16,19 +16,4 @@ export declare const muiTabA11yProps: (index: number) => {
|
|
|
16
16
|
id: string;
|
|
17
17
|
'aria-controls': string;
|
|
18
18
|
};
|
|
19
|
-
export declare const emptyBaseForecast: {
|
|
20
|
-
wind: string;
|
|
21
|
-
visibility: string;
|
|
22
|
-
weather: {
|
|
23
|
-
weather1: string;
|
|
24
|
-
weather2: string;
|
|
25
|
-
weather3: string;
|
|
26
|
-
};
|
|
27
|
-
cloud: {
|
|
28
|
-
cloud1: string;
|
|
29
|
-
cloud2: string;
|
|
30
|
-
cloud3: string;
|
|
31
|
-
cloud4: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
19
|
export declare const prepareTafExportValues: (tafToCopy: Taf, currentTaf: TafFormData) => TafFormData;
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseTaf, TafActions } from '../../types';
|
|
3
3
|
declare type ValidateFormPromise = () => Promise<void | BaseTaf>;
|
|
4
|
+
interface TafModuleMethods {
|
|
5
|
+
onPreventCloseView?: (shouldPreventClose: boolean) => void;
|
|
6
|
+
}
|
|
4
7
|
interface TafModuleContextState {
|
|
5
8
|
onValidateForm: ValidateFormPromise;
|
|
6
9
|
registerValidateForm: (promiseToRegister: ValidateFormPromise) => void;
|
|
7
10
|
tafAction: TafActions;
|
|
8
11
|
setTafAction: (action: TafActions) => void;
|
|
12
|
+
isFormDirty: boolean;
|
|
13
|
+
setIsFormDirty: (isDirty: boolean) => void;
|
|
9
14
|
}
|
|
10
15
|
declare const TafModuleContext: React.Context<{
|
|
11
16
|
onValidateForm: any;
|
|
12
17
|
registerValidateForm: any;
|
|
13
18
|
tafAction: any;
|
|
14
19
|
setTafAction: any;
|
|
20
|
+
isFormDirty: any;
|
|
21
|
+
setIsFormDirty: any;
|
|
15
22
|
}>;
|
|
16
23
|
export declare const useTafModuleContext: () => Partial<TafModuleContextState>;
|
|
17
|
-
export declare const useTafModuleState: () => TafModuleContextState;
|
|
18
|
-
interface TafModuleProviderProps {
|
|
19
|
-
children
|
|
24
|
+
export declare const useTafModuleState: ({ onPreventCloseView, }: TafModuleMethods) => TafModuleContextState;
|
|
25
|
+
export interface TafModuleProviderProps extends TafModuleMethods {
|
|
26
|
+
children?: React.ReactNode;
|
|
20
27
|
}
|
|
21
28
|
export declare const TafModuleProvider: React.FC<TafModuleProviderProps>;
|
|
22
29
|
export default TafModuleContext;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
declare const TafWrapper: React.FC<TafWrapperProps>;
|
|
2
|
+
import { TafModuleProviderProps } from '../TafModule/TafModuleProvider';
|
|
3
|
+
declare const TafWrapper: React.FC<TafModuleProviderProps>;
|
|
6
4
|
export default TafWrapper;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/taf",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "GeoWeb TAF library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,22 +14,22 @@
|
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^17.0.2",
|
|
16
16
|
"@mui/material": "^5.2.8",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"@opengeoweb/
|
|
17
|
+
"@opengeoweb/api": "2.6.0",
|
|
18
|
+
"axios": "^0.25.0",
|
|
19
|
+
"@opengeoweb/shared": "2.6.0",
|
|
20
|
+
"@opengeoweb/theme": "2.6.0",
|
|
20
21
|
"@mui/styles": "^5.2.3",
|
|
21
22
|
"@mui/icons-material": "^5.2.5",
|
|
22
23
|
"react-draggable": "^4.4.3",
|
|
23
24
|
"re-resizable": "^6.9.0",
|
|
24
25
|
"lodash": "^4.17.20",
|
|
25
|
-
"@opengeoweb/form-fields": "2.
|
|
26
|
+
"@opengeoweb/form-fields": "2.6.0",
|
|
27
|
+
"react-hook-form": "^6.12.1",
|
|
26
28
|
"moment": "^2.29.0",
|
|
27
29
|
"moment-timezone": "^0.5.31",
|
|
28
30
|
"@mui/lab": "^5.0.0-alpha.64",
|
|
29
|
-
"axios": "^0.25.0",
|
|
30
31
|
"react-dom": "^17.0.2",
|
|
31
32
|
"react-sortablejs": "^6.0.0",
|
|
32
|
-
"@opengeoweb/api": "2.5.0",
|
|
33
33
|
"sortablejs": "^1.14.0"
|
|
34
34
|
}
|
|
35
35
|
}
|