@opengeoweb/taf 1.1.3 → 1.2.2
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/lib/components/IssuesPane/IssuesPane.styles.d.ts +1 -1
- package/lib/components/TafForm/TafForm.styles.d.ts +1 -1
- package/lib/components/TafForm/TafFormRow/DragHandle.d.ts +8 -0
- package/lib/components/TafForm/TafFormRow/DragHandle.spec.d.ts +1 -0
- package/lib/components/TafForm/TafFormRow/TafFormRow.d.ts +1 -9
- package/lib/components/TafForm/TafFormRow/change.d.ts +2 -0
- package/lib/components/TafForm/TafFormRow/types.d.ts +29 -0
- package/lib/components/TafForm/TafFormRow/validField.d.ts +2 -0
- package/lib/components/TafForm/utils.d.ts +15 -0
- package/lib/components/TafList/TafList.d.ts +2 -2
- package/lib/components/TafList/TafListAccordion.d.ts +2 -2
- package/lib/components/TafList/TafListButtons.d.ts +2 -2
- package/lib/components/TafList/TafListSection.d.ts +2 -2
- package/lib/types.d.ts +1 -1
- package/package.json +10 -6
- package/taf.esm.js +628 -346
- package/taf.umd.js +794 -491
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) =>
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"issuesPane" | "paneHeader" | "paneTitle" | "paneContent" | "image">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) =>
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"textFieldGridItem" | "textFieldInput" | "textFieldLabel" | "textFieldLabelShrink" | "formRow" | "tacTitle" | "tacText" | "tacLine" | "addButton" | "lifecycleButtons" | "actionButton" | "lastButton" | "backdrop">;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"dragHandle">;
|
|
3
|
+
interface DragHandleProps {
|
|
4
|
+
isSorting?: boolean;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const DragHandle: React.FC<DragHandleProps>;
|
|
8
|
+
export default DragHandle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface TafFormRowProps {
|
|
4
|
-
isChangeGroup?: boolean;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
index?: number;
|
|
7
|
-
lastRow?: boolean;
|
|
8
|
-
onRemoveChangeGroup?: (index: number) => void;
|
|
9
|
-
field?: Partial<ArrayField>;
|
|
10
|
-
}
|
|
2
|
+
import { TafFormRowProps } from './types';
|
|
11
3
|
declare const TafFormRow: React.FC<TafFormRowProps>;
|
|
12
4
|
export default TafFormRow;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export declare const invalidChangeMessage = "Invalid Change input, only BECMG, TEMPO or FM are allowed";
|
|
2
|
+
export declare const invalidChangeProbCombinationMessage = "A probability is only allowed in combination with TEMPO";
|
|
2
3
|
export declare const validateChangeField: (value: string) => boolean | string;
|
|
4
|
+
export declare const validateChangeFieldInterField: (value: string, valueProb: string) => boolean | string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GridProps } from '@material-ui/core';
|
|
3
|
+
import { ArrayField } from 'react-hook-form';
|
|
4
|
+
export interface TafFormRowProps extends GridProps {
|
|
5
|
+
isChangeGroup?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
index?: number;
|
|
8
|
+
lastRow?: boolean;
|
|
9
|
+
onRemoveChangeGroup?: (index: number) => void;
|
|
10
|
+
field?: Partial<ArrayField>;
|
|
11
|
+
dragHandle?: React.ReactElement;
|
|
12
|
+
}
|
|
13
|
+
export interface FieldNames {
|
|
14
|
+
messageType?: string;
|
|
15
|
+
location?: string;
|
|
16
|
+
issueDate?: string;
|
|
17
|
+
probability?: string;
|
|
18
|
+
change?: string;
|
|
19
|
+
valid: string;
|
|
20
|
+
wind: string;
|
|
21
|
+
visibility: string;
|
|
22
|
+
weather1: string;
|
|
23
|
+
weather2: string;
|
|
24
|
+
weather3: string;
|
|
25
|
+
cloud1: string;
|
|
26
|
+
cloud2: string;
|
|
27
|
+
cloud3: string;
|
|
28
|
+
cloud4: string;
|
|
29
|
+
}
|
|
@@ -8,4 +8,6 @@ export declare const invalidValidityStartTimeMessage = "Invalid validity start t
|
|
|
8
8
|
export declare const invalidValidityPeriodMessage = "Invalid validity period, validity end time has to be after validity start time";
|
|
9
9
|
export declare const invalidValidityEndTimeMessage = "Invalid validity end time, change group validity must lie within the TAF validity period";
|
|
10
10
|
export declare const invalidValidityLengthMessage = "Invalid validity period, expected either DDHH/DDHH or DDHHmm";
|
|
11
|
+
export declare const invalidChangeValidInterFieldMessage = "Invalid validity period, expected DDHH/DDHH for BECMG and TEMPO or DDHHmm for FM";
|
|
11
12
|
export declare const validateValidField: (value: string, tafStart: string, tafEnd: string) => boolean | string;
|
|
13
|
+
export declare const validateValidChangeGroupInterField: (value: string, valueChange: string) => boolean | string;
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
+
import Sortable from 'sortablejs';
|
|
2
|
+
import { ArrayField } from 'react-hook-form';
|
|
1
3
|
import { BaseForecast, ChangeGroup, Taf, TafActions } from '../../types';
|
|
4
|
+
import { FieldNames } from './TafFormRow/types';
|
|
2
5
|
export declare const formatIssueTime: (issueDate: string) => string;
|
|
3
6
|
export declare function formatFormValues<T>(row: T): T;
|
|
4
7
|
export declare const parseFormValues: (row: any, tafStart: string, tafEnd: string) => BaseForecast | ChangeGroup;
|
|
5
8
|
export declare const convertTafValuesToObject: (formData: any) => Taf;
|
|
9
|
+
export declare const noTAC = "Missing data: no TAC can be generated";
|
|
10
|
+
export declare const getFieldNames: (isChangeGroup: boolean, index: number) => FieldNames;
|
|
6
11
|
export declare const useTACGenerator: (taf: Taf, requestTAC: (postTaf: unknown) => Promise<{
|
|
7
12
|
data: string;
|
|
8
13
|
}>, standardTAC?: string) => [string, (tafToPost: any) => void];
|
|
14
|
+
export declare const getRange: (min: number, max: number) => number[];
|
|
15
|
+
export declare type SortableField = {
|
|
16
|
+
id: string;
|
|
17
|
+
chosen: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const useDragOrder: (trigger: (name?: string | string[]) => Promise<boolean>, move: (oldIndex: number, newIndex: number) => void, fields: Partial<ArrayField<Record<string, unknown>, 'id'>>[]) => {
|
|
20
|
+
onChangeOrder: (event: Sortable.SortableEvent) => void;
|
|
21
|
+
sortedFields: SortableField[];
|
|
22
|
+
setSortedFields: (fields: SortableField[]) => void;
|
|
23
|
+
};
|
|
9
24
|
export declare const getConfirmationDialogTitle: (action: TafActions) => string;
|
|
10
25
|
export declare const getConfirmationDialogContent: (action: TafActions) => string;
|
|
11
26
|
export declare const getConfirmationDialogButtonLabel: (action: TafActions) => string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TafFromBackend } from '../../types';
|
|
2
|
+
import { TafActions, TafFromBackend } from '../../types';
|
|
3
3
|
interface TafListProps {
|
|
4
4
|
tafList: TafFromBackend[];
|
|
5
5
|
isLoading: boolean;
|
|
6
6
|
error: Error;
|
|
7
7
|
errorCancelTaf?: string[];
|
|
8
|
-
onClickTafActionButton: (tafUuid: string, action:
|
|
8
|
+
onClickTafActionButton: (tafUuid: string, action: TafActions) => void;
|
|
9
9
|
}
|
|
10
10
|
declare const TafList: React.FC<TafListProps>;
|
|
11
11
|
export default TafList;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TafFromBackend } from '../../types';
|
|
2
|
+
import { TafActions, TafFromBackend } from '../../types';
|
|
3
3
|
import { ListState } from './TafListRow';
|
|
4
4
|
interface TafListAccordionProps {
|
|
5
5
|
tafListItem: TafFromBackend;
|
|
6
6
|
listType: ListState;
|
|
7
7
|
errorCancelTaf?: string[];
|
|
8
|
-
onClickTafActionButton: (tafUuid: string, action:
|
|
8
|
+
onClickTafActionButton: (tafUuid: string, action: TafActions) => void;
|
|
9
9
|
}
|
|
10
10
|
declare const TafListAccordion: React.FC<TafListAccordionProps>;
|
|
11
11
|
export default TafListAccordion;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TafCanbe } from '../../types';
|
|
2
|
+
import { TafActions, TafCanbe } from '../../types';
|
|
3
3
|
interface TafListButtonsProps {
|
|
4
4
|
uuid: string;
|
|
5
5
|
canBe: TafCanbe[];
|
|
6
|
-
onClickTafActionButton: (tafUuid: string, action:
|
|
6
|
+
onClickTafActionButton: (tafUuid: string, action: TafActions) => void;
|
|
7
7
|
}
|
|
8
8
|
declare const TafListButtons: React.FC<TafListButtonsProps>;
|
|
9
9
|
export default TafListButtons;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TafFromBackend } from '../../types';
|
|
2
|
+
import { TafActions, TafFromBackend } from '../../types';
|
|
3
3
|
import { ListState } from './TafListRow';
|
|
4
4
|
interface TafListSectionProps {
|
|
5
5
|
tafList: TafFromBackend[];
|
|
6
6
|
title: string;
|
|
7
7
|
listType: ListState;
|
|
8
8
|
errorCancelTaf?: string[];
|
|
9
|
-
onClickTafActionButton: (tafUuid: string, action:
|
|
9
|
+
onClickTafActionButton: (tafUuid: string, action: TafActions) => void;
|
|
10
10
|
}
|
|
11
11
|
declare const TafListSection: React.FC<TafListSectionProps>;
|
|
12
12
|
export default TafListSection;
|
package/lib/types.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export interface BaseTaf {
|
|
|
65
65
|
issueDate?: TafDate;
|
|
66
66
|
}
|
|
67
67
|
export declare type TafStatus = 'NEW' | 'DRAFT' | 'PUBLISHED' | 'CORRECTED' | 'AMENDED' | 'CANCELLED' | 'EXPIRED' | 'DRAFT_AMENDED' | 'DRAFT_CORRECTED';
|
|
68
|
-
export declare type TafActions = 'DRAFT' | '
|
|
68
|
+
export declare type TafActions = 'NEW' | 'DRAFT' | 'DRAFT_AMEND' | 'DRAFT_CORRECT' | 'PUBLISH' | 'CANCEL' | 'CORRECT' | 'AMEND' | 'CLOSE' | 'DISCARD';
|
|
69
69
|
export declare type TafCanbe = 'DRAFTED' | 'DISCARDED' | 'PUBLISHED' | 'CANCELLED' | 'AMENDED' | 'CORRECTED';
|
|
70
70
|
export interface Taf extends BaseTaf {
|
|
71
71
|
status: TafStatus;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/taf",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "GeoWeb TAF library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,18 +14,22 @@
|
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "16.14.0",
|
|
16
16
|
"@material-ui/core": "^4.11.0",
|
|
17
|
-
"@opengeoweb/theme": "1.
|
|
18
|
-
"@material-ui/icons": "^4.9.1",
|
|
17
|
+
"@opengeoweb/theme": "1.2.2",
|
|
19
18
|
"@material-ui/lab": "^4.0.0-alpha.56",
|
|
19
|
+
"@material-ui/icons": "^4.9.1",
|
|
20
20
|
"react-hook-form": "^6.12.1",
|
|
21
|
-
"
|
|
21
|
+
"react-sortablejs": "^6.0.0",
|
|
22
|
+
"@opengeoweb/form-fields": "1.2.2",
|
|
22
23
|
"@material-ui/pickers": "^3.2.10",
|
|
23
24
|
"@date-io/moment": "^1.3.13",
|
|
24
25
|
"moment": "^2.29.0",
|
|
25
26
|
"moment-timezone": "^0.5.31",
|
|
26
27
|
"lodash": "^4.17.20",
|
|
27
|
-
"@opengeoweb/api": "1.
|
|
28
|
+
"@opengeoweb/api": "1.2.2",
|
|
28
29
|
"axios": "^0.21.0",
|
|
29
|
-
"@opengeoweb/shared": "1.
|
|
30
|
+
"@opengeoweb/shared": "1.2.2",
|
|
31
|
+
"react-draggable": "^4.4.3",
|
|
32
|
+
"re-resizable": "^6.9.0",
|
|
33
|
+
"sortablejs": "^1.14.0"
|
|
30
34
|
}
|
|
31
35
|
}
|