@opengeoweb/taf 2.14.0 → 2.15.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.
@@ -1,6 +1,7 @@
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 MOCK_USERNAME = "user.name";
4
5
  export interface TafThemeApiProviderProps {
5
6
  createApiFunc?: any;
6
7
  children: React.ReactNode;
@@ -0,0 +1,4 @@
1
+ import { SwitchProps } from '@mui/material';
2
+ import * as React from 'react';
3
+ declare const SwitchButton: React.FC<SwitchProps>;
4
+ export default SwitchButton;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { default as SwitchButton } from './SwitchButton';
@@ -0,0 +1,8 @@
1
+ import { TooltipProps } from '@mui/material';
2
+ import * as React from 'react';
3
+ interface TafAvatarProps {
4
+ editor: string;
5
+ tooltipPlacement?: TooltipProps['placement'];
6
+ }
7
+ declare const TafAvatar: React.FC<TafAvatarProps>;
8
+ export default TafAvatar;
@@ -0,0 +1 @@
1
+ export { default as TafAvatar } from './TafAvatar';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { BaseTaf, TafActions, TafFromBackend } from '../../types';
2
+ import { BaseTaf, TafActions, TafFromBackend, TafFromFrontEnd } from '../../types';
3
3
  import { IssuesPanePosition } from '../IssuesPane/types';
4
4
  export interface TafFormProps {
5
5
  isDisabled?: boolean;
@@ -8,6 +8,7 @@ export interface TafFormProps {
8
8
  onFormAction?: (action: TafActions, formValues?: BaseTaf) => Promise<boolean>;
9
9
  isIssuesPaneOpen?: boolean;
10
10
  setIsIssuesPaneOpen?: (isOpen: boolean, position?: IssuesPanePosition) => void;
11
+ onSwitchEditor?: (formValues: TafFromFrontEnd) => Promise<boolean>;
11
12
  }
12
13
  declare const TafForm: React.FC<TafFormProps>;
13
14
  export default TafForm;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare const getLastUpdateTitle: (time: string) => string;
3
+ interface LastUpdateTimeProps {
4
+ onUpdateTaf: () => void;
5
+ lastUpdateTime?: string;
6
+ }
7
+ declare const LastUpdateTime: React.FC<LastUpdateTimeProps>;
8
+ export default LastUpdateTime;
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const LastUpdateTimeLightTheme: {
7
+ (): React.ReactElement;
8
+ storyName: string;
9
+ };
10
+ export declare const LastUpdateTimeDarkTheme: {
11
+ (): React.ReactElement;
12
+ storyName: string;
13
+ };
@@ -0,0 +1 @@
1
+ export { default as LastUpdateTime } from './LastUpdateTime';
@@ -7,7 +7,8 @@ export declare const CONFIRM_DIALOG_OPTIONS: {
7
7
  };
8
8
  interface TafLayoutProps {
9
9
  tafList: TafFromBackend[];
10
- onPostTaf: () => void;
10
+ onUpdateTaf: () => void;
11
+ lastUpdateTime?: string;
11
12
  }
12
13
  declare const TafLayout: React.FC<TafLayoutProps>;
13
14
  export default TafLayout;
@@ -3,7 +3,7 @@ import { AxiosError } from 'axios';
3
3
  import { TafFromBackend, TafActions, TafStatus, TafFromFrontEnd } from '../../../types';
4
4
  import { IssuesPanePosition } from '../../IssuesPane/types';
5
5
  export declare const fromActionToStatus: (tafAction: TafActions) => TafStatus;
6
- declare type TafError = {
6
+ export declare type TafError = {
7
7
  type: 'CANCELLED' | 'SERVER';
8
8
  title: string;
9
9
  message?: string;
@@ -15,6 +15,7 @@ interface TafPanelProps {
15
15
  index: number;
16
16
  isLoading?: boolean;
17
17
  postTaf?: (taf: TafFromFrontEnd) => Promise<void>;
18
+ patchTaf?: (taf: TafFromFrontEnd) => Promise<boolean>;
18
19
  isIssuesPaneOpen?: boolean;
19
20
  setIsIssuesPaneOpen?: (isOpen: boolean, position?: IssuesPanePosition) => void;
20
21
  isFormDisabled?: boolean;
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { TafModuleProviderProps } from './TafModuleProvider';
3
+ export declare const getCurrentDate: () => string;
3
4
  declare const Wrapper: React.FC<TafModuleProviderProps>;
4
5
  export default Wrapper;
@@ -5,6 +5,7 @@ declare const _default: {
5
5
  export default _default;
6
6
  export declare const TafModuleLightThemeWithErrorOnAction: () => React.ReactElement;
7
7
  export declare const TafModuleLightThemeWithErrorOnLoadingList: () => React.ReactElement;
8
+ export declare const TafModuleWithNewData: () => React.ReactElement;
8
9
  export declare const TafModuleLightTheme: () => React.ReactElement;
9
10
  export declare const TafModuleDarkTheme: () => React.ReactElement;
10
11
  export declare const TafModuleToolContainerExample: () => React.ReactElement;
package/lib/types.d.ts CHANGED
@@ -119,13 +119,15 @@ export interface TafFromBackend {
119
119
  taf: Taf;
120
120
  creationDate: TafDate;
121
121
  canbe: TafCanbe[];
122
+ editor: string;
122
123
  }
123
124
  /**
124
125
  * Type with TAF info sent to the backend
125
126
  */
126
127
  export interface TafFromFrontEnd {
127
128
  taf: Taf;
128
- changeStatusTo: TafStatus;
129
+ changeStatusTo?: TafStatus;
130
+ editor?: string;
129
131
  }
130
132
  /**
131
133
  * TAF (json) settings (libs/taf/src/lib/utils/tafConfig.json)
@@ -2,6 +2,7 @@ import { TafFromBackend } from '../../types';
2
2
  export declare const fakeTestTac = "TAF EHAM 0812/0918 20020G35KT 0500 SN BKN040=";
3
3
  export declare const api: {
4
4
  postTaf: () => Promise<void>;
5
+ patchTaf: () => Promise<void>;
5
6
  getTafList: () => Promise<{
6
7
  data: TafFromBackend[];
7
8
  }>;
@@ -1,6 +1,10 @@
1
+ import { TafFromBackend } from '../types';
1
2
  export declare const fakeTafTac = "TAF EHAM 0812/0918 20020G35KT 0500 SN BKN040\nBECMG 0814/0816 0700 BKN001=";
3
+ export declare const setFakeUpdatedList: (newList: TafFromBackend[]) => void;
4
+ export declare const getFakeUpdatedList: () => TafFromBackend[];
2
5
  export declare const fakeAxiosInstance: {
3
6
  get: (_url: any, _params?: any) => Promise<void>;
4
7
  post: (_url: any, _params?: any, _signal?: any) => Promise<void>;
8
+ patch: (_url: any, _params?: any, _signal?: any) => Promise<void>;
5
9
  };
6
10
  export declare const createApi: () => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/taf",
3
- "version": "2.14.0",
3
+ "version": "2.15.0",
4
4
  "description": "GeoWeb TAF library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -13,21 +13,24 @@
13
13
  "dependencies": {},
14
14
  "peerDependencies": {
15
15
  "react": "^17.0.2",
16
- "@opengeoweb/api": "2.14.0",
16
+ "@opengeoweb/api": "2.15.0",
17
17
  "axios": "^0.25.0",
18
- "@opengeoweb/shared": "2.14.0",
18
+ "@opengeoweb/shared": "2.15.0",
19
19
  "@mui/material": "^5.2.8",
20
- "@opengeoweb/theme": "2.14.0",
20
+ "@opengeoweb/theme": "2.15.0",
21
21
  "@mui/styles": "^5.2.3",
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.14.0",
25
+ "@opengeoweb/form-fields": "2.15.0",
26
26
  "react-hook-form": "^6.12.1",
27
27
  "moment": "^2.29.0",
28
28
  "moment-timezone": "^0.5.31",
29
29
  "@mui/lab": "^5.0.0-alpha.64",
30
30
  "react-dom": "^17.0.2",
31
+ "@opengeoweb/authentication": "2.15.0",
32
+ "react-router-dom": "^5.2.0",
33
+ "query-string": "^6.13.7",
31
34
  "react-sortablejs": "^6.0.0",
32
35
  "sortablejs": "^1.14.0"
33
36
  }