@opengeoweb/sigmet-airmet 10.1.0 → 11.0.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.esm.js CHANGED
@@ -580,6 +580,7 @@ var ProductAction;
580
580
  ProductAction["RENEW"] = "RENEW";
581
581
  ProductAction["SAVE"] = "SAVE";
582
582
  ProductAction["DISCARD"] = "DISCARD";
583
+ ProductAction["DUPLICATE"] = "DUPLICATE";
583
584
  ProductAction["CLOSE"] = "CLOSE";
584
585
  })(ProductAction || (ProductAction = {}));
585
586
  var ProductStatusDescription;
@@ -588,6 +589,7 @@ var ProductStatusDescription;
588
589
  ProductStatusDescription["PUBLISHED"] = "Published";
589
590
  ProductStatusDescription["CANCELLED"] = "Cancelled";
590
591
  ProductStatusDescription["EXPIRED"] = "Expired";
592
+ ProductStatusDescription["RENEWED"] = "Renewed";
591
593
  ProductStatusDescription["DISCARDED"] = "Discarded";
592
594
  })(ProductStatusDescription || (ProductStatusDescription = {}));
593
595
  var CloudLevelUnits;
@@ -8146,10 +8148,12 @@ var SigmetForm = function SigmetForm(_ref) {
8146
8148
  React__default.useEffect(function () {
8147
8149
  var isInDrawMode = activeStartTool !== '' || activeEndTool !== '';
8148
8150
  setDialogActionsDisabled && setDialogActionsDisabled(isInDrawMode);
8149
- if (!isReadOnly && isInDrawMode !== isDisabled) {
8151
+ if (mode === 'view') {
8152
+ setIsDisabled(true);
8153
+ } else {
8150
8154
  setIsDisabled(isInDrawMode);
8151
8155
  }
8152
- }, [activeStartTool, activeEndTool, isReadOnly, isDisabled, setDialogActionsDisabled]);
8156
+ }, [mode, activeStartTool, activeEndTool, setDialogActionsDisabled]);
8153
8157
  var _useConditionalFields = useConditionalFields$1(productConfig),
8154
8158
  hasVolcanicAshes = _useConditionalFields.hasVolcanicAshes,
8155
8159
  omitChange = _useConditionalFields.omitChange;
@@ -8434,10 +8438,12 @@ var AirmetForm = function AirmetForm(_ref) {
8434
8438
  }, [initialAirmet, updateTac, watch]);
8435
8439
  React__default.useEffect(function () {
8436
8440
  var isInDrawMode = activeStartTool !== '';
8437
- if (!isReadOnly && isInDrawMode !== isDisabled) {
8441
+ if (mode === 'view') {
8442
+ setIsDisabled(true);
8443
+ } else {
8438
8444
  setIsDisabled(isInDrawMode);
8439
8445
  }
8440
- }, [activeStartTool, isReadOnly, isDisabled]);
8446
+ }, [activeStartTool, mode]);
8441
8447
  var _useConditionalFields = useConditionalFields(),
8442
8448
  hasSurfaceVisiblity = _useConditionalFields.hasSurfaceVisiblity,
8443
8449
  hasSurfaceWind = _useConditionalFields.hasSurfaceWind,
@@ -12226,4 +12232,4 @@ ConnectedModuleWrapper) {
12226
12232
  }
12227
12233
  };
12228
12234
 
12229
- export { AirmetComponentsLookUp, AirmetForm, AirmetType, CloudLevelUnits, ContentDialog, DEFAULT_MINIMUM_SURFACE_LEVEL, DEFAULT_MIN_MOVEMENT_SPEED, DEFAULT_MIN_VISIBILITY, DEFAULT_MIN_WIND_SPEED, Direction, DownloadSigmetAirmetConfigWrapper, LevelUnits, MapViewGeoJson, MetInfoWrapper, MovementUnit, ProductAction, ProductFormDialog, ProductList, ProductListRow, ProductStatusDescription, SA_NAMESPACE, SigmetComponentsLookUp, SigmetForm, SigmetType, StartOrEndDrawing, VisibilityCause, WindUnit, airmetConfig, createAirmetPostParameter, createApi$1 as createApi, createApi as createFakeApi, createSigmetPostParameter, extractUnitsToShow, firSelectionType, getActiveFIRArea, getAllFirAreas, getAllowedUnits, getBaseLayers, getConfirmationDialogButtonLabel, getConfirmationDialogCancelLabel, getConfirmationDialogContent, getConfirmationDialogTitle, getDefaultPhenomena, getDefaultValidityMinutesFromConfig, getDialogtitle, getDrawTools, getFieldLabel, getFir, getFirArea, getFirOptions, getHoursBeforeValidity, getLevelInFeet, getMaxCloudLevelValue, getMaxCloudLowerLevelValue, getMaxHoursOfValidity, getMaxLevelValue, getMaxMovementSpeedValue, getMaxPolygonPoints, getMaxVisibilityValue, getMaxWindSpeedValue, getMinCloudLevelValue, getMinCloudLowerLevelValue, getMinLevelValue, getMinMovementSpeedValue, getMinVisibilityValue, getMinWindSpeedValue, getOmitChangeFromConfig, getPhenomenon, getProductFormLifecycleButtons, getProductFormMode, getProductIssueDate, getProjection, getToolIcon, getValidFromDelayTimeMinutesFromConfig, hasMaxFeaturePoints, hasValue, isFir, isInstanceOfAirmet, isInstanceOfCancelAirmet, isInstanceOfCancelSigmet, isInstanceOfCancelSigmetOrAirmet, isInstanceOfSigmet, isInstanceOfSigmetOrAirmet, isLevelLower, prepareFormValues, prepareProductValues, sigmetAirmetTranslations as saTranslations, sigmetConfig, triggerValidations, updateDrawToolsWithFir, useDelayedFormValues, useFormLayers };
12235
+ export { AirmetComponentsLookUp, AirmetForm, AirmetType, CloudLevelUnits, ContentDialog, DEFAULT_MINIMUM_SURFACE_LEVEL, DEFAULT_MIN_MOVEMENT_SPEED, DEFAULT_MIN_VISIBILITY, DEFAULT_MIN_WIND_SPEED, Direction, DownloadSigmetAirmetConfigWrapper, LevelUnits, MapViewGeoJson, MetInfoWrapper, MovementUnit, ProductAction, ProductFormDialog, ProductList, ProductListRow, ProductStatusDescription, SA_NAMESPACE, SigmetComponentsLookUp, SigmetForm, SigmetType, StartOrEndDrawing, VisibilityCause, WindUnit, airmetConfig, createAirmetPostParameter, createApi$1 as createApi, createApi as createFakeApi, createSigmetPostParameter, extractUnitsToShow, fakeAirmetList, fakeSigmetList, firSelectionType, getActiveFIRArea, getAllFirAreas, getAllowedUnits, getBaseLayers, getConfirmationDialogButtonLabel, getConfirmationDialogCancelLabel, getConfirmationDialogContent, getConfirmationDialogTitle, getDefaultPhenomena, getDefaultValidUntilValue, getDefaultValidityMinutesFromConfig, getDialogtitle, getDrawTools, getFieldLabel, getFir, getFirArea, getFirOptions, getHoursBeforeValidity, getLevelInFeet, getMaxCloudLevelValue, getMaxCloudLowerLevelValue, getMaxHoursOfValidity, getMaxLevelValue, getMaxMovementSpeedValue, getMaxPolygonPoints, getMaxVisibilityValue, getMaxWindSpeedValue, getMinCloudLevelValue, getMinCloudLowerLevelValue, getMinLevelValue, getMinMovementSpeedValue, getMinVisibilityValue, getMinWindSpeedValue, getOmitChangeFromConfig, getPhenomenon, getProductFormLifecycleButtons, getProductFormMode, getProductIssueDate, getProjection, getToolIcon, getValidFromDelayTimeMinutesFromConfig, hasMaxFeaturePoints, hasValue, isFir, isInstanceOfAirmet, isInstanceOfCancelAirmet, isInstanceOfCancelSigmet, isInstanceOfCancelSigmetOrAirmet, isInstanceOfSigmet, isInstanceOfSigmetOrAirmet, isLevelLower, prepareFormValues, prepareProductValues, sigmetAirmetTranslations as saTranslations, sigmetConfig, triggerValidations, updateDrawToolsWithFir, useDelayedFormValues, useFormLayers };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/sigmet-airmet",
3
- "version": "10.1.0",
3
+ "version": "11.0.0",
4
4
  "description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/index.d.ts CHANGED
@@ -1,13 +1,14 @@
1
1
  import saTranslations from '../locales/sigmet-airmet.json';
2
2
  export * from './lib/components/ProductForms';
3
3
  export * from './lib/components/ProductForms/ProductFormDialog';
4
+ export * from './lib/components/ProductForms/ProductFormFields/ValidUntil';
4
5
  export * from './lib/components/ProductForms/utils';
5
6
  export * from './lib/components/ContentDialog';
6
7
  export * from './lib/components/MapViewGeoJson';
7
8
  export * from './lib/components/ProductList';
8
9
  export * from './lib/components/MetInfoWrapper';
9
10
  export { createApi } from './lib/utils/api';
10
- export { createApi as createFakeApi } from './lib/utils/fakeApi';
11
+ export { createApi as createFakeApi, fakeSigmetList, fakeAirmetList, } from './lib/utils/fakeApi';
11
12
  export { sigmetConfig, airmetConfig } from './lib/utils/config';
12
13
  export * from './lib/types';
13
14
  export * from './lib/components/ComponentsLookUp';
@@ -66,13 +66,14 @@ export type DateType = string;
66
66
  *
67
67
  * Note: ProductStatus from the backend should be refreshed regularly to display status updates.
68
68
  */
69
- export type ProductStatus = 'DRAFT' | 'PUBLISHED' | 'CANCELLED' | 'EXPIRED' | 'DISCARDED';
69
+ export type ProductStatus = 'DRAFT' | 'PUBLISHED' | 'CANCELLED' | 'EXPIRED' | 'RENEWED' | 'DISCARDED';
70
70
  export declare enum ProductAction {
71
71
  PUBLISH = "PUBLISH",
72
72
  CANCEL = "CANCEL",
73
73
  RENEW = "RENEW",
74
74
  SAVE = "SAVE",
75
75
  DISCARD = "DISCARD",
76
+ DUPLICATE = "DUPLICATE",
76
77
  CLOSE = "CLOSE"
77
78
  }
78
79
  export declare enum ProductStatusDescription {
@@ -80,6 +81,7 @@ export declare enum ProductStatusDescription {
80
81
  'PUBLISHED' = "Published",
81
82
  'CANCELLED' = "Cancelled",
82
83
  'EXPIRED' = "Expired",
84
+ 'RENEWED' = "Renewed",
83
85
  'DISCARDED' = "Discarded"
84
86
  }
85
87
  /**
@@ -95,7 +97,7 @@ export type CancelProductStatus = 'PUBLISHED';
95
97
  * 'PUBLISHED': product can be PUBLISHED
96
98
  * 'CANCELLED': product can be CANCELLED
97
99
  */
98
- export type ProductCanbe = 'DRAFTED' | 'DISCARDED' | 'PUBLISHED' | 'CANCELLED';
100
+ export type ProductCanbe = 'DRAFTED' | 'DISCARDED' | 'PUBLISHED' | 'RENEWED' | 'CANCELLED';
99
101
  /**
100
102
  * ProductSequence is a sequence label with a counter of the SIGMETs/AIRMETs issued on a day (starting at with 1 01:00),
101
103
  * max 3 characters long; first character should be a capital letter,
@@ -1,4 +1,7 @@
1
1
  import { SigmetAirmetApi } from './api';
2
+ import { fakeAirmetList } from './mockdata/fakeAirmetList';
3
+ import { fakeSigmetList } from './mockdata/fakeSigmetList';
2
4
  export declare const fakeSigmetTAC = "EHAA SIGMET 1 VALID 121249/121449 EHDB- EHAA AMSTERDAM FIR FRQ TS OBS ENTIRE FIR FL010 STNR WKN";
3
5
  export declare const fakeAirmetTAC = "EHAA AIRMET -1 VALID 310700/311100 EHDB- EHAA AMSTERDAM FIR ISOL CB OBS ENTIRE FIR FL020 STNR NC";
4
- export declare const createApi: () => SigmetAirmetApi;
6
+ declare const createApi: () => SigmetAirmetApi;
7
+ export { createApi, fakeAirmetList, fakeSigmetList };